// deno-fmt-ignore-file
// deno-lint-ignore-file
// This code was bundled using `deno bundle` and it's not recommended to edit it manually

function isWindows() {
    return Deno.build.os === "windows";
}
function isRStudio() {
    return !!Deno.env.get("RSTUDIO");
}
function isVSCodeOutputChannel() {
    return !!Deno.env.get("VSCODE_PID");
}
function isVSCodeTerminal() {
    return Deno.env.get("TERM_PROGRAM") === "vscode";
}
function isVSCodeServer() {
    return !!vsCodeServerProxyUri();
}
function isRStudioWorkbench() {
    return !!Deno.env.get("RS_SERVER_URL") && !!Deno.env.get("RS_SESSION_URL");
}
function isRStudioTerminal() {
    return !!Deno.env.get("RSTUDIO_TERM");
}
function isServerSession() {
    return isRStudioServer() || isRStudioWorkbench() || isJupyterServer() || isJupyterHubServer();
}
function isRStudioServer() {
    return isRStudio() && Deno.env.get("RSTUDIO_PROGRAM_MODE") === "server";
}
function isRStudioPreview() {
    return isRStudio() && !isRStudioTerminal();
}
function isJupyterServer() {
    return !!Deno.env.get("JUPYTER_SERVER_URL");
}
function isJupyterHubServer() {
    return jupyterHubUser() !== undefined;
}
function vsCodeServerProxyUri() {
    return Deno.env.get("VSCODE_PROXY_URI");
}
function jupyterHubHttpReferrer() {
    return Deno.env.get("JUPYTERHUB_HTTP_REFERER");
}
function jupyterHubUser() {
    return Deno.env.get("JUPYTERHUB_USER");
}
function isInteractiveTerminal() {
    return Deno.isatty(Deno.stderr.rid);
}
function isInteractiveSession() {
    return isRStudio() || isInteractiveTerminal() || isVSCodeOutputChannel();
}
function haveArrowKeys() {
    return !isWindows();
}
const osType = (()=>{
    const { Deno: Deno1  } = globalThis;
    if (typeof Deno1?.build?.os === "string") {
        return Deno1.build.os;
    }
    const { navigator  } = globalThis;
    if (navigator?.appVersion?.includes?.("Win")) {
        return "windows";
    }
    return "linux";
})();
const isWindows1 = osType === "windows";
const CHAR_FORWARD_SLASH = 47;
function assertPath(path) {
    if (typeof path !== "string") {
        throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
    }
}
function isPosixPathSeparator(code) {
    return code === 47;
}
function isPathSeparator(code) {
    return isPosixPathSeparator(code) || code === 92;
}
function isWindowsDeviceRoot(code) {
    return code >= 97 && code <= 122 || code >= 65 && code <= 90;
}
function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
    let res = "";
    let lastSegmentLength = 0;
    let lastSlash = -1;
    let dots = 0;
    let code;
    for(let i1 = 0, len = path.length; i1 <= len; ++i1){
        if (i1 < len) code = path.charCodeAt(i1);
        else if (isPathSeparator(code)) break;
        else code = CHAR_FORWARD_SLASH;
        if (isPathSeparator(code)) {
            if (lastSlash === i1 - 1 || dots === 1) {} else if (lastSlash !== i1 - 1 && dots === 2) {
                if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
                    if (res.length > 2) {
                        const lastSlashIndex = res.lastIndexOf(separator);
                        if (lastSlashIndex === -1) {
                            res = "";
                            lastSegmentLength = 0;
                        } else {
                            res = res.slice(0, lastSlashIndex);
                            lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
                        }
                        lastSlash = i1;
                        dots = 0;
                        continue;
                    } else if (res.length === 2 || res.length === 1) {
                        res = "";
                        lastSegmentLength = 0;
                        lastSlash = i1;
                        dots = 0;
                        continue;
                    }
                }
                if (allowAboveRoot) {
                    if (res.length > 0) res += `${separator}..`;
                    else res = "..";
                    lastSegmentLength = 2;
                }
            } else {
                if (res.length > 0) res += separator + path.slice(lastSlash + 1, i1);
                else res = path.slice(lastSlash + 1, i1);
                lastSegmentLength = i1 - lastSlash - 1;
            }
            lastSlash = i1;
            dots = 0;
        } else if (code === 46 && dots !== -1) {
            ++dots;
        } else {
            dots = -1;
        }
    }
    return res;
}
function _format(sep, pathObject) {
    const dir = pathObject.dir || pathObject.root;
    const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
    if (!dir) return base;
    if (dir === pathObject.root) return dir + base;
    return dir + sep + base;
}
const WHITESPACE_ENCODINGS = {
    "\u0009": "%09",
    "\u000A": "%0A",
    "\u000B": "%0B",
    "\u000C": "%0C",
    "\u000D": "%0D",
    "\u0020": "%20"
};
function encodeWhitespace(string) {
    return string.replaceAll(/[\s]/g, (c)=>{
        return WHITESPACE_ENCODINGS[c] ?? c;
    });
}
class DenoStdInternalError extends Error {
    constructor(message){
        super(message);
        this.name = "DenoStdInternalError";
    }
}
function assert(expr, msg = "") {
    if (!expr) {
        throw new DenoStdInternalError(msg);
    }
}
const sep = "\\";
const delimiter = ";";
function resolve(...pathSegments) {
    let resolvedDevice = "";
    let resolvedTail = "";
    let resolvedAbsolute = false;
    for(let i1 = pathSegments.length - 1; i1 >= -1; i1--){
        let path;
        const { Deno: Deno1  } = globalThis;
        if (i1 >= 0) {
            path = pathSegments[i1];
        } else if (!resolvedDevice) {
            if (typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a drive-letter-less path without a CWD.");
            }
            path = Deno1.cwd();
        } else {
            if (typeof Deno1?.env?.get !== "function" || typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a relative path without a CWD.");
            }
            path = Deno1.cwd();
            if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
                path = `${resolvedDevice}\\`;
            }
        }
        assertPath(path);
        const len = path.length;
        if (len === 0) continue;
        let rootEnd = 0;
        let device = "";
        let isAbsolute = false;
        const code = path.charCodeAt(0);
        if (len > 1) {
            if (isPathSeparator(code)) {
                isAbsolute = true;
                if (isPathSeparator(path.charCodeAt(1))) {
                    let j = 2;
                    let last = j;
                    for(; j < len; ++j){
                        if (isPathSeparator(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        const firstPart = path.slice(last, j);
                        last = j;
                        for(; j < len; ++j){
                            if (!isPathSeparator(path.charCodeAt(j))) break;
                        }
                        if (j < len && j !== last) {
                            last = j;
                            for(; j < len; ++j){
                                if (isPathSeparator(path.charCodeAt(j))) break;
                            }
                            if (j === len) {
                                device = `\\\\${firstPart}\\${path.slice(last)}`;
                                rootEnd = j;
                            } else if (j !== last) {
                                device = `\\\\${firstPart}\\${path.slice(last, j)}`;
                                rootEnd = j;
                            }
                        }
                    }
                } else {
                    rootEnd = 1;
                }
            } else if (isWindowsDeviceRoot(code)) {
                if (path.charCodeAt(1) === 58) {
                    device = path.slice(0, 2);
                    rootEnd = 2;
                    if (len > 2) {
                        if (isPathSeparator(path.charCodeAt(2))) {
                            isAbsolute = true;
                            rootEnd = 3;
                        }
                    }
                }
            }
        } else if (isPathSeparator(code)) {
            rootEnd = 1;
            isAbsolute = true;
        }
        if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
            continue;
        }
        if (resolvedDevice.length === 0 && device.length > 0) {
            resolvedDevice = device;
        }
        if (!resolvedAbsolute) {
            resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
            resolvedAbsolute = isAbsolute;
        }
        if (resolvedAbsolute && resolvedDevice.length > 0) break;
    }
    resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator);
    return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
}
function normalize(path) {
    assertPath(path);
    const len = path.length;
    if (len === 0) return ".";
    let rootEnd = 0;
    let device;
    let isAbsolute = false;
    const code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator(code)) {
            isAbsolute = true;
            if (isPathSeparator(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    const firstPart = path.slice(last, j);
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            return `\\\\${firstPart}\\${path.slice(last)}\\`;
                        } else if (j !== last) {
                            device = `\\\\${firstPart}\\${path.slice(last, j)}`;
                            rootEnd = j;
                        }
                    }
                }
            } else {
                rootEnd = 1;
            }
        } else if (isWindowsDeviceRoot(code)) {
            if (path.charCodeAt(1) === 58) {
                device = path.slice(0, 2);
                rootEnd = 2;
                if (len > 2) {
                    if (isPathSeparator(path.charCodeAt(2))) {
                        isAbsolute = true;
                        rootEnd = 3;
                    }
                }
            }
        }
    } else if (isPathSeparator(code)) {
        return "\\";
    }
    let tail;
    if (rootEnd < len) {
        tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator);
    } else {
        tail = "";
    }
    if (tail.length === 0 && !isAbsolute) tail = ".";
    if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {
        tail += "\\";
    }
    if (device === undefined) {
        if (isAbsolute) {
            if (tail.length > 0) return `\\${tail}`;
            else return "\\";
        } else if (tail.length > 0) {
            return tail;
        } else {
            return "";
        }
    } else if (isAbsolute) {
        if (tail.length > 0) return `${device}\\${tail}`;
        else return `${device}\\`;
    } else if (tail.length > 0) {
        return device + tail;
    } else {
        return device;
    }
}
function isAbsolute(path) {
    assertPath(path);
    const len = path.length;
    if (len === 0) return false;
    const code = path.charCodeAt(0);
    if (isPathSeparator(code)) {
        return true;
    } else if (isWindowsDeviceRoot(code)) {
        if (len > 2 && path.charCodeAt(1) === 58) {
            if (isPathSeparator(path.charCodeAt(2))) return true;
        }
    }
    return false;
}
function join(...paths) {
    const pathsCount = paths.length;
    if (pathsCount === 0) return ".";
    let joined;
    let firstPart = null;
    for(let i1 = 0; i1 < pathsCount; ++i1){
        const path = paths[i1];
        assertPath(path);
        if (path.length > 0) {
            if (joined === undefined) joined = firstPart = path;
            else joined += `\\${path}`;
        }
    }
    if (joined === undefined) return ".";
    let needsReplace = true;
    let slashCount = 0;
    assert(firstPart != null);
    if (isPathSeparator(firstPart.charCodeAt(0))) {
        ++slashCount;
        const firstLen = firstPart.length;
        if (firstLen > 1) {
            if (isPathSeparator(firstPart.charCodeAt(1))) {
                ++slashCount;
                if (firstLen > 2) {
                    if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount;
                    else {
                        needsReplace = false;
                    }
                }
            }
        }
    }
    if (needsReplace) {
        for(; slashCount < joined.length; ++slashCount){
            if (!isPathSeparator(joined.charCodeAt(slashCount))) break;
        }
        if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`;
    }
    return normalize(joined);
}
function relative(from, to) {
    assertPath(from);
    assertPath(to);
    if (from === to) return "";
    const fromOrig = resolve(from);
    const toOrig = resolve(to);
    if (fromOrig === toOrig) return "";
    from = fromOrig.toLowerCase();
    to = toOrig.toLowerCase();
    if (from === to) return "";
    let fromStart = 0;
    let fromEnd = from.length;
    for(; fromStart < fromEnd; ++fromStart){
        if (from.charCodeAt(fromStart) !== 92) break;
    }
    for(; fromEnd - 1 > fromStart; --fromEnd){
        if (from.charCodeAt(fromEnd - 1) !== 92) break;
    }
    const fromLen = fromEnd - fromStart;
    let toStart = 0;
    let toEnd = to.length;
    for(; toStart < toEnd; ++toStart){
        if (to.charCodeAt(toStart) !== 92) break;
    }
    for(; toEnd - 1 > toStart; --toEnd){
        if (to.charCodeAt(toEnd - 1) !== 92) break;
    }
    const toLen = toEnd - toStart;
    const length = fromLen < toLen ? fromLen : toLen;
    let lastCommonSep = -1;
    let i1 = 0;
    for(; i1 <= length; ++i1){
        if (i1 === length) {
            if (toLen > length) {
                if (to.charCodeAt(toStart + i1) === 92) {
                    return toOrig.slice(toStart + i1 + 1);
                } else if (i1 === 2) {
                    return toOrig.slice(toStart + i1);
                }
            }
            if (fromLen > length) {
                if (from.charCodeAt(fromStart + i1) === 92) {
                    lastCommonSep = i1;
                } else if (i1 === 2) {
                    lastCommonSep = 3;
                }
            }
            break;
        }
        const fromCode = from.charCodeAt(fromStart + i1);
        const toCode = to.charCodeAt(toStart + i1);
        if (fromCode !== toCode) break;
        else if (fromCode === 92) lastCommonSep = i1;
    }
    if (i1 !== length && lastCommonSep === -1) {
        return toOrig;
    }
    let out = "";
    if (lastCommonSep === -1) lastCommonSep = 0;
    for(i1 = fromStart + lastCommonSep + 1; i1 <= fromEnd; ++i1){
        if (i1 === fromEnd || from.charCodeAt(i1) === 92) {
            if (out.length === 0) out += "..";
            else out += "\\..";
        }
    }
    if (out.length > 0) {
        return out + toOrig.slice(toStart + lastCommonSep, toEnd);
    } else {
        toStart += lastCommonSep;
        if (toOrig.charCodeAt(toStart) === 92) ++toStart;
        return toOrig.slice(toStart, toEnd);
    }
}
function toNamespacedPath(path) {
    if (typeof path !== "string") return path;
    if (path.length === 0) return "";
    const resolvedPath = resolve(path);
    if (resolvedPath.length >= 3) {
        if (resolvedPath.charCodeAt(0) === 92) {
            if (resolvedPath.charCodeAt(1) === 92) {
                const code = resolvedPath.charCodeAt(2);
                if (code !== 63 && code !== 46) {
                    return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
                }
            }
        } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) {
            if (resolvedPath.charCodeAt(1) === 58 && resolvedPath.charCodeAt(2) === 92) {
                return `\\\\?\\${resolvedPath}`;
            }
        }
    }
    return path;
}
function dirname(path) {
    assertPath(path);
    const len = path.length;
    if (len === 0) return ".";
    let rootEnd = -1;
    let end = -1;
    let matchedSlash = true;
    let offset = 0;
    const code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator(code)) {
            rootEnd = offset = 1;
            if (isPathSeparator(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            return path;
                        }
                        if (j !== last) {
                            rootEnd = offset = j + 1;
                        }
                    }
                }
            }
        } else if (isWindowsDeviceRoot(code)) {
            if (path.charCodeAt(1) === 58) {
                rootEnd = offset = 2;
                if (len > 2) {
                    if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3;
                }
            }
        }
    } else if (isPathSeparator(code)) {
        return path;
    }
    for(let i1 = len - 1; i1 >= offset; --i1){
        if (isPathSeparator(path.charCodeAt(i1))) {
            if (!matchedSlash) {
                end = i1;
                break;
            }
        } else {
            matchedSlash = false;
        }
    }
    if (end === -1) {
        if (rootEnd === -1) return ".";
        else end = rootEnd;
    }
    return path.slice(0, end);
}
function basename(path, ext = "") {
    if (ext !== undefined && typeof ext !== "string") {
        throw new TypeError('"ext" argument must be a string');
    }
    assertPath(path);
    let start = 0;
    let end = -1;
    let matchedSlash = true;
    let i1;
    if (path.length >= 2) {
        const drive = path.charCodeAt(0);
        if (isWindowsDeviceRoot(drive)) {
            if (path.charCodeAt(1) === 58) start = 2;
        }
    }
    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
        if (ext.length === path.length && ext === path) return "";
        let extIdx = ext.length - 1;
        let firstNonSlashEnd = -1;
        for(i1 = path.length - 1; i1 >= start; --i1){
            const code = path.charCodeAt(i1);
            if (isPathSeparator(code)) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else {
                if (firstNonSlashEnd === -1) {
                    matchedSlash = false;
                    firstNonSlashEnd = i1 + 1;
                }
                if (extIdx >= 0) {
                    if (code === ext.charCodeAt(extIdx)) {
                        if (--extIdx === -1) {
                            end = i1;
                        }
                    } else {
                        extIdx = -1;
                        end = firstNonSlashEnd;
                    }
                }
            }
        }
        if (start === end) end = firstNonSlashEnd;
        else if (end === -1) end = path.length;
        return path.slice(start, end);
    } else {
        for(i1 = path.length - 1; i1 >= start; --i1){
            if (isPathSeparator(path.charCodeAt(i1))) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else if (end === -1) {
                matchedSlash = false;
                end = i1 + 1;
            }
        }
        if (end === -1) return "";
        return path.slice(start, end);
    }
}
function extname(path) {
    assertPath(path);
    let start = 0;
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let preDotState = 0;
    if (path.length >= 2 && path.charCodeAt(1) === 58 && isWindowsDeviceRoot(path.charCodeAt(0))) {
        start = startPart = 2;
    }
    for(let i1 = path.length - 1; i1 >= start; --i1){
        const code = path.charCodeAt(i1);
        if (isPathSeparator(code)) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        return "";
    }
    return path.slice(startDot, end);
}
function format(pathObject) {
    if (pathObject === null || typeof pathObject !== "object") {
        throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
    }
    return _format("\\", pathObject);
}
function parse(path) {
    assertPath(path);
    const ret = {
        root: "",
        dir: "",
        base: "",
        ext: "",
        name: ""
    };
    const len = path.length;
    if (len === 0) return ret;
    let rootEnd = 0;
    let code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator(code)) {
            rootEnd = 1;
            if (isPathSeparator(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            rootEnd = j;
                        } else if (j !== last) {
                            rootEnd = j + 1;
                        }
                    }
                }
            }
        } else if (isWindowsDeviceRoot(code)) {
            if (path.charCodeAt(1) === 58) {
                rootEnd = 2;
                if (len > 2) {
                    if (isPathSeparator(path.charCodeAt(2))) {
                        if (len === 3) {
                            ret.root = ret.dir = path;
                            return ret;
                        }
                        rootEnd = 3;
                    }
                } else {
                    ret.root = ret.dir = path;
                    return ret;
                }
            }
        }
    } else if (isPathSeparator(code)) {
        ret.root = ret.dir = path;
        return ret;
    }
    if (rootEnd > 0) ret.root = path.slice(0, rootEnd);
    let startDot = -1;
    let startPart = rootEnd;
    let end = -1;
    let matchedSlash = true;
    let i1 = path.length - 1;
    let preDotState = 0;
    for(; i1 >= rootEnd; --i1){
        code = path.charCodeAt(i1);
        if (isPathSeparator(code)) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        if (end !== -1) {
            ret.base = ret.name = path.slice(startPart, end);
        }
    } else {
        ret.name = path.slice(startPart, startDot);
        ret.base = path.slice(startPart, end);
        ret.ext = path.slice(startDot, end);
    }
    if (startPart > 0 && startPart !== rootEnd) {
        ret.dir = path.slice(0, startPart - 1);
    } else ret.dir = ret.root;
    return ret;
}
function fromFileUrl(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol != "file:") {
        throw new TypeError("Must be a file URL.");
    }
    let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
    if (url.hostname != "") {
        path = `\\\\${url.hostname}${path}`;
    }
    return path;
}
function toFileUrl(path) {
    if (!isAbsolute(path)) {
        throw new TypeError("Must be an absolute path.");
    }
    const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
    const url = new URL("file:///");
    url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25"));
    if (hostname != null && hostname != "localhost") {
        url.hostname = hostname;
        if (!url.hostname) {
            throw new TypeError("Invalid hostname.");
        }
    }
    return url;
}
const mod = {
    sep: sep,
    delimiter: delimiter,
    resolve: resolve,
    normalize: normalize,
    isAbsolute: isAbsolute,
    join: join,
    relative: relative,
    toNamespacedPath: toNamespacedPath,
    dirname: dirname,
    basename: basename,
    extname: extname,
    format: format,
    parse: parse,
    fromFileUrl: fromFileUrl,
    toFileUrl: toFileUrl
};
const sep1 = "/";
const delimiter1 = ":";
function resolve1(...pathSegments) {
    let resolvedPath = "";
    let resolvedAbsolute = false;
    for(let i1 = pathSegments.length - 1; i1 >= -1 && !resolvedAbsolute; i1--){
        let path;
        if (i1 >= 0) path = pathSegments[i1];
        else {
            const { Deno: Deno1  } = globalThis;
            if (typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a relative path without a CWD.");
            }
            path = Deno1.cwd();
        }
        assertPath(path);
        if (path.length === 0) {
            continue;
        }
        resolvedPath = `${path}/${resolvedPath}`;
        resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
    }
    resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator);
    if (resolvedAbsolute) {
        if (resolvedPath.length > 0) return `/${resolvedPath}`;
        else return "/";
    } else if (resolvedPath.length > 0) return resolvedPath;
    else return ".";
}
function normalize1(path) {
    assertPath(path);
    if (path.length === 0) return ".";
    const isAbsolute = path.charCodeAt(0) === 47;
    const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
    path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator);
    if (path.length === 0 && !isAbsolute) path = ".";
    if (path.length > 0 && trailingSeparator) path += "/";
    if (isAbsolute) return `/${path}`;
    return path;
}
function isAbsolute1(path) {
    assertPath(path);
    return path.length > 0 && path.charCodeAt(0) === 47;
}
function join1(...paths) {
    if (paths.length === 0) return ".";
    let joined;
    for(let i1 = 0, len = paths.length; i1 < len; ++i1){
        const path = paths[i1];
        assertPath(path);
        if (path.length > 0) {
            if (!joined) joined = path;
            else joined += `/${path}`;
        }
    }
    if (!joined) return ".";
    return normalize1(joined);
}
function relative1(from, to) {
    assertPath(from);
    assertPath(to);
    if (from === to) return "";
    from = resolve1(from);
    to = resolve1(to);
    if (from === to) return "";
    let fromStart = 1;
    const fromEnd = from.length;
    for(; fromStart < fromEnd; ++fromStart){
        if (from.charCodeAt(fromStart) !== 47) break;
    }
    const fromLen = fromEnd - fromStart;
    let toStart = 1;
    const toEnd = to.length;
    for(; toStart < toEnd; ++toStart){
        if (to.charCodeAt(toStart) !== 47) break;
    }
    const toLen = toEnd - toStart;
    const length = fromLen < toLen ? fromLen : toLen;
    let lastCommonSep = -1;
    let i1 = 0;
    for(; i1 <= length; ++i1){
        if (i1 === length) {
            if (toLen > length) {
                if (to.charCodeAt(toStart + i1) === 47) {
                    return to.slice(toStart + i1 + 1);
                } else if (i1 === 0) {
                    return to.slice(toStart + i1);
                }
            } else if (fromLen > length) {
                if (from.charCodeAt(fromStart + i1) === 47) {
                    lastCommonSep = i1;
                } else if (i1 === 0) {
                    lastCommonSep = 0;
                }
            }
            break;
        }
        const fromCode = from.charCodeAt(fromStart + i1);
        const toCode = to.charCodeAt(toStart + i1);
        if (fromCode !== toCode) break;
        else if (fromCode === 47) lastCommonSep = i1;
    }
    let out = "";
    for(i1 = fromStart + lastCommonSep + 1; i1 <= fromEnd; ++i1){
        if (i1 === fromEnd || from.charCodeAt(i1) === 47) {
            if (out.length === 0) out += "..";
            else out += "/..";
        }
    }
    if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
    else {
        toStart += lastCommonSep;
        if (to.charCodeAt(toStart) === 47) ++toStart;
        return to.slice(toStart);
    }
}
function toNamespacedPath1(path) {
    return path;
}
function dirname1(path) {
    assertPath(path);
    if (path.length === 0) return ".";
    const hasRoot = path.charCodeAt(0) === 47;
    let end = -1;
    let matchedSlash = true;
    for(let i1 = path.length - 1; i1 >= 1; --i1){
        if (path.charCodeAt(i1) === 47) {
            if (!matchedSlash) {
                end = i1;
                break;
            }
        } else {
            matchedSlash = false;
        }
    }
    if (end === -1) return hasRoot ? "/" : ".";
    if (hasRoot && end === 1) return "//";
    return path.slice(0, end);
}
function basename1(path, ext = "") {
    if (ext !== undefined && typeof ext !== "string") {
        throw new TypeError('"ext" argument must be a string');
    }
    assertPath(path);
    let start = 0;
    let end = -1;
    let matchedSlash = true;
    let i1;
    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
        if (ext.length === path.length && ext === path) return "";
        let extIdx = ext.length - 1;
        let firstNonSlashEnd = -1;
        for(i1 = path.length - 1; i1 >= 0; --i1){
            const code = path.charCodeAt(i1);
            if (code === 47) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else {
                if (firstNonSlashEnd === -1) {
                    matchedSlash = false;
                    firstNonSlashEnd = i1 + 1;
                }
                if (extIdx >= 0) {
                    if (code === ext.charCodeAt(extIdx)) {
                        if (--extIdx === -1) {
                            end = i1;
                        }
                    } else {
                        extIdx = -1;
                        end = firstNonSlashEnd;
                    }
                }
            }
        }
        if (start === end) end = firstNonSlashEnd;
        else if (end === -1) end = path.length;
        return path.slice(start, end);
    } else {
        for(i1 = path.length - 1; i1 >= 0; --i1){
            if (path.charCodeAt(i1) === 47) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else if (end === -1) {
                matchedSlash = false;
                end = i1 + 1;
            }
        }
        if (end === -1) return "";
        return path.slice(start, end);
    }
}
function extname1(path) {
    assertPath(path);
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let preDotState = 0;
    for(let i1 = path.length - 1; i1 >= 0; --i1){
        const code = path.charCodeAt(i1);
        if (code === 47) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        return "";
    }
    return path.slice(startDot, end);
}
function format1(pathObject) {
    if (pathObject === null || typeof pathObject !== "object") {
        throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
    }
    return _format("/", pathObject);
}
function parse1(path) {
    assertPath(path);
    const ret = {
        root: "",
        dir: "",
        base: "",
        ext: "",
        name: ""
    };
    if (path.length === 0) return ret;
    const isAbsolute = path.charCodeAt(0) === 47;
    let start;
    if (isAbsolute) {
        ret.root = "/";
        start = 1;
    } else {
        start = 0;
    }
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let i1 = path.length - 1;
    let preDotState = 0;
    for(; i1 >= start; --i1){
        const code = path.charCodeAt(i1);
        if (code === 47) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        if (end !== -1) {
            if (startPart === 0 && isAbsolute) {
                ret.base = ret.name = path.slice(1, end);
            } else {
                ret.base = ret.name = path.slice(startPart, end);
            }
        }
    } else {
        if (startPart === 0 && isAbsolute) {
            ret.name = path.slice(1, startDot);
            ret.base = path.slice(1, end);
        } else {
            ret.name = path.slice(startPart, startDot);
            ret.base = path.slice(startPart, end);
        }
        ret.ext = path.slice(startDot, end);
    }
    if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
    else if (isAbsolute) ret.dir = "/";
    return ret;
}
function fromFileUrl1(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol != "file:") {
        throw new TypeError("Must be a file URL.");
    }
    return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
}
function toFileUrl1(path) {
    if (!isAbsolute1(path)) {
        throw new TypeError("Must be an absolute path.");
    }
    const url = new URL("file:///");
    url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
    return url;
}
const mod1 = {
    sep: sep1,
    delimiter: delimiter1,
    resolve: resolve1,
    normalize: normalize1,
    isAbsolute: isAbsolute1,
    join: join1,
    relative: relative1,
    toNamespacedPath: toNamespacedPath1,
    dirname: dirname1,
    basename: basename1,
    extname: extname1,
    format: format1,
    parse: parse1,
    fromFileUrl: fromFileUrl1,
    toFileUrl: toFileUrl1
};
const SEP = isWindows1 ? "\\" : "/";
const SEP_PATTERN = isWindows1 ? /[\\/]+/ : /\/+/;
const path = isWindows1 ? mod : mod1;
const { join: join2 , normalize: normalize2  } = path;
const regExpEscapeChars = [
    "!",
    "$",
    "(",
    ")",
    "*",
    "+",
    ".",
    "=",
    "?",
    "[",
    "\\",
    "^",
    "{",
    "|", 
];
const rangeEscapeChars = [
    "-",
    "\\",
    "]"
];
function globToRegExp(glob, { extended =true , globstar: globstarOption = true , os =osType , caseInsensitive =false  } = {}) {
    if (glob == "") {
        return /(?!)/;
    }
    const sep = os == "windows" ? "(?:\\\\|/)+" : "/+";
    const sepMaybe = os == "windows" ? "(?:\\\\|/)*" : "/*";
    const seps = os == "windows" ? [
        "\\",
        "/"
    ] : [
        "/"
    ];
    const globstar = os == "windows" ? "(?:[^\\\\/]*(?:\\\\|/|$)+)*" : "(?:[^/]*(?:/|$)+)*";
    const wildcard = os == "windows" ? "[^\\\\/]*" : "[^/]*";
    const escapePrefix = os == "windows" ? "`" : "\\";
    let newLength = glob.length;
    for(; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--);
    glob = glob.slice(0, newLength);
    let regExpString = "";
    for(let j = 0; j < glob.length;){
        let segment = "";
        const groupStack = [];
        let inRange = false;
        let inEscape = false;
        let endsWithSep = false;
        let i1 = j;
        for(; i1 < glob.length && !seps.includes(glob[i1]); i1++){
            if (inEscape) {
                inEscape = false;
                const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars;
                segment += escapeChars.includes(glob[i1]) ? `\\${glob[i1]}` : glob[i1];
                continue;
            }
            if (glob[i1] == escapePrefix) {
                inEscape = true;
                continue;
            }
            if (glob[i1] == "[") {
                if (!inRange) {
                    inRange = true;
                    segment += "[";
                    if (glob[i1 + 1] == "!") {
                        i1++;
                        segment += "^";
                    } else if (glob[i1 + 1] == "^") {
                        i1++;
                        segment += "\\^";
                    }
                    continue;
                } else if (glob[i1 + 1] == ":") {
                    let k = i1 + 1;
                    let value = "";
                    while(glob[k + 1] != null && glob[k + 1] != ":"){
                        value += glob[k + 1];
                        k++;
                    }
                    if (glob[k + 1] == ":" && glob[k + 2] == "]") {
                        i1 = k + 2;
                        if (value == "alnum") segment += "\\dA-Za-z";
                        else if (value == "alpha") segment += "A-Za-z";
                        else if (value == "ascii") segment += "\x00-\x7F";
                        else if (value == "blank") segment += "\t ";
                        else if (value == "cntrl") segment += "\x00-\x1F\x7F";
                        else if (value == "digit") segment += "\\d";
                        else if (value == "graph") segment += "\x21-\x7E";
                        else if (value == "lower") segment += "a-z";
                        else if (value == "print") segment += "\x20-\x7E";
                        else if (value == "punct") {
                            segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
                        } else if (value == "space") segment += "\\s\v";
                        else if (value == "upper") segment += "A-Z";
                        else if (value == "word") segment += "\\w";
                        else if (value == "xdigit") segment += "\\dA-Fa-f";
                        continue;
                    }
                }
            }
            if (glob[i1] == "]" && inRange) {
                inRange = false;
                segment += "]";
                continue;
            }
            if (inRange) {
                if (glob[i1] == "\\") {
                    segment += `\\\\`;
                } else {
                    segment += glob[i1];
                }
                continue;
            }
            if (glob[i1] == ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] != "BRACE") {
                segment += ")";
                const type = groupStack.pop();
                if (type == "!") {
                    segment += wildcard;
                } else if (type != "@") {
                    segment += type;
                }
                continue;
            }
            if (glob[i1] == "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] != "BRACE") {
                segment += "|";
                continue;
            }
            if (glob[i1] == "+" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("+");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "@" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("@");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "?") {
                if (extended && glob[i1 + 1] == "(") {
                    i1++;
                    groupStack.push("?");
                    segment += "(?:";
                } else {
                    segment += ".";
                }
                continue;
            }
            if (glob[i1] == "!" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("!");
                segment += "(?!";
                continue;
            }
            if (glob[i1] == "{") {
                groupStack.push("BRACE");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "}" && groupStack[groupStack.length - 1] == "BRACE") {
                groupStack.pop();
                segment += ")";
                continue;
            }
            if (glob[i1] == "," && groupStack[groupStack.length - 1] == "BRACE") {
                segment += "|";
                continue;
            }
            if (glob[i1] == "*") {
                if (extended && glob[i1 + 1] == "(") {
                    i1++;
                    groupStack.push("*");
                    segment += "(?:";
                } else {
                    const prevChar = glob[i1 - 1];
                    let numStars = 1;
                    while(glob[i1 + 1] == "*"){
                        i1++;
                        numStars++;
                    }
                    const nextChar = glob[i1 + 1];
                    if (globstarOption && numStars == 2 && [
                        ...seps,
                        undefined
                    ].includes(prevChar) && [
                        ...seps,
                        undefined
                    ].includes(nextChar)) {
                        segment += globstar;
                        endsWithSep = true;
                    } else {
                        segment += wildcard;
                    }
                }
                continue;
            }
            segment += regExpEscapeChars.includes(glob[i1]) ? `\\${glob[i1]}` : glob[i1];
        }
        if (groupStack.length > 0 || inRange || inEscape) {
            segment = "";
            for (const c of glob.slice(j, i1)){
                segment += regExpEscapeChars.includes(c) ? `\\${c}` : c;
                endsWithSep = false;
            }
        }
        regExpString += segment;
        if (!endsWithSep) {
            regExpString += i1 < glob.length ? sep : sepMaybe;
            endsWithSep = true;
        }
        while(seps.includes(glob[i1]))i1++;
        if (!(i1 > j)) {
            throw new Error("Assertion failure: i > j (potential infinite loop)");
        }
        j = i1;
    }
    regExpString = `^${regExpString}$`;
    return new RegExp(regExpString, caseInsensitive ? "i" : "");
}
function isGlob(str) {
    const chars = {
        "{": "}",
        "(": ")",
        "[": "]"
    };
    const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
    if (str === "") {
        return false;
    }
    let match;
    while(match = regex.exec(str)){
        if (match[2]) return true;
        let idx = match.index + match[0].length;
        const open = match[1];
        const close = open ? chars[open] : null;
        if (open && close) {
            const n = str.indexOf(close, idx);
            if (n !== -1) {
                idx = n + 1;
            }
        }
        str = str.slice(idx);
    }
    return false;
}
function normalizeGlob(glob, { globstar =false  } = {}) {
    if (glob.match(/\0/g)) {
        throw new Error(`Glob contains invalid characters: "${glob}"`);
    }
    if (!globstar) {
        return normalize2(glob);
    }
    const s = SEP_PATTERN.source;
    const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
    return normalize2(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
}
function joinGlobs(globs, { extended =true , globstar =false  } = {}) {
    if (!globstar || globs.length == 0) {
        return join2(...globs);
    }
    if (globs.length === 0) return ".";
    let joined;
    for (const glob of globs){
        const path = glob;
        if (path.length > 0) {
            if (!joined) joined = path;
            else joined += `${SEP}${path}`;
        }
    }
    if (!joined) return ".";
    return normalizeGlob(joined, {
        extended,
        globstar
    });
}
const path1 = isWindows1 ? mod : mod1;
const posix = mod1;
const { basename: basename2 , delimiter: delimiter2 , dirname: dirname2 , extname: extname2 , format: format2 , fromFileUrl: fromFileUrl2 , isAbsolute: isAbsolute2 , join: join3 , normalize: normalize3 , parse: parse2 , relative: relative2 , resolve: resolve2 , sep: sep2 , toFileUrl: toFileUrl2 , toNamespacedPath: toNamespacedPath2 ,  } = path1;
if (isWindows()) {
    Deno.realPathSync = function(path) {
        let file = path instanceof URL ? fromFileUrl2(path) : path;
        if (!isAbsolute2(file)) {
            file = join3(Deno.cwd(), file);
        }
        file = normalize3(file);
        return file.replace(/^\w:\\/, (m)=>m[0].toUpperCase() + ":\\");
    };
}
function distance(a, b) {
    if (a.length == 0) {
        return b.length;
    }
    if (b.length == 0) {
        return a.length;
    }
    const matrix = [];
    for(let i1 = 0; i1 <= b.length; i1++){
        matrix[i1] = [
            i1
        ];
    }
    for(let j = 0; j <= a.length; j++){
        matrix[0][j] = j;
    }
    for(let i11 = 1; i11 <= b.length; i11++){
        for(let j1 = 1; j1 <= a.length; j1++){
            if (b.charAt(i11 - 1) == a.charAt(j1 - 1)) {
                matrix[i11][j1] = matrix[i11 - 1][j1 - 1];
            } else {
                matrix[i11][j1] = Math.min(matrix[i11 - 1][j1 - 1] + 1, Math.min(matrix[i11][j1 - 1] + 1, matrix[i11 - 1][j1] + 1));
            }
        }
    }
    return matrix[b.length][a.length];
}
function paramCaseToCamelCase(str) {
    return str.replace(/-([a-z])/g, (g)=>g[1].toUpperCase());
}
function underscoreToCamelCase(str) {
    return str.replace(/([a-z])([A-Z])/g, "$1_$2").toLowerCase().replace(/_([a-z])/g, (g)=>g[1].toUpperCase());
}
function getOption(flags, name) {
    while(name[0] === "-"){
        name = name.slice(1);
    }
    for (const flag of flags){
        if (isOption(flag, name)) {
            return flag;
        }
    }
    return;
}
function didYouMeanOption(option, options) {
    const optionNames = options.map((option)=>[
            option.name,
            ...option.aliases ?? []
        ]).flat().map((option)=>getFlag(option));
    return didYouMean(" Did you mean option", getFlag(option), optionNames);
}
function didYouMeanType(type, types) {
    return didYouMean(" Did you mean type", type, types);
}
function didYouMean(message, type, types) {
    const match = closest(type, types);
    return match ? `${message} "${match}"?` : "";
}
function getFlag(name) {
    if (name.startsWith("-")) {
        return name;
    }
    if (name.length > 1) {
        return `--${name}`;
    }
    return `-${name}`;
}
function isOption(option, name) {
    return option.name === name || option.aliases && option.aliases.indexOf(name) !== -1;
}
function matchWildCardOptions(name, flags) {
    for (const option of flags){
        if (option.name.indexOf("*") === -1) {
            continue;
        }
        let matched = matchWildCardOption(name, option);
        if (matched) {
            matched = {
                ...matched,
                name
            };
            flags.push(matched);
            return matched;
        }
    }
}
function matchWildCardOption(name, option) {
    const parts = option.name.split(".");
    const parts2 = name.split(".");
    if (parts.length !== parts2.length) {
        return false;
    }
    const count = Math.max(parts.length, parts2.length);
    for(let i1 = 0; i1 < count; i1++){
        if (parts[i1] !== parts2[i1] && parts[i1] !== "*") {
            return false;
        }
    }
    return option;
}
function closest(str, arr) {
    let minDistance = Infinity;
    let minIndex = 0;
    for(let i1 = 0; i1 < arr.length; i1++){
        const dist = distance(str, arr[i1]);
        if (dist < minDistance) {
            minDistance = dist;
            minIndex = i1;
        }
    }
    return arr[minIndex];
}
function getDefaultValue(option) {
    return typeof option.default === "function" ? option.default() : option.default;
}
class FlagsError extends Error {
    constructor(message){
        super(message);
        Object.setPrototypeOf(this, FlagsError.prototype);
    }
}
class UnknownRequiredOption extends FlagsError {
    constructor(option, options){
        super(`Unknown required option "${getFlag(option)}".${didYouMeanOption(option, options)}`);
        Object.setPrototypeOf(this, UnknownRequiredOption.prototype);
    }
}
class UnknownConflictingOption extends FlagsError {
    constructor(option, options){
        super(`Unknown conflicting option "${getFlag(option)}".${didYouMeanOption(option, options)}`);
        Object.setPrototypeOf(this, UnknownConflictingOption.prototype);
    }
}
class UnknownType extends FlagsError {
    constructor(type, types){
        super(`Unknown type "${type}".${didYouMeanType(type, types)}`);
        Object.setPrototypeOf(this, UnknownType.prototype);
    }
}
class ValidationError extends FlagsError {
    constructor(message){
        super(message);
        Object.setPrototypeOf(this, ValidationError.prototype);
    }
}
class DuplicateOption extends ValidationError {
    constructor(name){
        super(`Option "${getFlag(name).replace(/^--no-/, "--")}" can only occur once, but was found several times.`);
        Object.setPrototypeOf(this, DuplicateOption.prototype);
    }
}
class InvalidOption extends ValidationError {
    constructor(option, options){
        super(`Invalid option "${getFlag(option)}".${didYouMeanOption(option, options)}`);
        Object.setPrototypeOf(this, InvalidOption.prototype);
    }
}
class UnknownOption extends ValidationError {
    constructor(option, options){
        super(`Unknown option "${getFlag(option)}".${didYouMeanOption(option, options)}`);
        Object.setPrototypeOf(this, UnknownOption.prototype);
    }
}
class MissingOptionValue extends ValidationError {
    constructor(option){
        super(`Missing value for option "${getFlag(option)}".`);
        Object.setPrototypeOf(this, MissingOptionValue.prototype);
    }
}
class InvalidOptionValue extends ValidationError {
    constructor(option, expected, value){
        super(`Option "${getFlag(option)}" must be of type "${expected}", but got "${value}".`);
        Object.setPrototypeOf(this, InvalidOptionValue.prototype);
    }
}
class OptionNotCombinable extends ValidationError {
    constructor(option){
        super(`Option "${getFlag(option)}" cannot be combined with other options.`);
        Object.setPrototypeOf(this, OptionNotCombinable.prototype);
    }
}
class ConflictingOption extends ValidationError {
    constructor(option, conflictingOption){
        super(`Option "${getFlag(option)}" conflicts with option "${getFlag(conflictingOption)}".`);
        Object.setPrototypeOf(this, ConflictingOption.prototype);
    }
}
class DependingOption extends ValidationError {
    constructor(option, dependingOption){
        super(`Option "${getFlag(option)}" depends on option "${getFlag(dependingOption)}".`);
        Object.setPrototypeOf(this, DependingOption.prototype);
    }
}
class MissingRequiredOption extends ValidationError {
    constructor(option){
        super(`Missing required option "${getFlag(option)}".`);
        Object.setPrototypeOf(this, MissingRequiredOption.prototype);
    }
}
class RequiredArgumentFollowsOptionalArgument extends ValidationError {
    constructor(arg){
        super(`An required argument cannot follow an optional argument, but "${arg}"  is defined as required.`);
        Object.setPrototypeOf(this, RequiredArgumentFollowsOptionalArgument.prototype);
    }
}
class ArgumentFollowsVariadicArgument extends ValidationError {
    constructor(arg){
        super(`An argument cannot follow an variadic argument, but got "${arg}".`);
        Object.setPrototypeOf(this, ArgumentFollowsVariadicArgument.prototype);
    }
}
class InvalidTypeError extends ValidationError {
    constructor({ label , name , value , type  }, expected){
        super(`${label} "${name}" must be of type "${type}", but got "${value}".` + (expected ? ` Expected values: ${expected.map((value)=>`"${value}"`).join(", ")}` : ""));
        Object.setPrototypeOf(this, MissingOptionValue.prototype);
    }
}
var OptionType;
(function(OptionType) {
    OptionType["STRING"] = "string";
    OptionType["NUMBER"] = "number";
    OptionType["INTEGER"] = "integer";
    OptionType["BOOLEAN"] = "boolean";
})(OptionType || (OptionType = {}));
function didYouMeanCommand(command, commands, excludes = []) {
    const commandNames = commands.map((command)=>command.getName()).filter((command)=>!excludes.includes(command));
    return didYouMean(" Did you mean command", command, commandNames);
}
const ARGUMENT_REGEX = /^[<\[].+[\]>]$/;
const ARGUMENT_DETAILS_REGEX = /[<\[:>\]]/;
function splitArguments(args) {
    const parts = args.trim().split(/[, =] */g);
    const typeParts = [];
    while(parts[parts.length - 1] && ARGUMENT_REGEX.test(parts[parts.length - 1])){
        typeParts.unshift(parts.pop());
    }
    const typeDefinition = typeParts.join(" ");
    return {
        flags: parts,
        typeDefinition,
        equalsSign: args.includes("=")
    };
}
function parseArgumentsDefinition(argsDefinition, validate = true, all) {
    const argumentDetails = [];
    let hasOptional = false;
    let hasVariadic = false;
    const parts = argsDefinition.split(/ +/);
    for (const arg of parts){
        if (validate && hasVariadic) {
            throw new ArgumentFollowsVariadicArgument(arg);
        }
        const parts1 = arg.split(ARGUMENT_DETAILS_REGEX);
        if (!parts1[1]) {
            if (all) {
                argumentDetails.push(parts1[0]);
            }
            continue;
        }
        const type = parts1[2] || OptionType.STRING;
        const details = {
            optionalValue: arg[0] === "[",
            requiredValue: arg[0] === "<",
            name: parts1[1],
            action: parts1[3] || type,
            variadic: false,
            list: type ? arg.indexOf(type + "[]") !== -1 : false,
            type
        };
        if (validate && !details.optionalValue && hasOptional) {
            throw new RequiredArgumentFollowsOptionalArgument(details.name);
        }
        if (arg[0] === "[") {
            hasOptional = true;
        }
        if (details.name.length > 3) {
            const istVariadicLeft = details.name.slice(0, 3) === "...";
            const istVariadicRight = details.name.slice(-3) === "...";
            hasVariadic = details.variadic = istVariadicLeft || istVariadicRight;
            if (istVariadicLeft) {
                details.name = details.name.slice(3);
            } else if (istVariadicRight) {
                details.name = details.name.slice(0, -3);
            }
        }
        argumentDetails.push(details);
    }
    return argumentDetails;
}
function dedent(str) {
    const lines = str.split(/\r?\n|\r/g);
    let text = "";
    let indent = 0;
    for (const line of lines){
        if (text || line.trim()) {
            if (!text) {
                text = line.trimStart();
                indent = line.length - text.length;
            } else {
                text += line.slice(indent);
            }
            text += "\n";
        }
    }
    return text.trimEnd();
}
function getDescription(description, __short) {
    return __short ? description.trim().split("\n", 1)[0] : dedent(description);
}
class CommandError extends Error {
    constructor(message){
        super(message);
        Object.setPrototypeOf(this, CommandError.prototype);
    }
}
class ValidationError1 extends CommandError {
    exitCode;
    constructor(message, { exitCode  } = {}){
        super(message);
        Object.setPrototypeOf(this, ValidationError1.prototype);
        this.exitCode = exitCode ?? 1;
    }
}
class DuplicateOptionName extends CommandError {
    constructor(name){
        super(`Option with name "${getFlag(name)}" already exists.`);
        Object.setPrototypeOf(this, DuplicateOptionName.prototype);
    }
}
class MissingCommandName extends CommandError {
    constructor(){
        super("Missing command name.");
        Object.setPrototypeOf(this, MissingCommandName.prototype);
    }
}
class DuplicateCommandName extends CommandError {
    constructor(name){
        super(`Duplicate command name "${name}".`);
        Object.setPrototypeOf(this, DuplicateCommandName.prototype);
    }
}
class DuplicateCommandAlias extends CommandError {
    constructor(alias){
        super(`Duplicate command alias "${alias}".`);
        Object.setPrototypeOf(this, DuplicateCommandAlias.prototype);
    }
}
class CommandNotFound extends CommandError {
    constructor(name, commands, excluded){
        super(`Unknown command "${name}".${didYouMeanCommand(name, commands, excluded)}`);
        Object.setPrototypeOf(this, UnknownCommand.prototype);
    }
}
class DuplicateType extends CommandError {
    constructor(name){
        super(`Type with name "${name}" already exists.`);
        Object.setPrototypeOf(this, DuplicateType.prototype);
    }
}
class DuplicateCompletion extends CommandError {
    constructor(name){
        super(`Completion with name "${name}" already exists.`);
        Object.setPrototypeOf(this, DuplicateCompletion.prototype);
    }
}
class DuplicateExample extends CommandError {
    constructor(name){
        super(`Example with name "${name}" already exists.`);
        Object.setPrototypeOf(this, DuplicateExample.prototype);
    }
}
class DuplicateEnvironmentVariable extends CommandError {
    constructor(name){
        super(`Environment variable with name "${name}" already exists.`);
        Object.setPrototypeOf(this, DuplicateEnvironmentVariable.prototype);
    }
}
class MissingRequiredEnvVar extends ValidationError1 {
    constructor(envVar){
        super(`Missing required environment variable "${envVar.names[0]}".`);
        Object.setPrototypeOf(this, MissingRequiredEnvVar.prototype);
    }
}
class EnvironmentVariableSingleValue extends CommandError {
    constructor(name){
        super(`An environment variable can only have one value, but "${name}" has more than one.`);
        Object.setPrototypeOf(this, EnvironmentVariableSingleValue.prototype);
    }
}
class EnvironmentVariableOptionalValue extends CommandError {
    constructor(name){
        super(`An environment variable cannot have an optional value, but "${name}" is defined as optional.`);
        Object.setPrototypeOf(this, EnvironmentVariableOptionalValue.prototype);
    }
}
class EnvironmentVariableVariadicValue extends CommandError {
    constructor(name){
        super(`An environment variable cannot have an variadic value, but "${name}" is defined as variadic.`);
        Object.setPrototypeOf(this, EnvironmentVariableVariadicValue.prototype);
    }
}
class DefaultCommandNotFound extends CommandError {
    constructor(name, commands){
        super(`Default command "${name}" not found.${didYouMeanCommand(name, commands)}`);
        Object.setPrototypeOf(this, DefaultCommandNotFound.prototype);
    }
}
class CommandExecutableNotFound extends CommandError {
    constructor(name){
        super(`Command executable not found: ${name}`);
        Object.setPrototypeOf(this, CommandExecutableNotFound.prototype);
    }
}
class UnknownCompletionCommand extends CommandError {
    constructor(name, commands){
        super(`Auto-completion failed. Unknown command "${name}".${didYouMeanCommand(name, commands)}`);
        Object.setPrototypeOf(this, UnknownCompletionCommand.prototype);
    }
}
class UnknownCommand extends ValidationError1 {
    constructor(name, commands, excluded){
        super(`Unknown command "${name}".${didYouMeanCommand(name, commands, excluded)}`);
        Object.setPrototypeOf(this, UnknownCommand.prototype);
    }
}
class NoArgumentsAllowed extends ValidationError1 {
    constructor(name){
        super(`No arguments allowed for command "${name}".`);
        Object.setPrototypeOf(this, NoArgumentsAllowed.prototype);
    }
}
class MissingArguments extends ValidationError1 {
    constructor(args){
        super("Missing argument(s): " + args.join(", "));
        Object.setPrototypeOf(this, MissingArguments.prototype);
    }
}
class MissingArgument extends ValidationError1 {
    constructor(arg){
        super(`Missing argument "${arg}".`);
        Object.setPrototypeOf(this, MissingArgument.prototype);
    }
}
class TooManyArguments extends ValidationError1 {
    constructor(args){
        super(`Too many arguments: ${args.join(" ")}`);
        Object.setPrototypeOf(this, TooManyArguments.prototype);
    }
}
const __boolean = (type)=>{
    if (~[
        "1",
        "true"
    ].indexOf(type.value)) {
        return true;
    }
    if (~[
        "0",
        "false"
    ].indexOf(type.value)) {
        return false;
    }
    throw new InvalidTypeError(type);
};
const number = (type)=>{
    const value = Number(type.value);
    if (Number.isFinite(value)) {
        return value;
    }
    throw new InvalidTypeError(type);
};
const string = ({ value  })=>{
    return value;
};
function validateFlags(opts, values, optionNameMap = {}) {
    if (!opts.flags?.length) {
        return;
    }
    const defaultValues = setDefaultValues(opts, values, optionNameMap);
    const optionNames = Object.keys(values);
    if (!optionNames.length && opts.allowEmpty) {
        return;
    }
    const options = optionNames.map((name)=>({
            name,
            option: getOption(opts.flags, optionNameMap[name])
        }));
    for (const { name , option  } of options){
        if (!option) {
            throw new UnknownOption(name, opts.flags);
        }
        if (validateStandaloneOption(option, options, optionNames, defaultValues)) {
            return;
        }
        validateConflictingOptions(option, values);
        validateDependingOptions(option, values, defaultValues);
        validateRequiredValues(option, values, name);
    }
    validateRequiredOptions(options, values, opts);
}
function setDefaultValues(opts, values, optionNameMap = {}) {
    const defaultValues = {};
    if (!opts.flags?.length) {
        return defaultValues;
    }
    for (const option of opts.flags){
        let name;
        let defaultValue = undefined;
        if (option.name.startsWith("no-")) {
            const propName = option.name.replace(/^no-/, "");
            if (propName in values) {
                continue;
            }
            const positiveOption = getOption(opts.flags, propName);
            if (positiveOption) {
                continue;
            }
            name = paramCaseToCamelCase(propName);
            defaultValue = true;
        }
        if (!name) {
            name = paramCaseToCamelCase(option.name);
        }
        if (!(name in optionNameMap)) {
            optionNameMap[name] = option.name;
        }
        const hasDefaultValue = (!opts.ignoreDefaults || typeof opts.ignoreDefaults[name] === "undefined") && typeof values[name] === "undefined" && (typeof option.default !== "undefined" || typeof defaultValue !== "undefined");
        if (hasDefaultValue) {
            values[name] = getDefaultValue(option) ?? defaultValue;
            defaultValues[option.name] = true;
            if (typeof option.value === "function") {
                values[name] = option.value(values[name]);
            }
        }
    }
    return defaultValues;
}
function validateStandaloneOption(option, options, optionNames, defaultValues) {
    if (!option.standalone) {
        return false;
    }
    if (optionNames.length === 1) {
        return true;
    }
    if (options.every((opt)=>opt.option && (option === opt.option || defaultValues[opt.option.name]))) {
        return true;
    }
    throw new OptionNotCombinable(option.name);
}
function validateConflictingOptions(option, values) {
    option.conflicts?.forEach((flag)=>{
        if (isset(flag, values)) {
            throw new ConflictingOption(option.name, flag);
        }
    });
}
function validateDependingOptions(option, values, defaultValues) {
    option.depends?.forEach((flag)=>{
        if (!isset(flag, values) && !defaultValues[option.name]) {
            throw new DependingOption(option.name, flag);
        }
    });
}
function validateRequiredValues(option, values, name) {
    const isArray = (option.args?.length || 0) > 1;
    option.args?.forEach((arg, i1)=>{
        if (arg.requiredValue && (typeof values[name] === "undefined" || isArray && typeof values[name][i1] === "undefined")) {
            throw new MissingOptionValue(option.name);
        }
    });
}
function validateRequiredOptions(options, values, opts) {
    if (!opts.flags?.length) {
        return;
    }
    for (const option of opts.flags){
        if (option.required && !(paramCaseToCamelCase(option.name) in values)) {
            if ((!option.conflicts || !option.conflicts.find((flag)=>!!values[flag])) && !options.find((opt)=>opt.option?.conflicts?.find((flag)=>flag === option.name))) {
                throw new MissingRequiredOption(option.name);
            }
        }
    }
}
function isset(flag, values) {
    const name = paramCaseToCamelCase(flag);
    return typeof values[name] !== "undefined";
}
const integer = (type)=>{
    const value = Number(type.value);
    if (Number.isInteger(value)) {
        return value;
    }
    throw new InvalidTypeError(type);
};
const Types = {
    [OptionType.STRING]: string,
    [OptionType.NUMBER]: number,
    [OptionType.INTEGER]: integer,
    [OptionType.BOOLEAN]: __boolean
};
function parseFlags(args, opts = {}) {
    args = args.slice();
    !opts.flags && (opts.flags = []);
    let inLiteral = false;
    let negate = false;
    const flags = {};
    const optionNameMap = {};
    let literal = [];
    let unknown = [];
    let stopEarly = null;
    opts.flags.forEach((opt)=>{
        opt.depends?.forEach((flag)=>{
            if (!opts.flags || !getOption(opts.flags, flag)) {
                throw new UnknownRequiredOption(flag, opts.flags ?? []);
            }
        });
        opt.conflicts?.forEach((flag)=>{
            if (!opts.flags || !getOption(opts.flags, flag)) {
                throw new UnknownConflictingOption(flag, opts.flags ?? []);
            }
        });
    });
    for(let argsIndex = 0; argsIndex < args.length; argsIndex++){
        let option;
        let optionArgs;
        let current = args[argsIndex];
        let currentValue;
        if (inLiteral) {
            literal.push(current);
            continue;
        }
        if (current === "--") {
            inLiteral = true;
            continue;
        }
        const isFlag = current.length > 1 && current[0] === "-";
        const next = ()=>currentValue ?? args[argsIndex + 1];
        if (isFlag) {
            const isShort = current[1] !== "-";
            const isLong = isShort ? false : current.length > 3 && current[2] !== "-";
            if (!isShort && !isLong) {
                throw new InvalidOption(current, opts.flags);
            }
            const equalSignIndex = current.indexOf("=");
            if (equalSignIndex > -1) {
                currentValue = current.slice(equalSignIndex + 1) || undefined;
                current = current.slice(0, equalSignIndex);
            }
            if (isShort && current.length > 2 && current[2] !== ".") {
                args.splice(argsIndex, 1, ...splitFlags(current));
                current = args[argsIndex];
            } else if (isLong && current.startsWith("--no-")) {
                negate = true;
            }
            option = getOption(opts.flags, current);
            if (!option) {
                if (opts.flags.length) {
                    const name = current.replace(/^-+/g, "");
                    option = matchWildCardOptions(name, opts.flags);
                    if (!option) {
                        throw new UnknownOption(current, opts.flags);
                    }
                }
                if (!option) {
                    option = {
                        name: current.replace(/^-+/, ""),
                        optionalValue: true,
                        type: OptionType.STRING
                    };
                }
            }
            const positiveName = negate ? option.name.replace(/^no-?/, "") : option.name;
            const propName = paramCaseToCamelCase(positiveName);
            if (typeof flags[propName] !== "undefined") {
                if (!opts.flags.length) {
                    option.collect = true;
                } else if (!option.collect) {
                    throw new DuplicateOption(current);
                }
            }
            optionArgs = option.args?.length ? option.args : [
                {
                    type: option.type,
                    requiredValue: option.requiredValue,
                    optionalValue: option.optionalValue,
                    variadic: option.variadic,
                    list: option.list,
                    separator: option.separator
                }
            ];
            let optionArgsIndex = 0;
            let inOptionalArg = false;
            const previous = flags[propName];
            parseNext(option, optionArgs);
            if (typeof flags[propName] === "undefined") {
                if (optionArgs[optionArgsIndex].requiredValue) {
                    throw new MissingOptionValue(option.name);
                } else if (typeof option.default !== "undefined") {
                    flags[propName] = getDefaultValue(option);
                } else {
                    flags[propName] = true;
                }
            }
            if (option.value) {
                flags[propName] = option.value(flags[propName], previous);
            } else if (option.collect) {
                const value = typeof previous !== "undefined" ? Array.isArray(previous) ? previous : [
                    previous
                ] : [];
                value.push(flags[propName]);
                flags[propName] = value;
            }
            optionNameMap[propName] = option.name;
            opts.option?.(option, flags[propName]);
            function parseNext(option, optionArgs) {
                const arg = optionArgs[optionArgsIndex];
                if (!arg) {
                    const flag = next();
                    throw new UnknownOption(flag, opts.flags ?? []);
                }
                if (!arg.type) {
                    arg.type = OptionType.BOOLEAN;
                }
                if (option.args?.length) {
                    if ((typeof arg.optionalValue === "undefined" || arg.optionalValue === false) && typeof arg.requiredValue === "undefined") {
                        arg.requiredValue = true;
                    }
                } else {
                    if (arg.type !== OptionType.BOOLEAN && (typeof arg.optionalValue === "undefined" || arg.optionalValue === false) && typeof arg.requiredValue === "undefined") {
                        arg.requiredValue = true;
                    }
                }
                if (arg.requiredValue) {
                    if (inOptionalArg) {
                        throw new RequiredArgumentFollowsOptionalArgument(option.name);
                    }
                } else {
                    inOptionalArg = true;
                }
                if (negate) {
                    flags[propName] = false;
                    return;
                }
                let result1;
                let increase = false;
                if (arg.list && hasNext(arg)) {
                    const parsed = next().split(arg.separator || ",").map((nextValue)=>{
                        const value = parseValue(option, arg, nextValue);
                        if (typeof value === "undefined") {
                            throw new InvalidOptionValue(option.name, arg.type ?? "?", nextValue);
                        }
                        return value;
                    });
                    if (parsed?.length) {
                        result1 = parsed;
                    }
                } else {
                    if (hasNext(arg)) {
                        result1 = parseValue(option, arg, next());
                    } else if (arg.optionalValue && arg.type === OptionType.BOOLEAN) {
                        result1 = true;
                    }
                }
                if (increase && typeof currentValue === "undefined") {
                    argsIndex++;
                    if (!arg.variadic) {
                        optionArgsIndex++;
                    } else if (optionArgs[optionArgsIndex + 1]) {
                        throw new ArgumentFollowsVariadicArgument(next());
                    }
                }
                if (typeof result1 !== "undefined" && (optionArgs.length > 1 || arg.variadic)) {
                    if (!flags[propName]) {
                        flags[propName] = [];
                    }
                    flags[propName].push(result1);
                    if (hasNext(arg)) {
                        parseNext(option, optionArgs);
                    }
                } else {
                    flags[propName] = result1;
                }
                function hasNext(arg) {
                    const nextValue = currentValue ?? args[argsIndex + 1];
                    if (!nextValue) {
                        return false;
                    }
                    if (optionArgs.length > 1 && optionArgsIndex >= optionArgs.length) {
                        return false;
                    }
                    if (arg.requiredValue) {
                        return true;
                    }
                    if (option.equalsSign && arg.optionalValue && !arg.variadic && typeof currentValue === "undefined") {
                        return false;
                    }
                    if (arg.optionalValue || arg.variadic) {
                        return nextValue[0] !== "-" || arg.type === OptionType.NUMBER && !isNaN(Number(nextValue));
                    }
                    return false;
                }
                function parseValue(option, arg, value) {
                    const type = arg.type || OptionType.STRING;
                    const result1 = opts.parse ? opts.parse({
                        label: "Option",
                        type,
                        name: `--${option.name}`,
                        value
                    }) : parseFlagValue(option, arg, value);
                    if (typeof result1 !== "undefined") {
                        increase = true;
                    }
                    return result1;
                }
            }
        } else {
            if (opts.stopEarly) {
                stopEarly = current;
                break;
            }
            unknown.push(current);
        }
    }
    if (stopEarly) {
        const stopEarlyArgIndex = args.indexOf(stopEarly);
        if (stopEarlyArgIndex !== -1) {
            const doubleDashIndex = args.indexOf("--");
            unknown = args.slice(stopEarlyArgIndex, doubleDashIndex === -1 ? undefined : doubleDashIndex);
            if (doubleDashIndex !== -1) {
                literal = args.slice(doubleDashIndex + 1);
            }
        }
    }
    validateFlags(opts, flags, optionNameMap);
    const result1 = Object.keys(flags).reduce((result1, key)=>{
        if (~key.indexOf(".")) {
            key.split(".").reduce((result1, subKey, index, parts)=>{
                if (index === parts.length - 1) {
                    result1[subKey] = flags[key];
                } else {
                    result1[subKey] = result1[subKey] ?? {};
                }
                return result1[subKey];
            }, result1);
        } else {
            result1[key] = flags[key];
        }
        return result1;
    }, {});
    return {
        flags: result1,
        unknown,
        literal
    };
}
function splitFlags(flag) {
    const normalized = [];
    const flags = flag.slice(1).split("");
    if (isNaN(Number(flag[flag.length - 1]))) {
        flags.forEach((val)=>normalized.push(`-${val}`));
    } else {
        normalized.push(`-${flags.shift()}`);
        if (flags.length) {
            normalized.push(flags.join(""));
        }
    }
    return normalized;
}
function parseFlagValue(option, arg, value) {
    const type = arg.type || OptionType.STRING;
    const parseType = Types[type];
    if (!parseType) {
        throw new UnknownType(type, Object.keys(Types));
    }
    return parseType({
        label: "Option",
        type,
        name: `--${option.name}`,
        value
    });
}
const { Deno: Deno1  } = globalThis;
const noColor = typeof Deno1?.noColor === "boolean" ? Deno1.noColor : true;
let enabled = !noColor;
function setColorEnabled(value) {
    if (noColor) {
        return;
    }
    enabled = value;
}
function getColorEnabled() {
    return enabled;
}
function code(open, close) {
    return {
        open: `\x1b[${open.join(";")}m`,
        close: `\x1b[${close}m`,
        regexp: new RegExp(`\\x1b\\[${close}m`, "g")
    };
}
function run(str, code) {
    return enabled ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}` : str;
}
function reset(str) {
    return run(str, code([
        0
    ], 0));
}
function bold(str) {
    return run(str, code([
        1
    ], 22));
}
function dim(str) {
    return run(str, code([
        2
    ], 22));
}
function italic(str) {
    return run(str, code([
        3
    ], 23));
}
function underline(str) {
    return run(str, code([
        4
    ], 24));
}
function inverse(str) {
    return run(str, code([
        7
    ], 27));
}
function hidden(str) {
    return run(str, code([
        8
    ], 28));
}
function strikethrough(str) {
    return run(str, code([
        9
    ], 29));
}
function black(str) {
    return run(str, code([
        30
    ], 39));
}
function red(str) {
    return run(str, code([
        31
    ], 39));
}
function green(str) {
    return run(str, code([
        32
    ], 39));
}
function yellow(str) {
    return run(str, code([
        33
    ], 39));
}
function blue(str) {
    return run(str, code([
        34
    ], 39));
}
function magenta(str) {
    return run(str, code([
        35
    ], 39));
}
function cyan(str) {
    return run(str, code([
        36
    ], 39));
}
function white(str) {
    return run(str, code([
        37
    ], 39));
}
function gray(str) {
    return brightBlack(str);
}
function brightBlack(str) {
    return run(str, code([
        90
    ], 39));
}
function brightRed(str) {
    return run(str, code([
        91
    ], 39));
}
function brightGreen(str) {
    return run(str, code([
        92
    ], 39));
}
function brightYellow(str) {
    return run(str, code([
        93
    ], 39));
}
function brightBlue(str) {
    return run(str, code([
        94
    ], 39));
}
function brightMagenta(str) {
    return run(str, code([
        95
    ], 39));
}
function brightCyan(str) {
    return run(str, code([
        96
    ], 39));
}
function brightWhite(str) {
    return run(str, code([
        97
    ], 39));
}
function bgBlack(str) {
    return run(str, code([
        40
    ], 49));
}
function bgRed(str) {
    return run(str, code([
        41
    ], 49));
}
function bgGreen(str) {
    return run(str, code([
        42
    ], 49));
}
function bgYellow(str) {
    return run(str, code([
        43
    ], 49));
}
function bgBlue(str) {
    return run(str, code([
        44
    ], 49));
}
function bgMagenta(str) {
    return run(str, code([
        45
    ], 49));
}
function bgCyan(str) {
    return run(str, code([
        46
    ], 49));
}
function bgWhite(str) {
    return run(str, code([
        47
    ], 49));
}
function bgBrightBlack(str) {
    return run(str, code([
        100
    ], 49));
}
function bgBrightRed(str) {
    return run(str, code([
        101
    ], 49));
}
function bgBrightGreen(str) {
    return run(str, code([
        102
    ], 49));
}
function bgBrightYellow(str) {
    return run(str, code([
        103
    ], 49));
}
function bgBrightBlue(str) {
    return run(str, code([
        104
    ], 49));
}
function bgBrightMagenta(str) {
    return run(str, code([
        105
    ], 49));
}
function bgBrightCyan(str) {
    return run(str, code([
        106
    ], 49));
}
function bgBrightWhite(str) {
    return run(str, code([
        107
    ], 49));
}
function clampAndTruncate(n, max = 255, min = 0) {
    return Math.trunc(Math.max(Math.min(n, max), min));
}
function rgb8(str, color) {
    return run(str, code([
        38,
        5,
        clampAndTruncate(color)
    ], 39));
}
function bgRgb8(str, color) {
    return run(str, code([
        48,
        5,
        clampAndTruncate(color)
    ], 49));
}
function rgb24(str, color) {
    if (typeof color === "number") {
        return run(str, code([
            38,
            2,
            color >> 16 & 0xff,
            color >> 8 & 0xff,
            color & 0xff
        ], 39));
    }
    return run(str, code([
        38,
        2,
        clampAndTruncate(color.r),
        clampAndTruncate(color.g),
        clampAndTruncate(color.b), 
    ], 39));
}
function bgRgb24(str, color) {
    if (typeof color === "number") {
        return run(str, code([
            48,
            2,
            color >> 16 & 0xff,
            color >> 8 & 0xff,
            color & 0xff
        ], 49));
    }
    return run(str, code([
        48,
        2,
        clampAndTruncate(color.r),
        clampAndTruncate(color.g),
        clampAndTruncate(color.b), 
    ], 49));
}
const ANSI_PATTERN = new RegExp([
    "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
    "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))", 
].join("|"), "g");
function stripColor(string) {
    return string.replace(ANSI_PATTERN, "");
}
const mod2 = {
    setColorEnabled: setColorEnabled,
    getColorEnabled: getColorEnabled,
    reset: reset,
    bold: bold,
    dim: dim,
    italic: italic,
    underline: underline,
    inverse: inverse,
    hidden: hidden,
    strikethrough: strikethrough,
    black: black,
    red: red,
    green: green,
    yellow: yellow,
    blue: blue,
    magenta: magenta,
    cyan: cyan,
    white: white,
    gray: gray,
    brightBlack: brightBlack,
    brightRed: brightRed,
    brightGreen: brightGreen,
    brightYellow: brightYellow,
    brightBlue: brightBlue,
    brightMagenta: brightMagenta,
    brightCyan: brightCyan,
    brightWhite: brightWhite,
    bgBlack: bgBlack,
    bgRed: bgRed,
    bgGreen: bgGreen,
    bgYellow: bgYellow,
    bgBlue: bgBlue,
    bgMagenta: bgMagenta,
    bgCyan: bgCyan,
    bgWhite: bgWhite,
    bgBrightBlack: bgBrightBlack,
    bgBrightRed: bgBrightRed,
    bgBrightGreen: bgBrightGreen,
    bgBrightYellow: bgBrightYellow,
    bgBrightBlue: bgBrightBlue,
    bgBrightMagenta: bgBrightMagenta,
    bgBrightCyan: bgBrightCyan,
    bgBrightWhite: bgBrightWhite,
    rgb8: rgb8,
    bgRgb8: bgRgb8,
    rgb24: rgb24,
    bgRgb24: bgRgb24,
    stripColor: stripColor
};
class Type {
}
class BooleanType extends Type {
    parse(type) {
        return __boolean(type);
    }
    complete() {
        return [
            "true",
            "false"
        ];
    }
}
class StringType extends Type {
    parse(type) {
        return string(type);
    }
}
class FileType extends StringType {
    constructor(){
        super();
    }
}
class NumberType extends Type {
    parse(type) {
        return number(type);
    }
}
const border = {
    top: "─",
    topMid: "┬",
    topLeft: "┌",
    topRight: "┐",
    bottom: "─",
    bottomMid: "┴",
    bottomLeft: "└",
    bottomRight: "┘",
    left: "│",
    leftMid: "├",
    mid: "─",
    midMid: "┼",
    right: "│",
    rightMid: "┤",
    middle: "│"
};
class Cell {
    options;
    get length() {
        return this.toString().length;
    }
    static from(value) {
        const cell = new this(value);
        if (value instanceof Cell) {
            cell.options = {
                ...value.options
            };
        }
        return cell;
    }
    constructor(value){
        this.value = value;
        this.options = {};
    }
    toString() {
        return this.value.toString();
    }
    setValue(value) {
        this.value = value;
        return this;
    }
    clone(value) {
        const cell = new Cell(value ?? this);
        cell.options = {
            ...this.options
        };
        return cell;
    }
    border(enable, override = true) {
        if (override || typeof this.options.border === "undefined") {
            this.options.border = enable;
        }
        return this;
    }
    colSpan(span, override = true) {
        if (override || typeof this.options.colSpan === "undefined") {
            this.options.colSpan = span;
        }
        return this;
    }
    rowSpan(span, override = true) {
        if (override || typeof this.options.rowSpan === "undefined") {
            this.options.rowSpan = span;
        }
        return this;
    }
    align(direction, override = true) {
        if (override || typeof this.options.align === "undefined") {
            this.options.align = direction;
        }
        return this;
    }
    getBorder() {
        return this.options.border === true;
    }
    getColSpan() {
        return typeof this.options.colSpan === "number" && this.options.colSpan > 0 ? this.options.colSpan : 1;
    }
    getRowSpan() {
        return typeof this.options.rowSpan === "number" && this.options.rowSpan > 0 ? this.options.rowSpan : 1;
    }
    getAlign() {
        return this.options.align ?? "left";
    }
    value;
}
class Row extends Array {
    options = {};
    static from(cells) {
        const row = new this(...cells);
        if (cells instanceof Row) {
            row.options = {
                ...cells.options
            };
        }
        return row;
    }
    clone() {
        const row = new Row(...this.map((cell)=>cell instanceof Cell ? cell.clone() : cell));
        row.options = {
            ...this.options
        };
        return row;
    }
    border(enable, override = true) {
        if (override || typeof this.options.border === "undefined") {
            this.options.border = enable;
        }
        return this;
    }
    align(direction, override = true) {
        if (override || typeof this.options.align === "undefined") {
            this.options.align = direction;
        }
        return this;
    }
    getBorder() {
        return this.options.border === true;
    }
    hasBorder() {
        return this.getBorder() || this.some((cell)=>cell instanceof Cell && cell.getBorder());
    }
    getAlign() {
        return this.options.align ?? "left";
    }
}
function consumeWords(length, content) {
    let consumed = "";
    const words = content.split("\n")[0]?.split(/ /g);
    for(let i1 = 0; i1 < words.length; i1++){
        const word = words[i1];
        if (consumed) {
            const nextLength = strLength(word);
            const consumedLength = strLength(consumed);
            if (consumedLength + nextLength >= length) {
                break;
            }
        }
        consumed += (i1 > 0 ? " " : "") + word;
    }
    return consumed;
}
function longest(index, rows, maxWidth) {
    const cellLengths = rows.map((row)=>{
        const cell = row[index];
        const cellValue = cell instanceof Cell && cell.getColSpan() > 1 ? "" : cell?.toString() || "";
        return cellValue.split("\n").map((line)=>{
            const str = typeof maxWidth === "undefined" ? line : consumeWords(maxWidth, line);
            return strLength(str) || 0;
        });
    }).flat();
    return Math.max(...cellLengths);
}
const strLength = (str)=>{
    str = stripColor(str);
    let length = 0;
    for(let i1 = 0; i1 < str.length; i1++){
        const charCode = str.charCodeAt(i1);
        if (charCode >= 19968 && charCode <= 40869) {
            length += 2;
        } else {
            length += 1;
        }
    }
    return length;
};
class TableLayout {
    constructor(table, options){
        this.table = table;
        this.options = options;
    }
    toString() {
        const opts = this.createLayout();
        return opts.rows.length ? this.renderRows(opts) : "";
    }
    createLayout() {
        Object.keys(this.options.chars).forEach((key)=>{
            if (typeof this.options.chars[key] !== "string") {
                this.options.chars[key] = "";
            }
        });
        const hasBodyBorder = this.table.getBorder() || this.table.hasBodyBorder();
        const hasHeaderBorder = this.table.hasHeaderBorder();
        const hasBorder = hasHeaderBorder || hasBodyBorder;
        const rows = this.#getRows();
        const columns = Math.max(...rows.map((row)=>row.length));
        for (const row of rows){
            const length = row.length;
            if (length < columns) {
                const diff = columns - length;
                for(let i1 = 0; i1 < diff; i1++){
                    row.push(this.createCell(null, row));
                }
            }
        }
        const padding = [];
        const width = [];
        for(let colIndex = 0; colIndex < columns; colIndex++){
            const minColWidth = Array.isArray(this.options.minColWidth) ? this.options.minColWidth[colIndex] : this.options.minColWidth;
            const maxColWidth = Array.isArray(this.options.maxColWidth) ? this.options.maxColWidth[colIndex] : this.options.maxColWidth;
            const colWidth = longest(colIndex, rows, maxColWidth);
            width[colIndex] = Math.min(maxColWidth, Math.max(minColWidth, colWidth));
            padding[colIndex] = Array.isArray(this.options.padding) ? this.options.padding[colIndex] : this.options.padding;
        }
        return {
            padding,
            width,
            rows,
            columns,
            hasBorder,
            hasBodyBorder,
            hasHeaderBorder
        };
    }
    #getRows() {
        const header = this.table.getHeader();
        const rows = header ? [
            header,
            ...this.table
        ] : this.table.slice();
        const hasSpan = rows.some((row)=>row.some((cell)=>cell instanceof Cell && (cell.getColSpan() > 1 || cell.getRowSpan() > 1)));
        if (hasSpan) {
            return this.spanRows(rows);
        }
        return rows.map((row)=>{
            const newRow = this.createRow(row);
            return newRow.map((cell)=>this.createCell(cell, newRow));
        });
    }
    spanRows(_rows, rowIndex = 0, colIndex = 0, rowSpan = [], colSpan = 1) {
        const rows = _rows;
        if (rowIndex >= rows.length && rowSpan.every((span)=>span === 1)) {
            return rows;
        } else if (rows[rowIndex] && colIndex >= rows[rowIndex].length && colIndex >= rowSpan.length && colSpan === 1) {
            return this.spanRows(rows, ++rowIndex, 0, rowSpan, 1);
        }
        if (colSpan > 1) {
            colSpan--;
            rowSpan[colIndex] = rowSpan[colIndex - 1];
            rows[rowIndex].splice(colIndex - 1, 0, rows[rowIndex][colIndex - 1]);
            return this.spanRows(rows, rowIndex, ++colIndex, rowSpan, colSpan);
        }
        if (colIndex === 0) {
            rows[rowIndex] = this.createRow(rows[rowIndex] || []);
        }
        if (rowSpan[colIndex] > 1) {
            rowSpan[colIndex]--;
            rows[rowIndex].splice(colIndex, 0, rows[rowIndex - 1][colIndex]);
            return this.spanRows(rows, rowIndex, ++colIndex, rowSpan, colSpan);
        }
        rows[rowIndex][colIndex] = this.createCell(rows[rowIndex][colIndex] || null, rows[rowIndex]);
        colSpan = rows[rowIndex][colIndex].getColSpan();
        rowSpan[colIndex] = rows[rowIndex][colIndex].getRowSpan();
        return this.spanRows(rows, rowIndex, ++colIndex, rowSpan, colSpan);
    }
    createRow(row) {
        return Row.from(row).border(this.table.getBorder(), false).align(this.table.getAlign(), false);
    }
    createCell(cell, row) {
        return Cell.from(cell ?? "").border(row.getBorder(), false).align(row.getAlign(), false);
    }
    renderRows(opts) {
        let result1 = "";
        const rowSpan = new Array(opts.columns).fill(1);
        for(let rowIndex = 0; rowIndex < opts.rows.length; rowIndex++){
            result1 += this.renderRow(rowSpan, rowIndex, opts);
        }
        return result1.slice(0, -1);
    }
    renderRow(rowSpan, rowIndex, opts, isMultiline) {
        const row = opts.rows[rowIndex];
        const prevRow = opts.rows[rowIndex - 1];
        const nextRow = opts.rows[rowIndex + 1];
        let result1 = "";
        let colSpan = 1;
        if (!isMultiline && rowIndex === 0 && row.hasBorder()) {
            result1 += this.renderBorderRow(undefined, row, rowSpan, opts);
        }
        let isMultilineRow = false;
        result1 += " ".repeat(this.options.indent || 0);
        for(let colIndex = 0; colIndex < opts.columns; colIndex++){
            if (colSpan > 1) {
                colSpan--;
                rowSpan[colIndex] = rowSpan[colIndex - 1];
                continue;
            }
            result1 += this.renderCell(colIndex, row, opts);
            if (rowSpan[colIndex] > 1) {
                if (!isMultiline) {
                    rowSpan[colIndex]--;
                }
            } else if (!prevRow || prevRow[colIndex] !== row[colIndex]) {
                rowSpan[colIndex] = row[colIndex].getRowSpan();
            }
            colSpan = row[colIndex].getColSpan();
            if (rowSpan[colIndex] === 1 && row[colIndex].length) {
                isMultilineRow = true;
            }
        }
        if (opts.columns > 0) {
            if (row[opts.columns - 1].getBorder()) {
                result1 += this.options.chars.right;
            } else if (opts.hasBorder) {
                result1 += " ";
            }
        }
        result1 += "\n";
        if (isMultilineRow) {
            return result1 + this.renderRow(rowSpan, rowIndex, opts, isMultilineRow);
        }
        if (rowIndex === 0 && opts.hasHeaderBorder || rowIndex < opts.rows.length - 1 && opts.hasBodyBorder) {
            result1 += this.renderBorderRow(row, nextRow, rowSpan, opts);
        }
        if (rowIndex === opts.rows.length - 1 && row.hasBorder()) {
            result1 += this.renderBorderRow(row, undefined, rowSpan, opts);
        }
        return result1;
    }
    renderCell(colIndex, row, opts, noBorder) {
        let result1 = "";
        const prevCell = row[colIndex - 1];
        const cell = row[colIndex];
        if (!noBorder) {
            if (colIndex === 0) {
                if (cell.getBorder()) {
                    result1 += this.options.chars.left;
                } else if (opts.hasBorder) {
                    result1 += " ";
                }
            } else {
                if (cell.getBorder() || prevCell?.getBorder()) {
                    result1 += this.options.chars.middle;
                } else if (opts.hasBorder) {
                    result1 += " ";
                }
            }
        }
        let maxLength = opts.width[colIndex];
        const colSpan = cell.getColSpan();
        if (colSpan > 1) {
            for(let o = 1; o < colSpan; o++){
                maxLength += opts.width[colIndex + o] + opts.padding[colIndex + o];
                if (opts.hasBorder) {
                    maxLength += opts.padding[colIndex + o] + 1;
                }
            }
        }
        const { current , next  } = this.renderCellValue(cell, maxLength);
        row[colIndex].setValue(next);
        if (opts.hasBorder) {
            result1 += " ".repeat(opts.padding[colIndex]);
        }
        result1 += current;
        if (opts.hasBorder || colIndex < opts.columns - 1) {
            result1 += " ".repeat(opts.padding[colIndex]);
        }
        return result1;
    }
    renderCellValue(cell, maxLength) {
        const length = Math.min(maxLength, strLength(cell.toString()));
        let words = consumeWords(length, cell.toString());
        const breakWord = strLength(words) > length;
        if (breakWord) {
            words = words.slice(0, length);
        }
        const next = cell.toString().slice(words.length + (breakWord ? 0 : 1));
        const fillLength = maxLength - strLength(words);
        const align = cell.getAlign();
        let current;
        if (fillLength === 0) {
            current = words;
        } else if (align === "left") {
            current = words + " ".repeat(fillLength);
        } else if (align === "center") {
            current = " ".repeat(Math.floor(fillLength / 2)) + words + " ".repeat(Math.ceil(fillLength / 2));
        } else if (align === "right") {
            current = " ".repeat(fillLength) + words;
        } else {
            throw new Error("Unknown direction: " + align);
        }
        return {
            current,
            next: cell.clone(next)
        };
    }
    renderBorderRow(prevRow, nextRow, rowSpan, opts) {
        let result1 = "";
        let colSpan = 1;
        for(let colIndex = 0; colIndex < opts.columns; colIndex++){
            if (rowSpan[colIndex] > 1) {
                if (!nextRow) {
                    throw new Error("invalid layout");
                }
                if (colSpan > 1) {
                    colSpan--;
                    continue;
                }
            }
            result1 += this.renderBorderCell(colIndex, prevRow, nextRow, rowSpan, opts);
            colSpan = nextRow?.[colIndex].getColSpan() ?? 1;
        }
        return result1.length ? " ".repeat(this.options.indent) + result1 + "\n" : "";
    }
    renderBorderCell(colIndex, prevRow, nextRow, rowSpan, opts) {
        const a1 = prevRow?.[colIndex - 1];
        const a2 = nextRow?.[colIndex - 1];
        const b1 = prevRow?.[colIndex];
        const b2 = nextRow?.[colIndex];
        const a1Border = !!a1?.getBorder();
        const a2Border = !!a2?.getBorder();
        const b1Border = !!b1?.getBorder();
        const b2Border = !!b2?.getBorder();
        const hasColSpan = (cell)=>(cell?.getColSpan() ?? 1) > 1;
        const hasRowSpan = (cell)=>(cell?.getRowSpan() ?? 1) > 1;
        let result1 = "";
        if (colIndex === 0) {
            if (rowSpan[colIndex] > 1) {
                if (b1Border) {
                    result1 += this.options.chars.left;
                } else {
                    result1 += " ";
                }
            } else if (b1Border && b2Border) {
                result1 += this.options.chars.leftMid;
            } else if (b1Border) {
                result1 += this.options.chars.bottomLeft;
            } else if (b2Border) {
                result1 += this.options.chars.topLeft;
            } else {
                result1 += " ";
            }
        } else if (colIndex < opts.columns) {
            if (a1Border && b2Border || b1Border && a2Border) {
                const a1ColSpan = hasColSpan(a1);
                const a2ColSpan = hasColSpan(a2);
                const b1ColSpan = hasColSpan(b1);
                const b2ColSpan = hasColSpan(b2);
                const a1RowSpan = hasRowSpan(a1);
                const a2RowSpan = hasRowSpan(a2);
                const b1RowSpan = hasRowSpan(b1);
                const b2RowSpan = hasRowSpan(b2);
                const hasAllBorder = a1Border && b2Border && b1Border && a2Border;
                const hasAllRowSpan = a1RowSpan && b1RowSpan && a2RowSpan && b2RowSpan;
                const hasAllColSpan = a1ColSpan && b1ColSpan && a2ColSpan && b2ColSpan;
                if (hasAllRowSpan && hasAllBorder) {
                    result1 += this.options.chars.middle;
                } else if (hasAllColSpan && hasAllBorder && a1 === b1 && a2 === b2) {
                    result1 += this.options.chars.mid;
                } else if (a1ColSpan && b1ColSpan && a1 === b1) {
                    result1 += this.options.chars.topMid;
                } else if (a2ColSpan && b2ColSpan && a2 === b2) {
                    result1 += this.options.chars.bottomMid;
                } else if (a1RowSpan && a2RowSpan && a1 === a2) {
                    result1 += this.options.chars.leftMid;
                } else if (b1RowSpan && b2RowSpan && b1 === b2) {
                    result1 += this.options.chars.rightMid;
                } else {
                    result1 += this.options.chars.midMid;
                }
            } else if (a1Border && b1Border) {
                if (hasColSpan(a1) && hasColSpan(b1) && a1 === b1) {
                    result1 += this.options.chars.bottom;
                } else {
                    result1 += this.options.chars.bottomMid;
                }
            } else if (b1Border && b2Border) {
                if (rowSpan[colIndex] > 1) {
                    result1 += this.options.chars.left;
                } else {
                    result1 += this.options.chars.leftMid;
                }
            } else if (b2Border && a2Border) {
                if (hasColSpan(a2) && hasColSpan(b2) && a2 === b2) {
                    result1 += this.options.chars.top;
                } else {
                    result1 += this.options.chars.topMid;
                }
            } else if (a1Border && a2Border) {
                if (hasRowSpan(a1) && a1 === a2) {
                    result1 += this.options.chars.right;
                } else {
                    result1 += this.options.chars.rightMid;
                }
            } else if (a1Border) {
                result1 += this.options.chars.bottomRight;
            } else if (b1Border) {
                result1 += this.options.chars.bottomLeft;
            } else if (a2Border) {
                result1 += this.options.chars.topRight;
            } else if (b2Border) {
                result1 += this.options.chars.topLeft;
            } else {
                result1 += " ";
            }
        }
        const length = opts.padding[colIndex] + opts.width[colIndex] + opts.padding[colIndex];
        if (rowSpan[colIndex] > 1 && nextRow) {
            result1 += this.renderCell(colIndex, nextRow, opts, true);
            if (nextRow[colIndex] === nextRow[nextRow.length - 1]) {
                if (b1Border) {
                    result1 += this.options.chars.right;
                } else {
                    result1 += " ";
                }
                return result1;
            }
        } else if (b1Border && b2Border) {
            result1 += this.options.chars.mid.repeat(length);
        } else if (b1Border) {
            result1 += this.options.chars.bottom.repeat(length);
        } else if (b2Border) {
            result1 += this.options.chars.top.repeat(length);
        } else {
            result1 += " ".repeat(length);
        }
        if (colIndex === opts.columns - 1) {
            if (b1Border && b2Border) {
                result1 += this.options.chars.rightMid;
            } else if (b1Border) {
                result1 += this.options.chars.bottomRight;
            } else if (b2Border) {
                result1 += this.options.chars.topRight;
            } else {
                result1 += " ";
            }
        }
        return result1;
    }
    table;
    options;
}
class Table extends Array {
    static _chars = {
        ...border
    };
    options = {
        indent: 0,
        border: false,
        maxColWidth: Infinity,
        minColWidth: 0,
        padding: 1,
        chars: {
            ...Table._chars
        }
    };
    headerRow;
    static from(rows) {
        const table = new this(...rows);
        if (rows instanceof Table) {
            table.options = {
                ...rows.options
            };
            table.headerRow = rows.headerRow ? Row.from(rows.headerRow) : undefined;
        }
        return table;
    }
    static fromJson(rows) {
        return new this().fromJson(rows);
    }
    static chars(chars) {
        Object.assign(this._chars, chars);
        return this;
    }
    static render(rows) {
        Table.from(rows).render();
    }
    fromJson(rows) {
        this.header(Object.keys(rows[0]));
        this.body(rows.map((row)=>Object.values(row)));
        return this;
    }
    header(header) {
        this.headerRow = header instanceof Row ? header : Row.from(header);
        return this;
    }
    body(rows) {
        this.length = 0;
        this.push(...rows);
        return this;
    }
    clone() {
        const table = new Table(...this.map((row)=>row instanceof Row ? row.clone() : Row.from(row).clone()));
        table.options = {
            ...this.options
        };
        table.headerRow = this.headerRow?.clone();
        return table;
    }
    toString() {
        return new TableLayout(this, this.options).toString();
    }
    render() {
        console.log(this.toString());
        return this;
    }
    maxColWidth(width, override = true) {
        if (override || typeof this.options.maxColWidth === "undefined") {
            this.options.maxColWidth = width;
        }
        return this;
    }
    minColWidth(width, override = true) {
        if (override || typeof this.options.minColWidth === "undefined") {
            this.options.minColWidth = width;
        }
        return this;
    }
    indent(width, override = true) {
        if (override || typeof this.options.indent === "undefined") {
            this.options.indent = width;
        }
        return this;
    }
    padding(padding, override = true) {
        if (override || typeof this.options.padding === "undefined") {
            this.options.padding = padding;
        }
        return this;
    }
    border(enable, override = true) {
        if (override || typeof this.options.border === "undefined") {
            this.options.border = enable;
        }
        return this;
    }
    align(direction, override = true) {
        if (override || typeof this.options.align === "undefined") {
            this.options.align = direction;
        }
        return this;
    }
    chars(chars) {
        Object.assign(this.options.chars, chars);
        return this;
    }
    getHeader() {
        return this.headerRow;
    }
    getBody() {
        return [
            ...this
        ];
    }
    getMaxColWidth() {
        return this.options.maxColWidth;
    }
    getMinColWidth() {
        return this.options.minColWidth;
    }
    getIndent() {
        return this.options.indent;
    }
    getPadding() {
        return this.options.padding;
    }
    getBorder() {
        return this.options.border === true;
    }
    hasHeaderBorder() {
        const hasBorder = this.headerRow?.hasBorder();
        return hasBorder === true || this.getBorder() && hasBorder !== false;
    }
    hasBodyBorder() {
        return this.getBorder() || this.some((row)=>row instanceof Row ? row.hasBorder() : row.some((cell)=>cell instanceof Cell ? cell.getBorder : false));
    }
    hasBorder() {
        return this.hasHeaderBorder() || this.hasBodyBorder();
    }
    getAlign() {
        return this.options.align ?? "left";
    }
}
class HelpGenerator {
    indent;
    options;
    static generate(cmd, options) {
        return new HelpGenerator(cmd, options).generate();
    }
    constructor(cmd, options = {}){
        this.cmd = cmd;
        this.indent = 2;
        this.options = {
            types: false,
            hints: true,
            colors: true,
            long: false,
            ...options
        };
    }
    generate() {
        const areColorsEnabled = getColorEnabled();
        setColorEnabled(this.options.colors);
        const result1 = this.generateHeader() + this.generateMeta() + this.generateDescription() + this.generateOptions() + this.generateCommands() + this.generateEnvironmentVariables() + this.generateExamples();
        setColorEnabled(areColorsEnabled);
        return result1;
    }
    generateHeader() {
        const usage = this.cmd.getUsage();
        const rows = [
            [
                bold("Usage:"),
                magenta(this.cmd.getPath() + (usage ? " " + highlightArguments(usage, this.options.types) : "")), 
            ], 
        ];
        const version = this.cmd.getVersion();
        if (version) {
            rows.push([
                bold("Version:"),
                yellow(`${this.cmd.getVersion()}`)
            ]);
        }
        return "\n" + Table.from(rows).indent(this.indent).padding(1).toString() + "\n";
    }
    generateMeta() {
        const meta = Object.entries(this.cmd.getMeta());
        if (!meta.length) {
            return "";
        }
        const rows = [];
        for (const [name, value] of meta){
            rows.push([
                bold(`${name}: `) + value
            ]);
        }
        return "\n" + Table.from(rows).indent(this.indent).padding(1).toString() + "\n";
    }
    generateDescription() {
        if (!this.cmd.getDescription()) {
            return "";
        }
        return this.label("Description") + Table.from([
            [
                dedent(this.cmd.getDescription())
            ], 
        ]).indent(this.indent * 2).maxColWidth(140).padding(1).toString() + "\n";
    }
    generateOptions() {
        const options = this.cmd.getOptions(false);
        if (!options.length) {
            return "";
        }
        let groups = [];
        const hasGroups = options.some((option)=>option.groupName);
        if (hasGroups) {
            for (const option of options){
                let group = groups.find((group)=>group.name === option.groupName);
                if (!group) {
                    group = {
                        name: option.groupName,
                        options: []
                    };
                    groups.push(group);
                }
                group.options.push(option);
            }
        } else {
            groups = [
                {
                    name: "Options",
                    options
                }
            ];
        }
        let result1 = "";
        for (const group1 of groups){
            result1 += this.generateOptionGroup(group1);
        }
        return result1;
    }
    generateOptionGroup(group) {
        if (!group.options.length) {
            return "";
        }
        const hasTypeDefinitions = !!group.options.find((option)=>!!option.typeDefinition);
        if (hasTypeDefinitions) {
            return this.label(group.name ?? "Options") + Table.from([
                ...group.options.map((option)=>[
                        option.flags.map((flag)=>blue(flag)).join(", "),
                        highlightArguments(option.typeDefinition || "", this.options.types),
                        red(bold("-")),
                        getDescription(option.description, !this.options.long),
                        this.generateHints(option), 
                    ]), 
            ]).padding([
                2,
                2,
                1,
                2
            ]).indent(this.indent * 2).maxColWidth([
                60,
                60,
                1,
                80,
                60
            ]).toString() + "\n";
        }
        return this.label(group.name ?? "Options") + Table.from([
            ...group.options.map((option)=>[
                    option.flags.map((flag)=>blue(flag)).join(", "),
                    red(bold("-")),
                    getDescription(option.description, !this.options.long),
                    this.generateHints(option), 
                ]), 
        ]).indent(this.indent * 2).maxColWidth([
            60,
            1,
            80,
            60
        ]).padding([
            2,
            1,
            2
        ]).toString() + "\n";
    }
    generateCommands() {
        const commands = this.cmd.getCommands(false);
        if (!commands.length) {
            return "";
        }
        const hasTypeDefinitions = !!commands.find((command)=>!!command.getArgsDefinition());
        if (hasTypeDefinitions) {
            return this.label("Commands") + Table.from([
                ...commands.map((command)=>[
                        [
                            command.getName(),
                            ...command.getAliases()
                        ].map((name)=>blue(name)).join(", "),
                        highlightArguments(command.getArgsDefinition() || "", this.options.types),
                        red(bold("-")),
                        command.getShortDescription(), 
                    ]), 
            ]).indent(this.indent * 2).maxColWidth([
                60,
                60,
                1,
                80
            ]).padding([
                2,
                2,
                1,
                2
            ]).toString() + "\n";
        }
        return this.label("Commands") + Table.from([
            ...commands.map((command)=>[
                    [
                        command.getName(),
                        ...command.getAliases()
                    ].map((name)=>blue(name)).join(", "),
                    red(bold("-")),
                    command.getShortDescription(), 
                ]), 
        ]).maxColWidth([
            60,
            1,
            80
        ]).padding([
            2,
            1,
            2
        ]).indent(this.indent * 2).toString() + "\n";
    }
    generateEnvironmentVariables() {
        const envVars = this.cmd.getEnvVars(false);
        if (!envVars.length) {
            return "";
        }
        return this.label("Environment variables") + Table.from([
            ...envVars.map((envVar)=>[
                    envVar.names.map((name)=>blue(name)).join(", "),
                    highlightArgumentDetails(envVar.details, this.options.types),
                    red(bold("-")),
                    this.options.long ? dedent(envVar.description) : envVar.description.trim().split("\n", 1)[0], 
                ]), 
        ]).padding([
            2,
            2,
            1
        ]).indent(this.indent * 2).maxColWidth([
            60,
            60,
            1,
            80
        ]).toString() + "\n";
    }
    generateExamples() {
        const examples = this.cmd.getExamples();
        if (!examples.length) {
            return "";
        }
        return this.label("Examples") + Table.from(examples.map((example)=>[
                dim(bold(`${capitalize(example.name)}:`)),
                dedent(example.description), 
            ])).padding(1).indent(this.indent * 2).maxColWidth(150).toString() + "\n";
    }
    generateHints(option) {
        if (!this.options.hints) {
            return "";
        }
        const hints = [];
        option.required && hints.push(yellow(`required`));
        typeof option.default !== "undefined" && hints.push(bold(`Default: `) + inspect(option.default, this.options.colors));
        option.depends?.length && hints.push(yellow(bold(`Depends: `)) + italic(option.depends.map(getFlag).join(", ")));
        option.conflicts?.length && hints.push(red(bold(`Conflicts: `)) + italic(option.conflicts.map(getFlag).join(", ")));
        const type = this.cmd.getType(option.args[0]?.type)?.handler;
        if (type instanceof Type) {
            const possibleValues = type.values?.(this.cmd, this.cmd.getParent());
            if (possibleValues?.length) {
                hints.push(bold(`Values: `) + possibleValues.map((value)=>inspect(value, this.options.colors)).join(", "));
            }
        }
        if (hints.length) {
            return `(${hints.join(", ")})`;
        }
        return "";
    }
    label(label) {
        return "\n" + " ".repeat(this.indent) + bold(`${label}:`) + "\n\n";
    }
    cmd;
}
function capitalize(string) {
    return (string?.charAt(0).toUpperCase() + string.slice(1)) ?? "";
}
function inspect(value, colors) {
    return Deno.inspect(value, {
        depth: 1,
        colors,
        trailingComma: false
    });
}
function highlightArguments(argsDefinition, types = true) {
    if (!argsDefinition) {
        return "";
    }
    return parseArgumentsDefinition(argsDefinition, false, true).map((arg)=>typeof arg === "string" ? arg : highlightArgumentDetails(arg, types)).join(" ");
}
function highlightArgumentDetails(arg, types = true) {
    let str = "";
    str += yellow(arg.optionalValue ? "[" : "<");
    let name = "";
    name += arg.name;
    if (arg.variadic) {
        name += "...";
    }
    name = magenta(name);
    str += name;
    if (types) {
        str += yellow(":");
        str += red(arg.type);
        if (arg.list) {
            str += green("[]");
        }
    }
    str += yellow(arg.optionalValue ? "]" : ">");
    return str;
}
class IntegerType extends Type {
    parse(type) {
        return integer(type);
    }
}
class Command {
    types = new Map();
    rawArgs = [];
    literalArgs = [];
    _name = "COMMAND";
    _parent;
    _globalParent;
    ver;
    desc = "";
    _usage;
    fn;
    options = [];
    commands = new Map();
    examples = [];
    envVars = [];
    aliases = [];
    completions = new Map();
    cmd = this;
    argsDefinition;
    isExecutable = false;
    throwOnError = false;
    _allowEmpty = false;
    _stopEarly = false;
    defaultCommand;
    _useRawArgs = false;
    args = [];
    isHidden = false;
    isGlobal = false;
    hasDefaults = false;
    _versionOption;
    _helpOption;
    _help;
    _shouldExit;
    _meta = {};
    _groupName;
    versionOption(flags, desc, opts) {
        this._versionOption = flags === false ? flags : {
            flags,
            desc,
            opts: typeof opts === "function" ? {
                action: opts
            } : opts
        };
        return this;
    }
    helpOption(flags, desc, opts) {
        this._helpOption = flags === false ? flags : {
            flags,
            desc,
            opts: typeof opts === "function" ? {
                action: opts
            } : opts
        };
        return this;
    }
    command(nameAndArguments, cmdOrDescription, override) {
        this.reset();
        const result1 = splitArguments(nameAndArguments);
        const name = result1.flags.shift();
        const aliases = result1.flags;
        if (!name) {
            throw new MissingCommandName();
        }
        if (this.getBaseCommand(name, true)) {
            if (!override) {
                throw new DuplicateCommandName(name);
            }
            this.removeCommand(name);
        }
        let description;
        let cmd;
        if (typeof cmdOrDescription === "string") {
            description = cmdOrDescription;
        }
        if (cmdOrDescription instanceof Command) {
            cmd = cmdOrDescription.reset();
        } else {
            cmd = new Command();
        }
        cmd._name = name;
        cmd._parent = this;
        if (description) {
            cmd.description(description);
        }
        if (result1.typeDefinition) {
            cmd.arguments(result1.typeDefinition);
        }
        aliases.forEach((alias)=>cmd.alias(alias));
        this.commands.set(name, cmd);
        this.select(name);
        return this;
    }
    alias(alias) {
        if (this.cmd._name === alias || this.cmd.aliases.includes(alias)) {
            throw new DuplicateCommandAlias(alias);
        }
        this.cmd.aliases.push(alias);
        return this;
    }
    reset() {
        this._groupName = undefined;
        this.cmd = this;
        return this;
    }
    select(name) {
        const cmd = this.getBaseCommand(name, true);
        if (!cmd) {
            throw new CommandNotFound(name, this.getBaseCommands(true));
        }
        this.cmd = cmd;
        return this;
    }
    name(name) {
        this.cmd._name = name;
        return this;
    }
    version(version) {
        if (typeof version === "string") {
            this.cmd.ver = ()=>version;
        } else if (typeof version === "function") {
            this.cmd.ver = version;
        }
        return this;
    }
    meta(name, value) {
        this.cmd._meta[name] = value;
        return this;
    }
    getMeta(name) {
        return typeof name === "undefined" ? this._meta : this._meta[name];
    }
    help(help) {
        if (typeof help === "string") {
            this.cmd._help = ()=>help;
        } else if (typeof help === "function") {
            this.cmd._help = help;
        } else {
            this.cmd._help = (cmd, options)=>HelpGenerator.generate(cmd, {
                    ...help,
                    ...options
                });
        }
        return this;
    }
    description(description) {
        this.cmd.desc = description;
        return this;
    }
    usage(usage) {
        this.cmd._usage = usage;
        return this;
    }
    hidden() {
        this.cmd.isHidden = true;
        return this;
    }
    global() {
        this.cmd.isGlobal = true;
        return this;
    }
    executable() {
        this.cmd.isExecutable = true;
        return this;
    }
    arguments(args) {
        this.cmd.argsDefinition = args;
        return this;
    }
    action(fn) {
        this.cmd.fn = fn;
        return this;
    }
    allowEmpty(allowEmpty = true) {
        this.cmd._allowEmpty = allowEmpty;
        return this;
    }
    stopEarly(stopEarly = true) {
        this.cmd._stopEarly = stopEarly;
        return this;
    }
    useRawArgs(useRawArgs = true) {
        this.cmd._useRawArgs = useRawArgs;
        return this;
    }
    default(name) {
        this.cmd.defaultCommand = name;
        return this;
    }
    globalType(name, handler, options) {
        return this.type(name, handler, {
            ...options,
            global: true
        });
    }
    type(name, handler, options) {
        if (this.cmd.types.get(name) && !options?.override) {
            throw new DuplicateType(name);
        }
        this.cmd.types.set(name, {
            ...options,
            name,
            handler
        });
        if (handler instanceof Type && (typeof handler.complete !== "undefined" || typeof handler.values !== "undefined")) {
            const completeHandler = (cmd, parent)=>handler.complete?.(cmd, parent) || [];
            this.complete(name, completeHandler, options);
        }
        return this;
    }
    globalComplete(name, complete, options) {
        return this.complete(name, complete, {
            ...options,
            global: true
        });
    }
    complete(name, complete, options) {
        if (this.cmd.completions.has(name) && !options?.override) {
            throw new DuplicateCompletion(name);
        }
        this.cmd.completions.set(name, {
            name,
            complete,
            ...options
        });
        return this;
    }
    throwErrors() {
        this.cmd.throwOnError = true;
        return this;
    }
    noExit() {
        this.cmd._shouldExit = false;
        this.throwErrors();
        return this;
    }
    shouldThrowErrors() {
        return this.cmd.throwOnError || !!this.cmd._parent?.shouldThrowErrors();
    }
    shouldExit() {
        return this.cmd._shouldExit ?? this.cmd._parent?.shouldExit() ?? true;
    }
    globalOption(flags, desc, opts) {
        if (typeof opts === "function") {
            return this.option(flags, desc, {
                value: opts,
                global: true
            });
        }
        return this.option(flags, desc, {
            ...opts,
            global: true
        });
    }
    group(name) {
        this.cmd._groupName = name;
        return this;
    }
    option(flags, desc, opts) {
        if (typeof opts === "function") {
            return this.option(flags, desc, {
                value: opts
            });
        }
        const result1 = splitArguments(flags);
        const args = result1.typeDefinition ? parseArgumentsDefinition(result1.typeDefinition) : [];
        const option = {
            ...opts,
            name: "",
            description: desc,
            args,
            flags: result1.flags,
            equalsSign: result1.equalsSign,
            typeDefinition: result1.typeDefinition,
            groupName: this._groupName
        };
        if (option.separator) {
            for (const arg of args){
                if (arg.list) {
                    arg.separator = option.separator;
                }
            }
        }
        for (const part of option.flags){
            const arg1 = part.trim();
            const isLong = /^--/.test(arg1);
            const name = isLong ? arg1.slice(2) : arg1.slice(1);
            if (this.cmd.getBaseOption(name, true)) {
                if (opts?.override) {
                    this.removeOption(name);
                } else {
                    throw new DuplicateOptionName(name);
                }
            }
            if (!option.name && isLong) {
                option.name = name;
            } else if (!option.aliases) {
                option.aliases = [
                    name
                ];
            } else {
                option.aliases.push(name);
            }
        }
        if (option.prepend) {
            this.cmd.options.unshift(option);
        } else {
            this.cmd.options.push(option);
        }
        return this;
    }
    example(name, description) {
        if (this.cmd.hasExample(name)) {
            throw new DuplicateExample(name);
        }
        this.cmd.examples.push({
            name,
            description
        });
        return this;
    }
    globalEnv(name, description, options) {
        return this.env(name, description, {
            ...options,
            global: true
        });
    }
    env(name, description, options) {
        const result1 = splitArguments(name);
        if (!result1.typeDefinition) {
            result1.typeDefinition = "<value:boolean>";
        }
        if (result1.flags.some((envName)=>this.cmd.getBaseEnvVar(envName, true))) {
            throw new DuplicateEnvironmentVariable(name);
        }
        const details = parseArgumentsDefinition(result1.typeDefinition);
        if (details.length > 1) {
            throw new EnvironmentVariableSingleValue(name);
        } else if (details.length && details[0].optionalValue) {
            throw new EnvironmentVariableOptionalValue(name);
        } else if (details.length && details[0].variadic) {
            throw new EnvironmentVariableVariadicValue(name);
        }
        this.cmd.envVars.push({
            name: result1.flags[0],
            names: result1.flags,
            description,
            type: details[0].type,
            details: details.shift(),
            ...options
        });
        return this;
    }
    async parse(args = Deno.args) {
        try {
            this.reset();
            this.registerDefaults();
            this.rawArgs = args;
            if (args.length > 0) {
                const subCommand = this.getCommand(args[0], true);
                if (subCommand) {
                    subCommand._globalParent = this;
                    return subCommand.parse(this.rawArgs.slice(1));
                }
            }
            if (this.isExecutable) {
                await this.executeExecutable(this.rawArgs);
                return {
                    options: {},
                    args: [],
                    cmd: this,
                    literal: []
                };
            } else if (this._useRawArgs) {
                const env = await this.parseEnvVars();
                return this.execute(env, ...this.rawArgs);
            } else {
                const env1 = await this.parseEnvVars();
                const { actionOption , flags , unknown , literal  } = this.parseFlags(this.rawArgs, env1);
                this.literalArgs = literal;
                const options = {
                    ...env1,
                    ...flags
                };
                const params = this.parseArguments(unknown, options);
                if (actionOption) {
                    await actionOption.action.call(this, options, ...params);
                    if (actionOption.standalone) {
                        return {
                            options,
                            args: params,
                            cmd: this,
                            literal: this.literalArgs
                        };
                    }
                }
                return this.execute(options, ...params);
            }
        } catch (error) {
            if (error instanceof Error) {
                throw this.error(error);
            } else {
                throw this.error(new Error(`[non-error-thrown] ${error}`));
            }
        }
    }
    registerDefaults() {
        if (this.hasDefaults || this.getParent()) {
            return this;
        }
        this.hasDefaults = true;
        this.reset();
        !this.types.has("string") && this.type("string", new StringType(), {
            global: true
        });
        !this.types.has("number") && this.type("number", new NumberType(), {
            global: true
        });
        !this.types.has("integer") && this.type("integer", new IntegerType(), {
            global: true
        });
        !this.types.has("boolean") && this.type("boolean", new BooleanType(), {
            global: true
        });
        !this.types.has("file") && this.type("file", new FileType(), {
            global: true
        });
        if (!this._help) {
            this.help({
                hints: true,
                types: false
            });
        }
        if (this._versionOption !== false && (this._versionOption || this.ver)) {
            this.option(this._versionOption?.flags || "-V, --version", this._versionOption?.desc || "Show the version number for this program.", {
                standalone: true,
                prepend: true,
                action: async function() {
                    const __long = this.getRawArgs().includes(`--${versionOption.name}`);
                    if (__long) {
                        await this.checkVersion();
                        this.showLongVersion();
                    } else {
                        this.showVersion();
                    }
                    this.exit();
                },
                ...this._versionOption?.opts ?? {}
            });
            const versionOption = this.options[0];
        }
        if (this._helpOption !== false) {
            this.option(this._helpOption?.flags || "-h, --help", this._helpOption?.desc || "Show this help.", {
                standalone: true,
                global: true,
                prepend: true,
                action: async function() {
                    const __long = this.getRawArgs().includes(`--${helpOption.name}`);
                    await this.checkVersion();
                    this.showHelp({
                        long: __long
                    });
                    this.exit();
                },
                ...this._helpOption?.opts ?? {}
            });
            const helpOption = this.options[0];
        }
        return this;
    }
    async execute(options, ...args) {
        if (this.fn) {
            await this.fn(options, ...args);
        } else if (this.defaultCommand) {
            const cmd = this.getCommand(this.defaultCommand, true);
            if (!cmd) {
                throw new DefaultCommandNotFound(this.defaultCommand, this.getCommands());
            }
            cmd._globalParent = this;
            await cmd.execute(options, ...args);
        }
        return {
            options,
            args,
            cmd: this,
            literal: this.literalArgs
        };
    }
    async executeExecutable(args) {
        const command = this.getPath().replace(/\s+/g, "-");
        await Deno.permissions.request({
            name: "run",
            command
        });
        try {
            const process = Deno.run({
                cmd: [
                    command,
                    ...args
                ]
            });
            const status = await process.status();
            if (!status.success) {
                Deno.exit(status.code);
            }
        } catch (error) {
            if (error instanceof Deno.errors.NotFound) {
                throw new CommandExecutableNotFound(command);
            }
            throw error;
        }
    }
    parseFlags(args, env) {
        try {
            let actionOption;
            const result1 = parseFlags(args, {
                stopEarly: this._stopEarly,
                allowEmpty: this._allowEmpty,
                flags: this.getOptions(true),
                ignoreDefaults: env,
                parse: (type)=>this.parseType(type),
                option: (option)=>{
                    if (!actionOption && option.action) {
                        actionOption = option;
                    }
                }
            });
            return {
                ...result1,
                actionOption
            };
        } catch (error) {
            if (error instanceof ValidationError) {
                throw new ValidationError1(error.message);
            }
            throw error;
        }
    }
    parseType(type) {
        const typeSettings = this.getType(type.type);
        if (!typeSettings) {
            throw new UnknownType(type.type, this.getTypes().map((type)=>type.name));
        }
        return typeSettings.handler instanceof Type ? typeSettings.handler.parse(type) : typeSettings.handler(type);
    }
    async parseEnvVars() {
        const envVars = this.getEnvVars(true);
        const result1 = {};
        if (!envVars.length) {
            return result1;
        }
        const hasEnvPermissions = (await Deno.permissions.query({
            name: "env"
        })).state === "granted";
        for (const env of envVars){
            const name = hasEnvPermissions && env.names.find((name)=>!!Deno.env.get(name));
            if (name) {
                const propertyName = underscoreToCamelCase(env.prefix ? env.names[0].replace(new RegExp(`^${env.prefix}`), "") : env.names[0]);
                if (env.details.list) {
                    const values = Deno.env.get(name)?.split(env.details.separator ?? ",") ?? [
                        ""
                    ];
                    result1[propertyName] = values.map((value)=>this.parseType({
                            label: "Environment variable",
                            type: env.type,
                            name,
                            value
                        }));
                } else {
                    result1[propertyName] = this.parseType({
                        label: "Environment variable",
                        type: env.type,
                        name,
                        value: Deno.env.get(name) ?? ""
                    });
                }
                if (env.value && typeof result1[propertyName] !== "undefined") {
                    result1[propertyName] = env.value(result1[propertyName]);
                }
            } else if (env.required) {
                throw new MissingRequiredEnvVar(env);
            }
        }
        return result1;
    }
    parseArguments(args, flags) {
        const params = [];
        args = args.slice(0);
        if (!this.hasArguments()) {
            if (args.length) {
                if (this.hasCommands(true)) {
                    throw new UnknownCommand(args[0], this.getCommands());
                } else {
                    throw new NoArgumentsAllowed(this.getPath());
                }
            }
        } else {
            if (!args.length) {
                const required = this.getArguments().filter((expectedArg)=>!expectedArg.optionalValue).map((expectedArg)=>expectedArg.name);
                if (required.length) {
                    const flagNames = Object.keys(flags);
                    const hasStandaloneOption = !!flagNames.find((name)=>this.getOption(name, true)?.standalone);
                    if (!hasStandaloneOption) {
                        throw new MissingArguments(required);
                    }
                }
            } else {
                for (const expectedArg of this.getArguments()){
                    if (!args.length) {
                        if (expectedArg.optionalValue) {
                            break;
                        }
                        throw new MissingArgument(`Missing argument: ${expectedArg.name}`);
                    }
                    let arg;
                    if (expectedArg.variadic) {
                        arg = args.splice(0, args.length).map((value)=>this.parseType({
                                label: "Argument",
                                type: expectedArg.type,
                                name: expectedArg.name,
                                value
                            }));
                    } else {
                        arg = this.parseType({
                            label: "Argument",
                            type: expectedArg.type,
                            name: expectedArg.name,
                            value: args.shift()
                        });
                    }
                    if (typeof arg !== "undefined") {
                        params.push(arg);
                    }
                }
                if (args.length) {
                    throw new TooManyArguments(args);
                }
            }
        }
        return params;
    }
    error(error) {
        if (this.shouldThrowErrors() || !(error instanceof ValidationError1)) {
            return error;
        }
        this.showHelp();
        console.error(red(`  ${bold("error")}: ${error.message}\n`));
        Deno.exit(error instanceof ValidationError1 ? error.exitCode : 1);
    }
    getName() {
        return this._name;
    }
    getParent() {
        return this._parent;
    }
    getGlobalParent() {
        return this._globalParent;
    }
    getMainCommand() {
        return this._parent?.getMainCommand() ?? this;
    }
    getAliases() {
        return this.aliases;
    }
    getPath() {
        return this._parent ? this._parent.getPath() + " " + this._name : this._name;
    }
    getArgsDefinition() {
        return this.argsDefinition;
    }
    getArgument(name) {
        return this.getArguments().find((arg)=>arg.name === name);
    }
    getArguments() {
        if (!this.args.length && this.argsDefinition) {
            this.args = parseArgumentsDefinition(this.argsDefinition);
        }
        return this.args;
    }
    hasArguments() {
        return !!this.argsDefinition;
    }
    getVersion() {
        return this.getVersionHandler()?.call(this, this);
    }
    getVersionHandler() {
        return this.ver ?? this._parent?.getVersionHandler();
    }
    getDescription() {
        return typeof this.desc === "function" ? this.desc = this.desc() : this.desc;
    }
    getUsage() {
        return this._usage ?? this.getArgsDefinition();
    }
    getShortDescription() {
        return getDescription(this.getDescription(), true);
    }
    getRawArgs() {
        return this.rawArgs;
    }
    getLiteralArgs() {
        return this.literalArgs;
    }
    showVersion() {
        console.log(this.getVersion());
    }
    getLongVersion() {
        return `${bold(this.getMainCommand().getName())} ${blue(this.getVersion() ?? "")}` + Object.entries(this.getMeta()).map(([k, v])=>`\n${bold(k)} ${blue(v)}`).join("");
    }
    showLongVersion() {
        console.log(this.getLongVersion());
    }
    showHelp(options) {
        console.log(this.getHelp(options));
    }
    getHelp(options) {
        this.registerDefaults();
        return this.getHelpHandler().call(this, this, options ?? {});
    }
    getHelpHandler() {
        return this._help ?? this._parent?.getHelpHandler();
    }
    exit(code = 0) {
        if (this.shouldExit()) {
            Deno.exit(code);
        }
    }
    async checkVersion() {
        const mainCommand = this.getMainCommand();
        const upgradeCommand = mainCommand.getCommand("upgrade");
        if (isUpgradeCommand(upgradeCommand)) {
            const latestVersion = await upgradeCommand.getLatestVersion();
            const currentVersion = mainCommand.getVersion();
            if (currentVersion !== latestVersion) {
                mainCommand.version(`${currentVersion}  ${bold(yellow(`(New version available: ${latestVersion}. Run '${mainCommand.getName()} upgrade' to upgrade to the latest version!)`))}`);
            }
        }
    }
    hasOptions(hidden) {
        return this.getOptions(hidden).length > 0;
    }
    getOptions(hidden) {
        return this.getGlobalOptions(hidden).concat(this.getBaseOptions(hidden));
    }
    getBaseOptions(hidden) {
        if (!this.options.length) {
            return [];
        }
        return hidden ? this.options.slice(0) : this.options.filter((opt)=>!opt.hidden);
    }
    getGlobalOptions(hidden) {
        const getOptions = (cmd, options = [], names = [])=>{
            if (cmd) {
                if (cmd.options.length) {
                    cmd.options.forEach((option)=>{
                        if (option.global && !this.options.find((opt)=>opt.name === option.name) && names.indexOf(option.name) === -1 && (hidden || !option.hidden)) {
                            names.push(option.name);
                            options.push(option);
                        }
                    });
                }
                return getOptions(cmd._parent, options, names);
            }
            return options;
        };
        return getOptions(this._parent);
    }
    hasOption(name, hidden) {
        return !!this.getOption(name, hidden);
    }
    getOption(name, hidden) {
        return this.getBaseOption(name, hidden) ?? this.getGlobalOption(name, hidden);
    }
    getBaseOption(name, hidden) {
        const option = this.options.find((option)=>option.name === name);
        return option && (hidden || !option.hidden) ? option : undefined;
    }
    getGlobalOption(name, hidden) {
        if (!this._parent) {
            return;
        }
        const option = this._parent.getBaseOption(name, hidden);
        if (!option || !option.global) {
            return this._parent.getGlobalOption(name, hidden);
        }
        return option;
    }
    removeOption(name) {
        const index = this.options.findIndex((option)=>option.name === name);
        if (index === -1) {
            return;
        }
        return this.options.splice(index, 1)[0];
    }
    hasCommands(hidden) {
        return this.getCommands(hidden).length > 0;
    }
    getCommands(hidden) {
        return this.getGlobalCommands(hidden).concat(this.getBaseCommands(hidden));
    }
    getBaseCommands(hidden) {
        const commands = Array.from(this.commands.values());
        return hidden ? commands : commands.filter((cmd)=>!cmd.isHidden);
    }
    getGlobalCommands(hidden) {
        const getCommands = (cmd, commands = [], names = [])=>{
            if (cmd) {
                if (cmd.commands.size) {
                    cmd.commands.forEach((cmd)=>{
                        if (cmd.isGlobal && this !== cmd && !this.commands.has(cmd._name) && names.indexOf(cmd._name) === -1 && (hidden || !cmd.isHidden)) {
                            names.push(cmd._name);
                            commands.push(cmd);
                        }
                    });
                }
                return getCommands(cmd._parent, commands, names);
            }
            return commands;
        };
        return getCommands(this._parent);
    }
    hasCommand(name, hidden) {
        return !!this.getCommand(name, hidden);
    }
    getCommand(name, hidden) {
        return this.getBaseCommand(name, hidden) ?? this.getGlobalCommand(name, hidden);
    }
    getBaseCommand(name, hidden) {
        for (const cmd of this.commands.values()){
            if (cmd._name === name || cmd.aliases.includes(name)) {
                return cmd && (hidden || !cmd.isHidden) ? cmd : undefined;
            }
        }
    }
    getGlobalCommand(name, hidden) {
        if (!this._parent) {
            return;
        }
        const cmd = this._parent.getBaseCommand(name, hidden);
        if (!cmd?.isGlobal) {
            return this._parent.getGlobalCommand(name, hidden);
        }
        return cmd;
    }
    removeCommand(name) {
        const command = this.getBaseCommand(name, true);
        if (command) {
            this.commands.delete(command._name);
        }
        return command;
    }
    getTypes() {
        return this.getGlobalTypes().concat(this.getBaseTypes());
    }
    getBaseTypes() {
        return Array.from(this.types.values());
    }
    getGlobalTypes() {
        const getTypes = (cmd, types = [], names = [])=>{
            if (cmd) {
                if (cmd.types.size) {
                    cmd.types.forEach((type)=>{
                        if (type.global && !this.types.has(type.name) && names.indexOf(type.name) === -1) {
                            names.push(type.name);
                            types.push(type);
                        }
                    });
                }
                return getTypes(cmd._parent, types, names);
            }
            return types;
        };
        return getTypes(this._parent);
    }
    getType(name) {
        return this.getBaseType(name) ?? this.getGlobalType(name);
    }
    getBaseType(name) {
        return this.types.get(name);
    }
    getGlobalType(name) {
        if (!this._parent) {
            return;
        }
        const cmd = this._parent.getBaseType(name);
        if (!cmd?.global) {
            return this._parent.getGlobalType(name);
        }
        return cmd;
    }
    getCompletions() {
        return this.getGlobalCompletions().concat(this.getBaseCompletions());
    }
    getBaseCompletions() {
        return Array.from(this.completions.values());
    }
    getGlobalCompletions() {
        const getCompletions = (cmd, completions = [], names = [])=>{
            if (cmd) {
                if (cmd.completions.size) {
                    cmd.completions.forEach((completion)=>{
                        if (completion.global && !this.completions.has(completion.name) && names.indexOf(completion.name) === -1) {
                            names.push(completion.name);
                            completions.push(completion);
                        }
                    });
                }
                return getCompletions(cmd._parent, completions, names);
            }
            return completions;
        };
        return getCompletions(this._parent);
    }
    getCompletion(name) {
        return this.getBaseCompletion(name) ?? this.getGlobalCompletion(name);
    }
    getBaseCompletion(name) {
        return this.completions.get(name);
    }
    getGlobalCompletion(name) {
        if (!this._parent) {
            return;
        }
        const completion = this._parent.getBaseCompletion(name);
        if (!completion?.global) {
            return this._parent.getGlobalCompletion(name);
        }
        return completion;
    }
    hasEnvVars(hidden) {
        return this.getEnvVars(hidden).length > 0;
    }
    getEnvVars(hidden) {
        return this.getGlobalEnvVars(hidden).concat(this.getBaseEnvVars(hidden));
    }
    getBaseEnvVars(hidden) {
        if (!this.envVars.length) {
            return [];
        }
        return hidden ? this.envVars.slice(0) : this.envVars.filter((env)=>!env.hidden);
    }
    getGlobalEnvVars(hidden) {
        const getEnvVars = (cmd, envVars = [], names = [])=>{
            if (cmd) {
                if (cmd.envVars.length) {
                    cmd.envVars.forEach((envVar)=>{
                        if (envVar.global && !this.envVars.find((env)=>env.names[0] === envVar.names[0]) && names.indexOf(envVar.names[0]) === -1 && (hidden || !envVar.hidden)) {
                            names.push(envVar.names[0]);
                            envVars.push(envVar);
                        }
                    });
                }
                return getEnvVars(cmd._parent, envVars, names);
            }
            return envVars;
        };
        return getEnvVars(this._parent);
    }
    hasEnvVar(name, hidden) {
        return !!this.getEnvVar(name, hidden);
    }
    getEnvVar(name, hidden) {
        return this.getBaseEnvVar(name, hidden) ?? this.getGlobalEnvVar(name, hidden);
    }
    getBaseEnvVar(name, hidden) {
        const envVar = this.envVars.find((env)=>env.names.indexOf(name) !== -1);
        return envVar && (hidden || !envVar.hidden) ? envVar : undefined;
    }
    getGlobalEnvVar(name, hidden) {
        if (!this._parent) {
            return;
        }
        const envVar = this._parent.getBaseEnvVar(name, hidden);
        if (!envVar?.global) {
            return this._parent.getGlobalEnvVar(name, hidden);
        }
        return envVar;
    }
    hasExamples() {
        return this.examples.length > 0;
    }
    getExamples() {
        return this.examples;
    }
    hasExample(name) {
        return !!this.getExample(name);
    }
    getExample(name) {
        return this.examples.find((example)=>example.name === name);
    }
}
function isUpgradeCommand(command) {
    return command instanceof Command && "getLatestVersion" in command;
}
class BashCompletionsGenerator {
    static generate(cmd) {
        return new BashCompletionsGenerator(cmd).generate();
    }
    constructor(cmd){
        this.cmd = cmd;
    }
    generate() {
        const path = this.cmd.getPath();
        const version = this.cmd.getVersion() ? ` v${this.cmd.getVersion()}` : "";
        return `#!/usr/bin/env bash
# bash completion support for ${path}${version}

_${replaceSpecialChars(path)}() {
  local word cur prev listFiles
  local -a opts
  COMPREPLY=()
  cur="\${COMP_WORDS[COMP_CWORD]}"
  prev="\${COMP_WORDS[COMP_CWORD-1]}"
  cmd="_"
  opts=()
  listFiles=0

  _${replaceSpecialChars(this.cmd.getName())}_complete() {
    local action="$1"; shift
    mapfile -t values < <( ${this.cmd.getName()} completions complete "\${action}" "\${@}" )
    for i in "\${values[@]}"; do
      opts+=("$i")
    done
  }

  _${replaceSpecialChars(this.cmd.getName())}_expand() {
    [ "$cur" != "\${cur%\\\\}" ] && cur="$cur\\\\"
  
    # expand ~username type directory specifications
    if [[ "$cur" == \\~*/* ]]; then
      eval cur=$cur
      
    elif [[ "$cur" == \\~* ]]; then
      cur=\${cur#\\~}
      COMPREPLY=( $( compgen -P '~' -u $cur ) )
      return \${#COMPREPLY[@]}
    fi
  }

  _${replaceSpecialChars(this.cmd.getName())}_file_dir() {
    listFiles=1
    local IFS=$'\\t\\n' xspec #glob
    _${replaceSpecialChars(this.cmd.getName())}_expand || return 0
  
    if [ "\${1:-}" = -d ]; then
      COMPREPLY=( \${COMPREPLY[@]:-} $( compgen -d -- $cur ) )
      #eval "$glob"    # restore glob setting.
      return 0
    fi
  
    xspec=\${1:+"!*.$1"}	# set only if glob passed in as $1
    COMPREPLY=( \${COMPREPLY[@]:-} $( compgen -f -X "$xspec" -- "$cur" ) \
          $( compgen -d -- "$cur" ) )
  }

  ${this.generateCompletions(this.cmd).trim()}

  for word in "\${COMP_WORDS[@]}"; do
    case "\${word}" in
      -*) ;;
      *)
        cmd_tmp="\${cmd}_\${word//[^[:alnum:]]/_}"
        if type "\${cmd_tmp}" &>/dev/null; then
          cmd="\${cmd_tmp}"
        fi
    esac
  done

  \${cmd}

  if [[ listFiles -eq 1 ]]; then
    return 0
  fi

  if [[ \${#opts[@]} -eq 0 ]]; then
    # shellcheck disable=SC2207
    COMPREPLY=($(compgen -f "\${cur}"))
    return 0
  fi

  local values
  values="$( printf "\\n%s" "\${opts[@]}" )"
  local IFS=$'\\n'
  # shellcheck disable=SC2207
  local result=($(compgen -W "\${values[@]}" -- "\${cur}"))
  if [[ \${#result[@]} -eq 0 ]]; then
    # shellcheck disable=SC2207
    COMPREPLY=($(compgen -f "\${cur}"))
  else
    # shellcheck disable=SC2207
    COMPREPLY=($(printf '%q\\n' "\${result[@]}"))
  fi

  return 0
}

complete -F _${replaceSpecialChars(path)} -o bashdefault -o default ${path}`;
    }
    generateCompletions(command, path = "", index = 1) {
        path = (path ? path + " " : "") + command.getName();
        const commandCompletions = this.generateCommandCompletions(command, path, index);
        const childCommandCompletions = command.getCommands(false).filter((subCommand)=>subCommand !== command).map((subCommand)=>this.generateCompletions(subCommand, path, index + 1)).join("");
        return `${commandCompletions}

${childCommandCompletions}`;
    }
    generateCommandCompletions(command, path, index) {
        const flags = this.getFlags(command);
        const childCommandNames = command.getCommands(false).map((childCommand)=>childCommand.getName());
        const completionsPath = ~path.indexOf(" ") ? " " + path.split(" ").slice(1).join(" ") : "";
        const optionArguments = this.generateOptionArguments(command, completionsPath);
        const completionsCmd = this.generateCommandCompletionsCommand(command, completionsPath);
        return `  __${replaceSpecialChars(path)}() {
    opts=(${[
            ...flags,
            ...childCommandNames
        ].join(" ")})
    ${completionsCmd}
    if [[ \${cur} == -* || \${COMP_CWORD} -eq ${index} ]] ; then
      return 0
    fi
    ${optionArguments}
  }`;
    }
    getFlags(command) {
        return command.getOptions(false).map((option)=>option.flags).flat();
    }
    generateOptionArguments(command, completionsPath) {
        let opts = "";
        const options = command.getOptions(false);
        if (options.length) {
            opts += 'case "${prev}" in';
            for (const option of options){
                const flags = option.flags.map((flag)=>flag.trim()).join("|");
                const completionsCmd = this.generateOptionCompletionsCommand(command, option.args, completionsPath, {
                    standalone: option.standalone
                });
                opts += `\n      ${flags}) ${completionsCmd} ;;`;
            }
            opts += "\n    esac";
        }
        return opts;
    }
    generateCommandCompletionsCommand(command, path) {
        const args = command.getArguments();
        if (args.length) {
            const type = command.getType(args[0].type);
            if (type && type.handler instanceof FileType) {
                return `_${replaceSpecialChars(this.cmd.getName())}_file_dir`;
            }
            return `_${replaceSpecialChars(this.cmd.getName())}_complete ${args[0].action}${path}`;
        }
        return "";
    }
    generateOptionCompletionsCommand(command, args, path, opts) {
        if (args.length) {
            const type = command.getType(args[0].type);
            if (type && type.handler instanceof FileType) {
                return `opts=(); _${replaceSpecialChars(this.cmd.getName())}_file_dir`;
            }
            return `opts=(); _${replaceSpecialChars(this.cmd.getName())}_complete ${args[0].action}${path}`;
        }
        if (opts?.standalone) {
            return "opts=()";
        }
        return "";
    }
    cmd;
}
function replaceSpecialChars(str) {
    return str.replace(/[^a-zA-Z0-9]/g, "_");
}
class BashCompletionsCommand extends Command {
    #cmd;
    constructor(cmd){
        super();
        this.#cmd = cmd;
        return this.description(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            return `Generate shell completions for bash.

To enable bash completions for this program add following line to your ${dim(italic("~/.bashrc"))}:

    ${dim(italic(`source <(${baseCmd.getPath()} completions bash)`))}`;
        }).action(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            console.log(BashCompletionsGenerator.generate(baseCmd));
        });
    }
}
class CompleteCommand extends Command {
    constructor(cmd){
        super();
        return this.description("Get completions for given action from given command.").arguments("<action:string> [command...:string]").action(async (_, action, commandNames)=>{
            let parent;
            const completeCommand = commandNames?.reduce((cmd, name)=>{
                parent = cmd;
                const childCmd = cmd.getCommand(name, false);
                if (!childCmd) {
                    throw new UnknownCompletionCommand(name, cmd.getCommands());
                }
                return childCmd;
            }, cmd || this.getMainCommand()) ?? (cmd || this.getMainCommand());
            const completion = completeCommand.getCompletion(action);
            const result1 = await completion?.complete(completeCommand, parent) ?? [];
            if (result1?.length) {
                Deno.stdout.writeSync(new TextEncoder().encode(result1.join("\n")));
            }
        }).reset();
    }
}
class FishCompletionsGenerator {
    static generate(cmd) {
        return new FishCompletionsGenerator(cmd).generate();
    }
    constructor(cmd){
        this.cmd = cmd;
    }
    generate() {
        const path = this.cmd.getPath();
        const version = this.cmd.getVersion() ? ` v${this.cmd.getVersion()}` : "";
        return `#!/usr/bin/env fish
# fish completion support for ${path}${version}

function __fish_${replaceSpecialChars1(this.cmd.getName())}_using_command
  set cmds ${getCommandFnNames(this.cmd).join(" ")}
  set words (commandline -opc)
  set cmd "_"
  for word in $words
    switch $word
      case '-*'
        continue
      case '*'
        set word (string replace -r -a '\\W' '_' $word)
        set cmd_tmp $cmd"_$word"
        if contains $cmd_tmp $cmds
          set cmd $cmd_tmp
        end
    end
  end
  if [ "$cmd" = "$argv[1]" ]
    return 0
  end
  return 1
end

${this.generateCompletions(this.cmd).trim()}`;
    }
    generateCompletions(command) {
        const parent = command.getParent();
        let result1 = ``;
        if (parent) {
            result1 += "\n" + this.complete(parent, {
                description: command.getShortDescription(),
                arguments: command.getName()
            });
        }
        const commandArgs = command.getArguments();
        if (commandArgs.length) {
            result1 += "\n" + this.complete(command, {
                arguments: commandArgs.length ? this.getCompletionCommand(command, commandArgs[0]) : undefined
            });
        }
        for (const option of command.getOptions(false)){
            result1 += "\n" + this.completeOption(command, option);
        }
        for (const subCommand of command.getCommands(false)){
            result1 += this.generateCompletions(subCommand);
        }
        return result1;
    }
    completeOption(command, option) {
        const shortOption = option.flags.find((flag)=>flag.length === 2)?.replace(/^(-)+/, "");
        const longOption = option.flags.find((flag)=>flag.length > 2)?.replace(/^(-)+/, "");
        return this.complete(command, {
            description: getDescription(option.description),
            shortOption: shortOption,
            longOption: longOption,
            required: true,
            standalone: option.standalone,
            arguments: option.args.length ? this.getCompletionCommand(command, option.args[0]) : undefined
        });
    }
    complete(command, options) {
        const cmd = [
            "complete"
        ];
        cmd.push("-c", this.cmd.getName());
        cmd.push("-n", `'__fish_${replaceSpecialChars1(this.cmd.getName())}_using_command __${replaceSpecialChars1(command.getPath())}'`);
        options.shortOption && cmd.push("-s", options.shortOption);
        options.longOption && cmd.push("-l", options.longOption);
        options.standalone && cmd.push("-x");
        cmd.push("-k");
        cmd.push("-f");
        if (options.arguments) {
            options.required && cmd.push("-r");
            cmd.push("-a", options.arguments);
        }
        options.description && cmd.push("-d", `'${getDescription(options.description, true)}'`);
        return cmd.join(" ");
    }
    getCompletionCommand(cmd, arg) {
        const type = cmd.getType(arg.type);
        if (type && type.handler instanceof FileType) {
            return `'(__fish_complete_path)'`;
        }
        return `'(${this.cmd.getName()} completions complete ${arg.action + " " + getCompletionsPath(cmd)})'`;
    }
    cmd;
}
function getCommandFnNames(cmd, cmds = []) {
    cmds.push(`__${replaceSpecialChars1(cmd.getPath())}`);
    cmd.getCommands(false).forEach((command)=>{
        getCommandFnNames(command, cmds);
    });
    return cmds;
}
function getCompletionsPath(command) {
    return command.getPath().split(" ").slice(1).join(" ");
}
function replaceSpecialChars1(str) {
    return str.replace(/[^a-zA-Z0-9]/g, "_");
}
class FishCompletionsCommand extends Command {
    #cmd;
    constructor(cmd){
        super();
        this.#cmd = cmd;
        return this.description(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            return `Generate shell completions for fish.

To enable fish completions for this program add following line to your ${dim(italic("~/.config/fish/config.fish"))}:

    ${dim(italic(`source (${baseCmd.getPath()} completions fish | psub)`))}`;
        }).action(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            console.log(FishCompletionsGenerator.generate(baseCmd));
        });
    }
}
class ZshCompletionsGenerator {
    actions;
    static generate(cmd) {
        return new ZshCompletionsGenerator(cmd).generate();
    }
    constructor(cmd){
        this.cmd = cmd;
        this.actions = new Map();
    }
    generate() {
        const path = this.cmd.getPath();
        const name = this.cmd.getName();
        const version = this.cmd.getVersion() ? ` v${this.cmd.getVersion()}` : "";
        return `#!/usr/bin/env zsh
# zsh completion support for ${path}${version}

autoload -U is-at-least

# shellcheck disable=SC2154
(( $+functions[__${replaceSpecialChars2(name)}_complete] )) ||
function __${replaceSpecialChars2(name)}_complete {
  local name="$1"; shift
  local action="$1"; shift
  integer ret=1
  local -a values
  local expl lines
  _tags "$name"
  while _tags; do
    if _requested "$name"; then
      # shellcheck disable=SC2034
      lines="$(${name} completions complete "\${action}" "\${@}")"
      values=("\${(ps:\\n:)lines}")
      if (( \${#values[@]} )); then
        while _next_label "$name" expl "$action"; do
          compadd -S '' "\${expl[@]}" "\${values[@]}"
        done
      fi
    fi
  done
}

${this.generateCompletions(this.cmd).trim()}

# _${replaceSpecialChars2(path)} "\${@}"

compdef _${replaceSpecialChars2(path)} ${path}`;
    }
    generateCompletions(command, path = "") {
        if (!command.hasCommands(false) && !command.hasOptions(false) && !command.hasArguments()) {
            return "";
        }
        path = (path ? path + " " : "") + command.getName();
        return `# shellcheck disable=SC2154
(( $+functions[_${replaceSpecialChars2(path)}] )) ||
function _${replaceSpecialChars2(path)}() {` + (!command.getParent() ? `
  local state` : "") + this.generateCommandCompletions(command, path) + this.generateSubCommandCompletions(command, path) + this.generateArgumentCompletions(command, path) + this.generateActions(command) + `\n}\n\n` + command.getCommands(false).filter((subCommand)=>subCommand !== command).map((subCommand)=>this.generateCompletions(subCommand, path)).join("");
    }
    generateCommandCompletions(command, path) {
        const commands = command.getCommands(false);
        let completions = commands.map((subCommand)=>`'${subCommand.getName()}:${subCommand.getShortDescription()}'`).join("\n      ");
        if (completions) {
            completions = `
    local -a commands
    # shellcheck disable=SC2034
    commands=(
      ${completions}
    )
    _describe 'command' commands`;
        }
        if (command.hasArguments()) {
            const completionsPath = path.split(" ").slice(1).join(" ");
            const arg = command.getArguments()[0];
            const action = this.addAction(arg, completionsPath);
            if (action && command.getCompletion(arg.action)) {
                completions += `\n    __${replaceSpecialChars2(this.cmd.getName())}_complete ${action.arg.name} ${action.arg.action} ${action.cmd}`;
            }
        }
        if (completions) {
            completions = `\n\n  function _commands() {${completions}\n  }`;
        }
        return completions;
    }
    generateSubCommandCompletions(command, path) {
        if (command.hasCommands(false)) {
            const actions = command.getCommands(false).map((command)=>`${command.getName()}) _${replaceSpecialChars2(path + " " + command.getName())} ;;`).join("\n      ");
            return `\n
  function _command_args() {
    case "\${words[1]}" in\n      ${actions}\n    esac
  }`;
        }
        return "";
    }
    generateArgumentCompletions(command, path) {
        this.actions.clear();
        const options = this.generateOptions(command, path);
        let argIndex = 0;
        let argsCommand = "\n\n  _arguments -w -s -S -C";
        if (command.hasOptions()) {
            argsCommand += ` \\\n    ${options.join(" \\\n    ")}`;
        }
        if (command.hasCommands(false) || command.getArguments().filter((arg)=>command.getCompletion(arg.action)).length) {
            argsCommand += ` \\\n    '${++argIndex}:command:_commands'`;
        }
        if (command.hasArguments() || command.hasCommands(false)) {
            const args = [];
            for (const arg of command.getArguments().slice(1)){
                const type = command.getType(arg.type);
                if (type && type.handler instanceof FileType) {
                    const fileCompletions = this.getFileCompletions(type);
                    if (arg.variadic) {
                        argIndex++;
                        for(let i1 = 0; i1 < 5; i1++){
                            args.push(`${argIndex + i1}${arg.optionalValue ? "::" : ":"}${arg.name}:${fileCompletions}`);
                        }
                    } else {
                        args.push(`${++argIndex}${arg.optionalValue ? "::" : ":"}${arg.name}:${fileCompletions}`);
                    }
                } else {
                    const completionsPath = path.split(" ").slice(1).join(" ");
                    const action = this.addAction(arg, completionsPath);
                    args.push(`${++argIndex}${arg.optionalValue ? "::" : ":"}${arg.name}:->${action.name}`);
                }
            }
            argsCommand += args.map((arg)=>`\\\n    '${arg}'`).join("");
            if (command.hasCommands(false)) {
                argsCommand += ` \\\n    '*::sub command:->command_args'`;
            }
        }
        return argsCommand;
    }
    generateOptions(command, path) {
        const options = [];
        const cmdArgs = path.split(" ");
        cmdArgs.shift();
        const completionsPath = cmdArgs.join(" ");
        const excludedFlags = command.getOptions(false).map((option)=>option.standalone ? option.flags : false).flat().filter((flag)=>typeof flag === "string");
        for (const option of command.getOptions(false)){
            options.push(this.generateOption(command, option, completionsPath, excludedFlags));
        }
        return options;
    }
    generateOption(command, option, completionsPath, excludedOptions) {
        let excludedFlags = option.conflicts?.length ? [
            ...excludedOptions,
            ...option.conflicts.map((opt)=>"--" + opt.replace(/^--/, "")), 
        ] : excludedOptions;
        excludedFlags = option.collect ? excludedFlags : [
            ...excludedFlags,
            ...option.flags, 
        ];
        let args = "";
        for (const arg of option.args){
            const type = command.getType(arg.type);
            if (type && type.handler instanceof FileType) {
                const fileCompletions = this.getFileCompletions(type);
                args += `${arg.optionalValue ? "::" : ":"}${arg.name}:${fileCompletions}`;
            } else {
                const action = this.addAction(arg, completionsPath);
                args += `${arg.optionalValue ? "::" : ":"}${arg.name}:->${action.name}`;
            }
        }
        const description = getDescription(option.description, true).replace(/\[/g, "\\[").replace(/]/g, "\\]").replace(/"/g, '\\"').replace(/'/g, "'\"'\"'");
        const collect = option.collect ? "*" : "";
        const equalsSign = option.equalsSign ? "=" : "";
        const flags = option.flags.map((flag)=>`${flag}${equalsSign}`).join(",");
        if (option.standalone) {
            return `'(- *)'{${collect}${flags}}'[${description}]${args}'`;
        } else {
            const excluded = excludedFlags.length ? `'(${excludedFlags.join(" ")})'` : "";
            if (collect || flags.length > 1) {
                return `${excluded}{${collect}${flags}}'[${description}]${args}'`;
            } else {
                return `${excluded}${flags}'[${description}]${args}'`;
            }
        }
    }
    getFileCompletions(type) {
        if (!(type.handler instanceof FileType)) {
            return "";
        }
        return "_files";
    }
    addAction(arg, cmd) {
        const action = `${arg.name}-${arg.action}`;
        if (!this.actions.has(action)) {
            this.actions.set(action, {
                arg: arg,
                label: `${arg.name}: ${arg.action}`,
                name: action,
                cmd
            });
        }
        return this.actions.get(action);
    }
    generateActions(command) {
        let actions = [];
        if (this.actions.size) {
            actions = Array.from(this.actions).map(([name, action])=>`${name}) __${replaceSpecialChars2(this.cmd.getName())}_complete ${action.arg.name} ${action.arg.action} ${action.cmd} ;;`);
        }
        if (command.hasCommands(false)) {
            actions.unshift(`command_args) _command_args ;;`);
        }
        if (actions.length) {
            return `\n\n  case "$state" in\n    ${actions.join("\n    ")}\n  esac`;
        }
        return "";
    }
    cmd;
}
function replaceSpecialChars2(str) {
    return str.replace(/[^a-zA-Z0-9]/g, "_");
}
class ZshCompletionsCommand extends Command {
    #cmd;
    constructor(cmd){
        super();
        this.#cmd = cmd;
        return this.description(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            return `Generate shell completions for zsh.

To enable zsh completions for this program add following line to your ${dim(italic("~/.zshrc"))}:

    ${dim(italic(`source <(${baseCmd.getPath()} completions zsh)`))}`;
        }).action(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            console.log(ZshCompletionsGenerator.generate(baseCmd));
        });
    }
}
class CompletionsCommand extends Command {
    #cmd;
    constructor(cmd){
        super();
        this.#cmd = cmd;
        return this.description(()=>{
            const baseCmd = this.#cmd || this.getMainCommand();
            return `Generate shell completions.

To enable shell completions for this program add the following line to your ${dim(italic("~/.bashrc"))} or similar:

    ${dim(italic(`source <(${baseCmd.getPath()} completions [shell])`))}

    For more information run ${dim(italic(`${baseCmd.getPath()} completions [shell] --help`))}
`;
        }).action(()=>this.showHelp()).command("bash", new BashCompletionsCommand(this.#cmd)).command("fish", new FishCompletionsCommand(this.#cmd)).command("zsh", new ZshCompletionsCommand(this.#cmd)).command("complete", new CompleteCommand(this.#cmd).hidden()).reset();
    }
}
class CommandType extends StringType {
    complete(_cmd, parent) {
        return parent?.getCommands(false).map((cmd)=>cmd.getName()) || [];
    }
}
class HelpCommand extends Command {
    constructor(cmd){
        super();
        return this.type("command", new CommandType()).arguments("[command:command]").description("Show this help or the help of a sub-command.").action(async (_, name)=>{
            if (!cmd) {
                cmd = name ? this.getGlobalParent()?.getBaseCommand(name) : this.getGlobalParent();
            }
            if (!cmd) {
                const cmds = this.getGlobalParent()?.getCommands();
                throw new UnknownCommand(name ?? "", cmds ?? [], [
                    this.getName(),
                    ...this.getAliases(), 
                ]);
            }
            await cmd.checkVersion();
            cmd.showHelp();
            Deno.exit(0);
        });
    }
}
function isSubdir(src, dest, sep = sep2) {
    if (src === dest) {
        return false;
    }
    const srcArray = src.split(sep);
    const destArray = dest.split(sep);
    return srcArray.every((current, i1)=>destArray[i1] === current);
}
function getFileInfoType(fileInfo) {
    return fileInfo.isFile ? "file" : fileInfo.isDirectory ? "dir" : fileInfo.isSymlink ? "symlink" : undefined;
}
function createWalkEntrySync(path) {
    path = normalize3(path);
    const name = basename2(path);
    const info = Deno.statSync(path);
    return {
        path,
        name,
        isFile: info.isFile,
        isDirectory: info.isDirectory,
        isSymlink: info.isSymlink
    };
}
function include(path, exts, match, skip) {
    if (exts && !exts.some((ext)=>path.endsWith(ext))) {
        return false;
    }
    if (match && !match.some((pattern)=>!!path.match(pattern))) {
        return false;
    }
    if (skip && skip.some((pattern)=>!!path.match(pattern))) {
        return false;
    }
    return true;
}
function wrapErrorWithRootPath(err, root) {
    if (err instanceof Error && "root" in err) return err;
    const e = new Error();
    e.root = root;
    e.message = err instanceof Error ? `${err.message} for path "${root}"` : `[non-error thrown] for path "${root}"`;
    e.stack = err instanceof Error ? err.stack : undefined;
    e.cause = err instanceof Error ? err.cause : undefined;
    return e;
}
function* walkSync(root, { maxDepth =Infinity , includeFiles =true , includeDirs =true , followSymlinks =false , exts =undefined , match =undefined , skip =undefined  } = {}) {
    if (maxDepth < 0) {
        return;
    }
    if (includeDirs && include(root, exts, match, skip)) {
        yield createWalkEntrySync(root);
    }
    if (maxDepth < 1 || !include(root, undefined, undefined, skip)) {
        return;
    }
    let entries;
    try {
        entries = Deno.readDirSync(root);
    } catch (err) {
        throw wrapErrorWithRootPath(err, normalize3(root));
    }
    for (const entry of entries){
        assert(entry.name != null);
        let path = join3(root, entry.name);
        let { isSymlink , isDirectory  } = entry;
        if (isSymlink) {
            if (!followSymlinks) continue;
            path = Deno.realPathSync(path);
            ({ isSymlink , isDirectory  } = Deno.lstatSync(path));
        }
        if (isSymlink || isDirectory) {
            yield* walkSync(path, {
                maxDepth: maxDepth - 1,
                includeFiles,
                includeDirs,
                followSymlinks,
                exts,
                match,
                skip
            });
        } else if (includeFiles && include(path, exts, match, skip)) {
            yield {
                path,
                ...entry
            };
        }
    }
}
function split(path) {
    const s = SEP_PATTERN.source;
    const segments = path.replace(new RegExp(`^${s}|${s}$`, "g"), "").split(SEP_PATTERN);
    const isAbsolute_ = isAbsolute2(path);
    return {
        segments,
        isAbsolute: isAbsolute_,
        hasTrailingSep: !!path.match(new RegExp(`${s}$`)),
        winRoot: isWindows1 && isAbsolute_ ? segments.shift() : undefined
    };
}
function throwUnlessNotFound(error) {
    if (!(error instanceof Deno.errors.NotFound)) {
        throw error;
    }
}
function comparePath(a, b) {
    if (a.path < b.path) return -1;
    if (a.path > b.path) return 1;
    return 0;
}
function* expandGlobSync(glob, { root =Deno.cwd() , exclude =[] , includeDirs =true , extended =true , globstar =false , caseInsensitive  } = {}) {
    const globOptions = {
        extended,
        globstar,
        caseInsensitive
    };
    const absRoot = resolve2(root);
    const resolveFromRoot = (path)=>resolve2(absRoot, path);
    const excludePatterns = exclude.map(resolveFromRoot).map((s)=>globToRegExp(s, globOptions));
    const shouldInclude = (path)=>!excludePatterns.some((p)=>!!path.match(p));
    const { segments , isAbsolute: isGlobAbsolute , hasTrailingSep , winRoot  } = split(glob);
    let fixedRoot = isGlobAbsolute ? winRoot != undefined ? winRoot : "/" : absRoot;
    while(segments.length > 0 && !isGlob(segments[0])){
        const seg = segments.shift();
        assert(seg != null);
        fixedRoot = joinGlobs([
            fixedRoot,
            seg
        ], globOptions);
    }
    let fixedRootInfo;
    try {
        fixedRootInfo = createWalkEntrySync(fixedRoot);
    } catch (error) {
        return throwUnlessNotFound(error);
    }
    function* advanceMatch(walkInfo, globSegment) {
        if (!walkInfo.isDirectory) {
            return;
        } else if (globSegment == "..") {
            const parentPath = joinGlobs([
                walkInfo.path,
                ".."
            ], globOptions);
            try {
                if (shouldInclude(parentPath)) {
                    return yield createWalkEntrySync(parentPath);
                }
            } catch (error) {
                throwUnlessNotFound(error);
            }
            return;
        } else if (globSegment == "**") {
            return yield* walkSync(walkInfo.path, {
                skip: excludePatterns
            });
        }
        const globPattern = globToRegExp(globSegment, globOptions);
        for (const walkEntry of walkSync(walkInfo.path, {
            maxDepth: 1,
            skip: excludePatterns
        })){
            if (walkEntry.path != walkInfo.path && walkEntry.name.match(globPattern)) {
                yield walkEntry;
            }
        }
    }
    let currentMatches = [
        fixedRootInfo
    ];
    for (const segment of segments){
        const nextMatchMap = new Map();
        for (const currentMatch of currentMatches){
            for (const nextMatch of advanceMatch(currentMatch, segment)){
                nextMatchMap.set(nextMatch.path, nextMatch);
            }
        }
        currentMatches = [
            ...nextMatchMap.values()
        ].sort(comparePath);
    }
    if (hasTrailingSep) {
        currentMatches = currentMatches.filter((entry)=>entry.isDirectory);
    }
    if (!includeDirs) {
        currentMatches = currentMatches.filter((entry)=>!entry.isDirectory);
    }
    yield* currentMatches;
}
var LogLevels;
(function(LogLevels) {
    LogLevels[LogLevels["NOTSET"] = 0] = "NOTSET";
    LogLevels[LogLevels["DEBUG"] = 10] = "DEBUG";
    LogLevels[LogLevels["INFO"] = 20] = "INFO";
    LogLevels[LogLevels["WARNING"] = 30] = "WARNING";
    LogLevels[LogLevels["ERROR"] = 40] = "ERROR";
    LogLevels[LogLevels["CRITICAL"] = 50] = "CRITICAL";
})(LogLevels || (LogLevels = {}));
Object.keys(LogLevels).filter((key)=>isNaN(Number(key)));
const byLevel = {
    [String(LogLevels.NOTSET)]: "NOTSET",
    [String(LogLevels.DEBUG)]: "DEBUG",
    [String(LogLevels.INFO)]: "INFO",
    [String(LogLevels.WARNING)]: "WARNING",
    [String(LogLevels.ERROR)]: "ERROR",
    [String(LogLevels.CRITICAL)]: "CRITICAL"
};
function getLevelByName(name) {
    switch(name){
        case "NOTSET":
            return LogLevels.NOTSET;
        case "DEBUG":
            return LogLevels.DEBUG;
        case "INFO":
            return LogLevels.INFO;
        case "WARNING":
            return LogLevels.WARNING;
        case "ERROR":
            return LogLevels.ERROR;
        case "CRITICAL":
            return LogLevels.CRITICAL;
        default:
            throw new Error(`no log level found for "${name}"`);
    }
}
function getLevelName(level) {
    const levelName = byLevel[level];
    if (levelName) {
        return levelName;
    }
    throw new Error(`no level name found for level: ${level}`);
}
class LogRecord {
    msg;
    #args;
    #datetime;
    level;
    levelName;
    loggerName;
    constructor(options){
        this.msg = options.msg;
        this.#args = [
            ...options.args
        ];
        this.level = options.level;
        this.loggerName = options.loggerName;
        this.#datetime = new Date();
        this.levelName = getLevelName(options.level);
    }
    get args() {
        return [
            ...this.#args
        ];
    }
    get datetime() {
        return new Date(this.#datetime.getTime());
    }
}
class Logger {
    #level;
    #handlers;
    #loggerName;
    constructor(loggerName, levelName, options = {}){
        this.#loggerName = loggerName;
        this.#level = getLevelByName(levelName);
        this.#handlers = options.handlers || [];
    }
    get level() {
        return this.#level;
    }
    set level(level) {
        this.#level = level;
    }
    get levelName() {
        return getLevelName(this.#level);
    }
    set levelName(levelName) {
        this.#level = getLevelByName(levelName);
    }
    get loggerName() {
        return this.#loggerName;
    }
    set handlers(hndls) {
        this.#handlers = hndls;
    }
    get handlers() {
        return this.#handlers;
    }
    #_log(level, msg, ...args) {
        if (this.level > level) {
            return msg instanceof Function ? undefined : msg;
        }
        let fnResult;
        let logMessage;
        if (msg instanceof Function) {
            fnResult = msg();
            logMessage = this.asString(fnResult);
        } else {
            logMessage = this.asString(msg);
        }
        const record = new LogRecord({
            msg: logMessage,
            args: args,
            level: level,
            loggerName: this.loggerName
        });
        this.#handlers.forEach((handler)=>{
            handler.handle(record);
        });
        return msg instanceof Function ? fnResult : msg;
    }
    asString(data) {
        if (typeof data === "string") {
            return data;
        } else if (data === null || typeof data === "number" || typeof data === "bigint" || typeof data === "boolean" || typeof data === "undefined" || typeof data === "symbol") {
            return String(data);
        } else if (data instanceof Error) {
            return data.stack;
        } else if (typeof data === "object") {
            return JSON.stringify(data);
        }
        return "undefined";
    }
    debug(msg, ...args) {
        return this.#_log(LogLevels.DEBUG, msg, ...args);
    }
    info(msg, ...args) {
        return this.#_log(LogLevels.INFO, msg, ...args);
    }
    warning(msg, ...args) {
        return this.#_log(LogLevels.WARNING, msg, ...args);
    }
    error(msg, ...args) {
        return this.#_log(LogLevels.ERROR, msg, ...args);
    }
    critical(msg, ...args) {
        return this.#_log(LogLevels.CRITICAL, msg, ...args);
    }
}
const { Deno: Deno2  } = globalThis;
const noColor1 = typeof Deno2?.noColor === "boolean" ? Deno2.noColor : true;
let enabled1 = !noColor1;
function code1(open, close) {
    return {
        open: `\x1b[${open.join(";")}m`,
        close: `\x1b[${close}m`,
        regexp: new RegExp(`\\x1b\\[${close}m`, "g")
    };
}
function run1(str, code) {
    return enabled1 ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}` : str;
}
function bold1(str) {
    return run1(str, code1([
        1
    ], 22));
}
function dim1(str) {
    return run1(str, code1([
        2
    ], 22));
}
function underline1(str) {
    return run1(str, code1([
        4
    ], 24));
}
function red1(str) {
    return run1(str, code1([
        31
    ], 39));
}
function green1(str) {
    return run1(str, code1([
        32
    ], 39));
}
function yellow1(str) {
    return run1(str, code1([
        33
    ], 39));
}
function blue1(str) {
    return run1(str, code1([
        34
    ], 39));
}
function brightRed1(str) {
    return run1(str, code1([
        91
    ], 39));
}
const ANSI_PATTERN1 = new RegExp([
    "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
    "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))", 
].join("|"), "g");
function stripColor1(string) {
    return string.replace(ANSI_PATTERN1, "");
}
async function exists(filePath) {
    try {
        await Deno.lstat(filePath);
        return true;
    } catch (err) {
        if (err instanceof Deno.errors.NotFound) {
            return false;
        }
        throw err;
    }
}
function existsSync(filePath) {
    try {
        Deno.lstatSync(filePath);
        return true;
    } catch (err) {
        if (err instanceof Deno.errors.NotFound) {
            return false;
        }
        throw err;
    }
}
class BytesList {
    #len = 0;
    #chunks = [];
    constructor(){}
    size() {
        return this.#len;
    }
    add(value, start = 0, end = value.byteLength) {
        if (value.byteLength === 0 || end - start === 0) {
            return;
        }
        checkRange(start, end, value.byteLength);
        this.#chunks.push({
            value,
            end,
            start,
            offset: this.#len
        });
        this.#len += end - start;
    }
    shift(n) {
        if (n === 0) {
            return;
        }
        if (this.#len <= n) {
            this.#chunks = [];
            this.#len = 0;
            return;
        }
        const idx = this.getChunkIndex(n);
        this.#chunks.splice(0, idx);
        const [chunk] = this.#chunks;
        if (chunk) {
            const diff = n - chunk.offset;
            chunk.start += diff;
        }
        let offset = 0;
        for (const chunk1 of this.#chunks){
            chunk1.offset = offset;
            offset += chunk1.end - chunk1.start;
        }
        this.#len = offset;
    }
    getChunkIndex(pos) {
        let max = this.#chunks.length;
        let min = 0;
        while(true){
            const i1 = min + Math.floor((max - min) / 2);
            if (i1 < 0 || this.#chunks.length <= i1) {
                return -1;
            }
            const { offset , start , end  } = this.#chunks[i1];
            const len = end - start;
            if (offset <= pos && pos < offset + len) {
                return i1;
            } else if (offset + len <= pos) {
                min = i1 + 1;
            } else {
                max = i1 - 1;
            }
        }
    }
    get(i1) {
        if (i1 < 0 || this.#len <= i1) {
            throw new Error("out of range");
        }
        const idx = this.getChunkIndex(i1);
        const { value , offset , start  } = this.#chunks[idx];
        return value[start + i1 - offset];
    }
    *iterator(start = 0) {
        const startIdx = this.getChunkIndex(start);
        if (startIdx < 0) return;
        const first = this.#chunks[startIdx];
        let firstOffset = start - first.offset;
        for(let i1 = startIdx; i1 < this.#chunks.length; i1++){
            const chunk = this.#chunks[i1];
            for(let j = chunk.start + firstOffset; j < chunk.end; j++){
                yield chunk.value[j];
            }
            firstOffset = 0;
        }
    }
    slice(start, end = this.#len) {
        if (end === start) {
            return new Uint8Array();
        }
        checkRange(start, end, this.#len);
        const result1 = new Uint8Array(end - start);
        const startIdx = this.getChunkIndex(start);
        const endIdx = this.getChunkIndex(end - 1);
        let written = 0;
        for(let i1 = startIdx; i1 < endIdx; i1++){
            const chunk = this.#chunks[i1];
            const len = chunk.end - chunk.start;
            result1.set(chunk.value.subarray(chunk.start, chunk.end), written);
            written += len;
        }
        const last = this.#chunks[endIdx];
        const rest = end - start - written;
        result1.set(last.value.subarray(last.start, last.start + rest), written);
        return result1;
    }
    concat() {
        const result1 = new Uint8Array(this.#len);
        let sum = 0;
        for (const { value , start , end  } of this.#chunks){
            result1.set(value.subarray(start, end), sum);
            sum += end - start;
        }
        return result1;
    }
}
function checkRange(start, end, len) {
    if (start < 0 || len < start || end < 0 || len < end || end < start) {
        throw new Error("invalid range");
    }
}
function indexOfNeedle(source, needle, start = 0) {
    if (start >= source.length) {
        return -1;
    }
    if (start < 0) {
        start = Math.max(0, source.length + start);
    }
    const s = needle[0];
    for(let i1 = start; i1 < source.length; i1++){
        if (source[i1] !== s) continue;
        const pin = i1;
        let matched = 1;
        let j = i1;
        while(matched < needle.length){
            j++;
            if (source[j] !== needle[j - pin]) {
                break;
            }
            matched++;
        }
        if (matched === needle.length) {
            return pin;
        }
    }
    return -1;
}
function concat(...buf) {
    let length = 0;
    for (const b of buf){
        length += b.length;
    }
    const output = new Uint8Array(length);
    let index = 0;
    for (const b1 of buf){
        output.set(b1, index);
        index += b1.length;
    }
    return output;
}
function copy(src, dst, off = 0) {
    off = Math.max(0, Math.min(off, dst.byteLength));
    const dstBytesAvailable = dst.byteLength - off;
    if (src.byteLength > dstBytesAvailable) {
        src = src.subarray(0, dstBytesAvailable);
    }
    dst.set(src, off);
    return src.byteLength;
}
const MIN_READ = 32 * 1024;
const MAX_SIZE = 2 ** 32 - 2;
class Buffer1 {
    #buf;
    #off = 0;
    constructor(ab){
        this.#buf = ab === undefined ? new Uint8Array(0) : new Uint8Array(ab);
    }
    bytes(options = {
        copy: true
    }) {
        if (options.copy === false) return this.#buf.subarray(this.#off);
        return this.#buf.slice(this.#off);
    }
    empty() {
        return this.#buf.byteLength <= this.#off;
    }
    get length() {
        return this.#buf.byteLength - this.#off;
    }
    get capacity() {
        return this.#buf.buffer.byteLength;
    }
    truncate(n) {
        if (n === 0) {
            this.reset();
            return;
        }
        if (n < 0 || n > this.length) {
            throw Error("bytes.Buffer: truncation out of range");
        }
        this.#reslice(this.#off + n);
    }
    reset() {
        this.#reslice(0);
        this.#off = 0;
    }
    #tryGrowByReslice(n) {
        const l1 = this.#buf.byteLength;
        if (n <= this.capacity - l1) {
            this.#reslice(l1 + n);
            return l1;
        }
        return -1;
    }
    #reslice(len) {
        assert(len <= this.#buf.buffer.byteLength);
        this.#buf = new Uint8Array(this.#buf.buffer, 0, len);
    }
    readSync(p) {
        if (this.empty()) {
            this.reset();
            if (p.byteLength === 0) {
                return 0;
            }
            return null;
        }
        const nread = copy(this.#buf.subarray(this.#off), p);
        this.#off += nread;
        return nread;
    }
    read(p) {
        const rr = this.readSync(p);
        return Promise.resolve(rr);
    }
    writeSync(p) {
        const m = this.#grow(p.byteLength);
        return copy(p, this.#buf, m);
    }
    write(p) {
        const n = this.writeSync(p);
        return Promise.resolve(n);
    }
    #grow(n1) {
        const m = this.length;
        if (m === 0 && this.#off !== 0) {
            this.reset();
        }
        const i1 = this.#tryGrowByReslice(n1);
        if (i1 >= 0) {
            return i1;
        }
        const c = this.capacity;
        if (n1 <= Math.floor(c / 2) - m) {
            copy(this.#buf.subarray(this.#off), this.#buf);
        } else if (c + n1 > MAX_SIZE) {
            throw new Error("The buffer cannot be grown beyond the maximum size.");
        } else {
            const buf = new Uint8Array(Math.min(2 * c + n1, MAX_SIZE));
            copy(this.#buf.subarray(this.#off), buf);
            this.#buf = buf;
        }
        this.#off = 0;
        this.#reslice(Math.min(m + n1, MAX_SIZE));
        return m;
    }
    grow(n) {
        if (n < 0) {
            throw Error("Buffer.grow: negative count");
        }
        const m = this.#grow(n);
        this.#reslice(m);
    }
    async readFrom(r) {
        let n = 0;
        const tmp = new Uint8Array(MIN_READ);
        while(true){
            const shouldGrow = this.capacity - this.length < MIN_READ;
            const buf = shouldGrow ? tmp : new Uint8Array(this.#buf.buffer, this.length);
            const nread = await r.read(buf);
            if (nread === null) {
                return n;
            }
            if (shouldGrow) this.writeSync(buf.subarray(0, nread));
            else this.#reslice(this.length + nread);
            n += nread;
        }
    }
    readFromSync(r) {
        let n = 0;
        const tmp = new Uint8Array(MIN_READ);
        while(true){
            const shouldGrow = this.capacity - this.length < MIN_READ;
            const buf = shouldGrow ? tmp : new Uint8Array(this.#buf.buffer, this.length);
            const nread = r.readSync(buf);
            if (nread === null) {
                return n;
            }
            if (shouldGrow) this.writeSync(buf.subarray(0, nread));
            else this.#reslice(this.length + nread);
            n += nread;
        }
    }
}
const MIN_BUF_SIZE = 16;
const CR = "\r".charCodeAt(0);
const LF = "\n".charCodeAt(0);
class BufferFullError extends Error {
    name;
    constructor(partial){
        super("Buffer full");
        this.partial = partial;
        this.name = "BufferFullError";
    }
    partial;
}
class PartialReadError extends Error {
    name = "PartialReadError";
    partial;
    constructor(){
        super("Encountered UnexpectedEof, data only partially read");
    }
}
class BufReader {
    #buf;
    #rd;
    #r = 0;
    #w = 0;
    #eof = false;
    static create(r, size = 4096) {
        return r instanceof BufReader ? r : new BufReader(r, size);
    }
    constructor(rd, size = 4096){
        if (size < 16) {
            size = MIN_BUF_SIZE;
        }
        this.#reset(new Uint8Array(size), rd);
    }
    size() {
        return this.#buf.byteLength;
    }
    buffered() {
        return this.#w - this.#r;
    }
    #fill = async ()=>{
        if (this.#r > 0) {
            this.#buf.copyWithin(0, this.#r, this.#w);
            this.#w -= this.#r;
            this.#r = 0;
        }
        if (this.#w >= this.#buf.byteLength) {
            throw Error("bufio: tried to fill full buffer");
        }
        for(let i1 = 100; i1 > 0; i1--){
            const rr = await this.#rd.read(this.#buf.subarray(this.#w));
            if (rr === null) {
                this.#eof = true;
                return;
            }
            assert(rr >= 0, "negative read");
            this.#w += rr;
            if (rr > 0) {
                return;
            }
        }
        throw new Error(`No progress after ${100} read() calls`);
    };
    reset(r) {
        this.#reset(this.#buf, r);
    }
    #reset = (buf, rd)=>{
        this.#buf = buf;
        this.#rd = rd;
        this.#eof = false;
    };
    async read(p) {
        let rr = p.byteLength;
        if (p.byteLength === 0) return rr;
        if (this.#r === this.#w) {
            if (p.byteLength >= this.#buf.byteLength) {
                const rr1 = await this.#rd.read(p);
                const nread = rr1 ?? 0;
                assert(nread >= 0, "negative read");
                return rr1;
            }
            this.#r = 0;
            this.#w = 0;
            rr = await this.#rd.read(this.#buf);
            if (rr === 0 || rr === null) return rr;
            assert(rr >= 0, "negative read");
            this.#w += rr;
        }
        const copied = copy(this.#buf.subarray(this.#r, this.#w), p, 0);
        this.#r += copied;
        return copied;
    }
    async readFull(p) {
        let bytesRead = 0;
        while(bytesRead < p.length){
            try {
                const rr = await this.read(p.subarray(bytesRead));
                if (rr === null) {
                    if (bytesRead === 0) {
                        return null;
                    } else {
                        throw new PartialReadError();
                    }
                }
                bytesRead += rr;
            } catch (err) {
                if (err instanceof PartialReadError) {
                    err.partial = p.subarray(0, bytesRead);
                } else if (err instanceof Error) {
                    const e = new PartialReadError();
                    e.partial = p.subarray(0, bytesRead);
                    e.stack = err.stack;
                    e.message = err.message;
                    e.cause = err.cause;
                    throw err;
                }
                throw err;
            }
        }
        return p;
    }
    async readByte() {
        while(this.#r === this.#w){
            if (this.#eof) return null;
            await this.#fill();
        }
        const c = this.#buf[this.#r];
        this.#r++;
        return c;
    }
    async readString(delim) {
        if (delim.length !== 1) {
            throw new Error("Delimiter should be a single character");
        }
        const buffer = await this.readSlice(delim.charCodeAt(0));
        if (buffer === null) return null;
        return new TextDecoder().decode(buffer);
    }
    async readLine() {
        let line = null;
        try {
            line = await this.readSlice(LF);
        } catch (err) {
            if (err instanceof Deno.errors.BadResource) {
                throw err;
            }
            let partial;
            if (err instanceof PartialReadError) {
                partial = err.partial;
                assert(partial instanceof Uint8Array, "bufio: caught error from `readSlice()` without `partial` property");
            }
            if (!(err instanceof BufferFullError)) {
                throw err;
            }
            partial = err.partial;
            if (!this.#eof && partial && partial.byteLength > 0 && partial[partial.byteLength - 1] === CR) {
                assert(this.#r > 0, "bufio: tried to rewind past start of buffer");
                this.#r--;
                partial = partial.subarray(0, partial.byteLength - 1);
            }
            if (partial) {
                return {
                    line: partial,
                    more: !this.#eof
                };
            }
        }
        if (line === null) {
            return null;
        }
        if (line.byteLength === 0) {
            return {
                line,
                more: false
            };
        }
        if (line[line.byteLength - 1] == LF) {
            let drop = 1;
            if (line.byteLength > 1 && line[line.byteLength - 2] === CR) {
                drop = 2;
            }
            line = line.subarray(0, line.byteLength - drop);
        }
        return {
            line,
            more: false
        };
    }
    async readSlice(delim) {
        let s = 0;
        let slice;
        while(true){
            let i1 = this.#buf.subarray(this.#r + s, this.#w).indexOf(delim);
            if (i1 >= 0) {
                i1 += s;
                slice = this.#buf.subarray(this.#r, this.#r + i1 + 1);
                this.#r += i1 + 1;
                break;
            }
            if (this.#eof) {
                if (this.#r === this.#w) {
                    return null;
                }
                slice = this.#buf.subarray(this.#r, this.#w);
                this.#r = this.#w;
                break;
            }
            if (this.buffered() >= this.#buf.byteLength) {
                this.#r = this.#w;
                const oldbuf = this.#buf;
                const newbuf = this.#buf.slice(0);
                this.#buf = newbuf;
                throw new BufferFullError(oldbuf);
            }
            s = this.#w - this.#r;
            try {
                await this.#fill();
            } catch (err) {
                if (err instanceof PartialReadError) {
                    err.partial = slice;
                } else if (err instanceof Error) {
                    const e = new PartialReadError();
                    e.partial = slice;
                    e.stack = err.stack;
                    e.message = err.message;
                    e.cause = err.cause;
                    throw err;
                }
                throw err;
            }
        }
        return slice;
    }
    async peek(n) {
        if (n < 0) {
            throw Error("negative count");
        }
        let avail = this.#w - this.#r;
        while(avail < n && avail < this.#buf.byteLength && !this.#eof){
            try {
                await this.#fill();
            } catch (err) {
                if (err instanceof PartialReadError) {
                    err.partial = this.#buf.subarray(this.#r, this.#w);
                } else if (err instanceof Error) {
                    const e = new PartialReadError();
                    e.partial = this.#buf.subarray(this.#r, this.#w);
                    e.stack = err.stack;
                    e.message = err.message;
                    e.cause = err.cause;
                    throw err;
                }
                throw err;
            }
            avail = this.#w - this.#r;
        }
        if (avail === 0 && this.#eof) {
            return null;
        } else if (avail < n && this.#eof) {
            return this.#buf.subarray(this.#r, this.#r + avail);
        } else if (avail < n) {
            throw new BufferFullError(this.#buf.subarray(this.#r, this.#w));
        }
        return this.#buf.subarray(this.#r, this.#r + n);
    }
}
class AbstractBufBase {
    buf;
    usedBufferBytes = 0;
    err = null;
    constructor(buf){
        this.buf = buf;
    }
    size() {
        return this.buf.byteLength;
    }
    available() {
        return this.buf.byteLength - this.usedBufferBytes;
    }
    buffered() {
        return this.usedBufferBytes;
    }
}
class BufWriterSync extends AbstractBufBase {
    #writer;
    static create(writer, size = 4096) {
        return writer instanceof BufWriterSync ? writer : new BufWriterSync(writer, size);
    }
    constructor(writer, size = 4096){
        super(new Uint8Array(size <= 0 ? 4096 : size));
        this.#writer = writer;
    }
    reset(w) {
        this.err = null;
        this.usedBufferBytes = 0;
        this.#writer = w;
    }
    flush() {
        if (this.err !== null) throw this.err;
        if (this.usedBufferBytes === 0) return;
        try {
            const p = this.buf.subarray(0, this.usedBufferBytes);
            let nwritten = 0;
            while(nwritten < p.length){
                nwritten += this.#writer.writeSync(p.subarray(nwritten));
            }
        } catch (e) {
            if (e instanceof Error) {
                this.err = e;
            }
            throw e;
        }
        this.buf = new Uint8Array(this.buf.length);
        this.usedBufferBytes = 0;
    }
    writeSync(data) {
        if (this.err !== null) throw this.err;
        if (data.length === 0) return 0;
        let totalBytesWritten = 0;
        let numBytesWritten = 0;
        while(data.byteLength > this.available()){
            if (this.buffered() === 0) {
                try {
                    numBytesWritten = this.#writer.writeSync(data);
                } catch (e) {
                    if (e instanceof Error) {
                        this.err = e;
                    }
                    throw e;
                }
            } else {
                numBytesWritten = copy(data, this.buf, this.usedBufferBytes);
                this.usedBufferBytes += numBytesWritten;
                this.flush();
            }
            totalBytesWritten += numBytesWritten;
            data = data.subarray(numBytesWritten);
        }
        numBytesWritten = copy(data, this.buf, this.usedBufferBytes);
        this.usedBufferBytes += numBytesWritten;
        totalBytesWritten += numBytesWritten;
        return totalBytesWritten;
    }
}
async function* readLines(reader, decoderOpts) {
    const bufReader = new BufReader(reader);
    let chunks = [];
    const decoder = new TextDecoder(decoderOpts?.encoding, decoderOpts);
    while(true){
        const res = await bufReader.readLine();
        if (!res) {
            if (chunks.length > 0) {
                yield decoder.decode(concat(...chunks));
            }
            break;
        }
        chunks.push(res.line);
        if (!res.more) {
            yield decoder.decode(concat(...chunks));
            chunks = [];
        }
    }
}
const DEFAULT_FORMATTER = "{levelName} {msg}";
class BaseHandler {
    level;
    levelName;
    formatter;
    constructor(levelName, options = {}){
        this.level = getLevelByName(levelName);
        this.levelName = levelName;
        this.formatter = options.formatter || DEFAULT_FORMATTER;
    }
    handle(logRecord) {
        if (this.level > logRecord.level) return;
        const msg = this.format(logRecord);
        return this.log(msg);
    }
    format(logRecord) {
        if (this.formatter instanceof Function) {
            return this.formatter(logRecord);
        }
        return this.formatter.replace(/{([^\s}]+)}/g, (match, p1)=>{
            const value = logRecord[p1];
            if (value == null) {
                return match;
            }
            return String(value);
        });
    }
    log(_msg) {}
    async setup() {}
    async destroy() {}
}
class ConsoleHandler extends BaseHandler {
    format(logRecord) {
        let msg = super.format(logRecord);
        switch(logRecord.level){
            case LogLevels.INFO:
                msg = blue1(msg);
                break;
            case LogLevels.WARNING:
                msg = yellow1(msg);
                break;
            case LogLevels.ERROR:
                msg = red1(msg);
                break;
            case LogLevels.CRITICAL:
                msg = bold1(red1(msg));
                break;
            default:
                break;
        }
        return msg;
    }
    log(msg) {
        console.log(msg);
    }
}
class WriterHandler extends BaseHandler {
    _writer;
    #encoder = new TextEncoder();
}
class FileHandler extends WriterHandler {
    _file;
    _buf;
    _filename;
    _mode;
    _openOptions;
    _encoder = new TextEncoder();
    #unloadCallback = (()=>{
        this.destroy();
    }).bind(this);
    constructor(levelName, options){
        super(levelName, options);
        this._filename = options.filename;
        this._mode = options.mode ? options.mode : "a";
        this._openOptions = {
            createNew: this._mode === "x",
            create: this._mode !== "x",
            append: this._mode === "a",
            truncate: this._mode !== "a",
            write: true
        };
    }
    async setup() {
        this._file = await Deno.open(this._filename, this._openOptions);
        this._writer = this._file;
        this._buf = new BufWriterSync(this._file);
        addEventListener("unload", this.#unloadCallback);
    }
    handle(logRecord) {
        super.handle(logRecord);
        if (logRecord.level > LogLevels.ERROR) {
            this.flush();
        }
    }
    log(msg) {
        if (this._encoder.encode(msg).byteLength + 1 > this._buf.available()) {
            this.flush();
        }
        this._buf.writeSync(this._encoder.encode(msg + "\n"));
    }
    flush() {
        if (this._buf?.buffered() > 0) {
            this._buf.flush();
        }
    }
    destroy() {
        this.flush();
        this._file?.close();
        this._file = undefined;
        removeEventListener("unload", this.#unloadCallback);
        return Promise.resolve();
    }
}
const DEFAULT_LEVEL = "INFO";
const DEFAULT_CONFIG = {
    handlers: {
        default: new ConsoleHandler(DEFAULT_LEVEL)
    },
    loggers: {
        default: {
            level: DEFAULT_LEVEL,
            handlers: [
                "default"
            ]
        }
    }
};
const state = {
    handlers: new Map(),
    loggers: new Map(),
    config: DEFAULT_CONFIG
};
function getLogger(name) {
    if (!name) {
        const d = state.loggers.get("default");
        assert(d != null, `"default" logger must be set for getting logger without name`);
        return d;
    }
    const result1 = state.loggers.get(name);
    if (!result1) {
        const logger = new Logger(name, "NOTSET", {
            handlers: []
        });
        state.loggers.set(name, logger);
        return logger;
    }
    return result1;
}
function debug(msg, ...args) {
    if (msg instanceof Function) {
        return getLogger("default").debug(msg, ...args);
    }
    return getLogger("default").debug(msg, ...args);
}
function info(msg, ...args) {
    if (msg instanceof Function) {
        return getLogger("default").info(msg, ...args);
    }
    return getLogger("default").info(msg, ...args);
}
function warning(msg, ...args) {
    if (msg instanceof Function) {
        return getLogger("default").warning(msg, ...args);
    }
    return getLogger("default").warning(msg, ...args);
}
function error(msg, ...args) {
    if (msg instanceof Function) {
        return getLogger("default").error(msg, ...args);
    }
    return getLogger("default").error(msg, ...args);
}
async function setup(config) {
    state.config = {
        handlers: {
            ...DEFAULT_CONFIG.handlers,
            ...config.handlers
        },
        loggers: {
            ...DEFAULT_CONFIG.loggers,
            ...config.loggers
        }
    };
    state.handlers.forEach((handler)=>{
        handler.destroy();
    });
    state.handlers.clear();
    const handlers = state.config.handlers || {};
    for(const handlerName in handlers){
        const handler = handlers[handlerName];
        await handler.setup();
        state.handlers.set(handlerName, handler);
    }
    state.loggers.clear();
    const loggers = state.config.loggers || {};
    for(const loggerName in loggers){
        const loggerConfig = loggers[loggerName];
        const handlerNames = loggerConfig.handlers || [];
        const handlers1 = [];
        handlerNames.forEach((handlerName)=>{
            const handler = state.handlers.get(handlerName);
            if (handler) {
                handlers1.push(handler);
            }
        });
        const levelName = loggerConfig.level || DEFAULT_LEVEL;
        const logger = new Logger(loggerName, levelName, {
            handlers: handlers1
        });
        state.loggers.set(loggerName, logger);
    }
}
await setup(DEFAULT_CONFIG);
async function ensureDir(dir) {
    try {
        const fileInfo = await Deno.lstat(dir);
        if (!fileInfo.isDirectory) {
            throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType(fileInfo)}'`);
        }
    } catch (err) {
        if (err instanceof Deno.errors.NotFound) {
            await Deno.mkdir(dir, {
                recursive: true
            });
            return;
        }
        throw err;
    }
}
function ensureDirSync(dir) {
    try {
        const fileInfo = Deno.lstatSync(dir);
        if (!fileInfo.isDirectory) {
            throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType(fileInfo)}'`);
        }
    } catch (err) {
        if (err instanceof Deno.errors.NotFound) {
            Deno.mkdirSync(dir, {
                recursive: true
            });
            return;
        }
        throw err;
    }
}
new Error("dest already exists.");
function utime(...args) {
    if (typeof Deno.utime == "function") {
        return Deno.utime(...args);
    } else {
        return Promise.reject(new TypeError("Requires --unstable"));
    }
}
async function ensureValidCopy(src, dest, options) {
    let destStat;
    try {
        destStat = await Deno.lstat(dest);
    } catch (err) {
        if (err instanceof Deno.errors.NotFound) {
            return;
        }
        throw err;
    }
    if (options.isFolder && !destStat.isDirectory) {
        throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
    }
    if (!options.overwrite) {
        throw new Error(`'${dest}' already exists.`);
    }
    return destStat;
}
async function copyFile(src, dest, options) {
    await ensureValidCopy(src, dest, options);
    await Deno.copyFile(src, dest);
    if (options.preserveTimestamps) {
        const statInfo = await Deno.stat(src);
        assert(statInfo.atime instanceof Date, `statInfo.atime is unavailable`);
        assert(statInfo.mtime instanceof Date, `statInfo.mtime is unavailable`);
        await utime(dest, statInfo.atime, statInfo.mtime);
    }
}
async function copySymLink(src, dest, options) {
    await ensureValidCopy(src, dest, options);
    const originSrcFilePath = await Deno.readLink(src);
    const type = getFileInfoType(await Deno.lstat(src));
    if (isWindows1) {
        await Deno.symlink(originSrcFilePath, dest, {
            type: type === "dir" ? "dir" : "file"
        });
    } else {
        await Deno.symlink(originSrcFilePath, dest);
    }
    if (options.preserveTimestamps) {
        const statInfo = await Deno.lstat(src);
        assert(statInfo.atime instanceof Date, `statInfo.atime is unavailable`);
        assert(statInfo.mtime instanceof Date, `statInfo.mtime is unavailable`);
        await utime(dest, statInfo.atime, statInfo.mtime);
    }
}
async function copyDir(src, dest, options) {
    const destStat = await ensureValidCopy(src, dest, {
        ...options,
        isFolder: true
    });
    if (!destStat) {
        await ensureDir(dest);
    }
    if (options.preserveTimestamps) {
        const srcStatInfo = await Deno.stat(src);
        assert(srcStatInfo.atime instanceof Date, `statInfo.atime is unavailable`);
        assert(srcStatInfo.mtime instanceof Date, `statInfo.mtime is unavailable`);
        await utime(dest, srcStatInfo.atime, srcStatInfo.mtime);
    }
    for await (const entry of Deno.readDir(src)){
        const srcPath = join3(src, entry.name);
        const destPath = join3(dest, basename2(srcPath));
        if (entry.isSymlink) {
            await copySymLink(srcPath, destPath, options);
        } else if (entry.isDirectory) {
            await copyDir(srcPath, destPath, options);
        } else if (entry.isFile) {
            await copyFile(srcPath, destPath, options);
        }
    }
}
async function copy1(src, dest, options = {}) {
    src = resolve2(src);
    dest = resolve2(dest);
    if (src === dest) {
        throw new Error("Source and destination cannot be the same.");
    }
    const srcStat = await Deno.lstat(src);
    if (srcStat.isDirectory && isSubdir(src, dest)) {
        throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`);
    }
    if (srcStat.isSymlink) {
        await copySymLink(src, dest, options);
    } else if (srcStat.isDirectory) {
        await copyDir(src, dest, options);
    } else if (srcStat.isFile) {
        await copyFile(src, dest, options);
    }
}
var EOL;
(function(EOL) {
    EOL["LF"] = "\n";
    EOL["CRLF"] = "\r\n";
})(EOL || (EOL = {}));
class YAMLError extends Error {
    constructor(message = "(unknown reason)", mark = ""){
        super(`${message} ${mark}`);
        this.mark = mark;
        this.name = this.constructor.name;
    }
    toString(_compact) {
        return `${this.name}: ${this.message} ${this.mark}`;
    }
    mark;
}
function isBoolean(value) {
    return typeof value === "boolean" || value instanceof Boolean;
}
function isObject(value) {
    return value !== null && typeof value === "object";
}
function repeat(str, count) {
    let result1 = "";
    for(let cycle = 0; cycle < count; cycle++){
        result1 += str;
    }
    return result1;
}
function isNegativeZero(i1) {
    return i1 === 0 && Number.NEGATIVE_INFINITY === 1 / i1;
}
class Mark {
    constructor(name, buffer, position, line, column){
        this.name = name;
        this.buffer = buffer;
        this.position = position;
        this.line = line;
        this.column = column;
    }
    getSnippet(indent = 4, maxLength = 75) {
        if (!this.buffer) return null;
        let head = "";
        let start = this.position;
        while(start > 0 && "\x00\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1)) === -1){
            start -= 1;
            if (this.position - start > maxLength / 2 - 1) {
                head = " ... ";
                start += 5;
                break;
            }
        }
        let tail = "";
        let end = this.position;
        while(end < this.buffer.length && "\x00\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end)) === -1){
            end += 1;
            if (end - this.position > maxLength / 2 - 1) {
                tail = " ... ";
                end -= 5;
                break;
            }
        }
        const snippet = this.buffer.slice(start, end);
        return `${repeat(" ", indent)}${head}${snippet}${tail}\n${repeat(" ", indent + this.position - start + head.length)}^`;
    }
    toString(compact) {
        let snippet, where = "";
        if (this.name) {
            where += `in "${this.name}" `;
        }
        where += `at line ${this.line + 1}, column ${this.column + 1}`;
        if (!compact) {
            snippet = this.getSnippet();
            if (snippet) {
                where += `:\n${snippet}`;
            }
        }
        return where;
    }
    name;
    buffer;
    position;
    line;
    column;
}
function compileList(schema, name, result1) {
    const exclude = [];
    for (const includedSchema of schema.include){
        result1 = compileList(includedSchema, name, result1);
    }
    for (const currentType of schema[name]){
        for(let previousIndex = 0; previousIndex < result1.length; previousIndex++){
            const previousType = result1[previousIndex];
            if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
                exclude.push(previousIndex);
            }
        }
        result1.push(currentType);
    }
    return result1.filter((_type, index)=>!exclude.includes(index));
}
function compileMap(...typesList) {
    const result1 = {
        fallback: {},
        mapping: {},
        scalar: {},
        sequence: {}
    };
    for (const types of typesList){
        for (const type of types){
            if (type.kind !== null) {
                result1[type.kind][type.tag] = result1["fallback"][type.tag] = type;
            }
        }
    }
    return result1;
}
class Schema {
    static SCHEMA_DEFAULT;
    implicit;
    explicit;
    include;
    compiledImplicit;
    compiledExplicit;
    compiledTypeMap;
    constructor(definition){
        this.explicit = definition.explicit || [];
        this.implicit = definition.implicit || [];
        this.include = definition.include || [];
        for (const type of this.implicit){
            if (type.loadKind && type.loadKind !== "scalar") {
                throw new YAMLError("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
            }
        }
        this.compiledImplicit = compileList(this, "implicit", []);
        this.compiledExplicit = compileList(this, "explicit", []);
        this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);
    }
    extend(definition) {
        return new Schema({
            implicit: [
                ...new Set([
                    ...this.implicit,
                    ...definition?.implicit ?? []
                ]), 
            ],
            explicit: [
                ...new Set([
                    ...this.explicit,
                    ...definition?.explicit ?? []
                ]), 
            ],
            include: [
                ...new Set([
                    ...this.include,
                    ...definition?.include ?? []
                ])
            ]
        });
    }
    static create() {}
}
const DEFAULT_RESOLVE = ()=>true;
const DEFAULT_CONSTRUCT = (data)=>data;
function checkTagFormat(tag) {
    return tag;
}
class Type1 {
    tag;
    kind = null;
    instanceOf;
    predicate;
    represent;
    defaultStyle;
    styleAliases;
    loadKind;
    constructor(tag, options){
        this.tag = checkTagFormat(tag);
        if (options) {
            this.kind = options.kind;
            this.resolve = options.resolve || DEFAULT_RESOLVE;
            this.construct = options.construct || DEFAULT_CONSTRUCT;
            this.instanceOf = options.instanceOf;
            this.predicate = options.predicate;
            this.represent = options.represent;
            this.defaultStyle = options.defaultStyle;
            this.styleAliases = options.styleAliases;
        }
    }
    resolve = ()=>true;
    construct = (data)=>data;
}
const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
function resolveYamlBinary(data) {
    if (data === null) return false;
    let code;
    let bitlen = 0;
    const max = data.length;
    const map = BASE64_MAP;
    for(let idx = 0; idx < max; idx++){
        code = map.indexOf(data.charAt(idx));
        if (code > 64) continue;
        if (code < 0) return false;
        bitlen += 6;
    }
    return bitlen % 8 === 0;
}
function constructYamlBinary(data) {
    const input = data.replace(/[\r\n=]/g, "");
    const max = input.length;
    const map = BASE64_MAP;
    const result1 = [];
    let bits = 0;
    for(let idx = 0; idx < max; idx++){
        if (idx % 4 === 0 && idx) {
            result1.push(bits >> 16 & 0xff);
            result1.push(bits >> 8 & 0xff);
            result1.push(bits & 0xff);
        }
        bits = bits << 6 | map.indexOf(input.charAt(idx));
    }
    const tailbits = max % 4 * 6;
    if (tailbits === 0) {
        result1.push(bits >> 16 & 0xff);
        result1.push(bits >> 8 & 0xff);
        result1.push(bits & 0xff);
    } else if (tailbits === 18) {
        result1.push(bits >> 10 & 0xff);
        result1.push(bits >> 2 & 0xff);
    } else if (tailbits === 12) {
        result1.push(bits >> 4 & 0xff);
    }
    return new Buffer1(new Uint8Array(result1));
}
function representYamlBinary(object) {
    const max = object.length;
    const map = BASE64_MAP;
    let result1 = "";
    let bits = 0;
    for(let idx = 0; idx < max; idx++){
        if (idx % 3 === 0 && idx) {
            result1 += map[bits >> 18 & 0x3f];
            result1 += map[bits >> 12 & 0x3f];
            result1 += map[bits >> 6 & 0x3f];
            result1 += map[bits & 0x3f];
        }
        bits = (bits << 8) + object[idx];
    }
    const tail = max % 3;
    if (tail === 0) {
        result1 += map[bits >> 18 & 0x3f];
        result1 += map[bits >> 12 & 0x3f];
        result1 += map[bits >> 6 & 0x3f];
        result1 += map[bits & 0x3f];
    } else if (tail === 2) {
        result1 += map[bits >> 10 & 0x3f];
        result1 += map[bits >> 4 & 0x3f];
        result1 += map[bits << 2 & 0x3f];
        result1 += map[64];
    } else if (tail === 1) {
        result1 += map[bits >> 2 & 0x3f];
        result1 += map[bits << 4 & 0x3f];
        result1 += map[64];
        result1 += map[64];
    }
    return result1;
}
function isBinary(obj) {
    const buf = new Buffer1();
    try {
        if (0 > buf.readFromSync(obj)) return true;
        return false;
    } catch  {
        return false;
    } finally{
        buf.reset();
    }
}
const binary = new Type1("tag:yaml.org,2002:binary", {
    construct: constructYamlBinary,
    kind: "scalar",
    predicate: isBinary,
    represent: representYamlBinary,
    resolve: resolveYamlBinary
});
function resolveYamlBoolean(data) {
    const max = data.length;
    return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
}
function constructYamlBoolean(data) {
    return data === "true" || data === "True" || data === "TRUE";
}
const bool = new Type1("tag:yaml.org,2002:bool", {
    construct: constructYamlBoolean,
    defaultStyle: "lowercase",
    kind: "scalar",
    predicate: isBoolean,
    represent: {
        lowercase (object) {
            return object ? "true" : "false";
        },
        uppercase (object) {
            return object ? "TRUE" : "FALSE";
        },
        camelcase (object) {
            return object ? "True" : "False";
        }
    },
    resolve: resolveYamlBoolean
});
const YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?" + "|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?" + "|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*" + "|[-+]?\\.(?:inf|Inf|INF)" + "|\\.(?:nan|NaN|NAN))$");
function resolveYamlFloat(data) {
    if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") {
        return false;
    }
    return true;
}
function constructYamlFloat(data) {
    let value = data.replace(/_/g, "").toLowerCase();
    const sign = value[0] === "-" ? -1 : 1;
    const digits = [];
    if ("+-".indexOf(value[0]) >= 0) {
        value = value.slice(1);
    }
    if (value === ".inf") {
        return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
    }
    if (value === ".nan") {
        return NaN;
    }
    if (value.indexOf(":") >= 0) {
        value.split(":").forEach((v)=>{
            digits.unshift(parseFloat(v));
        });
        let valueNb = 0.0;
        let base = 1;
        digits.forEach((d)=>{
            valueNb += d * base;
            base *= 60;
        });
        return sign * valueNb;
    }
    return sign * parseFloat(value);
}
const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
function representYamlFloat(object, style) {
    if (isNaN(object)) {
        switch(style){
            case "lowercase":
                return ".nan";
            case "uppercase":
                return ".NAN";
            case "camelcase":
                return ".NaN";
        }
    } else if (Number.POSITIVE_INFINITY === object) {
        switch(style){
            case "lowercase":
                return ".inf";
            case "uppercase":
                return ".INF";
            case "camelcase":
                return ".Inf";
        }
    } else if (Number.NEGATIVE_INFINITY === object) {
        switch(style){
            case "lowercase":
                return "-.inf";
            case "uppercase":
                return "-.INF";
            case "camelcase":
                return "-.Inf";
        }
    } else if (isNegativeZero(object)) {
        return "-0.0";
    }
    const res = object.toString(10);
    return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
}
function isFloat(object) {
    return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || isNegativeZero(object));
}
const __float = new Type1("tag:yaml.org,2002:float", {
    construct: constructYamlFloat,
    defaultStyle: "lowercase",
    kind: "scalar",
    predicate: isFloat,
    represent: representYamlFloat,
    resolve: resolveYamlFloat
});
function reconstructFunction(code) {
    const func = new Function(`return ${code}`)();
    if (!(func instanceof Function)) {
        throw new TypeError(`Expected function but got ${typeof func}: ${code}`);
    }
    return func;
}
new Type1("tag:yaml.org,2002:js/function", {
    kind: "scalar",
    resolve (data) {
        if (data === null) {
            return false;
        }
        try {
            reconstructFunction(`${data}`);
            return true;
        } catch (_err) {
            return false;
        }
    },
    construct (data) {
        return reconstructFunction(data);
    },
    predicate (object) {
        return object instanceof Function;
    },
    represent (object) {
        return object.toString();
    }
});
function isHexCode(c) {
    return 0x30 <= c && c <= 0x39 || 0x41 <= c && c <= 0x46 || 0x61 <= c && c <= 0x66;
}
function isOctCode(c) {
    return 0x30 <= c && c <= 0x37;
}
function isDecCode(c) {
    return 0x30 <= c && c <= 0x39;
}
function resolveYamlInteger(data) {
    const max = data.length;
    let index = 0;
    let hasDigits = false;
    if (!max) return false;
    let ch = data[index];
    if (ch === "-" || ch === "+") {
        ch = data[++index];
    }
    if (ch === "0") {
        if (index + 1 === max) return true;
        ch = data[++index];
        if (ch === "b") {
            index++;
            for(; index < max; index++){
                ch = data[index];
                if (ch === "_") continue;
                if (ch !== "0" && ch !== "1") return false;
                hasDigits = true;
            }
            return hasDigits && ch !== "_";
        }
        if (ch === "x") {
            index++;
            for(; index < max; index++){
                ch = data[index];
                if (ch === "_") continue;
                if (!isHexCode(data.charCodeAt(index))) return false;
                hasDigits = true;
            }
            return hasDigits && ch !== "_";
        }
        for(; index < max; index++){
            ch = data[index];
            if (ch === "_") continue;
            if (!isOctCode(data.charCodeAt(index))) return false;
            hasDigits = true;
        }
        return hasDigits && ch !== "_";
    }
    if (ch === "_") return false;
    for(; index < max; index++){
        ch = data[index];
        if (ch === "_") continue;
        if (ch === ":") break;
        if (!isDecCode(data.charCodeAt(index))) {
            return false;
        }
        hasDigits = true;
    }
    if (!hasDigits || ch === "_") return false;
    if (ch !== ":") return true;
    return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
}
function constructYamlInteger(data) {
    let value = data;
    const digits = [];
    if (value.indexOf("_") !== -1) {
        value = value.replace(/_/g, "");
    }
    let sign = 1;
    let ch = value[0];
    if (ch === "-" || ch === "+") {
        if (ch === "-") sign = -1;
        value = value.slice(1);
        ch = value[0];
    }
    if (value === "0") return 0;
    if (ch === "0") {
        if (value[1] === "b") return sign * parseInt(value.slice(2), 2);
        if (value[1] === "x") return sign * parseInt(value, 16);
        return sign * parseInt(value, 8);
    }
    if (value.indexOf(":") !== -1) {
        value.split(":").forEach((v)=>{
            digits.unshift(parseInt(v, 10));
        });
        let valueInt = 0;
        let base = 1;
        digits.forEach((d)=>{
            valueInt += d * base;
            base *= 60;
        });
        return sign * valueInt;
    }
    return sign * parseInt(value, 10);
}
function isInteger(object) {
    return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !isNegativeZero(object);
}
const __int = new Type1("tag:yaml.org,2002:int", {
    construct: constructYamlInteger,
    defaultStyle: "decimal",
    kind: "scalar",
    predicate: isInteger,
    represent: {
        binary (obj) {
            return obj >= 0 ? `0b${obj.toString(2)}` : `-0b${obj.toString(2).slice(1)}`;
        },
        octal (obj) {
            return obj >= 0 ? `0${obj.toString(8)}` : `-0${obj.toString(8).slice(1)}`;
        },
        decimal (obj) {
            return obj.toString(10);
        },
        hexadecimal (obj) {
            return obj >= 0 ? `0x${obj.toString(16).toUpperCase()}` : `-0x${obj.toString(16).toUpperCase().slice(1)}`;
        }
    },
    resolve: resolveYamlInteger,
    styleAliases: {
        binary: [
            2,
            "bin"
        ],
        decimal: [
            10,
            "dec"
        ],
        hexadecimal: [
            16,
            "hex"
        ],
        octal: [
            8,
            "oct"
        ]
    }
});
const map = new Type1("tag:yaml.org,2002:map", {
    construct (data) {
        return data !== null ? data : {};
    },
    kind: "mapping"
});
function resolveYamlMerge(data) {
    return data === "<<" || data === null;
}
const merge = new Type1("tag:yaml.org,2002:merge", {
    kind: "scalar",
    resolve: resolveYamlMerge
});
function resolveYamlNull(data) {
    const max = data.length;
    return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
}
function constructYamlNull() {
    return null;
}
function isNull(object) {
    return object === null;
}
const nil = new Type1("tag:yaml.org,2002:null", {
    construct: constructYamlNull,
    defaultStyle: "lowercase",
    kind: "scalar",
    predicate: isNull,
    represent: {
        canonical () {
            return "~";
        },
        lowercase () {
            return "null";
        },
        uppercase () {
            return "NULL";
        },
        camelcase () {
            return "Null";
        }
    },
    resolve: resolveYamlNull
});
const { hasOwn  } = Object;
const _toString = Object.prototype.toString;
function resolveYamlOmap(data) {
    const objectKeys = [];
    let pairKey = "";
    let pairHasKey = false;
    for (const pair of data){
        pairHasKey = false;
        if (_toString.call(pair) !== "[object Object]") return false;
        for(pairKey in pair){
            if (hasOwn(pair, pairKey)) {
                if (!pairHasKey) pairHasKey = true;
                else return false;
            }
        }
        if (!pairHasKey) return false;
        if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
        else return false;
    }
    return true;
}
function constructYamlOmap(data) {
    return data !== null ? data : [];
}
const omap = new Type1("tag:yaml.org,2002:omap", {
    construct: constructYamlOmap,
    kind: "sequence",
    resolve: resolveYamlOmap
});
const _toString1 = Object.prototype.toString;
function resolveYamlPairs(data) {
    const result1 = Array.from({
        length: data.length
    });
    for(let index = 0; index < data.length; index++){
        const pair = data[index];
        if (_toString1.call(pair) !== "[object Object]") return false;
        const keys = Object.keys(pair);
        if (keys.length !== 1) return false;
        result1[index] = [
            keys[0],
            pair[keys[0]]
        ];
    }
    return true;
}
function constructYamlPairs(data) {
    if (data === null) return [];
    const result1 = Array.from({
        length: data.length
    });
    for(let index = 0; index < data.length; index += 1){
        const pair = data[index];
        const keys = Object.keys(pair);
        result1[index] = [
            keys[0],
            pair[keys[0]]
        ];
    }
    return result1;
}
const pairs = new Type1("tag:yaml.org,2002:pairs", {
    construct: constructYamlPairs,
    kind: "sequence",
    resolve: resolveYamlPairs
});
const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
const regexp = new Type1("tag:yaml.org,2002:js/regexp", {
    kind: "scalar",
    resolve (data) {
        if (data === null || !data.length) {
            return false;
        }
        const regexp = `${data}`;
        if (regexp.charAt(0) === "/") {
            if (!REGEXP.test(data)) {
                return false;
            }
            const modifiers = [
                ...regexp.match(REGEXP)?.groups?.modifiers ?? ""
            ];
            if (new Set(modifiers).size < modifiers.length) {
                return false;
            }
        }
        return true;
    },
    construct (data) {
        const { regexp =`${data}` , modifiers =""  } = `${data}`.match(REGEXP)?.groups ?? {};
        return new RegExp(regexp, modifiers);
    },
    predicate (object) {
        return object instanceof RegExp;
    },
    represent (object) {
        return object.toString();
    }
});
const seq = new Type1("tag:yaml.org,2002:seq", {
    construct (data) {
        return data !== null ? data : [];
    },
    kind: "sequence"
});
const { hasOwn: hasOwn1  } = Object;
function resolveYamlSet(data) {
    if (data === null) return true;
    for(const key in data){
        if (hasOwn1(data, key)) {
            if (data[key] !== null) return false;
        }
    }
    return true;
}
function constructYamlSet(data) {
    return data !== null ? data : {};
}
const set = new Type1("tag:yaml.org,2002:set", {
    construct: constructYamlSet,
    kind: "mapping",
    resolve: resolveYamlSet
});
const str = new Type1("tag:yaml.org,2002:str", {
    construct (data) {
        return data !== null ? data : "";
    },
    kind: "scalar"
});
const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])" + "-([0-9][0-9])" + "-([0-9][0-9])$");
const YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])" + "-([0-9][0-9]?)" + "-([0-9][0-9]?)" + "(?:[Tt]|[ \\t]+)" + "([0-9][0-9]?)" + ":([0-9][0-9])" + ":([0-9][0-9])" + "(?:\\.([0-9]*))?" + "(?:[ \\t]*(Z|([-+])([0-9][0-9]?)" + "(?::([0-9][0-9]))?))?$");
function resolveYamlTimestamp(data) {
    if (data === null) return false;
    if (YAML_DATE_REGEXP.exec(data) !== null) return true;
    if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
    return false;
}
function constructYamlTimestamp(data) {
    let match = YAML_DATE_REGEXP.exec(data);
    if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
    if (match === null) throw new Error("Date resolve error");
    const year = +match[1];
    const month = +match[2] - 1;
    const day = +match[3];
    if (!match[4]) {
        return new Date(Date.UTC(year, month, day));
    }
    const hour = +match[4];
    const minute = +match[5];
    const second = +match[6];
    let fraction = 0;
    if (match[7]) {
        let partFraction = match[7].slice(0, 3);
        while(partFraction.length < 3){
            partFraction += "0";
        }
        fraction = +partFraction;
    }
    let delta = null;
    if (match[9]) {
        const tzHour = +match[10];
        const tzMinute = +(match[11] || 0);
        delta = (tzHour * 60 + tzMinute) * 60000;
        if (match[9] === "-") delta = -delta;
    }
    const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
    if (delta) date.setTime(date.getTime() - delta);
    return date;
}
function representYamlTimestamp(date) {
    return date.toISOString();
}
const timestamp = new Type1("tag:yaml.org,2002:timestamp", {
    construct: constructYamlTimestamp,
    instanceOf: Date,
    kind: "scalar",
    represent: representYamlTimestamp,
    resolve: resolveYamlTimestamp
});
const undefinedType = new Type1("tag:yaml.org,2002:js/undefined", {
    kind: "scalar",
    resolve () {
        return true;
    },
    construct () {
        return undefined;
    },
    predicate (object) {
        return typeof object === "undefined";
    },
    represent () {
        return "";
    }
});
const failsafe = new Schema({
    explicit: [
        str,
        seq,
        map
    ]
});
const json = new Schema({
    implicit: [
        nil,
        bool,
        __int,
        __float
    ],
    include: [
        failsafe
    ]
});
const core = new Schema({
    include: [
        json
    ]
});
const def = new Schema({
    explicit: [
        binary,
        omap,
        pairs,
        set
    ],
    implicit: [
        timestamp,
        merge
    ],
    include: [
        core
    ]
});
new Schema({
    explicit: [
        regexp,
        undefinedType
    ],
    include: [
        def
    ]
});
class State {
    constructor(schema = def){
        this.schema = schema;
    }
    schema;
}
class LoaderState extends State {
    documents;
    length;
    lineIndent;
    lineStart;
    position;
    line;
    filename;
    onWarning;
    legacy;
    json;
    listener;
    implicitTypes;
    typeMap;
    version;
    checkLineBreaks;
    tagMap;
    anchorMap;
    tag;
    anchor;
    kind;
    result;
    constructor(input, { filename , schema , onWarning , legacy =false , json =false , listener =null  }){
        super(schema);
        this.input = input;
        this.documents = [];
        this.lineIndent = 0;
        this.lineStart = 0;
        this.position = 0;
        this.line = 0;
        this.result = "";
        this.filename = filename;
        this.onWarning = onWarning;
        this.legacy = legacy;
        this.json = json;
        this.listener = listener;
        this.implicitTypes = this.schema.compiledImplicit;
        this.typeMap = this.schema.compiledTypeMap;
        this.length = input.length;
    }
    input;
}
const { hasOwn: hasOwn2  } = Object;
const CONTEXT_BLOCK_IN = 3;
const CONTEXT_BLOCK_OUT = 4;
const CHOMPING_STRIP = 2;
const CHOMPING_KEEP = 3;
const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
const PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
const PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
const PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
function _class(obj) {
    return Object.prototype.toString.call(obj);
}
function isEOL(c) {
    return c === 0x0a || c === 0x0d;
}
function isWhiteSpace(c) {
    return c === 0x09 || c === 0x20;
}
function isWsOrEol(c) {
    return c === 0x09 || c === 0x20 || c === 0x0a || c === 0x0d;
}
function isFlowIndicator(c) {
    return c === 0x2c || c === 0x5b || c === 0x5d || c === 0x7b || c === 0x7d;
}
function fromHexCode(c) {
    if (0x30 <= c && c <= 0x39) {
        return c - 0x30;
    }
    const lc = c | 0x20;
    if (0x61 <= lc && lc <= 0x66) {
        return lc - 0x61 + 10;
    }
    return -1;
}
function escapedHexLen(c) {
    if (c === 0x78) {
        return 2;
    }
    if (c === 0x75) {
        return 4;
    }
    if (c === 0x55) {
        return 8;
    }
    return 0;
}
function fromDecimalCode(c) {
    if (0x30 <= c && c <= 0x39) {
        return c - 0x30;
    }
    return -1;
}
function simpleEscapeSequence(c) {
    return c === 0x30 ? "\x00" : c === 0x61 ? "\x07" : c === 0x62 ? "\x08" : c === 0x74 ? "\x09" : c === 0x09 ? "\x09" : c === 0x6e ? "\x0A" : c === 0x76 ? "\x0B" : c === 0x66 ? "\x0C" : c === 0x72 ? "\x0D" : c === 0x65 ? "\x1B" : c === 0x20 ? " " : c === 0x22 ? "\x22" : c === 0x2f ? "/" : c === 0x5c ? "\x5C" : c === 0x4e ? "\x85" : c === 0x5f ? "\xA0" : c === 0x4c ? "\u2028" : c === 0x50 ? "\u2029" : "";
}
function charFromCodepoint(c) {
    if (c <= 0xffff) {
        return String.fromCharCode(c);
    }
    return String.fromCharCode((c - 0x010000 >> 10) + 0xd800, (c - 0x010000 & 0x03ff) + 0xdc00);
}
const simpleEscapeCheck = Array.from({
    length: 256
});
const simpleEscapeMap = Array.from({
    length: 256
});
for(let i2 = 0; i2 < 256; i2++){
    simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0;
    simpleEscapeMap[i2] = simpleEscapeSequence(i2);
}
function generateError(state, message) {
    return new YAMLError(message, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart));
}
function throwError(state, message) {
    throw generateError(state, message);
}
function throwWarning(state, message) {
    if (state.onWarning) {
        state.onWarning.call(null, generateError(state, message));
    }
}
const directiveHandlers = {
    YAML (state, _name, ...args) {
        if (state.version !== null) {
            return throwError(state, "duplication of %YAML directive");
        }
        if (args.length !== 1) {
            return throwError(state, "YAML directive accepts exactly one argument");
        }
        const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
        if (match === null) {
            return throwError(state, "ill-formed argument of the YAML directive");
        }
        const major = parseInt(match[1], 10);
        const minor = parseInt(match[2], 10);
        if (major !== 1) {
            return throwError(state, "unacceptable YAML version of the document");
        }
        state.version = args[0];
        state.checkLineBreaks = minor < 2;
        if (minor !== 1 && minor !== 2) {
            return throwWarning(state, "unsupported YAML version of the document");
        }
    },
    TAG (state, _name, ...args) {
        if (args.length !== 2) {
            return throwError(state, "TAG directive accepts exactly two arguments");
        }
        const handle = args[0];
        const prefix = args[1];
        if (!PATTERN_TAG_HANDLE.test(handle)) {
            return throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
        }
        if (state.tagMap && hasOwn2(state.tagMap, handle)) {
            return throwError(state, `there is a previously declared suffix for "${handle}" tag handle`);
        }
        if (!PATTERN_TAG_URI.test(prefix)) {
            return throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
        }
        if (typeof state.tagMap === "undefined") {
            state.tagMap = {};
        }
        state.tagMap[handle] = prefix;
    }
};
function captureSegment(state, start, end, checkJson) {
    let result1;
    if (start < end) {
        result1 = state.input.slice(start, end);
        if (checkJson) {
            for(let position = 0, length = result1.length; position < length; position++){
                const character = result1.charCodeAt(position);
                if (!(character === 0x09 || 0x20 <= character && character <= 0x10ffff)) {
                    return throwError(state, "expected valid JSON character");
                }
            }
        } else if (PATTERN_NON_PRINTABLE.test(result1)) {
            return throwError(state, "the stream contains non-printable characters");
        }
        state.result += result1;
    }
}
function mergeMappings(state, destination, source, overridableKeys) {
    if (!isObject(source)) {
        return throwError(state, "cannot merge mappings; the provided source object is unacceptable");
    }
    const keys = Object.keys(source);
    for(let i1 = 0, len = keys.length; i1 < len; i1++){
        const key = keys[i1];
        if (!hasOwn2(destination, key)) {
            destination[key] = source[key];
            overridableKeys[key] = true;
        }
    }
}
function storeMappingPair(state, result1, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
    if (Array.isArray(keyNode)) {
        keyNode = Array.prototype.slice.call(keyNode);
        for(let index = 0, quantity = keyNode.length; index < quantity; index++){
            if (Array.isArray(keyNode[index])) {
                return throwError(state, "nested arrays are not supported inside keys");
            }
            if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
                keyNode[index] = "[object Object]";
            }
        }
    }
    if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
        keyNode = "[object Object]";
    }
    keyNode = String(keyNode);
    if (result1 === null) {
        result1 = {};
    }
    if (keyTag === "tag:yaml.org,2002:merge") {
        if (Array.isArray(valueNode)) {
            for(let index1 = 0, quantity1 = valueNode.length; index1 < quantity1; index1++){
                mergeMappings(state, result1, valueNode[index1], overridableKeys);
            }
        } else {
            mergeMappings(state, result1, valueNode, overridableKeys);
        }
    } else {
        if (!state.json && !hasOwn2(overridableKeys, keyNode) && hasOwn2(result1, keyNode)) {
            state.line = startLine || state.line;
            state.position = startPos || state.position;
            return throwError(state, "duplicated mapping key");
        }
        result1[keyNode] = valueNode;
        delete overridableKeys[keyNode];
    }
    return result1;
}
function readLineBreak(state) {
    const ch = state.input.charCodeAt(state.position);
    if (ch === 0x0a) {
        state.position++;
    } else if (ch === 0x0d) {
        state.position++;
        if (state.input.charCodeAt(state.position) === 0x0a) {
            state.position++;
        }
    } else {
        return throwError(state, "a line break is expected");
    }
    state.line += 1;
    state.lineStart = state.position;
}
function skipSeparationSpace(state, allowComments, checkIndent) {
    let lineBreaks = 0, ch = state.input.charCodeAt(state.position);
    while(ch !== 0){
        while(isWhiteSpace(ch)){
            ch = state.input.charCodeAt(++state.position);
        }
        if (allowComments && ch === 0x23) {
            do {
                ch = state.input.charCodeAt(++state.position);
            }while (ch !== 0x0a && ch !== 0x0d && ch !== 0)
        }
        if (isEOL(ch)) {
            readLineBreak(state);
            ch = state.input.charCodeAt(state.position);
            lineBreaks++;
            state.lineIndent = 0;
            while(ch === 0x20){
                state.lineIndent++;
                ch = state.input.charCodeAt(++state.position);
            }
        } else {
            break;
        }
    }
    if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
        throwWarning(state, "deficient indentation");
    }
    return lineBreaks;
}
function testDocumentSeparator(state) {
    let _position = state.position;
    let ch = state.input.charCodeAt(_position);
    if ((ch === 0x2d || ch === 0x2e) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
        _position += 3;
        ch = state.input.charCodeAt(_position);
        if (ch === 0 || isWsOrEol(ch)) {
            return true;
        }
    }
    return false;
}
function writeFoldedLines(state, count) {
    if (count === 1) {
        state.result += " ";
    } else if (count > 1) {
        state.result += repeat("\n", count - 1);
    }
}
function readPlainScalar(state, nodeIndent, withinFlowCollection) {
    const kind = state.kind;
    const result1 = state.result;
    let ch = state.input.charCodeAt(state.position);
    if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 0x23 || ch === 0x26 || ch === 0x2a || ch === 0x21 || ch === 0x7c || ch === 0x3e || ch === 0x27 || ch === 0x22 || ch === 0x25 || ch === 0x40 || ch === 0x60) {
        return false;
    }
    let following;
    if (ch === 0x3f || ch === 0x2d) {
        following = state.input.charCodeAt(state.position + 1);
        if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
            return false;
        }
    }
    state.kind = "scalar";
    state.result = "";
    let captureEnd, captureStart = captureEnd = state.position;
    let hasPendingContent = false;
    let line = 0;
    while(ch !== 0){
        if (ch === 0x3a) {
            following = state.input.charCodeAt(state.position + 1);
            if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
                break;
            }
        } else if (ch === 0x23) {
            const preceding = state.input.charCodeAt(state.position - 1);
            if (isWsOrEol(preceding)) {
                break;
            }
        } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
            break;
        } else if (isEOL(ch)) {
            line = state.line;
            const lineStart = state.lineStart;
            const lineIndent = state.lineIndent;
            skipSeparationSpace(state, false, -1);
            if (state.lineIndent >= nodeIndent) {
                hasPendingContent = true;
                ch = state.input.charCodeAt(state.position);
                continue;
            } else {
                state.position = captureEnd;
                state.line = line;
                state.lineStart = lineStart;
                state.lineIndent = lineIndent;
                break;
            }
        }
        if (hasPendingContent) {
            captureSegment(state, captureStart, captureEnd, false);
            writeFoldedLines(state, state.line - line);
            captureStart = captureEnd = state.position;
            hasPendingContent = false;
        }
        if (!isWhiteSpace(ch)) {
            captureEnd = state.position + 1;
        }
        ch = state.input.charCodeAt(++state.position);
    }
    captureSegment(state, captureStart, captureEnd, false);
    if (state.result) {
        return true;
    }
    state.kind = kind;
    state.result = result1;
    return false;
}
function readSingleQuotedScalar(state, nodeIndent) {
    let ch, captureStart, captureEnd;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 0x27) {
        return false;
    }
    state.kind = "scalar";
    state.result = "";
    state.position++;
    captureStart = captureEnd = state.position;
    while((ch = state.input.charCodeAt(state.position)) !== 0){
        if (ch === 0x27) {
            captureSegment(state, captureStart, state.position, true);
            ch = state.input.charCodeAt(++state.position);
            if (ch === 0x27) {
                captureStart = state.position;
                state.position++;
                captureEnd = state.position;
            } else {
                return true;
            }
        } else if (isEOL(ch)) {
            captureSegment(state, captureStart, captureEnd, true);
            writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
            captureStart = captureEnd = state.position;
        } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
            return throwError(state, "unexpected end of the document within a single quoted scalar");
        } else {
            state.position++;
            captureEnd = state.position;
        }
    }
    return throwError(state, "unexpected end of the stream within a single quoted scalar");
}
function readDoubleQuotedScalar(state, nodeIndent) {
    let ch = state.input.charCodeAt(state.position);
    if (ch !== 0x22) {
        return false;
    }
    state.kind = "scalar";
    state.result = "";
    state.position++;
    let captureEnd, captureStart = captureEnd = state.position;
    let tmp;
    while((ch = state.input.charCodeAt(state.position)) !== 0){
        if (ch === 0x22) {
            captureSegment(state, captureStart, state.position, true);
            state.position++;
            return true;
        }
        if (ch === 0x5c) {
            captureSegment(state, captureStart, state.position, true);
            ch = state.input.charCodeAt(++state.position);
            if (isEOL(ch)) {
                skipSeparationSpace(state, false, nodeIndent);
            } else if (ch < 256 && simpleEscapeCheck[ch]) {
                state.result += simpleEscapeMap[ch];
                state.position++;
            } else if ((tmp = escapedHexLen(ch)) > 0) {
                let hexLength = tmp;
                let hexResult = 0;
                for(; hexLength > 0; hexLength--){
                    ch = state.input.charCodeAt(++state.position);
                    if ((tmp = fromHexCode(ch)) >= 0) {
                        hexResult = (hexResult << 4) + tmp;
                    } else {
                        return throwError(state, "expected hexadecimal character");
                    }
                }
                state.result += charFromCodepoint(hexResult);
                state.position++;
            } else {
                return throwError(state, "unknown escape sequence");
            }
            captureStart = captureEnd = state.position;
        } else if (isEOL(ch)) {
            captureSegment(state, captureStart, captureEnd, true);
            writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
            captureStart = captureEnd = state.position;
        } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
            return throwError(state, "unexpected end of the document within a double quoted scalar");
        } else {
            state.position++;
            captureEnd = state.position;
        }
    }
    return throwError(state, "unexpected end of the stream within a double quoted scalar");
}
function readFlowCollection(state, nodeIndent) {
    let ch = state.input.charCodeAt(state.position);
    let terminator;
    let isMapping = true;
    let result1 = {};
    if (ch === 0x5b) {
        terminator = 0x5d;
        isMapping = false;
        result1 = [];
    } else if (ch === 0x7b) {
        terminator = 0x7d;
    } else {
        return false;
    }
    if (state.anchor !== null && typeof state.anchor != "undefined" && typeof state.anchorMap != "undefined") {
        state.anchorMap[state.anchor] = result1;
    }
    ch = state.input.charCodeAt(++state.position);
    const tag = state.tag, anchor = state.anchor;
    let readNext = true;
    let valueNode, keyNode, keyTag = keyNode = valueNode = null, isExplicitPair, isPair = isExplicitPair = false;
    let following = 0, line = 0;
    const overridableKeys = {};
    while(ch !== 0){
        skipSeparationSpace(state, true, nodeIndent);
        ch = state.input.charCodeAt(state.position);
        if (ch === terminator) {
            state.position++;
            state.tag = tag;
            state.anchor = anchor;
            state.kind = isMapping ? "mapping" : "sequence";
            state.result = result1;
            return true;
        }
        if (!readNext) {
            return throwError(state, "missed comma between flow collection entries");
        }
        keyTag = keyNode = valueNode = null;
        isPair = isExplicitPair = false;
        if (ch === 0x3f) {
            following = state.input.charCodeAt(state.position + 1);
            if (isWsOrEol(following)) {
                isPair = isExplicitPair = true;
                state.position++;
                skipSeparationSpace(state, true, nodeIndent);
            }
        }
        line = state.line;
        composeNode(state, nodeIndent, 1, false, true);
        keyTag = state.tag || null;
        keyNode = state.result;
        skipSeparationSpace(state, true, nodeIndent);
        ch = state.input.charCodeAt(state.position);
        if ((isExplicitPair || state.line === line) && ch === 0x3a) {
            isPair = true;
            ch = state.input.charCodeAt(++state.position);
            skipSeparationSpace(state, true, nodeIndent);
            composeNode(state, nodeIndent, 1, false, true);
            valueNode = state.result;
        }
        if (isMapping) {
            storeMappingPair(state, result1, overridableKeys, keyTag, keyNode, valueNode);
        } else if (isPair) {
            result1.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));
        } else {
            result1.push(keyNode);
        }
        skipSeparationSpace(state, true, nodeIndent);
        ch = state.input.charCodeAt(state.position);
        if (ch === 0x2c) {
            readNext = true;
            ch = state.input.charCodeAt(++state.position);
        } else {
            readNext = false;
        }
    }
    return throwError(state, "unexpected end of the stream within a flow collection");
}
function readBlockScalar(state, nodeIndent) {
    let chomping = 1, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false;
    let ch = state.input.charCodeAt(state.position);
    let folding = false;
    if (ch === 0x7c) {
        folding = false;
    } else if (ch === 0x3e) {
        folding = true;
    } else {
        return false;
    }
    state.kind = "scalar";
    state.result = "";
    let tmp = 0;
    while(ch !== 0){
        ch = state.input.charCodeAt(++state.position);
        if (ch === 0x2b || ch === 0x2d) {
            if (1 === chomping) {
                chomping = ch === 0x2b ? CHOMPING_KEEP : CHOMPING_STRIP;
            } else {
                return throwError(state, "repeat of a chomping mode identifier");
            }
        } else if ((tmp = fromDecimalCode(ch)) >= 0) {
            if (tmp === 0) {
                return throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
            } else if (!detectedIndent) {
                textIndent = nodeIndent + tmp - 1;
                detectedIndent = true;
            } else {
                return throwError(state, "repeat of an indentation width identifier");
            }
        } else {
            break;
        }
    }
    if (isWhiteSpace(ch)) {
        do {
            ch = state.input.charCodeAt(++state.position);
        }while (isWhiteSpace(ch))
        if (ch === 0x23) {
            do {
                ch = state.input.charCodeAt(++state.position);
            }while (!isEOL(ch) && ch !== 0)
        }
    }
    while(ch !== 0){
        readLineBreak(state);
        state.lineIndent = 0;
        ch = state.input.charCodeAt(state.position);
        while((!detectedIndent || state.lineIndent < textIndent) && ch === 0x20){
            state.lineIndent++;
            ch = state.input.charCodeAt(++state.position);
        }
        if (!detectedIndent && state.lineIndent > textIndent) {
            textIndent = state.lineIndent;
        }
        if (isEOL(ch)) {
            emptyLines++;
            continue;
        }
        if (state.lineIndent < textIndent) {
            if (chomping === 3) {
                state.result += repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
            } else if (chomping === 1) {
                if (didReadContent) {
                    state.result += "\n";
                }
            }
            break;
        }
        if (folding) {
            if (isWhiteSpace(ch)) {
                atMoreIndented = true;
                state.result += repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
            } else if (atMoreIndented) {
                atMoreIndented = false;
                state.result += repeat("\n", emptyLines + 1);
            } else if (emptyLines === 0) {
                if (didReadContent) {
                    state.result += " ";
                }
            } else {
                state.result += repeat("\n", emptyLines);
            }
        } else {
            state.result += repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
        }
        didReadContent = true;
        detectedIndent = true;
        emptyLines = 0;
        const captureStart = state.position;
        while(!isEOL(ch) && ch !== 0){
            ch = state.input.charCodeAt(++state.position);
        }
        captureSegment(state, captureStart, state.position, false);
    }
    return true;
}
function readBlockSequence(state, nodeIndent) {
    let line, following, detected = false, ch;
    const tag = state.tag, anchor = state.anchor, result1 = [];
    if (state.anchor !== null && typeof state.anchor !== "undefined" && typeof state.anchorMap !== "undefined") {
        state.anchorMap[state.anchor] = result1;
    }
    ch = state.input.charCodeAt(state.position);
    while(ch !== 0){
        if (ch !== 0x2d) {
            break;
        }
        following = state.input.charCodeAt(state.position + 1);
        if (!isWsOrEol(following)) {
            break;
        }
        detected = true;
        state.position++;
        if (skipSeparationSpace(state, true, -1)) {
            if (state.lineIndent <= nodeIndent) {
                result1.push(null);
                ch = state.input.charCodeAt(state.position);
                continue;
            }
        }
        line = state.line;
        composeNode(state, nodeIndent, 3, false, true);
        result1.push(state.result);
        skipSeparationSpace(state, true, -1);
        ch = state.input.charCodeAt(state.position);
        if ((state.line === line || state.lineIndent > nodeIndent) && ch !== 0) {
            return throwError(state, "bad indentation of a sequence entry");
        } else if (state.lineIndent < nodeIndent) {
            break;
        }
    }
    if (detected) {
        state.tag = tag;
        state.anchor = anchor;
        state.kind = "sequence";
        state.result = result1;
        return true;
    }
    return false;
}
function readBlockMapping(state, nodeIndent, flowIndent) {
    const tag = state.tag, anchor = state.anchor, result1 = {}, overridableKeys = {};
    let following, allowCompact = false, line, pos, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
    if (state.anchor !== null && typeof state.anchor !== "undefined" && typeof state.anchorMap !== "undefined") {
        state.anchorMap[state.anchor] = result1;
    }
    ch = state.input.charCodeAt(state.position);
    while(ch !== 0){
        following = state.input.charCodeAt(state.position + 1);
        line = state.line;
        pos = state.position;
        if ((ch === 0x3f || ch === 0x3a) && isWsOrEol(following)) {
            if (ch === 0x3f) {
                if (atExplicitKey) {
                    storeMappingPair(state, result1, overridableKeys, keyTag, keyNode, null);
                    keyTag = keyNode = valueNode = null;
                }
                detected = true;
                atExplicitKey = true;
                allowCompact = true;
            } else if (atExplicitKey) {
                atExplicitKey = false;
                allowCompact = true;
            } else {
                return throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
            }
            state.position += 1;
            ch = following;
        } else if (composeNode(state, flowIndent, 2, false, true)) {
            if (state.line === line) {
                ch = state.input.charCodeAt(state.position);
                while(isWhiteSpace(ch)){
                    ch = state.input.charCodeAt(++state.position);
                }
                if (ch === 0x3a) {
                    ch = state.input.charCodeAt(++state.position);
                    if (!isWsOrEol(ch)) {
                        return throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
                    }
                    if (atExplicitKey) {
                        storeMappingPair(state, result1, overridableKeys, keyTag, keyNode, null);
                        keyTag = keyNode = valueNode = null;
                    }
                    detected = true;
                    atExplicitKey = false;
                    allowCompact = false;
                    keyTag = state.tag;
                    keyNode = state.result;
                } else if (detected) {
                    return throwError(state, "can not read an implicit mapping pair; a colon is missed");
                } else {
                    state.tag = tag;
                    state.anchor = anchor;
                    return true;
                }
            } else if (detected) {
                return throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
            } else {
                state.tag = tag;
                state.anchor = anchor;
                return true;
            }
        } else {
            break;
        }
        if (state.line === line || state.lineIndent > nodeIndent) {
            if (composeNode(state, nodeIndent, 4, true, allowCompact)) {
                if (atExplicitKey) {
                    keyNode = state.result;
                } else {
                    valueNode = state.result;
                }
            }
            if (!atExplicitKey) {
                storeMappingPair(state, result1, overridableKeys, keyTag, keyNode, valueNode, line, pos);
                keyTag = keyNode = valueNode = null;
            }
            skipSeparationSpace(state, true, -1);
            ch = state.input.charCodeAt(state.position);
        }
        if (state.lineIndent > nodeIndent && ch !== 0) {
            return throwError(state, "bad indentation of a mapping entry");
        } else if (state.lineIndent < nodeIndent) {
            break;
        }
    }
    if (atExplicitKey) {
        storeMappingPair(state, result1, overridableKeys, keyTag, keyNode, null);
    }
    if (detected) {
        state.tag = tag;
        state.anchor = anchor;
        state.kind = "mapping";
        state.result = result1;
    }
    return detected;
}
function readTagProperty(state) {
    let position, isVerbatim = false, isNamed = false, tagHandle = "", tagName, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 0x21) return false;
    if (state.tag !== null) {
        return throwError(state, "duplication of a tag property");
    }
    ch = state.input.charCodeAt(++state.position);
    if (ch === 0x3c) {
        isVerbatim = true;
        ch = state.input.charCodeAt(++state.position);
    } else if (ch === 0x21) {
        isNamed = true;
        tagHandle = "!!";
        ch = state.input.charCodeAt(++state.position);
    } else {
        tagHandle = "!";
    }
    position = state.position;
    if (isVerbatim) {
        do {
            ch = state.input.charCodeAt(++state.position);
        }while (ch !== 0 && ch !== 0x3e)
        if (state.position < state.length) {
            tagName = state.input.slice(position, state.position);
            ch = state.input.charCodeAt(++state.position);
        } else {
            return throwError(state, "unexpected end of the stream within a verbatim tag");
        }
    } else {
        while(ch !== 0 && !isWsOrEol(ch)){
            if (ch === 0x21) {
                if (!isNamed) {
                    tagHandle = state.input.slice(position - 1, state.position + 1);
                    if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
                        return throwError(state, "named tag handle cannot contain such characters");
                    }
                    isNamed = true;
                    position = state.position + 1;
                } else {
                    return throwError(state, "tag suffix cannot contain exclamation marks");
                }
            }
            ch = state.input.charCodeAt(++state.position);
        }
        tagName = state.input.slice(position, state.position);
        if (PATTERN_FLOW_INDICATORS.test(tagName)) {
            return throwError(state, "tag suffix cannot contain flow indicator characters");
        }
    }
    if (tagName && !PATTERN_TAG_URI.test(tagName)) {
        return throwError(state, `tag name cannot contain such characters: ${tagName}`);
    }
    if (isVerbatim) {
        state.tag = tagName;
    } else if (typeof state.tagMap !== "undefined" && hasOwn2(state.tagMap, tagHandle)) {
        state.tag = state.tagMap[tagHandle] + tagName;
    } else if (tagHandle === "!") {
        state.tag = `!${tagName}`;
    } else if (tagHandle === "!!") {
        state.tag = `tag:yaml.org,2002:${tagName}`;
    } else {
        return throwError(state, `undeclared tag handle "${tagHandle}"`);
    }
    return true;
}
function readAnchorProperty(state) {
    let ch = state.input.charCodeAt(state.position);
    if (ch !== 0x26) return false;
    if (state.anchor !== null) {
        return throwError(state, "duplication of an anchor property");
    }
    ch = state.input.charCodeAt(++state.position);
    const position = state.position;
    while(ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)){
        ch = state.input.charCodeAt(++state.position);
    }
    if (state.position === position) {
        return throwError(state, "name of an anchor node must contain at least one character");
    }
    state.anchor = state.input.slice(position, state.position);
    return true;
}
function readAlias(state) {
    let ch = state.input.charCodeAt(state.position);
    if (ch !== 0x2a) return false;
    ch = state.input.charCodeAt(++state.position);
    const _position = state.position;
    while(ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)){
        ch = state.input.charCodeAt(++state.position);
    }
    if (state.position === _position) {
        return throwError(state, "name of an alias node must contain at least one character");
    }
    const alias = state.input.slice(_position, state.position);
    if (typeof state.anchorMap !== "undefined" && !hasOwn2(state.anchorMap, alias)) {
        return throwError(state, `unidentified alias "${alias}"`);
    }
    if (typeof state.anchorMap !== "undefined") {
        state.result = state.anchorMap[alias];
    }
    skipSeparationSpace(state, true, -1);
    return true;
}
function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
    let allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, type, flowIndent, blockIndent;
    if (state.listener && state.listener !== null) {
        state.listener("open", state);
    }
    state.tag = null;
    state.anchor = null;
    state.kind = null;
    state.result = null;
    const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
    if (allowToSeek) {
        if (skipSeparationSpace(state, true, -1)) {
            atNewLine = true;
            if (state.lineIndent > parentIndent) {
                indentStatus = 1;
            } else if (state.lineIndent === parentIndent) {
                indentStatus = 0;
            } else if (state.lineIndent < parentIndent) {
                indentStatus = -1;
            }
        }
    }
    if (indentStatus === 1) {
        while(readTagProperty(state) || readAnchorProperty(state)){
            if (skipSeparationSpace(state, true, -1)) {
                atNewLine = true;
                allowBlockCollections = allowBlockStyles;
                if (state.lineIndent > parentIndent) {
                    indentStatus = 1;
                } else if (state.lineIndent === parentIndent) {
                    indentStatus = 0;
                } else if (state.lineIndent < parentIndent) {
                    indentStatus = -1;
                }
            } else {
                allowBlockCollections = false;
            }
        }
    }
    if (allowBlockCollections) {
        allowBlockCollections = atNewLine || allowCompact;
    }
    if (indentStatus === 1 || 4 === nodeContext) {
        const cond = 1 === nodeContext || 2 === nodeContext;
        flowIndent = cond ? parentIndent : parentIndent + 1;
        blockIndent = state.position - state.lineStart;
        if (indentStatus === 1) {
            if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
                hasContent = true;
            } else {
                if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
                    hasContent = true;
                } else if (readAlias(state)) {
                    hasContent = true;
                    if (state.tag !== null || state.anchor !== null) {
                        return throwError(state, "alias node should not have Any properties");
                    }
                } else if (readPlainScalar(state, flowIndent, 1 === nodeContext)) {
                    hasContent = true;
                    if (state.tag === null) {
                        state.tag = "?";
                    }
                }
                if (state.anchor !== null && typeof state.anchorMap !== "undefined") {
                    state.anchorMap[state.anchor] = state.result;
                }
            }
        } else if (indentStatus === 0) {
            hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
        }
    }
    if (state.tag !== null && state.tag !== "!") {
        if (state.tag === "?") {
            for(let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex++){
                type = state.implicitTypes[typeIndex];
                if (type.resolve(state.result)) {
                    state.result = type.construct(state.result);
                    state.tag = type.tag;
                    if (state.anchor !== null && typeof state.anchorMap !== "undefined") {
                        state.anchorMap[state.anchor] = state.result;
                    }
                    break;
                }
            }
        } else if (hasOwn2(state.typeMap[state.kind || "fallback"], state.tag)) {
            type = state.typeMap[state.kind || "fallback"][state.tag];
            if (state.result !== null && type.kind !== state.kind) {
                return throwError(state, `unacceptable node kind for !<${state.tag}> tag; it should be "${type.kind}", not "${state.kind}"`);
            }
            if (!type.resolve(state.result)) {
                return throwError(state, `cannot resolve a node with !<${state.tag}> explicit tag`);
            } else {
                state.result = type.construct(state.result);
                if (state.anchor !== null && typeof state.anchorMap !== "undefined") {
                    state.anchorMap[state.anchor] = state.result;
                }
            }
        } else {
            return throwError(state, `unknown tag !<${state.tag}>`);
        }
    }
    if (state.listener && state.listener !== null) {
        state.listener("close", state);
    }
    return state.tag !== null || state.anchor !== null || hasContent;
}
function readDocument(state) {
    const documentStart = state.position;
    let position, directiveName, directiveArgs, hasDirectives = false, ch;
    state.version = null;
    state.checkLineBreaks = state.legacy;
    state.tagMap = {};
    state.anchorMap = {};
    while((ch = state.input.charCodeAt(state.position)) !== 0){
        skipSeparationSpace(state, true, -1);
        ch = state.input.charCodeAt(state.position);
        if (state.lineIndent > 0 || ch !== 0x25) {
            break;
        }
        hasDirectives = true;
        ch = state.input.charCodeAt(++state.position);
        position = state.position;
        while(ch !== 0 && !isWsOrEol(ch)){
            ch = state.input.charCodeAt(++state.position);
        }
        directiveName = state.input.slice(position, state.position);
        directiveArgs = [];
        if (directiveName.length < 1) {
            return throwError(state, "directive name must not be less than one character in length");
        }
        while(ch !== 0){
            while(isWhiteSpace(ch)){
                ch = state.input.charCodeAt(++state.position);
            }
            if (ch === 0x23) {
                do {
                    ch = state.input.charCodeAt(++state.position);
                }while (ch !== 0 && !isEOL(ch))
                break;
            }
            if (isEOL(ch)) break;
            position = state.position;
            while(ch !== 0 && !isWsOrEol(ch)){
                ch = state.input.charCodeAt(++state.position);
            }
            directiveArgs.push(state.input.slice(position, state.position));
        }
        if (ch !== 0) readLineBreak(state);
        if (hasOwn2(directiveHandlers, directiveName)) {
            directiveHandlers[directiveName](state, directiveName, ...directiveArgs);
        } else {
            throwWarning(state, `unknown document directive "${directiveName}"`);
        }
    }
    skipSeparationSpace(state, true, -1);
    if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 0x2d && state.input.charCodeAt(state.position + 1) === 0x2d && state.input.charCodeAt(state.position + 2) === 0x2d) {
        state.position += 3;
        skipSeparationSpace(state, true, -1);
    } else if (hasDirectives) {
        return throwError(state, "directives end mark is expected");
    }
    composeNode(state, state.lineIndent - 1, 4, false, true);
    skipSeparationSpace(state, true, -1);
    if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
        throwWarning(state, "non-ASCII line breaks are interpreted as content");
    }
    state.documents.push(state.result);
    if (state.position === state.lineStart && testDocumentSeparator(state)) {
        if (state.input.charCodeAt(state.position) === 0x2e) {
            state.position += 3;
            skipSeparationSpace(state, true, -1);
        }
        return;
    }
    if (state.position < state.length - 1) {
        return throwError(state, "end of the stream or a document separator is expected");
    } else {
        return;
    }
}
function loadDocuments(input, options) {
    input = String(input);
    options = options || {};
    if (input.length !== 0) {
        if (input.charCodeAt(input.length - 1) !== 0x0a && input.charCodeAt(input.length - 1) !== 0x0d) {
            input += "\n";
        }
        if (input.charCodeAt(0) === 0xfeff) {
            input = input.slice(1);
        }
    }
    const state = new LoaderState(input, options);
    state.input += "\0";
    while(state.input.charCodeAt(state.position) === 0x20){
        state.lineIndent += 1;
        state.position += 1;
    }
    while(state.position < state.length - 1){
        readDocument(state);
    }
    return state.documents;
}
function load(input, options) {
    const documents = loadDocuments(input, options);
    if (documents.length === 0) {
        return;
    }
    if (documents.length === 1) {
        return documents[0];
    }
    throw new YAMLError("expected a single document in the stream, but found more");
}
function parse3(content, options) {
    return load(content, options);
}
const { hasOwn: hasOwn3  } = Object;
function compileStyleMap(schema, map) {
    if (typeof map === "undefined" || map === null) return {};
    let type;
    const result1 = {};
    const keys = Object.keys(map);
    let tag, style;
    for(let index = 0, length = keys.length; index < length; index += 1){
        tag = keys[index];
        style = String(map[tag]);
        if (tag.slice(0, 2) === "!!") {
            tag = `tag:yaml.org,2002:${tag.slice(2)}`;
        }
        type = schema.compiledTypeMap.fallback[tag];
        if (type && typeof type.styleAliases !== "undefined" && hasOwn3(type.styleAliases, style)) {
            style = type.styleAliases[style];
        }
        result1[tag] = style;
    }
    return result1;
}
class DumperState extends State {
    indent;
    noArrayIndent;
    skipInvalid;
    flowLevel;
    sortKeys;
    lineWidth;
    noRefs;
    noCompatMode;
    condenseFlow;
    implicitTypes;
    explicitTypes;
    tag = null;
    result = "";
    duplicates = [];
    usedDuplicates = [];
    styleMap;
    dump;
    constructor({ schema , indent =2 , noArrayIndent =false , skipInvalid =false , flowLevel =-1 , styles =null , sortKeys =false , lineWidth =80 , noRefs =false , noCompatMode =false , condenseFlow =false  }){
        super(schema);
        this.indent = Math.max(1, indent);
        this.noArrayIndent = noArrayIndent;
        this.skipInvalid = skipInvalid;
        this.flowLevel = flowLevel;
        this.styleMap = compileStyleMap(this.schema, styles);
        this.sortKeys = sortKeys;
        this.lineWidth = lineWidth;
        this.noRefs = noRefs;
        this.noCompatMode = noCompatMode;
        this.condenseFlow = condenseFlow;
        this.implicitTypes = this.schema.compiledImplicit;
        this.explicitTypes = this.schema.compiledExplicit;
    }
}
const _toString2 = Object.prototype.toString;
const { hasOwn: hasOwn4  } = Object;
const ESCAPE_SEQUENCES = {};
ESCAPE_SEQUENCES[0x00] = "\\0";
ESCAPE_SEQUENCES[0x07] = "\\a";
ESCAPE_SEQUENCES[0x08] = "\\b";
ESCAPE_SEQUENCES[0x09] = "\\t";
ESCAPE_SEQUENCES[0x0a] = "\\n";
ESCAPE_SEQUENCES[0x0b] = "\\v";
ESCAPE_SEQUENCES[0x0c] = "\\f";
ESCAPE_SEQUENCES[0x0d] = "\\r";
ESCAPE_SEQUENCES[0x1b] = "\\e";
ESCAPE_SEQUENCES[0x22] = '\\"';
ESCAPE_SEQUENCES[0x5c] = "\\\\";
ESCAPE_SEQUENCES[0x85] = "\\N";
ESCAPE_SEQUENCES[0xa0] = "\\_";
ESCAPE_SEQUENCES[0x2028] = "\\L";
ESCAPE_SEQUENCES[0x2029] = "\\P";
const DEPRECATED_BOOLEANS_SYNTAX = [
    "y",
    "Y",
    "yes",
    "Yes",
    "YES",
    "on",
    "On",
    "ON",
    "n",
    "N",
    "no",
    "No",
    "NO",
    "off",
    "Off",
    "OFF", 
];
function encodeHex(character) {
    const string = character.toString(16).toUpperCase();
    let handle;
    let length;
    if (character <= 0xff) {
        handle = "x";
        length = 2;
    } else if (character <= 0xffff) {
        handle = "u";
        length = 4;
    } else if (character <= 0xffffffff) {
        handle = "U";
        length = 8;
    } else {
        throw new YAMLError("code point within a string may not be greater than 0xFFFFFFFF");
    }
    return `\\${handle}${repeat("0", length - string.length)}${string}`;
}
function indentString(string, spaces) {
    const ind = repeat(" ", spaces), length = string.length;
    let position = 0, next = -1, result1 = "", line;
    while(position < length){
        next = string.indexOf("\n", position);
        if (next === -1) {
            line = string.slice(position);
            position = length;
        } else {
            line = string.slice(position, next + 1);
            position = next + 1;
        }
        if (line.length && line !== "\n") result1 += ind;
        result1 += line;
    }
    return result1;
}
function generateNextLine(state, level) {
    return `\n${repeat(" ", state.indent * level)}`;
}
function testImplicitResolving(state, str) {
    let type;
    for(let index = 0, length = state.implicitTypes.length; index < length; index += 1){
        type = state.implicitTypes[index];
        if (type.resolve(str)) {
            return true;
        }
    }
    return false;
}
function isWhitespace(c) {
    return c === 0x20 || c === 0x09;
}
function isPrintable(c) {
    return 0x00020 <= c && c <= 0x00007e || 0x000a1 <= c && c <= 0x00d7ff && c !== 0x2028 && c !== 0x2029 || 0x0e000 <= c && c <= 0x00fffd && c !== 0xfeff || 0x10000 <= c && c <= 0x10ffff;
}
function isPlainSafe(c) {
    return isPrintable(c) && c !== 0xfeff && c !== 0x2c && c !== 0x5b && c !== 0x5d && c !== 0x7b && c !== 0x7d && c !== 0x3a && c !== 0x23;
}
function isPlainSafeFirst(c) {
    return isPrintable(c) && c !== 0xfeff && !isWhitespace(c) && c !== 0x2d && c !== 0x3f && c !== 0x3a && c !== 0x2c && c !== 0x5b && c !== 0x5d && c !== 0x7b && c !== 0x7d && c !== 0x23 && c !== 0x26 && c !== 0x2a && c !== 0x21 && c !== 0x7c && c !== 0x3e && c !== 0x27 && c !== 0x22 && c !== 0x25 && c !== 0x40 && c !== 0x60;
}
function needIndentIndicator(string) {
    const leadingSpaceRe = /^\n* /;
    return leadingSpaceRe.test(string);
}
const STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5;
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {
    const shouldTrackWidth = lineWidth !== -1;
    let hasLineBreak = false, hasFoldableLine = false, previousLineBreak = -1, plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1));
    let __char, i1;
    if (singleLineOnly) {
        for(i1 = 0; i1 < string.length; i1++){
            __char = string.charCodeAt(i1);
            if (!isPrintable(__char)) {
                return 5;
            }
            plain = plain && isPlainSafe(__char);
        }
    } else {
        for(i1 = 0; i1 < string.length; i1++){
            __char = string.charCodeAt(i1);
            if (__char === 0x0a) {
                hasLineBreak = true;
                if (shouldTrackWidth) {
                    hasFoldableLine = hasFoldableLine || i1 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
                    previousLineBreak = i1;
                }
            } else if (!isPrintable(__char)) {
                return 5;
            }
            plain = plain && isPlainSafe(__char);
        }
        hasFoldableLine = hasFoldableLine || shouldTrackWidth && i1 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
    }
    if (!hasLineBreak && !hasFoldableLine) {
        return plain && !testAmbiguousType(string) ? 1 : 2;
    }
    if (indentPerLevel > 9 && needIndentIndicator(string)) {
        return 5;
    }
    return hasFoldableLine ? 4 : 3;
}
function foldLine(line, width) {
    if (line === "" || line[0] === " ") return line;
    const breakRe = / [^ ]/g;
    let match;
    let start = 0, end, curr = 0, next = 0;
    let result1 = "";
    while(match = breakRe.exec(line)){
        next = match.index;
        if (next - start > width) {
            end = curr > start ? curr : next;
            result1 += `\n${line.slice(start, end)}`;
            start = end + 1;
        }
        curr = next;
    }
    result1 += "\n";
    if (line.length - start > width && curr > start) {
        result1 += `${line.slice(start, curr)}\n${line.slice(curr + 1)}`;
    } else {
        result1 += line.slice(start);
    }
    return result1.slice(1);
}
function dropEndingNewline(string) {
    return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
}
function foldString(string, width) {
    const lineRe = /(\n+)([^\n]*)/g;
    let result1 = (()=>{
        let nextLF = string.indexOf("\n");
        nextLF = nextLF !== -1 ? nextLF : string.length;
        lineRe.lastIndex = nextLF;
        return foldLine(string.slice(0, nextLF), width);
    })();
    let prevMoreIndented = string[0] === "\n" || string[0] === " ";
    let moreIndented;
    let match;
    while(match = lineRe.exec(string)){
        const prefix = match[1], line = match[2];
        moreIndented = line[0] === " ";
        result1 += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
        prevMoreIndented = moreIndented;
    }
    return result1;
}
function escapeString(string) {
    let result1 = "";
    let __char, nextChar;
    let escapeSeq;
    for(let i1 = 0; i1 < string.length; i1++){
        __char = string.charCodeAt(i1);
        if (__char >= 0xd800 && __char <= 0xdbff) {
            nextChar = string.charCodeAt(i1 + 1);
            if (nextChar >= 0xdc00 && nextChar <= 0xdfff) {
                result1 += encodeHex((__char - 0xd800) * 0x400 + nextChar - 0xdc00 + 0x10000);
                i1++;
                continue;
            }
        }
        escapeSeq = ESCAPE_SEQUENCES[__char];
        result1 += !escapeSeq && isPrintable(__char) ? string[i1] : escapeSeq || encodeHex(__char);
    }
    return result1;
}
function blockHeader(string, indentPerLevel) {
    const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
    const clip = string[string.length - 1] === "\n";
    const keep = clip && (string[string.length - 2] === "\n" || string === "\n");
    const chomp = keep ? "+" : clip ? "" : "-";
    return `${indentIndicator}${chomp}\n`;
}
function writeScalar(state, string, level, iskey) {
    state.dump = (()=>{
        if (string.length === 0) {
            return "''";
        }
        if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {
            return `'${string}'`;
        }
        const indent = state.indent * Math.max(1, level);
        const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
        const singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
        function testAmbiguity(str) {
            return testImplicitResolving(state, str);
        }
        switch(chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)){
            case STYLE_PLAIN:
                return string;
            case STYLE_SINGLE:
                return `'${string.replace(/'/g, "''")}'`;
            case STYLE_LITERAL:
                return `|${blockHeader(string, state.indent)}${dropEndingNewline(indentString(string, indent))}`;
            case STYLE_FOLDED:
                return `>${blockHeader(string, state.indent)}${dropEndingNewline(indentString(foldString(string, lineWidth), indent))}`;
            case STYLE_DOUBLE:
                return `"${escapeString(string)}"`;
            default:
                throw new YAMLError("impossible error: invalid scalar style");
        }
    })();
}
function writeFlowSequence(state, level, object) {
    let _result = "";
    const _tag = state.tag;
    for(let index = 0, length = object.length; index < length; index += 1){
        if (writeNode(state, level, object[index], false, false)) {
            if (index !== 0) _result += `,${!state.condenseFlow ? " " : ""}`;
            _result += state.dump;
        }
    }
    state.tag = _tag;
    state.dump = `[${_result}]`;
}
function writeBlockSequence(state, level, object, compact = false) {
    let _result = "";
    const _tag = state.tag;
    for(let index = 0, length = object.length; index < length; index += 1){
        if (writeNode(state, level + 1, object[index], true, true)) {
            if (!compact || index !== 0) {
                _result += generateNextLine(state, level);
            }
            if (state.dump && 0x0a === state.dump.charCodeAt(0)) {
                _result += "-";
            } else {
                _result += "- ";
            }
            _result += state.dump;
        }
    }
    state.tag = _tag;
    state.dump = _result || "[]";
}
function writeFlowMapping(state, level, object) {
    let _result = "";
    const _tag = state.tag, objectKeyList = Object.keys(object);
    let pairBuffer, objectKey, objectValue;
    for(let index = 0, length = objectKeyList.length; index < length; index += 1){
        pairBuffer = state.condenseFlow ? '"' : "";
        if (index !== 0) pairBuffer += ", ";
        objectKey = objectKeyList[index];
        objectValue = object[objectKey];
        if (!writeNode(state, level, objectKey, false, false)) {
            continue;
        }
        if (state.dump.length > 1024) pairBuffer += "? ";
        pairBuffer += `${state.dump}${state.condenseFlow ? '"' : ""}:${state.condenseFlow ? "" : " "}`;
        if (!writeNode(state, level, objectValue, false, false)) {
            continue;
        }
        pairBuffer += state.dump;
        _result += pairBuffer;
    }
    state.tag = _tag;
    state.dump = `{${_result}}`;
}
function writeBlockMapping(state, level, object, compact = false) {
    const _tag = state.tag, objectKeyList = Object.keys(object);
    let _result = "";
    if (state.sortKeys === true) {
        objectKeyList.sort();
    } else if (typeof state.sortKeys === "function") {
        objectKeyList.sort(state.sortKeys);
    } else if (state.sortKeys) {
        throw new YAMLError("sortKeys must be a boolean or a function");
    }
    let pairBuffer = "", objectKey, objectValue, explicitPair;
    for(let index = 0, length = objectKeyList.length; index < length; index += 1){
        pairBuffer = "";
        if (!compact || index !== 0) {
            pairBuffer += generateNextLine(state, level);
        }
        objectKey = objectKeyList[index];
        objectValue = object[objectKey];
        if (!writeNode(state, level + 1, objectKey, true, true, true)) {
            continue;
        }
        explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
        if (explicitPair) {
            if (state.dump && 0x0a === state.dump.charCodeAt(0)) {
                pairBuffer += "?";
            } else {
                pairBuffer += "? ";
            }
        }
        pairBuffer += state.dump;
        if (explicitPair) {
            pairBuffer += generateNextLine(state, level);
        }
        if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
            continue;
        }
        if (state.dump && 0x0a === state.dump.charCodeAt(0)) {
            pairBuffer += ":";
        } else {
            pairBuffer += ": ";
        }
        pairBuffer += state.dump;
        _result += pairBuffer;
    }
    state.tag = _tag;
    state.dump = _result || "{}";
}
function detectType(state, object, explicit = false) {
    const typeList = explicit ? state.explicitTypes : state.implicitTypes;
    let type;
    let style;
    let _result;
    for(let index = 0, length = typeList.length; index < length; index += 1){
        type = typeList[index];
        if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
            state.tag = explicit ? type.tag : "?";
            if (type.represent) {
                style = state.styleMap[type.tag] || type.defaultStyle;
                if (_toString2.call(type.represent) === "[object Function]") {
                    _result = type.represent(object, style);
                } else if (hasOwn4(type.represent, style)) {
                    _result = type.represent[style](object, style);
                } else {
                    throw new YAMLError(`!<${type.tag}> tag resolver accepts not "${style}" style`);
                }
                state.dump = _result;
            }
            return true;
        }
    }
    return false;
}
function writeNode(state, level, object, block, compact, iskey = false) {
    state.tag = null;
    state.dump = object;
    if (!detectType(state, object, false)) {
        detectType(state, object, true);
    }
    const type = _toString2.call(state.dump);
    if (block) {
        block = state.flowLevel < 0 || state.flowLevel > level;
    }
    const objectOrArray = type === "[object Object]" || type === "[object Array]";
    let duplicateIndex = -1;
    let duplicate = false;
    if (objectOrArray) {
        duplicateIndex = state.duplicates.indexOf(object);
        duplicate = duplicateIndex !== -1;
    }
    if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
        compact = false;
    }
    if (duplicate && state.usedDuplicates[duplicateIndex]) {
        state.dump = `*ref_${duplicateIndex}`;
    } else {
        if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
            state.usedDuplicates[duplicateIndex] = true;
        }
        if (type === "[object Object]") {
            if (block && Object.keys(state.dump).length !== 0) {
                writeBlockMapping(state, level, state.dump, compact);
                if (duplicate) {
                    state.dump = `&ref_${duplicateIndex}${state.dump}`;
                }
            } else {
                writeFlowMapping(state, level, state.dump);
                if (duplicate) {
                    state.dump = `&ref_${duplicateIndex} ${state.dump}`;
                }
            }
        } else if (type === "[object Array]") {
            const arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level;
            if (block && state.dump.length !== 0) {
                writeBlockSequence(state, arrayLevel, state.dump, compact);
                if (duplicate) {
                    state.dump = `&ref_${duplicateIndex}${state.dump}`;
                }
            } else {
                writeFlowSequence(state, arrayLevel, state.dump);
                if (duplicate) {
                    state.dump = `&ref_${duplicateIndex} ${state.dump}`;
                }
            }
        } else if (type === "[object String]") {
            if (state.tag !== "?") {
                writeScalar(state, state.dump, level, iskey);
            }
        } else {
            if (state.skipInvalid) return false;
            throw new YAMLError(`unacceptable kind of an object to dump ${type}`);
        }
        if (state.tag !== null && state.tag !== "?") {
            state.dump = `!<${state.tag}> ${state.dump}`;
        }
    }
    return true;
}
function inspectNode(object, objects, duplicatesIndexes) {
    if (object !== null && typeof object === "object") {
        const index = objects.indexOf(object);
        if (index !== -1) {
            if (duplicatesIndexes.indexOf(index) === -1) {
                duplicatesIndexes.push(index);
            }
        } else {
            objects.push(object);
            if (Array.isArray(object)) {
                for(let idx = 0, length = object.length; idx < length; idx += 1){
                    inspectNode(object[idx], objects, duplicatesIndexes);
                }
            } else {
                const objectKeyList = Object.keys(object);
                for(let idx1 = 0, length1 = objectKeyList.length; idx1 < length1; idx1 += 1){
                    inspectNode(object[objectKeyList[idx1]], objects, duplicatesIndexes);
                }
            }
        }
    }
}
function getDuplicateReferences(object, state) {
    const objects = [], duplicatesIndexes = [];
    inspectNode(object, objects, duplicatesIndexes);
    const length = duplicatesIndexes.length;
    for(let index = 0; index < length; index += 1){
        state.duplicates.push(objects[duplicatesIndexes[index]]);
    }
    state.usedDuplicates = Array.from({
        length
    });
}
function dump(input, options) {
    options = options || {};
    const state = new DumperState(options);
    if (!state.noRefs) getDuplicateReferences(input, state);
    if (writeNode(state, 0, input, true, true)) return `${state.dump}\n`;
    return "";
}
function stringify(obj, options) {
    return dump(obj, options);
}
var State1;
(function(State) {
    State[State["PASSTHROUGH"] = 0] = "PASSTHROUGH";
    State[State["PERCENT"] = 1] = "PERCENT";
    State[State["POSITIONAL"] = 2] = "POSITIONAL";
    State[State["PRECISION"] = 3] = "PRECISION";
    State[State["WIDTH"] = 4] = "WIDTH";
})(State1 || (State1 = {}));
var WorP;
(function(WorP) {
    WorP[WorP["WIDTH"] = 0] = "WIDTH";
    WorP[WorP["PRECISION"] = 1] = "PRECISION";
})(WorP || (WorP = {}));
class Flags {
    plus;
    dash;
    sharp;
    space;
    zero;
    lessthan;
    width = -1;
    precision = -1;
}
const min = Math.min;
const UNICODE_REPLACEMENT_CHARACTER = "\ufffd";
const FLOAT_REGEXP = /(-?)(\d)\.?(\d*)e([+-])(\d+)/;
var F;
(function(F) {
    F[F["sign"] = 1] = "sign";
    F[F["mantissa"] = 2] = "mantissa";
    F[F["fractional"] = 3] = "fractional";
    F[F["esign"] = 4] = "esign";
    F[F["exponent"] = 5] = "exponent";
})(F || (F = {}));
class Printf {
    format;
    args;
    i;
    state = State1.PASSTHROUGH;
    verb = "";
    buf = "";
    argNum = 0;
    flags = new Flags();
    haveSeen;
    tmpError;
    constructor(format, ...args){
        this.format = format;
        this.args = args;
        this.haveSeen = Array.from({
            length: args.length
        });
        this.i = 0;
    }
    doPrintf() {
        for(; this.i < this.format.length; ++this.i){
            const c = this.format[this.i];
            switch(this.state){
                case State1.PASSTHROUGH:
                    if (c === "%") {
                        this.state = State1.PERCENT;
                    } else {
                        this.buf += c;
                    }
                    break;
                case State1.PERCENT:
                    if (c === "%") {
                        this.buf += c;
                        this.state = State1.PASSTHROUGH;
                    } else {
                        this.handleFormat();
                    }
                    break;
                default:
                    throw Error("Should be unreachable, certainly a bug in the lib.");
            }
        }
        let extras = false;
        let err = "%!(EXTRA";
        for(let i1 = 0; i1 !== this.haveSeen.length; ++i1){
            if (!this.haveSeen[i1]) {
                extras = true;
                err += ` '${Deno.inspect(this.args[i1])}'`;
            }
        }
        err += ")";
        if (extras) {
            this.buf += err;
        }
        return this.buf;
    }
    handleFormat() {
        this.flags = new Flags();
        const flags = this.flags;
        for(; this.i < this.format.length; ++this.i){
            const c = this.format[this.i];
            switch(this.state){
                case State1.PERCENT:
                    switch(c){
                        case "[":
                            this.handlePositional();
                            this.state = State1.POSITIONAL;
                            break;
                        case "+":
                            flags.plus = true;
                            break;
                        case "<":
                            flags.lessthan = true;
                            break;
                        case "-":
                            flags.dash = true;
                            flags.zero = false;
                            break;
                        case "#":
                            flags.sharp = true;
                            break;
                        case " ":
                            flags.space = true;
                            break;
                        case "0":
                            flags.zero = !flags.dash;
                            break;
                        default:
                            if ("1" <= c && c <= "9" || c === "." || c === "*") {
                                if (c === ".") {
                                    this.flags.precision = 0;
                                    this.state = State1.PRECISION;
                                    this.i++;
                                } else {
                                    this.state = State1.WIDTH;
                                }
                                this.handleWidthAndPrecision(flags);
                            } else {
                                this.handleVerb();
                                return;
                            }
                    }
                    break;
                case State1.POSITIONAL:
                    if (c === "*") {
                        const worp = this.flags.precision === -1 ? WorP.WIDTH : WorP.PRECISION;
                        this.handleWidthOrPrecisionRef(worp);
                        this.state = State1.PERCENT;
                        break;
                    } else {
                        this.handleVerb();
                        return;
                    }
                default:
                    throw new Error(`Should not be here ${this.state}, library bug!`);
            }
        }
    }
    handleWidthOrPrecisionRef(wOrP) {
        if (this.argNum >= this.args.length) {
            return;
        }
        const arg = this.args[this.argNum];
        this.haveSeen[this.argNum] = true;
        if (typeof arg === "number") {
            switch(wOrP){
                case WorP.WIDTH:
                    this.flags.width = arg;
                    break;
                default:
                    this.flags.precision = arg;
            }
        } else {
            const tmp = wOrP === WorP.WIDTH ? "WIDTH" : "PREC";
            this.tmpError = `%!(BAD ${tmp} '${this.args[this.argNum]}')`;
        }
        this.argNum++;
    }
    handleWidthAndPrecision(flags) {
        const fmt = this.format;
        for(; this.i !== this.format.length; ++this.i){
            const c = fmt[this.i];
            switch(this.state){
                case State1.WIDTH:
                    switch(c){
                        case ".":
                            this.flags.precision = 0;
                            this.state = State1.PRECISION;
                            break;
                        case "*":
                            this.handleWidthOrPrecisionRef(WorP.WIDTH);
                            break;
                        default:
                            {
                                const val = parseInt(c);
                                if (isNaN(val)) {
                                    this.i--;
                                    this.state = State1.PERCENT;
                                    return;
                                }
                                flags.width = flags.width == -1 ? 0 : flags.width;
                                flags.width *= 10;
                                flags.width += val;
                            }
                    }
                    break;
                case State1.PRECISION:
                    {
                        if (c === "*") {
                            this.handleWidthOrPrecisionRef(WorP.PRECISION);
                            break;
                        }
                        const val1 = parseInt(c);
                        if (isNaN(val1)) {
                            this.i--;
                            this.state = State1.PERCENT;
                            return;
                        }
                        flags.precision *= 10;
                        flags.precision += val1;
                        break;
                    }
                default:
                    throw new Error("can't be here. bug.");
            }
        }
    }
    handlePositional() {
        if (this.format[this.i] !== "[") {
            throw new Error("Can't happen? Bug.");
        }
        let positional = 0;
        const format = this.format;
        this.i++;
        let err = false;
        for(; this.i !== this.format.length; ++this.i){
            if (format[this.i] === "]") {
                break;
            }
            positional *= 10;
            const val = parseInt(format[this.i]);
            if (isNaN(val)) {
                this.tmpError = "%!(BAD INDEX)";
                err = true;
            }
            positional += val;
        }
        if (positional - 1 >= this.args.length) {
            this.tmpError = "%!(BAD INDEX)";
            err = true;
        }
        this.argNum = err ? this.argNum : positional - 1;
        return;
    }
    handleLessThan() {
        const arg = this.args[this.argNum];
        if ((arg || {}).constructor.name !== "Array") {
            throw new Error(`arg ${arg} is not an array. Todo better error handling`);
        }
        let str = "[ ";
        for(let i1 = 0; i1 !== arg.length; ++i1){
            if (i1 !== 0) str += ", ";
            str += this._handleVerb(arg[i1]);
        }
        return str + " ]";
    }
    handleVerb() {
        const verb = this.format[this.i];
        this.verb = verb;
        if (this.tmpError) {
            this.buf += this.tmpError;
            this.tmpError = undefined;
            if (this.argNum < this.haveSeen.length) {
                this.haveSeen[this.argNum] = true;
            }
        } else if (this.args.length <= this.argNum) {
            this.buf += `%!(MISSING '${verb}')`;
        } else {
            const arg = this.args[this.argNum];
            this.haveSeen[this.argNum] = true;
            if (this.flags.lessthan) {
                this.buf += this.handleLessThan();
            } else {
                this.buf += this._handleVerb(arg);
            }
        }
        this.argNum++;
        this.state = State1.PASSTHROUGH;
    }
    _handleVerb(arg) {
        switch(this.verb){
            case "t":
                return this.pad(arg.toString());
            case "b":
                return this.fmtNumber(arg, 2);
            case "c":
                return this.fmtNumberCodePoint(arg);
            case "d":
                return this.fmtNumber(arg, 10);
            case "o":
                return this.fmtNumber(arg, 8);
            case "x":
                return this.fmtHex(arg);
            case "X":
                return this.fmtHex(arg, true);
            case "e":
                return this.fmtFloatE(arg);
            case "E":
                return this.fmtFloatE(arg, true);
            case "f":
            case "F":
                return this.fmtFloatF(arg);
            case "g":
                return this.fmtFloatG(arg);
            case "G":
                return this.fmtFloatG(arg, true);
            case "s":
                return this.fmtString(arg);
            case "T":
                return this.fmtString(typeof arg);
            case "v":
                return this.fmtV(arg);
            case "j":
                return this.fmtJ(arg);
            default:
                return `%!(BAD VERB '${this.verb}')`;
        }
    }
    pad(s) {
        const padding = this.flags.zero ? "0" : " ";
        if (this.flags.dash) {
            return s.padEnd(this.flags.width, padding);
        }
        return s.padStart(this.flags.width, padding);
    }
    padNum(nStr, neg) {
        let sign;
        if (neg) {
            sign = "-";
        } else if (this.flags.plus || this.flags.space) {
            sign = this.flags.plus ? "+" : " ";
        } else {
            sign = "";
        }
        const zero = this.flags.zero;
        if (!zero) {
            nStr = sign + nStr;
        }
        const pad = zero ? "0" : " ";
        const len = zero ? this.flags.width - sign.length : this.flags.width;
        if (this.flags.dash) {
            nStr = nStr.padEnd(len, pad);
        } else {
            nStr = nStr.padStart(len, pad);
        }
        if (zero) {
            nStr = sign + nStr;
        }
        return nStr;
    }
    fmtNumber(n, radix, upcase = false) {
        let num = Math.abs(n).toString(radix);
        const prec = this.flags.precision;
        if (prec !== -1) {
            this.flags.zero = false;
            num = n === 0 && prec === 0 ? "" : num;
            while(num.length < prec){
                num = "0" + num;
            }
        }
        let prefix = "";
        if (this.flags.sharp) {
            switch(radix){
                case 2:
                    prefix += "0b";
                    break;
                case 8:
                    prefix += num.startsWith("0") ? "" : "0";
                    break;
                case 16:
                    prefix += "0x";
                    break;
                default:
                    throw new Error("cannot handle base: " + radix);
            }
        }
        num = num.length === 0 ? num : prefix + num;
        if (upcase) {
            num = num.toUpperCase();
        }
        return this.padNum(num, n < 0);
    }
    fmtNumberCodePoint(n) {
        let s = "";
        try {
            s = String.fromCodePoint(n);
        } catch  {
            s = UNICODE_REPLACEMENT_CHARACTER;
        }
        return this.pad(s);
    }
    fmtFloatSpecial(n) {
        if (isNaN(n)) {
            this.flags.zero = false;
            return this.padNum("NaN", false);
        }
        if (n === Number.POSITIVE_INFINITY) {
            this.flags.zero = false;
            this.flags.plus = true;
            return this.padNum("Inf", false);
        }
        if (n === Number.NEGATIVE_INFINITY) {
            this.flags.zero = false;
            return this.padNum("Inf", true);
        }
        return "";
    }
    roundFractionToPrecision(fractional, precision) {
        let round = false;
        if (fractional.length > precision) {
            fractional = "1" + fractional;
            let tmp = parseInt(fractional.substr(0, precision + 2)) / 10;
            tmp = Math.round(tmp);
            fractional = Math.floor(tmp).toString();
            round = fractional[0] === "2";
            fractional = fractional.substr(1);
        } else {
            while(fractional.length < precision){
                fractional += "0";
            }
        }
        return [
            fractional,
            round
        ];
    }
    fmtFloatE(n, upcase = false) {
        const special = this.fmtFloatSpecial(n);
        if (special !== "") {
            return special;
        }
        const m = n.toExponential().match(FLOAT_REGEXP);
        if (!m) {
            throw Error("can't happen, bug");
        }
        let fractional = m[F.fractional];
        const precision = this.flags.precision !== -1 ? this.flags.precision : 6;
        let rounding = false;
        [fractional, rounding] = this.roundFractionToPrecision(fractional, precision);
        let e = m[F.exponent];
        let esign = m[F.esign];
        let mantissa = parseInt(m[F.mantissa]);
        if (rounding) {
            mantissa += 1;
            if (10 <= mantissa) {
                mantissa = 1;
                const r = parseInt(esign + e) + 1;
                e = r.toString();
                esign = r < 0 ? "-" : "+";
            }
        }
        e = e.length == 1 ? "0" + e : e;
        const val = `${mantissa}.${fractional}${upcase ? "E" : "e"}${esign}${e}`;
        return this.padNum(val, n < 0);
    }
    fmtFloatF(n) {
        const special = this.fmtFloatSpecial(n);
        if (special !== "") {
            return special;
        }
        function expandNumber(n) {
            if (Number.isSafeInteger(n)) {
                return n.toString() + ".";
            }
            const t = n.toExponential().split("e");
            let m = t[0].replace(".", "");
            const e = parseInt(t[1]);
            if (e < 0) {
                let nStr = "0.";
                for(let i1 = 0; i1 !== Math.abs(e) - 1; ++i1){
                    nStr += "0";
                }
                return nStr += m;
            } else {
                const splIdx = e + 1;
                while(m.length < splIdx){
                    m += "0";
                }
                return m.substr(0, splIdx) + "." + m.substr(splIdx);
            }
        }
        const val = expandNumber(Math.abs(n));
        const arr = val.split(".");
        let dig = arr[0];
        let fractional = arr[1];
        const precision = this.flags.precision !== -1 ? this.flags.precision : 6;
        let round = false;
        [fractional, round] = this.roundFractionToPrecision(fractional, precision);
        if (round) {
            dig = (parseInt(dig) + 1).toString();
        }
        return this.padNum(`${dig}.${fractional}`, n < 0);
    }
    fmtFloatG(n, upcase = false) {
        const special = this.fmtFloatSpecial(n);
        if (special !== "") {
            return special;
        }
        let P = this.flags.precision !== -1 ? this.flags.precision : 6;
        P = P === 0 ? 1 : P;
        const m = n.toExponential().match(FLOAT_REGEXP);
        if (!m) {
            throw Error("can't happen");
        }
        const X = parseInt(m[F.exponent]) * (m[F.esign] === "-" ? -1 : 1);
        let nStr = "";
        if (P > X && X >= -4) {
            this.flags.precision = P - (X + 1);
            nStr = this.fmtFloatF(n);
            if (!this.flags.sharp) {
                nStr = nStr.replace(/\.?0*$/, "");
            }
        } else {
            this.flags.precision = P - 1;
            nStr = this.fmtFloatE(n);
            if (!this.flags.sharp) {
                nStr = nStr.replace(/\.?0*e/, upcase ? "E" : "e");
            }
        }
        return nStr;
    }
    fmtString(s) {
        if (this.flags.precision !== -1) {
            s = s.substr(0, this.flags.precision);
        }
        return this.pad(s);
    }
    fmtHex(val, upper = false) {
        switch(typeof val){
            case "number":
                return this.fmtNumber(val, 16, upper);
            case "string":
                {
                    const sharp = this.flags.sharp && val.length !== 0;
                    let hex = sharp ? "0x" : "";
                    const prec = this.flags.precision;
                    const end = prec !== -1 ? min(prec, val.length) : val.length;
                    for(let i1 = 0; i1 !== end; ++i1){
                        if (i1 !== 0 && this.flags.space) {
                            hex += sharp ? " 0x" : " ";
                        }
                        const c = (val.charCodeAt(i1) & 0xff).toString(16);
                        hex += c.length === 1 ? `0${c}` : c;
                    }
                    if (upper) {
                        hex = hex.toUpperCase();
                    }
                    return this.pad(hex);
                }
            default:
                throw new Error("currently only number and string are implemented for hex");
        }
    }
    fmtV(val) {
        if (this.flags.sharp) {
            const options = this.flags.precision !== -1 ? {
                depth: this.flags.precision
            } : {};
            return this.pad(Deno.inspect(val, options));
        } else {
            const p = this.flags.precision;
            return p === -1 ? val.toString() : val.toString().substr(0, p);
        }
    }
    fmtJ(val) {
        return JSON.stringify(val);
    }
}
function glb(array, value, compare) {
    compare = compare || ((a, b)=>a - b);
    if (array.length === 0) {
        return -1;
    }
    if (array.length === 1) {
        if (compare(value, array[0]) < 0) {
            return -1;
        } else {
            return 0;
        }
    }
    let left = 0;
    let right = array.length - 1;
    const vLeft = array[left], vRight = array[right];
    if (compare(value, vRight) >= 0) {
        return right;
    }
    if (compare(value, vLeft) < 0) {
        return -1;
    }
    while(right - left > 1){
        const center = left + (right - left >> 1);
        const vCenter = array[center];
        const cmp = compare(value, vCenter);
        if (cmp < 0) {
            right = center;
        } else if (cmp === 0) {
            left = center;
        } else {
            left = center;
        }
    }
    return left;
}
let Deno3;
try {
    Deno3 = globalThis.Deno;
} catch (_e) {}
const noColor2 = typeof (Deno3 && Deno3.noColor) === "boolean" ? Deno3.noColor : true;
let enabled2 = !noColor2;
function code2(open, close) {
    return {
        open: `\x1b[${open.join(";")}m`,
        close: `\x1b[${close}m`,
        regexp: new RegExp(`\\x1b\\[${close}m`, "g")
    };
}
function run2(str, code) {
    return enabled2 ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}` : str;
}
function red2(str) {
    return run2(str, code2([
        31
    ], 39));
}
function blue2(str) {
    return run2(str, code2([
        34
    ], 39));
}
const ANSI_PATTERN2 = new RegExp([
    "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
    "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))", 
].join("|"), "g");
function stripColor2(string) {
    return string.replace(ANSI_PATTERN2, "");
}
function platformHasNonAsciiCharacters() {
    try {
        return Deno.build.os !== "windows";
    } catch (_e) {
        return false;
    }
}
function tidyverseInfo(msg) {
    if (platformHasNonAsciiCharacters()) {
        return `${blue2("ℹ")} ${msg}`;
    } else {
        return `${blue2("i")} ${msg}`;
    }
}
function tidyverseError(msg) {
    if (platformHasNonAsciiCharacters()) {
        return `${red2("✖")} ${msg}`;
    } else {
        return `${red2("x")} ${msg}`;
    }
}
function tidyverseFormatError(msg) {
    let { heading , error , info  } = msg;
    if (msg.location) {
        heading = `${locationString(msg.location)} ${heading}`;
    }
    if (msg.fileName) {
        heading = `In file ${msg.fileName}\n${heading}`;
    }
    const strings = [
        heading,
        msg.sourceContext,
        ...error.map(tidyverseError),
        ...Object.values(info).map(tidyverseInfo),
        "", 
    ];
    return strings.join("\n");
}
function quotedStringColor(msg) {
    return blue2(msg);
}
function addFileInfo(msg, src) {
    if (src.fileName !== undefined) {
        msg.fileName = src.fileName;
    }
}
function addInstancePathInfo(msg, instancePath) {
    if (instancePath.length) {
        const niceInstancePath = instancePath.map((s)=>blue2(String(s))).join(":");
        msg.info["instance-path-location"] = `The error happened in location ${niceInstancePath}.`;
    }
}
function locationString(loc) {
    const { start , end  } = loc;
    if (start.line === end.line) {
        if (start.column === end.column) {
            return `(line ${start.line + 1}, column ${start.column + 1})`;
        } else {
            return `(line ${start.line + 1}, columns ${start.column + 1}--${end.column + 1})`;
        }
    } else {
        return `(line ${start.line + 1}, column ${start.column + 1} through line ${end.line + 1}, column ${end.column + 1})`;
    }
}
function errorKey(err) {
    const positionKey = (pos)=>`${pos.line}-${pos.column}`;
    return `${err.fileName || ""}-${positionKey(err.location.start)}-${positionKey(err.location.end)}`;
}
function reportOnce(reporter, reportSet) {
    const errorsReported = reportSet || new Set();
    return (err)=>{
        const key = errorKey(err);
        if (errorsReported.has(key)) {
            return;
        }
        errorsReported.add(key);
        reporter(err);
    };
}
function lines(text) {
    return text.split(/\r?\n/);
}
function normalizeNewlines(text) {
    return lines(text).join("\n");
}
function* matchAll(text, regexp) {
    if (!regexp.global) {
        throw new Error("matchAll requires global regexps");
    }
    let match;
    while((match = regexp.exec(text)) !== null){
        yield match;
    }
}
function* lineOffsets(text) {
    yield 0;
    for (const match of matchAll(text, /\r?\n/g)){
        yield match.index + match[0].length;
    }
}
function indexToLineCol(text) {
    const offsets = Array.from(lineOffsets(text));
    return function(offset) {
        if (offset === 0) {
            return {
                line: 0,
                column: 0
            };
        }
        const startIndex = glb(offsets, offset);
        return {
            line: startIndex,
            column: offset - offsets[startIndex]
        };
    };
}
function lineColToIndex(text) {
    const offsets = Array.from(lineOffsets(text));
    return function(position) {
        return offsets[position.line] + position.column;
    };
}
function formatLineRange(text, firstLine, lastLine) {
    const lineWidth = Math.max(String(firstLine + 1).length, String(lastLine + 1).length);
    const pad = " ".repeat(lineWidth);
    const ls = lines(text);
    const result1 = [];
    for(let i1 = firstLine; i1 <= lastLine; ++i1){
        const numberStr = `${pad}${i1 + 1}: `.slice(-(lineWidth + 2));
        const lineStr = ls[i1];
        result1.push({
            lineNumber: i1,
            content: numberStr + quotedStringColor(lineStr),
            rawLine: ls[i1]
        });
    }
    return {
        prefixWidth: lineWidth + 2,
        lines: result1
    };
}
function editDistance(w1, w2) {
    const cost = (c)=>{
        if ("_-".indexOf(c) !== -1) {
            return 1;
        }
        return 10;
    };
    const cost2 = (c1, c2)=>{
        if (c1 === c2) {
            return 0;
        }
        if ("_-".indexOf(c1) !== -1 && "_-".indexOf(c2) !== -1) {
            return 1;
        }
        if (c1.toLocaleLowerCase() === c2.toLocaleLowerCase()) {
            return 1;
        }
        const cc1 = c1.charCodeAt(0);
        const cc2 = c2.charCodeAt(0);
        if (cc1 >= 48 && cc1 <= 57 && cc2 >= 48 && cc2 <= 57) {
            return 1;
        }
        return 10;
    };
    const s1 = w1.length + 1;
    const s2 = w2.length + 1;
    const v = new Int32Array(s1 * s2);
    for(let i1 = 0; i1 < s1; ++i1){
        for(let j = 0; j < s2; ++j){
            if (i1 === 0 && j === 0) {
                continue;
            } else if (i1 === 0) {
                v[i1 * s2 + j] = v[i1 * s2 + (j - 1)] + cost(w2[j - 1]);
            } else if (j === 0) {
                v[i1 * s2 + j] = v[(i1 - 1) * s2 + j] + cost(w1[i1 - 1]);
            } else {
                v[i1 * s2 + j] = Math.min(v[(i1 - 1) * s2 + (j - 1)] + cost2(w1[i1 - 1], w2[j - 1]), v[i1 * s2 + (j - 1)] + cost(w2[j - 1]), v[(i1 - 1) * s2 + j] + cost(w1[i1 - 1]));
            }
        }
    }
    return v[(w1.length + 1) * (w2.length + 1) - 1];
}
function detectCaseConvention(key) {
    if (key.toLocaleLowerCase() !== key) {
        return "capitalizationCase";
    }
    if (key.indexOf("_") !== -1) {
        return "underscore_case";
    }
    if (key.indexOf("-") !== -1) {
        return "dash-case";
    }
    return undefined;
}
function resolveCaseConventionRegex(keys, conventions) {
    if (conventions !== undefined) {
        if (conventions.length === 0) {
            throw new Error("Internal Error: resolveCaseConventionRegex requires nonempty `conventions`");
        }
        return {
            pattern: conventions.map((c)=>`(${c})`).join("|"),
            list: conventions
        };
    }
    const disallowedNearMisses = [];
    const foundConventions = new Set();
    for (const key of keys){
        const found = detectCaseConvention(key);
        if (found) {
            foundConventions.add(found);
        }
        switch(found){
            case "capitalizationCase":
                disallowedNearMisses.push(toUnderscoreCase(key), toDashCase(key));
                break;
            case "dash-case":
                disallowedNearMisses.push(toUnderscoreCase(key), toCapitalizationCase(key));
                break;
            case "underscore_case":
                disallowedNearMisses.push(toDashCase(key), toCapitalizationCase(key));
                break;
        }
    }
    if (foundConventions.size === 0) {
        return {
            pattern: undefined,
            list: []
        };
    }
    return {
        pattern: `^(?!(${disallowedNearMisses.join("|")}))`,
        list: Array.from(foundConventions)
    };
}
function toDashCase(str) {
    return toUnderscoreCase(str).replace(/_/g, "-");
}
function toUnderscoreCase(str) {
    return str.replace(/([A-Z]+)/g, (_match, p1)=>`-${p1}`).replace(/-/g, "_").split("_").filter((x)=>x.length).join("_").toLocaleLowerCase();
}
function toCapitalizationCase(str) {
    return toUnderscoreCase(str).replace(/_(.)/g, (_match, p1)=>p1.toLocaleUpperCase());
}
function capitalizeWord(str) {
    return str.slice(0, 1).toUpperCase() + str.slice(1);
}
function capitalizeTitle(str) {
    return str.split(/\s+/).map((str, index, arr)=>{
        if (index === 0 || index === arr.length - 1 || !isNotCapitalized(str)) {
            return capitalizeWord(str);
        } else {
            return str;
        }
    }).join(" ");
}
function isNotCapitalized(str) {
    return [
        "a",
        "an",
        "the",
        "for",
        "and",
        "nor",
        "but",
        "or",
        "yet",
        "so",
        "with",
        "at",
        "by",
        "to",
        "in",
        "for",
        "from",
        "of",
        "on", 
    ].includes(str);
}
const kLastPunctuationRegex = /([\S\s]*)[\.\?\!]/;
function trimSentence(text) {
    const match = text.match(kLastPunctuationRegex);
    if (match) {
        return {
            text: match[0],
            trimmed: true
        };
    } else {
        return {
            text,
            trimmed: false
        };
    }
}
function trimLength(text, length) {
    if (text.length < length) {
        return {
            text,
            trimmed: false
        };
    } else {
        return {
            text: text.substring(0, length),
            trimmed: true
        };
    }
}
function trimSpace(text) {
    const lastSpace = text.lastIndexOf(" ");
    if (lastSpace > 0) {
        return {
            text: text.substring(0, lastSpace),
            trimmed: true
        };
    } else {
        return {
            text,
            trimmed: false
        };
    }
}
function truncateText(text, length, breakAt) {
    const trimEnd = (text)=>{
        if ([
            ",",
            "/",
            ":"
        ].includes(text.charAt(text.length - 1))) {
            return text.substring(0, text.length - 1);
        } else {
            return text;
        }
    };
    const trimAtSpace = (text)=>{
        const spaceResult = trimSpace(text.substring(0, text.length - 1));
        return trimEnd(spaceResult.text) + "…";
    };
    const trimPunc = (text)=>{
        const puncResult = trimSentence(text);
        if (puncResult.trimmed) {
            return puncResult.text;
        } else {
            return trimAtSpace(puncResult.text);
        }
    };
    const lengthResult = trimLength(text, length);
    if (lengthResult.trimmed) {
        if (breakAt === "punctuation") {
            return trimPunc(lengthResult.text);
        } else {
            return trimAtSpace(lengthResult.text);
        }
    } else {
        return lengthResult.text;
    }
}
function matchAll1(str, regex) {
    let match;
    regex = new RegExp(regex);
    const result1 = [];
    while((match = regex.exec(str)) != null){
        result1.push(match);
    }
    return result1;
}
function rangedLines(text, includeNewLines = false) {
    const regex = /\r?\n/g;
    const result1 = [];
    let startOffset = 0;
    if (!includeNewLines) {
        for (const r of matchAll1(text, regex)){
            result1.push({
                substring: text.substring(startOffset, r.index),
                range: {
                    start: startOffset,
                    end: r.index
                }
            });
            startOffset = r.index + r[0].length;
        }
        result1.push({
            substring: text.substring(startOffset, text.length),
            range: {
                start: startOffset,
                end: text.length
            }
        });
        return result1;
    } else {
        const matches = matchAll1(text, regex);
        let prevOffset = 0;
        for (const r1 of matches){
            const stringEnd = r1.index + r1[0].length;
            result1.push({
                substring: text.substring(prevOffset, stringEnd),
                range: {
                    start: prevOffset,
                    end: stringEnd
                }
            });
            prevOffset = stringEnd;
        }
        result1.push({
            substring: text.substring(prevOffset, text.length),
            range: {
                start: prevOffset,
                end: text.length
            }
        });
        return result1;
    }
}
function mappedSubstring(source, start, end) {
    if (typeof source === "string") {
        source = asMappedString(source);
    }
    const value = source.value.substring(start, end);
    const mappedSource = source;
    return {
        value,
        map: (index, closest)=>{
            if (closest) {
                index = Math.max(0, Math.min(value.length, index - 1));
            }
            if (index === 0 && index === value.length) {
                return mappedSource.map(index + start, closest);
            }
            if (index < 0 || index >= value.length) {
                return undefined;
            }
            return mappedSource.map(index + start, closest);
        }
    };
}
function mappedString(source, pieces, fileName) {
    if (typeof source === "string") {
        source = asMappedString(source, fileName);
    }
    const mappedPieces = pieces.map((piece)=>{
        if (typeof piece === "string") {
            return asMappedString(piece);
        } else if (piece.value !== undefined) {
            return piece;
        } else {
            const { start , end  } = piece;
            return mappedSubstring(source, start, end);
        }
    });
    return mappedConcat(mappedPieces);
}
function asMappedString(str, fileName) {
    if (typeof str === "string") {
        return {
            value: str,
            fileName,
            map: function(index, closest) {
                if (closest) {
                    index = Math.min(str.length - 1, Math.max(0, index));
                }
                if (index < 0 || index >= str.length) {
                    return undefined;
                }
                return {
                    index,
                    originalString: this
                };
            }
        };
    } else if (fileName !== undefined) {
        throw new Error("Internal error: can't change the fileName of an existing MappedString");
    } else {
        return str;
    }
}
function mappedConcat(strings) {
    if (strings.length === 0) {
        return {
            value: "",
            map: (_index, _closest)=>undefined
        };
    }
    if (strings.every((s)=>typeof s === "string")) {
        return asMappedString(strings.join(""));
    }
    const mappedStrings = strings.map((s)=>{
        if (typeof s === "string") {
            return asMappedString(s);
        } else return s;
    });
    let currentOffset = 0;
    const offsets = [
        0
    ];
    for (const s of mappedStrings){
        currentOffset += s.value.length;
        offsets.push(currentOffset);
    }
    const value = mappedStrings.map((s)=>s.value).join("");
    return {
        value,
        map: (offset, closest)=>{
            if (closest) {
                offset = Math.max(0, Math.min(offset, value.length - 1));
            }
            if (offset === 0 && offset == value.length && mappedStrings.length) {
                return mappedStrings[0].map(0, closest);
            }
            if (offset < 0 || offset >= value.length) {
                return undefined;
            }
            const ix = glb(offsets, offset);
            const v = mappedStrings[ix];
            return v.map(offset - offsets[ix]);
        }
    };
}
function mappedIndexToLineCol(eitherText) {
    const text = asMappedString(eitherText);
    return function(offset) {
        const mapResult = text.map(offset, true);
        if (mapResult === undefined) {
            throw new Error("Internal Error: bad offset in mappedIndexRowCol");
        }
        const { index , originalString  } = mapResult;
        return indexToLineCol(originalString.value)(index);
    };
}
function join4(mappedStrs, sep) {
    const innerStrings = [];
    const mappedSep = asMappedString(sep);
    for(let i1 = 0; i1 < mappedStrs.length; ++i1){
        const mappedStr = mappedStrs[i1];
        if (typeof mappedStr === "string") {
            innerStrings.push(asMappedString(mappedStr));
        } else {
            innerStrings.push(mappedStr);
        }
        if (i1 < mappedStrs.length) {
            innerStrings.push(mappedSep);
        }
    }
    return mappedConcat(innerStrings);
}
function mappedLines(str, keepNewLines = false) {
    const lines = rangedLines(str.value, keepNewLines);
    return lines.map((v)=>mappedString(str, [
            v.range
        ]));
}
function findSpaceStart(string) {
    const result1 = string.value.match(/^\s+/);
    if (result1 === null || result1.length === 0) {
        return 0;
    }
    return result1[0].length;
}
function findSpaceEnd(string) {
    const result1 = string.value.match(/\s+$/);
    if (result1 === null || result1.length === 0) {
        return 0;
    }
    return result1[0].length;
}
function mappedTrim(string) {
    const start = findSpaceStart(string);
    const end = findSpaceEnd(string);
    if (start === 0 && end === 0) {
        return string;
    }
    if (start > string.value.length - end) {
        return mappedSubstring(string, 0, 0);
    }
    return mappedSubstring(string, start, string.value.length - end);
}
class ErrorEx extends Error {
    constructor(name, message, printName = true, printStack = true){
        super(message);
        this.name = name;
        this.printName = printName;
        this.printStack = printStack;
    }
    printName;
    printStack;
}
class LocalizedError extends Error {
    constructor(name, message, source, position = 0, printName = true, printStack = true){
        const fileName = source.map(position)?.originalString?.fileName;
        if (fileName) {
            const { line , column  } = mappedIndexToLineCol(source)(position);
            message = `In file ${fileName} (${line + 1}:${column + 1}):
${message}`;
        }
        super(message);
        this.name = name;
        this.printName = printName;
        this.printStack = printStack;
    }
    printName;
    printStack;
}
function asErrorEx(e) {
    if (e instanceof ErrorEx) {
        return e;
    } else if (e instanceof Error) {
        e.printName = e.name !== "Error";
        e.printStack = !!e.message;
        return e;
    } else {
        return new ErrorEx("Error", String(e), false, true);
    }
}
const booleanSchema = {
    "type": "boolean",
    "description": "be `true` or `false`",
    "completions": [
        "true",
        "false"
    ],
    "exhaustiveCompletions": true
};
const numberSchema = {
    "type": "number",
    "description": "be a number"
};
const stringSchema = {
    "type": "string",
    "description": "be a string"
};
const nullSchema = {
    "type": "null",
    "description": "be the null value",
    "completions": [
        "null"
    ],
    "exhaustiveCompletions": true
};
function schemaType(schema) {
    if (schema === false) {
        return "false";
    }
    if (schema === true) {
        return "true";
    }
    return schema.type;
}
function schemaDispatch(s, d) {
    const st = schemaType(s);
    if (d[st]) {
        d[st](s);
    }
}
function schemaCall(s, d, other) {
    const st = schemaType(s);
    if (d[st]) {
        return d[st](s);
    }
    if (other) {
        return other(s);
    }
    throw new Error(`Internal Error: dispatch failed for type ${st}`);
}
function schemaDocString(d) {
    if (typeof d === "string") {
        return d;
    }
    if (d.short) {
        return d.short;
    }
    return "";
}
function schemaDescription(schema) {
    if (schema === true) {
        return `be anything`;
    } else if (schema === false) {
        return `be no possible value`;
    } else {
        return schema.description || `be ${schemaType(schema)}`;
    }
}
let globalInternalIdCounter = 0;
function internalId() {
    return {
        _internalId: ++globalInternalIdCounter
    };
}
function tagSchema(schema, tags) {
    return {
        ...schema,
        tags: {
            ...schema.tags || {},
            ...tags
        }
    };
}
function anySchema(description) {
    return {
        ...internalId(),
        description,
        "type": "any"
    };
}
function enumSchema(...args) {
    if (args.length === 0) {
        throw new Error("Internal Error: Empty enum schema not supported.");
    }
    return {
        ...internalId(),
        "type": "enum",
        "enum": args,
        "description": args.length > 1 ? `be one of: ${args.map((x)=>"`" + x + "`").join(", ")}` : `be '${args[0]}'`,
        "completions": args.map(String),
        "exhaustiveCompletions": true
    };
}
function regexSchema(arg, description) {
    const result1 = {
        ...internalId(),
        "type": "string",
        "pattern": arg
    };
    if (description) {
        result1.description = description;
    } else {
        result1.description = `be a string that satisfies regex "${arg}"`;
    }
    return result1;
}
function anyOfSchema(...args) {
    return {
        ...internalId(),
        "type": "anyOf",
        "anyOf": args,
        "description": `be at least one of: ${args.map((x)=>schemaDescription(x).slice(3)).join(", ")}`
    };
}
function allOfSchema(...args) {
    return {
        ...internalId(),
        "type": "allOf",
        "allOf": args,
        "description": `be all of: ${args.map((x)=>schemaDescription(x).slice(3)).join(", ")}`
    };
}
function objectSchema(params = {}) {
    let { properties , patternProperties , required , additionalProperties , description , baseSchema , exhaustive , completions: completionsParam , namingConvention , propertyNames: propertyNamesSchema , closed ,  } = params;
    required = required || [];
    properties = properties || {};
    patternProperties = patternProperties || {};
    const tags = {};
    let tagsAreSet = false;
    let propertyNames = propertyNamesSchema;
    const objectKeys = Object.getOwnPropertyNames(completionsParam || properties);
    if (namingConvention !== "ignore") {
        const { pattern , list  } = resolveCaseConventionRegex(objectKeys, namingConvention);
        if (pattern !== undefined) {
            if (propertyNames === undefined) {
                propertyNames = {
                    "type": "string",
                    pattern
                };
            } else {
                propertyNames = allOfSchema(propertyNames, {
                    "type": "string",
                    pattern
                });
            }
            tags["case-convention"] = list;
            tagsAreSet = true;
        }
    }
    if (completionsParam) {
        tags["completions"] = completionsParam;
        tagsAreSet = true;
    }
    const hasDescription = description !== undefined;
    description = description || "be an object";
    let result1 = undefined;
    if (baseSchema) {
        if (!Array.isArray(baseSchema)) {
            baseSchema = [
                baseSchema
            ];
        }
        if (baseSchema.some((s)=>s.type !== "object")) {
            throw new Error("Internal Error: can only extend other object Schema");
        }
        if (baseSchema.length <= 0) {
            throw new Error("Internal Error: base schema must be non-empty");
        }
        let temp = {
            ...internalId()
        };
        for (const base of baseSchema){
            temp = Object.assign(temp, base);
        }
        result1 = temp;
        if (result1 === undefined) {
            throw new Error("Internal Error: result should not be undefined");
        }
        if (result1.$id) {
            delete result1.$id;
        }
        for (const base1 of baseSchema){
            if (base1.exhaustiveCompletions) {
                result1.exhaustiveCompletions = true;
            }
        }
        if (hasDescription) {
            result1.description = description;
        }
        result1.properties = Object.assign({}, ...baseSchema.map((s)=>s.properties), properties);
        result1.patternProperties = Object.assign({}, ...baseSchema.map((s)=>s.patternProperties), patternProperties);
        result1.required = [
            ...baseSchema.map((s)=>s.required || []),
            required || [], 
        ].flat();
        if (result1.required && result1.required.length === 0) {
            result1.required = undefined;
        }
        const additionalPropArray = baseSchema.map((s)=>s.additionalProperties).filter((s)=>s !== undefined);
        if (additionalProperties) {
            additionalPropArray.push(additionalProperties);
        }
        if (additionalPropArray.length) {
            result1.additionalProperties = allOfSchema(...additionalPropArray);
        }
        const propNamesArray = baseSchema.map((s)=>s.propertyNames).filter((s)=>s !== undefined);
        if (propertyNames) {
            propNamesArray.push(propertyNames);
        }
        if (propNamesArray.length === baseSchema.length + 1) {
            result1.propertyNames = anyOfSchema(...propNamesArray);
        }
        result1.closed = closed || baseSchema.some((s)=>s.closed);
    } else {
        result1 = {
            ...internalId(),
            "type": "object",
            description
        };
        if (exhaustive) {
            result1.exhaustiveCompletions = true;
        }
        if (properties) {
            result1.properties = properties;
        }
        if (patternProperties) {
            result1.patternProperties = patternProperties;
        }
        if (required && required.length > 0) {
            result1.required = required;
        }
        result1.closed = closed;
        if (additionalProperties !== undefined) {
            result1.additionalProperties = additionalProperties;
        }
        if (propertyNames !== undefined) {
            result1.propertyNames = propertyNames;
        }
    }
    if (tagsAreSet) {
        result1.tags = tags;
    }
    return result1;
}
function arraySchema(items) {
    if (items) {
        return {
            ...internalId(),
            "type": "array",
            "description": `be an array of values, where each element must ${schemaDescription(items)}`,
            items
        };
    } else {
        return {
            ...internalId(),
            "type": "array",
            "description": `be an array of values`
        };
    }
}
function documentSchema(schema, doc) {
    const result1 = Object.assign({}, schema);
    result1.documentation = doc;
    return result1;
}
function describeSchema(schema, description) {
    const result1 = Object.assign({}, schema);
    result1.description = `be ${description}`;
    return result1;
}
function completeSchema(schema, ...completions) {
    const result1 = Object.assign({}, schema);
    const prevCompletions = (schema.completions || []).slice();
    prevCompletions.push(...completions);
    result1.completions = prevCompletions;
    return result1;
}
function completeSchemaOverwrite(schema, ...completions) {
    const result1 = Object.assign({}, schema);
    result1.completions = completions;
    return result1;
}
function idSchema(schema, id) {
    const result1 = Object.assign({}, schema);
    result1["$id"] = id;
    return result1;
}
function errorMessageSchema(schema, errorMessage) {
    return {
        ...schema,
        errorMessage
    };
}
function refSchema($ref, description) {
    return {
        ...internalId(),
        "type": "ref",
        $ref,
        description
    };
}
function valueSchema(val, description) {
    return {
        ...internalId(),
        "type": "enum",
        "enum": [
            val
        ],
        "description": description || `be ${JSON.stringify(val)}`
    };
}
const definitionsObject = {};
function hasSchemaDefinition(key) {
    return definitionsObject[key] !== undefined;
}
function getSchemaDefinition(key) {
    if (definitionsObject[key] === undefined) {
        throw new Error(`Internal Error: Schema ${key} not found.`);
    }
    return definitionsObject[key];
}
function setSchemaDefinition(schema) {
    if (schema.$id === undefined) {
        throw new Error("Internal Error, setSchemaDefinition needs $id");
    }
    if (definitionsObject[schema.$id] === undefined) {
        definitionsObject[schema.$id] = schema;
    }
}
function getSchemaDefinitionsObject() {
    return Object.assign({}, definitionsObject);
}
function expandAliasesFrom(lst, defs) {
    const aliases = defs;
    const result1 = [];
    lst = lst.slice();
    for(let i1 = 0; i1 < lst.length; ++i1){
        const el = lst[i1];
        if (el.startsWith("$")) {
            const v = aliases[el.slice(1)];
            if (v === undefined) {
                throw new Error(`Internal Error: ${el} doesn't have an entry in the aliases map`);
            }
            lst.push(...v);
        } else {
            result1.push(el);
        }
    }
    return result1;
}
function resolveSchema(schema, visit, hasRef, next) {
    if (schema === false || schema === true) {
        return schema;
    }
    if (hasRef === undefined) {
        hasRef = (cursor)=>{
            return schemaCall(cursor, {
                ref: (_s)=>true
            }, (_s)=>false);
        };
    }
    if (!hasRef(schema)) {
        return schema;
    }
    if (visit === undefined) {
        visit = (_schema)=>{};
    }
    if (next === undefined) {
        next = (cursor)=>{
            const result1 = schemaCall(cursor, {
                ref: (s)=>getSchemaDefinition(s.$ref)
            });
            if (result1 === undefined) {
                throw new Error("Internal Error, couldn't resolve schema ${JSON.stringify(cursor)}");
            }
            return result1;
        };
    }
    let cursor1 = schema;
    let cursor2 = schema;
    let stopped = false;
    do {
        cursor1 = next(cursor1);
        visit(cursor1);
        if (hasRef(cursor2)) {
            cursor2 = next(cursor2);
        } else {
            stopped = true;
        }
        if (hasRef(cursor2)) {
            cursor2 = next(cursor2);
        } else {
            stopped = true;
        }
        if (!stopped && cursor1 === cursor2) {
            throw new Error(`reference cycle detected at ${JSON.stringify(cursor1)}`);
        }
    }while (hasRef(cursor1))
    return cursor1;
}
Object.freeze({
    __proto__: null
});
class DataSet {
    constructor(raw2018, raw2019, raw2020, raw2021){
        this._raw2018 = raw2018;
        this._raw2019 = raw2019;
        this._raw2020 = raw2020;
        this._raw2021 = raw2021;
    }
    get es2018() {
        return this._set2018 || (this._set2018 = new Set(this._raw2018.split(" ")));
    }
    get es2019() {
        return this._set2019 || (this._set2019 = new Set(this._raw2019.split(" ")));
    }
    get es2020() {
        return this._set2020 || (this._set2020 = new Set(this._raw2020.split(" ")));
    }
    get es2021() {
        return this._set2021 || (this._set2021 = new Set(this._raw2021.split(" ")));
    }
}
new Set([
    "General_Category",
    "gc"
]);
new Set([
    "Script",
    "Script_Extensions",
    "sc",
    "scx"
]);
new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "");
new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi");
new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict");
function navigateSchemaBySchemaPathSingle(schema, path) {
    const ensurePathFragment = (fragment, expected)=>{
        if (fragment !== expected) {
            throw new Error(`Internal Error in navigateSchemaBySchemaPathSingle: ${fragment} !== ${expected}`);
        }
    };
    const inner = (subschema, index)=>{
        subschema = resolveSchema(subschema);
        if (subschema === undefined) {
            throw new Error(`Internal Error in navigateSchemaBySchemaPathSingle: invalid path navigation`);
        }
        if (index === path.length) {
            return subschema;
        }
        const st = schemaType(subschema);
        switch(st){
            case "anyOf":
                ensurePathFragment(path[index], "anyOf");
                return inner(subschema.anyOf[path[index + 1]], index + 2);
            case "allOf":
                ensurePathFragment(path[index], "allOf");
                return inner(subschema.allOf[path[index + 1]], index + 2);
            case "array":
                ensurePathFragment(path[index], "array");
                return inner(subschema.arrayOf.schema, index + 2);
            case "object":
                ensurePathFragment(path[index], "object");
                if (path[index + 1] === "properties") {
                    return inner(subschema.properties[path[index + 2]], index + 3);
                } else if (path[index + 1] === "patternProperties") {
                    return inner(subschema.patternProperties[path[index + 2]], index + 3);
                } else if (path[index + 1] === "additionalProperties") {
                    return inner(subschema.additionalProperties, index + 2);
                } else {
                    throw new Error(`Internal Error in navigateSchemaBySchemaPathSingle: bad path fragment ${path[index]} in object navigation`);
                }
            default:
                throw new Error(`Internal Error in navigateSchemaBySchemaPathSingle: can't navigate schema type ${st}`);
        }
    };
    return inner(schema, 0);
}
function resolveDescription(s) {
    if (typeof s === "string") {
        return s;
    }
    const valueS = resolveSchema(s);
    if (valueS === false || valueS === true) {
        return "";
    }
    if (valueS.documentation === undefined) {
        return "";
    }
    if (typeof valueS.documentation === "string") {
        return valueS.documentation;
    }
    if (valueS.documentation.short) {
        return valueS.documentation.short;
    } else {
        return "";
    }
}
function schemaCompletions(s) {
    if (s === true || s === false) {
        return [];
    }
    let schema = resolveSchema(s);
    schema = resolveSchema(schema, (_schema)=>{}, (schema)=>{
        return schema.tags !== undefined && schema.tags["complete-from"] !== undefined;
    }, (schema)=>{
        return navigateSchemaBySchemaPathSingle(schema, schema.tags["complete-from"]);
    });
    if (schema === true || schema === false) {
        return [];
    }
    const normalize = (completions)=>{
        const result1 = (completions || []).map((c)=>{
            if (typeof c === "string") {
                return {
                    type: "value",
                    display: c,
                    value: c,
                    description: "",
                    suggest_on_accept: false,
                    schema
                };
            }
            return {
                ...c,
                description: resolveDescription(c.description),
                schema
            };
        });
        return result1;
    };
    if (schema.completions && schema.completions.length) {
        return normalize(schema.completions);
    }
    if (schema.tags && schema.tags.completions) {
        if (Array.isArray(schema.tags.completions) && schema.tags.completions.length) {
            return normalize(schema.tags.completions);
        } else {
            return normalize(Object.values(schema.tags.completions));
        }
    }
    return schemaCall(schema, {
        array: (s)=>{
            if (s.items) {
                return schemaCompletions(s.items);
            } else {
                return [];
            }
        },
        anyOf: (s)=>{
            return s.anyOf.map(schemaCompletions).flat();
        },
        allOf: (s)=>{
            return s.allOf.map(schemaCompletions).flat();
        },
        "object": (s)=>{
            s.cachedCompletions = getObjectCompletions(s);
            return normalize(s.cachedCompletions);
        }
    }, (_)=>[]);
}
function getObjectCompletions(s) {
    const completionsParam = s.tags && s.tags.completions || [];
    return schemaCall(s, {
        "object": (schema)=>{
            const properties = schema.properties;
            const objectKeys = completionsParam.length ? completionsParam : Object.getOwnPropertyNames(properties);
            const completions = [];
            for (const k of objectKeys){
                const schema1 = properties && properties[k];
                const maybeDescriptions = [];
                let hidden = false;
                if (schema1 !== undefined && schema1 !== true && schema1 !== false) {
                    if (schema1.documentation) {
                        maybeDescriptions.push(schemaDocString(schema1.documentation));
                    } else {
                        let described = false;
                        const visitor = (schema)=>{
                            if (schema === false || schema === true) {
                                return;
                            }
                            if (schema.hidden) {
                                hidden = true;
                            }
                            if (described) {
                                return;
                            }
                            if (schema.documentation) {
                                maybeDescriptions.push(schemaDocString(schema.documentation));
                                described = true;
                            }
                        };
                        try {
                            resolveSchema(schema1, visitor);
                        } catch (_e) {}
                        if (!described) {
                            schemaDispatch(schema1, {
                                ref: (schema)=>maybeDescriptions.push({
                                        $ref: schema.$ref
                                    })
                            });
                        }
                    }
                }
                if (hidden) {
                    continue;
                }
                let description = "";
                for (const md of maybeDescriptions){
                    if (md !== undefined) {
                        description = md;
                        break;
                    }
                }
                completions.push({
                    type: "key",
                    display: "",
                    value: `${k}: `,
                    description,
                    suggest_on_accept: true
                });
            }
            return completions;
        }
    }, (_)=>completionsParam.map((c)=>({
                type: "value",
                display: "",
                value: c,
                description: "",
                suggest_on_accept: false
            })));
}
function possibleSchemaKeys(schema) {
    const precomputedCompletions = schemaCompletions(schema).filter((c)=>c.type === "key").map((c)=>c.value.split(":")[0]);
    if (precomputedCompletions.length) {
        return precomputedCompletions;
    }
    const results = [];
    walkSchema(schema, {
        "object": (s)=>{
            results.push(...Object.keys(s.properties || {}));
            return true;
        },
        "array": (_s)=>true
    });
    return results;
}
function possibleSchemaValues(schema) {
    const results = [];
    walkSchema(schema, {
        "enum": (s)=>{
            results.push(...s["enum"].map(String));
            return true;
        },
        "array": (_s)=>true,
        "object": (_s)=>true
    });
    return results;
}
function walkSchema(schema, f) {
    const recur = {
        "anyOf": (ss)=>{
            for (const s of ss.anyOf){
                walkSchema(s, f);
            }
        },
        "allOf": (ss)=>{
            for (const s of ss.allOf){
                walkSchema(s, f);
            }
        },
        "array": (x)=>{
            if (x.items) {
                walkSchema(x.items, f);
            }
        },
        "object": (x)=>{
            if (x.properties) {
                for (const ss of Object.values(x.properties)){
                    walkSchema(ss, f);
                }
            }
            if (x.patternProperties) {
                for (const ss1 of Object.values(x.patternProperties)){
                    walkSchema(ss1, f);
                }
            }
            if (x.propertyNames) {
                walkSchema(x.propertyNames, f);
            }
        }
    };
    if (typeof f === "function") {
        if (f(schema) === true) {
            return;
        }
    } else {
        if (schemaCall(schema, f, (_)=>false) === true) {
            return;
        }
    }
    schemaCall(schema, recur, (_)=>false);
}
function setDefaultErrorHandlers(validator) {
    validator.addHandler(ignoreExprViolations);
    validator.addHandler(expandEmptySpan);
    validator.addHandler(improveErrorHeadingForValueErrors);
    validator.addHandler(checkForTypeMismatch);
    validator.addHandler(checkForBadBoolean);
    validator.addHandler(checkForBadColon);
    validator.addHandler(checkForBadEquals);
    validator.addHandler(identifyKeyErrors);
    validator.addHandler(checkForNearbyCorrection);
    validator.addHandler(checkForNearbyRequired);
    validator.addHandler(schemaDefinedErrors);
}
function errorKeyword(error) {
    if (error.schemaPath.length === 0) {
        return "";
    }
    return String(error.schemaPath[error.schemaPath.length - 1]);
}
function schemaPathMatches(error, strs) {
    const schemaPath = error.schemaPath.slice(-strs.length);
    if (schemaPath.length !== strs.length) {
        return false;
    }
    return strs.every((str, i1)=>str === schemaPath[i1]);
}
function getBadKey(error) {
    if (error.schemaPath.indexOf("propertyNames") === -1 && error.schemaPath.indexOf("closed") === -1) {
        return undefined;
    }
    const result1 = error.violatingObject.result;
    if (typeof result1 !== "string") {
        throw new Error("Internal Error: propertyNames error has a violating non-string.");
    }
    return result1;
}
function getVerbatimInput(error) {
    return error.source.value;
}
function navigate(path, annotation, returnKey = false, pathIndex = 0) {
    if (annotation === undefined) {
        throw new Error("Can't navigate an undefined annotation");
    }
    if (pathIndex >= path.length) {
        return annotation;
    }
    if (annotation.kind === "mapping" || annotation.kind === "block_mapping") {
        const { components  } = annotation;
        const searchKey = path[pathIndex];
        const lastKeyIndex = ~~((components.length - 1) / 2) * 2;
        for(let i1 = lastKeyIndex; i1 >= 0; i1 -= 2){
            const key = components[i1].result;
            if (key === searchKey) {
                if (returnKey && pathIndex === path.length - 1) {
                    return navigate(path, components[i1], returnKey, pathIndex + 1);
                } else {
                    return navigate(path, components[i1 + 1], returnKey, pathIndex + 1);
                }
            }
        }
        return annotation;
    } else if ([
        "sequence",
        "block_sequence",
        "flow_sequence"
    ].indexOf(annotation.kind) !== -1) {
        const searchKey1 = Number(path[pathIndex]);
        if (isNaN(searchKey1) || searchKey1 < 0 || searchKey1 >= annotation.components.length) {
            return annotation;
        }
        return navigate(path, annotation.components[searchKey1], returnKey, pathIndex + 1);
    } else {
        return annotation;
    }
}
function isEmptyValue(error) {
    const rawVerbatimInput = getVerbatimInput(error);
    return rawVerbatimInput.trim().length === 0;
}
function getLastFragment(instancePath) {
    if (instancePath.length === 0) {
        return undefined;
    }
    return instancePath[instancePath.length - 1];
}
function reindent(str) {
    const s = new Set();
    const ls = lines(str);
    for (const l1 of ls){
        const r = l1.match("^[ ]+");
        if (r) {
            s.add(r[0].length);
        }
    }
    if (s.size === 0) {
        return str;
    } else if (s.size === 1) {
        const v = Array.from(s)[0];
        const oldIndent = " ".repeat(v);
        if (v <= 2) {
            return str;
        }
        return ls.map((l1)=>l1.startsWith(oldIndent) ? l1.slice(v - 2) : l1).join("\n");
    } else {
        const [first, second] = Array.from(s);
        const oldIndent1 = " ".repeat(first);
        const newIndent = second - first;
        if (newIndent >= first) {
            return str;
        }
        return ls.map((l1)=>l1.startsWith(oldIndent1) ? l1.slice(first - newIndent) : l1).join("\n");
    }
}
function ignoreExprViolations(error, _parse, _schema) {
    const { result: result1  } = error.violatingObject;
    if (typeof result1 !== "object" || Array.isArray(result1) || result1 === null || error.schemaPath.slice(-1)[0] !== "type") {
        return error;
    }
    if (result1.tag === "!expr" && typeof result1.value === "string") {
        return null;
    } else {
        return error;
    }
}
function formatHeadingForKeyError(_error, _parse, _schema, key) {
    return `property name ${blue2(key)} is invalid`;
}
function formatHeadingForValueError(error, _parse, _schema) {
    const rawVerbatimInput = reindent(getVerbatimInput(error));
    const rawLines = lines(rawVerbatimInput);
    let verbatimInput;
    if (rawLines.length > 4) {
        verbatimInput = quotedStringColor([
            ...rawLines.slice(0, 2),
            "...",
            ...rawLines.slice(-2)
        ].join("\n"));
    } else {
        verbatimInput = quotedStringColor(rawVerbatimInput);
    }
    const empty = isEmptyValue(error);
    const lastFragment = getLastFragment(error.instancePath);
    switch(typeof lastFragment){
        case "undefined":
            if (empty) {
                return "YAML value is missing.";
            } else {
                return `YAML value ${verbatimInput} must ${schemaDescription(error.schema)}.`;
            }
        case "number":
            if (empty) {
                return `Array entry ${lastFragment + 1} is empty but it must instead ${schemaDescription(error.schema)}.`;
            } else {
                return `Array entry ${lastFragment + 1} with value ${verbatimInput} failed to ${schemaDescription(error.schema)}.`;
            }
        case "string":
            {
                const formatLastFragment = '"' + blue2(lastFragment) + '"';
                if (empty) {
                    return `Field ${formatLastFragment} has empty value but it must instead ${schemaDescription(error.schema)}`;
                } else {
                    if (verbatimInput.indexOf("\n") !== -1) {
                        return `Field ${formatLastFragment} has value

${verbatimInput}

The value must instead ${schemaDescription(error.schema)}.`;
                    } else {
                        return `Field ${formatLastFragment} has value ${verbatimInput}, which must instead ${schemaDescription(error.schema)}`;
                    }
                }
            }
    }
}
function identifyKeyErrors(error, parse, schema) {
    if (error.schemaPath.indexOf("propertyNames") === -1 && error.schemaPath.indexOf("closed") === -1) {
        return error;
    }
    const badKey = getBadKey(error);
    if (badKey) {
        if (error.instancePath.length && error.instancePath[error.instancePath.length - 1] !== badKey) {
            addInstancePathInfo(error.niceError, [
                ...error.instancePath,
                badKey
            ]);
        } else {
            addInstancePathInfo(error.niceError, error.instancePath);
        }
        error.niceError.heading = formatHeadingForKeyError(error, parse, schema, badKey);
    }
    return error;
}
function improveErrorHeadingForValueErrors(error, parse, schema) {
    if (error.schemaPath.indexOf("propertyNames") !== -1 || error.schemaPath.indexOf("closed") !== -1 || errorKeyword(error) === "required") {
        return error;
    }
    return {
        ...error,
        niceError: {
            ...error.niceError,
            heading: formatHeadingForValueError(error, parse, schema)
        }
    };
}
function expandEmptySpan(error, parse, _schema) {
    if (error.location.start.line !== error.location.end.line || error.location.start.column !== error.location.end.column || !isEmptyValue(error) || typeof getLastFragment(error.instancePath) === "undefined") {
        return error;
    }
    const lastKey = navigate(error.instancePath, parse, true);
    const locF = mappedIndexToLineCol(parse.source);
    try {
        const location = {
            start: locF(lastKey.start),
            end: locF(lastKey.end)
        };
        return {
            ...error,
            location,
            niceError: {
                ...error.niceError,
                location
            }
        };
    } catch (_e) {
        return error;
    }
}
function checkForTypeMismatch(error, parse, schema) {
    const rawVerbatimInput = getVerbatimInput(error);
    const rawLines = lines(rawVerbatimInput);
    let verbatimInput;
    if (rawLines.length > 4) {
        verbatimInput = quotedStringColor([
            ...rawLines.slice(0, 2),
            "...",
            ...rawLines.slice(-2)
        ].join("\n"));
    } else {
        verbatimInput = quotedStringColor(rawVerbatimInput);
    }
    const goodType = (obj)=>{
        if (Array.isArray(obj)) {
            return "an array";
        }
        if (obj === null) {
            return "a null value";
        }
        return typeof obj;
    };
    if (errorKeyword(error) === "type" && rawVerbatimInput.length > 0) {
        const reindented = reindent(verbatimInput);
        const subject = reindented.indexOf("\n") === -1 ? `The value ${reindented} ` : `The value

${reindented}

`;
        const newError = {
            ...error.niceError,
            heading: formatHeadingForValueError(error, parse, schema),
            error: [
                `${subject}is of type ${goodType(error.violatingObject.result)}.`, 
            ],
            info: {},
            location: error.niceError.location
        };
        addInstancePathInfo(newError, error.instancePath);
        addFileInfo(newError, error.source);
        return {
            ...error,
            niceError: newError
        };
    }
    return error;
}
function checkForBadBoolean(error, parse, _schema) {
    const schema = error.schema;
    if (!(typeof error.violatingObject.result === "string" && errorKeyword(error) === "type" && schemaType(schema) === "boolean")) {
        return error;
    }
    const strValue = error.violatingObject.result;
    const verbatimInput = quotedStringColor(getVerbatimInput(error));
    const yesses = new Set("y|Y|yes|Yes|YES|true|True|TRUE|on|On|ON".split("|"));
    const nos = new Set("n|N|no|No|NO|false|False|FALSE|off|Off|OFF".split("|"));
    let fix;
    if (yesses.has(strValue)) {
        fix = true;
    } else if (nos.has(strValue)) {
        fix = false;
    } else {
        return error;
    }
    const errorMessage = `The value ${verbatimInput} is a string.`;
    const suggestion1 = `Quarto uses YAML 1.2, which interprets booleans strictly.`;
    const suggestion2 = `Try using ${quotedStringColor(String(fix))} instead.`;
    const newError = {
        heading: formatHeadingForValueError(error, parse, schema),
        error: [
            errorMessage
        ],
        info: {},
        location: error.niceError.location
    };
    addInstancePathInfo(newError, error.instancePath);
    addFileInfo(newError, error.source);
    newError.info["yaml-version-1.2"] = suggestion1;
    newError.info["suggestion-fix"] = suggestion2;
    return {
        ...error,
        niceError: newError
    };
}
function checkForBadColon(error, parse, schema) {
    if (typeof error.violatingObject.result !== "string") {
        return error;
    }
    if (!schemaPathMatches(error, [
        "object",
        "type"
    ])) {
        return error;
    }
    if (!error.violatingObject.result.match(/^.+:[^ ].*$/)) {
        return error;
    }
    const verbatimInput = quotedStringColor(getVerbatimInput(error));
    const errorMessage = `The value ${verbatimInput} is a string.`;
    const suggestion1 = `In YAML, key-value pairs in objects must be separated by a space.`;
    const suggestion2 = `Did you mean ${quotedStringColor(quotedStringColor(getVerbatimInput(error)).replace(/:/g, ": "))} instead?`;
    const newError = {
        heading: formatHeadingForValueError(error, parse, schema),
        error: [
            errorMessage
        ],
        info: {},
        location: error.niceError.location
    };
    addInstancePathInfo(newError, error.instancePath);
    addFileInfo(newError, error.source);
    newError.info["yaml-key-value-pairs"] = suggestion1;
    newError.info["suggestion-fix"] = suggestion2;
    return {
        ...error,
        niceError: newError
    };
}
function checkForBadEquals(error, parse, schema) {
    if (typeof error.violatingObject.result !== "string") {
        return error;
    }
    if (!schemaPathMatches(error, [
        "object",
        "type"
    ]) && !schemaPathMatches(error, [
        "object",
        "propertyNames",
        "string",
        "pattern"
    ])) {
        return error;
    }
    if (!error.violatingObject.result.match(/^.+ *= *.+$/)) {
        return error;
    }
    const verbatimInput = quotedStringColor(getVerbatimInput(error));
    const errorMessage = `The value ${verbatimInput} is a string.`;
    const suggestion1 = `In YAML, key-value pairs in objects must be separated by a colon and a space.`;
    const suggestion2 = `Did you mean ${quotedStringColor(quotedStringColor(getVerbatimInput(error)).replace(/ *= */g, ": "))} instead?`;
    const newError = {
        heading: formatHeadingForValueError(error, parse, schema),
        error: [
            errorMessage
        ],
        info: {},
        location: error.niceError.location
    };
    addInstancePathInfo(newError, error.instancePath);
    addFileInfo(newError, error.source);
    newError.info["yaml-key-value-pairs"] = suggestion1;
    newError.info["suggestion-fix"] = suggestion2;
    return {
        ...error,
        niceError: newError
    };
}
function createErrorFragments(error) {
    const rawVerbatimInput = getVerbatimInput(error);
    const verbatimInput = quotedStringColor(reindent(rawVerbatimInput));
    const pathFragments = error.instancePath.map((s)=>blue2(String(s)));
    return {
        location: locationString(error.location),
        fullPath: pathFragments.join(":"),
        key: pathFragments[pathFragments.length - 1],
        value: verbatimInput
    };
}
function schemaDefinedErrors(error, _parse, _schema) {
    const schema = error.schema;
    if (schema === true || schema === false) {
        return error;
    }
    if (schema.errorMessage === undefined) {
        return error;
    }
    if (typeof schema.errorMessage !== "string") {
        return error;
    }
    let result1 = schema.errorMessage;
    for (const [k, v] of Object.entries(createErrorFragments(error))){
        result1 = result1.replace("${" + k + "}", v);
    }
    return {
        ...error,
        niceError: {
            ...error.niceError,
            heading: result1
        }
    };
}
function checkForNearbyRequired(error, _parse, _schema) {
    const schema = error.schema;
    if (errorKeyword(error) !== "required") {
        return error;
    }
    const missingKeys = [];
    const errObj = error.violatingObject.result;
    const keys = Object.keys(errObj);
    schemaCall(schema, {
        object (s) {
            if (s.required === undefined) {
                throw new Error("Internal Error: required schema error without a required field");
            }
            for (const r of s.required){
                if (keys.indexOf(r) === -1) {
                    missingKeys.push(r);
                }
            }
        }
    }, (_)=>{
        throw new Error("Internal Error: required error on a non-object schema");
    });
    for (const missingKey of missingKeys){
        let bestCorrection;
        let bestDistance = Infinity;
        for (const correction of keys){
            const d = editDistance(correction, missingKey);
            if (d < bestDistance) {
                bestCorrection = [
                    correction
                ];
                bestDistance = d;
            } else if (d === bestDistance) {
                bestCorrection.push(correction);
                bestDistance = d;
            }
        }
        if (bestDistance > missingKey.length * 10 * 0.3) {
            continue;
        }
        const suggestions = bestCorrection.map((s)=>blue2(s));
        if (suggestions.length === 1) {
            error.niceError.info[`did-you-mean-key`] = `Is ${suggestions[0]} a typo of ${blue2(missingKey)}?`;
        } else if (suggestions.length === 2) {
            error.niceError.info[`did-you-mean-key`] = `Is ${suggestions[0]} or ${suggestions[1]} a typo of ${blue2(missingKey)}?`;
        } else {
            suggestions[suggestions.length - 1] = `or ${suggestions[suggestions.length - 1]}`;
            error.niceError.info[`did-you-mean-key`] = `Is one of ${suggestions.join(", ")} a typo of ${blue2(missingKey)}?`;
        }
    }
    return error;
}
function checkForNearbyCorrection(error, parse, _schema) {
    const schema = error.schema;
    const corrections = [];
    let errVal = "";
    let keyOrValue = "";
    const key = getBadKey(error);
    if (key) {
        errVal = key;
        corrections.push(...possibleSchemaKeys(schema));
        keyOrValue = "key";
    } else {
        const val = navigate(error.instancePath, parse);
        if (typeof val.result !== "string") {
            return error;
        }
        errVal = val.result;
        corrections.push(...possibleSchemaValues(schema));
        keyOrValue = "value";
    }
    if (corrections.length === 0) {
        return error;
    }
    let bestCorrection;
    let bestDistance = Infinity;
    for (const correction of corrections){
        const d = editDistance(correction, errVal);
        if (d < bestDistance) {
            bestCorrection = [
                correction
            ];
            bestDistance = d;
        } else if (d === bestDistance) {
            bestCorrection.push(correction);
            bestDistance = d;
        }
    }
    if (bestDistance > errVal.length * 10 * 0.3) {
        return error;
    }
    const suggestions = bestCorrection.map((s)=>blue2(s));
    if (suggestions.length === 1) {
        error.niceError.info[`did-you-mean-${keyOrValue}`] = `Did you mean ${suggestions[0]}?`;
    } else if (suggestions.length === 2) {
        error.niceError.info[`did-you-mean-${keyOrValue}`] = `Did you mean ${suggestions[0]} or ${suggestions[1]}?`;
    } else {
        suggestions[suggestions.length - 1] = `or ${suggestions[suggestions.length - 1]}`;
        error.niceError.info[`did-you-mean-${keyOrValue}`] = `Did you mean ${suggestions.join(", ")}?`;
    }
    return error;
}
function createSourceContext(src, location) {
    const startMapResult = src.map(location.start, true);
    const endMapResult = src.map(location.end, true);
    const locF = mappedIndexToLineCol(src);
    let sourceLocation;
    try {
        sourceLocation = {
            start: locF(location.start),
            end: locF(location.end)
        };
    } catch (_e) {
        sourceLocation = {
            start: {
                line: 0,
                column: 0
            },
            end: {
                line: 0,
                column: 0
            }
        };
    }
    if (startMapResult === undefined || endMapResult === undefined) {
        throw new Error("Internal Error: createSourceContext called with bad location.");
    }
    if (startMapResult.originalString !== endMapResult.originalString) {
        throw new Error("Internal Error: don't know how to create source context across different source files");
    }
    const originalString = startMapResult.originalString;
    const nLines = lines(originalString.value).length;
    const { start , end ,  } = sourceLocation;
    const { prefixWidth , lines: formattedLines ,  } = formatLineRange(originalString.value, Math.max(0, start.line - 1), Math.min(end.line + 1, nLines - 1));
    const contextLines = [];
    let mustPrintEllipsis = true;
    for (const { lineNumber , content , rawLine  } of formattedLines){
        if (lineNumber < start.line || lineNumber > end.line) {
            if (rawLine.trim().length) {
                contextLines.push(content);
            }
        } else {
            if (lineNumber >= start.line + 2 && lineNumber <= end.line - 2) {
                if (mustPrintEllipsis) {
                    mustPrintEllipsis = false;
                    contextLines.push("...");
                }
            } else {
                const startColumn = lineNumber > start.line ? 0 : start.column;
                const endColumn = lineNumber < end.line ? rawLine.length : end.column;
                contextLines.push(content);
                contextLines.push(" ".repeat(prefixWidth + startColumn - 1) + "~".repeat(endColumn - startColumn + 1));
            }
        }
    }
    return contextLines.join("\n");
}
function createLocalizedError(obj) {
    const { violatingObject , instancePath , schemaPath , source , message , schema ,  } = obj;
    const locF = mappedIndexToLineCol(source);
    let location;
    try {
        location = {
            start: locF(violatingObject.start),
            end: locF(violatingObject.end)
        };
    } catch (_e) {
        location = {
            start: {
                line: 0,
                column: 0
            },
            end: {
                line: 0,
                column: 0
            }
        };
    }
    const mapResult = source.map(violatingObject.start);
    const fileName = mapResult ? mapResult.originalString.fileName : undefined;
    return {
        source: mappedString(source, [
            {
                start: violatingObject.start,
                end: violatingObject.end
            }
        ]),
        violatingObject: violatingObject,
        instancePath,
        schemaPath,
        schema,
        message,
        location: location,
        niceError: {
            heading: message,
            error: [],
            info: {},
            fileName,
            location: location,
            sourceContext: createSourceContext(violatingObject.source, {
                start: violatingObject.start,
                end: violatingObject.end
            })
        }
    };
}
class ValidationContext {
    instancePath;
    root;
    nodeStack;
    currentNode;
    constructor(){
        this.instancePath = [];
        this.currentNode = {
            edge: "#",
            errors: [],
            children: []
        };
        this.nodeStack = [
            this.currentNode
        ];
        this.root = this.currentNode;
    }
    error(value, schema, message) {
        this.currentNode.errors.push({
            value,
            schema,
            message,
            instancePath: this.instancePath.slice(),
            schemaPath: this.nodeStack.map((node)=>node.edge)
        });
    }
    pushSchema(schemaPath) {
        const newNode = {
            edge: schemaPath,
            errors: [],
            children: []
        };
        this.currentNode.children.push(newNode);
        this.currentNode = newNode;
        this.nodeStack.push(newNode);
    }
    popSchema(success) {
        this.nodeStack.pop();
        this.currentNode = this.nodeStack[this.nodeStack.length - 1];
        if (success) {
            this.currentNode.children.pop();
        }
        return success;
    }
    pushInstance(instance) {
        this.instancePath.push(instance);
    }
    popInstance() {
        this.instancePath.pop();
    }
    withSchemaPath(schemaPath, chunk) {
        this.pushSchema(schemaPath);
        return this.popSchema(chunk());
    }
    validate(schema, source, value, pruneErrors = true) {
        if (validateGeneric(value, schema, this)) {
            return [];
        }
        return this.collectErrors(schema, source, value, pruneErrors);
    }
    collectErrors(_schema, source, _value, pruneErrors = true) {
        const inner = (node)=>{
            const result1 = [];
            if (node.edge === "anyOf" && pruneErrors) {
                const innerResults = node.children.map(inner);
                const isRequiredError = (e)=>e.schemaPath.indexOf("required") === e.schemaPath.length - 1;
                const isPropertyNamesError = (e)=>e.schemaPath.indexOf("propertyNames") !== -1;
                if (innerResults.some((el)=>el.length && isRequiredError(el[0])) && innerResults.some((el)=>el.length && isPropertyNamesError(el[0]))) {
                    return innerResults.filter((r)=>{
                        return r.length && r[0].schemaPath.slice(-1)[0] === "required";
                    })[0];
                }
                const errorTypeQuality = (e)=>{
                    const t = e.schemaPath.slice().reverse();
                    if (e.schemaPath.indexOf("propertyNames") !== -1) {
                        return 10;
                    }
                    if (t[0] === "required") {
                        return 0;
                    }
                    if (t[0] === "type") {
                        if (t[1] === "null") {
                            return 10;
                        }
                        return 1;
                    }
                    return 1;
                };
                const errorComparator = (a, b)=>{
                    for(let i1 = 0; i1 < a.length; ++i1){
                        if (a[i1] < b[i1]) {
                            return -1;
                        }
                        if (a[i1] > b[i1]) {
                            return 1;
                        }
                    }
                    return 0;
                };
                let bestResults = [];
                let bestError = [
                    Infinity,
                    Infinity
                ];
                for (const resultGroup of innerResults){
                    let maxQuality = -Infinity;
                    let totalSpan = 0;
                    for (const result11 of resultGroup){
                        totalSpan += result11.value.end - result11.value.start;
                        maxQuality = Math.max(maxQuality, errorTypeQuality(result11));
                    }
                    const thisError = [
                        maxQuality,
                        totalSpan
                    ];
                    if (errorComparator(thisError, bestError) === -1) {
                        bestError = thisError;
                        bestResults = resultGroup;
                    }
                }
                return bestResults;
            } else {
                result1.push(...node.errors);
                for (const child of node.children){
                    result1.push(...inner(child));
                }
                return result1;
            }
        };
        const errors = inner(this.root);
        const result1 = errors.map((validationError)=>createLocalizedError({
                violatingObject: validationError.value,
                instancePath: validationError.instancePath,
                schemaPath: validationError.schemaPath,
                schema: validationError.schema,
                message: validationError.message,
                source
            }));
        return result1;
    }
}
function validateGeneric(value, s, context) {
    s = resolveSchema(s);
    const st = schemaType(s);
    return context.withSchemaPath(st, ()=>schemaCall(s, {
            "false": (schema)=>{
                context.error(value, schema, "false");
                return false;
            },
            "true": (_)=>true,
            "any": (schema)=>validateAny(value, schema, context),
            "boolean": (schema)=>validateBoolean(value, schema, context),
            "number": (schema)=>validateNumber(value, schema, context),
            "string": (schema)=>validateString(value, schema, context),
            "null": (schema)=>validateNull(value, schema, context),
            "enum": (schema)=>validateEnum(value, schema, context),
            "anyOf": (schema)=>validateAnyOf(value, schema, context),
            "allOf": (schema)=>validateAllOf(value, schema, context),
            "array": (schema)=>validateArray(value, schema, context),
            "object": (schema)=>validateObject(value, schema, context),
            "ref": (schema)=>validateGeneric(value, resolveSchema(schema), context)
        }));
}
function typeIsValid(value, schema, context, valid) {
    if (!valid) {
        return context.withSchemaPath("type", ()=>{
            context.error(value, schema, "type mismatch");
            return false;
        });
    }
    return valid;
}
function validateAny(_value, _schema, _context) {
    return true;
}
function validateBoolean(value, schema, context) {
    return typeIsValid(value, schema, context, typeof value.result === "boolean");
}
function validateNumber(value, schema, context) {
    if (!typeIsValid(value, schema, context, typeof value.result === "number")) {
        return false;
    }
    let result1 = true;
    if (schema.minimum !== undefined) {
        result1 = context.withSchemaPath("minimum", ()=>{
            const v = value.result;
            if (!(v >= schema.minimum)) {
                context.error(value, schema, `value ${value.result} is less than required minimum ${schema.minimum}`);
                return false;
            }
            return true;
        });
    }
    if (schema.maximum !== undefined) {
        result1 = context.withSchemaPath("maximum", ()=>{
            const v = value.result;
            if (!(v <= schema.maximum)) {
                context.error(value, schema, `value ${value.result} is greater than required maximum ${schema.maximum}`);
                return false;
            }
            return true;
        });
    }
    if (schema.exclusiveMinimum !== undefined) {
        result1 = context.withSchemaPath("exclusiveMinimum", ()=>{
            const v = value.result;
            if (!(v > schema.exclusiveMinimum)) {
                context.error(value, schema, `value ${value.result} is less than or equal to required (exclusive) minimum ${schema.exclusiveMinimum}`);
                return false;
            }
            return true;
        });
    }
    if (schema.exclusiveMaximum !== undefined) {
        result1 = context.withSchemaPath("exclusiveMaximum", ()=>{
            const v = value.result;
            if (!(v < schema.exclusiveMaximum)) {
                context.error(value, schema, `value ${value.result} is greater than or equal to required (exclusive) maximum ${schema.exclusiveMaximum}`);
                return false;
            }
            return true;
        });
    }
    return result1;
}
function validateString(value, schema, context) {
    if (!typeIsValid(value, schema, context, typeof value.result === "string")) {
        return false;
    }
    if (schema.pattern !== undefined) {
        if (schema.compiledPattern === undefined) {
            schema.compiledPattern = new RegExp(schema.pattern);
        }
        if (!value.result.match(schema.compiledPattern)) {
            return context.withSchemaPath("pattern", ()=>{
                context.error(value, schema, `value doesn't match pattern`);
                return false;
            });
        }
    }
    return true;
}
function validateNull(value, schema, context) {
    if (!typeIsValid(value, schema, context, value.result === null)) {
        return false;
    }
    return true;
}
function validateEnum(value, schema, context) {
    for (const enumValue of schema["enum"]){
        if (enumValue === value.result) {
            return true;
        }
    }
    context.error(value, schema, `must match one of the values`);
    return false;
}
function validateAnyOf(value, schema, context) {
    let passingSchemas = 0;
    for(let i1 = 0; i1 < schema.anyOf.length; ++i1){
        const subSchema = schema.anyOf[i1];
        context.withSchemaPath(i1, ()=>{
            if (validateGeneric(value, subSchema, context)) {
                passingSchemas++;
                return true;
            }
            return false;
        });
    }
    return passingSchemas > 0;
}
function validateAllOf(value, schema, context) {
    let passingSchemas = 0;
    for(let i1 = 0; i1 < schema.allOf.length; ++i1){
        const subSchema = schema.allOf[i1];
        context.withSchemaPath(i1, ()=>{
            if (validateGeneric(value, subSchema, context)) {
                passingSchemas++;
                return true;
            }
            return false;
        });
    }
    return passingSchemas === schema.allOf.length;
}
function validateArray(value, schema, context) {
    let result1 = true;
    if (!typeIsValid(value, schema, context, Array.isArray(value.result))) {
        return false;
    }
    const length = value.result.length;
    if (schema.minItems !== undefined && length < schema.minItems) {
        context.withSchemaPath("minItems", ()=>{
            context.error(value, schema, `array should have at least ${schema.minItems} items but has ${length} items instead`);
            return false;
        });
        result1 = false;
    }
    if (schema.maxItems !== undefined && length > schema.maxItems) {
        context.withSchemaPath("maxItems", ()=>{
            context.error(value, schema, `array should have at most ${schema.maxItems} items but has ${length} items instead`);
            return false;
        });
        result1 = false;
    }
    if (schema.items !== undefined) {
        result1 = context.withSchemaPath("items", ()=>{
            let result1 = true;
            for(let i1 = 0; i1 < value.components.length; ++i1){
                context.pushInstance(i1);
                result1 = validateGeneric(value.components[i1], schema.items, context) && result1;
                context.popInstance();
            }
            return result1;
        }) && result1;
    }
    return result1;
}
function validateObject(value, schema, context) {
    const isObject = typeof value.result === "object" && !Array.isArray(value.result) && value.result !== null;
    if (!typeIsValid(value, schema, context, isObject)) {
        return false;
    }
    let result1 = true;
    const ownProperties = new Set(Object.getOwnPropertyNames(value.result));
    const objResult = value.result;
    const locate = (key, keyOrValue = "value")=>{
        for(let i1 = 0; i1 < value.components.length; i1 += 2){
            if (String(value.components[i1].result) === key) {
                if (keyOrValue === "value") {
                    return value.components[i1 + 1];
                } else {
                    return value.components[i1];
                }
            }
        }
        throw new Error(`Internal Error, couldn't locate key ${key}`);
    };
    const inspectedProps = new Set();
    if (schema.closed) {
        result1 = context.withSchemaPath("closed", ()=>{
            if (schema.properties === undefined) {
                throw new Error("Internal Error: closed schemas need properties");
            }
            let innerResult = true;
            for (const key of ownProperties){
                if (!schema.properties[key]) {
                    context.error(locate(key, "key"), schema, `object has invalid field ${key}`);
                    innerResult = false;
                }
            }
            return innerResult;
        }) && result1;
    }
    if (schema.properties !== undefined) {
        result1 = context.withSchemaPath("properties", ()=>{
            let result1 = true;
            for (const [key, subSchema] of Object.entries(schema.properties)){
                if (ownProperties.has(key)) {
                    inspectedProps.add(key);
                    context.pushInstance(key);
                    result1 = context.withSchemaPath(key, ()=>validateGeneric(locate(key), subSchema, context)) && result1;
                    context.popInstance();
                }
            }
            return result1;
        }) && result1;
    }
    if (schema.patternProperties !== undefined) {
        result1 = context.withSchemaPath("patternProperties", ()=>{
            let result1 = true;
            for (const [key, subSchema] of Object.entries(schema.patternProperties)){
                if (schema.compiledPatterns === undefined) {
                    schema.compiledPatterns = {};
                }
                if (schema.compiledPatterns[key] === undefined) {
                    schema.compiledPatterns[key] = new RegExp(key);
                }
                const regexp = schema.compiledPatterns[key];
                for (const [objectKey, _val] of Object.entries(objResult)){
                    if (objectKey.match(regexp)) {
                        inspectedProps.add(objectKey);
                        context.pushInstance(objectKey);
                        result1 = context.withSchemaPath(key, ()=>validateGeneric(locate(objectKey), subSchema, context)) && result1;
                        context.popInstance();
                    }
                }
            }
            return result1;
        }) && result1;
    }
    if (schema.additionalProperties !== undefined) {
        result1 = context.withSchemaPath("additionalProperties", ()=>{
            return Object.keys(objResult).filter((objectKey)=>!inspectedProps.has(objectKey)).every((objectKey)=>validateGeneric(locate(objectKey), schema.additionalProperties, context));
        }) && result1;
    }
    if (schema.propertyNames !== undefined) {
        result1 = context.withSchemaPath("propertyNames", ()=>{
            return Array.from(ownProperties).every((key)=>validateGeneric(locate(key, "key"), schema.propertyNames, context));
        }) && result1;
    }
    if (schema.required !== undefined) {
        result1 = context.withSchemaPath("required", ()=>{
            let result1 = true;
            for (const reqKey of schema.required){
                if (!ownProperties.has(reqKey)) {
                    context.error(value, schema, `object is missing required property ${reqKey}`);
                    result1 = false;
                }
            }
            return result1;
        }) && result1;
    }
    return result1;
}
function validate(value, schema, source, pruneErrors = true) {
    const context = new ValidationContext();
    return context.validate(schema, source, value, pruneErrors);
}
class YAMLSchema {
    schema;
    errorHandlers;
    constructor(schema){
        this.errorHandlers = [];
        this.schema = schema;
    }
    addHandler(handler) {
        this.errorHandlers.push(handler);
    }
    transformErrors(annotation, errors) {
        return errors.map((error)=>{
            for (const handler of this.errorHandlers){
                const localError = handler(error, annotation, this.schema);
                if (localError === null) {
                    return null;
                }
                error = localError;
            }
            return error;
        }).filter((error)=>error !== null);
    }
    async validateParse(src, annotation, pruneErrors = true) {
        const validationErrors = validate(annotation, this.schema, src, pruneErrors);
        if (validationErrors.length) {
            const localizedErrors = this.transformErrors(annotation, validationErrors);
            return {
                result: annotation.result,
                errors: localizedErrors
            };
        } else {
            return {
                result: annotation.result,
                errors: []
            };
        }
    }
    reportErrorsInSource(result1, _src, message, error, log) {
        if (result1.errors.length) {
            if (message.length) {
                error(message);
            }
            for (const err of result1.errors){
                log(err.niceError);
            }
        }
        return result1;
    }
    async validateParseWithErrors(src, annotation, message, error, log) {
        const result1 = await this.validateParse(src, annotation);
        this.reportErrorsInSource(result1, src, message, error, log);
        return result1;
    }
}
const yamlValidators = {};
function getSchemaName(schema) {
    if (schema === true || schema === false) {
        throw new Error("Expected schema to be named");
    }
    let schemaName = schema["$id"];
    if (schemaName !== undefined) {
        return schemaName;
    }
    if (schemaType(schema) === "ref") {
        schemaName = schema["$ref"];
    }
    if (schemaName !== undefined) {
        return schemaName;
    }
    throw new Error("Expected schema to be named");
}
function getValidator(schema) {
    const schemaName = getSchemaName(schema);
    if (yamlValidators[schemaName]) {
        return yamlValidators[schemaName];
    }
    const validator = new YAMLSchema(schema);
    yamlValidators[schemaName] = validator;
    setDefaultErrorHandlers(validator);
    return validator;
}
async function withValidator(schema, fun) {
    let result1;
    let error;
    try {
        const validator = getValidator(schema);
        result1 = await fun(validator);
    } catch (e) {
        error = e;
    }
    if (error !== undefined) {
        throw error;
    }
    return result1;
}
function addValidatorErrorHandler(schema, handler) {
    return withValidator(schema, async (validator)=>{
        validator.addHandler(handler);
    });
}
function memoize(f, keyMemoizer) {
    const memo = {};
    const inner = (...args)=>{
        const key = keyMemoizer(...args);
        const v = memo[key];
        if (v !== undefined) {
            return v;
        }
        memo[key] = f(...args);
        return memo[key];
    };
    return inner;
}
const regExpEscapeChars1 = [
    "!",
    "$",
    "(",
    ")",
    "*",
    "+",
    ".",
    "=",
    "?",
    "[",
    "\\",
    "^",
    "{",
    "|", 
];
const rangeEscapeChars1 = [
    "-",
    "\\",
    "]"
];
function globToRegExp1(glob, { extended =true , globstar: globstarOption = true , caseInsensitive =false  } = {}) {
    if (glob == "") {
        return /(?!)/;
    }
    const sep = "/+";
    const sepMaybe = "/*";
    const seps = [
        "/"
    ];
    const globstar = "(?:[^/]*(?:/|$)+)*";
    const wildcard = "[^/]*";
    const escapePrefix = "\\";
    let newLength = glob.length;
    for(; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--);
    glob = glob.slice(0, newLength);
    let regExpString = "";
    for(let j = 0; j < glob.length;){
        let segment = "";
        const groupStack = [];
        let inRange = false;
        let inEscape = false;
        let endsWithSep = false;
        let i1 = j;
        for(; i1 < glob.length && !seps.includes(glob[i1]); i1++){
            if (inEscape) {
                inEscape = false;
                const escapeChars = inRange ? rangeEscapeChars1 : regExpEscapeChars1;
                segment += escapeChars.includes(glob[i1]) ? `\\${glob[i1]}` : glob[i1];
                continue;
            }
            if (glob[i1] == escapePrefix) {
                inEscape = true;
                continue;
            }
            if (glob[i1] == "[") {
                if (!inRange) {
                    inRange = true;
                    segment += "[";
                    if (glob[i1 + 1] == "!") {
                        i1++;
                        segment += "^";
                    } else if (glob[i1 + 1] == "^") {
                        i1++;
                        segment += "\\^";
                    }
                    continue;
                } else if (glob[i1 + 1] == ":") {
                    let k = i1 + 1;
                    let value = "";
                    while(glob[k + 1] != null && glob[k + 1] != ":"){
                        value += glob[k + 1];
                        k++;
                    }
                    if (glob[k + 1] == ":" && glob[k + 2] == "]") {
                        i1 = k + 2;
                        if (value == "alnum") segment += "\\dA-Za-z";
                        else if (value == "alpha") segment += "A-Za-z";
                        else if (value == "ascii") segment += "\x00-\x7F";
                        else if (value == "blank") segment += "\t ";
                        else if (value == "cntrl") segment += "\x00-\x1F\x7F";
                        else if (value == "digit") segment += "\\d";
                        else if (value == "graph") segment += "\x21-\x7E";
                        else if (value == "lower") segment += "a-z";
                        else if (value == "print") segment += "\x20-\x7E";
                        else if (value == "punct") {
                            segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
                        } else if (value == "space") segment += "\\s\v";
                        else if (value == "upper") segment += "A-Z";
                        else if (value == "word") segment += "\\w";
                        else if (value == "xdigit") segment += "\\dA-Fa-f";
                        continue;
                    }
                }
            }
            if (glob[i1] == "]" && inRange) {
                inRange = false;
                segment += "]";
                continue;
            }
            if (inRange) {
                if (glob[i1] == "\\") {
                    segment += `\\\\`;
                } else {
                    segment += glob[i1];
                }
                continue;
            }
            if (glob[i1] == ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] != "BRACE") {
                segment += ")";
                const type = groupStack.pop();
                if (type == "!") {
                    segment += wildcard;
                } else if (type != "@") {
                    segment += type;
                }
                continue;
            }
            if (glob[i1] == "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] != "BRACE") {
                segment += "|";
                continue;
            }
            if (glob[i1] == "+" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("+");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "@" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("@");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "?") {
                if (extended && glob[i1 + 1] == "(") {
                    i1++;
                    groupStack.push("?");
                    segment += "(?:";
                } else {
                    segment += ".";
                }
                continue;
            }
            if (glob[i1] == "!" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("!");
                segment += "(?!";
                continue;
            }
            if (glob[i1] == "{") {
                groupStack.push("BRACE");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "}" && groupStack[groupStack.length - 1] == "BRACE") {
                groupStack.pop();
                segment += ")";
                continue;
            }
            if (glob[i1] == "," && groupStack[groupStack.length - 1] == "BRACE") {
                segment += "|";
                continue;
            }
            if (glob[i1] == "*") {
                if (extended && glob[i1 + 1] == "(") {
                    i1++;
                    groupStack.push("*");
                    segment += "(?:";
                } else {
                    const prevChar = glob[i1 - 1];
                    let numStars = 1;
                    while(glob[i1 + 1] == "*"){
                        i1++;
                        numStars++;
                    }
                    const nextChar = glob[i1 + 1];
                    if (globstarOption && numStars == 2 && [
                        ...seps,
                        undefined
                    ].includes(prevChar) && [
                        ...seps,
                        undefined
                    ].includes(nextChar)) {
                        segment += globstar;
                        endsWithSep = true;
                    } else {
                        segment += wildcard;
                    }
                }
                continue;
            }
            segment += regExpEscapeChars1.includes(glob[i1]) ? `\\${glob[i1]}` : glob[i1];
        }
        if (groupStack.length > 0 || inRange || inEscape) {
            segment = "";
            for (const c of glob.slice(j, i1)){
                segment += regExpEscapeChars1.includes(c) ? `\\${c}` : c;
                endsWithSep = false;
            }
        }
        regExpString += segment;
        if (!endsWithSep) {
            regExpString += i1 < glob.length ? sep : sepMaybe;
            endsWithSep = true;
        }
        while(seps.includes(glob[i1]))i1++;
        if (!(i1 > j)) {
            throw new Error("Assertion failure: i > j (potential infinite loop)");
        }
        j = i1;
    }
    regExpString = `^${regExpString}$`;
    return new RegExp(regExpString, caseInsensitive ? "i" : "");
}
const _resources = {};
function setYamlIntelligenceResources(resources) {
    for (const [key, value] of Object.entries(resources)){
        _resources[key] = value;
    }
}
function exportYamlIntelligenceResources(pretty = false) {
    if (pretty) {
        return JSON.stringify(_resources, null, 2);
    } else {
        return JSON.stringify(_resources);
    }
}
function getYamlIntelligenceResource(filename) {
    if (_resources[filename] === undefined) {
        throw new Error(`Internal Error: getYamlIntelligenceResource called with missing resource ${filename}`);
    }
    return _resources[filename];
}
function expandResourceGlob(glob) {
    return Object.keys(_resources).filter((key)=>key.match(globToRegExp1(glob))).map((key)=>[
            key,
            getYamlIntelligenceResource(key)
        ]);
}
function fromEntries(iterable) {
    return [
        ...iterable
    ].reduce((obj, [key, val])=>{
        obj[key] = val;
        return obj;
    }, {});
}
let _parser;
function setTreeSitter(parser) {
    _parser = parser;
}
function getTreeSitterSync() {
    if (_parser === undefined) {
        throw new Error("tree-sitter uninitialized");
    }
    return _parser;
}
function isNothing(subject) {
    return typeof subject === "undefined" || subject === null;
}
function isObject1(subject) {
    return typeof subject === "object" && subject !== null;
}
function toArray(sequence) {
    if (Array.isArray(sequence)) return sequence;
    else if (isNothing(sequence)) return [];
    return [
        sequence
    ];
}
function extend(target, source) {
    var index, length, key, sourceKeys;
    if (source) {
        sourceKeys = Object.keys(source);
        for(index = 0, length = sourceKeys.length; index < length; index += 1){
            key = sourceKeys[index];
            target[key] = source[key];
        }
    }
    return target;
}
function repeat1(string, count) {
    var result1 = "", cycle;
    for(cycle = 0; cycle < count; cycle += 1){
        result1 += string;
    }
    return result1;
}
function isNegativeZero1(number) {
    return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
}
var isNothing_1 = isNothing;
var isObject_1 = isObject1;
var toArray_1 = toArray;
var repeat_1 = repeat1;
var isNegativeZero_1 = isNegativeZero1;
var extend_1 = extend;
var common = {
    isNothing: isNothing_1,
    isObject: isObject_1,
    toArray: toArray_1,
    repeat: repeat_1,
    isNegativeZero: isNegativeZero_1,
    extend: extend_1
};
function formatError(exception2, compact) {
    var where = "", message = exception2.reason || "(unknown reason)";
    if (!exception2.mark) return message;
    if (exception2.mark.name) {
        where += 'in "' + exception2.mark.name + '" ';
    }
    where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")";
    if (!compact && exception2.mark.snippet) {
        where += "\n\n" + exception2.mark.snippet;
    }
    return message + " " + where;
}
function YAMLException$1(reason, mark) {
    Error.call(this);
    this.name = "YAMLException";
    this.reason = reason;
    this.mark = mark;
    this.message = formatError(this, false);
    if (Error.captureStackTrace) {
        Error.captureStackTrace(this, this.constructor);
    } else {
        this.stack = new Error().stack || "";
    }
}
YAMLException$1.prototype = Object.create(Error.prototype);
YAMLException$1.prototype.constructor = YAMLException$1;
YAMLException$1.prototype.toString = function toString(compact) {
    return this.name + ": " + formatError(this, compact);
};
var exception = YAMLException$1;
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
    var head = "";
    var tail = "";
    var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
    if (position - lineStart > maxHalfLength) {
        head = " ... ";
        lineStart = position - maxHalfLength + head.length;
    }
    if (lineEnd - position > maxHalfLength) {
        tail = " ...";
        lineEnd = position + maxHalfLength - tail.length;
    }
    return {
        str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail,
        pos: position - lineStart + head.length
    };
}
function padStart(string, max) {
    return common.repeat(" ", max - string.length) + string;
}
function makeSnippet(mark, options) {
    options = Object.create(options || null);
    if (!mark.buffer) return null;
    if (!options.maxLength) options.maxLength = 79;
    if (typeof options.indent !== "number") options.indent = 1;
    if (typeof options.linesBefore !== "number") options.linesBefore = 3;
    if (typeof options.linesAfter !== "number") options.linesAfter = 2;
    var re = /\r?\n|\r|\0/g;
    var lineStarts = [
        0
    ];
    var lineEnds = [];
    var match;
    var foundLineNo = -1;
    while(match = re.exec(mark.buffer)){
        lineEnds.push(match.index);
        lineStarts.push(match.index + match[0].length);
        if (mark.position <= match.index && foundLineNo < 0) {
            foundLineNo = lineStarts.length - 2;
        }
    }
    if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
    var result1 = "", i1, line;
    var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
    var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
    for(i1 = 1; i1 <= options.linesBefore; i1++){
        if (foundLineNo - i1 < 0) break;
        line = getLine(mark.buffer, lineStarts[foundLineNo - i1], lineEnds[foundLineNo - i1], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i1]), maxLineLength);
        result1 = common.repeat(" ", options.indent) + padStart((mark.line - i1 + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result1;
    }
    line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
    result1 += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
    result1 += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
    for(i1 = 1; i1 <= options.linesAfter; i1++){
        if (foundLineNo + i1 >= lineEnds.length) break;
        line = getLine(mark.buffer, lineStarts[foundLineNo + i1], lineEnds[foundLineNo + i1], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i1]), maxLineLength);
        result1 += common.repeat(" ", options.indent) + padStart((mark.line + i1 + 1).toString(), lineNoLength) + " | " + line.str + "\n";
    }
    return result1.replace(/\n$/, "");
}
var snippet = makeSnippet;
var TYPE_CONSTRUCTOR_OPTIONS = [
    "kind",
    "multi",
    "resolve",
    "construct",
    "instanceOf",
    "predicate",
    "represent",
    "representName",
    "defaultStyle",
    "styleAliases", 
];
var YAML_NODE_KINDS = [
    "scalar",
    "sequence",
    "mapping"
];
function compileStyleAliases(map2) {
    var result1 = {};
    if (map2 !== null) {
        Object.keys(map2).forEach(function(style) {
            map2[style].forEach(function(alias) {
                result1[String(alias)] = style;
            });
        });
    }
    return result1;
}
function Type$1(tag, options) {
    options = options || {};
    Object.keys(options).forEach(function(name) {
        if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
            throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
        }
    });
    this.options = options;
    this.tag = tag;
    this.kind = options["kind"] || null;
    this.resolve = options["resolve"] || function() {
        return true;
    };
    this.construct = options["construct"] || function(data) {
        return data;
    };
    this.instanceOf = options["instanceOf"] || null;
    this.predicate = options["predicate"] || null;
    this.represent = options["represent"] || null;
    this.representName = options["representName"] || null;
    this.defaultStyle = options["defaultStyle"] || null;
    this.multi = options["multi"] || false;
    this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
    if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
        throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
    }
}
var type = Type$1;
function compileList1(schema2, name) {
    var result1 = [];
    schema2[name].forEach(function(currentType) {
        var newIndex = result1.length;
        result1.forEach(function(previousType, previousIndex) {
            if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
                newIndex = previousIndex;
            }
        });
        result1[newIndex] = currentType;
    });
    return result1;
}
function compileMap1() {
    var result1 = {
        scalar: {},
        sequence: {},
        mapping: {},
        fallback: {},
        multi: {
            scalar: [],
            sequence: [],
            mapping: [],
            fallback: []
        }
    }, index, length;
    function collectType(type2) {
        if (type2.multi) {
            result1.multi[type2.kind].push(type2);
            result1.multi["fallback"].push(type2);
        } else {
            result1[type2.kind][type2.tag] = result1["fallback"][type2.tag] = type2;
        }
    }
    for(index = 0, length = arguments.length; index < length; index += 1){
        arguments[index].forEach(collectType);
    }
    return result1;
}
function Schema$1(definition) {
    return this.extend(definition);
}
Schema$1.prototype.extend = function extend2(definition) {
    var implicit = [];
    var explicit = [];
    if (definition instanceof type) {
        explicit.push(definition);
    } else if (Array.isArray(definition)) {
        explicit = explicit.concat(definition);
    } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
        if (definition.implicit) implicit = implicit.concat(definition.implicit);
        if (definition.explicit) explicit = explicit.concat(definition.explicit);
    } else {
        throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
    }
    implicit.forEach(function(type$1) {
        if (!(type$1 instanceof type)) {
            throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
        }
        if (type$1.loadKind && type$1.loadKind !== "scalar") {
            throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
        }
        if (type$1.multi) {
            throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
        }
    });
    explicit.forEach(function(type$1) {
        if (!(type$1 instanceof type)) {
            throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
        }
    });
    var result1 = Object.create(Schema$1.prototype);
    result1.implicit = (this.implicit || []).concat(implicit);
    result1.explicit = (this.explicit || []).concat(explicit);
    result1.compiledImplicit = compileList1(result1, "implicit");
    result1.compiledExplicit = compileList1(result1, "explicit");
    result1.compiledTypeMap = compileMap1(result1.compiledImplicit, result1.compiledExplicit);
    return result1;
};
var schema = Schema$1;
var str1 = new type("tag:yaml.org,2002:str", {
    kind: "scalar",
    construct: function(data) {
        return data !== null ? data : "";
    }
});
var seq1 = new type("tag:yaml.org,2002:seq", {
    kind: "sequence",
    construct: function(data) {
        return data !== null ? data : [];
    }
});
var map1 = new type("tag:yaml.org,2002:map", {
    kind: "mapping",
    construct: function(data) {
        return data !== null ? data : {};
    }
});
var failsafe1 = new schema({
    explicit: [
        str1,
        seq1,
        map1
    ]
});
function resolveYamlNull1(data) {
    if (data === null) return true;
    var max = data.length;
    return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
}
function constructYamlNull1() {
    return null;
}
function isNull1(object) {
    return object === null;
}
var _null = new type("tag:yaml.org,2002:null", {
    kind: "scalar",
    resolve: resolveYamlNull1,
    construct: constructYamlNull1,
    predicate: isNull1,
    represent: {
        canonical: function() {
            return "~";
        },
        lowercase: function() {
            return "null";
        },
        uppercase: function() {
            return "NULL";
        },
        camelcase: function() {
            return "Null";
        },
        empty: function() {
            return "";
        }
    },
    defaultStyle: "lowercase"
});
function resolveYamlBoolean1(data) {
    if (data === null) return false;
    var max = data.length;
    return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
}
function constructYamlBoolean1(data) {
    return data === "true" || data === "True" || data === "TRUE";
}
function isBoolean1(object) {
    return Object.prototype.toString.call(object) === "[object Boolean]";
}
var bool1 = new type("tag:yaml.org,2002:bool", {
    kind: "scalar",
    resolve: resolveYamlBoolean1,
    construct: constructYamlBoolean1,
    predicate: isBoolean1,
    represent: {
        lowercase: function(object) {
            return object ? "true" : "false";
        },
        uppercase: function(object) {
            return object ? "TRUE" : "FALSE";
        },
        camelcase: function(object) {
            return object ? "True" : "False";
        }
    },
    defaultStyle: "lowercase"
});
function isHexCode1(c) {
    return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
}
function isOctCode1(c) {
    return 48 <= c && c <= 55;
}
function isDecCode1(c) {
    return 48 <= c && c <= 57;
}
function resolveYamlInteger1(data) {
    if (data === null) return false;
    var max = data.length, index = 0, hasDigits = false, ch;
    if (!max) return false;
    ch = data[index];
    if (ch === "-" || ch === "+") {
        ch = data[++index];
    }
    if (ch === "0") {
        if (index + 1 === max) return true;
        ch = data[++index];
        if (ch === "b") {
            index++;
            for(; index < max; index++){
                ch = data[index];
                if (ch === "_") continue;
                if (ch !== "0" && ch !== "1") return false;
                hasDigits = true;
            }
            return hasDigits && ch !== "_";
        }
        if (ch === "x") {
            index++;
            for(; index < max; index++){
                ch = data[index];
                if (ch === "_") continue;
                if (!isHexCode1(data.charCodeAt(index))) return false;
                hasDigits = true;
            }
            return hasDigits && ch !== "_";
        }
        if (ch === "o") {
            index++;
            for(; index < max; index++){
                ch = data[index];
                if (ch === "_") continue;
                if (!isOctCode1(data.charCodeAt(index))) return false;
                hasDigits = true;
            }
            return hasDigits && ch !== "_";
        }
    }
    if (ch === "_") return false;
    for(; index < max; index++){
        ch = data[index];
        if (ch === "_") continue;
        if (!isDecCode1(data.charCodeAt(index))) {
            return false;
        }
        hasDigits = true;
    }
    if (!hasDigits || ch === "_") return false;
    return true;
}
function constructYamlInteger1(data) {
    var value = data, sign = 1, ch;
    if (value.indexOf("_") !== -1) {
        value = value.replace(/_/g, "");
    }
    ch = value[0];
    if (ch === "-" || ch === "+") {
        if (ch === "-") sign = -1;
        value = value.slice(1);
        ch = value[0];
    }
    if (value === "0") return 0;
    if (ch === "0") {
        if (value[1] === "b") return sign * parseInt(value.slice(2), 2);
        if (value[1] === "x") return sign * parseInt(value.slice(2), 16);
        if (value[1] === "o") return sign * parseInt(value.slice(2), 8);
    }
    return sign * parseInt(value, 10);
}
function isInteger1(object) {
    return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object);
}
var __int1 = new type("tag:yaml.org,2002:int", {
    kind: "scalar",
    resolve: resolveYamlInteger1,
    construct: constructYamlInteger1,
    predicate: isInteger1,
    represent: {
        binary: function(obj) {
            return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
        },
        octal: function(obj) {
            return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
        },
        decimal: function(obj) {
            return obj.toString(10);
        },
        hexadecimal: function(obj) {
            return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
        }
    },
    defaultStyle: "decimal",
    styleAliases: {
        binary: [
            2,
            "bin"
        ],
        octal: [
            8,
            "oct"
        ],
        decimal: [
            10,
            "dec"
        ],
        hexadecimal: [
            16,
            "hex"
        ]
    }
});
var YAML_FLOAT_PATTERN1 = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
function resolveYamlFloat1(data) {
    if (data === null) return false;
    if (!YAML_FLOAT_PATTERN1.test(data) || data[data.length - 1] === "_") {
        return false;
    }
    return true;
}
function constructYamlFloat1(data) {
    var value, sign;
    value = data.replace(/_/g, "").toLowerCase();
    sign = value[0] === "-" ? -1 : 1;
    if ("+-".indexOf(value[0]) >= 0) {
        value = value.slice(1);
    }
    if (value === ".inf") {
        return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
    } else if (value === ".nan") {
        return NaN;
    }
    return sign * parseFloat(value, 10);
}
var SCIENTIFIC_WITHOUT_DOT1 = /^[-+]?[0-9]+e/;
function representYamlFloat1(object, style) {
    var res;
    if (isNaN(object)) {
        switch(style){
            case "lowercase":
                return ".nan";
            case "uppercase":
                return ".NAN";
            case "camelcase":
                return ".NaN";
        }
    } else if (Number.POSITIVE_INFINITY === object) {
        switch(style){
            case "lowercase":
                return ".inf";
            case "uppercase":
                return ".INF";
            case "camelcase":
                return ".Inf";
        }
    } else if (Number.NEGATIVE_INFINITY === object) {
        switch(style){
            case "lowercase":
                return "-.inf";
            case "uppercase":
                return "-.INF";
            case "camelcase":
                return "-.Inf";
        }
    } else if (common.isNegativeZero(object)) {
        return "-0.0";
    }
    res = object.toString(10);
    return SCIENTIFIC_WITHOUT_DOT1.test(res) ? res.replace("e", ".e") : res;
}
function isFloat1(object) {
    return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
}
var __float1 = new type("tag:yaml.org,2002:float", {
    kind: "scalar",
    resolve: resolveYamlFloat1,
    construct: constructYamlFloat1,
    predicate: isFloat1,
    represent: representYamlFloat1,
    defaultStyle: "lowercase"
});
var json1 = failsafe1.extend({
    implicit: [
        _null,
        bool1,
        __int1,
        __float1
    ]
});
var core1 = json1;
var YAML_DATE_REGEXP1 = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
var YAML_TIMESTAMP_REGEXP1 = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
function resolveYamlTimestamp1(data) {
    if (data === null) return false;
    if (YAML_DATE_REGEXP1.exec(data) !== null) return true;
    if (YAML_TIMESTAMP_REGEXP1.exec(data) !== null) return true;
    return false;
}
function constructYamlTimestamp1(data) {
    var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
    match = YAML_DATE_REGEXP1.exec(data);
    if (match === null) match = YAML_TIMESTAMP_REGEXP1.exec(data);
    if (match === null) throw new Error("Date resolve error");
    year = +match[1];
    month = +match[2] - 1;
    day = +match[3];
    if (!match[4]) {
        return new Date(Date.UTC(year, month, day));
    }
    hour = +match[4];
    minute = +match[5];
    second = +match[6];
    if (match[7]) {
        fraction = match[7].slice(0, 3);
        while(fraction.length < 3){
            fraction += "0";
        }
        fraction = +fraction;
    }
    if (match[9]) {
        tz_hour = +match[10];
        tz_minute = +(match[11] || 0);
        delta = (tz_hour * 60 + tz_minute) * 6e4;
        if (match[9] === "-") delta = -delta;
    }
    date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
    if (delta) date.setTime(date.getTime() - delta);
    return date;
}
function representYamlTimestamp1(object) {
    return object.toISOString();
}
var timestamp1 = new type("tag:yaml.org,2002:timestamp", {
    kind: "scalar",
    resolve: resolveYamlTimestamp1,
    construct: constructYamlTimestamp1,
    instanceOf: Date,
    represent: representYamlTimestamp1
});
function resolveYamlMerge1(data) {
    return data === "<<" || data === null;
}
var merge1 = new type("tag:yaml.org,2002:merge", {
    kind: "scalar",
    resolve: resolveYamlMerge1
});
var BASE64_MAP1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
function resolveYamlBinary1(data) {
    if (data === null) return false;
    var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP1;
    for(idx = 0; idx < max; idx++){
        code = map2.indexOf(data.charAt(idx));
        if (code > 64) continue;
        if (code < 0) return false;
        bitlen += 6;
    }
    return bitlen % 8 === 0;
}
function constructYamlBinary1(data) {
    var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP1, bits = 0, result1 = [];
    for(idx = 0; idx < max; idx++){
        if (idx % 4 === 0 && idx) {
            result1.push(bits >> 16 & 255);
            result1.push(bits >> 8 & 255);
            result1.push(bits & 255);
        }
        bits = bits << 6 | map2.indexOf(input.charAt(idx));
    }
    tailbits = max % 4 * 6;
    if (tailbits === 0) {
        result1.push(bits >> 16 & 255);
        result1.push(bits >> 8 & 255);
        result1.push(bits & 255);
    } else if (tailbits === 18) {
        result1.push(bits >> 10 & 255);
        result1.push(bits >> 2 & 255);
    } else if (tailbits === 12) {
        result1.push(bits >> 4 & 255);
    }
    return new Uint8Array(result1);
}
function representYamlBinary1(object) {
    var result1 = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP1;
    for(idx = 0; idx < max; idx++){
        if (idx % 3 === 0 && idx) {
            result1 += map2[bits >> 18 & 63];
            result1 += map2[bits >> 12 & 63];
            result1 += map2[bits >> 6 & 63];
            result1 += map2[bits & 63];
        }
        bits = (bits << 8) + object[idx];
    }
    tail = max % 3;
    if (tail === 0) {
        result1 += map2[bits >> 18 & 63];
        result1 += map2[bits >> 12 & 63];
        result1 += map2[bits >> 6 & 63];
        result1 += map2[bits & 63];
    } else if (tail === 2) {
        result1 += map2[bits >> 10 & 63];
        result1 += map2[bits >> 4 & 63];
        result1 += map2[bits << 2 & 63];
        result1 += map2[64];
    } else if (tail === 1) {
        result1 += map2[bits >> 2 & 63];
        result1 += map2[bits << 4 & 63];
        result1 += map2[64];
        result1 += map2[64];
    }
    return result1;
}
function isBinary1(obj) {
    return Object.prototype.toString.call(obj) === "[object Uint8Array]";
}
var binary1 = new type("tag:yaml.org,2002:binary", {
    kind: "scalar",
    resolve: resolveYamlBinary1,
    construct: constructYamlBinary1,
    predicate: isBinary1,
    represent: representYamlBinary1
});
var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
var _toString$2 = Object.prototype.toString;
function resolveYamlOmap1(data) {
    if (data === null) return true;
    var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
    for(index = 0, length = object.length; index < length; index += 1){
        pair = object[index];
        pairHasKey = false;
        if (_toString$2.call(pair) !== "[object Object]") return false;
        for(pairKey in pair){
            if (_hasOwnProperty$3.call(pair, pairKey)) {
                if (!pairHasKey) pairHasKey = true;
                else return false;
            }
        }
        if (!pairHasKey) return false;
        if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
        else return false;
    }
    return true;
}
function constructYamlOmap1(data) {
    return data !== null ? data : [];
}
var omap1 = new type("tag:yaml.org,2002:omap", {
    kind: "sequence",
    resolve: resolveYamlOmap1,
    construct: constructYamlOmap1
});
var _toString$1 = Object.prototype.toString;
function resolveYamlPairs1(data) {
    if (data === null) return true;
    var index, length, pair, keys, result1, object = data;
    result1 = new Array(object.length);
    for(index = 0, length = object.length; index < length; index += 1){
        pair = object[index];
        if (_toString$1.call(pair) !== "[object Object]") return false;
        keys = Object.keys(pair);
        if (keys.length !== 1) return false;
        result1[index] = [
            keys[0],
            pair[keys[0]]
        ];
    }
    return true;
}
function constructYamlPairs1(data) {
    if (data === null) return [];
    var index, length, pair, keys, result1, object = data;
    result1 = new Array(object.length);
    for(index = 0, length = object.length; index < length; index += 1){
        pair = object[index];
        keys = Object.keys(pair);
        result1[index] = [
            keys[0],
            pair[keys[0]]
        ];
    }
    return result1;
}
var pairs1 = new type("tag:yaml.org,2002:pairs", {
    kind: "sequence",
    resolve: resolveYamlPairs1,
    construct: constructYamlPairs1
});
var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
function resolveYamlSet1(data) {
    if (data === null) return true;
    var key, object = data;
    for(key in object){
        if (_hasOwnProperty$2.call(object, key)) {
            if (object[key] !== null) return false;
        }
    }
    return true;
}
function constructYamlSet1(data) {
    return data !== null ? data : {};
}
var set1 = new type("tag:yaml.org,2002:set", {
    kind: "mapping",
    resolve: resolveYamlSet1,
    construct: constructYamlSet1
});
var _default = core1.extend({
    implicit: [
        timestamp1,
        merge1
    ],
    explicit: [
        binary1,
        omap1,
        pairs1,
        set1
    ]
});
var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
var CONTEXT_FLOW_IN = 1;
var CONTEXT_FLOW_OUT = 2;
var CONTEXT_BLOCK_IN1 = 3;
var CONTEXT_BLOCK_OUT1 = 4;
var CHOMPING_CLIP = 1;
var CHOMPING_STRIP1 = 2;
var CHOMPING_KEEP1 = 3;
var PATTERN_NON_PRINTABLE1 = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
var PATTERN_NON_ASCII_LINE_BREAKS1 = /[\x85\u2028\u2029]/;
var PATTERN_FLOW_INDICATORS1 = /[,\[\]\{\}]/;
var PATTERN_TAG_HANDLE1 = /^(?:!|!!|![a-z\-]+!)$/i;
var PATTERN_TAG_URI1 = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
function _class1(obj) {
    return Object.prototype.toString.call(obj);
}
function is_EOL(c) {
    return c === 10 || c === 13;
}
function is_WHITE_SPACE(c) {
    return c === 9 || c === 32;
}
function is_WS_OR_EOL(c) {
    return c === 9 || c === 32 || c === 10 || c === 13;
}
function is_FLOW_INDICATOR(c) {
    return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
}
function fromHexCode1(c) {
    var lc;
    if (48 <= c && c <= 57) {
        return c - 48;
    }
    lc = c | 32;
    if (97 <= lc && lc <= 102) {
        return lc - 97 + 10;
    }
    return -1;
}
function escapedHexLen1(c) {
    if (c === 120) {
        return 2;
    }
    if (c === 117) {
        return 4;
    }
    if (c === 85) {
        return 8;
    }
    return 0;
}
function fromDecimalCode1(c) {
    if (48 <= c && c <= 57) {
        return c - 48;
    }
    return -1;
}
function simpleEscapeSequence1(c) {
    return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? "	" : c === 9 ? "	" : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
}
function charFromCodepoint1(c) {
    if (c <= 65535) {
        return String.fromCharCode(c);
    }
    return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
}
var simpleEscapeCheck1 = new Array(256);
var simpleEscapeMap1 = new Array(256);
for(var i3 = 0; i3 < 256; i3++){
    simpleEscapeCheck1[i3] = simpleEscapeSequence1(i3) ? 1 : 0;
    simpleEscapeMap1[i3] = simpleEscapeSequence1(i3);
}
function State$1(input, options) {
    this.input = input;
    this.filename = options["filename"] || null;
    this.schema = options["schema"] || _default;
    this.onWarning = options["onWarning"] || null;
    this.legacy = options["legacy"] || false;
    this.json = options["json"] || false;
    this.listener = options["listener"] || null;
    this.implicitTypes = this.schema.compiledImplicit;
    this.typeMap = this.schema.compiledTypeMap;
    this.length = input.length;
    this.position = 0;
    this.line = 0;
    this.lineStart = 0;
    this.lineIndent = 0;
    this.firstTabInLine = -1;
    this.documents = [];
}
function generateError1(state, message) {
    var mark = {
        name: state.filename,
        buffer: state.input.slice(0, -1),
        position: state.position,
        line: state.line,
        column: state.position - state.lineStart
    };
    mark.snippet = snippet(mark);
    return new exception(message, mark);
}
function throwError1(state, message) {
    throw generateError1(state, message);
}
function throwWarning1(state, message) {
    if (state.onWarning) {
        state.onWarning.call(null, generateError1(state, message));
    }
}
var directiveHandlers1 = {
    YAML: function handleYamlDirective(state, name, args) {
        var match, major, minor;
        if (state.version !== null) {
            throwError1(state, "duplication of %YAML directive");
        }
        if (args.length !== 1) {
            throwError1(state, "YAML directive accepts exactly one argument");
        }
        match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
        if (match === null) {
            throwError1(state, "ill-formed argument of the YAML directive");
        }
        major = parseInt(match[1], 10);
        minor = parseInt(match[2], 10);
        if (major !== 1) {
            throwError1(state, "unacceptable YAML version of the document");
        }
        state.version = args[0];
        state.checkLineBreaks = minor < 2;
        if (minor !== 1 && minor !== 2) {
            throwWarning1(state, "unsupported YAML version of the document");
        }
    },
    TAG: function handleTagDirective(state, name, args) {
        var handle, prefix;
        if (args.length !== 2) {
            throwError1(state, "TAG directive accepts exactly two arguments");
        }
        handle = args[0];
        prefix = args[1];
        if (!PATTERN_TAG_HANDLE1.test(handle)) {
            throwError1(state, "ill-formed tag handle (first argument) of the TAG directive");
        }
        if (_hasOwnProperty$1.call(state.tagMap, handle)) {
            throwError1(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
        }
        if (!PATTERN_TAG_URI1.test(prefix)) {
            throwError1(state, "ill-formed tag prefix (second argument) of the TAG directive");
        }
        try {
            prefix = decodeURIComponent(prefix);
        } catch (err) {
            throwError1(state, "tag prefix is malformed: " + prefix);
        }
        state.tagMap[handle] = prefix;
    }
};
function captureSegment1(state, start, end, checkJson) {
    var _position, _length, _character, _result;
    if (start < end) {
        _result = state.input.slice(start, end);
        if (checkJson) {
            for(_position = 0, _length = _result.length; _position < _length; _position += 1){
                _character = _result.charCodeAt(_position);
                if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
                    throwError1(state, "expected valid JSON character");
                }
            }
        } else if (PATTERN_NON_PRINTABLE1.test(_result)) {
            throwError1(state, "the stream contains non-printable characters");
        }
        state.result += _result;
    }
}
function mergeMappings1(state, destination, source, overridableKeys) {
    var sourceKeys, key, index, quantity;
    if (!common.isObject(source)) {
        throwError1(state, "cannot merge mappings; the provided source object is unacceptable");
    }
    sourceKeys = Object.keys(source);
    for(index = 0, quantity = sourceKeys.length; index < quantity; index += 1){
        key = sourceKeys[index];
        if (!_hasOwnProperty$1.call(destination, key)) {
            destination[key] = source[key];
            overridableKeys[key] = true;
        }
    }
}
function storeMappingPair1(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
    var index, quantity;
    if (Array.isArray(keyNode)) {
        keyNode = Array.prototype.slice.call(keyNode);
        for(index = 0, quantity = keyNode.length; index < quantity; index += 1){
            if (Array.isArray(keyNode[index])) {
                throwError1(state, "nested arrays are not supported inside keys");
            }
            if (typeof keyNode === "object" && _class1(keyNode[index]) === "[object Object]") {
                keyNode[index] = "[object Object]";
            }
        }
    }
    if (typeof keyNode === "object" && _class1(keyNode) === "[object Object]") {
        keyNode = "[object Object]";
    }
    keyNode = String(keyNode);
    if (_result === null) {
        _result = {};
    }
    if (keyTag === "tag:yaml.org,2002:merge") {
        if (Array.isArray(valueNode)) {
            for(index = 0, quantity = valueNode.length; index < quantity; index += 1){
                mergeMappings1(state, _result, valueNode[index], overridableKeys);
            }
        } else {
            mergeMappings1(state, _result, valueNode, overridableKeys);
        }
    } else {
        if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) {
            state.line = startLine || state.line;
            state.lineStart = startLineStart || state.lineStart;
            state.position = startPos || state.position;
            throwError1(state, "duplicated mapping key");
        }
        if (keyNode === "__proto__") {
            Object.defineProperty(_result, keyNode, {
                configurable: true,
                enumerable: true,
                writable: true,
                value: valueNode
            });
        } else {
            _result[keyNode] = valueNode;
        }
        delete overridableKeys[keyNode];
    }
    return _result;
}
function readLineBreak1(state) {
    var ch;
    ch = state.input.charCodeAt(state.position);
    if (ch === 10) {
        state.position++;
    } else if (ch === 13) {
        state.position++;
        if (state.input.charCodeAt(state.position) === 10) {
            state.position++;
        }
    } else {
        throwError1(state, "a line break is expected");
    }
    state.line += 1;
    state.lineStart = state.position;
    state.firstTabInLine = -1;
}
function skipSeparationSpace1(state, allowComments, checkIndent) {
    var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
    while(ch !== 0){
        while(is_WHITE_SPACE(ch)){
            if (ch === 9 && state.firstTabInLine === -1) {
                state.firstTabInLine = state.position;
            }
            ch = state.input.charCodeAt(++state.position);
        }
        if (allowComments && ch === 35) {
            do {
                ch = state.input.charCodeAt(++state.position);
            }while (ch !== 10 && ch !== 13 && ch !== 0)
        }
        if (is_EOL(ch)) {
            readLineBreak1(state);
            ch = state.input.charCodeAt(state.position);
            lineBreaks++;
            state.lineIndent = 0;
            while(ch === 32){
                state.lineIndent++;
                ch = state.input.charCodeAt(++state.position);
            }
        } else {
            break;
        }
    }
    if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
        throwWarning1(state, "deficient indentation");
    }
    return lineBreaks;
}
function testDocumentSeparator1(state) {
    var _position = state.position, ch;
    ch = state.input.charCodeAt(_position);
    if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
        _position += 3;
        ch = state.input.charCodeAt(_position);
        if (ch === 0 || is_WS_OR_EOL(ch)) {
            return true;
        }
    }
    return false;
}
function writeFoldedLines1(state, count) {
    if (count === 1) {
        state.result += " ";
    } else if (count > 1) {
        state.result += common.repeat("\n", count - 1);
    }
}
function readPlainScalar1(state, nodeIndent, withinFlowCollection) {
    var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
    ch = state.input.charCodeAt(state.position);
    if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
        return false;
    }
    if (ch === 63 || ch === 45) {
        following = state.input.charCodeAt(state.position + 1);
        if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
            return false;
        }
    }
    state.kind = "scalar";
    state.result = "";
    captureStart = captureEnd = state.position;
    hasPendingContent = false;
    while(ch !== 0){
        if (ch === 58) {
            following = state.input.charCodeAt(state.position + 1);
            if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
                break;
            }
        } else if (ch === 35) {
            preceding = state.input.charCodeAt(state.position - 1);
            if (is_WS_OR_EOL(preceding)) {
                break;
            }
        } else if (state.position === state.lineStart && testDocumentSeparator1(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
            break;
        } else if (is_EOL(ch)) {
            _line = state.line;
            _lineStart = state.lineStart;
            _lineIndent = state.lineIndent;
            skipSeparationSpace1(state, false, -1);
            if (state.lineIndent >= nodeIndent) {
                hasPendingContent = true;
                ch = state.input.charCodeAt(state.position);
                continue;
            } else {
                state.position = captureEnd;
                state.line = _line;
                state.lineStart = _lineStart;
                state.lineIndent = _lineIndent;
                break;
            }
        }
        if (hasPendingContent) {
            captureSegment1(state, captureStart, captureEnd, false);
            writeFoldedLines1(state, state.line - _line);
            captureStart = captureEnd = state.position;
            hasPendingContent = false;
        }
        if (!is_WHITE_SPACE(ch)) {
            captureEnd = state.position + 1;
        }
        ch = state.input.charCodeAt(++state.position);
    }
    captureSegment1(state, captureStart, captureEnd, false);
    if (state.result) {
        return true;
    }
    state.kind = _kind;
    state.result = _result;
    return false;
}
function readSingleQuotedScalar1(state, nodeIndent) {
    var ch, captureStart, captureEnd;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 39) {
        return false;
    }
    state.kind = "scalar";
    state.result = "";
    state.position++;
    captureStart = captureEnd = state.position;
    while((ch = state.input.charCodeAt(state.position)) !== 0){
        if (ch === 39) {
            captureSegment1(state, captureStart, state.position, true);
            ch = state.input.charCodeAt(++state.position);
            if (ch === 39) {
                captureStart = state.position;
                state.position++;
                captureEnd = state.position;
            } else {
                return true;
            }
        } else if (is_EOL(ch)) {
            captureSegment1(state, captureStart, captureEnd, true);
            writeFoldedLines1(state, skipSeparationSpace1(state, false, nodeIndent));
            captureStart = captureEnd = state.position;
        } else if (state.position === state.lineStart && testDocumentSeparator1(state)) {
            throwError1(state, "unexpected end of the document within a single quoted scalar");
        } else {
            state.position++;
            captureEnd = state.position;
        }
    }
    throwError1(state, "unexpected end of the stream within a single quoted scalar");
}
function readDoubleQuotedScalar1(state, nodeIndent) {
    var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 34) {
        return false;
    }
    state.kind = "scalar";
    state.result = "";
    state.position++;
    captureStart = captureEnd = state.position;
    while((ch = state.input.charCodeAt(state.position)) !== 0){
        if (ch === 34) {
            captureSegment1(state, captureStart, state.position, true);
            state.position++;
            return true;
        } else if (ch === 92) {
            captureSegment1(state, captureStart, state.position, true);
            ch = state.input.charCodeAt(++state.position);
            if (is_EOL(ch)) {
                skipSeparationSpace1(state, false, nodeIndent);
            } else if (ch < 256 && simpleEscapeCheck1[ch]) {
                state.result += simpleEscapeMap1[ch];
                state.position++;
            } else if ((tmp = escapedHexLen1(ch)) > 0) {
                hexLength = tmp;
                hexResult = 0;
                for(; hexLength > 0; hexLength--){
                    ch = state.input.charCodeAt(++state.position);
                    if ((tmp = fromHexCode1(ch)) >= 0) {
                        hexResult = (hexResult << 4) + tmp;
                    } else {
                        throwError1(state, "expected hexadecimal character");
                    }
                }
                state.result += charFromCodepoint1(hexResult);
                state.position++;
            } else {
                throwError1(state, "unknown escape sequence");
            }
            captureStart = captureEnd = state.position;
        } else if (is_EOL(ch)) {
            captureSegment1(state, captureStart, captureEnd, true);
            writeFoldedLines1(state, skipSeparationSpace1(state, false, nodeIndent));
            captureStart = captureEnd = state.position;
        } else if (state.position === state.lineStart && testDocumentSeparator1(state)) {
            throwError1(state, "unexpected end of the document within a double quoted scalar");
        } else {
            state.position++;
            captureEnd = state.position;
        }
    }
    throwError1(state, "unexpected end of the stream within a double quoted scalar");
}
function readFlowCollection1(state, nodeIndent) {
    var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = Object.create(null), keyNode, keyTag, valueNode, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch === 91) {
        terminator = 93;
        isMapping = false;
        _result = [];
    } else if (ch === 123) {
        terminator = 125;
        isMapping = true;
        _result = {};
    } else {
        return false;
    }
    if (state.anchor !== null) {
        state.anchorMap[state.anchor] = _result;
    }
    ch = state.input.charCodeAt(++state.position);
    while(ch !== 0){
        skipSeparationSpace1(state, true, nodeIndent);
        ch = state.input.charCodeAt(state.position);
        if (ch === terminator) {
            state.position++;
            state.tag = _tag;
            state.anchor = _anchor;
            state.kind = isMapping ? "mapping" : "sequence";
            state.result = _result;
            return true;
        } else if (!readNext) {
            throwError1(state, "missed comma between flow collection entries");
        } else if (ch === 44) {
            throwError1(state, "expected the node content, but found ','");
        }
        keyTag = keyNode = valueNode = null;
        isPair = isExplicitPair = false;
        if (ch === 63) {
            following = state.input.charCodeAt(state.position + 1);
            if (is_WS_OR_EOL(following)) {
                isPair = isExplicitPair = true;
                state.position++;
                skipSeparationSpace1(state, true, nodeIndent);
            }
        }
        _line = state.line;
        _lineStart = state.lineStart;
        _pos = state.position;
        composeNode1(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
        keyTag = state.tag;
        keyNode = state.result;
        skipSeparationSpace1(state, true, nodeIndent);
        ch = state.input.charCodeAt(state.position);
        if ((isExplicitPair || state.line === _line) && ch === 58) {
            isPair = true;
            ch = state.input.charCodeAt(++state.position);
            skipSeparationSpace1(state, true, nodeIndent);
            composeNode1(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
            valueNode = state.result;
        }
        if (isMapping) {
            storeMappingPair1(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
        } else if (isPair) {
            _result.push(storeMappingPair1(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
        } else {
            _result.push(keyNode);
        }
        skipSeparationSpace1(state, true, nodeIndent);
        ch = state.input.charCodeAt(state.position);
        if (ch === 44) {
            readNext = true;
            ch = state.input.charCodeAt(++state.position);
        } else {
            readNext = false;
        }
    }
    throwError1(state, "unexpected end of the stream within a flow collection");
}
function readBlockScalar1(state, nodeIndent) {
    var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch === 124) {
        folding = false;
    } else if (ch === 62) {
        folding = true;
    } else {
        return false;
    }
    state.kind = "scalar";
    state.result = "";
    while(ch !== 0){
        ch = state.input.charCodeAt(++state.position);
        if (ch === 43 || ch === 45) {
            if (CHOMPING_CLIP === chomping) {
                chomping = ch === 43 ? CHOMPING_KEEP1 : CHOMPING_STRIP1;
            } else {
                throwError1(state, "repeat of a chomping mode identifier");
            }
        } else if ((tmp = fromDecimalCode1(ch)) >= 0) {
            if (tmp === 0) {
                throwError1(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
            } else if (!detectedIndent) {
                textIndent = nodeIndent + tmp - 1;
                detectedIndent = true;
            } else {
                throwError1(state, "repeat of an indentation width identifier");
            }
        } else {
            break;
        }
    }
    if (is_WHITE_SPACE(ch)) {
        do {
            ch = state.input.charCodeAt(++state.position);
        }while (is_WHITE_SPACE(ch))
        if (ch === 35) {
            do {
                ch = state.input.charCodeAt(++state.position);
            }while (!is_EOL(ch) && ch !== 0)
        }
    }
    while(ch !== 0){
        readLineBreak1(state);
        state.lineIndent = 0;
        ch = state.input.charCodeAt(state.position);
        while((!detectedIndent || state.lineIndent < textIndent) && ch === 32){
            state.lineIndent++;
            ch = state.input.charCodeAt(++state.position);
        }
        if (!detectedIndent && state.lineIndent > textIndent) {
            textIndent = state.lineIndent;
        }
        if (is_EOL(ch)) {
            emptyLines++;
            continue;
        }
        if (state.lineIndent < textIndent) {
            if (chomping === CHOMPING_KEEP1) {
                state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
            } else if (chomping === CHOMPING_CLIP) {
                if (didReadContent) {
                    state.result += "\n";
                }
            }
            break;
        }
        if (folding) {
            if (is_WHITE_SPACE(ch)) {
                atMoreIndented = true;
                state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
            } else if (atMoreIndented) {
                atMoreIndented = false;
                state.result += common.repeat("\n", emptyLines + 1);
            } else if (emptyLines === 0) {
                if (didReadContent) {
                    state.result += " ";
                }
            } else {
                state.result += common.repeat("\n", emptyLines);
            }
        } else {
            state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
        }
        didReadContent = true;
        detectedIndent = true;
        emptyLines = 0;
        captureStart = state.position;
        while(!is_EOL(ch) && ch !== 0){
            ch = state.input.charCodeAt(++state.position);
        }
        captureSegment1(state, captureStart, state.position, false);
    }
    return true;
}
function readBlockSequence1(state, nodeIndent) {
    var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
    if (state.firstTabInLine !== -1) return false;
    if (state.anchor !== null) {
        state.anchorMap[state.anchor] = _result;
    }
    ch = state.input.charCodeAt(state.position);
    while(ch !== 0){
        if (state.firstTabInLine !== -1) {
            state.position = state.firstTabInLine;
            throwError1(state, "tab characters must not be used in indentation");
        }
        if (ch !== 45) {
            break;
        }
        following = state.input.charCodeAt(state.position + 1);
        if (!is_WS_OR_EOL(following)) {
            break;
        }
        detected = true;
        state.position++;
        if (skipSeparationSpace1(state, true, -1)) {
            if (state.lineIndent <= nodeIndent) {
                _result.push(null);
                ch = state.input.charCodeAt(state.position);
                continue;
            }
        }
        _line = state.line;
        composeNode1(state, nodeIndent, CONTEXT_BLOCK_IN1, false, true);
        _result.push(state.result);
        skipSeparationSpace1(state, true, -1);
        ch = state.input.charCodeAt(state.position);
        if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
            throwError1(state, "bad indentation of a sequence entry");
        } else if (state.lineIndent < nodeIndent) {
            break;
        }
    }
    if (detected) {
        state.tag = _tag;
        state.anchor = _anchor;
        state.kind = "sequence";
        state.result = _result;
        return true;
    }
    return false;
}
function readBlockMapping1(state, nodeIndent, flowIndent) {
    var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
    if (state.firstTabInLine !== -1) return false;
    if (state.anchor !== null) {
        state.anchorMap[state.anchor] = _result;
    }
    ch = state.input.charCodeAt(state.position);
    while(ch !== 0){
        if (!atExplicitKey && state.firstTabInLine !== -1) {
            state.position = state.firstTabInLine;
            throwError1(state, "tab characters must not be used in indentation");
        }
        following = state.input.charCodeAt(state.position + 1);
        _line = state.line;
        if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
            if (ch === 63) {
                if (atExplicitKey) {
                    storeMappingPair1(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
                    keyTag = keyNode = valueNode = null;
                }
                detected = true;
                atExplicitKey = true;
                allowCompact = true;
            } else if (atExplicitKey) {
                atExplicitKey = false;
                allowCompact = true;
            } else {
                throwError1(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
            }
            state.position += 1;
            ch = following;
        } else {
            _keyLine = state.line;
            _keyLineStart = state.lineStart;
            _keyPos = state.position;
            if (!composeNode1(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
                break;
            }
            if (state.line === _line) {
                ch = state.input.charCodeAt(state.position);
                while(is_WHITE_SPACE(ch)){
                    ch = state.input.charCodeAt(++state.position);
                }
                if (ch === 58) {
                    ch = state.input.charCodeAt(++state.position);
                    if (!is_WS_OR_EOL(ch)) {
                        throwError1(state, "a whitespace character is expected after the key-value separator within a block mapping");
                    }
                    if (atExplicitKey) {
                        storeMappingPair1(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
                        keyTag = keyNode = valueNode = null;
                    }
                    detected = true;
                    atExplicitKey = false;
                    allowCompact = false;
                    keyTag = state.tag;
                    keyNode = state.result;
                } else if (detected) {
                    throwError1(state, "can not read an implicit mapping pair; a colon is missed");
                } else {
                    state.tag = _tag;
                    state.anchor = _anchor;
                    return true;
                }
            } else if (detected) {
                throwError1(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
            } else {
                state.tag = _tag;
                state.anchor = _anchor;
                return true;
            }
        }
        if (state.line === _line || state.lineIndent > nodeIndent) {
            if (atExplicitKey) {
                _keyLine = state.line;
                _keyLineStart = state.lineStart;
                _keyPos = state.position;
            }
            if (composeNode1(state, nodeIndent, CONTEXT_BLOCK_OUT1, true, allowCompact)) {
                if (atExplicitKey) {
                    keyNode = state.result;
                } else {
                    valueNode = state.result;
                }
            }
            if (!atExplicitKey) {
                storeMappingPair1(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
                keyTag = keyNode = valueNode = null;
            }
            skipSeparationSpace1(state, true, -1);
            ch = state.input.charCodeAt(state.position);
        }
        if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
            throwError1(state, "bad indentation of a mapping entry");
        } else if (state.lineIndent < nodeIndent) {
            break;
        }
    }
    if (atExplicitKey) {
        storeMappingPair1(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
    }
    if (detected) {
        state.tag = _tag;
        state.anchor = _anchor;
        state.kind = "mapping";
        state.result = _result;
    }
    return detected;
}
function readTagProperty1(state) {
    var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 33) return false;
    if (state.tag !== null) {
        throwError1(state, "duplication of a tag property");
    }
    ch = state.input.charCodeAt(++state.position);
    if (ch === 60) {
        isVerbatim = true;
        ch = state.input.charCodeAt(++state.position);
    } else if (ch === 33) {
        isNamed = true;
        tagHandle = "!!";
        ch = state.input.charCodeAt(++state.position);
    } else {
        tagHandle = "!";
    }
    _position = state.position;
    if (isVerbatim) {
        do {
            ch = state.input.charCodeAt(++state.position);
        }while (ch !== 0 && ch !== 62)
        if (state.position < state.length) {
            tagName = state.input.slice(_position, state.position);
            ch = state.input.charCodeAt(++state.position);
        } else {
            throwError1(state, "unexpected end of the stream within a verbatim tag");
        }
    } else {
        while(ch !== 0 && !is_WS_OR_EOL(ch)){
            if (ch === 33) {
                if (!isNamed) {
                    tagHandle = state.input.slice(_position - 1, state.position + 1);
                    if (!PATTERN_TAG_HANDLE1.test(tagHandle)) {
                        throwError1(state, "named tag handle cannot contain such characters");
                    }
                    isNamed = true;
                    _position = state.position + 1;
                } else {
                    throwError1(state, "tag suffix cannot contain exclamation marks");
                }
            }
            ch = state.input.charCodeAt(++state.position);
        }
        tagName = state.input.slice(_position, state.position);
        if (PATTERN_FLOW_INDICATORS1.test(tagName)) {
            throwError1(state, "tag suffix cannot contain flow indicator characters");
        }
    }
    if (tagName && !PATTERN_TAG_URI1.test(tagName)) {
        throwError1(state, "tag name cannot contain such characters: " + tagName);
    }
    try {
        tagName = decodeURIComponent(tagName);
    } catch (err) {
        throwError1(state, "tag name is malformed: " + tagName);
    }
    if (isVerbatim) {
        state.tag = tagName;
    } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {
        state.tag = state.tagMap[tagHandle] + tagName;
    } else if (tagHandle === "!") {
        state.tag = "!" + tagName;
    } else if (tagHandle === "!!") {
        state.tag = "tag:yaml.org,2002:" + tagName;
    } else {
        throwError1(state, 'undeclared tag handle "' + tagHandle + '"');
    }
    return true;
}
function readAnchorProperty1(state) {
    var _position, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 38) return false;
    if (state.anchor !== null) {
        throwError1(state, "duplication of an anchor property");
    }
    ch = state.input.charCodeAt(++state.position);
    _position = state.position;
    while(ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)){
        ch = state.input.charCodeAt(++state.position);
    }
    if (state.position === _position) {
        throwError1(state, "name of an anchor node must contain at least one character");
    }
    state.anchor = state.input.slice(_position, state.position);
    return true;
}
function readAlias1(state) {
    var _position, alias, ch;
    ch = state.input.charCodeAt(state.position);
    if (ch !== 42) return false;
    ch = state.input.charCodeAt(++state.position);
    _position = state.position;
    while(ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)){
        ch = state.input.charCodeAt(++state.position);
    }
    if (state.position === _position) {
        throwError1(state, "name of an alias node must contain at least one character");
    }
    alias = state.input.slice(_position, state.position);
    if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {
        throwError1(state, 'unidentified alias "' + alias + '"');
    }
    state.result = state.anchorMap[alias];
    skipSeparationSpace1(state, true, -1);
    return true;
}
function composeNode1(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
    var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent;
    if (state.listener !== null) {
        state.listener("open", state);
    }
    state.tag = null;
    state.anchor = null;
    state.kind = null;
    state.result = null;
    allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT1 === nodeContext || CONTEXT_BLOCK_IN1 === nodeContext;
    if (allowToSeek) {
        if (skipSeparationSpace1(state, true, -1)) {
            atNewLine = true;
            if (state.lineIndent > parentIndent) {
                indentStatus = 1;
            } else if (state.lineIndent === parentIndent) {
                indentStatus = 0;
            } else if (state.lineIndent < parentIndent) {
                indentStatus = -1;
            }
        }
    }
    if (indentStatus === 1) {
        while(readTagProperty1(state) || readAnchorProperty1(state)){
            if (skipSeparationSpace1(state, true, -1)) {
                atNewLine = true;
                allowBlockCollections = allowBlockStyles;
                if (state.lineIndent > parentIndent) {
                    indentStatus = 1;
                } else if (state.lineIndent === parentIndent) {
                    indentStatus = 0;
                } else if (state.lineIndent < parentIndent) {
                    indentStatus = -1;
                }
            } else {
                allowBlockCollections = false;
            }
        }
    }
    if (allowBlockCollections) {
        allowBlockCollections = atNewLine || allowCompact;
    }
    if (indentStatus === 1 || CONTEXT_BLOCK_OUT1 === nodeContext) {
        if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
            flowIndent = parentIndent;
        } else {
            flowIndent = parentIndent + 1;
        }
        blockIndent = state.position - state.lineStart;
        if (indentStatus === 1) {
            if (allowBlockCollections && (readBlockSequence1(state, blockIndent) || readBlockMapping1(state, blockIndent, flowIndent)) || readFlowCollection1(state, flowIndent)) {
                hasContent = true;
            } else {
                if (allowBlockScalars && readBlockScalar1(state, flowIndent) || readSingleQuotedScalar1(state, flowIndent) || readDoubleQuotedScalar1(state, flowIndent)) {
                    hasContent = true;
                } else if (readAlias1(state)) {
                    hasContent = true;
                    if (state.tag !== null || state.anchor !== null) {
                        throwError1(state, "alias node should not have any properties");
                    }
                } else if (readPlainScalar1(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
                    hasContent = true;
                    if (state.tag === null) {
                        state.tag = "?";
                    }
                }
                if (state.anchor !== null) {
                    state.anchorMap[state.anchor] = state.result;
                }
            }
        } else if (indentStatus === 0) {
            hasContent = allowBlockCollections && readBlockSequence1(state, blockIndent);
        }
    }
    if (state.tag === null) {
        if (state.anchor !== null) {
            state.anchorMap[state.anchor] = state.result;
        }
    } else if (state.tag === "?") {
        if (state.result !== null && state.kind !== "scalar") {
            throwError1(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
        }
        for(typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1){
            type2 = state.implicitTypes[typeIndex];
            if (type2.resolve(state.result)) {
                state.result = type2.construct(state.result);
                state.tag = type2.tag;
                if (state.anchor !== null) {
                    state.anchorMap[state.anchor] = state.result;
                }
                break;
            }
        }
    } else if (state.tag !== "!") {
        if (_hasOwnProperty$1.call(state.typeMap[state.kind || "fallback"], state.tag)) {
            type2 = state.typeMap[state.kind || "fallback"][state.tag];
        } else {
            type2 = null;
            typeList = state.typeMap.multi[state.kind || "fallback"];
            for(typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1){
                if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
                    type2 = typeList[typeIndex];
                    break;
                }
            }
        }
        if (!type2) {
            throwError1(state, "unknown tag !<" + state.tag + ">");
        }
        if (state.result !== null && type2.kind !== state.kind) {
            throwError1(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"');
        }
        if (!type2.resolve(state.result, state.tag)) {
            throwError1(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
        } else {
            state.result = type2.construct(state.result, state.tag);
            if (state.anchor !== null) {
                state.anchorMap[state.anchor] = state.result;
            }
        }
    }
    if (state.listener !== null) {
        state.listener("close", state);
    }
    return state.tag !== null || state.anchor !== null || hasContent;
}
function readDocument1(state) {
    var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
    state.version = null;
    state.checkLineBreaks = state.legacy;
    state.tagMap = Object.create(null);
    state.anchorMap = Object.create(null);
    while((ch = state.input.charCodeAt(state.position)) !== 0){
        skipSeparationSpace1(state, true, -1);
        ch = state.input.charCodeAt(state.position);
        if (state.lineIndent > 0 || ch !== 37) {
            break;
        }
        hasDirectives = true;
        ch = state.input.charCodeAt(++state.position);
        _position = state.position;
        while(ch !== 0 && !is_WS_OR_EOL(ch)){
            ch = state.input.charCodeAt(++state.position);
        }
        directiveName = state.input.slice(_position, state.position);
        directiveArgs = [];
        if (directiveName.length < 1) {
            throwError1(state, "directive name must not be less than one character in length");
        }
        while(ch !== 0){
            while(is_WHITE_SPACE(ch)){
                ch = state.input.charCodeAt(++state.position);
            }
            if (ch === 35) {
                do {
                    ch = state.input.charCodeAt(++state.position);
                }while (ch !== 0 && !is_EOL(ch))
                break;
            }
            if (is_EOL(ch)) break;
            _position = state.position;
            while(ch !== 0 && !is_WS_OR_EOL(ch)){
                ch = state.input.charCodeAt(++state.position);
            }
            directiveArgs.push(state.input.slice(_position, state.position));
        }
        if (ch !== 0) readLineBreak1(state);
        if (_hasOwnProperty$1.call(directiveHandlers1, directiveName)) {
            directiveHandlers1[directiveName](state, directiveName, directiveArgs);
        } else {
            throwWarning1(state, 'unknown document directive "' + directiveName + '"');
        }
    }
    skipSeparationSpace1(state, true, -1);
    if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
        state.position += 3;
        skipSeparationSpace1(state, true, -1);
    } else if (hasDirectives) {
        throwError1(state, "directives end mark is expected");
    }
    composeNode1(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT1, false, true);
    skipSeparationSpace1(state, true, -1);
    if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS1.test(state.input.slice(documentStart, state.position))) {
        throwWarning1(state, "non-ASCII line breaks are interpreted as content");
    }
    state.documents.push(state.result);
    if (state.position === state.lineStart && testDocumentSeparator1(state)) {
        if (state.input.charCodeAt(state.position) === 46) {
            state.position += 3;
            skipSeparationSpace1(state, true, -1);
        }
        return;
    }
    if (state.position < state.length - 1) {
        throwError1(state, "end of the stream or a document separator is expected");
    } else {
        return;
    }
}
function loadDocuments1(input, options) {
    input = String(input);
    options = options || {};
    if (input.length !== 0) {
        if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
            input += "\n";
        }
        if (input.charCodeAt(0) === 65279) {
            input = input.slice(1);
        }
    }
    var state = new State$1(input, options);
    var nullpos = input.indexOf("\0");
    if (nullpos !== -1) {
        state.position = nullpos;
        throwError1(state, "null byte is not allowed in input");
    }
    state.input += "\0";
    while(state.input.charCodeAt(state.position) === 32){
        state.lineIndent += 1;
        state.position += 1;
    }
    while(state.position < state.length - 1){
        readDocument1(state);
    }
    return state.documents;
}
function loadAll$1(input, iterator, options) {
    if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
        options = iterator;
        iterator = null;
    }
    var documents = loadDocuments1(input, options);
    if (typeof iterator !== "function") {
        return documents;
    }
    for(var index = 0, length = documents.length; index < length; index += 1){
        iterator(documents[index]);
    }
}
function load$1(input, options) {
    var documents = loadDocuments1(input, options);
    if (documents.length === 0) {
        return void 0;
    } else if (documents.length === 1) {
        return documents[0];
    }
    throw new exception("expected a single document in the stream, but found more");
}
var loadAll_1 = loadAll$1;
var load_1 = load$1;
var loader = {
    loadAll: loadAll_1,
    load: load_1
};
var _toString3 = Object.prototype.toString;
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var CHAR_BOM = 65279;
var CHAR_TAB = 9;
var CHAR_LINE_FEED = 10;
var CHAR_CARRIAGE_RETURN = 13;
var CHAR_SPACE = 32;
var CHAR_EXCLAMATION = 33;
var CHAR_DOUBLE_QUOTE = 34;
var CHAR_SHARP = 35;
var CHAR_PERCENT = 37;
var CHAR_AMPERSAND = 38;
var CHAR_SINGLE_QUOTE = 39;
var CHAR_ASTERISK = 42;
var CHAR_COMMA = 44;
var CHAR_MINUS = 45;
var CHAR_COLON = 58;
var CHAR_EQUALS = 61;
var CHAR_GREATER_THAN = 62;
var CHAR_QUESTION = 63;
var CHAR_COMMERCIAL_AT = 64;
var CHAR_LEFT_SQUARE_BRACKET = 91;
var CHAR_RIGHT_SQUARE_BRACKET = 93;
var CHAR_GRAVE_ACCENT = 96;
var CHAR_LEFT_CURLY_BRACKET = 123;
var CHAR_VERTICAL_LINE = 124;
var CHAR_RIGHT_CURLY_BRACKET = 125;
var ESCAPE_SEQUENCES1 = {};
ESCAPE_SEQUENCES1[0] = "\\0";
ESCAPE_SEQUENCES1[7] = "\\a";
ESCAPE_SEQUENCES1[8] = "\\b";
ESCAPE_SEQUENCES1[9] = "\\t";
ESCAPE_SEQUENCES1[10] = "\\n";
ESCAPE_SEQUENCES1[11] = "\\v";
ESCAPE_SEQUENCES1[12] = "\\f";
ESCAPE_SEQUENCES1[13] = "\\r";
ESCAPE_SEQUENCES1[27] = "\\e";
ESCAPE_SEQUENCES1[34] = '\\"';
ESCAPE_SEQUENCES1[92] = "\\\\";
ESCAPE_SEQUENCES1[133] = "\\N";
ESCAPE_SEQUENCES1[160] = "\\_";
ESCAPE_SEQUENCES1[8232] = "\\L";
ESCAPE_SEQUENCES1[8233] = "\\P";
var DEPRECATED_BOOLEANS_SYNTAX1 = [
    "y",
    "Y",
    "yes",
    "Yes",
    "YES",
    "on",
    "On",
    "ON",
    "n",
    "N",
    "no",
    "No",
    "NO",
    "off",
    "Off",
    "OFF", 
];
var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
function compileStyleMap1(schema2, map2) {
    var result1, keys, index, length, tag, style, type2;
    if (map2 === null) return {};
    result1 = {};
    keys = Object.keys(map2);
    for(index = 0, length = keys.length; index < length; index += 1){
        tag = keys[index];
        style = String(map2[tag]);
        if (tag.slice(0, 2) === "!!") {
            tag = "tag:yaml.org,2002:" + tag.slice(2);
        }
        type2 = schema2.compiledTypeMap["fallback"][tag];
        if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) {
            style = type2.styleAliases[style];
        }
        result1[tag] = style;
    }
    return result1;
}
function encodeHex1(character) {
    var string, handle, length;
    string = character.toString(16).toUpperCase();
    if (character <= 255) {
        handle = "x";
        length = 2;
    } else if (character <= 65535) {
        handle = "u";
        length = 4;
    } else if (character <= 4294967295) {
        handle = "U";
        length = 8;
    } else {
        throw new exception("code point within a string may not be greater than 0xFFFFFFFF");
    }
    return "\\" + handle + common.repeat("0", length - string.length) + string;
}
var QUOTING_TYPE_SINGLE = 1, QUOTING_TYPE_DOUBLE = 2;
function State2(options) {
    this.schema = options["schema"] || _default;
    this.indent = Math.max(1, options["indent"] || 2);
    this.noArrayIndent = options["noArrayIndent"] || false;
    this.skipInvalid = options["skipInvalid"] || false;
    this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
    this.styleMap = compileStyleMap1(this.schema, options["styles"] || null);
    this.sortKeys = options["sortKeys"] || false;
    this.lineWidth = options["lineWidth"] || 80;
    this.noRefs = options["noRefs"] || false;
    this.noCompatMode = options["noCompatMode"] || false;
    this.condenseFlow = options["condenseFlow"] || false;
    this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
    this.forceQuotes = options["forceQuotes"] || false;
    this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null;
    this.implicitTypes = this.schema.compiledImplicit;
    this.explicitTypes = this.schema.compiledExplicit;
    this.tag = null;
    this.result = "";
    this.duplicates = [];
    this.usedDuplicates = null;
}
function indentString1(string, spaces) {
    var ind = common.repeat(" ", spaces), position = 0, next = -1, result1 = "", line, length = string.length;
    while(position < length){
        next = string.indexOf("\n", position);
        if (next === -1) {
            line = string.slice(position);
            position = length;
        } else {
            line = string.slice(position, next + 1);
            position = next + 1;
        }
        if (line.length && line !== "\n") result1 += ind;
        result1 += line;
    }
    return result1;
}
function generateNextLine1(state, level) {
    return "\n" + common.repeat(" ", state.indent * level);
}
function testImplicitResolving1(state, str2) {
    var index, length, type2;
    for(index = 0, length = state.implicitTypes.length; index < length; index += 1){
        type2 = state.implicitTypes[index];
        if (type2.resolve(str2)) {
            return true;
        }
    }
    return false;
}
function isWhitespace1(c) {
    return c === CHAR_SPACE || c === CHAR_TAB;
}
function isPrintable1(c) {
    return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
}
function isNsCharOrWhitespace(c) {
    return isPrintable1(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
}
function isPlainSafe1(c, prev, inblock) {
    var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
    var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace1(c);
    return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace1(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar;
}
function isPlainSafeFirst1(c) {
    return isPrintable1(c) && c !== CHAR_BOM && !isWhitespace1(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
}
function isPlainSafeLast(c) {
    return !isWhitespace1(c) && c !== CHAR_COLON;
}
function codePointAt(string, pos) {
    var first = string.charCodeAt(pos), second;
    if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
        second = string.charCodeAt(pos + 1);
        if (second >= 56320 && second <= 57343) {
            return (first - 55296) * 1024 + second - 56320 + 65536;
        }
    }
    return first;
}
function needIndentIndicator1(string) {
    var leadingSpaceRe = /^\n* /;
    return leadingSpaceRe.test(string);
}
var STYLE_PLAIN1 = 1, STYLE_SINGLE1 = 2, STYLE_LITERAL1 = 3, STYLE_FOLDED1 = 4, STYLE_DOUBLE1 = 5;
function chooseScalarStyle1(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
    var i1;
    var __char = 0;
    var prevChar = null;
    var hasLineBreak = false;
    var hasFoldableLine = false;
    var shouldTrackWidth = lineWidth !== -1;
    var previousLineBreak = -1;
    var plain = isPlainSafeFirst1(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
    if (singleLineOnly || forceQuotes) {
        for(i1 = 0; i1 < string.length; __char >= 65536 ? i1 += 2 : i1++){
            __char = codePointAt(string, i1);
            if (!isPrintable1(__char)) {
                return STYLE_DOUBLE1;
            }
            plain = plain && isPlainSafe1(__char, prevChar, inblock);
            prevChar = __char;
        }
    } else {
        for(i1 = 0; i1 < string.length; __char >= 65536 ? i1 += 2 : i1++){
            __char = codePointAt(string, i1);
            if (__char === CHAR_LINE_FEED) {
                hasLineBreak = true;
                if (shouldTrackWidth) {
                    hasFoldableLine = hasFoldableLine || i1 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
                    previousLineBreak = i1;
                }
            } else if (!isPrintable1(__char)) {
                return STYLE_DOUBLE1;
            }
            plain = plain && isPlainSafe1(__char, prevChar, inblock);
            prevChar = __char;
        }
        hasFoldableLine = hasFoldableLine || shouldTrackWidth && i1 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
    }
    if (!hasLineBreak && !hasFoldableLine) {
        if (plain && !forceQuotes && !testAmbiguousType(string)) {
            return STYLE_PLAIN1;
        }
        return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE1 : STYLE_SINGLE1;
    }
    if (indentPerLevel > 9 && needIndentIndicator1(string)) {
        return STYLE_DOUBLE1;
    }
    if (!forceQuotes) {
        return hasFoldableLine ? STYLE_FOLDED1 : STYLE_LITERAL1;
    }
    return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE1 : STYLE_SINGLE1;
}
function writeScalar1(state, string, level, iskey, inblock) {
    state.dump = function() {
        if (string.length === 0) {
            return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
        }
        if (!state.noCompatMode) {
            if (DEPRECATED_BOOLEANS_SYNTAX1.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
                return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
            }
        }
        var indent = state.indent * Math.max(1, level);
        var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
        var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
        function testAmbiguity(string2) {
            return testImplicitResolving1(state, string2);
        }
        switch(chooseScalarStyle1(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)){
            case STYLE_PLAIN1:
                return string;
            case STYLE_SINGLE1:
                return "'" + string.replace(/'/g, "''") + "'";
            case STYLE_LITERAL1:
                return "|" + blockHeader1(string, state.indent) + dropEndingNewline1(indentString1(string, indent));
            case STYLE_FOLDED1:
                return ">" + blockHeader1(string, state.indent) + dropEndingNewline1(indentString1(foldString1(string, lineWidth), indent));
            case STYLE_DOUBLE1:
                return '"' + escapeString1(string) + '"';
            default:
                throw new exception("impossible error: invalid scalar style");
        }
    }();
}
function blockHeader1(string, indentPerLevel) {
    var indentIndicator = needIndentIndicator1(string) ? String(indentPerLevel) : "";
    var clip = string[string.length - 1] === "\n";
    var keep = clip && (string[string.length - 2] === "\n" || string === "\n");
    var chomp = keep ? "+" : clip ? "" : "-";
    return indentIndicator + chomp + "\n";
}
function dropEndingNewline1(string) {
    return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
}
function foldString1(string, width) {
    var lineRe = /(\n+)([^\n]*)/g;
    var result1 = function() {
        var nextLF = string.indexOf("\n");
        nextLF = nextLF !== -1 ? nextLF : string.length;
        lineRe.lastIndex = nextLF;
        return foldLine1(string.slice(0, nextLF), width);
    }();
    var prevMoreIndented = string[0] === "\n" || string[0] === " ";
    var moreIndented;
    var match;
    while(match = lineRe.exec(string)){
        var prefix = match[1], line = match[2];
        moreIndented = line[0] === " ";
        result1 += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine1(line, width);
        prevMoreIndented = moreIndented;
    }
    return result1;
}
function foldLine1(line, width) {
    if (line === "" || line[0] === " ") return line;
    var breakRe = / [^ ]/g;
    var match;
    var start = 0, end, curr = 0, next = 0;
    var result1 = "";
    while(match = breakRe.exec(line)){
        next = match.index;
        if (next - start > width) {
            end = curr > start ? curr : next;
            result1 += "\n" + line.slice(start, end);
            start = end + 1;
        }
        curr = next;
    }
    result1 += "\n";
    if (line.length - start > width && curr > start) {
        result1 += line.slice(start, curr) + "\n" + line.slice(curr + 1);
    } else {
        result1 += line.slice(start);
    }
    return result1.slice(1);
}
function escapeString1(string) {
    var result1 = "";
    var __char = 0;
    var escapeSeq;
    for(var i1 = 0; i1 < string.length; __char >= 65536 ? i1 += 2 : i1++){
        __char = codePointAt(string, i1);
        escapeSeq = ESCAPE_SEQUENCES1[__char];
        if (!escapeSeq && isPrintable1(__char)) {
            result1 += string[i1];
            if (__char >= 65536) result1 += string[i1 + 1];
        } else {
            result1 += escapeSeq || encodeHex1(__char);
        }
    }
    return result1;
}
function writeFlowSequence1(state, level, object) {
    var _result = "", _tag = state.tag, index, length, value;
    for(index = 0, length = object.length; index < length; index += 1){
        value = object[index];
        if (state.replacer) {
            value = state.replacer.call(object, String(index), value);
        }
        if (writeNode1(state, level, value, false, false) || typeof value === "undefined" && writeNode1(state, level, null, false, false)) {
            if (_result !== "") _result += "," + (!state.condenseFlow ? " " : "");
            _result += state.dump;
        }
    }
    state.tag = _tag;
    state.dump = "[" + _result + "]";
}
function writeBlockSequence1(state, level, object, compact) {
    var _result = "", _tag = state.tag, index, length, value;
    for(index = 0, length = object.length; index < length; index += 1){
        value = object[index];
        if (state.replacer) {
            value = state.replacer.call(object, String(index), value);
        }
        if (writeNode1(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode1(state, level + 1, null, true, true, false, true)) {
            if (!compact || _result !== "") {
                _result += generateNextLine1(state, level);
            }
            if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
                _result += "-";
            } else {
                _result += "- ";
            }
            _result += state.dump;
        }
    }
    state.tag = _tag;
    state.dump = _result || "[]";
}
function writeFlowMapping1(state, level, object) {
    var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
    for(index = 0, length = objectKeyList.length; index < length; index += 1){
        pairBuffer = "";
        if (_result !== "") pairBuffer += ", ";
        if (state.condenseFlow) pairBuffer += '"';
        objectKey = objectKeyList[index];
        objectValue = object[objectKey];
        if (state.replacer) {
            objectValue = state.replacer.call(object, objectKey, objectValue);
        }
        if (!writeNode1(state, level, objectKey, false, false)) {
            continue;
        }
        if (state.dump.length > 1024) pairBuffer += "? ";
        pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
        if (!writeNode1(state, level, objectValue, false, false)) {
            continue;
        }
        pairBuffer += state.dump;
        _result += pairBuffer;
    }
    state.tag = _tag;
    state.dump = "{" + _result + "}";
}
function writeBlockMapping1(state, level, object, compact) {
    var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
    if (state.sortKeys === true) {
        objectKeyList.sort();
    } else if (typeof state.sortKeys === "function") {
        objectKeyList.sort(state.sortKeys);
    } else if (state.sortKeys) {
        throw new exception("sortKeys must be a boolean or a function");
    }
    for(index = 0, length = objectKeyList.length; index < length; index += 1){
        pairBuffer = "";
        if (!compact || _result !== "") {
            pairBuffer += generateNextLine1(state, level);
        }
        objectKey = objectKeyList[index];
        objectValue = object[objectKey];
        if (state.replacer) {
            objectValue = state.replacer.call(object, objectKey, objectValue);
        }
        if (!writeNode1(state, level + 1, objectKey, true, true, true)) {
            continue;
        }
        explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
        if (explicitPair) {
            if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
                pairBuffer += "?";
            } else {
                pairBuffer += "? ";
            }
        }
        pairBuffer += state.dump;
        if (explicitPair) {
            pairBuffer += generateNextLine1(state, level);
        }
        if (!writeNode1(state, level + 1, objectValue, true, explicitPair)) {
            continue;
        }
        if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
            pairBuffer += ":";
        } else {
            pairBuffer += ": ";
        }
        pairBuffer += state.dump;
        _result += pairBuffer;
    }
    state.tag = _tag;
    state.dump = _result || "{}";
}
function detectType1(state, object, explicit) {
    var _result, typeList, index, length, type2, style;
    typeList = explicit ? state.explicitTypes : state.implicitTypes;
    for(index = 0, length = typeList.length; index < length; index += 1){
        type2 = typeList[index];
        if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) {
            if (explicit) {
                if (type2.multi && type2.representName) {
                    state.tag = type2.representName(object);
                } else {
                    state.tag = type2.tag;
                }
            } else {
                state.tag = "?";
            }
            if (type2.represent) {
                style = state.styleMap[type2.tag] || type2.defaultStyle;
                if (_toString3.call(type2.represent) === "[object Function]") {
                    _result = type2.represent(object, style);
                } else if (_hasOwnProperty.call(type2.represent, style)) {
                    _result = type2.represent[style](object, style);
                } else {
                    throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style');
                }
                state.dump = _result;
            }
            return true;
        }
    }
    return false;
}
function writeNode1(state, level, object, block, compact, iskey, isblockseq) {
    state.tag = null;
    state.dump = object;
    if (!detectType1(state, object, false)) {
        detectType1(state, object, true);
    }
    var type2 = _toString3.call(state.dump);
    var inblock = block;
    var tagStr;
    if (block) {
        block = state.flowLevel < 0 || state.flowLevel > level;
    }
    var objectOrArray = type2 === "[object Object]" || type2 === "[object Array]", duplicateIndex, duplicate;
    if (objectOrArray) {
        duplicateIndex = state.duplicates.indexOf(object);
        duplicate = duplicateIndex !== -1;
    }
    if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
        compact = false;
    }
    if (duplicate && state.usedDuplicates[duplicateIndex]) {
        state.dump = "*ref_" + duplicateIndex;
    } else {
        if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
            state.usedDuplicates[duplicateIndex] = true;
        }
        if (type2 === "[object Object]") {
            if (block && Object.keys(state.dump).length !== 0) {
                writeBlockMapping1(state, level, state.dump, compact);
                if (duplicate) {
                    state.dump = "&ref_" + duplicateIndex + state.dump;
                }
            } else {
                writeFlowMapping1(state, level, state.dump);
                if (duplicate) {
                    state.dump = "&ref_" + duplicateIndex + " " + state.dump;
                }
            }
        } else if (type2 === "[object Array]") {
            if (block && state.dump.length !== 0) {
                if (state.noArrayIndent && !isblockseq && level > 0) {
                    writeBlockSequence1(state, level - 1, state.dump, compact);
                } else {
                    writeBlockSequence1(state, level, state.dump, compact);
                }
                if (duplicate) {
                    state.dump = "&ref_" + duplicateIndex + state.dump;
                }
            } else {
                writeFlowSequence1(state, level, state.dump);
                if (duplicate) {
                    state.dump = "&ref_" + duplicateIndex + " " + state.dump;
                }
            }
        } else if (type2 === "[object String]") {
            if (state.tag !== "?") {
                writeScalar1(state, state.dump, level, iskey, inblock);
            }
        } else if (type2 === "[object Undefined]") {
            return false;
        } else {
            if (state.skipInvalid) return false;
            throw new exception("unacceptable kind of an object to dump " + type2);
        }
        if (state.tag !== null && state.tag !== "?") {
            tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
            if (state.tag[0] === "!") {
                tagStr = "!" + tagStr;
            } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
                tagStr = "!!" + tagStr.slice(18);
            } else {
                tagStr = "!<" + tagStr + ">";
            }
            state.dump = tagStr + " " + state.dump;
        }
    }
    return true;
}
function getDuplicateReferences1(object, state) {
    var objects = [], duplicatesIndexes = [], index, length;
    inspectNode1(object, objects, duplicatesIndexes);
    for(index = 0, length = duplicatesIndexes.length; index < length; index += 1){
        state.duplicates.push(objects[duplicatesIndexes[index]]);
    }
    state.usedDuplicates = new Array(length);
}
function inspectNode1(object, objects, duplicatesIndexes) {
    var objectKeyList, index, length;
    if (object !== null && typeof object === "object") {
        index = objects.indexOf(object);
        if (index !== -1) {
            if (duplicatesIndexes.indexOf(index) === -1) {
                duplicatesIndexes.push(index);
            }
        } else {
            objects.push(object);
            if (Array.isArray(object)) {
                for(index = 0, length = object.length; index < length; index += 1){
                    inspectNode1(object[index], objects, duplicatesIndexes);
                }
            } else {
                objectKeyList = Object.keys(object);
                for(index = 0, length = objectKeyList.length; index < length; index += 1){
                    inspectNode1(object[objectKeyList[index]], objects, duplicatesIndexes);
                }
            }
        }
    }
}
function dump$1(input, options) {
    options = options || {};
    var state = new State2(options);
    if (!state.noRefs) getDuplicateReferences1(input, state);
    var value = input;
    if (state.replacer) {
        value = state.replacer.call({
            "": value
        }, "", value);
    }
    if (writeNode1(state, 0, value, true, true)) return state.dump + "\n";
    return "";
}
var dump_1 = dump$1;
var dumper = {
    dump: dump_1
};
function renamed(from, to) {
    return function() {
        throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
    };
}
var Type2 = type;
var Schema1 = schema;
var load1 = loader.load;
loader.loadAll;
dumper.dump;
renamed("safeLoad", "load");
renamed("safeLoadAll", "loadAll");
renamed("safeDump", "dump");
const QuartoJSONSchema = new Schema1({
    implicit: [
        _null,
        bool1,
        __int1,
        __float1
    ],
    include: [
        failsafe1
    ],
    explicit: [
        new Type2("!expr", {
            kind: "scalar",
            construct (data) {
                const result1 = data !== null ? data : "";
                return {
                    value: result1,
                    tag: "!expr"
                };
            }
        }), 
    ]
});
function postProcessAnnotation(parse) {
    if (parse.components.length === 1 && parse.start === parse.components[0].start && parse.end === parse.components[0].end) {
        return postProcessAnnotation(parse.components[0]);
    } else {
        return {
            ...parse,
            components: parse.components.map(postProcessAnnotation)
        };
    }
}
function jsYamlParseLenient(yml) {
    try {
        return load1(yml, {
            schema: QuartoJSONSchema
        });
    } catch (_e) {
        return yml;
    }
}
function readAnnotatedYamlFromMappedString(mappedSource, lenient = false) {
    if (lenient) {
        const parser = getTreeSitterSync();
        const tree = parser.parse(mappedSource.value);
        const treeSitterAnnotation = buildTreeSitterAnnotation(tree, mappedSource);
        if (treeSitterAnnotation) {
            return treeSitterAnnotation;
        }
    }
    try {
        return buildJsYamlAnnotation(mappedSource);
    } catch (e) {
        const m = e.stack.split("\n")[0].match(/^.+ \((\d+):(\d+)\)$/);
        if (m) {
            const f = lineColToIndex(mappedSource.value);
            const location = {
                line: Number(m[1]) - 1,
                column: Number(m[2] - 1)
            };
            const offset = f(location);
            const { originalString  } = mappedSource.map(offset, true);
            const filename = originalString.fileName;
            const f2 = mappedIndexToLineCol(mappedSource);
            const { line , column  } = f2(offset);
            const sourceContext = createSourceContext(mappedSource, {
                start: offset,
                end: offset + 1
            });
            e.stack = `${e.reason} (${filename}, ${line + 1}:${column + 1})\n${sourceContext}`;
            e.message = e.stack;
            if (mappedLines(mappedSource)[location.line].value.indexOf("!expr") !== -1 && e.reason.match(/bad indentation of a mapping entry/)) {
                e.message = `${e.message}\n${tidyverseInfo("YAML tags like !expr must be followed by YAML strings.")}\n${tidyverseInfo("Is it possible you need to quote the value you passed to !expr ?")}`;
            }
            e.stack = "";
        }
        throw e;
    }
}
function buildJsYamlAnnotation(mappedYaml) {
    const yml = mappedYaml.value;
    const stack = [];
    const results = [];
    function listener(what, state) {
        const { result: result1 , position , kind  } = state;
        if (what === "close") {
            const { position: openPosition  } = stack.pop();
            if (results.length > 0) {
                const last = results[results.length - 1];
                if (last.start === openPosition && last.end === position) {
                    return;
                }
            }
            const components = [];
            while(results.length > 0){
                const last1 = results[results.length - 1];
                if (last1.end <= openPosition) {
                    break;
                }
                components.push(results.pop());
            }
            components.reverse();
            const rawRange = yml.substring(openPosition, position);
            const leftTrim = rawRange.length - rawRange.trimLeft().length;
            const rightTrim = rawRange.length - rawRange.trimRight().length;
            if (rawRange.trim().length === 0) {
                results.push({
                    start: position - rightTrim,
                    end: position - rightTrim,
                    result: result1,
                    components,
                    kind,
                    source: mappedYaml
                });
            } else {
                results.push({
                    start: openPosition + leftTrim,
                    end: position - rightTrim,
                    result: result1,
                    components,
                    kind,
                    source: mappedYaml
                });
            }
        } else {
            stack.push({
                position
            });
        }
    }
    load1(yml, {
        listener,
        schema: QuartoJSONSchema
    });
    if (results.length === 0) {
        return {
            start: 0,
            end: 0,
            result: null,
            kind: "null",
            components: [],
            source: mappedYaml
        };
    }
    if (results.length !== 1) {
        throw new Error(`Internal Error - expected a single result, got ${results.length} instead`);
    }
    JSON.stringify(results[0]);
    return postProcessAnnotation(results[0]);
}
function buildTreeSitterAnnotation(tree, mappedSource) {
    const errors = [];
    const singletonBuild = (node)=>{
        let tag = undefined;
        for (const child of node.children){
            if (child.type === "tag") {
                tag = child;
                continue;
            }
            if (child.type !== "comment") {
                const result1 = buildNode(child, node.endIndex);
                if (tag) {
                    return annotateTag(result1, tag, node);
                } else {
                    return result1;
                }
            }
        }
        return annotateEmpty(node.endIndex);
    };
    const buildNode = (node, endIndex)=>{
        if (node === null) {
            return annotateEmpty(endIndex === undefined ? -1 : endIndex);
        }
        if (dispatch[node.type] === undefined) {
            return annotateEmpty(endIndex || node.endIndex || -1);
        }
        return dispatch[node.type](node);
    };
    const annotateEmpty = (position)=>{
        return {
            start: position,
            end: position,
            result: null,
            kind: "<<EMPTY>>",
            components: [],
            source: mappedSource
        };
    };
    const annotate = (node, result1, components)=>{
        return {
            start: node.startIndex,
            end: node.endIndex,
            result: result1,
            kind: node.type,
            components,
            source: mappedSource
        };
    };
    const annotateTag = (innerParse, tagNode, outerNode)=>{
        const tagParse = annotate(tagNode, tagNode.text, []);
        const result1 = annotate(outerNode, {
            tag: tagNode.text,
            value: innerParse.result
        }, [
            tagParse,
            innerParse
        ]);
        return result1;
    };
    const buildPair = (node)=>{
        let key, value;
        const children = node.children.filter((n)=>n.type !== "comment");
        if (children.length === 3) {
            key = annotate(children[0], children[0].text, []);
            value = buildNode(children[2], node.endIndex);
        } else if (children.length === 2) {
            key = annotate(children[0], children[0].text, []);
            value = annotateEmpty(node.endIndex);
        } else {
            key = annotateEmpty(node.endIndex);
            value = annotateEmpty(node.endIndex);
        }
        return annotate(node, {
            key: key.result,
            value: value.result
        }, [
            key,
            value
        ]);
    };
    const dispatch = {
        "stream": singletonBuild,
        "document": singletonBuild,
        "block_node": singletonBuild,
        "flow_node": singletonBuild,
        "double_quote_scalar": (node)=>{
            return annotate(node, jsYamlParseLenient(node.text), []);
        },
        "single_quote_scalar": (node)=>{
            return annotate(node, jsYamlParseLenient(node.text), []);
        },
        "plain_scalar": (node)=>{
            return annotate(node, jsYamlParseLenient(node.text), []);
        },
        "block_scalar": (node)=>{
            return annotate(node, jsYamlParseLenient(node.text), []);
        },
        "block_sequence": (node)=>{
            const result1 = [], components = [];
            for(let i1 = 0; i1 < node.childCount; ++i1){
                const child = node.child(i1);
                if (child.type !== "block_sequence_item") {
                    continue;
                }
                const component = buildNode(child, node.endIndex);
                components.push(component);
                result1.push(component && component.result);
            }
            return annotate(node, result1, components);
        },
        "block_sequence_item": (node)=>{
            if (node.childCount < 2) {
                return annotateEmpty(node.endIndex);
            } else {
                return buildNode(node.child(1), node.endIndex);
            }
        },
        "flow_sequence": (node)=>{
            const result1 = [], components = [];
            for(let i1 = 0; i1 < node.childCount; ++i1){
                const child = node.child(i1);
                if (child.type !== "flow_node") {
                    continue;
                }
                const component = buildNode(child, node.endIndex);
                components.push(component);
                result1.push(component.result);
            }
            return annotate(node, result1, components);
        },
        "block_mapping": (node)=>{
            const result1 = {}, components = [];
            for(let i1 = 0; i1 < node.childCount; ++i1){
                const child = node.child(i1);
                let component;
                if (child.type === "ERROR") {
                    result1[child.text] = "<<ERROR>>";
                    const key = annotate(child, child.text, []);
                    const value = annotateEmpty(child.endIndex);
                    component = annotate(child, {
                        key: key.result,
                        value: value.result
                    }, [
                        key,
                        value
                    ]);
                } else if (child.type !== "block_mapping_pair") {
                    continue;
                } else {
                    component = buildNode(child, node.endIndex);
                }
                const { key: key1 , value: value1  } = component.result;
                result1[String(key1)] = value1;
                components.push(...component.components);
            }
            return annotate(node, result1, components);
        },
        "flow_pair": buildPair,
        "flow_mapping": (node)=>{
            const result1 = {}, components = [];
            for(let i1 = 0; i1 < node.childCount; ++i1){
                const child = node.child(i1);
                if (child.type === "flow_node") {
                    continue;
                }
                if (child.type === "flow_pair") {
                    const component = buildNode(child, node.endIndex);
                    const { key , value  } = component.result;
                    result1[String(key)] = value;
                    components.push(...component.components);
                }
            }
            return annotate(node, result1, components);
        },
        "block_mapping_pair": buildPair
    };
    const result1 = buildNode(tree.rootNode, tree.rootNode.endIndex);
    if (errors.length) {
        result1.errors = errors;
    }
    const parsedSize = tree.rootNode.text.trim().length;
    const codeSize = mappedSource.value.trim().length;
    const lossage = parsedSize / codeSize;
    if (lossage < 0.95) {
        return null;
    }
    return result1;
}
function locateAnnotation(annotation, position, kind) {
    const originalSource = annotation.source;
    kind = kind || "value";
    for(let i1 = 0; i1 < position.length; ++i1){
        const value = position[i1];
        if (typeof value === "number") {
            const inner = annotation.components[value];
            if (inner === undefined) {
                throw new Error("Internal Error: invalid path for locateAnnotation");
            }
            annotation = inner;
        } else {
            let found = false;
            for(let j = 0; j < annotation.components.length; j += 2){
                if (originalSource.value.substring(annotation.components[j].start, annotation.components[j].end).trim() === value) {
                    if (i1 === position.length - 1) {
                        if (kind === "key") {
                            annotation = annotation.components[j];
                        } else {
                            annotation = annotation.components[j + 1];
                        }
                    }
                    found = true;
                    break;
                }
            }
            if (!found) {
                throw new Error("Internal Error: invalid path for locateAnnotation");
            }
        }
    }
    return annotation;
}
class ValidationError2 extends Error {
    validationErrors;
    constructor(msg, validationErrors){
        super([
            msg,
            ...validationErrors.map((e)=>tidyverseFormatError(e.niceError))
        ].join("\n\n"));
        Object.setPrototypeOf(this, ValidationError2.prototype);
        this.validationErrors = validationErrors;
    }
}
const isObject2 = (value)=>{
    const type = typeof value;
    return value !== null && (type === "object" || type === "function");
};
async function readAndValidateYamlFromMappedString(mappedYaml, schema, pruneErrors = true, lenient = false) {
    const annotation = await readAnnotatedYamlFromMappedString(mappedYaml, lenient);
    if (annotation === null) {
        throw new Error("Parse error in readAnnotatedYamlFromMappedString");
    }
    const validateYaml = !isObject2(annotation.result) || annotation.result["validate-yaml"] !== false;
    if (!validateYaml) {
        return {
            yaml: annotation.result,
            yamlValidationErrors: []
        };
    }
    const validate = async (validator)=>{
        const valResult = await validator.validateParse(mappedYaml, annotation, pruneErrors);
        return {
            yaml: annotation.result,
            yamlValidationErrors: valResult.errors
        };
    };
    if (typeof annotation.result === "object" && !Array.isArray(annotation.result)) {
        const preCheckResult = await withValidator(getSchemaDefinition("bad-parse-schema"), validate);
        if (preCheckResult.yamlValidationErrors.length !== 0) {
            return preCheckResult;
        }
    }
    const result1 = await withValidator(schema, validate);
    return result1;
}
function setBaseSchemaProperties(yaml, schema) {
    if (yaml.additionalCompletions) {
        schema = completeSchema(schema, ...yaml.additionalCompletions);
    }
    if (yaml.completions) {
        schema = completeSchemaOverwrite(schema, ...yaml.completions);
    }
    if (yaml.id) {
        schema = idSchema(schema, yaml.id);
    }
    if (yaml.hidden === true) {
        schema = completeSchemaOverwrite(schema);
        schema = tagSchema(schema, {
            "hidden": true
        });
    }
    if (yaml.tags) {
        schema = tagSchema(schema, yaml.tags);
    }
    if (yaml.description) {
        schema = tagSchema(schema, {
            description: yaml.description
        });
        if (typeof yaml.description === "string") {
            schema = documentSchema(schema, yaml.description);
        } else if (typeof yaml.description === "object") {
            schema = documentSchema(schema, yaml.description.short);
        }
    }
    const result1 = Object.assign({}, schema);
    if (yaml.errorDescription) {
        result1.description = yaml.errorDescription;
    }
    if (yaml.errorMessage) {
        result1.errorMessage = yaml.errorMessage;
    }
    return result1;
}
function convertFromNull(yaml) {
    return setBaseSchemaProperties(yaml["null"], nullSchema);
}
function convertFromSchema(yaml) {
    const schema = convertFromYaml(yaml.schema);
    return setBaseSchemaProperties(yaml, schema);
}
function convertFromString(yaml) {
    if (yaml["string"].pattern) {
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml["string"], regexSchema(yaml["string"].pattern)));
    } else {
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml["string"], stringSchema));
    }
}
function convertFromPattern(yaml) {
    if (typeof yaml.pattern === "string") {
        return setBaseSchemaProperties(yaml, regexSchema(yaml.pattern));
    } else {
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml.pattern, regexSchema(yaml.pattern.regex)));
    }
}
function convertFromPath(yaml) {
    return setBaseSchemaProperties(yaml["path"], stringSchema);
}
function convertFromNumber(yaml) {
    return setBaseSchemaProperties(yaml["number"], numberSchema);
}
function convertFromBoolean(yaml) {
    return setBaseSchemaProperties(yaml["boolean"], booleanSchema);
}
function convertFromRef(yaml) {
    return setBaseSchemaProperties(yaml, refSchema(yaml.ref, `be ${yaml.ref}`));
}
function convertFromMaybeArrayOf(yaml) {
    const inner = convertFromYaml(yaml.maybeArrayOf);
    const schema = tagSchema(anyOfSchema(inner, arraySchema(inner)), {
        "complete-from": [
            "anyOf",
            0
        ]
    });
    return setBaseSchemaProperties(yaml, schema);
}
function convertFromArrayOf(yaml) {
    if (yaml.arrayOf.schema) {
        const result1 = arraySchema(convertFromYaml(yaml.arrayOf.schema));
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml.arrayOf, result1));
    } else {
        return setBaseSchemaProperties(yaml, arraySchema(convertFromYaml(yaml.arrayOf)));
    }
}
function convertFromAllOf(yaml) {
    if (yaml.allOf.schemas) {
        const inner = yaml.allOf.schemas.map((x)=>convertFromYaml(x));
        const schema = allOfSchema(...inner);
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml.allOf, schema));
    } else {
        const inner1 = yaml.allOf.map((x)=>convertFromYaml(x));
        const schema1 = allOfSchema(...inner1);
        return setBaseSchemaProperties(yaml, schema1);
    }
}
function convertFromAnyOf(yaml) {
    if (yaml.anyOf.schemas) {
        const inner = yaml.anyOf.schemas.map((x)=>convertFromYaml(x));
        const schema = anyOfSchema(...inner);
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml.anyOf, schema));
    } else {
        const inner1 = yaml.anyOf.map((x)=>convertFromYaml(x));
        const schema1 = anyOfSchema(...inner1);
        return setBaseSchemaProperties(yaml, schema1);
    }
}
function convertFromEnum(yaml) {
    const schema = yaml["enum"];
    if (schema.hasOwnProperty("values")) {
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml["enum"], enumSchema(...schema.values)));
    } else {
        return setBaseSchemaProperties(yaml, enumSchema(...schema));
    }
}
function convertFromRecord(yaml) {
    if (yaml.record.properties) {
        const schema = convertFromObject({
            "object": {
                "properties": yaml.record.properties,
                "closed": true,
                "required": "all"
            }
        });
        return setBaseSchemaProperties(yaml, setBaseSchemaProperties(yaml.record, schema));
    } else {
        const schema1 = convertFromObject({
            "object": {
                "properties": yaml.record,
                "closed": true,
                "required": "all"
            }
        });
        return setBaseSchemaProperties(yaml, schema1);
    }
}
function convertFromObject(yaml) {
    const schema = yaml["object"];
    const params = {};
    if (schema.namingConvention) {
        switch(schema.namingConvention){
            case "capitalizationCase":
                params.namingConvention = "capitalizationCase";
                break;
            case "capitalization-case":
                params.namingConvention = "capitalizationCase";
                break;
            case "capitalization_case":
                params.namingConvention = "capitalizationCase";
                break;
            case "underscoreCase":
                params.namingConvention = "underscore_case";
                break;
            case "underscore-case":
                params.namingConvention = "underscore_case";
                break;
            case "underscore_case":
                params.namingConvention = "underscore_case";
                break;
            case "dashCase":
                params.namingConvention = "dash-case";
                break;
            case "dash-case":
                params.namingConvention = "dash-case";
                break;
            case "dash_case":
                params.namingConvention = "dash-case";
                break;
            case "camelCase":
                params.namingConvention = "capitalizationCase";
                break;
            case "camel-case":
                params.namingConvention = "capitalizationCase";
                break;
            case "camel_case":
                params.namingConvention = "capitalizationCase";
                break;
            case "snakeCase":
                params.namingConvention = "underscore_case";
                break;
            case "snake-case":
                params.namingConvention = "underscore_case";
                break;
            case "snake_case":
                params.namingConvention = "underscore_case";
                break;
            case "kebabCase":
                params.namingConvention = "dash-case";
                break;
            case "kebab-case":
                params.namingConvention = "dash-case";
                break;
            case "kebab_case":
                params.namingConvention = "dash-case";
                break;
            default:
                throw new Error("Internal Error: this should have failed validation");
        }
        params.namingConvention = schema.namingConvention;
    }
    if (schema.properties) {
        params.properties = fromEntries(Object.entries(schema.properties).map(([key, value])=>[
                key,
                convertFromYaml(value)
            ]));
    }
    if (schema.patternProperties) {
        params.patternProperties = fromEntries(Object.entries(schema.properties).map(([key, value])=>[
                key,
                convertFromYaml(value)
            ]));
    }
    if (schema.propertyNames !== undefined) {
        params.propertyNames = convertFromYaml(schema.propertyNames);
    } else if (schema.closed === true) {
        const objectKeys = Object.keys(params.properties || {});
        if (objectKeys.length === 0) {
            throw new Error("object schema `closed` requires field `properties`.");
        }
        if (params.namingConvention !== undefined && params.namingConvention !== "ignore") {
            throw new Error("object schema `closed` is only supported with namingConvention: `ignore`");
        }
        params.namingConvention = "ignore";
        params.closed = true;
    }
    if (schema.additionalProperties !== undefined) {
        if (schema.additionalProperties === false) {
            params.additionalProperties = false;
        } else {
            params.additionalProperties = convertFromYaml(schema.additionalProperties);
        }
    }
    if (schema["super"]) {
        if (Array.isArray(schema["super"])) {
            params.baseSchema = schema["super"].map((s)=>convertFromYaml(s));
        } else {
            params.baseSchema = convertFromYaml(schema["super"]);
        }
    }
    if (schema["required"] === "all") {
        params.required = Object.keys(schema.properties || {});
    } else if (schema["required"]) {
        params.required = schema["required"];
    }
    if (schema["completions"]) {
        params.completions = schema["completions"];
    }
    return setBaseSchemaProperties(yaml, setBaseSchemaProperties(schema, objectSchema(params)));
}
function lookup(yaml) {
    if (!hasSchemaDefinition(yaml.resolveRef)) {
        throw new Error(`lookup of key ${yaml.resolveRef} in definitions failed`);
    }
    return getSchemaDefinition(yaml.resolveRef);
}
function convertFromYaml(yaml) {
    const literalValues = [
        {
            val: "object",
            schema: objectSchema()
        },
        {
            val: "path",
            schema: stringSchema
        },
        {
            val: "string",
            schema: stringSchema
        },
        {
            val: "number",
            schema: numberSchema
        },
        {
            val: "boolean",
            schema: booleanSchema
        },
        {
            val: "any",
            schema: anySchema()
        },
        {
            val: null,
            schema: nullSchema
        }, 
    ];
    for (const { val , schema  } of literalValues){
        if (yaml === val) {
            return schema;
        }
    }
    if (typeof yaml !== "object") {
        return valueSchema(yaml);
    }
    const schemaObjectKeyFunctions = [
        {
            key: "anyOf",
            value: convertFromAnyOf
        },
        {
            key: "allOf",
            value: convertFromAllOf
        },
        {
            key: "boolean",
            value: convertFromBoolean
        },
        {
            key: "arrayOf",
            value: convertFromArrayOf
        },
        {
            key: "enum",
            value: convertFromEnum
        },
        {
            key: "maybeArrayOf",
            value: convertFromMaybeArrayOf
        },
        {
            key: "null",
            value: convertFromNull
        },
        {
            key: "number",
            value: convertFromNumber
        },
        {
            key: "object",
            value: convertFromObject
        },
        {
            key: "path",
            value: convertFromPath
        },
        {
            key: "record",
            value: convertFromRecord
        },
        {
            key: "ref",
            value: convertFromRef
        },
        {
            key: "resolveRef",
            value: lookup
        },
        {
            key: "string",
            value: convertFromString
        },
        {
            key: "pattern",
            value: convertFromPattern
        },
        {
            key: "schema",
            value: convertFromSchema
        }, 
    ];
    for (const { key: objectKey , value: fun  } of schemaObjectKeyFunctions){
        if (yaml[objectKey] !== undefined) {
            return fun(yaml);
        }
    }
    throw new Error("Internal Error: Cannot convert object; this should have failed validation.");
}
function objectSchemaFromFieldsObject(fields, exclude) {
    exclude = exclude || ((_key)=>false);
    const properties = {};
    convertFromFieldsObject(fields, properties);
    for (const key of Object.keys(properties)){
        if (exclude(key)) {
            delete properties[key];
        }
    }
    return objectSchema({
        properties
    });
}
function annotateSchemaFromField(field, schema) {
    if (field.enabled !== undefined) {
        schema = tagSchema(schema, {
            formats: field.enabled
        });
    }
    if (field.disabled !== undefined) {
        schema = tagSchema(schema, {
            formats: field.disabled.map((x)=>`!${x}`)
        });
    }
    if (field.tags) {
        schema = tagSchema(schema, field.tags);
    }
    if (field.description) {
        if (typeof field.description === "string") {
            schema = documentSchema(schema, field.description);
        } else if (typeof field.description === "object") {
            schema = documentSchema(schema, field.description.short);
        }
        schema = tagSchema(schema, {
            description: field.description
        });
    }
    if (field.hidden) {
        schema = tagSchema(schema, {
            "hidden": true
        });
    }
    return schema;
}
function schemaFromField(entry) {
    const schema = convertFromYaml(entry.schema);
    return annotateSchemaFromField(entry, schema);
}
function convertFromFieldsObject(yaml, obj) {
    const result1 = obj || {};
    for (const field of yaml){
        let schema = convertFromYaml(field.schema);
        schema = annotateSchemaFromField(field, schema);
        result1[field.name] = schema;
        if (field.alias) {
            result1[field.alias] = schema;
        }
    }
    return result1;
}
function schemaFieldsFromGlob(globPath, testFun) {
    const result1 = [];
    testFun = testFun || ((_e, _p)=>true);
    for (const [file, fields] of expandResourceGlob(globPath)){
        for (const field of fields){
            const fieldName = field.name;
            const schemaId = `quarto-resource-${file.split("/").slice(-1)[0].slice(0, -4)}-${fieldName}`;
            if (testFun(field, file)) {
                result1.push({
                    schemaId,
                    field
                });
            }
        }
    }
    return result1;
}
memoize(()=>{
    const groups = getYamlIntelligenceResource("schema/groups.yml");
    const result1 = [];
    for (const [topLevel, sub] of Object.entries(groups)){
        for (const key of Object.keys(sub)){
            result1.push(`${topLevel}-${key}`);
        }
    }
    return result1;
}, ()=>"const");
function objectRefSchemaFromContextGlob(contextGlob, testFun) {
    const regexp = globToRegExp1(contextGlob);
    return objectRefSchemaFromGlob("schema/{document,cell}-*.yml", (field, path)=>{
        if (testFun !== undefined && !testFun(field, path)) {
            return false;
        }
        const pathContext = path.split("/").slice(-1)[0].slice(0, -4);
        const schemaContexts = field !== undefined && field.tags !== undefined && field.tags.contexts || [];
        if (pathContext.match(regexp)) {
            return true;
        }
        return schemaContexts.some((c)=>c.match(regexp));
    });
}
function objectRefSchemaFromGlob(glob, testFun) {
    const properties = {};
    for (const { schemaId , field  } of schemaFieldsFromGlob(glob, testFun)){
        const schema = refSchema(schemaId, schemaId);
        properties[field.name] = schema;
        if (field.alias) {
            properties[field.alias] = schema;
        }
    }
    return objectSchema({
        properties
    });
}
async function buildResourceSchemas() {
    const path = "schema/{cell-*,document-*,project}.yml";
    for (const [file, fields] of expandResourceGlob(path)){
        const yaml = fields;
        const entries = Object.entries(convertFromFieldsObject(yaml));
        for (const [fieldName, fieldSchema] of entries){
            const schemaId = `quarto-resource-${file.split("/").slice(-1)[0].slice(0, -4)}-${fieldName}`;
            const schema = idSchema(fieldSchema, schemaId);
            setSchemaDefinition(schema);
            await withValidator(schema, async (_validator)=>{});
        }
    }
}
function defineCached(thunk, schemaId) {
    let schema;
    return async ()=>{
        if (hasSchemaDefinition(schemaId)) {
            schema = getSchemaDefinition(schemaId);
            return refSchema(schema.$id, schema.description || `be a {schema['$id'] as string}`);
        }
        const result1 = await thunk();
        const { errorHandlers  } = result1;
        schema = result1.schema;
        if (schemaId !== schema.$id) {
            schema = idSchema(schema, schemaId);
        }
        define(schema);
        for (const fun of errorHandlers){
            addValidatorErrorHandler(schema, fun);
        }
        return refSchema(schema.$id, schema.description || `be a {schema['$id']}`);
    };
}
function define(schema) {
    if (schema !== true && schema !== false && schema.$id && !hasSchemaDefinition(schema.$id)) {
        setSchemaDefinition(schema);
    }
}
async function loadDefaultSchemaDefinitions() {
    await loadSchemaDefinitions(getYamlIntelligenceResource("schema/definitions.yml"));
    await buildResourceSchemas();
}
async function loadSchemaDefinitions(yaml) {
    await Promise.all(yaml.map(async (yamlSchema)=>{
        const schema = convertFromYaml(yamlSchema);
        if (schema.$id === undefined) {
            throw new Error(`Internal error: unnamed schema in definitions`);
        }
        setSchemaDefinition(schema);
    }));
}
function getFormatExecuteOptionsSchema() {
    const schema = idSchema(objectRefSchemaFromContextGlob("document-execute"), "front-matter-execute");
    define(schema);
    return refSchema("front-matter-execute", "be a front-matter-execute object");
}
let formatAliases = undefined;
function getFormatAliases() {
    if (formatAliases !== undefined) {
        return formatAliases;
    }
    formatAliases = getYamlIntelligenceResource("schema/format-aliases.yml").aliases;
    return formatAliases;
}
function expandFormatAliases(lst) {
    return expandAliasesFrom(lst, getFormatAliases());
}
function useSchema(schema, format) {
    const formats = schema && schema.tags && schema.tags.formats;
    if (formats === undefined) {
        return true;
    }
    const disabled = formats.filter((f)=>f.startsWith("!")).map((f)=>f.slice(1));
    const enabled = formats.filter((f)=>!f.startsWith("!"));
    if (disabled.length > 0 && expandFormatAliases(disabled).indexOf(format) !== -1) {
        return false;
    }
    if (enabled.length > 0 && expandFormatAliases(enabled).indexOf(format) === -1) {
        return false;
    }
    return true;
}
function getFormatSchema(format) {
    const schema = objectRefSchemaFromContextGlob("document-*", (field)=>{
        const schema = schemaFromField(field);
        return useSchema(schema, format);
    });
    return anyOfSchema(schema, enumSchema("default"));
}
function pandocFormatsResource() {
    return getYamlIntelligenceResource("pandoc/formats.yml");
}
async function makeFrontMatterFormatSchema(nonStrict = false) {
    const hideFormat = (format)=>{
        const hideList = [
            "html",
            "epub",
            "docbook"
        ];
        const hidden = hideList.some((h)=>format.startsWith(h) && format.length > h.length);
        return {
            name: format,
            hidden
        };
    };
    const formatSchemaDescriptorList = (await pandocFormatsResource()).concat("md", "hugo").map((format)=>{
        const { name , hidden ,  } = hideFormat(format);
        return {
            regex: `^(.+-)?${name}([-+].+)?$`,
            schema: getFormatSchema(name),
            name,
            hidden
        };
    });
    const formatSchemas = formatSchemaDescriptorList.map(({ regex , schema  })=>[
            regex,
            schema
        ]);
    const plusFormatStringSchemas = formatSchemaDescriptorList.map(({ regex , name , hidden  })=>{
        const schema = regexSchema(regex, `be '${name}'`);
        if (hidden) {
            return schema;
        }
        return completeSchema(schema, name);
    });
    const luaFilenameS = regexSchema("^.+\.lua$");
    plusFormatStringSchemas.push(luaFilenameS);
    const completionsObject = fromEntries(formatSchemaDescriptorList.filter(({ hidden  })=>!hidden).map(({ name  })=>[
            name,
            {
                type: "key",
                display: name,
                value: `${name}: `,
                description: `be '${name}'`,
                suggest_on_accept: true
            }
        ]));
    return errorMessageSchema(anyOfSchema(describeSchema(anyOfSchema(...plusFormatStringSchemas), "the name of a pandoc-supported output format"), objectSchema({
        propertyNames: luaFilenameS
    }), allOfSchema(objectSchema({
        patternProperties: fromEntries(formatSchemas),
        completions: completionsObject,
        additionalProperties: nonStrict
    }))), "${value} is not a valid output format.");
}
const getFrontMatterFormatSchema = defineCached(async ()=>{
    return {
        schema: await makeFrontMatterFormatSchema(),
        errorHandlers: []
    };
}, "front-matter-format");
defineCached(async ()=>{
    return {
        schema: await makeFrontMatterFormatSchema(true),
        errorHandlers: []
    };
}, "front-matter-format-nonstrict");
const getFrontMatterSchema = defineCached(async ()=>{
    const executeObjSchema = await getFormatExecuteOptionsSchema();
    return {
        schema: anyOfSchema(nullSchema, allOfSchema(objectSchema({
            properties: {
                execute: executeObjSchema,
                format: await getFrontMatterFormatSchema()
            },
            description: "be a Quarto YAML front matter object"
        }), objectRefSchemaFromContextGlob("document-*", (field)=>field.name !== "format"), executeObjSchema)),
        errorHandlers: []
    };
}, "front-matter");
function Diff() {}
Diff.prototype = {
    diff: function diff(oldString, newString) {
        var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
        var callback = options.callback;
        if (typeof options === 'function') {
            callback = options;
            options = {};
        }
        this.options = options;
        var self1 = this;
        function done(value) {
            return value;
        }
        oldString = this.castInput(oldString);
        newString = this.castInput(newString);
        oldString = this.removeEmpty(this.tokenize(oldString));
        newString = this.removeEmpty(this.tokenize(newString));
        var newLen = newString.length, oldLen = oldString.length;
        var editLength = 1;
        var maxEditLength = newLen + oldLen;
        if (options.maxEditLength) {
            maxEditLength = Math.min(maxEditLength, options.maxEditLength);
        }
        var bestPath = [
            {
                newPos: -1,
                components: []
            }
        ];
        var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
        if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
            return done([
                {
                    value: this.join(newString),
                    count: newString.length
                }
            ]);
        }
        function execEditLength() {
            for(var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2){
                var basePath = void 0;
                var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
                if (addPath) {
                    bestPath[diagonalPath - 1] = undefined;
                }
                var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
                if (!canAdd && !canRemove) {
                    bestPath[diagonalPath] = undefined;
                    continue;
                }
                if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
                    basePath = clonePath(removePath);
                    self1.pushComponent(basePath.components, undefined, true);
                } else {
                    basePath = addPath;
                    basePath.newPos++;
                    self1.pushComponent(basePath.components, true, undefined);
                }
                _oldPos = self1.extractCommon(basePath, newString, oldString, diagonalPath);
                if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
                    return done(buildValues(self1, basePath.components, newString, oldString, self1.useLongestToken));
                } else {
                    bestPath[diagonalPath] = basePath;
                }
            }
            editLength++;
        }
        while(editLength <= maxEditLength){
            var ret = execEditLength();
            if (callback && callback(ret, editLength, maxEditLength)) {
                return ret;
            }
            if (ret) {
                return ret;
            }
        }
    },
    pushComponent: function pushComponent(components, added, removed) {
        var last = components[components.length - 1];
        if (last && last.added === added && last.removed === removed) {
            components[components.length - 1] = {
                count: last.count + 1,
                added: added,
                removed: removed
            };
        } else {
            components.push({
                count: 1,
                added: added,
                removed: removed
            });
        }
    },
    extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
        var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
        while(newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])){
            newPos++;
            oldPos++;
            commonCount++;
        }
        if (commonCount) {
            basePath.components.push({
                count: commonCount
            });
        }
        basePath.newPos = newPos;
        return oldPos;
    },
    equals: function equals(left, right) {
        if (this.options.comparator) {
            return this.options.comparator(left, right);
        } else {
            return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
        }
    },
    removeEmpty: function removeEmpty(array) {
        var ret = [];
        for(var i1 = 0; i1 < array.length; i1++){
            if (array[i1]) {
                ret.push(array[i1]);
            }
        }
        return ret;
    },
    castInput: function castInput(value) {
        return value;
    },
    tokenize: function tokenize(value) {
        return value.split('');
    },
    join: function join(chars) {
        return chars.join('');
    }
};
function buildValues(diff, components, newString, oldString, useLongestToken) {
    var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
    for(; componentPos < componentLen; componentPos++){
        var component = components[componentPos];
        if (!component.removed) {
            if (!component.added && useLongestToken) {
                var value = newString.slice(newPos, newPos + component.count);
                value = value.map(function(value, i1) {
                    var oldValue = oldString[oldPos + i1];
                    return oldValue.length > value.length ? oldValue : value;
                });
                component.value = diff.join(value);
            } else {
                component.value = diff.join(newString.slice(newPos, newPos + component.count));
            }
            newPos += component.count;
            if (!component.added) {
                oldPos += component.count;
            }
        } else {
            component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
            oldPos += component.count;
            if (componentPos && components[componentPos - 1].added) {
                var tmp = components[componentPos - 1];
                components[componentPos - 1] = components[componentPos];
                components[componentPos] = tmp;
            }
        }
    }
    var lastComponent = components[componentLen - 1];
    if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
        components[componentLen - 2].value += lastComponent.value;
        components.pop();
    }
    return components;
}
function clonePath(path) {
    return {
        newPos: path.newPos,
        components: path.components.slice(0)
    };
}
new Diff();
var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
var reWhitespace = /\S/;
var wordDiff = new Diff();
wordDiff.equals = function(left, right) {
    if (this.options.ignoreCase) {
        left = left.toLowerCase();
        right = right.toLowerCase();
    }
    return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
};
wordDiff.tokenize = function(value) {
    var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/);
    for(var i1 = 0; i1 < tokens.length - 1; i1++){
        if (!tokens[i1 + 1] && tokens[i1 + 2] && extendedWordChars.test(tokens[i1]) && extendedWordChars.test(tokens[i1 + 2])) {
            tokens[i1] += tokens[i1 + 2];
            tokens.splice(i1 + 1, 2);
            i1--;
        }
    }
    return tokens;
};
var lineDiff = new Diff();
lineDiff.tokenize = function(value) {
    var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
    if (!linesAndNewlines[linesAndNewlines.length - 1]) {
        linesAndNewlines.pop();
    }
    for(var i1 = 0; i1 < linesAndNewlines.length; i1++){
        var line = linesAndNewlines[i1];
        if (i1 % 2 && !this.options.newlineIsToken) {
            retLines[retLines.length - 1] += line;
        } else {
            if (this.options.ignoreWhitespace) {
                line = line.trim();
            }
            retLines.push(line);
        }
    }
    return retLines;
};
function diffLines(oldStr, newStr, callback) {
    return lineDiff.diff(oldStr, newStr, callback);
}
var sentenceDiff = new Diff();
sentenceDiff.tokenize = function(value) {
    return value.split(/(\S.+?[.!?])(?=\s+|$)/);
};
var cssDiff = new Diff();
cssDiff.tokenize = function(value) {
    return value.split(/([{}:;,]|\s+)/);
};
function _typeof(obj) {
    "@babel/helpers - typeof";
    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function(obj) {
            return typeof obj;
        };
    } else {
        _typeof = function(obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
    }
    return _typeof(obj);
}
var objectPrototypeToString = Object.prototype.toString;
var jsonDiff = new Diff();
jsonDiff.useLongestToken = true;
jsonDiff.tokenize = lineDiff.tokenize;
jsonDiff.castInput = function(value) {
    var _this$options = this.options, undefinedReplacement = _this$options.undefinedReplacement, _this$options$stringi = _this$options.stringifyReplacer, stringifyReplacer = _this$options$stringi === void 0 ? function(k, v) {
        return typeof v === 'undefined' ? undefinedReplacement : v;
    } : _this$options$stringi;
    return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, '  ');
};
jsonDiff.equals = function(left, right) {
    return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
};
function canonicalize(obj, stack, replacementStack, replacer, key) {
    stack = stack || [];
    replacementStack = replacementStack || [];
    if (replacer) {
        obj = replacer(key, obj);
    }
    var i1;
    for(i1 = 0; i1 < stack.length; i1 += 1){
        if (stack[i1] === obj) {
            return replacementStack[i1];
        }
    }
    var canonicalizedObj;
    if ('[object Array]' === objectPrototypeToString.call(obj)) {
        stack.push(obj);
        canonicalizedObj = new Array(obj.length);
        replacementStack.push(canonicalizedObj);
        for(i1 = 0; i1 < obj.length; i1 += 1){
            canonicalizedObj[i1] = canonicalize(obj[i1], stack, replacementStack, replacer, key);
        }
        stack.pop();
        replacementStack.pop();
        return canonicalizedObj;
    }
    if (obj && obj.toJSON) {
        obj = obj.toJSON();
    }
    if (_typeof(obj) === 'object' && obj !== null) {
        stack.push(obj);
        canonicalizedObj = {};
        replacementStack.push(canonicalizedObj);
        var sortedKeys = [], _key;
        for(_key in obj){
            if (obj.hasOwnProperty(_key)) {
                sortedKeys.push(_key);
            }
        }
        sortedKeys.sort();
        for(i1 = 0; i1 < sortedKeys.length; i1 += 1){
            _key = sortedKeys[i1];
            canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
        }
        stack.pop();
        replacementStack.pop();
    } else {
        canonicalizedObj = obj;
    }
    return canonicalizedObj;
}
var arrayDiff = new Diff();
arrayDiff.tokenize = function(value) {
    return value.slice();
};
arrayDiff.join = arrayDiff.removeEmpty = function(value) {
    return value;
};
function deferred() {
    let methods;
    let state = "pending";
    const promise = new Promise((resolve, reject)=>{
        methods = {
            async resolve (value) {
                await value;
                state = "fulfilled";
                resolve(value);
            },
            reject (reason) {
                state = "rejected";
                reject(reason);
            }
        };
    });
    Object.defineProperty(promise, "state", {
        get: ()=>state
    });
    return Object.assign(promise, methods);
}
class MuxAsyncIterator {
    #iteratorCount = 0;
    #yields = [];
    #throws = [];
    #signal = deferred();
    add(iterable) {
        ++this.#iteratorCount;
        this.#callIteratorNext(iterable[Symbol.asyncIterator]());
    }
    async #callIteratorNext(iterator) {
        try {
            const { value , done  } = await iterator.next();
            if (done) {
                --this.#iteratorCount;
            } else {
                this.#yields.push({
                    iterator,
                    value
                });
            }
        } catch (e) {
            this.#throws.push(e);
        }
        this.#signal.resolve();
    }
    async *iterate() {
        while(this.#iteratorCount > 0){
            await this.#signal;
            for(let i1 = 0; i1 < this.#yields.length; i1++){
                const { iterator , value  } = this.#yields[i1];
                yield value;
                this.#callIteratorNext(iterator);
            }
            if (this.#throws.length) {
                for (const e of this.#throws){
                    throw e;
                }
                this.#throws.length = 0;
            }
            this.#yields.length = 0;
            this.#signal = deferred();
        }
    }
    [Symbol.asyncIterator]() {
        return this.iterate();
    }
}
const ERROR_WHILE_MAPPING_MESSAGE = "Threw while mapping.";
function pooledMap(poolLimit, array, iteratorFn) {
    const res = new TransformStream({
        async transform (p, controller) {
            try {
                const s = await p;
                controller.enqueue(s);
            } catch (e) {
                if (e instanceof AggregateError && e.message == ERROR_WHILE_MAPPING_MESSAGE) {
                    controller.error(e);
                }
            }
        }
    });
    (async ()=>{
        const writer = res.writable.getWriter();
        const executing = [];
        try {
            for await (const item of array){
                const p = Promise.resolve().then(()=>iteratorFn(item));
                writer.write(p);
                const e = p.then(()=>executing.splice(executing.indexOf(e), 1));
                executing.push(e);
                if (executing.length >= poolLimit) {
                    await Promise.race(executing);
                }
            }
            await Promise.all(executing);
            writer.close();
        } catch  {
            const errors = [];
            for (const result1 of (await Promise.allSettled(executing))){
                if (result1.status == "rejected") {
                    errors.push(result1.reason);
                }
            }
            writer.write(Promise.reject(new AggregateError(errors, ERROR_WHILE_MAPPING_MESSAGE))).catch(()=>{});
        }
    })();
    return res.readable[Symbol.asyncIterator]();
}
const MAX_SIZE1 = 2 ** 32 - 2;
class Buffer2 {
    #buf;
    #off = 0;
    #readable = new ReadableStream({
        type: "bytes",
        pull: (controller)=>{
            const view = new Uint8Array(controller.byobRequest.view.buffer);
            if (this.empty()) {
                this.reset();
                controller.close();
                controller.byobRequest.respond(0);
                return;
            }
            const nread = copy(this.#buf.subarray(this.#off), view);
            this.#off += nread;
            controller.byobRequest.respond(nread);
        },
        autoAllocateChunkSize: 16_640
    });
    get readable() {
        return this.#readable;
    }
    #writable = new WritableStream({
        write: (chunk)=>{
            const m = this.#grow(chunk.byteLength);
            copy(chunk, this.#buf, m);
        }
    });
    get writable() {
        return this.#writable;
    }
    constructor(ab){
        this.#buf = ab === undefined ? new Uint8Array(0) : new Uint8Array(ab);
    }
    bytes(options = {
        copy: true
    }) {
        if (options.copy === false) return this.#buf.subarray(this.#off);
        return this.#buf.slice(this.#off);
    }
    empty() {
        return this.#buf.byteLength <= this.#off;
    }
    get length() {
        return this.#buf.byteLength - this.#off;
    }
    get capacity() {
        return this.#buf.buffer.byteLength;
    }
    truncate(n) {
        if (n === 0) {
            this.reset();
            return;
        }
        if (n < 0 || n > this.length) {
            throw Error("bytes.Buffer: truncation out of range");
        }
        this.#reslice(this.#off + n);
    }
    reset() {
        this.#reslice(0);
        this.#off = 0;
    }
    #tryGrowByReslice(n2) {
        const l2 = this.#buf.byteLength;
        if (n2 <= this.capacity - l2) {
            this.#reslice(l2 + n2);
            return l2;
        }
        return -1;
    }
    #reslice(len1) {
        assert(len1 <= this.#buf.buffer.byteLength);
        this.#buf = new Uint8Array(this.#buf.buffer, 0, len1);
    }
    #grow(n11) {
        const m1 = this.length;
        if (m1 === 0 && this.#off !== 0) {
            this.reset();
        }
        const i4 = this.#tryGrowByReslice(n11);
        if (i4 >= 0) {
            return i4;
        }
        const c1 = this.capacity;
        if (n11 <= Math.floor(c1 / 2) - m1) {
            copy(this.#buf.subarray(this.#off), this.#buf);
        } else if (c1 + n11 > MAX_SIZE1) {
            throw new Error("The buffer cannot be grown beyond the maximum size.");
        } else {
            const buf1 = new Uint8Array(Math.min(2 * c1 + n11, MAX_SIZE1));
            copy(this.#buf.subarray(this.#off), buf1);
            this.#buf = buf1;
        }
        this.#off = 0;
        this.#reslice(Math.min(m1 + n11, MAX_SIZE1));
        return m1;
    }
    grow(n) {
        if (n < 0) {
            throw Error("Buffer.grow: negative count");
        }
        const m = this.#grow(n);
        this.#reslice(m);
    }
}
const DEFAULT_BUFFER_SIZE = 32 * 1024;
async function readAll(r) {
    const buf = new Buffer1();
    await buf.readFrom(r);
    return buf.bytes();
}
function readAllSync(r) {
    const buf = new Buffer1();
    buf.readFromSync(r);
    return buf.bytes();
}
async function writeAll(w, arr) {
    let nwritten = 0;
    while(nwritten < arr.length){
        nwritten += await w.write(arr.subarray(nwritten));
    }
}
function writeAllSync(w, arr) {
    let nwritten = 0;
    while(nwritten < arr.length){
        nwritten += w.writeSync(arr.subarray(nwritten));
    }
}
async function* iterateReader(r, options) {
    const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE;
    const b = new Uint8Array(bufSize);
    while(true){
        const result1 = await r.read(b);
        if (result1 === null) {
            break;
        }
        yield b.subarray(0, result1);
    }
}
async function copy2(src, dst, options) {
    let n = 0;
    const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE;
    const b = new Uint8Array(bufSize);
    let gotEOF = false;
    while(gotEOF === false){
        const result1 = await src.read(b);
        if (result1 === null) {
            gotEOF = true;
        } else {
            let nwritten = 0;
            while(nwritten < result1){
                nwritten += await dst.write(b.subarray(nwritten, result1));
            }
            n += nwritten;
        }
    }
    return n;
}
const CR1 = "\r".charCodeAt(0);
const LF1 = "\n".charCodeAt(0);
class LineStream extends TransformStream {
    #bufs = new BytesList();
    #prevHadCR = false;
    constructor(){
        super({
            transform: (chunk, controller)=>{
                this.#handle(chunk, controller);
            },
            flush: (controller)=>{
                controller.enqueue(this.#mergeBufs(false));
            }
        });
    }
    #handle(chunk, controller) {
        const lfIndex = chunk.indexOf(LF1);
        if (this.#prevHadCR) {
            this.#prevHadCR = false;
            if (lfIndex === 0) {
                controller.enqueue(this.#mergeBufs(true));
                this.#handle(chunk.subarray(1), controller);
                return;
            }
        }
        if (lfIndex === -1) {
            if (chunk.at(-1) === CR1) {
                this.#prevHadCR = true;
            }
            this.#bufs.add(chunk);
        } else {
            let crOrLfIndex = lfIndex;
            if (chunk[lfIndex - 1] === CR1) {
                crOrLfIndex--;
            }
            this.#bufs.add(chunk.subarray(0, crOrLfIndex));
            controller.enqueue(this.#mergeBufs(false));
            this.#handle(chunk.subarray(lfIndex + 1), controller);
        }
    }
    #mergeBufs(prevHadCR) {
        const mergeBuf = this.#bufs.concat();
        this.#bufs = new BytesList();
        if (prevHadCR) {
            return mergeBuf.subarray(0, -1);
        } else {
            return mergeBuf;
        }
    }
}
class DelimiterStream extends TransformStream {
    #bufs = new BytesList();
    #delimiter;
    #inspectIndex = 0;
    #matchIndex = 0;
    #delimLen;
    #delimLPS;
    constructor(delimiter){
        super({
            transform: (chunk, controller)=>{
                this.#handle(chunk, controller);
            },
            flush: (controller)=>{
                controller.enqueue(this.#bufs.concat());
            }
        });
        this.#delimiter = delimiter;
        this.#delimLen = delimiter.length;
        this.#delimLPS = createLPS(delimiter);
    }
    #handle(chunk2, controller2) {
        this.#bufs.add(chunk2);
        let localIndex = 0;
        while(this.#inspectIndex < this.#bufs.size()){
            if (chunk2[localIndex] === this.#delimiter[this.#matchIndex]) {
                this.#inspectIndex++;
                localIndex++;
                this.#matchIndex++;
                if (this.#matchIndex === this.#delimLen) {
                    const matchEnd = this.#inspectIndex - this.#delimLen;
                    const readyBytes = this.#bufs.slice(0, matchEnd);
                    controller2.enqueue(readyBytes);
                    this.#bufs.shift(this.#inspectIndex);
                    this.#inspectIndex = 0;
                    this.#matchIndex = 0;
                }
            } else {
                if (this.#matchIndex === 0) {
                    this.#inspectIndex++;
                    localIndex++;
                } else {
                    this.#matchIndex = this.#delimLPS[this.#matchIndex - 1];
                }
            }
        }
    }
}
function createLPS(pat) {
    const lps = new Uint8Array(pat.length);
    lps[0] = 0;
    let prefixEnd = 0;
    let i1 = 1;
    while(i1 < lps.length){
        if (pat[i1] == pat[prefixEnd]) {
            prefixEnd++;
            lps[i1] = prefixEnd;
            i1++;
        } else if (prefixEnd === 0) {
            lps[i1] = 0;
            i1++;
        } else {
            prefixEnd = lps[prefixEnd - 1];
        }
    }
    return lps;
}
async function execProcess(options, stdin, mergeOutput, stderrFilter, respectStreams) {
    try {
        const process = Deno.run({
            ...options,
            stdin: stdin !== undefined ? "piped" : options.stdin,
            stdout: typeof options.stdout === "number" ? options.stdout : "piped",
            stderr: typeof options.stderr === "number" ? options.stderr : "piped"
        });
        if (stdin !== undefined) {
            if (!process.stdin) {
                throw new Error("Process stdin not available");
            }
            const buffer = new TextEncoder().encode(stdin);
            let offset = 0;
            while(offset < buffer.length){
                const end = Math.min(offset + 4096, buffer.length);
                const window1 = buffer.subarray(offset, end);
                const written = await process.stdin.write(window1);
                offset += written;
            }
            process.stdin.close();
        }
        let stdoutText = "";
        let stderrText = "";
        if (mergeOutput) {
            const multiplexIterator = new MuxAsyncIterator();
            const addStream = (stream, filter)=>{
                if (stream !== null) {
                    const streamIter = filter ? filteredAsyncIterator(iterateReader(stream), filter) : iterateReader(stream);
                    multiplexIterator.add(streamIter);
                }
            };
            addStream(process.stdout);
            addStream(process.stderr, stderrFilter);
            const allOutput = await processOutput(multiplexIterator, mergeOutput === "stderr>stdout" ? options.stdout : options.stderr);
            if (mergeOutput === "stderr>stdout") {
                stdoutText = allOutput;
            } else {
                stderrText = allOutput;
            }
            const closeStream = (stream)=>{
                if (stream) {
                    stream.close();
                }
            };
            closeStream(process.stdout);
            closeStream(process.stderr);
        } else {
            if (process.stdout !== null) {
                stdoutText = await processOutput(iterateReader(process.stdout), options.stdout, respectStreams ? "stdout" : undefined);
                process.stdout.close();
            }
            if (process.stderr != null) {
                const iterator = stderrFilter ? filteredAsyncIterator(iterateReader(process.stderr), stderrFilter) : iterateReader(process.stderr);
                stderrText = await processOutput(iterator, options.stderr, respectStreams ? "stderr" : undefined);
                process.stderr.close();
            }
        }
        const status = await process.status();
        process.close();
        return {
            success: status.success,
            code: status.code,
            stdout: stdoutText,
            stderr: stderrText
        };
    } catch (e) {
        throw new Error(`Error executing '${options.cmd[0]}': ${e.message}`);
    }
}
function processSuccessResult() {
    return {
        success: true,
        code: 0
    };
}
function filteredAsyncIterator(iterator, filter) {
    const encoder = new TextEncoder();
    const decoder = new TextDecoder();
    return pooledMap(1, iterator, (data)=>{
        return Promise.resolve(encoder.encode(filter(decoder.decode(data))));
    });
}
async function processOutput(iterator, output, which) {
    const decoder = new TextDecoder();
    let outputText = "";
    for await (const chunk of iterator){
        if (output === "inherit" || output === undefined) {
            if (which === "stdout") {
                Deno.stdout.writeSync(chunk);
            } else if (which === "stderr") {
                Deno.stderr.writeSync(chunk);
            } else {
                info(decoder.decode(chunk), {
                    newline: false
                });
            }
        }
        const text = decoder.decode(chunk);
        outputText += text;
    }
    return outputText;
}
const nodeStack = [
    {
        name: "global",
        children: [
            {
                name: "deno-init",
                start: 0,
                end: performance.now(),
                elapsed: performance.now(),
                children: []
            }
        ],
        start: 0,
        end: 0
    }
];
function withTiming(name, fun) {
    push(name);
    try {
        const result1 = fun();
        return result1;
    } finally{
        pop();
    }
}
async function withTimingAsync(name, fun) {
    push(name);
    try {
        const result1 = await fun();
        pop();
        return result1;
    } catch (e) {
        pop();
        throw e;
    }
}
function push(name) {
    nodeStack.push({
        name,
        start: performance.now(),
        end: 0,
        children: []
    });
}
function pop(at) {
    if (nodeStack.length <= 1) {
        throw new Error("Can't pop top node");
    }
    const node = nodeStack.pop();
    node.end = at ?? performance.now();
    node.elapsed = node.end - node.start;
    nodeStack[nodeStack.length - 1].children.push(node);
}
function getData() {
    nodeStack[0].end = performance.now();
    nodeStack[0].elapsed = nodeStack[0].end - nodeStack[0].start;
    return nodeStack[0];
}
function insertExplicitTimingEntries(start, end, entries, groupName) {
    const [theirStart, ourStart] = start;
    const [theirEnd, _] = end;
    nodeStack.push({
        name: groupName,
        start: ourStart,
        end: 0,
        children: []
    });
    let prevTime = ourStart;
    if (entries.length && entries[0].name === "_start") {
        prevTime = entries[0].time - theirStart + ourStart;
        entries = entries.slice(1);
    }
    for (const entry of entries){
        nodeStack.push({
            name: entry.name,
            start: prevTime,
            end: 0,
            children: []
        });
        prevTime = entry.time - theirStart + ourStart;
        pop(prevTime);
    }
    prevTime = theirEnd - theirStart + ourStart;
    pop(prevTime);
}
async function getLuaTiming() {
    if (Deno.env.get("QUARTO_PROFILER_OUTPUT")) {
        return [
            Number((await execProcess({
                cmd: [
                    "python",
                    "-c",
                    "import time; print(time.time() * 1000)"
                ],
                stdout: "piped"
            })).stdout),
            performance.now(), 
        ];
    } else {
        return [
            0,
            0
        ];
    }
}
function mappedDiff(source, target) {
    return withTiming("mapped-diff", ()=>{
        const sourceLineRanges = rangedLines(source.value).map((x)=>x.range);
        let sourceCursor = 0;
        const resultChunks = [];
        const started = performance.now();
        const diffResult = diffLines(source.value, target, ()=>{
            const now = performance.now();
            if (now - started > 2000) {
                return true;
            }
        });
        if (diffResult === undefined) {
            warning("Warning: diff of engine output timed out. No source lines will be available.");
            return asMappedString(target);
        }
        for (const action of diffResult){
            if (action.removed) {
                sourceCursor += action.count;
            } else if (action.added) {
                resultChunks.push(action.value);
            } else {
                const start = sourceLineRanges[sourceCursor].start;
                const nextCursor = sourceCursor + action.count;
                const end = nextCursor < sourceLineRanges.length ? sourceLineRanges[nextCursor].start : sourceLineRanges[sourceLineRanges.length - 1].end;
                sourceCursor = nextCursor;
                resultChunks.push({
                    start,
                    end
                });
            }
        }
        return mappedString(source, resultChunks, source.fileName);
    });
}
function mappedStringFromFile(filename) {
    const value = Deno.readTextFileSync(filename);
    if (filename.startsWith("/")) {
        filename = relative2(Deno.cwd(), filename);
    }
    return asMappedString(value, filename);
}
const kRegExBeginYAML = /^---[ \t]*$/;
const kRegExEndYAML = /^(?:---|\.\.\.)([ \t]*)$/;
const kRegExYAML = /(^)(---[ \t]*[\r\n]+(?![ \t]*[\r\n]+)[\W\w]*?[\r\n]+(?:---|\.\.\.))([ \t]*)$/gm;
const kRegxHTMLComment = /<!--[\W\w]*?-->/gm;
const kRegexFencedCode = /^([\t >]*`{3,})[^`\n]*\n[\W\w]*?\n\1\s*$/gm;
function isYamlPath(file) {
    return [
        ".yaml",
        ".yml"
    ].includes(extname2(file));
}
function readYaml(file) {
    if (existsSync(file)) {
        const decoder = new TextDecoder("utf-8");
        const yml = Deno.readFileSync(file);
        const result1 = parseWithNiceErrors(decoder.decode(yml));
        try {
            JSON.stringify(result1);
            return result1;
        } catch (e) {
            throw new Error(`Circular structures not allowed.\nFile ${file}\n${e.message.split("\n").slice(1).join("\n")}`);
        }
    } else {
        throw new Error(`YAML file ${file} not found.`);
    }
}
function readYamlFromString(yml) {
    return parseWithNiceErrors(yml);
}
function readYamlFromMarkdown(markdown) {
    if (markdown) {
        markdown = normalizeNewlines(markdown);
        markdown = markdown.replaceAll(kRegxHTMLComment, "");
        markdown = markdown.replaceAll(kRegexFencedCode, "");
        let yaml = "";
        kRegExYAML.lastIndex = 0;
        let match = kRegExYAML.exec(markdown);
        while(match != null){
            let yamlBlock = removeYamlDelimiters(match[2]);
            yamlBlock = lines(yamlBlock).map((x)=>x.trimEnd()).join("\n");
            if (!yamlBlock.match(/^\n\s*\n/m) && !yamlBlock.match(/^\n\s*\n---/m) && yamlBlock.trim().length > 0) {
                parseWithNiceErrors(yamlBlock, {
                    json: true,
                    schema: QuartoJSONSchema1
                });
                yaml += yamlBlock;
            }
            match = kRegExYAML.exec(markdown);
        }
        kRegExYAML.lastIndex = 0;
        const metadata = parseWithNiceErrors(yaml, {
            json: true,
            schema: QuartoJSONSchema1
        });
        return metadata || {};
    } else {
        return {};
    }
}
function partitionYamlFrontMatter(markdown) {
    const mdLines = lines(markdown.trimLeft());
    if (mdLines.length < 3 || !mdLines[0].match(kRegExBeginYAML)) {
        return null;
    } else if (mdLines[1].trim().length === 0 || mdLines[1].match(kRegExEndYAML)) {
        return null;
    } else {
        const endYamlPos = mdLines.findIndex((line, index)=>index > 0 && line.match(kRegExEndYAML));
        if (endYamlPos === -1) {
            return null;
        } else {
            return {
                yaml: mdLines.slice(0, endYamlPos + 1).join("\n"),
                markdown: "\n" + mdLines.slice(endYamlPos + 1).join("\n")
            };
        }
    }
}
function removeYamlDelimiters(yaml) {
    return yaml.replace(/^---/, "").replace(/---\s*$/, "");
}
class YAMLValidationError extends ErrorEx {
    constructor(message){
        super("YAMLValidationError", message, false, false);
    }
}
const QuartoJSONSchema1 = new Schema({
    implicit: [
        nil,
        bool,
        __int,
        __float
    ],
    include: [
        failsafe
    ],
    explicit: [
        new Type1("!expr", {
            kind: "scalar",
            construct (data) {
                const result1 = data !== null ? data : "";
                return {
                    value: result1,
                    tag: "!expr"
                };
            }
        }), 
    ]
});
function parseWithNiceErrors(content, options) {
    try {
        return parse3(content, options || {
            json: true,
            schema: QuartoJSONSchema1
        });
    } catch (e) {
        throw improveYamlParseErrorMessage(e);
    }
}
function improveYamlParseErrorMessage(e) {
    if (e.message.match(/unknown tag/)) {
        e.message = `${e.message}\nDid you try to use a '!' in a YAML string? If so, you need to add explicit quotes to your string.`;
    }
    return e;
}
function listCacheClear() {
    this.__data__ = [];
    this.size = 0;
}
var __VIRTUAL_FILE = listCacheClear;
function eq(value, other) {
    return value === other || value !== value && other !== other;
}
var __VIRTUAL_FILE1 = eq;
function assocIndexOf(array, key) {
    var length = array.length;
    while(length--){
        if (__VIRTUAL_FILE1(array[length][0], key)) {
            return length;
        }
    }
    return -1;
}
var __VIRTUAL_FILE2 = assocIndexOf;
var arrayProto = Array.prototype;
var splice = arrayProto.splice;
function listCacheDelete(key) {
    var data = this.__data__, index = __VIRTUAL_FILE2(data, key);
    if (index < 0) {
        return false;
    }
    var lastIndex = data.length - 1;
    if (index == lastIndex) {
        data.pop();
    } else {
        splice.call(data, index, 1);
    }
    --this.size;
    return true;
}
var __VIRTUAL_FILE3 = listCacheDelete;
function listCacheGet(key) {
    var data = this.__data__, index = __VIRTUAL_FILE2(data, key);
    return index < 0 ? void 0 : data[index][1];
}
var __VIRTUAL_FILE4 = listCacheGet;
function listCacheHas(key) {
    return __VIRTUAL_FILE2(this.__data__, key) > -1;
}
var __VIRTUAL_FILE5 = listCacheHas;
function listCacheSet(key, value) {
    var data = this.__data__, index = __VIRTUAL_FILE2(data, key);
    if (index < 0) {
        ++this.size;
        data.push([
            key,
            value
        ]);
    } else {
        data[index][1] = value;
    }
    return this;
}
var __VIRTUAL_FILE6 = listCacheSet;
function ListCache(entries) {
    var index = -1, length = entries == null ? 0 : entries.length;
    this.clear();
    while(++index < length){
        var entry = entries[index];
        this.set(entry[0], entry[1]);
    }
}
ListCache.prototype.clear = __VIRTUAL_FILE;
ListCache.prototype["delete"] = __VIRTUAL_FILE3;
ListCache.prototype.get = __VIRTUAL_FILE4;
ListCache.prototype.has = __VIRTUAL_FILE5;
ListCache.prototype.set = __VIRTUAL_FILE6;
var __VIRTUAL_FILE7 = ListCache;
function stackClear() {
    this.__data__ = new __VIRTUAL_FILE7();
    this.size = 0;
}
var __VIRTUAL_FILE8 = stackClear;
function stackDelete(key) {
    var data = this.__data__, result1 = data["delete"](key);
    this.size = data.size;
    return result1;
}
var __VIRTUAL_FILE9 = stackDelete;
function stackGet(key) {
    return this.__data__.get(key);
}
var __VIRTUAL_FILE10 = stackGet;
function stackHas(key) {
    return this.__data__.has(key);
}
var __VIRTUAL_FILE11 = stackHas;
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
var __VIRTUAL_FILE12 = freeGlobal;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = __VIRTUAL_FILE12 || freeSelf || Function("return this")();
var __VIRTUAL_FILE13 = root;
var Symbol1 = __VIRTUAL_FILE13.Symbol;
var __VIRTUAL_FILE14 = Symbol1;
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var nativeObjectToString = objectProto.toString;
var symToStringTag = __VIRTUAL_FILE14 ? __VIRTUAL_FILE14.toStringTag : void 0;
function getRawTag(value) {
    var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
    try {
        value[symToStringTag] = void 0;
        var unmasked = true;
    } catch (e) {}
    var result1 = nativeObjectToString.call(value);
    if (unmasked) {
        if (isOwn) {
            value[symToStringTag] = tag;
        } else {
            delete value[symToStringTag];
        }
    }
    return result1;
}
var __VIRTUAL_FILE15 = getRawTag;
var objectProto1 = Object.prototype;
var nativeObjectToString1 = objectProto1.toString;
function objectToString(value) {
    return nativeObjectToString1.call(value);
}
var __VIRTUAL_FILE16 = objectToString;
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
var symToStringTag1 = __VIRTUAL_FILE14 ? __VIRTUAL_FILE14.toStringTag : void 0;
function baseGetTag(value) {
    if (value == null) {
        return value === void 0 ? undefinedTag : nullTag;
    }
    return symToStringTag1 && symToStringTag1 in Object(value) ? __VIRTUAL_FILE15(value) : __VIRTUAL_FILE16(value);
}
var __VIRTUAL_FILE17 = baseGetTag;
function isObject3(value) {
    var type = typeof value;
    return value != null && (type == "object" || type == "function");
}
var __VIRTUAL_FILE18 = isObject3;
var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
function isFunction(value) {
    if (!__VIRTUAL_FILE18(value)) {
        return false;
    }
    var tag = __VIRTUAL_FILE17(value);
    return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
var __VIRTUAL_FILE19 = isFunction;
var coreJsData = __VIRTUAL_FILE13["__core-js_shared__"];
var __VIRTUAL_FILE20 = coreJsData;
var maskSrcKey = function() {
    var uid = /[^.]+$/.exec(__VIRTUAL_FILE20 && __VIRTUAL_FILE20.keys && __VIRTUAL_FILE20.keys.IE_PROTO || "");
    return uid ? "Symbol(src)_1." + uid : "";
}();
function isMasked(func) {
    return !!maskSrcKey && maskSrcKey in func;
}
var __VIRTUAL_FILE21 = isMasked;
var funcProto = Function.prototype;
var funcToString = funcProto.toString;
function toSource(func) {
    if (func != null) {
        try {
            return funcToString.call(func);
        } catch (e) {}
        try {
            return func + "";
        } catch (e1) {}
    }
    return "";
}
var __VIRTUAL_FILE22 = toSource;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var funcProto1 = Function.prototype, objectProto2 = Object.prototype;
var funcToString1 = funcProto1.toString;
var hasOwnProperty1 = objectProto2.hasOwnProperty;
var reIsNative = RegExp("^" + funcToString1.call(hasOwnProperty1).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
function baseIsNative(value) {
    if (!__VIRTUAL_FILE18(value) || __VIRTUAL_FILE21(value)) {
        return false;
    }
    var pattern = __VIRTUAL_FILE19(value) ? reIsNative : reIsHostCtor;
    return pattern.test(__VIRTUAL_FILE22(value));
}
var __VIRTUAL_FILE23 = baseIsNative;
function getValue(object, key) {
    return object == null ? void 0 : object[key];
}
var __VIRTUAL_FILE24 = getValue;
function getNative(object, key) {
    var value = __VIRTUAL_FILE24(object, key);
    return __VIRTUAL_FILE23(value) ? value : void 0;
}
var __VIRTUAL_FILE25 = getNative;
var Map1 = __VIRTUAL_FILE25(__VIRTUAL_FILE13, "Map");
var __VIRTUAL_FILE26 = Map1;
var nativeCreate = __VIRTUAL_FILE25(Object, "create");
var __VIRTUAL_FILE27 = nativeCreate;
function hashClear() {
    this.__data__ = __VIRTUAL_FILE27 ? __VIRTUAL_FILE27(null) : {};
    this.size = 0;
}
var __VIRTUAL_FILE28 = hashClear;
function hashDelete(key) {
    var result1 = this.has(key) && delete this.__data__[key];
    this.size -= result1 ? 1 : 0;
    return result1;
}
var __VIRTUAL_FILE29 = hashDelete;
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var objectProto3 = Object.prototype;
var hasOwnProperty2 = objectProto3.hasOwnProperty;
function hashGet(key) {
    var data = this.__data__;
    if (__VIRTUAL_FILE27) {
        var result1 = data[key];
        return result1 === HASH_UNDEFINED ? void 0 : result1;
    }
    return hasOwnProperty2.call(data, key) ? data[key] : void 0;
}
var __VIRTUAL_FILE30 = hashGet;
var objectProto4 = Object.prototype;
var hasOwnProperty3 = objectProto4.hasOwnProperty;
function hashHas(key) {
    var data = this.__data__;
    return __VIRTUAL_FILE27 ? data[key] !== void 0 : hasOwnProperty3.call(data, key);
}
var __VIRTUAL_FILE31 = hashHas;
var HASH_UNDEFINED1 = "__lodash_hash_undefined__";
function hashSet(key, value) {
    var data = this.__data__;
    this.size += this.has(key) ? 0 : 1;
    data[key] = __VIRTUAL_FILE27 && value === void 0 ? HASH_UNDEFINED1 : value;
    return this;
}
var __VIRTUAL_FILE32 = hashSet;
function Hash(entries) {
    var index = -1, length = entries == null ? 0 : entries.length;
    this.clear();
    while(++index < length){
        var entry = entries[index];
        this.set(entry[0], entry[1]);
    }
}
Hash.prototype.clear = __VIRTUAL_FILE28;
Hash.prototype["delete"] = __VIRTUAL_FILE29;
Hash.prototype.get = __VIRTUAL_FILE30;
Hash.prototype.has = __VIRTUAL_FILE31;
Hash.prototype.set = __VIRTUAL_FILE32;
var __VIRTUAL_FILE33 = Hash;
function mapCacheClear() {
    this.size = 0;
    this.__data__ = {
        hash: new __VIRTUAL_FILE33(),
        map: new (__VIRTUAL_FILE26 || __VIRTUAL_FILE7)(),
        string: new __VIRTUAL_FILE33()
    };
}
var __VIRTUAL_FILE34 = mapCacheClear;
function isKeyable(value) {
    var type = typeof value;
    return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
var __VIRTUAL_FILE35 = isKeyable;
function getMapData(map, key) {
    var data = map.__data__;
    return __VIRTUAL_FILE35(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
var __VIRTUAL_FILE36 = getMapData;
function mapCacheDelete(key) {
    var result1 = __VIRTUAL_FILE36(this, key)["delete"](key);
    this.size -= result1 ? 1 : 0;
    return result1;
}
var __VIRTUAL_FILE37 = mapCacheDelete;
function mapCacheGet(key) {
    return __VIRTUAL_FILE36(this, key).get(key);
}
var __VIRTUAL_FILE38 = mapCacheGet;
function mapCacheHas(key) {
    return __VIRTUAL_FILE36(this, key).has(key);
}
var __VIRTUAL_FILE39 = mapCacheHas;
function mapCacheSet(key, value) {
    var data = __VIRTUAL_FILE36(this, key), size = data.size;
    data.set(key, value);
    this.size += data.size == size ? 0 : 1;
    return this;
}
var __VIRTUAL_FILE40 = mapCacheSet;
function MapCache(entries) {
    var index = -1, length = entries == null ? 0 : entries.length;
    this.clear();
    while(++index < length){
        var entry = entries[index];
        this.set(entry[0], entry[1]);
    }
}
MapCache.prototype.clear = __VIRTUAL_FILE34;
MapCache.prototype["delete"] = __VIRTUAL_FILE37;
MapCache.prototype.get = __VIRTUAL_FILE38;
MapCache.prototype.has = __VIRTUAL_FILE39;
MapCache.prototype.set = __VIRTUAL_FILE40;
var __VIRTUAL_FILE41 = MapCache;
var LARGE_ARRAY_SIZE = 200;
function stackSet(key, value) {
    var data = this.__data__;
    if (data instanceof __VIRTUAL_FILE7) {
        var pairs = data.__data__;
        if (!__VIRTUAL_FILE26 || pairs.length < LARGE_ARRAY_SIZE - 1) {
            pairs.push([
                key,
                value
            ]);
            this.size = ++data.size;
            return this;
        }
        data = this.__data__ = new __VIRTUAL_FILE41(pairs);
    }
    data.set(key, value);
    this.size = data.size;
    return this;
}
var __VIRTUAL_FILE42 = stackSet;
function Stack(entries) {
    var data = this.__data__ = new __VIRTUAL_FILE7(entries);
    this.size = data.size;
}
Stack.prototype.clear = __VIRTUAL_FILE8;
Stack.prototype["delete"] = __VIRTUAL_FILE9;
Stack.prototype.get = __VIRTUAL_FILE10;
Stack.prototype.has = __VIRTUAL_FILE11;
Stack.prototype.set = __VIRTUAL_FILE42;
var __VIRTUAL_FILE43 = Stack;
function arrayEach(array, iteratee) {
    var index = -1, length = array == null ? 0 : array.length;
    while(++index < length){
        if (iteratee(array[index], index, array) === false) {
            break;
        }
    }
    return array;
}
var __VIRTUAL_FILE44 = arrayEach;
var defineProperty = function() {
    try {
        var func = __VIRTUAL_FILE25(Object, "defineProperty");
        func({}, "", {});
        return func;
    } catch (e) {}
}();
var __VIRTUAL_FILE45 = defineProperty;
function baseAssignValue(object, key, value) {
    if (key == "__proto__" && __VIRTUAL_FILE45) {
        __VIRTUAL_FILE45(object, key, {
            configurable: true,
            enumerable: true,
            value,
            writable: true
        });
    } else {
        object[key] = value;
    }
}
var __VIRTUAL_FILE46 = baseAssignValue;
var objectProto5 = Object.prototype;
var hasOwnProperty4 = objectProto5.hasOwnProperty;
function assignValue(object, key, value) {
    var objValue = object[key];
    if (!(hasOwnProperty4.call(object, key) && __VIRTUAL_FILE1(objValue, value)) || value === void 0 && !(key in object)) {
        __VIRTUAL_FILE46(object, key, value);
    }
}
var __VIRTUAL_FILE47 = assignValue;
function copyObject(source, props, object, customizer) {
    var isNew = !object;
    object || (object = {});
    var index = -1, length = props.length;
    while(++index < length){
        var key = props[index];
        var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
        if (newValue === void 0) {
            newValue = source[key];
        }
        if (isNew) {
            __VIRTUAL_FILE46(object, key, newValue);
        } else {
            __VIRTUAL_FILE47(object, key, newValue);
        }
    }
    return object;
}
var __VIRTUAL_FILE48 = copyObject;
function baseTimes(n, iteratee) {
    var index = -1, result1 = Array(n);
    while(++index < n){
        result1[index] = iteratee(index);
    }
    return result1;
}
var __VIRTUAL_FILE49 = baseTimes;
function isObjectLike(value) {
    return value != null && typeof value == "object";
}
var __VIRTUAL_FILE50 = isObjectLike;
var argsTag = "[object Arguments]";
function baseIsArguments(value) {
    return __VIRTUAL_FILE50(value) && __VIRTUAL_FILE17(value) == argsTag;
}
var __VIRTUAL_FILE51 = baseIsArguments;
var objectProto6 = Object.prototype;
var hasOwnProperty5 = objectProto6.hasOwnProperty;
var propertyIsEnumerable = objectProto6.propertyIsEnumerable;
var isArguments = __VIRTUAL_FILE51(function() {
    return arguments;
}()) ? __VIRTUAL_FILE51 : function(value) {
    return __VIRTUAL_FILE50(value) && hasOwnProperty5.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
};
var __VIRTUAL_FILE52 = isArguments;
var isArray = Array.isArray;
var __VIRTUAL_FILE53 = isArray;
function stubFalse() {
    return false;
}
var __VIRTUAL_FILE54 = stubFalse;
function createCommonjsModule(fn) {
    var module = {
        exports: {}
    };
    return fn(module, module.exports), module.exports;
}
var __VIRTUAL_FILE55 = createCommonjsModule(function(module, exports) {
    var freeExports = exports && !exports.nodeType && exports;
    var freeModule = freeExports && true && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    var Buffer1 = moduleExports ? __VIRTUAL_FILE13.Buffer : void 0;
    var nativeIsBuffer = Buffer1 ? Buffer1.isBuffer : void 0;
    var isBuffer = nativeIsBuffer || __VIRTUAL_FILE54;
    module.exports = isBuffer;
});
var MAX_SAFE_INTEGER = 9007199254740991;
var reIsUint = /^(?:0|[1-9]\d*)$/;
function isIndex(value, length) {
    var type = typeof value;
    length = length == null ? MAX_SAFE_INTEGER : length;
    return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
var __VIRTUAL_FILE56 = isIndex;
var MAX_SAFE_INTEGER1 = 9007199254740991;
function isLength(value) {
    return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER1;
}
var __VIRTUAL_FILE57 = isLength;
var argsTag1 = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag1 = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag1] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag1] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
function baseIsTypedArray(value) {
    return __VIRTUAL_FILE50(value) && __VIRTUAL_FILE57(value.length) && !!typedArrayTags[__VIRTUAL_FILE17(value)];
}
var __VIRTUAL_FILE58 = baseIsTypedArray;
function baseUnary(func) {
    return function(value) {
        return func(value);
    };
}
var __VIRTUAL_FILE59 = baseUnary;
function createCommonjsModule1(fn) {
    var module = {
        exports: {}
    };
    return fn(module, module.exports), module.exports;
}
var __VIRTUAL_FILE60 = createCommonjsModule1(function(module, exports) {
    var freeExports = exports && !exports.nodeType && exports;
    var freeModule = freeExports && true && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    var freeProcess = moduleExports && __VIRTUAL_FILE12.process;
    var nodeUtil = function() {
        try {
            var types = freeModule && freeModule.require && freeModule.require("util").types;
            if (types) {
                return types;
            }
            return freeProcess && freeProcess.binding && freeProcess.binding("util");
        } catch (e) {}
    }();
    module.exports = nodeUtil;
});
var nodeIsTypedArray = __VIRTUAL_FILE60 && __VIRTUAL_FILE60.isTypedArray;
var isTypedArray = nodeIsTypedArray ? __VIRTUAL_FILE59(nodeIsTypedArray) : __VIRTUAL_FILE58;
var __VIRTUAL_FILE61 = isTypedArray;
var objectProto7 = Object.prototype;
var hasOwnProperty6 = objectProto7.hasOwnProperty;
function arrayLikeKeys(value, inherited) {
    var isArr = __VIRTUAL_FILE53(value), isArg = !isArr && __VIRTUAL_FILE52(value), isBuff = !isArr && !isArg && __VIRTUAL_FILE55(value), isType = !isArr && !isArg && !isBuff && __VIRTUAL_FILE61(value), skipIndexes = isArr || isArg || isBuff || isType, result1 = skipIndexes ? __VIRTUAL_FILE49(value.length, String) : [], length = result1.length;
    for(var key in value){
        if ((inherited || hasOwnProperty6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || __VIRTUAL_FILE56(key, length)))) {
            result1.push(key);
        }
    }
    return result1;
}
var __VIRTUAL_FILE62 = arrayLikeKeys;
var objectProto8 = Object.prototype;
function isPrototype(value) {
    var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto8;
    return value === proto;
}
var __VIRTUAL_FILE63 = isPrototype;
function overArg(func, transform) {
    return function(arg) {
        return func(transform(arg));
    };
}
var __VIRTUAL_FILE64 = overArg;
var nativeKeys = __VIRTUAL_FILE64(Object.keys, Object);
var __VIRTUAL_FILE65 = nativeKeys;
var objectProto9 = Object.prototype;
var hasOwnProperty7 = objectProto9.hasOwnProperty;
function baseKeys(object) {
    if (!__VIRTUAL_FILE63(object)) {
        return __VIRTUAL_FILE65(object);
    }
    var result1 = [];
    for(var key in Object(object)){
        if (hasOwnProperty7.call(object, key) && key != "constructor") {
            result1.push(key);
        }
    }
    return result1;
}
var __VIRTUAL_FILE66 = baseKeys;
function isArrayLike(value) {
    return value != null && __VIRTUAL_FILE57(value.length) && !__VIRTUAL_FILE19(value);
}
var __VIRTUAL_FILE67 = isArrayLike;
function keys(object) {
    return __VIRTUAL_FILE67(object) ? __VIRTUAL_FILE62(object) : __VIRTUAL_FILE66(object);
}
var __VIRTUAL_FILE68 = keys;
function baseAssign(object, source) {
    return object && __VIRTUAL_FILE48(source, __VIRTUAL_FILE68(source), object);
}
var __VIRTUAL_FILE69 = baseAssign;
function nativeKeysIn(object) {
    var result1 = [];
    if (object != null) {
        for(var key in Object(object)){
            result1.push(key);
        }
    }
    return result1;
}
var __VIRTUAL_FILE70 = nativeKeysIn;
var objectProto10 = Object.prototype;
var hasOwnProperty8 = objectProto10.hasOwnProperty;
function baseKeysIn(object) {
    if (!__VIRTUAL_FILE18(object)) {
        return __VIRTUAL_FILE70(object);
    }
    var isProto = __VIRTUAL_FILE63(object), result1 = [];
    for(var key in object){
        if (!(key == "constructor" && (isProto || !hasOwnProperty8.call(object, key)))) {
            result1.push(key);
        }
    }
    return result1;
}
var __VIRTUAL_FILE71 = baseKeysIn;
function keysIn(object) {
    return __VIRTUAL_FILE67(object) ? __VIRTUAL_FILE62(object, true) : __VIRTUAL_FILE71(object);
}
var __VIRTUAL_FILE72 = keysIn;
function baseAssignIn(object, source) {
    return object && __VIRTUAL_FILE48(source, __VIRTUAL_FILE72(source), object);
}
var __VIRTUAL_FILE73 = baseAssignIn;
function createCommonjsModule2(fn) {
    var module = {
        exports: {}
    };
    return fn(module, module.exports), module.exports;
}
var __VIRTUAL_FILE74 = createCommonjsModule2(function(module, exports) {
    var freeExports = exports && !exports.nodeType && exports;
    var freeModule = freeExports && true && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    var Buffer1 = moduleExports ? __VIRTUAL_FILE13.Buffer : void 0, allocUnsafe = Buffer1 ? Buffer1.allocUnsafe : void 0;
    function cloneBuffer(buffer, isDeep) {
        if (isDeep) {
            return buffer.slice();
        }
        var length = buffer.length, result1 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
        buffer.copy(result1);
        return result1;
    }
    module.exports = cloneBuffer;
});
function copyArray(source, array) {
    var index = -1, length = source.length;
    array || (array = Array(length));
    while(++index < length){
        array[index] = source[index];
    }
    return array;
}
var __VIRTUAL_FILE75 = copyArray;
function arrayFilter(array, predicate) {
    var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result1 = [];
    while(++index < length){
        var value = array[index];
        if (predicate(value, index, array)) {
            result1[resIndex++] = value;
        }
    }
    return result1;
}
var __VIRTUAL_FILE76 = arrayFilter;
function stubArray() {
    return [];
}
var __VIRTUAL_FILE77 = stubArray;
var objectProto11 = Object.prototype;
var propertyIsEnumerable1 = objectProto11.propertyIsEnumerable;
var nativeGetSymbols = Object.getOwnPropertySymbols;
var getSymbols = !nativeGetSymbols ? __VIRTUAL_FILE77 : function(object) {
    if (object == null) {
        return [];
    }
    object = Object(object);
    return __VIRTUAL_FILE76(nativeGetSymbols(object), function(symbol) {
        return propertyIsEnumerable1.call(object, symbol);
    });
};
var __VIRTUAL_FILE78 = getSymbols;
function copySymbols(source, object) {
    return __VIRTUAL_FILE48(source, __VIRTUAL_FILE78(source), object);
}
var __VIRTUAL_FILE79 = copySymbols;
function arrayPush(array, values) {
    var index = -1, length = values.length, offset = array.length;
    while(++index < length){
        array[offset + index] = values[index];
    }
    return array;
}
var __VIRTUAL_FILE80 = arrayPush;
var getPrototype = __VIRTUAL_FILE64(Object.getPrototypeOf, Object);
var __VIRTUAL_FILE81 = getPrototype;
var nativeGetSymbols1 = Object.getOwnPropertySymbols;
var getSymbolsIn = !nativeGetSymbols1 ? __VIRTUAL_FILE77 : function(object) {
    var result1 = [];
    while(object){
        __VIRTUAL_FILE80(result1, __VIRTUAL_FILE78(object));
        object = __VIRTUAL_FILE81(object);
    }
    return result1;
};
var __VIRTUAL_FILE82 = getSymbolsIn;
function copySymbolsIn(source, object) {
    return __VIRTUAL_FILE48(source, __VIRTUAL_FILE82(source), object);
}
var __VIRTUAL_FILE83 = copySymbolsIn;
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
    var result1 = keysFunc(object);
    return __VIRTUAL_FILE53(object) ? result1 : __VIRTUAL_FILE80(result1, symbolsFunc(object));
}
var __VIRTUAL_FILE84 = baseGetAllKeys;
function getAllKeys(object) {
    return __VIRTUAL_FILE84(object, __VIRTUAL_FILE68, __VIRTUAL_FILE78);
}
var __VIRTUAL_FILE85 = getAllKeys;
function getAllKeysIn(object) {
    return __VIRTUAL_FILE84(object, __VIRTUAL_FILE72, __VIRTUAL_FILE82);
}
var __VIRTUAL_FILE86 = getAllKeysIn;
var DataView1 = __VIRTUAL_FILE25(__VIRTUAL_FILE13, "DataView");
var __VIRTUAL_FILE87 = DataView1;
var Promise1 = __VIRTUAL_FILE25(__VIRTUAL_FILE13, "Promise");
var __VIRTUAL_FILE88 = Promise1;
var Set1 = __VIRTUAL_FILE25(__VIRTUAL_FILE13, "Set");
var __VIRTUAL_FILE89 = Set1;
var WeakMap1 = __VIRTUAL_FILE25(__VIRTUAL_FILE13, "WeakMap");
var __VIRTUAL_FILE90 = WeakMap1;
var mapTag1 = "[object Map]", objectTag1 = "[object Object]", promiseTag = "[object Promise]", setTag1 = "[object Set]", weakMapTag1 = "[object WeakMap]";
var dataViewTag1 = "[object DataView]";
var dataViewCtorString = __VIRTUAL_FILE22(__VIRTUAL_FILE87), mapCtorString = __VIRTUAL_FILE22(__VIRTUAL_FILE26), promiseCtorString = __VIRTUAL_FILE22(__VIRTUAL_FILE88), setCtorString = __VIRTUAL_FILE22(__VIRTUAL_FILE89), weakMapCtorString = __VIRTUAL_FILE22(__VIRTUAL_FILE90);
var getTag = __VIRTUAL_FILE17;
if (__VIRTUAL_FILE87 && getTag(new __VIRTUAL_FILE87(new ArrayBuffer(1))) != dataViewTag1 || __VIRTUAL_FILE26 && getTag(new __VIRTUAL_FILE26()) != mapTag1 || __VIRTUAL_FILE88 && getTag(__VIRTUAL_FILE88.resolve()) != promiseTag || __VIRTUAL_FILE89 && getTag(new __VIRTUAL_FILE89()) != setTag1 || __VIRTUAL_FILE90 && getTag(new __VIRTUAL_FILE90()) != weakMapTag1) {
    getTag = function(value) {
        var result1 = __VIRTUAL_FILE17(value), Ctor = result1 == objectTag1 ? value.constructor : void 0, ctorString = Ctor ? __VIRTUAL_FILE22(Ctor) : "";
        if (ctorString) {
            switch(ctorString){
                case dataViewCtorString:
                    return dataViewTag1;
                case mapCtorString:
                    return mapTag1;
                case promiseCtorString:
                    return promiseTag;
                case setCtorString:
                    return setTag1;
                case weakMapCtorString:
                    return weakMapTag1;
            }
        }
        return result1;
    };
}
var __VIRTUAL_FILE91 = getTag;
var objectProto12 = Object.prototype;
var hasOwnProperty9 = objectProto12.hasOwnProperty;
function initCloneArray(array) {
    var length = array.length, result1 = new array.constructor(length);
    if (length && typeof array[0] == "string" && hasOwnProperty9.call(array, "index")) {
        result1.index = array.index;
        result1.input = array.input;
    }
    return result1;
}
var __VIRTUAL_FILE92 = initCloneArray;
var Uint8Array1 = __VIRTUAL_FILE13.Uint8Array;
var __VIRTUAL_FILE93 = Uint8Array1;
function cloneArrayBuffer(arrayBuffer) {
    var result1 = new arrayBuffer.constructor(arrayBuffer.byteLength);
    new __VIRTUAL_FILE93(result1).set(new __VIRTUAL_FILE93(arrayBuffer));
    return result1;
}
var __VIRTUAL_FILE94 = cloneArrayBuffer;
function cloneDataView(dataView, isDeep) {
    var buffer = isDeep ? __VIRTUAL_FILE94(dataView.buffer) : dataView.buffer;
    return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
var __VIRTUAL_FILE95 = cloneDataView;
var reFlags = /\w*$/;
function cloneRegExp(regexp) {
    var result1 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
    result1.lastIndex = regexp.lastIndex;
    return result1;
}
var __VIRTUAL_FILE96 = cloneRegExp;
var symbolProto = __VIRTUAL_FILE14 ? __VIRTUAL_FILE14.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
function cloneSymbol(symbol) {
    return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
var __VIRTUAL_FILE97 = cloneSymbol;
function cloneTypedArray(typedArray, isDeep) {
    var buffer = isDeep ? __VIRTUAL_FILE94(typedArray.buffer) : typedArray.buffer;
    return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
var __VIRTUAL_FILE98 = cloneTypedArray;
var boolTag1 = "[object Boolean]", dateTag1 = "[object Date]", mapTag2 = "[object Map]", numberTag1 = "[object Number]", regexpTag1 = "[object RegExp]", setTag2 = "[object Set]", stringTag1 = "[object String]", symbolTag = "[object Symbol]";
var arrayBufferTag1 = "[object ArrayBuffer]", dataViewTag2 = "[object DataView]", float32Tag1 = "[object Float32Array]", float64Tag1 = "[object Float64Array]", int8Tag1 = "[object Int8Array]", int16Tag1 = "[object Int16Array]", int32Tag1 = "[object Int32Array]", uint8Tag1 = "[object Uint8Array]", uint8ClampedTag1 = "[object Uint8ClampedArray]", uint16Tag1 = "[object Uint16Array]", uint32Tag1 = "[object Uint32Array]";
function initCloneByTag(object, tag, isDeep) {
    var Ctor = object.constructor;
    switch(tag){
        case arrayBufferTag1:
            return __VIRTUAL_FILE94(object);
        case boolTag1:
        case dateTag1:
            return new Ctor(+object);
        case dataViewTag2:
            return __VIRTUAL_FILE95(object, isDeep);
        case float32Tag1:
        case float64Tag1:
        case int8Tag1:
        case int16Tag1:
        case int32Tag1:
        case uint8Tag1:
        case uint8ClampedTag1:
        case uint16Tag1:
        case uint32Tag1:
            return __VIRTUAL_FILE98(object, isDeep);
        case mapTag2:
            return new Ctor();
        case numberTag1:
        case stringTag1:
            return new Ctor(object);
        case regexpTag1:
            return __VIRTUAL_FILE96(object);
        case setTag2:
            return new Ctor();
        case symbolTag:
            return __VIRTUAL_FILE97(object);
    }
}
var __VIRTUAL_FILE99 = initCloneByTag;
var objectCreate = Object.create;
var baseCreate = function() {
    function object() {}
    return function(proto) {
        if (!__VIRTUAL_FILE18(proto)) {
            return {};
        }
        if (objectCreate) {
            return objectCreate(proto);
        }
        object.prototype = proto;
        var result1 = new object();
        object.prototype = void 0;
        return result1;
    };
}();
var __VIRTUAL_FILE100 = baseCreate;
function initCloneObject(object) {
    return typeof object.constructor == "function" && !__VIRTUAL_FILE63(object) ? __VIRTUAL_FILE100(__VIRTUAL_FILE81(object)) : {};
}
var __VIRTUAL_FILE101 = initCloneObject;
var mapTag3 = "[object Map]";
function baseIsMap(value) {
    return __VIRTUAL_FILE50(value) && __VIRTUAL_FILE91(value) == mapTag3;
}
var __VIRTUAL_FILE102 = baseIsMap;
var nodeIsMap = __VIRTUAL_FILE60 && __VIRTUAL_FILE60.isMap;
var isMap = nodeIsMap ? __VIRTUAL_FILE59(nodeIsMap) : __VIRTUAL_FILE102;
var __VIRTUAL_FILE103 = isMap;
var setTag3 = "[object Set]";
function baseIsSet(value) {
    return __VIRTUAL_FILE50(value) && __VIRTUAL_FILE91(value) == setTag3;
}
var __VIRTUAL_FILE104 = baseIsSet;
var nodeIsSet = __VIRTUAL_FILE60 && __VIRTUAL_FILE60.isSet;
var isSet = nodeIsSet ? __VIRTUAL_FILE59(nodeIsSet) : __VIRTUAL_FILE104;
var __VIRTUAL_FILE105 = isSet;
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
var argsTag2 = "[object Arguments]", arrayTag1 = "[object Array]", boolTag2 = "[object Boolean]", dateTag2 = "[object Date]", errorTag1 = "[object Error]", funcTag2 = "[object Function]", genTag1 = "[object GeneratorFunction]", mapTag4 = "[object Map]", numberTag2 = "[object Number]", objectTag2 = "[object Object]", regexpTag2 = "[object RegExp]", setTag4 = "[object Set]", stringTag2 = "[object String]", symbolTag1 = "[object Symbol]", weakMapTag2 = "[object WeakMap]";
var arrayBufferTag2 = "[object ArrayBuffer]", dataViewTag3 = "[object DataView]", float32Tag2 = "[object Float32Array]", float64Tag2 = "[object Float64Array]", int8Tag2 = "[object Int8Array]", int16Tag2 = "[object Int16Array]", int32Tag2 = "[object Int32Array]", uint8Tag2 = "[object Uint8Array]", uint8ClampedTag2 = "[object Uint8ClampedArray]", uint16Tag2 = "[object Uint16Array]", uint32Tag2 = "[object Uint32Array]";
var cloneableTags = {};
cloneableTags[argsTag2] = cloneableTags[arrayTag1] = cloneableTags[arrayBufferTag2] = cloneableTags[dataViewTag3] = cloneableTags[boolTag2] = cloneableTags[dateTag2] = cloneableTags[float32Tag2] = cloneableTags[float64Tag2] = cloneableTags[int8Tag2] = cloneableTags[int16Tag2] = cloneableTags[int32Tag2] = cloneableTags[mapTag4] = cloneableTags[numberTag2] = cloneableTags[objectTag2] = cloneableTags[regexpTag2] = cloneableTags[setTag4] = cloneableTags[stringTag2] = cloneableTags[symbolTag1] = cloneableTags[uint8Tag2] = cloneableTags[uint8ClampedTag2] = cloneableTags[uint16Tag2] = cloneableTags[uint32Tag2] = true;
cloneableTags[errorTag1] = cloneableTags[funcTag2] = cloneableTags[weakMapTag2] = false;
function baseClone(value, bitmask, customizer, key, object, stack) {
    var result1, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
    if (customizer) {
        result1 = object ? customizer(value, key, object, stack) : customizer(value);
    }
    if (result1 !== void 0) {
        return result1;
    }
    if (!__VIRTUAL_FILE18(value)) {
        return value;
    }
    var isArr = __VIRTUAL_FILE53(value);
    if (isArr) {
        result1 = __VIRTUAL_FILE92(value);
        if (!isDeep) {
            return __VIRTUAL_FILE75(value, result1);
        }
    } else {
        var tag = __VIRTUAL_FILE91(value), isFunc = tag == funcTag2 || tag == genTag1;
        if (__VIRTUAL_FILE55(value)) {
            return __VIRTUAL_FILE74(value, isDeep);
        }
        if (tag == objectTag2 || tag == argsTag2 || isFunc && !object) {
            result1 = isFlat || isFunc ? {} : __VIRTUAL_FILE101(value);
            if (!isDeep) {
                return isFlat ? __VIRTUAL_FILE83(value, __VIRTUAL_FILE73(result1, value)) : __VIRTUAL_FILE79(value, __VIRTUAL_FILE69(result1, value));
            }
        } else {
            if (!cloneableTags[tag]) {
                return object ? value : {};
            }
            result1 = __VIRTUAL_FILE99(value, tag, isDeep);
        }
    }
    stack || (stack = new __VIRTUAL_FILE43());
    var stacked = stack.get(value);
    if (stacked) {
        return stacked;
    }
    stack.set(value, result1);
    if (__VIRTUAL_FILE105(value)) {
        value.forEach(function(subValue) {
            result1.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
        });
    } else if (__VIRTUAL_FILE103(value)) {
        value.forEach(function(subValue, key2) {
            result1.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
        });
    }
    var keysFunc = isFull ? isFlat ? __VIRTUAL_FILE86 : __VIRTUAL_FILE85 : isFlat ? __VIRTUAL_FILE72 : __VIRTUAL_FILE68;
    var props = isArr ? void 0 : keysFunc(value);
    __VIRTUAL_FILE44(props || value, function(subValue, key2) {
        if (props) {
            key2 = subValue;
            subValue = value[key2];
        }
        __VIRTUAL_FILE47(result1, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
    });
    return result1;
}
var __VIRTUAL_FILE106 = baseClone;
var CLONE_DEEP_FLAG1 = 1, CLONE_SYMBOLS_FLAG1 = 4;
function cloneDeep(value) {
    return __VIRTUAL_FILE106(value, CLONE_DEEP_FLAG1 | CLONE_SYMBOLS_FLAG1);
}
var __VIRTUAL_FILE107 = cloneDeep;
var now = function() {
    return __VIRTUAL_FILE13.Date.now();
};
var __VIRTUAL_FILE108 = now;
var reWhitespace1 = /\s/;
function trimmedEndIndex(string) {
    var index = string.length;
    while(index-- && reWhitespace1.test(string.charAt(index))){}
    return index;
}
var __VIRTUAL_FILE109 = trimmedEndIndex;
var reTrimStart = /^\s+/;
function baseTrim(string) {
    return string ? string.slice(0, __VIRTUAL_FILE109(string) + 1).replace(reTrimStart, "") : string;
}
var __VIRTUAL_FILE110 = baseTrim;
var symbolTag2 = "[object Symbol]";
function isSymbol(value) {
    return typeof value == "symbol" || __VIRTUAL_FILE50(value) && __VIRTUAL_FILE17(value) == symbolTag2;
}
var __VIRTUAL_FILE111 = isSymbol;
var NAN = 0 / 0;
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
var reIsBinary = /^0b[01]+$/i;
var reIsOctal = /^0o[0-7]+$/i;
var freeParseInt = parseInt;
function toNumber(value) {
    if (typeof value == "number") {
        return value;
    }
    if (__VIRTUAL_FILE111(value)) {
        return NAN;
    }
    if (__VIRTUAL_FILE18(value)) {
        var other = typeof value.valueOf == "function" ? value.valueOf() : value;
        value = __VIRTUAL_FILE18(other) ? other + "" : other;
    }
    if (typeof value != "string") {
        return value === 0 ? value : +value;
    }
    value = __VIRTUAL_FILE110(value);
    var isBinary = reIsBinary.test(value);
    return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
var __VIRTUAL_FILE112 = toNumber;
var FUNC_ERROR_TEXT = "Expected a function";
var nativeMax = Math.max, nativeMin = Math.min;
function debounce(func, wait, options) {
    var lastArgs, lastThis, maxWait, result1, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
    if (typeof func != "function") {
        throw new TypeError(FUNC_ERROR_TEXT);
    }
    wait = __VIRTUAL_FILE112(wait) || 0;
    if (__VIRTUAL_FILE18(options)) {
        leading = !!options.leading;
        maxing = "maxWait" in options;
        maxWait = maxing ? nativeMax(__VIRTUAL_FILE112(options.maxWait) || 0, wait) : maxWait;
        trailing = "trailing" in options ? !!options.trailing : trailing;
    }
    function invokeFunc(time) {
        var args = lastArgs, thisArg = lastThis;
        lastArgs = lastThis = void 0;
        lastInvokeTime = time;
        result1 = func.apply(thisArg, args);
        return result1;
    }
    function leadingEdge(time) {
        lastInvokeTime = time;
        timerId = setTimeout(timerExpired, wait);
        return leading ? invokeFunc(time) : result1;
    }
    function remainingWait(time) {
        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
        return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
    }
    function shouldInvoke(time) {
        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
        return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
    }
    function timerExpired() {
        var time = __VIRTUAL_FILE108();
        if (shouldInvoke(time)) {
            return trailingEdge(time);
        }
        timerId = setTimeout(timerExpired, remainingWait(time));
    }
    function trailingEdge(time) {
        timerId = void 0;
        if (trailing && lastArgs) {
            return invokeFunc(time);
        }
        lastArgs = lastThis = void 0;
        return result1;
    }
    function cancel() {
        if (timerId !== void 0) {
            clearTimeout(timerId);
        }
        lastInvokeTime = 0;
        lastArgs = lastCallTime = lastThis = timerId = void 0;
    }
    function flush() {
        return timerId === void 0 ? result1 : trailingEdge(__VIRTUAL_FILE108());
    }
    function debounced() {
        var time = __VIRTUAL_FILE108(), isInvoking = shouldInvoke(time);
        lastArgs = arguments;
        lastThis = this;
        lastCallTime = time;
        if (isInvoking) {
            if (timerId === void 0) {
                return leadingEdge(lastCallTime);
            }
            if (maxing) {
                clearTimeout(timerId);
                timerId = setTimeout(timerExpired, wait);
                return invokeFunc(lastCallTime);
            }
        }
        if (timerId === void 0) {
            timerId = setTimeout(timerExpired, wait);
        }
        return result1;
    }
    debounced.cancel = cancel;
    debounced.flush = flush;
    return debounced;
}
var __VIRTUAL_FILE113 = debounce;
var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
function setCacheAdd(value) {
    this.__data__.set(value, HASH_UNDEFINED2);
    return this;
}
var __VIRTUAL_FILE114 = setCacheAdd;
function setCacheHas(value) {
    return this.__data__.has(value);
}
var __VIRTUAL_FILE115 = setCacheHas;
function SetCache(values) {
    var index = -1, length = values == null ? 0 : values.length;
    this.__data__ = new __VIRTUAL_FILE41();
    while(++index < length){
        this.add(values[index]);
    }
}
SetCache.prototype.add = SetCache.prototype.push = __VIRTUAL_FILE114;
SetCache.prototype.has = __VIRTUAL_FILE115;
var __VIRTUAL_FILE116 = SetCache;
function baseFindIndex(array, predicate, fromIndex, fromRight) {
    var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
    while(fromRight ? index-- : ++index < length){
        if (predicate(array[index], index, array)) {
            return index;
        }
    }
    return -1;
}
var __VIRTUAL_FILE117 = baseFindIndex;
function baseIsNaN(value) {
    return value !== value;
}
var __VIRTUAL_FILE118 = baseIsNaN;
function strictIndexOf(array, value, fromIndex) {
    var index = fromIndex - 1, length = array.length;
    while(++index < length){
        if (array[index] === value) {
            return index;
        }
    }
    return -1;
}
var __VIRTUAL_FILE119 = strictIndexOf;
function baseIndexOf(array, value, fromIndex) {
    return value === value ? __VIRTUAL_FILE119(array, value, fromIndex) : __VIRTUAL_FILE117(array, __VIRTUAL_FILE118, fromIndex);
}
var __VIRTUAL_FILE120 = baseIndexOf;
function arrayIncludes(array, value) {
    var length = array == null ? 0 : array.length;
    return !!length && __VIRTUAL_FILE120(array, value, 0) > -1;
}
var __VIRTUAL_FILE121 = arrayIncludes;
function arrayIncludesWith(array, value, comparator) {
    var index = -1, length = array == null ? 0 : array.length;
    while(++index < length){
        if (comparator(value, array[index])) {
            return true;
        }
    }
    return false;
}
var __VIRTUAL_FILE122 = arrayIncludesWith;
function arrayMap(array, iteratee) {
    var index = -1, length = array == null ? 0 : array.length, result1 = Array(length);
    while(++index < length){
        result1[index] = iteratee(array[index], index, array);
    }
    return result1;
}
var __VIRTUAL_FILE123 = arrayMap;
function cacheHas(cache, key) {
    return cache.has(key);
}
var __VIRTUAL_FILE124 = cacheHas;
var LARGE_ARRAY_SIZE1 = 200;
function baseDifference(array, values, iteratee, comparator) {
    var index = -1, includes = __VIRTUAL_FILE121, isCommon = true, length = array.length, result1 = [], valuesLength = values.length;
    if (!length) {
        return result1;
    }
    if (iteratee) {
        values = __VIRTUAL_FILE123(values, __VIRTUAL_FILE59(iteratee));
    }
    if (comparator) {
        includes = __VIRTUAL_FILE122;
        isCommon = false;
    } else if (values.length >= LARGE_ARRAY_SIZE1) {
        includes = __VIRTUAL_FILE124;
        isCommon = false;
        values = new __VIRTUAL_FILE116(values);
    }
    outer: while(++index < length){
        var value = array[index], computed = iteratee == null ? value : iteratee(value);
        value = comparator || value !== 0 ? value : 0;
        if (isCommon && computed === computed) {
            var valuesIndex = valuesLength;
            while(valuesIndex--){
                if (values[valuesIndex] === computed) {
                    continue outer;
                }
            }
            result1.push(value);
        } else if (!includes(values, computed, comparator)) {
            result1.push(value);
        }
    }
    return result1;
}
var __VIRTUAL_FILE125 = baseDifference;
var spreadableSymbol = __VIRTUAL_FILE14 ? __VIRTUAL_FILE14.isConcatSpreadable : void 0;
function isFlattenable(value) {
    return __VIRTUAL_FILE53(value) || __VIRTUAL_FILE52(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
var __VIRTUAL_FILE126 = isFlattenable;
function baseFlatten(array, depth, predicate, isStrict, result1) {
    var index = -1, length = array.length;
    predicate || (predicate = __VIRTUAL_FILE126);
    result1 || (result1 = []);
    while(++index < length){
        var value = array[index];
        if (depth > 0 && predicate(value)) {
            if (depth > 1) {
                baseFlatten(value, depth - 1, predicate, isStrict, result1);
            } else {
                __VIRTUAL_FILE80(result1, value);
            }
        } else if (!isStrict) {
            result1[result1.length] = value;
        }
    }
    return result1;
}
var __VIRTUAL_FILE127 = baseFlatten;
function identity(value) {
    return value;
}
var __VIRTUAL_FILE128 = identity;
function apply(func, thisArg, args) {
    switch(args.length){
        case 0:
            return func.call(thisArg);
        case 1:
            return func.call(thisArg, args[0]);
        case 2:
            return func.call(thisArg, args[0], args[1]);
        case 3:
            return func.call(thisArg, args[0], args[1], args[2]);
    }
    return func.apply(thisArg, args);
}
var __VIRTUAL_FILE129 = apply;
var nativeMax1 = Math.max;
function overRest(func, start, transform) {
    start = nativeMax1(start === void 0 ? func.length - 1 : start, 0);
    return function() {
        var args = arguments, index = -1, length = nativeMax1(args.length - start, 0), array = Array(length);
        while(++index < length){
            array[index] = args[start + index];
        }
        index = -1;
        var otherArgs = Array(start + 1);
        while(++index < start){
            otherArgs[index] = args[index];
        }
        otherArgs[start] = transform(array);
        return __VIRTUAL_FILE129(func, this, otherArgs);
    };
}
var __VIRTUAL_FILE130 = overRest;
function constant(value) {
    return function() {
        return value;
    };
}
var __VIRTUAL_FILE131 = constant;
var baseSetToString = !__VIRTUAL_FILE45 ? __VIRTUAL_FILE128 : function(func, string) {
    return __VIRTUAL_FILE45(func, "toString", {
        configurable: true,
        enumerable: false,
        value: __VIRTUAL_FILE131(string),
        writable: true
    });
};
var __VIRTUAL_FILE132 = baseSetToString;
var HOT_COUNT = 800, HOT_SPAN = 16;
var nativeNow = Date.now;
function shortOut(func) {
    var count = 0, lastCalled = 0;
    return function() {
        var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
        lastCalled = stamp;
        if (remaining > 0) {
            if (++count >= HOT_COUNT) {
                return arguments[0];
            }
        } else {
            count = 0;
        }
        return func.apply(void 0, arguments);
    };
}
var __VIRTUAL_FILE133 = shortOut;
var setToString = __VIRTUAL_FILE133(__VIRTUAL_FILE132);
var __VIRTUAL_FILE134 = setToString;
function baseRest(func, start) {
    return __VIRTUAL_FILE134(__VIRTUAL_FILE130(func, start, __VIRTUAL_FILE128), func + "");
}
var __VIRTUAL_FILE135 = baseRest;
function isArrayLikeObject(value) {
    return __VIRTUAL_FILE50(value) && __VIRTUAL_FILE67(value);
}
var __VIRTUAL_FILE136 = isArrayLikeObject;
var difference = __VIRTUAL_FILE135(function(array, values) {
    return __VIRTUAL_FILE136(array) ? __VIRTUAL_FILE125(array, __VIRTUAL_FILE127(values, 1, __VIRTUAL_FILE136, true)) : [];
});
var __VIRTUAL_FILE137 = difference;
function createBaseFor(fromRight) {
    return function(object, iteratee, keysFunc) {
        var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
        while(length--){
            var key = props[fromRight ? length : ++index];
            if (iteratee(iterable[key], key, iterable) === false) {
                break;
            }
        }
        return object;
    };
}
var __VIRTUAL_FILE138 = createBaseFor;
var baseFor = __VIRTUAL_FILE138();
var __VIRTUAL_FILE139 = baseFor;
function baseForOwn(object, iteratee) {
    return object && __VIRTUAL_FILE139(object, iteratee, __VIRTUAL_FILE68);
}
var __VIRTUAL_FILE140 = baseForOwn;
function createBaseEach(eachFunc, fromRight) {
    return function(collection, iteratee) {
        if (collection == null) {
            return collection;
        }
        if (!__VIRTUAL_FILE67(collection)) {
            return eachFunc(collection, iteratee);
        }
        var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
        while(fromRight ? index-- : ++index < length){
            if (iteratee(iterable[index], index, iterable) === false) {
                break;
            }
        }
        return collection;
    };
}
var __VIRTUAL_FILE141 = createBaseEach;
var baseEach = __VIRTUAL_FILE141(__VIRTUAL_FILE140);
var __VIRTUAL_FILE142 = baseEach;
function castFunction(value) {
    return typeof value == "function" ? value : __VIRTUAL_FILE128;
}
var __VIRTUAL_FILE143 = castFunction;
function forEach(collection, iteratee) {
    var func = __VIRTUAL_FILE53(collection) ? __VIRTUAL_FILE44 : __VIRTUAL_FILE142;
    return func(collection, __VIRTUAL_FILE143(iteratee));
}
var __VIRTUAL_FILE144 = forEach;
var __VIRTUAL_FILE145 = __VIRTUAL_FILE144;
function assignMergeValue(object, key, value) {
    if (value !== void 0 && !__VIRTUAL_FILE1(object[key], value) || value === void 0 && !(key in object)) {
        __VIRTUAL_FILE46(object, key, value);
    }
}
var __VIRTUAL_FILE146 = assignMergeValue;
var objectTag3 = "[object Object]";
var funcProto2 = Function.prototype, objectProto13 = Object.prototype;
var funcToString2 = funcProto2.toString;
var hasOwnProperty10 = objectProto13.hasOwnProperty;
var objectCtorString = funcToString2.call(Object);
function isPlainObject(value) {
    if (!__VIRTUAL_FILE50(value) || __VIRTUAL_FILE17(value) != objectTag3) {
        return false;
    }
    var proto = __VIRTUAL_FILE81(value);
    if (proto === null) {
        return true;
    }
    var Ctor = hasOwnProperty10.call(proto, "constructor") && proto.constructor;
    return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString2.call(Ctor) == objectCtorString;
}
var __VIRTUAL_FILE147 = isPlainObject;
function safeGet(object, key) {
    if (key === "constructor" && typeof object[key] === "function") {
        return;
    }
    if (key == "__proto__") {
        return;
    }
    return object[key];
}
var __VIRTUAL_FILE148 = safeGet;
function toPlainObject(value) {
    return __VIRTUAL_FILE48(value, __VIRTUAL_FILE72(value));
}
var __VIRTUAL_FILE149 = toPlainObject;
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
    var objValue = __VIRTUAL_FILE148(object, key), srcValue = __VIRTUAL_FILE148(source, key), stacked = stack.get(srcValue);
    if (stacked) {
        __VIRTUAL_FILE146(object, key, stacked);
        return;
    }
    var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
    var isCommon = newValue === void 0;
    if (isCommon) {
        var isArr = __VIRTUAL_FILE53(srcValue), isBuff = !isArr && __VIRTUAL_FILE55(srcValue), isTyped = !isArr && !isBuff && __VIRTUAL_FILE61(srcValue);
        newValue = srcValue;
        if (isArr || isBuff || isTyped) {
            if (__VIRTUAL_FILE53(objValue)) {
                newValue = objValue;
            } else if (__VIRTUAL_FILE136(objValue)) {
                newValue = __VIRTUAL_FILE75(objValue);
            } else if (isBuff) {
                isCommon = false;
                newValue = __VIRTUAL_FILE74(srcValue, true);
            } else if (isTyped) {
                isCommon = false;
                newValue = __VIRTUAL_FILE98(srcValue, true);
            } else {
                newValue = [];
            }
        } else if (__VIRTUAL_FILE147(srcValue) || __VIRTUAL_FILE52(srcValue)) {
            newValue = objValue;
            if (__VIRTUAL_FILE52(objValue)) {
                newValue = __VIRTUAL_FILE149(objValue);
            } else if (!__VIRTUAL_FILE18(objValue) || __VIRTUAL_FILE19(objValue)) {
                newValue = __VIRTUAL_FILE101(srcValue);
            }
        } else {
            isCommon = false;
        }
    }
    if (isCommon) {
        stack.set(srcValue, newValue);
        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
        stack["delete"](srcValue);
    }
    __VIRTUAL_FILE146(object, key, newValue);
}
var __VIRTUAL_FILE150 = baseMergeDeep;
function baseMerge(object, source, srcIndex, customizer, stack) {
    if (object === source) {
        return;
    }
    __VIRTUAL_FILE139(source, function(srcValue, key) {
        stack || (stack = new __VIRTUAL_FILE43());
        if (__VIRTUAL_FILE18(srcValue)) {
            __VIRTUAL_FILE150(object, source, key, srcIndex, baseMerge, customizer, stack);
        } else {
            var newValue = customizer ? customizer(__VIRTUAL_FILE148(object, key), srcValue, key + "", object, source, stack) : void 0;
            if (newValue === void 0) {
                newValue = srcValue;
            }
            __VIRTUAL_FILE146(object, key, newValue);
        }
    }, __VIRTUAL_FILE72);
}
var __VIRTUAL_FILE151 = baseMerge;
function isIterateeCall(value, index, object) {
    if (!__VIRTUAL_FILE18(object)) {
        return false;
    }
    var type = typeof index;
    if (type == "number" ? __VIRTUAL_FILE67(object) && __VIRTUAL_FILE56(index, object.length) : type == "string" && index in object) {
        return __VIRTUAL_FILE1(object[index], value);
    }
    return false;
}
var __VIRTUAL_FILE152 = isIterateeCall;
function createAssigner(assigner) {
    return __VIRTUAL_FILE135(function(object, sources) {
        var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
        customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
        if (guard && __VIRTUAL_FILE152(sources[0], sources[1], guard)) {
            customizer = length < 3 ? void 0 : customizer;
            length = 1;
        }
        object = Object(object);
        while(++index < length){
            var source = sources[index];
            if (source) {
                assigner(object, source, index, customizer);
            }
        }
        return object;
    });
}
var __VIRTUAL_FILE153 = createAssigner;
var mergeWith = __VIRTUAL_FILE153(function(object, source, srcIndex, customizer) {
    __VIRTUAL_FILE151(object, source, srcIndex, customizer);
});
var __VIRTUAL_FILE154 = mergeWith;
var nativeFloor = Math.floor, nativeRandom = Math.random;
function baseRandom(lower, upper) {
    return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
var __VIRTUAL_FILE155 = baseRandom;
function shuffleSelf(array, size) {
    var index = -1, length = array.length, lastIndex = length - 1;
    size = size === void 0 ? length : size;
    while(++index < size){
        var rand = __VIRTUAL_FILE155(index, lastIndex), value = array[rand];
        array[rand] = array[index];
        array[index] = value;
    }
    array.length = size;
    return array;
}
var __VIRTUAL_FILE156 = shuffleSelf;
function arrayShuffle(array) {
    return __VIRTUAL_FILE156(__VIRTUAL_FILE75(array));
}
var __VIRTUAL_FILE157 = arrayShuffle;
function baseValues(object, props) {
    return __VIRTUAL_FILE123(props, function(key) {
        return object[key];
    });
}
var __VIRTUAL_FILE158 = baseValues;
function values(object) {
    return object == null ? [] : __VIRTUAL_FILE158(object, __VIRTUAL_FILE68(object));
}
var __VIRTUAL_FILE159 = values;
function baseShuffle(collection) {
    return __VIRTUAL_FILE156(__VIRTUAL_FILE159(collection));
}
var __VIRTUAL_FILE160 = baseShuffle;
function shuffle(collection) {
    var func = __VIRTUAL_FILE53(collection) ? __VIRTUAL_FILE157 : __VIRTUAL_FILE160;
    return func(collection);
}
var __VIRTUAL_FILE161 = shuffle;
var assignInWith = __VIRTUAL_FILE153(function(object, source, srcIndex, customizer) {
    __VIRTUAL_FILE48(source, __VIRTUAL_FILE72(source), object, customizer);
});
var __VIRTUAL_FILE162 = assignInWith;
var domExcTag = "[object DOMException]", errorTag2 = "[object Error]";
function isError(value) {
    if (!__VIRTUAL_FILE50(value)) {
        return false;
    }
    var tag = __VIRTUAL_FILE17(value);
    return tag == errorTag2 || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !__VIRTUAL_FILE147(value);
}
var __VIRTUAL_FILE163 = isError;
var attempt = __VIRTUAL_FILE135(function(func, args) {
    try {
        return __VIRTUAL_FILE129(func, void 0, args);
    } catch (e) {
        return __VIRTUAL_FILE163(e) ? e : new Error(e);
    }
});
var __VIRTUAL_FILE164 = attempt;
var objectProto14 = Object.prototype;
var hasOwnProperty11 = objectProto14.hasOwnProperty;
function customDefaultsAssignIn(objValue, srcValue, key, object) {
    if (objValue === void 0 || __VIRTUAL_FILE1(objValue, objectProto14[key]) && !hasOwnProperty11.call(object, key)) {
        return srcValue;
    }
    return objValue;
}
var __VIRTUAL_FILE165 = customDefaultsAssignIn;
var stringEscapes = {
    "\\": "\\",
    "'": "'",
    "\n": "n",
    "\r": "r",
    "\u2028": "u2028",
    "\u2029": "u2029"
};
function escapeStringChar(chr) {
    return "\\" + stringEscapes[chr];
}
var __VIRTUAL_FILE166 = escapeStringChar;
var reInterpolate = /<%=([\s\S]+?)%>/g;
var __VIRTUAL_FILE167 = reInterpolate;
function basePropertyOf(object) {
    return function(key) {
        return object == null ? void 0 : object[key];
    };
}
var __VIRTUAL_FILE168 = basePropertyOf;
var htmlEscapes = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "'": "&#39;"
};
var escapeHtmlChar = __VIRTUAL_FILE168(htmlEscapes);
var __VIRTUAL_FILE169 = escapeHtmlChar;
var INFINITY = 1 / 0;
var symbolProto1 = __VIRTUAL_FILE14 ? __VIRTUAL_FILE14.prototype : void 0, symbolToString = symbolProto1 ? symbolProto1.toString : void 0;
function baseToString(value) {
    if (typeof value == "string") {
        return value;
    }
    if (__VIRTUAL_FILE53(value)) {
        return __VIRTUAL_FILE123(value, baseToString) + "";
    }
    if (__VIRTUAL_FILE111(value)) {
        return symbolToString ? symbolToString.call(value) : "";
    }
    var result1 = value + "";
    return result1 == "0" && 1 / value == -INFINITY ? "-0" : result1;
}
var __VIRTUAL_FILE170 = baseToString;
function toString(value) {
    return value == null ? "" : __VIRTUAL_FILE170(value);
}
var __VIRTUAL_FILE171 = toString;
var reUnescapedHtml = /[&<>"']/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
function escape(string) {
    string = __VIRTUAL_FILE171(string);
    return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, __VIRTUAL_FILE169) : string;
}
var __VIRTUAL_FILE172 = escape;
var reEscape = /<%-([\s\S]+?)%>/g;
var __VIRTUAL_FILE173 = reEscape;
var reEvaluate = /<%([\s\S]+?)%>/g;
var __VIRTUAL_FILE174 = reEvaluate;
var templateSettings = {
    escape: __VIRTUAL_FILE173,
    evaluate: __VIRTUAL_FILE174,
    interpolate: __VIRTUAL_FILE167,
    variable: "",
    imports: {
        _: {
            escape: __VIRTUAL_FILE172
        }
    }
};
var __VIRTUAL_FILE175 = templateSettings;
var INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
var reNoMatch = /($^)/;
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
var objectProto15 = Object.prototype;
var hasOwnProperty12 = objectProto15.hasOwnProperty;
function template(string, options, guard) {
    var settings = __VIRTUAL_FILE175.imports._.templateSettings || __VIRTUAL_FILE175;
    if (guard && __VIRTUAL_FILE152(string, options, guard)) {
        options = void 0;
    }
    string = __VIRTUAL_FILE171(string);
    options = __VIRTUAL_FILE162({}, options, settings, __VIRTUAL_FILE165);
    var imports = __VIRTUAL_FILE162({}, options.imports, settings.imports, __VIRTUAL_FILE165), importsKeys = __VIRTUAL_FILE68(imports), importsValues = __VIRTUAL_FILE158(imports, importsKeys);
    var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
    var reDelimiters = RegExp((options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === __VIRTUAL_FILE167 ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", "g");
    var sourceURL = hasOwnProperty12.call(options, "sourceURL") ? "//# sourceURL=" + (options.sourceURL + "").replace(/\s/g, " ") + "\n" : "";
    string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
        interpolateValue || (interpolateValue = esTemplateValue);
        source += string.slice(index, offset).replace(reUnescapedString, __VIRTUAL_FILE166);
        if (escapeValue) {
            isEscaping = true;
            source += "' +\n__e(" + escapeValue + ") +\n'";
        }
        if (evaluateValue) {
            isEvaluating = true;
            source += "';\n" + evaluateValue + ";\n__p += '";
        }
        if (interpolateValue) {
            source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
        }
        index = offset + match.length;
        return match;
    });
    source += "';\n";
    var variable = hasOwnProperty12.call(options, "variable") && options.variable;
    if (!variable) {
        source = "with (obj) {\n" + source + "\n}\n";
    } else if (reForbiddenIdentifierChars.test(variable)) {
        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
    }
    source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
    source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
    var result1 = __VIRTUAL_FILE164(function() {
        return Function(importsKeys, sourceURL + "return " + source).apply(void 0, importsValues);
    });
    result1.source = source;
    if (__VIRTUAL_FILE163(result1)) {
        throw result1;
    }
    return result1;
}
var __VIRTUAL_FILE176 = template;
function noop() {}
var __VIRTUAL_FILE177 = noop;
function setToArray(set) {
    var index = -1, result1 = Array(set.size);
    set.forEach(function(value) {
        result1[++index] = value;
    });
    return result1;
}
var __VIRTUAL_FILE178 = setToArray;
var INFINITY1 = 1 / 0;
var createSet = !(__VIRTUAL_FILE89 && 1 / __VIRTUAL_FILE178(new __VIRTUAL_FILE89([
    ,
    -0
]))[1] == INFINITY1) ? __VIRTUAL_FILE177 : function(values) {
    return new __VIRTUAL_FILE89(values);
};
var __VIRTUAL_FILE179 = createSet;
var LARGE_ARRAY_SIZE2 = 200;
function baseUniq(array, iteratee, comparator) {
    var index = -1, includes = __VIRTUAL_FILE121, length = array.length, isCommon = true, result1 = [], seen = result1;
    if (comparator) {
        isCommon = false;
        includes = __VIRTUAL_FILE122;
    } else if (length >= LARGE_ARRAY_SIZE2) {
        var set = iteratee ? null : __VIRTUAL_FILE179(array);
        if (set) {
            return __VIRTUAL_FILE178(set);
        }
        isCommon = false;
        includes = __VIRTUAL_FILE124;
        seen = new __VIRTUAL_FILE116();
    } else {
        seen = iteratee ? [] : result1;
    }
    outer: while(++index < length){
        var value = array[index], computed = iteratee ? iteratee(value) : value;
        value = comparator || value !== 0 ? value : 0;
        if (isCommon && computed === computed) {
            var seenIndex = seen.length;
            while(seenIndex--){
                if (seen[seenIndex] === computed) {
                    continue outer;
                }
            }
            if (iteratee) {
                seen.push(computed);
            }
            result1.push(value);
        } else if (!includes(seen, computed, comparator)) {
            if (seen !== result1) {
                seen.push(computed);
            }
            result1.push(value);
        }
    }
    return result1;
}
var __VIRTUAL_FILE180 = baseUniq;
function uniq(array) {
    return array && array.length ? __VIRTUAL_FILE180(array) : [];
}
var __VIRTUAL_FILE181 = uniq;
function arraySome(array, predicate) {
    var index = -1, length = array == null ? 0 : array.length;
    while(++index < length){
        if (predicate(array[index], index, array)) {
            return true;
        }
    }
    return false;
}
var __VIRTUAL_FILE182 = arraySome;
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
    var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
    if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
        return false;
    }
    var arrStacked = stack.get(array);
    var othStacked = stack.get(other);
    if (arrStacked && othStacked) {
        return arrStacked == other && othStacked == array;
    }
    var index = -1, result1 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new __VIRTUAL_FILE116() : void 0;
    stack.set(array, other);
    stack.set(other, array);
    while(++index < arrLength){
        var arrValue = array[index], othValue = other[index];
        if (customizer) {
            var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
        }
        if (compared !== void 0) {
            if (compared) {
                continue;
            }
            result1 = false;
            break;
        }
        if (seen) {
            if (!__VIRTUAL_FILE182(other, function(othValue2, othIndex) {
                if (!__VIRTUAL_FILE124(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
                    return seen.push(othIndex);
                }
            })) {
                result1 = false;
                break;
            }
        } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
            result1 = false;
            break;
        }
    }
    stack["delete"](array);
    stack["delete"](other);
    return result1;
}
var __VIRTUAL_FILE183 = equalArrays;
function mapToArray(map) {
    var index = -1, result1 = Array(map.size);
    map.forEach(function(value, key) {
        result1[++index] = [
            key,
            value
        ];
    });
    return result1;
}
var __VIRTUAL_FILE184 = mapToArray;
var COMPARE_PARTIAL_FLAG1 = 1, COMPARE_UNORDERED_FLAG1 = 2;
var boolTag3 = "[object Boolean]", dateTag3 = "[object Date]", errorTag3 = "[object Error]", mapTag5 = "[object Map]", numberTag3 = "[object Number]", regexpTag3 = "[object RegExp]", setTag5 = "[object Set]", stringTag3 = "[object String]", symbolTag3 = "[object Symbol]";
var arrayBufferTag3 = "[object ArrayBuffer]", dataViewTag4 = "[object DataView]";
var symbolProto2 = __VIRTUAL_FILE14 ? __VIRTUAL_FILE14.prototype : void 0, symbolValueOf1 = symbolProto2 ? symbolProto2.valueOf : void 0;
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
    switch(tag){
        case dataViewTag4:
            if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
                return false;
            }
            object = object.buffer;
            other = other.buffer;
        case arrayBufferTag3:
            if (object.byteLength != other.byteLength || !equalFunc(new __VIRTUAL_FILE93(object), new __VIRTUAL_FILE93(other))) {
                return false;
            }
            return true;
        case boolTag3:
        case dateTag3:
        case numberTag3:
            return __VIRTUAL_FILE1(+object, +other);
        case errorTag3:
            return object.name == other.name && object.message == other.message;
        case regexpTag3:
        case stringTag3:
            return object == other + "";
        case mapTag5:
            var convert = __VIRTUAL_FILE184;
        case setTag5:
            var isPartial = bitmask & COMPARE_PARTIAL_FLAG1;
            convert || (convert = __VIRTUAL_FILE178);
            if (object.size != other.size && !isPartial) {
                return false;
            }
            var stacked = stack.get(object);
            if (stacked) {
                return stacked == other;
            }
            bitmask |= COMPARE_UNORDERED_FLAG1;
            stack.set(object, other);
            var result1 = __VIRTUAL_FILE183(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
            stack["delete"](object);
            return result1;
        case symbolTag3:
            if (symbolValueOf1) {
                return symbolValueOf1.call(object) == symbolValueOf1.call(other);
            }
    }
    return false;
}
var __VIRTUAL_FILE185 = equalByTag;
var COMPARE_PARTIAL_FLAG2 = 1;
var objectProto16 = Object.prototype;
var hasOwnProperty13 = objectProto16.hasOwnProperty;
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
    var isPartial = bitmask & COMPARE_PARTIAL_FLAG2, objProps = __VIRTUAL_FILE85(object), objLength = objProps.length, othProps = __VIRTUAL_FILE85(other), othLength = othProps.length;
    if (objLength != othLength && !isPartial) {
        return false;
    }
    var index = objLength;
    while(index--){
        var key = objProps[index];
        if (!(isPartial ? key in other : hasOwnProperty13.call(other, key))) {
            return false;
        }
    }
    var objStacked = stack.get(object);
    var othStacked = stack.get(other);
    if (objStacked && othStacked) {
        return objStacked == other && othStacked == object;
    }
    var result1 = true;
    stack.set(object, other);
    stack.set(other, object);
    var skipCtor = isPartial;
    while(++index < objLength){
        key = objProps[index];
        var objValue = object[key], othValue = other[key];
        if (customizer) {
            var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
        }
        if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
            result1 = false;
            break;
        }
        skipCtor || (skipCtor = key == "constructor");
    }
    if (result1 && !skipCtor) {
        var objCtor = object.constructor, othCtor = other.constructor;
        if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
            result1 = false;
        }
    }
    stack["delete"](object);
    stack["delete"](other);
    return result1;
}
var __VIRTUAL_FILE186 = equalObjects;
var COMPARE_PARTIAL_FLAG3 = 1;
var argsTag3 = "[object Arguments]", arrayTag2 = "[object Array]", objectTag4 = "[object Object]";
var objectProto17 = Object.prototype;
var hasOwnProperty14 = objectProto17.hasOwnProperty;
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
    var objIsArr = __VIRTUAL_FILE53(object), othIsArr = __VIRTUAL_FILE53(other), objTag = objIsArr ? arrayTag2 : __VIRTUAL_FILE91(object), othTag = othIsArr ? arrayTag2 : __VIRTUAL_FILE91(other);
    objTag = objTag == argsTag3 ? objectTag4 : objTag;
    othTag = othTag == argsTag3 ? objectTag4 : othTag;
    var objIsObj = objTag == objectTag4, othIsObj = othTag == objectTag4, isSameTag = objTag == othTag;
    if (isSameTag && __VIRTUAL_FILE55(object)) {
        if (!__VIRTUAL_FILE55(other)) {
            return false;
        }
        objIsArr = true;
        objIsObj = false;
    }
    if (isSameTag && !objIsObj) {
        stack || (stack = new __VIRTUAL_FILE43());
        return objIsArr || __VIRTUAL_FILE61(object) ? __VIRTUAL_FILE183(object, other, bitmask, customizer, equalFunc, stack) : __VIRTUAL_FILE185(object, other, objTag, bitmask, customizer, equalFunc, stack);
    }
    if (!(bitmask & COMPARE_PARTIAL_FLAG3)) {
        var objIsWrapped = objIsObj && hasOwnProperty14.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty14.call(other, "__wrapped__");
        if (objIsWrapped || othIsWrapped) {
            var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
            stack || (stack = new __VIRTUAL_FILE43());
            return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
        }
    }
    if (!isSameTag) {
        return false;
    }
    stack || (stack = new __VIRTUAL_FILE43());
    return __VIRTUAL_FILE186(object, other, bitmask, customizer, equalFunc, stack);
}
var __VIRTUAL_FILE187 = baseIsEqualDeep;
function baseIsEqual(value, other, bitmask, customizer, stack) {
    if (value === other) {
        return true;
    }
    if (value == null || other == null || !__VIRTUAL_FILE50(value) && !__VIRTUAL_FILE50(other)) {
        return value !== value && other !== other;
    }
    return __VIRTUAL_FILE187(value, other, bitmask, customizer, baseIsEqual, stack);
}
var __VIRTUAL_FILE188 = baseIsEqual;
var COMPARE_PARTIAL_FLAG4 = 1, COMPARE_UNORDERED_FLAG2 = 2;
function baseIsMatch(object, source, matchData, customizer) {
    var index = matchData.length, length = index, noCustomizer = !customizer;
    if (object == null) {
        return !length;
    }
    object = Object(object);
    while(index--){
        var data = matchData[index];
        if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
            return false;
        }
    }
    while(++index < length){
        data = matchData[index];
        var key = data[0], objValue = object[key], srcValue = data[1];
        if (noCustomizer && data[2]) {
            if (objValue === void 0 && !(key in object)) {
                return false;
            }
        } else {
            var stack = new __VIRTUAL_FILE43();
            if (customizer) {
                var result1 = customizer(objValue, srcValue, key, object, source, stack);
            }
            if (!(result1 === void 0 ? __VIRTUAL_FILE188(srcValue, objValue, COMPARE_PARTIAL_FLAG4 | COMPARE_UNORDERED_FLAG2, customizer, stack) : result1)) {
                return false;
            }
        }
    }
    return true;
}
var __VIRTUAL_FILE189 = baseIsMatch;
function isStrictComparable(value) {
    return value === value && !__VIRTUAL_FILE18(value);
}
var __VIRTUAL_FILE190 = isStrictComparable;
function getMatchData(object) {
    var result1 = __VIRTUAL_FILE68(object), length = result1.length;
    while(length--){
        var key = result1[length], value = object[key];
        result1[length] = [
            key,
            value,
            __VIRTUAL_FILE190(value)
        ];
    }
    return result1;
}
var __VIRTUAL_FILE191 = getMatchData;
function matchesStrictComparable(key, srcValue) {
    return function(object) {
        if (object == null) {
            return false;
        }
        return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
    };
}
var __VIRTUAL_FILE192 = matchesStrictComparable;
function baseMatches(source) {
    var matchData = __VIRTUAL_FILE191(source);
    if (matchData.length == 1 && matchData[0][2]) {
        return __VIRTUAL_FILE192(matchData[0][0], matchData[0][1]);
    }
    return function(object) {
        return object === source || __VIRTUAL_FILE189(object, source, matchData);
    };
}
var __VIRTUAL_FILE193 = baseMatches;
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
function isKey(value, object) {
    if (__VIRTUAL_FILE53(value)) {
        return false;
    }
    var type = typeof value;
    if (type == "number" || type == "symbol" || type == "boolean" || value == null || __VIRTUAL_FILE111(value)) {
        return true;
    }
    return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
var __VIRTUAL_FILE194 = isKey;
var FUNC_ERROR_TEXT1 = "Expected a function";
function memoize1(func, resolver) {
    if (typeof func != "function" || resolver != null && typeof resolver != "function") {
        throw new TypeError(FUNC_ERROR_TEXT1);
    }
    var memoized = function() {
        var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
        if (cache.has(key)) {
            return cache.get(key);
        }
        var result1 = func.apply(this, args);
        memoized.cache = cache.set(key, result1) || cache;
        return result1;
    };
    memoized.cache = new (memoize1.Cache || __VIRTUAL_FILE41)();
    return memoized;
}
memoize1.Cache = __VIRTUAL_FILE41;
var __VIRTUAL_FILE195 = memoize1;
var MAX_MEMOIZE_SIZE = 500;
function memoizeCapped(func) {
    var result1 = __VIRTUAL_FILE195(func, function(key) {
        if (cache.size === MAX_MEMOIZE_SIZE) {
            cache.clear();
        }
        return key;
    });
    var cache = result1.cache;
    return result1;
}
var __VIRTUAL_FILE196 = memoizeCapped;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reEscapeChar = /\\(\\)?/g;
var stringToPath = __VIRTUAL_FILE196(function(string) {
    var result1 = [];
    if (string.charCodeAt(0) === 46) {
        result1.push("");
    }
    string.replace(rePropName, function(match, number, quote, subString) {
        result1.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
    });
    return result1;
});
var __VIRTUAL_FILE197 = stringToPath;
function castPath(value, object) {
    if (__VIRTUAL_FILE53(value)) {
        return value;
    }
    return __VIRTUAL_FILE194(value, object) ? [
        value
    ] : __VIRTUAL_FILE197(__VIRTUAL_FILE171(value));
}
var __VIRTUAL_FILE198 = castPath;
var INFINITY2 = 1 / 0;
function toKey(value) {
    if (typeof value == "string" || __VIRTUAL_FILE111(value)) {
        return value;
    }
    var result1 = value + "";
    return result1 == "0" && 1 / value == -INFINITY2 ? "-0" : result1;
}
var __VIRTUAL_FILE199 = toKey;
function baseGet(object, path) {
    path = __VIRTUAL_FILE198(path, object);
    var index = 0, length = path.length;
    while(object != null && index < length){
        object = object[__VIRTUAL_FILE199(path[index++])];
    }
    return index && index == length ? object : void 0;
}
var __VIRTUAL_FILE200 = baseGet;
function get(object, path, defaultValue) {
    var result1 = object == null ? void 0 : __VIRTUAL_FILE200(object, path);
    return result1 === void 0 ? defaultValue : result1;
}
var __VIRTUAL_FILE201 = get;
function baseHasIn(object, key) {
    return object != null && key in Object(object);
}
var __VIRTUAL_FILE202 = baseHasIn;
function hasPath(object, path, hasFunc) {
    path = __VIRTUAL_FILE198(path, object);
    var index = -1, length = path.length, result1 = false;
    while(++index < length){
        var key = __VIRTUAL_FILE199(path[index]);
        if (!(result1 = object != null && hasFunc(object, key))) {
            break;
        }
        object = object[key];
    }
    if (result1 || ++index != length) {
        return result1;
    }
    length = object == null ? 0 : object.length;
    return !!length && __VIRTUAL_FILE57(length) && __VIRTUAL_FILE56(key, length) && (__VIRTUAL_FILE53(object) || __VIRTUAL_FILE52(object));
}
var __VIRTUAL_FILE203 = hasPath;
function hasIn(object, path) {
    return object != null && __VIRTUAL_FILE203(object, path, __VIRTUAL_FILE202);
}
var __VIRTUAL_FILE204 = hasIn;
var COMPARE_PARTIAL_FLAG5 = 1, COMPARE_UNORDERED_FLAG3 = 2;
function baseMatchesProperty(path, srcValue) {
    if (__VIRTUAL_FILE194(path) && __VIRTUAL_FILE190(srcValue)) {
        return __VIRTUAL_FILE192(__VIRTUAL_FILE199(path), srcValue);
    }
    return function(object) {
        var objValue = __VIRTUAL_FILE201(object, path);
        return objValue === void 0 && objValue === srcValue ? __VIRTUAL_FILE204(object, path) : __VIRTUAL_FILE188(srcValue, objValue, COMPARE_PARTIAL_FLAG5 | COMPARE_UNORDERED_FLAG3);
    };
}
var __VIRTUAL_FILE205 = baseMatchesProperty;
function baseProperty(key) {
    return function(object) {
        return object == null ? void 0 : object[key];
    };
}
var __VIRTUAL_FILE206 = baseProperty;
function basePropertyDeep(path) {
    return function(object) {
        return __VIRTUAL_FILE200(object, path);
    };
}
var __VIRTUAL_FILE207 = basePropertyDeep;
function property(path) {
    return __VIRTUAL_FILE194(path) ? __VIRTUAL_FILE206(__VIRTUAL_FILE199(path)) : __VIRTUAL_FILE207(path);
}
var __VIRTUAL_FILE208 = property;
function baseIteratee(value) {
    if (typeof value == "function") {
        return value;
    }
    if (value == null) {
        return __VIRTUAL_FILE128;
    }
    if (typeof value == "object") {
        return __VIRTUAL_FILE53(value) ? __VIRTUAL_FILE205(value[0], value[1]) : __VIRTUAL_FILE193(value);
    }
    return __VIRTUAL_FILE208(value);
}
var __VIRTUAL_FILE209 = baseIteratee;
function uniqBy(array, iteratee) {
    return array && array.length ? __VIRTUAL_FILE180(array, __VIRTUAL_FILE209(iteratee, 2)) : [];
}
var __VIRTUAL_FILE210 = uniqBy;
function isEqual(value, other) {
    return __VIRTUAL_FILE188(value, other);
}
var __VIRTUAL_FILE211 = isEqual;
function baseMap(collection, iteratee) {
    var index = -1, result1 = __VIRTUAL_FILE67(collection) ? Array(collection.length) : [];
    __VIRTUAL_FILE142(collection, function(value, key, collection2) {
        result1[++index] = iteratee(value, key, collection2);
    });
    return result1;
}
var __VIRTUAL_FILE212 = baseMap;
function baseSortBy(array, comparer) {
    var length = array.length;
    array.sort(comparer);
    while(length--){
        array[length] = array[length].value;
    }
    return array;
}
var __VIRTUAL_FILE213 = baseSortBy;
function compareAscending(value, other) {
    if (value !== other) {
        var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = __VIRTUAL_FILE111(value);
        var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = __VIRTUAL_FILE111(other);
        if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
            return 1;
        }
        if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
            return -1;
        }
    }
    return 0;
}
var __VIRTUAL_FILE214 = compareAscending;
function compareMultiple(object, other, orders) {
    var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
    while(++index < length){
        var result1 = __VIRTUAL_FILE214(objCriteria[index], othCriteria[index]);
        if (result1) {
            if (index >= ordersLength) {
                return result1;
            }
            var order = orders[index];
            return result1 * (order == "desc" ? -1 : 1);
        }
    }
    return object.index - other.index;
}
var __VIRTUAL_FILE215 = compareMultiple;
function baseOrderBy(collection, iteratees, orders) {
    if (iteratees.length) {
        iteratees = __VIRTUAL_FILE123(iteratees, function(iteratee) {
            if (__VIRTUAL_FILE53(iteratee)) {
                return function(value) {
                    return __VIRTUAL_FILE200(value, iteratee.length === 1 ? iteratee[0] : iteratee);
                };
            }
            return iteratee;
        });
    } else {
        iteratees = [
            __VIRTUAL_FILE128
        ];
    }
    var index = -1;
    iteratees = __VIRTUAL_FILE123(iteratees, __VIRTUAL_FILE59(__VIRTUAL_FILE209));
    var result1 = __VIRTUAL_FILE212(collection, function(value, key, collection2) {
        var criteria = __VIRTUAL_FILE123(iteratees, function(iteratee) {
            return iteratee(value);
        });
        return {
            criteria,
            index: ++index,
            value
        };
    });
    return __VIRTUAL_FILE213(result1, function(object, other) {
        return __VIRTUAL_FILE215(object, other, orders);
    });
}
var __VIRTUAL_FILE216 = baseOrderBy;
function orderBy(collection, iteratees, orders, guard) {
    if (collection == null) {
        return [];
    }
    if (!__VIRTUAL_FILE53(iteratees)) {
        iteratees = iteratees == null ? [] : [
            iteratees
        ];
    }
    orders = guard ? void 0 : orders;
    if (!__VIRTUAL_FILE53(orders)) {
        orders = orders == null ? [] : [
            orders
        ];
    }
    return __VIRTUAL_FILE216(collection, iteratees, orders);
}
var __VIRTUAL_FILE217 = orderBy;
const cloneDeep1 = __VIRTUAL_FILE107;
const debounce1 = __VIRTUAL_FILE113;
const shuffle1 = __VIRTUAL_FILE161;
const toString1 = __VIRTUAL_FILE171;
const uniq1 = __VIRTUAL_FILE181;
const uniqBy1 = __VIRTUAL_FILE210;
const escape1 = __VIRTUAL_FILE172;
function generate() {
    return crypto.randomUUID();
}
function mergeConfigs(config, ...configs) {
    config = cloneDeep1(config);
    configs = cloneDeep1(configs);
    return __VIRTUAL_FILE154(config, ...configs, mergeArrayCustomizer);
}
function mergeArrayCustomizer(objValue, srcValue) {
    if (__VIRTUAL_FILE53(objValue) || __VIRTUAL_FILE53(srcValue)) {
        if (!objValue) {
            return srcValue;
        } else if (!srcValue) {
            return objValue;
        } else {
            if (!__VIRTUAL_FILE53(objValue)) {
                objValue = [
                    objValue
                ];
            }
            if (!__VIRTUAL_FILE53(srcValue)) {
                srcValue = [
                    srcValue
                ];
            }
        }
        const combined = objValue.concat(srcValue);
        return __VIRTUAL_FILE210(combined, (value)=>{
            if (typeof value === "function") {
                return generate();
            } else {
                return JSON.stringify(value);
            }
        });
    }
}
function camelToKebab(camel) {
    const kebab = [];
    for(let i1 = 0; i1 < camel.length; i1++){
        const ch = camel.charAt(i1);
        if (ch === ch.toUpperCase() && !/^\d+/.test(ch)) {
            if (i1 > 0) {
                kebab.push("-");
            }
            kebab.push(ch.toLowerCase());
        } else {
            kebab.push(ch);
        }
    }
    return kebab.join("");
}
function kebabToCamel(kebab, leadingUppercase = false) {
    const camel = [];
    for(let i1 = 0; i1 < kebab.length; i1++){
        const ch = kebab.charAt(i1);
        if (ch === "-") {
            camel.push(kebab.charAt(++i1).toUpperCase());
        } else if (i1 === 0 && leadingUppercase) {
            camel.push(ch.toUpperCase());
        } else {
            camel.push(ch);
        }
    }
    return camel.join("");
}
const kMetadataFormat = "format";
const kRenderDefaults = "render";
const kExecuteDefaults = "execute";
const kPandocDefaults = "pandoc";
const kLanguageDefaults = "language";
const kPandocMetadata = "metadata";
const kFigWidth = "fig-width";
const kFigHeight = "fig-height";
const kFigFormat = "fig-format";
const kFigDpi = "fig-dpi";
const kMermaidFormat = "mermaid-format";
const kDfPrint = "df-print";
const kCache = "cache";
const kFreeze = "freeze";
const kEngine = "engine";
const kEval = "eval";
const kEcho = "echo";
const kOutput = "output";
const kWarning = "warning";
const kError = "error";
const kInclude = "include";
const kResources = "resources";
const kFormatResources = "format-resources";
const kKeepHidden = "keep-hidden";
const kExecuteEnabled = "enabled";
const kExecuteIpynb = "ipynb";
const kExecuteDaemon = "daemon";
const kExecuteDaemonRestart = "daemon-restart";
const kExecuteDebug = "debug";
const kIpynbFilter = "ipynb-filter";
const kIpynbFilters = "ipynb-filters";
const kIPynbTitleBlockTemplate = "ipynb-title-block";
const kShortcodes = "shortcodes";
const kKeepMd = "keep-md";
const kKeepTex = "keep-tex";
const kKeepIpynb = "keep-ipynb";
const kKeepSource = "keep-source";
const kVariant = "variant";
const kOutputExt = "output-ext";
const kOutputDivs = "output-divs";
const kPageWidth = "page-width";
const kFigAlign = "fig-align";
const kFigEnv = "fig-env";
const kFigPos = "fig-pos";
const kCodeFold = "code-fold";
const kCodeLineNumbers = "code-line-numbers";
const kCodeOverflow = "code-overflow";
const kCodeLink = "code-link";
const kCodeTools = "code-tools";
const kTblCap = "tbl-cap";
const kTblColwidths = "tbl-colwidths";
const kMergeIncludes = "merge-includes";
const kPreferHtml = "prefer-html";
const kSelfContainedMath = "self-contained-math";
const kLatexAutoMk = "latex-auto-mk";
const kLatexAutoInstall = "latex-auto-install";
const kLatexMinRuns = "latex-min-runs";
const kLatexMaxRuns = "latex-max-runs";
const kLatexClean = "latex-clean";
const kLatexInputPaths = "latex-input-paths";
const kLatexMakeIndex = "latex-makeindex";
const kLatexMakeIndexOpts = "latex-makeindex-opts";
const kLatexTinyTex = "latex-tinytex";
const kLatexTlmgrOpts = "latex-tlmgr-opts";
const kLatexOutputDir = "latex-output-dir";
const kLinkExternalIcon = "link-external-icon";
const kLinkExternalNewwindow = "link-external-newwindow";
const kLinkExternalFilter = "link-external-filter";
const kQuartoVersion = "quarto-version";
const kExecuteDefaultsKeys = [
    kFigWidth,
    kFigHeight,
    kFigFormat,
    kFigDpi,
    kMermaidFormat,
    kDfPrint,
    kError,
    kEval,
    kEngine,
    kCache,
    kFreeze,
    kEcho,
    kOutput,
    kWarning,
    kInclude,
    kKeepMd,
    kKeepIpynb,
    kExecuteEnabled,
    kExecuteIpynb,
    kExecuteDaemon,
    kExecuteDaemonRestart,
    kExecuteDebug,
    kIpynbFilter,
    kIpynbFilters, 
];
const kRenderDefaultsKeys = [
    kKeepTex,
    kKeepSource,
    kKeepHidden,
    kVariant,
    kOutputExt,
    kOutputDivs,
    kPreferHtml,
    kPageWidth,
    kFigAlign,
    kFigPos,
    kFigEnv,
    kCodeFold,
    kCodeLink,
    kCodeLineNumbers,
    kCodeOverflow,
    kCodeTools,
    kShortcodes,
    kTblColwidths,
    kSelfContainedMath,
    kLatexAutoMk,
    kLatexAutoInstall,
    kLatexMinRuns,
    kLatexMaxRuns,
    kLatexClean,
    kLatexInputPaths,
    kLatexMakeIndex,
    kLatexMakeIndexOpts,
    kLatexTlmgrOpts,
    kLatexOutputDir,
    kLatexTinyTex,
    kLinkExternalIcon,
    kLinkExternalNewwindow,
    kLinkExternalFilter,
    kFormatResources, 
];
const kTocTitleDocument = "toc-title-document";
const kTocTitleWebsite = "toc-title-website";
const kCalloutTipCaption = "callout-tip-caption";
const kCalloutNoteCaption = "callout-note-caption";
const kCalloutWarningCaption = "callout-warning-caption";
const kCalloutImportantCaption = "callout-important-caption";
const kCalloutCautionCaption = "callout-caution-caption";
const kSectionTitleAbstract = "section-title-abstract";
const kSectionTitleFootnotes = "section-title-footnotes";
const kSectionTitleReferences = "section-title-references";
const kSectionTitleAppendices = "section-title-appendices";
const kSectionTitleReuse = "section-title-reuse";
const kSectionTitleCitation = "section-title-citation";
const kAppendixAttributionBibTex = "appendix-attribution-bibtex";
const kAppendixAttributionCiteAs = "appendix-attribution-cite-as";
const kTitleBlockAuthorSingle = "title-block-author-single";
const kTitleBlockAuthorPlural = "title-block-author-plural";
const kTitleBlockAffiliationSingle = "title-block-affiliation-single";
const kTitleBlockAffiliationPlural = "title-block-affiliation-plural";
const kTitleBlockPublished = "title-block-published";
const kTitleBlockModified = "title-block-modified";
const kCodeSummary = "code-summary";
const kCodeToolsMenuCaption = "code-tools-menu-caption";
const kCodeToolsShowAllCode = "code-tools-show-all-code";
const kCodeToolsHideAllCode = "code-tools-hide-all-code";
const kCodeToolsViewSource = "code-tools-view-source";
const kCodeToolsSourceCode = "code-tools-source-code";
const kSearchNoResultsText = "search-no-results-text";
const kCopyButtonTooltip = "copy-button-tooltip";
const kCopyButtonTooltipSuccess = "copy-button-tooltip-success";
const kRepoActionLinksEdit = "repo-action-links-edit";
const kRepoActionLinksSource = "repo-action-links-source";
const kRepoActionLinksIssue = "repo-action-links-issue";
const kSearchMatchingDocumentsText = "search-matching-documents-text";
const kSearchCopyLinkTitle = "search-copy-link-title";
const kSearchHideMatchesText = "search-hide-matches-text";
const kSearchMoreMatchText = "search-more-match-text";
const kSearchMoreMatchesText = "search-more-matches-text";
const kSearchClearButtonTitle = "search-clear-button-title";
const kSearchDetatchedCancelButtonTitle = "search-detached-cancel-button-title";
const kSearchSubmitButtonTitle = "search-submit-button-title";
const kCrossrefFigTitle = "crossref-fig-title";
const kCrossrefTblTitle = "crossref-tbl-title";
const kCrossrefLstTitle = "crossref-lst-title";
const kCrossrefThmTitle = "crossref-thm-title";
const kCrossrefLemTitle = "crossref-lem-title";
const kCrossrefCorTitle = "crossref-cor-title";
const kCrossrefPrfTitle = "crossref-prp-title";
const kCrossrefCnjTitle = "crossref-cnj-title";
const kCrossrefDefTitle = "crossref-def-title";
const kCrossrefExmTitle = "crossref-exm-title";
const kCrossrefExrTitle = "crossref-exr-title";
const kCrossrefFigPrefix = "crossref-fig-prefix";
const kCrossrefTblPrefix = "crossref-tbl-prefix";
const kCrossrefLstPrefix = "crossref-lst-prefix";
const kCrossrefChPrefix = "crossref-ch-prefix";
const kCrossrefApxPrefix = "crossref-apx-prefix";
const kCrossrefSecPrefix = "crossref-sec-prefix";
const kCrossrefEqPrefix = "crossref-eq-prefix";
const kCrossrefThmPrefix = "crossref-thm-prefix";
const kCrossrefLemPrefix = "crossref-lem-prefix";
const kCrossrefCorPrefix = "crossref-cor-prefix";
const kCrossrefPrpPrefix = "crossref-prp-prefix";
const kCrossrefCnjPrefix = "crossref-cnj-prefix";
const kCrossrefDefPrefix = "crossref-def-prefix";
const kCrossrefExmPrefix = "crossref-exm-prefix";
const kCrossrefExrPrefix = "crossref-exr-prefix";
const kCrossrefLofTitle = "crossref-lof-title";
const kCrossrefLotTitle = "crossref-lot-title";
const kCrossrefLolTitle = "crossref-lol-title";
const kEnvironmentProofTitle = "environment-proof-title";
const kEnvironmentRemarkTitle = "environment-remark-title";
const kEnvironmentSolutionTitle = "environment-solution-title";
const kListingPageOrderBy = "listing-page-order-by";
const kListingPageOrderByDefault = "listing-page-order-by-default";
const kListingPageOrderByDateAsc = "listing-page-order-by-date-asc";
const kListingPageOrderByDateDesc = "listing-page-order-by-date-desc";
const kListingPageOrderByNumberAsc = "listing-page-order-by-number-asc";
const kListingPageOrderByNumberDesc = "listing-page-order-by-number-desc";
const kListingPageFieldDate = "listing-page-field-date";
const kListingPageFieldTitle = "listing-page-field-title";
const kListingPageFieldDescription = "listing-page-field-description";
const kListingPageFieldAuthor = "listing-page-field-author";
const kListingPageFieldFileName = "listing-page-field-filename";
const kListingPageFieldFileModified = "listing-page-field-filemodified";
const kListingPageFieldSubtitle = "listing-page-field-subtitle";
const kListingPageFieldReadingTime = "listing-page-field-readingtime";
const kListingPageFieldCategories = "listing-page-field-categories";
const kListingPageMinutesCompact = "listing-page-minutes-compact";
const kListingPageCategoryAll = "listing-page-category-all";
const kListingPageNoMatches = "listing-page-no-matches";
const kLanguageDefaultsKeys = [
    kTocTitleDocument,
    kTocTitleWebsite,
    kCalloutTipCaption,
    kCalloutNoteCaption,
    kCalloutWarningCaption,
    kCalloutImportantCaption,
    kCalloutCautionCaption,
    kSectionTitleAbstract,
    kSectionTitleFootnotes,
    kSectionTitleReferences,
    kSectionTitleAppendices,
    kSectionTitleReuse,
    kSectionTitleCitation,
    kAppendixAttributionBibTex,
    kAppendixAttributionCiteAs,
    kTitleBlockAuthorSingle,
    kTitleBlockPublished,
    kTitleBlockModified,
    kCodeSummary,
    kCodeToolsMenuCaption,
    kCodeToolsShowAllCode,
    kCodeToolsHideAllCode,
    kCodeToolsViewSource,
    kCodeToolsSourceCode,
    kSearchNoResultsText,
    kCopyButtonTooltip,
    kCopyButtonTooltipSuccess,
    kRepoActionLinksEdit,
    kRepoActionLinksSource,
    kRepoActionLinksIssue,
    kSearchMatchingDocumentsText,
    kSearchCopyLinkTitle,
    kSearchHideMatchesText,
    kSearchMoreMatchText,
    kSearchMoreMatchesText,
    kSearchClearButtonTitle,
    kSearchDetatchedCancelButtonTitle,
    kSearchSubmitButtonTitle,
    kCrossrefFigTitle,
    kCrossrefTblTitle,
    kCrossrefLstTitle,
    kCrossrefThmTitle,
    kCrossrefLemTitle,
    kCrossrefCorTitle,
    kCrossrefPrfTitle,
    kCrossrefCnjTitle,
    kCrossrefDefTitle,
    kCrossrefExmTitle,
    kCrossrefExrTitle,
    kCrossrefFigPrefix,
    kCrossrefTblPrefix,
    kCrossrefLstPrefix,
    kCrossrefChPrefix,
    kCrossrefApxPrefix,
    kCrossrefSecPrefix,
    kCrossrefEqPrefix,
    kCrossrefThmPrefix,
    kCrossrefLemPrefix,
    kCrossrefCorPrefix,
    kCrossrefPrpPrefix,
    kCrossrefCnjPrefix,
    kCrossrefDefPrefix,
    kCrossrefExmPrefix,
    kCrossrefExrPrefix,
    kCrossrefLofTitle,
    kCrossrefLotTitle,
    kCrossrefLolTitle,
    kEnvironmentProofTitle,
    kEnvironmentRemarkTitle,
    kEnvironmentSolutionTitle,
    kListingPageOrderBy,
    kListingPageOrderByDefault,
    kListingPageOrderByDateAsc,
    kListingPageOrderByDateDesc,
    kListingPageOrderByNumberAsc,
    kListingPageOrderByNumberDesc,
    kListingPageFieldDate,
    kListingPageFieldTitle,
    kListingPageFieldDescription,
    kListingPageFieldAuthor,
    kListingPageFieldFileName,
    kListingPageFieldFileModified,
    kListingPageFieldSubtitle,
    kListingPageFieldReadingTime,
    kListingPageFieldCategories,
    kListingPageMinutesCompact,
    kListingPageCategoryAll,
    kListingPageNoMatches,
    kTitleBlockAuthorSingle,
    kTitleBlockAuthorPlural,
    kTitleBlockAffiliationSingle,
    kTitleBlockAffiliationPlural,
    kTitleBlockPublished,
    kTitleBlockModified, 
];
const kTo = "to";
const kFrom = "from";
const kReader = "reader";
const kWriter = "writer";
const kOutputFile = "output-file";
const kInputFiles = "input-files";
const kAtxHeaders = "atx-headers";
const kMarkdownHeadings = "markdown-headings";
const kTemplate = "template";
const kWrap = "wrap";
const kStandalone = "standalone";
const kSelfContained = "self-contained";
const kEmbedResources = "embed-resources";
const kIncludeBeforeBody = "include-before-body";
const kIncludeAfterBody = "include-after-body";
const kIncludeInHeader = "include-in-header";
const kCiteproc = "citeproc";
const kCiteMethod = "cite-method";
const kFilters = "filters";
const kFilterParams = "filter-params";
const kPdfEngine = "pdf-engine";
const kPdfEngineOpts = "pdf-engine-opts";
const kPdfEngineOpt = "pdf-engine-opt";
const kListings = "listings";
const kNumberSections = "number-sections";
const kNumberOffset = "number-offset";
const kShiftHeadingLevelBy = "shift-heading-level-by";
const kNumberDepth = "number-depth";
const kTopLevelDivision = "top-level-division";
const kPaperSize = "papersize";
const kLogFile = "log-file";
const kHighlightStyle = "highlight-style";
const kDefaultImageExtension = "default-image-extension";
const kLinkColor = "linkcolor";
const kColorLinks = "colorlinks";
const kVariables = "variables";
const kMetadataFile = "metadata-file";
const kMetadataFiles = "metadata-files";
const kSyntaxDefinitions = "syntax-definitions";
const kSyntaxDefinition = "syntax-definition";
const kReferenceDoc = "reference-doc";
const kHtmlMathMethod = "html-math-method";
const kToc = "toc";
const kTocDepth = "toc-depth";
const kTableOfContents = "table-of-contents";
const kSectionDivs = "section-divs";
const kEPubCoverImage = "epub-cover-image";
const kReferenceLocation = "reference-location";
const kCitationLocation = "citation-location";
const kQuartoVarsKey = "_quarto-vars";
const kQuartoTemplateParams = "quarto-template-params";
const kRevealJsScripts = "reveal-jsscripts";
const kTitle = "title";
const kSubtitle = "subtitle";
const kAuthor = "author";
const kDate = "date";
const kDateFormat = "date-format";
const kDateModified = "date-modified";
const kDoi = "doi";
const kAbstract = "abstract";
const kAbstractTitle = "abstract-title";
const kDescription = "description";
const kHideDescription = "hide-description";
const kTocTitle = "toc-title";
const kTocLocation = "toc-location";
const kLang = "lang";
const kOrder = "order";
const kAuthors = "authors";
const kInstitute = "institute";
const kInstitutes = "institutes";
const kServer = "server";
const kPageTitle = "pagetitle";
const kTitlePrefix = "title-prefix";
const kCsl = "csl";
const kNoCite = "nocite";
const kCss = "css";
const kBibliography = "bibliography";
const kHeaderIncludes = "header-includes";
const kIncludeBefore = "include-before";
const kIncludeAfter = "include-after";
const kLinkCitations = "link-citations";
const kDocumentClass = "documentclass";
const kClassOption = "classoption";
const kSlideLevel = "slide-level";
const kTheme = "theme";
const kCrossref = "crossref";
const kCrossrefChapters = "chapters";
const kCrossrefLabels = "labels";
const kCrossrefAppendixTitle = "appendix-title";
const kCrossrefAppendixDelim = "appendix-delim";
const kCrossrefChaptersAppendix = "chapters-appendix";
const kCrossrefChaptersAlpha = "chapters-alpha";
const kCrossrefChapterId = "chapter-id";
const kFigResponsive = "fig-responsive";
const kCapLoc = "cap-location";
const kFigCapLoc = "fig-cap-location";
const kTblCapLoc = "tbl-cap-location";
const kCapTop = "top";
const kCapBottom = "bottom";
const kPositionedRefs = "positioned-refs";
const kPandocDefaultsKeys = [
    kTo,
    kFrom,
    kReader,
    kWriter,
    kOutputFile,
    kInputFiles,
    "defaults",
    kTemplate,
    kStandalone,
    kSelfContained,
    kEmbedResources,
    kVariables,
    "metadata",
    kMetadataFiles,
    kMetadataFile,
    kIncludeBeforeBody,
    kIncludeAfterBody,
    kIncludeInHeader,
    "resource-path",
    kCiteproc,
    kCiteMethod,
    "citation-abbreviations",
    "filters",
    "file-scope",
    "data-dir",
    "verbosity",
    kLogFile,
    kTopLevelDivision,
    "abbreviations",
    kPdfEngine,
    kPdfEngineOpts,
    kPdfEngineOpt,
    kWrap,
    "columns",
    "dpi",
    "extract-media",
    kToc,
    kTableOfContents,
    kTocDepth,
    kNumberSections,
    kNumberOffset,
    kShiftHeadingLevelBy,
    kSectionDivs,
    "identifier-prefix",
    kTitlePrefix,
    "strip-empty-paragraphs",
    "eol",
    "strip-comments",
    "indented-code-classes",
    "ascii",
    kDefaultImageExtension,
    kHighlightStyle,
    kSyntaxDefinitions,
    kSyntaxDefinition,
    kListings,
    kReferenceDoc,
    kHtmlMathMethod,
    "email-obfuscation",
    "tab-stop",
    "preserve-tabs",
    "incremental",
    kSlideLevel,
    "epub-subdirectory",
    "epub-metadata",
    "epub-fonts",
    "epub-chapter-level",
    kEPubCoverImage,
    "reference-links",
    kReferenceLocation,
    kAtxHeaders,
    kMarkdownHeadings,
    "track-changes",
    "html-q-tags",
    "css",
    "ipynb-output",
    "request-headers",
    "fail-if-warnings",
    "dump-args",
    "ignore-args",
    "trace", 
];
const kCellCollapsed = "collapsed";
const kCellAutoscroll = "autoscroll";
const kCellDeletable = "deletable";
const kCellFormat = "format";
const kCellName = "name";
const kCellLinesToNext = "lines_to_next_cell";
const kCellLanguage = "language";
const kCellSlideshow = "slideshow";
const kCellSlideshowSlideType = "slide_type";
const kCellRawMimeType = "raw_mimetype";
const kCellId = "id";
const kCellLabel = "label";
const kCellFigCap = "fig-cap";
const kCellFigSubCap = "fig-subcap";
const kCellFigScap = "fig-scap";
const kCellFigColumn = "fig-column";
const kCellTblColumn = "tbl-column";
const kCellFigLink = "fig-link";
const kCellFigAlign = "fig-align";
const kCellFigEnv = "fig-env";
const kCellFigPos = "fig-pos";
const kCellFigAlt = "fig-alt";
const kCellLstLabel = "lst-label";
const kCellLstCap = "lst-cap";
const kCellClasses = "classes";
const kCellPanel = "panel";
const kCellColumn = "column";
const kCellOutWidth = "out-width";
const kCellOutHeight = "out-height";
const kCellMdIndent = "md-indent";
const kCellColab = "colab";
const kCellColabType = "colab_type";
const kCellColbOutputId = "outputId";
const kLayoutAlign = "layout-align";
const kLayoutVAlign = "layout-valign";
const kLayoutNcol = "layout-ncol";
const kLayoutNrow = "layout-nrow";
const kLayout = "layout";
async function readAndValidateYamlFromFile(file, schema, errorMessage, defaultContents) {
    if (!existsSync(file)) {
        throw new Error(`YAML file ${file} not found.`);
    }
    let shortFileName = file;
    if (shortFileName.startsWith("/")) {
        shortFileName = relative2(Deno.cwd(), shortFileName);
    }
    let fileContents = Deno.readTextFileSync(file).trimEnd();
    if (fileContents.trim().length === 0 && defaultContents) {
        fileContents = defaultContents;
    }
    const contents = asMappedString(fileContents, shortFileName);
    const { yaml , yamlValidationErrors ,  } = await readAndValidateYamlFromMappedString(contents, schema);
    if (yamlValidationErrors.length) {
        throw new ValidationError2(errorMessage, yamlValidationErrors);
    }
    return yaml;
}
function getenv(name, defaultValue) {
    const value = Deno.env.get(name);
    if (value === undefined) {
        if (defaultValue === undefined) {
            throw new Error(`Required environment variable ${name} not specified.`);
        } else {
            return defaultValue;
        }
    } else {
        return value;
    }
}
const kSkipHidden = /[/\\][\.]/;
function withPath(paths) {
    const delimiter = Deno.build.os === "windows" ? ";" : ":";
    const currentPath = Deno.env.get("PATH") || "";
    if (paths.append !== undefined && paths.prepend !== undefined) {
        return currentPath;
    } else if (paths.append?.length === 0 && paths.prepend?.length === 0) {
        return currentPath;
    } else {
        const modifiedPaths = [
            currentPath
        ];
        if (paths.append) {
            modifiedPaths.unshift(...paths.append);
        }
        if (paths.prepend) {
            modifiedPaths.push(...paths.prepend);
        }
        return modifiedPaths.join(delimiter);
    }
}
function removeIfExists(file) {
    if (existsSync(file)) {
        Deno.removeSync(file, {
            recursive: true
        });
    }
}
function safeRemoveIfExists(file) {
    try {
        removeIfExists(file);
    } catch (error) {
        warning(`Error removing file ${file}: ${error.message}`);
    }
}
function removeIfEmptyDir(dir) {
    if (existsSync(dir)) {
        let empty = true;
        for (const _entry of Deno.readDirSync(dir)){
            empty = false;
            break;
        }
        if (empty) {
            Deno.removeSync(dir, {
                recursive: true
            });
        }
    }
}
function isModifiedAfter(file, otherFile) {
    if (!existsSync(file)) {
        throw new Error(`${file} does not exist`);
    }
    if (!existsSync(otherFile)) {
        return true;
    }
    const fileInfo = Deno.statSync(file);
    const otherfileInfo = Deno.statSync(otherFile);
    if (fileInfo.mtime === null || otherfileInfo.mtime === null) {
        return true;
    } else {
        return fileInfo.mtime > otherfileInfo.mtime;
    }
}
function dirAndStem(file) {
    return [
        dirname2(file),
        basename2(file, extname2(file)), 
    ];
}
function expandPath(path) {
    if (path === "~") {
        return getenv("HOME", "~");
    } else {
        return path.replace(/^~\//, getenv("HOME", "~") + "/");
    }
}
function suggestUserBinPaths() {
    if (Deno.build.os !== "windows") {
        const possiblePaths = [
            "/usr/local/bin",
            "~/.local/bin",
            "~/bin", 
        ];
        const pathRaw = Deno.env.get("PATH");
        const paths = pathRaw ? pathRaw.split(":") : [];
        return possiblePaths.filter((path)=>{
            return paths.includes(path) || paths.includes(expandPath(path));
        });
    } else {
        throw new Error("suggestUserBinPaths not currently supported on Windows");
    }
}
function safeExistsSync(path) {
    try {
        return existsSync(path);
    } catch  {
        return false;
    }
}
async function which(cmd) {
    const args = Deno.build.os === "windows" ? [
        "CMD",
        "/C",
        "where",
        cmd
    ] : [
        "which",
        cmd
    ];
    const result1 = await execProcess({
        cmd: args,
        stderr: "piped",
        stdout: "piped"
    });
    if (result1.code === 0) {
        return Deno.build.os === "windows" ? result1.stdout?.split("\n")[0].trim() : result1.stdout?.trim();
    } else {
        return undefined;
    }
}
function filterPaths(root, paths, globs, options) {
    const expandGlobs = (targetGlobs)=>{
        const expanded = [];
        for (const glob of targetGlobs){
            const needSlash = !root.endsWith("/") && !glob.startsWith("/");
            const regex = globToRegExp(`${root}${needSlash ? "/" : ""}${glob}`);
            const matchingFiles = paths.filter((path)=>{
                return regex.test(path);
            });
            expanded.push(...matchingFiles);
        }
        return __VIRTUAL_FILE181(expanded);
    };
    return resolveGlobs(root, globs, expandGlobs, options);
}
function resolvePathGlobs(root, globs, exclude, options) {
    const expandGlobs = (targetGlobs)=>{
        const expanded = [];
        for (const glob of targetGlobs){
            for (const file of expandGlobSync(glob, {
                root,
                exclude,
                includeDirs: true,
                extended: true,
                globstar: true
            })){
                expanded.push(file.path);
            }
        }
        return __VIRTUAL_FILE181(expanded);
    };
    return resolveGlobs(root, globs, expandGlobs, options);
}
function pathWithForwardSlashes(path) {
    return path.replace(/\\/g, "/");
}
function ensureTrailingSlash(path) {
    if (path && !path.endsWith("/")) {
        return path + "/";
    } else {
        return path;
    }
}
function resolveGlobs(root, globs, expandGlobs, options) {
    const includeGlobs = [];
    const excludeGlobs = [];
    const asFullGlob = (glob, preferSmart)=>{
        const useSmartGlobs = ()=>{
            if (options?.mode === "strict") {
                return false;
            } else if (options?.mode === "always") {
                return true;
            } else if (options?.mode === "auto") {
                if (preferSmart) {
                    return true;
                } else {
                    return isGlob(glob);
                }
            } else {
                return true;
            }
        };
        const smartGlob = useSmartGlobs();
        if (glob.startsWith("\\!")) {
            glob = glob.slice(1);
        }
        if (smartGlob) {
            if (glob.endsWith("/")) {
                glob = glob + "**/*";
            } else {
                const fullPath = join3(root, glob);
                try {
                    if (Deno.statSync(fullPath).isDirectory) {
                        glob = glob + "/**/*";
                    }
                } catch  {}
            }
        }
        if (!glob.startsWith("/")) {
            if (smartGlob) {
                return "**/" + glob;
            } else {
                return glob;
            }
        } else {
            return glob.slice(1);
        }
    };
    for (const glob of globs){
        if (glob.startsWith("!")) {
            excludeGlobs.push(asFullGlob(glob.slice(1), true));
        } else {
            includeGlobs.push(asFullGlob(glob));
        }
    }
    const includeFiles = expandGlobs(includeGlobs);
    const excludeFiles = expandGlobs(excludeGlobs);
    return {
        include: includeFiles,
        exclude: excludeFiles
    };
}
const kQuartoProfile = "QUARTO_PROFILE";
function activeProfiles() {
    return readProfile(Deno.env.get(kQuartoProfile));
}
function readProfile(profile) {
    if (profile) {
        return profile.split(/[ ,]+/);
    } else {
        return [];
    }
}
function setProfileFromArg(args) {
    if (args.profile) {
        Deno.env.set(kQuartoProfile, args.profile);
    }
}
function appendProfileArg(cmd) {
    return cmd.option("--profile", "Active project profile(s)", {
        global: true
    });
}
function removeEmptyValues(obj) {
    return Object.fromEntries(Object.entries(obj).filter(([, value])=>{
        if (value === null) return false;
        if (value === undefined) return false;
        if (value === "") return false;
        return true;
    }));
}
function difference1(arrA, arrB) {
    return arrA.filter((a)=>arrB.indexOf(a) < 0);
}
const RE_KeyValue = /^\s*(?:export\s+)?(?<key>[a-zA-Z_]+[a-zA-Z0-9_]*?)\s*=[\ \t]*('\n?(?<notInterpolated>(.|\n)*?)\n?'|"\n?(?<interpolated>(.|\n)*?)\n?"|(?<unquoted>[^\n#]*)) *#*.*$/gm;
const RE_ExpandValue = /(\${(?<inBrackets>.+?)(\:-(?<inBracketsDefault>.+))?}|(?<!\\)\$(?<notInBrackets>\w+)(\:-(?<notInBracketsDefault>.+))?)/g;
function parse4(rawDotenv) {
    const env = {};
    let match;
    const keysForExpandCheck = [];
    while((match = RE_KeyValue.exec(rawDotenv)) != null){
        const { key , interpolated , notInterpolated , unquoted  } = match?.groups;
        if (unquoted) {
            keysForExpandCheck.push(key);
        }
        env[key] = notInterpolated ? notInterpolated : interpolated ? expandCharacters(interpolated) : unquoted.trim();
    }
    const variablesMap = {
        ...env,
        ...Deno.env.toObject()
    };
    keysForExpandCheck.forEach((key)=>{
        env[key] = expand(env[key], variablesMap);
    });
    return env;
}
const defaultConfigOptions = {
    path: `.env`,
    export: false,
    safe: false,
    example: `.env.example`,
    allowEmptyValues: false,
    defaults: `.env.defaults`
};
async function config(options = {}) {
    const o = {
        ...defaultConfigOptions,
        ...options
    };
    const conf = await parseFileAsync(o.path);
    if (o.defaults) {
        const confDefaults = await parseFileAsync(o.defaults);
        for(const key in confDefaults){
            if (!(key in conf)) {
                conf[key] = confDefaults[key];
            }
        }
    }
    if (o.safe) {
        const confExample = await parseFileAsync(o.example);
        assertSafe(conf, confExample, o.allowEmptyValues);
    }
    if (o.export) {
        for(const key1 in conf){
            if (Deno.env.get(key1) !== undefined) continue;
            Deno.env.set(key1, conf[key1]);
        }
    }
    return conf;
}
async function parseFileAsync(filepath) {
    try {
        return parse4(new TextDecoder("utf-8").decode(await Deno.readFile(filepath)));
    } catch (e) {
        if (e instanceof Deno.errors.NotFound) return {};
        throw e;
    }
}
function expandCharacters(str) {
    const charactersMap = {
        "\\n": "\n",
        "\\r": "\r",
        "\\t": "\t"
    };
    return str.replace(/\\([nrt])/g, ($1)=>charactersMap[$1]);
}
function assertSafe(conf, confExample, allowEmptyValues) {
    const currentEnv = Deno.env.toObject();
    const confWithEnv = Object.assign({}, currentEnv, conf);
    const missing = difference1(Object.keys(confExample), Object.keys(allowEmptyValues ? confWithEnv : removeEmptyValues(confWithEnv)));
    if (missing.length > 0) {
        const errorMessages = [
            `The following variables were defined in the example file but are not present in the environment:\n  ${missing.join(", ")}`,
            `Make sure to add them to your env file.`,
            !allowEmptyValues && `If you expect any of these variables to be empty, you can set the allowEmptyValues option to true.`, 
        ];
        throw new MissingEnvVarsError(errorMessages.filter(Boolean).join("\n\n"), missing);
    }
}
class MissingEnvVarsError extends Error {
    missing;
    constructor(message, missing){
        super(message);
        this.name = "MissingEnvVarsError";
        this.missing = missing;
        Object.setPrototypeOf(this, new.target.prototype);
    }
}
function expand(str, variablesMap) {
    if (RE_ExpandValue.test(str)) {
        return expand(str.replace(RE_ExpandValue, function(...params) {
            const { inBrackets , inBracketsDefault , notInBrackets , notInBracketsDefault ,  } = params[params.length - 1];
            const expandValue = inBrackets || notInBrackets;
            const defaultValue = inBracketsDefault || notInBracketsDefault;
            return variablesMap[expandValue] || expand(defaultValue, variablesMap);
        }), variablesMap);
    } else {
        return str;
    }
}
function stringify1(object) {
    const lines = [];
    for (const [key, value] of Object.entries(object)){
        let quote;
        let escapedValue = value ?? "";
        if (key.startsWith("#")) {
            console.warn(`key starts with a '#' indicates a comment and is ignored: '${key}'`);
            continue;
        } else if (escapedValue.includes("\n")) {
            escapedValue = escapedValue.replaceAll("\n", "\\n");
            quote = `"`;
        } else if (escapedValue.match(/\W/)) {
            quote = "'";
        }
        if (quote) {
            escapedValue = escapedValue.replaceAll(quote, `\\${quote}`);
            escapedValue = `${quote}${escapedValue}${quote}`;
        }
        const line = `${key}=${escapedValue}`;
        lines.push(line);
    }
    return lines.join("\n");
}
let tempDir;
let tempContext;
function initSessionTempDir() {
    const tmpEnv = Deno.env.get("TMPDIR");
    if (tmpEnv) {
        try {
            if (!existsSync(tmpEnv)) {
                ensureDirSync(tmpEnv);
            }
        } catch (err) {
            if (err.message) {
                debug("Error attempting to create TMPDIR: " + err.message);
            }
        }
    }
    tempDir = Deno.makeTempDirSync({
        prefix: "quarto-session"
    });
}
function cleanupSessionTempDir() {
    if (tempContext) {
        tempContext.cleanup();
        tempContext = undefined;
    }
    if (tempDir) {
        removeIfExists(tempDir);
        tempDir = undefined;
    }
}
function globalTempContext() {
    if (tempContext === undefined) {
        tempContext = createTempContext();
    }
    return tempContext;
}
function createTempContext(options) {
    let dir = Deno.makeTempDirSync({
        ...options,
        dir: tempDir
    });
    return {
        createFile: (options)=>{
            return Deno.makeTempFileSync({
                ...options,
                dir
            });
        },
        createDir: (options)=>{
            return Deno.makeTempDirSync({
                ...options,
                dir
            });
        },
        cleanup: ()=>{
            if (dir) {
                safeRemoveIfExists(dir);
                dir = undefined;
            }
        }
    };
}
const kQuartoEnv = "_environment";
const kQuartoEnvLocal = `${kQuartoEnv}.local`;
const kQuartoEnvRequired = `${kQuartoEnv}.required`;
async function dotenvQuartoProfile(projectDir) {
    const conf = await config({
        defaults: join3(projectDir, kQuartoEnv),
        path: join3(projectDir, kQuartoEnvLocal)
    });
    return conf[kQuartoProfile];
}
const dotenvVariablesSet = [];
let prevDotenvVariablesDefined;
async function dotenvSetVariables(projectDir) {
    dotenvVariablesSet.forEach(Deno.env.delete);
    dotenvVariablesSet.splice(0, dotenvVariablesSet.length);
    const dotenvFiles = [
        join3(projectDir, kQuartoEnv),
        ...activeProfiles().reverse().map((profile)=>join3(projectDir, `_environment-${profile}`)),
        join3(projectDir, kQuartoEnvLocal), 
    ].filter(safeExistsSync).reverse();
    const dotenvVariablesDefined = {};
    for (const dotenvFile of dotenvFiles){
        const conf = await config({
            path: dotenvFile
        });
        for(const key in conf){
            if (Deno.env.get(key) === undefined) {
                Deno.env.set(key, conf[key]);
                dotenvVariablesSet.push(key);
            }
            if (dotenvVariablesDefined[key] === undefined) {
                dotenvVariablesDefined[key] = conf[key];
            }
        }
    }
    const dotenvRequired = join3(projectDir, kQuartoEnvRequired);
    if (existsSync(dotenvRequired)) {
        const definedEnvTempPath = globalTempContext().createFile({
            suffix: ".yml"
        });
        Deno.writeTextFileSync(definedEnvTempPath, stringify1(dotenvVariablesDefined));
        await config({
            path: definedEnvTempPath,
            example: dotenvRequired,
            safe: true,
            allowEmptyValues: true
        });
    }
    if (prevDotenvVariablesDefined && !__VIRTUAL_FILE211(dotenvVariablesDefined, prevDotenvVariablesDefined)) {
        fireDotenvChanged();
    }
    prevDotenvVariablesDefined = dotenvVariablesDefined;
    return dotenvFiles;
}
const listeners = new Array();
function fireDotenvChanged() {
    listeners.forEach((listener)=>listener());
}
function onDotenvChanged(listener) {
    listeners.push(listener);
}
const cleanupHandlers = [];
function onCleanup(handler) {
    cleanupHandlers.push(handler);
}
function exitWithCleanup(code) {
    for (const handler of cleanupHandlers){
        try {
            handler();
        } catch (error) {
            info("Error occurred during cleanup: " + error);
        }
    }
    Deno.exit(code);
}
function appendLogOptions(cmd) {
    return cmd.option("--log <level>", "Path to log file", {
        global: true
    }).option("--log-level <level>", "Log level (info, warning, error, critical)", {
        global: true
    }).option("--log-format <format>", "Log format (plain, json-stream)", {
        global: true
    }).option("--quiet", "Suppress console output.", {
        global: true
    });
}
function logOptions(args) {
    const logOptions = {};
    logOptions.log = args.l || args.log || Deno.env.get("QUARTO_LOG");
    if (logOptions.log) {
        ensureDirSync(dirname2(logOptions.log));
    }
    logOptions.level = args.ll || args["log-level"] || Deno.env.get("QUARTO_LOG_LEVEL");
    logOptions.quiet = args.q || args.quiet;
    logOptions.format = parseFormat(args.lf || args["log-format"] || Deno.env.get("QUARTO_LOG_FORMAT"));
    return logOptions;
}
let currentLogLevel = "INFO";
function logLevel() {
    return currentLogLevel;
}
class StdErrOutputHandler extends BaseHandler {
    format(logRecord, prefix = true) {
        const options = {
            newline: true,
            colorize: true,
            ...logRecord.args[0]
        };
        let msg = super.format(logRecord);
        if (prefix && logRecord.level >= LogLevels.WARNING) {
            msg = `${logRecord.levelName}: ${msg}`;
        }
        switch(logRecord.level){
            case LogLevels.INFO:
            case LogLevels.DEBUG:
                msg = applyMsgOptions(msg, options);
                break;
            case LogLevels.WARNING:
                if (options.colorize) {
                    msg = yellow1(msg);
                }
                break;
            case LogLevels.ERROR:
                if (options.colorize) {
                    msg = brightRed1(msg);
                }
                break;
            case LogLevels.CRITICAL:
                if (options.colorize) {
                    msg = bold1(red1(msg));
                }
                break;
            default:
                break;
        }
        if (options.newline) {
            msg = msg + "\n";
        }
        return msg;
    }
    log(msg) {
        Deno.stderr.writeSync(new TextEncoder().encode(msg));
    }
}
class LogEventsHandler extends StdErrOutputHandler {
    constructor(levelName){
        super(levelName, {
            formatter: "{msg}"
        });
    }
    handle(logRecord) {
        LogEventsHandler.handlers_.forEach((handler)=>handler(logRecord, super.format(logRecord, false)));
    }
    static onLog(handler) {
        LogEventsHandler.handlers_.push(handler);
    }
    static handlers_ = new Array();
}
class LogFileHandler extends FileHandler {
    constructor(levelName, options){
        super(levelName, options);
        this.msgFormat = options.format;
    }
    msgFormat;
    format(logRecord) {
        if (logRecord.msg.startsWith("\r")) {
            return "";
        }
        if (this.msgFormat === undefined || this.msgFormat === "plain") {
            const options = {
                newline: true,
                ...logRecord.args[0],
                bold: false,
                dim: false,
                format: undefined
            };
            let msg = applyMsgOptions(logRecord.msg, options);
            if (options.newline) {
                msg = msg + "\n";
            }
            if (logRecord.level >= LogLevels.WARNING) {
                return `(${logRecord.levelName}) ${msg}`;
            } else {
                return msg;
            }
        } else {
            return JSON.stringify(logRecord, undefined, 0) + "\n";
        }
    }
    log(msg) {
        if (msg !== "") {
            msg = stripColor1(msg);
            this._buf.writeSync(this._encoder.encode(msg));
            this._buf.flush();
        }
    }
}
async function initializeLogger(logOptions) {
    const handlers = {};
    const defaultHandlers = [];
    const file = logOptions.log;
    currentLogLevel = logOptions.level ? parseLevel(logOptions.level) : "INFO";
    handlers["events"] = new LogEventsHandler(logLevel());
    defaultHandlers.push("events");
    if (!logOptions.quiet) {
        handlers["console"] = new StdErrOutputHandler(logLevel(), {
            formatter: "{msg}"
        });
        defaultHandlers.push("console");
    }
    if (file) {
        handlers["file"] = new LogFileHandler(logLevel(), {
            filename: file,
            mode: "w",
            format: logOptions.format
        });
        defaultHandlers.push("file");
    }
    await setup({
        handlers,
        loggers: {
            default: {
                level: "DEBUG",
                handlers: defaultHandlers
            }
        }
    });
}
async function cleanupLogger() {
    const logger = getLogger();
    for (const handler of logger.handlers){
        await handler.destroy();
    }
    logger.handlers = [];
}
function logProgress(message) {
    info(bold1(blue1(message)));
}
function logError(e) {
    const err = asErrorEx(e);
    let message = err.printName ? `${err.name}: ${err.message}` : err.message;
    const isDebug = getenv("QUARTO_DEBUG", "false") === "true" || getenv("QUARTO_PRINT_STACK", "false") === "true";
    if (isDebug && err.stack && err.printStack) {
        message = message + "\n\n" + err.stack;
    }
    if (message) {
        error(message);
    }
}
function warnOnce(msg) {
    if (!warnings[msg]) {
        warnings[msg] = true;
        warning(msg);
    }
}
const warnings = {};
function applyMsgOptions(msg, options) {
    if (options.indent) {
        const pad = " ".repeat(options.indent);
        msg = lines(msg).map((msg)=>pad + msg).join("\n");
    }
    if (options.bold) {
        msg = bold1(msg);
    }
    if (options.dim) {
        msg = dim1(msg);
    }
    if (options.format) {
        msg = options.format(msg);
    }
    return msg;
}
function parseFormat(format) {
    if (format) {
        format = format.toLowerCase();
        switch(format){
            case "plain":
            case "json-stream":
                return format;
            default:
                return "plain";
        }
    } else {
        return "plain";
    }
}
function parseLevel(level) {
    const lvl = levelMap[level.toLowerCase()];
    if (lvl) {
        return lvl;
    } else {
        return "WARNING";
    }
}
const levelMap = {
    debug: "DEBUG",
    info: "INFO",
    warning: "WARNING",
    error: "ERROR"
};
const kHKeyCurrentUser = "HKCU";
const kHKeyLocalMachine = "HKLM";
async function registryReadString(root, key, value) {
    if (Array.isArray(root)) {
        for (const r of root){
            const val = await registryReadString(r, key, value);
            if (val !== undefined) {
                return val;
            }
        }
        return undefined;
    }
    const kTypeString = "REG_SZ";
    const cmd = [
        "reg",
        "query",
        `${root}\\${key}`,
        "/v",
        value, 
    ];
    const result1 = await execProcess({
        cmd,
        stdout: "piped",
        stderr: "null"
    });
    if (result1.success && result1.stdout) {
        const typePos = result1.stdout?.indexOf(kTypeString);
        if (typePos !== -1) {
            return result1.stdout.substring(typePos + kTypeString.length).trim();
        }
    }
    return undefined;
}
const kQmdExtensions = [
    ".qmd"
];
const kMarkdownEngine = "markdown";
const kKnitrEngine = "knitr";
const kJupyterEngine = "jupyter";
async function includedMetadata(dir, baseMetadata, schema) {
    const yamlFiles = [];
    const metadataFile = baseMetadata[kMetadataFile];
    if (metadataFile) {
        yamlFiles.push(join3(dir, metadataFile));
    }
    const metadataFiles = baseMetadata[kMetadataFiles];
    if (metadataFiles && Array.isArray(metadataFiles)) {
        metadataFiles.forEach((file)=>yamlFiles.push(join3(dir, file)));
    }
    const filesMetadata = await Promise.all(yamlFiles.map(async (yamlFile)=>{
        if (await exists(yamlFile)) {
            try {
                const yaml = await readAndValidateYamlFromFile(yamlFile, schema, `Validation of metadata file ${yamlFile} failed.`);
                return yaml;
            } catch (e) {
                error("\nError reading metadata file from " + yamlFile + "\n");
                throw e;
            }
        } else {
            return undefined;
        }
    }));
    return {
        metadata: mergeFormatMetadata({}, ...filesMetadata),
        files: yamlFiles
    };
}
const kGfmCommonmarkExtensions = [
    "+autolink_bare_uris",
    "+emoji",
    "+footnotes",
    "+gfm_auto_identifiers",
    "+pipe_tables",
    "+strikeout",
    "+task_lists",
    "+tex_math_dollars", 
];
function createFormat(ext, ...formats) {
    return mergeConfigs(defaultFormat(), ...formats, {
        render: {
            [kOutputExt]: ext
        }
    });
}
const kLocalDevelopment = "99.9.9";
let dotenvConfig;
const quartoConfig = {
    binPath: ()=>getenv("QUARTO_BIN_PATH"),
    toolsPath: ()=>join3(getenv("QUARTO_BIN_PATH"), "tools"),
    sharePath: ()=>getenv("QUARTO_SHARE_PATH"),
    isDebug: ()=>getenv("QUARTO_DEBUG", "false") === "true",
    version: ()=>{
        const versionPath = join3(getenv("QUARTO_SHARE_PATH"), "version");
        if (existsSync(versionPath)) {
            return Deno.readTextFileSync(versionPath);
        } else {
            return kLocalDevelopment;
        }
    },
    dotenv: async ()=>{
        if (!dotenvConfig) {
            const options = {
                defaults: join3(quartoConfig.sharePath(), "env", "env.defaults")
            };
            if (quartoConfig.isDebug()) {
                options.path = join3(quartoConfig.sharePath(), "..", "..", ".env");
            } else {
                options.path = options.defaults;
            }
            dotenvConfig = await config(options);
        }
        return dotenvConfig;
    }
};
function resourcePath(resource) {
    const sharePath = quartoConfig.sharePath();
    if (resource) {
        return join3(sharePath, resource);
    } else {
        return sharePath;
    }
}
const kQuartoProfileConfig = "profile";
function formatFromMetadata(baseFormat, to, debug) {
    const typedFormat = {
        render: {},
        execute: {},
        pandoc: {},
        language: {},
        metadata: {}
    };
    let format = typedFormat;
    const configFormats = baseFormat.metadata[kMetadataFormat];
    if (configFormats instanceof Object) {
        const configFormat = configFormats[to];
        if (configFormat === "default" || configFormat === true) {
            format = metadataAsFormat({});
        } else if (configFormat instanceof Object) {
            format = metadataAsFormat(configFormat);
        }
    }
    const mergedFormat = mergeFormatMetadata(baseFormat, format);
    if (debug) {
        mergedFormat.execute[kKeepMd] = true;
        mergedFormat.render[kKeepTex] = true;
    }
    return mergedFormat;
}
function formatKeys(metadata) {
    if (typeof metadata[kMetadataFormat] === "string") {
        return [
            metadata[kMetadataFormat]
        ];
    } else if (metadata[kMetadataFormat] instanceof Object) {
        return Object.keys(metadata[kMetadataFormat]).filter((key)=>{
            const format = metadata[kMetadataFormat][key];
            return format !== null && format !== false;
        });
    } else {
        return [];
    }
}
function isQuartoMetadata(key) {
    return kRenderDefaultsKeys.includes(key) || kExecuteDefaultsKeys.includes(key) || kPandocDefaultsKeys.includes(key) || kLanguageDefaultsKeys.includes(key) || [
        kKnitrEngine,
        kJupyterEngine
    ].includes(key);
}
function isIncludeMetadata(key) {
    return [
        kHeaderIncludes,
        kIncludeBefore,
        kIncludeAfter
    ].includes(key);
}
const kGfmCommonmarkVariant = kGfmCommonmarkExtensions.join("");
function metadataAsFormat(metadata) {
    const typedFormat = {
        render: {},
        execute: {},
        pandoc: {},
        language: {},
        metadata: {}
    };
    const format = typedFormat;
    Object.keys(metadata).forEach((key)=>{
        if ([
            kRenderDefaults,
            kExecuteDefaults,
            kPandocDefaults,
            kLanguageDefaults,
            kPandocMetadata, 
        ].includes(key)) {
            if (typeof metadata[key] == "boolean") {
                if (key === kExecuteDefaults) {
                    format[key] = format[key] || {};
                    format[kExecuteDefaults][kExecuteEnabled] = metadata[key];
                }
            } else {
                format[key] = {
                    ...format[key],
                    ...metadata[key]
                };
            }
        } else {
            if (kRenderDefaultsKeys.includes(key)) {
                format.render[key] = metadata[key];
            } else if (kExecuteDefaultsKeys.includes(key)) {
                format.execute[key] = metadata[key];
            } else if (kPandocDefaultsKeys.includes(key)) {
                format.pandoc[key] = metadata[key];
            } else if (kLanguageDefaultsKeys.includes(key)) {
                format.language[key] = metadata[key];
            } else {
                format.metadata[key] = metadata[key];
            }
        }
    });
    const filter = format.execute[kIpynbFilter];
    if (typeof filter === "string") {
        typedFormat.execute[kIpynbFilters] = typedFormat.execute[kIpynbFilters] || [];
        typedFormat.execute[kIpynbFilters]?.push(filter);
        delete typedFormat.execute[kIpynbFilter];
    }
    if (typeof typedFormat.render.variant === "string") {
        typedFormat.render.variant = typedFormat.render.variant.replace(/^gfm/, kGfmCommonmarkVariant);
    }
    return typedFormat;
}
function metadataGetDeep(metadata, property) {
    let values = [];
    __VIRTUAL_FILE145(metadata, (value, key)=>{
        if (key === property) {
            values.push(value);
        } else if (__VIRTUAL_FILE18(value)) {
            values = values.concat(metadataGetDeep(value, property));
        }
    });
    return values;
}
function mergeFormatMetadata(config, ...configs) {
    const kUnmergeableKeys = [
        kTblColwidths
    ];
    return mergeConfigsCustomized((objValue, srcValue, key)=>{
        if (kUnmergeableKeys.includes(key)) {
            return srcValue;
        } else if (key === kVariant) {
            return mergePandocVariant(objValue, srcValue);
        } else {
            return undefined;
        }
    }, config, ...configs);
}
function mergeProjectMetadata(config, ...configs) {
    const kExandableStringKeys = [
        "contents"
    ];
    return mergeConfigsCustomized((objValue, srcValue, key)=>{
        if (kExandableStringKeys.includes(key) && typeof objValue === "string") {
            return srcValue;
        } else {
            return undefined;
        }
    }, config, ...configs);
}
function mergeConfigsCustomized(customizer, config, ...configs) {
    config = cloneDeep1(config);
    configs = cloneDeep1(configs);
    return __VIRTUAL_FILE154(config, ...configs, (objValue, srcValue, key)=>{
        const custom = customizer(objValue, srcValue, key);
        if (custom !== undefined) {
            return custom;
        } else {
            return mergeArrayCustomizer(objValue, srcValue);
        }
    });
}
function mergePandocVariant(objValue, srcValue) {
    if (typeof objValue === "string" && typeof srcValue === "string" && objValue !== srcValue) {
        const extensions = {};
        [
            ...parsePandocVariant(objValue),
            ...parsePandocVariant(srcValue)
        ].forEach((extension)=>{
            extensions[extension.name] = extension.enabled;
        });
        return Object.keys(extensions).map((name)=>`${extensions[name] ? "+" : "-"}${name}`).join("");
    } else {
        return undefined;
    }
}
function parsePandocVariant(variant) {
    variant = variant.split("\n").join();
    const extensions = [];
    const re = /([+-])([a-z_]+)/g;
    let match = re.exec(variant);
    while(match){
        extensions.push({
            name: match[2],
            enabled: match[1] === "+"
        });
        match = re.exec(variant);
    }
    return extensions;
}
`commonmark${kGfmCommonmarkVariant}`;
function requiresShortcodeUnescapePostprocessor(markdown) {
    return markdown.includes("{{{<");
}
function shortcodeUnescapePostprocessor(output) {
    Deno.writeTextFileSync(output, Deno.readTextFileSync(output).replaceAll("{{\\<", "{{<").replaceAll("\\>}}", ">}}"));
    return Promise.resolve();
}
function gfmFormat() {
    return createFormat("md", markdownFormat(), {
        pandoc: {
            to: "commonmark"
        },
        render: {
            [kVariant]: kGfmCommonmarkVariant
        }
    });
}
function markdownWithCommonmarkExtensionsFormat() {
    return createFormat("md", markdownFormat(), {
        pandoc: {
            to: [
                "markdown_strict",
                "+raw_html",
                "+all_symbols_escapable",
                "+backtick_code_blocks",
                "+fenced_code_blocks",
                "+space_in_atx_header",
                "+intraword_underscores",
                "+lists_without_preceding_blankline",
                "+shortcut_reference_links", 
            ].join("")
        }
    });
}
function commonmarkFormat(to) {
    return createFormat("md", markdownFormat(), {
        pandoc: {
            to
        }
    });
}
function createHtmlFormat(figwidth, figheight) {
    return createFormat("html", {
        metadata: {
            [kLang]: "en",
            [kFigResponsive]: true,
            [kQuartoVersion]: quartoConfig.version()
        },
        execute: {
            [kFigFormat]: "retina",
            [kFigWidth]: figwidth,
            [kFigHeight]: figheight
        },
        render: {
            [kTblColwidths]: "auto"
        },
        pandoc: {
            [kStandalone]: true,
            [kWrap]: "none",
            [kDefaultImageExtension]: "png"
        }
    });
}
function createHtmlPresentationFormat(figwidth, figheight) {
    return mergeConfigs(createHtmlFormat(figwidth, figheight), {
        metadata: {
            [kFigResponsive]: false
        },
        execute: {
            [kEcho]: false,
            [kWarning]: false
        }
    });
}
function formatResourcePath(format, resource) {
    return join3(resourcePath("formats"), format, resource);
}
function createEbookFormat(ext) {
    return createFormat(ext, {
        formatExtras: ()=>{
            return {
                [kIncludeInHeader]: [
                    formatResourcePath("html", "styles-callout.html"),
                    formatResourcePath("epub", "styles.html"), 
                ]
            };
        },
        render: {
            [kMergeIncludes]: false
        },
        execute: {
            [kFigWidth]: 5,
            [kFigHeight]: 4
        },
        pandoc: {
            [kDefaultImageExtension]: "png"
        }
    });
}
function createWordprocessorFormat(ext) {
    return createFormat(ext, {
        render: {
            [kPageWidth]: 6.5
        },
        execute: {
            [kFigWidth]: 5,
            [kFigHeight]: 4
        },
        pandoc: {
            [kDefaultImageExtension]: "png"
        }
    });
}
function plaintextFormat(ext) {
    return createFormat(ext, {
        pandoc: {
            standalone: true,
            [kDefaultImageExtension]: "png"
        }
    });
}
function pandocMarkdownFormat() {
    return createFormat("md", plaintextFormat("md"), {});
}
function markdownFormat() {
    return createFormat("md", plaintextFormat("md"), {
        render: {
            [kOutputDivs]: false
        }
    });
}
function defaultFormat() {
    return {
        execute: {
            [kFigWidth]: 7,
            [kFigHeight]: 5,
            [kFigFormat]: "png",
            [kFigDpi]: 96,
            [kMermaidFormat]: undefined,
            [kDfPrint]: "default",
            [kError]: false,
            [kEval]: true,
            [kCache]: null,
            [kFreeze]: false,
            [kEcho]: true,
            [kOutput]: true,
            [kWarning]: true,
            [kInclude]: true,
            [kKeepMd]: false,
            [kKeepIpynb]: false,
            [kExecuteIpynb]: null,
            [kExecuteEnabled]: null,
            [kExecuteDaemon]: null,
            [kExecuteDaemonRestart]: false,
            [kExecuteDebug]: false,
            [kIpynbFilters]: []
        },
        render: {
            [kKeepTex]: false,
            [kKeepSource]: false,
            [kKeepHidden]: false,
            [kPreferHtml]: false,
            [kOutputDivs]: true,
            [kOutputExt]: "html",
            [kFigAlign]: "default",
            [kFigPos]: null,
            [kFigEnv]: null,
            [kCodeFold]: "none",
            [kCodeOverflow]: "scroll",
            [kCodeLink]: false,
            [kCodeLineNumbers]: false,
            [kCodeTools]: false,
            [kTblColwidths]: true,
            [kMergeIncludes]: true,
            [kLatexAutoMk]: true,
            [kLatexAutoInstall]: true,
            [kLatexClean]: true,
            [kLatexMaxRuns]: 1,
            [kLatexMaxRuns]: 10,
            [kLatexMakeIndex]: "makeindex",
            [kLatexMakeIndexOpts]: [],
            [kLatexTlmgrOpts]: [],
            [kLatexInputPaths]: [],
            [kLatexOutputDir]: null,
            [kLinkExternalIcon]: false,
            [kLinkExternalNewwindow]: false,
            [kSelfContainedMath]: false,
            [kFormatResources]: []
        },
        pandoc: {},
        language: {},
        metadata: {}
    };
}
function toolsPath(binary) {
    const displayWarning = ()=>{
        warnOnce(`Specified ${binaryEnvKey} does not exist, using built in ${binary}`);
    };
    const binaryEnvKey = `QUARTO_${binary.toUpperCase()}`;
    const binaryPath = Deno.env.get(binaryEnvKey);
    if (binaryPath) {
        if (!existsSync(binaryPath)) {
            displayWarning();
        } else {
            if (Deno.statSync(binaryPath).isFile) {
                return binaryPath;
            } else {
                const fullPath = join3(binaryPath, binary);
                if (!existsSync(fullPath)) {
                    displayWarning();
                } else {
                    return fullPath;
                }
            }
        }
    }
    return join3(quartoConfig.toolsPath(), binary);
}
function pandocBinaryPath() {
    return toolsPath("pandoc");
}
async function rBinaryPath(binary) {
    const quartoR = Deno.env.get("QUARTO_R");
    if (quartoR && existsSync(quartoR)) {
        const rBinDir = Deno.statSync(quartoR).isDirectory ? quartoR : dirname2(quartoR);
        return join3(rBinDir, binary);
    }
    const rHome = Deno.env.get("R_HOME");
    if (rHome) {
        let rHomeBin = join3(rHome, "bin", binary);
        if (safeExistsSync(rHomeBin)) return rHomeBin;
        if (Deno.build.os === "windows") {
            rHomeBin = join3(rHome, "bin", "x64", binary);
            if (safeExistsSync(rHomeBin)) return rHomeBin;
        }
    }
    const path = await which(binary);
    if (path) {
        return path;
    }
    if (Deno.build.os === "windows") {
        const version = await registryReadString([
            kHKeyCurrentUser,
            kHKeyLocalMachine
        ], "Software\\R-core\\R", "Current Version");
        if (version) {
            const installPath = await registryReadString([
                kHKeyCurrentUser,
                kHKeyLocalMachine
            ], `Software\\R-core\\R\\${version}`, "InstallPath");
            if (installPath) {
                return join3(installPath, "bin", binary);
            }
        }
        const progFiles = Deno.env.get("programfiles");
        if (progFiles) {
            for (const entry of Deno.readDirSync(progFiles)){
                if (entry.isDirectory && entry.name === "R") {
                    for (const walk of walkSync(join3(progFiles, "R"))){
                        if (walk.isDirectory && walk.name === "bin") {
                            return join3(walk.path, binary);
                        }
                    }
                }
            }
        }
    }
    return binary;
}
function projectTypeResourcePath(projectType) {
    return resourcePath(join3("projects", projectType));
}
const kDarkSuffix = "dark";
const kLightSuffix = "light";
function textHighlightThemePath(theme, style) {
    const names = [
        `${theme}-${style === "dark" ? kDarkSuffix : kLightSuffix}`,
        theme, 
    ];
    const themePath = names.map((name)=>{
        return resourcePath(join3("pandoc", "highlight-styles", `${name}.theme`));
    }).find((path)=>existsSync(path));
    return themePath;
}
let baseQuartoProfile;
async function initializeProfileConfig(dir, config, schema) {
    const firstRun = baseQuartoProfile === undefined;
    if (firstRun) {
        baseQuartoProfile = Deno.env.get(kQuartoProfile) || "";
    }
    const profileConfig = __VIRTUAL_FILE18(config[kQuartoProfileConfig]) ? config[kQuartoProfileConfig] : undefined;
    delete config[kQuartoProfileConfig];
    let quartoProfile = baseQuartoProfile || await dotenvQuartoProfile(dir) || await localConfigQuartoProfile(dir, schema) || "";
    if (!quartoProfile) {
        if (Array.isArray(profileConfig?.default)) {
            quartoProfile = profileConfig.default.map((value)=>String(value)).join(",");
        } else if (typeof (profileConfig?.default) === "string") {
            quartoProfile = profileConfig.default;
        }
    }
    const active = readProfile(quartoProfile);
    if (active.length === 0) {
        if (Deno.env.get("RSTUDIO_PRODUCT") === "CONNECT") {
            active.push("connect");
        }
    }
    const groups = readProfileGroups(profileConfig);
    for (const group of groups){
        if (!group.some((name)=>active.includes(name))) {
            active.push(group[0]);
        }
    }
    const updatedQuartoProfile = active.join(",");
    if (!firstRun) {
        if (Deno.env.get(kQuartoProfile) !== updatedQuartoProfile) {
            fireActiveProfileChanged(updatedQuartoProfile);
        }
    }
    Deno.env.set(kQuartoProfile, active.join(","));
    return await mergeProfiles(dir, config, schema);
}
const listeners1 = new Array();
function fireActiveProfileChanged(profile) {
    listeners1.forEach((listener)=>listener(profile));
}
function onActiveProfileChanged(listener) {
    listeners1.push(listener);
}
function monitorPreviewTerminationConditions(cleanup) {
    onActiveProfileChanged(()=>{
        terminatePreview("active profile changed", cleanup);
    });
    onDotenvChanged(()=>{
        terminatePreview("environment variables changed", cleanup);
    });
    if (quartoConfig.isDebug()) {
        const srcDir = Deno.realPathSync(join3(quartoConfig.binPath(), "../../../src"));
        const watcher = Deno.watchFs([
            srcDir
        ], {
            recursive: true
        });
        const watchForChanges = async ()=>{
            for await (const event of watcher){
                if (event.paths.some((path)=>extname2(path).toLowerCase() === ".ts")) {
                    terminatePreview("quarto src code changed", cleanup);
                }
            }
        };
        watchForChanges();
    }
}
function terminatePreview(reason, cleanup) {
    info(bold1(blue1(`\n${reason}: preview terminating\n`)));
    if (cleanup) {
        cleanup();
    }
    exitWithCleanup(1);
}
async function localConfigQuartoProfile(dir, schema) {
    const localConfigPath = localProjectConfigFile(dir);
    if (localConfigPath) {
        const yaml = await readAndValidateYamlFromFile(localConfigPath, schema, `Validation of configuration profile file ${basename2(localConfigPath)} failed.`, "{}");
        const profile = yaml[kQuartoProfileConfig];
        if (Array.isArray(profile?.default)) {
            return profile?.default.join(",");
        } else if (typeof (profile?.default) === "string") {
            return profile?.default;
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
async function mergeProfiles(dir, config, schema) {
    const files = [];
    const mergeProfile = async (profilePath)=>{
        try {
            const yaml = await readAndValidateYamlFromFile(profilePath, schema, `Validation of configuration profile file ${basename2(profilePath)} failed.`, "{}");
            config = mergeProjectMetadata(config, yaml);
            files.push(profilePath);
        } catch (e) {
            error("\nError reading configuration profile file from " + basename2(profilePath) + "\n");
            throw e;
        }
    };
    for (const profileName of activeProfiles().reverse()){
        const profilePath = [
            ".yml",
            ".yaml"
        ].map((ext)=>join3(dir, `_quarto-${profileName}${ext}`)).find(safeExistsSync);
        if (profilePath) {
            await mergeProfile(profilePath);
        }
    }
    const localConfigPath = localProjectConfigFile(dir);
    if (localConfigPath) {
        await mergeProfile(localConfigPath);
    }
    return {
        config,
        files
    };
}
function localProjectConfigFile(dir) {
    return [
        ".yml",
        ".yaml"
    ].map((ext)=>join3(dir, `_quarto${ext}.local`)).find(safeExistsSync);
}
function readProfileGroups(profileConfig) {
    const groups = [];
    const configGroup = profileConfig?.group;
    if (Array.isArray(configGroup)) {
        if (configGroup.every((value)=>typeof value === "string")) {
            groups.push(configGroup);
        } else if (configGroup.every(Array.isArray)) {
            groups.push(...configGroup);
        }
    }
    return groups;
}
const kStdOut = "-";
async function parseRenderFlags(args) {
    const flags = {};
    const argsStack = [
        ...args
    ];
    let arg = argsStack.shift();
    while(arg !== undefined){
        switch(arg){
            case "-t":
            case "--to":
                arg = argsStack.shift();
                if (arg && !arg.startsWith("-")) {
                    flags.to = arg;
                }
                break;
            case "-o":
            case "--output":
                arg = argsStack.shift();
                if (!arg || arg.startsWith("-")) {
                    flags.output = kStdOut;
                } else {
                    if (arg.match(SEP_PATTERN)) {
                        throw new Error("--output option cannot specify a relative or absolute path");
                    }
                    flags.output = arg;
                }
                break;
            case "--output-dir":
                arg = argsStack.shift();
                flags.outputDir = arg;
                break;
            case "--site-url":
                arg = argsStack.shift();
                flags.siteUrl = arg;
                break;
            case "--standalone":
                flags[kStandalone] = true;
                arg = argsStack.shift();
                break;
            case "--self-contained":
                flags[kSelfContained] = true;
                arg = argsStack.shift();
                break;
            case "--embed-resources":
                flags[kEmbedResources] = true;
                arg = argsStack.shift();
                break;
            case "--pdf-engine":
                arg = argsStack.shift();
                flags.pdfEngine = arg;
                break;
            case "--pdf-engine-opt":
                arg = argsStack.shift();
                if (arg) {
                    flags.pdfEngineOpts = flags.pdfEngineOpts || [];
                    flags.pdfEngineOpts.push(arg);
                }
                break;
            case "--latex-makeindex-opt":
                arg = argsStack.shift();
                if (arg) {
                    flags.makeIndexOpts = flags.makeIndexOpts || [];
                    flags.makeIndexOpts.push(arg);
                }
                break;
            case "--latex-tlmgr-opt":
                arg = argsStack.shift();
                if (arg) {
                    flags.tlmgrOpts = flags.tlmgrOpts || [];
                    flags.tlmgrOpts.push(arg);
                }
                break;
            case "--natbib":
                arg = argsStack.shift();
                flags.natbib = true;
                break;
            case "--biblatex":
                arg = argsStack.shift();
                flags.biblatex = true;
                break;
            case `--${kToc}`:
            case `--${kTableOfContents}`:
                arg = argsStack.shift();
                flags.toc = true;
                break;
            case "--listings":
                arg = argsStack.shift();
                flags[kListings] = true;
                break;
            case "--number-sections":
                arg = argsStack.shift();
                flags[kNumberSections] = true;
                break;
            case "--number-offset":
                arg = argsStack.shift();
                flags[kNumberSections] = true;
                flags[kNumberOffset] = parseNumbers("--number-offset", arg);
                break;
            case "--top-level-division":
                arg = argsStack.shift();
                flags[kTopLevelDivision] = arg;
                break;
            case "--shift-heading-level-by":
                arg = argsStack.shift();
                flags[kShiftHeadingLevelBy] = arg;
                break;
            case "--include-in-header":
            case "--include-before-body":
            case "--include-after-body":
                {
                    const include = arg.replace("^--", "");
                    const includeFlags = flags;
                    includeFlags[include] = includeFlags[include] || [];
                    arg = argsStack.shift();
                    includeFlags[include].push(arg);
                    break;
                }
            case "--mathjax":
                flags.mathjax = true;
                arg = argsStack.shift();
                break;
            case "--katex":
                flags.katex = true;
                arg = argsStack.shift();
                break;
            case "--mathml":
                flags.mathml = true;
                arg = argsStack.shift();
                break;
            case "--gladtex":
                flags.gladtex = true;
                arg = argsStack.shift();
                break;
            case "--webtex":
                flags.webtex = true;
                arg = argsStack.shift();
                break;
            case "--execute":
                flags.execute = true;
                arg = argsStack.shift();
                break;
            case "--no-execute":
                flags.execute = false;
                arg = argsStack.shift();
                break;
            case "--execute-params":
                arg = argsStack.shift();
                flags.paramsFile = arg;
                break;
            case "--execute-dir":
                arg = argsStack.shift();
                if (arg) {
                    if (isAbsolute2(arg)) {
                        flags.executeDir = arg;
                    } else {
                        flags.executeDir = Deno.realPathSync(arg);
                    }
                }
                break;
            case "--execute-daemon":
                arg = argsStack.shift();
                flags.executeDaemon = parseInt(arg, 10);
                if (isNaN(flags.executeDaemon)) {
                    delete flags.executeDaemon;
                }
                break;
            case "--no-execute-daemon":
                arg = argsStack.shift();
                flags.executeDaemon = 0;
                break;
            case "--execute-daemon-restart":
                arg = argsStack.shift();
                flags.executeDaemonRestart = true;
                break;
            case "--execute-debug":
                arg = argsStack.shift();
                flags.executeDebug = true;
                break;
            case "--use-freezer":
                arg = argsStack.shift();
                flags.useFreezer = true;
                break;
            case "--cache":
                arg = argsStack.shift();
                flags.executeCache = true;
                break;
            case "--no-cache":
                arg = argsStack.shift();
                flags.executeCache = false;
                break;
            case "--cache-refresh":
                arg = argsStack.shift();
                flags.executeCache = "refresh";
                break;
            case "--clean":
                arg = argsStack.shift();
                flags.clean = true;
                break;
            case "--no-clean":
                arg = argsStack.shift();
                flags.clean = false;
                break;
            case "--debug":
                flags.debug = true;
                arg = argsStack.shift();
                break;
            case "-P":
            case "--execute-param":
                arg = argsStack.shift();
                if (arg) {
                    const param = parseMetadataFlagValue(arg);
                    if (param) {
                        if (param.value !== undefined) {
                            flags.params = flags.params || {};
                            flags.params[param.name] = param.value;
                        }
                    }
                }
                break;
            case "-M":
            case "--metadata":
                arg = argsStack.shift();
                if (arg) {
                    const metadata = parseMetadataFlagValue(arg);
                    if (metadata) {
                        if (metadata.value !== undefined) {
                            if (isQuartoMetadata(metadata.name)) {
                                flags.metadata = flags.metadata || {};
                                flags.metadata[metadata.name] = metadata.value;
                            } else {
                                flags.pandocMetadata = flags.pandocMetadata || {};
                                flags.pandocMetadata[metadata.name] = metadata.value;
                            }
                        }
                    }
                }
                break;
            case "--metadata-file":
                arg = argsStack.shift();
                if (arg) {
                    if (existsSync(arg)) {
                        const metadata1 = await readYamlFromString(Deno.readTextFileSync(arg));
                        flags.metadata = {
                            ...flags.metadata,
                            ...metadata1
                        };
                    }
                }
                break;
            case "--reference-location":
                arg = argsStack.shift();
                if (arg) {
                    flags[kReferenceLocation] = arg;
                }
                break;
            default:
                arg = argsStack.shift();
                break;
        }
    }
    if (flags.clean === undefined) {
        flags.clean = true;
    }
    return flags;
}
function havePandocArg(pandocArgs, arg) {
    return pandocArgs.indexOf(arg) !== -1;
}
function replacePandocArg(pandocArgs, arg, value) {
    const newArgs = [
        ...pandocArgs
    ];
    const argIndex = pandocArgs.indexOf(arg);
    if (argIndex !== -1) {
        newArgs[argIndex + 1] = value;
    } else {
        newArgs.push(arg);
        newArgs.push(value);
    }
    return newArgs;
}
function getPandocArg(pandocArgs, arg) {
    const argIndex = pandocArgs.indexOf(arg);
    if (argIndex !== -1 && argIndex + 1 < pandocArgs.length) {
        return pandocArgs[argIndex + 1];
    } else {
        return undefined;
    }
}
function replacePandocOutputArg(pandocArgs, output) {
    if (havePandocArg(pandocArgs, "--output")) {
        return replacePandocArg(pandocArgs, "--output", output);
    } else if (havePandocArg(pandocArgs, "-o")) {
        return replacePandocArg(pandocArgs, "-o", output);
    } else {
        return pandocArgs;
    }
}
function fixupPandocArgs(pandocArgs, flags) {
    pandocArgs = pandocArgs.reduce((args, arg, index)=>{
        args.push(arg);
        if (flags.output === kStdOut && pandocArgs[index + 1] !== kStdOut && (arg === "-o" || arg === "--output")) {
            args.push(kStdOut);
        }
        return args;
    }, new Array());
    const removeArgs = new Map();
    removeArgs.set("--output-dir", true);
    removeArgs.set("--site-url", true);
    removeArgs.set("--execute", false);
    removeArgs.set("--no-execute", false);
    removeArgs.set("-P", true);
    removeArgs.set("--execute-param", true);
    removeArgs.set("--execute-params", true);
    removeArgs.set("--execute-dir", true);
    removeArgs.set("--execute-daemon", true);
    removeArgs.set("--no-execute-daemon", false);
    removeArgs.set("--execute-daemon-restart", false);
    removeArgs.set("--execute-debug", false);
    removeArgs.set("--use-freezer", false);
    removeArgs.set("--cache", false);
    removeArgs.set("--no-cache", false);
    removeArgs.set("--cache-refresh", false);
    removeArgs.set("--clean", false);
    removeArgs.set("--no-clean", false);
    removeArgs.set("--debug", false);
    removeArgs.set("--metadata-file", true);
    removeArgs.set("--latex-makeindex-opt", true);
    removeArgs.set("--latex-tlmgr-opt", true);
    removeArgs.set("--log", true);
    removeArgs.set("--l", true);
    removeArgs.set("--log-level", true);
    removeArgs.set("--ll", true);
    removeArgs.set("--log-format", true);
    removeArgs.set("--lf", true);
    removeArgs.set("--quiet", false);
    removeArgs.set("--q", false);
    removeArgs.set("--profile", true);
    pandocArgs = removePandocArgs(pandocArgs, removeArgs);
    return removeQuartoMetadataFlags(pandocArgs);
}
function removePandocArgs(pandocArgs, removeArgs) {
    let removeNext = false;
    return pandocArgs.reduce((args, arg)=>{
        if (!removeArgs.has(arg)) {
            if (!removeNext) {
                args.push(arg);
            }
            removeNext = false;
        } else {
            removeNext = removeArgs.get(arg);
        }
        return args;
    }, new Array());
}
function removePandocToArg(args) {
    const removeArgs = new Map();
    removeArgs.set("--to", true);
    removeArgs.set("-t", true);
    return removePandocArgs(args, removeArgs);
}
function removePandocTo(renderOptions) {
    renderOptions = cloneDeep1(renderOptions);
    delete renderOptions.flags?.to;
    if (renderOptions.pandocArgs) {
        renderOptions.pandocArgs = removePandocToArg(renderOptions.pandocArgs);
    }
    return renderOptions;
}
function removeQuartoMetadataFlags(pandocArgs) {
    const args = [];
    for(let i1 = 0; i1 < pandocArgs.length; i1++){
        const arg = pandocArgs[i1];
        if (arg === "--metadata" || arg === "-M") {
            const flagValue = parseMetadataFlagValue(pandocArgs[i1 + 1] || "");
            if (flagValue !== undefined && (isQuartoMetadata(flagValue.name) || kQuartoForwardedMetadataFields.includes(flagValue.name))) {
                i1++;
            } else {
                args.push(arg);
            }
        } else {
            args.push(arg);
        }
    }
    return args;
}
const kQuartoForwardedMetadataFields = [
    kAuthor,
    kDate
];
function parseMetadataFlagValue(arg) {
    const match = arg.match(/^([^=:]+)[=:](.*)$/);
    if (match) {
        return {
            name: match[1],
            value: readYamlFromString(match[2])
        };
    }
    return undefined;
}
function resolveParams(params, paramsFile) {
    if (params || paramsFile) {
        params = params || {};
        if (paramsFile) {
            params = mergeConfigs(readYaml(paramsFile), params);
        }
        return params;
    } else {
        return undefined;
    }
}
function parseNumbers(flag, value) {
    if (value) {
        const numbers = value.split(/,/).map((number)=>parseInt(number.trim(), 10)).filter((number)=>!isNaN(number));
        if (numbers.length > 0) {
            return numbers;
        }
    }
    throw new Error(`Invalid value for ${flag} (should be a comma separated list of numbers)`);
}
const importMeta = {
    url: "file:///home/runner/work/quarto-cli/quarto-cli/src/vendor/deno.land/x/deno_dom@v0.1.20-alpha/build/deno-wasm/deno-wasm.js",
    main: false
};
let wasm;
let WASM_VECTOR_LEN = 0;
let cachegetUint8Memory0 = null;
function getUint8Memory0() {
    if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
        cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
    }
    return cachegetUint8Memory0;
}
let cachedTextEncoder = new TextEncoder('utf-8');
const encodeString = typeof cachedTextEncoder.encodeInto === 'function' ? function(arg, view) {
    return cachedTextEncoder.encodeInto(arg, view);
} : function(arg, view) {
    const buf = cachedTextEncoder.encode(arg);
    view.set(buf);
    return {
        read: arg.length,
        written: buf.length
    };
};
function passStringToWasm0(arg, malloc, realloc) {
    if (realloc === undefined) {
        const buf = cachedTextEncoder.encode(arg);
        const ptr = malloc(buf.length);
        getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
        WASM_VECTOR_LEN = buf.length;
        return ptr;
    }
    let len = arg.length;
    let ptr1 = malloc(len);
    const mem = getUint8Memory0();
    let offset = 0;
    for(; offset < len; offset++){
        const code = arg.charCodeAt(offset);
        if (code > 0x7F) break;
        mem[ptr1 + offset] = code;
    }
    if (offset !== len) {
        if (offset !== 0) {
            arg = arg.slice(offset);
        }
        ptr1 = realloc(ptr1, len, len = offset + arg.length * 3);
        const view = getUint8Memory0().subarray(ptr1 + offset, ptr1 + len);
        const ret = encodeString(arg, view);
        offset += ret.written;
    }
    WASM_VECTOR_LEN = offset;
    return ptr1;
}
let cachegetInt32Memory0 = null;
function getInt32Memory0() {
    if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
        cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
    }
    return cachegetInt32Memory0;
}
let cachedTextDecoder = new TextDecoder('utf-8', {
    ignoreBOM: true,
    fatal: true
});
cachedTextDecoder.decode();
function getStringFromWasm0(ptr, len) {
    return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
function parse5(html) {
    try {
        const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
        var ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
        var len0 = WASM_VECTOR_LEN;
        wasm.parse(retptr, ptr0, len0);
        var r0 = getInt32Memory0()[retptr / 4 + 0];
        var r1 = getInt32Memory0()[retptr / 4 + 1];
        return getStringFromWasm0(r0, r1);
    } finally{
        wasm.__wbindgen_add_to_stack_pointer(16);
        wasm.__wbindgen_free(r0, r1);
    }
}
function parse_frag(html) {
    try {
        const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
        var ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
        var len0 = WASM_VECTOR_LEN;
        wasm.parse_frag(retptr, ptr0, len0);
        var r0 = getInt32Memory0()[retptr / 4 + 0];
        var r1 = getInt32Memory0()[retptr / 4 + 1];
        return getStringFromWasm0(r0, r1);
    } finally{
        wasm.__wbindgen_add_to_stack_pointer(16);
        wasm.__wbindgen_free(r0, r1);
    }
}
async function load2(module, imports) {
    if (typeof Response === 'function' && module instanceof Response) {
        if (typeof WebAssembly.instantiateStreaming === 'function') {
            try {
                return await WebAssembly.instantiateStreaming(module, imports);
            } catch (e) {
                if (module.headers.get('Content-Type') != 'application/wasm') {
                    console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
                } else {
                    throw e;
                }
            }
        }
        const bytes = await module.arrayBuffer();
        return await WebAssembly.instantiate(bytes, imports);
    } else {
        const instance = await WebAssembly.instantiate(module, imports);
        if (instance instanceof WebAssembly.Instance) {
            return {
                instance,
                module
            };
        } else {
            return instance;
        }
    }
}
async function init(input) {
    if (typeof input === 'undefined') {
        input = new URL('deno-wasm_bg.wasm', importMeta.url);
    }
    const imports = {};
    imports.env = {
        now () {}
    };
    input = Uint8Array.from(atob("[encoded data, 751416 characters]"), (c)=>c.charCodeAt(0));
    const { instance , module  } = await load2(input, imports);
    wasm = instance.exports;
    init.__wbindgen_wasm_module = module;
    return wasm;
}
let parse6 = (_html)=>{
    console.error("Error: deno-dom: No parser registered");
    Deno.exit(1);
};
let parseFrag = (_html)=>{
    console.error("Error: deno-dom: No parser registered");
    Deno.exit(1);
};
const originalParse = parse6;
function register(func, fragFunc) {
    if (parse6 !== originalParse) {
        return;
    }
    parse6 = func;
    parseFrag = fragFunc;
}
(()=>{
    return class HTMLCollection {
        constructor(){
            throw new TypeError("Illegal constructor");
        }
        static [Symbol.hasInstance](value) {
            return value.constructor === HTMLCollectionClass;
        }
    };
})();
const HTMLCollectionMutatorSym = Symbol();
const HTMLCollectionClass = (()=>{
    class HTMLCollection extends Array {
        forEach(cb, thisArg = undefined) {
            super.forEach(cb, thisArg);
        }
        item(index) {
            return this[index] ?? null;
        }
        [HTMLCollectionMutatorSym]() {
            return {
                push: Array.prototype.push.bind(this),
                splice: Array.prototype.splice.bind(this),
                indexOf: Array.prototype.indexOf.bind(this)
            };
        }
        toString() {
            return "[object HTMLCollection]";
        }
    }
    return HTMLCollection;
})();
for (const staticMethod of [
    "from",
    "isArray",
    "of", 
]){
    HTMLCollectionClass[staticMethod] = undefined;
}
for (const instanceMethod of [
    "concat",
    "copyWithin",
    "every",
    "fill",
    "filter",
    "find",
    "findIndex",
    "flat",
    "flatMap",
    "includes",
    "indexOf",
    "join",
    "lastIndexOf",
    "map",
    "pop",
    "push",
    "reduce",
    "reduceRight",
    "reverse",
    "shift",
    "slice",
    "some",
    "sort",
    "splice",
    "toLocaleString",
    "unshift",
    "entries",
    "forEach",
    "keys",
    "values", 
]){
    HTMLCollectionClass.prototype[instanceMethod] = undefined;
}
const HTMLCollection = HTMLCollectionClass;
const CTOR_KEY = Symbol();
class EventTarget {
    addEventListener() {}
    removeEventListener() {}
    dispatchEvent() {}
}
(()=>{
    return class NodeList {
        constructor(){
            throw new TypeError("Illegal constructor");
        }
        static [Symbol.hasInstance](value) {
            return value.constructor === NodeListClass;
        }
    };
})();
var NodeType;
(function(NodeType) {
    NodeType[NodeType["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
    NodeType[NodeType["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE";
    NodeType[NodeType["TEXT_NODE"] = 3] = "TEXT_NODE";
    NodeType[NodeType["CDATA_SECTION_NODE"] = 4] = "CDATA_SECTION_NODE";
    NodeType[NodeType["ENTITY_REFERENCE_NODE"] = 5] = "ENTITY_REFERENCE_NODE";
    NodeType[NodeType["ENTITY_NODE"] = 6] = "ENTITY_NODE";
    NodeType[NodeType["PROCESSING_INSTRUCTION_NODE"] = 7] = "PROCESSING_INSTRUCTION_NODE";
    NodeType[NodeType["COMMENT_NODE"] = 8] = "COMMENT_NODE";
    NodeType[NodeType["DOCUMENT_NODE"] = 9] = "DOCUMENT_NODE";
    NodeType[NodeType["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE";
    NodeType[NodeType["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE";
    NodeType[NodeType["NOTATION_NODE"] = 12] = "NOTATION_NODE";
})(NodeType || (NodeType = {}));
const nodesAndTextNodes = (nodes, parentNode)=>{
    return nodes.map((n)=>{
        const node = n instanceof Node ? n : new Text("" + n);
        node.remove();
        node._setParent(parentNode, true);
        return node;
    });
};
const nodeListMutatorSym = Symbol();
const nodeListCachedMutator = Symbol();
const { push: push1 , splice: splice1 , slice , indexOf , filter  } = Array.prototype;
class Node extends EventTarget {
    nodeValue;
    childNodes;
    parentNode;
    parentElement;
    #childNodesMutator;
    #ownerDocument;
    _ancestors;
    static ELEMENT_NODE = NodeType.ELEMENT_NODE;
    static ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE;
    static TEXT_NODE = NodeType.TEXT_NODE;
    static CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE;
    static ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE;
    static ENTITY_NODE = NodeType.ENTITY_NODE;
    static PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE;
    static COMMENT_NODE = NodeType.COMMENT_NODE;
    static DOCUMENT_NODE = NodeType.DOCUMENT_NODE;
    static DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE;
    static DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE;
    static NOTATION_NODE = NodeType.NOTATION_NODE;
    constructor(nodeName, nodeType, parentNode, key){
        if (key !== CTOR_KEY) {
            throw new TypeError("Illegal constructor.");
        }
        super();
        this.nodeName = nodeName;
        this.nodeType = nodeType;
        this.parentNode = null;
        this.#ownerDocument = null;
        this._ancestors = new Set();
        this.nodeValue = null;
        this.childNodes = new NodeList();
        this.#childNodesMutator = this.childNodes[nodeListMutatorSym]();
        this.parentElement = parentNode;
        if (parentNode) {
            parentNode.appendChild(this);
        }
    }
    _getChildNodesMutator() {
        return this.#childNodesMutator;
    }
    _setParent(newParent, force = false) {
        const sameParent = this.parentNode === newParent;
        const shouldUpdateParentAndAncestors = !sameParent || force;
        if (shouldUpdateParentAndAncestors) {
            this.parentNode = newParent;
            if (newParent) {
                if (!sameParent) {
                    if (newParent.nodeType === NodeType.ELEMENT_NODE) {
                        this.parentElement = newParent;
                    } else {
                        this.parentElement = null;
                    }
                    this._setOwnerDocument(newParent.#ownerDocument);
                }
                this._ancestors = new Set(newParent._ancestors);
                this._ancestors.add(newParent);
            } else {
                this.parentElement = null;
                this._ancestors.clear();
            }
            for (const child of this.childNodes){
                child._setParent(this, shouldUpdateParentAndAncestors);
            }
        }
    }
    _assertNotAncestor(child) {
        if (child.contains(this)) {
            throw new DOMException("The new child is an ancestor of the parent");
        }
    }
    _setOwnerDocument(document1) {
        if (this.#ownerDocument !== document1) {
            this.#ownerDocument = document1;
            for (const child of this.childNodes){
                child._setOwnerDocument(document1);
            }
        }
    }
    contains(child) {
        return child._ancestors.has(this) || child === this;
    }
    get ownerDocument() {
        return this.#ownerDocument;
    }
    get textContent() {
        let out = "";
        for (const child of this.childNodes){
            switch(child.nodeType){
                case NodeType.TEXT_NODE:
                    out += child.nodeValue;
                    break;
                case NodeType.ELEMENT_NODE:
                    out += child.textContent;
                    break;
            }
        }
        return out;
    }
    set textContent(content) {
        for (const child of this.childNodes){
            child._setParent(null);
        }
        this._getChildNodesMutator().splice(0, this.childNodes.length);
        this.appendChild(new Text(content));
    }
    get firstChild() {
        return this.childNodes[0] || null;
    }
    get lastChild() {
        return this.childNodes[this.childNodes.length - 1] || null;
    }
    hasChildNodes() {
        return this.firstChild !== null;
    }
    cloneNode(deep = false) {
        const copy = this._shallowClone();
        copy._setOwnerDocument(this.ownerDocument);
        if (deep) {
            for (const child of this.childNodes){
                copy.appendChild(child.cloneNode(true));
            }
        }
        return copy;
    }
    _shallowClone() {
        throw new Error("Illegal invocation");
    }
    remove() {
        const parent = this.parentNode;
        if (parent) {
            const nodeList = parent._getChildNodesMutator();
            const idx = nodeList.indexOf(this);
            nodeList.splice(idx, 1);
            this._setParent(null);
        }
    }
    appendChild(child) {
        return child._appendTo(this);
    }
    _appendTo(parentNode) {
        parentNode._assertNotAncestor(this);
        const oldParentNode = this.parentNode;
        if (oldParentNode === parentNode) {
            if (parentNode._getChildNodesMutator().indexOf(this) !== -1) {
                return this;
            }
        } else if (oldParentNode) {
            this.remove();
        }
        this._setParent(parentNode, true);
        parentNode._getChildNodesMutator().push(this);
        return this;
    }
    removeChild(child) {
        if (child && typeof child === "object") {
            if (child.parentNode === this) {
                return child.remove();
            } else {
                throw new DOMException("Node.removeChild: The node to be removed is not a child of this node");
            }
        } else {
            throw new TypeError("Node.removeChild: Argument 1 is not an object.");
        }
    }
    replaceChild(newChild, oldChild) {
        if (oldChild.parentNode !== this) {
            throw new Error("Old child's parent is not the current node.");
        }
        oldChild.replaceWith(newChild);
        return oldChild;
    }
    insertBeforeAfter(nodes, side) {
        const parentNode = this.parentNode;
        const mutator = parentNode._getChildNodesMutator();
        const index = mutator.indexOf(this);
        nodes = nodesAndTextNodes(nodes, parentNode);
        mutator.splice(index + side, 0, ...nodes);
    }
    before(...nodes) {
        if (this.parentNode) {
            this.insertBeforeAfter(nodes, 0);
        }
    }
    after(...nodes) {
        if (this.parentNode) {
            this.insertBeforeAfter(nodes, 1);
        }
    }
    insertBefore(newNode, refNode) {
        this._assertNotAncestor(newNode);
        const mutator = this._getChildNodesMutator();
        if (refNode === null) {
            this.appendChild(newNode);
            return newNode;
        }
        const index = mutator.indexOf(refNode);
        if (index === -1) {
            throw new Error("DOMException: Child to insert before is not a child of this node");
        }
        const oldParentNode = newNode.parentNode;
        newNode._setParent(this, oldParentNode !== this);
        mutator.splice(index, 0, newNode);
        return newNode;
    }
    replaceWith(...nodes) {
        if (this.parentNode) {
            const parentNode = this.parentNode;
            const mutator = parentNode._getChildNodesMutator();
            const index = mutator.indexOf(this);
            nodes = nodesAndTextNodes(nodes, parentNode);
            mutator.splice(index, 1, ...nodes);
            this._setParent(null);
        }
    }
    get nextSibling() {
        const parent = this.parentNode;
        if (!parent) {
            return null;
        }
        const index = parent._getChildNodesMutator().indexOf(this);
        const next = parent.childNodes[index + 1] || null;
        return next;
    }
    get previousSibling() {
        const parent = this.parentNode;
        if (!parent) {
            return null;
        }
        const index = parent._getChildNodesMutator().indexOf(this);
        const prev = parent.childNodes[index - 1] || null;
        return prev;
    }
    static DOCUMENT_POSITION_DISCONNECTED = 1;
    static DOCUMENT_POSITION_PRECEDING = 2;
    static DOCUMENT_POSITION_FOLLOWING = 4;
    static DOCUMENT_POSITION_CONTAINS = 8;
    static DOCUMENT_POSITION_CONTAINED_BY = 16;
    static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
    compareDocumentPosition(other) {
        if (other === this) {
            return 0;
        }
        if (!(other instanceof Node)) {
            throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");
        }
        let node1Root = other;
        let node2Root = this;
        const node1Hierarchy = [
            node1Root
        ];
        const node2Hierarchy = [
            node2Root
        ];
        while(node1Root.parentNode ?? node2Root.parentNode){
            node1Root = node1Root.parentNode ? (node1Hierarchy.push(node1Root.parentNode), node1Root.parentNode) : node1Root;
            node2Root = node2Root.parentNode ? (node2Hierarchy.push(node2Root.parentNode), node2Root.parentNode) : node2Root;
        }
        if (node1Root !== node2Root) {
            return Node.DOCUMENT_POSITION_DISCONNECTED | Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | Node.DOCUMENT_POSITION_PRECEDING;
        }
        const longerHierarchy = node1Hierarchy.length > node2Hierarchy.length ? node1Hierarchy : node2Hierarchy;
        const shorterHierarchy = longerHierarchy === node1Hierarchy ? node2Hierarchy : node1Hierarchy;
        if (longerHierarchy[longerHierarchy.length - shorterHierarchy.length] === shorterHierarchy[0]) {
            return longerHierarchy === node1Hierarchy ? Node.DOCUMENT_POSITION_CONTAINED_BY | Node.DOCUMENT_POSITION_FOLLOWING : Node.DOCUMENT_POSITION_CONTAINS | Node.DOCUMENT_POSITION_PRECEDING;
        }
        const longerStart = longerHierarchy.length - shorterHierarchy.length;
        for(let i1 = shorterHierarchy.length - 1; i1 >= 0; i1--){
            const shorterHierarchyNode = shorterHierarchy[i1];
            const longerHierarchyNode = longerHierarchy[longerStart + i1];
            if (longerHierarchyNode !== shorterHierarchyNode) {
                const siblings = shorterHierarchyNode.parentNode._getChildNodesMutator();
                if (siblings.indexOf(shorterHierarchyNode) < siblings.indexOf(longerHierarchyNode)) {
                    if (shorterHierarchy === node1Hierarchy) {
                        return Node.DOCUMENT_POSITION_PRECEDING;
                    } else {
                        return Node.DOCUMENT_POSITION_FOLLOWING;
                    }
                } else {
                    if (longerHierarchy === node1Hierarchy) {
                        return Node.DOCUMENT_POSITION_PRECEDING;
                    } else {
                        return Node.DOCUMENT_POSITION_FOLLOWING;
                    }
                }
            }
        }
        return Node.DOCUMENT_POSITION_FOLLOWING;
    }
    nodeName;
    nodeType;
}
Node.prototype.ELEMENT_NODE = NodeType.ELEMENT_NODE;
Node.prototype.ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE;
Node.prototype.TEXT_NODE = NodeType.TEXT_NODE;
Node.prototype.CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE;
Node.prototype.ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE;
Node.prototype.ENTITY_NODE = NodeType.ENTITY_NODE;
Node.prototype.PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE;
Node.prototype.COMMENT_NODE = NodeType.COMMENT_NODE;
Node.prototype.DOCUMENT_NODE = NodeType.DOCUMENT_NODE;
Node.prototype.DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE;
Node.prototype.DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE;
Node.prototype.NOTATION_NODE = NodeType.NOTATION_NODE;
class NodeListMutatorImpl {
    elementViews;
    constructor(arrayInstance){
        this.arrayInstance = arrayInstance;
        this.elementViews = [];
    }
    push(...items) {
        for (const view of this.elementViews){
            for (const item of items){
                if (item.nodeType === Node.ELEMENT_NODE) {
                    push1.call(view, item);
                }
            }
        }
        return push1.call(this.arrayInstance, ...items);
    }
    splice(index, deleteCount = 0, ...items) {
        for (const view of this.elementViews){
            const toDelete = filter.call(slice.call(this.arrayInstance, index, index + deleteCount), (item)=>item.nodeType === Node.ELEMENT_NODE);
            const toInsert = items.filter((item)=>item.nodeType === Node.ELEMENT_NODE);
            let elementViewSpliceIndex = -1;
            for(let idx = index; idx < this.arrayInstance.length; idx++){
                const item = this.arrayInstance[idx];
                if (item.nodeType === Node.ELEMENT_NODE) {
                    elementViewSpliceIndex = indexOf.call(view, item);
                    break;
                }
            }
            if (elementViewSpliceIndex === -1) {
                elementViewSpliceIndex = view.length;
            }
            if (toDelete.length) {
                splice1.call(view, elementViewSpliceIndex, toDelete.length);
            }
            splice1.call(view, elementViewSpliceIndex, 0, ...toInsert);
        }
        return splice1.call(this.arrayInstance, index, deleteCount, ...items);
    }
    indexOf(item) {
        return indexOf.call(this.arrayInstance, item);
    }
    elementsView() {
        let view = this.elementViews[0];
        if (!view) {
            view = new HTMLCollection();
            this.elementViews.push(view);
            push1.call(view, ...filter.call(this.arrayInstance, (item)=>item.nodeType === Node.ELEMENT_NODE));
        }
        return view;
    }
    arrayInstance;
}
const NodeListClass = (()=>{
    class NodeList extends Array {
        forEach(cb, thisArg = undefined) {
            super.forEach(cb, thisArg);
        }
        item(index) {
            return this[index] ?? null;
        }
        [nodeListMutatorSym]() {
            const cachedMutator = this[nodeListCachedMutator];
            if (cachedMutator) {
                return cachedMutator;
            } else {
                const cachedMutator1 = new NodeListMutatorImpl(this);
                this[nodeListCachedMutator] = cachedMutator1;
                return cachedMutator1;
            }
        }
        toString() {
            return "[object NodeList]";
        }
    }
    return NodeList;
})();
for (const staticMethod1 of [
    "from",
    "isArray",
    "of", 
]){
    NodeListClass[staticMethod1] = undefined;
}
for (const instanceMethod1 of [
    "concat",
    "copyWithin",
    "every",
    "fill",
    "filter",
    "find",
    "findIndex",
    "flat",
    "flatMap",
    "includes",
    "indexOf",
    "join",
    "lastIndexOf",
    "map",
    "pop",
    "push",
    "reduce",
    "reduceRight",
    "reverse",
    "shift",
    "slice",
    "some",
    "sort",
    "splice",
    "toLocaleString",
    "unshift", 
]){
    NodeListClass.prototype[instanceMethod1] = undefined;
}
const NodeList = NodeListClass;
class CharacterData extends Node {
    constructor(data, nodeName, nodeType, parentNode, key){
        super(nodeName, nodeType, parentNode, key);
        this.data = data;
        this.nodeValue = data;
    }
    get length() {
        return this.data.length;
    }
    data;
}
class Text extends CharacterData {
    constructor(text = ""){
        super(text, "#text", NodeType.TEXT_NODE, null, CTOR_KEY);
        this.nodeValue = text;
    }
    _shallowClone() {
        return new Text(this.textContent);
    }
    get textContent() {
        return this.nodeValue;
    }
}
class Comment extends CharacterData {
    constructor(text = ""){
        super(text, "#comment", NodeType.COMMENT_NODE, null, CTOR_KEY);
        this.nodeValue = text;
    }
    _shallowClone() {
        return new Comment(this.textContent);
    }
    get textContent() {
        return this.nodeValue;
    }
}
const __default = (document1)=>{
    const NW = Factory({
        document: document1,
        DOMException
    }, "null");
    NW.configure({
        IDS_DUPES: false,
        LOGERRORS: false
    });
    return NW;
};
function Factory(global1, Export) {
    var version = 'nwsapi-2.2.0', doc = global1.document, root = doc.documentElement, slice = Array.prototype.slice, WSP = '[\\x20\\t\\r\\n\\f]', CFG = {
        operators: '[~*^$|]=|=',
        combinators: '[\\x20\\t>+~](?=[^>+~])'
    }, NOT = {
        double_enc: '(?=(?:[^"]*["][^"]*["])*[^"]*$)',
        single_enc: "(?=(?:[^']*['][^']*['])*[^']*$)",
        parens_enc: '(?![^\\x28]*\\x29)',
        square_enc: '(?![^\\x5b]*\\x5d)'
    }, REX = {
        HasEscapes: RegExp('\\\\'),
        HexNumbers: RegExp('^[0-9a-fA-F]'),
        EscOrQuote: RegExp('^\\\\|[\\x22\\x27]'),
        RegExpChar: RegExp('(?:(?!\\\\)[\\\\^$.*+?()[\\]{}|\\/])', 'g'),
        TrimSpaces: RegExp('[\\r\\n\\f]|^' + WSP + '+|' + WSP + '+$', 'g'),
        CommaGroup: RegExp('(\\s*,\\s*)' + NOT.square_enc + NOT.parens_enc, 'g'),
        SplitGroup: RegExp('((?:\\x28[^\\x29]*\\x29|\\[[^\\]]*\\]|\\\\.|[^,])+)', 'g'),
        FixEscapes: RegExp('\\\\([0-9a-fA-F]{1,6}' + WSP + '?|.)|([\\x22\\x27])', 'g'),
        CombineWSP: RegExp('[\\n\\r\\f\\x20]+' + NOT.single_enc + NOT.double_enc, 'g'),
        TabCharWSP: RegExp('(\\x20?\\t+\\x20?)' + NOT.single_enc + NOT.double_enc, 'g'),
        PseudosWSP: RegExp('\\s+([-+])\\s+' + NOT.square_enc, 'g')
    }, STD = {
        combinator: RegExp('\\s?([>+~])\\s?', 'g'),
        apimethods: RegExp('^(?:[a-z]+|\\*)\\|', 'i'),
        namespaces: RegExp('(\\*|[a-z]+)\\|[-a-z]+', 'i')
    }, GROUPS = {
        linguistic: '(dir|lang)\\x28\\s?([-\\w]{2,})\\s?(?:\\x29|$)',
        logicalsel: '(matches|not)\\x28\\s?([^()]*|[^\\x28]*\\x28[^\\x29]*\\x29)\\s?(?:\\x29|$)',
        treestruct: '(nth(?:-last)?(?:-child|-of-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?(?:\\x29|$))',
        locationpc: '(link|visited|target)\\b',
        useraction: '(hover|active|focus|focus-within)\\b',
        structural: '(root|empty|(?:(?:first|last|only)(?:-child|-of-type)))\\b',
        inputstate: '(enabled|disabled|read-only|read-write|placeholder-shown|default)\\b',
        inputvalue: '(checked|indeterminate|required|optional|valid|invalid|in-range|out-of-range)\\b',
        pseudo_sng: '(after|before|first-letter|first-line)\\b',
        pseudo_dbl: ':(after|before|first-letter|first-line|selection|placeholder|-webkit-[-a-zA-Z0-9]{2,})\\b'
    }, Patterns = {
        treestruct: RegExp('^:(?:' + GROUPS.treestruct + ')(.*)', 'i'),
        structural: RegExp('^:(?:' + GROUPS.structural + ')(.*)', 'i'),
        linguistic: RegExp('^:(?:' + GROUPS.linguistic + ')(.*)', 'i'),
        useraction: RegExp('^:(?:' + GROUPS.useraction + ')(.*)', 'i'),
        inputstate: RegExp('^:(?:' + GROUPS.inputstate + ')(.*)', 'i'),
        inputvalue: RegExp('^:(?:' + GROUPS.inputvalue + ')(.*)', 'i'),
        locationpc: RegExp('^:(?:' + GROUPS.locationpc + ')(.*)', 'i'),
        logicalsel: RegExp('^:(?:' + GROUPS.logicalsel + ')(.*)', 'i'),
        pseudo_dbl: RegExp('^:(?:' + GROUPS.pseudo_dbl + ')(.*)', 'i'),
        pseudo_sng: RegExp('^:(?:' + GROUPS.pseudo_sng + ')(.*)', 'i'),
        children: RegExp('^' + WSP + '?\\>' + WSP + '?(.*)'),
        adjacent: RegExp('^' + WSP + '?\\+' + WSP + '?(.*)'),
        relative: RegExp('^' + WSP + '?\\~' + WSP + '?(.*)'),
        ancestor: RegExp('^' + WSP + '+(.*)'),
        universal: RegExp('^\\*(.*)'),
        namespace: RegExp('^(\\w+|\\*)?\\|(.*)')
    }, RTL = RegExp('^[\\u0591-\\u08ff\\ufb1d-\\ufdfd\\ufe70-\\ufefc ]+$'), qsNotArgs = 'Not enough arguments', qsInvalid = ' is not a valid selector', reNthElem = RegExp('(:nth(?:-last)?-child)', 'i'), reNthType = RegExp('(:nth(?:-last)?-of-type)', 'i'), reOptimizer, reValidator, Config = {
        IDS_DUPES: true,
        MIXEDCASE: true,
        LOGERRORS: true,
        VERBOSITY: true
    }, NAMESPACE, QUIRKS_MODE, HTML_DOCUMENT, ATTR_STD_OPS = {
        '=': 1,
        '^=': 1,
        '$=': 1,
        '|=': 1,
        '*=': 1,
        '~=': 1
    }, HTML_TABLE = {
        'accept': 1,
        'accept-charset': 1,
        'align': 1,
        'alink': 1,
        'axis': 1,
        'bgcolor': 1,
        'charset': 1,
        'checked': 1,
        'clear': 1,
        'codetype': 1,
        'color': 1,
        'compact': 1,
        'declare': 1,
        'defer': 1,
        'dir': 1,
        'direction': 1,
        'disabled': 1,
        'enctype': 1,
        'face': 1,
        'frame': 1,
        'hreflang': 1,
        'http-equiv': 1,
        'lang': 1,
        'language': 1,
        'link': 1,
        'media': 1,
        'method': 1,
        'multiple': 1,
        'nohref': 1,
        'noresize': 1,
        'noshade': 1,
        'nowrap': 1,
        'readonly': 1,
        'rel': 1,
        'rev': 1,
        'rules': 1,
        'scope': 1,
        'scrolling': 1,
        'selected': 1,
        'shape': 1,
        'target': 1,
        'text': 1,
        'type': 1,
        'valign': 1,
        'valuetype': 1,
        'vlink': 1
    }, Combinators = {}, Selectors = {}, Operators = {
        '=': {
            p1: '^',
            p2: '$',
            p3: 'true'
        },
        '^=': {
            p1: '^',
            p2: '',
            p3: 'true'
        },
        '$=': {
            p1: '',
            p2: '$',
            p3: 'true'
        },
        '*=': {
            p1: '',
            p2: '',
            p3: 'true'
        },
        '|=': {
            p1: '^',
            p2: '(-|$)',
            p3: 'true'
        },
        '~=': {
            p1: '(^|\\s)',
            p2: '(\\s|$)',
            p3: 'true'
        }
    }, concatCall = function(nodes, callback) {
        var i1 = 0, l1 = nodes.length, list = Array(l1);
        while(l1 > i1){
            if (false === callback(list[i1] = nodes[i1])) break;
            ++i1;
        }
        return list;
    }, concatList = function(list, nodes) {
        var i1 = -1, l1 = nodes.length;
        while(l1--){
            list[list.length] = nodes[++i1];
        }
        return list;
    }, documentOrder = function(a, b) {
        if (!hasDupes && a === b) {
            hasDupes = true;
            return 0;
        }
        return a.compareDocumentPosition(b) & 4 ? -1 : 1;
    }, hasDupes = false, unique = function(nodes) {
        var i1 = 0, j = -1, l1 = nodes.length + 1, list = [];
        while(--l1){
            if (nodes[i1++] === nodes[i1]) continue;
            list[++j] = nodes[i1 - 1];
        }
        hasDupes = false;
        return list;
    }, hasMixedCaseTagNames = function(context) {
        var ns, api = 'getElementsByTagNameNS';
        context = context.ownerDocument || context;
        ns = context.documentElement.namespaceURI || 'http://www.w3.org/1999/xhtml';
        return context[api]('*', '*').length - context[api](ns, '*').length > 0;
    }, switchContext = function(context, force) {
        var oldDoc = doc;
        doc = context.ownerDocument || context;
        if (force || oldDoc !== doc) {
            root = doc.documentElement;
            HTML_DOCUMENT = isHTML(doc);
            QUIRKS_MODE = HTML_DOCUMENT && doc.compatMode.indexOf('CSS') < 0;
            NAMESPACE = root && root.namespaceURI;
            Snapshot.doc = doc;
            Snapshot.root = root;
        }
        return Snapshot.from = context;
    }, codePointToUTF16 = function(codePoint) {
        if (codePoint < 1 || codePoint > 0x10ffff || codePoint > 0xd7ff && codePoint < 0xe000) {
            return '\\ufffd';
        }
        if (codePoint < 0x10000) {
            var lowHex = '000' + codePoint.toString(16);
            return '\\u' + lowHex.substr(lowHex.length - 4);
        }
        return '\\u' + ((codePoint - 0x10000 >> 0x0a) + 0xd800).toString(16) + '\\u' + ((codePoint - 0x10000) % 0x400 + 0xdc00).toString(16);
    }, stringFromCodePoint = function(codePoint) {
        if (codePoint < 1 || codePoint > 0x10ffff || codePoint > 0xd7ff && codePoint < 0xe000) {
            return '\ufffd';
        }
        if (codePoint < 0x10000) {
            return String.fromCharCode(codePoint);
        }
        return String.fromCodePoint ? String.fromCodePoint(codePoint) : String.fromCharCode((codePoint - 0x10000 >> 0x0a) + 0xd800, (codePoint - 0x10000) % 0x400 + 0xdc00);
    }, convertEscapes = function(str) {
        return REX.HasEscapes.test(str) ? str.replace(REX.FixEscapes, function(substring, p1, p2) {
            return p2 ? '\\' + p2 : REX.HexNumbers.test(p1) ? codePointToUTF16(parseInt(p1, 16)) : REX.EscOrQuote.test(p1) ? substring : p1;
        }) : str;
    }, unescapeIdentifier = function(str) {
        return REX.HasEscapes.test(str) ? str.replace(REX.FixEscapes, function(substring, p1, p2) {
            return p2 ? p2 : REX.HexNumbers.test(p1) ? stringFromCodePoint(parseInt(p1, 16)) : REX.EscOrQuote.test(p1) ? substring : p1;
        }) : str;
    }, method = {
        '#': 'getElementById',
        '*': 'getElementsByTagNameNS',
        '.': 'getElementsByClassName'
    }, compat = {
        '#': function(c, n) {
            REX.HasEscapes.test(n) && (n = unescapeIdentifier(n));
            return function(e, f) {
                return byId(n, c);
            };
        },
        '*': function(c, n) {
            REX.HasEscapes.test(n) && (n = unescapeIdentifier(n));
            return function(e, f) {
                return byTag(n, c);
            };
        },
        '.': function(c, n) {
            REX.HasEscapes.test(n) && (n = unescapeIdentifier(n));
            return function(e, f) {
                return byClass(n, c);
            };
        }
    }, byIdRaw = function(id, context) {
        var node = context, nodes = [], next = node.firstElementChild;
        while(node = next){
            node.id == id && (nodes[nodes.length] = node);
            if (next = node.firstElementChild || node.nextElementSibling) continue;
            while(!next && (node = node.parentElement) && node !== context){
                next = node.nextElementSibling;
            }
        }
        return nodes;
    }, byId = function(id, context) {
        var e, nodes, api = method['#'];
        if (Config.IDS_DUPES === false) {
            if (api in context) {
                return (e = context[api](id)) ? [
                    e
                ] : none;
            }
        } else {
            if ('all' in context) {
                if (e = context.all[id]) {
                    if (e.nodeType == 1) return e.getAttribute('id') != id ? [] : [
                        e
                    ];
                    else if (id == 'length') return (e = context[api](id)) ? [
                        e
                    ] : none;
                    for(i = 0, l = e.length, nodes = []; l > i; ++i){
                        if (e[i].id == id) nodes[nodes.length] = e[i];
                    }
                    return nodes && nodes.length ? nodes : [
                        nodes
                    ];
                } else return none;
            }
        }
        return byIdRaw(id, context);
    }, byTag = function(tag, context) {
        var e, nodes, api = method['*'];
        if (api in context) {
            return slice.call(context[api]('*', tag));
        } else {
            if (e = context.firstElementChild) {
                tag = tag.toLowerCase();
                if (!(e.nextElementSibling || tag == '*' || e.nodeName.toLowerCase() == tag)) {
                    return slice.call(e[api]('*', tag));
                } else {
                    nodes = [];
                    do {
                        if (tag == '*' || e.nodeName.toLowerCase() == tag) nodes[nodes.length] = e;
                        concatList(nodes, e[api]('*', tag));
                    }while (e = e.nextElementSibling)
                }
            } else nodes = none;
        }
        return nodes;
    }, byClass = function(cls, context) {
        var e, nodes, api = method['.'], reCls;
        if (api in context) {
            return slice.call(context[api](cls));
        } else {
            if (e = context.firstElementChild) {
                reCls = RegExp('(^|\\s)' + cls + '(\\s|$)', QUIRKS_MODE ? 'i' : '');
                if (!(e.nextElementSibling || reCls.test(e.className))) {
                    return slice.call(e[api](cls));
                } else {
                    nodes = [];
                    do {
                        if (reCls.test(e.className)) nodes[nodes.length] = e;
                        concatList(nodes, e[api](cls));
                    }while (e = e.nextElementSibling)
                }
            } else nodes = none;
        }
        return nodes;
    }, hasAttributeNS = function(e, name) {
        var i1, l1, attr = e.getAttributeNames();
        name = RegExp(':?' + name + '$', HTML_DOCUMENT ? 'i' : '');
        for(i1 = 0, l1 = attr.length; l1 > i1; ++i1){
            if (name.test(attr[i1])) return true;
        }
        return false;
    }, nthElement = function() {
        var idx = 0, len = 0, set = 0, parent = undefined, parents = Array(), nodes = Array();
        return function(element, dir) {
            if (dir == 2) {
                idx = 0;
                len = 0;
                set = 0;
                nodes.length = 0;
                parents.length = 0;
                parent = undefined;
                return -1;
            }
            var e, i1, j, k, l1;
            if (parent === element.parentElement) {
                i1 = set;
                j = idx;
                l1 = len;
            } else {
                l1 = parents.length;
                parent = element.parentElement;
                for(i1 = -1, j = 0, k = l1 - 1; l1 > j; ++j, --k){
                    if (parents[j] === parent) {
                        i1 = j;
                        break;
                    }
                    if (parents[k] === parent) {
                        i1 = k;
                        break;
                    }
                }
                if (i1 < 0) {
                    parents[i1 = l1] = parent;
                    l1 = 0;
                    nodes[i1] = Array();
                    e = parent && parent.firstElementChild || element;
                    while(e){
                        nodes[i1][l1] = e;
                        if (e === element) j = l1;
                        e = e.nextElementSibling;
                        ++l1;
                    }
                    set = i1;
                    idx = 0;
                    len = l1;
                    if (l1 < 2) return l1;
                } else {
                    l1 = nodes[i1].length;
                    set = i1;
                }
            }
            if (element !== nodes[i1][j] && element !== nodes[i1][j = 0]) {
                for(j = 0, e = nodes[i1], k = l1 - 1; l1 > j; ++j, --k){
                    if (e[j] === element) {
                        break;
                    }
                    if (e[k] === element) {
                        j = k;
                        break;
                    }
                }
            }
            idx = j + 1;
            len = l1;
            return dir ? l1 - j : idx;
        };
    }(), nthOfType = function() {
        var idx = 0, len = 0, set = 0, parent = undefined, parents = Array(), nodes = Array();
        return function(element, dir) {
            if (dir == 2) {
                idx = 0;
                len = 0;
                set = 0;
                nodes.length = 0;
                parents.length = 0;
                parent = undefined;
                return -1;
            }
            var e, i1, j, k, l1, name = element.nodeName;
            if (nodes[set] && nodes[set][name] && parent === element.parentElement) {
                i1 = set;
                j = idx;
                l1 = len;
            } else {
                l1 = parents.length;
                parent = element.parentElement;
                for(i1 = -1, j = 0, k = l1 - 1; l1 > j; ++j, --k){
                    if (parents[j] === parent) {
                        i1 = j;
                        break;
                    }
                    if (parents[k] === parent) {
                        i1 = k;
                        break;
                    }
                }
                if (i1 < 0 || !nodes[i1][name]) {
                    parents[i1 = l1] = parent;
                    nodes[i1] || (nodes[i1] = Object());
                    l1 = 0;
                    nodes[i1][name] = Array();
                    e = parent && parent.firstElementChild || element;
                    while(e){
                        if (e === element) j = l1;
                        if (e.nodeName == name) {
                            nodes[i1][name][l1] = e;
                            ++l1;
                        }
                        e = e.nextElementSibling;
                    }
                    set = i1;
                    idx = j;
                    len = l1;
                    if (l1 < 2) return l1;
                } else {
                    l1 = nodes[i1][name].length;
                    set = i1;
                }
            }
            if (element !== nodes[i1][name][j] && element !== nodes[i1][name][j = 0]) {
                for(j = 0, e = nodes[i1][name], k = l1 - 1; l1 > j; ++j, --k){
                    if (e[j] === element) {
                        break;
                    }
                    if (e[k] === element) {
                        j = k;
                        break;
                    }
                }
            }
            idx = j + 1;
            len = l1;
            return dir ? l1 - j : idx;
        };
    }(), isHTML = function(node) {
        var doc = node.ownerDocument || node;
        return doc.nodeType == 9 && 'contentType' in doc ? doc.contentType.indexOf('/html') > 0 : doc.createElement('DiV').nodeName == 'DIV';
    }, configure = function(option, clear) {
        if (typeof option == 'string') {
            return !!Config[option];
        }
        if (typeof option != 'object') {
            return Config;
        }
        for(var i1 in option){
            Config[i1] = !!option[i1];
        }
        if (clear) {
            matchResolvers = {};
            selectResolvers = {};
        }
        setIdentifierSyntax();
        return true;
    }, emit = function(message, proto) {
        var err;
        if (Config.VERBOSITY) {
            if (proto) {
                err = new proto(message);
            } else {
                err = new global1.DOMException(message, 'SyntaxError');
            }
            throw err;
        }
        if (Config.LOGERRORS && console && console.log) {
            console.log(message);
        }
    }, initialize = function(doc) {
        setIdentifierSyntax();
        lastContext = switchContext(doc, true);
    }, setIdentifierSyntax = function() {
        var identifier = '(?=[^0-9])' + '(?:-{2}' + '|[a-zA-Z0-9-_]' + '|[^\\x00-\\x9f]' + '|\\\\[^\\r\\n\\f0-9a-fA-F]' + '|\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|\\s)?' + '|\\\\.' + ')+', pseudonames = '[-\\w]+', pseudoparms = '(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)', doublequote = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*(?:"|$)', singlequote = "'[^'\\\\]*(?:\\\\.[^'\\\\]*)*(?:'|$)", attrparser = identifier + '|' + doublequote + '|' + singlequote, attrvalues = '([\\x22\\x27]?)((?!\\3)*|(?:\\\\?.)*?)(?:\\3|$)', attributes = '\\[' + '(?:\\*\\|)?' + WSP + '?' + '(' + identifier + '(?::' + identifier + ')?)' + WSP + '?' + '(?:' + '(' + CFG.operators + ')' + WSP + '?' + '(?:' + attrparser + ')' + ')?' + WSP + '?' + '(i)?' + WSP + '?' + '(?:\\]|$)', attrmatcher = attributes.replace(attrparser, attrvalues), pseudoclass = '(?:\\x28' + WSP + '*' + '(?:' + pseudoparms + '?)?|' + '(?:\\*|\\|)|' + '(?:' + '(?::' + pseudonames + '(?:\\x28' + pseudoparms + '?(?:\\x29|$))?|' + ')|' + '(?:[.#]?' + identifier + ')|' + '(?:' + attributes + ')' + ')+|' + '(?:' + WSP + '?,' + WSP + '?)|' + '(?:' + WSP + '?)|' + '(?:\\x29|$))*', standardValidator = '(?=' + WSP + '?[^>+~(){}<>])' + '(?:' + '(?:\\*|\\|)|' + '(?:[.#]?' + identifier + ')+|' + '(?:' + attributes + ')+|' + '(?:::?' + pseudonames + pseudoclass + ')|' + '(?:' + WSP + '?' + CFG.combinators + WSP + '?)|' + '(?:' + WSP + '?,' + WSP + '?)|' + '(?:' + WSP + '?)' + ')+';
        reOptimizer = RegExp('(?:([.:#*]?)' + '(' + identifier + ')' + '(?:' + ':[-\\w]+|' + '\\[[^\\]]+(?:\\]|$)|' + '\\x28[^\\x29]+(?:\\x29|$)' + ')*)$');
        reValidator = RegExp(standardValidator, 'g');
        Patterns.id = RegExp('^#(' + identifier + ')(.*)');
        Patterns.tagName = RegExp('^(' + identifier + ')(.*)');
        Patterns.className = RegExp('^\\.(' + identifier + ')(.*)');
        Patterns.attribute = RegExp('^(?:' + attrmatcher + ')(.*)');
    }, F_INIT = '"use strict";return function Resolver(c,f,x,r)', S_HEAD = 'var e,n,o,j=r.length-1,k=-1', M_HEAD = 'var e,n,o', S_LOOP = 'main:while((e=c[++k]))', N_LOOP = 'main:while((e=c.item(++k)))', M_LOOP = 'e=c;', S_BODY = 'r[++j]=c[k];', N_BODY = 'r[++j]=c.item(k);', M_BODY = '', S_TAIL = 'continue main;', M_TAIL = 'r=true;', S_TEST = 'if(f(c[k])){break main;}', N_TEST = 'if(f(c.item(k))){break main;}', M_TEST = 'f(c);', S_VARS = [], M_VARS = [], compile = function(selector, mode, callback) {
        var factory, head = '', loop = '', macro = '', source = '', vars = '';
        switch(mode){
            case true:
                if (selectLambdas[selector]) {
                    return selectLambdas[selector];
                }
                macro = S_BODY + (callback ? S_TEST : '') + S_TAIL;
                head = S_HEAD;
                loop = S_LOOP;
                break;
            case false:
                if (matchLambdas[selector]) {
                    return matchLambdas[selector];
                }
                macro = M_BODY + (callback ? M_TEST : '') + M_TAIL;
                head = M_HEAD;
                loop = M_LOOP;
                break;
            case null:
                if (selectLambdas[selector]) {
                    return selectLambdas[selector];
                }
                macro = N_BODY + (callback ? N_TEST : '') + S_TAIL;
                head = S_HEAD;
                loop = N_LOOP;
                break;
            default:
                break;
        }
        source = compileSelector(selector, macro, mode, callback, false);
        loop += mode || mode === null ? '{' + source + '}' : source;
        if (mode || mode === null && selector.includes(':nth')) {
            loop += reNthElem.test(selector) ? 's.nthElement(null, 2);' : '';
            loop += reNthType.test(selector) ? 's.nthOfType(null, 2);' : '';
        }
        if (S_VARS[0] || M_VARS[0]) {
            vars = ',' + (S_VARS.join(',') || M_VARS.join(','));
            S_VARS.length = 0;
            M_VARS.length = 0;
        }
        factory = Function('s', F_INIT + '{' + head + vars + ';' + loop + 'return r;}')(Snapshot);
        return mode || mode === null ? selectLambdas[selector] = factory : matchLambdas[selector] = factory;
    }, compileSelector = function(expression, source, mode, callback, not) {
        var a, b, n, f, i1, l1, name, nested, NS, N = not ? '!' : '', D = not ? '' : '!', compat, expr, match, result1, status, symbol, test, type, selector = expression, selector_string, vars;
        selector_string = mode ? lastSelected : lastMatched;
        selector = selector.replace(STD.combinator, '$1');
        while(selector){
            symbol = STD.apimethods.test(selector) ? '|' : selector[0];
            switch(symbol){
                case '*':
                    match = selector.match(Patterns.universal);
                    if (N == '!') {
                        source = 'if(' + N + 'true' + '){' + source + '}';
                    }
                    break;
                case '#':
                    match = selector.match(Patterns.id);
                    source = 'if(' + N + '(/^' + match[1] + '$/.test(e.getAttribute("id"))' + ')){' + source + '}';
                    break;
                case '.':
                    match = selector.match(Patterns.className);
                    compat = (QUIRKS_MODE ? 'i' : '') + '.test(e.getAttribute("class"))';
                    source = 'if(' + N + '(/(^|\\s)' + match[1] + '(\\s|$)/' + compat + ')){' + source + '}';
                    break;
                case /[a-z]/i.test(symbol) ? symbol : undefined:
                    match = selector.match(Patterns.tagName);
                    source = 'if(' + N + '(e.nodeName' + (Config.MIXEDCASE || hasMixedCaseTagNames(doc) ? '.toLowerCase()=="' + match[1].toLowerCase() + '"' : '=="' + match[1].toUpperCase() + '"') + ')){' + source + '}';
                    break;
                case '|':
                    match = selector.match(Patterns.namespace);
                    if (match[1] == '*') {
                        source = 'if(' + N + 'true){' + source + '}';
                    } else if (!match[1]) {
                        source = 'if(' + N + '(!e.namespaceURI)){' + source + '}';
                    } else if (typeof match[1] == 'string' && root.prefix == match[1]) {
                        source = 'if(' + N + '(e.namespaceURI=="' + NAMESPACE + '")){' + source + '}';
                    } else {
                        emit('\'' + selector_string + '\'' + qsInvalid);
                    }
                    break;
                case '[':
                    match = selector.match(Patterns.attribute);
                    NS = match[0].match(STD.namespaces);
                    name = match[1];
                    expr = name.split(':');
                    expr = expr.length == 2 ? expr[1] : expr[0];
                    if (match[2] && !(test = Operators[match[2]])) {
                        emit('\'' + selector_string + '\'' + qsInvalid);
                        return '';
                    }
                    if (match[4] === '') {
                        test = match[2] == '~=' ? {
                            p1: '^\\s',
                            p2: '+$',
                            p3: 'true'
                        } : match[2] in ATTR_STD_OPS && match[2] != '~=' ? {
                            p1: '^',
                            p2: '$',
                            p3: 'true'
                        } : test;
                    } else if (match[2] == '~=' && match[4].includes(' ')) {
                        source = 'if(' + N + 'false){' + source + '}';
                        break;
                    } else if (match[4]) {
                        match[4] = convertEscapes(match[4]).replace(REX.RegExpChar, '\\$&');
                    }
                    type = match[5] == 'i' || HTML_DOCUMENT && HTML_TABLE[expr.toLowerCase()] ? 'i' : '';
                    source = 'if(' + N + '(' + (!match[2] ? NS ? 's.hasAttributeNS(e,"' + name + '")' : 'e.hasAttribute("' + name + '")' : !match[4] && ATTR_STD_OPS[match[2]] && match[2] != '~=' ? 'e.getAttribute("' + name + '")==""' : '(/' + test.p1 + match[4] + test.p2 + '/' + type + ').test(e.getAttribute("' + name + '"))==' + test.p3) + ')){' + source + '}';
                    break;
                case '~':
                    match = selector.match(Patterns.relative);
                    source = 'n=e;while((e=e.previousElementSibling)){' + source + '}e=n;';
                    break;
                case '+':
                    match = selector.match(Patterns.adjacent);
                    source = 'n=e;if((e=e.previousElementSibling)){' + source + '}e=n;';
                    break;
                case '\x09':
                case '\x20':
                    match = selector.match(Patterns.ancestor);
                    source = 'n=e;while((e=e.parentElement)){' + source + '}e=n;';
                    break;
                case '>':
                    match = selector.match(Patterns.children);
                    source = 'n=e;if((e=e.parentElement)){' + source + '}e=n;';
                    break;
                case symbol in Combinators ? symbol : undefined:
                    match[match.length - 1] = '*';
                    source = Combinators[symbol](match) + source;
                    break;
                case ':':
                    if (match = selector.match(Patterns.structural)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'root':
                                source = 'if(' + N + '(e===s.root)){' + source + (mode ? 'break main;' : '') + '}';
                                break;
                            case 'empty':
                                source = 'n=e.firstChild;while(n&&!(/1|3/).test(n.nodeType)){n=n.nextSibling}if(' + D + 'n){' + source + '}';
                                break;
                            case 'only-child':
                                source = 'if(' + N + '(!e.nextElementSibling&&!e.previousElementSibling)){' + source + '}';
                                break;
                            case 'last-child':
                                source = 'if(' + N + '(!e.nextElementSibling)){' + source + '}';
                                break;
                            case 'first-child':
                                source = 'if(' + N + '(!e.previousElementSibling)){' + source + '}';
                                break;
                            case 'only-of-type':
                                source = 'o=e.nodeName;' + 'n=e;while((n=n.nextElementSibling)&&n.nodeName!=o);if(!n){' + 'n=e;while((n=n.previousElementSibling)&&n.nodeName!=o);}if(' + D + 'n){' + source + '}';
                                break;
                            case 'last-of-type':
                                source = 'n=e;o=e.nodeName;while((n=n.nextElementSibling)&&n.nodeName!=o);if(' + D + 'n){' + source + '}';
                                break;
                            case 'first-of-type':
                                source = 'n=e;o=e.nodeName;while((n=n.previousElementSibling)&&n.nodeName!=o);if(' + D + 'n){' + source + '}';
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.treestruct)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'nth-child':
                            case 'nth-of-type':
                            case 'nth-last-child':
                            case 'nth-last-of-type':
                                expr = /-of-type/i.test(match[1]);
                                if (match[1] && match[2]) {
                                    type = /last/i.test(match[1]);
                                    if (match[2] == 'n') {
                                        source = 'if(' + N + 'true){' + source + '}';
                                        break;
                                    } else if (match[2] == '1') {
                                        test = type ? 'next' : 'previous';
                                        source = expr ? 'n=e;o=e.nodeName;' + 'while((n=n.' + test + 'ElementSibling)&&n.nodeName!=o);if(' + D + 'n){' + source + '}' : 'if(' + N + '!e.' + test + 'ElementSibling){' + source + '}';
                                        break;
                                    } else if (match[2] == 'even' || match[2] == '2n0' || match[2] == '2n+0' || match[2] == '2n') {
                                        test = 'n%2==0';
                                    } else if (match[2] == 'odd' || match[2] == '2n1' || match[2] == '2n+1') {
                                        test = 'n%2==1';
                                    } else {
                                        f = /n/i.test(match[2]);
                                        n = match[2].split('n');
                                        a = parseInt(n[0], 10) || 0;
                                        b = parseInt(n[1], 10) || 0;
                                        if (n[0] == '-') {
                                            a = -1;
                                        }
                                        if (n[0] == '+') {
                                            a = +1;
                                        }
                                        test = (b ? '(n' + (b > 0 ? '-' : '+') + Math.abs(b) + ')' : 'n') + '%' + a + '==0';
                                        test = a >= +1 ? f ? 'n>' + (b - 1) + (Math.abs(a) != 1 ? '&&' + test : '') : 'n==' + a : a <= -1 ? f ? 'n<' + (b + 1) + (Math.abs(a) != 1 ? '&&' + test : '') : 'n==' + a : a === 0 ? n[0] ? 'n==' + b : 'n>' + (b - 1) : 'false';
                                    }
                                    expr = expr ? 'OfType' : 'Element';
                                    type = type ? 'true' : 'false';
                                    source = 'n=s.nth' + expr + '(e,' + type + ');if(' + N + '(' + test + ')){' + source + '}';
                                } else {
                                    emit('\'' + selector_string + '\'' + qsInvalid);
                                }
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.logicalsel)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'matches':
                                if (not === true || nested === true) {
                                    emit(':matches() pseudo-class cannot be nested');
                                }
                                nested = true;
                                expr = match[2].replace(REX.CommaGroup, ',').replace(REX.TrimSpaces, '');
                                expr = match[2].match(REX.SplitGroup);
                                for(i1 = 0, l1 = expr.length; l1 > i1; ++i1){
                                    expr[i1] = expr[i1].replace(REX.TrimSpaces, '');
                                    source = 'if(s.match("' + expr[i1].replace(/\x22/g, '\\"') + '",e)){' + source + '}';
                                }
                                break;
                            case 'not':
                                if (not === true || nested === true) {
                                    emit(':not() pseudo-class cannot be nested');
                                }
                                expr = match[2].replace(REX.CommaGroup, ',').replace(REX.TrimSpaces, '');
                                expr = match[2].match(REX.SplitGroup);
                                for(i1 = 0, l1 = expr.length; l1 > i1; ++i1){
                                    expr[i1] = expr[i1].replace(REX.TrimSpaces, '');
                                    source = compileSelector(expr[i1], source, false, callback, true);
                                }
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.linguistic)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'dir':
                                source = 'var p;if(' + N + '(' + '(/' + match[2] + '/i.test(e.dir))||(p=s.ancestor("[dir]", e))&&' + '(/' + match[2] + '/i.test(p.dir))||(e.dir==""||e.dir=="auto")&&' + '(' + (match[2] == 'ltr' ? '!' : '') + RTL + '.test(e.textContent)))' + '){' + source + '};';
                                break;
                            case 'lang':
                                expr = '(?:^|-)' + match[2] + '(?:-|$)';
                                source = 'var p;if(' + N + '(' + '(e.isConnected&&(e.lang==""&&(p=s.ancestor("[lang]",e)))&&' + '(p.lang=="' + match[2] + '")||/' + expr + '/i.test(e.lang)))' + '){' + source + '};';
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.locationpc)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'link':
                                source = 'if(' + N + '(/^a|area|link$/i.test(e.nodeName)&&e.hasAttribute("href"))){' + source + '}';
                                break;
                            case 'visited':
                                source = 'if(' + N + '(/^a|area|link$/i.test(e.nodeName)&&e.hasAttribute("href")&&e.visited)){' + source + '}';
                                break;
                            case 'target':
                                source = 'if(' + N + '((s.doc.compareDocumentPosition(e)&16)&&s.doc.location.hash&&e.id==s.doc.location.hash.slice(1))){' + source + '}';
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.useraction)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'hover':
                                source = 'hasFocus' in doc && doc.hasFocus() ? 'if(' + N + '(e===s.doc.hoverElement)){' + source + '}' : 'if(' + D + 'true){' + source + '}';
                                break;
                            case 'active':
                                source = 'hasFocus' in doc && doc.hasFocus() ? 'if(' + N + '(e===s.doc.activeElement)){' + source + '}' : 'if(' + D + 'true){' + source + '}';
                                break;
                            case 'focus':
                                source = 'hasFocus' in doc ? 'if(' + N + '(e===s.doc.activeElement&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){' + source + '}' : 'if(' + N + '(e===s.doc.activeElement&&(e.type||e.href))){' + source + '}';
                                break;
                            case 'focus-within':
                                source = 'hasFocus' in doc ? 'n=s.doc.activeElement;while(e){if(e===n||e.parentNode===n)break;}' + 'if(' + N + '(e===n&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){' + source + '}' : source;
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.inputstate)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'enabled':
                                source = 'if(' + N + '(("form" in e||/^optgroup$/i.test(e.nodeName))&&"disabled" in e &&e.disabled===false' + ')){' + source + '}';
                                break;
                            case 'disabled':
                                source = 'if(' + N + '(("form" in e||/^optgroup$/i.test(e.nodeName))&&"disabled" in e&&' + '(e.disabled===true||(n=s.ancestor("fieldset",e))&&(n=s.first("legend",n))&&!n.contains(e))' + ')){' + source + '}';
                                break;
                            case 'read-only':
                                source = 'if(' + N + '(' + '(/^textarea$/i.test(e.nodeName)&&(e.readOnly||e.disabled))||' + '("|password|text|".includes("|"+e.type+"|")&&e.readOnly)' + ')){' + source + '}';
                                break;
                            case 'read-write':
                                source = 'if(' + N + '(' + '((/^textarea$/i.test(e.nodeName)&&!e.readOnly&&!e.disabled)||' + '("|password|text|".includes("|"+e.type+"|")&&!e.readOnly&&!e.disabled))||' + '(e.hasAttribute("contenteditable")||(s.doc.designMode=="on"))' + ')){' + source + '}';
                                break;
                            case 'placeholder-shown':
                                source = 'if(' + N + '(' + '(/^input|textarea$/i.test(e.nodeName))&&e.hasAttribute("placeholder")&&' + '("|textarea|password|number|search|email|text|tel|url|".includes("|"+e.type+"|"))&&' + '(!s.match(":focus",e))' + ')){' + source + '}';
                                break;
                            case 'default':
                                source = 'if(' + N + '("form" in e && e.form)){' + 'var x=0;n=[];' + 'if(e.type=="image")n=e.form.getElementsByTagName("input");' + 'if(e.type=="submit")n=e.form.elements;' + 'while(n[x]&&e!==n[x]){' + 'if(n[x].type=="image")break;' + 'if(n[x].type=="submit")break;' + 'x++;' + '}' + '}' + 'if(' + N + '(e.form&&(e===n[x]&&"|image|submit|".includes("|"+e.type+"|"))||' + '((/^option$/i.test(e.nodeName))&&e.defaultSelected)||' + '(("|radio|checkbox|".includes("|"+e.type+"|"))&&e.defaultChecked)' + ')){' + source + '}';
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.inputvalue)) {
                        match[1] = match[1].toLowerCase();
                        switch(match[1]){
                            case 'checked':
                                source = 'if(' + N + '(/^input$/i.test(e.nodeName)&&' + '("|radio|checkbox|".includes("|"+e.type+"|")&&e.checked)||' + '(/^option$/i.test(e.nodeName)&&(e.selected||e.checked))' + ')){' + source + '}';
                                break;
                            case 'indeterminate':
                                source = 'if(' + N + '(/^progress$/i.test(e.nodeName)&&!e.hasAttribute("value"))||' + '(/^input$/i.test(e.nodeName)&&("checkbox"==e.type&&e.indeterminate)||' + '("radio"==e.type&&e.name&&!s.first("input[name="+e.name+"]:checked",e.form))' + ')){' + source + '}';
                                break;
                            case 'required':
                                source = 'if(' + N + '(/^input|select|textarea$/i.test(e.nodeName)&&e.required)' + '){' + source + '}';
                                break;
                            case 'optional':
                                source = 'if(' + N + '(/^input|select|textarea$/i.test(e.nodeName)&&!e.required)' + '){' + source + '}';
                                break;
                            case 'invalid':
                                source = 'if(' + N + '((' + '(/^form$/i.test(e.nodeName)&&!e.noValidate)||' + '(e.willValidate&&!e.formNoValidate))&&!e.checkValidity())||' + '(/^fieldset$/i.test(e.nodeName)&&s.first(":invalid",e))' + '){' + source + '}';
                                break;
                            case 'valid':
                                source = 'if(' + N + '((' + '(/^form$/i.test(e.nodeName)&&!e.noValidate)||' + '(e.willValidate&&!e.formNoValidate))&&e.checkValidity())||' + '(/^fieldset$/i.test(e.nodeName)&&s.first(":valid",e))' + '){' + source + '}';
                                break;
                            case 'in-range':
                                source = 'if(' + N + '(/^input$/i.test(e.nodeName))&&' + '(e.willValidate&&!e.formNoValidate)&&' + '(!e.validity.rangeUnderflow&&!e.validity.rangeOverflow)&&' + '("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&' + '("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))' + '){' + source + '}';
                                break;
                            case 'out-of-range':
                                source = 'if(' + N + '(/^input$/i.test(e.nodeName))&&' + '(e.willValidate&&!e.formNoValidate)&&' + '(e.validity.rangeUnderflow||e.validity.rangeOverflow)&&' + '("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&' + '("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))' + '){' + source + '}';
                                break;
                            default:
                                emit('\'' + selector_string + '\'' + qsInvalid);
                                break;
                        }
                    } else if (match = selector.match(Patterns.pseudo_sng)) {
                        source = 'if(' + D + '(e.nodeType==1)){' + source + '}';
                    } else if (match = selector.match(Patterns.pseudo_dbl)) {
                        source = 'if(' + D + '(e.nodeType==1)){' + source + '}';
                    } else {
                        expr = false;
                        status = false;
                        for(expr in Selectors){
                            if (match = selector.match(Selectors[expr].Expression)) {
                                result1 = Selectors[expr].Callback(match, source, mode, callback);
                                if ('match' in result1) {
                                    match = result1.match;
                                }
                                vars = result1.modvar;
                                if (mode) {
                                    vars && S_VARS.indexOf(vars) < 0 && (S_VARS[S_VARS.length] = vars);
                                } else {
                                    vars && M_VARS.indexOf(vars) < 0 && (M_VARS[M_VARS.length] = vars);
                                }
                                source = result1.source;
                                status = result1.status;
                                if (status) {
                                    break;
                                }
                            }
                        }
                        if (!status) {
                            emit('unknown pseudo-class selector \'' + selector + '\'');
                            return '';
                        }
                        if (!expr) {
                            emit('unknown token in selector \'' + selector + '\'');
                            return '';
                        }
                    }
                    break;
                default:
                    emit('\'' + selector_string + '\'' + qsInvalid);
                    break;
            }
            if (!match) {
                emit('\'' + selector_string + '\'' + qsInvalid);
                return '';
            }
            selector = match.pop();
        }
        return source;
    }, makeref = function(selectors, element) {
        return selectors.replace(/:scope/ig, element.nodeName.toLowerCase() + (element.id ? '#' + element.id : '') + (element.className ? '.' + element.classList[0] : ''));
    }, ancestor = function _closest(selectors, element, callback) {
        if (/:scope/i.test(selectors)) {
            selectors = makeref(selectors, element);
        }
        while(element){
            if (match(selectors, element, callback)) break;
            element = element.parentElement;
        }
        return element;
    }, match_assert = function(f, element, callback) {
        for(var i1 = 0, l1 = f.length, r = false; l1 > i1; ++i1)f[i1](element, callback, null, false) && (r = true);
        return r;
    }, match_collect = function(selectors, callback) {
        for(var i1 = 0, l1 = selectors.length, f = []; l1 > i1; ++i1)f[i1] = compile(selectors[i1], false, callback);
        return {
            factory: f
        };
    }, match = function _matches(selectors, element, callback) {
        var expressions, parsed;
        if (element && matchResolvers[selectors]) {
            return match_assert(matchResolvers[selectors].factory, element, callback);
        }
        lastMatched = selectors;
        if (arguments.length === 0) {
            emit(qsNotArgs, TypeError);
            return Config.VERBOSITY ? undefined : false;
        } else if (arguments[0] === '') {
            emit('\'\'' + qsInvalid);
            return Config.VERBOSITY ? undefined : false;
        }
        if (typeof selectors != 'string') {
            selectors = '' + selectors;
        }
        if (/:scope/i.test(selectors)) {
            selectors = makeref(selectors, element);
        }
        parsed = selectors.replace(/\x00|\\$/g, '\ufffd').replace(REX.CombineWSP, '\x20').replace(REX.PseudosWSP, '$1').replace(REX.TabCharWSP, '\t').replace(REX.CommaGroup, ',').replace(REX.TrimSpaces, '');
        if ((expressions = parsed.match(reValidator)) && expressions.join('') == parsed) {
            expressions = parsed.match(REX.SplitGroup);
            if (parsed[parsed.length - 1] == ',') {
                emit(qsInvalid);
                return Config.VERBOSITY ? undefined : false;
            }
        } else {
            emit('\'' + selectors + '\'' + qsInvalid);
            return Config.VERBOSITY ? undefined : false;
        }
        matchResolvers[selectors] = match_collect(expressions, callback);
        return match_assert(matchResolvers[selectors].factory, element, callback);
    }, first = function _querySelector(selectors, context, callback) {
        if (arguments.length === 0) {
            emit(qsNotArgs, TypeError);
        }
        return select(selectors, context, typeof callback == 'function' ? function firstMatch(element) {
            callback(element);
            return false;
        } : function firstMatch() {
            return false;
        })[0] || null;
    }, select = function _querySelectorAll(selectors, context, callback) {
        var expressions, nodes, parsed, resolver;
        context || (context = doc);
        if (selectors) {
            if (resolver = selectResolvers[selectors]) {
                if (resolver.context === context && resolver.callback === callback) {
                    var f = resolver.factory, h = resolver.htmlset, n = resolver.nodeset, nodes = [];
                    if (n.length > 1) {
                        for(var i1 = 0, l1 = n.length, list; l1 > i1; ++i1){
                            list = compat[n[i1][0]](context, n[i1].slice(1))();
                            if (f[i1] !== null) {
                                f[i1](list, callback, context, nodes);
                            } else {
                                nodes = nodes.concat(list);
                            }
                        }
                        if (l1 > 1 && nodes.length > 1) {
                            nodes.sort(documentOrder);
                            hasDupes && (nodes = unique(nodes));
                        }
                    } else {
                        if (f[0]) {
                            nodes = f[0](h[0](), callback, context, nodes);
                        } else {
                            nodes = h[0]();
                        }
                    }
                    return typeof callback == 'function' ? concatCall(nodes, callback) : nodes;
                }
            }
        }
        lastSelected = selectors;
        if (arguments.length === 0) {
            emit(qsNotArgs, TypeError);
            return Config.VERBOSITY ? undefined : none;
        } else if (arguments[0] === '') {
            emit('\'\'' + qsInvalid);
            return Config.VERBOSITY ? undefined : none;
        } else if (lastContext !== context) {
            lastContext = switchContext(context);
        }
        if (typeof selectors != 'string') {
            selectors = '' + selectors;
        }
        if (/:scope/i.test(selectors)) {
            selectors = makeref(selectors, context);
        }
        parsed = selectors.replace(/\x00|\\$/g, '\ufffd').replace(REX.CombineWSP, '\x20').replace(REX.PseudosWSP, '$1').replace(REX.TabCharWSP, '\t').replace(REX.CommaGroup, ',').replace(REX.TrimSpaces, '');
        if ((expressions = parsed.match(reValidator)) && expressions.join('') == parsed) {
            expressions = parsed.match(REX.SplitGroup);
            if (parsed[parsed.length - 1] == ',') {
                emit(qsInvalid);
                return Config.VERBOSITY ? undefined : false;
            }
        } else {
            emit('\'' + selectors + '\'' + qsInvalid);
            return Config.VERBOSITY ? undefined : false;
        }
        selectResolvers[selectors] = collect(expressions, context, callback);
        nodes = selectResolvers[selectors].results;
        return typeof callback == 'function' ? concatCall(nodes, callback) : nodes;
    }, optimize = function(selector, token) {
        var index = token.index, length = token[1].length + token[2].length;
        return selector.slice(0, index) + (' >+~'.indexOf(selector.charAt(index - 1)) > -1 ? ':['.indexOf(selector.charAt(index + length + 1)) > -1 ? '*' : '' : '') + selector.slice(index + length - (token[1] == '*' ? 1 : 0));
    }, collect = function(selectors, context, callback) {
        var i1, l1, seen = {}, token = [
            '',
            '*',
            '*'
        ], optimized = selectors, factory = [], htmlset = [], nodeset = [], results = [], type;
        for(i1 = 0, l1 = selectors.length; l1 > i1; ++i1){
            if (!seen[selectors[i1]] && (seen[selectors[i1]] = true)) {
                type = selectors[i1].match(reOptimizer);
                if (type && type[1] != ':' && (token = type)) {
                    token[1] || (token[1] = '*');
                    optimized[i1] = optimize(optimized[i1], token);
                } else {
                    token = [
                        '',
                        '*',
                        '*'
                    ];
                }
            }
            nodeset[i1] = token[1] + token[2];
            htmlset[i1] = compat[token[1]](context, token[2]);
            factory[i1] = compile(optimized[i1], true, null);
            factory[i1] ? factory[i1](htmlset[i1](), callback, context, results) : result.concat(htmlset[i1]());
        }
        if (l1 > 1) {
            results.sort(documentOrder);
            hasDupes && (results = unique(results));
        }
        return {
            callback: callback,
            context: context,
            factory: factory,
            htmlset: htmlset,
            nodeset: nodeset,
            results: results
        };
    }, _closest, _matches, _querySelector, _querySelectorAll, install = function(all) {
        _closest = Element.prototype.closest;
        _matches = Element.prototype.matches;
        _querySelector = Document.prototype.querySelector;
        _querySelectorAll = Document.prototype.querySelectorAll;
        Element.prototype.closest = function closest() {
            var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;
            if (!('nodeType' in this)) {
                emit('\'closest\' called on an object that does not implement interface ' + ctor + '.', TypeError);
            }
            return arguments.length < 1 ? ancestor.apply(this, []) : arguments.length < 2 ? ancestor.apply(this, [
                arguments[0],
                this
            ]) : ancestor.apply(this, [
                arguments[0],
                this,
                typeof arguments[1] == 'function' ? arguments[1] : undefined
            ]);
        };
        Element.prototype.matches = function matches() {
            var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;
            if (!('nodeType' in this)) {
                emit('\'matches\' called on an object that does not implement interface ' + ctor + '.', TypeError);
            }
            return arguments.length < 1 ? match.apply(this, []) : arguments.length < 2 ? match.apply(this, [
                arguments[0],
                this
            ]) : match.apply(this, [
                arguments[0],
                this,
                typeof arguments[1] == 'function' ? arguments[1] : undefined
            ]);
        };
        Element.prototype.querySelector = Document.prototype.querySelector = DocumentFragment.prototype.querySelector = function querySelector() {
            var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;
            if (!('nodeType' in this)) {
                emit('\'querySelector\' called on an object that does not implement interface ' + ctor + '.', TypeError);
            }
            return arguments.length < 1 ? first.apply(this, []) : arguments.length < 2 ? first.apply(this, [
                arguments[0],
                this
            ]) : first.apply(this, [
                arguments[0],
                this,
                typeof arguments[1] == 'function' ? arguments[1] : undefined
            ]);
        };
        Element.prototype.querySelectorAll = Document.prototype.querySelectorAll = DocumentFragment.prototype.querySelectorAll = function querySelectorAll() {
            var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name;
            if (!('nodeType' in this)) {
                emit('\'querySelectorAll\' called on an object that does not implement interface ' + ctor + '.', TypeError);
            }
            return arguments.length < 1 ? select.apply(this, []) : arguments.length < 2 ? select.apply(this, [
                arguments[0],
                this
            ]) : select.apply(this, [
                arguments[0],
                this,
                typeof arguments[1] == 'function' ? arguments[1] : undefined
            ]);
        };
        if (all) {
            document.addEventListener('load', function(e) {
                var c, d, r, s, t = e.target;
                if (/iframe/i.test(t.nodeName)) {
                    c = '(' + Export + ')(this, ' + Factory + ');';
                    d = t.contentDocument;
                    s = d.createElement('script');
                    s.textContent = c + 'NW.Dom.install()';
                    r = d.documentElement;
                    r.removeChild(r.insertBefore(s, r.firstChild));
                }
            }, true);
        }
    }, uninstall = function() {
        Element.prototype.closest = _closest;
        Element.prototype.matches = _matches;
        Element.prototype.querySelector = Document.prototype.querySelector = DocumentFragment.prototype.querySelector = _querySelector;
        Element.prototype.querySelectorAll = Document.prototype.querySelectorAll = DocumentFragment.prototype.querySelectorAll = _querySelectorAll;
    }, none = Array(), lastContext, lastMatched, lastSelected, matchLambdas = {}, selectLambdas = {}, matchResolvers = {}, selectResolvers = {}, Snapshot = {
        doc: doc,
        from: doc,
        root: root,
        byTag: byTag,
        first: first,
        match: match,
        ancestor: ancestor,
        nthOfType: nthOfType,
        nthElement: nthElement,
        hasAttributeNS: hasAttributeNS
    }, Dom = {
        lastMatched: lastMatched,
        lastSelected: lastSelected,
        matchLambdas: matchLambdas,
        selectLambdas: selectLambdas,
        matchResolvers: matchResolvers,
        selectResolvers: selectResolvers,
        CFG: CFG,
        M_BODY: M_BODY,
        S_BODY: S_BODY,
        M_TEST: M_TEST,
        S_TEST: S_TEST,
        byId: byId,
        byTag: byTag,
        byClass: byClass,
        match: match,
        first: first,
        select: select,
        closest: ancestor,
        compile: compile,
        configure: configure,
        emit: emit,
        Config: Config,
        Snapshot: Snapshot,
        Version: version,
        install: install,
        uninstall: uninstall,
        Operators: Operators,
        Selectors: Selectors,
        registerCombinator: function(combinator, resolver) {
            var i1 = 0, l1 = combinator.length, symbol;
            for(; l1 > i1; ++i1){
                if (combinator[i1] != '=') {
                    symbol = combinator[i1];
                    break;
                }
            }
            if (CFG.combinators.indexOf(symbol) < 0) {
                CFG.combinators = CFG.combinators.replace('](', symbol + '](');
                CFG.combinators = CFG.combinators.replace('])', symbol + '])');
                Combinators[combinator] = resolver;
                setIdentifierSyntax();
            } else {
                console.warn('Warning: the \'' + combinator + '\' combinator is already registered.');
            }
        },
        registerOperator: function(operator, resolver) {
            var i1 = 0, l1 = operator.length, symbol;
            for(; l1 > i1; ++i1){
                if (operator[i1] != '=') {
                    symbol = operator[i1];
                    break;
                }
            }
            if (CFG.operators.indexOf(symbol) < 0 && !Operators[operator]) {
                CFG.operators = CFG.operators.replace(']=', symbol + ']=');
                Operators[operator] = resolver;
                setIdentifierSyntax();
            } else {
                console.warn('Warning: the \'' + operator + '\' operator is already registered.');
            }
        },
        registerSelector: function(name, rexp, func) {
            Selectors[name] || (Selectors[name] = {
                Expression: rexp,
                Callback: func
            });
        }
    };
    initialize(doc);
    return Dom;
}
class DOMTokenList extends Set {
    #onChange;
    constructor(onChange){
        super();
        this.#onChange = onChange;
    }
    add(token) {
        if (token === "" || /[\t\n\f\r ]/.test(token)) {
            throw new Error(`DOMTokenList.add: Invalid class token "${token}"`);
        }
        super.add(token);
        this.#onChange([
            ...this
        ].join(" "));
        return this;
    }
    clear() {
        super.clear();
        this.#onChange("");
    }
    remove(...tokens) {
        for (const token of tokens){
            super.delete(token);
        }
        this.#onChange([
            ...this
        ].join(" "));
        return this;
    }
    delete(token) {
        const deleted = super.delete(token);
        if (deleted) {
            this.#onChange([
                ...this
            ].join(" "));
        }
        return deleted;
    }
    contains(token) {
        return this.has(token);
    }
    _update(value) {
        super.clear();
        if (value !== null) {
            for (const token of value.split(/[\t\n\f\r ]+/g)){
                if (token === "") continue;
                super.add(token);
            }
        }
    }
}
class Attr {
    #namedNodeMap = null;
    #name = "";
    constructor(map, name, key){
        if (key !== CTOR_KEY) {
            throw new TypeError("Illegal constructor");
        }
        this.#name = name;
        this.#namedNodeMap = map;
    }
    get name() {
        return this.#name;
    }
    get value() {
        return this.#namedNodeMap[this.#name];
    }
}
class NamedNodeMap {
    #attrObjCache = {};
    newAttr(attribute) {
        return new Attr(this, attribute, CTOR_KEY);
    }
    getNamedItem(attribute) {
        return this.#attrObjCache[attribute] ?? (this.#attrObjCache[attribute] = this.newAttr(attribute));
    }
    setNamedItem(...args) {}
}
class Element1 extends Node {
    #classList;
    attributes;
    #currentId;
    constructor(tagName, parentNode, attributes, key){
        super(tagName, NodeType.ELEMENT_NODE, parentNode, key);
        this.tagName = tagName;
        this.#classList = new DOMTokenList((className)=>{
            if (this.hasAttribute("class") || className !== "") {
                this.attributes["class"] = className;
            }
        });
        this.attributes = new NamedNodeMap();
        this.#currentId = "";
        for (const attr of attributes){
            this.attributes[attr[0]] = attr[1];
            switch(attr[0]){
                case "class":
                    this.#classList._update(attr[1]);
                    break;
                case "id":
                    this.#currentId = attr[1];
                    break;
            }
        }
        this.tagName = this.nodeName = tagName.toUpperCase();
    }
    _shallowClone() {
        const attributes = [];
        for (const attribute of this.getAttributeNames()){
            attributes.push([
                attribute,
                this.attributes[attribute]
            ]);
        }
        return new Element1(this.nodeName, null, attributes, CTOR_KEY);
    }
    get childElementCount() {
        let count = 0;
        for (const { nodeType  } of this.childNodes){
            if (nodeType === NodeType.ELEMENT_NODE) {
                count++;
            }
        }
        return count;
    }
    get className() {
        return this.getAttribute("class") ?? "";
    }
    get classList() {
        return this.#classList;
    }
    set className(className) {
        this.setAttribute("class", className);
        this.#classList._update(className);
    }
    get outerHTML() {
        const tagName = this.tagName.toLowerCase();
        const attributes = this.attributes;
        let out = "<" + tagName;
        for (const attribute of this.getAttributeNames()){
            out += ` ${attribute.toLowerCase()}`;
            if (attributes[attribute] != null) {
                out += `="${attributes[attribute].replace(/&/g, "&amp;").replace(/\xA0/g, "&nbsp;").replace(/"/g, "&quot;")}"`;
            }
        }
        switch(tagName){
            case "area":
            case "base":
            case "br":
            case "col":
            case "embed":
            case "hr":
            case "img":
            case "input":
            case "link":
            case "meta":
            case "param":
            case "source":
            case "track":
            case "wbr":
                out += ">";
                break;
            default:
                out += ">" + this.innerHTML + `</${tagName}>`;
                break;
        }
        return out;
    }
    set outerHTML(html) {}
    get innerHTML() {
        let out = "";
        for (const child of this.childNodes){
            switch(child.nodeType){
                case NodeType.ELEMENT_NODE:
                    out += child.outerHTML;
                    break;
                case NodeType.COMMENT_NODE:
                    out += `<!--${child.data}-->`;
                    break;
                case NodeType.TEXT_NODE:
                    switch(this.tagName.toLowerCase()){
                        case "style":
                        case "script":
                        case "xmp":
                        case "iframe":
                        case "noembed":
                        case "noframes":
                        case "plaintext":
                            out += child.data;
                            break;
                        default:
                            out += child.data.replace(/&/g, "&amp;").replace(/\xA0/g, "&nbsp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
                            break;
                    }
                    break;
            }
        }
        return out;
    }
    set innerHTML(html) {
        for (const child of this.childNodes){
            child._setParent(null);
        }
        const mutator = this._getChildNodesMutator();
        mutator.splice(0, this.childNodes.length);
        if (html.length) {
            const parsed = fragmentNodesFromString(html);
            mutator.push(...parsed.childNodes[0].childNodes);
            for (const child1 of this.childNodes){
                child1._setParent(this);
                child1._setOwnerDocument(this.ownerDocument);
            }
        }
    }
    get innerText() {
        return this.textContent;
    }
    set innerText(text) {
        this.textContent = text;
    }
    get children() {
        return this._getChildNodesMutator().elementsView();
    }
    get id() {
        return this.#currentId || "";
    }
    set id(id) {
        this.setAttribute(id, this.#currentId = id);
    }
    getAttributeNames() {
        return Object.getOwnPropertyNames(this.attributes);
    }
    getAttribute(name) {
        return this.attributes[name?.toLowerCase()] ?? null;
    }
    setAttribute(rawName, value) {
        const name = rawName?.toLowerCase();
        const strValue = String(value);
        this.attributes[name] = strValue;
        if (name === "id") {
            this.#currentId = strValue;
        } else if (name === "class") {
            this.#classList._update(strValue);
        }
    }
    removeAttribute(rawName) {
        const name = rawName?.toLowerCase();
        delete this.attributes[name];
        if (name === "class") {
            this.#classList._update(null);
        }
    }
    hasAttribute(name) {
        return this.attributes.hasOwnProperty(name?.toLowerCase());
    }
    hasAttributeNS(_namespace, name) {
        return this.attributes.hasOwnProperty(name?.toLowerCase());
    }
    get firstElementChild() {
        for (const node of this.childNodes){
            if (node.nodeType === Node.ELEMENT_NODE) {
                return node;
            }
        }
        return null;
    }
    get lastElementChild() {
        const { childNodes  } = this;
        for(let i1 = childNodes.length - 1; i1 >= 0; i1--){
            const node = childNodes[i1];
            if (node.nodeType === Node.ELEMENT_NODE) {
                return node;
            }
        }
        return null;
    }
    get nextElementSibling() {
        const parent = this.parentNode;
        if (!parent) {
            return null;
        }
        const index = parent._getChildNodesMutator().indexOf(this);
        const childNodes = parent.childNodes;
        let next = null;
        for(let i1 = index + 1; i1 < childNodes.length; i1++){
            const sibling = childNodes[i1];
            if (sibling.nodeType === NodeType.ELEMENT_NODE) {
                next = sibling;
                break;
            }
        }
        return next;
    }
    get previousElementSibling() {
        const parent = this.parentNode;
        if (!parent) {
            return null;
        }
        const index = parent._getChildNodesMutator().indexOf(this);
        const childNodes = parent.childNodes;
        let prev = null;
        for(let i1 = index - 1; i1 >= 0; i1--){
            const sibling = childNodes[i1];
            if (sibling.nodeType === NodeType.ELEMENT_NODE) {
                prev = sibling;
                break;
            }
        }
        return prev;
    }
    querySelector(selectors) {
        if (!this.ownerDocument) {
            throw new Error("Element must have an owner document");
        }
        return this.ownerDocument._nwapi.first(selectors, this);
    }
    querySelectorAll(selectors) {
        if (!this.ownerDocument) {
            throw new Error("Element must have an owner document");
        }
        const nodeList = new NodeList();
        const mutator = nodeList[nodeListMutatorSym]();
        mutator.push(...this.ownerDocument._nwapi.select(selectors, this));
        return nodeList;
    }
    matches(selectorString) {
        return this.ownerDocument._nwapi.match(selectorString, this);
    }
    getElementById(id) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                if (child.id === id) {
                    return child;
                }
                const search = child.getElementById(id);
                if (search) {
                    return search;
                }
            }
        }
        return null;
    }
    getElementsByTagName(tagName) {
        return this._getElementsByTagName(tagName.toUpperCase(), []);
    }
    _getElementsByTagNameWildcard(search) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                search.push(child);
                child._getElementsByTagNameWildcard(search);
            }
        }
        return search;
    }
    _getElementsByTagName(tagName, search) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                if (child.tagName === tagName) {
                    search.push(child);
                }
                child._getElementsByTagName(tagName, search);
            }
        }
        return search;
    }
    getElementsByClassName(className) {
        return this._getElementsByClassName(className, []);
    }
    getElementsByTagNameNS(_namespace, localName) {
        return this.getElementsByTagName(localName);
    }
    _getElementsByClassName(className, search) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                if (child.classList.contains(className)) {
                    search.push(child);
                }
                child._getElementsByClassName(className, search);
            }
        }
        return search;
    }
    tagName;
}
class DOMImplementation {
    constructor(key){
        if (key !== CTOR_KEY) {
            throw new TypeError("Illegal constructor.");
        }
    }
    createDocument() {
        throw new Error("Unimplemented");
    }
    createHTMLDocument(titleStr) {
        titleStr += "";
        const doc = new HTMLDocument(CTOR_KEY);
        const docType = new DocumentType("html", "", "", CTOR_KEY);
        doc.appendChild(docType);
        const html = new Element1("html", doc, [], CTOR_KEY);
        html._setOwnerDocument(doc);
        const head = new Element1("head", html, [], CTOR_KEY);
        const body = new Element1("body", html, [], CTOR_KEY);
        const title = new Element1("title", head, [], CTOR_KEY);
        const titleText = new Text(titleStr);
        title.appendChild(titleText);
        doc.head = head;
        doc.body = body;
        return doc;
    }
    createDocumentType(qualifiedName, publicId, systemId) {
        const doctype = new DocumentType(qualifiedName, publicId, systemId, CTOR_KEY);
        return doctype;
    }
}
function nodesFromString(html) {
    const parsed = JSON.parse(parse6(html));
    const node = nodeFromArray(parsed, null);
    return node;
}
class DocumentType extends Node {
    #qualifiedName = "";
    #publicId = "";
    #systemId = "";
    constructor(name, publicId, systemId, key){
        super("html", NodeType.DOCUMENT_TYPE_NODE, null, key);
        this.#qualifiedName = name;
        this.#publicId = publicId;
        this.#systemId = systemId;
    }
    get name() {
        return this.#qualifiedName;
    }
    get publicId() {
        return this.#publicId;
    }
    get systemId() {
        return this.#systemId;
    }
    _shallowClone() {
        return new DocumentType(this.#qualifiedName, this.#publicId, this.#systemId, CTOR_KEY);
    }
}
class Document1 extends Node {
    head = null;
    body = null;
    implementation;
    #lockState = false;
    #documentURI = "about:blank";
    #title = "";
    #nwapi = __default(this);
    constructor(){
        super("#document", NodeType.DOCUMENT_NODE, null, CTOR_KEY);
        this.implementation = new DOMImplementation(CTOR_KEY);
    }
    _shallowClone() {
        return new Document1();
    }
    get _nwapi() {
        return this.#nwapi;
    }
    get documentURI() {
        return this.#documentURI;
    }
    get title() {
        return this.querySelector("title")?.textContent || "";
    }
    get cookie() {
        return "";
    }
    set cookie(newCookie) {}
    get visibilityState() {
        return "visible";
    }
    get hidden() {
        return false;
    }
    get compatMode() {
        return "CSS1Compat";
    }
    get documentElement() {
        for (const node of this.childNodes){
            if (node.nodeType === NodeType.ELEMENT_NODE) {
                return node;
            }
        }
        return null;
    }
    get doctype() {
        for (const node of this.childNodes){
            if (node.nodeType === NodeType.DOCUMENT_TYPE_NODE) {
                return node;
            }
        }
        return null;
    }
    get childElementCount() {
        let count = 0;
        for (const { nodeType  } of this.childNodes){
            if (nodeType === NodeType.ELEMENT_NODE) {
                count++;
            }
        }
        return count;
    }
    appendChild(child) {
        super.appendChild(child);
        child._setOwnerDocument(this);
        return child;
    }
    createElement(tagName, options) {
        tagName = tagName.toUpperCase();
        const elm = new Element1(tagName, null, [], CTOR_KEY);
        elm._setOwnerDocument(this);
        return elm;
    }
    createElementNS(namespace, qualifiedName, options) {
        if (namespace === "http://www.w3.org/1999/xhtml") {
            return this.createElement(qualifiedName, options);
        } else {
            throw new Error(`createElementNS: "${namespace}" namespace unimplemented`);
        }
    }
    createTextNode(data) {
        return new Text(data);
    }
    createComment(data) {
        return new Comment(data);
    }
    importNode(node, deep = false) {
        const copy = node.cloneNode(deep);
        copy._setOwnerDocument(this);
        return copy;
    }
    adoptNode(node) {
        node._setParent(null);
        node._setOwnerDocument(this);
        return node;
    }
    querySelector(selectors) {
        return this.#nwapi.first(selectors, this);
    }
    querySelectorAll(selectors) {
        const nodeList = new NodeList();
        const mutator = nodeList[nodeListMutatorSym]();
        mutator.push(...this.#nwapi.select(selectors, this));
        return nodeList;
    }
    getElementById(id) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                if (child.id === id) {
                    return child;
                }
                const search = child.getElementById(id);
                if (search) {
                    return search;
                }
            }
        }
        return null;
    }
    getElementsByTagName(tagName) {
        if (tagName === "*") {
            return this.documentElement ? this._getElementsByTagNameWildcard(this.documentElement, []) : [];
        } else {
            return this._getElementsByTagName(tagName.toUpperCase(), []);
        }
    }
    _getElementsByTagNameWildcard(node, search) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                search.push(child);
                child._getElementsByTagNameWildcard(search);
            }
        }
        return search;
    }
    _getElementsByTagName(tagName, search) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                if (child.tagName === tagName) {
                    search.push(child);
                }
                child._getElementsByTagName(tagName, search);
            }
        }
        return search;
    }
    getElementsByTagNameNS(_namespace, localName) {
        return this.getElementsByTagName(localName);
    }
    getElementsByClassName(className) {
        return this._getElementsByClassName(className, []);
    }
    _getElementsByClassName(className, search) {
        for (const child of this.childNodes){
            if (child.nodeType === NodeType.ELEMENT_NODE) {
                if (child.classList.contains(className)) {
                    search.push(child);
                }
                child._getElementsByClassName(className, search);
            }
        }
        return search;
    }
    hasFocus() {
        return true;
    }
}
class HTMLDocument extends Document1 {
    constructor(key){
        if (key !== CTOR_KEY) {
            throw new TypeError("Illegal constructor.");
        }
        super();
    }
    _shallowClone() {
        return new HTMLDocument(CTOR_KEY);
    }
}
function fragmentNodesFromString(html) {
    const parsed = JSON.parse(parseFrag(html));
    const node = nodeFromArray(parsed, null);
    return node;
}
function nodeFromArray(data, parentNode) {
    const elm = new Element1(data[1], parentNode, data[2], CTOR_KEY);
    const childNodes = elm._getChildNodesMutator();
    let childNode;
    for (const child of data.slice(3)){
        switch(child[0]){
            case NodeType.TEXT_NODE:
                childNode = new Text(child[1]);
                childNode.parentNode = childNode.parentElement = elm;
                childNodes.push(childNode);
                break;
            case NodeType.COMMENT_NODE:
                childNode = new Comment(child[1]);
                childNode.parentNode = childNode.parentElement = elm;
                childNodes.push(childNode);
                break;
            case NodeType.DOCUMENT_NODE:
            case NodeType.ELEMENT_NODE:
                nodeFromArray(child, elm);
                break;
            case NodeType.DOCUMENT_TYPE_NODE:
                childNode = new DocumentType(child[1], child[2], child[3], CTOR_KEY);
                childNode.parentNode = childNode.parentElement = elm;
                childNodes.push(childNode);
                break;
        }
    }
    return elm;
}
class DOMParser {
    parseFromString(source, mimeType) {
        if (mimeType !== "text/html") {
            throw new Error(`DOMParser: "${mimeType}" unimplemented`);
        }
        const doc = new HTMLDocument(CTOR_KEY);
        const fakeDoc = nodesFromString(source);
        let htmlNode = null;
        let hasDoctype = false;
        for (const child of [
            ...fakeDoc.childNodes
        ]){
            doc.appendChild(child);
            if (child instanceof DocumentType) {
                hasDoctype = true;
            } else if (child.nodeName === "HTML") {
                htmlNode = child;
            }
        }
        if (!hasDoctype) {
            const docType = new DocumentType("html", "", "", CTOR_KEY);
            if (doc.childNodes.length === 0) {
                doc.appendChild(docType);
            } else {
                doc.childNodes[0].before(docType);
            }
        }
        if (htmlNode) {
            for (const child1 of htmlNode.childNodes){
                switch(child1.tagName){
                    case "HEAD":
                        doc.head = child1;
                        break;
                    case "BODY":
                        doc.body = child1;
                        break;
                }
            }
        }
        return doc;
    }
}
const oldHasInstance = Array[Symbol.hasInstance];
Object.defineProperty(Array, Symbol.hasInstance, {
    value (value) {
        switch(value?.constructor){
            case HTMLCollection:
            case NodeList:
                return false;
            default:
                return oldHasInstance.call(this, value);
        }
    }
});
const oldIsArray = Array.isArray;
Object.defineProperty(Array, "isArray", {
    value: (value)=>{
        switch(value?.constructor){
            case HTMLCollection:
            case NodeList:
                return false;
            default:
                return oldIsArray.call(Array, value);
        }
    }
});
async function initParser() {
    await init();
    register(parse5, parse_frag);
}
async function getDomParser() {
    await initDenoDom();
    return new DOMParser();
}
async function parseHtml(src) {
    await initDenoDom();
    const result1 = new DOMParser().parseFromString(src, "text/html");
    if (!result1) {
        throw new Error("Couldn't parse string into HTML");
    }
    return result1;
}
let s_DenoDomInitialized = false;
async function initDenoDom() {
    if (!s_DenoDomInitialized) {
        try {
            const denoNativePluginPath = Deno.env.get("DENO_DOM_PLUGIN");
            if (denoNativePluginPath) {
                const _symbols = {
                    deno_dom_usize_len: {
                        parameters: [],
                        result: "usize"
                    },
                    deno_dom_parse_sync: {
                        parameters: [
                            "buffer",
                            "usize",
                            "buffer"
                        ],
                        result: "void"
                    },
                    deno_dom_parse_frag_sync: {
                        parameters: [
                            "buffer",
                            "usize",
                            "buffer"
                        ],
                        result: "void"
                    },
                    deno_dom_is_big_endian: {
                        parameters: [],
                        result: "u32"
                    },
                    deno_dom_copy_buf: {
                        parameters: [
                            "buffer",
                            "buffer"
                        ],
                        result: "void"
                    }
                };
                const symbols = _symbols;
                const dylib = Deno.dlopen(denoNativePluginPath, symbols);
                const utf8Encoder = new TextEncoder();
                const utf8Decoder = new TextDecoder();
                const usizeBytes = Number(dylib.symbols.deno_dom_usize_len());
                const isBigEndian = Boolean(dylib.symbols.deno_dom_is_big_endian());
                const dylibParseSync = dylib.symbols.deno_dom_parse_sync.bind(dylib.symbols);
                const dylibParseFragSync = dylib.symbols.deno_dom_parse_frag_sync.bind(dylib.symbols);
                const returnBufSizeLenRaw = new ArrayBuffer(usizeBytes * 2);
                const returnBufSizeLen = new Uint8Array(returnBufSizeLenRaw);
                const genericParse = (parser, srcHtml)=>{
                    const encodedHtml = utf8Encoder.encode(srcHtml);
                    parser(encodedHtml, encodedHtml.length, returnBufSizeLen);
                    const outBufSize = Number(new DataView(returnBufSizeLenRaw).getBigUint64(0, !isBigEndian));
                    const outBuf = new Uint8Array(outBufSize);
                    dylib.symbols.deno_dom_copy_buf(returnBufSizeLen.slice(usizeBytes), outBuf);
                    return utf8Decoder.decode(outBuf);
                };
                const parse = (html)=>{
                    return genericParse(dylibParseSync, html);
                };
                const parseFrag = (html)=>{
                    return genericParse(dylibParseFragSync, html);
                };
                debug("Loaded deno-dom-native");
                register(parse, parseFrag);
                return;
            }
        } catch (e) {
            debug("Error loading deno-dom-native: " + e.message);
        }
    }
    await initParser();
    s_DenoDomInitialized = true;
}
function inputFilesDir(input) {
    const [_, stem] = dirAndStem(input);
    return stem + "_files";
}
function figuresDir(pandocTo) {
    if (pandocTo === "html4") {
        pandocTo = "html";
    }
    pandocTo = (pandocTo || "html").replace(/[\+\-].*$/, "");
    return "figure-" + pandocTo;
}
function formatOutputFile(format) {
    let outputFile = format.pandoc[kOutputFile];
    if (outputFile) {
        if (format.render[kOutputExt]) {
            const existingExtension = extname2(outputFile);
            if (!existingExtension || existingExtension.substring(1) !== format.render[kOutputExt]) {
                outputFile = `${outputFile}.${format.render[kOutputExt]}`;
            }
        }
    }
    return outputFile;
}
function pandocAttrParseText(attr) {
    attr = attr.trim();
    let id = "";
    const classes = [];
    let remainder = "";
    let current = "";
    const resolveCurrent = ()=>{
        const resolve = current;
        current = "";
        if (resolve.length === 0) {
            return true;
        } else if (resolve.startsWith("#")) {
            if (id.length === 0 && resolve.length > 1) {
                id = resolve.substr(1);
                return true;
            } else {
                return false;
            }
        } else if (resolve.startsWith(".")) {
            if (resolve.length > 1) {
                classes.push(resolve.substr(1));
                return true;
            } else {
                return false;
            }
        } else if (resolve === "-") {
            classes.push("unnumbered");
            return true;
        } else {
            remainder = resolve;
            return true;
        }
    };
    for(let i1 = 0; i1 < attr.length; i1++){
        let inQuotes = false;
        const ch = attr[i1];
        inQuotes = ch === '"' ? !inQuotes : inQuotes;
        if (ch !== " " && !inQuotes) {
            current += ch;
        } else if (resolveCurrent()) {
            if (remainder.length > 0) {
                remainder = remainder + attr.substr(i1);
                break;
            }
        } else {
            return null;
        }
    }
    if (resolveCurrent()) {
        if (id.length === 0 && classes.length === 0) {
            remainder = attr;
        }
        return {
            id,
            classes,
            keyvalue: remainder.length > 0 ? pandocAttrKeyvalueFromText(remainder, " ") : []
        };
    } else {
        return null;
    }
}
function pandocAttrKeyvalueFromText(text, separator) {
    if (separator === " ") {
        let convertedText = "";
        let inQuotes = false;
        for(let i1 = 0; i1 < text.length; i1++){
            let ch = text.charAt(i1);
            if (ch === '"') {
                inQuotes = !inQuotes;
            } else if (ch === " " && !inQuotes) {
                ch = "\n";
            }
            convertedText += ch;
        }
        text = convertedText;
    }
    const lines = text.trim().split("\n");
    return lines.map((line)=>{
        const parts = line.trim().split("=");
        return [
            parts[0],
            (parts[1] || "").replace(/^"/, "").replace(/"$/, "")
        ];
    });
}
const kPandocTitleRegex = /^\#{1,}\s(.*)\s\{(.*)\}$/;
const kRemoveHeadingRegex = /^#{1,}\s*/;
function parsePandocTitle(title) {
    title = title ? title.trim() : title;
    const match = title.match(kPandocTitleRegex);
    if (match) {
        const titleRaw = match[1];
        const attrRaw = match[2];
        const parsed = pandocAttrParseText(attrRaw);
        if (parsed) {
            return {
                heading: titleRaw,
                attr: parsed
            };
        } else {
            return {
                heading: titleRaw
            };
        }
    } else {
        return {
            heading: title.replace(kRemoveHeadingRegex, "").trim()
        };
    }
}
function partitionMarkdown(markdown) {
    const markdownLines = [];
    let markdownHeading;
    let markdownHeadingAttr;
    let markdownContainsRefs = false;
    const partitioned = partitionYamlFrontMatter(markdown);
    markdown = partitioned ? partitioned.markdown : markdown;
    for (const line of lines(markdown)){
        if (!markdownContainsRefs) {
            markdownContainsRefs = /^:::\s*{#refs([\s}]|.*?})\s*$/.test(line);
        }
        if (!markdownHeading) {
            if (line.startsWith("#")) {
                const parsedHeading = parsePandocTitle(line);
                markdownHeading = parsedHeading.heading;
                markdownHeadingAttr = parsedHeading.attr;
            } else if (line.match(/^=+\s*$/) || line.match(/^-+\s*$/)) {
                const prevLine = markdownLines[markdownLines.length - 1];
                if (prevLine) {
                    markdownHeading = prevLine;
                    markdownLines.splice(markdownLines.length - 1);
                } else {
                    markdownLines.push(line);
                }
            } else {
                markdownLines.push(line);
            }
        } else {
            markdownLines.push(line);
        }
    }
    return {
        yaml: partitioned ? readYamlFromMarkdown(partitioned.yaml) : undefined,
        headingText: markdownHeading,
        headingAttr: markdownHeadingAttr,
        containsRefs: markdownContainsRefs,
        markdown: markdownLines.join("\n")
    };
}
async function knitrCapabilities() {
    try {
        const result1 = await execProcess({
            cmd: [
                await rBinaryPath("Rscript"),
                resourcePath("capabilities/knitr.R"), 
            ],
            stdout: "piped"
        });
        if (result1.success && result1.stdout) {
            const caps = readYamlFromString(result1.stdout);
            return caps;
        } else {
            return undefined;
        }
    } catch  {
        return undefined;
    }
}
function knitrCapabilitiesMessage(caps, indent = "") {
    const lines = [
        `Version: ${caps.versionMajor}.${caps.versionMinor}.${caps.versionPatch}`,
        `Path: ${caps.home}`,
        `LibPaths:`, 
    ];
    for (const path of caps.libPaths){
        lines.push(`  - ${path}`);
    }
    lines.push(`rmarkdown: ${caps.rmarkdown || "(None)"}`);
    return lines.map((line)=>`${indent}${line}`).join("\n");
}
function knitrInstallationMessage(indent = "") {
    const lines = [
        "The rmarkdown package is not available in this R installation.",
        "Install with " + bold1('install.packages("rmarkdown")'), 
    ];
    return lines.map((line)=>`${indent}${line}`).join("\n");
}
function rInstallationMessage(indent = "") {
    const lines = [
        "Unable to locate an installed version of R.",
        "Install R from " + bold1("https://cloud.r-project.org/"), 
    ];
    return lines.map((line)=>`${indent}${line}`).join("\n");
}
const kTextHtml = "text/html";
const kTextMarkdown = "text/markdown";
const kTextLatex = "text/latex";
const kTextPlain = "text/plain";
const kImagePng = "image/png";
const kImageJpeg = "image/jpeg";
const kImageSvg = "image/svg+xml";
const kApplicationPdf = "application/pdf";
const kApplicationJavascript = "application/javascript";
const kApplicationJupyterWidgetState = "application/vnd.jupyter.widget-state+json";
const kApplicationJupyterWidgetView = "application/vnd.jupyter.widget-view+json";
const kRestructuredText = "text/restructuredtext";
const kApplicationRtf = "application/rtf";
function extensionForMimeImageType(mimeType, defaultType = "bin") {
    switch(mimeType){
        case kImagePng:
            return "png";
        case kImageJpeg:
            return "jpeg";
        case kImageSvg:
            return "svg";
        case kApplicationPdf:
            return "pdf";
        default:
            return defaultType;
    }
}
function contentType(path) {
    return MEDIA_TYPES[extname2(path.toLowerCase())];
}
function isPdfContent(path) {
    return !!path && contentType(path) === kApplicationPdf;
}
function isHtmlContent(path) {
    return !!path && contentType(path) === kTextHtml;
}
function isTextContent(path) {
    return !!path && (contentType(path) === kTextMarkdown || contentType(path) === kTextPlain);
}
const MEDIA_TYPES = {
    ".md": kTextMarkdown,
    ".markdown": kTextMarkdown,
    ".html": kTextHtml,
    ".htm": kTextHtml,
    ".json": "application/json",
    ".map": "application/json",
    ".txt": kTextPlain,
    ".tex": kTextPlain,
    ".adoc": kTextPlain,
    ".asciidoc": kTextPlain,
    ".xml": "text/xml",
    ".ts": "text/typescript",
    ".tsx": "text/tsx",
    ".js": "application/javascript",
    ".jsx": "text/jsx",
    ".gz": "application/gzip",
    ".css": "text/css",
    ".wasm": "application/wasm",
    ".mjs": "application/javascript",
    ".svg": kImageSvg,
    ".png": kImagePng,
    ".jpg": kImageJpeg,
    ".jpeg": kImageJpeg,
    ".pdf": kApplicationPdf,
    ".gif": "image/gif",
    ".wav": "audio/wav",
    ".mp4": "video/mp4",
    ".woff": "application/font-woff",
    ".ttf": "application/font-ttf",
    ".eot": "application/vnd.ms-fontobject",
    ".otf": "application/font-otf",
    ".textile": kTextPlain,
    ".texinfo": kTextPlain,
    ".tei": kTextPlain,
    ".rst": kTextPlain,
    ".org": kTextPlain,
    ".opml": kTextPlain,
    ".muse": kTextPlain,
    ".ms": kTextPlain,
    ".native": kTextPlain,
    ".man": kTextPlain,
    ".dokuwiki": kTextPlain,
    ".haddock": kTextPlain,
    ".icml": kTextPlain,
    ".jira": kTextPlain,
    ".mediawiki": kTextPlain,
    ".xwiki": kTextPlain,
    ".zim": kTextPlain
};
function isDisplayData(output) {
    return [
        "display_data",
        "execute_result"
    ].includes(output.output_type);
}
function isCaptionableData(output) {
    if (isDisplayData(output)) {
        const displayData = output;
        return !displayData.noCaption;
    } else {
        return false;
    }
}
function displayDataMimeType(output, options) {
    const displayPriority = [
        kTextMarkdown,
        kImageSvg,
        kImagePng,
        kImageJpeg, 
    ];
    if (options.toHtml) {
        const htmlFormats = [
            kApplicationJupyterWidgetState,
            kApplicationJupyterWidgetView,
            kApplicationJavascript,
            kTextHtml, 
        ];
        if (options.toMarkdown) {
            displayPriority.unshift(...htmlFormats);
        } else {
            displayPriority.push(...htmlFormats);
        }
        displayPriority.unshift(kApplicationJupyterWidgetState, kApplicationJupyterWidgetView, kApplicationJavascript, kTextHtml);
    } else if (options.toLatex) {
        displayPriority.push(kTextLatex, kApplicationPdf);
    } else if (options.toMarkdown) {
        displayPriority.push(kTextHtml);
    }
    if (displayDataHasHtmlTable(output) && !displayPriority.includes(kTextHtml)) {
        displayPriority.push(kTextHtml);
    }
    displayPriority.push(kTextPlain);
    const availDisplay = Object.keys(output.data);
    for (const display of displayPriority){
        if (availDisplay.includes(display)) {
            return display;
        }
    }
    return null;
}
function displayDataLatexIsMath(latex) {
    if (latex.length > 0) {
        const first = latex[0];
        const last = latex[latex.length - 1];
        return first.startsWith("$") && last.endsWith("$") || first.startsWith("\\begin{") && last.includes("\\end{");
    }
    return false;
}
function displayDataWithMarkdownMath(output) {
    if (Array.isArray(output.data[kTextLatex]) && !output.data[kTextMarkdown]) {
        const latex = output.data[kTextLatex];
        if (displayDataLatexIsMath(latex)) {
            output = cloneDeep1(output);
            output.data[kTextMarkdown] = output.data[kTextLatex];
            return output;
        }
    }
    return output;
}
function displayDataHasHtmlTable(output) {
    const html = output.data[kTextHtml] || undefined;
    if (html) {
        const htmlLower = html.map((line)=>line.toLowerCase());
        return htmlLower.some((line)=>!!line.match(/<[Tt][Aa][Bb][Ll][Ee]/)) && htmlLower.some((line)=>!!line.match(/<\/[Tt][Aa][Bb][Ll][Ee]/));
    } else {
        return false;
    }
}
function displayDataIsImage(mimeType) {
    return [
        kImagePng,
        kImageJpeg,
        kImageSvg,
        kApplicationPdf
    ].includes(mimeType);
}
function displayDataIsTextPlain(mimeType) {
    return [
        kTextPlain
    ].includes(mimeType);
}
function displayDataIsMarkdown(mimeType) {
    return [
        kTextMarkdown
    ].includes(mimeType);
}
function displayDataIsLatex(mimeType) {
    return [
        kTextLatex
    ].includes(mimeType);
}
function displayDataIsHtml(mimeType) {
    return [
        kTextHtml
    ].includes(mimeType);
}
function displayDataIsJson(mimeType) {
    return [
        kApplicationJupyterWidgetState,
        kApplicationJupyterWidgetView
    ].includes(mimeType);
}
function displayDataIsJavascript(mimeType) {
    return [
        kApplicationJavascript
    ].includes(mimeType);
}
function removeAndPreserveHtml(nb) {
    const htmlPreserve = {};
    nb.cells.forEach((cell)=>{
        if (cell.cell_type === "code") {
            cell.outputs?.forEach((output)=>{
                if (isDisplayData(output)) {
                    const displayOutput = output;
                    const html = displayOutput.data[kTextHtml];
                    const htmlText = Array.isArray(html) ? html.join("") : html;
                    if (html && isPreservedHtml(htmlText)) {
                        const key = "preserve" + generate().replaceAll("-", "");
                        htmlPreserve[key] = htmlText;
                        displayOutput.data[kTextMarkdown] = [
                            key
                        ];
                        displayOutput.noCaption = true;
                        delete displayOutput.data[kTextHtml];
                    }
                }
            });
        }
    });
    if (Object.keys(htmlPreserve).length > 0) {
        return htmlPreserve;
    } else {
        return undefined;
    }
}
function restorePreservedHtml(html, preserve) {
    if (preserve) {
        Object.keys(preserve).forEach((key)=>{
            const keyLoc = html.indexOf(key);
            html = html.slice(0, keyLoc) + preserve[key] + html.slice(keyLoc + key.length);
        });
    }
    return html;
}
function isPreservedHtml(_html) {
    return false;
}
function postProcessRestorePreservedHtml(options) {
    const outputPath = isAbsolute2(options.output) ? options.output : join3(dirname2(options.target.input), options.output);
    let output = Deno.readTextFileSync(outputPath);
    output = restorePreservedHtml(output, options.preserve);
    Deno.writeTextFileSync(outputPath, output);
}
function languagesInMarkdown(markdown) {
    const languages = new Set();
    const kChunkRegex = /^[\t >]*```+\s*\{([a-zA-Z0-9_]+)( *[ ,].*)?\}\s*$/gm;
    kChunkRegex.lastIndex = 0;
    let match = kChunkRegex.exec(markdown);
    while(match){
        const language = match[1].toLowerCase();
        if (!languages.has(language)) {
            languages.add(language);
        }
        match = kChunkRegex.exec(markdown);
    }
    kChunkRegex.lastIndex = 0;
    return languages;
}
const kRmdExtensions = [
    ".rmd",
    ".rmarkdown"
];
const knitrEngine = {
    name: kKnitrEngine,
    defaultExt: ".qmd",
    defaultYaml: ()=>[],
    defaultContent: ()=>[
            "```{r}",
            "1 + 1",
            "```", 
        ],
    validExtensions: ()=>kRmdExtensions.concat(kRmdExtensions),
    claimsExtension: (ext)=>{
        return kRmdExtensions.includes(ext.toLowerCase());
    },
    claimsLanguage: (language)=>{
        return language.toLowerCase() === "r";
    },
    target: (file, _quiet, markdown)=>{
        if (markdown === undefined) {
            markdown = mappedStringFromFile(file);
        }
        const target = {
            source: file,
            input: file,
            markdown,
            metadata: readYamlFromMarkdown(markdown.value)
        };
        return Promise.resolve(target);
    },
    partitionedMarkdown: (file)=>{
        return Promise.resolve(partitionMarkdown(Deno.readTextFileSync(file)));
    },
    execute: async (options)=>{
        const inputBasename = basename2(options.target.input);
        const inputStem = basename2(inputBasename, extname2(inputBasename));
        const result1 = await callR("execute", {
            ...options,
            target: undefined,
            input: options.target.input,
            markdown: options.target.markdown.value
        }, options.tempDir, options.projectDir, options.quiet, (output)=>{
            output = output.replaceAll(`${inputStem}.rmarkdown`, inputBasename);
            const m = output.match(/^Quitting from lines (\d+)-(\d+)/m);
            if (m) {
                const f1 = lineColToIndex(options.target.markdown.value);
                const f2 = mappedIndexToLineCol(options.target.markdown);
                const newLine1 = f2(f1({
                    line: Number(m[1]) - 1,
                    column: 0
                })).line + 1;
                const newLine2 = f2(f1({
                    line: Number(m[2]) - 1,
                    column: 0
                })).line + 1;
                output = output.replace(/^Quitting from lines (\d+)-(\d+)/m, `Quitting from lines ${newLine1}-${newLine2}`);
            }
            output = filterAlwaysAllowHtml(output);
            return output;
        });
        const includes = result1.includes;
        if (Array.isArray(includes) && includes.length === 0) {
            result1.includes = {};
        }
        return result1;
    },
    dependencies: (options)=>{
        return callR("dependencies", {
            ...options,
            target: undefined,
            input: options.target.input
        }, options.tempDir, options.projectDir, options.quiet);
    },
    postprocess: async (options)=>{
        postProcessRestorePreservedHtml(options);
        if (options.format.render?.[kCodeLink]) {
            await callR("postprocess", {
                ...options,
                target: undefined,
                preserve: undefined,
                input: options.target.input
            }, options.tempDir, options.projectDir, options.quiet, undefined, false).then(()=>{
                return Promise.resolve();
            }, ()=>{
                warning(`Unable to perform code-link (code-link requires R packages rmarkdown, downlit, and xml2)`);
                return Promise.resolve();
            });
        }
    },
    canFreeze: true,
    generatesFigures: true,
    ignoreDirs: ()=>{
        return [
            "renv",
            "packrat",
            "rsconnect"
        ];
    },
    run: (options)=>{
        return callR("run", options, options.tempDir, options.projectDir);
    }
};
async function callR(action, params, tempDir, projectDir, quiet, outputFilter, reportError = true) {
    const cwd = withinActiveRenv() ? undefined : projectDir;
    const resultsFile = Deno.makeTempFileSync({
        dir: tempDir,
        prefix: "r-results",
        suffix: ".json"
    });
    const input = JSON.stringify({
        action,
        params,
        results: resultsFile
    });
    try {
        const result1 = await execProcess({
            cmd: [
                await rBinaryPath("Rscript"),
                resourcePath("rmd/rmd.R"), 
            ],
            cwd,
            stderr: quiet ? "piped" : "inherit"
        }, input, "stdout>stderr", (output)=>{
            if (outputFilter) {
                output = outputFilter(output);
            }
            return red1(output);
        });
        if (result1.success) {
            const results = await Deno.readTextFile(resultsFile);
            await Deno.remove(resultsFile);
            const resultsJson = JSON.parse(results);
            return resultsJson;
        } else {
            if (quiet) {
                error(result1.stderr || "");
            }
            if (reportError) {
                await printCallRDiagnostics();
            }
            return Promise.reject();
        }
    } catch (e) {
        if (reportError) {
            if (e?.message) {
                info("");
                error(e.message);
            }
            await printCallRDiagnostics();
        }
        return Promise.reject();
    }
}
function withinActiveRenv() {
    const kRProfile = ".Rprofile";
    const kREnvActivate = 'source("renv/activate.R")';
    if (existsSync(".Rprofile")) {
        const profile = Deno.readTextFileSync(kRProfile);
        return profile.includes(kREnvActivate) && !profile.includes("# " + kREnvActivate);
    } else {
        return false;
    }
}
async function printCallRDiagnostics() {
    const caps = await knitrCapabilities();
    if (caps && !caps.rmarkdown) {
        info("");
        info("R installation:");
        info(knitrCapabilitiesMessage(caps, "  "));
        info("");
        info(knitrInstallationMessage());
        info("");
    } else if (!caps) {
        info("");
        info(rInstallationMessage());
        info("");
    }
}
function filterAlwaysAllowHtml(s) {
    if (s.indexOf("Functions that produce HTML output found in document targeting") !== -1) {
        s = s.replace("your rmarkdown file", "your quarto file").replace("always_allow_html: true", "prefer-html: true");
    }
    return s;
}
function runningInCI() {
    if ([
        "CI",
        "CONTINUOUS_INTEGRATION",
        "BUILD_NUMBER",
        "RUN_ID"
    ].some(checkEnv)) {
        return true;
    }
    return vendors.some((vendor)=>{
        const envs = Array.isArray(vendor.env) ? vendor.env : [
            vendor.env
        ];
        return envs.some(checkEnv);
    });
}
function checkEnv(obj) {
    if (typeof obj === "string") {
        return !!Deno.env.get(obj);
    } else {
        return Object.keys(obj).every(function(k) {
            return Deno.env.get(k) === obj[k];
        });
    }
}
const vendors = [
    {
        "name": "AppVeyor",
        "constant": "APPVEYOR",
        "env": "APPVEYOR",
        "pr": "APPVEYOR_PULL_REQUEST_NUMBER"
    },
    {
        "name": "Azure Pipelines",
        "constant": "AZURE_PIPELINES",
        "env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
        "pr": "SYSTEM_PULLREQUEST_PULLREQUESTID"
    },
    {
        "name": "Appcircle",
        "constant": "APPCIRCLE",
        "env": "AC_APPCIRCLE"
    },
    {
        "name": "Bamboo",
        "constant": "BAMBOO",
        "env": "bamboo_planKey"
    },
    {
        "name": "Bitbucket Pipelines",
        "constant": "BITBUCKET",
        "env": "BITBUCKET_COMMIT",
        "pr": "BITBUCKET_PR_ID"
    },
    {
        "name": "Bitrise",
        "constant": "BITRISE",
        "env": "BITRISE_IO",
        "pr": "BITRISE_PULL_REQUEST"
    },
    {
        "name": "Buddy",
        "constant": "BUDDY",
        "env": "BUDDY_WORKSPACE_ID",
        "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
    },
    {
        "name": "Buildkite",
        "constant": "BUILDKITE",
        "env": "BUILDKITE",
        "pr": {
            "env": "BUILDKITE_PULL_REQUEST",
            "ne": "false"
        }
    },
    {
        "name": "CircleCI",
        "constant": "CIRCLE",
        "env": "CIRCLECI",
        "pr": "CIRCLE_PULL_REQUEST"
    },
    {
        "name": "Cirrus CI",
        "constant": "CIRRUS",
        "env": "CIRRUS_CI",
        "pr": "CIRRUS_PR"
    },
    {
        "name": "AWS CodeBuild",
        "constant": "CODEBUILD",
        "env": "CODEBUILD_BUILD_ARN"
    },
    {
        "name": "Codefresh",
        "constant": "CODEFRESH",
        "env": "CF_BUILD_ID",
        "pr": {
            "any": [
                "CF_PULL_REQUEST_NUMBER",
                "CF_PULL_REQUEST_ID"
            ]
        }
    },
    {
        "name": "Codeship",
        "constant": "CODESHIP",
        "env": {
            "CI_NAME": "codeship"
        }
    },
    {
        "name": "Drone",
        "constant": "DRONE",
        "env": "DRONE",
        "pr": {
            "DRONE_BUILD_EVENT": "pull_request"
        }
    },
    {
        "name": "dsari",
        "constant": "DSARI",
        "env": "DSARI"
    },
    {
        "name": "GitHub Actions",
        "constant": "GITHUB_ACTIONS",
        "env": "GITHUB_ACTIONS",
        "pr": {
            "GITHUB_EVENT_NAME": "pull_request"
        }
    },
    {
        "name": "GitLab CI",
        "constant": "GITLAB",
        "env": "GITLAB_CI",
        "pr": "CI_MERGE_REQUEST_ID"
    },
    {
        "name": "GoCD",
        "constant": "GOCD",
        "env": "GO_PIPELINE_LABEL"
    },
    {
        "name": "LayerCI",
        "constant": "LAYERCI",
        "env": "LAYERCI",
        "pr": "LAYERCI_PULL_REQUEST"
    },
    {
        "name": "Hudson",
        "constant": "HUDSON",
        "env": "HUDSON_URL"
    },
    {
        "name": "Jenkins",
        "constant": "JENKINS",
        "env": [
            "JENKINS_URL",
            "BUILD_ID"
        ],
        "pr": {
            "any": [
                "ghprbPullId",
                "CHANGE_ID"
            ]
        }
    },
    {
        "name": "Magnum CI",
        "constant": "MAGNUM",
        "env": "MAGNUM"
    },
    {
        "name": "Netlify CI",
        "constant": "NETLIFY",
        "env": "NETLIFY",
        "pr": {
            "env": "PULL_REQUEST",
            "ne": "false"
        }
    },
    {
        "name": "Nevercode",
        "constant": "NEVERCODE",
        "env": "NEVERCODE",
        "pr": {
            "env": "NEVERCODE_PULL_REQUEST",
            "ne": "false"
        }
    },
    {
        "name": "Render",
        "constant": "RENDER",
        "env": "RENDER",
        "pr": {
            "IS_PULL_REQUEST": "true"
        }
    },
    {
        "name": "Sail CI",
        "constant": "SAIL",
        "env": "SAILCI",
        "pr": "SAIL_PULL_REQUEST_NUMBER"
    },
    {
        "name": "Semaphore",
        "constant": "SEMAPHORE",
        "env": "SEMAPHORE",
        "pr": "PULL_REQUEST_NUMBER"
    },
    {
        "name": "Screwdriver",
        "constant": "SCREWDRIVER",
        "env": "SCREWDRIVER",
        "pr": {
            "env": "SD_PULL_REQUEST",
            "ne": "false"
        }
    },
    {
        "name": "Shippable",
        "constant": "SHIPPABLE",
        "env": "SHIPPABLE",
        "pr": {
            "IS_PULL_REQUEST": "true"
        }
    },
    {
        "name": "Solano CI",
        "constant": "SOLANO",
        "env": "TDDIUM",
        "pr": "TDDIUM_PR_ID"
    },
    {
        "name": "Strider CD",
        "constant": "STRIDER",
        "env": "STRIDER"
    },
    {
        "name": "TaskCluster",
        "constant": "TASKCLUSTER",
        "env": [
            "TASK_ID",
            "RUN_ID"
        ]
    },
    {
        "name": "TeamCity",
        "constant": "TEAMCITY",
        "env": "TEAMCITY_VERSION"
    },
    {
        "name": "Travis CI",
        "constant": "TRAVIS",
        "env": "TRAVIS",
        "pr": {
            "env": "TRAVIS_PULL_REQUEST",
            "ne": "false"
        }
    },
    {
        "name": "Vercel",
        "constant": "VERCEL",
        "env": "NOW_BUILDER"
    },
    {
        "name": "Visual Studio App Center",
        "constant": "APPCENTER",
        "env": "APPCENTER_BUILD_ID"
    }, 
];
const base64abc = [
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z",
    "a",
    "b",
    "c",
    "d",
    "e",
    "f",
    "g",
    "h",
    "i",
    "j",
    "k",
    "l",
    "m",
    "n",
    "o",
    "p",
    "q",
    "r",
    "s",
    "t",
    "u",
    "v",
    "w",
    "x",
    "y",
    "z",
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "+",
    "/", 
];
function encode(data) {
    const uint8 = typeof data === "string" ? new TextEncoder().encode(data) : data instanceof Uint8Array ? data : new Uint8Array(data);
    let result1 = "", i1;
    const l1 = uint8.length;
    for(i1 = 2; i1 < l1; i1 += 3){
        result1 += base64abc[uint8[i1 - 2] >> 2];
        result1 += base64abc[(uint8[i1 - 2] & 0x03) << 4 | uint8[i1 - 1] >> 4];
        result1 += base64abc[(uint8[i1 - 1] & 0x0f) << 2 | uint8[i1] >> 6];
        result1 += base64abc[uint8[i1] & 0x3f];
    }
    if (i1 === l1 + 1) {
        result1 += base64abc[uint8[i1 - 2] >> 2];
        result1 += base64abc[(uint8[i1 - 2] & 0x03) << 4];
        result1 += "==";
    }
    if (i1 === l1) {
        result1 += base64abc[uint8[i1 - 2] >> 2];
        result1 += base64abc[(uint8[i1 - 2] & 0x03) << 4 | uint8[i1 - 1] >> 4];
        result1 += base64abc[(uint8[i1 - 1] & 0x0f) << 2];
        result1 += "=";
    }
    return result1;
}
function decode(b64) {
    const binString = atob(b64);
    const size = binString.length;
    const bytes = new Uint8Array(size);
    for(let i1 = 0; i1 < size; i1++){
        bytes[i1] = binString.charCodeAt(i1);
    }
    return bytes;
}
function checkForEqualsInChunk(error, _parse, _schema) {
    if (typeof error.violatingObject.result !== "string") {
        return error;
    }
    const badObject = error.source.value.substring(error.violatingObject.start, error.violatingObject.end);
    if (errorKeyword(error) !== "type") {
        return error;
    }
    let m;
    const heading = `${error.location}: ${quotedStringColor(badObject)} must be a YAML mapping.`;
    const errorMsg = [
        `${quotedStringColor(badObject)} is a string.`
    ];
    const newError = {
        heading,
        error: errorMsg,
        info: {}
    };
    addFileInfo(newError, error.source);
    addInstancePathInfo(newError, error.instancePath);
    if (m = badObject.match(/= *TRUE/i)) {
        newError.info["suggestion-fix"] = `Try using ${quotedStringColor(": true")} instead of ${quotedStringColor(m[0])}.`;
    } else if (m = badObject.match(/= *FALSE/i)) {
        newError.info["suggestion-fix"] = `Try using ${quotedStringColor(": false")} instead of ${quotedStringColor(m[0])}.`;
    } else if (badObject.match("=")) {
        newError.info["suggestion-fix"] = `Try using ${quotedStringColor(":")} instead of ${quotedStringColor("=")}.`;
    } else {
        return error;
    }
    return {
        ...error,
        message: tidyverseFormatError(newError)
    };
}
const makeEngineSchema = (engine)=>idSchema(objectRefSchemaFromContextGlob("cell-*", (field, _path)=>{
        const engineTag = field && field.tags && field.tags.engine;
        switch(typeof engineTag){
            case "undefined":
                return true;
            case "string":
                return engineTag === engine;
            case "object":
                return engineTag.indexOf(engine) !== -1;
            default:
                throw new Error(`Internal Error: bad engine tag ${engineTag}`);
        }
    }), `engine-${engine}`);
const markdownEngineSchema = defineCached(async ()=>{
    return {
        schema: makeEngineSchema("markdown"),
        errorHandlers: []
    };
}, "engine-markdown");
const knitrEngineSchema = defineCached(async ()=>{
    const result1 = await makeEngineSchema("knitr");
    return {
        schema: result1,
        errorHandlers: [
            checkForEqualsInChunk
        ]
    };
}, "engine-knitr");
const jupyterEngineSchema = defineCached(async ()=>{
    return {
        schema: makeEngineSchema("jupyter"),
        errorHandlers: []
    };
}, "engine-jupyter");
async function getEngineOptionsSchema() {
    const obj = {
        markdown: await markdownEngineSchema(),
        knitr: await knitrEngineSchema(),
        jupyter: await jupyterEngineSchema()
    };
    return obj;
}
function guessChunkOptionsFormat(options) {
    const noIndentOrColon = /^[^:\s]+[^:]+$/;
    const chunkLines = lines(options);
    if (chunkLines.filter((l1)=>l1.match(noIndentOrColon)).length === 0) {
        return "yaml";
    }
    if (chunkLines.some((l1)=>l1.trim() !== "" && !l1.trimRight().endsWith(",") && l1.indexOf("=") === -1)) {
        return "yaml";
    }
    return "knitr";
}
function mappedSource(source, substrs) {
    const params = [];
    for (const { range  } of substrs){
        params.push(range);
    }
    return mappedString(source, params);
}
function partitionCellOptions(language, source) {
    const commentChars = langCommentChars(language);
    const optionPattern = optionCommentPattern(commentChars[0]);
    const optionSuffix = commentChars[1] || "";
    const optionsSource = [];
    const yamlLines = [];
    for (const line of source){
        const optionMatch = line.match(optionPattern);
        if (optionMatch) {
            if (!optionSuffix || line.trimRight().endsWith(optionSuffix)) {
                let yamlOption = line.substring(optionMatch[0].length);
                if (optionSuffix) {
                    yamlOption = yamlOption.trimRight();
                    yamlOption = yamlOption.substring(0, yamlOption.length - optionSuffix.length);
                }
                yamlLines.push(yamlOption);
                optionsSource.push(line);
                continue;
            }
        }
        break;
    }
    if (guessChunkOptionsFormat(yamlLines.join("\n")) === "knitr") {
        return {
            yaml: undefined,
            optionsSource,
            source: source.slice(yamlLines.length),
            sourceStartLine: yamlLines.length
        };
    }
    let yaml;
    if (yamlLines.length > 0) {
        yaml = readAnnotatedYamlFromMappedString(asMappedString(yamlLines.join("\n"))).result;
    }
    return {
        yaml: yaml,
        optionsSource,
        source: source.slice(yamlLines.length),
        sourceStartLine: yamlLines.length
    };
}
async function parseAndValidateCellOptions(mappedYaml, language, validate = false, engine = "", lenient = false) {
    if (mappedYaml.value.trim().length === 0) {
        return undefined;
    }
    const engineOptionsSchema = await getEngineOptionsSchema();
    let schema = engineOptionsSchema[engine];
    const languages = getYamlIntelligenceResource("handlers/languages.yml");
    if (languages.indexOf(language) !== -1) {
        try {
            schema = getYamlIntelligenceResource(`handlers/${language}/schema.yml`);
        } catch (_e) {
            schema = undefined;
        }
    }
    if (schema === undefined || !validate) {
        return readAnnotatedYamlFromMappedString(mappedYaml, lenient).result;
    }
    const { yaml , yamlValidationErrors  } = await readAndValidateYamlFromMappedString(mappedYaml, schema, undefined, lenient);
    if (yamlValidationErrors.length > 0) {
        throw new ValidationError2(`Validation of YAML metadata for cell with engine ${engine} failed`, yamlValidationErrors);
    }
    return yaml;
}
function partitionCellOptionsText(language, source) {
    const commentChars = langCommentChars(language);
    const optionPattern = optionCommentPattern(commentChars[0]);
    const optionSuffix = commentChars[1] || "";
    const optionsSource = [];
    const yamlLines = [];
    let endOfYaml = 0;
    for (const line of rangedLines(source.value, true)){
        const optionMatch = line.substring.match(optionPattern);
        if (optionMatch) {
            if (!optionSuffix || line.substring.trimEnd().endsWith(optionSuffix)) {
                let yamlOption = line.substring.substring(optionMatch[0].length);
                if (optionSuffix) {
                    yamlOption = yamlOption.trimEnd();
                    yamlOption = yamlOption.substring(0, yamlOption.length - optionSuffix.length).trimEnd();
                }
                endOfYaml = line.range.start + optionMatch[0].length + yamlOption.length;
                const rangedYamlOption = {
                    substring: yamlOption,
                    range: {
                        start: line.range.start + optionMatch[0].length,
                        end: endOfYaml
                    }
                };
                yamlLines.push(rangedYamlOption);
                optionsSource.push(line);
                continue;
            }
        }
        break;
    }
    const mappedYaml = yamlLines.length ? mappedSource(source, yamlLines) : undefined;
    return {
        yaml: mappedYaml,
        optionsSource,
        source: mappedString(source, [
            {
                start: endOfYaml,
                end: source.value.length
            }
        ]),
        sourceStartLine: yamlLines.length
    };
}
async function partitionCellOptionsMapped(language, outerSource, validate = false, engine = "", lenient = false) {
    const { yaml: mappedYaml , optionsSource , source , sourceStartLine ,  } = partitionCellOptionsText(language, outerSource);
    if (language !== "r" || guessChunkOptionsFormat((mappedYaml || asMappedString("")).value) === "yaml") {
        const yaml = await parseAndValidateCellOptions(mappedYaml || asMappedString(""), language, validate, engine, lenient);
        return {
            yaml: yaml,
            optionsSource,
            source,
            sourceStartLine
        };
    } else {
        return {
            yaml: undefined,
            optionsSource,
            source,
            sourceStartLine
        };
    }
}
function langCommentChars(lang) {
    const chars = kLangCommentChars[lang] || "#";
    if (!Array.isArray(chars)) {
        return [
            chars
        ];
    } else {
        return chars;
    }
}
function optionCommentPattern(comment) {
    return new RegExp("^" + escapeRegExp(comment) + "\\s*\\| ?");
}
function addLanguageComment(language, comment) {
    kLangCommentChars[language] = comment;
}
function optionCommentPatternFromLanguage(language) {
    return optionCommentPattern(langCommentChars(language)[0]);
}
const kLangCommentChars = {
    r: "#",
    python: "#",
    julia: "#",
    scala: "//",
    matlab: "%",
    csharp: "//",
    fsharp: "//",
    c: [
        "/*",
        "*/"
    ],
    css: [
        "/*",
        "*/"
    ],
    sas: [
        "*",
        ";"
    ],
    powershell: "#",
    bash: "#",
    sql: "--",
    mysql: "--",
    psql: "--",
    lua: "--",
    cpp: "//",
    cc: "//",
    stan: "#",
    octave: "#",
    fortran: "!",
    fortran95: "!",
    awk: "#",
    gawk: "#",
    stata: "*",
    java: "//",
    groovy: "//",
    sed: "#",
    perl: "#",
    ruby: "#",
    tikz: "%",
    js: "//",
    d3: "//",
    node: "//",
    sass: "//",
    coffee: "#",
    go: "//",
    asy: "//",
    haskell: "--",
    dot: "//",
    ojs: "//",
    apl: "⍝"
};
function escapeRegExp(str) {
    return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function shortUuid() {
    return generate().replaceAll("-", "").slice(0, 8);
}
class PngImage {
    content = [];
    width = -1;
    height = -1;
    dpiX = -1;
    dpiY = -1;
    bitDepth = -1;
    colourType = -1;
    compressionMethod = -1;
    filterMethod = -1;
    interlaceMethod = -1;
    constructor(bytes, sizeOnly = true){
        const magicNumberBytes = bytes.slice(0, 8);
        const magicNumber = bytesToString(magicNumberBytes);
        if (magicNumber !== "13780787113102610") {
            throw new Error("Not a png file");
        }
        let pos = 8;
        while(pos < bytes.length){
            const chunk = new PngChunk(bytes.slice(pos));
            switch(chunk.type){
                case "IHDR":
                    this.parseIHDRChunk(chunk, sizeOnly);
                    break;
                case "pHYs":
                    this.parsePHYSChunk(chunk);
                    break;
                case "IDAT":
                    return;
            }
            pos += chunk.totalLength;
        }
    }
    parseIHDRChunk(chunk, sizeOnly) {
        this.width = bytesToUint32(chunk.data, 0, 4);
        this.height = bytesToUint32(chunk.data, 4, 4);
        if (sizeOnly) {
            return;
        }
        this.bitDepth = chunk.data.slice(8, 9)[0];
        if (this.bitDepth !== 8) throw new Error("bitDepth not supported");
        this.colourType = chunk.data.slice(9, 10)[0];
        if (this.colourType !== 6) throw new Error("colourType not supported");
        this.compressionMethod = chunk.data.slice(10, 11)[0];
        if (this.compressionMethod !== 0) {
            throw new Error("compressionMethod not supported");
        }
        this.filterMethod = chunk.data.slice(11, 12)[0];
        if (this.filterMethod !== 0) throw new Error("filterMethod not supported");
        this.interlaceMethod = chunk.data.slice(12, 13)[0];
        if (this.interlaceMethod !== 0) {
            throw new Error("Interlacing not supported");
        }
    }
    parsePHYSChunk(chunk) {
        const meter = chunk.data[8];
        if (meter === 1) {
            const x = bytesToUint32(chunk.data, 0, 4);
            const y = bytesToUint32(chunk.data, 4, 4);
            const kMetersPerInch = .0254;
            this.dpiX = Math.round(x * kMetersPerInch);
            this.dpiY = Math.round(y * kMetersPerInch);
        }
    }
}
class PngChunk {
    totalLength;
    dataLength;
    type;
    data;
    crc;
    constructor(bytes){
        this.dataLength = this.getLength(bytes);
        this.type = this.getType(bytes);
        this.data = this.getData(bytes);
        this.crc = this.getCRC(bytes);
        this.totalLength = this.dataLength + 12;
    }
    getLength(bytes) {
        const lengthBytes = bytes.slice(0, 4);
        return bytesToUint32(lengthBytes);
    }
    getType(bytes) {
        const typeByte = bytes.slice(4, 8);
        return new TextDecoder("ascii").decode(typeByte);
    }
    getData(bytes) {
        return bytes.slice(8, 8 + this.dataLength);
    }
    getCRC(bytes) {
        return bytes.slice(8 + this.dataLength, 8 + this.dataLength + 4);
    }
}
const MAX_SIGNIFICANT_SIZE = 127;
function bytesToUint32(byteArray, start = 0, count) {
    if (count === undefined) {
        count = byteArray.length;
    }
    if (count > 4) {
        throw new Error("Length cannot be greater than 4");
    }
    let position = start;
    let value = 0;
    if (count === 4) {
        let sigValue = byteArray[position];
        if (sigValue > 127) {
            value += MAX_SIGNIFICANT_SIZE << 24;
            sigValue -= MAX_SIGNIFICANT_SIZE;
        }
        value += sigValue << 24;
        position++;
    }
    for(let i1 = position; i1 < start + count; i1++){
        value += byteArray[i1] << 8 * (count - (i1 - start) - 1);
    }
    return value;
}
function bytesToString(byteArray, start = 0, count) {
    if (count === undefined) {
        count = byteArray.length;
    }
    let result1 = "";
    for(let i1 = start; i1 < start + count; i1++){
        const __byte = byteArray[i1];
        if (__byte === 0) {
            result1 += "00";
        } else if (__byte < 10) {
            result1 += `0${__byte.toString()}`;
        } else {
            result1 += __byte.toString();
        }
    }
    return result1;
}
function hideCell(cell, options) {
    return shouldHide(cell, options, kInclude);
}
function hideCode(cell, options) {
    return shouldHide(cell, options, kEcho);
}
function hideOutput(cell, options) {
    return shouldHide(cell, options, kOutput);
}
function hideWarnings(cell, options) {
    if (options.execute[kOutput] === false && cell.options[kOutput] !== false) {
        return cell.options[kWarning] || false;
    } else {
        return shouldHide(cell, options, kWarning);
    }
}
function includeCell(cell, options) {
    return shouldInclude(cell, options, kInclude);
}
function includeCode(cell, options) {
    return shouldInclude(cell, options, kEcho);
}
function echoFenced(cell, options) {
    const fenced = cell.options.echo === "fenced" || cell.options.echo === undefined && options.execute.echo === "fenced";
    return fenced;
}
function includeOutput(cell, options) {
    return shouldInclude(cell, options, kOutput);
}
function includeWarnings(cell, options) {
    if (options.execute[kOutput] === false && cell.options[kOutput] !== false) {
        return cell.options[kWarning] || false;
    } else {
        return shouldInclude(cell, options, kWarning);
    }
}
function shouldHide(cell, options, context) {
    if (cell.options[context] !== undefined) {
        return !cell.options[context] && options.keepHidden;
    } else {
        return !options.execute[context] && options.keepHidden;
    }
}
function shouldInclude(cell, options, context) {
    if (cell.options[context] !== undefined) {
        return !!(cell.options[context] || options.keepHidden);
    } else {
        return !!(options.execute[context] || options.keepHidden);
    }
}
function pandocAutoIdentifier(text, asciify) {
    if (asciify) {
        text = pandocAsciify(text);
    }
    return text.replace(/[!"#$%&')*+,\/:;<=>?@\[\\\]^`{|}~]/g, "").replace(/\s/g, "-").toLowerCase().replace(/^[^A-Za-z]+/, "");
}
function gfmAutoIdentifier(text, asciify) {
    if (asciify) {
        text = pandocAsciify(text);
    }
    return text.replace(/[!"#$%&')*+,\.\/:;<=>?@\[\\\]^`{|}~]/g, "").replace(/\s/g, "-").toLowerCase();
}
function pandocAsciify(text) {
    const chars = [];
    const len = text.length;
    let newch;
    for(let i1 = 0; i1 < len; i1++){
        newch = "";
        const ch = text.charCodeAt(i1);
        switch(ch){
            case 192:
            case 193:
            case 194:
            case 195:
            case 196:
            case 197:
            case 256:
            case 258:
            case 260:
            case 461:
            case 512:
            case 514:
            case 550:
            case 7680:
            case 7840:
            case 7842:
                newch = "A";
                break;
            case 7682:
            case 7684:
            case 7686:
                newch = "B";
                break;
            case 199:
            case 262:
            case 264:
            case 266:
            case 268:
                newch = "C";
                break;
            case 270:
            case 7690:
            case 7692:
            case 7694:
            case 7696:
            case 7698:
                newch = "D";
                break;
            case 200:
            case 201:
            case 203:
            case 274:
            case 276:
            case 278:
            case 280:
            case 282:
            case 516:
            case 518:
            case 552:
            case 7704:
            case 7706:
            case 7864:
            case 7866:
            case 7868:
                newch = "E";
                break;
            case 7710:
                newch = "F";
                break;
            case 284:
            case 286:
            case 288:
            case 290:
            case 486:
            case 500:
            case 7712:
                newch = "G";
                break;
            case 292:
            case 542:
            case 7714:
            case 7716:
            case 7718:
            case 7720:
            case 7722:
                newch = "H";
                break;
            case 204:
            case 205:
            case 206:
            case 207:
            case 296:
            case 298:
            case 300:
            case 302:
            case 304:
            case 463:
            case 520:
            case 522:
            case 7724:
            case 7880:
            case 7882:
                newch = "I";
                break;
            case 308:
                newch = "J";
                break;
            case 310:
            case 488:
            case 7728:
            case 7730:
            case 7732:
            case 8490:
                newch = "K";
                break;
            case 313:
            case 315:
            case 317:
            case 7734:
            case 7738:
            case 7740:
                newch = "L";
                break;
            case 7742:
            case 7744:
            case 7746:
                newch = "M";
                break;
            case 209:
            case 323:
            case 325:
            case 327:
            case 504:
            case 7748:
            case 7750:
            case 7752:
            case 7754:
                newch = "N";
                break;
            case 210:
            case 211:
            case 212:
            case 213:
            case 214:
            case 332:
            case 334:
            case 336:
            case 416:
            case 465:
            case 490:
            case 524:
            case 526:
            case 558:
            case 7884:
            case 7886:
                newch = "O";
                break;
            case 7764:
            case 7766:
                newch = "P";
                break;
            case 340:
            case 342:
            case 344:
            case 528:
            case 530:
            case 7768:
            case 7770:
            case 7774:
                newch = "R";
                break;
            case 346:
            case 348:
            case 350:
            case 352:
            case 536:
            case 7776:
            case 7778:
                newch = "S";
                break;
            case 354:
            case 356:
            case 538:
            case 7786:
            case 7788:
            case 7790:
            case 7792:
                newch = "T";
                break;
            case 217:
            case 218:
            case 219:
            case 220:
            case 360:
            case 362:
            case 364:
            case 366:
            case 368:
            case 370:
            case 431:
            case 467:
            case 532:
            case 534:
            case 7794:
            case 7796:
            case 7798:
            case 7908:
            case 7910:
                newch = "U";
                break;
            case 7804:
            case 7806:
                newch = "V";
                break;
            case 372:
            case 7808:
            case 7810:
            case 7812:
            case 7814:
            case 7816:
                newch = "W";
                break;
            case 7818:
            case 7820:
                newch = "X";
                break;
            case 221:
            case 374:
            case 376:
            case 562:
            case 7822:
            case 7922:
            case 7924:
            case 7926:
            case 7928:
                newch = "Y";
                break;
            case 377:
            case 379:
            case 381:
            case 7824:
            case 7826:
            case 7828:
                newch = "Z";
                break;
            case 224:
            case 225:
            case 226:
            case 227:
            case 228:
            case 229:
            case 257:
            case 259:
            case 261:
            case 462:
            case 513:
            case 515:
            case 551:
            case 553:
            case 7681:
            case 7841:
            case 7843:
                newch = "a";
                break;
            case 7683:
            case 7685:
            case 7687:
                newch = "b";
                break;
            case 231:
            case 263:
            case 265:
            case 267:
            case 269:
                newch = "c";
                break;
            case 271:
            case 7691:
            case 7693:
            case 7695:
            case 7697:
            case 7699:
                newch = "d";
                break;
            case 232:
            case 233:
            case 234:
            case 235:
            case 275:
            case 277:
            case 279:
            case 281:
            case 283:
            case 517:
            case 519:
            case 7705:
            case 7707:
            case 7865:
            case 7867:
            case 7869:
                newch = "e";
                break;
            case 7711:
                newch = "f";
                break;
            case 285:
            case 287:
            case 289:
            case 291:
            case 487:
            case 501:
            case 7713:
                newch = "g";
                break;
            case 293:
            case 543:
            case 7715:
            case 7717:
            case 7719:
            case 7721:
            case 7723:
            case 7830:
                newch = "h";
                break;
            case 236:
            case 237:
            case 238:
            case 239:
            case 297:
            case 299:
            case 301:
            case 303:
            case 305:
            case 464:
            case 521:
            case 523:
            case 7725:
            case 7881:
            case 7883:
                newch = "i";
                break;
            case 309:
            case 496:
                newch = "j";
                break;
            case 311:
            case 489:
            case 7729:
            case 7731:
            case 7733:
                newch = "k";
                break;
            case 314:
            case 316:
            case 318:
            case 7735:
            case 7739:
            case 7741:
                newch = "l";
                break;
            case 7743:
            case 7745:
            case 7747:
                newch = "m";
                break;
            case 241:
            case 324:
            case 326:
            case 328:
            case 505:
            case 7749:
            case 7751:
            case 7753:
            case 7755:
                newch = "n";
                break;
            case 242:
            case 243:
            case 244:
            case 245:
            case 246:
            case 333:
            case 335:
            case 337:
            case 417:
            case 432:
            case 466:
            case 491:
            case 525:
            case 527:
            case 559:
            case 7885:
            case 7887:
                newch = "o";
                break;
            case 7765:
            case 7767:
                newch = "p";
                break;
            case 341:
            case 343:
            case 345:
            case 529:
            case 531:
            case 7769:
            case 7771:
            case 7775:
                newch = "r";
                break;
            case 347:
            case 349:
            case 351:
            case 353:
            case 537:
            case 7777:
            case 7779:
                newch = "s";
                break;
            case 355:
            case 357:
            case 539:
            case 7787:
            case 7789:
            case 7791:
            case 7793:
            case 7831:
                newch = "t";
                break;
            case 249:
            case 250:
            case 251:
            case 252:
            case 361:
            case 363:
            case 365:
            case 367:
            case 369:
            case 371:
            case 468:
            case 533:
            case 535:
            case 7795:
            case 7797:
            case 7799:
            case 7909:
            case 7911:
                newch = "u";
                break;
            case 7805:
            case 7807:
                newch = "v";
                break;
            case 373:
            case 7809:
            case 7811:
            case 7813:
            case 7815:
            case 7817:
            case 7832:
                newch = "w";
                break;
            case 7819:
            case 7821:
                newch = "x";
                break;
            case 253:
            case 255:
            case 375:
            case 563:
            case 7833:
            case 7923:
            case 7925:
            case 7927:
            case 7929:
                newch = "y";
                break;
            case 378:
            case 380:
            case 382:
            case 7825:
            case 7827:
            case 7829:
                newch = "z";
                break;
            case 894:
                newch = ";";
                break;
            case 8175:
                newch = "`";
                break;
            case 8800:
                newch = "=";
                break;
            case 8814:
                newch = "<";
                break;
            case 8815:
                newch = ">";
                break;
        }
        if (newch) {
            chars.push(newch.charCodeAt(0));
        } else if (ch < 128) {
            chars.push(ch);
        }
    }
    return String.fromCharCode(...chars);
}
function isAbsoluteRef(href) {
    return /^(?:http|https)\:\/\/.+/.test(href);
}
function isFileRef(href) {
    return !/^\w+:/.test(href) && !href.startsWith("#");
}
function httpFileRequestHandler(options) {
    async function serveFile(filePath, req) {
        let fileResponse;
        if (options.onFile) {
            fileResponse = await options.onFile(filePath, req);
        }
        if (!fileResponse) {
            fileResponse = {
                contentType: contentType(filePath),
                body: Deno.readFileSync(filePath)
            };
        }
        return httpContentResponse(fileResponse.body, fileResponse.contentType);
    }
    function serveFallback(req, e, fsPath) {
        const encoder = new TextEncoder();
        if (e instanceof URIError) {
            return Promise.resolve(new Response(encoder.encode("BadRequest"), {
                status: 400
            }));
        } else if (e instanceof Deno.errors.NotFound) {
            const url = normalizeURL(req.url);
            const handle404 = options.on404 ? options.on404(url, req) : {
                print: true,
                response: {
                    body: encoder.encode("Not Found")
                }
            };
            const ignoreFileNames = [
                "favicon.ico",
                "listings.json"
            ];
            handle404.print = handle404.print && !!options.printUrls && (!fsPath || !ignoreFileNames.includes(basename2(fsPath)) && extname2(fsPath) !== ".map");
            if (handle404.print) {
                printUrl(url, false);
            }
            return Promise.resolve(new Response(handle404.response.body, {
                status: 404,
                headers: {
                    "Content-Type": kTextHtml
                }
            }));
        } else {
            error(`500 (Internal Error): ${e.message}`, {
                bold: true
            });
            return Promise.resolve(new Response(encoder.encode("Internal server error"), {
                status: 500
            }));
        }
    }
    return async (req)=>{
        if (options.onRequest) {
            const response = await options.onRequest(req);
            if (response) {
                return response;
            }
        }
        let response1;
        let fsPath;
        try {
            const baseDir = pathWithForwardSlashes(options.baseDir);
            const normalizedUrl = normalizeURL(req.url);
            fsPath = pathWithForwardSlashes(baseDir + normalizedUrl);
            if (fsPath.indexOf(baseDir) !== 0) {
                fsPath = baseDir;
            }
            const fileInfo = existsSync(fsPath) ? Deno.statSync(fsPath) : undefined;
            if (fileInfo && fileInfo.isDirectory) {
                fsPath = join3(fsPath, options.defaultFile || "index.html");
            }
            if (fileInfo?.isDirectory && !normalizedUrl.endsWith("/")) {
                response1 = serveRedirect(normalizedUrl + "/");
            } else {
                response1 = await serveFile(fsPath, req);
                if (normalizedUrl === "/" && !isBrowserPreviewable(fsPath)) {
                    response1.headers.append("content-disposition", 'attachment; filename="' + options.defaultFile + '"');
                }
                if (options.printUrls === "all") {
                    printUrl(normalizedUrl);
                }
            }
        } catch (e) {
            response1 = await serveFallback(req, e, fsPath);
        }
        return response1;
    };
}
function httpContentResponse(content, contentType) {
    if (typeof content === "string") {
        content = new TextEncoder().encode(content);
    }
    const headers = new Headers();
    headers.set("Content-Length", content.byteLength.toString());
    if (contentType) {
        headers.set("Content-Type", contentType);
    }
    headers.set("Cache-Control", "no-store, max-age=0");
    return new Response(content, {
        status: 200,
        headers
    });
}
function normalizeURL(url) {
    let normalizedUrl = url;
    try {
        normalizedUrl = decodeURI(normalizedUrl);
    } catch (e) {
        if (!(e instanceof URIError)) {
            throw e;
        }
    }
    try {
        const absoluteURI = new URL(normalizedUrl);
        normalizedUrl = decodeURI(absoluteURI.pathname);
    } catch (e1) {
        if (!(e1 instanceof TypeError)) {
            throw e1;
        }
    }
    if (normalizedUrl[0] !== "/") {
        throw new URIError("The request URI is malformed.");
    }
    normalizedUrl = posix.normalize(normalizedUrl);
    const startOfParams = normalizedUrl.indexOf("?");
    return startOfParams > -1 ? normalizedUrl.slice(0, startOfParams) : normalizedUrl;
}
function isBrowserPreviewable(file) {
    return isHtmlContent(file) || isPdfContent(file) || isTextContent(file);
}
function maybeDisplaySocketError(e) {
    if (!(e instanceof Deno.errors.NotFound) && !(e instanceof Deno.errors.BrokenPipe) && !(e instanceof Deno.errors.NotConnected) && !(e instanceof Deno.errors.ConnectionAborted) && !(e instanceof Deno.errors.ConnectionReset) && !(e instanceof Deno.errors.ConnectionRefused) && !(e instanceof DOMException)) {
        logError(e);
    }
}
function serveRedirect(url) {
    const headers = new Headers();
    headers.set("Location", url);
    return new Response(null, {
        status: 301,
        headers
    });
}
function printUrl(url, found = true) {
    const format = !found ? red1 : undefined;
    const urlDisplay = url + (found ? "" : " (404: Not Found)");
    if (isHtmlContent(url) || url.endsWith("/") || extname2(url) === "") {
        info(`GET: ${urlDisplay}`, {
            bold: false,
            format: format || green1
        });
    } else if (!found) {
        info(urlDisplay, {
            dim: found,
            format,
            indent: 2
        });
    }
}
const kCssUrlRegex = /url\((?!['"]?(?:data|https?):)(['"])?([^'"]*?)\1\)/g;
const kCssImportRegex = /@import\s(?!['"](?:data|https?):)(['"])([^'"]*?)\1/g;
function cssFileResourceReferences(files) {
    return files.reduce((allRefs, file)=>{
        if (extname2(file).toLowerCase() === ".css") {
            if (existsSync(file)) {
                file = Deno.realPathSync(file);
                const css = Deno.readTextFileSync(file);
                const cssRefs = cssFileRefs(css).map((ref)=>join3(dirname2(file), ref));
                allRefs.push(...cssRefs);
                allRefs.push(...cssFileResourceReferences(cssRefs));
            }
        }
        return allRefs;
    }, []);
}
function isCssFile(path) {
    return extname2(path).toLowerCase() === ".css";
}
function fixupCssReferences(css, resolveRef) {
    let destCss = css.replaceAll(kCssUrlRegex, (_match, p1, p2)=>{
        const path = resolveRef(p2);
        return `url(${p1 || ""}${path}${p1 || ""})`;
    });
    destCss = destCss.replaceAll(kCssImportRegex, (_match, p1, p2)=>{
        const path = resolveRef(p2);
        return `@import ${p1 || ""}${path}${p1 || ""}`;
    });
    return destCss;
}
function cssFileRefs(css) {
    return cssImports(css).concat(cssResources(css)).filter(isFileRef);
}
function cssResources(css) {
    return matchCss(css, kCssUrlRegex);
}
function cssImports(css) {
    return matchCss(css, kCssImportRegex);
}
function matchCss(css, regex) {
    const matches = [];
    regex.lastIndex = 0;
    let match = regex.exec(css);
    while(match != null){
        matches.push(match[2]);
        match = regex.exec(css);
    }
    regex.lastIndex = 0;
    return matches;
}
function asCssFont(value) {
    if (!value) {
        return undefined;
    } else {
        const fontFamily = String(value).split(",").map((font)=>{
            font = font.trim();
            if (font.includes(" ")) {
                font = `"${font}"`;
            }
            return font;
        }).filter((font)=>font.length > 0).join(", ");
        return `${fontFamily}`;
    }
}
function asCssNumber(value) {
    if (typeof value === "number") {
        return String(value);
    } else if (!value) {
        return undefined;
    } else {
        const str = String(value);
        const match = str.match(/(^[0-9]*)/);
        if (match) {
            return match[1];
        } else {
            return undefined;
        }
    }
}
function asCssSize(value) {
    if (typeof value === "number") {
        if (value === 0) {
            return "0";
        } else {
            return value + "px";
        }
    } else if (!value) {
        return undefined;
    } else {
        const str = String(value);
        if (str !== "0" && !str.match(/\w$/)) {
            return str + "px";
        } else {
            return str;
        }
    }
}
function asCssColor(value) {
    if (typeof value === "string") {
        if (value === "none") {
            return "transparent";
        } else {
            return value;
        }
    }
}
const kBootstrapColors = [
    "primary",
    "secondary",
    "success",
    "info",
    "warning",
    "danger",
    "light",
    "dark", 
];
const kBootstrapPaletteRegex = RegExp(`gray\-[1-9]00`);
function asBootstrapColor(value) {
    if (typeof value === "string") {
        if (kBootstrapColors.includes(value) || value.match(kBootstrapPaletteRegex)) {
            return `$${value}`;
        } else {
            return asCssColor(value);
        }
    }
}
function asHtmlId(text) {
    return pandocAutoIdentifier(text, false);
}
function getDecodedAttribute(element, attrib) {
    const value = element.getAttribute(attrib);
    if (value) {
        return decodeURI(value);
    } else {
        return value;
    }
}
const kAttrReplacements = {
    '"': "&quot;",
    "'": "&#039;",
    "<": "&lt;",
    ">": "&gt;",
    "&": "&amp;"
};
function encodeAttributeValue(value) {
    if (typeof value === "string") {
        let result1 = value;
        Object.keys(kAttrReplacements).forEach((key)=>{
            result1 = result1.replace(key, kAttrReplacements[key]);
        });
        return result1;
    } else {
        return value;
    }
}
function findParent(el, match) {
    let targetEl = el;
    do {
        if (targetEl.parentElement) {
            if (match(targetEl.parentElement)) {
                return targetEl.parentElement;
            } else {
                targetEl = targetEl.parentElement;
            }
        } else {
            return undefined;
        }
    }while (targetEl !== null && targetEl.nodeType === 1)
    return undefined;
}
const kHtmlResourceTags = {
    "a": [
        "href"
    ],
    "img": [
        "src",
        "data-src"
    ],
    "link": [
        "href"
    ],
    "script": [
        "src"
    ],
    "embed": [
        "src"
    ],
    "iframe": [
        "src"
    ],
    "section": [
        "data-background-image",
        "data-background-video"
    ]
};
function discoverResourceRefs(doc) {
    const refs = [];
    Object.keys(kHtmlResourceTags).forEach((tag)=>{
        for (const attrib of kHtmlResourceTags[tag]){
            refs.push(...resolveResourceTag(doc, tag, attrib));
        }
    });
    const styles = doc.querySelectorAll("style");
    for(let i1 = 0; i1 < styles.length; i1++){
        const style = styles[i1];
        if (style.innerHTML) {
            refs.push(...cssFileRefs(style.innerHTML));
        }
    }
    return Promise.resolve({
        resources: refs,
        supporting: []
    });
}
function fixEmptyHrefs(doc) {
    const anchors = doc.querySelectorAll("a");
    for(let i1 = 0; i1 < anchors.length; ++i1){
        const anchor = anchors[i1];
        if (!anchor.getAttribute("href")) {
            anchor.setAttribute("href", "");
        }
    }
    return Promise.resolve({
        resources: [],
        supporting: []
    });
}
function processFileResourceRefs(doc, tag, attrib, onRef) {
    const tags = doc.querySelectorAll(tag);
    for(let i1 = 0; i1 < tags.length; i1++){
        const tag1 = tags[i1];
        const href = getDecodedAttribute(tag1, attrib);
        if (href !== null && href.length > 0 && isFileRef(href)) {
            onRef(tag1, href);
        }
    }
}
function resolveResourceTag(doc, tag, attrib) {
    const refs = [];
    processFileResourceRefs(doc, tag, attrib, (_tag, ref)=>refs.push(ref));
    return refs;
}
function cellLabel(cell) {
    const label = asHtmlId(cell.options[kCellLabel] || cell.metadata[kCellName] || "");
    if (label && !label.startsWith("#")) {
        return "#" + label;
    } else {
        return label;
    }
}
function cellLabelValidator() {
    const cellLabels = new Set();
    return function(cell) {
        const label = cellLabel(cell);
        if (label) {
            if (cellLabels.has(label)) {
                throw new Error("Cell label names must be unique (found duplicate '" + label + "')");
            } else {
                cellLabels.add(label);
            }
        }
    };
}
function shouldLabelCellContainer(cell, outputs, options) {
    if (!outputs) {
        return true;
    }
    if (!includeOutput(cell, options)) {
        return true;
    }
    const displayDataOutputs = outputs.filter(isDisplayData);
    if (displayDataOutputs.length === 0) {
        return true;
    }
    if (displayDataOutputs.length > 1 && !Array.isArray(cell.options[kCellFigCap])) {
        return true;
    }
    if (hasTableLabel(cell.options)) {
        return true;
    }
    return false;
}
function hasTableLabel(options) {
    return typeof options[kCellLabel] === "string" && options[kCellLabel]?.startsWith("tbl-");
}
function shouldLabelOutputContainer(output, cellOptions, options) {
    if (isDisplayData(output)) {
        if (hasTableLabel(cellOptions)) {
            return false;
        }
        if (!isCaptionableData(output)) {
            return false;
        }
        const mimeType = displayDataMimeType(output, options);
        if (mimeType) {
            if (displayDataIsImage(mimeType)) {
                return false;
            }
        }
        return true;
    } else {
        return false;
    }
}
function resolveCaptions(cell) {
    if (Array.isArray(cell.options[kCellFigCap])) {
        const figCap = cell.options[kCellFigCap];
        if (cell.outputs && cell.outputs.filter(isCaptionableData).length > 0) {
            return {
                cellCaption: undefined,
                outputCaptions: figCap
            };
        } else {
            return {
                cellCaption: undefined,
                outputCaptions: []
            };
        }
    } else if (cell.options[kCellFigCap]) {
        if (cell.options[kCellFigSubCap] !== undefined) {
            let subCap = cell.options[kCellFigSubCap];
            if (subCap === true) {
                subCap = [
                    ""
                ];
            }
            if (!Array.isArray(subCap)) {
                subCap = [
                    String(subCap)
                ];
            }
            return {
                cellCaption: cell.options[kCellFigCap],
                outputCaptions: subCap
            };
        } else {
            return {
                cellCaption: undefined,
                outputCaptions: [
                    cell.options[kCellFigCap]
                ]
            };
        }
    } else {
        return {
            cellCaption: undefined,
            outputCaptions: []
        };
    }
}
function extractJupyterWidgetDependencies(nb) {
    const jsWidgets = haveOutputType(nb, [
        kApplicationJavascript,
        kTextHtml
    ]);
    const jupyterWidgets = haveOutputType(nb, [
        kApplicationJupyterWidgetView
    ]);
    const htmlLibraries = [];
    nb.cells.forEach((cell)=>{
        if (cell.cell_type === "code") {
            cell.outputs = cell.outputs?.filter((output)=>{
                if (isDisplayData(output)) {
                    const displayOutput = output;
                    const html = displayOutput.data[kTextHtml];
                    const htmlText = Array.isArray(html) ? html.join("") : html;
                    if (html && isWidgetIncludeHtml(htmlText)) {
                        htmlLibraries.push(htmlText);
                        return false;
                    }
                }
                return true;
            });
        }
    });
    return {
        jsWidgets,
        jupyterWidgets,
        htmlLibraries,
        widgetsState: nb.metadata.widgets?.[kApplicationJupyterWidgetState]
    };
}
function includesForJupyterWidgetDependencies(dependencies, tempDir) {
    let haveJavascriptWidgets = false;
    let haveJupyterWidgets = false;
    const htmlLibraries = [];
    let widgetsState;
    for (const dependency of dependencies){
        haveJavascriptWidgets = haveJavascriptWidgets || dependency.jsWidgets;
        haveJupyterWidgets = haveJupyterWidgets || dependency.jupyterWidgets;
        for (const htmlLib of dependency.htmlLibraries){
            if (!htmlLibraries.includes(htmlLib)) {
                htmlLibraries.push(htmlLib);
            }
        }
        if (dependency.widgetsState) {
            if (!widgetsState) {
                widgetsState = dependency.widgetsState;
            } else {
                widgetsState = mergeConfigs(widgetsState, dependency.widgetsState);
            }
        }
    }
    const head = [];
    if (haveJavascriptWidgets || haveJupyterWidgets) {
        head.push('<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" integrity="sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==" crossorigin="anonymous"></script>');
        head.push('<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>');
        head.push("<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>");
    }
    head.push(...htmlLibraries);
    if (haveJupyterWidgets) {
        head.push('<script src="https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js" crossorigin="anonymous"></script>');
    }
    const afterBody = [];
    if (haveJupyterWidgets && widgetsState) {
        afterBody.push(`<script type=${kApplicationJupyterWidgetState}>`);
        afterBody.push(JSON.stringify(widgetsState));
        afterBody.push("</script>");
    }
    const widgetTempFile = (lines)=>{
        const tempFile = Deno.makeTempFileSync({
            dir: tempDir,
            prefix: "jupyter-widgets-",
            suffix: ".html"
        });
        Deno.writeTextFileSync(tempFile, lines.join("\n") + "\n");
        return tempFile;
    };
    const result1 = {
        inHeader: "",
        afterBody: ""
    };
    if (head.length > 0) {
        result1.inHeader = widgetTempFile(head);
    }
    if (afterBody.length > 0) {
        result1.afterBody = widgetTempFile(afterBody);
    }
    return result1;
}
function haveOutputType(nb, mimeTypes) {
    return nb.cells.some((cell)=>{
        if (cell.cell_type === "code" && cell.outputs) {
            return cell.outputs.some((output)=>{
                if (isDisplayData(output)) {
                    const outputTypes = Object.keys(output.data);
                    return outputTypes.some((type)=>mimeTypes.includes(type));
                } else {
                    return false;
                }
            });
        } else {
            return false;
        }
    });
}
function isWidgetIncludeHtml(html) {
    return isPlotlyLibrary(html);
}
function isPlotlyLibrary(html) {
    return /^\s*<script type="text\/javascript">/.test(html) && (/require\.undef\(["']plotly["']\)/.test(html) || /define\('plotly'/.test(html));
}
const kNoLanguage = "(none)";
const jupyterCapsCache = new Map();
async function jupyterCapabilities(kernelspec) {
    const language = kernelspec?.language || kNoLanguage;
    if (!jupyterCapsCache.has(language)) {
        const juliaCaps = await getVerifiedJuliaCondaJupyterCapabilities();
        if (language === "julia" && juliaCaps) {
            jupyterCapsCache.set(language, juliaCaps);
            return juliaCaps;
        }
        const quartoCaps = await getQuartoJupyterCapabilities();
        if (quartoCaps) {
            jupyterCapsCache.set(language, quartoCaps);
            return quartoCaps;
        }
        if (isWindows() && pyPython()) {
            const pyLauncherCaps = await getPyLauncherJupyterCapabilities();
            if (pyLauncherCaps) {
                jupyterCapsCache.set(language, pyLauncherCaps);
            }
        }
        if (!jupyterCapsCache.has(language)) {
            const condaCaps = await getJupyterCapabilities([
                "python"
            ]);
            if (condaCaps?.conda) {
                jupyterCapsCache.set(language, condaCaps);
            } else {
                const caps = isWindows() ? await getPyLauncherJupyterCapabilities() : await getJupyterCapabilities([
                    "python3"
                ]);
                if (caps) {
                    jupyterCapsCache.set(language, caps);
                }
            }
            if (!jupyterCapsCache.get(language)?.jupyter_core && juliaCaps) {
                jupyterCapsCache.set(language, juliaCaps);
            }
        }
    }
    return jupyterCapsCache.get(language);
}
async function getVerifiedJuliaCondaJupyterCapabilities() {
    const home = isWindows() ? Deno.env.get("USERPROFILE") : Deno.env.get("HOME");
    if (home) {
        const juliaPython = join3(home, ".julia", "conda", "3", isWindows() ? "python.exe" : join3("bin", "python3"));
        if (existsSync(juliaPython)) {
            const caps = await getJupyterCapabilities([
                juliaPython
            ]);
            if (caps?.jupyter_core) {
                return caps;
            }
        }
    }
}
function getQuartoJupyterCapabilities() {
    const quartoJupyter = Deno.env.get("QUARTO_PYTHON");
    if (quartoJupyter) {
        if (existsSync(quartoJupyter)) {
            let quartoJupyterBin = quartoJupyter;
            if (Deno.statSync(quartoJupyter).isDirectory) {
                const bin = [
                    "python3",
                    "python",
                    "python3.exe",
                    "python.exe"
                ].find((bin)=>{
                    return existsSync(join3(quartoJupyter, bin));
                });
                if (bin) {
                    quartoJupyterBin = join3(quartoJupyter, bin);
                } else {
                    quartoJupyterBin = undefined;
                }
            }
            if (quartoJupyterBin) {
                return getJupyterCapabilities([
                    quartoJupyterBin
                ]);
            }
        }
        warning("Specified QUARTO_PYTHON '" + quartoJupyter + "' does not exist.");
        return undefined;
    } else {
        return undefined;
    }
}
async function jupyterCapabilitiesNoConda() {
    const caps = await getQuartoJupyterCapabilities();
    if (caps && !caps.conda) {
        return caps;
    }
    if (isWindows()) {
        return await getPyLauncherJupyterCapabilities();
    } else {
        const caps1 = await getJupyterCapabilities([
            "python3"
        ]);
        if (caps1) {
            if (caps1?.conda) {
                return await getJupyterCapabilities([
                    "/usr/local/bin/python3"
                ]) || await getJupyterCapabilities([
                    "/usr/bin/python3"
                ]);
            } else {
                return caps1;
            }
        } else {
            return undefined;
        }
    }
}
function isEnvDir(dir) {
    return existsSync(join3(dir, "pyvenv.cfg")) || existsSync(join3(dir, "conda-meta"));
}
function pyPython() {
    return Deno.env.get("PY_PYTHON");
}
function getPyLauncherJupyterCapabilities() {
    return getJupyterCapabilities([
        "py"
    ], true);
}
async function getJupyterCapabilities(cmd, pyLauncher = false) {
    try {
        const result1 = await execProcess({
            cmd: [
                ...cmd,
                resourcePath("capabilities/jupyter.py"), 
            ],
            stdout: "piped",
            stderr: "piped"
        });
        if (result1.success && result1.stdout) {
            const caps = readYamlFromString(result1.stdout);
            if (caps.versionMajor >= 3) {
                caps.pyLauncher = pyLauncher;
                return caps;
            } else {
                return undefined;
            }
        } else {
            return undefined;
        }
    } catch  {
        return undefined;
    }
}
async function pythonExec(kernelspec, binaryOnly = false) {
    const caps = await jupyterCapabilities(kernelspec);
    return pythonExecForCaps(caps, binaryOnly);
}
function pythonExecForCaps(caps, binaryOnly = false) {
    if (caps?.pyLauncher) {
        return [
            "py"
        ];
    } else if (isWindows()) {
        return [
            binaryOnly ? "python" : caps?.executable || "python"
        ];
    } else {
        return [
            binaryOnly ? "python3" : caps?.executable || "python3"
        ];
    }
}
async function jupyterExec(kernelspec) {
    return [
        ...await pythonExec(kernelspec),
        "-m",
        "jupyter", 
    ];
}
function isJupyterKernelspec(x) {
    if (x && typeof x === "object") {
        return typeof x.name === "string" && typeof x.language === "string" && typeof x.display_name === "string";
    } else {
        return false;
    }
}
async function jupyterKernelspecForLanguage(language) {
    const kernelspecs = await jupyterKernelspecs();
    for (const kernelspec of kernelspecs.values()){
        if (kernelspec.language === language) {
            return kernelspec;
        }
    }
}
async function jupyterKernelspec(name) {
    const kernelspecs = await jupyterKernelspecs();
    return kernelspecs.get(name);
}
async function jupyterKernelspecs() {
    try {
        const result1 = await execProcess({
            cmd: [
                ...await jupyterExec(),
                "--paths",
                "--json"
            ],
            stdout: "piped",
            stderr: "piped"
        });
        if (result1.success) {
            const kernelmap = new Map();
            const dataPaths = JSON.parse(result1.stdout).data;
            for (const path of dataPaths){
                if (!existsSync(path)) {
                    continue;
                }
                const kernels = join3(path, "kernels");
                if (!existsSync(kernels)) {
                    continue;
                }
                for (const walk of walkSync(kernels, {
                    maxDepth: 1
                })){
                    if (walk.path === kernels || !walk.isDirectory) {
                        continue;
                    }
                    const kernelConfig = join3(walk.path, "kernel.json");
                    if (existsSync(kernelConfig)) {
                        const config = JSON.parse(Deno.readTextFileSync(kernelConfig));
                        const name = basename2(walk.path);
                        kernelmap.set(name, {
                            name,
                            language: config.language,
                            display_name: config.display_name
                        });
                    }
                }
            }
            if (kernelmap.size > 0) {
                return kernelmap;
            } else {
                return kDefaultKernelspecs;
            }
        } else {
            return kDefaultKernelspecs;
        }
    } catch (e) {
        debug("Error reading kernelspecs: " + e.message);
        return kDefaultKernelspecs;
    }
}
function jupyterDefaultPythonKernelspec() {
    return {
        "display_name": "Python 3",
        "language": "python",
        "name": "python3"
    };
}
const kDefaultKernelspecs = new Map();
kDefaultKernelspecs.set("python3", jupyterDefaultPythonKernelspec());
var commonjsGlobal1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
    return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
function createCommonjsModule3(fn, basedir, module) {
    return module = {
        path: basedir,
        exports: {},
        require: function(path, base) {
            return commonjsRequire(path, base === void 0 || base === null ? module.path : base);
        }
    }, fn(module, module.exports), module.exports;
}
function commonjsRequire() {
    throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
}
var ansi_up = createCommonjsModule3(function(module, exports) {
    (function(root, factory) {
        if (typeof exports.nodeName !== "string") {
            factory(exports);
        } else {
            var exp = {};
            factory(exp);
            root.AnsiUp = exp.default;
        }
    })(commonjsGlobal1, function(exports2) {
        var __makeTemplateObject = this && this.__makeTemplateObject || function(cooked, raw) {
            if (Object.defineProperty) {
                Object.defineProperty(cooked, "raw", {
                    value: raw
                });
            } else {
                cooked.raw = raw;
            }
            return cooked;
        };
        var PacketKind;
        (function(PacketKind2) {
            PacketKind2[PacketKind2["EOS"] = 0] = "EOS";
            PacketKind2[PacketKind2["Text"] = 1] = "Text";
            PacketKind2[PacketKind2["Incomplete"] = 2] = "Incomplete";
            PacketKind2[PacketKind2["ESC"] = 3] = "ESC";
            PacketKind2[PacketKind2["Unknown"] = 4] = "Unknown";
            PacketKind2[PacketKind2["SGR"] = 5] = "SGR";
            PacketKind2[PacketKind2["OSCURL"] = 6] = "OSCURL";
        })(PacketKind || (PacketKind = {}));
        var AnsiUp = function() {
            function AnsiUp2() {
                this.VERSION = "5.1.0";
                this.setup_palettes();
                this._use_classes = false;
                this.bold = false;
                this.italic = false;
                this.underline = false;
                this.fg = this.bg = null;
                this._buffer = "";
                this._url_whitelist = {
                    http: 1,
                    https: 1
                };
            }
            Object.defineProperty(AnsiUp2.prototype, "use_classes", {
                get: function() {
                    return this._use_classes;
                },
                set: function(arg) {
                    this._use_classes = arg;
                },
                enumerable: false,
                configurable: true
            });
            Object.defineProperty(AnsiUp2.prototype, "url_whitelist", {
                get: function() {
                    return this._url_whitelist;
                },
                set: function(arg) {
                    this._url_whitelist = arg;
                },
                enumerable: false,
                configurable: true
            });
            AnsiUp2.prototype.setup_palettes = function() {
                var _this = this;
                this.ansi_colors = [
                    [
                        {
                            rgb: [
                                0,
                                0,
                                0
                            ],
                            class_name: "ansi-black"
                        },
                        {
                            rgb: [
                                187,
                                0,
                                0
                            ],
                            class_name: "ansi-red"
                        },
                        {
                            rgb: [
                                0,
                                187,
                                0
                            ],
                            class_name: "ansi-green"
                        },
                        {
                            rgb: [
                                187,
                                187,
                                0
                            ],
                            class_name: "ansi-yellow"
                        },
                        {
                            rgb: [
                                0,
                                0,
                                187
                            ],
                            class_name: "ansi-blue"
                        },
                        {
                            rgb: [
                                187,
                                0,
                                187
                            ],
                            class_name: "ansi-magenta"
                        },
                        {
                            rgb: [
                                0,
                                187,
                                187
                            ],
                            class_name: "ansi-cyan"
                        },
                        {
                            rgb: [
                                255,
                                255,
                                255
                            ],
                            class_name: "ansi-white"
                        }
                    ],
                    [
                        {
                            rgb: [
                                85,
                                85,
                                85
                            ],
                            class_name: "ansi-bright-black"
                        },
                        {
                            rgb: [
                                255,
                                85,
                                85
                            ],
                            class_name: "ansi-bright-red"
                        },
                        {
                            rgb: [
                                0,
                                255,
                                0
                            ],
                            class_name: "ansi-bright-green"
                        },
                        {
                            rgb: [
                                255,
                                255,
                                85
                            ],
                            class_name: "ansi-bright-yellow"
                        },
                        {
                            rgb: [
                                85,
                                85,
                                255
                            ],
                            class_name: "ansi-bright-blue"
                        },
                        {
                            rgb: [
                                255,
                                85,
                                255
                            ],
                            class_name: "ansi-bright-magenta"
                        },
                        {
                            rgb: [
                                85,
                                255,
                                255
                            ],
                            class_name: "ansi-bright-cyan"
                        },
                        {
                            rgb: [
                                255,
                                255,
                                255
                            ],
                            class_name: "ansi-bright-white"
                        }
                    ]
                ];
                this.palette_256 = [];
                this.ansi_colors.forEach(function(palette) {
                    palette.forEach(function(rec) {
                        _this.palette_256.push(rec);
                    });
                });
                var levels = [
                    0,
                    95,
                    135,
                    175,
                    215,
                    255
                ];
                for(var r = 0; r < 6; ++r){
                    for(var g = 0; g < 6; ++g){
                        for(var b = 0; b < 6; ++b){
                            var col = {
                                rgb: [
                                    levels[r],
                                    levels[g],
                                    levels[b]
                                ],
                                class_name: "truecolor"
                            };
                            this.palette_256.push(col);
                        }
                    }
                }
                var grey_level = 8;
                for(var i1 = 0; i1 < 24; ++i1, grey_level += 10){
                    var gry = {
                        rgb: [
                            grey_level,
                            grey_level,
                            grey_level
                        ],
                        class_name: "truecolor"
                    };
                    this.palette_256.push(gry);
                }
            };
            AnsiUp2.prototype.escape_txt_for_html = function(txt) {
                return txt.replace(/[&<>"']/gm, function(str) {
                    if (str === "&") return "&amp;";
                    if (str === "<") return "&lt;";
                    if (str === ">") return "&gt;";
                    if (str === '"') return "&quot;";
                    if (str === "'") return "&#x27;";
                });
            };
            AnsiUp2.prototype.append_buffer = function(txt) {
                var str = this._buffer + txt;
                this._buffer = str;
            };
            AnsiUp2.prototype.get_next_packet = function() {
                var pkt = {
                    kind: PacketKind.EOS,
                    text: "",
                    url: ""
                };
                var len = this._buffer.length;
                if (len == 0) return pkt;
                var pos = this._buffer.indexOf("");
                if (pos == -1) {
                    pkt.kind = PacketKind.Text;
                    pkt.text = this._buffer;
                    this._buffer = "";
                    return pkt;
                }
                if (pos > 0) {
                    pkt.kind = PacketKind.Text;
                    pkt.text = this._buffer.slice(0, pos);
                    this._buffer = this._buffer.slice(pos);
                    return pkt;
                }
                if (pos == 0) {
                    if (len == 1) {
                        pkt.kind = PacketKind.Incomplete;
                        return pkt;
                    }
                    var next_char = this._buffer.charAt(1);
                    if (next_char != "[" && next_char != "]") {
                        pkt.kind = PacketKind.ESC;
                        pkt.text = this._buffer.slice(0, 1);
                        this._buffer = this._buffer.slice(1);
                        return pkt;
                    }
                    if (next_char == "[") {
                        if (!this._csi_regex) {
                            this._csi_regex = rgx(__makeTemplateObject([
                                "\n                        ^                           # beginning of line\n                                                    #\n                                                    # First attempt\n                        (?:                         # legal sequence\n                          [                      # CSI\n                          ([<-?]?)              # private-mode char\n                          ([d;]*)                    # any digits or semicolons\n                          ([ -/]?               # an intermediate modifier\n                          [@-~])                # the command\n                        )\n                        |                           # alternate (second attempt)\n                        (?:                         # illegal sequence\n                          [                      # CSI\n                          [ -~]*                # anything legal\n                          ([\0-:])              # anything illegal\n                        )\n                    "
                            ], [
                                "\n                        ^                           # beginning of line\n                                                    #\n                                                    # First attempt\n                        (?:                         # legal sequence\n                          \\x1b\\[                      # CSI\n                          ([\\x3c-\\x3f]?)              # private-mode char\n                          ([\\d;]*)                    # any digits or semicolons\n                          ([\\x20-\\x2f]?               # an intermediate modifier\n                          [\\x40-\\x7e])                # the command\n                        )\n                        |                           # alternate (second attempt)\n                        (?:                         # illegal sequence\n                          \\x1b\\[                      # CSI\n                          [\\x20-\\x7e]*                # anything legal\n                          ([\\x00-\\x1f:])              # anything illegal\n                        )\n                    "
                            ]));
                        }
                        var match = this._buffer.match(this._csi_regex);
                        if (match === null) {
                            pkt.kind = PacketKind.Incomplete;
                            return pkt;
                        }
                        if (match[4]) {
                            pkt.kind = PacketKind.ESC;
                            pkt.text = this._buffer.slice(0, 1);
                            this._buffer = this._buffer.slice(1);
                            return pkt;
                        }
                        if (match[1] != "" || match[3] != "m") pkt.kind = PacketKind.Unknown;
                        else pkt.kind = PacketKind.SGR;
                        pkt.text = match[2];
                        var rpos = match[0].length;
                        this._buffer = this._buffer.slice(rpos);
                        return pkt;
                    }
                    if (next_char == "]") {
                        if (len < 4) {
                            pkt.kind = PacketKind.Incomplete;
                            return pkt;
                        }
                        if (this._buffer.charAt(2) != "8" || this._buffer.charAt(3) != ";") {
                            pkt.kind = PacketKind.ESC;
                            pkt.text = this._buffer.slice(0, 1);
                            this._buffer = this._buffer.slice(1);
                            return pkt;
                        }
                        if (!this._osc_st) {
                            this._osc_st = rgxG(__makeTemplateObject([
                                "\n                        (?:                         # legal sequence\n                          (\\)                    # ESC                           |                           # alternate\n                          (\x07)                      # BEL (what xterm did)\n                        )\n                        |                           # alternate (second attempt)\n                        (                           # illegal sequence\n                          [\0-]                 # anything illegal\n                          |                           # alternate\n                          [\b-]                 # anything illegal\n                          |                           # alternate\n                          [-]                 # anything illegal\n                        )\n                    "
                            ], [
                                "\n                        (?:                         # legal sequence\n                          (\\x1b\\\\)                    # ESC \\\n                          |                           # alternate\n                          (\\x07)                      # BEL (what xterm did)\n                        )\n                        |                           # alternate (second attempt)\n                        (                           # illegal sequence\n                          [\\x00-\\x06]                 # anything illegal\n                          |                           # alternate\n                          [\\x08-\\x1a]                 # anything illegal\n                          |                           # alternate\n                          [\\x1c-\\x1f]                 # anything illegal\n                        )\n                    "
                            ]));
                        }
                        this._osc_st.lastIndex = 0;
                        {
                            var match_1 = this._osc_st.exec(this._buffer);
                            if (match_1 === null) {
                                pkt.kind = PacketKind.Incomplete;
                                return pkt;
                            }
                            if (match_1[3]) {
                                pkt.kind = PacketKind.ESC;
                                pkt.text = this._buffer.slice(0, 1);
                                this._buffer = this._buffer.slice(1);
                                return pkt;
                            }
                        }
                        {
                            var match_2 = this._osc_st.exec(this._buffer);
                            if (match_2 === null) {
                                pkt.kind = PacketKind.Incomplete;
                                return pkt;
                            }
                            if (match_2[3]) {
                                pkt.kind = PacketKind.ESC;
                                pkt.text = this._buffer.slice(0, 1);
                                this._buffer = this._buffer.slice(1);
                                return pkt;
                            }
                        }
                        if (!this._osc_regex) {
                            this._osc_regex = rgx(__makeTemplateObject([
                                "\n                        ^                           # beginning of line\n                                                    #\n                        ]8;                    # OSC Hyperlink\n                        [ -:<-~]*       # params (excluding ;)\n                        ;                           # end of params\n                        ([!-~]{0,512})        # URL capture\n                        (?:                         # ST\n                          (?:\\)                  # ESC                           |                           # alternate\n                          (?:\x07)                    # BEL (what xterm did)\n                        )\n                        ([ -~]+)              # TEXT capture\n                        ]8;;                   # OSC Hyperlink End\n                        (?:                         # ST\n                          (?:\\)                  # ESC                           |                           # alternate\n                          (?:\x07)                    # BEL (what xterm did)\n                        )\n                    "
                            ], [
                                "\n                        ^                           # beginning of line\n                                                    #\n                        \\x1b\\]8;                    # OSC Hyperlink\n                        [\\x20-\\x3a\\x3c-\\x7e]*       # params (excluding ;)\n                        ;                           # end of params\n                        ([\\x21-\\x7e]{0,512})        # URL capture\n                        (?:                         # ST\n                          (?:\\x1b\\\\)                  # ESC \\\n                          |                           # alternate\n                          (?:\\x07)                    # BEL (what xterm did)\n                        )\n                        ([\\x20-\\x7e]+)              # TEXT capture\n                        \\x1b\\]8;;                   # OSC Hyperlink End\n                        (?:                         # ST\n                          (?:\\x1b\\\\)                  # ESC \\\n                          |                           # alternate\n                          (?:\\x07)                    # BEL (what xterm did)\n                        )\n                    "
                            ]));
                        }
                        var match = this._buffer.match(this._osc_regex);
                        if (match === null) {
                            pkt.kind = PacketKind.ESC;
                            pkt.text = this._buffer.slice(0, 1);
                            this._buffer = this._buffer.slice(1);
                            return pkt;
                        }
                        pkt.kind = PacketKind.OSCURL;
                        pkt.url = match[1];
                        pkt.text = match[2];
                        var rpos = match[0].length;
                        this._buffer = this._buffer.slice(rpos);
                        return pkt;
                    }
                }
            };
            AnsiUp2.prototype.ansi_to_html = function(txt) {
                this.append_buffer(txt);
                var blocks = [];
                while(true){
                    var packet = this.get_next_packet();
                    if (packet.kind == PacketKind.EOS || packet.kind == PacketKind.Incomplete) break;
                    if (packet.kind == PacketKind.ESC || packet.kind == PacketKind.Unknown) continue;
                    if (packet.kind == PacketKind.Text) blocks.push(this.transform_to_html(this.with_state(packet)));
                    else if (packet.kind == PacketKind.SGR) this.process_ansi(packet);
                    else if (packet.kind == PacketKind.OSCURL) blocks.push(this.process_hyperlink(packet));
                }
                return blocks.join("");
            };
            AnsiUp2.prototype.with_state = function(pkt) {
                return {
                    bold: this.bold,
                    italic: this.italic,
                    underline: this.underline,
                    fg: this.fg,
                    bg: this.bg,
                    text: pkt.text
                };
            };
            AnsiUp2.prototype.process_ansi = function(pkt) {
                var sgr_cmds = pkt.text.split(";");
                while(sgr_cmds.length > 0){
                    var sgr_cmd_str = sgr_cmds.shift();
                    var num = parseInt(sgr_cmd_str, 10);
                    if (isNaN(num) || num === 0) {
                        this.fg = this.bg = null;
                        this.bold = false;
                        this.italic = false;
                        this.underline = false;
                    } else if (num === 1) {
                        this.bold = true;
                    } else if (num === 3) {
                        this.italic = true;
                    } else if (num === 4) {
                        this.underline = true;
                    } else if (num === 22) {
                        this.bold = false;
                    } else if (num === 23) {
                        this.italic = false;
                    } else if (num === 24) {
                        this.underline = false;
                    } else if (num === 39) {
                        this.fg = null;
                    } else if (num === 49) {
                        this.bg = null;
                    } else if (num >= 30 && num < 38) {
                        this.fg = this.ansi_colors[0][num - 30];
                    } else if (num >= 40 && num < 48) {
                        this.bg = this.ansi_colors[0][num - 40];
                    } else if (num >= 90 && num < 98) {
                        this.fg = this.ansi_colors[1][num - 90];
                    } else if (num >= 100 && num < 108) {
                        this.bg = this.ansi_colors[1][num - 100];
                    } else if (num === 38 || num === 48) {
                        if (sgr_cmds.length > 0) {
                            var is_foreground = num === 38;
                            var mode_cmd = sgr_cmds.shift();
                            if (mode_cmd === "5" && sgr_cmds.length > 0) {
                                var palette_index = parseInt(sgr_cmds.shift(), 10);
                                if (palette_index >= 0 && palette_index <= 255) {
                                    if (is_foreground) this.fg = this.palette_256[palette_index];
                                    else this.bg = this.palette_256[palette_index];
                                }
                            }
                            if (mode_cmd === "2" && sgr_cmds.length > 2) {
                                var r = parseInt(sgr_cmds.shift(), 10);
                                var g = parseInt(sgr_cmds.shift(), 10);
                                var b = parseInt(sgr_cmds.shift(), 10);
                                if (r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255) {
                                    var c = {
                                        rgb: [
                                            r,
                                            g,
                                            b
                                        ],
                                        class_name: "truecolor"
                                    };
                                    if (is_foreground) this.fg = c;
                                    else this.bg = c;
                                }
                            }
                        }
                    }
                }
            };
            AnsiUp2.prototype.transform_to_html = function(fragment) {
                var txt = fragment.text;
                if (txt.length === 0) return txt;
                txt = this.escape_txt_for_html(txt);
                if (!fragment.bold && !fragment.italic && !fragment.underline && fragment.fg === null && fragment.bg === null) return txt;
                var styles = [];
                var classes = [];
                var fg = fragment.fg;
                var bg = fragment.bg;
                if (fragment.bold) styles.push("font-weight:bold");
                if (fragment.italic) styles.push("font-style:italic");
                if (fragment.underline) styles.push("text-decoration:underline");
                if (!this._use_classes) {
                    if (fg) styles.push("color:rgb(" + fg.rgb.join(",") + ")");
                    if (bg) styles.push("background-color:rgb(" + bg.rgb + ")");
                } else {
                    if (fg) {
                        if (fg.class_name !== "truecolor") {
                            classes.push(fg.class_name + "-fg");
                        } else {
                            styles.push("color:rgb(" + fg.rgb.join(",") + ")");
                        }
                    }
                    if (bg) {
                        if (bg.class_name !== "truecolor") {
                            classes.push(bg.class_name + "-bg");
                        } else {
                            styles.push("background-color:rgb(" + bg.rgb.join(",") + ")");
                        }
                    }
                }
                var class_string = "";
                var style_string = "";
                if (classes.length) class_string = ' class="' + classes.join(" ") + '"';
                if (styles.length) style_string = ' style="' + styles.join(";") + '"';
                return "<span" + style_string + class_string + ">" + txt + "</span>";
            };
            AnsiUp2.prototype.process_hyperlink = function(pkt) {
                var parts = pkt.url.split(":");
                if (parts.length < 1) return "";
                if (!this._url_whitelist[parts[0]]) return "";
                var result1 = '<a href="' + this.escape_txt_for_html(pkt.url) + '">' + this.escape_txt_for_html(pkt.text) + "</a>";
                return result1;
            };
            return AnsiUp2;
        }();
        function rgx(tmplObj) {
            var subst = [];
            for(var _i = 1; _i < arguments.length; _i++){
                subst[_i - 1] = arguments[_i];
            }
            var regexText = tmplObj.raw[0];
            var wsrgx = /^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;
            var txt2 = regexText.replace(wsrgx, "");
            return new RegExp(txt2);
        }
        function rgxG(tmplObj) {
            var subst = [];
            for(var _i = 1; _i < arguments.length; _i++){
                subst[_i - 1] = arguments[_i];
            }
            var regexText = tmplObj.raw[0];
            var wsrgx = /^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;
            var txt2 = regexText.replace(wsrgx, "");
            return new RegExp(txt2, "g");
        }
        Object.defineProperty(exports2, "__esModule", {
            value: true
        });
        exports2.default = AnsiUp;
    });
});
var ansi_up$1 = getDefaultExportFromCjs(ansi_up);
function hasAnsiEscapeCodes(str) {
    return !!str.match(/\x1b\[\d+(?:;\d+)*m/);
}
async function convertToHtmlSpans(str) {
    const a = new ansi_up$1();
    a.use_classes = true;
    const html = a.ansi_to_html(str);
    const doc = await parseHtml(`<pre>${html}</pre>`);
    for (const node of doc.querySelectorAll("span")){
        const el = node;
        if (el.getAttribute("style") === "font-weight:bold") {
            el.removeAttribute("style");
            el.classList.add("ansi-bold");
        }
    }
    return doc.querySelector("pre").innerHTML;
}
const kJupyterNotebookExtensions = [
    ".ipynb", 
];
function isJupyterNotebook(file) {
    return kJupyterNotebookExtensions.includes(extname2(file).toLowerCase());
}
const kJupyterCellInternalOptionKeys = [
    kEval,
    kEcho,
    kWarning,
    kError,
    kOutput,
    kInclude,
    kCellLabel,
    kCellClasses,
    kCellPanel,
    kCellColumn,
    kCellFigCap,
    kCellFigSubCap,
    kCellFigScap,
    kFigCapLoc,
    kTblCapLoc,
    kCapLoc,
    kCellFigColumn,
    kCellTblColumn,
    kCellFigLink,
    kCellFigAlign,
    kCellFigAlt,
    kCellFigEnv,
    kCellFigPos,
    kCellLstLabel,
    kCellLstCap,
    kCellOutWidth,
    kCellOutHeight,
    kCellMdIndent,
    kCodeFold,
    kCodeLineNumbers,
    kCodeSummary,
    kCodeOverflow, 
];
const kJupyterCellOptionKeys = kJupyterCellInternalOptionKeys.concat([
    kLayoutAlign,
    kLayoutVAlign,
    kLayoutNcol,
    kLayoutNrow,
    kLayout,
    kTblCap,
    kTblColwidths, 
]);
const kJupyterCellStandardMetadataKeys = [
    kCellCollapsed,
    kCellAutoscroll,
    kCellDeletable,
    kCellFormat,
    kCellName, 
];
const kJupyterCellThirdPartyMetadataKeys = [
    kCellId,
    kCellColab,
    kCellColabType,
    kCellColbOutputId,
    kCellLinesToNext,
    kCellLanguage, 
];
async function quartoMdToJupyter(markdown, includeIds, project) {
    const [kernelspec, metadata] = await jupyterKernelspecFromMarkdown(markdown, project);
    const nb = {
        cells: [],
        metadata: {
            kernelspec,
            ...metadata
        },
        nbformat: 4,
        nbformat_minor: includeIds ? 5 : 4
    };
    const yamlRegEx = /^---\s*$/;
    /^\s*```+\s*\{([a-zA-Z0-9_]+)( *[ ,].*)?\}\s*$/;
    const startCodeCellRegEx = new RegExp("^(\\s*)```+\\s*\\{" + kernelspec.language.toLowerCase() + "( *[ ,].*)?\\}\\s*$");
    const startCodeRegEx = /^(\s*)```/;
    const endCodeRegEx = (indent = "")=>{
        return new RegExp("^" + indent + "```\\s*$");
    };
    const inputContent = markdown;
    let codeIndent = "";
    const lineBuffer = [];
    const flushLineBuffer = (cell_type, frontMatter)=>{
        if (lineBuffer.length) {
            if (lineBuffer[0] === "") {
                lineBuffer.splice(0, 1);
            }
            if (lineBuffer[lineBuffer.length - 1] === "") {
                lineBuffer.splice(lineBuffer.length - 1, 1);
            }
            if (cell_type !== "code") {
                codeIndent = "";
            }
            const cell = {
                cell_type,
                metadata: codeIndent.length > 0 ? {
                    [kCellMdIndent]: codeIndent
                } : {},
                source: lineBuffer.map((line, index)=>{
                    if (codeIndent.length > 0) {
                        line = line.replace(codeIndent, "");
                    }
                    return line + (index < lineBuffer.length - 1 ? "\n" : "");
                })
            };
            if (includeIds) {
                cell.id = shortUuid();
            }
            if (cell_type === "raw" && frontMatter) {
                const yaml = readYamlFromMarkdown(cell.source.join(""));
                if (yaml.jupyter) {
                    delete yaml.jupyter;
                    if (Object.keys(yaml).length > 0) {
                        const yamlFrontMatter = mdTrimEmptyLines(lines(stringify(yaml, {
                            indent: 2,
                            lineWidth: -1,
                            sortKeys: false,
                            skipInvalid: true
                        })));
                        cell.source = [
                            "---\n",
                            ...yamlFrontMatter.map((line)=>line + "\n"),
                            "---", 
                        ];
                    } else {
                        cell.source = [];
                    }
                }
            } else if (cell_type === "code") {
                const { yaml: yaml1 , source  } = partitionCellOptions(kernelspec.language.toLowerCase(), cell.source);
                if (yaml1) {
                    if (includeIds && yaml1[kCellLabel] && !yaml1[kCellId]) {
                        yaml1[kCellId] = jupyterAutoIdentifier(String(yaml1[kCellLabel]));
                    }
                    const yamlKeys = Object.keys(yaml1);
                    yamlKeys.forEach((key)=>{
                        if (key === kCellId) {
                            if (includeIds) {
                                cell.id = String(yaml1[key]);
                            }
                            delete yaml1[key];
                        } else {
                            if (!kJupyterCellOptionKeys.includes(key)) {
                                cell.metadata[key] = yaml1[key];
                                delete yaml1[key];
                            }
                        }
                    });
                    if (Object.keys(yaml1).length < yamlKeys.length) {
                        const yamlOutput = jupyterCellOptionsAsComment(kernelspec.language.toLowerCase(), yaml1);
                        cell.source = yamlOutput.concat(source);
                    }
                }
                cell.execution_count = null;
                cell.outputs = [];
            }
            cell.source = mdTrimEmptyLines(cell.source);
            if (cell.source.length > 0) {
                nb.cells.push(cell);
            }
            lineBuffer.splice(0, lineBuffer.length);
        }
    };
    let parsedFrontMatter = false, inYaml = false, inCodeCell = false, inCode = false;
    for (const line of lines(inputContent)){
        if (yamlRegEx.test(line) && !inCodeCell && !inCode) {
            if (inYaml) {
                lineBuffer.push(line);
                flushLineBuffer("raw", !parsedFrontMatter);
                parsedFrontMatter = true;
                inYaml = false;
            } else {
                flushLineBuffer("markdown");
                lineBuffer.push(line);
                inYaml = true;
            }
        } else if (startCodeCellRegEx.test(line)) {
            flushLineBuffer("markdown");
            inCodeCell = true;
            codeIndent = line.match(startCodeCellRegEx)[1];
        } else if (endCodeRegEx(codeIndent).test(line)) {
            if (inCodeCell) {
                inCodeCell = false;
                flushLineBuffer("code");
                codeIndent = "";
            } else {
                inCode = !inCode;
                codeIndent = "";
                lineBuffer.push(line);
            }
        } else if (startCodeRegEx.test(line)) {
            codeIndent = line.match(startCodeRegEx)[1];
            inCode = true;
            lineBuffer.push(line);
        } else {
            lineBuffer.push(line);
        }
    }
    flushLineBuffer("markdown");
    return nb;
}
async function jupyterKernelspecFromMarkdown(markdown, project) {
    const config = project?.config;
    const yaml = config ? mergeConfigs(config, readYamlFromMarkdown(markdown)) : readYamlFromMarkdown(markdown);
    const yamlJupyter = yaml.jupyter;
    if (!yamlJupyter) {
        const languages = languagesInMarkdown(markdown);
        languages.add("python");
        const kernelspecs = await jupyterKernelspecs();
        for (const language of languages){
            for (const kernelspec of kernelspecs.values()){
                if (kernelspec.language.toLowerCase() === language) {
                    return [
                        kernelspec,
                        {}
                    ];
                }
            }
        }
    }
    if (typeof yamlJupyter === "string") {
        const kernel = yamlJupyter;
        const kernelspec1 = await jupyterKernelspec(kernel);
        if (kernelspec1) {
            return [
                kernelspec1,
                {}
            ];
        } else {
            return Promise.reject(new Error("Jupyter kernel '" + kernel + "' not found."));
        }
    } else if (typeof yamlJupyter === "object") {
        const jupyter = {
            ...yamlJupyter
        };
        if (isJupyterKernelspec(jupyter.kernelspec)) {
            const kernelspec2 = jupyter.kernelspec;
            delete jupyter.kernelspec;
            return [
                kernelspec2,
                jupyter
            ];
        } else if (typeof jupyter.kernel === "string") {
            const kernelspec3 = await jupyterKernelspec(jupyter.kernel);
            if (kernelspec3) {
                delete jupyter.kernel;
                return [
                    kernelspec3,
                    jupyter
                ];
            } else {
                return Promise.reject(new Error("Jupyter kernel '" + jupyter.kernel + "' not found."));
            }
        } else {
            return Promise.reject(new Error("Invalid Jupyter kernelspec (must include name, language, & display_name)"));
        }
    } else {
        return Promise.reject(new Error("Invalid jupyter YAML metadata found in file (must be string or object)"));
    }
}
function jupyterFromFile(input) {
    const nbContents = Deno.readTextFileSync(input);
    return jupyterFromJSON(nbContents);
}
function jupyterFromJSON(nbContents) {
    const nbJSON = JSON.parse(nbContents);
    const nb = nbJSON;
    if (!nb.metadata.kernelspec?.language) {
        if (nb.metadata.kernelspec) {
            nb.metadata.kernelspec.language = nbJSON.metadata.language_info?.name;
            if (!nb.metadata.kernelspec.language && nb.metadata.kernelspec.name?.includes("python")) {
                nb.metadata.kernelspec.language = "python";
            }
        } else {
            nb.metadata.kernelspec = jupyterDefaultPythonKernelspec();
        }
    }
    if (!nb.metadata.kernelspec.language) {
        throw new Error("No language set for Jupyter notebook");
    }
    if (!nb.cells) {
        throw new Error("No cells available in Jupyter notebook");
    }
    return nb;
}
function jupyterAutoIdentifier(label) {
    label = pandocAsciify(label);
    label = label.replace(/\s/g, "-").replace(/[^a-zA-Z0-9-_]/g, "").replace(/^[^A-Za-z]+/, "");
    if (label.length > 0) {
        return label.slice(0, 64);
    } else {
        return shortUuid();
    }
}
function jupyterAssets(input, to) {
    input = Deno.realPathSync(input);
    const files_dir = join3(dirname2(input), inputFilesDir(input));
    const figures_dir = join3(files_dir, figuresDir(to));
    ensureDirSync(figures_dir);
    let supporting_dir = files_dir;
    for (const walk of walkSync(join3(files_dir), {
        maxDepth: 1
    })){
        if (walk.path !== files_dir && walk.path !== figures_dir) {
            supporting_dir = figures_dir;
            break;
        }
    }
    const base_dir = dirname2(input);
    return {
        base_dir,
        files_dir: pathWithForwardSlashes(relative2(base_dir, files_dir)),
        figures_dir: pathWithForwardSlashes(relative2(base_dir, figures_dir)),
        supporting_dir: pathWithForwardSlashes(relative2(base_dir, supporting_dir))
    };
}
async function jupyterToMarkdown(nb, options) {
    const isHtml = options.toHtml && !options.toIpynb;
    const dependencies = isHtml ? extractJupyterWidgetDependencies(nb) : undefined;
    const htmlPreserve = isHtml ? removeAndPreserveHtml(nb) : undefined;
    const md = [];
    const validateCellLabel = cellLabelValidator();
    let codeCellIndex = 0;
    for(let i1 = 0; i1 < nb.cells.length; i1++){
        const cell = jupyterCellWithOptions(nb.metadata.kernelspec.language.toLowerCase(), nb.cells[i1]);
        validateCellLabel(cell);
        const slideType = options.toPresentation ? cell.metadata[kCellSlideshow]?.[kCellSlideshowSlideType] : undefined;
        if (slideType) {
            if (slideType === "skip") {
                continue;
            } else if (slideType == "slide" || slideType === "subslide") {
                md.push("\n---\n\n");
            } else if (slideType == "fragment") {
                md.push("\n. . .\n\n");
            } else if (slideType == "notes") {
                md.push("\n:::::::::: notes\n\n");
            }
        }
        switch(cell.cell_type){
            case "markdown":
                md.push(...mdFromContentCell(cell, options));
                break;
            case "raw":
                md.push(...mdFromRawCell(cell));
                break;
            case "code":
                md.push(...await mdFromCodeCell(cell, ++codeCellIndex, options));
                break;
            default:
                throw new Error("Unexpected cell type " + cell.cell_type);
        }
        if (slideType === "notes") {
            md.push("\n::::::::::\n");
        }
        md.push("\n");
    }
    if (options.toIpynb) {
        md.push("---\n");
        const jupyterMetadata = {
            jupyter: {
                ...nb.metadata
            }
        };
        const yamlText = stringify(jupyterMetadata, {
            indent: 2,
            lineWidth: -1,
            sortKeys: false,
            skipInvalid: true
        });
        md.push(yamlText);
        md.push("---\n");
    }
    return {
        markdown: md.join(""),
        dependencies,
        htmlPreserve
    };
}
function jupyterCellWithOptions(language, cell) {
    const { yaml , optionsSource , source  } = partitionCellOptions(language, cell.source);
    const metadataOptions = kJupyterCellOptionKeys.reduce((options, key)=>{
        if (cell.metadata[key] !== undefined) {
            options[key] = cell.metadata[key];
        }
        return options;
    }, {});
    const options = {
        ...metadataOptions,
        ...yaml
    };
    [
        kLayout,
        kTblColwidths
    ].forEach((option)=>{
        if (options[option] && typeof options[option] !== "string") {
            options[option] = JSON.stringify(options[option]);
        }
    });
    return {
        ...cell,
        source,
        optionsSource,
        options
    };
}
function jupyterCellOptionsAsComment(language, options, stringifyOptions) {
    if (Object.keys(options).length > 0) {
        const cellYaml = stringify(options, {
            indent: 2,
            lineWidth: -1,
            sortKeys: false,
            skipInvalid: true,
            ...stringifyOptions
        });
        const commentChars = langCommentChars1(language);
        const yamlOutput = mdTrimEmptyLines(lines(cellYaml)).map((line)=>{
            line = optionCommentPrefix(commentChars[0]) + line + optionCommentSuffix(commentChars[1]);
            return line + "\n";
        });
        return yamlOutput;
    } else {
        return [];
    }
}
function mdFromContentCell(cell, options) {
    if (options && cell.attachments && cell.source) {
        const source = __VIRTUAL_FILE107(cell.source);
        const cellId = cell.id || shortUuid();
        Object.keys(cell.attachments).forEach((file, index)=>{
            const attachment = cell.attachments[file];
            for (const mimeType of Object.keys(attachment)){
                if (extensionForMimeImageType(mimeType, undefined)) {
                    const imageFile = options.assets.figures_dir + `/${cellId}-${index + 1}-${file}`;
                    const outputFile = join3(options.assets.base_dir, imageFile);
                    ensureDirSync(dirname2(outputFile));
                    const data = attachment[mimeType];
                    const imageText = Array.isArray(data) ? data.join("") : data;
                    if (!imageText.trimStart().startsWith("<svg")) {
                        const imageData = decode(imageText);
                        Deno.writeFileSync(outputFile, imageData);
                    } else {
                        Deno.writeTextFileSync(outputFile, imageText);
                    }
                    for(let i1 = 0; i1 < source.length; i1++){
                        source[i1] = source[i1].replaceAll(`attachment:${file}`, imageFile);
                    }
                    break;
                }
            }
        });
        return mdEnsureTrailingNewline(source);
    } else {
        return mdEnsureTrailingNewline(cell.source);
    }
}
function mdFromRawCell(cell) {
    const mimeType = cell.metadata?.[kCellRawMimeType];
    if (mimeType) {
        switch(mimeType){
            case kTextHtml:
                return mdHtmlOutput(cell.source);
            case kTextLatex:
                return mdLatexOutput(cell.source);
            case kRestructuredText:
                return mdFormatOutput("rst", cell.source);
            case kApplicationRtf:
                return mdFormatOutput("rtf", cell.source);
            case kApplicationJavascript:
                return mdScriptOutput(mimeType, cell.source);
        }
    }
    return mdFromContentCell(cell);
}
function mdEnsureTrailingNewline(source) {
    if (source.length > 0 && !source[source.length - 1].endsWith("\n")) {
        return source.slice(0, source.length - 1).concat([
            source[source.length - 1] + "\n"
        ]);
    } else {
        return source;
    }
}
function optionCommentPrefix(comment) {
    return comment + "| ";
}
function optionCommentSuffix(comment) {
    if (comment) {
        return " " + comment;
    } else {
        return "";
    }
}
function langCommentChars1(lang) {
    const chars = kLangCommentChars1[lang] || "#";
    if (!Array.isArray(chars)) {
        return [
            chars
        ];
    } else {
        return chars;
    }
}
const kLangCommentChars1 = {
    r: "#",
    python: "#",
    julia: "#",
    scala: "//",
    matlab: "%",
    csharp: "//",
    fsharp: "//",
    c: [
        "/*",
        "*/"
    ],
    css: [
        "/*",
        "*/"
    ],
    sas: [
        "*",
        ";"
    ],
    powershell: "#",
    bash: "#",
    sql: "--",
    mysql: "--",
    psql: "--",
    lua: "--",
    cpp: "//",
    cc: "//",
    stan: "#",
    octave: "#",
    fortran: "!",
    fortran95: "!",
    awk: "#",
    gawk: "#",
    stata: "*",
    java: "//",
    groovy: "//",
    sed: "#",
    perl: "#",
    ruby: "#",
    tikz: "%",
    js: "//",
    d3: "//",
    node: "//",
    sass: "//",
    coffee: "#",
    go: "//",
    asy: "//",
    haskell: "--",
    dot: "//",
    mermaid: "%%",
    apl: "⍝"
};
function cleanJupyterOutputDisplayData(output) {
    const rawOutput = output;
    const outputData = {};
    for (const [key, value] of Object.entries(rawOutput.data)){
        const strValue = typeof value === "string" ? [
            value
        ] : Array.isArray(value) && value.every((x)=>typeof x === "string") ? value : undefined;
        if (strValue === undefined) {
            outputData[key] = value;
        } else {
            outputData[key] = strValue;
        }
    }
    return {
        ...output,
        data: outputData,
        metadata: rawOutput.metadata,
        noCaption: rawOutput.noCaption
    };
}
async function mdFromCodeCell(cell, cellIndex, options) {
    if (!includeCell(cell, options)) {
        return [];
    }
    const outputs = (cell.outputs || []).filter((output)=>{
        if (output.output_type === "stream" && output.name === "stderr" && !includeWarnings(cell, options)) {
            return false;
        }
        if (output.output_type === "execute_result") {
            const textPlain = output.data?.[kTextPlain];
            if (textPlain && textPlain[0].startsWith("[<matplotlib")) {
                return false;
            }
        }
        return true;
    }).map((output)=>{
        if (!options.toLatex && isDisplayData(output) && output.data[kTextLatex]) {
            return displayDataWithMarkdownMath(output);
        } else {
            return output;
        }
    });
    if (!cell.source.length && !outputs.length) {
        return [];
    }
    const asis = cell.options[kOutput] === "asis" || options.execute[kOutput] === "asis" && cell.options[kOutput] === undefined;
    const md = [];
    const divMd = [
        `::: {`
    ];
    const kCellOptionsFilter = kJupyterCellInternalOptionKeys.concat(kJupyterCellStandardMetadataKeys, kJupyterCellThirdPartyMetadataKeys);
    const label = cellLabel(cell);
    const labelCellContainer = shouldLabelCellContainer(cell, outputs, options);
    if (label && labelCellContainer) {
        divMd.push(`${label} `);
    }
    const { cellCaption , outputCaptions  } = resolveCaptions(cell);
    divMd.push(`.cell `);
    if (hideCell(cell, options)) {
        divMd.push(`.hidden `);
    }
    const cellClasses = cell.options[kCellClasses] || new Array();
    const classes = Array.isArray(cellClasses) ? cellClasses : [
        cellClasses
    ];
    if (typeof cell.options[kCellPanel] === "string") {
        classes.push(`panel-${cell.options[kCellPanel]}`);
    }
    if (typeof cell.options[kCellColumn] === "string") {
        classes.push(`column-${cell.options[kCellColumn]}`);
    }
    if (typeof cell.options[kCellFigColumn] === "string") {
        classes.push(`fig-column-${cell.options[kCellFigColumn]}`);
    }
    if (typeof cell.options[kCellTblColumn] === "string") {
        classes.push(`tbl-column-${cell.options[kCellTblColumn]}`);
    }
    if (typeof cell.options[kCapLoc] === "string") {
        classes.push(`caption-${cell.options[kFigCapLoc]}`);
    }
    if (typeof cell.options[kFigCapLoc] === "string") {
        classes.push(`fig-cap-location-${cell.options[kFigCapLoc]}`);
    }
    if (typeof cell.options[kTblCapLoc] === "string") {
        classes.push(`tbl-cap-location-${cell.options[kTblCapLoc]}`);
    }
    if (classes.length > 0) {
        const classText = classes.map((clz)=>{
            clz = toString1(clz);
            return clz.startsWith(".") ? clz : "." + clz;
        }).join(" ");
        divMd.push(classText + " ");
    }
    const cellOptions = {
        ...cell.metadata,
        ...cell.options
    };
    for (const key of Object.keys(cellOptions)){
        if (!kCellOptionsFilter.includes(key.toLowerCase())) {
            let value = cellOptions[key];
            if (value) {
                if (typeof value !== "string") {
                    value = JSON.stringify(value);
                }
                value = value.replaceAll("'", `\\'`);
                divMd.push(`${key}='${value}' `);
            }
        }
    }
    if (typeof cell.execution_count === "number") {
        divMd.push(`execution_count=${cell.execution_count} `);
    }
    const divBeginMd = divMd.join("").replace(/ $/, "").concat("}\n");
    if (includeCode(cell, options)) {
        const fenced = echoFenced(cell, options);
        const ticks = fenced ? "````" : "```";
        md.push(ticks + " {");
        if (typeof cell.options[kCellLstLabel] === "string") {
            let label1 = cell.options[kCellLstLabel];
            if (!label1.startsWith("#")) {
                label1 = "#" + label1;
            }
            md.push(label1 + " ");
        }
        if (!fenced) {
            md.push("." + (cellOptions.language || options.language));
        }
        md.push(" .cell-code");
        if (hideCode(cell, options)) {
            md.push(" .hidden");
        }
        if (cell.options[kCodeOverflow] === "wrap") {
            md.push(" .code-overflow-wrap");
        } else if (cell.options[kCodeOverflow] === "scroll") {
            md.push(" .code-overflow-scroll");
        }
        if (typeof cell.options[kCellLstCap] === "string") {
            md.push(` caption=\"${cell.options[kCellLstCap]}\"`);
        }
        if (typeof cell.options[kCodeFold] !== "undefined") {
            md.push(` code-fold=\"${cell.options[kCodeFold]}\"`);
        }
        if (typeof cell.options[kCodeSummary] !== "undefined") {
            md.push(` code-summary=\"${cell.options[kCodeSummary]}\"`);
        }
        if (typeof cell.options[kCodeLineNumbers] !== "undefined") {
            md.push(` code-line-numbers=\"${cell.options[kCodeLineNumbers]}\"`);
        }
        md.push("}\n");
        let source = __VIRTUAL_FILE107(cell.source);
        if (fenced) {
            const optionsSource = cell.optionsSource.filter((line)=>line.search(/echo:\s+fenced/) === -1);
            if (optionsSource.length > 0) {
                source = mdTrimEmptyLines(source, "trailing");
            } else {
                source = mdTrimEmptyLines(source, "all");
            }
            source.unshift(...optionsSource);
            source.unshift("```{{" + options.language + "}}\n");
            source.push("\n```\n");
        } else if (cell.optionsSource.length > 0) {
            source = mdTrimEmptyLines(source, "leading");
        }
        md.push(...source, "\n");
        md.push(ticks + "\n");
    }
    if (includeOutput(cell, options)) {
        const labelName = label ? label.replace(/^#/, "").replaceAll(":", "-") : "cell-" + (cellIndex + 1);
        const outputName = pandocAutoIdentifier(labelName, true) + "-output";
        let nextOutputSuffix = 1;
        for (const { index , output  } of outputs.map((value, index)=>({
                index,
                output: value
            }))){
            const outputLabel = label && labelCellContainer && isDisplayData(output) ? label + "-" + nextOutputSuffix++ : label;
            if (!asis) {
                md.push("\n::: {");
                if (outputLabel && shouldLabelOutputContainer(output, cell.options, options)) {
                    md.push(outputLabel + " ");
                }
                md.push(".cell-output ");
                if (output.output_type === "stream") {
                    const stream = output;
                    md.push(`.cell-output-${stream.name}`);
                } else {
                    md.push(`.${outputTypeCssClass(output.output_type)}`);
                }
                if (hideOutput(cell, options) || isWarningOutput(output) && hideWarnings(cell, options)) {
                    md.push(` .hidden`);
                }
                if (typeof output.execution_count === "number") {
                    md.push(` execution_count=${output.execution_count}`);
                }
                md.push("}\n");
            }
            if (options.toLatex && !options.figPos && !cell.options[kCellFigPos] && !hasLayoutOptions(cell) && includeCode(cell, options)) {
                cell.options[kCellFigPos] = "H";
            }
            const figureOptions = {};
            const broadcastFigureOption = (name)=>{
                const value = cell.options[name];
                if (value) {
                    if (Array.isArray(value)) {
                        return value[index];
                    } else {
                        return value;
                    }
                } else {
                    return null;
                }
            };
            figureOptions[kCellFigAlign] = broadcastFigureOption(kCellFigAlign);
            figureOptions[kCellFigScap] = broadcastFigureOption(kCellFigScap);
            figureOptions[kCellFigLink] = broadcastFigureOption(kCellFigLink);
            figureOptions[kCellFigEnv] = broadcastFigureOption(kCellFigEnv);
            figureOptions[kCellFigPos] = broadcastFigureOption(kCellFigPos);
            figureOptions[kCellFigAlt] = broadcastFigureOption(kCellFigAlt);
            if (output.output_type === "stream") {
                const stream1 = output;
                if (asis && stream1.name === "stdout") {
                    md.push(stream1.text.join(""));
                } else {
                    md.push(mdOutputStream(stream1));
                }
            } else if (output.output_type === "error") {
                md.push(mdOutputError(output));
            } else if (isDisplayData(output)) {
                const fixedOutput = cleanJupyterOutputDisplayData(output);
                if (Object.keys(fixedOutput.data).length > 0) {
                    const caption = isCaptionableData(output) ? outputCaptions.shift() || null : null;
                    md.push(await mdOutputDisplayData(outputLabel, caption, outputName + "-" + (index + 1), fixedOutput, options, figureOptions));
                    if (caption && !isImage(output, options)) {
                        md.push(`\n${caption}\n`);
                    }
                }
            } else {
                throw new Error("Unexpected output type " + output.output_type);
            }
            if (!asis) {
                md.push(`:::\n`);
            }
        }
    } else if (cell.outputs) {
        cell.outputs.filter(isDisplayData).filter((output)=>output.metadata.ojs_define).forEach((ojs_define)=>{
            const ojs_html = ojs_define.data[kTextHtml];
            md.push("\n" + mdHtmlOutput(ojs_html));
        });
    }
    if (md.length > 0 && !asis) {
        md.unshift(divBeginMd);
        if (cellCaption) {
            md.push("\n" + cellCaption + "\n");
        }
        md.push(":::\n");
    }
    md.push("\n".repeat(cell.metadata.lines_to_next_cell || 1));
    if (cell.options[kCellMdIndent]) {
        const indent = String(cell.options[kCellMdIndent]);
        const mdWithIndent = md.join("").split("\n").map((line)=>indent + line).join("\n");
        md.splice(0, md.length - 1);
        md.push(...mdWithIndent);
    }
    return md;
}
function hasLayoutOptions(cell) {
    return Object.keys(cell.options).some((key)=>key.startsWith("layout"));
}
function isDisplayDataType(output, options, checkFn) {
    if (isDisplayData(output)) {
        const mimeType = displayDataMimeType(output, options);
        if (mimeType) {
            if (checkFn(mimeType)) {
                return true;
            }
        }
    }
    return false;
}
function isImage(output, options) {
    return isDisplayDataType(output, options, displayDataIsImage);
}
function mdOutputStream(output) {
    if (output.name === "stderr") {
        if (output.text[0]) {
            const firstLine = output.text[0].replace(/<ipython-input.*?>:\d+:\s+/, "");
            return mdCodeOutput([
                firstLine,
                ...output.text.slice(1)
            ].map(stripColor1));
        }
    }
    return mdCodeOutput(output.text.map(stripColor1));
}
function mdOutputError(output) {
    return mdCodeOutput([
        output.ename + ": " + output.evalue
    ]);
}
async function mdOutputDisplayData(label, caption, filename, output, options, figureOptions) {
    const mimeType = displayDataMimeType(output, options);
    if (mimeType) {
        if (displayDataIsImage(mimeType)) {
            return mdImageOutput(label, caption, filename, mimeType, output, options, figureOptions);
        } else if (displayDataIsMarkdown(mimeType)) {
            return mdMarkdownOutput(output.data[mimeType]);
        } else if (displayDataIsLatex(mimeType)) {
            return mdLatexOutput(output.data[mimeType]);
        } else if (displayDataIsHtml(mimeType)) {
            return mdHtmlOutput(output.data[mimeType]);
        } else if (displayDataIsJson(mimeType)) {
            return mdJsonOutput(mimeType, output.data[mimeType], options);
        } else if (displayDataIsJavascript(mimeType)) {
            return mdScriptOutput(mimeType, output.data[mimeType]);
        } else if (displayDataIsTextPlain(mimeType)) {
            const data = output.data[mimeType];
            if (!Array.isArray(data) || data.some((s)=>typeof s !== "string")) {
                return mdWarningOutput(`Unable to process text plain output data 
which does not appear to be plain text: ${JSON.stringify(data)}`);
            }
            const lines = data;
            if (lines.length === 1 && lines[0].startsWith("'<table") && lines[0].endsWith("</table>'")) {
                lines[0] = lines[0].slice(1, -1);
                return mdMarkdownOutput(lines);
            } else {
                if (options.toHtml) {
                    if (lines.some(hasAnsiEscapeCodes)) {
                        const html = await Promise.all(lines.map(convertToHtmlSpans));
                        return mdMarkdownOutput([
                            "\n::: {.ansi-escaped-output}\n```{=html}\n<pre>",
                            ...html,
                            "</pre>\n```\n:::\n", 
                        ]);
                    } else {
                        return mdCodeOutput(lines);
                    }
                } else {
                    return mdCodeOutput(lines.map(stripColor1));
                }
            }
        }
    }
    return mdWarningOutput("Unable to display output for mime type(s): " + Object.keys(output.data).join(", "));
}
function mdImageOutput(label, caption, filename, mimeType, output, options, figureOptions) {
    const data = output.data[mimeType];
    const metadata = output.metadata[mimeType];
    function metadataValue(key, defaultValue) {
        return metadata && metadata[key] ? metadata["key"] : defaultValue;
    }
    let width = metadataValue(kCellOutWidth, 0);
    let height = metadataValue(kCellOutHeight, 0);
    const alt = caption || "";
    const ext = extensionForMimeImageType(mimeType);
    const imageFile = options.assets.figures_dir + "/" + filename + "." + ext;
    const imageText = Array.isArray(data) ? data.join("") : data;
    const outputFile = join3(options.assets.base_dir, imageFile);
    if (mimeType !== kImageSvg) {
        const imageData = decode(imageText);
        if (mimeType === kImagePng && options.figFormat === "retina" && options.figDpi) {
            const png = new PngImage(imageData);
            if (png.dpiX === options.figDpi * 2 && png.dpiY === options.figDpi * 2) {
                width = Math.round(png.width / 2);
                height = Math.round(png.height / 2);
            }
        }
        Deno.writeFileSync(outputFile, imageData);
    } else {
        Deno.writeTextFileSync(outputFile, imageText);
    }
    const kFigOptions = [
        kCellFigAlign,
        kCellFigEnv,
        kCellFigAlt,
        kCellFigPos,
        kCellFigScap, 
    ];
    let image = `![${alt}](${imageFile})`;
    if (label || width || height || Object.keys(figureOptions).some((option)=>kFigOptions.includes(option))) {
        image += "{";
        if (label) {
            image += `${label} `;
        }
        if (width) {
            image += `width=${width} `;
        }
        if (height) {
            image += `height=${height} `;
        }
        kFigOptions.forEach((attrib)=>{
            const value = figureOptions[attrib];
            if (value) {
                image += `${attrib}='${value.replaceAll("'", "\\'")}' `;
            }
        });
        image = image.trimRight() + "}";
    }
    if (figureOptions[kCellFigLink]) {
        image = `[${image}](${figureOptions[kCellFigLink]})`;
    }
    return mdMarkdownOutput([
        image
    ]);
}
function mdMarkdownOutput(md) {
    return md.join("") + "\n";
}
function mdFormatOutput(format, source) {
    return mdEnclosedOutput("```{=" + format + "}", source, "```");
}
function mdLatexOutput(latex) {
    return mdFormatOutput("tex", latex);
}
function mdHtmlOutput(html) {
    return mdFormatOutput("html", html);
}
function mdJsonOutput(mimeType, json, options) {
    if (options.toIpynb) {
        return mdCodeOutput([
            JSON.stringify(json)
        ], "json");
    } else {
        return mdScriptOutput(mimeType, [
            JSON.stringify(json)
        ]);
    }
}
function mdScriptOutput(mimeType, script) {
    const scriptTag = [
        `<script type="${mimeType}">\n`,
        ...script,
        "\n</script>", 
    ];
    return mdHtmlOutput(scriptTag);
}
function mdTrimEmptyLines(lines, trim = "all") {
    if (trim === "all" || trim === "leading") {
        const firstNonEmpty = lines.findIndex((line)=>line.trim().length > 0);
        if (firstNonEmpty === -1) {
            return [];
        }
        lines = lines.slice(firstNonEmpty);
    }
    if (trim === "all" || trim === "trailing") {
        let lastNonEmpty = -1;
        for(let i1 = lines.length - 1; i1 >= 0; i1--){
            if (lines[i1].trim().length > 0) {
                lastNonEmpty = i1;
                break;
            }
        }
        if (lastNonEmpty > -1) {
            lines = lines.slice(0, lastNonEmpty + 1);
        }
    }
    return lines;
}
function mdCodeOutput(code, clz) {
    const open = "```" + (clz ? `{.${clz}}` : "");
    return mdEnclosedOutput(open, code, "```");
}
function mdEnclosedOutput(begin, text, end) {
    const output = text.join("");
    const md = [
        begin + "\n",
        output + (output.endsWith("\n") ? "" : "\n"),
        end + "\n", 
    ];
    return md.join("");
}
function mdWarningOutput(msg) {
    return mdOutputStream({
        output_type: "stream",
        name: "stderr",
        text: [
            msg
        ]
    });
}
function isWarningOutput(output) {
    if (output.output_type === "stream") {
        const stream = output;
        return stream.name === "stderr";
    } else {
        return false;
    }
}
function outputTypeCssClass(output_type) {
    if ([
        "display_data",
        "execute_result"
    ].includes(output_type)) {
        output_type = "display";
    }
    return `cell-output-${output_type}`;
}
function isPdfOutput(format) {
    if (typeof format !== "string") {
        format = format?.to || "html";
    }
    return format === "pdf" || format === "beamer";
}
function isLatexOutput(format) {
    return [
        "pdf",
        "latex",
        "beamer"
    ].includes(format.to || "");
}
function isBeamerOutput(format) {
    return [
        "beamer"
    ].includes(format.to || "");
}
function isEpubOutput(format) {
    if (typeof format !== "string") {
        format = format?.to || "html";
    }
    return [
        "epub",
        "epub2",
        "epub3"
    ].includes(format || "");
}
function isHtmlFileOutput(format) {
    if (typeof format !== "string") {
        format = format?.to || "html";
    }
    return isHtmlDocOutput(format) || isHtmlSlideOutput(format);
}
function isHtmlOutput(format, strict) {
    if (typeof format !== "string") {
        format = format?.to;
    }
    format = format || "html";
    if (isHtmlDocOutput(format)) {
        return true;
    } else if (!strict) {
        return isHtmlSlideOutput(format) || isEpubOutput(format);
    } else {
        return false;
    }
}
function isHtmlDocOutput(format) {
    if (typeof format !== "string") {
        format = format?.to || "html";
    }
    return [
        "html",
        "html4",
        "html5", 
    ].includes(format);
}
function isHtmlSlideOutput(format) {
    if (typeof format !== "string") {
        format = format?.to || "html";
    }
    return [
        "s5",
        "dzslides",
        "slidy",
        "slideous",
        "revealjs", 
    ].includes(format);
}
function isPresentationOutput(format) {
    if (format.to) {
        return [
            "s5",
            "dzslides",
            "slidy",
            "slideous",
            "revealjs",
            "beamer",
            "pptx"
        ].some((to)=>format.to?.startsWith(to));
    } else {
        return false;
    }
}
function isRevealjsOutput(format) {
    if (typeof format !== "string") {
        format = format?.to;
    }
    format = format || "html";
    return format.startsWith("revealjs");
}
function isNativeOutput(format) {
    return isFormatTo(format, "native");
}
function isJsonOutput(format) {
    return isFormatTo(format, "json");
}
function isAstOutput(format) {
    return isNativeOutput(format) || isJsonOutput(format);
}
function isIpynbOutput(format) {
    return isFormatTo(format, "ipynb");
}
function isFormatTo(format, to) {
    return !!format.to && format.to.startsWith(to);
}
function isMarkdownOutput(format, flavors = [
    "markdown",
    "markdown_github",
    "markdown_mmd",
    "markdown_phpextra",
    "markdown_strict",
    "gfm",
    "commonmark",
    "commonmark_x",
    "markua", 
]) {
    const to = (format.to || "").replace(/[\+\-_].*$/, "");
    return flavors.includes(to) || isIpynbOutput(format);
}
function isHtmlCompatible(format) {
    return isHtmlOutput(format.pandoc) || isMarkdownOutput(format.pandoc) && format.render[kPreferHtml] || isIpynbOutput(format.pandoc);
}
function isJavascriptCompatible(format) {
    return isHtmlCompatible(format) && !isEpubOutput(format.pandoc);
}
const sleep = (delay)=>{
    return new Promise((resolve)=>{
        setTimeout(resolve, delay);
    });
};
function quartoDataDir(subdir, roaming = false) {
    return quartoDir(userDataDir, subdir, roaming);
}
function quartoCacheDir(subdir) {
    return quartoDir(userCacheDir, subdir);
}
function quartoRuntimeDir(subdir) {
    return quartoDir(userRuntimeDir, subdir);
}
function quartoDir(sourceFn, subdir, roaming) {
    const dir = sourceFn("quarto", roaming);
    const fullDir = subdir ? join3(dir, subdir) : dir;
    ensureDirSync(fullDir);
    return fullDir;
}
function userDataDir(appName, roaming = false) {
    switch(Deno.build.os){
        case "darwin":
            return darwinUserDataDir(appName);
        case "linux":
            return xdgUserDataDir(appName);
        case "windows":
            return windowsUserDataDir(appName, roaming);
    }
}
function userCacheDir(appName) {
    switch(Deno.build.os){
        case "darwin":
            return darwinUserCacheDir(appName);
        case "linux":
            return xdgUserCacheDir(appName);
        case "windows":
            return windowsUserDataDir(appName);
    }
}
function userRuntimeDir(appName) {
    switch(Deno.build.os){
        case "darwin":
            return darwinUserCacheDir(appName);
        case "linux":
            return xdgUserRuntimeDir(appName);
        case "windows":
            return windowsUserDataDir(appName);
    }
}
function darwinUserDataDir(appName) {
    return join3(Deno.env.get("HOME") || "", "Library", "Application Support", appName);
}
function darwinUserCacheDir(appName) {
    return join3(Deno.env.get("HOME") || "", "Library", "Caches", appName);
}
function xdgUserDataDir(appName) {
    const dataHome = Deno.env.get("XDG_DATA_HOME") || join3(Deno.env.get("HOME") || "", ".local", "share");
    return join3(dataHome, appName);
}
function xdgUserCacheDir(appName) {
    const cacheHome = Deno.env.get("XDG_CACHE_HOME") || join3(Deno.env.get("HOME") || "", ".cache");
    return join3(cacheHome, appName);
}
function xdgUserRuntimeDir(appName) {
    const runtimeDir = Deno.env.get("XDG_RUNTIME_DIR");
    if (runtimeDir) {
        return runtimeDir;
    } else {
        return xdgUserDataDir(appName);
    }
}
function windowsUserDataDir(appName, roaming = false) {
    const dir = (roaming ? Deno.env.get("APPDATA") : Deno.env.get("LOCALAPPDATA")) || "";
    return join3(dir, appName);
}
var commonjsGlobal2 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function createCommonjsModule4(fn, basedir, module) {
    return module = {
        path: basedir,
        exports: {},
        require: function(path, base) {
            return commonjsRequire1(path, base === void 0 || base === null ? module.path : base);
        }
    }, fn(module, module.exports), module.exports;
}
function commonjsRequire1() {
    throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
}
var md5 = createCommonjsModule4(function(module) {
    (function($) {
        function safeAdd(x, y) {
            var lsw = (x & 65535) + (y & 65535);
            var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
            return msw << 16 | lsw & 65535;
        }
        function bitRotateLeft(num, cnt) {
            return num << cnt | num >>> 32 - cnt;
        }
        function md5cmn(q, a, b, x, s, t) {
            return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
        }
        function md5ff(a, b, c, d, x, s, t) {
            return md5cmn(b & c | ~b & d, a, b, x, s, t);
        }
        function md5gg(a, b, c, d, x, s, t) {
            return md5cmn(b & d | c & ~d, a, b, x, s, t);
        }
        function md5hh(a, b, c, d, x, s, t) {
            return md5cmn(b ^ c ^ d, a, b, x, s, t);
        }
        function md5ii(a, b, c, d, x, s, t) {
            return md5cmn(c ^ (b | ~d), a, b, x, s, t);
        }
        function binlMD5(x, len) {
            x[len >> 5] |= 128 << len % 32;
            x[(len + 64 >>> 9 << 4) + 14] = len;
            var i1;
            var olda;
            var oldb;
            var oldc;
            var oldd;
            var a = 1732584193;
            var b = -271733879;
            var c = -1732584194;
            var d = 271733878;
            for(i1 = 0; i1 < x.length; i1 += 16){
                olda = a;
                oldb = b;
                oldc = c;
                oldd = d;
                a = md5ff(a, b, c, d, x[i1], 7, -680876936);
                d = md5ff(d, a, b, c, x[i1 + 1], 12, -389564586);
                c = md5ff(c, d, a, b, x[i1 + 2], 17, 606105819);
                b = md5ff(b, c, d, a, x[i1 + 3], 22, -1044525330);
                a = md5ff(a, b, c, d, x[i1 + 4], 7, -176418897);
                d = md5ff(d, a, b, c, x[i1 + 5], 12, 1200080426);
                c = md5ff(c, d, a, b, x[i1 + 6], 17, -1473231341);
                b = md5ff(b, c, d, a, x[i1 + 7], 22, -45705983);
                a = md5ff(a, b, c, d, x[i1 + 8], 7, 1770035416);
                d = md5ff(d, a, b, c, x[i1 + 9], 12, -1958414417);
                c = md5ff(c, d, a, b, x[i1 + 10], 17, -42063);
                b = md5ff(b, c, d, a, x[i1 + 11], 22, -1990404162);
                a = md5ff(a, b, c, d, x[i1 + 12], 7, 1804603682);
                d = md5ff(d, a, b, c, x[i1 + 13], 12, -40341101);
                c = md5ff(c, d, a, b, x[i1 + 14], 17, -1502002290);
                b = md5ff(b, c, d, a, x[i1 + 15], 22, 1236535329);
                a = md5gg(a, b, c, d, x[i1 + 1], 5, -165796510);
                d = md5gg(d, a, b, c, x[i1 + 6], 9, -1069501632);
                c = md5gg(c, d, a, b, x[i1 + 11], 14, 643717713);
                b = md5gg(b, c, d, a, x[i1], 20, -373897302);
                a = md5gg(a, b, c, d, x[i1 + 5], 5, -701558691);
                d = md5gg(d, a, b, c, x[i1 + 10], 9, 38016083);
                c = md5gg(c, d, a, b, x[i1 + 15], 14, -660478335);
                b = md5gg(b, c, d, a, x[i1 + 4], 20, -405537848);
                a = md5gg(a, b, c, d, x[i1 + 9], 5, 568446438);
                d = md5gg(d, a, b, c, x[i1 + 14], 9, -1019803690);
                c = md5gg(c, d, a, b, x[i1 + 3], 14, -187363961);
                b = md5gg(b, c, d, a, x[i1 + 8], 20, 1163531501);
                a = md5gg(a, b, c, d, x[i1 + 13], 5, -1444681467);
                d = md5gg(d, a, b, c, x[i1 + 2], 9, -51403784);
                c = md5gg(c, d, a, b, x[i1 + 7], 14, 1735328473);
                b = md5gg(b, c, d, a, x[i1 + 12], 20, -1926607734);
                a = md5hh(a, b, c, d, x[i1 + 5], 4, -378558);
                d = md5hh(d, a, b, c, x[i1 + 8], 11, -2022574463);
                c = md5hh(c, d, a, b, x[i1 + 11], 16, 1839030562);
                b = md5hh(b, c, d, a, x[i1 + 14], 23, -35309556);
                a = md5hh(a, b, c, d, x[i1 + 1], 4, -1530992060);
                d = md5hh(d, a, b, c, x[i1 + 4], 11, 1272893353);
                c = md5hh(c, d, a, b, x[i1 + 7], 16, -155497632);
                b = md5hh(b, c, d, a, x[i1 + 10], 23, -1094730640);
                a = md5hh(a, b, c, d, x[i1 + 13], 4, 681279174);
                d = md5hh(d, a, b, c, x[i1], 11, -358537222);
                c = md5hh(c, d, a, b, x[i1 + 3], 16, -722521979);
                b = md5hh(b, c, d, a, x[i1 + 6], 23, 76029189);
                a = md5hh(a, b, c, d, x[i1 + 9], 4, -640364487);
                d = md5hh(d, a, b, c, x[i1 + 12], 11, -421815835);
                c = md5hh(c, d, a, b, x[i1 + 15], 16, 530742520);
                b = md5hh(b, c, d, a, x[i1 + 2], 23, -995338651);
                a = md5ii(a, b, c, d, x[i1], 6, -198630844);
                d = md5ii(d, a, b, c, x[i1 + 7], 10, 1126891415);
                c = md5ii(c, d, a, b, x[i1 + 14], 15, -1416354905);
                b = md5ii(b, c, d, a, x[i1 + 5], 21, -57434055);
                a = md5ii(a, b, c, d, x[i1 + 12], 6, 1700485571);
                d = md5ii(d, a, b, c, x[i1 + 3], 10, -1894986606);
                c = md5ii(c, d, a, b, x[i1 + 10], 15, -1051523);
                b = md5ii(b, c, d, a, x[i1 + 1], 21, -2054922799);
                a = md5ii(a, b, c, d, x[i1 + 8], 6, 1873313359);
                d = md5ii(d, a, b, c, x[i1 + 15], 10, -30611744);
                c = md5ii(c, d, a, b, x[i1 + 6], 15, -1560198380);
                b = md5ii(b, c, d, a, x[i1 + 13], 21, 1309151649);
                a = md5ii(a, b, c, d, x[i1 + 4], 6, -145523070);
                d = md5ii(d, a, b, c, x[i1 + 11], 10, -1120210379);
                c = md5ii(c, d, a, b, x[i1 + 2], 15, 718787259);
                b = md5ii(b, c, d, a, x[i1 + 9], 21, -343485551);
                a = safeAdd(a, olda);
                b = safeAdd(b, oldb);
                c = safeAdd(c, oldc);
                d = safeAdd(d, oldd);
            }
            return [
                a,
                b,
                c,
                d
            ];
        }
        function binl2rstr(input) {
            var i1;
            var output = "";
            var length32 = input.length * 32;
            for(i1 = 0; i1 < length32; i1 += 8){
                output += String.fromCharCode(input[i1 >> 5] >>> i1 % 32 & 255);
            }
            return output;
        }
        function rstr2binl(input) {
            var i1;
            var output = [];
            output[(input.length >> 2) - 1] = void 0;
            for(i1 = 0; i1 < output.length; i1 += 1){
                output[i1] = 0;
            }
            var length8 = input.length * 8;
            for(i1 = 0; i1 < length8; i1 += 8){
                output[i1 >> 5] |= (input.charCodeAt(i1 / 8) & 255) << i1 % 32;
            }
            return output;
        }
        function rstrMD5(s) {
            return binl2rstr(binlMD5(rstr2binl(s), s.length * 8));
        }
        function rstrHMACMD5(key, data) {
            var i1;
            var bkey = rstr2binl(key);
            var ipad = [];
            var opad = [];
            var hash;
            ipad[15] = opad[15] = void 0;
            if (bkey.length > 16) {
                bkey = binlMD5(bkey, key.length * 8);
            }
            for(i1 = 0; i1 < 16; i1 += 1){
                ipad[i1] = bkey[i1] ^ 909522486;
                opad[i1] = bkey[i1] ^ 1549556828;
            }
            hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
            return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
        }
        function rstr2hex(input) {
            var hexTab = "0123456789abcdef";
            var output = "";
            var x;
            var i1;
            for(i1 = 0; i1 < input.length; i1 += 1){
                x = input.charCodeAt(i1);
                output += hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15);
            }
            return output;
        }
        function str2rstrUTF8(input) {
            return unescape(encodeURIComponent(input));
        }
        function rawMD5(s) {
            return rstrMD5(str2rstrUTF8(s));
        }
        function hexMD5(s) {
            return rstr2hex(rawMD5(s));
        }
        function rawHMACMD5(k, d) {
            return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d));
        }
        function hexHMACMD5(k, d) {
            return rstr2hex(rawHMACMD5(k, d));
        }
        function md52(string, key, raw) {
            if (!key) {
                if (!raw) {
                    return hexMD5(string);
                }
                return rawMD5(string);
            }
            if (!raw) {
                return hexHMACMD5(key, string);
            }
            return rawHMACMD5(key, string);
        }
        if (module.exports) {
            module.exports = md52;
        } else {
            $.md5 = md52;
        }
    })(commonjsGlobal2);
});
function md5Hash(content) {
    return md5(content);
}
function insecureHash(content) {
    let hash = 0;
    for(let i1 = 0; i1 < content.length; i1++){
        const __char = content.charCodeAt(i1);
        hash = (hash << 5) - hash + __char;
        hash &= hash;
    }
    return new Uint32Array([
        hash
    ])[0].toString(36);
}
async function jupyterCapabilitiesMessage(caps, indent = "") {
    const lines = [
        `Version: ${caps.versionMajor}.${caps.versionMinor}.${caps.versionPatch}${caps.conda ? " (Conda)" : ""}`,
        `Path: ${caps.executable}`,
        `Jupyter: ${caps.jupyter_core || "(None)"}`, 
    ];
    if (caps.jupyter_core) {
        const kernels = Array.from((await jupyterKernelspecs()).values()).map((kernel)=>kernel.name).join(", ");
        lines.push(`Kernels: ${kernels}`);
    }
    return lines.map((line)=>`${indent}${line}`).join("\n");
}
function jupyterInstallationMessage(caps, indent = "") {
    const lines = [
        "Jupyter is not available in this Python installation.",
        "Install with " + bold1(`${caps.conda ? "conda" : pythonExecForCaps(caps, true).join(" ") + " -m pip"} install jupyter`), 
    ];
    return lines.map((line)=>`${indent}${line}`).join("\n");
}
function jupyterUnactivatedEnvMessage(caps, indent = "") {
    for (const path of Deno.readDirSync(Deno.cwd())){
        if (path.isDirectory) {
            const targetPath = join3(Deno.cwd(), path.name);
            if (isEnvDir(targetPath)) {
                try {
                    if (!pathWithForwardSlashes(caps.executable).startsWith(pathWithForwardSlashes(targetPath))) {
                        return indent + "There is an unactivated Python environment in " + bold1(path.name) + ". Did you forget to activate it?";
                    }
                } catch  {
                    return undefined;
                }
            }
        }
    }
    const kRequirementsTxt = "requirements.txt";
    const kEnvironmentYaml = "environment.yml";
    for (const envFile of [
        kRequirementsTxt,
        kEnvironmentYaml
    ]){
        if (existsSync(join3(Deno.cwd(), envFile))) {
            return indent + "There is a " + bold1(envFile) + " file in this directory. " + "Is this for a " + (envFile === kRequirementsTxt ? "venv" : "conda env") + " that you need to restore?";
        }
    }
    return undefined;
}
function pythonInstallationMessage(indent = "") {
    const lines = [
        "Unable to locate an installed version of Python 3.",
        "Install Python 3 from " + bold1("https://www.python.org/downloads/"), 
    ];
    return lines.map((line)=>`${indent}${line}`).join("\n");
}
async function executeKernelOneshot(options) {
    await abortKernel(options);
    if (!options.quiet) {
        messageStartingKernel(options.kernelspec);
    }
    trace(options, "Executing notebook with oneshot kernel");
    const debug = !!options.format.execute[kExecuteDebug];
    const result1 = await execJupyter("execute", {
        ...options,
        debug
    }, options.kernelspec);
    if (!result1.success) {
        return Promise.reject();
    }
}
async function executeKernelKeepalive(options) {
    let serverLogProcess;
    if (options.format.execute[kExecuteDebug]) {
        if (Deno.build.os !== "windows") {
            serverLogProcess = Deno.run({
                cmd: [
                    "tail",
                    "-F",
                    "-n",
                    "0",
                    kernelLogFile()
                ]
            });
        }
    }
    if (options.format.execute[kExecuteDaemonRestart]) {
        await abortKernel(options);
    }
    trace(options, "Connecting to kernel");
    const [conn, transport] = await connectToKernel(options);
    trace(options, "Kernel connection successful");
    try {
        trace(options, "Sending execute command to kernel");
        await writeKernelCommand(conn, "execute", transport.secret, {
            ...options
        });
        trace(options, "Execute command sent, reading response");
        let leftover = "";
        while(true){
            const buffer = new Uint8Array(512);
            const bytesRead = await conn.read(buffer);
            if (bytesRead === null) {
                break;
            }
            if (bytesRead > 0) {
                const payload = new TextDecoder().decode(buffer.slice(0, bytesRead));
                const jsonMessages = payload.split("\n");
                for (let jsonMessage of jsonMessages){
                    if (!jsonMessage) {
                        continue;
                    }
                    if (leftover) {
                        jsonMessage = leftover + jsonMessage;
                        leftover = "";
                    }
                    try {
                        const msg = JSON.parse(jsonMessage);
                        if (msg.type === "error") {
                            trace(options, "Error response received");
                            error(msg.data, {
                                colorize: false
                            });
                            printExecDiagnostics(options.kernelspec, msg.data);
                            return Promise.reject();
                        } else if (msg.type == "restart") {
                            trace(options, "Restart request received");
                            return executeKernelKeepalive(options);
                        } else {
                            info(msg.data, {
                                newline: false
                            });
                        }
                    } catch  {
                        leftover = jsonMessage;
                    }
                }
            }
        }
        trace(options, "Server request complete\n\n");
    } catch (e) {
        trace(options, "Error occurred receiving response from server");
        const transportFile = kernelTransportFile(options.target.input);
        if (existsSync(transportFile)) {
            Deno.removeSync(transportFile);
        }
        throw e;
    } finally{
        conn.close();
        if (serverLogProcess) {
            serverLogProcess.kill("SIGKILL");
        }
    }
}
async function abortKernel(options) {
    try {
        trace(options, "Checking for existing kernel");
        const [conn, transport] = await connectToKernel(options, false);
        trace(options, "Existing kernel found");
        try {
            trace(options, "Sending kernel abort request");
            await writeKernelCommand(conn, "abort", transport.secret, {});
            trace(options, "Abort request successful");
        } finally{
            const transportFile = kernelTransportFile(options.target.input);
            if (existsSync(transportFile)) {
                Deno.removeSync(transportFile);
            }
            conn.close();
        }
    } catch  {
        trace(options, "No existing kernel found");
    }
}
async function execJupyter(command, options, kernelspec) {
    try {
        const result1 = await execProcess({
            cmd: [
                ...await pythonExec(kernelspec),
                resourcePath("jupyter/jupyter.py"), 
            ],
            env: {
                "MPLBACKEND": "module://matplotlib_inline.backend_inline"
            },
            stdout: "piped"
        }, kernelCommand(command, "", options));
        if (!result1.success) {
            await printExecDiagnostics(kernelspec, result1.stderr);
        }
        return result1;
    } catch (e) {
        if (e?.message) {
            info("");
            error(e.message);
        }
        await printExecDiagnostics(kernelspec);
        return Promise.reject();
    }
}
async function printExecDiagnostics(kernelspec, stderr) {
    const caps = await jupyterCapabilities(kernelspec);
    if (caps && !caps.jupyter_core) {
        info("Python 3 installation:");
        info(await jupyterCapabilitiesMessage(caps, "  "));
        info("");
        info(jupyterInstallationMessage(caps));
        info("");
        maybePrintUnactivatedEnvMessage(caps);
    } else if (caps && !haveRequiredPython(caps)) {
        info(pythonVersionMessage());
        info(await jupyterCapabilitiesMessage(caps, "  "));
    } else if (!caps) {
        info(pythonInstallationMessage());
        info("");
    } else if (stderr && stderr.indexOf("ModuleNotFoundError") !== -1) {
        maybePrintUnactivatedEnvMessage(caps);
    }
}
function haveRequiredPython(caps) {
    return caps.versionMajor >= 3 && caps.versionMinor >= 6;
}
function pythonVersionMessage() {
    return `Quarto requires Python version 3.6 (or greater). Detected version is:`;
}
function maybePrintUnactivatedEnvMessage(caps) {
    const envMessage = jupyterUnactivatedEnvMessage(caps);
    if (envMessage) {
        info(envMessage);
        info("");
    }
}
async function writeKernelCommand(conn, command, secret, options) {
    await conn.write(new TextEncoder().encode(kernelCommand(command, secret, options) + "\n"));
}
function kernelCommand(command, secret, options) {
    return JSON.stringify({
        command,
        secret,
        options: {
            ...options,
            log: kernelLogFile()
        }
    });
}
function kernelTransportFile(target) {
    const transportsDir = quartoRuntimeDir("jt");
    const targetFile = Deno.realPathSync(target);
    const hash = md5Hash(targetFile).slice(0, 20);
    return join3(transportsDir, hash);
}
function kernelLogFile() {
    const logsDir = quartoDataDir("logs");
    const kernelLog = join3(logsDir, "jupyter-kernel.log");
    if (!existsSync(kernelLog)) {
        Deno.writeTextFileSync(kernelLog, "");
    }
    return kernelLog;
}
function readKernelTransportFile(transportFile, type) {
    if (existsSync(transportFile)) {
        if (type === "tcp") {
            try {
                const transport = JSON.parse(Deno.readTextFileSync(transportFile));
                if (transport.port && transport.secret) {
                    return {
                        ...transport,
                        type
                    };
                } else {
                    throw new Error("Invalid file format");
                }
            } catch (e) {
                error("Error reading kernel transport file: " + e.toString() + "(removing file)");
                Deno.removeSync(transportFile);
                return null;
            }
        } else {
            return {
                port: transportFile,
                secret: "",
                type
            };
        }
    } else {
        return null;
    }
}
async function connectToKernel(options, startIfRequired = true) {
    const debug = !!options.format.execute[kExecuteDebug];
    const transportFile = kernelTransportFile(options.target.input);
    const type = "tcp";
    const transport = readKernelTransportFile(transportFile, type);
    if (transport) {
        try {
            return await denoConnectToKernel(transport);
        } catch  {
            Deno.removeSync(transportFile);
        }
    }
    if (!startIfRequired) {
        return Promise.reject();
    }
    if (!options.quiet) {
        messageStartingKernel(options.kernelspec);
    }
    const keepAlive = options.format.execute[kExecuteDaemon];
    const timeout = keepAlive === true || keepAlive === null || keepAlive === undefined ? 300 : keepAlive === false ? 0 : keepAlive;
    const result1 = await execJupyter("start", {
        transport: transportFile,
        timeout,
        type,
        debug
    }, options.kernelspec);
    if (!result1.success) {
        return Promise.reject();
    }
    for(let i1 = 1; i1 < 20; i1++){
        await sleep(i1 * 100);
        const kernelTransport = readKernelTransportFile(transportFile, type);
        if (kernelTransport) {
            try {
                return await denoConnectToKernel(kernelTransport);
            } catch (e) {
                Deno.removeSync(transportFile);
                error("Error connecting to Jupyter kernel: " + e.toString());
                return Promise.reject();
            }
        }
    }
    warning("Unable to start Jupyter kernel for " + options.target.input);
    return Promise.reject();
}
async function denoConnectToKernel(transport) {
    if (transport.type === "tcp") {
        const tcpConnectOptions = {
            transport: transport.type,
            hostname: "127.0.0.1",
            port: transport.port
        };
        return [
            await Deno.connect(tcpConnectOptions),
            transport, 
        ];
    } else {
        const unixConnectOptions = {
            transport: transport.type,
            path: transport.port
        };
        return [
            await Deno.connect(unixConnectOptions),
            transport, 
        ];
    }
}
function messageStartingKernel(kernelspec) {
    info(`\nStarting ${kernelspec.name} kernel...`, {
        newline: false
    });
}
function trace(options, msg) {
    if (options.format.execute[kExecuteDebug]) {
        info("- " + msg, {
            bold: true
        });
    }
}
const kRunHandlers = [];
function installRunHandler(handler) {
    kRunHandlers.push(handler);
}
function handlerForScript(script) {
    return kRunHandlers.find((handler)=>handler.canHandle(script));
}
function parseShellRunCommand(cmdLine) {
    let space = "{{space}}";
    while(cmdLine.indexOf(space) > -1){
        space += "&";
    }
    const noSpaces = cmdLine.replace(/"([^"]*)"?/g, (_, capture)=>{
        return capture.replace(/ /g, space);
    });
    const paramArray = noSpaces.split(/ +/);
    return paramArray.map((mangled)=>{
        return mangled.replace(RegExp(space, "g"), " ");
    });
}
async function filteredNotebookFromCache(file, filters) {
    file = normalizeNotebookPath(file);
    const invalidation = await notebookInvalidation(file, filters);
    const notebook = getCachedNotebook(file);
    if (notebook?.invalidation === invalidation) {
        return Deno.readTextFileSync(notebook.fullPath);
    } else {
        return undefined;
    }
}
async function cacheFilteredNotebook(file, filters, json) {
    file = normalizeNotebookPath(file);
    const invalidation = await notebookInvalidation(file, filters);
    cacheNotebook(file, {
        invalidation,
        json
    });
}
function normalizeNotebookPath(file) {
    return isAbsolute2(file) ? file : join3(Deno.cwd(), file);
}
async function notebookInvalidation(file, filters) {
    return [
        file,
        ...await filterScriptPaths(file, filters || [])
    ].reduce((hash, file)=>{
        try {
            return hash + Deno.statSync(file).mtime?.toUTCString();
        } catch  {
            return hash;
        }
    }, "");
}
async function filterScriptPaths(file, filters) {
    const filterPaths = [];
    for (const filter of filters){
        const args = parseShellRunCommand(filter);
        const script = args[0];
        const scriptPath = join3(dirname2(file), script);
        if (existsSync(scriptPath)) {
            filterPaths.push(scriptPath);
        } else if (isAbsolute2(script) && existsSync(script)) {
            filterPaths.push(script);
        } else {
            const scriptPath1 = await which(script);
            if (scriptPath1 && existsSync(scriptPath1)) {
                filterPaths.push(scriptPath1);
            }
        }
    }
    return filterPaths;
}
function getCachedNotebook(file) {
    const contents = readNotebookIndex()[file];
    if (contents) {
        return {
            invalidation: contents.invalidation,
            fullPath: notebookCachePath(contents.path)
        };
    }
}
function cacheNotebook(file, contents) {
    const index = readNotebookIndex();
    const path = index[file]?.path || generate();
    Deno.writeTextFileSync(notebookCachePath(path), contents.json);
    index[file] = {
        invalidation: contents.invalidation,
        path
    };
    writeNotebookIndex(index);
}
function readNotebookIndex() {
    const index = notebookIndexFile();
    if (existsSync(index)) {
        return JSON.parse(Deno.readTextFileSync(index));
    }
    return {};
}
function writeNotebookIndex(index) {
    Deno.writeTextFileSync(notebookIndexFile(), JSON.stringify(index, undefined, 2));
}
const notebookIndexFile = ()=>notebookCachePath("INDEX");
function notebookCachePath(file) {
    const cacheDir = join3(quartoCacheDir(), "filtered-notebooks");
    ensureDirSync(cacheDir);
    return file ? join3(cacheDir, file) : cacheDir;
}
async function markdownFromNotebookFile(file, format) {
    const nbContents = await jupyterNotebookFiltered(file, format?.execute[kIpynbFilters]);
    const nb = JSON.parse(nbContents);
    return markdownFromNotebookJSON(nb);
}
function markdownFromNotebookJSON(nb) {
    const markdown = nb.cells.reduce((md, cell)=>{
        if ([
            "markdown",
            "raw"
        ].includes(cell.cell_type)) {
            return md + "\n" + cell.source.join("") + "\n";
        } else {
            return md;
        }
    }, "");
    return markdown;
}
async function jupyterNotebookFiltered(file, filters) {
    let json = Deno.readTextFileSync(file);
    if (filters && filters.length > 0) {
        const cached = await filteredNotebookFromCache(file, filters);
        if (cached) {
            return cached;
        }
        for (const filter of filters){
            const args = parseShellRunCommand(filter);
            const script = args[0];
            const scriptPath = join3(dirname2(file), script);
            const handler = handlerForScript(scriptPath);
            const result1 = handler && existsSync(scriptPath) ? await handler.run(script, args.splice(1), json, {
                cwd: dirname2(file),
                env: {
                    PYTHONUNBUFFERED: "1"
                },
                stdout: "piped"
            }) : await execProcess({
                cmd: [
                    isAbsolute2(script) ? script : basename2(script),
                    ...args.slice(1), 
                ],
                cwd: dirname2(file),
                env: {
                    PYTHONUNBUFFERED: "1"
                },
                stdout: "piped"
            }, json);
            if (!result1.success) {
                throw new Error();
            }
            json = result1.stdout || json;
        }
        await cacheFilteredNotebook(file, filters, json);
        return json;
    } else {
        return json;
    }
}
function isBlockShortcode(content) {
    const m = content.match(/^\s*{{< (?!\/\*)(.+?)(?<!\*\/) >}}\s*$/);
    if (m) {
        return parseShortcode(m[1]);
    }
}
function parseShortcode(shortCodeCapture) {
    const [name, ...args] = shortCodeCapture.trim().split(" ");
    const namedParams = {};
    const params = [];
    const rawParams = args.map((v)=>{
        const p = v.indexOf("=");
        let name = undefined;
        let value;
        if (p === -1) {
            value = v;
            params.push(value);
        } else {
            name = v.slice(0, p);
            value = v.slice(p + 1);
            namedParams[name] = value;
        }
        return {
            name,
            value
        };
    });
    return {
        name,
        rawParams,
        namedParams,
        params
    };
}
async function breakQuartoMd(src, validate = false, lenient = false) {
    if (typeof src === "string") {
        src = asMappedString(src);
    }
    const nb = {
        cells: []
    };
    const yamlRegEx = /^---\s*$/;
    const startCodeCellRegEx = new RegExp("^\\s*```+\\s*\\{([=A-Za-z]+)( *[ ,].*)?\\}\\s*$");
    const startCodeRegEx = /^```/;
    const endCodeRegEx = /^\s*```+\s*$/;
    let language = "";
    let directiveParams = undefined;
    let cellStartLine = 0;
    let codeStartRange;
    let codeEndRange;
    const lineBuffer = [];
    const flushLineBuffer = async (cell_type, index)=>{
        if (lineBuffer.length || cell_type === "code") {
            const mappedChunks = [];
            for (const line of lineBuffer){
                mappedChunks.push(line.range);
            }
            const source = mappedString(src, mappedChunks);
            const makeCellType = ()=>{
                if (cell_type === "code") {
                    return {
                        language
                    };
                } else if (cell_type === "directive") {
                    return {
                        language: "_directive",
                        name: directiveParams.name,
                        shortcode: directiveParams
                    };
                } else {
                    return cell_type;
                }
            };
            const cell = {
                cell_type: makeCellType(),
                source,
                sourceOffset: 0,
                sourceStartLine: 0,
                sourceVerbatim: source,
                cellStartLine
            };
            cellStartLine = index + 1;
            if (cell_type === "code") {
                const { yaml , sourceStartLine  } = await partitionCellOptionsMapped(language, cell.source, validate, "", lenient);
                const breaks = Array.from(lineOffsets(cell.source.value));
                let strUpToLastBreak = "";
                if (sourceStartLine > 0) {
                    cell.sourceWithYaml = cell.source;
                    cell.source = mappedSubstring(cell.source, breaks[sourceStartLine]);
                    if (breaks.length > 1) {
                        const lastBreak = breaks[Math.min(sourceStartLine - 1, breaks.length - 1)];
                        strUpToLastBreak = cell.source.value.substring(0, lastBreak);
                    } else {
                        strUpToLastBreak = cell.source.value;
                    }
                } else {
                    cell.sourceWithYaml = cell.source;
                }
                const prefix = "```{" + language + "}\n";
                cell.sourceOffset = strUpToLastBreak.length + prefix.length;
                cell.sourceVerbatim = mappedString(src, [
                    codeStartRange.range,
                    ...mappedChunks,
                    codeEndRange.range, 
                ]);
                cell.options = yaml;
                cell.sourceStartLine = sourceStartLine;
            } else if (cell_type === "directive") {
                cell.source = mappedString(src, mappedChunks.slice(1, -1));
            }
            if (mdTrimEmptyLines1(lines(cell.sourceVerbatim.value)).length > 0 || cell.options !== undefined) {
                nb.cells.push(cell);
            }
            lineBuffer.splice(0, lineBuffer.length);
        }
    };
    const tickCount = (s)=>Array.from(s.split(" ")[0] || "").filter((c)=>c === "`").length;
    let inYaml = false, inCodeCell = false, inCode = 0;
    const inPlainText = ()=>!inCodeCell && !inCode && !inYaml;
    const isYamlDelimiter = (line, index, skipHRs)=>{
        if (!yamlRegEx.test(line)) {
            return false;
        }
        if (skipHRs && index > 0 && srcLines[index - 1].substring.trim() === "" && index < srcLines.length - 1 && srcLines[index + 1].substring.trim() === "") {
            return false;
        }
        return true;
    };
    const srcLines = rangedLines(src.value, true);
    for(let i1 = 0; i1 < srcLines.length; ++i1){
        const line = srcLines[i1];
        const directiveMatch = isBlockShortcode(line.substring);
        if (isYamlDelimiter(line.substring, i1, !inYaml) && !inCodeCell && !inCode) {
            if (inYaml) {
                lineBuffer.push(line);
                await flushLineBuffer("raw", i1);
                inYaml = false;
            } else {
                await flushLineBuffer("markdown", i1);
                lineBuffer.push(line);
                inYaml = true;
            }
        } else if (inPlainText() && directiveMatch) {
            await flushLineBuffer("markdown", i1);
            directiveParams = directiveMatch;
            lineBuffer.push(line);
            await flushLineBuffer("directive", i1);
        } else if (startCodeCellRegEx.test(line.substring) && inPlainText()) {
            const m = line.substring.match(startCodeCellRegEx);
            language = m[1];
            await flushLineBuffer("markdown", i1);
            inCodeCell = true;
            codeStartRange = line;
        } else if (endCodeRegEx.test(line.substring) && (inCodeCell || inCode && tickCount(line.substring) === inCode)) {
            if (inCodeCell) {
                codeEndRange = line;
                inCodeCell = false;
                inCode = 0;
                await flushLineBuffer("code", i1);
            } else {
                inCode = 0;
                lineBuffer.push(line);
            }
        } else if (startCodeRegEx.test(line.substring) && inCode === 0) {
            inCode = tickCount(line.substring);
            lineBuffer.push(line);
        } else {
            lineBuffer.push(line);
        }
    }
    await flushLineBuffer("markdown", srcLines.length);
    return nb;
}
function mdTrimEmptyLines1(lines) {
    const firstNonEmpty = lines.findIndex((line)=>line.trim().length > 0);
    if (firstNonEmpty === -1) {
        return [];
    }
    lines = lines.slice(firstNonEmpty);
    let lastNonEmpty = -1;
    for(let i1 = lines.length - 1; i1 >= 0; i1--){
        if (lines[i1].trim().length > 0) {
            lastNonEmpty = i1;
            break;
        }
    }
    if (lastNonEmpty > -1) {
        lines = lines.slice(0, lastNonEmpty + 1);
    }
    return lines;
}
const jupyterEngine = {
    name: kJupyterEngine,
    defaultExt: ".qmd",
    defaultYaml: (kernel)=>[
            `jupyter: ${kernel || "python3"}`, 
        ],
    defaultContent: (kernel)=>{
        kernel = kernel || "python3";
        const lang = kernel.startsWith("python") ? "python" : kernel.startsWith("julia") ? "julia" : undefined;
        if (lang) {
            return [
                "```{" + lang + "}",
                "1 + 1",
                "```", 
            ];
        } else {
            return [];
        }
    },
    validExtensions: ()=>kJupyterNotebookExtensions.concat(kQmdExtensions),
    claimsExtension: (ext)=>{
        return kJupyterNotebookExtensions.includes(ext.toLowerCase());
    },
    claimsLanguage: (_language)=>{
        return false;
    },
    target: async (file, _quiet, markdown, project)=>{
        let nb;
        if (markdown === undefined) {
            if (isJupyterNotebook(file)) {
                const nbJSON = Deno.readTextFileSync(file);
                nb = JSON.parse(nbJSON);
                markdown = asMappedString(markdownFromNotebookJSON(nb));
            } else {
                markdown = asMappedString(mappedStringFromFile(file));
            }
        }
        const metadata = readYamlFromMarkdown(markdown.value);
        if (isQmdFile(file)) {
            const [fileDir, fileStem] = dirAndStem(file);
            const notebook = join3(fileDir, fileStem + ".ipynb");
            const target = {
                source: file,
                input: notebook,
                markdown,
                metadata,
                data: {
                    transient: true,
                    kernelspec: {}
                }
            };
            nb = await createNotebookforTarget(target, project);
            target.data.kernelspec = nb.metadata.kernelspec;
            return target;
        } else if (isJupyterNotebook(file)) {
            return {
                source: file,
                input: file,
                markdown,
                metadata,
                data: {
                    transient: false,
                    kernelspec: nb?.metadata.kernelspec
                }
            };
        } else {
            return undefined;
        }
    },
    partitionedMarkdown: async (file, format)=>{
        if (isJupyterNotebook(file)) {
            return partitionMarkdown(await markdownFromNotebookFile(file, format));
        } else {
            return partitionMarkdown(Deno.readTextFileSync(file));
        }
    },
    filterFormat: (source, options, format)=>{
        if (isJupyterNotebook(source)) {
            let executeEnabled;
            if (options.devServerReload) {
                executeEnabled = false;
            } else if (typeof format.execute[kExecuteIpynb] === "boolean") {
                executeEnabled = format.execute[kExecuteIpynb];
            } else if (typeof format.execute[kExecuteEnabled] == "boolean") {
                executeEnabled = format.execute[kExecuteEnabled];
            } else {
                executeEnabled = false;
            }
            if (executeEnabled !== undefined) {
                return {
                    ...format,
                    execute: {
                        ...format.execute,
                        [kExecuteEnabled]: executeEnabled
                    }
                };
            } else {
                return format;
            }
        } else {
            return format;
        }
    },
    execute: async (options)=>{
        if (isQmdFile(options.target.source) && !existsSync(options.target.input)) {
            await createNotebookforTarget(options.target);
        }
        let kernelspec = options.target.data.kernelspec;
        const execute = options.format.execute[kExecuteEnabled] !== false;
        if (execute) {
            if (isJupyterNotebook(options.target.source)) {
                kernelspec = await ensureYamlKernelspec(options.target, kernelspec) || kernelspec;
            }
            const execOptions = {
                ...options,
                target: {
                    ...options.target,
                    input: Deno.realPathSync(options.target.input)
                }
            };
            let executeDaemon = options.format.execute[kExecuteDaemon];
            if (executeDaemon === null || executeDaemon === undefined) {
                if (await disableDaemonForNotebook(options.target)) {
                    executeDaemon = false;
                } else {
                    executeDaemon = isInteractiveSession() && !runningInCI();
                }
            }
            const jupyterExecOptions = {
                kernelspec,
                python_cmd: await pythonExec(kernelspec),
                supervisor_pid: options.previewServer ? Deno.pid : undefined,
                ...execOptions
            };
            if (executeDaemon === false || executeDaemon === 0) {
                await executeKernelOneshot(jupyterExecOptions);
            } else {
                await executeKernelKeepalive(jupyterExecOptions);
            }
        }
        const nbContents = await jupyterNotebookFiltered(options.target.input, isJupyterNotebook(options.target.source) ? options.format.execute[kIpynbFilters] : []);
        const nb = jupyterFromJSON(nbContents);
        const assets = jupyterAssets(options.target.input, options.format.pandoc.to);
        const result1 = await jupyterToMarkdown(nb, {
            executeOptions: options,
            language: nb.metadata.kernelspec.language.toLowerCase(),
            assets,
            execute: options.format.execute,
            keepHidden: options.format.render[kKeepHidden],
            toHtml: isHtmlCompatible(options.format),
            toLatex: isLatexOutput(options.format.pandoc),
            toMarkdown: isMarkdownOutput(options.format.pandoc),
            toIpynb: isIpynbOutput(options.format.pandoc),
            toPresentation: isPresentationOutput(options.format.pandoc),
            figFormat: options.format.execute[kFigFormat],
            figDpi: options.format.execute[kFigDpi],
            figPos: options.format.render[kFigPos]
        });
        let includes;
        let engineDependencies;
        if (options.dependencies) {
            includes = executeResultIncludes(options.tempDir, result1.dependencies);
        } else {
            const dependencies = executeResultEngineDependencies(result1.dependencies);
            if (dependencies) {
                engineDependencies = {
                    [kJupyterEngine]: dependencies
                };
            }
        }
        cleanupNotebook(options.target, options.format);
        return {
            markdown: result1.markdown,
            supporting: [
                join3(assets.base_dir, assets.supporting_dir)
            ],
            filters: [],
            pandoc: result1.pandoc,
            includes,
            engineDependencies,
            preserve: result1.htmlPreserve,
            postProcess: result1.htmlPreserve && Object.keys(result1.htmlPreserve).length > 0
        };
    },
    executeTargetSkipped: cleanupNotebook,
    dependencies: (options)=>{
        const includes = {};
        if (options.dependencies) {
            const includeFiles = includesForJupyterWidgetDependencies(options.dependencies, options.tempDir);
            if (includeFiles.inHeader) {
                includes[kIncludeInHeader] = [
                    includeFiles.inHeader
                ];
            }
            if (includeFiles.afterBody) {
                includes[kIncludeAfterBody] = [
                    includeFiles.afterBody
                ];
            }
        }
        return Promise.resolve({
            includes
        });
    },
    postprocess: (options)=>{
        postProcessRestorePreservedHtml(options);
        return Promise.resolve();
    },
    canFreeze: true,
    generatesFigures: true,
    ignoreDirs: ()=>{
        return [
            "venv",
            "env"
        ];
    },
    canKeepSource: (target)=>{
        return !isJupyterNotebook(target.source);
    },
    keepFiles: (input)=>{
        const files = [];
        const [fileDir, fileStem] = dirAndStem(input);
        if (!isJupyterNotebook(input) && !input.endsWith(`.${kJupyterEngine}.md`)) {
            files.push(join3(fileDir, fileStem + ".ipynb"));
        } else if (isJupyterNotebook(input) && existsSync(join3(fileDir, fileStem + ".qmd"))) {
            files.push(input);
        }
        return files;
    }
};
function isQmdFile(file) {
    const ext = extname2(file);
    return kQmdExtensions.includes(ext);
}
async function ensureYamlKernelspec(target, kernelspec) {
    const markdown = target.markdown.value;
    const yamlJupyter = readYamlFromMarkdown(markdown)?.jupyter;
    if (yamlJupyter && typeof yamlJupyter !== "boolean") {
        const [yamlKernelspec, _] = await jupyterKernelspecFromMarkdown(markdown);
        if (yamlKernelspec.name !== kernelspec.name) {
            const nb = jupyterFromJSON(Deno.readTextFileSync(target.source));
            nb.metadata.kernelspec = yamlKernelspec;
            Deno.writeTextFileSync(target.source, JSON.stringify(nb, null, 2));
            return yamlKernelspec;
        }
    }
}
async function createNotebookforTarget(target, project) {
    const nb = await quartoMdToJupyter(target.markdown.value, true, project);
    Deno.writeTextFileSync(target.input, JSON.stringify(nb, null, 2));
    return nb;
}
async function disableDaemonForNotebook(target) {
    const kShellMagics = [
        "cd",
        "cat",
        "cp",
        "env",
        "ls",
        "man",
        "mkdir",
        "more",
        "mv",
        "pwd",
        "rm",
        "rmdir", 
    ];
    const nb = await breakQuartoMd(target.markdown);
    for (const cell of nb.cells){
        if (__VIRTUAL_FILE18(cell.cell_type)) {
            const language = cell.cell_type.language;
            if (language === "python") {
                if (cell.source.value.startsWith("!")) {
                    return true;
                }
                return kShellMagics.some((cmd)=>cell.source.value.includes("%" + cmd + " ") || cell.source.value.includes("!" + cmd + " ") || cell.source.value.startsWith(cmd + " "));
            }
        }
    }
    return false;
}
function cleanupNotebook(target, format) {
    const data = target.data;
    if (data.transient) {
        if (!format.execute[kKeepIpynb]) {
            removeIfExists(target.input);
        }
    }
}
function executeResultIncludes(tempDir, widgetDependencies) {
    if (widgetDependencies) {
        const includes = {};
        const includeFiles = includesForJupyterWidgetDependencies([
            widgetDependencies
        ], tempDir);
        if (includeFiles.inHeader) {
            includes[kIncludeInHeader] = [
                includeFiles.inHeader
            ];
        }
        if (includeFiles.afterBody) {
            includes[kIncludeAfterBody] = [
                includeFiles.afterBody
            ];
        }
        return includes;
    } else {
        return undefined;
    }
}
function executeResultEngineDependencies(widgetDependencies) {
    if (widgetDependencies) {
        return [
            widgetDependencies
        ];
    } else {
        return undefined;
    }
}
const kMdExtensions = [
    ".md",
    ".markdown"
];
const markdownEngine = {
    name: kMarkdownEngine,
    defaultExt: ".qmd",
    defaultYaml: ()=>[],
    defaultContent: ()=>[],
    validExtensions: ()=>kQmdExtensions.concat(kMdExtensions),
    claimsExtension: (ext)=>{
        return kMdExtensions.includes(ext.toLowerCase());
    },
    claimsLanguage: (_language)=>{
        return false;
    },
    target: (file, _quiet, markdown)=>{
        if (markdown === undefined) {
            markdown = mappedStringFromFile(file);
        }
        const target = {
            source: file,
            input: file,
            markdown,
            metadata: readYamlFromMarkdown(markdown.value)
        };
        return Promise.resolve(target);
    },
    partitionedMarkdown: (file)=>{
        return Promise.resolve(partitionMarkdown(Deno.readTextFileSync(file)));
    },
    execute: (options)=>{
        const markdown = options.target.markdown.value;
        if (extname2(options.target.input).toLowerCase() === ".md") {
            const languages = languagesInMarkdown(markdown);
            if (languages.size > 0) {
                throw new Error("You must use the .qmd extension for documents with executable code.");
            }
        }
        return Promise.resolve({
            markdown,
            supporting: [],
            filters: []
        });
    },
    dependencies: (_options)=>{
        return Promise.resolve({
            includes: {}
        });
    },
    postprocess: (_options)=>Promise.resolve(),
    canFreeze: false,
    generatesFigures: false
};
const kDependencies = "dependencies";
const kSassBundles = "sass-bundles";
const kHtmlPostprocessors = "html-postprocessors";
const kHtmlFinalizers = "html-finalizers";
const kBodyEnvelope = "body-envelope";
const kTextHighlightingMode = "text-highlighting-mode";
const kQuartoCssVariables = "css-variables";
const kMarkdownAfterBody = "render-after-body";
function isPandocFilter(filter) {
    return filter.path !== undefined;
}
const basePandocNode = {
    emit: (_ls)=>{
        throw new Error("unimplemented");
    },
    mappedString () {
        const ls = [];
        this.emit(ls);
        return mappedConcat(ls);
    },
    push: ()=>{
        throw new Error("unimplemented");
    }
};
function pandocRawStr(content) {
    return {
        ...basePandocNode,
        emit: (ls)=>ls.push(content)
    };
}
function pandocHtmlBlock(elementName) {
    return function(opts) {
        let { id , classes , attrs , contents  } = opts || {};
        if (classes === undefined) {
            classes = [];
        }
        if (attrs === undefined) {
            attrs = [];
        }
        contents = contents || [];
        function attrString() {
            const strs = [];
            if (id) {
                strs.push(`id="${id}"`);
            }
            if (classes && classes.length) {
                strs.push(`class="${classes.join(" ")}"`);
            }
            if (attrs) {
                strs.push(...attrs.map((attr)=>`data-${attr}`));
            }
            return strs.join(" ");
        }
        return {
            ...basePandocNode,
            push: function(s) {
                if (this !== s) {
                    contents.push(s);
                }
            },
            emit: function(ls) {
                ls.push(`\n<${elementName} ${attrString()}>`);
                if (elementName !== "pre") {
                    ls.push("\n");
                }
                for (const entry of contents){
                    entry.emit(ls);
                }
                if (elementName !== "pre") {
                    ls.push("\n");
                }
                ls.push(`</${elementName}>\n`);
            }
        };
    };
}
function pandocList(opts) {
    let { contents , skipFirstLineBreak  } = opts || {};
    contents = contents || [];
    return {
        ...basePandocNode,
        push: function(s) {
            if (this !== s) {
                contents.push(s);
            }
        },
        emit: function(ls) {
            const lb = skipFirstLineBreak ? "" : "\n";
            ls.push(`${lb}\n`);
            for (const entry of contents){
                entry.emit(ls);
            }
            if (!asMappedString(ls[ls.length - 1] || "\n").value.endsWith("\n")) {
                ls.push(`\n`);
            }
            ls.push(`\n`);
        }
    };
}
function pandocBlock(delimiter) {
    return function(opts) {
        let { id , classes , attrs , language , skipFirstLineBreak , contents  } = opts || {};
        if (classes === undefined) {
            classes = [];
        }
        if (attrs === undefined) {
            attrs = [];
        }
        contents = contents || [];
        function attrString() {
            const strs = [];
            if (language) {
                strs.push(language);
            }
            if (id) {
                strs.push(`#${id}`);
            }
            if (classes) {
                strs.push(...classes.map((c)=>`.${c}`));
            }
            if (attrs) {
                strs.push(...attrs);
            }
            if (strs.length) {
                return `{${strs.join(" ")}}`;
            } else {
                return "{}";
            }
        }
        return {
            ...basePandocNode,
            push: function(s) {
                if (this !== s) {
                    contents.push(s);
                }
            },
            emit: function(ls) {
                const lb = skipFirstLineBreak ? "" : "\n";
                ls.push(`${lb}${delimiter}${attrString()}\n`);
                for (const entry of contents){
                    entry.emit(ls);
                }
                if (!asMappedString(ls[ls.length - 1] || "\n").value.endsWith("\n")) {
                    ls.push(`\n`);
                }
                ls.push(`${delimiter}\n`);
            }
        };
    };
}
const pandocDiv = pandocBlock(":::");
const pandocCode = pandocBlock("```");
pandocHtmlBlock("figure");
pandocHtmlBlock("figcaption");
class EventEmitter {
    events = new Map();
    maxListeners;
    #defaultMaxListeners = 10;
    get defaultMaxListeners() {
        return this.#defaultMaxListeners;
    }
    set defaultMaxListeners(n) {
        if (Number.isInteger(n) || n < 0) {
            const error = new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative integer. Received ' + n + '.');
            throw error;
        }
        this.#defaultMaxListeners = n;
    }
    addListener(eventName, listener) {
        return this.on(eventName, listener);
    }
    emit(eventName, ...args) {
        const listeners = this.events.get(eventName);
        if (listeners === undefined) {
            if (eventName === 'error') {
                const error = args[0];
                if (error instanceof Error) throw error;
                throw new Error('Unhandled error.');
            }
            return false;
        }
        const copyListeners = [
            ...listeners
        ];
        for (const listener of copyListeners){
            listener.apply(this, args);
        }
        return true;
    }
    setMaxListeners(n) {
        if (!Number.isInteger(n) || n < 0) {
            throw new RangeError('The value of "n" is out of range. It must be a non-negative integer. Received ' + n + '.');
        }
        this.maxListeners = n;
        return this;
    }
    getMaxListeners() {
        if (this.maxListeners === undefined) {
            return this.defaultMaxListeners;
        }
        return this.maxListeners;
    }
    listenerCount(eventName) {
        const events = this.events.get(eventName);
        return events === undefined ? 0 : events.length;
    }
    eventNames() {
        return Reflect.ownKeys(this.events);
    }
    listeners(eventName) {
        const listeners = this.events.get(eventName);
        return listeners === undefined ? [] : listeners;
    }
    off(eventName, listener) {
        return this.removeListener(eventName, listener);
    }
    on(eventName, listener, prepend) {
        if (this.events.has(eventName) === false) {
            this.events.set(eventName, []);
        }
        const events = this.events.get(eventName);
        if (prepend) {
            events.unshift(listener);
        } else {
            events.push(listener);
        }
        if (eventName !== "newListener" && this.events.has("newListener")) {
            this.emit('newListener', eventName, listener);
        }
        const maxListener = this.getMaxListeners();
        const eventLength = events.length;
        if (maxListener > 0 && eventLength > maxListener && !events.warned) {
            events.warned = true;
            const warning = new Error(`Possible EventEmitter memory leak detected.
         ${this.listenerCount(eventName)} ${eventName.toString()} listeners.
         Use emitter.setMaxListeners() to increase limit`);
            warning.name = "MaxListenersExceededWarning";
            console.warn(warning);
        }
        return this;
    }
    removeAllListeners(eventName) {
        const events = this.events;
        if (!events.has('removeListener')) {
            if (arguments.length === 0) {
                this.events = new Map();
            } else if (events.has(eventName)) {
                events.delete(eventName);
            }
            return this;
        }
        if (arguments.length === 0) {
            for (const key of events.keys()){
                if (key === 'removeListener') continue;
                this.removeAllListeners(key);
            }
            this.removeAllListeners('removeListener');
            this.events = new Map();
            return this;
        }
        const listeners = events.get(eventName);
        if (listeners !== undefined) {
            listeners.map((listener)=>{
                this.removeListener(eventName, listener);
            });
        }
        return this;
    }
    removeListener(eventName, listener) {
        const events = this.events;
        if (events.size === 0) return this;
        const list = events.get(eventName);
        if (list === undefined) return this;
        const index = list.findIndex((item)=>item === listener || item.listener === listener);
        if (index === -1) return this;
        list.splice(index, 1);
        if (list.length === 0) this.events.delete(eventName);
        if (events.has('removeListener')) {
            this.emit('removeListener', eventName, listener);
        }
        return this;
    }
    once(eventName, listener) {
        this.on(eventName, this.onceWrap(eventName, listener));
        return this;
    }
    onceWrap(eventName, listener) {
        const wrapper = function(...args) {
            this.context.removeListener(this.eventName, this.wrapedListener);
            this.listener.apply(this.context, args);
        };
        const wrapperContext = {
            eventName: eventName,
            listener: listener,
            wrapedListener: wrapper,
            context: this
        };
        const wrapped = wrapper.bind(wrapperContext);
        wrapperContext.wrapedListener = wrapped;
        wrapped.listener = listener;
        return wrapped;
    }
    prependListener(eventName, listener) {
        return this.on(eventName, listener, true);
    }
    prependOnceListener(eventName, listener) {
        this.prependListener(eventName, this.onceWrap(eventName, listener));
        return this;
    }
    rawListeners(eventName) {
        const events = this.events;
        if (events === undefined) return [];
        const listeners = events.get(eventName);
        if (listeners === undefined) return [];
        return [
            ...listeners
        ];
    }
}
const codes = {};
function hideStackFrames(fn) {
    const hidden = "__node_internal_" + fn.name;
    Object.defineProperty(fn, "name", {
        value: hidden
    });
    return fn;
}
const _toString4 = Object.prototype.toString;
const _isObjectLike = (value)=>value !== null && typeof value === "object";
const _isFunctionLike = (value)=>value !== null && typeof value === "function";
function isAnyArrayBuffer(value) {
    return _isObjectLike(value) && (_toString4.call(value) === "[object ArrayBuffer]" || _toString4.call(value) === "[object SharedArrayBuffer]");
}
function isArgumentsObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Arguments]";
}
function isArrayBuffer(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object ArrayBuffer]";
}
function isAsyncFunction(value) {
    return _isFunctionLike(value) && _toString4.call(value) === "[object AsyncFunction]";
}
function isBooleanObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Boolean]";
}
function isBoxedPrimitive(value) {
    return isBooleanObject(value) || isStringObject(value) || isNumberObject(value) || isSymbolObject(value) || isBigIntObject(value);
}
function isDataView(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object DataView]";
}
function isDate(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Date]";
}
function isGeneratorFunction(value) {
    return _isFunctionLike(value) && _toString4.call(value) === "[object GeneratorFunction]";
}
function isGeneratorObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Generator]";
}
function isMap1(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Map]";
}
function isMapIterator(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Map Iterator]";
}
function isModuleNamespaceObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Module]";
}
function isNativeError(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Error]";
}
function isNumberObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Number]";
}
function isBigIntObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object BigInt]";
}
function isPromise(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Promise]";
}
function isRegExp(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object RegExp]";
}
function isSet1(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Set]";
}
function isSetIterator(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Set Iterator]";
}
function isSharedArrayBuffer(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object SharedArrayBuffer]";
}
function isStringObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object String]";
}
function isSymbolObject(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object Symbol]";
}
function isWeakMap(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object WeakMap]";
}
function isWeakSet(value) {
    return _isObjectLike(value) && _toString4.call(value) === "[object WeakSet]";
}
const __default1 = {
    isAsyncFunction,
    isGeneratorFunction,
    isAnyArrayBuffer,
    isArrayBuffer,
    isArgumentsObject,
    isBoxedPrimitive,
    isDataView,
    isMap: isMap1,
    isMapIterator,
    isModuleNamespaceObject,
    isNativeError,
    isPromise,
    isSet: isSet1,
    isSetIterator,
    isWeakMap,
    isWeakSet,
    isRegExp,
    isDate,
    isStringObject,
    isNumberObject,
    isBooleanObject,
    isBigIntObject
};
const mod3 = {
    isAnyArrayBuffer: isAnyArrayBuffer,
    isArgumentsObject: isArgumentsObject,
    isArrayBuffer: isArrayBuffer,
    isAsyncFunction: isAsyncFunction,
    isBooleanObject: isBooleanObject,
    isBoxedPrimitive: isBoxedPrimitive,
    isDataView: isDataView,
    isDate: isDate,
    isGeneratorFunction: isGeneratorFunction,
    isGeneratorObject: isGeneratorObject,
    isMap: isMap1,
    isMapIterator: isMapIterator,
    isModuleNamespaceObject: isModuleNamespaceObject,
    isNativeError: isNativeError,
    isNumberObject: isNumberObject,
    isBigIntObject: isBigIntObject,
    isPromise: isPromise,
    isRegExp: isRegExp,
    isSet: isSet1,
    isSetIterator: isSetIterator,
    isSharedArrayBuffer: isSharedArrayBuffer,
    isStringObject: isStringObject,
    isSymbolObject: isSymbolObject,
    isWeakMap: isWeakMap,
    isWeakSet: isWeakSet,
    default: __default1
};
Symbol("kHandle");
const kKeyObject = Symbol("kKeyObject");
const kKeyType = Symbol("kKeyType");
function isKeyObject(obj) {
    return obj != null && obj[kKeyType] !== undefined;
}
function isCryptoKey(obj) {
    return obj != null && obj[kKeyObject] !== undefined;
}
const _getTypedArrayToStringTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype, Symbol.toStringTag).get;
function isArrayBufferView(value) {
    return ArrayBuffer.isView(value);
}
function isBigInt64Array(value) {
    return _getTypedArrayToStringTag.call(value) === "BigInt64Array";
}
function isBigUint64Array(value) {
    return _getTypedArrayToStringTag.call(value) === "BigUint64Array";
}
function isFloat32Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Float32Array";
}
function isFloat64Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Float64Array";
}
function isInt8Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Int8Array";
}
function isInt16Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Int16Array";
}
function isInt32Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Int32Array";
}
function isTypedArray1(value) {
    return _getTypedArrayToStringTag.call(value) !== undefined;
}
function isUint8Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Uint8Array";
}
function isUint8ClampedArray(value) {
    return _getTypedArrayToStringTag.call(value) === "Uint8ClampedArray";
}
function isUint16Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Uint16Array";
}
function isUint32Array(value) {
    return _getTypedArrayToStringTag.call(value) === "Uint32Array";
}
const { isDate: isDate1 , isArgumentsObject: isArgumentsObject1 , isBigIntObject: isBigIntObject1 , isBooleanObject: isBooleanObject1 , isNumberObject: isNumberObject1 , isStringObject: isStringObject1 , isSymbolObject: isSymbolObject1 , isNativeError: isNativeError1 , isRegExp: isRegExp1 , isAsyncFunction: isAsyncFunction1 , isGeneratorFunction: isGeneratorFunction1 , isGeneratorObject: isGeneratorObject1 , isPromise: isPromise1 , isMap: isMap2 , isSet: isSet2 , isMapIterator: isMapIterator1 , isSetIterator: isSetIterator1 , isWeakMap: isWeakMap1 , isWeakSet: isWeakSet1 , isArrayBuffer: isArrayBuffer1 , isDataView: isDataView1 , isSharedArrayBuffer: isSharedArrayBuffer1 , isModuleNamespaceObject: isModuleNamespaceObject1 , isAnyArrayBuffer: isAnyArrayBuffer1 , isBoxedPrimitive: isBoxedPrimitive1 ,  } = mod3;
const mod4 = {
    isCryptoKey: isCryptoKey,
    isKeyObject: isKeyObject,
    isArrayBufferView: isArrayBufferView,
    isBigInt64Array: isBigInt64Array,
    isBigUint64Array: isBigUint64Array,
    isFloat32Array: isFloat32Array,
    isFloat64Array: isFloat64Array,
    isInt8Array: isInt8Array,
    isInt16Array: isInt16Array,
    isInt32Array: isInt32Array,
    isTypedArray: isTypedArray1,
    isUint8Array: isUint8Array,
    isUint8ClampedArray: isUint8ClampedArray,
    isUint16Array: isUint16Array,
    isUint32Array: isUint32Array,
    isDate: isDate1,
    isArgumentsObject: isArgumentsObject1,
    isBigIntObject: isBigIntObject1,
    isBooleanObject: isBooleanObject1,
    isNumberObject: isNumberObject1,
    isStringObject: isStringObject1,
    isSymbolObject: isSymbolObject1,
    isNativeError: isNativeError1,
    isRegExp: isRegExp1,
    isAsyncFunction: isAsyncFunction1,
    isGeneratorFunction: isGeneratorFunction1,
    isGeneratorObject: isGeneratorObject1,
    isPromise: isPromise1,
    isMap: isMap2,
    isSet: isSet2,
    isMapIterator: isMapIterator1,
    isSetIterator: isSetIterator1,
    isWeakMap: isWeakMap1,
    isWeakSet: isWeakSet1,
    isArrayBuffer: isArrayBuffer1,
    isDataView: isDataView1,
    isSharedArrayBuffer: isSharedArrayBuffer1,
    isModuleNamespaceObject: isModuleNamespaceObject1,
    isAnyArrayBuffer: isAnyArrayBuffer1,
    isBoxedPrimitive: isBoxedPrimitive1
};
function normalizeEncoding(enc) {
    if (enc == null || enc === "utf8" || enc === "utf-8") return "utf8";
    return slowCases(enc);
}
function slowCases(enc) {
    switch(enc.length){
        case 4:
            if (enc === "UTF8") return "utf8";
            if (enc === "ucs2" || enc === "UCS2") return "utf16le";
            enc = `${enc}`.toLowerCase();
            if (enc === "utf8") return "utf8";
            if (enc === "ucs2") return "utf16le";
            break;
        case 3:
            if (enc === "hex" || enc === "HEX" || `${enc}`.toLowerCase() === "hex") {
                return "hex";
            }
            break;
        case 5:
            if (enc === "ascii") return "ascii";
            if (enc === "ucs-2") return "utf16le";
            if (enc === "UTF-8") return "utf8";
            if (enc === "ASCII") return "ascii";
            if (enc === "UCS-2") return "utf16le";
            enc = `${enc}`.toLowerCase();
            if (enc === "utf-8") return "utf8";
            if (enc === "ascii") return "ascii";
            if (enc === "ucs-2") return "utf16le";
            break;
        case 6:
            if (enc === "base64") return "base64";
            if (enc === "latin1" || enc === "binary") return "latin1";
            if (enc === "BASE64") return "base64";
            if (enc === "LATIN1" || enc === "BINARY") return "latin1";
            enc = `${enc}`.toLowerCase();
            if (enc === "base64") return "base64";
            if (enc === "latin1" || enc === "binary") return "latin1";
            break;
        case 7:
            if (enc === "utf16le" || enc === "UTF16LE" || `${enc}`.toLowerCase() === "utf16le") {
                return "utf16le";
            }
            break;
        case 8:
            if (enc === "utf-16le" || enc === "UTF-16LE" || `${enc}`.toLowerCase() === "utf-16le") {
                return "utf16le";
            }
            break;
        case 9:
            if (enc === "base64url" || enc === "BASE64URL" || `${enc}`.toLowerCase() === "base64url") {
                return "base64url";
            }
            break;
        default:
            if (enc === "") return "utf8";
    }
}
function isInt32(value) {
    return value === (value | 0);
}
function isUint32(value) {
    return value === value >>> 0;
}
const validateBuffer = hideStackFrames((buffer, name = "buffer")=>{
    if (!isArrayBufferView(buffer)) {
        throw new codes.ERR_INVALID_ARG_TYPE(name, [
            "Buffer",
            "TypedArray",
            "DataView"
        ], buffer);
    }
});
hideStackFrames((value, name, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER)=>{
    if (typeof value !== "number") {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value);
    }
    if (!Number.isInteger(value)) {
        throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value);
    }
    if (value < min || value > max) {
        throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
    }
});
const validateObject1 = hideStackFrames((value, name, options)=>{
    const useDefaultOptions = options == null;
    const allowArray = useDefaultOptions ? false : options.allowArray;
    const allowFunction = useDefaultOptions ? false : options.allowFunction;
    const nullable = useDefaultOptions ? false : options.nullable;
    if (!nullable && value === null || !allowArray && Array.isArray(value) || typeof value !== "object" && (!allowFunction || typeof value !== "function")) {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "Object", value);
    }
});
hideStackFrames((value, name, min = -2147483648, max = 2147483647)=>{
    if (!isInt32(value)) {
        if (typeof value !== "number") {
            throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value);
        }
        if (!Number.isInteger(value)) {
            throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value);
        }
        throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
    }
    if (value < min || value > max) {
        throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
    }
});
hideStackFrames((value, name, positive)=>{
    if (!isUint32(value)) {
        if (typeof value !== "number") {
            throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value);
        }
        if (!Number.isInteger(value)) {
            throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value);
        }
        const min = positive ? 1 : 0;
        throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && < 4294967296`, value);
    }
    if (positive && value === 0) {
        throw new codes.ERR_OUT_OF_RANGE(name, ">= 1 && < 4294967296", value);
    }
});
function validateString1(value, name) {
    if (typeof value !== "string") {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "string", value);
    }
}
hideStackFrames((value, name, oneOf)=>{
    if (!Array.prototype.includes.call(oneOf, value)) {
        const allowed = Array.prototype.join.call(Array.prototype.map.call(oneOf, (v)=>typeof v === "string" ? `'${v}'` : String(v)), ", ");
        const reason = "must be one of: " + allowed;
        throw new codes.ERR_INVALID_ARG_VALUE(name, value, reason);
    }
});
const validateCallback = hideStackFrames((callback)=>{
    if (typeof callback !== "function") {
        throw new codes.ERR_INVALID_CALLBACK(callback);
    }
});
hideStackFrames((signal, name)=>{
    if (signal !== undefined && (signal === null || typeof signal !== "object" || !("aborted" in signal))) {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "AbortSignal", signal);
    }
});
const validateFunction = hideStackFrames((value, name)=>{
    if (typeof value !== "function") {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "Function", value);
    }
});
hideStackFrames((value, name, minLength = 0)=>{
    if (!Array.isArray(value)) {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "Array", value);
    }
    if (value.length < minLength) {
        const reason = `must be longer than ${minLength}`;
        throw new codes.ERR_INVALID_ARG_VALUE(name, value, reason);
    }
});
Symbol.for("nodejs.util.inspect.custom");
const kEnumerableProperty = Object.create(null);
kEnumerableProperty.enumerable = true;
new Set();
const kCustomPromisifiedSymbol = Symbol.for("nodejs.util.promisify.custom");
const kCustomPromisifyArgsSymbol = Symbol.for("nodejs.util.promisify.customArgs");
function promisify(original) {
    validateFunction(original, "original");
    if (original[kCustomPromisifiedSymbol]) {
        const fn = original[kCustomPromisifiedSymbol];
        validateFunction(fn, "util.promisify.custom");
        return Object.defineProperty(fn, kCustomPromisifiedSymbol, {
            value: fn,
            enumerable: false,
            writable: false,
            configurable: true
        });
    }
    const argumentNames = original[kCustomPromisifyArgsSymbol];
    function fn1(...args) {
        return new Promise((resolve, reject)=>{
            args.push((err, ...values)=>{
                if (err) {
                    return reject(err);
                }
                if (argumentNames !== undefined && values.length > 1) {
                    const obj = {};
                    for(let i1 = 0; i1 < argumentNames.length; i1++){
                        obj[argumentNames[i1]] = values[i1];
                    }
                    resolve(obj);
                } else {
                    resolve(values[0]);
                }
            });
            Reflect.apply(original, this, args);
        });
    }
    Object.setPrototypeOf(fn1, Object.getPrototypeOf(original));
    Object.defineProperty(fn1, kCustomPromisifiedSymbol, {
        value: fn1,
        enumerable: false,
        writable: false,
        configurable: true
    });
    return Object.defineProperties(fn1, Object.getOwnPropertyDescriptors(original));
}
promisify.custom = kCustomPromisifiedSymbol;
let core2;
if (Deno?.core) {
    core2 = Deno.core;
} else {
    core2 = {
        setNextTickCallback: undefined,
        evalContext (_code, _filename) {
            throw new Error("Deno.core.evalContext is not supported in this environment");
        },
        encode (chunk) {
            return new TextEncoder().encode(chunk);
        },
        eventLoopHasMoreWork () {
            return false;
        }
    };
}
let _exiting = false;
const kSize = 2048;
const kMask = 2048 - 1;
class FixedCircularBuffer {
    bottom;
    top;
    list;
    next;
    constructor(){
        this.bottom = 0;
        this.top = 0;
        this.list = new Array(kSize);
        this.next = null;
    }
    isEmpty() {
        return this.top === this.bottom;
    }
    isFull() {
        return (this.top + 1 & kMask) === this.bottom;
    }
    push(data) {
        this.list[this.top] = data;
        this.top = this.top + 1 & kMask;
    }
    shift() {
        const nextItem = this.list[this.bottom];
        if (nextItem === undefined) {
            return null;
        }
        this.list[this.bottom] = undefined;
        this.bottom = this.bottom + 1 & kMask;
        return nextItem;
    }
}
class FixedQueue {
    head;
    tail;
    constructor(){
        this.head = this.tail = new FixedCircularBuffer();
    }
    isEmpty() {
        return this.head.isEmpty();
    }
    push(data) {
        if (this.head.isFull()) {
            this.head = this.head.next = new FixedCircularBuffer();
        }
        this.head.push(data);
    }
    shift() {
        const tail = this.tail;
        const next = tail.shift();
        if (tail.isEmpty() && tail.next !== null) {
            this.tail = tail.next;
        }
        return next;
    }
}
const queue = new FixedQueue();
let _nextTick;
function processTicksAndRejections() {
    let tock;
    do {
        while(tock = queue.shift()){
            try {
                const callback = tock.callback;
                if (tock.args === undefined) {
                    callback();
                } else {
                    const args = tock.args;
                    switch(args.length){
                        case 1:
                            callback(args[0]);
                            break;
                        case 2:
                            callback(args[0], args[1]);
                            break;
                        case 3:
                            callback(args[0], args[1], args[2]);
                            break;
                        case 4:
                            callback(args[0], args[1], args[2], args[3]);
                            break;
                        default:
                            callback(...args);
                    }
                }
            } finally{}
        }
        core2.runMicrotasks();
    }while (!queue.isEmpty())
    core2.setHasTickScheduled(false);
}
if (typeof core2.setNextTickCallback !== "undefined") {
    function runNextTicks() {
        if (!core2.hasTickScheduled()) {
            core2.runMicrotasks();
        }
        if (!core2.hasTickScheduled()) {
            return true;
        }
        processTicksAndRejections();
        return true;
    }
    core2.setNextTickCallback(processTicksAndRejections);
    core2.setMacrotaskCallback(runNextTicks);
    function __nextTickNative(callback, ...args) {
        validateCallback(callback);
        if (_exiting) {
            return;
        }
        let args_;
        switch(args.length){
            case 0:
                break;
            case 1:
                args_ = [
                    args[0]
                ];
                break;
            case 2:
                args_ = [
                    args[0],
                    args[1]
                ];
                break;
            case 3:
                args_ = [
                    args[0],
                    args[1],
                    args[2]
                ];
                break;
            default:
                args_ = new Array(args.length);
                for(let i1 = 0; i1 < args.length; i1++){
                    args_[i1] = args[i1];
                }
        }
        if (queue.isEmpty()) {
            core2.setHasTickScheduled(true);
        }
        const tickObject = {
            callback,
            args: args_
        };
        queue.push(tickObject);
    }
    _nextTick = __nextTickNative;
} else {
    function __nextTickQueueMicrotask(callback, ...args) {
        if (args) {
            queueMicrotask(()=>callback.call(this, ...args));
        } else {
            queueMicrotask(callback);
        }
    }
    _nextTick = __nextTickQueueMicrotask;
}
function nextTick(callback, ...args) {
    _nextTick(callback, ...args);
}
var DiffType;
(function(DiffType) {
    DiffType["removed"] = "removed";
    DiffType["common"] = "common";
    DiffType["added"] = "added";
})(DiffType || (DiffType = {}));
class AssertionError extends Error {
    name = "AssertionError";
    constructor(message){
        super(message);
    }
}
function assert1(expr, msg = "") {
    if (!expr) {
        throw new AssertionError(msg);
    }
}
function unreachable() {
    throw new AssertionError("unreachable");
}
TextDecoder;
TextEncoder;
const isNumericLookup = {};
function isArrayIndex(value) {
    switch(typeof value){
        case "number":
            return value >= 0 && (value | 0) === value;
        case "string":
            {
                const result1 = isNumericLookup[value];
                if (result1 !== void 0) {
                    return result1;
                }
                const length = value.length;
                if (length === 0) {
                    return isNumericLookup[value] = false;
                }
                let ch = 0;
                let i1 = 0;
                for(; i1 < length; ++i1){
                    ch = value.charCodeAt(i1);
                    if (i1 === 0 && ch === 0x30 && length > 1 || ch < 0x30 || ch > 0x39) {
                        return isNumericLookup[value] = false;
                    }
                }
                return isNumericLookup[value] = true;
            }
        default:
            return false;
    }
}
function getOwnNonIndexProperties(obj, filter) {
    let allProperties = [
        ...Object.getOwnPropertyNames(obj),
        ...Object.getOwnPropertySymbols(obj), 
    ];
    if (Array.isArray(obj)) {
        allProperties = allProperties.filter((k)=>!isArrayIndex(k));
    }
    if (filter === 0) {
        return allProperties;
    }
    const result1 = [];
    for (const key of allProperties){
        const desc = Object.getOwnPropertyDescriptor(obj, key);
        if (desc === undefined) {
            continue;
        }
        if (filter & 1 && !desc.writable) {
            continue;
        }
        if (filter & 2 && !desc.enumerable) {
            continue;
        }
        if (filter & 4 && !desc.configurable) {
            continue;
        }
        if (filter & 8 && typeof key === "string") {
            continue;
        }
        if (filter & 16 && typeof key === "symbol") {
            continue;
        }
        result1.push(key);
    }
    return result1;
}
const kObjectType = 0;
const kArrayExtrasType = 2;
const kRejected = 2;
const meta = [
    '\\x00',
    '\\x01',
    '\\x02',
    '\\x03',
    '\\x04',
    '\\x05',
    '\\x06',
    '\\x07',
    '\\b',
    '\\t',
    '\\n',
    '\\x0B',
    '\\f',
    '\\r',
    '\\x0E',
    '\\x0F',
    '\\x10',
    '\\x11',
    '\\x12',
    '\\x13',
    '\\x14',
    '\\x15',
    '\\x16',
    '\\x17',
    '\\x18',
    '\\x19',
    '\\x1A',
    '\\x1B',
    '\\x1C',
    '\\x1D',
    '\\x1E',
    '\\x1F',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    "\\'",
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '\\\\',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    '\\x7F',
    '\\x80',
    '\\x81',
    '\\x82',
    '\\x83',
    '\\x84',
    '\\x85',
    '\\x86',
    '\\x87',
    '\\x88',
    '\\x89',
    '\\x8A',
    '\\x8B',
    '\\x8C',
    '\\x8D',
    '\\x8E',
    '\\x8F',
    '\\x90',
    '\\x91',
    '\\x92',
    '\\x93',
    '\\x94',
    '\\x95',
    '\\x96',
    '\\x97',
    '\\x98',
    '\\x99',
    '\\x9A',
    '\\x9B',
    '\\x9C',
    '\\x9D',
    '\\x9E',
    '\\x9F'
];
const isUndetectableObject = (v)=>typeof v === "undefined" && v !== undefined;
const strEscapeSequencesRegExp = /[\x00-\x1f\x27\x5c\x7f-\x9f]/;
const strEscapeSequencesReplacer = /[\x00-\x1f\x27\x5c\x7f-\x9f]/g;
const strEscapeSequencesRegExpSingle = /[\x00-\x1f\x5c\x7f-\x9f]/;
const strEscapeSequencesReplacerSingle = /[\x00-\x1f\x5c\x7f-\x9f]/g;
const keyStrRegExp = /^[a-zA-Z_][a-zA-Z_0-9]*$/;
const numberRegExp = /^(0|[1-9][0-9]*)$/;
const nodeModulesRegExp = /[/\\]node_modules[/\\](.+?)(?=[/\\])/g;
const classRegExp = /^(\s+[^(]*?)\s*{/;
const stripCommentsRegExp = /(\/\/.*?\n)|(\/\*(.|\n)*?\*\/)/g;
const inspectDefaultOptions = {
    showHidden: false,
    depth: 2,
    colors: false,
    customInspect: true,
    showProxy: false,
    maxArrayLength: 100,
    maxStringLength: 10000,
    breakLength: 80,
    compact: 3,
    sorted: false,
    getters: false
};
function getUserOptions(ctx, isCrossContext) {
    const ret = {
        stylize: ctx.stylize,
        showHidden: ctx.showHidden,
        depth: ctx.depth,
        colors: ctx.colors,
        customInspect: ctx.customInspect,
        showProxy: ctx.showProxy,
        maxArrayLength: ctx.maxArrayLength,
        maxStringLength: ctx.maxStringLength,
        breakLength: ctx.breakLength,
        compact: ctx.compact,
        sorted: ctx.sorted,
        getters: ctx.getters,
        ...ctx.userOptions
    };
    if (isCrossContext) {
        Object.setPrototypeOf(ret, null);
        for (const key of Object.keys(ret)){
            if ((typeof ret[key] === "object" || typeof ret[key] === "function") && ret[key] !== null) {
                delete ret[key];
            }
        }
        ret.stylize = Object.setPrototypeOf((value, flavour)=>{
            let stylized;
            try {
                stylized = `${ctx.stylize(value, flavour)}`;
            } catch  {}
            if (typeof stylized !== "string") return value;
            return stylized;
        }, null);
    }
    return ret;
}
function inspect1(value, opts) {
    const ctx = {
        budget: {},
        indentationLvl: 0,
        seen: [],
        currentDepth: 0,
        stylize: stylizeNoColor,
        showHidden: inspectDefaultOptions.showHidden,
        depth: inspectDefaultOptions.depth,
        colors: inspectDefaultOptions.colors,
        customInspect: inspectDefaultOptions.customInspect,
        showProxy: inspectDefaultOptions.showProxy,
        maxArrayLength: inspectDefaultOptions.maxArrayLength,
        maxStringLength: inspectDefaultOptions.maxStringLength,
        breakLength: inspectDefaultOptions.breakLength,
        compact: inspectDefaultOptions.compact,
        sorted: inspectDefaultOptions.sorted,
        getters: inspectDefaultOptions.getters
    };
    if (arguments.length > 1) {
        if (arguments.length > 2) {
            if (arguments[2] !== undefined) {
                ctx.depth = arguments[2];
            }
            if (arguments.length > 3 && arguments[3] !== undefined) {
                ctx.colors = arguments[3];
            }
        }
        if (typeof opts === "boolean") {
            ctx.showHidden = opts;
        } else if (opts) {
            const optKeys = Object.keys(opts);
            for(let i1 = 0; i1 < optKeys.length; ++i1){
                const key = optKeys[i1];
                if (inspectDefaultOptions.hasOwnProperty(key) || key === "stylize") {
                    ctx[key] = opts[key];
                } else if (ctx.userOptions === undefined) {
                    ctx.userOptions = opts;
                }
            }
        }
    }
    if (ctx.colors) ctx.stylize = stylizeWithColor;
    if (ctx.maxArrayLength === null) ctx.maxArrayLength = Infinity;
    if (ctx.maxStringLength === null) ctx.maxStringLength = Infinity;
    return formatValue(ctx, value, 0);
}
const customInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
inspect1.custom = customInspectSymbol;
Object.defineProperty(inspect1, "defaultOptions", {
    get () {
        return inspectDefaultOptions;
    },
    set (options) {
        validateObject1(options, "options");
        return Object.assign(inspectDefaultOptions, options);
    }
});
const defaultFG = 39;
const defaultBG = 49;
inspect1.colors = Object.assign(Object.create(null), {
    reset: [
        0,
        0
    ],
    bold: [
        1,
        22
    ],
    dim: [
        2,
        22
    ],
    italic: [
        3,
        23
    ],
    underline: [
        4,
        24
    ],
    blink: [
        5,
        25
    ],
    inverse: [
        7,
        27
    ],
    hidden: [
        8,
        28
    ],
    strikethrough: [
        9,
        29
    ],
    doubleunderline: [
        21,
        24
    ],
    black: [
        30,
        defaultFG
    ],
    red: [
        31,
        defaultFG
    ],
    green: [
        32,
        defaultFG
    ],
    yellow: [
        33,
        defaultFG
    ],
    blue: [
        34,
        defaultFG
    ],
    magenta: [
        35,
        defaultFG
    ],
    cyan: [
        36,
        defaultFG
    ],
    white: [
        37,
        defaultFG
    ],
    bgBlack: [
        40,
        defaultBG
    ],
    bgRed: [
        41,
        defaultBG
    ],
    bgGreen: [
        42,
        defaultBG
    ],
    bgYellow: [
        43,
        defaultBG
    ],
    bgBlue: [
        44,
        defaultBG
    ],
    bgMagenta: [
        45,
        defaultBG
    ],
    bgCyan: [
        46,
        defaultBG
    ],
    bgWhite: [
        47,
        defaultBG
    ],
    framed: [
        51,
        54
    ],
    overlined: [
        53,
        55
    ],
    gray: [
        90,
        defaultFG
    ],
    redBright: [
        91,
        defaultFG
    ],
    greenBright: [
        92,
        defaultFG
    ],
    yellowBright: [
        93,
        defaultFG
    ],
    blueBright: [
        94,
        defaultFG
    ],
    magentaBright: [
        95,
        defaultFG
    ],
    cyanBright: [
        96,
        defaultFG
    ],
    whiteBright: [
        97,
        defaultFG
    ],
    bgGray: [
        100,
        defaultBG
    ],
    bgRedBright: [
        101,
        defaultBG
    ],
    bgGreenBright: [
        102,
        defaultBG
    ],
    bgYellowBright: [
        103,
        defaultBG
    ],
    bgBlueBright: [
        104,
        defaultBG
    ],
    bgMagentaBright: [
        105,
        defaultBG
    ],
    bgCyanBright: [
        106,
        defaultBG
    ],
    bgWhiteBright: [
        107,
        defaultBG
    ]
});
function defineColorAlias(target, alias) {
    Object.defineProperty(inspect1.colors, alias, {
        get () {
            return this[target];
        },
        set (value) {
            this[target] = value;
        },
        configurable: true,
        enumerable: false
    });
}
defineColorAlias("gray", "grey");
defineColorAlias("gray", "blackBright");
defineColorAlias("bgGray", "bgGrey");
defineColorAlias("bgGray", "bgBlackBright");
defineColorAlias("dim", "faint");
defineColorAlias("strikethrough", "crossedout");
defineColorAlias("strikethrough", "strikeThrough");
defineColorAlias("strikethrough", "crossedOut");
defineColorAlias("hidden", "conceal");
defineColorAlias("inverse", "swapColors");
defineColorAlias("inverse", "swapcolors");
defineColorAlias("doubleunderline", "doubleUnderline");
inspect1.styles = Object.assign(Object.create(null), {
    special: "cyan",
    number: "yellow",
    bigint: "yellow",
    boolean: "yellow",
    undefined: "grey",
    null: "bold",
    string: "green",
    symbol: "green",
    date: "magenta",
    regexp: "red",
    module: "underline"
});
function addQuotes(str, quotes) {
    if (quotes === -1) {
        return `"${str}"`;
    }
    if (quotes === -2) {
        return `\`${str}\``;
    }
    return `'${str}'`;
}
const escapeFn = (str)=>meta[str.charCodeAt(0)];
function strEscape(str) {
    let escapeTest = strEscapeSequencesRegExp;
    let escapeReplace = strEscapeSequencesReplacer;
    let singleQuote = 39;
    if (str.includes("'")) {
        if (!str.includes('"')) {
            singleQuote = -1;
        } else if (!str.includes("`") && !str.includes("${")) {
            singleQuote = -2;
        }
        if (singleQuote !== 39) {
            escapeTest = strEscapeSequencesRegExpSingle;
            escapeReplace = strEscapeSequencesReplacerSingle;
        }
    }
    if (str.length < 5000 && !escapeTest.test(str)) {
        return addQuotes(str, singleQuote);
    }
    if (str.length > 100) {
        str = str.replace(escapeReplace, escapeFn);
        return addQuotes(str, singleQuote);
    }
    let result1 = "";
    let last = 0;
    const lastIndex = str.length;
    for(let i1 = 0; i1 < lastIndex; i1++){
        const point = str.charCodeAt(i1);
        if (point === singleQuote || point === 92 || point < 32 || point > 126 && point < 160) {
            if (last === i1) {
                result1 += meta[point];
            } else {
                result1 += `${str.slice(last, i1)}${meta[point]}`;
            }
            last = i1 + 1;
        }
    }
    if (last !== lastIndex) {
        result1 += str.slice(last);
    }
    return addQuotes(result1, singleQuote);
}
function stylizeWithColor(str, styleType) {
    const style = inspect1.styles[styleType];
    if (style !== undefined) {
        const color = inspect1.colors[style];
        if (color !== undefined) {
            return `\u001b[${color[0]}m${str}\u001b[${color[1]}m`;
        }
    }
    return str;
}
function stylizeNoColor(str) {
    return str;
}
function formatValue(ctx, value, recurseTimes, typedArray) {
    if (typeof value !== "object" && typeof value !== "function" && !isUndetectableObject(value)) {
        return formatPrimitive(ctx.stylize, value, ctx);
    }
    if (value === null) {
        return ctx.stylize("null", "null");
    }
    const context = value;
    const proxy = undefined;
    if (ctx.customInspect) {
        const maybeCustom = value[customInspectSymbol];
        if (typeof maybeCustom === "function" && maybeCustom !== inspect1 && !(value.constructor && value.constructor.prototype === value)) {
            const depth = ctx.depth === null ? null : ctx.depth - recurseTimes;
            const isCrossContext = proxy !== undefined || !(context instanceof Object);
            const ret = maybeCustom.call(context, depth, getUserOptions(ctx, isCrossContext));
            if (ret !== context) {
                if (typeof ret !== "string") {
                    return formatValue(ctx, ret, recurseTimes);
                }
                return ret.replace(/\n/g, `\n${" ".repeat(ctx.indentationLvl)}`);
            }
        }
    }
    if (ctx.seen.includes(value)) {
        let index = 1;
        if (ctx.circular === undefined) {
            ctx.circular = new Map();
            ctx.circular.set(value, index);
        } else {
            index = ctx.circular.get(value);
            if (index === undefined) {
                index = ctx.circular.size + 1;
                ctx.circular.set(value, index);
            }
        }
        return ctx.stylize(`[Circular *${index}]`, "special");
    }
    return formatRaw(ctx, value, recurseTimes, typedArray);
}
function formatRaw(ctx, value, recurseTimes, typedArray) {
    let keys;
    let protoProps;
    if (ctx.showHidden && (recurseTimes <= ctx.depth || ctx.depth === null)) {
        protoProps = [];
    }
    const constructor = getConstructorName(value, ctx, recurseTimes, protoProps);
    if (protoProps !== undefined && protoProps.length === 0) {
        protoProps = undefined;
    }
    let tag = value[Symbol.toStringTag];
    if (typeof tag !== "string") {
        tag = "";
    }
    let base = "";
    let formatter = getEmptyFormatArray;
    let braces;
    let noIterator = true;
    let i1 = 0;
    const filter = ctx.showHidden ? 0 : 2;
    let extrasType = 0;
    if (value[Symbol.iterator] || constructor === null) {
        noIterator = false;
        if (Array.isArray(value)) {
            const prefix = constructor !== "Array" || tag !== "" ? getPrefix(constructor, tag, "Array", `(${value.length})`) : "";
            keys = getOwnNonIndexProperties(value, filter);
            braces = [
                `${prefix}[`,
                "]"
            ];
            if (value.length === 0 && keys.length === 0 && protoProps === undefined) {
                return `${braces[0]}]`;
            }
            extrasType = kArrayExtrasType;
            formatter = formatArray;
        } else if (isSet2(value)) {
            const size = value.size;
            const prefix1 = getPrefix(constructor, tag, "Set", `(${size})`);
            keys = getKeys(value, ctx.showHidden);
            formatter = constructor !== null ? formatSet.bind(null, value) : formatSet.bind(null, value.values());
            if (size === 0 && keys.length === 0 && protoProps === undefined) {
                return `${prefix1}{}`;
            }
            braces = [
                `${prefix1}{`,
                "}"
            ];
        } else if (isMap2(value)) {
            const size1 = value.size;
            const prefix2 = getPrefix(constructor, tag, "Map", `(${size1})`);
            keys = getKeys(value, ctx.showHidden);
            formatter = constructor !== null ? formatMap.bind(null, value) : formatMap.bind(null, value.entries());
            if (size1 === 0 && keys.length === 0 && protoProps === undefined) {
                return `${prefix2}{}`;
            }
            braces = [
                `${prefix2}{`,
                "}"
            ];
        } else if (isTypedArray1(value)) {
            keys = getOwnNonIndexProperties(value, filter);
            const bound = value;
            const fallback = "";
            if (constructor === null) {}
            const size2 = value.length;
            const prefix3 = getPrefix(constructor, tag, fallback, `(${size2})`);
            braces = [
                `${prefix3}[`,
                "]"
            ];
            if (value.length === 0 && keys.length === 0 && !ctx.showHidden) {
                return `${braces[0]}]`;
            }
            formatter = formatTypedArray.bind(null, bound, size2);
            extrasType = kArrayExtrasType;
        } else if (isMapIterator1(value)) {
            keys = getKeys(value, ctx.showHidden);
            braces = getIteratorBraces("Map", tag);
            formatter = formatIterator.bind(null, braces);
        } else if (isSetIterator1(value)) {
            keys = getKeys(value, ctx.showHidden);
            braces = getIteratorBraces("Set", tag);
            formatter = formatIterator.bind(null, braces);
        } else {
            noIterator = true;
        }
    }
    if (noIterator) {
        keys = getKeys(value, ctx.showHidden);
        braces = [
            "{",
            "}"
        ];
        if (constructor === "Object") {
            if (isArgumentsObject1(value)) {
                braces[0] = "[Arguments] {";
            } else if (tag !== "") {
                braces[0] = `${getPrefix(constructor, tag, "Object")}{`;
            }
            if (keys.length === 0 && protoProps === undefined) {
                return `${braces[0]}}`;
            }
        } else if (typeof value === "function") {
            base = getFunctionBase(value, constructor, tag);
            if (keys.length === 0 && protoProps === undefined) {
                return ctx.stylize(base, "special");
            }
        } else if (isRegExp1(value)) {
            base = RegExp(constructor !== null ? value : new RegExp(value)).toString();
            const prefix4 = getPrefix(constructor, tag, "RegExp");
            if (prefix4 !== "RegExp ") {
                base = `${prefix4}${base}`;
            }
            if (keys.length === 0 && protoProps === undefined || recurseTimes > ctx.depth && ctx.depth !== null) {
                return ctx.stylize(base, "regexp");
            }
        } else if (isDate1(value)) {
            base = Number.isNaN(value.getTime()) ? value.toString() : value.toISOString();
            const prefix5 = getPrefix(constructor, tag, "Date");
            if (prefix5 !== "Date ") {
                base = `${prefix5}${base}`;
            }
            if (keys.length === 0 && protoProps === undefined) {
                return ctx.stylize(base, "date");
            }
        } else if (value instanceof Error) {
            base = formatError1(value, constructor, tag, ctx, keys);
            if (keys.length === 0 && protoProps === undefined) {
                return base;
            }
        } else if (isAnyArrayBuffer1(value)) {
            const arrayType = isArrayBuffer1(value) ? "ArrayBuffer" : "SharedArrayBuffer";
            const prefix6 = getPrefix(constructor, tag, arrayType);
            if (typedArray === undefined) {
                formatter = formatArrayBuffer;
            } else if (keys.length === 0 && protoProps === undefined) {
                return prefix6 + `{ byteLength: ${formatNumber(ctx.stylize, value.byteLength)} }`;
            }
            braces[0] = `${prefix6}{`;
            Array.prototype.unshift.call(keys, "byteLength");
        } else if (isDataView1(value)) {
            braces[0] = `${getPrefix(constructor, tag, "DataView")}{`;
            Array.prototype.unshift.call(keys, "byteLength", "byteOffset", "buffer");
        } else if (isPromise1(value)) {
            braces[0] = `${getPrefix(constructor, tag, "Promise")}{`;
            formatter = formatPromise;
        } else if (isWeakSet1(value)) {
            braces[0] = `${getPrefix(constructor, tag, "WeakSet")}{`;
            formatter = ctx.showHidden ? formatWeakSet : formatWeakCollection;
        } else if (isWeakMap1(value)) {
            braces[0] = `${getPrefix(constructor, tag, "WeakMap")}{`;
            formatter = ctx.showHidden ? formatWeakMap : formatWeakCollection;
        } else if (isModuleNamespaceObject1(value)) {
            braces[0] = `${getPrefix(constructor, tag, "Module")}{`;
            formatter = formatNamespaceObject.bind(null, keys);
        } else if (isBoxedPrimitive1(value)) {
            base = getBoxedBase(value, ctx, keys, constructor, tag);
            if (keys.length === 0 && protoProps === undefined) {
                return base;
            }
        } else {
            if (keys.length === 0 && protoProps === undefined) {
                return `${getCtxStyle(value, constructor, tag)}{}`;
            }
            braces[0] = `${getCtxStyle(value, constructor, tag)}{`;
        }
    }
    if (recurseTimes > ctx.depth && ctx.depth !== null) {
        let constructorName = getCtxStyle(value, constructor, tag).slice(0, -1);
        if (constructor !== null) {
            constructorName = `[${constructorName}]`;
        }
        return ctx.stylize(constructorName, "special");
    }
    recurseTimes += 1;
    ctx.seen.push(value);
    ctx.currentDepth = recurseTimes;
    let output;
    const indentationLvl = ctx.indentationLvl;
    try {
        output = formatter(ctx, value, recurseTimes);
        for(i1 = 0; i1 < keys.length; i1++){
            output.push(formatProperty(ctx, value, recurseTimes, keys[i1], extrasType));
        }
        if (protoProps !== undefined) {
            output.push(...protoProps);
        }
    } catch (err) {
        const constructorName1 = getCtxStyle(value, constructor, tag).slice(0, -1);
        return handleMaxCallStackSize(ctx, err, constructorName1, indentationLvl);
    }
    if (ctx.circular !== undefined) {
        const index = ctx.circular.get(value);
        if (index !== undefined) {
            const reference = ctx.stylize(`<ref *${index}>`, "special");
            if (ctx.compact !== true) {
                base = base === "" ? reference : `${reference} ${base}`;
            } else {
                braces[0] = `${reference} ${braces[0]}`;
            }
        }
    }
    ctx.seen.pop();
    if (ctx.sorted) {
        const comparator = ctx.sorted === true ? undefined : ctx.sorted;
        if (extrasType === 0) {
            output = output.sort(comparator);
        } else if (keys.length > 1) {
            const sorted = output.slice(output.length - keys.length).sort(comparator);
            output.splice(output.length - keys.length, keys.length, ...sorted);
        }
    }
    const res = reduceToSingleString(ctx, output, base, braces, extrasType, recurseTimes, value);
    const budget = ctx.budget[ctx.indentationLvl] || 0;
    const newLength = budget + res.length;
    ctx.budget[ctx.indentationLvl] = newLength;
    if (newLength > 2 ** 27) {
        ctx.depth = -1;
    }
    return res;
}
const builtInObjects = new Set(Object.getOwnPropertyNames(globalThis).filter((e)=>/^[A-Z][a-zA-Z0-9]+$/.test(e)));
function addPrototypeProperties(ctx, main, obj, recurseTimes, output) {
    let depth = 0;
    let keys;
    let keySet;
    do {
        if (depth !== 0 || main === obj) {
            obj = Object.getPrototypeOf(obj);
            if (obj === null) {
                return;
            }
            const descriptor = Object.getOwnPropertyDescriptor(obj, "constructor");
            if (descriptor !== undefined && typeof descriptor.value === "function" && builtInObjects.has(descriptor.value.name)) {
                return;
            }
        }
        if (depth === 0) {
            keySet = new Set();
        } else {
            Array.prototype.forEach.call(keys, (key)=>keySet.add(key));
        }
        keys = Reflect.ownKeys(obj);
        Array.prototype.push.call(ctx.seen, main);
        for (const key of keys){
            if (key === "constructor" || main.hasOwnProperty(key) || depth !== 0 && keySet.has(key)) {
                continue;
            }
            const desc = Object.getOwnPropertyDescriptor(obj, key);
            if (typeof desc.value === "function") {
                continue;
            }
            const value = formatProperty(ctx, obj, recurseTimes, key, 0, desc, main);
            if (ctx.colors) {
                Array.prototype.push.call(output, `\u001b[2m${value}\u001b[22m`);
            } else {
                Array.prototype.push.call(output, value);
            }
        }
        Array.prototype.pop.call(ctx.seen);
    }while (++depth !== 3)
}
function getConstructorName(obj, ctx, recurseTimes, protoProps) {
    let firstProto;
    const tmp = obj;
    while(obj || isUndetectableObject(obj)){
        const descriptor = Object.getOwnPropertyDescriptor(obj, "constructor");
        if (descriptor !== undefined && typeof descriptor.value === "function" && descriptor.value.name !== "" && isInstanceof(tmp, descriptor.value)) {
            if (protoProps !== undefined && (firstProto !== obj || !builtInObjects.has(descriptor.value.name))) {
                addPrototypeProperties(ctx, tmp, firstProto || tmp, recurseTimes, protoProps);
            }
            return descriptor.value.name;
        }
        obj = Object.getPrototypeOf(obj);
        if (firstProto === undefined) {
            firstProto = obj;
        }
    }
    if (firstProto === null) {
        return null;
    }
    const res = undefined;
    if (recurseTimes > ctx.depth && ctx.depth !== null) {
        return `${res} <Complex prototype>`;
    }
    const protoConstr = getConstructorName(firstProto, ctx, recurseTimes + 1, protoProps);
    if (protoConstr === null) {
        return `${res} <${inspect1(firstProto, {
            ...ctx,
            customInspect: false,
            depth: -1
        })}>`;
    }
    return `${res} <${protoConstr}>`;
}
function formatPrimitive(fn, value, ctx) {
    if (typeof value === "string") {
        let trailer = "";
        if (value.length > ctx.maxStringLength) {
            const remaining = value.length - ctx.maxStringLength;
            value = value.slice(0, ctx.maxStringLength);
            trailer = `... ${remaining} more character${remaining > 1 ? "s" : ""}`;
        }
        if (ctx.compact !== true && value.length > 16 && value.length > ctx.breakLength - ctx.indentationLvl - 4) {
            return value.split(/(?<=\n)/).map((line)=>fn(strEscape(line), "string")).join(` +\n${" ".repeat(ctx.indentationLvl + 2)}`) + trailer;
        }
        return fn(strEscape(value), "string") + trailer;
    }
    if (typeof value === "number") {
        return formatNumber(fn, value);
    }
    if (typeof value === "bigint") {
        return formatBigInt(fn, value);
    }
    if (typeof value === "boolean") {
        return fn(`${value}`, "boolean");
    }
    if (typeof value === "undefined") {
        return fn("undefined", "undefined");
    }
    return fn(value.toString(), "symbol");
}
function getEmptyFormatArray() {
    return [];
}
function isInstanceof(object, proto) {
    try {
        return object instanceof proto;
    } catch  {
        return false;
    }
}
function getPrefix(constructor, tag, fallback, size = "") {
    if (constructor === null) {
        if (tag !== "" && fallback !== tag) {
            return `[${fallback}${size}: null prototype] [${tag}] `;
        }
        return `[${fallback}${size}: null prototype] `;
    }
    if (tag !== "" && constructor !== tag) {
        return `${constructor}${size} [${tag}] `;
    }
    return `${constructor}${size} `;
}
function formatArray(ctx, value, recurseTimes) {
    const valLen = value.length;
    const len = Math.min(Math.max(0, ctx.maxArrayLength), valLen);
    const remaining = valLen - len;
    const output = [];
    for(let i1 = 0; i1 < len; i1++){
        if (!value.hasOwnProperty(i1)) {
            return formatSpecialArray(ctx, value, recurseTimes, len, output, i1);
        }
        output.push(formatProperty(ctx, value, recurseTimes, i1, 1));
    }
    if (remaining > 0) {
        output.push(`... ${remaining} more item${remaining > 1 ? "s" : ""}`);
    }
    return output;
}
function getCtxStyle(_value, constructor, tag) {
    let fallback = "";
    if (constructor === null) {
        if (fallback === tag) {
            fallback = "Object";
        }
    }
    return getPrefix(constructor, tag, fallback);
}
function getKeys(value, showHidden) {
    let keys;
    const symbols = Object.getOwnPropertySymbols(value);
    if (showHidden) {
        keys = Object.getOwnPropertyNames(value);
        if (symbols.length !== 0) {
            Array.prototype.push.apply(keys, symbols);
        }
    } else {
        try {
            keys = Object.keys(value);
        } catch (_err) {
            keys = Object.getOwnPropertyNames(value);
        }
        if (symbols.length !== 0) {}
    }
    return keys;
}
function formatSet(value, ctx, _ignored, recurseTimes) {
    const output = [];
    ctx.indentationLvl += 2;
    for (const v of value){
        Array.prototype.push.call(output, formatValue(ctx, v, recurseTimes));
    }
    ctx.indentationLvl -= 2;
    return output;
}
function formatMap(value, ctx, _gnored, recurseTimes) {
    const output = [];
    ctx.indentationLvl += 2;
    for (const { 0: k , 1: v  } of value){
        output.push(`${formatValue(ctx, k, recurseTimes)} => ${formatValue(ctx, v, recurseTimes)}`);
    }
    ctx.indentationLvl -= 2;
    return output;
}
function formatTypedArray(value, length, ctx, _ignored, recurseTimes) {
    const maxLength = Math.min(Math.max(0, ctx.maxArrayLength), length);
    const remaining = value.length - maxLength;
    const output = new Array(maxLength);
    const elementFormatter = value.length > 0 && typeof value[0] === "number" ? formatNumber : formatBigInt;
    for(let i1 = 0; i1 < maxLength; ++i1){
        output[i1] = elementFormatter(ctx.stylize, value[i1]);
    }
    if (remaining > 0) {
        output[maxLength] = `... ${remaining} more item${remaining > 1 ? "s" : ""}`;
    }
    if (ctx.showHidden) {
        ctx.indentationLvl += 2;
        for (const key of [
            "BYTES_PER_ELEMENT",
            "length",
            "byteLength",
            "byteOffset",
            "buffer", 
        ]){
            const str = formatValue(ctx, value[key], recurseTimes, true);
            Array.prototype.push.call(output, `[${key}]: ${str}`);
        }
        ctx.indentationLvl -= 2;
    }
    return output;
}
function getIteratorBraces(type, tag) {
    if (tag !== `${type} Iterator`) {
        if (tag !== "") {
            tag += "] [";
        }
        tag += `${type} Iterator`;
    }
    return [
        `[${tag}] {`,
        "}"
    ];
}
function formatIterator(braces, ctx, value, recurseTimes) {
    const { 0: entries , 1: isKeyValue  } = value;
    if (isKeyValue) {
        braces[0] = braces[0].replace(/ Iterator] {$/, " Entries] {");
        return formatMapIterInner(ctx, recurseTimes, entries, 2);
    }
    return formatSetIterInner(ctx, recurseTimes, entries, 1);
}
function getFunctionBase(value, constructor, tag) {
    const stringified = Function.prototype.toString.call(value);
    if (stringified.slice(0, 5) === "class" && stringified.endsWith("}")) {
        const slice = stringified.slice(5, -1);
        const bracketIndex = slice.indexOf("{");
        if (bracketIndex !== -1 && (!slice.slice(0, bracketIndex).includes("(") || classRegExp.test(slice.replace(stripCommentsRegExp)))) {
            return getClassBase(value, constructor, tag);
        }
    }
    let type = "Function";
    if (isGeneratorFunction1(value)) {
        type = `Generator${type}`;
    }
    if (isAsyncFunction1(value)) {
        type = `Async${type}`;
    }
    let base = `[${type}`;
    if (constructor === null) {
        base += " (null prototype)";
    }
    if (value.name === "") {
        base += " (anonymous)";
    } else {
        base += `: ${value.name}`;
    }
    base += "]";
    if (constructor !== type && constructor !== null) {
        base += ` ${constructor}`;
    }
    if (tag !== "" && constructor !== tag) {
        base += ` [${tag}]`;
    }
    return base;
}
function formatError1(err, constructor, tag, ctx, keys) {
    const name = err.name != null ? String(err.name) : "Error";
    let len = name.length;
    let stack = err.stack ? String(err.stack) : err.toString();
    if (!ctx.showHidden && keys.length !== 0) {
        for (const name1 of [
            "name",
            "message",
            "stack"
        ]){
            const index = keys.indexOf(name1);
            if (index !== -1 && stack.includes(err[name1])) {
                keys.splice(index, 1);
            }
        }
    }
    if (constructor === null || name.endsWith("Error") && stack.startsWith(name) && (stack.length === len || stack[len] === ":" || stack[len] === "\n")) {
        let fallback = "Error";
        if (constructor === null) {
            const start = stack.match(/^([A-Z][a-z_ A-Z0-9[\]()-]+)(?::|\n {4}at)/) || stack.match(/^([a-z_A-Z0-9-]*Error)$/);
            fallback = start && start[1] || "";
            len = fallback.length;
            fallback = fallback || "Error";
        }
        const prefix = getPrefix(constructor, tag, fallback).slice(0, -1);
        if (name !== prefix) {
            if (prefix.includes(name)) {
                if (len === 0) {
                    stack = `${prefix}: ${stack}`;
                } else {
                    stack = `${prefix}${stack.slice(len)}`;
                }
            } else {
                stack = `${prefix} [${name}]${stack.slice(len)}`;
            }
        }
    }
    let pos = err.message && stack.indexOf(err.message) || -1;
    if (pos !== -1) {
        pos += err.message.length;
    }
    const stackStart = stack.indexOf("\n    at", pos);
    if (stackStart === -1) {
        stack = `[${stack}]`;
    } else if (ctx.colors) {
        let newStack = stack.slice(0, stackStart);
        const lines = stack.slice(stackStart + 1).split("\n");
        for (const line of lines){
            let nodeModule;
            newStack += "\n";
            let pos1 = 0;
            while(nodeModule = nodeModulesRegExp.exec(line)){
                newStack += line.slice(pos1, nodeModule.index + 14);
                newStack += ctx.stylize(nodeModule[1], "module");
                pos1 = nodeModule.index + nodeModule[0].length;
            }
            newStack += pos1 === 0 ? line : line.slice(pos1);
        }
        stack = newStack;
    }
    if (ctx.indentationLvl !== 0) {
        const indentation = " ".repeat(ctx.indentationLvl);
        stack = stack.replace(/\n/g, `\n${indentation}`);
    }
    return stack;
}
let hexSlice;
function formatArrayBuffer(ctx, value) {
    let buffer;
    try {
        buffer = new Uint8Array(value);
    } catch  {
        return [
            ctx.stylize("(detached)", "special")
        ];
    }
    let str = hexSlice(buffer, 0, Math.min(ctx.maxArrayLength, buffer.length)).replace(/(.{2})/g, "$1 ").trim();
    const remaining = buffer.length - ctx.maxArrayLength;
    if (remaining > 0) {
        str += ` ... ${remaining} more byte${remaining > 1 ? "s" : ""}`;
    }
    return [
        `${ctx.stylize("[Uint8Contents]", "special")}: <${str}>`
    ];
}
function formatNumber(fn, value) {
    return fn(Object.is(value, -0) ? "-0" : `${value}`, "number");
}
function formatPromise(ctx, value, recurseTimes) {
    let output;
    const { 0: state , 1: result1  } = value;
    if (state === 0) {
        output = [
            ctx.stylize("<pending>", "special")
        ];
    } else {
        ctx.indentationLvl += 2;
        const str = formatValue(ctx, result1, recurseTimes);
        ctx.indentationLvl -= 2;
        output = [
            state === kRejected ? `${ctx.stylize("<rejected>", "special")} ${str}` : str, 
        ];
    }
    return output;
}
function formatWeakCollection(ctx) {
    return [
        ctx.stylize("<items unknown>", "special")
    ];
}
function formatWeakSet(ctx, value, recurseTimes) {
    const entries = value;
    return formatSetIterInner(ctx, recurseTimes, entries, 0);
}
function formatWeakMap(ctx, value, recurseTimes) {
    const entries = value;
    return formatMapIterInner(ctx, recurseTimes, entries, 0);
}
function formatProperty(ctx, value, recurseTimes, key, type, desc, original = value) {
    let name, str;
    let extra = " ";
    desc = desc || Object.getOwnPropertyDescriptor(value, key) || {
        value: value[key],
        enumerable: true
    };
    if (desc.value !== undefined) {
        const diff = ctx.compact !== true || type !== 0 ? 2 : 3;
        ctx.indentationLvl += diff;
        str = formatValue(ctx, desc.value, recurseTimes);
        if (diff === 3 && ctx.breakLength < getStringWidth(str, ctx.colors)) {
            extra = `\n${" ".repeat(ctx.indentationLvl)}`;
        }
        ctx.indentationLvl -= diff;
    } else if (desc.get !== undefined) {
        const label = desc.set !== undefined ? "Getter/Setter" : "Getter";
        const s = ctx.stylize;
        const sp = "special";
        if (ctx.getters && (ctx.getters === true || ctx.getters === "get" && desc.set === undefined || ctx.getters === "set" && desc.set !== undefined)) {
            try {
                const tmp = desc.get.call(original);
                ctx.indentationLvl += 2;
                if (tmp === null) {
                    str = `${s(`[${label}:`, sp)} ${s("null", "null")}${s("]", sp)}`;
                } else if (typeof tmp === "object") {
                    str = `${s(`[${label}]`, sp)} ${formatValue(ctx, tmp, recurseTimes)}`;
                } else {
                    const primitive = formatPrimitive(s, tmp, ctx);
                    str = `${s(`[${label}:`, sp)} ${primitive}${s("]", sp)}`;
                }
                ctx.indentationLvl -= 2;
            } catch (err) {
                const message = `<Inspection threw (${err.message})>`;
                str = `${s(`[${label}:`, sp)} ${message}${s("]", sp)}`;
            }
        } else {
            str = ctx.stylize(`[${label}]`, sp);
        }
    } else if (desc.set !== undefined) {
        str = ctx.stylize("[Setter]", "special");
    } else {
        str = ctx.stylize("undefined", "undefined");
    }
    if (type === 1) {
        return str;
    }
    if (typeof key === "symbol") {
        const tmp1 = key.toString().replace(strEscapeSequencesReplacer, escapeFn);
        name = `[${ctx.stylize(tmp1, "symbol")}]`;
    } else if (key === "__proto__") {
        name = "['__proto__']";
    } else if (desc.enumerable === false) {
        const tmp2 = key.replace(strEscapeSequencesReplacer, escapeFn);
        name = `[${tmp2}]`;
    } else if (keyStrRegExp.test(key)) {
        name = ctx.stylize(key, "name");
    } else {
        name = ctx.stylize(strEscape(key), "string");
    }
    return `${name}:${extra}${str}`;
}
function handleMaxCallStackSize(_ctx, _err, _constructorName, _indentationLvl) {}
const colorRegExp = /\u001b\[\d\d?m/g;
function removeColors(str) {
    return str.replace(colorRegExp, "");
}
function isBelowBreakLength(ctx, output, start, base) {
    let totalLength = output.length + start;
    if (totalLength + output.length > ctx.breakLength) {
        return false;
    }
    for(let i1 = 0; i1 < output.length; i1++){
        if (ctx.colors) {
            totalLength += removeColors(output[i1]).length;
        } else {
            totalLength += output[i1].length;
        }
        if (totalLength > ctx.breakLength) {
            return false;
        }
    }
    return base === "" || !base.includes("\n");
}
function formatBigInt(fn, value) {
    return fn(`${value}n`, "bigint");
}
function formatNamespaceObject(keys, ctx, value, recurseTimes) {
    const output = new Array(keys.length);
    for(let i1 = 0; i1 < keys.length; i1++){
        try {
            output[i1] = formatProperty(ctx, value, recurseTimes, keys[i1], kObjectType);
        } catch (_err) {
            const tmp = {
                [keys[i1]]: ""
            };
            output[i1] = formatProperty(ctx, tmp, recurseTimes, keys[i1], kObjectType);
            const pos = output[i1].lastIndexOf(" ");
            output[i1] = output[i1].slice(0, pos + 1) + ctx.stylize("<uninitialized>", "special");
        }
    }
    keys.length = 0;
    return output;
}
function formatSpecialArray(ctx, value, recurseTimes, maxLength, output, i1) {
    const keys = Object.keys(value);
    let index = i1;
    for(; i1 < keys.length && output.length < maxLength; i1++){
        const key = keys[i1];
        const tmp = +key;
        if (tmp > 2 ** 32 - 2) {
            break;
        }
        if (`${index}` !== key) {
            if (!numberRegExp.test(key)) {
                break;
            }
            const emptyItems = tmp - index;
            const ending = emptyItems > 1 ? "s" : "";
            const message = `<${emptyItems} empty item${ending}>`;
            output.push(ctx.stylize(message, "undefined"));
            index = tmp;
            if (output.length === maxLength) {
                break;
            }
        }
        output.push(formatProperty(ctx, value, recurseTimes, key, 1));
        index++;
    }
    const remaining = value.length - index;
    if (output.length !== maxLength) {
        if (remaining > 0) {
            const ending1 = remaining > 1 ? "s" : "";
            const message1 = `<${remaining} empty item${ending1}>`;
            output.push(ctx.stylize(message1, "undefined"));
        }
    } else if (remaining > 0) {
        output.push(`... ${remaining} more item${remaining > 1 ? "s" : ""}`);
    }
    return output;
}
function getBoxedBase(value, ctx, keys, constructor, tag) {
    let type;
    if (isNumberObject1(value)) {
        type = "Number";
    } else if (isStringObject1(value)) {
        type = "String";
        keys.splice(0, value.length);
    } else if (isBooleanObject1(value)) {
        type = "Boolean";
    } else if (isBigIntObject1(value)) {
        type = "BigInt";
    } else {
        type = "Symbol";
    }
    let base = `[${type}`;
    if (type !== constructor) {
        if (constructor === null) {
            base += " (null prototype)";
        } else {
            base += ` (${constructor})`;
        }
    }
    base += `: ${formatPrimitive(stylizeNoColor, value.valueOf(), ctx)}]`;
    if (tag !== "" && tag !== constructor) {
        base += ` [${tag}]`;
    }
    if (keys.length !== 0 || ctx.stylize === stylizeNoColor) {
        return base;
    }
    return ctx.stylize(base, type.toLowerCase());
}
function getClassBase(value, constructor, tag) {
    const hasName = value.hasOwnProperty("name");
    const name = hasName && value.name || "(anonymous)";
    let base = `class ${name}`;
    if (constructor !== "Function" && constructor !== null) {
        base += ` [${constructor}]`;
    }
    if (tag !== "" && constructor !== tag) {
        base += ` [${tag}]`;
    }
    if (constructor !== null) {
        const superName = Object.getPrototypeOf(value).name;
        if (superName) {
            base += ` extends ${superName}`;
        }
    } else {
        base += " extends [null prototype]";
    }
    return `[${base}]`;
}
function reduceToSingleString(ctx, output, base, braces, extrasType, recurseTimes, value) {
    if (ctx.compact !== true) {
        if (typeof ctx.compact === "number" && ctx.compact >= 1) {
            const entries = output.length;
            if (extrasType === 2 && entries > 6) {
                output = groupArrayElements(ctx, output, value);
            }
            if (ctx.currentDepth - recurseTimes < ctx.compact && entries === output.length) {
                const start = output.length + ctx.indentationLvl + braces[0].length + base.length + 10;
                if (isBelowBreakLength(ctx, output, start, base)) {
                    return `${base ? `${base} ` : ""}${braces[0]} ${join5(output, ", ")}` + ` ${braces[1]}`;
                }
            }
        }
        const indentation = `\n${" ".repeat(ctx.indentationLvl)}`;
        return `${base ? `${base} ` : ""}${braces[0]}${indentation}  ` + `${join5(output, `,${indentation}  `)}${indentation}${braces[1]}`;
    }
    if (isBelowBreakLength(ctx, output, 0, base)) {
        return `${braces[0]}${base ? ` ${base}` : ""} ${join5(output, ", ")} ` + braces[1];
    }
    const indentation1 = " ".repeat(ctx.indentationLvl);
    const ln = base === "" && braces[0].length === 1 ? " " : `${base ? ` ${base}` : ""}\n${indentation1}  `;
    return `${braces[0]}${ln}${join5(output, `,\n${indentation1}  `)} ${braces[1]}`;
}
function join5(output, separator) {
    let str = "";
    if (output.length !== 0) {
        const lastIndex = output.length - 1;
        for(let i1 = 0; i1 < lastIndex; i1++){
            str += output[i1];
            str += separator;
        }
        str += output[lastIndex];
    }
    return str;
}
function groupArrayElements(ctx, output, value) {
    let totalLength = 0;
    let maxLength = 0;
    let i1 = 0;
    let outputLength = output.length;
    if (ctx.maxArrayLength < output.length) {
        outputLength--;
    }
    const separatorSpace = 2;
    const dataLen = new Array(outputLength);
    for(; i1 < outputLength; i1++){
        const len = getStringWidth(output[i1], ctx.colors);
        dataLen[i1] = len;
        totalLength += len + separatorSpace;
        if (maxLength < len) {
            maxLength = len;
        }
    }
    const actualMax = maxLength + 2;
    if (actualMax * 3 + ctx.indentationLvl < ctx.breakLength && (totalLength / actualMax > 5 || maxLength <= 6)) {
        const averageBias = Math.sqrt(actualMax - totalLength / output.length);
        const biasedMax = Math.max(actualMax - 3 - averageBias, 1);
        const columns = Math.min(Math.round(Math.sqrt(2.5 * biasedMax * outputLength) / biasedMax), Math.floor((ctx.breakLength - ctx.indentationLvl) / actualMax), ctx.compact * 4, 15);
        if (columns <= 1) {
            return output;
        }
        const tmp = [];
        const maxLineLength = [];
        for(let i11 = 0; i11 < columns; i11++){
            let lineMaxLength = 0;
            for(let j = i11; j < output.length; j += columns){
                if (dataLen[j] > lineMaxLength) {
                    lineMaxLength = dataLen[j];
                }
            }
            lineMaxLength += separatorSpace;
            maxLineLength[i11] = lineMaxLength;
        }
        let order = String.prototype.padStart;
        if (value !== undefined) {
            for(let i2 = 0; i2 < output.length; i2++){
                if (typeof value[i2] !== "number" && typeof value[i2] !== "bigint") {
                    order = String.prototype.padEnd;
                    break;
                }
            }
        }
        for(let i3 = 0; i3 < outputLength; i3 += columns){
            const max = Math.min(i3 + columns, outputLength);
            let str = "";
            let j1 = i3;
            for(; j1 < max - 1; j1++){
                const padding = maxLineLength[j1 - i3] + output[j1].length - dataLen[j1];
                str += `${output[j1]}, `.padStart(padding, " ");
            }
            if (order === String.prototype.padStart) {
                const padding1 = maxLineLength[j1 - i3] + output[j1].length - dataLen[j1] - 2;
                str += output[j1].padStart(padding1, " ");
            } else {
                str += output[j1];
            }
            Array.prototype.push.call(tmp, str);
        }
        if (ctx.maxArrayLength < output.length) {
            Array.prototype.push.call(tmp, output[outputLength]);
        }
        output = tmp;
    }
    return output;
}
function formatMapIterInner(ctx, recurseTimes, entries, state) {
    const maxArrayLength = Math.max(ctx.maxArrayLength, 0);
    const len = entries.length / 2;
    const remaining = len - maxArrayLength;
    const maxLength = Math.min(maxArrayLength, len);
    let output = new Array(maxLength);
    let i1 = 0;
    ctx.indentationLvl += 2;
    if (state === 0) {
        for(; i1 < maxLength; i1++){
            const pos = i1 * 2;
            output[i1] = `${formatValue(ctx, entries[pos], recurseTimes)} => ${formatValue(ctx, entries[pos + 1], recurseTimes)}`;
        }
        if (!ctx.sorted) {
            output = output.sort();
        }
    } else {
        for(; i1 < maxLength; i1++){
            const pos1 = i1 * 2;
            const res = [
                formatValue(ctx, entries[pos1], recurseTimes),
                formatValue(ctx, entries[pos1 + 1], recurseTimes), 
            ];
            output[i1] = reduceToSingleString(ctx, res, "", [
                "[",
                "]"
            ], kArrayExtrasType, recurseTimes);
        }
    }
    ctx.indentationLvl -= 2;
    if (remaining > 0) {
        output.push(`... ${remaining} more item${remaining > 1 ? "s" : ""}`);
    }
    return output;
}
function formatSetIterInner(ctx, recurseTimes, entries, state) {
    const maxArrayLength = Math.max(ctx.maxArrayLength, 0);
    const maxLength = Math.min(maxArrayLength, entries.length);
    const output = new Array(maxLength);
    ctx.indentationLvl += 2;
    for(let i1 = 0; i1 < maxLength; i1++){
        output[i1] = formatValue(ctx, entries[i1], recurseTimes);
    }
    ctx.indentationLvl -= 2;
    if (state === 0 && !ctx.sorted) {
        output.sort();
    }
    const remaining = entries.length - maxLength;
    if (remaining > 0) {
        Array.prototype.push.call(output, `... ${remaining} more item${remaining > 1 ? "s" : ""}`);
    }
    return output;
}
const ansiPattern = "[\\u001B\\u009B][[\\]()#;?]*" + "(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*" + "|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)" + "|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))";
const ansi = new RegExp(ansiPattern, "g");
function getStringWidth(str, removeControlChars = true) {
    let width = 0;
    if (removeControlChars) {
        str = stripVTControlCharacters(str);
    }
    str = str.normalize("NFC");
    for (const __char of str[Symbol.iterator]()){
        const code = __char.codePointAt(0);
        if (isFullWidthCodePoint(code)) {
            width += 2;
        } else if (!isZeroWidthCodePoint(code)) {
            width++;
        }
    }
    return width;
}
const isFullWidthCodePoint = (code)=>{
    return code >= 0x1100 && (code <= 0x115f || code === 0x2329 || code === 0x232a || code >= 0x2e80 && code <= 0x3247 && code !== 0x303f || code >= 0x3250 && code <= 0x4dbf || code >= 0x4e00 && code <= 0xa4c6 || code >= 0xa960 && code <= 0xa97c || code >= 0xac00 && code <= 0xd7a3 || code >= 0xf900 && code <= 0xfaff || code >= 0xfe10 && code <= 0xfe19 || code >= 0xfe30 && code <= 0xfe6b || code >= 0xff01 && code <= 0xff60 || code >= 0xffe0 && code <= 0xffe6 || code >= 0x1b000 && code <= 0x1b001 || code >= 0x1f200 && code <= 0x1f251 || code >= 0x1f300 && code <= 0x1f64f || code >= 0x20000 && code <= 0x3fffd);
};
const isZeroWidthCodePoint = (code)=>{
    return code <= 0x1F || code >= 0x7F && code <= 0x9F || code >= 0x300 && code <= 0x36F || code >= 0x200B && code <= 0x200F || code >= 0x20D0 && code <= 0x20FF || code >= 0xFE00 && code <= 0xFE0F || code >= 0xFE20 && code <= 0xFE2F || code >= 0xE0100 && code <= 0xE01EF;
};
function stripVTControlCharacters(str) {
    validateString1(str, "str");
    return str.replace(ansi, "");
}
let debugImpls;
function initializeDebugEnv(debugEnv) {
    debugImpls = Object.create(null);
    if (debugEnv) {
        debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replaceAll("*", ".*").replaceAll(",", "$|^");
        const debugEnvRegex = new RegExp(`^${debugEnv}$`, "i");
        (str)=>debugEnvRegex.exec(str) !== null;
    } else {
        ()=>false;
    }
}
let debugEnv;
try {
    debugEnv = Deno.env.get("NODE_DEBUG") ?? "";
} catch (error1) {
    if (error1 instanceof Deno.errors.PermissionDenied) {
        debugEnv = "";
    } else {
        throw error1;
    }
}
initializeDebugEnv(debugEnv);
const os = {
    UV_UDP_IPV6ONLY: 1,
    UV_UDP_PARTIAL: 2,
    UV_UDP_REUSEADDR: 4,
    UV_UDP_MMSG_CHUNK: 8,
    UV_UDP_MMSG_FREE: 16,
    UV_UDP_LINUX_RECVERR: 32,
    UV_UDP_RECVMMSG: 256,
    dlopen: {
        RTLD_LAZY: 1,
        RTLD_NOW: 2,
        RTLD_GLOBAL: 8,
        RTLD_LOCAL: 4
    },
    errno: {
        E2BIG: 7,
        EACCES: 13,
        EADDRINUSE: 48,
        EADDRNOTAVAIL: 49,
        EAFNOSUPPORT: 47,
        EAGAIN: 35,
        EALREADY: 37,
        EBADF: 9,
        EBADMSG: 94,
        EBUSY: 16,
        ECANCELED: 89,
        ECHILD: 10,
        ECONNABORTED: 53,
        ECONNREFUSED: 61,
        ECONNRESET: 54,
        EDEADLK: 11,
        EDESTADDRREQ: 39,
        EDOM: 33,
        EDQUOT: 69,
        EEXIST: 17,
        EFAULT: 14,
        EFBIG: 27,
        EHOSTUNREACH: 65,
        EIDRM: 90,
        EILSEQ: 92,
        EINPROGRESS: 36,
        EINTR: 4,
        EINVAL: 22,
        EIO: 5,
        EISCONN: 56,
        EISDIR: 21,
        ELOOP: 62,
        EMFILE: 24,
        EMLINK: 31,
        EMSGSIZE: 40,
        EMULTIHOP: 95,
        ENAMETOOLONG: 63,
        ENETDOWN: 50,
        ENETRESET: 52,
        ENETUNREACH: 51,
        ENFILE: 23,
        ENOBUFS: 55,
        ENODATA: 96,
        ENODEV: 19,
        ENOENT: 2,
        ENOEXEC: 8,
        ENOLCK: 77,
        ENOLINK: 97,
        ENOMEM: 12,
        ENOMSG: 91,
        ENOPROTOOPT: 42,
        ENOSPC: 28,
        ENOSR: 98,
        ENOSTR: 99,
        ENOSYS: 78,
        ENOTCONN: 57,
        ENOTDIR: 20,
        ENOTEMPTY: 66,
        ENOTSOCK: 38,
        ENOTSUP: 45,
        ENOTTY: 25,
        ENXIO: 6,
        EOPNOTSUPP: 102,
        EOVERFLOW: 84,
        EPERM: 1,
        EPIPE: 32,
        EPROTO: 100,
        EPROTONOSUPPORT: 43,
        EPROTOTYPE: 41,
        ERANGE: 34,
        EROFS: 30,
        ESPIPE: 29,
        ESRCH: 3,
        ESTALE: 70,
        ETIME: 101,
        ETIMEDOUT: 60,
        ETXTBSY: 26,
        EWOULDBLOCK: 35,
        EXDEV: 18
    },
    signals: {
        SIGHUP: 1,
        SIGINT: 2,
        SIGQUIT: 3,
        SIGILL: 4,
        SIGTRAP: 5,
        SIGABRT: 6,
        SIGIOT: 6,
        SIGBUS: 10,
        SIGFPE: 8,
        SIGKILL: 9,
        SIGUSR1: 30,
        SIGSEGV: 11,
        SIGUSR2: 31,
        SIGPIPE: 13,
        SIGALRM: 14,
        SIGTERM: 15,
        SIGCHLD: 20,
        SIGCONT: 19,
        SIGSTOP: 17,
        SIGTSTP: 18,
        SIGTTIN: 21,
        SIGBREAK: 21,
        SIGTTOU: 22,
        SIGURG: 16,
        SIGXCPU: 24,
        SIGXFSZ: 25,
        SIGVTALRM: 26,
        SIGPROF: 27,
        SIGWINCH: 28,
        SIGIO: 23,
        SIGINFO: 29,
        SIGSYS: 12,
        SIGEMT: 7,
        SIGPWR: 30,
        SIGSTKFLT: 16
    },
    priority: {
        PRIORITY_LOW: 19,
        PRIORITY_BELOW_NORMAL: 10,
        PRIORITY_NORMAL: 0,
        PRIORITY_ABOVE_NORMAL: -7,
        PRIORITY_HIGH: -14,
        PRIORITY_HIGHEST: -20
    }
};
os.errno.EEXIST;
os.errno.ENOENT;
const codeToErrorWindows = [
    [
        -4093,
        [
            "E2BIG",
            "argument list too long"
        ]
    ],
    [
        -4092,
        [
            "EACCES",
            "permission denied"
        ]
    ],
    [
        -4091,
        [
            "EADDRINUSE",
            "address already in use"
        ]
    ],
    [
        -4090,
        [
            "EADDRNOTAVAIL",
            "address not available"
        ]
    ],
    [
        -4089,
        [
            "EAFNOSUPPORT",
            "address family not supported"
        ]
    ],
    [
        -4088,
        [
            "EAGAIN",
            "resource temporarily unavailable"
        ]
    ],
    [
        -3000,
        [
            "EAI_ADDRFAMILY",
            "address family not supported"
        ]
    ],
    [
        -3001,
        [
            "EAI_AGAIN",
            "temporary failure"
        ]
    ],
    [
        -3002,
        [
            "EAI_BADFLAGS",
            "bad ai_flags value"
        ]
    ],
    [
        -3013,
        [
            "EAI_BADHINTS",
            "invalid value for hints"
        ]
    ],
    [
        -3003,
        [
            "EAI_CANCELED",
            "request canceled"
        ]
    ],
    [
        -3004,
        [
            "EAI_FAIL",
            "permanent failure"
        ]
    ],
    [
        -3005,
        [
            "EAI_FAMILY",
            "ai_family not supported"
        ]
    ],
    [
        -3006,
        [
            "EAI_MEMORY",
            "out of memory"
        ]
    ],
    [
        -3007,
        [
            "EAI_NODATA",
            "no address"
        ]
    ],
    [
        -3008,
        [
            "EAI_NONAME",
            "unknown node or service"
        ]
    ],
    [
        -3009,
        [
            "EAI_OVERFLOW",
            "argument buffer overflow"
        ]
    ],
    [
        -3014,
        [
            "EAI_PROTOCOL",
            "resolved protocol is unknown"
        ]
    ],
    [
        -3010,
        [
            "EAI_SERVICE",
            "service not available for socket type"
        ]
    ],
    [
        -3011,
        [
            "EAI_SOCKTYPE",
            "socket type not supported"
        ]
    ],
    [
        -4084,
        [
            "EALREADY",
            "connection already in progress"
        ]
    ],
    [
        -4083,
        [
            "EBADF",
            "bad file descriptor"
        ]
    ],
    [
        -4082,
        [
            "EBUSY",
            "resource busy or locked"
        ]
    ],
    [
        -4081,
        [
            "ECANCELED",
            "operation canceled"
        ]
    ],
    [
        -4080,
        [
            "ECHARSET",
            "invalid Unicode character"
        ]
    ],
    [
        -4079,
        [
            "ECONNABORTED",
            "software caused connection abort"
        ]
    ],
    [
        -4078,
        [
            "ECONNREFUSED",
            "connection refused"
        ]
    ],
    [
        -4077,
        [
            "ECONNRESET",
            "connection reset by peer"
        ]
    ],
    [
        -4076,
        [
            "EDESTADDRREQ",
            "destination address required"
        ]
    ],
    [
        -4075,
        [
            "EEXIST",
            "file already exists"
        ]
    ],
    [
        -4074,
        [
            "EFAULT",
            "bad address in system call argument"
        ]
    ],
    [
        -4036,
        [
            "EFBIG",
            "file too large"
        ]
    ],
    [
        -4073,
        [
            "EHOSTUNREACH",
            "host is unreachable"
        ]
    ],
    [
        -4072,
        [
            "EINTR",
            "interrupted system call"
        ]
    ],
    [
        -4071,
        [
            "EINVAL",
            "invalid argument"
        ]
    ],
    [
        -4070,
        [
            "EIO",
            "i/o error"
        ]
    ],
    [
        -4069,
        [
            "EISCONN",
            "socket is already connected"
        ]
    ],
    [
        -4068,
        [
            "EISDIR",
            "illegal operation on a directory"
        ]
    ],
    [
        -4067,
        [
            "ELOOP",
            "too many symbolic links encountered"
        ]
    ],
    [
        -4066,
        [
            "EMFILE",
            "too many open files"
        ]
    ],
    [
        -4065,
        [
            "EMSGSIZE",
            "message too long"
        ]
    ],
    [
        -4064,
        [
            "ENAMETOOLONG",
            "name too long"
        ]
    ],
    [
        -4063,
        [
            "ENETDOWN",
            "network is down"
        ]
    ],
    [
        -4062,
        [
            "ENETUNREACH",
            "network is unreachable"
        ]
    ],
    [
        -4061,
        [
            "ENFILE",
            "file table overflow"
        ]
    ],
    [
        -4060,
        [
            "ENOBUFS",
            "no buffer space available"
        ]
    ],
    [
        -4059,
        [
            "ENODEV",
            "no such device"
        ]
    ],
    [
        -4058,
        [
            "ENOENT",
            "no such file or directory"
        ]
    ],
    [
        -4057,
        [
            "ENOMEM",
            "not enough memory"
        ]
    ],
    [
        -4056,
        [
            "ENONET",
            "machine is not on the network"
        ]
    ],
    [
        -4035,
        [
            "ENOPROTOOPT",
            "protocol not available"
        ]
    ],
    [
        -4055,
        [
            "ENOSPC",
            "no space left on device"
        ]
    ],
    [
        -4054,
        [
            "ENOSYS",
            "function not implemented"
        ]
    ],
    [
        -4053,
        [
            "ENOTCONN",
            "socket is not connected"
        ]
    ],
    [
        -4052,
        [
            "ENOTDIR",
            "not a directory"
        ]
    ],
    [
        -4051,
        [
            "ENOTEMPTY",
            "directory not empty"
        ]
    ],
    [
        -4050,
        [
            "ENOTSOCK",
            "socket operation on non-socket"
        ]
    ],
    [
        -4049,
        [
            "ENOTSUP",
            "operation not supported on socket"
        ]
    ],
    [
        -4048,
        [
            "EPERM",
            "operation not permitted"
        ]
    ],
    [
        -4047,
        [
            "EPIPE",
            "broken pipe"
        ]
    ],
    [
        -4046,
        [
            "EPROTO",
            "protocol error"
        ]
    ],
    [
        -4045,
        [
            "EPROTONOSUPPORT",
            "protocol not supported"
        ]
    ],
    [
        -4044,
        [
            "EPROTOTYPE",
            "protocol wrong type for socket"
        ]
    ],
    [
        -4034,
        [
            "ERANGE",
            "result too large"
        ]
    ],
    [
        -4043,
        [
            "EROFS",
            "read-only file system"
        ]
    ],
    [
        -4042,
        [
            "ESHUTDOWN",
            "cannot send after transport endpoint shutdown"
        ]
    ],
    [
        -4041,
        [
            "ESPIPE",
            "invalid seek"
        ]
    ],
    [
        -4040,
        [
            "ESRCH",
            "no such process"
        ]
    ],
    [
        -4039,
        [
            "ETIMEDOUT",
            "connection timed out"
        ]
    ],
    [
        -4038,
        [
            "ETXTBSY",
            "text file is busy"
        ]
    ],
    [
        -4037,
        [
            "EXDEV",
            "cross-device link not permitted"
        ]
    ],
    [
        -4094,
        [
            "UNKNOWN",
            "unknown error"
        ]
    ],
    [
        -4095,
        [
            "EOF",
            "end of file"
        ]
    ],
    [
        -4033,
        [
            "ENXIO",
            "no such device or address"
        ]
    ],
    [
        -4032,
        [
            "EMLINK",
            "too many links"
        ]
    ],
    [
        -4031,
        [
            "EHOSTDOWN",
            "host is down"
        ]
    ],
    [
        -4030,
        [
            "EREMOTEIO",
            "remote I/O error"
        ]
    ],
    [
        -4029,
        [
            "ENOTTY",
            "inappropriate ioctl for device"
        ]
    ],
    [
        -4028,
        [
            "EFTYPE",
            "inappropriate file type or format"
        ]
    ],
    [
        -4027,
        [
            "EILSEQ",
            "illegal byte sequence"
        ]
    ], 
];
const errorToCodeWindows = codeToErrorWindows.map(([status, [error]])=>[
        error,
        status
    ]);
const codeToErrorDarwin = [
    [
        -7,
        [
            "E2BIG",
            "argument list too long"
        ]
    ],
    [
        -13,
        [
            "EACCES",
            "permission denied"
        ]
    ],
    [
        -48,
        [
            "EADDRINUSE",
            "address already in use"
        ]
    ],
    [
        -49,
        [
            "EADDRNOTAVAIL",
            "address not available"
        ]
    ],
    [
        -47,
        [
            "EAFNOSUPPORT",
            "address family not supported"
        ]
    ],
    [
        -35,
        [
            "EAGAIN",
            "resource temporarily unavailable"
        ]
    ],
    [
        -3000,
        [
            "EAI_ADDRFAMILY",
            "address family not supported"
        ]
    ],
    [
        -3001,
        [
            "EAI_AGAIN",
            "temporary failure"
        ]
    ],
    [
        -3002,
        [
            "EAI_BADFLAGS",
            "bad ai_flags value"
        ]
    ],
    [
        -3013,
        [
            "EAI_BADHINTS",
            "invalid value for hints"
        ]
    ],
    [
        -3003,
        [
            "EAI_CANCELED",
            "request canceled"
        ]
    ],
    [
        -3004,
        [
            "EAI_FAIL",
            "permanent failure"
        ]
    ],
    [
        -3005,
        [
            "EAI_FAMILY",
            "ai_family not supported"
        ]
    ],
    [
        -3006,
        [
            "EAI_MEMORY",
            "out of memory"
        ]
    ],
    [
        -3007,
        [
            "EAI_NODATA",
            "no address"
        ]
    ],
    [
        -3008,
        [
            "EAI_NONAME",
            "unknown node or service"
        ]
    ],
    [
        -3009,
        [
            "EAI_OVERFLOW",
            "argument buffer overflow"
        ]
    ],
    [
        -3014,
        [
            "EAI_PROTOCOL",
            "resolved protocol is unknown"
        ]
    ],
    [
        -3010,
        [
            "EAI_SERVICE",
            "service not available for socket type"
        ]
    ],
    [
        -3011,
        [
            "EAI_SOCKTYPE",
            "socket type not supported"
        ]
    ],
    [
        -37,
        [
            "EALREADY",
            "connection already in progress"
        ]
    ],
    [
        -9,
        [
            "EBADF",
            "bad file descriptor"
        ]
    ],
    [
        -16,
        [
            "EBUSY",
            "resource busy or locked"
        ]
    ],
    [
        -89,
        [
            "ECANCELED",
            "operation canceled"
        ]
    ],
    [
        -4080,
        [
            "ECHARSET",
            "invalid Unicode character"
        ]
    ],
    [
        -53,
        [
            "ECONNABORTED",
            "software caused connection abort"
        ]
    ],
    [
        -61,
        [
            "ECONNREFUSED",
            "connection refused"
        ]
    ],
    [
        -54,
        [
            "ECONNRESET",
            "connection reset by peer"
        ]
    ],
    [
        -39,
        [
            "EDESTADDRREQ",
            "destination address required"
        ]
    ],
    [
        -17,
        [
            "EEXIST",
            "file already exists"
        ]
    ],
    [
        -14,
        [
            "EFAULT",
            "bad address in system call argument"
        ]
    ],
    [
        -27,
        [
            "EFBIG",
            "file too large"
        ]
    ],
    [
        -65,
        [
            "EHOSTUNREACH",
            "host is unreachable"
        ]
    ],
    [
        -4,
        [
            "EINTR",
            "interrupted system call"
        ]
    ],
    [
        -22,
        [
            "EINVAL",
            "invalid argument"
        ]
    ],
    [
        -5,
        [
            "EIO",
            "i/o error"
        ]
    ],
    [
        -56,
        [
            "EISCONN",
            "socket is already connected"
        ]
    ],
    [
        -21,
        [
            "EISDIR",
            "illegal operation on a directory"
        ]
    ],
    [
        -62,
        [
            "ELOOP",
            "too many symbolic links encountered"
        ]
    ],
    [
        -24,
        [
            "EMFILE",
            "too many open files"
        ]
    ],
    [
        -40,
        [
            "EMSGSIZE",
            "message too long"
        ]
    ],
    [
        -63,
        [
            "ENAMETOOLONG",
            "name too long"
        ]
    ],
    [
        -50,
        [
            "ENETDOWN",
            "network is down"
        ]
    ],
    [
        -51,
        [
            "ENETUNREACH",
            "network is unreachable"
        ]
    ],
    [
        -23,
        [
            "ENFILE",
            "file table overflow"
        ]
    ],
    [
        -55,
        [
            "ENOBUFS",
            "no buffer space available"
        ]
    ],
    [
        -19,
        [
            "ENODEV",
            "no such device"
        ]
    ],
    [
        -2,
        [
            "ENOENT",
            "no such file or directory"
        ]
    ],
    [
        -12,
        [
            "ENOMEM",
            "not enough memory"
        ]
    ],
    [
        -4056,
        [
            "ENONET",
            "machine is not on the network"
        ]
    ],
    [
        -42,
        [
            "ENOPROTOOPT",
            "protocol not available"
        ]
    ],
    [
        -28,
        [
            "ENOSPC",
            "no space left on device"
        ]
    ],
    [
        -78,
        [
            "ENOSYS",
            "function not implemented"
        ]
    ],
    [
        -57,
        [
            "ENOTCONN",
            "socket is not connected"
        ]
    ],
    [
        -20,
        [
            "ENOTDIR",
            "not a directory"
        ]
    ],
    [
        -66,
        [
            "ENOTEMPTY",
            "directory not empty"
        ]
    ],
    [
        -38,
        [
            "ENOTSOCK",
            "socket operation on non-socket"
        ]
    ],
    [
        -45,
        [
            "ENOTSUP",
            "operation not supported on socket"
        ]
    ],
    [
        -1,
        [
            "EPERM",
            "operation not permitted"
        ]
    ],
    [
        -32,
        [
            "EPIPE",
            "broken pipe"
        ]
    ],
    [
        -100,
        [
            "EPROTO",
            "protocol error"
        ]
    ],
    [
        -43,
        [
            "EPROTONOSUPPORT",
            "protocol not supported"
        ]
    ],
    [
        -41,
        [
            "EPROTOTYPE",
            "protocol wrong type for socket"
        ]
    ],
    [
        -34,
        [
            "ERANGE",
            "result too large"
        ]
    ],
    [
        -30,
        [
            "EROFS",
            "read-only file system"
        ]
    ],
    [
        -58,
        [
            "ESHUTDOWN",
            "cannot send after transport endpoint shutdown"
        ]
    ],
    [
        -29,
        [
            "ESPIPE",
            "invalid seek"
        ]
    ],
    [
        -3,
        [
            "ESRCH",
            "no such process"
        ]
    ],
    [
        -60,
        [
            "ETIMEDOUT",
            "connection timed out"
        ]
    ],
    [
        -26,
        [
            "ETXTBSY",
            "text file is busy"
        ]
    ],
    [
        -18,
        [
            "EXDEV",
            "cross-device link not permitted"
        ]
    ],
    [
        -4094,
        [
            "UNKNOWN",
            "unknown error"
        ]
    ],
    [
        -4095,
        [
            "EOF",
            "end of file"
        ]
    ],
    [
        -6,
        [
            "ENXIO",
            "no such device or address"
        ]
    ],
    [
        -31,
        [
            "EMLINK",
            "too many links"
        ]
    ],
    [
        -64,
        [
            "EHOSTDOWN",
            "host is down"
        ]
    ],
    [
        -4030,
        [
            "EREMOTEIO",
            "remote I/O error"
        ]
    ],
    [
        -25,
        [
            "ENOTTY",
            "inappropriate ioctl for device"
        ]
    ],
    [
        -79,
        [
            "EFTYPE",
            "inappropriate file type or format"
        ]
    ],
    [
        -92,
        [
            "EILSEQ",
            "illegal byte sequence"
        ]
    ], 
];
const errorToCodeDarwin = codeToErrorDarwin.map(([status, [code]])=>[
        code,
        status
    ]);
const codeToErrorLinux = [
    [
        -7,
        [
            "E2BIG",
            "argument list too long"
        ]
    ],
    [
        -13,
        [
            "EACCES",
            "permission denied"
        ]
    ],
    [
        -98,
        [
            "EADDRINUSE",
            "address already in use"
        ]
    ],
    [
        -99,
        [
            "EADDRNOTAVAIL",
            "address not available"
        ]
    ],
    [
        -97,
        [
            "EAFNOSUPPORT",
            "address family not supported"
        ]
    ],
    [
        -11,
        [
            "EAGAIN",
            "resource temporarily unavailable"
        ]
    ],
    [
        -3000,
        [
            "EAI_ADDRFAMILY",
            "address family not supported"
        ]
    ],
    [
        -3001,
        [
            "EAI_AGAIN",
            "temporary failure"
        ]
    ],
    [
        -3002,
        [
            "EAI_BADFLAGS",
            "bad ai_flags value"
        ]
    ],
    [
        -3013,
        [
            "EAI_BADHINTS",
            "invalid value for hints"
        ]
    ],
    [
        -3003,
        [
            "EAI_CANCELED",
            "request canceled"
        ]
    ],
    [
        -3004,
        [
            "EAI_FAIL",
            "permanent failure"
        ]
    ],
    [
        -3005,
        [
            "EAI_FAMILY",
            "ai_family not supported"
        ]
    ],
    [
        -3006,
        [
            "EAI_MEMORY",
            "out of memory"
        ]
    ],
    [
        -3007,
        [
            "EAI_NODATA",
            "no address"
        ]
    ],
    [
        -3008,
        [
            "EAI_NONAME",
            "unknown node or service"
        ]
    ],
    [
        -3009,
        [
            "EAI_OVERFLOW",
            "argument buffer overflow"
        ]
    ],
    [
        -3014,
        [
            "EAI_PROTOCOL",
            "resolved protocol is unknown"
        ]
    ],
    [
        -3010,
        [
            "EAI_SERVICE",
            "service not available for socket type"
        ]
    ],
    [
        -3011,
        [
            "EAI_SOCKTYPE",
            "socket type not supported"
        ]
    ],
    [
        -114,
        [
            "EALREADY",
            "connection already in progress"
        ]
    ],
    [
        -9,
        [
            "EBADF",
            "bad file descriptor"
        ]
    ],
    [
        -16,
        [
            "EBUSY",
            "resource busy or locked"
        ]
    ],
    [
        -125,
        [
            "ECANCELED",
            "operation canceled"
        ]
    ],
    [
        -4080,
        [
            "ECHARSET",
            "invalid Unicode character"
        ]
    ],
    [
        -103,
        [
            "ECONNABORTED",
            "software caused connection abort"
        ]
    ],
    [
        -111,
        [
            "ECONNREFUSED",
            "connection refused"
        ]
    ],
    [
        -104,
        [
            "ECONNRESET",
            "connection reset by peer"
        ]
    ],
    [
        -89,
        [
            "EDESTADDRREQ",
            "destination address required"
        ]
    ],
    [
        -17,
        [
            "EEXIST",
            "file already exists"
        ]
    ],
    [
        -14,
        [
            "EFAULT",
            "bad address in system call argument"
        ]
    ],
    [
        -27,
        [
            "EFBIG",
            "file too large"
        ]
    ],
    [
        -113,
        [
            "EHOSTUNREACH",
            "host is unreachable"
        ]
    ],
    [
        -4,
        [
            "EINTR",
            "interrupted system call"
        ]
    ],
    [
        -22,
        [
            "EINVAL",
            "invalid argument"
        ]
    ],
    [
        -5,
        [
            "EIO",
            "i/o error"
        ]
    ],
    [
        -106,
        [
            "EISCONN",
            "socket is already connected"
        ]
    ],
    [
        -21,
        [
            "EISDIR",
            "illegal operation on a directory"
        ]
    ],
    [
        -40,
        [
            "ELOOP",
            "too many symbolic links encountered"
        ]
    ],
    [
        -24,
        [
            "EMFILE",
            "too many open files"
        ]
    ],
    [
        -90,
        [
            "EMSGSIZE",
            "message too long"
        ]
    ],
    [
        -36,
        [
            "ENAMETOOLONG",
            "name too long"
        ]
    ],
    [
        -100,
        [
            "ENETDOWN",
            "network is down"
        ]
    ],
    [
        -101,
        [
            "ENETUNREACH",
            "network is unreachable"
        ]
    ],
    [
        -23,
        [
            "ENFILE",
            "file table overflow"
        ]
    ],
    [
        -105,
        [
            "ENOBUFS",
            "no buffer space available"
        ]
    ],
    [
        -19,
        [
            "ENODEV",
            "no such device"
        ]
    ],
    [
        -2,
        [
            "ENOENT",
            "no such file or directory"
        ]
    ],
    [
        -12,
        [
            "ENOMEM",
            "not enough memory"
        ]
    ],
    [
        -64,
        [
            "ENONET",
            "machine is not on the network"
        ]
    ],
    [
        -92,
        [
            "ENOPROTOOPT",
            "protocol not available"
        ]
    ],
    [
        -28,
        [
            "ENOSPC",
            "no space left on device"
        ]
    ],
    [
        -38,
        [
            "ENOSYS",
            "function not implemented"
        ]
    ],
    [
        -107,
        [
            "ENOTCONN",
            "socket is not connected"
        ]
    ],
    [
        -20,
        [
            "ENOTDIR",
            "not a directory"
        ]
    ],
    [
        -39,
        [
            "ENOTEMPTY",
            "directory not empty"
        ]
    ],
    [
        -88,
        [
            "ENOTSOCK",
            "socket operation on non-socket"
        ]
    ],
    [
        -95,
        [
            "ENOTSUP",
            "operation not supported on socket"
        ]
    ],
    [
        -1,
        [
            "EPERM",
            "operation not permitted"
        ]
    ],
    [
        -32,
        [
            "EPIPE",
            "broken pipe"
        ]
    ],
    [
        -71,
        [
            "EPROTO",
            "protocol error"
        ]
    ],
    [
        -93,
        [
            "EPROTONOSUPPORT",
            "protocol not supported"
        ]
    ],
    [
        -91,
        [
            "EPROTOTYPE",
            "protocol wrong type for socket"
        ]
    ],
    [
        -34,
        [
            "ERANGE",
            "result too large"
        ]
    ],
    [
        -30,
        [
            "EROFS",
            "read-only file system"
        ]
    ],
    [
        -108,
        [
            "ESHUTDOWN",
            "cannot send after transport endpoint shutdown"
        ]
    ],
    [
        -29,
        [
            "ESPIPE",
            "invalid seek"
        ]
    ],
    [
        -3,
        [
            "ESRCH",
            "no such process"
        ]
    ],
    [
        -110,
        [
            "ETIMEDOUT",
            "connection timed out"
        ]
    ],
    [
        -26,
        [
            "ETXTBSY",
            "text file is busy"
        ]
    ],
    [
        -18,
        [
            "EXDEV",
            "cross-device link not permitted"
        ]
    ],
    [
        -4094,
        [
            "UNKNOWN",
            "unknown error"
        ]
    ],
    [
        -4095,
        [
            "EOF",
            "end of file"
        ]
    ],
    [
        -6,
        [
            "ENXIO",
            "no such device or address"
        ]
    ],
    [
        -31,
        [
            "EMLINK",
            "too many links"
        ]
    ],
    [
        -112,
        [
            "EHOSTDOWN",
            "host is down"
        ]
    ],
    [
        -121,
        [
            "EREMOTEIO",
            "remote I/O error"
        ]
    ],
    [
        -25,
        [
            "ENOTTY",
            "inappropriate ioctl for device"
        ]
    ],
    [
        -4028,
        [
            "EFTYPE",
            "inappropriate file type or format"
        ]
    ],
    [
        -84,
        [
            "EILSEQ",
            "illegal byte sequence"
        ]
    ], 
];
const errorToCodeLinux = codeToErrorLinux.map(([status, [code]])=>[
        code,
        status
    ]);
const errorMap = new Map(osType === "windows" ? codeToErrorWindows : osType === "darwin" ? codeToErrorDarwin : osType === "linux" ? codeToErrorLinux : unreachable());
const codeMap = new Map(osType === "windows" ? errorToCodeWindows : osType === "darwin" ? errorToCodeDarwin : osType === "linux" ? errorToCodeLinux : unreachable());
codeMap.get("EAI_MEMORY");
codeMap.get("UNKNOWN");
codeMap.get("EBADF");
codeMap.get("EINVAL");
codeMap.get("ENOTSOCK");
({
    ...mod4
});
var Encodings;
(function(Encodings) {
    Encodings[Encodings["ASCII"] = 0] = "ASCII";
    Encodings[Encodings["UTF8"] = 1] = "UTF8";
    Encodings[Encodings["BASE64"] = 2] = "BASE64";
    Encodings[Encodings["UCS2"] = 3] = "UCS2";
    Encodings[Encodings["BINARY"] = 4] = "BINARY";
    Encodings[Encodings["HEX"] = 5] = "HEX";
    Encodings[Encodings["BUFFER"] = 6] = "BUFFER";
    Encodings[Encodings["BASE64URL"] = 7] = "BASE64URL";
    Encodings[Encodings["LATIN1"] = 4] = "LATIN1";
})(Encodings || (Encodings = {}));
const encodings = [];
encodings[Encodings.ASCII] = "ascii";
encodings[Encodings.BASE64] = "base64";
encodings[Encodings.BASE64URL] = "base64url";
encodings[Encodings.BUFFER] = "buffer";
encodings[Encodings.HEX] = "hex";
encodings[Encodings.LATIN1] = "latin1";
encodings[Encodings.UCS2] = "utf16le";
encodings[Encodings.UTF8] = "utf8";
function numberToBytes(n) {
    if (n === 0) return new Uint8Array([
        0
    ]);
    const bytes = [];
    bytes.unshift(n & 255);
    while(n >= 256){
        n = n >>> 8;
        bytes.unshift(n & 255);
    }
    return new Uint8Array(bytes);
}
function findLastIndex(targetBuffer, buffer, offset) {
    offset = offset > targetBuffer.length ? targetBuffer.length : offset;
    const searchableBuffer = targetBuffer.slice(0, offset + buffer.length);
    const searchableBufferLastIndex = searchableBuffer.length - 1;
    const bufferLastIndex = buffer.length - 1;
    let lastMatchIndex = -1;
    let matches = 0;
    let index = -1;
    for(let x = 0; x <= searchableBufferLastIndex; x++){
        if (searchableBuffer[searchableBufferLastIndex - x] === buffer[bufferLastIndex - matches]) {
            if (lastMatchIndex === -1) {
                lastMatchIndex = x;
            }
            matches++;
        } else {
            matches = 0;
            if (lastMatchIndex !== -1) {
                x = lastMatchIndex + 1;
                lastMatchIndex = -1;
            }
            continue;
        }
        if (matches === buffer.length) {
            index = x;
            break;
        }
    }
    if (index === -1) return index;
    return searchableBufferLastIndex - index;
}
function indexOfBuffer(targetBuffer, buffer, byteOffset, encoding, forwardDirection) {
    if (!Encodings[encoding] === undefined) {
        throw new Error(`Unknown encoding code ${encoding}`);
    }
    if (!forwardDirection) {
        if (byteOffset < 0) {
            byteOffset = targetBuffer.length + byteOffset;
        }
        if (buffer.length === 0) {
            return byteOffset <= targetBuffer.length ? byteOffset : targetBuffer.length;
        }
        return findLastIndex(targetBuffer, buffer, byteOffset);
    }
    if (buffer.length === 0) {
        return byteOffset <= targetBuffer.length ? byteOffset : targetBuffer.length;
    }
    return indexOfNeedle(targetBuffer, buffer, byteOffset);
}
function indexOfNumber(targetBuffer, number, byteOffset, forwardDirection) {
    const bytes = numberToBytes(number);
    if (bytes.length > 1) {
        throw new Error("Multi byte number search is not supported");
    }
    return indexOfBuffer(targetBuffer, numberToBytes(number), byteOffset, Encodings.UTF8, forwardDirection);
}
function addPaddingToBase64url(base64url) {
    if (base64url.length % 4 === 2) return base64url + "==";
    if (base64url.length % 4 === 3) return base64url + "=";
    if (base64url.length % 4 === 1) {
        throw new TypeError("Illegal base64url string!");
    }
    return base64url;
}
function convertBase64urlToBase64(b64url) {
    if (!/^[-_A-Z0-9]*?={0,2}$/i.test(b64url)) {
        throw new TypeError("Failed to decode base64url: invalid character");
    }
    return addPaddingToBase64url(b64url).replace(/\-/g, "+").replace(/_/g, "/");
}
function convertBase64ToBase64url(b64) {
    return b64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
}
function encode1(data) {
    return convertBase64ToBase64url(encode(data));
}
function decode1(b64url) {
    return decode(convertBase64urlToBase64(b64url));
}
function asciiToBytes(str) {
    const byteArray = [];
    for(let i1 = 0; i1 < str.length; ++i1){
        byteArray.push(str.charCodeAt(i1) & 255);
    }
    return new Uint8Array(byteArray);
}
function base64ToBytes(str) {
    str = base64clean(str);
    str = str.replaceAll("-", "+").replaceAll("_", "/");
    return decode(str);
}
const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
function base64clean(str) {
    str = str.split("=")[0];
    str = str.trim().replace(INVALID_BASE64_RE, "");
    if (str.length < 2) return "";
    while(str.length % 4 !== 0){
        str = str + "=";
    }
    return str;
}
function base64UrlToBytes(str) {
    str = base64clean(str);
    str = str.replaceAll("+", "-").replaceAll("/", "_");
    return decode1(str);
}
function hexToBytes(str) {
    const byteArray = new Uint8Array(Math.floor((str || "").length / 2));
    let i1;
    for(i1 = 0; i1 < byteArray.length; i1++){
        const a = Number.parseInt(str[i1 * 2], 16);
        const b = Number.parseInt(str[i1 * 2 + 1], 16);
        if (Number.isNaN(a) && Number.isNaN(b)) {
            break;
        }
        byteArray[i1] = a << 4 | b;
    }
    return new Uint8Array(i1 === byteArray.length ? byteArray : byteArray.slice(0, i1));
}
function utf16leToBytes(str, units) {
    let c, hi, lo;
    const byteArray = [];
    for(let i1 = 0; i1 < str.length; ++i1){
        if ((units -= 2) < 0) {
            break;
        }
        c = str.charCodeAt(i1);
        hi = c >> 8;
        lo = c % 256;
        byteArray.push(lo);
        byteArray.push(hi);
    }
    return new Uint8Array(byteArray);
}
function bytesToAscii(bytes) {
    let ret = "";
    for(let i1 = 0; i1 < bytes.length; ++i1){
        ret += String.fromCharCode(bytes[i1] & 127);
    }
    return ret;
}
function bytesToUtf16le(bytes) {
    let res = "";
    for(let i1 = 0; i1 < bytes.length - 1; i1 += 2){
        res += String.fromCharCode(bytes[i1] + bytes[i1 + 1] * 256);
    }
    return res;
}
const utf8Encoder = new TextEncoder();
const float32Array = new Float32Array(1);
const uInt8Float32Array = new Uint8Array(float32Array.buffer);
const float64Array = new Float64Array(1);
const uInt8Float64Array = new Uint8Array(float64Array.buffer);
float32Array[0] = -1;
const bigEndian = uInt8Float32Array[3] === 0;
function readUInt48LE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 5];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 6);
    }
    return first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24 + (buf[++offset] + last * 2 ** 8) * 2 ** 32;
}
function readUInt40LE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 4];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 5);
    }
    return first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24 + last * 2 ** 32;
}
function readUInt24LE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 2];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 3);
    }
    return first + buf[++offset] * 2 ** 8 + last * 2 ** 16;
}
function readUInt48BE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 5];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 6);
    }
    return (first * 2 ** 8 + buf[++offset]) * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last;
}
function readUInt40BE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 4];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 5);
    }
    return first * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last;
}
function readUInt24BE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 2];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 3);
    }
    return first * 2 ** 16 + buf[++offset] * 2 ** 8 + last;
}
function readUInt16BE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 1];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 2);
    }
    return first * 2 ** 8 + last;
}
function readUInt32BE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 3];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 4);
    }
    return first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
}
function readDoubleBackwards(buffer, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buffer[offset];
    const last = buffer[offset + 7];
    if (first === undefined || last === undefined) {
        boundsError(offset, buffer.length - 8);
    }
    uInt8Float64Array[7] = first;
    uInt8Float64Array[6] = buffer[++offset];
    uInt8Float64Array[5] = buffer[++offset];
    uInt8Float64Array[4] = buffer[++offset];
    uInt8Float64Array[3] = buffer[++offset];
    uInt8Float64Array[2] = buffer[++offset];
    uInt8Float64Array[1] = buffer[++offset];
    uInt8Float64Array[0] = last;
    return float64Array[0];
}
function readDoubleForwards(buffer, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buffer[offset];
    const last = buffer[offset + 7];
    if (first === undefined || last === undefined) {
        boundsError(offset, buffer.length - 8);
    }
    uInt8Float64Array[0] = first;
    uInt8Float64Array[1] = buffer[++offset];
    uInt8Float64Array[2] = buffer[++offset];
    uInt8Float64Array[3] = buffer[++offset];
    uInt8Float64Array[4] = buffer[++offset];
    uInt8Float64Array[5] = buffer[++offset];
    uInt8Float64Array[6] = buffer[++offset];
    uInt8Float64Array[7] = last;
    return float64Array[0];
}
function writeDoubleForwards(buffer, val, offset = 0) {
    val = +val;
    checkBounds(buffer, offset, 7);
    float64Array[0] = val;
    buffer[offset++] = uInt8Float64Array[0];
    buffer[offset++] = uInt8Float64Array[1];
    buffer[offset++] = uInt8Float64Array[2];
    buffer[offset++] = uInt8Float64Array[3];
    buffer[offset++] = uInt8Float64Array[4];
    buffer[offset++] = uInt8Float64Array[5];
    buffer[offset++] = uInt8Float64Array[6];
    buffer[offset++] = uInt8Float64Array[7];
    return offset;
}
function writeDoubleBackwards(buffer, val, offset = 0) {
    val = +val;
    checkBounds(buffer, offset, 7);
    float64Array[0] = val;
    buffer[offset++] = uInt8Float64Array[7];
    buffer[offset++] = uInt8Float64Array[6];
    buffer[offset++] = uInt8Float64Array[5];
    buffer[offset++] = uInt8Float64Array[4];
    buffer[offset++] = uInt8Float64Array[3];
    buffer[offset++] = uInt8Float64Array[2];
    buffer[offset++] = uInt8Float64Array[1];
    buffer[offset++] = uInt8Float64Array[0];
    return offset;
}
function readFloatBackwards(buffer, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buffer[offset];
    const last = buffer[offset + 3];
    if (first === undefined || last === undefined) {
        boundsError(offset, buffer.length - 4);
    }
    uInt8Float32Array[3] = first;
    uInt8Float32Array[2] = buffer[++offset];
    uInt8Float32Array[1] = buffer[++offset];
    uInt8Float32Array[0] = last;
    return float32Array[0];
}
function readFloatForwards(buffer, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buffer[offset];
    const last = buffer[offset + 3];
    if (first === undefined || last === undefined) {
        boundsError(offset, buffer.length - 4);
    }
    uInt8Float32Array[0] = first;
    uInt8Float32Array[1] = buffer[++offset];
    uInt8Float32Array[2] = buffer[++offset];
    uInt8Float32Array[3] = last;
    return float32Array[0];
}
function writeFloatForwards(buffer, val, offset = 0) {
    val = +val;
    checkBounds(buffer, offset, 3);
    float32Array[0] = val;
    buffer[offset++] = uInt8Float32Array[0];
    buffer[offset++] = uInt8Float32Array[1];
    buffer[offset++] = uInt8Float32Array[2];
    buffer[offset++] = uInt8Float32Array[3];
    return offset;
}
function writeFloatBackwards(buffer, val, offset = 0) {
    val = +val;
    checkBounds(buffer, offset, 3);
    float32Array[0] = val;
    buffer[offset++] = uInt8Float32Array[3];
    buffer[offset++] = uInt8Float32Array[2];
    buffer[offset++] = uInt8Float32Array[1];
    buffer[offset++] = uInt8Float32Array[0];
    return offset;
}
function readInt24LE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 2];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 3);
    }
    const val = first + buf[++offset] * 2 ** 8 + last * 2 ** 16;
    return val | (val & 2 ** 23) * 0x1fe;
}
function readInt40LE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 4];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 5);
    }
    return (last | (last & 2 ** 7) * 0x1fffffe) * 2 ** 32 + first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24;
}
function readInt48LE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 5];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 6);
    }
    const val = buf[offset + 4] + last * 2 ** 8;
    return (val | (val & 2 ** 15) * 0x1fffe) * 2 ** 32 + first + buf[++offset] * 2 ** 8 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 24;
}
function readInt24BE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 2];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 3);
    }
    const val = first * 2 ** 16 + buf[++offset] * 2 ** 8 + last;
    return val | (val & 2 ** 23) * 0x1fe;
}
function readInt48BE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 5];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 6);
    }
    const val = buf[++offset] + first * 2 ** 8;
    return (val | (val & 2 ** 15) * 0x1fffe) * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last;
}
function readInt40BE(buf, offset = 0) {
    validateNumber1(offset, "offset");
    const first = buf[offset];
    const last = buf[offset + 4];
    if (first === undefined || last === undefined) {
        boundsError(offset, buf.length - 5);
    }
    return (first | (first & 2 ** 7) * 0x1fffffe) * 2 ** 32 + buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last;
}
function byteLengthUtf8(str) {
    return utf8Encoder.encode(str).length;
}
function base64ByteLength(str, bytes) {
    if (str.charCodeAt(bytes - 1) === 0x3D) {
        bytes--;
    }
    if (bytes > 1 && str.charCodeAt(bytes - 1) === 0x3D) {
        bytes--;
    }
    return bytes * 3 >>> 2;
}
const encodingsMap = Object.create(null);
for(let i5 = 0; i5 < encodings.length; ++i5){
    encodingsMap[encodings[i5]] = i5;
}
const encodingOps = {
    ascii: {
        byteLength: (string)=>string.length,
        encoding: "ascii",
        encodingVal: encodingsMap.ascii,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, asciiToBytes(val), byteOffset, encodingsMap.ascii, dir),
        slice: (buf, start, end)=>buf.asciiSlice(start, end),
        write: (buf, string, offset, len)=>buf.asciiWrite(string, offset, len)
    },
    base64: {
        byteLength: (string)=>base64ByteLength(string, string.length),
        encoding: "base64",
        encodingVal: encodingsMap.base64,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, base64ToBytes(val), byteOffset, encodingsMap.base64, dir),
        slice: (buf, start, end)=>buf.base64Slice(start, end),
        write: (buf, string, offset, len)=>buf.base64Write(string, offset, len)
    },
    base64url: {
        byteLength: (string)=>base64ByteLength(string, string.length),
        encoding: "base64url",
        encodingVal: encodingsMap.base64url,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, base64UrlToBytes(val), byteOffset, encodingsMap.base64url, dir),
        slice: (buf, start, end)=>buf.base64urlSlice(start, end),
        write: (buf, string, offset, len)=>buf.base64urlWrite(string, offset, len)
    },
    hex: {
        byteLength: (string)=>string.length >>> 1,
        encoding: "hex",
        encodingVal: encodingsMap.hex,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, hexToBytes(val), byteOffset, encodingsMap.hex, dir),
        slice: (buf, start, end)=>buf.hexSlice(start, end),
        write: (buf, string, offset, len)=>buf.hexWrite(string, offset, len)
    },
    latin1: {
        byteLength: (string)=>string.length,
        encoding: "latin1",
        encodingVal: encodingsMap.latin1,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, asciiToBytes(val), byteOffset, encodingsMap.latin1, dir),
        slice: (buf, start, end)=>buf.latin1Slice(start, end),
        write: (buf, string, offset, len)=>buf.latin1Write(string, offset, len)
    },
    ucs2: {
        byteLength: (string)=>string.length * 2,
        encoding: "ucs2",
        encodingVal: encodingsMap.utf16le,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, utf16leToBytes(val), byteOffset, encodingsMap.utf16le, dir),
        slice: (buf, start, end)=>buf.ucs2Slice(start, end),
        write: (buf, string, offset, len)=>buf.ucs2Write(string, offset, len)
    },
    utf8: {
        byteLength: byteLengthUtf8,
        encoding: "utf8",
        encodingVal: encodingsMap.utf8,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, utf8Encoder.encode(val), byteOffset, encodingsMap.utf8, dir),
        slice: (buf, start, end)=>buf.utf8Slice(start, end),
        write: (buf, string, offset, len)=>buf.utf8Write(string, offset, len)
    },
    utf16le: {
        byteLength: (string)=>string.length * 2,
        encoding: "utf16le",
        encodingVal: encodingsMap.utf16le,
        indexOf: (buf, val, byteOffset, dir)=>indexOfBuffer(buf, utf16leToBytes(val), byteOffset, encodingsMap.utf16le, dir),
        slice: (buf, start, end)=>buf.ucs2Slice(start, end),
        write: (buf, string, offset, len)=>buf.ucs2Write(string, offset, len)
    }
};
function getEncodingOps(encoding) {
    encoding = String(encoding).toLowerCase();
    switch(encoding.length){
        case 4:
            if (encoding === "utf8") return encodingOps.utf8;
            if (encoding === "ucs2") return encodingOps.ucs2;
            break;
        case 5:
            if (encoding === "utf-8") return encodingOps.utf8;
            if (encoding === "ascii") return encodingOps.ascii;
            if (encoding === "ucs-2") return encodingOps.ucs2;
            break;
        case 7:
            if (encoding === "utf16le") {
                return encodingOps.utf16le;
            }
            break;
        case 8:
            if (encoding === "utf-16le") {
                return encodingOps.utf16le;
            }
            break;
        case 6:
            if (encoding === "latin1" || encoding === "binary") {
                return encodingOps.latin1;
            }
            if (encoding === "base64") return encodingOps.base64;
        case 3:
            if (encoding === "hex") {
                return encodingOps.hex;
            }
            break;
        case 9:
            if (encoding === "base64url") {
                return encodingOps.base64url;
            }
            break;
    }
}
function _copyActual(source, target, targetStart, sourceStart, sourceEnd) {
    if (sourceEnd - sourceStart > target.length - targetStart) {
        sourceEnd = sourceStart + target.length - targetStart;
    }
    let nb = sourceEnd - sourceStart;
    const sourceLen = source.length - sourceStart;
    if (nb > sourceLen) {
        nb = sourceLen;
    }
    if (sourceStart !== 0 || sourceEnd < source.length) {
        source = new Uint8Array(source.buffer, source.byteOffset + sourceStart, nb);
    }
    target.set(source, targetStart);
    return nb;
}
function boundsError(value, length, type) {
    if (Math.floor(value) !== value) {
        validateNumber1(value, type);
        throw new codes.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
    }
    if (length < 0) {
        throw new codes.ERR_BUFFER_OUT_OF_BOUNDS();
    }
    throw new codes.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
}
function validateNumber1(value, name) {
    if (typeof value !== "number") {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value);
    }
}
function checkBounds(buf, offset, byteLength) {
    validateNumber1(offset, "offset");
    if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
        boundsError(offset, buf.length - (byteLength + 1));
    }
}
function checkInt(value, min, max, buf, offset, byteLength) {
    if (value > max || value < min) {
        const n = typeof min === "bigint" ? "n" : "";
        let range;
        if (byteLength > 3) {
            if (min === 0 || min === 0n) {
                range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;
            } else {
                range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and ` + `< 2${n} ** ${(byteLength + 1) * 8 - 1}${n}`;
            }
        } else {
            range = `>= ${min}${n} and <= ${max}${n}`;
        }
        throw new codes.ERR_OUT_OF_RANGE("value", range, value);
    }
    checkBounds(buf, offset, byteLength);
}
function toInteger(n, defaultVal) {
    n = +n;
    if (!Number.isNaN(n) && n >= Number.MIN_SAFE_INTEGER && n <= Number.MAX_SAFE_INTEGER) {
        return n % 1 === 0 ? n : Math.floor(n);
    }
    return defaultVal;
}
function writeU_Int8(buf, value, offset, min, max) {
    value = +value;
    validateNumber1(offset, "offset");
    if (value > max || value < min) {
        throw new codes.ERR_OUT_OF_RANGE("value", `>= ${min} and <= ${max}`, value);
    }
    if (buf[offset] === undefined) {
        boundsError(offset, buf.length - 1);
    }
    buf[offset] = value;
    return offset + 1;
}
function writeU_Int16BE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 1);
    buf[offset++] = value >>> 8;
    buf[offset++] = value;
    return offset;
}
function _writeUInt32LE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 3);
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    return offset;
}
function writeU_Int16LE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 1);
    buf[offset++] = value;
    buf[offset++] = value >>> 8;
    return offset;
}
function _writeUInt32BE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 3);
    buf[offset + 3] = value;
    value = value >>> 8;
    buf[offset + 2] = value;
    value = value >>> 8;
    buf[offset + 1] = value;
    value = value >>> 8;
    buf[offset] = value;
    return offset + 4;
}
function writeU_Int48BE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 5);
    const newVal = Math.floor(value * 2 ** -32);
    buf[offset++] = newVal >>> 8;
    buf[offset++] = newVal;
    buf[offset + 3] = value;
    value = value >>> 8;
    buf[offset + 2] = value;
    value = value >>> 8;
    buf[offset + 1] = value;
    value = value >>> 8;
    buf[offset] = value;
    return offset + 4;
}
function writeU_Int40BE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 4);
    buf[offset++] = Math.floor(value * 2 ** -32);
    buf[offset + 3] = value;
    value = value >>> 8;
    buf[offset + 2] = value;
    value = value >>> 8;
    buf[offset + 1] = value;
    value = value >>> 8;
    buf[offset] = value;
    return offset + 4;
}
function writeU_Int32BE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 3);
    buf[offset + 3] = value;
    value = value >>> 8;
    buf[offset + 2] = value;
    value = value >>> 8;
    buf[offset + 1] = value;
    value = value >>> 8;
    buf[offset] = value;
    return offset + 4;
}
function writeU_Int24BE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 2);
    buf[offset + 2] = value;
    value = value >>> 8;
    buf[offset + 1] = value;
    value = value >>> 8;
    buf[offset] = value;
    return offset + 3;
}
function validateOffset(value, name, min = 0, max = Number.MAX_SAFE_INTEGER) {
    if (typeof value !== "number") {
        throw new codes.ERR_INVALID_ARG_TYPE(name, "number", value);
    }
    if (!Number.isInteger(value)) {
        throw new codes.ERR_OUT_OF_RANGE(name, "an integer", value);
    }
    if (value < min || value > max) {
        throw new codes.ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
    }
}
function writeU_Int48LE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 5);
    const newVal = Math.floor(value * 2 ** -32);
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    buf[offset++] = newVal;
    buf[offset++] = newVal >>> 8;
    return offset;
}
function writeU_Int40LE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 4);
    const newVal = value;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    buf[offset++] = Math.floor(newVal * 2 ** -32);
    return offset;
}
function writeU_Int32LE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 3);
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    return offset;
}
function writeU_Int24LE(buf, value, offset, min, max) {
    value = +value;
    checkInt(value, min, max, buf, offset, 2);
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    value = value >>> 8;
    buf[offset++] = value;
    return offset;
}
const kMaxLength = 2147483647;
const MAX_UINT32 = 2 ** 32;
const customInspectSymbol1 = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
const INSPECT_MAX_BYTES = 50;
Object.defineProperty(Buffer3.prototype, "parent", {
    enumerable: true,
    get: function() {
        if (!Buffer3.isBuffer(this)) {
            return void 0;
        }
        return this.buffer;
    }
});
Object.defineProperty(Buffer3.prototype, "offset", {
    enumerable: true,
    get: function() {
        if (!Buffer3.isBuffer(this)) {
            return void 0;
        }
        return this.byteOffset;
    }
});
function createBuffer(length) {
    if (length > 2147483647) {
        throw new RangeError('The value "' + length + '" is invalid for option "size"');
    }
    const buf = new Uint8Array(length);
    Object.setPrototypeOf(buf, Buffer3.prototype);
    return buf;
}
function Buffer3(arg, encodingOrOffset, length) {
    if (typeof arg === "number") {
        if (typeof encodingOrOffset === "string") {
            throw new codes.ERR_INVALID_ARG_TYPE("string", "string", arg);
        }
        return _allocUnsafe(arg);
    }
    return _from(arg, encodingOrOffset, length);
}
Buffer3.poolSize = 8192;
function _from(value, encodingOrOffset, length) {
    if (typeof value === "string") {
        return fromString(value, encodingOrOffset);
    }
    if (typeof value === "object" && value !== null) {
        if (isAnyArrayBuffer1(value)) {
            return fromArrayBuffer(value, encodingOrOffset, length);
        }
        const valueOf = value.valueOf && value.valueOf();
        if (valueOf != null && valueOf !== value && (typeof valueOf === "string" || typeof valueOf === "object")) {
            return _from(valueOf, encodingOrOffset, length);
        }
        const b = fromObject(value);
        if (b) {
            return b;
        }
        if (typeof value[Symbol.toPrimitive] === "function") {
            const primitive = value[Symbol.toPrimitive]("string");
            if (typeof primitive === "string") {
                return fromString(primitive, encodingOrOffset);
            }
        }
    }
    throw new codes.ERR_INVALID_ARG_TYPE("first argument", [
        "string",
        "Buffer",
        "ArrayBuffer",
        "Array",
        "Array-like Object"
    ], value);
}
Buffer3.from = function from(value, encodingOrOffset, length) {
    return _from(value, encodingOrOffset, length);
};
Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);
Object.setPrototypeOf(Buffer3, Uint8Array);
function assertSize(size) {
    validateNumber1(size, "size");
    if (!(size >= 0 && size <= 2147483647)) {
        throw new codes.ERR_INVALID_ARG_VALUE.RangeError("size", size);
    }
}
function _alloc(size, fill, encoding) {
    assertSize(size);
    const buffer = createBuffer(size);
    if (fill !== undefined) {
        if (encoding !== undefined && typeof encoding !== "string") {
            throw new codes.ERR_INVALID_ARG_TYPE("encoding", "string", encoding);
        }
        return buffer.fill(fill, encoding);
    }
    return buffer;
}
Buffer3.alloc = function alloc(size, fill, encoding) {
    return _alloc(size, fill, encoding);
};
function _allocUnsafe(size) {
    assertSize(size);
    return createBuffer(size < 0 ? 0 : checked(size) | 0);
}
Buffer3.allocUnsafe = function allocUnsafe(size) {
    return _allocUnsafe(size);
};
Buffer3.allocUnsafeSlow = function allocUnsafeSlow(size) {
    return _allocUnsafe(size);
};
function fromString(string, encoding) {
    if (typeof encoding !== "string" || encoding === "") {
        encoding = "utf8";
    }
    if (!Buffer3.isEncoding(encoding)) {
        throw new codes.ERR_UNKNOWN_ENCODING(encoding);
    }
    const length = byteLength(string, encoding) | 0;
    let buf = createBuffer(length);
    const actual = buf.write(string, encoding);
    if (actual !== length) {
        buf = buf.slice(0, actual);
    }
    return buf;
}
function fromArrayLike(array) {
    const length = array.length < 0 ? 0 : checked(array.length) | 0;
    const buf = createBuffer(length);
    for(let i1 = 0; i1 < length; i1 += 1){
        buf[i1] = array[i1] & 255;
    }
    return buf;
}
function fromObject(obj) {
    if (obj.length !== undefined || isAnyArrayBuffer1(obj.buffer)) {
        if (typeof obj.length !== "number") {
            return createBuffer(0);
        }
        return fromArrayLike(obj);
    }
    if (obj.type === "Buffer" && Array.isArray(obj.data)) {
        return fromArrayLike(obj.data);
    }
}
function checked(length) {
    if (length >= 2147483647) {
        throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647..toString(16) + " bytes");
    }
    return length | 0;
}
function SlowBuffer(length) {
    assertSize(length);
    return Buffer3.alloc(+length);
}
Object.setPrototypeOf(SlowBuffer.prototype, Uint8Array.prototype);
Object.setPrototypeOf(SlowBuffer, Uint8Array);
Buffer3.isBuffer = function isBuffer(b) {
    return b != null && b._isBuffer === true && b !== Buffer3.prototype;
};
Buffer3.compare = function compare(a, b) {
    if (isInstance(a, Uint8Array)) {
        a = Buffer3.from(a, a.offset, a.byteLength);
    }
    if (isInstance(b, Uint8Array)) {
        b = Buffer3.from(b, b.offset, b.byteLength);
    }
    if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {
        throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
    }
    if (a === b) {
        return 0;
    }
    let x = a.length;
    let y = b.length;
    for(let i1 = 0, len = Math.min(x, y); i1 < len; ++i1){
        if (a[i1] !== b[i1]) {
            x = a[i1];
            y = b[i1];
            break;
        }
    }
    if (x < y) {
        return -1;
    }
    if (y < x) {
        return 1;
    }
    return 0;
};
Buffer3.isEncoding = function isEncoding(encoding) {
    return typeof encoding === "string" && encoding.length !== 0 && normalizeEncoding(encoding) !== undefined;
};
Buffer3.concat = function concat(list, length) {
    if (!Array.isArray(list)) {
        throw new codes.ERR_INVALID_ARG_TYPE("list", "Array", list);
    }
    if (list.length === 0) {
        return Buffer3.alloc(0);
    }
    if (length === undefined) {
        length = 0;
        for(let i1 = 0; i1 < list.length; i1++){
            if (list[i1].length) {
                length += list[i1].length;
            }
        }
    } else {
        validateOffset(length, "length");
    }
    const buffer = Buffer3.allocUnsafe(length);
    let pos = 0;
    for(let i11 = 0; i11 < list.length; i11++){
        const buf = list[i11];
        if (!isUint8Array(buf)) {
            throw new codes.ERR_INVALID_ARG_TYPE(`list[${i11}]`, [
                "Buffer",
                "Uint8Array"
            ], list[i11]);
        }
        pos += _copyActual(buf, buffer, pos, 0, buf.length);
    }
    if (pos < length) {
        buffer.fill(0, pos, length);
    }
    return buffer;
};
function byteLength(string, encoding) {
    if (typeof string !== "string") {
        if (isArrayBufferView(string) || isAnyArrayBuffer1(string)) {
            return string.byteLength;
        }
        throw new codes.ERR_INVALID_ARG_TYPE("string", [
            "string",
            "Buffer",
            "ArrayBuffer"
        ], string);
    }
    const len = string.length;
    const mustMatch = arguments.length > 2 && arguments[2] === true;
    if (!mustMatch && len === 0) {
        return 0;
    }
    if (!encoding) {
        return mustMatch ? -1 : byteLengthUtf8(string);
    }
    const ops = getEncodingOps(encoding);
    if (ops === undefined) {
        return mustMatch ? -1 : byteLengthUtf8(string);
    }
    return ops.byteLength(string);
}
Buffer3.byteLength = byteLength;
Buffer3.prototype._isBuffer = true;
function swap(b, n, m) {
    const i1 = b[n];
    b[n] = b[m];
    b[m] = i1;
}
Buffer3.prototype.swap16 = function swap16() {
    const len = this.length;
    if (len % 2 !== 0) {
        throw new RangeError("Buffer size must be a multiple of 16-bits");
    }
    for(let i1 = 0; i1 < len; i1 += 2){
        swap(this, i1, i1 + 1);
    }
    return this;
};
Buffer3.prototype.swap32 = function swap32() {
    const len = this.length;
    if (len % 4 !== 0) {
        throw new RangeError("Buffer size must be a multiple of 32-bits");
    }
    for(let i1 = 0; i1 < len; i1 += 4){
        swap(this, i1, i1 + 3);
        swap(this, i1 + 1, i1 + 2);
    }
    return this;
};
Buffer3.prototype.swap64 = function swap64() {
    const len = this.length;
    if (len % 8 !== 0) {
        throw new RangeError("Buffer size must be a multiple of 64-bits");
    }
    for(let i1 = 0; i1 < len; i1 += 8){
        swap(this, i1, i1 + 7);
        swap(this, i1 + 1, i1 + 6);
        swap(this, i1 + 2, i1 + 5);
        swap(this, i1 + 3, i1 + 4);
    }
    return this;
};
Buffer3.prototype.toString = function toString(encoding, start, end) {
    if (arguments.length === 0) {
        return this.utf8Slice(0, this.length);
    }
    const len = this.length;
    if (start <= 0) {
        start = 0;
    } else if (start >= len) {
        return "";
    } else {
        start |= 0;
    }
    if (end === undefined || end > len) {
        end = len;
    } else {
        end |= 0;
    }
    if (end <= start) {
        return "";
    }
    if (encoding === undefined) {
        return this.utf8Slice(start, end);
    }
    const ops = getEncodingOps(encoding);
    if (ops === undefined) {
        throw new codes.ERR_UNKNOWN_ENCODING(encoding);
    }
    return ops.slice(this, start, end);
};
Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;
Buffer3.prototype.equals = function equals(b) {
    if (!isUint8Array(b)) {
        throw new codes.ERR_INVALID_ARG_TYPE("otherBuffer", [
            "Buffer",
            "Uint8Array"
        ], b);
    }
    if (this === b) {
        return true;
    }
    return Buffer3.compare(this, b) === 0;
};
Buffer3.prototype.inspect = function inspect() {
    let str = "";
    const max = INSPECT_MAX_BYTES;
    str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
    if (this.length > max) {
        str += " ... ";
    }
    return "<Buffer " + str + ">";
};
if (customInspectSymbol1) {
    Buffer3.prototype[customInspectSymbol1] = Buffer3.prototype.inspect;
}
Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
    if (isInstance(target, Uint8Array)) {
        target = Buffer3.from(target, target.offset, target.byteLength);
    }
    if (!Buffer3.isBuffer(target)) {
        throw new codes.ERR_INVALID_ARG_TYPE("target", [
            "Buffer",
            "Uint8Array"
        ], target);
    }
    if (start === undefined) {
        start = 0;
    } else {
        validateOffset(start, "targetStart", 0, kMaxLength);
    }
    if (end === undefined) {
        end = target.length;
    } else {
        validateOffset(end, "targetEnd", 0, target.length);
    }
    if (thisStart === undefined) {
        thisStart = 0;
    } else {
        validateOffset(start, "sourceStart", 0, kMaxLength);
    }
    if (thisEnd === undefined) {
        thisEnd = this.length;
    } else {
        validateOffset(end, "sourceEnd", 0, this.length);
    }
    if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
        throw new codes.ERR_OUT_OF_RANGE("out of range index", "range");
    }
    if (thisStart >= thisEnd && start >= end) {
        return 0;
    }
    if (thisStart >= thisEnd) {
        return -1;
    }
    if (start >= end) {
        return 1;
    }
    start >>>= 0;
    end >>>= 0;
    thisStart >>>= 0;
    thisEnd >>>= 0;
    if (this === target) {
        return 0;
    }
    let x = thisEnd - thisStart;
    let y = end - start;
    const len = Math.min(x, y);
    const thisCopy = this.slice(thisStart, thisEnd);
    const targetCopy = target.slice(start, end);
    for(let i1 = 0; i1 < len; ++i1){
        if (thisCopy[i1] !== targetCopy[i1]) {
            x = thisCopy[i1];
            y = targetCopy[i1];
            break;
        }
    }
    if (x < y) {
        return -1;
    }
    if (y < x) {
        return 1;
    }
    return 0;
};
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
    validateBuffer(buffer);
    if (typeof byteOffset === "string") {
        encoding = byteOffset;
        byteOffset = undefined;
    } else if (byteOffset > 0x7fffffff) {
        byteOffset = 0x7fffffff;
    } else if (byteOffset < -0x80000000) {
        byteOffset = -0x80000000;
    }
    byteOffset = +byteOffset;
    if (Number.isNaN(byteOffset)) {
        byteOffset = dir ? 0 : buffer.length || buffer.byteLength;
    }
    dir = !!dir;
    if (typeof val === "number") {
        return indexOfNumber(buffer, val >>> 0, byteOffset, dir);
    }
    let ops;
    if (encoding === undefined) {
        ops = encodingOps.utf8;
    } else {
        ops = getEncodingOps(encoding);
    }
    if (typeof val === "string") {
        if (ops === undefined) {
            throw new codes.ERR_UNKNOWN_ENCODING(encoding);
        }
        return ops.indexOf(buffer, val, byteOffset, dir);
    }
    if (isUint8Array(val)) {
        const encodingVal = ops === undefined ? encodingsMap.utf8 : ops.encodingVal;
        return indexOfBuffer(buffer, val, byteOffset, encodingVal, dir);
    }
    throw new codes.ERR_INVALID_ARG_TYPE("value", [
        "number",
        "string",
        "Buffer",
        "Uint8Array"
    ], val);
}
Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {
    return this.indexOf(val, byteOffset, encoding) !== -1;
};
Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
    return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
};
Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
    return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
};
Buffer3.prototype.asciiSlice = function asciiSlice(offset, length) {
    if (offset === 0 && length === this.length) {
        return bytesToAscii(this);
    } else {
        return bytesToAscii(this.slice(offset, length));
    }
};
Buffer3.prototype.asciiWrite = function asciiWrite(string, offset, length) {
    return blitBuffer(asciiToBytes(string), this, offset, length);
};
Buffer3.prototype.base64Slice = function base64Slice(offset, length) {
    if (offset === 0 && length === this.length) {
        return encode(this);
    } else {
        return encode(this.slice(offset, length));
    }
};
Buffer3.prototype.base64Write = function base64Write(string, offset, length) {
    return blitBuffer(base64ToBytes(string), this, offset, length);
};
Buffer3.prototype.base64urlSlice = function base64urlSlice(offset, length) {
    if (offset === 0 && length === this.length) {
        return encode1(this);
    } else {
        return encode1(this.slice(offset, length));
    }
};
Buffer3.prototype.base64urlWrite = function base64urlWrite(string, offset, length) {
    return blitBuffer(base64UrlToBytes(string), this, offset, length);
};
Buffer3.prototype.hexWrite = function hexWrite(string, offset, length) {
    return blitBuffer(hexToBytes(string, this.length - offset), this, offset, length);
};
Buffer3.prototype.hexSlice = function hexSlice(string, offset, length) {
    return _hexSlice(this, string, offset, length);
};
Buffer3.prototype.latin1Slice = function latin1Slice(string, offset, length) {
    return _latin1Slice(this, string, offset, length);
};
Buffer3.prototype.latin1Write = function latin1Write(string, offset, length) {
    return blitBuffer(asciiToBytes(string), this, offset, length);
};
Buffer3.prototype.ucs2Slice = function ucs2Slice(offset, length) {
    if (offset === 0 && length === this.length) {
        return bytesToUtf16le(this);
    } else {
        return bytesToUtf16le(this.slice(offset, length));
    }
};
Buffer3.prototype.ucs2Write = function ucs2Write(string, offset, length) {
    return blitBuffer(utf16leToBytes(string, this.length - offset), this, offset, length);
};
Buffer3.prototype.utf8Slice = function utf8Slice(string, offset, length) {
    return _utf8Slice(this, string, offset, length);
};
Buffer3.prototype.utf8Write = function utf8Write(string, offset, length) {
    return blitBuffer(utf8ToBytes(string, this.length - offset), this, offset, length);
};
Buffer3.prototype.write = function write(string, offset, length, encoding) {
    if (offset === undefined) {
        return this.utf8Write(string, 0, this.length);
    }
    if (length === undefined && typeof offset === "string") {
        encoding = offset;
        length = this.length;
        offset = 0;
    } else {
        validateOffset(offset, "offset", 0, this.length);
        const remaining = this.length - offset;
        if (length === undefined) {
            length = remaining;
        } else if (typeof length === "string") {
            encoding = length;
            length = remaining;
        } else {
            validateOffset(length, "length", 0, this.length);
            if (length > remaining) {
                length = remaining;
            }
        }
    }
    if (!encoding) {
        return this.utf8Write(string, offset, length);
    }
    const ops = getEncodingOps(encoding);
    if (ops === undefined) {
        throw new codes.ERR_UNKNOWN_ENCODING(encoding);
    }
    return ops.write(this, string, offset, length);
};
Buffer3.prototype.toJSON = function toJSON() {
    return {
        type: "Buffer",
        data: Array.prototype.slice.call(this._arr || this, 0)
    };
};
function fromArrayBuffer(obj, byteOffset, length) {
    if (byteOffset === undefined) {
        byteOffset = 0;
    } else {
        byteOffset = +byteOffset;
        if (Number.isNaN(byteOffset)) {
            byteOffset = 0;
        }
    }
    const maxLength = obj.byteLength - byteOffset;
    if (maxLength < 0) {
        throw new codes.ERR_BUFFER_OUT_OF_BOUNDS("offset");
    }
    if (length === undefined) {
        length = maxLength;
    } else {
        length = +length;
        if (length > 0) {
            if (length > maxLength) {
                throw new codes.ERR_BUFFER_OUT_OF_BOUNDS("length");
            }
        } else {
            length = 0;
        }
    }
    const buffer = new Uint8Array(obj, byteOffset, length);
    Object.setPrototypeOf(buffer, Buffer3.prototype);
    return buffer;
}
function _utf8Slice(buf, start, end) {
    end = Math.min(buf.length, end);
    const res = [];
    let i1 = start;
    while(i1 < end){
        const firstByte = buf[i1];
        let codePoint = null;
        let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
        if (i1 + bytesPerSequence <= end) {
            let secondByte, thirdByte, fourthByte, tempCodePoint;
            switch(bytesPerSequence){
                case 1:
                    if (firstByte < 128) {
                        codePoint = firstByte;
                    }
                    break;
                case 2:
                    secondByte = buf[i1 + 1];
                    if ((secondByte & 192) === 128) {
                        tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
                        if (tempCodePoint > 127) {
                            codePoint = tempCodePoint;
                        }
                    }
                    break;
                case 3:
                    secondByte = buf[i1 + 1];
                    thirdByte = buf[i1 + 2];
                    if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
                        tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
                        if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
                            codePoint = tempCodePoint;
                        }
                    }
                    break;
                case 4:
                    secondByte = buf[i1 + 1];
                    thirdByte = buf[i1 + 2];
                    fourthByte = buf[i1 + 3];
                    if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
                        tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
                        if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
                            codePoint = tempCodePoint;
                        }
                    }
            }
        }
        if (codePoint === null) {
            codePoint = 65533;
            bytesPerSequence = 1;
        } else if (codePoint > 65535) {
            codePoint -= 65536;
            res.push(codePoint >>> 10 & 1023 | 55296);
            codePoint = 56320 | codePoint & 1023;
        }
        res.push(codePoint);
        i1 += bytesPerSequence;
    }
    return decodeCodePointsArray(res);
}
const MAX_ARGUMENTS_LENGTH = 4096;
function decodeCodePointsArray(codePoints) {
    const len = codePoints.length;
    if (len <= 4096) {
        return String.fromCharCode.apply(String, codePoints);
    }
    let res = "";
    let i1 = 0;
    while(i1 < len){
        res += String.fromCharCode.apply(String, codePoints.slice(i1, i1 += MAX_ARGUMENTS_LENGTH));
    }
    return res;
}
function _latin1Slice(buf, start, end) {
    let ret = "";
    end = Math.min(buf.length, end);
    for(let i1 = start; i1 < end; ++i1){
        ret += String.fromCharCode(buf[i1]);
    }
    return ret;
}
function _hexSlice(buf, start, end) {
    const len = buf.length;
    if (!start || start < 0) {
        start = 0;
    }
    if (!end || end < 0 || end > len) {
        end = len;
    }
    let out = "";
    for(let i1 = start; i1 < end; ++i1){
        out += hexSliceLookupTable[buf[i1]];
    }
    return out;
}
Buffer3.prototype.slice = function slice(start, end) {
    const len = this.length;
    start = ~~start;
    end = end === void 0 ? len : ~~end;
    if (start < 0) {
        start += len;
        if (start < 0) {
            start = 0;
        }
    } else if (start > len) {
        start = len;
    }
    if (end < 0) {
        end += len;
        if (end < 0) {
            end = 0;
        }
    } else if (end > len) {
        end = len;
    }
    if (end < start) {
        end = start;
    }
    const newBuf = this.subarray(start, end);
    Object.setPrototypeOf(newBuf, Buffer3.prototype);
    return newBuf;
};
Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength) {
    if (offset === undefined) {
        throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset);
    }
    if (byteLength === 6) {
        return readUInt48LE(this, offset);
    }
    if (byteLength === 5) {
        return readUInt40LE(this, offset);
    }
    if (byteLength === 3) {
        return readUInt24LE(this, offset);
    }
    if (byteLength === 4) {
        return this.readUInt32LE(offset);
    }
    if (byteLength === 2) {
        return this.readUInt16LE(offset);
    }
    if (byteLength === 1) {
        return this.readUInt8(offset);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength) {
    if (offset === undefined) {
        throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset);
    }
    if (byteLength === 6) {
        return readUInt48BE(this, offset);
    }
    if (byteLength === 5) {
        return readUInt40BE(this, offset);
    }
    if (byteLength === 3) {
        return readUInt24BE(this, offset);
    }
    if (byteLength === 4) {
        return this.readUInt32BE(offset);
    }
    if (byteLength === 2) {
        return this.readUInt16BE(offset);
    }
    if (byteLength === 1) {
        return this.readUInt8(offset);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset = 0) {
    validateNumber1(offset, "offset");
    const val = this[offset];
    if (val === undefined) {
        boundsError(offset, this.length - 1);
    }
    return val;
};
Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = readUInt16BE;
Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 1];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 2);
    }
    return first + last * 2 ** 8;
};
Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 3];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 4);
    }
    return first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
};
Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = readUInt32BE;
Buffer3.prototype.readBigUint64LE = Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
    offset = offset >>> 0;
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 7];
    if (first === void 0 || last === void 0) {
        boundsError(offset, this.length - 8);
    }
    const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
    const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
    return BigInt(lo) + (BigInt(hi) << BigInt(32));
});
Buffer3.prototype.readBigUint64BE = Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
    offset = offset >>> 0;
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 7];
    if (first === void 0 || last === void 0) {
        boundsError(offset, this.length - 8);
    }
    const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
    const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
    return (BigInt(hi) << BigInt(32)) + BigInt(lo);
});
Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength) {
    if (offset === undefined) {
        throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset);
    }
    if (byteLength === 6) {
        return readInt48LE(this, offset);
    }
    if (byteLength === 5) {
        return readInt40LE(this, offset);
    }
    if (byteLength === 3) {
        return readInt24LE(this, offset);
    }
    if (byteLength === 4) {
        return this.readInt32LE(offset);
    }
    if (byteLength === 2) {
        return this.readInt16LE(offset);
    }
    if (byteLength === 1) {
        return this.readInt8(offset);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength) {
    if (offset === undefined) {
        throw new codes.ERR_INVALID_ARG_TYPE("offset", "number", offset);
    }
    if (byteLength === 6) {
        return readInt48BE(this, offset);
    }
    if (byteLength === 5) {
        return readInt40BE(this, offset);
    }
    if (byteLength === 3) {
        return readInt24BE(this, offset);
    }
    if (byteLength === 4) {
        return this.readInt32BE(offset);
    }
    if (byteLength === 2) {
        return this.readInt16BE(offset);
    }
    if (byteLength === 1) {
        return this.readInt8(offset);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.readInt8 = function readInt8(offset = 0) {
    validateNumber1(offset, "offset");
    const val = this[offset];
    if (val === undefined) {
        boundsError(offset, this.length - 1);
    }
    return val | (val & 2 ** 7) * 0x1fffffe;
};
Buffer3.prototype.readInt16LE = function readInt16LE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 1];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 2);
    }
    const val = first + last * 2 ** 8;
    return val | (val & 2 ** 15) * 0x1fffe;
};
Buffer3.prototype.readInt16BE = function readInt16BE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 1];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 2);
    }
    const val = first * 2 ** 8 + last;
    return val | (val & 2 ** 15) * 0x1fffe;
};
Buffer3.prototype.readInt32LE = function readInt32LE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 3];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 4);
    }
    return first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + (last << 24);
};
Buffer3.prototype.readInt32BE = function readInt32BE(offset = 0) {
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 3];
    if (first === undefined || last === undefined) {
        boundsError(offset, this.length - 4);
    }
    return (first << 24) + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
};
Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
    offset = offset >>> 0;
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 7];
    if (first === void 0 || last === void 0) {
        boundsError(offset, this.length - 8);
    }
    const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
    return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
});
Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
    offset = offset >>> 0;
    validateNumber1(offset, "offset");
    const first = this[offset];
    const last = this[offset + 7];
    if (first === void 0 || last === void 0) {
        boundsError(offset, this.length - 8);
    }
    const val = (first << 24) + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
    return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
});
Buffer3.prototype.readFloatLE = function readFloatLE(offset) {
    return bigEndian ? readFloatBackwards(this, offset) : readFloatForwards(this, offset);
};
Buffer3.prototype.readFloatBE = function readFloatBE(offset) {
    return bigEndian ? readFloatForwards(this, offset) : readFloatBackwards(this, offset);
};
Buffer3.prototype.readDoubleLE = function readDoubleLE(offset) {
    return bigEndian ? readDoubleBackwards(this, offset) : readDoubleForwards(this, offset);
};
Buffer3.prototype.readDoubleBE = function readDoubleBE(offset) {
    return bigEndian ? readDoubleForwards(this, offset) : readDoubleBackwards(this, offset);
};
Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength) {
    if (byteLength === 6) {
        return writeU_Int48LE(this, value, offset, 0, 0xffffffffffff);
    }
    if (byteLength === 5) {
        return writeU_Int40LE(this, value, offset, 0, 0xffffffffff);
    }
    if (byteLength === 3) {
        return writeU_Int24LE(this, value, offset, 0, 0xffffff);
    }
    if (byteLength === 4) {
        return writeU_Int32LE(this, value, offset, 0, 0xffffffff);
    }
    if (byteLength === 2) {
        return writeU_Int16LE(this, value, offset, 0, 0xffff);
    }
    if (byteLength === 1) {
        return writeU_Int8(this, value, offset, 0, 0xff);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength) {
    if (byteLength === 6) {
        return writeU_Int48BE(this, value, offset, 0, 0xffffffffffff);
    }
    if (byteLength === 5) {
        return writeU_Int40BE(this, value, offset, 0, 0xffffffffff);
    }
    if (byteLength === 3) {
        return writeU_Int24BE(this, value, offset, 0, 0xffffff);
    }
    if (byteLength === 4) {
        return writeU_Int32BE(this, value, offset, 0, 0xffffffff);
    }
    if (byteLength === 2) {
        return writeU_Int16BE(this, value, offset, 0, 0xffff);
    }
    if (byteLength === 1) {
        return writeU_Int8(this, value, offset, 0, 0xff);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset = 0) {
    return writeU_Int8(this, value, offset, 0, 0xff);
};
Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset = 0) {
    return writeU_Int16LE(this, value, offset, 0, 0xffff);
};
Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset = 0) {
    return writeU_Int16BE(this, value, offset, 0, 0xffff);
};
Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset = 0) {
    return _writeUInt32LE(this, value, offset, 0, 0xffffffff);
};
Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset = 0) {
    return _writeUInt32BE(this, value, offset, 0, 0xffffffff);
};
function wrtBigUInt64LE(buf, value, offset, min, max) {
    checkIntBI(value, min, max, buf, offset, 7);
    let lo = Number(value & BigInt(4294967295));
    buf[offset++] = lo;
    lo = lo >> 8;
    buf[offset++] = lo;
    lo = lo >> 8;
    buf[offset++] = lo;
    lo = lo >> 8;
    buf[offset++] = lo;
    let hi = Number(value >> BigInt(32) & BigInt(4294967295));
    buf[offset++] = hi;
    hi = hi >> 8;
    buf[offset++] = hi;
    hi = hi >> 8;
    buf[offset++] = hi;
    hi = hi >> 8;
    buf[offset++] = hi;
    return offset;
}
function wrtBigUInt64BE(buf, value, offset, min, max) {
    checkIntBI(value, min, max, buf, offset, 7);
    let lo = Number(value & BigInt(4294967295));
    buf[offset + 7] = lo;
    lo = lo >> 8;
    buf[offset + 6] = lo;
    lo = lo >> 8;
    buf[offset + 5] = lo;
    lo = lo >> 8;
    buf[offset + 4] = lo;
    let hi = Number(value >> BigInt(32) & BigInt(4294967295));
    buf[offset + 3] = hi;
    hi = hi >> 8;
    buf[offset + 2] = hi;
    hi = hi >> 8;
    buf[offset + 1] = hi;
    hi = hi >> 8;
    buf[offset] = hi;
    return offset + 8;
}
Buffer3.prototype.writeBigUint64LE = Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
    return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
});
Buffer3.prototype.writeBigUint64BE = Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
    return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
});
Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength) {
    if (byteLength === 6) {
        return writeU_Int48LE(this, value, offset, -0x800000000000, 0x7fffffffffff);
    }
    if (byteLength === 5) {
        return writeU_Int40LE(this, value, offset, -0x8000000000, 0x7fffffffff);
    }
    if (byteLength === 3) {
        return writeU_Int24LE(this, value, offset, -0x800000, 0x7fffff);
    }
    if (byteLength === 4) {
        return writeU_Int32LE(this, value, offset, -0x80000000, 0x7fffffff);
    }
    if (byteLength === 2) {
        return writeU_Int16LE(this, value, offset, -0x8000, 0x7fff);
    }
    if (byteLength === 1) {
        return writeU_Int8(this, value, offset, -0x80, 0x7f);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength) {
    if (byteLength === 6) {
        return writeU_Int48BE(this, value, offset, -0x800000000000, 0x7fffffffffff);
    }
    if (byteLength === 5) {
        return writeU_Int40BE(this, value, offset, -0x8000000000, 0x7fffffffff);
    }
    if (byteLength === 3) {
        return writeU_Int24BE(this, value, offset, -0x800000, 0x7fffff);
    }
    if (byteLength === 4) {
        return writeU_Int32BE(this, value, offset, -0x80000000, 0x7fffffff);
    }
    if (byteLength === 2) {
        return writeU_Int16BE(this, value, offset, -0x8000, 0x7fff);
    }
    if (byteLength === 1) {
        return writeU_Int8(this, value, offset, -0x80, 0x7f);
    }
    boundsError(byteLength, 6, "byteLength");
};
Buffer3.prototype.writeInt8 = function writeInt8(value, offset = 0) {
    return writeU_Int8(this, value, offset, -0x80, 0x7f);
};
Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset = 0) {
    return writeU_Int16LE(this, value, offset, -0x8000, 0x7fff);
};
Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset = 0) {
    return writeU_Int16BE(this, value, offset, -0x8000, 0x7fff);
};
Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset = 0) {
    return writeU_Int32LE(this, value, offset, -0x80000000, 0x7fffffff);
};
Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset = 0) {
    return writeU_Int32BE(this, value, offset, -0x80000000, 0x7fffffff);
};
Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
    return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
});
Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
    return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
});
Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset) {
    return bigEndian ? writeFloatBackwards(this, value, offset) : writeFloatForwards(this, value, offset);
};
Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset) {
    return bigEndian ? writeFloatForwards(this, value, offset) : writeFloatBackwards(this, value, offset);
};
Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset) {
    return bigEndian ? writeDoubleBackwards(this, value, offset) : writeDoubleForwards(this, value, offset);
};
Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset) {
    return bigEndian ? writeDoubleForwards(this, value, offset) : writeDoubleBackwards(this, value, offset);
};
Buffer3.prototype.copy = function copy(target, targetStart, sourceStart, sourceEnd) {
    if (!isUint8Array(this)) {
        throw new codes.ERR_INVALID_ARG_TYPE("source", [
            "Buffer",
            "Uint8Array"
        ], this);
    }
    if (!isUint8Array(target)) {
        throw new codes.ERR_INVALID_ARG_TYPE("target", [
            "Buffer",
            "Uint8Array"
        ], target);
    }
    if (targetStart === undefined) {
        targetStart = 0;
    } else {
        targetStart = toInteger(targetStart, 0);
        if (targetStart < 0) {
            throw new codes.ERR_OUT_OF_RANGE("targetStart", ">= 0", targetStart);
        }
    }
    if (sourceStart === undefined) {
        sourceStart = 0;
    } else {
        sourceStart = toInteger(sourceStart, 0);
        if (sourceStart < 0) {
            throw new codes.ERR_OUT_OF_RANGE("sourceStart", ">= 0", sourceStart);
        }
        if (sourceStart >= MAX_UINT32) {
            throw new codes.ERR_OUT_OF_RANGE("sourceStart", `< ${MAX_UINT32}`, sourceStart);
        }
    }
    if (sourceEnd === undefined) {
        sourceEnd = this.length;
    } else {
        sourceEnd = toInteger(sourceEnd, 0);
        if (sourceEnd < 0) {
            throw new codes.ERR_OUT_OF_RANGE("sourceEnd", ">= 0", sourceEnd);
        }
        if (sourceEnd >= MAX_UINT32) {
            throw new codes.ERR_OUT_OF_RANGE("sourceEnd", `< ${MAX_UINT32}`, sourceEnd);
        }
    }
    if (targetStart >= target.length) {
        return 0;
    }
    if (sourceEnd > 0 && sourceEnd < sourceStart) {
        sourceEnd = sourceStart;
    }
    if (sourceEnd === sourceStart) {
        return 0;
    }
    if (target.length === 0 || this.length === 0) {
        return 0;
    }
    if (sourceEnd > this.length) {
        sourceEnd = this.length;
    }
    if (target.length - targetStart < sourceEnd - sourceStart) {
        sourceEnd = target.length - targetStart + sourceStart;
    }
    const len = sourceEnd - sourceStart;
    if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
        this.copyWithin(targetStart, sourceStart, sourceEnd);
    } else {
        Uint8Array.prototype.set.call(target, this.subarray(sourceStart, sourceEnd), targetStart);
    }
    return len;
};
Buffer3.prototype.fill = function fill(val, start, end, encoding) {
    if (typeof val === "string") {
        if (typeof start === "string") {
            encoding = start;
            start = 0;
            end = this.length;
        } else if (typeof end === "string") {
            encoding = end;
            end = this.length;
        }
        if (encoding !== void 0 && typeof encoding !== "string") {
            throw new TypeError("encoding must be a string");
        }
        if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
            throw new TypeError("Unknown encoding: " + encoding);
        }
        if (val.length === 1) {
            const code = val.charCodeAt(0);
            if (encoding === "utf8" && code < 128 || encoding === "latin1") {
                val = code;
            }
        }
    } else if (typeof val === "number") {
        val = val & 255;
    } else if (typeof val === "boolean") {
        val = Number(val);
    }
    if (start < 0 || this.length < start || this.length < end) {
        throw new RangeError("Out of range index");
    }
    if (end <= start) {
        return this;
    }
    start = start >>> 0;
    end = end === void 0 ? this.length : end >>> 0;
    if (!val) {
        val = 0;
    }
    let i1;
    if (typeof val === "number") {
        for(i1 = start; i1 < end; ++i1){
            this[i1] = val;
        }
    } else {
        const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);
        const len = bytes.length;
        if (len === 0) {
            throw new codes.ERR_INVALID_ARG_VALUE("value", val);
        }
        for(i1 = 0; i1 < end - start; ++i1){
            this[i1 + start] = bytes[i1 % len];
        }
    }
    return this;
};
function checkBounds1(buf, offset, byteLength2) {
    validateNumber1(offset, "offset");
    if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {
        boundsError(offset, buf.length - (byteLength2 + 1));
    }
}
function checkIntBI(value, min, max, buf, offset, byteLength2) {
    if (value > max || value < min) {
        const n = typeof min === "bigint" ? "n" : "";
        let range;
        if (byteLength2 > 3) {
            if (min === 0 || min === BigInt(0)) {
                range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;
            } else {
                range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;
            }
        } else {
            range = `>= ${min}${n} and <= ${max}${n}`;
        }
        throw new codes.ERR_OUT_OF_RANGE("value", range, value);
    }
    checkBounds1(buf, offset, byteLength2);
}
function utf8ToBytes(string, units) {
    units = units || Infinity;
    let codePoint;
    const length = string.length;
    let leadSurrogate = null;
    const bytes = [];
    for(let i1 = 0; i1 < length; ++i1){
        codePoint = string.charCodeAt(i1);
        if (codePoint > 55295 && codePoint < 57344) {
            if (!leadSurrogate) {
                if (codePoint > 56319) {
                    if ((units -= 3) > -1) {
                        bytes.push(239, 191, 189);
                    }
                    continue;
                } else if (i1 + 1 === length) {
                    if ((units -= 3) > -1) {
                        bytes.push(239, 191, 189);
                    }
                    continue;
                }
                leadSurrogate = codePoint;
                continue;
            }
            if (codePoint < 56320) {
                if ((units -= 3) > -1) {
                    bytes.push(239, 191, 189);
                }
                leadSurrogate = codePoint;
                continue;
            }
            codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
        } else if (leadSurrogate) {
            if ((units -= 3) > -1) {
                bytes.push(239, 191, 189);
            }
        }
        leadSurrogate = null;
        if (codePoint < 128) {
            if ((units -= 1) < 0) {
                break;
            }
            bytes.push(codePoint);
        } else if (codePoint < 2048) {
            if ((units -= 2) < 0) {
                break;
            }
            bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
        } else if (codePoint < 65536) {
            if ((units -= 3) < 0) {
                break;
            }
            bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
        } else if (codePoint < 1114112) {
            if ((units -= 4) < 0) {
                break;
            }
            bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
        } else {
            throw new Error("Invalid code point");
        }
    }
    return bytes;
}
function blitBuffer(src, dst, offset, byteLength) {
    let i1;
    const length = byteLength === undefined ? src.length : byteLength;
    for(i1 = 0; i1 < length; ++i1){
        if (i1 + offset >= dst.length || i1 >= src.length) {
            break;
        }
        dst[i1 + offset] = src[i1];
    }
    return i1;
}
function isInstance(obj, type) {
    return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
}
const hexSliceLookupTable = function() {
    const alphabet = "0123456789abcdef";
    const table = new Array(256);
    for(let i1 = 0; i1 < 16; ++i1){
        const i16 = i1 * 16;
        for(let j = 0; j < 16; ++j){
            table[i16 + j] = alphabet[i1] + alphabet[j];
        }
    }
    return table;
}();
function defineBigIntMethod(fn) {
    return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
}
function BufferBigIntNotDefined() {
    throw new Error("BigInt not supported");
}
globalThis.atob;
globalThis.Blob;
globalThis.btoa;
var valueType;
(function(valueType) {
    valueType[valueType["noIterator"] = 0] = "noIterator";
    valueType[valueType["isArray"] = 1] = "isArray";
    valueType[valueType["isSet"] = 2] = "isSet";
    valueType[valueType["isMap"] = 3] = "isMap";
})(valueType || (valueType = {}));
const NumberIsSafeInteger = Number.isSafeInteger;
function getSystemErrorName(code) {
    if (typeof code !== "number") {
        throw new codes.ERR_INVALID_ARG_TYPE("err", "number", code);
    }
    if (code >= 0 || !NumberIsSafeInteger(code)) {
        throw new codes.ERR_OUT_OF_RANGE("err", "a negative integer", code);
    }
    return errorMap.get(code)?.[0];
}
const { errno: { ENOTDIR , ENOENT  } ,  } = os;
const kIsNodeError = Symbol("kIsNodeError");
const classRegExp1 = /^([A-Z][a-z0-9]*)+$/;
const kTypes = [
    "string",
    "function",
    "number",
    "object",
    "Function",
    "Object",
    "boolean",
    "bigint",
    "symbol", 
];
function addNumericalSeparator(val) {
    let res = "";
    let i1 = val.length;
    const start = val[0] === "-" ? 1 : 0;
    for(; i1 >= start + 4; i1 -= 3){
        res = `_${val.slice(i1 - 3, i1)}${res}`;
    }
    return `${val.slice(0, i1)}${res}`;
}
const captureLargerStackTrace = hideStackFrames(function captureLargerStackTrace(err) {
    Error.captureStackTrace(err);
    return err;
});
hideStackFrames(function uvExceptionWithHostPort(err, syscall, address, port) {
    const { 0: code , 1: uvmsg  } = uvErrmapGet(err) || uvUnmappedError;
    const message = `${syscall} ${code}: ${uvmsg}`;
    let details = "";
    if (port && port > 0) {
        details = ` ${address}:${port}`;
    } else if (address) {
        details = ` ${address}`;
    }
    const ex = new Error(`${message}${details}`);
    ex.code = code;
    ex.errno = err;
    ex.syscall = syscall;
    ex.address = address;
    if (port) {
        ex.port = port;
    }
    return captureLargerStackTrace(ex);
});
hideStackFrames(function errnoException(err, syscall, original) {
    const code = getSystemErrorName(err);
    const message = original ? `${syscall} ${code} ${original}` : `${syscall} ${code}`;
    const ex = new Error(message);
    ex.errno = err;
    ex.code = code;
    ex.syscall = syscall;
    return captureLargerStackTrace(ex);
});
function uvErrmapGet(name) {
    return errorMap.get(name);
}
const uvUnmappedError = [
    "UNKNOWN",
    "unknown error"
];
hideStackFrames(function uvException(ctx) {
    const { 0: code , 1: uvmsg  } = uvErrmapGet(ctx.errno) || uvUnmappedError;
    let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`;
    let path;
    let dest;
    if (ctx.path) {
        path = ctx.path.toString();
        message += ` '${path}'`;
    }
    if (ctx.dest) {
        dest = ctx.dest.toString();
        message += ` -> '${dest}'`;
    }
    const err = new Error(message);
    for (const prop of Object.keys(ctx)){
        if (prop === "message" || prop === "path" || prop === "dest") {
            continue;
        }
        err[prop] = ctx[prop];
    }
    err.code = code;
    if (path) {
        err.path = path;
    }
    if (dest) {
        err.dest = dest;
    }
    return captureLargerStackTrace(err);
});
hideStackFrames(function exceptionWithHostPort(err, syscall, address, port, additional) {
    const code = getSystemErrorName(err);
    let details = "";
    if (port && port > 0) {
        details = ` ${address}:${port}`;
    } else if (address) {
        details = ` ${address}`;
    }
    if (additional) {
        details += ` - Local (${additional})`;
    }
    const ex = new Error(`${syscall} ${code}${details}`);
    ex.errno = err;
    ex.code = code;
    ex.syscall = syscall;
    ex.address = address;
    if (port) {
        ex.port = port;
    }
    return captureLargerStackTrace(ex);
});
hideStackFrames(function(code, syscall, hostname) {
    let errno;
    if (typeof code === "number") {
        errno = code;
        if (code === codeMap.get("EAI_NODATA") || code === codeMap.get("EAI_NONAME")) {
            code = "ENOTFOUND";
        } else {
            code = getSystemErrorName(code);
        }
    }
    const message = `${syscall} ${code}${hostname ? ` ${hostname}` : ""}`;
    const ex = new Error(message);
    ex.errno = errno;
    ex.code = code;
    ex.syscall = syscall;
    if (hostname) {
        ex.hostname = hostname;
    }
    return captureLargerStackTrace(ex);
});
class NodeErrorAbstraction extends Error {
    code;
    constructor(name, code, message){
        super(message);
        this.code = code;
        this.name = name;
        this.stack = this.stack && `${name} [${this.code}]${this.stack.slice(20)}`;
    }
    toString() {
        return `${this.name} [${this.code}]: ${this.message}`;
    }
}
class NodeError extends NodeErrorAbstraction {
    constructor(code, message){
        super(Error.prototype.name, code, message);
    }
}
class NodeRangeError extends NodeErrorAbstraction {
    constructor(code, message){
        super(RangeError.prototype.name, code, message);
        Object.setPrototypeOf(this, RangeError.prototype);
        this.toString = function() {
            return `${this.name} [${this.code}]: ${this.message}`;
        };
    }
}
class NodeTypeError extends NodeErrorAbstraction {
    constructor(code, message){
        super(TypeError.prototype.name, code, message);
        Object.setPrototypeOf(this, TypeError.prototype);
        this.toString = function() {
            return `${this.name} [${this.code}]: ${this.message}`;
        };
    }
}
class NodeURIError extends NodeErrorAbstraction {
    constructor(code, message){
        super(URIError.prototype.name, code, message);
        Object.setPrototypeOf(this, URIError.prototype);
        this.toString = function() {
            return `${this.name} [${this.code}]: ${this.message}`;
        };
    }
}
class NodeSystemError extends NodeErrorAbstraction {
    constructor(key, context, msgPrefix){
        let message = `${msgPrefix}: ${context.syscall} returned ` + `${context.code} (${context.message})`;
        if (context.path !== undefined) {
            message += ` ${context.path}`;
        }
        if (context.dest !== undefined) {
            message += ` => ${context.dest}`;
        }
        super("SystemError", key, message);
        captureLargerStackTrace(this);
        Object.defineProperties(this, {
            [kIsNodeError]: {
                value: true,
                enumerable: false,
                writable: false,
                configurable: true
            },
            info: {
                value: context,
                enumerable: true,
                configurable: true,
                writable: false
            },
            errno: {
                get () {
                    return context.errno;
                },
                set: (value)=>{
                    context.errno = value;
                },
                enumerable: true,
                configurable: true
            },
            syscall: {
                get () {
                    return context.syscall;
                },
                set: (value)=>{
                    context.syscall = value;
                },
                enumerable: true,
                configurable: true
            }
        });
        if (context.path !== undefined) {
            Object.defineProperty(this, "path", {
                get () {
                    return context.path;
                },
                set: (value)=>{
                    context.path = value;
                },
                enumerable: true,
                configurable: true
            });
        }
        if (context.dest !== undefined) {
            Object.defineProperty(this, "dest", {
                get () {
                    return context.dest;
                },
                set: (value)=>{
                    context.dest = value;
                },
                enumerable: true,
                configurable: true
            });
        }
    }
    toString() {
        return `${this.name} [${this.code}]: ${this.message}`;
    }
}
function makeSystemErrorWithCode(key, msgPrfix) {
    return class NodeError extends NodeSystemError {
        constructor(ctx){
            super(key, ctx, msgPrfix);
        }
    };
}
makeSystemErrorWithCode("ERR_FS_EISDIR", "Path is a directory");
function createInvalidArgType(name, expected) {
    expected = Array.isArray(expected) ? expected : [
        expected
    ];
    let msg = "The ";
    if (name.endsWith(" argument")) {
        msg += `${name} `;
    } else {
        const type = name.includes(".") ? "property" : "argument";
        msg += `"${name}" ${type} `;
    }
    msg += "must be ";
    const types = [];
    const instances = [];
    const other = [];
    for (const value of expected){
        if (kTypes.includes(value)) {
            types.push(value.toLocaleLowerCase());
        } else if (classRegExp1.test(value)) {
            instances.push(value);
        } else {
            other.push(value);
        }
    }
    if (instances.length > 0) {
        const pos = types.indexOf("object");
        if (pos !== -1) {
            types.splice(pos, 1);
            instances.push("Object");
        }
    }
    if (types.length > 0) {
        if (types.length > 2) {
            const last = types.pop();
            msg += `one of type ${types.join(", ")}, or ${last}`;
        } else if (types.length === 2) {
            msg += `one of type ${types[0]} or ${types[1]}`;
        } else {
            msg += `of type ${types[0]}`;
        }
        if (instances.length > 0 || other.length > 0) {
            msg += " or ";
        }
    }
    if (instances.length > 0) {
        if (instances.length > 2) {
            const last1 = instances.pop();
            msg += `an instance of ${instances.join(", ")}, or ${last1}`;
        } else {
            msg += `an instance of ${instances[0]}`;
            if (instances.length === 2) {
                msg += ` or ${instances[1]}`;
            }
        }
        if (other.length > 0) {
            msg += " or ";
        }
    }
    if (other.length > 0) {
        if (other.length > 2) {
            const last2 = other.pop();
            msg += `one of ${other.join(", ")}, or ${last2}`;
        } else if (other.length === 2) {
            msg += `one of ${other[0]} or ${other[1]}`;
        } else {
            if (other[0].toLowerCase() !== other[0]) {
                msg += "an ";
            }
            msg += `${other[0]}`;
        }
    }
    return msg;
}
class ERR_INVALID_ARG_TYPE_RANGE extends NodeRangeError {
    constructor(name, expected, actual){
        const msg = createInvalidArgType(name, expected);
        super("ERR_INVALID_ARG_TYPE", `${msg}.${invalidArgTypeHelper(actual)}`);
    }
}
class ERR_INVALID_ARG_TYPE extends NodeTypeError {
    constructor(name, expected, actual){
        const msg = createInvalidArgType(name, expected);
        super("ERR_INVALID_ARG_TYPE", `${msg}.${invalidArgTypeHelper(actual)}`);
    }
    static RangeError = ERR_INVALID_ARG_TYPE_RANGE;
}
class ERR_INVALID_ARG_VALUE_RANGE extends NodeRangeError {
    constructor(name, value, reason = "is invalid"){
        const type = name.includes(".") ? "property" : "argument";
        const inspected = inspect1(value);
        super("ERR_INVALID_ARG_VALUE", `The ${type} '${name}' ${reason}. Received ${inspected}`);
    }
}
class ERR_INVALID_ARG_VALUE extends NodeTypeError {
    constructor(name, value, reason = "is invalid"){
        const type = name.includes(".") ? "property" : "argument";
        const inspected = inspect1(value);
        super("ERR_INVALID_ARG_VALUE", `The ${type} '${name}' ${reason}. Received ${inspected}`);
    }
    static RangeError = ERR_INVALID_ARG_VALUE_RANGE;
}
function invalidArgTypeHelper(input) {
    if (input == null) {
        return ` Received ${input}`;
    }
    if (typeof input === "function" && input.name) {
        return ` Received function ${input.name}`;
    }
    if (typeof input === "object") {
        if (input.constructor && input.constructor.name) {
            return ` Received an instance of ${input.constructor.name}`;
        }
        return ` Received ${inspect1(input, {
            depth: -1
        })}`;
    }
    let inspected = inspect1(input, {
        colors: false
    });
    if (inspected.length > 25) {
        inspected = `${inspected.slice(0, 25)}...`;
    }
    return ` Received type ${typeof input} (${inspected})`;
}
class ERR_OUT_OF_RANGE extends RangeError {
    code = "ERR_OUT_OF_RANGE";
    constructor(str, range, input, replaceDefaultBoolean = false){
        assert(range, 'Missing "range" argument');
        let msg = replaceDefaultBoolean ? str : `The value of "${str}" is out of range.`;
        let received;
        if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
            received = addNumericalSeparator(String(input));
        } else if (typeof input === "bigint") {
            received = String(input);
            if (input > 2n ** 32n || input < -(2n ** 32n)) {
                received = addNumericalSeparator(received);
            }
            received += "n";
        } else {
            received = inspect1(input);
        }
        msg += ` It must be ${range}. Received ${received}`;
        super(msg);
        const { name  } = this;
        this.name = `${name} [${this.code}]`;
        this.stack;
        this.name = name;
    }
}
class ERR_BUFFER_OUT_OF_BOUNDS extends NodeRangeError {
    constructor(name){
        super("ERR_BUFFER_OUT_OF_BOUNDS", name ? `"${name}" is outside of buffer bounds` : "Attempt to access memory outside buffer bounds");
    }
}
class ERR_INVALID_CALLBACK extends NodeTypeError {
    constructor(object){
        super("ERR_INVALID_CALLBACK", `Callback must be a function. Received ${inspect1(object)}`);
    }
}
class ERR_INVALID_URI extends NodeURIError {
    constructor(){
        super("ERR_INVALID_URI", `URI malformed`);
    }
}
class ERR_IPC_CHANNEL_CLOSED extends NodeError {
    constructor(){
        super("ERR_IPC_CHANNEL_CLOSED", `Channel closed`);
    }
}
class ERR_SOCKET_BAD_PORT extends NodeRangeError {
    constructor(name, port, allowZero = true){
        assert(typeof allowZero === "boolean", "The 'allowZero' argument must be of type boolean.");
        const operator = allowZero ? ">=" : ">";
        super("ERR_SOCKET_BAD_PORT", `${name} should be ${operator} 0 and < 65536. Received ${port}.`);
    }
}
class ERR_UNKNOWN_ENCODING extends NodeTypeError {
    constructor(x){
        super("ERR_UNKNOWN_ENCODING", `Unknown encoding: ${x}`);
    }
}
codes.ERR_IPC_CHANNEL_CLOSED = ERR_IPC_CHANNEL_CLOSED;
codes.ERR_INVALID_ARG_TYPE = ERR_INVALID_ARG_TYPE;
codes.ERR_INVALID_ARG_VALUE = ERR_INVALID_ARG_VALUE;
codes.ERR_INVALID_CALLBACK = ERR_INVALID_CALLBACK;
codes.ERR_OUT_OF_RANGE = ERR_OUT_OF_RANGE;
codes.ERR_SOCKET_BAD_PORT = ERR_SOCKET_BAD_PORT;
codes.ERR_BUFFER_OUT_OF_BOUNDS = ERR_BUFFER_OUT_OF_BOUNDS;
codes.ERR_UNKNOWN_ENCODING = ERR_UNKNOWN_ENCODING;
hideStackFrames(function genericNodeError(message, errorProperties) {
    const err = new Error(message);
    Object.assign(err, errorProperties);
    return err;
});
const CHAR_FORWARD_SLASH1 = 47;
function assertPath1(path) {
    if (typeof path !== "string") {
        throw new ERR_INVALID_ARG_TYPE("path", [
            "string"
        ], path);
    }
}
function isPosixPathSeparator1(code) {
    return code === 47;
}
function isPathSeparator1(code) {
    return isPosixPathSeparator1(code) || code === 92;
}
function isWindowsDeviceRoot1(code) {
    return code >= 97 && code <= 122 || code >= 65 && code <= 90;
}
function normalizeString1(path, allowAboveRoot, separator, isPathSeparator) {
    let res = "";
    let lastSegmentLength = 0;
    let lastSlash = -1;
    let dots = 0;
    let code;
    for(let i1 = 0, len = path.length; i1 <= len; ++i1){
        if (i1 < len) code = path.charCodeAt(i1);
        else if (isPathSeparator(code)) break;
        else code = CHAR_FORWARD_SLASH1;
        if (isPathSeparator(code)) {
            if (lastSlash === i1 - 1 || dots === 1) {} else if (lastSlash !== i1 - 1 && dots === 2) {
                if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
                    if (res.length > 2) {
                        const lastSlashIndex = res.lastIndexOf(separator);
                        if (lastSlashIndex === -1) {
                            res = "";
                            lastSegmentLength = 0;
                        } else {
                            res = res.slice(0, lastSlashIndex);
                            lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
                        }
                        lastSlash = i1;
                        dots = 0;
                        continue;
                    } else if (res.length === 2 || res.length === 1) {
                        res = "";
                        lastSegmentLength = 0;
                        lastSlash = i1;
                        dots = 0;
                        continue;
                    }
                }
                if (allowAboveRoot) {
                    if (res.length > 0) res += `${separator}..`;
                    else res = "..";
                    lastSegmentLength = 2;
                }
            } else {
                if (res.length > 0) res += separator + path.slice(lastSlash + 1, i1);
                else res = path.slice(lastSlash + 1, i1);
                lastSegmentLength = i1 - lastSlash - 1;
            }
            lastSlash = i1;
            dots = 0;
        } else if (code === 46 && dots !== -1) {
            ++dots;
        } else {
            dots = -1;
        }
    }
    return res;
}
function _format1(sep, pathObject) {
    const dir = pathObject.dir || pathObject.root;
    const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
    if (!dir) return base;
    if (dir === pathObject.root) return dir + base;
    return dir + sep + base;
}
const WHITESPACE_ENCODINGS1 = {
    "\u0009": "%09",
    "\u000A": "%0A",
    "\u000B": "%0B",
    "\u000C": "%0C",
    "\u000D": "%0D",
    "\u0020": "%20"
};
function encodeWhitespace1(string) {
    return string.replaceAll(/[\s]/g, (c)=>{
        return WHITESPACE_ENCODINGS1[c] ?? c;
    });
}
const sep3 = "\\";
const delimiter3 = ";";
function resolve3(...pathSegments) {
    let resolvedDevice = "";
    let resolvedTail = "";
    let resolvedAbsolute = false;
    for(let i1 = pathSegments.length - 1; i1 >= -1; i1--){
        let path;
        const { Deno: Deno1  } = globalThis;
        if (i1 >= 0) {
            path = pathSegments[i1];
        } else if (!resolvedDevice) {
            if (typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a drive-letter-less path without a CWD.");
            }
            path = Deno1.cwd();
        } else {
            if (typeof Deno1?.env?.get !== "function" || typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a relative path without a CWD.");
            }
            path = Deno1.cwd();
            if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
                path = `${resolvedDevice}\\`;
            }
        }
        assertPath1(path);
        const len = path.length;
        if (len === 0) continue;
        let rootEnd = 0;
        let device = "";
        let isAbsolute = false;
        const code = path.charCodeAt(0);
        if (len > 1) {
            if (isPathSeparator1(code)) {
                isAbsolute = true;
                if (isPathSeparator1(path.charCodeAt(1))) {
                    let j = 2;
                    let last = j;
                    for(; j < len; ++j){
                        if (isPathSeparator1(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        const firstPart = path.slice(last, j);
                        last = j;
                        for(; j < len; ++j){
                            if (!isPathSeparator1(path.charCodeAt(j))) break;
                        }
                        if (j < len && j !== last) {
                            last = j;
                            for(; j < len; ++j){
                                if (isPathSeparator1(path.charCodeAt(j))) break;
                            }
                            if (j === len) {
                                device = `\\\\${firstPart}\\${path.slice(last)}`;
                                rootEnd = j;
                            } else if (j !== last) {
                                device = `\\\\${firstPart}\\${path.slice(last, j)}`;
                                rootEnd = j;
                            }
                        }
                    }
                } else {
                    rootEnd = 1;
                }
            } else if (isWindowsDeviceRoot1(code)) {
                if (path.charCodeAt(1) === 58) {
                    device = path.slice(0, 2);
                    rootEnd = 2;
                    if (len > 2) {
                        if (isPathSeparator1(path.charCodeAt(2))) {
                            isAbsolute = true;
                            rootEnd = 3;
                        }
                    }
                }
            }
        } else if (isPathSeparator1(code)) {
            rootEnd = 1;
            isAbsolute = true;
        }
        if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
            continue;
        }
        if (resolvedDevice.length === 0 && device.length > 0) {
            resolvedDevice = device;
        }
        if (!resolvedAbsolute) {
            resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
            resolvedAbsolute = isAbsolute;
        }
        if (resolvedAbsolute && resolvedDevice.length > 0) break;
    }
    resolvedTail = normalizeString1(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator1);
    return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
}
function normalize4(path) {
    assertPath1(path);
    const len = path.length;
    if (len === 0) return ".";
    let rootEnd = 0;
    let device;
    let isAbsolute = false;
    const code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator1(code)) {
            isAbsolute = true;
            if (isPathSeparator1(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator1(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    const firstPart = path.slice(last, j);
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator1(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator1(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            return `\\\\${firstPart}\\${path.slice(last)}\\`;
                        } else if (j !== last) {
                            device = `\\\\${firstPart}\\${path.slice(last, j)}`;
                            rootEnd = j;
                        }
                    }
                }
            } else {
                rootEnd = 1;
            }
        } else if (isWindowsDeviceRoot1(code)) {
            if (path.charCodeAt(1) === 58) {
                device = path.slice(0, 2);
                rootEnd = 2;
                if (len > 2) {
                    if (isPathSeparator1(path.charCodeAt(2))) {
                        isAbsolute = true;
                        rootEnd = 3;
                    }
                }
            }
        }
    } else if (isPathSeparator1(code)) {
        return "\\";
    }
    let tail;
    if (rootEnd < len) {
        tail = normalizeString1(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator1);
    } else {
        tail = "";
    }
    if (tail.length === 0 && !isAbsolute) tail = ".";
    if (tail.length > 0 && isPathSeparator1(path.charCodeAt(len - 1))) {
        tail += "\\";
    }
    if (device === undefined) {
        if (isAbsolute) {
            if (tail.length > 0) return `\\${tail}`;
            else return "\\";
        } else if (tail.length > 0) {
            return tail;
        } else {
            return "";
        }
    } else if (isAbsolute) {
        if (tail.length > 0) return `${device}\\${tail}`;
        else return `${device}\\`;
    } else if (tail.length > 0) {
        return device + tail;
    } else {
        return device;
    }
}
function isAbsolute3(path) {
    assertPath1(path);
    const len = path.length;
    if (len === 0) return false;
    const code = path.charCodeAt(0);
    if (isPathSeparator1(code)) {
        return true;
    } else if (isWindowsDeviceRoot1(code)) {
        if (len > 2 && path.charCodeAt(1) === 58) {
            if (isPathSeparator1(path.charCodeAt(2))) return true;
        }
    }
    return false;
}
function join6(...paths) {
    const pathsCount = paths.length;
    if (pathsCount === 0) return ".";
    let joined;
    let firstPart = null;
    for(let i1 = 0; i1 < pathsCount; ++i1){
        const path = paths[i1];
        assertPath1(path);
        if (path.length > 0) {
            if (joined === undefined) joined = firstPart = path;
            else joined += `\\${path}`;
        }
    }
    if (joined === undefined) return ".";
    let needsReplace = true;
    let slashCount = 0;
    assert(firstPart != null);
    if (isPathSeparator1(firstPart.charCodeAt(0))) {
        ++slashCount;
        const firstLen = firstPart.length;
        if (firstLen > 1) {
            if (isPathSeparator1(firstPart.charCodeAt(1))) {
                ++slashCount;
                if (firstLen > 2) {
                    if (isPathSeparator1(firstPart.charCodeAt(2))) ++slashCount;
                    else {
                        needsReplace = false;
                    }
                }
            }
        }
    }
    if (needsReplace) {
        for(; slashCount < joined.length; ++slashCount){
            if (!isPathSeparator1(joined.charCodeAt(slashCount))) break;
        }
        if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`;
    }
    return normalize4(joined);
}
function relative3(from, to) {
    assertPath1(from);
    assertPath1(to);
    if (from === to) return "";
    const fromOrig = resolve3(from);
    const toOrig = resolve3(to);
    if (fromOrig === toOrig) return "";
    from = fromOrig.toLowerCase();
    to = toOrig.toLowerCase();
    if (from === to) return "";
    let fromStart = 0;
    let fromEnd = from.length;
    for(; fromStart < fromEnd; ++fromStart){
        if (from.charCodeAt(fromStart) !== 92) break;
    }
    for(; fromEnd - 1 > fromStart; --fromEnd){
        if (from.charCodeAt(fromEnd - 1) !== 92) break;
    }
    const fromLen = fromEnd - fromStart;
    let toStart = 0;
    let toEnd = to.length;
    for(; toStart < toEnd; ++toStart){
        if (to.charCodeAt(toStart) !== 92) break;
    }
    for(; toEnd - 1 > toStart; --toEnd){
        if (to.charCodeAt(toEnd - 1) !== 92) break;
    }
    const toLen = toEnd - toStart;
    const length = fromLen < toLen ? fromLen : toLen;
    let lastCommonSep = -1;
    let i1 = 0;
    for(; i1 <= length; ++i1){
        if (i1 === length) {
            if (toLen > length) {
                if (to.charCodeAt(toStart + i1) === 92) {
                    return toOrig.slice(toStart + i1 + 1);
                } else if (i1 === 2) {
                    return toOrig.slice(toStart + i1);
                }
            }
            if (fromLen > length) {
                if (from.charCodeAt(fromStart + i1) === 92) {
                    lastCommonSep = i1;
                } else if (i1 === 2) {
                    lastCommonSep = 3;
                }
            }
            break;
        }
        const fromCode = from.charCodeAt(fromStart + i1);
        const toCode = to.charCodeAt(toStart + i1);
        if (fromCode !== toCode) break;
        else if (fromCode === 92) lastCommonSep = i1;
    }
    if (i1 !== length && lastCommonSep === -1) {
        return toOrig;
    }
    let out = "";
    if (lastCommonSep === -1) lastCommonSep = 0;
    for(i1 = fromStart + lastCommonSep + 1; i1 <= fromEnd; ++i1){
        if (i1 === fromEnd || from.charCodeAt(i1) === 92) {
            if (out.length === 0) out += "..";
            else out += "\\..";
        }
    }
    if (out.length > 0) {
        return out + toOrig.slice(toStart + lastCommonSep, toEnd);
    } else {
        toStart += lastCommonSep;
        if (toOrig.charCodeAt(toStart) === 92) ++toStart;
        return toOrig.slice(toStart, toEnd);
    }
}
function toNamespacedPath3(path) {
    if (typeof path !== "string") return path;
    if (path.length === 0) return "";
    const resolvedPath = resolve3(path);
    if (resolvedPath.length >= 3) {
        if (resolvedPath.charCodeAt(0) === 92) {
            if (resolvedPath.charCodeAt(1) === 92) {
                const code = resolvedPath.charCodeAt(2);
                if (code !== 63 && code !== 46) {
                    return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
                }
            }
        } else if (isWindowsDeviceRoot1(resolvedPath.charCodeAt(0))) {
            if (resolvedPath.charCodeAt(1) === 58 && resolvedPath.charCodeAt(2) === 92) {
                return `\\\\?\\${resolvedPath}`;
            }
        }
    }
    return path;
}
function dirname3(path) {
    assertPath1(path);
    const len = path.length;
    if (len === 0) return ".";
    let rootEnd = -1;
    let end = -1;
    let matchedSlash = true;
    let offset = 0;
    const code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator1(code)) {
            rootEnd = offset = 1;
            if (isPathSeparator1(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator1(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator1(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator1(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            return path;
                        }
                        if (j !== last) {
                            rootEnd = offset = j + 1;
                        }
                    }
                }
            }
        } else if (isWindowsDeviceRoot1(code)) {
            if (path.charCodeAt(1) === 58) {
                rootEnd = offset = 2;
                if (len > 2) {
                    if (isPathSeparator1(path.charCodeAt(2))) rootEnd = offset = 3;
                }
            }
        }
    } else if (isPathSeparator1(code)) {
        return path;
    }
    for(let i1 = len - 1; i1 >= offset; --i1){
        if (isPathSeparator1(path.charCodeAt(i1))) {
            if (!matchedSlash) {
                end = i1;
                break;
            }
        } else {
            matchedSlash = false;
        }
    }
    if (end === -1) {
        if (rootEnd === -1) return ".";
        else end = rootEnd;
    }
    return path.slice(0, end);
}
function basename3(path, ext = "") {
    if (ext !== undefined && typeof ext !== "string") {
        throw new ERR_INVALID_ARG_TYPE("ext", [
            "string"
        ], ext);
    }
    assertPath1(path);
    let start = 0;
    let end = -1;
    let matchedSlash = true;
    let i1;
    if (path.length >= 2) {
        const drive = path.charCodeAt(0);
        if (isWindowsDeviceRoot1(drive)) {
            if (path.charCodeAt(1) === 58) start = 2;
        }
    }
    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
        if (ext.length === path.length && ext === path) return "";
        let extIdx = ext.length - 1;
        let firstNonSlashEnd = -1;
        for(i1 = path.length - 1; i1 >= start; --i1){
            const code = path.charCodeAt(i1);
            if (isPathSeparator1(code)) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else {
                if (firstNonSlashEnd === -1) {
                    matchedSlash = false;
                    firstNonSlashEnd = i1 + 1;
                }
                if (extIdx >= 0) {
                    if (code === ext.charCodeAt(extIdx)) {
                        if (--extIdx === -1) {
                            end = i1;
                        }
                    } else {
                        extIdx = -1;
                        end = firstNonSlashEnd;
                    }
                }
            }
        }
        if (start === end) end = firstNonSlashEnd;
        else if (end === -1) end = path.length;
        return path.slice(start, end);
    } else {
        for(i1 = path.length - 1; i1 >= start; --i1){
            if (isPathSeparator1(path.charCodeAt(i1))) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else if (end === -1) {
                matchedSlash = false;
                end = i1 + 1;
            }
        }
        if (end === -1) return "";
        return path.slice(start, end);
    }
}
function extname3(path) {
    assertPath1(path);
    let start = 0;
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let preDotState = 0;
    if (path.length >= 2 && path.charCodeAt(1) === 58 && isWindowsDeviceRoot1(path.charCodeAt(0))) {
        start = startPart = 2;
    }
    for(let i1 = path.length - 1; i1 >= start; --i1){
        const code = path.charCodeAt(i1);
        if (isPathSeparator1(code)) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        return "";
    }
    return path.slice(startDot, end);
}
function format3(pathObject) {
    if (pathObject === null || typeof pathObject !== "object") {
        throw new ERR_INVALID_ARG_TYPE("pathObject", [
            "Object"
        ], pathObject);
    }
    return _format1("\\", pathObject);
}
function parse7(path) {
    assertPath1(path);
    const ret = {
        root: "",
        dir: "",
        base: "",
        ext: "",
        name: ""
    };
    const len = path.length;
    if (len === 0) return ret;
    let rootEnd = 0;
    let code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator1(code)) {
            rootEnd = 1;
            if (isPathSeparator1(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator1(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator1(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator1(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            rootEnd = j;
                        } else if (j !== last) {
                            rootEnd = j + 1;
                        }
                    }
                }
            }
        } else if (isWindowsDeviceRoot1(code)) {
            if (path.charCodeAt(1) === 58) {
                rootEnd = 2;
                if (len > 2) {
                    if (isPathSeparator1(path.charCodeAt(2))) {
                        if (len === 3) {
                            ret.root = ret.dir = path;
                            return ret;
                        }
                        rootEnd = 3;
                    }
                } else {
                    ret.root = ret.dir = path;
                    return ret;
                }
            }
        }
    } else if (isPathSeparator1(code)) {
        ret.root = ret.dir = path;
        return ret;
    }
    if (rootEnd > 0) ret.root = path.slice(0, rootEnd);
    let startDot = -1;
    let startPart = rootEnd;
    let end = -1;
    let matchedSlash = true;
    let i1 = path.length - 1;
    let preDotState = 0;
    for(; i1 >= rootEnd; --i1){
        code = path.charCodeAt(i1);
        if (isPathSeparator1(code)) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        if (end !== -1) {
            ret.base = ret.name = path.slice(startPart, end);
        }
    } else {
        ret.name = path.slice(startPart, startDot);
        ret.base = path.slice(startPart, end);
        ret.ext = path.slice(startDot, end);
    }
    if (startPart > 0 && startPart !== rootEnd) {
        ret.dir = path.slice(0, startPart - 1);
    } else ret.dir = ret.root;
    return ret;
}
function fromFileUrl3(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol != "file:") {
        throw new TypeError("Must be a file URL.");
    }
    let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
    if (url.hostname != "") {
        path = `\\\\${url.hostname}${path}`;
    }
    return path;
}
function toFileUrl3(path) {
    if (!isAbsolute3(path)) {
        throw new TypeError("Must be an absolute path.");
    }
    const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
    const url = new URL("file:///");
    url.pathname = encodeWhitespace1(pathname.replace(/%/g, "%25"));
    if (hostname != null && hostname != "localhost") {
        url.hostname = hostname;
        if (!url.hostname) {
            throw new TypeError("Invalid hostname.");
        }
    }
    return url;
}
const __default2 = {
    basename: basename3,
    delimiter: delimiter3,
    dirname: dirname3,
    extname: extname3,
    format: format3,
    fromFileUrl: fromFileUrl3,
    isAbsolute: isAbsolute3,
    join: join6,
    normalize: normalize4,
    parse: parse7,
    relative: relative3,
    resolve: resolve3,
    sep: sep3,
    toFileUrl: toFileUrl3,
    toNamespacedPath: toNamespacedPath3
};
const mod5 = {
    sep: sep3,
    delimiter: delimiter3,
    resolve: resolve3,
    normalize: normalize4,
    isAbsolute: isAbsolute3,
    join: join6,
    relative: relative3,
    toNamespacedPath: toNamespacedPath3,
    dirname: dirname3,
    basename: basename3,
    extname: extname3,
    format: format3,
    parse: parse7,
    fromFileUrl: fromFileUrl3,
    toFileUrl: toFileUrl3,
    default: __default2
};
const sep4 = "/";
const delimiter4 = ":";
function resolve4(...pathSegments) {
    let resolvedPath = "";
    let resolvedAbsolute = false;
    for(let i1 = pathSegments.length - 1; i1 >= -1 && !resolvedAbsolute; i1--){
        let path;
        if (i1 >= 0) path = pathSegments[i1];
        else {
            const { Deno: Deno1  } = globalThis;
            if (typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a relative path without a CWD.");
            }
            path = Deno1.cwd();
        }
        assertPath1(path);
        if (path.length === 0) {
            continue;
        }
        resolvedPath = `${path}/${resolvedPath}`;
        resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH1;
    }
    resolvedPath = normalizeString1(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator1);
    if (resolvedAbsolute) {
        if (resolvedPath.length > 0) return `/${resolvedPath}`;
        else return "/";
    } else if (resolvedPath.length > 0) return resolvedPath;
    else return ".";
}
function normalize5(path) {
    assertPath1(path);
    if (path.length === 0) return ".";
    const isAbsolute = path.charCodeAt(0) === 47;
    const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
    path = normalizeString1(path, !isAbsolute, "/", isPosixPathSeparator1);
    if (path.length === 0 && !isAbsolute) path = ".";
    if (path.length > 0 && trailingSeparator) path += "/";
    if (isAbsolute) return `/${path}`;
    return path;
}
function isAbsolute4(path) {
    assertPath1(path);
    return path.length > 0 && path.charCodeAt(0) === 47;
}
function join7(...paths) {
    if (paths.length === 0) return ".";
    let joined;
    for(let i1 = 0, len = paths.length; i1 < len; ++i1){
        const path = paths[i1];
        assertPath1(path);
        if (path.length > 0) {
            if (!joined) joined = path;
            else joined += `/${path}`;
        }
    }
    if (!joined) return ".";
    return normalize5(joined);
}
function relative4(from, to) {
    assertPath1(from);
    assertPath1(to);
    if (from === to) return "";
    from = resolve4(from);
    to = resolve4(to);
    if (from === to) return "";
    let fromStart = 1;
    const fromEnd = from.length;
    for(; fromStart < fromEnd; ++fromStart){
        if (from.charCodeAt(fromStart) !== 47) break;
    }
    const fromLen = fromEnd - fromStart;
    let toStart = 1;
    const toEnd = to.length;
    for(; toStart < toEnd; ++toStart){
        if (to.charCodeAt(toStart) !== 47) break;
    }
    const toLen = toEnd - toStart;
    const length = fromLen < toLen ? fromLen : toLen;
    let lastCommonSep = -1;
    let i1 = 0;
    for(; i1 <= length; ++i1){
        if (i1 === length) {
            if (toLen > length) {
                if (to.charCodeAt(toStart + i1) === 47) {
                    return to.slice(toStart + i1 + 1);
                } else if (i1 === 0) {
                    return to.slice(toStart + i1);
                }
            } else if (fromLen > length) {
                if (from.charCodeAt(fromStart + i1) === 47) {
                    lastCommonSep = i1;
                } else if (i1 === 0) {
                    lastCommonSep = 0;
                }
            }
            break;
        }
        const fromCode = from.charCodeAt(fromStart + i1);
        const toCode = to.charCodeAt(toStart + i1);
        if (fromCode !== toCode) break;
        else if (fromCode === 47) lastCommonSep = i1;
    }
    let out = "";
    for(i1 = fromStart + lastCommonSep + 1; i1 <= fromEnd; ++i1){
        if (i1 === fromEnd || from.charCodeAt(i1) === 47) {
            if (out.length === 0) out += "..";
            else out += "/..";
        }
    }
    if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
    else {
        toStart += lastCommonSep;
        if (to.charCodeAt(toStart) === 47) ++toStart;
        return to.slice(toStart);
    }
}
function toNamespacedPath4(path) {
    return path;
}
function dirname4(path) {
    assertPath1(path);
    if (path.length === 0) return ".";
    const hasRoot = path.charCodeAt(0) === 47;
    let end = -1;
    let matchedSlash = true;
    for(let i1 = path.length - 1; i1 >= 1; --i1){
        if (path.charCodeAt(i1) === 47) {
            if (!matchedSlash) {
                end = i1;
                break;
            }
        } else {
            matchedSlash = false;
        }
    }
    if (end === -1) return hasRoot ? "/" : ".";
    if (hasRoot && end === 1) return "//";
    return path.slice(0, end);
}
function basename4(path, ext = "") {
    if (ext !== undefined && typeof ext !== "string") {
        throw new ERR_INVALID_ARG_TYPE("ext", [
            "string"
        ], ext);
    }
    assertPath1(path);
    let start = 0;
    let end = -1;
    let matchedSlash = true;
    let i1;
    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
        if (ext.length === path.length && ext === path) return "";
        let extIdx = ext.length - 1;
        let firstNonSlashEnd = -1;
        for(i1 = path.length - 1; i1 >= 0; --i1){
            const code = path.charCodeAt(i1);
            if (code === 47) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else {
                if (firstNonSlashEnd === -1) {
                    matchedSlash = false;
                    firstNonSlashEnd = i1 + 1;
                }
                if (extIdx >= 0) {
                    if (code === ext.charCodeAt(extIdx)) {
                        if (--extIdx === -1) {
                            end = i1;
                        }
                    } else {
                        extIdx = -1;
                        end = firstNonSlashEnd;
                    }
                }
            }
        }
        if (start === end) end = firstNonSlashEnd;
        else if (end === -1) end = path.length;
        return path.slice(start, end);
    } else {
        for(i1 = path.length - 1; i1 >= 0; --i1){
            if (path.charCodeAt(i1) === 47) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else if (end === -1) {
                matchedSlash = false;
                end = i1 + 1;
            }
        }
        if (end === -1) return "";
        return path.slice(start, end);
    }
}
function extname4(path) {
    assertPath1(path);
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let preDotState = 0;
    for(let i1 = path.length - 1; i1 >= 0; --i1){
        const code = path.charCodeAt(i1);
        if (code === 47) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        return "";
    }
    return path.slice(startDot, end);
}
function format4(pathObject) {
    if (pathObject === null || typeof pathObject !== "object") {
        throw new ERR_INVALID_ARG_TYPE("pathObject", [
            "Object"
        ], pathObject);
    }
    return _format1("/", pathObject);
}
function parse8(path) {
    assertPath1(path);
    const ret = {
        root: "",
        dir: "",
        base: "",
        ext: "",
        name: ""
    };
    if (path.length === 0) return ret;
    const isAbsolute = path.charCodeAt(0) === 47;
    let start;
    if (isAbsolute) {
        ret.root = "/";
        start = 1;
    } else {
        start = 0;
    }
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let i1 = path.length - 1;
    let preDotState = 0;
    for(; i1 >= start; --i1){
        const code = path.charCodeAt(i1);
        if (code === 47) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        if (end !== -1) {
            if (startPart === 0 && isAbsolute) {
                ret.base = ret.name = path.slice(1, end);
            } else {
                ret.base = ret.name = path.slice(startPart, end);
            }
        }
    } else {
        if (startPart === 0 && isAbsolute) {
            ret.name = path.slice(1, startDot);
            ret.base = path.slice(1, end);
        } else {
            ret.name = path.slice(startPart, startDot);
            ret.base = path.slice(startPart, end);
        }
        ret.ext = path.slice(startDot, end);
    }
    if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
    else if (isAbsolute) ret.dir = "/";
    return ret;
}
function fromFileUrl4(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol != "file:") {
        throw new TypeError("Must be a file URL.");
    }
    return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
}
function toFileUrl4(path) {
    if (!isAbsolute4(path)) {
        throw new TypeError("Must be an absolute path.");
    }
    const url = new URL("file:///");
    url.pathname = encodeWhitespace1(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
    return url;
}
const __default3 = {
    basename: basename4,
    delimiter: delimiter4,
    dirname: dirname4,
    extname: extname4,
    format: format4,
    fromFileUrl: fromFileUrl4,
    isAbsolute: isAbsolute4,
    join: join7,
    normalize: normalize5,
    parse: parse8,
    relative: relative4,
    resolve: resolve4,
    sep: sep4,
    toFileUrl: toFileUrl4,
    toNamespacedPath: toNamespacedPath4
};
const mod6 = {
    sep: sep4,
    delimiter: delimiter4,
    resolve: resolve4,
    normalize: normalize5,
    isAbsolute: isAbsolute4,
    join: join7,
    relative: relative4,
    toNamespacedPath: toNamespacedPath4,
    dirname: dirname4,
    basename: basename4,
    extname: extname4,
    format: format4,
    parse: parse8,
    fromFileUrl: fromFileUrl4,
    toFileUrl: toFileUrl4,
    default: __default3
};
const SEP1 = isWindows1 ? "\\" : "/";
const SEP_PATTERN1 = isWindows1 ? /[\\/]+/ : /\/+/;
function common1(paths, sep = SEP1) {
    const [first = "", ...remaining] = paths;
    if (first === "" || remaining.length === 0) {
        return first.substring(0, first.lastIndexOf(sep) + 1);
    }
    const parts = first.split(sep);
    let endOfPrefix = parts.length;
    for (const path of remaining){
        const compare = path.split(sep);
        for(let i1 = 0; i1 < endOfPrefix; i1++){
            if (compare[i1] !== parts[i1]) {
                endOfPrefix = i1;
            }
        }
        if (endOfPrefix === 0) {
            return "";
        }
    }
    const prefix = parts.slice(0, endOfPrefix).join(sep);
    return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`;
}
const path2 = isWindows1 ? mod5 : mod6;
const { join: join8 , normalize: normalize6  } = path2;
const regExpEscapeChars2 = [
    "!",
    "$",
    "(",
    ")",
    "*",
    "+",
    ".",
    "=",
    "?",
    "[",
    "\\",
    "^",
    "{",
    "|", 
];
const rangeEscapeChars2 = [
    "-",
    "\\",
    "]"
];
function globToRegExp2(glob, { extended =true , globstar: globstarOption = true , os =osType , caseInsensitive =false  } = {}) {
    if (glob == "") {
        return /(?!)/;
    }
    const sep = os == "windows" ? "(?:\\\\|/)+" : "/+";
    const sepMaybe = os == "windows" ? "(?:\\\\|/)*" : "/*";
    const seps = os == "windows" ? [
        "\\",
        "/"
    ] : [
        "/"
    ];
    const globstar = os == "windows" ? "(?:[^\\\\/]*(?:\\\\|/|$)+)*" : "(?:[^/]*(?:/|$)+)*";
    const wildcard = os == "windows" ? "[^\\\\/]*" : "[^/]*";
    const escapePrefix = os == "windows" ? "`" : "\\";
    let newLength = glob.length;
    for(; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--);
    glob = glob.slice(0, newLength);
    let regExpString = "";
    for(let j = 0; j < glob.length;){
        let segment = "";
        const groupStack = [];
        let inRange = false;
        let inEscape = false;
        let endsWithSep = false;
        let i1 = j;
        for(; i1 < glob.length && !seps.includes(glob[i1]); i1++){
            if (inEscape) {
                inEscape = false;
                const escapeChars = inRange ? rangeEscapeChars2 : regExpEscapeChars2;
                segment += escapeChars.includes(glob[i1]) ? `\\${glob[i1]}` : glob[i1];
                continue;
            }
            if (glob[i1] == escapePrefix) {
                inEscape = true;
                continue;
            }
            if (glob[i1] == "[") {
                if (!inRange) {
                    inRange = true;
                    segment += "[";
                    if (glob[i1 + 1] == "!") {
                        i1++;
                        segment += "^";
                    } else if (glob[i1 + 1] == "^") {
                        i1++;
                        segment += "\\^";
                    }
                    continue;
                } else if (glob[i1 + 1] == ":") {
                    let k = i1 + 1;
                    let value = "";
                    while(glob[k + 1] != null && glob[k + 1] != ":"){
                        value += glob[k + 1];
                        k++;
                    }
                    if (glob[k + 1] == ":" && glob[k + 2] == "]") {
                        i1 = k + 2;
                        if (value == "alnum") segment += "\\dA-Za-z";
                        else if (value == "alpha") segment += "A-Za-z";
                        else if (value == "ascii") segment += "\x00-\x7F";
                        else if (value == "blank") segment += "\t ";
                        else if (value == "cntrl") segment += "\x00-\x1F\x7F";
                        else if (value == "digit") segment += "\\d";
                        else if (value == "graph") segment += "\x21-\x7E";
                        else if (value == "lower") segment += "a-z";
                        else if (value == "print") segment += "\x20-\x7E";
                        else if (value == "punct") {
                            segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
                        } else if (value == "space") segment += "\\s\v";
                        else if (value == "upper") segment += "A-Z";
                        else if (value == "word") segment += "\\w";
                        else if (value == "xdigit") segment += "\\dA-Fa-f";
                        continue;
                    }
                }
            }
            if (glob[i1] == "]" && inRange) {
                inRange = false;
                segment += "]";
                continue;
            }
            if (inRange) {
                if (glob[i1] == "\\") {
                    segment += `\\\\`;
                } else {
                    segment += glob[i1];
                }
                continue;
            }
            if (glob[i1] == ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] != "BRACE") {
                segment += ")";
                const type = groupStack.pop();
                if (type == "!") {
                    segment += wildcard;
                } else if (type != "@") {
                    segment += type;
                }
                continue;
            }
            if (glob[i1] == "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] != "BRACE") {
                segment += "|";
                continue;
            }
            if (glob[i1] == "+" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("+");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "@" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("@");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "?") {
                if (extended && glob[i1 + 1] == "(") {
                    i1++;
                    groupStack.push("?");
                    segment += "(?:";
                } else {
                    segment += ".";
                }
                continue;
            }
            if (glob[i1] == "!" && extended && glob[i1 + 1] == "(") {
                i1++;
                groupStack.push("!");
                segment += "(?!";
                continue;
            }
            if (glob[i1] == "{") {
                groupStack.push("BRACE");
                segment += "(?:";
                continue;
            }
            if (glob[i1] == "}" && groupStack[groupStack.length - 1] == "BRACE") {
                groupStack.pop();
                segment += ")";
                continue;
            }
            if (glob[i1] == "," && groupStack[groupStack.length - 1] == "BRACE") {
                segment += "|";
                continue;
            }
            if (glob[i1] == "*") {
                if (extended && glob[i1 + 1] == "(") {
                    i1++;
                    groupStack.push("*");
                    segment += "(?:";
                } else {
                    const prevChar = glob[i1 - 1];
                    let numStars = 1;
                    while(glob[i1 + 1] == "*"){
                        i1++;
                        numStars++;
                    }
                    const nextChar = glob[i1 + 1];
                    if (globstarOption && numStars == 2 && [
                        ...seps,
                        undefined
                    ].includes(prevChar) && [
                        ...seps,
                        undefined
                    ].includes(nextChar)) {
                        segment += globstar;
                        endsWithSep = true;
                    } else {
                        segment += wildcard;
                    }
                }
                continue;
            }
            segment += regExpEscapeChars2.includes(glob[i1]) ? `\\${glob[i1]}` : glob[i1];
        }
        if (groupStack.length > 0 || inRange || inEscape) {
            segment = "";
            for (const c of glob.slice(j, i1)){
                segment += regExpEscapeChars2.includes(c) ? `\\${c}` : c;
                endsWithSep = false;
            }
        }
        regExpString += segment;
        if (!endsWithSep) {
            regExpString += i1 < glob.length ? sep : sepMaybe;
            endsWithSep = true;
        }
        while(seps.includes(glob[i1]))i1++;
        if (!(i1 > j)) {
            throw new Error("Assertion failure: i > j (potential infinite loop)");
        }
        j = i1;
    }
    regExpString = `^${regExpString}$`;
    return new RegExp(regExpString, caseInsensitive ? "i" : "");
}
function isGlob1(str) {
    const chars = {
        "{": "}",
        "(": ")",
        "[": "]"
    };
    const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
    if (str === "") {
        return false;
    }
    let match;
    while(match = regex.exec(str)){
        if (match[2]) return true;
        let idx = match.index + match[0].length;
        const open = match[1];
        const close = open ? chars[open] : null;
        if (open && close) {
            const n = str.indexOf(close, idx);
            if (n !== -1) {
                idx = n + 1;
            }
        }
        str = str.slice(idx);
    }
    return false;
}
function normalizeGlob1(glob, { globstar =false  } = {}) {
    if (glob.match(/\0/g)) {
        throw new Error(`Glob contains invalid characters: "${glob}"`);
    }
    if (!globstar) {
        return normalize6(glob);
    }
    const s = SEP_PATTERN1.source;
    const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
    return normalize6(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
}
function joinGlobs1(globs, { extended =true , globstar =false  } = {}) {
    if (!globstar || globs.length == 0) {
        return join8(...globs);
    }
    if (globs.length === 0) return ".";
    let joined;
    for (const glob of globs){
        const path = glob;
        if (path.length > 0) {
            if (!joined) joined = path;
            else joined += `${SEP1}${path}`;
        }
    }
    if (!joined) return ".";
    return normalizeGlob1(joined, {
        extended,
        globstar
    });
}
const path3 = isWindows1 ? __default2 : __default3;
const { basename: basename5 , delimiter: delimiter5 , dirname: dirname5 , extname: extname5 , format: format5 , fromFileUrl: fromFileUrl5 , isAbsolute: isAbsolute5 , join: join9 , normalize: normalize7 , parse: parse9 , relative: relative5 , resolve: resolve5 , sep: sep5 , toFileUrl: toFileUrl5 , toNamespacedPath: toNamespacedPath5 ,  } = path3;
const mod7 = {
    SEP: SEP1,
    SEP_PATTERN: SEP_PATTERN1,
    win32: __default2,
    posix: __default3,
    basename: basename5,
    delimiter: delimiter5,
    dirname: dirname5,
    extname: extname5,
    format: format5,
    fromFileUrl: fromFileUrl5,
    isAbsolute: isAbsolute5,
    join: join9,
    normalize: normalize7,
    parse: parse9,
    relative: relative5,
    resolve: resolve5,
    sep: sep5,
    toFileUrl: toFileUrl5,
    toNamespacedPath: toNamespacedPath5,
    common: common1,
    globToRegExp: globToRegExp2,
    isGlob: isGlob1,
    normalizeGlob: normalizeGlob1,
    joinGlobs: joinGlobs1
};
({
    ...mod7
});
"use strict";
const base = 36;
const damp = 700;
const delimiter6 = "-";
const regexNonASCII = /[^\0-\x7E]/;
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
const errors = {
    "overflow": "Overflow: input needs wider integers to process",
    "not-basic": "Illegal input >= 0x80 (not a basic code point)",
    "invalid-input": "Invalid input"
};
const baseMinusTMin = 36 - 1;
function error2(type) {
    throw new RangeError(errors[type]);
}
function mapDomain(str, fn) {
    const parts = str.split("@");
    let result1 = "";
    if (parts.length > 1) {
        result1 = parts[0] + "@";
        str = parts[1];
    }
    str = str.replace(regexSeparators, "\x2E");
    const labels = str.split(".");
    const encoded = labels.map(fn).join(".");
    return result1 + encoded;
}
function ucs2decode(str) {
    const output = [];
    let counter = 0;
    const length = str.length;
    while(counter < length){
        const value = str.charCodeAt(counter++);
        if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
            const extra = str.charCodeAt(counter++);
            if ((extra & 0xFC00) == 0xDC00) {
                output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
            } else {
                output.push(value);
                counter--;
            }
        } else {
            output.push(value);
        }
    }
    return output;
}
function digitToBasic(digit, flag) {
    return digit + 22 + 75 * Number(digit < 26) - (Number(flag != 0) << 5);
}
function adapt(delta, numPoints, firstTime) {
    let k = 0;
    delta = firstTime ? Math.floor(delta / damp) : delta >> 1;
    delta += Math.floor(delta / numPoints);
    for(; delta > baseMinusTMin * 26 >> 1; k += base){
        delta = Math.floor(delta / baseMinusTMin);
    }
    return Math.floor(k + (baseMinusTMin + 1) * delta / (delta + 38));
}
function encode2(str) {
    const output = [];
    const input = ucs2decode(str);
    const inputLength = input.length;
    let n = 128;
    let delta = 0;
    let bias = 72;
    for (const currentValue of input){
        if (currentValue < 0x80) {
            output.push(String.fromCharCode(currentValue));
        }
    }
    const basicLength = output.length;
    let handledCPCount = basicLength;
    if (basicLength) {
        output.push(delimiter6);
    }
    while(handledCPCount < inputLength){
        let m = 2147483647;
        for (const currentValue1 of input){
            if (currentValue1 >= n && currentValue1 < m) {
                m = currentValue1;
            }
        }
        const handledCPCountPlusOne = handledCPCount + 1;
        if (m - n > Math.floor((2147483647 - delta) / handledCPCountPlusOne)) {
            error2("overflow");
        }
        delta += (m - n) * handledCPCountPlusOne;
        n = m;
        for (const currentValue2 of input){
            if (currentValue2 < n && ++delta > 2147483647) {
                error2("overflow");
            }
            if (currentValue2 == n) {
                let q = delta;
                for(let k = 36;; k += base){
                    const t = k <= bias ? 1 : k >= bias + 26 ? 26 : k - bias;
                    if (q < t) {
                        break;
                    }
                    const qMinusT = q - t;
                    const baseMinusT = 36 - t;
                    output.push(String.fromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
                    q = Math.floor(qMinusT / baseMinusT);
                }
                output.push(String.fromCharCode(digitToBasic(q, 0)));
                bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
                delta = 0;
                ++handledCPCount;
            }
        }
        ++delta;
        ++n;
    }
    return output.join("");
}
function toASCII(input) {
    return mapDomain(input, function(str) {
        return regexNonASCII.test(str) ? "xn--" + encode2(str) : str;
    });
}
const hexTable = new Array(256);
for(let i6 = 0; i6 < 256; ++i6){
    hexTable[i6] = "%" + ((i6 < 16 ? "0" : "") + i6.toString(16)).toUpperCase();
}
new Int8Array([
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    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,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    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
]);
function encodeStr(str, noEscapeTable, hexTable) {
    const len = str.length;
    if (len === 0) return "";
    let out = "";
    let lastPos = 0;
    for(let i1 = 0; i1 < len; i1++){
        let c = str.charCodeAt(i1);
        if (c < 0x80) {
            if (noEscapeTable[c] === 1) continue;
            if (lastPos < i1) out += str.slice(lastPos, i1);
            lastPos = i1 + 1;
            out += hexTable[c];
            continue;
        }
        if (lastPos < i1) out += str.slice(lastPos, i1);
        if (c < 0x800) {
            lastPos = i1 + 1;
            out += hexTable[0xc0 | c >> 6] + hexTable[0x80 | c & 0x3f];
            continue;
        }
        if (c < 0xd800 || c >= 0xe000) {
            lastPos = i1 + 1;
            out += hexTable[0xe0 | c >> 12] + hexTable[0x80 | c >> 6 & 0x3f] + hexTable[0x80 | c & 0x3f];
            continue;
        }
        ++i1;
        if (i1 >= len) throw new ERR_INVALID_URI();
        const c2 = str.charCodeAt(i1) & 0x3ff;
        lastPos = i1 + 1;
        c = 0x10000 + ((c & 0x3ff) << 10 | c2);
        out += hexTable[0xf0 | c >> 18] + hexTable[0x80 | c >> 12 & 0x3f] + hexTable[0x80 | c >> 6 & 0x3f] + hexTable[0x80 | c & 0x3f];
    }
    if (lastPos === 0) return str;
    if (lastPos < len) return out + str.slice(lastPos);
    return out;
}
const decode2 = parse10;
const encode3 = stringify2;
function qsEscape(str) {
    if (typeof str !== "string") {
        if (typeof str === "object") {
            str = String(str);
        } else {
            str += "";
        }
    }
    return encodeStr(str, noEscape, hexTable);
}
const escape2 = qsEscape;
const isHexTable = new Int8Array([
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    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,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    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
]);
function charCodes(str) {
    const ret = new Array(str.length);
    for(let i1 = 0; i1 < str.length; ++i1){
        ret[i1] = str.charCodeAt(i1);
    }
    return ret;
}
function addKeyVal(obj, key, value, keyEncoded, valEncoded, decode) {
    if (key.length > 0 && keyEncoded) {
        key = decode(key);
    }
    if (value.length > 0 && valEncoded) {
        value = decode(value);
    }
    if (obj[key] === undefined) {
        obj[key] = value;
    } else {
        const curValue = obj[key];
        if (curValue.pop) {
            curValue[curValue.length] = value;
        } else {
            obj[key] = [
                curValue,
                value
            ];
        }
    }
}
function parse10(str, sep = "&", eq = "=", { decodeURIComponent: decodeURIComponent1 = unescape1 , maxKeys =1000  } = {}) {
    const obj = Object.create(null);
    if (typeof str !== "string" || str.length === 0) {
        return obj;
    }
    const sepCodes = !sep ? [
        38
    ] : charCodes(String(sep));
    const eqCodes = !eq ? [
        61
    ] : charCodes(String(eq));
    const sepLen = sepCodes.length;
    const eqLen = eqCodes.length;
    let pairs = 1000;
    if (typeof maxKeys === "number") {
        pairs = maxKeys > 0 ? maxKeys : -1;
    }
    let decode = unescape1;
    if (decodeURIComponent1) {
        decode = decodeURIComponent1;
    }
    const customDecode = decode !== unescape1;
    let lastPos = 0;
    let sepIdx = 0;
    let eqIdx = 0;
    let key = "";
    let value = "";
    let keyEncoded = customDecode;
    let valEncoded = customDecode;
    const plusChar = customDecode ? "%20" : " ";
    let encodeCheck = 0;
    for(let i1 = 0; i1 < str.length; ++i1){
        const code = str.charCodeAt(i1);
        if (code === sepCodes[sepIdx]) {
            if (++sepIdx === sepLen) {
                const end = i1 - sepIdx + 1;
                if (eqIdx < eqLen) {
                    if (lastPos < end) {
                        key += str.slice(lastPos, end);
                    } else if (key.length === 0) {
                        if (--pairs === 0) {
                            return obj;
                        }
                        lastPos = i1 + 1;
                        sepIdx = eqIdx = 0;
                        continue;
                    }
                } else if (lastPos < end) {
                    value += str.slice(lastPos, end);
                }
                addKeyVal(obj, key, value, keyEncoded, valEncoded, decode);
                if (--pairs === 0) {
                    return obj;
                }
                key = value = "";
                encodeCheck = 0;
                lastPos = i1 + 1;
                sepIdx = eqIdx = 0;
            }
        } else {
            sepIdx = 0;
            if (eqIdx < eqLen) {
                if (code === eqCodes[eqIdx]) {
                    if (++eqIdx === eqLen) {
                        const end1 = i1 - eqIdx + 1;
                        if (lastPos < end1) {
                            key += str.slice(lastPos, end1);
                        }
                        encodeCheck = 0;
                        lastPos = i1 + 1;
                    }
                    continue;
                } else {
                    eqIdx = 0;
                    if (!keyEncoded) {
                        if (code === 37) {
                            encodeCheck = 1;
                            continue;
                        } else if (encodeCheck > 0) {
                            if (isHexTable[code] === 1) {
                                if (++encodeCheck === 3) {
                                    keyEncoded = true;
                                }
                                continue;
                            } else {
                                encodeCheck = 0;
                            }
                        }
                    }
                }
                if (code === 43) {
                    if (lastPos < i1) {
                        key += str.slice(lastPos, i1);
                    }
                    key += plusChar;
                    lastPos = i1 + 1;
                    continue;
                }
            }
            if (code === 43) {
                if (lastPos < i1) {
                    value += str.slice(lastPos, i1);
                }
                value += plusChar;
                lastPos = i1 + 1;
            } else if (!valEncoded) {
                if (code === 37) {
                    encodeCheck = 1;
                } else if (encodeCheck > 0) {
                    if (isHexTable[code] === 1) {
                        if (++encodeCheck === 3) {
                            valEncoded = true;
                        }
                    } else {
                        encodeCheck = 0;
                    }
                }
            }
        }
    }
    if (lastPos < str.length) {
        if (eqIdx < eqLen) {
            key += str.slice(lastPos);
        } else if (sepIdx < sepLen) {
            value += str.slice(lastPos);
        }
    } else if (eqIdx === 0 && key.length === 0) {
        return obj;
    }
    addKeyVal(obj, key, value, keyEncoded, valEncoded, decode);
    return obj;
}
const noEscape = new Int8Array([
    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,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    0,
    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,
    0,
    1,
    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,
    0
]);
function stringifyPrimitive(v) {
    if (typeof v === "string") {
        return v;
    }
    if (typeof v === "number" && isFinite(v)) {
        return "" + v;
    }
    if (typeof v === "bigint") {
        return "" + v;
    }
    if (typeof v === "boolean") {
        return v ? "true" : "false";
    }
    return "";
}
function encodeStringifiedCustom(v, encode) {
    return encode(stringifyPrimitive(v));
}
function encodeStringified(v, encode) {
    if (typeof v === "string") {
        return v.length ? encode(v) : "";
    }
    if (typeof v === "number" && isFinite(v)) {
        return Math.abs(v) < 1e21 ? "" + v : encode("" + v);
    }
    if (typeof v === "bigint") {
        return "" + v;
    }
    if (typeof v === "boolean") {
        return v ? "true" : "false";
    }
    return "";
}
function stringify2(obj, sep, eq, options) {
    sep ||= "&";
    eq ||= "=";
    const encode = options ? options.encodeURIComponent : qsEscape;
    const convert = options ? encodeStringifiedCustom : encodeStringified;
    if (obj !== null && typeof obj === "object") {
        const keys = Object.keys(obj);
        const len = keys.length;
        let fields = "";
        for(let i1 = 0; i1 < len; ++i1){
            const k = keys[i1];
            const v = obj[k];
            let ks = convert(k, encode);
            ks += eq;
            if (Array.isArray(v)) {
                const vlen = v.length;
                if (vlen === 0) continue;
                if (fields) {
                    fields += sep;
                }
                for(let j = 0; j < vlen; ++j){
                    if (j) {
                        fields += sep;
                    }
                    fields += ks;
                    fields += convert(v[j], encode);
                }
            } else {
                if (fields) {
                    fields += sep;
                }
                fields += ks;
                fields += convert(v, encode);
            }
        }
        return fields;
    }
    return "";
}
const unhexTable = new Int8Array([
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -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,
    +2,
    +3,
    +4,
    +5,
    +6,
    +7,
    +8,
    +9,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    10,
    11,
    12,
    13,
    14,
    15,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    10,
    11,
    12,
    13,
    14,
    15,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1,
    -1
]);
function unescapeBuffer(s, decodeSpaces = false) {
    const out = new Buffer3(s.length);
    let index = 0;
    let outIndex = 0;
    let currentChar;
    let nextChar;
    let hexHigh;
    let hexLow;
    const maxLength = s.length - 2;
    let hasHex = false;
    while(index < s.length){
        currentChar = s.charCodeAt(index);
        if (currentChar === 43 && decodeSpaces) {
            out[outIndex++] = 32;
            index++;
            continue;
        }
        if (currentChar === 37 && index < maxLength) {
            currentChar = s.charCodeAt(++index);
            hexHigh = unhexTable[currentChar];
            if (!(hexHigh >= 0)) {
                out[outIndex++] = 37;
                continue;
            } else {
                nextChar = s.charCodeAt(++index);
                hexLow = unhexTable[nextChar];
                if (!(hexLow >= 0)) {
                    out[outIndex++] = 37;
                    index--;
                } else {
                    hasHex = true;
                    currentChar = hexHigh * 16 + hexLow;
                }
            }
        }
        out[outIndex++] = currentChar;
        index++;
    }
    return hasHex ? out.slice(0, outIndex) : out;
}
function qsUnescape(s) {
    try {
        return decodeURIComponent(s);
    } catch  {
        return unescapeBuffer(s).toString();
    }
}
const unescape1 = qsUnescape;
const __default4 = {
    parse: parse10,
    stringify: stringify2,
    decode: decode2,
    encode: encode3,
    unescape: unescape1,
    escape: escape2,
    unescapeBuffer
};
const protocolPattern = /^[a-z0-9.+-]+:/i;
const portPattern = /:[0-9]*$/;
const hostPattern = /^\/\/[^@/]+@[^@/]+/;
const simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/;
const unsafeProtocol = new Set([
    "javascript",
    "javascript:"
]);
const hostlessProtocol = new Set([
    "javascript",
    "javascript:"
]);
const slashedProtocol = new Set([
    "http",
    "http:",
    "https",
    "https:",
    "ftp",
    "ftp:",
    "gopher",
    "gopher:",
    "file",
    "file:",
    "ws",
    "ws:",
    "wss",
    "wss:", 
]);
const noEscapeAuth = new Int8Array([
    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,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    0,
    0,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    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,
    0,
    1,
    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,
    0
]);
URL;
class Url {
    protocol;
    slashes;
    auth;
    host;
    port;
    hostname;
    hash;
    search;
    query;
    pathname;
    path;
    href;
    constructor(){
        this.protocol = null;
        this.slashes = null;
        this.auth = null;
        this.host = null;
        this.port = null;
        this.hostname = null;
        this.hash = null;
        this.search = null;
        this.query = null;
        this.pathname = null;
        this.path = null;
        this.href = null;
    }
    #parseHost() {
        let host = this.host || "";
        let port = portPattern.exec(host);
        if (port) {
            port = port[0];
            if (port !== ":") {
                this.port = port.slice(1);
            }
            host = host.slice(0, host.length - port.length);
        }
        if (host) this.hostname = host;
    }
    resolve(relative) {
        return this.resolveObject(parse11(relative, false, true)).format();
    }
    resolveObject(relative) {
        if (typeof relative === "string") {
            const rel = new Url();
            rel.urlParse(relative, false, true);
            relative = rel;
        }
        const result1 = new Url();
        const tkeys = Object.keys(this);
        for(let tk = 0; tk < tkeys.length; tk++){
            const tkey = tkeys[tk];
            result1[tkey] = this[tkey];
        }
        result1.hash = relative.hash;
        if (relative.href === "") {
            result1.href = result1.format();
            return result1;
        }
        if (relative.slashes && !relative.protocol) {
            const rkeys = Object.keys(relative);
            for(let rk = 0; rk < rkeys.length; rk++){
                const rkey = rkeys[rk];
                if (rkey !== "protocol") result1[rkey] = relative[rkey];
            }
            if (result1.protocol && slashedProtocol.has(result1.protocol) && result1.hostname && !result1.pathname) {
                result1.path = result1.pathname = "/";
            }
            result1.href = result1.format();
            return result1;
        }
        if (relative.protocol && relative.protocol !== result1.protocol) {
            if (!slashedProtocol.has(relative.protocol)) {
                const keys = Object.keys(relative);
                for(let v = 0; v < keys.length; v++){
                    const k = keys[v];
                    result1[k] = relative[k];
                }
                result1.href = result1.format();
                return result1;
            }
            result1.protocol = relative.protocol;
            if (!relative.host && !/^file:?$/.test(relative.protocol) && !hostlessProtocol.has(relative.protocol)) {
                const relPath = (relative.pathname || "").split("/");
                while(relPath.length && !(relative.host = relPath.shift() || null));
                if (!relative.host) relative.host = "";
                if (!relative.hostname) relative.hostname = "";
                if (relPath[0] !== "") relPath.unshift("");
                if (relPath.length < 2) relPath.unshift("");
                result1.pathname = relPath.join("/");
            } else {
                result1.pathname = relative.pathname;
            }
            result1.search = relative.search;
            result1.query = relative.query;
            result1.host = relative.host || "";
            result1.auth = relative.auth;
            result1.hostname = relative.hostname || relative.host;
            result1.port = relative.port;
            if (result1.pathname || result1.search) {
                const p = result1.pathname || "";
                const s = result1.search || "";
                result1.path = p + s;
            }
            result1.slashes = result1.slashes || relative.slashes;
            result1.href = result1.format();
            return result1;
        }
        const isSourceAbs = result1.pathname && result1.pathname.charAt(0) === "/";
        const isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === "/";
        let mustEndAbs = isRelAbs || isSourceAbs || result1.host && relative.pathname;
        const removeAllDots = mustEndAbs;
        let srcPath = result1.pathname && result1.pathname.split("/") || [];
        const relPath1 = relative.pathname && relative.pathname.split("/") || [];
        const noLeadingSlashes = result1.protocol && !slashedProtocol.has(result1.protocol);
        if (noLeadingSlashes) {
            result1.hostname = "";
            result1.port = null;
            if (result1.host) {
                if (srcPath[0] === "") srcPath[0] = result1.host;
                else srcPath.unshift(result1.host);
            }
            result1.host = "";
            if (relative.protocol) {
                relative.hostname = null;
                relative.port = null;
                result1.auth = null;
                if (relative.host) {
                    if (relPath1[0] === "") relPath1[0] = relative.host;
                    else relPath1.unshift(relative.host);
                }
                relative.host = null;
            }
            mustEndAbs = mustEndAbs && (relPath1[0] === "" || srcPath[0] === "");
        }
        if (isRelAbs) {
            if (relative.host || relative.host === "") {
                if (result1.host !== relative.host) result1.auth = null;
                result1.host = relative.host;
                result1.port = relative.port;
            }
            if (relative.hostname || relative.hostname === "") {
                if (result1.hostname !== relative.hostname) result1.auth = null;
                result1.hostname = relative.hostname;
            }
            result1.search = relative.search;
            result1.query = relative.query;
            srcPath = relPath1;
        } else if (relPath1.length) {
            if (!srcPath) srcPath = [];
            srcPath.pop();
            srcPath = srcPath.concat(relPath1);
            result1.search = relative.search;
            result1.query = relative.query;
        } else if (relative.search !== null && relative.search !== undefined) {
            if (noLeadingSlashes) {
                result1.hostname = result1.host = srcPath.shift() || null;
                const authInHost = result1.host && result1.host.indexOf("@") > 0 && result1.host.split("@");
                if (authInHost) {
                    result1.auth = authInHost.shift() || null;
                    result1.host = result1.hostname = authInHost.shift() || null;
                }
            }
            result1.search = relative.search;
            result1.query = relative.query;
            if (result1.pathname !== null || result1.search !== null) {
                result1.path = (result1.pathname ? result1.pathname : "") + (result1.search ? result1.search : "");
            }
            result1.href = result1.format();
            return result1;
        }
        if (!srcPath.length) {
            result1.pathname = null;
            if (result1.search) {
                result1.path = "/" + result1.search;
            } else {
                result1.path = null;
            }
            result1.href = result1.format();
            return result1;
        }
        let last = srcPath.slice(-1)[0];
        const hasTrailingSlash = (result1.host || relative.host || srcPath.length > 1) && (last === "." || last === "..") || last === "";
        let up = 0;
        for(let i1 = srcPath.length - 1; i1 >= 0; i1--){
            last = srcPath[i1];
            if (last === ".") {
                srcPath.splice(i1, 1);
            } else if (last === "..") {
                srcPath.splice(i1, 1);
                up++;
            } else if (up) {
                srcPath.splice(i1, 1);
                up--;
            }
        }
        if (!mustEndAbs && !removeAllDots) {
            while(up--){
                srcPath.unshift("..");
            }
        }
        if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) {
            srcPath.unshift("");
        }
        if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") {
            srcPath.push("");
        }
        const isAbsolute = srcPath[0] === "" || srcPath[0] && srcPath[0].charAt(0) === "/";
        if (noLeadingSlashes) {
            result1.hostname = result1.host = isAbsolute ? "" : srcPath.length ? srcPath.shift() || null : "";
            const authInHost1 = result1.host && result1.host.indexOf("@") > 0 ? result1.host.split("@") : false;
            if (authInHost1) {
                result1.auth = authInHost1.shift() || null;
                result1.host = result1.hostname = authInHost1.shift() || null;
            }
        }
        mustEndAbs = mustEndAbs || result1.host && srcPath.length;
        if (mustEndAbs && !isAbsolute) {
            srcPath.unshift("");
        }
        if (!srcPath.length) {
            result1.pathname = null;
            result1.path = null;
        } else {
            result1.pathname = srcPath.join("/");
        }
        if (result1.pathname !== null || result1.search !== null) {
            result1.path = (result1.pathname ? result1.pathname : "") + (result1.search ? result1.search : "");
        }
        result1.auth = relative.auth || result1.auth;
        result1.slashes = result1.slashes || relative.slashes;
        result1.href = result1.format();
        return result1;
    }
    format() {
        let auth = this.auth || "";
        if (auth) {
            auth = encodeStr(auth, noEscapeAuth, hexTable);
            auth += "@";
        }
        let protocol = this.protocol || "";
        let pathname = this.pathname || "";
        let hash = this.hash || "";
        let host = "";
        let query = "";
        if (this.host) {
            host = auth + this.host;
        } else if (this.hostname) {
            host = auth + (this.hostname.includes(":") && !isIpv6Hostname(this.hostname) ? "[" + this.hostname + "]" : this.hostname);
            if (this.port) {
                host += ":" + this.port;
            }
        }
        if (this.query !== null && typeof this.query === "object") {
            query = __default4.stringify(this.query);
        }
        let search = this.search || query && "?" + query || "";
        if (protocol && protocol.charCodeAt(protocol.length - 1) !== 58) {
            protocol += ":";
        }
        let newPathname = "";
        let lastPos = 0;
        for(let i1 = 0; i1 < pathname.length; ++i1){
            switch(pathname.charCodeAt(i1)){
                case 35:
                    if (i1 - lastPos > 0) {
                        newPathname += pathname.slice(lastPos, i1);
                    }
                    newPathname += "%23";
                    lastPos = i1 + 1;
                    break;
                case 63:
                    if (i1 - lastPos > 0) {
                        newPathname += pathname.slice(lastPos, i1);
                    }
                    newPathname += "%3F";
                    lastPos = i1 + 1;
                    break;
            }
        }
        if (lastPos > 0) {
            if (lastPos !== pathname.length) {
                pathname = newPathname + pathname.slice(lastPos);
            } else pathname = newPathname;
        }
        if (this.slashes || slashedProtocol.has(protocol)) {
            if (this.slashes || host) {
                if (pathname && pathname.charCodeAt(0) !== 47) {
                    pathname = "/" + pathname;
                }
                host = "//" + host;
            } else if (protocol.length >= 4 && protocol.charCodeAt(0) === 102 && protocol.charCodeAt(1) === 105 && protocol.charCodeAt(2) === 108 && protocol.charCodeAt(3) === 101) {
                host = "//";
            }
        }
        search = search.replace(/#/g, "%23");
        if (hash && hash.charCodeAt(0) !== 35) {
            hash = "#" + hash;
        }
        if (search && search.charCodeAt(0) !== 63) {
            search = "?" + search;
        }
        return protocol + host + pathname + search + hash;
    }
    urlParse(url, parseQueryString, slashesDenoteHost) {
        let hasHash = false;
        let start = -1;
        let end = -1;
        let rest = "";
        let lastPos = 0;
        for(let i1 = 0, inWs = false, split = false; i1 < url.length; ++i1){
            const code = url.charCodeAt(i1);
            const isWs = code === 32 || code === 9 || code === 13 || code === 10 || code === 12 || code === 160 || code === 65279;
            if (start === -1) {
                if (isWs) continue;
                lastPos = start = i1;
            } else if (inWs) {
                if (!isWs) {
                    end = -1;
                    inWs = false;
                }
            } else if (isWs) {
                end = i1;
                inWs = true;
            }
            if (!split) {
                switch(code){
                    case 35:
                        hasHash = true;
                    case 63:
                        split = true;
                        break;
                    case 92:
                        if (i1 - lastPos > 0) rest += url.slice(lastPos, i1);
                        rest += "/";
                        lastPos = i1 + 1;
                        break;
                }
            } else if (!hasHash && code === 35) {
                hasHash = true;
            }
        }
        if (start !== -1) {
            if (lastPos === start) {
                if (end === -1) {
                    if (start === 0) rest = url;
                    else rest = url.slice(start);
                } else {
                    rest = url.slice(start, end);
                }
            } else if (end === -1 && lastPos < url.length) {
                rest += url.slice(lastPos);
            } else if (end !== -1 && lastPos < end) {
                rest += url.slice(lastPos, end);
            }
        }
        if (!slashesDenoteHost && !hasHash) {
            const simplePath = simplePathPattern.exec(rest);
            if (simplePath) {
                this.path = rest;
                this.href = rest;
                this.pathname = simplePath[1];
                if (simplePath[2]) {
                    this.search = simplePath[2];
                    if (parseQueryString) {
                        this.query = __default4.parse(this.search.slice(1));
                    } else {
                        this.query = this.search.slice(1);
                    }
                } else if (parseQueryString) {
                    this.search = null;
                    this.query = Object.create(null);
                }
                return this;
            }
        }
        let proto = protocolPattern.exec(rest);
        let lowerProto = "";
        if (proto) {
            proto = proto[0];
            lowerProto = proto.toLowerCase();
            this.protocol = lowerProto;
            rest = rest.slice(proto.length);
        }
        let slashes;
        if (slashesDenoteHost || proto || hostPattern.test(rest)) {
            slashes = rest.charCodeAt(0) === CHAR_FORWARD_SLASH && rest.charCodeAt(1) === CHAR_FORWARD_SLASH;
            if (slashes && !(proto && hostlessProtocol.has(lowerProto))) {
                rest = rest.slice(2);
                this.slashes = true;
            }
        }
        if (!hostlessProtocol.has(lowerProto) && (slashes || proto && !slashedProtocol.has(proto))) {
            let hostEnd = -1;
            let atSign = -1;
            let nonHost = -1;
            for(let i11 = 0; i11 < rest.length; ++i11){
                switch(rest.charCodeAt(i11)){
                    case 9:
                    case 10:
                    case 13:
                    case 32:
                    case 34:
                    case 37:
                    case 39:
                    case 59:
                    case 60:
                    case 62:
                    case 92:
                    case 94:
                    case 96:
                    case 123:
                    case 124:
                    case 125:
                        if (nonHost === -1) nonHost = i11;
                        break;
                    case 35:
                    case 47:
                    case 63:
                        if (nonHost === -1) nonHost = i11;
                        hostEnd = i11;
                        break;
                    case 64:
                        atSign = i11;
                        nonHost = -1;
                        break;
                }
                if (hostEnd !== -1) break;
            }
            start = 0;
            if (atSign !== -1) {
                this.auth = decodeURIComponent(rest.slice(0, atSign));
                start = atSign + 1;
            }
            if (nonHost === -1) {
                this.host = rest.slice(start);
                rest = "";
            } else {
                this.host = rest.slice(start, nonHost);
                rest = rest.slice(nonHost);
            }
            this.#parseHost();
            if (typeof this.hostname !== "string") this.hostname = "";
            const hostname = this.hostname;
            const ipv6Hostname = isIpv6Hostname(hostname);
            if (!ipv6Hostname) {
                rest = getHostname(this, rest, hostname);
            }
            if (this.hostname.length > 255) {
                this.hostname = "";
            } else {
                this.hostname = this.hostname.toLowerCase();
            }
            if (!ipv6Hostname) {
                this.hostname = toASCII(this.hostname);
            }
            const p = this.port ? ":" + this.port : "";
            const h = this.hostname || "";
            this.host = h + p;
            if (ipv6Hostname) {
                this.hostname = this.hostname.slice(1, -1);
                if (rest[0] !== "/") {
                    rest = "/" + rest;
                }
            }
        }
        if (!unsafeProtocol.has(lowerProto)) {
            rest = autoEscapeStr(rest);
        }
        let questionIdx = -1;
        let hashIdx = -1;
        for(let i2 = 0; i2 < rest.length; ++i2){
            const code1 = rest.charCodeAt(i2);
            if (code1 === 35) {
                this.hash = rest.slice(i2);
                hashIdx = i2;
                break;
            } else if (code1 === 63 && questionIdx === -1) {
                questionIdx = i2;
            }
        }
        if (questionIdx !== -1) {
            if (hashIdx === -1) {
                this.search = rest.slice(questionIdx);
                this.query = rest.slice(questionIdx + 1);
            } else {
                this.search = rest.slice(questionIdx, hashIdx);
                this.query = rest.slice(questionIdx + 1, hashIdx);
            }
            if (parseQueryString) {
                this.query = __default4.parse(this.query);
            }
        } else if (parseQueryString) {
            this.search = null;
            this.query = Object.create(null);
        }
        const useQuestionIdx = questionIdx !== -1 && (hashIdx === -1 || questionIdx < hashIdx);
        const firstIdx = useQuestionIdx ? questionIdx : hashIdx;
        if (firstIdx === -1) {
            if (rest.length > 0) this.pathname = rest;
        } else if (firstIdx > 0) {
            this.pathname = rest.slice(0, firstIdx);
        }
        if (slashedProtocol.has(lowerProto) && this.hostname && !this.pathname) {
            this.pathname = "/";
        }
        if (this.pathname || this.search) {
            const p1 = this.pathname || "";
            const s = this.search || "";
            this.path = p1 + s;
        }
        this.href = this.format();
        return this;
    }
}
function format6(urlObject, options) {
    if (urlObject instanceof URL) {
        return formatWhatwg(urlObject, options);
    }
    if (typeof urlObject === "string") {
        urlObject = parse11(urlObject, true, false);
    }
    return urlObject.format();
}
function formatWhatwg(urlObject, options) {
    if (typeof urlObject === "string") {
        urlObject = new URL(urlObject);
    }
    if (options) {
        if (typeof options !== "object") {
            throw new ERR_INVALID_ARG_TYPE("options", "object", options);
        }
    }
    options = {
        auth: true,
        fragment: true,
        search: true,
        unicode: false,
        ...options
    };
    let ret = urlObject.protocol;
    if (urlObject.host !== null) {
        ret += "//";
        const hasUsername = !!urlObject.username;
        const hasPassword = !!urlObject.password;
        if (options.auth && (hasUsername || hasPassword)) {
            if (hasUsername) {
                ret += urlObject.username;
            }
            if (hasPassword) {
                ret += `:${urlObject.password}`;
            }
            ret += "@";
        }
        ret += urlObject.host;
        if (urlObject.port) {
            ret += `:${urlObject.port}`;
        }
    }
    ret += urlObject.pathname;
    if (options.search && urlObject.search) {
        ret += urlObject.search;
    }
    if (options.fragment && urlObject.hash) {
        ret += urlObject.hash;
    }
    return ret;
}
function isIpv6Hostname(hostname) {
    return hostname.charCodeAt(0) === 91 && hostname.charCodeAt(hostname.length - 1) === 93;
}
function getHostname(self1, rest, hostname) {
    for(let i1 = 0; i1 < hostname.length; ++i1){
        const code = hostname.charCodeAt(i1);
        const isValid = code >= 97 && code <= 122 || code === 46 || code >= 65 && code <= 90 || code >= 48 && code <= 57 || code === 45 || code === 43 || code === 95 || code > 127;
        if (!isValid) {
            self1.hostname = hostname.slice(0, i1);
            return `/${hostname.slice(i1)}${rest}`;
        }
    }
    return rest;
}
const escapedCodes = [
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "%09",
    "%0A",
    "",
    "",
    "%0D",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "%20",
    "",
    "%22",
    "",
    "",
    "",
    "",
    "%27",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "%3C",
    "",
    "%3E",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "%5C",
    "",
    "%5E",
    "",
    "%60",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    "%7B",
    "%7C",
    "%7D"
];
function autoEscapeStr(rest) {
    let escaped = "";
    let lastEscapedPos = 0;
    for(let i1 = 0; i1 < rest.length; ++i1){
        const escapedChar = escapedCodes[rest.charCodeAt(i1)];
        if (escapedChar) {
            if (i1 > lastEscapedPos) {
                escaped += rest.slice(lastEscapedPos, i1);
            }
            escaped += escapedChar;
            lastEscapedPos = i1 + 1;
        }
    }
    if (lastEscapedPos === 0) {
        return rest;
    }
    if (lastEscapedPos < rest.length) {
        escaped += rest.slice(lastEscapedPos);
    }
    return escaped;
}
function parse11(url, parseQueryString, slashesDenoteHost) {
    if (url instanceof Url) return url;
    const urlObject = new Url();
    urlObject.urlParse(url, parseQueryString, slashesDenoteHost);
    return urlObject;
}
URLSearchParams;
function arrayToObject(parameters) {
    const keyValue = {};
    parameters.forEach((parameter)=>{
        const name = parameter.name;
        delete parameter.name;
        keyValue[name] = parameter;
    });
    return keyValue;
}
function decorate(to, category, object) {
    to.category = category;
    Object.keys(object).forEach((field)=>{
        if (field === "name") {
            return;
        }
        if (category === "type" && field === "properties" || field === "parameters") {
            to[field] = arrayToObject(object[field]);
        } else {
            to[field] = object[field];
        }
    });
}
function addCommand(chrome, domainName, command) {
    const commandName = `${domainName}.${command.name}`;
    const handler = (params, sessionId, callback)=>{
        return chrome.send(commandName, params, sessionId, callback);
    };
    decorate(handler, "command", command);
    chrome[commandName] = chrome[domainName][command.name] = handler;
}
function addEvent(chrome, domainName, event) {
    const eventName = `${domainName}.${event.name}`;
    const handler = (sessionId, handler)=>{
        if (typeof sessionId === "function") {
            handler = sessionId;
            sessionId = undefined;
        }
        const rawEventName = sessionId ? `${eventName}.${sessionId}` : eventName;
        if (typeof handler === "function") {
            chrome.on(rawEventName, handler);
            return ()=>chrome.removeListener(rawEventName, handler);
        } else {
            return new Promise((fulfill, _reject)=>{
                chrome.once(rawEventName, fulfill);
            });
        }
    };
    decorate(handler, "event", event);
    chrome[eventName] = chrome[domainName][event.name] = handler;
}
function addType(chrome, domainName, type) {
    const typeName = `${domainName}.${type.id}`;
    const help = {};
    decorate(help, "type", type);
    chrome[typeName] = chrome[domainName][type.id] = help;
}
function prepare(object, protocol) {
    object.protocol = protocol;
    protocol.domains.forEach((domain)=>{
        const domainName = domain.domain;
        object[domainName] = {};
        (domain.commands || []).forEach((command)=>{
            addCommand(object, domainName, command);
        });
        (domain.events || []).forEach((event)=>{
            addEvent(object, domainName, event);
        });
        (domain.types || []).forEach((type)=>{
            addType(object, domainName, type);
        });
        object[domainName].on = (eventName, handler)=>{
            return object[domainName][eventName](handler);
        };
    });
}
const HOST = "localhost";
const PORT = 9222;
async function externalRequest(options) {
    const url = `${options.protocol}:/${options.host}:${options.port}${options.path}`;
    const response = await fetch(url);
    const text = await response.text();
    if (response.status !== 200) {
        throw new Error(text);
    }
    return text;
}
function devToolsInterface(options, callback) {
    options.host = options.host || HOST;
    options.port = options.port || PORT;
    options.secure = !!options.secure;
    options.useHostName = !!options.useHostName;
    options.alterPath = options.alterPath || ((path)=>path);
    const newOptions = {
        ...options
    };
    newOptions.path = options.alterPath(options.path);
    newOptions.protocol = options.secure ? "https" : "http";
    return externalRequest(newOptions, callback);
}
async function Protocol(options) {
    options.path = "/json/protocol";
    const result1 = await devToolsInterface(options);
    return JSON.parse(result1);
}
async function List(options) {
    options.path = "/json/list";
    const result1 = await devToolsInterface(options);
    return JSON.parse(result1);
}
class ProtocolError extends Error {
    constructor(request, response){
        let { message  } = response;
        if (response.data) {
            message += ` (${response.data})`;
        }
        super(message);
        this.request = request;
        this.response = response;
    }
}
async function tryUntilTimeout(cb, timeout = 3000) {
    const interval = 50;
    let soFar = 0;
    let lastE;
    do {
        try {
            const result1 = await cb();
            return result1;
        } catch (e) {
            lastE = e;
            soFar += interval;
            await new Promise((resolve)=>setTimeout(resolve, 50));
        }
    }while (soFar < timeout)
    throw lastE;
}
class Chrome extends EventEmitter {
    constructor(options, notifier){
        super();
        const defaultTarget = (targets)=>{
            let backup;
            let target = targets.find((target)=>{
                if (target.webSocketDebuggerUrl) {
                    backup = backup || target;
                    return target.type === "page";
                } else {
                    return false;
                }
            });
            target = target || backup;
            if (target) {
                return target;
            } else {
                throw new Error("No inspectable targets");
            }
        };
        options = options || {};
        this.host = options.host || HOST;
        this.port = options.port || PORT;
        this.secure = !!options.secure;
        this.useHostName = !!options.useHostName;
        this.alterPath = options.alterPath || ((path)=>path);
        this.protocol = options.protocol;
        this.local = !!options.local;
        this.target = options.target || defaultTarget;
        this._notifier = notifier;
        this._callbacks = {};
        this._nextCommandId = 1;
        this.webSocketUrl = undefined;
        this._start();
    }
    inspect(_depth, options) {
        options.customInspect = false;
        return Deno.inspect(this, options);
    }
    send(method, params, sessionId, callback) {
        const optionals = Array.from(arguments).slice(1);
        params = optionals.find((x)=>typeof x === "object");
        sessionId = optionals.find((x)=>typeof x === "string");
        callback = optionals.find((x)=>typeof x === "function");
        if (typeof callback === "function") {
            this._enqueueCommand(method, params, sessionId, callback);
            return undefined;
        } else {
            return new Promise((fulfill, reject)=>{
                this._enqueueCommand(method, params, sessionId, (error, response)=>{
                    if (error) {
                        const request = {
                            method,
                            params,
                            sessionId
                        };
                        reject(error instanceof Error ? error : new ProtocolError(request, response));
                    } else {
                        fulfill(response);
                    }
                });
            });
        }
    }
    close(callback) {
        const closeWebSocket = (callback)=>{
            if (this._ws.readyState === 3) {
                callback();
            } else {
                const onclose = this._ws.onclose;
                this._ws.onclose = ()=>{
                    callback();
                    this._ws.onclose = onclose;
                    this._ws.onclose && this._ws.onclose();
                };
                this._ws.close();
            }
        };
        if (typeof callback === "function") {
            closeWebSocket(callback);
            return undefined;
        } else {
            return new Promise((fulfill, _reject)=>{
                closeWebSocket(fulfill);
            });
        }
    }
    async _start() {
        const options = {
            host: this.host,
            port: this.port,
            secure: this.secure,
            useHostName: this.useHostName,
            alterPath: this.alterPath
        };
        try {
            const url = await this._fetchDebuggerURL(options);
            const urlObject = parse11(url);
            urlObject.pathname = options.alterPath(urlObject.pathname);
            this.webSocketUrl = format6(urlObject);
            options.host = urlObject.hostname;
            options.port = urlObject.port || options.port;
            const protocol = await this._fetchProtocol(options);
            prepare(this, protocol);
            await this._connectToWebSocket();
            nextTick(()=>{
                this._notifier.emit("connect", this);
            });
        } catch (err) {
            this._notifier.emit("error", err);
        }
    }
    async _fetchDebuggerURL(options) {
        const userTarget = this.target;
        switch(typeof userTarget){
            case "string":
                {
                    let idOrUrl = userTarget;
                    if (idOrUrl.startsWith("/")) {
                        idOrUrl = `ws://${this.host}:${this.port}${idOrUrl}`;
                    }
                    if (idOrUrl.match(/^wss?:/i)) {
                        return idOrUrl;
                    } else {
                        const targets = await tryUntilTimeout(async ()=>{
                            return await List(options);
                        });
                        const object = targets.find((target)=>target.id === idOrUrl);
                        return object.webSocketDebuggerUrl;
                    }
                }
            case "object":
                {
                    const object1 = userTarget;
                    return object1.webSocketDebuggerUrl;
                }
            case "function":
                {
                    const func = userTarget;
                    const targets1 = await List(options);
                    const result1 = func(targets1);
                    const object2 = typeof result1 === "number" ? targets1[result1] : result1;
                    return object2.webSocketDebuggerUrl;
                }
            default:
                throw new Error(`Invalid target argument "${this.target}"`);
        }
    }
    async _fetchProtocol(options) {
        if (this.protocol) {
            return this.protocol;
        } else {
            options.local = this.local;
            return await Protocol(options);
        }
    }
    _connectToWebSocket() {
        return new Promise((fulfill, reject)=>{
            try {
                if (this.secure) {
                    this.webSocketUrl = this.webSocketUrl.replace(/^ws:/i, "wss:");
                }
                this._ws = new WebSocket(this.webSocketUrl);
            } catch (err) {
                reject(err);
                return;
            }
            this._ws.onopen = ()=>{
                fulfill();
            };
            this._ws.onmessage = (data)=>{
                const message = JSON.parse(data.data);
                this._handleMessage(message);
            };
            this._ws.onclose = (_code)=>{
                this.emit("disconnect");
            };
            this._ws.onerror = (err)=>{
                reject(err);
            };
        });
    }
    _handleMessage(message) {
        if (message.id) {
            const callback = this._callbacks[message.id];
            if (!callback) {
                return;
            }
            if (message.error) {
                callback(true, message.error);
            } else {
                callback(false, message.result || {});
            }
            delete this._callbacks[message.id];
            if (Object.keys(this._callbacks).length === 0) {
                this.emit("ready");
            }
        } else if (message.method) {
            const { method , params , sessionId  } = message;
            this.emit("event", message);
            this.emit(method, params, sessionId);
            this.emit(`${method}.${sessionId}`, params, sessionId);
        }
    }
    _enqueueCommand(method, params, sessionId, callback) {
        const id = this._nextCommandId++;
        const message = {
            id,
            method,
            sessionId,
            params: params || {}
        };
        this._ws.send(JSON.stringify(message));
        this._callbacks[id] = callback;
    }
}
function CDP(options, callback) {
    if (typeof options === "function") {
        callback = options;
        options = undefined;
    }
    const notifier = new EventEmitter();
    if (typeof callback === "function") {
        nextTick(()=>{
            new Chrome(options, notifier);
        });
        return notifier.once("connect", callback);
    } else {
        return new Promise((fulfill, reject)=>{
            notifier.once("connect", fulfill);
            notifier.once("error", reject);
            new Chrome(options, notifier);
        });
    }
}
const base64abc1 = [
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z",
    "a",
    "b",
    "c",
    "d",
    "e",
    "f",
    "g",
    "h",
    "i",
    "j",
    "k",
    "l",
    "m",
    "n",
    "o",
    "p",
    "q",
    "r",
    "s",
    "t",
    "u",
    "v",
    "w",
    "x",
    "y",
    "z",
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "+",
    "/", 
];
function encode4(data) {
    const uint8 = typeof data === "string" ? new TextEncoder().encode(data) : data instanceof Uint8Array ? data : new Uint8Array(data);
    let result1 = "", i1;
    const l1 = uint8.length;
    for(i1 = 2; i1 < l1; i1 += 3){
        result1 += base64abc1[uint8[i1 - 2] >> 2];
        result1 += base64abc1[(uint8[i1 - 2] & 0x03) << 4 | uint8[i1 - 1] >> 4];
        result1 += base64abc1[(uint8[i1 - 1] & 0x0f) << 2 | uint8[i1] >> 6];
        result1 += base64abc1[uint8[i1] & 0x3f];
    }
    if (i1 === l1 + 1) {
        result1 += base64abc1[uint8[i1 - 2] >> 2];
        result1 += base64abc1[(uint8[i1 - 2] & 0x03) << 4];
        result1 += "==";
    }
    if (i1 === l1) {
        result1 += base64abc1[uint8[i1 - 2] >> 2];
        result1 += base64abc1[(uint8[i1 - 2] & 0x03) << 4 | uint8[i1 - 1] >> 4];
        result1 += base64abc1[(uint8[i1 - 1] & 0x0f) << 2];
        result1 += "=";
    }
    return result1;
}
const ESC = "\x1B";
const CSI = `${ESC}[`;
const OSC = `${ESC}]`;
const SEP2 = ";";
const bel = "\u0007";
const cursorPosition = `${CSI}6n`;
function cursorTo(x, y) {
    if (typeof y !== "number") {
        return `${CSI}${x}G`;
    }
    return `${CSI}${y};${x}H`;
}
function cursorMove(x, y) {
    let ret = "";
    if (x < 0) {
        ret += `${CSI}${-x}D`;
    } else if (x > 0) {
        ret += `${CSI}${x}C`;
    }
    if (y < 0) {
        ret += `${CSI}${-y}A`;
    } else if (y > 0) {
        ret += `${CSI}${y}B`;
    }
    return ret;
}
function cursorUp(count = 1) {
    return `${CSI}${count}A`;
}
function cursorDown(count = 1) {
    return `${CSI}${count}B`;
}
function cursorForward(count = 1) {
    return `${CSI}${count}C`;
}
function cursorBackward(count = 1) {
    return `${CSI}${count}D`;
}
function cursorNextLine(count = 1) {
    return `${CSI}E`.repeat(count);
}
function cursorPrevLine(count = 1) {
    return `${CSI}F`.repeat(count);
}
const cursorLeft = `${CSI}G`;
const cursorHide = `${CSI}?25l`;
const cursorShow = `${CSI}?25h`;
const cursorSave = `${ESC}7`;
const cursorRestore = `${ESC}8`;
function scrollUp(count = 1) {
    return `${CSI}S`.repeat(count);
}
function scrollDown(count = 1) {
    return `${CSI}T`.repeat(count);
}
const eraseScreen = `${CSI}2J`;
function eraseUp(count = 1) {
    return `${CSI}1J`.repeat(count);
}
function eraseDown(count = 1) {
    return `${CSI}0J`.repeat(count);
}
const eraseLine = `${CSI}2K`;
const eraseLineEnd = `${CSI}0K`;
const eraseLineStart = `${CSI}1K`;
function eraseLines(count) {
    let clear = "";
    for(let i1 = 0; i1 < count; i1++){
        clear += eraseLine + (i1 < count - 1 ? cursorUp() : "");
    }
    clear += cursorLeft;
    return clear;
}
const clearScreen = "\u001Bc";
const clearTerminal = Deno.build.os === "windows" ? `${eraseScreen}${CSI}0f` : `${eraseScreen}${CSI}3J${CSI}H`;
function link(text, url) {
    return [
        OSC,
        "8",
        SEP2,
        SEP2,
        url,
        bel,
        text,
        OSC,
        "8",
        SEP2,
        SEP2,
        bel, 
    ].join("");
}
function image(buffer, options) {
    let ret = `${OSC}1337;File=inline=1`;
    if (options?.width) {
        ret += `;width=${options.width}`;
    }
    if (options?.height) {
        ret += `;height=${options.height}`;
    }
    if (options?.preserveAspectRatio === false) {
        ret += ";preserveAspectRatio=0";
    }
    return ret + ":" + encode4(buffer) + bel;
}
const mod8 = {
    bel: bel,
    cursorPosition: cursorPosition,
    cursorTo: cursorTo,
    cursorMove: cursorMove,
    cursorUp: cursorUp,
    cursorDown: cursorDown,
    cursorForward: cursorForward,
    cursorBackward: cursorBackward,
    cursorNextLine: cursorNextLine,
    cursorPrevLine: cursorPrevLine,
    cursorLeft: cursorLeft,
    cursorHide: cursorHide,
    cursorShow: cursorShow,
    cursorSave: cursorSave,
    cursorRestore: cursorRestore,
    scrollUp: scrollUp,
    scrollDown: scrollDown,
    eraseScreen: eraseScreen,
    eraseUp: eraseUp,
    eraseDown: eraseDown,
    eraseLine: eraseLine,
    eraseLineEnd: eraseLineEnd,
    eraseLineStart: eraseLineStart,
    eraseLines: eraseLines,
    clearScreen: clearScreen,
    clearTerminal: clearTerminal,
    link: link,
    image: image
};
const ansi1 = factory();
function factory() {
    let result1 = [];
    let stack = [];
    const ansi = function(...args) {
        if (this) {
            if (args.length) {
                update(args);
                return this;
            }
            return this.toString();
        }
        return factory();
    };
    ansi.text = function(text) {
        stack.push([
            text,
            []
        ]);
        return this;
    };
    ansi.toString = function() {
        update();
        const str = result1.join("");
        result1 = [];
        return str;
    };
    ansi.toBuffer = function() {
        return new TextEncoder().encode(this.toString());
    };
    const methodList = Object.entries(mod8);
    for (const [name, method] of methodList){
        Object.defineProperty(ansi, name, {
            get () {
                stack.push([
                    method,
                    []
                ]);
                return this;
            }
        });
    }
    return ansi;
    function update(args) {
        if (!stack.length) {
            return;
        }
        if (args) {
            stack[stack.length - 1][1] = args;
        }
        result1.push(...stack.map(([prop, args])=>typeof prop === "string" ? prop : prop.call(ansi, ...args)));
        stack = [];
    }
}
const proto = Object.create(null);
const methodNames = Object.keys(mod2);
for (const name of methodNames){
    if (name === "setColorEnabled" || name === "getColorEnabled") {
        continue;
    }
    Object.defineProperty(proto, name, {
        get () {
            return factory1([
                ...this._stack,
                name
            ]);
        }
    });
}
factory1();
function factory1(stack = []) {
    const colors = function(str, ...args) {
        if (str) {
            const lastIndex = stack.length - 1;
            return stack.reduce((str, name, index)=>index === lastIndex ? mod2[name](str, ...args) : mod2[name](str), str);
        }
        const tmp = stack.slice();
        stack = [];
        return factory1(tmp);
    };
    Object.setPrototypeOf(colors, proto);
    colors._stack = stack;
    return colors;
}
function getCursorPosition({ stdin =Deno.stdin , stdout =Deno.stdout  } = {}) {
    const data = new Uint8Array(8);
    Deno.setRaw(stdin.rid, true);
    stdout.writeSync(new TextEncoder().encode(cursorPosition));
    stdin.readSync(data);
    Deno.setRaw(stdin.rid, false);
    const [y, x] = new TextDecoder().decode(data).match(/\[(\d+);(\d+)R/)?.slice(1, 3).map(Number) ?? [
        0,
        0
    ];
    return {
        x,
        y
    };
}
const tty = factory2();
function factory2(options) {
    let result1 = "";
    let stack = [];
    const stdout = options?.stdout ?? Deno.stdout;
    const stdin = options?.stdin ?? Deno.stdin;
    const tty = function(...args) {
        if (this) {
            update(args);
            stdout.writeSync(new TextEncoder().encode(result1));
            return this;
        }
        return factory2(args[0] ?? options);
    };
    tty.text = function(text) {
        stack.push([
            text,
            []
        ]);
        update();
        stdout.writeSync(new TextEncoder().encode(result1));
        return this;
    };
    tty.getCursorPosition = ()=>getCursorPosition({
            stdout,
            stdin
        });
    const methodList = Object.entries(mod8);
    for (const [name, method] of methodList){
        if (name === "cursorPosition") {
            continue;
        }
        Object.defineProperty(tty, name, {
            get () {
                stack.push([
                    method,
                    []
                ]);
                return this;
            }
        });
    }
    return tty;
    function update(args) {
        if (!stack.length) {
            return;
        }
        if (args) {
            stack[stack.length - 1][1] = args;
        }
        result1 = stack.reduce((prev, [cur, args])=>prev + (typeof cur === "string" ? cur : cur.call(tty, ...args)), "");
        stack = [];
    }
}
class MultiReader {
    #readers;
    #currentIndex = 0;
    constructor(readers){
        this.#readers = [
            ...readers
        ];
    }
    async read(p) {
        const r = this.#readers[this.#currentIndex];
        if (!r) return null;
        const result1 = await r.read(p);
        if (result1 === null) {
            this.#currentIndex++;
            return 0;
        }
        return result1;
    }
}
BigInt(Number.MAX_SAFE_INTEGER);
new TextDecoder();
const kSpinnerChars = [
    "|",
    "/",
    "-",
    "\\"
];
const kSpinerContainerChars = [
    "(",
    ")"
];
const kSpinerCompleteContainerChars = [
    "[",
    "]"
];
const kSpinnerCompleteChar = Deno.build.os !== "windows" ? "✓" : ">";
const kProgressIncrementChar = "#";
const kProgressContainerChars = [
    "[",
    "]"
];
function progressBar(total, prefixMessage) {
    const isCi = runningInCI();
    if (isCi && prefixMessage) {
        info(prefixMessage);
    }
    const updateProgress = (progress, status)=>{
        if (!isCi) {
            const progressBar = `${asciiProgressBar(progress / total * 100, 35)}`;
            const progressText = `\r${prefixMessage ? prefixMessage + " " : ""}${progressBar}${status ? " " + status : ""}`;
            clearLine();
            info(progressText, {
                newline: false
            });
        }
    };
    return {
        update: updateProgress,
        complete: (finalMsg)=>{
            if (!isCi) {
                clearLine();
            }
            if (typeof finalMsg === "string") {
                if (isCi) {
                    info(finalMsg);
                } else {
                    updateProgress(total, finalMsg);
                }
            } else {
                if (finalMsg !== false && prefixMessage) {
                    completeMessage(prefixMessage);
                } else if (finalMsg !== false) {
                    updateProgress(total);
                }
            }
        }
    };
}
async function withSpinner(options, op) {
    const cancel = spinner(options.message);
    try {
        await op();
    } finally{
        cancel(options.doneMessage);
    }
}
function spinner(status, timeInterval = 100) {
    let spin = 0;
    const statusFn = typeof status === "string" ? ()=>{
        return status;
    } : ()=>{
        if (!runningInCI()) {
            clearLine();
        }
        return status();
    };
    const id = setInterval(()=>{
        const __char = kSpinnerChars[spin % kSpinnerChars.length];
        const msg = `${spinContainer(__char)} ${statusFn()}`;
        if (!runningInCI() || spin === 0) {
            info(`\r${msg}`, {
                newline: false
            });
        }
        spin = spin + 1;
    }, timeInterval);
    return (finalMsg)=>{
        clearInterval(id);
        clearLine();
        if (typeof finalMsg === "string") {
            completeMessage(finalMsg);
        } else {
            if (finalMsg !== false) {
                completeMessage(statusFn());
            }
        }
    };
}
function spinContainer(body) {
    return `${kSpinerContainerChars[0]}${body}${kSpinerContainerChars[1]}`;
}
function completeMessage(msg) {
    info(`\r${kSpinerCompleteContainerChars[0]}${kSpinnerCompleteChar}${kSpinerCompleteContainerChars[1]} ${msg}`, {
        newline: true
    });
}
function writeFileToStdout(file) {
    const df = Deno.openSync(file, {
        read: true
    });
    const contents = readAllSync(df);
    writeAllSync(Deno.stdout, contents);
    Deno.close(df.rid);
}
function clearLine() {
    info(ansi1.eraseLine.cursorLeft(), {
        newline: false
    });
}
function asciiProgressBar(percent, width = 25) {
    const segsComplete = Math.floor(percent / (100 / width));
    let progressBar = kProgressContainerChars[0];
    for(let i1 = 0; i1 < width; i1++){
        progressBar = progressBar + (i1 < segsComplete ? kProgressIncrementChar : " ");
    }
    progressBar = progressBar + kProgressContainerChars[1];
    return progressBar;
}
async function readRegistryKey(registryPath, keyname) {
    const defaultKeyname = keyname === "(Default)";
    const args = [
        "query",
        registryPath
    ];
    if (defaultKeyname) {
        args.push("/ve");
    } else {
        args.push("/v");
        args.push(keyname);
    }
    const safeArgs = requireQuoting(args);
    const result1 = await safeWindowsExec("reg.exe", safeArgs.args, (cmd)=>{
        return execProcess({
            cmd,
            stdout: "piped",
            stderr: "piped"
        });
    });
    if (result1.success) {
        const output = result1.stdout;
        const regexStr = (defaultKeyname ? "" : ` *${keyname}`) + ` *(?:REG_SZ|REG_MULTI_SZ|REG_EXPAND_SZ|REG_DWORD|REG_BINARY|REG_NONE) *(.*)$`;
        const match = output?.match(RegExp(regexStr, "m"));
        if (match) {
            return match[1];
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
const tokenPath = join3(quartoCacheDir(), "codepage");
async function cacheCodePage() {
    if (!existsSync(tokenPath)) {
        const value = await registryReadString([
            kHKeyLocalMachine,
            kHKeyCurrentUser
        ], "SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage", "ACP");
        if (value) {
            Deno.writeTextFileSync(tokenPath, value);
        }
    }
}
function clearCodePageCache() {
    if (existsSync(tokenPath)) {
        Deno.removeSync(tokenPath);
    }
}
function readCodePageCache() {
    const codepage = Deno.readTextFileSync(tokenPath);
    if (codepage) {
        return codepage;
    } else {
        return undefined;
    }
}
function readCodePage() {
    const readCache = ()=>{
        const codepage = readCodePageCache();
        if (codepage) {
            return codepage;
        }
    };
    try {
        return readCache();
    } catch  {
        try {
            cacheCodePage();
            return readCache();
        } catch  {
            return undefined;
        }
    }
}
function requireQuoting(args) {
    let requireQuoting = false;
    if (Deno.build.os === "windows") {
        const shellCharReg = new RegExp("[ <>()|\\:&;#?*']");
        args = args.map((a)=>{
            if (shellCharReg.test(a)) {
                requireQuoting = true;
                return `"${a}"`;
            } else {
                return a;
            }
        });
    }
    return {
        status: requireQuoting,
        args: args
    };
}
async function safeWindowsExec(program, args, fnExec) {
    const tempFile = Deno.makeTempFileSync({
        prefix: "quarto-safe-exec",
        suffix: ".bat"
    });
    try {
        Deno.writeTextFileSync(tempFile, [
            program,
            ...args
        ].join(" ") + "\n");
        return await fnExec([
            "cmd",
            "/c",
            tempFile
        ]);
    } finally{
        removeIfExists(tempFile);
    }
}
let puppeteerImport = undefined;
function chromiumInstallDir() {
    return quartoDataDir("chromium");
}
let puppeteerUrl = "puppeteer/mod.ts";
async function getPuppeteer() {
    if (puppeteerImport !== undefined) {
        return puppeteerImport;
    }
    puppeteerImport = (await import(puppeteerUrl)).default;
    return puppeteerImport;
}
async function findChrome() {
    let path;
    if (Deno.build.os === "darwin") {
        path = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
    } else if (Deno.build.os === "linux") {
        path = await which("google-chrome");
        if (!path) {
            path = await which("chromium-browser");
        }
    } else if (Deno.build.os === "windows") {
        const programs = [
            "chrome.exe",
            "msedge.exe"
        ];
        for(let i1 = 0; i1 < programs.length; i1++){
            path = await readRegistryKey("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\" + programs[i1], "(Default)");
            if (path && existsSync(path)) break;
        }
        if (!path) {
            const regKeys = [
                "ChromeHTML",
                "MSEdgeHTM"
            ];
            for(let i11 = 0; i11 < regKeys.length; i11++){
                path = await readRegistryKey(`HKCR\\${regKeys[i11]}\\shell\\open\\command`, "(Default)");
                path = path?.match(/"(.*)"/);
                path = path ? path[1] : undefined;
                if (path && existsSync(path)) break;
            }
        }
    }
    return path;
}
async function installDir() {
    if (await installed()) {
        return Promise.resolve(chromiumInstallDir());
    } else {
        return Promise.resolve(undefined);
    }
}
const chromiumInstallable = {
    name: "Chromium",
    prereqs: [],
    installed,
    installedVersion,
    latestRelease,
    preparePackage,
    install,
    afterInstall,
    uninstall,
    installDir
};
async function installed() {
    const fetcherObj = await fetcher();
    const version = await supportedRevision();
    const localRevisions = await fetcherObj.localRevisions();
    return localRevisions.includes(version);
}
async function installedVersion() {
    const fetcherObj = await fetcher();
    const localRevisions = await fetcherObj.localRevisions();
    if (localRevisions.length) {
        return localRevisions[localRevisions.length - 1];
    }
}
async function latestRelease() {
    const fetcherObj = await fetcher();
    const version = await supportedRevision();
    const revisionInfo = await fetcherObj.revisionInfo(version);
    return Promise.resolve({
        url: revisionInfo.url,
        version,
        assets: [
            {
                name: "",
                url: ""
            }
        ]
    });
}
async function preparePackage(_ctx) {
    const revision = await supportedRevision();
    const progress = progressBar(100, `Downloading Chromium ${revision}`);
    let spinnerStatus;
    const fetcherObj = await fetcher();
    const revisionInfo = await fetcherObj.download(revision, (x, total)=>{
        const percent = x / total * 100;
        if (percent < 100) {
            progress.update(percent);
        } else {
            progress.complete(true);
            clearLine();
            spinnerStatus = spinner(`Installing Chromium ${revision}`);
        }
    });
    if (spinnerStatus !== undefined) {
        spinnerStatus();
    }
    return {
        filePath: revisionInfo.folderPath,
        version: revisionInfo.revision
    };
}
function install(_pkg, _ctx) {
    return Promise.resolve();
}
function afterInstall(_ctx) {
    return Promise.resolve(false);
}
async function uninstall(_ctx) {
    await withSpinner({
        message: "Removing Chromium..."
    }, async ()=>{
        const fetcherObj = await fetcher();
        const version = await supportedRevision();
        return fetcherObj.remove(version);
    });
    return Promise.resolve();
}
async function fetcher() {
    const options = {
        path: chromiumInstallDir()
    };
    const fetcher = (await getPuppeteer()).createBrowserFetcher(options);
    return fetcher;
}
async function getBrowserExecutablePath() {
    const browserFetcher = await fetcher();
    const availableRevisions = await browserFetcher.localRevisions();
    let executablePath = undefined;
    if (availableRevisions.length > 0) {
        availableRevisions.sort((a, b)=>Number(b) - Number(a));
        const revision = availableRevisions[0];
        const revisionInfo = browserFetcher.revisionInfo(revision);
        executablePath = revisionInfo.executablePath;
    }
    if (executablePath === undefined) {
        executablePath = await findChrome();
    }
    if (executablePath === undefined) {
        error("Chrome not found");
        info("\nNo Chrome or Chromium installation was detected.\n\nPlease run 'quarto tools install chromium' to install Chromium.\n");
        throw new Error();
    }
    return executablePath;
}
async function supportedRevision() {
    return (await getPuppeteer())._preferredRevision;
}
class Semaphore {
    value;
    tasks;
    constructor(value){
        this.value = value;
        this.tasks = [];
    }
    release() {
        this.value += 1;
        if (this.tasks.length) {
            const { resolve  } = this.tasks.pop();
            resolve();
        }
    }
    async acquire() {
        if (this.value > 0) {
            this.value -= 1;
            return;
        }
        const result1 = new Promise((resolve, reject)=>{
            this.tasks.push({
                resolve,
                reject
            });
        });
        await result1;
        await this.acquire();
    }
    async runExclusive(fun) {
        await this.acquire();
        try {
            const result1 = await fun();
            this.release();
            return result1;
        } catch (e) {
            this.release();
            throw e;
        }
    }
}
function randomInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(cryptoRandom() * (max - min) + min);
}
function randomHex(length) {
    const result1 = [];
    const hexRef = [
        "0",
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "a",
        "b",
        "c",
        "d",
        "e",
        "f", 
    ];
    for(let n = 0; n < length; n++){
        result1.push(hexRef[Math.floor(cryptoRandom() * 16)]);
    }
    return result1.join("");
}
function cryptoRandom() {
    const arr = new Uint32Array(2);
    crypto.getRandomValues(arr);
    const mantissa = arr[0] * Math.pow(2, 20) + (arr[1] >>> 12);
    const result1 = mantissa * Math.pow(2, -52);
    return result1;
}
function sleep1(ms) {
    return new Promise((resolve)=>setTimeout(resolve, ms));
}
const kLocalhost = "127.0.0.1";
const kMinPort = 3000;
const kMaxPort = 8000;
function isPortSafe(port) {
    return ![
        3659,
        4045,
        5000,
        6000,
        6665,
        6666,
        6667,
        6668,
        6669,
        6697
    ].includes(port);
}
function randomSafePort() {
    let result1;
    do {
        result1 = randomInt(kMinPort, kMaxPort);
    }while (!isPortSafe(result1))
    return result1;
}
function findOpenPort(defaultPort) {
    defaultPort = defaultPort || randomSafePort();
    if (isPortAvailableSync({
        port: defaultPort,
        hostname: kLocalhost
    })) {
        return defaultPort;
    } else {
        let ports = [];
        for(let i1 = 3000; i1 < 8000; ++i1){
            if (isPortSafe(i1)) {
                ports.push(i1);
            }
        }
        while(true){
            ports = shuffle1(ports);
            const port = getAvailablePortSync({
                port: ports,
                hostname: kLocalhost
            });
            if (port === undefined) {
                throw new Error("Unable to find open port");
            }
            if (isPortSafe(port)) {
                return port;
            }
        }
    }
}
async function waitForPort(options, timeout = 5000) {
    const kWaitInterval = 200;
    let waited = 0;
    while(waited <= timeout){
        if (isPortAvailableSync(options)) {
            return true;
        }
        await sleep1(200);
        waited += kWaitInterval;
    }
    return false;
}
function isPortAvailableSync(options) {
    try {
        const listener = Deno.listen({
            port: options.port,
            ...options.hostname ? {
                hostname: options.hostname
            } : {},
            ...options.transport ? {
                transport: options.transport
            } : {}
        });
        listener.close();
        return true;
    } catch (error) {
        if (error instanceof Deno.errors.AddrInUse) {
            return false;
        }
        throw error;
    }
}
function getAvailablePortSync(options = {
    transport: "tcp"
}) {
    if (options.port === undefined) {
        return getRandomPortSync(options);
    } else if (Array.isArray(options.port)) {
        const portList = options.port;
        for(let i1 = 0; i1 < portList.length; i1++){
            if (withinRange(portList[i1])) {
                const portAvailable = isPortAvailableSync({
                    port: portList[i1],
                    ...options.hostname ? {
                        hostname: options.hostname
                    } : {},
                    ...options.transport ? {
                        transport: options.transport
                    } : {}
                });
                if (portAvailable) {
                    return portList[i1];
                } else {
                    continue;
                }
            } else {
                continue;
            }
        }
    } else if (options.port.start !== undefined && options.port.end !== undefined) {
        const start = options.port.start;
        const end = options.port.end;
        if (start >= 0 && end <= 65535 && start <= end) {
            for(let p = start; p <= end; p++){
                const portAvailable1 = isPortAvailableSync({
                    port: p,
                    ...options.hostname ? {
                        hostname: options.hostname
                    } : {},
                    ...options.transport ? {
                        transport: options.transport
                    } : {}
                });
                if (portAvailable1) {
                    return p;
                } else {
                    continue;
                }
            }
        } else {
            throw new Error("Range should be between 0 - 65535 and start should be less than end");
        }
    }
}
function getRandomPortSync(options) {
    const randomPort = random(0, 65535);
    if (isPortAvailableSync({
        port: randomPort,
        ...options.hostname ? {
            hostname: options.hostname
        } : {},
        ...options.transport ? {
            transport: options.transport
        } : {}
    })) {
        return randomPort;
    } else {
        return getRandomPortSync(options);
    }
}
function random(min, max) {
    return Math.round(Math.random() * (max - min)) + min;
}
function withinRange(port) {
    return port >= 0 && port <= 65535;
}
const _globalLifetimes = {};
function createNamedLifetime(name) {
    if (_globalLifetimes[name] !== undefined) {
        throw new Error(`Internal Error: cannot recreate existing named lifetime ${name}`);
    }
    const lifetime = new Lifetime();
    lifetime.attach({
        cleanup: ()=>{
            delete _globalLifetimes[name];
        }
    });
    _globalLifetimes[name] = lifetime;
    return lifetime;
}
function getNamedLifetime(name) {
    return _globalLifetimes[name];
}
class Lifetime {
    _namedObjs;
    _unnamedObjs;
    constructor(){
        this._namedObjs = {};
        this._unnamedObjs = [];
    }
    attach(obj, key) {
        if (key === undefined) {
            this._unnamedObjs.push(obj);
        } else {
            this._namedObjs[key] = obj;
        }
    }
    get(key) {
        return this._namedObjs[key];
    }
    async cleanup() {
        await Promise.all(this._unnamedObjs.map((x)=>x.cleanup()));
        await Promise.all(Object.values(this._namedObjs).map((x)=>x.cleanup()));
        this._namedObjs = {};
        this._unnamedObjs = [];
    }
}
async function waitForServer(port, timeout = 3000) {
    const interval = 50;
    let soFar = 0;
    do {
        try {
            const response = await fetch(`http://localhost:${port}/json/list`);
            if (response.status !== 200) {
                throw new Error("");
            }
            return true;
        } catch (_e) {
            soFar += interval;
            await new Promise((resolve)=>setTimeout(resolve, 50));
        }
    }while (soFar < timeout)
    return false;
}
const criSemaphore = new Semaphore(1);
function withCriClient(fn, appPath, port) {
    if (port === undefined) {
        port = findOpenPort(9222);
    }
    return criSemaphore.runExclusive(async ()=>{
        const lifetime = getNamedLifetime("render-file");
        if (lifetime === undefined) {
            throw new Error("Internal Error: named lifetime render-file not found");
        }
        let client;
        if (lifetime.get("cri-client") === undefined) {
            client = await criClient(appPath, port);
            lifetime.attach({
                client,
                async cleanup () {
                    await client.close();
                }
            }, "cri-client");
        } else {
            client = lifetime.get("cri-client").client;
        }
        return await fn(client);
    });
}
async function criClient(appPath, port) {
    if (port === undefined) {
        port = findOpenPort(9222);
    }
    if (appPath === undefined) {
        appPath = await getBrowserExecutablePath();
    }
    const cmd = [
        appPath,
        "--headless",
        "--no-sandbox",
        "--single-process",
        "--disable-gpu",
        `--remote-debugging-port=${port}`, 
    ];
    const browser = Deno.run({
        cmd,
        stdout: "piped",
        stderr: "piped"
    });
    if (!await waitForServer(port)) {
        let msg = "Couldn't find open server.";
        if (!(await browser.status()).success) {
            const rawError = await browser.stderrOutput();
            const errorString = new TextDecoder().decode(rawError);
            msg = msg + "\n" + `Chrome process error: ${errorString}`;
        }
        throw new Error(msg);
    }
    let client;
    const result1 = {
        close: async ()=>{
            await client.close();
            browser.close();
        },
        rawClient: ()=>client,
        open: async (url)=>{
            client = await CDP();
            const { Network , Page  } = client;
            await Network.enable();
            await Page.enable();
            await Page.navigate({
                url
            });
            return new Promise((fulfill, _reject)=>{
                Page.loadEventFired(()=>{
                    fulfill(null);
                });
            });
        },
        docQuerySelectorAll: async (cssSelector)=>{
            await client.DOM.enable();
            const doc = await client.DOM.getDocument();
            const nodeIds = await client.DOM.querySelectorAll({
                nodeId: doc.root.nodeId,
                selector: cssSelector
            });
            return nodeIds.nodeIds;
        },
        contents: async (cssSelector)=>{
            const nodeIds = await result1.docQuerySelectorAll(cssSelector);
            return Promise.all(nodeIds.map(async (nodeId)=>{
                return (await client.DOM.getOuterHTML({
                    nodeId
                })).outerHTML;
            }));
        },
        screenshots: async (cssSelector, scale = 4)=>{
            const nodeIds = await result1.docQuerySelectorAll(cssSelector);
            const lst = [];
            for (const nodeId of nodeIds){
                let quad;
                try {
                    quad = (await client.DOM.getContentQuads({
                        nodeId
                    })).quads[0];
                } catch (_e) {
                    continue;
                }
                const minX = Math.min(quad[0], quad[2], quad[4], quad[6]);
                const maxX = Math.max(quad[0], quad[2], quad[4], quad[6]);
                const minY = Math.min(quad[1], quad[3], quad[5], quad[7]);
                const maxY = Math.max(quad[1], quad[3], quad[5], quad[7]);
                try {
                    const screenshot = await client.Page.captureScreenshot({
                        clip: {
                            x: minX,
                            y: minY,
                            width: maxX - minX,
                            height: maxY - minY,
                            scale
                        },
                        fromSurface: true,
                        captureBeyondViewport: true
                    });
                    const buf = decode(screenshot.data);
                    lst.push({
                        nodeId,
                        data: buf
                    });
                } catch (_e1) {
                    continue;
                }
            }
            return lst;
        }
    };
    return result1;
}
const handlers = {};
let globalFigureCounter = {};
function resetFigureCounter() {
    globalFigureCounter = {};
}
function makeHandlerContext(options) {
    if (options.state === undefined) {
        options.state = {};
    }
    const results = {
        resourceFiles: [],
        includes: {},
        extras: {},
        supporting: []
    };
    const tempContext = options.temp;
    const context = {
        options,
        getState () {
            if (options.state[options.name] === undefined) {
                options.state[options.name] = {};
            }
            return options.state[options.name];
        },
        async extractHtml (opts) {
            const { html: content , selector ,  } = opts;
            const nonEmptyHtmlResources = opts.resources || [];
            const dirName = context.options.temp.createDir();
            for (const [name, content1] of nonEmptyHtmlResources){
                Deno.writeTextFileSync(join3(dirName, name), content1);
            }
            const fileName = join3(dirName, "index.html");
            Deno.writeTextFileSync(fileName, content);
            const url = `file://${fileName}`;
            return await withCriClient(async (client)=>{
                await client.open(url);
                return await client.contents(selector);
            });
        },
        async createPngsFromHtml (opts) {
            const { prefix , html: content , deviceScaleFactor , selector ,  } = opts;
            const nonEmptyHtmlResources = opts.resources || [];
            const dirName = context.options.temp.createDir();
            for (const [name, content1] of nonEmptyHtmlResources){
                Deno.writeTextFileSync(join3(dirName, name), content1);
            }
            const fileName = join3(dirName, "index.html");
            Deno.writeTextFileSync(fileName, content);
            const url = `file://${fileName}`;
            const { elements , images  } = await withCriClient(async (client)=>{
                await client.open(url);
                const elements = await client.contents(selector);
                const screenshots = await client.screenshots(selector, deviceScaleFactor);
                return {
                    elements,
                    images: screenshots.map((x)=>x.data)
                };
            });
            const sourceNames = [];
            for(let i1 = 0; i1 < images.length; ++i1){
                const { sourceName , fullName  } = context.uniqueFigureName(prefix, ".png");
                sourceNames.push(sourceName);
                Deno.writeFileSync(fullName, images[i1]);
            }
            return {
                filenames: sourceNames,
                elements
            };
        },
        cellContent (cell) {
            if (typeof cell?.options?.file === "string") {
                try {
                    return mappedStringFromFile(context.resolvePath(cell?.options?.file));
                } catch (e) {
                    error(`Couldn't open file ${cell?.options?.file}`);
                    throw e;
                }
            } else {
                return cell.source;
            }
        },
        resolvePath (path) {
            const sourceDir = dirname2(options.context.target.source);
            const rootDir = options.context.project?.dir || sourceDir;
            if (path.startsWith("/")) {
                return resolve2(rootDir, `.${path}`);
            } else {
                return resolve2(sourceDir, path);
            }
        },
        uniqueFigureName (prefix, extension) {
            prefix = prefix ?? "figure-";
            extension = extension ?? ".png";
            if (!globalFigureCounter[prefix]) {
                globalFigureCounter[prefix] = 1;
            } else {
                globalFigureCounter[prefix]++;
            }
            const pngName = `${prefix}${globalFigureCounter[prefix]}${extension}`;
            const tempName = join3(context.figuresDir(), pngName);
            const baseDir = dirname2(options.context.target.source);
            const mdName = relative2(baseDir, tempName);
            this.addSupporting(relative2(baseDir, context.figuresDir()));
            return {
                baseName: basename2(mdName),
                sourceName: mdName,
                fullName: tempName
            };
        },
        figuresDir () {
            const file = Deno.realPathSync(options.context.target.source);
            const filesDir = join3(dirname2(file), inputFilesDir(file));
            const result1 = join3(filesDir, figuresDir(context.options.format.pandoc.to));
            ensureDirSync(result1);
            return result1;
        },
        addHtmlDependency (dep) {
            if (results.extras.html === undefined) {
                results.extras.html = {
                    [kDependencies]: [
                        dep
                    ]
                };
            } else {
                results.extras.html[kDependencies].push(dep);
            }
        },
        addSupporting (dir) {
            if (results.supporting.indexOf(dir) === -1) {
                results.supporting.push(dir);
            }
        },
        addResource (fileName) {
            results.resourceFiles.push(fileName);
        },
        addInclude (content, where) {
            const fileName = tempContext.createFile();
            Deno.writeTextFileSync(fileName, content);
            if (results.includes[where] === undefined) {
                results.includes[where] = [
                    fileName
                ];
            } else {
                results.includes[where].push(fileName);
            }
        }
    };
    return {
        context,
        results
    };
}
function languages() {
    return Object.keys(handlers);
}
async function languageSchema(language) {
    if (handlers[language] === undefined) {
        return undefined;
    }
    const call = handlers[language].schema;
    if (call === undefined) {
        return undefined;
    } else {
        return await call();
    }
}
function install1(handler) {
    const language = handler.languageName;
    handlers[language] = handler;
    if (handler.comment !== undefined) {
        addLanguageComment(language, handler.comment);
    }
}
async function handleLanguageCells(options) {
    const mdCells = (await breakQuartoMd(options.markdown, false)).cells;
    if (mdCells.length === 0) {
        return {
            markdown: options.markdown
        };
    }
    const newCells = [];
    const languageCellsPerLanguage = {};
    for(let i1 = 0; i1 < mdCells.length; ++i1){
        const cell = mdCells[i1];
        newCells.push(i1 === 0 ? cell.sourceVerbatim : mappedConcat([
            "\n",
            cell.sourceVerbatim
        ]));
        if (cell.cell_type === "raw" || cell.cell_type === "markdown") {
            continue;
        }
        const language = cell.cell_type.language;
        if (language !== "_directive" && handlers[language] === undefined) {
            continue;
        }
        if (handlers[language]?.stage && handlers[language].stage !== "any" && options.stage !== handlers[language].stage) {
            continue;
        }
        if (languageCellsPerLanguage[language] === undefined) {
            languageCellsPerLanguage[language] = [];
        }
        languageCellsPerLanguage[language].push({
            index: i1,
            source: cell
        });
    }
    let results = undefined;
    for (const [language1, cells] of Object.entries(languageCellsPerLanguage)){
        if (language1 === "_directive") {
            for (const cell1 of cells){
                const directiveCellType = cell1.source.cell_type;
                const innerLanguage = directiveCellType.name;
                const innerLanguageHandler = handlers[innerLanguage];
                if (innerLanguageHandler && innerLanguageHandler.stage !== "any" && innerLanguageHandler.stage !== options.stage) {
                    newCells[cell1.index] = mappedConcat([
                        newCells[cell1.index],
                        "\n"
                    ]);
                    continue;
                }
                if (innerLanguageHandler === undefined || innerLanguageHandler.type === "cell") {
                    newCells[cell1.index] = mappedConcat([
                        newCells[cell1.index],
                        "\n"
                    ]);
                    continue;
                }
                if (innerLanguageHandler.directive === undefined) {
                    throw new Error("Bad language handler: directive callback is undefined");
                }
                const innerHandler = makeHandlerContext({
                    ...options,
                    name: innerLanguage
                });
                newCells[cell1.index] = asMappedString(await innerLanguageHandler.directive(innerHandler.context, directiveCellType));
                results = mergeConfigs(results, innerHandler.results);
            }
        } else {
            const handler = makeHandlerContext({
                ...options,
                name: language1
            });
            const languageHandler = handlers[language1];
            if (languageHandler !== undefined && languageHandler.type !== "directive") {
                const transformedCells = await languageHandler.document(handler.context, cells.map((x)=>x.source));
                for(let i11 = 0; i11 < transformedCells.length; ++i11){
                    newCells[cells[i11].index] = transformedCells[i11];
                }
                if (results === undefined) {
                    results = handler.results;
                } else {
                    results = mergeConfigs(results, handler.results);
                }
            }
        }
    }
    return {
        markdown: join4(newCells, ""),
        results
    };
}
const baseHandler = {
    type: "any",
    stage: "any",
    languageName: "<<<< baseHandler: languageName should have been overridden >>>>",
    defaultOptions: {
        echo: true
    },
    async document (handlerContext, cells) {
        this.documentStart(handlerContext);
        const mermaidExecute = handlerContext.options.format.mergeAdditionalFormats({
            execute: this.defaultOptions
        }).execute;
        const result1 = await Promise.all(cells.map((cell)=>{
            return this.cell(handlerContext, cell, mergeConfigs(mermaidExecute, cell.options ?? {}));
        }));
        this.documentEnd(handlerContext);
        return result1;
    },
    documentStart (_handlerContext) {},
    documentEnd (_handlerContext) {},
    cell (_handlerContext, cell, _options) {
        return Promise.resolve(cell.sourceVerbatim);
    },
    build (handlerContext, cell, content, options, extraCellOptions, skipOptions) {
        const contentLines = mappedLines(cell.sourceWithYaml, true);
        const frontMatterLines = [];
        const commentPattern = optionCommentPatternFromLanguage(this.languageName);
        let inputIndex = 0;
        for (const contentLine of contentLines){
            const commentMatch = contentLine.value.match(commentPattern);
            if (commentMatch) {
                if (contentLine.value.indexOf("echo: fenced") === -1) {
                    frontMatterLines.push(contentLine);
                }
                ++inputIndex;
            } else {
                break;
            }
        }
        const inputLines = contentLines.slice(inputIndex);
        const { classes , attrs  } = getDivAttributes({
            ...extraCellOptions || {},
            ...cell.options
        }, skipOptions);
        const hasAttribute = (attrKey)=>attrs.some((attr)=>attr === attrKey || attr.startsWith(`${attrKey}=`));
        const hasLayoutAttributes = hasAttribute(kLayoutNrow) || hasAttribute(kLayoutNcol) || hasAttribute(kLayout);
        const isPowerpointOutput = handlerContext.options.format.pandoc.to?.startsWith("pptx");
        const unrolledOutput = isPowerpointOutput && !hasLayoutAttributes;
        const t3 = pandocBlock("```");
        const t4 = pandocBlock("````");
        const cellBlock = unrolledOutput ? pandocList({
            skipFirstLineBreak: true
        }) : pandocBlock(":::")({
            classes: [
                "cell",
                ...classes
            ],
            attrs
        });
        const languageClass = this.languageClass === undefined ? this.languageName : typeof this.languageClass === "string" ? this.languageClass : this.languageClass(handlerContext.options);
        const cellInputClasses = [
            languageClass,
            "cell-code",
            ...options["class-source"] ?? [], 
        ];
        const cellInputAttrs = [
            ...options["attr-source"] ?? [], 
        ];
        const cellOutputClasses = [
            "cell-output-display",
            ...options["class-output"] ?? [], 
        ];
        const cellOutputAttrs = [
            ...options["attr-output"] ?? [], 
        ];
        if (options[kCodeFold] !== undefined) {
            cellOutputAttrs.push(`code-fold="${options[kCodeFold]}"`);
        }
        switch(options.echo){
            case true:
                {
                    const cellInput = t3({
                        classes: cellInputClasses,
                        attrs: cellInputAttrs
                    });
                    cellInput.push(pandocRawStr(mappedTrim(mappedConcat(inputLines))));
                    cellBlock.push(cellInput);
                    break;
                }
            case "fenced":
                {
                    const cellInput1 = t4({
                        classes: [
                            "markdown",
                            ...cellInputClasses.slice(1)
                        ],
                        attrs: cellInputAttrs
                    });
                    const cellFence = t3({
                        language: this.languageName,
                        skipFirstLineBreak: true
                    });
                    const fencedInput = mappedConcat([
                        ...frontMatterLines,
                        ...inputLines, 
                    ]);
                    cellFence.push(pandocRawStr(mappedTrim(fencedInput)));
                    cellInput1.push(cellFence);
                    cellBlock.push(cellInput1);
                    break;
                }
        }
        const paraBlock = pandocHtmlBlock("p");
        const divBlock = pandocBlock(":::");
        const cellOutputDiv = unrolledOutput ? cellBlock : divBlock({
            attrs: cellOutputAttrs,
            classes: cellOutputClasses
        });
        cellBlock.push(cellOutputDiv);
        let figureLikeOptions = {};
        if (typeof cell.options?.label === "string") {
            figureLikeOptions = {
                id: cell.options?.label
            };
        }
        const figureLike = unrolledOutput ? cellBlock : divBlock(figureLikeOptions);
        const cellOutput = unrolledOutput ? cellBlock : paraBlock();
        figureLike.push(cellOutput);
        cellOutputDiv.push(figureLike);
        if (options.eval === true) {
            cellOutput.push(pandocRawStr(content));
        }
        if (cell.options?.[kCellFigCap]) {
            figureLike.push(pandocRawStr(`\n\n${cell.options[kCellFigCap]}`));
        }
        return cellBlock.mappedString();
    }
};
function getDivAttributes(options, forceSkip) {
    const attrs = [];
    if (forceSkip) {
        options = {
            ...options
        };
        for (const skip of forceSkip){
            delete options[skip];
        }
    }
    const keysToNotSerialize = new Set([
        kEcho,
        kCellLabel,
        kCellFigCap,
        kCellFigSubCap,
        kCellFigScap,
        kCapLoc,
        kFigCapLoc,
        kTblCapLoc,
        kCellFigColumn,
        kCellTblColumn,
        kCellFigLink,
        kCellFigAlign,
        kCellFigEnv,
        kCellFigPos,
        kCellFigAlt,
        kOutput,
        kCellLstCap,
        kCellLstLabel,
        kCodeFold,
        kCodeLineNumbers,
        kCodeSummary,
        kCodeOverflow,
        kCellClasses,
        kCellPanel,
        kCellColumn,
        "include.hidden",
        "source.hidden",
        "plot.hidden",
        "output.hidden",
        "echo.hidden", 
    ]);
    for (const [key, value] of Object.entries(options || {})){
        if (!keysToNotSerialize.has(key)) {
            const t = typeof value;
            if (t === "object") {
                attrs.push(`${key}="${JSON.stringify(value)}"`);
            } else if (t === "string") {
                attrs.push(`${key}=${JSON.stringify(value)}`);
            } else if (t === "number") {
                attrs.push(`${key}="${value}"`);
            } else if (t === "boolean") {
                attrs.push(`${key}=${value}`);
            } else {
                throw new Error(`Can't serialize yaml metadata value of type ${t}`);
            }
        }
    }
    if (options?.[kCellLstCap]) {
        attrs.push(`caption="${options?.[kCellLstCap]}"`);
    }
    const classStr = (options?.classes) || "";
    const classes = classStr === "" ? [] : classStr.trim().split(" ");
    if (typeof options?.panel === "string") {
        classes.push(`panel-${options?.panel}`);
    }
    if (typeof options?.column === "string") {
        classes.push(`column-${options?.column}`);
    }
    if (typeof options?.[kCapLoc] === "string") {
        classes.push(`caption-${options?.[kCapLoc]}`);
    }
    if (typeof options?.[kFigCapLoc] === "string") {
        classes.push(`fig-cap-location-${options?.[kFigCapLoc]}`);
    }
    if (typeof options?.[kTblCapLoc] === "string") {
        classes.push(`tbl-cap-location-${options?.[kTblCapLoc]}`);
    }
    if (typeof options?.[kCellFigColumn] === "string") {
        classes.push(`fig-caption-${options?.[kCellFigColumn]}`);
    }
    if (typeof options?.[kCellTblColumn] === "string") {
        classes.push(`fig-caption-${options?.[kCellTblColumn]}`);
    }
    return {
        attrs,
        classes
    };
}
const kEngines = [
    knitrEngine,
    jupyterEngine,
    markdownEngine, 
];
function executionEngines() {
    return kEngines.map((engine)=>engine.name);
}
function executionEngine(name) {
    for (const engine of kEngines){
        if (engine.name === name) {
            return engine;
        }
    }
}
function executionEngineKeepMd(input) {
    const keepSuffix = `.md`;
    if (!input.endsWith(keepSuffix)) {
        const [dir, stem] = dirAndStem(input);
        return join3(dir, stem + keepSuffix);
    }
}
function executionEngineKeepFiles(engine, input) {
    const files = [];
    const keep = executionEngineKeepMd(input);
    if (keep) {
        files.push(keep);
    }
    const engineKeepFiles = engine.keepFiles ? engine.keepFiles(input) : undefined;
    if (engineKeepFiles) {
        return files.concat(engineKeepFiles);
    } else {
        return files;
    }
}
function engineValidExtensions() {
    return __VIRTUAL_FILE181(kEngines.flatMap((engine)=>engine.validExtensions()));
}
function markdownExecutionEngine(markdown, flags) {
    const result1 = partitionYamlFrontMatter(markdown);
    if (result1) {
        let yaml = readYamlFromMarkdown(result1.yaml);
        if (yaml) {
            yaml = mergeConfigs(yaml, flags?.metadata);
            for (const engine of kEngines){
                if (yaml[engine.name]) {
                    return engine;
                }
                const format = metadataAsFormat(yaml);
                if (format.execute?.[kEngine] === engine.name) {
                    return engine;
                }
            }
        }
    }
    const languages1 = languagesInMarkdown(markdown);
    for (const language of languages1){
        for (const engine1 of kEngines){
            if (engine1.claimsLanguage(language)) {
                return engine1;
            }
        }
    }
    const handlerLanguagesVal = languages();
    for (const language1 of languages1){
        if (language1 !== "ojs" && !handlerLanguagesVal.includes(language1)) {
            return jupyterEngine;
        }
    }
    return engineForMarkdownWithNoLanguages(markdown);
}
function fileEngineClaimReason(file) {
    const ext = extname2(file).toLowerCase();
    if (!kEngines.some((engine)=>engine.validExtensions().includes(ext))) {
        return "invalid";
    }
    for (const engine of kEngines){
        if (engine.claimsExtension(ext)) {
            return "extension";
        }
    }
    return "markdown";
}
function fileExecutionEngine(file, flags, markdown) {
    const ext = extname2(file).toLowerCase();
    if (!kEngines.some((engine)=>engine.validExtensions().includes(ext))) {
        return undefined;
    }
    for (const engine of kEngines){
        if (engine.claimsExtension(ext)) {
            return engine;
        }
    }
    return markdownExecutionEngine(markdown ? markdown.value : Deno.readTextFileSync(file), flags);
}
async function fileExecutionEngineAndTarget(file, flags, markdown, project) {
    const engine = fileExecutionEngine(file, flags, markdown);
    if (!engine) {
        throw new Error("Unable to render " + file);
    }
    const target = await engine.target(file, flags?.quiet, markdown, project);
    if (!target) {
        throw new Error("Unable to render " + file);
    }
    return {
        engine,
        target
    };
}
function engineForMarkdownWithNoLanguages(markdown) {
    if (markdown.match(/`r[ #]([^`]+)\s*`/)) {
        return knitrEngine;
    } else {
        return markdownEngine;
    }
}
function engineIgnoreDirs() {
    const ignoreDirs = [
        "node_modules"
    ];
    executionEngines().forEach((name)=>{
        const engine = executionEngine(name);
        if (engine && engine.ignoreDirs) {
            const ignores = engine.ignoreDirs();
            if (ignores) {
                ignoreDirs.push(...ignores);
            }
        }
    });
    return ignoreDirs;
}
function engineIgnoreGlobs() {
    return engineIgnoreDirs().map((ignore)=>`**/${ignore}/**`);
}
const MAX_SAFE_COMPONENT_LENGTH = 16;
const re = [];
const src = [];
let R = 0;
const NUMERICIDENTIFIER = R++;
src[NUMERICIDENTIFIER] = "0|[1-9]\\d*";
const NUMERICIDENTIFIERLOOSE = R++;
src[NUMERICIDENTIFIERLOOSE] = "[0-9]+";
const NONNUMERICIDENTIFIER = R++;
src[NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
const MAINVERSION = R++;
const nid = src[NUMERICIDENTIFIER];
src[MAINVERSION] = `(${nid})\\.(${nid})\\.(${nid})`;
const MAINVERSIONLOOSE = R++;
const nidl = src[NUMERICIDENTIFIERLOOSE];
src[MAINVERSIONLOOSE] = `(${nidl})\\.(${nidl})\\.(${nidl})`;
const PRERELEASEIDENTIFIER = R++;
src[PRERELEASEIDENTIFIER] = "(?:" + src[NUMERICIDENTIFIER] + "|" + src[NONNUMERICIDENTIFIER] + ")";
const PRERELEASEIDENTIFIERLOOSE = R++;
src[PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[NUMERICIDENTIFIERLOOSE] + "|" + src[NONNUMERICIDENTIFIER] + ")";
const PRERELEASE = R++;
src[PRERELEASE] = "(?:-(" + src[PRERELEASEIDENTIFIER] + "(?:\\." + src[PRERELEASEIDENTIFIER] + ")*))";
const PRERELEASELOOSE = R++;
src[PRERELEASELOOSE] = "(?:-?(" + src[PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[PRERELEASEIDENTIFIERLOOSE] + ")*))";
const BUILDIDENTIFIER = R++;
src[BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
const BUILD = R++;
src[BUILD] = "(?:\\+(" + src[BUILDIDENTIFIER] + "(?:\\." + src[BUILDIDENTIFIER] + ")*))";
const FULL = R++;
const FULLPLAIN = "v?" + src[MAINVERSION] + src[PRERELEASE] + "?" + src[BUILD] + "?";
src[FULL] = "^" + FULLPLAIN + "$";
const LOOSEPLAIN = "[v=\\s]*" + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + "?" + src[BUILD] + "?";
const LOOSE = R++;
src[LOOSE] = "^" + LOOSEPLAIN + "$";
const GTLT = R++;
src[GTLT] = "((?:<|>)?=?)";
const XRANGEIDENTIFIERLOOSE = R++;
src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
const XRANGEIDENTIFIER = R++;
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + "|x|X|\\*";
const XRANGEPLAIN = R++;
src[XRANGEPLAIN] = "[v=\\s]*(" + src[XRANGEIDENTIFIER] + ")" + "(?:\\.(" + src[XRANGEIDENTIFIER] + ")" + "(?:\\.(" + src[XRANGEIDENTIFIER] + ")" + "(?:" + src[PRERELEASE] + ")?" + src[BUILD] + "?" + ")?)?";
const XRANGEPLAINLOOSE = R++;
src[XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[XRANGEIDENTIFIERLOOSE] + ")" + "(?:\\.(" + src[XRANGEIDENTIFIERLOOSE] + ")" + "(?:\\.(" + src[XRANGEIDENTIFIERLOOSE] + ")" + "(?:" + src[PRERELEASELOOSE] + ")?" + src[BUILD] + "?" + ")?)?";
const XRANGE = R++;
src[XRANGE] = "^" + src[GTLT] + "\\s*" + src[XRANGEPLAIN] + "$";
const XRANGELOOSE = R++;
src[XRANGELOOSE] = "^" + src[GTLT] + "\\s*" + src[XRANGEPLAINLOOSE] + "$";
const COERCE = R++;
src[COERCE] = "(?:^|[^\\d])" + "(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})" + "(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?" + "(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?" + "(?:$|[^\\d])";
const LONETILDE = R++;
src[LONETILDE] = "(?:~>?)";
const TILDETRIM = R++;
src[TILDETRIM] = "(\\s*)" + src[LONETILDE] + "\\s+";
re[TILDETRIM] = new RegExp(src[TILDETRIM], "g");
const tildeTrimReplace = "$1~";
const TILDE = R++;
src[TILDE] = "^" + src[LONETILDE] + src[XRANGEPLAIN] + "$";
const TILDELOOSE = R++;
src[TILDELOOSE] = "^" + src[LONETILDE] + src[XRANGEPLAINLOOSE] + "$";
const LONECARET = R++;
src[LONECARET] = "(?:\\^)";
const CARETTRIM = R++;
src[CARETTRIM] = "(\\s*)" + src[LONECARET] + "\\s+";
re[CARETTRIM] = new RegExp(src[CARETTRIM], "g");
const caretTrimReplace = "$1^";
const CARET = R++;
src[CARET] = "^" + src[LONECARET] + src[XRANGEPLAIN] + "$";
const CARETLOOSE = R++;
src[CARETLOOSE] = "^" + src[LONECARET] + src[XRANGEPLAINLOOSE] + "$";
const COMPARATORLOOSE = R++;
src[COMPARATORLOOSE] = "^" + src[GTLT] + "\\s*(" + LOOSEPLAIN + ")$|^$";
const COMPARATOR = R++;
src[COMPARATOR] = "^" + src[GTLT] + "\\s*(" + FULLPLAIN + ")$|^$";
const COMPARATORTRIM = R++;
src[COMPARATORTRIM] = "(\\s*)" + src[GTLT] + "\\s*(" + LOOSEPLAIN + "|" + src[XRANGEPLAIN] + ")";
re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], "g");
const comparatorTrimReplace = "$1$2$3";
const HYPHENRANGE = R++;
src[HYPHENRANGE] = "^\\s*(" + src[XRANGEPLAIN] + ")" + "\\s+-\\s+" + "(" + src[XRANGEPLAIN] + ")" + "\\s*$";
const HYPHENRANGELOOSE = R++;
src[HYPHENRANGELOOSE] = "^\\s*(" + src[XRANGEPLAINLOOSE] + ")" + "\\s+-\\s+" + "(" + src[XRANGEPLAINLOOSE] + ")" + "\\s*$";
const STAR = R++;
src[STAR] = "(<|>)?=?\\s*\\*";
for(let i7 = 0; i7 < R; i7++){
    if (!re[i7]) {
        re[i7] = new RegExp(src[i7]);
    }
}
function parse12(version, optionsOrLoose) {
    if (!optionsOrLoose || typeof optionsOrLoose !== "object") {
        optionsOrLoose = {
            loose: !!optionsOrLoose,
            includePrerelease: false
        };
    }
    if (version instanceof SemVer) {
        return version;
    }
    if (typeof version !== "string") {
        return null;
    }
    if (version.length > 256) {
        return null;
    }
    const r = optionsOrLoose.loose ? re[LOOSE] : re[FULL];
    if (!r.test(version)) {
        return null;
    }
    try {
        return new SemVer(version, optionsOrLoose);
    } catch (er) {
        return null;
    }
}
class SemVer {
    raw;
    loose;
    options;
    major;
    minor;
    patch;
    version;
    build;
    prerelease;
    constructor(version, optionsOrLoose){
        if (!optionsOrLoose || typeof optionsOrLoose !== "object") {
            optionsOrLoose = {
                loose: !!optionsOrLoose,
                includePrerelease: false
            };
        }
        if (version instanceof SemVer) {
            if (version.loose === optionsOrLoose.loose) {
                return version;
            } else {
                version = version.version;
            }
        } else if (typeof version !== "string") {
            throw new TypeError("Invalid Version: " + version);
        }
        if (version.length > 256) {
            throw new TypeError("version is longer than " + 256 + " characters");
        }
        if (!(this instanceof SemVer)) {
            return new SemVer(version, optionsOrLoose);
        }
        this.options = optionsOrLoose;
        this.loose = !!optionsOrLoose.loose;
        const m = version.trim().match(optionsOrLoose.loose ? re[LOOSE] : re[FULL]);
        if (!m) {
            throw new TypeError("Invalid Version: " + version);
        }
        this.raw = version;
        this.major = +m[1];
        this.minor = +m[2];
        this.patch = +m[3];
        if (this.major > Number.MAX_SAFE_INTEGER || this.major < 0) {
            throw new TypeError("Invalid major version");
        }
        if (this.minor > Number.MAX_SAFE_INTEGER || this.minor < 0) {
            throw new TypeError("Invalid minor version");
        }
        if (this.patch > Number.MAX_SAFE_INTEGER || this.patch < 0) {
            throw new TypeError("Invalid patch version");
        }
        if (!m[4]) {
            this.prerelease = [];
        } else {
            this.prerelease = m[4].split(".").map((id)=>{
                if (/^[0-9]+$/.test(id)) {
                    const num = +id;
                    if (num >= 0 && num < Number.MAX_SAFE_INTEGER) {
                        return num;
                    }
                }
                return id;
            });
        }
        this.build = m[5] ? m[5].split(".") : [];
        this.format();
    }
    format() {
        this.version = this.major + "." + this.minor + "." + this.patch;
        if (this.prerelease.length) {
            this.version += "-" + this.prerelease.join(".");
        }
        return this.version;
    }
    compare(other) {
        if (!(other instanceof SemVer)) {
            other = new SemVer(other, this.options);
        }
        return this.compareMain(other) || this.comparePre(other);
    }
    compareMain(other) {
        if (!(other instanceof SemVer)) {
            other = new SemVer(other, this.options);
        }
        return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
    }
    comparePre(other) {
        if (!(other instanceof SemVer)) {
            other = new SemVer(other, this.options);
        }
        if (this.prerelease.length && !other.prerelease.length) {
            return -1;
        } else if (!this.prerelease.length && other.prerelease.length) {
            return 1;
        } else if (!this.prerelease.length && !other.prerelease.length) {
            return 0;
        }
        let i1 = 0;
        do {
            const a = this.prerelease[i1];
            const b = other.prerelease[i1];
            if (a === undefined && b === undefined) {
                return 0;
            } else if (b === undefined) {
                return 1;
            } else if (a === undefined) {
                return -1;
            } else if (a === b) {
                continue;
            } else {
                return compareIdentifiers(a, b);
            }
        }while (++i1)
        return 1;
    }
    compareBuild(other) {
        if (!(other instanceof SemVer)) {
            other = new SemVer(other, this.options);
        }
        let i1 = 0;
        do {
            const a = this.build[i1];
            const b = other.build[i1];
            if (a === undefined && b === undefined) {
                return 0;
            } else if (b === undefined) {
                return 1;
            } else if (a === undefined) {
                return -1;
            } else if (a === b) {
                continue;
            } else {
                return compareIdentifiers(a, b);
            }
        }while (++i1)
        return 1;
    }
    inc(release, identifier) {
        switch(release){
            case "premajor":
                this.prerelease.length = 0;
                this.patch = 0;
                this.minor = 0;
                this.major++;
                this.inc("pre", identifier);
                break;
            case "preminor":
                this.prerelease.length = 0;
                this.patch = 0;
                this.minor++;
                this.inc("pre", identifier);
                break;
            case "prepatch":
                this.prerelease.length = 0;
                this.inc("patch", identifier);
                this.inc("pre", identifier);
                break;
            case "prerelease":
                if (this.prerelease.length === 0) {
                    this.inc("patch", identifier);
                }
                this.inc("pre", identifier);
                break;
            case "major":
                if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
                    this.major++;
                }
                this.minor = 0;
                this.patch = 0;
                this.prerelease = [];
                break;
            case "minor":
                if (this.patch !== 0 || this.prerelease.length === 0) {
                    this.minor++;
                }
                this.patch = 0;
                this.prerelease = [];
                break;
            case "patch":
                if (this.prerelease.length === 0) {
                    this.patch++;
                }
                this.prerelease = [];
                break;
            case "pre":
                if (this.prerelease.length === 0) {
                    this.prerelease = [
                        0
                    ];
                } else {
                    let i1 = this.prerelease.length;
                    while(--i1 >= 0){
                        if (typeof this.prerelease[i1] === "number") {
                            this.prerelease[i1]++;
                            i1 = -2;
                        }
                    }
                    if (i1 === -1) {
                        this.prerelease.push(0);
                    }
                }
                if (identifier) {
                    if (this.prerelease[0] === identifier) {
                        if (isNaN(this.prerelease[1])) {
                            this.prerelease = [
                                identifier,
                                0
                            ];
                        }
                    } else {
                        this.prerelease = [
                            identifier,
                            0
                        ];
                    }
                }
                break;
            default:
                throw new Error("invalid increment argument: " + release);
        }
        this.format();
        this.raw = this.version;
        return this;
    }
    toString() {
        return this.version;
    }
}
const numeric = /^[0-9]+$/;
function compareIdentifiers(a, b) {
    const anum = numeric.test(a);
    const bnum = numeric.test(b);
    if (a === null || b === null) throw "Comparison against null invalid";
    if (anum && bnum) {
        a = +a;
        b = +b;
    }
    return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
}
function compare(v1, v2, optionsOrLoose) {
    return new SemVer(v1, optionsOrLoose).compare(new SemVer(v2, optionsOrLoose));
}
function gt(v1, v2, optionsOrLoose) {
    return compare(v1, v2, optionsOrLoose) > 0;
}
function lt(v1, v2, optionsOrLoose) {
    return compare(v1, v2, optionsOrLoose) < 0;
}
function eq1(v1, v2, optionsOrLoose) {
    return compare(v1, v2, optionsOrLoose) === 0;
}
function neq(v1, v2, optionsOrLoose) {
    return compare(v1, v2, optionsOrLoose) !== 0;
}
function gte(v1, v2, optionsOrLoose) {
    return compare(v1, v2, optionsOrLoose) >= 0;
}
function lte(v1, v2, optionsOrLoose) {
    return compare(v1, v2, optionsOrLoose) <= 0;
}
function cmp(v1, operator, v2, optionsOrLoose) {
    switch(operator){
        case "===":
            if (typeof v1 === "object") v1 = v1.version;
            if (typeof v2 === "object") v2 = v2.version;
            return v1 === v2;
        case "!==":
            if (typeof v1 === "object") v1 = v1.version;
            if (typeof v2 === "object") v2 = v2.version;
            return v1 !== v2;
        case "":
        case "=":
        case "==":
            return eq1(v1, v2, optionsOrLoose);
        case "!=":
            return neq(v1, v2, optionsOrLoose);
        case ">":
            return gt(v1, v2, optionsOrLoose);
        case ">=":
            return gte(v1, v2, optionsOrLoose);
        case "<":
            return lt(v1, v2, optionsOrLoose);
        case "<=":
            return lte(v1, v2, optionsOrLoose);
        default:
            throw new TypeError("Invalid operator: " + operator);
    }
}
const ANY = {};
class Comparator {
    semver;
    operator;
    value;
    loose;
    options;
    constructor(comp, optionsOrLoose){
        if (!optionsOrLoose || typeof optionsOrLoose !== "object") {
            optionsOrLoose = {
                loose: !!optionsOrLoose,
                includePrerelease: false
            };
        }
        if (comp instanceof Comparator) {
            if (comp.loose === !!optionsOrLoose.loose) {
                return comp;
            } else {
                comp = comp.value;
            }
        }
        if (!(this instanceof Comparator)) {
            return new Comparator(comp, optionsOrLoose);
        }
        this.options = optionsOrLoose;
        this.loose = !!optionsOrLoose.loose;
        this.parse(comp);
        if (this.semver === ANY) {
            this.value = "";
        } else {
            this.value = this.operator + this.semver.version;
        }
    }
    parse(comp) {
        const r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
        const m = comp.match(r);
        if (!m) {
            throw new TypeError("Invalid comparator: " + comp);
        }
        const m1 = m[1];
        this.operator = m1 !== undefined ? m1 : "";
        if (this.operator === "=") {
            this.operator = "";
        }
        if (!m[2]) {
            this.semver = ANY;
        } else {
            this.semver = new SemVer(m[2], this.options.loose);
        }
    }
    test(version) {
        if (this.semver === ANY || version === ANY) {
            return true;
        }
        if (typeof version === "string") {
            version = new SemVer(version, this.options);
        }
        return cmp(version, this.operator, this.semver, this.options);
    }
    intersects(comp, optionsOrLoose) {
        if (!(comp instanceof Comparator)) {
            throw new TypeError("a Comparator is required");
        }
        if (!optionsOrLoose || typeof optionsOrLoose !== "object") {
            optionsOrLoose = {
                loose: !!optionsOrLoose,
                includePrerelease: false
            };
        }
        let rangeTmp;
        if (this.operator === "") {
            if (this.value === "") {
                return true;
            }
            rangeTmp = new Range(comp.value, optionsOrLoose);
            return satisfies(this.value, rangeTmp, optionsOrLoose);
        } else if (comp.operator === "") {
            if (comp.value === "") {
                return true;
            }
            rangeTmp = new Range(this.value, optionsOrLoose);
            return satisfies(comp.semver, rangeTmp, optionsOrLoose);
        }
        const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
        const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
        const sameSemVer = this.semver.version === comp.semver.version;
        const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
        const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, optionsOrLoose) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
        const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, optionsOrLoose) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
        return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
    }
    toString() {
        return this.value;
    }
}
class Range {
    range;
    raw;
    loose;
    options;
    includePrerelease;
    set;
    constructor(range, optionsOrLoose){
        if (!optionsOrLoose || typeof optionsOrLoose !== "object") {
            optionsOrLoose = {
                loose: !!optionsOrLoose,
                includePrerelease: false
            };
        }
        if (range instanceof Range) {
            if (range.loose === !!optionsOrLoose.loose && range.includePrerelease === !!optionsOrLoose.includePrerelease) {
                return range;
            } else {
                return new Range(range.raw, optionsOrLoose);
            }
        }
        if (range instanceof Comparator) {
            return new Range(range.value, optionsOrLoose);
        }
        if (!(this instanceof Range)) {
            return new Range(range, optionsOrLoose);
        }
        this.options = optionsOrLoose;
        this.loose = !!optionsOrLoose.loose;
        this.includePrerelease = !!optionsOrLoose.includePrerelease;
        this.raw = range;
        this.set = range.split(/\s*\|\|\s*/).map((range)=>this.parseRange(range.trim())).filter((c)=>{
            return c.length;
        });
        if (!this.set.length) {
            throw new TypeError("Invalid SemVer Range: " + range);
        }
        this.format();
    }
    format() {
        this.range = this.set.map((comps)=>comps.join(" ").trim()).join("||").trim();
        return this.range;
    }
    parseRange(range) {
        const loose = this.options.loose;
        range = range.trim();
        const hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
        range = range.replace(hr, hyphenReplace);
        range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
        range = range.replace(re[TILDETRIM], tildeTrimReplace);
        range = range.replace(re[CARETTRIM], caretTrimReplace);
        range = range.split(/\s+/).join(" ");
        const compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
        let set = range.split(" ").map((comp)=>parseComparator(comp, this.options)).join(" ").split(/\s+/);
        if (this.options.loose) {
            set = set.filter((comp)=>{
                return !!comp.match(compRe);
            });
        }
        return set.map((comp)=>new Comparator(comp, this.options));
    }
    test(version) {
        if (typeof version === "string") {
            version = new SemVer(version, this.options);
        }
        for(var i1 = 0; i1 < this.set.length; i1++){
            if (testSet(this.set[i1], version, this.options)) {
                return true;
            }
        }
        return false;
    }
    intersects(range, optionsOrLoose) {
        if (!(range instanceof Range)) {
            throw new TypeError("a Range is required");
        }
        return this.set.some((thisComparators)=>{
            return isSatisfiable(thisComparators, optionsOrLoose) && range.set.some((rangeComparators)=>{
                return isSatisfiable(rangeComparators, optionsOrLoose) && thisComparators.every((thisComparator)=>{
                    return rangeComparators.every((rangeComparator)=>{
                        return thisComparator.intersects(rangeComparator, optionsOrLoose);
                    });
                });
            });
        });
    }
    toString() {
        return this.range;
    }
}
function testSet(set, version, options) {
    for(let i1 = 0; i1 < set.length; i1++){
        if (!set[i1].test(version)) {
            return false;
        }
    }
    if (version.prerelease.length && !options.includePrerelease) {
        for(let i11 = 0; i11 < set.length; i11++){
            if (set[i11].semver === ANY) {
                continue;
            }
            if (set[i11].semver.prerelease.length > 0) {
                const allowed = set[i11].semver;
                if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
                    return true;
                }
            }
        }
        return false;
    }
    return true;
}
function isSatisfiable(comparators, options) {
    let result1 = true;
    const remainingComparators = comparators.slice();
    let testComparator = remainingComparators.pop();
    while(result1 && remainingComparators.length){
        result1 = remainingComparators.every((otherComparator)=>{
            return testComparator?.intersects(otherComparator, options);
        });
        testComparator = remainingComparators.pop();
    }
    return result1;
}
function parseComparator(comp, options) {
    comp = replaceCarets(comp, options);
    comp = replaceTildes(comp, options);
    comp = replaceXRanges(comp, options);
    comp = replaceStars(comp, options);
    return comp;
}
function isX(id) {
    return !id || id.toLowerCase() === "x" || id === "*";
}
function replaceTildes(comp, options) {
    return comp.trim().split(/\s+/).map((comp)=>replaceTilde(comp, options)).join(" ");
}
function replaceTilde(comp, options) {
    const r = options.loose ? re[TILDELOOSE] : re[TILDE];
    return comp.replace(r, (_, M, m, p, pr)=>{
        let ret;
        if (isX(M)) {
            ret = "";
        } else if (isX(m)) {
            ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
        } else if (isX(p)) {
            ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
        } else if (pr) {
            ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
        } else {
            ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
        }
        return ret;
    });
}
function replaceCarets(comp, options) {
    return comp.trim().split(/\s+/).map((comp)=>replaceCaret(comp, options)).join(" ");
}
function replaceCaret(comp, options) {
    const r = options.loose ? re[CARETLOOSE] : re[CARET];
    return comp.replace(r, (_, M, m, p, pr)=>{
        let ret;
        if (isX(M)) {
            ret = "";
        } else if (isX(m)) {
            ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
        } else if (isX(p)) {
            if (M === "0") {
                ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
            } else {
                ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
            }
        } else if (pr) {
            if (M === "0") {
                if (m === "0") {
                    ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1);
                } else {
                    ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
                }
            } else {
                ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0";
            }
        } else {
            if (M === "0") {
                if (m === "0") {
                    ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1);
                } else {
                    ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
                }
            } else {
                ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
            }
        }
        return ret;
    });
}
function replaceXRanges(comp, options) {
    return comp.split(/\s+/).map((comp)=>replaceXRange(comp, options)).join(" ");
}
function replaceXRange(comp, options) {
    comp = comp.trim();
    const r = options.loose ? re[XRANGELOOSE] : re[XRANGE];
    return comp.replace(r, (ret, gtlt, M, m, p, pr)=>{
        const xM = isX(M);
        const xm = xM || isX(m);
        const xp = xm || isX(p);
        const anyX = xp;
        if (gtlt === "=" && anyX) {
            gtlt = "";
        }
        if (xM) {
            if (gtlt === ">" || gtlt === "<") {
                ret = "<0.0.0";
            } else {
                ret = "*";
            }
        } else if (gtlt && anyX) {
            if (xm) {
                m = 0;
            }
            p = 0;
            if (gtlt === ">") {
                gtlt = ">=";
                if (xm) {
                    M = +M + 1;
                    m = 0;
                    p = 0;
                } else {
                    m = +m + 1;
                    p = 0;
                }
            } else if (gtlt === "<=") {
                gtlt = "<";
                if (xm) {
                    M = +M + 1;
                } else {
                    m = +m + 1;
                }
            }
            ret = gtlt + M + "." + m + "." + p;
        } else if (xm) {
            ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
        } else if (xp) {
            ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
        }
        return ret;
    });
}
function replaceStars(comp, options) {
    return comp.trim().replace(re[STAR], "");
}
function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
    if (isX(fM)) {
        from = "";
    } else if (isX(fm)) {
        from = ">=" + fM + ".0.0";
    } else if (isX(fp)) {
        from = ">=" + fM + "." + fm + ".0";
    } else {
        from = ">=" + from;
    }
    if (isX(tM)) {
        to = "";
    } else if (isX(tm)) {
        to = "<" + (+tM + 1) + ".0.0";
    } else if (isX(tp)) {
        to = "<" + tM + "." + (+tm + 1) + ".0";
    } else if (tpr) {
        to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
    } else {
        to = "<=" + to;
    }
    return (from + " " + to).trim();
}
function satisfies(version, range, optionsOrLoose) {
    try {
        range = new Range(range, optionsOrLoose);
    } catch (er) {
        return false;
    }
    return range.test(version);
}
function coerce(version, optionsOrLoose) {
    if (version instanceof SemVer) {
        return version;
    }
    if (typeof version !== "string") {
        return null;
    }
    const match = version.match(re[COERCE]);
    if (match == null) {
        return null;
    }
    return parse12(match[1] + "." + (match[2] || "0") + "." + (match[3] || "0"), optionsOrLoose);
}
const kProjectType = "type";
const kProjectTitle = "title";
const kProjectRender = "render";
const kProjectPreRender = "pre-render";
const kProjectPostRender = "post-render";
const kProjectExecuteDir = "execute-dir";
const kProjectOutputDir = "output-dir";
const kProjectLibDir = "lib-dir";
const kProjectResources = "resources";
const kProjectWatchInputs = "watch-inputs";
async function resolvePreviewOptions(options, project) {
    if (project?.config?.project.preview) {
        options = mergeConfigs(project.config.project.preview, options);
    }
    const resolved = mergeConfigs({
        host: kLocalhost,
        browser: true,
        [kProjectWatchInputs]: !isRStudio(),
        timeout: 0,
        navigate: true
    }, options);
    if (resolved.port) {
        if (!await waitForPort({
            port: resolved.port,
            hostname: resolved.host
        })) {
            throw new Error(`Requested port ${options.port} is already in use.`);
        }
    } else {
        resolved.port = findOpenPort();
    }
    return resolved;
}
const kProject404File = "404.html";
const kAriaLabel = "aria-label";
const kCollapseLevel = "collapse-level";
const kCollapseBelow = "collapse-below";
const kLogoAlt = "logo-alt";
const kLogoHref = "logo-href";
const kSidebarMenus = "sidebar-menus";
function projectExcludeDirs(context) {
    const outputDir = projectOutputDir(context);
    if (outputDir) {
        return [
            outputDir
        ];
    } else {
        return [];
    }
}
function projectOutputDir(context) {
    let outputDir = context.config?.project[kProjectOutputDir];
    if (outputDir) {
        outputDir = join3(context.dir, outputDir);
    } else {
        outputDir = context.dir;
    }
    if (existsSync(outputDir)) {
        return Deno.realPathSync(outputDir);
    } else {
        return outputDir;
    }
}
function isProjectInputFile(path, context) {
    if (existsSync(path)) {
        const renderPath = Deno.realPathSync(path);
        return context.files.input.map((file)=>Deno.realPathSync(file)).includes(renderPath);
    } else {
        return false;
    }
}
function projectConfigFile(dir) {
    return [
        "_quarto.yml",
        "_quarto.yaml"
    ].map((file)=>join3(dir, file)).find(existsSync);
}
function projectVarsFile(dir) {
    return [
        "_variables.yml",
        "_variables.yaml"
    ].map((file)=>join3(dir, file)).find(existsSync);
}
function projectOffset(context, input) {
    const projDir = Deno.realPathSync(context.dir);
    const inputDir = Deno.realPathSync(dirname2(input));
    const offset = relative2(inputDir, projDir) || ".";
    return pathWithForwardSlashes(offset);
}
function toInputRelativePaths(type, baseDir, inputDir, collection, ignoreResources, parentKey) {
    const resourceIgnoreFields = [
        ignoreFieldsForProjectType(type),
        ...ignoreResources || [], 
    ];
    __VIRTUAL_FILE144(collection, (value, index, collection)=>{
        const assign = (value)=>{
            if (typeof index === "number") {
                collection[index] = value;
            } else if (typeof index === "string") {
                collection[index] = value;
            }
        };
        if (resourceIgnoreFields.includes(index) || parentKey === kHtmlMathMethod && index === "method") {} else if (Array.isArray(value)) {
            assign(toInputRelativePaths(type, baseDir, inputDir, value, ignoreResources));
        } else if (typeof value === "object") {
            assign(toInputRelativePaths(type, baseDir, inputDir, value, ignoreResources, index));
        } else if (typeof value === "string") {
            if (value.length > 0 && !isAbsolute2(value)) {
                const projectPath = join3(baseDir, value);
                try {
                    if (existsSync(projectPath)) {
                        const offset = relative2(inputDir, baseDir);
                        assign(pathWithForwardSlashes(join3(offset, value)));
                    }
                } catch  {}
            }
        }
    });
    return collection;
}
function ignoreFieldsForProjectType(type) {
    const resourceIgnoreFields = type ? [
        "project"
    ].concat(type.resourceIgnoreFields ? type.resourceIgnoreFields() : []) : [];
    return resourceIgnoreFields;
}
const _types = [];
function registerProjectType(projectType) {
    _types.push(projectType);
}
function kTypes1() {
    return _types.slice();
}
function parseProjectType(projType) {
    if (projType) {
        const parts = projType.split(":");
        return {
            type: parts[0],
            template: parts.length > 1 ? parts[1] : undefined
        };
    } else {
        return {
            type: "default"
        };
    }
}
function projectTypes() {
    return kTypes1().map((type)=>type.type);
}
function projectTypeAliases() {
    return kTypes1().flatMap((type)=>type.typeAliases || []);
}
function projectType(type = "default") {
    const projectType = kTypes1().find((pt)=>pt.type === type);
    if (projectType) {
        return projectType;
    } else {
        throw new Error(`Unsupported project type ${type}`);
    }
}
const kBuiltInExtOrg = "quarto";
const kCommon = "common";
const kExtensionDir = "_extensions";
const kTitle1 = "title";
const kAuthor1 = "author";
const kVersion = "version";
const kQuartoRequired = "quarto-required";
const kRevealJSPlugins = "revealjs-plugins";
function extensionIdString(extensionId) {
    if (extensionId.organization) {
        return `${extensionId.organization}/${extensionId.name}`;
    } else {
        return extensionId.name;
    }
}
const getProjectConfigFieldsSchema = defineCached(async ()=>{
    return {
        schema: objectSchemaFromFieldsObject(getYamlIntelligenceResource("schema/project.yml")),
        errorHandlers: []
    };
}, "project-config-fields");
const getExtensionConfigFieldsSchema = defineCached(async ()=>{
    return {
        schema: objectSchemaFromFieldsObject(getYamlIntelligenceResource("schema/extension.yml")),
        errorHandlers: []
    };
}, "extension-config-fields");
function disallowTopLevelType(error, parse, _schema) {
    if (!(error.instancePath.length === 1 && error.instancePath[0] === "type")) {
        return error;
    }
    const violatingObject = locateAnnotation(parse, error.instancePath, "key");
    const localizedError = createLocalizedError({
        ...error,
        message: "top-level key 'type' is not allowed in project configuration.",
        violatingObject,
        source: mappedSubstring(parse.source, violatingObject.start, violatingObject.end + 1)
    });
    localizedError.niceError.info["top-level-type-not-allowed"] = "Did you mean to use 'project: type: ...' instead?";
    return localizedError;
}
const getProjectConfigSchema = defineCached(async ()=>{
    const projectConfigFields = await getProjectConfigFieldsSchema();
    const execute = await getFormatExecuteOptionsSchema();
    const format = await getFrontMatterFormatSchema();
    const profile = refSchema("project-profile", "Specify a default profile and profile groups");
    const result1 = allOfSchema(objectSchema({
        properties: {
            execute,
            format,
            profile
        },
        description: "be a Quarto YAML front matter object"
    }), execute, await getFrontMatterSchema(), projectConfigFields);
    return {
        schema: describeSchema(result1, "a project configuration object"),
        errorHandlers: [
            disallowTopLevelType
        ]
    };
}, "project-config");
const getExtensionConfigSchema = defineCached(async ()=>{
    const extensionConfig = await getExtensionConfigFieldsSchema();
    return {
        schema: describeSchema(extensionConfig, "an extension configuration object"),
        errorHandlers: []
    };
}, "extension-config");
function asArray(x) {
    return x ? Array.isArray(x) ? x : [
        x
    ] : [];
}
const kQuartoScratch = ".quarto";
function projectScratchPath(dir, path = "") {
    const scratchDir = join3(dir, kQuartoScratch);
    ensureDirSync(scratchDir);
    if (path) {
        path = join3(scratchDir, path);
        ensureDirSync(dirname2(path));
        return path;
    } else {
        return Deno.realPathSync(scratchDir);
    }
}
const kQuartoIgnore = [
    `/${kQuartoScratch}/`
];
async function ensureGitignore(dir, forceEnv = false) {
    const gitignorePath = join3(dir, ".gitignore");
    if (await exists(gitignorePath)) {
        const gitignore = lines(Deno.readTextFileSync(gitignorePath)).map((line)=>line.trim());
        const requiredEntries = [];
        for (const requiredEntry of gitignoreEntries(dir, forceEnv)){
            if (!gitignore.includes(requiredEntry)) {
                requiredEntries.push(requiredEntry);
            }
        }
        const kLocalEntry = `/_*.local`;
        if (!gitignore.includes(kLocalEntry)) {
            for (const walk of walkSync(dir, {
                maxDepth: 1
            })){
                if (walk.name.match(/^_.*?\.local$/)) {
                    requiredEntries.push(kLocalEntry);
                    break;
                }
            }
        }
        if (requiredEntries.length > 0) {
            writeGitignore(dir, gitignore.concat(requiredEntries));
            return true;
        } else {
            return false;
        }
    } else if (forceEnv) {
        await createGitignore(dir, forceEnv);
        return true;
    } else if (await which("git")) {
        const result1 = await execProcess({
            cmd: [
                "git",
                "rev-parse"
            ],
            cwd: dir,
            stdout: "piped",
            stderr: "piped"
        });
        if (result1.success) {
            await createGitignore(dir, forceEnv);
            return true;
        } else {
            return false;
        }
    } else {
        return false;
    }
}
function createGitignore(dir, forceEnv = false) {
    writeGitignore(dir, gitignoreEntries(dir, forceEnv));
}
function gitignoreEntries(dir, forceEnv = false) {
    const kEnv = "env/";
    if (forceEnv || isEnvDir(join3(dir, kEnv))) {
        return [
            "/" + kEnv
        ].concat(kQuartoIgnore);
    } else {
        return kQuartoIgnore;
    }
}
function writeGitignore(dir, lines) {
    const lineEnding = Deno.build.os === "windows" ? "\r\n" : "\n";
    Deno.writeTextFileSync(join3(dir, ".gitignore"), lines.join(lineEnding) + lineEnding);
}
function copyTo(src, dest, options = {
    overwrite: true
}) {
    src = resolve2(src);
    dest = resolve2(dest);
    if (src === dest) {
        throw new Error("Source and destination cannot be the same.");
    }
    const srcStat = Deno.lstatSync(src);
    if (srcStat.isDirectory && isSubdir(src, dest)) {
        throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`);
    }
    if (srcStat.isSymlink) {
        copySymlinkSync(src, dest, options);
    } else if (srcStat.isDirectory) {
        copyDirSync(src, dest, options);
    } else if (srcStat.isFile) {
        copyFileSync(src, dest, options);
    }
}
function copyMinimal(srcDir, destDir, skip, filter) {
    skip = [
        ...skip || [],
        /\.DS_Store/
    ];
    const srcFiles = [];
    for (const walk of walkSync(srcDir, {
        includeDirs: false,
        followSymlinks: false,
        skip
    })){
        const srcFile = walk.path;
        if (filter && !filter(srcFile)) {
            continue;
        }
        srcFiles.push(srcFile);
    }
    for (const srcFile1 of srcFiles){
        if (!existsSync(srcFile1)) {
            continue;
        }
        const destFile = join3(destDir, relative2(srcDir, srcFile1));
        copyFileIfNewer(srcFile1, destFile);
    }
}
function copyFileIfNewer(srcFile, destFile) {
    const doCopy = ()=>{
        copyTo(srcFile, destFile, {
            overwrite: true,
            preserveTimestamps: true
        });
    };
    ensureDirSync(dirname2(destFile));
    try {
        if (existsSync(destFile)) {
            const srcInfo = Deno.statSync(srcFile);
            const destInfo = Deno.statSync(destFile);
            if (!srcInfo.mtime || !destInfo.mtime || destInfo.mtime < srcInfo.mtime) {
                doCopy();
            }
        } else {
            doCopy();
        }
    } catch  {
        doCopy();
    }
}
function copyFileSync(src, dest, options) {
    ensureValidCopySync(src, dest, options);
    if (existsSync(dest)) {
        Deno.removeSync(dest);
    }
    Deno.copyFileSync(src, dest);
    if (options.preserveTimestamps) {
        const statInfo = Deno.statSync(src);
        if (statInfo.atime && statInfo.mtime) {
            Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
        }
    }
}
function copyDirSync(src, dest, options) {
    const destStat = ensureValidCopySync(src, dest, {
        ...options,
        isFolder: true
    });
    if (!destStat) {
        ensureDirSync(dest);
    }
    if (options.preserveTimestamps) {
        const srcStatInfo = Deno.statSync(src);
        if (srcStatInfo.atime && srcStatInfo.mtime) {
            Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime);
        }
    }
    for (const entry of Deno.readDirSync(src)){
        const srcPath = join3(src, entry.name);
        const destPath = join3(dest, basename2(srcPath));
        if (entry.isSymlink) {
            copySymlinkSync(srcPath, destPath, options);
        } else if (entry.isDirectory) {
            copyDirSync(srcPath, destPath, options);
        } else if (entry.isFile) {
            copyFileSync(srcPath, destPath, options);
        }
    }
}
function copySymlinkSync(src, dest, options) {
    ensureValidCopySync(src, dest, options);
    if (existsSync(dest)) {
        Deno.removeSync(dest);
    }
    const originSrcFilePath = Deno.readLinkSync(src);
    const type = getFileInfoType(Deno.lstatSync(src));
    if (isWindows()) {
        Deno.symlinkSync(originSrcFilePath, dest, {
            type: type === "dir" ? "dir" : "file"
        });
    } else {
        Deno.symlinkSync(originSrcFilePath, dest);
    }
    if (options.preserveTimestamps) {
        const statInfo = Deno.lstatSync(src);
        if (statInfo.atime && statInfo.mtime) {
            Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
        }
    }
}
function ensureValidCopySync(src, dest, options) {
    let destStat;
    try {
        destStat = Deno.lstatSync(dest);
    } catch (err) {
        if (err instanceof Deno.errors.NotFound) {
            return;
        }
        throw err;
    }
    if (options.isFolder && !destStat.isDirectory) {
        throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
    }
    if (!options.overwrite) {
        throw new Error(`'${dest}' already exists.`);
    }
    return destStat;
}
function projectResourceFiles(dir, config) {
    let resourceGlobs = asArray(config.project[kProjectResources]);
    const resourceFiles = [];
    const outputDir = config.project[kProjectOutputDir];
    if (outputDir) {
        resourceGlobs = (resourceGlobs || []).concat(kQuartoIgnore.map((entry)=>`!${entry}`));
        const exclude = outputDir ? [
            outputDir
        ] : [];
        const projectResourceFiles = resolvePathGlobs(dir, resourceGlobs, exclude);
        resourceFiles.push(...__VIRTUAL_FILE137(projectResourceFiles.include, projectResourceFiles.exclude));
        resourceFiles.push(...[
            "robots.txt",
            ".nojekyll",
            "CNAME",
            "_redirects",
            kProject404File
        ].map((file)=>join3(dir, file)).filter(existsSync));
    }
    return __VIRTUAL_FILE181(resourceFiles);
}
function copyResourceFile(rootDir, srcFile, destFile) {
    if (!Deno.realPathSync(srcFile).startsWith(Deno.realPathSync(rootDir))) {
        return;
    }
    ensureDirSync(dirname2(destFile));
    copyFileIfNewer(srcFile, destFile);
    if (extname2(srcFile).toLowerCase() === ".css") {
        handleCssReferences(rootDir, srcFile, destFile);
    }
}
function fixupCssReferences1(css, offset, onRef) {
    let destCss = css.replaceAll(kCssUrlRegex, (_match, p1, p2)=>{
        const ref = p2.startsWith("/") ? `${offset}${p2.slice(1)}` : p2;
        return `url(${p1 || ""}${onRef(ref)}${p1 || ""})`;
    });
    destCss = destCss.replaceAll(kCssImportRegex, (_match, p1, p2)=>{
        const ref = p2.startsWith("/") ? `${offset}${p2.slice(1)}` : p2;
        return `@import ${p1 || ""}${onRef(ref)}${p1 || ""}`;
    });
    return destCss;
}
function handleCssReferences(rootDir, srcFile, destFile) {
    const css = Deno.readTextFileSync(destFile);
    const offset = relative2(dirname2(srcFile), rootDir);
    const copyRef = (ref)=>{
        const refPath = join3(dirname2(srcFile), ref);
        if (safeExistsSync(refPath)) {
            const refDestPath = join3(dirname2(destFile), ref);
            copyResourceFile(rootDir, refPath, refDestPath);
        }
        return ref;
    };
    const destCss = fixupCssReferences1(css, offset, copyRef);
    if (destCss !== css) {
        Deno.writeTextFileSync(destFile, destCss);
    }
}
async function readLanguageTranslations(translationFile, lang) {
    const files = [];
    const maybeReadYaml = async (file)=>{
        if (existsSync(file)) {
            files.push(Deno.realPathSync(file));
            const errMsg = "Validation of format language object failed.";
            const formatLanguageSchema = getSchemaDefinition("format-language");
            const result1 = await readAndValidateYamlFromFile(file, formatLanguageSchema, errMsg);
            return result1;
        } else {
            return {};
        }
    };
    const language = await maybeReadYaml(translationFile);
    const ext = extname2(translationFile);
    const [dir, stem] = dirAndStem(translationFile);
    const variations = [];
    if (lang) {
        const subtags = lang.split("-");
        for(let i1 = 0; i1 < subtags.length; i1++){
            variations.push(subtags.slice(0, i1 + 1).join("-"));
        }
    } else {
        const glob = stem + "-*" + ext;
        const variationRe = new RegExp("^" + stem + "-(.*?)" + ext);
        for (const entry of expandGlobSync(glob, {
            root: dir,
            includeDirs: false,
            caseInsensitive: true
        })){
            const match = entry.name.match(variationRe);
            if (match) {
                variations.push(match[1]);
            }
        }
    }
    for (const variation of variations){
        const translations = await maybeReadYaml(join3(dir, stem + "-" + variation + ext));
        Object.keys(translations).forEach((key)=>{
            if (kLanguageDefaultsKeys.includes(key)) {
                language[variation] = language[variation] || {};
                language[variation][key] = translations[key];
            } else if (typeof translations[key] === "object") {
                const targetKey = variation + "-" + key;
                language[targetKey] = language[targetKey] || {};
                language[targetKey] = {
                    ...language[targetKey],
                    ...translations[key]
                };
            }
        });
    }
    return {
        language,
        files
    };
}
function readDefaultLanguageTranslations(lang) {
    return readLanguageTranslations(resourcePath(join3("language", "_language.yml")), lang);
}
async function resolveLanguageMetadata(metadata, dir) {
    if (typeof metadata[kLanguageDefaults] === "string") {
        const translationsFile = join3(dir, metadata[kLanguageDefaults]);
        if (!existsSync(translationsFile)) {
            throw new Error("Specified 'language' file does not exist: " + translationsFile);
        }
        const translations = await readLanguageTranslations(translationsFile);
        metadata[kLanguageDefaults] = translations.language;
        return translations.files;
    } else if (typeof metadata[kLanguageDefaults] !== "object") {
        metadata[kLanguageDefaults] = {};
        return [];
    } else {
        return [];
    }
}
function translationsForLang(language, lang) {
    let translations = {};
    Object.keys(language).forEach((key)=>{
        if (kLanguageDefaultsKeys.includes(key)) {
            translations[key] = language[key];
        }
    });
    const subtags = lang.split("-");
    for(let i1 = 0; i1 < subtags.length; i1++){
        const variation = subtags.slice(0, i1 + 1).join("-");
        if (typeof language[variation] === "object") {
            translations = mergeConfigs(translations, language[variation]);
        }
    }
    return translations;
}
async function formatLanguage(metadata, language, flags) {
    const langCode = flags?.pandocMetadata?.[kLang] || metadata[kLang] || "en";
    const defaultLanguge = translationsForLang((await readDefaultLanguageTranslations(langCode)).language, langCode);
    language = mergeConfigs(defaultLanguge, language);
    return translationsForLang(language, langCode);
}
const kWebsite = "website";
const kSiteUrl = "site-url";
const kSitePath = "site-path";
const kSiteTitle = "title";
const kSiteFavicon = "favicon";
const kSiteRepoUrl = "repo-url";
const kSiteRepoSubdir = "repo-subdir";
const kSiteRepoBranch = "repo-branch";
const kSiteRepoActions = "repo-actions";
const kSiteReaderMode = "reader-mode";
const kSiteNavbar = "navbar";
const kSiteSidebar = "sidebar";
const kSiteSidebarStyle = "style";
const kSiteSidebarHeader = "header";
const kSiteSidebarFooter = "footer";
const kSitePageNavigation = "page-navigation";
const kPageFooter = "page-footer";
const kMarginHeader = "margin-header";
const kMarginFooter = "margin-footer";
const kBodyHeader = "body-header";
const kBodyFooter = "body-footer";
const kContents = "contents";
const kTwitterCard = "twitter-card";
const kOpenGraph = "open-graph";
const kCardStyle = "card-style";
const kImage = "image";
const kImageWidth = "image-width";
const kImageHeight = "image-height";
const kImageAlt = "image-alt";
const kCreator = "creator";
const kTwitterSite = "site";
const kLocale = "locale";
const kSiteName = "site-name";
const kDefaultProjectFileContents = "{ project: { type: 'default' } }";
const defaultProjectType = {
    type: "default",
    formatLibDirs: ()=>[
            "bootstrap",
            "quarto-html",
            "quarto-ojs",
            "quarto-diagram",
            "quarto-contrib", 
        ],
    create: (title)=>{
        const resourceDir = resourcePath(join3("projects", "default"));
        return {
            configTemplate: join3(resourceDir, "templates", "_quarto.ejs.yml"),
            resourceDir,
            scaffold: (engine, kernel, packages)=>{
                const file = [
                    {
                        name: title,
                        content: `## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.`,
                        title
                    }
                ];
                if (engine === kJupyterEngine && (!kernel || kernel.startsWith("python")) && packages) {
                    file[0].content += `
  
## Running Code

You can embed executable code like this:

\`\`\`{python}
1 + 1
\`\`\`

You can add options to executable code like this

\`\`\`{python}
#| echo: false
2 * 2
\`\`\`

The \`echo: false\` option disables the printing of code (only output is displayed).`;
                    if (packages.includes("matplotlib")) {
                        file[0].noEngineContent = true;
                        file[0].content += `

## Plots

See @fig-polar for an example of rendering plots as figures:

\`\`\`{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"
#| code-fold: true

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
\`\`\`

Note that we included the cell option \`fold: true\` to hide the code by default (click the *Code* button to show it).`;
                    }
                }
                return file;
            }
        };
    }
};
function deleteProjectMetadata(metadata) {
    const projType = projectType(metadata.project?.[kProjectType]);
    if (projType.metadataFields) {
        for (const field of projType.metadataFields().concat("project")){
            if (typeof field === "string") {
                delete metadata[field];
            } else {
                for (const key of Object.keys(metadata)){
                    if (field.test(key)) {
                        delete metadata[key];
                    }
                }
            }
        }
    }
    delete metadata.project;
}
const kQuartoExtOrganization = "quarto-ext";
const kQuartoExtBuiltIn = [
    "code-filename",
    "grouped-tabsets"
];
function createExtensionContext() {
    const extensionCache = {};
    const extensions = async (input, config, projectDir, options)=>{
        const extensions = await loadExtensions(extensionCache, input, projectDir);
        const results = Object.values(extensions).filter((ext)=>options?.builtIn !== false || ext.id.organization !== kBuiltInExtOrg);
        return results.map((extension)=>{
            if (input) {
                return resolveExtensionPaths(extension, input, config);
            } else {
                return extension;
            }
        });
    };
    const extension = async (name, input, config, projectDir)=>{
        const unresolved = await loadExtension(name, input, projectDir);
        return resolveExtensionPaths(unresolved, input, config);
    };
    const find = async (name, input, contributes, config, projectDir, options)=>{
        const extId = toExtensionId(name);
        return findExtensions(await extensions(input, config, projectDir, options), extId, contributes);
    };
    return {
        extension,
        extensions,
        find
    };
}
async function projectContext(path, flags, force = false) {
    let dir = Deno.realPathSync(Deno.statSync(path).isDirectory ? path : dirname2(path));
    const originalDir = dir;
    const extensionContext = createExtensionContext();
    const configSchema = await getProjectConfigSchema();
    const configResolvers = [
        quartoYamlProjectConfigResolver(configSchema),
        await projectExtensionsConfigResolver(extensionContext, dir), 
    ];
    while(true){
        const resolver = configResolvers[0];
        const resolved = await resolver(dir);
        if (resolved) {
            let projectConfig = resolved.config;
            const configFiles = resolved.files;
            projectConfig = migrateProjectConfig(projectConfig);
            const projType = projectConfig.project[kProjectType];
            if (projType && !projectTypes().includes(projType)) {
                projectConfig = await resolveProjectExtension(extensionContext, projType, projectConfig, dir);
            }
            const configSchema1 = await getProjectConfigSchema();
            const result1 = await initializeProfileConfig(dir, projectConfig, configSchema1);
            projectConfig = result1.config;
            configFiles.push(...result1.files);
            const dotenvFiles = await dotenvSetVariables(dir);
            configFiles.push(...dotenvFiles);
            const varsFile = projectVarsFile(dir);
            if (varsFile) {
                configFiles.push(varsFile);
                const vars = readYaml(varsFile);
                projectConfig[kQuartoVarsKey] = mergeConfigs(projectConfig[kQuartoVarsKey] || {}, vars);
            }
            const translationFiles = await resolveLanguageTranslations(projectConfig, dir);
            configFiles.push(...translationFiles);
            if (flags?.to && flags?.to !== "all" && flags?.to !== "default") {
                const projectFormats = normalizeFormatYaml(projectConfig[kMetadataFormat]);
                const toFormat = projectFormats[flags?.to] || {};
                delete projectFormats[flags?.to];
                const formats = {
                    [flags?.to]: toFormat
                };
                Object.keys(projectFormats).forEach((format)=>{
                    formats[format] = projectFormats[format];
                });
                projectConfig[kMetadataFormat] = formats;
            }
            if (projectConfig?.project) {
                if (flags?.outputDir) {
                    projectConfig.project[kProjectOutputDir] = flags.outputDir;
                }
                if (typeof projectConfig.project[kProjectPreRender] === "string") {
                    projectConfig.project[kProjectPreRender] = [
                        projectConfig.project[kProjectPreRender], 
                    ];
                }
                if (typeof projectConfig.project[kProjectPostRender] === "string") {
                    projectConfig.project[kProjectPostRender] = [
                        projectConfig.project[kProjectPostRender], 
                    ];
                }
                const type = projectType(projectConfig.project?.[kProjectType]);
                if (projectConfig.project[kProjectLibDir] === undefined && type.libDir) {
                    projectConfig.project[kProjectLibDir] = type.libDir;
                }
                if (!projectConfig.project[kProjectOutputDir] && type.outputDir) {
                    projectConfig.project[kProjectOutputDir] = type.outputDir;
                }
                if (projectConfig.project[kProjectOutputDir] === ".") {
                    delete projectConfig.project[kProjectOutputDir];
                }
                const projOutputDir = projectConfig.project[kProjectOutputDir];
                if (projOutputDir && isAbsolute2(projOutputDir)) {
                    projectConfig.project[kProjectOutputDir] = relative2(dir, projOutputDir);
                }
                if (type.config) {
                    projectConfig = await type.config(dir, projectConfig, flags);
                }
                const { files , engines  } = projectInputFiles(dir, projectConfig);
                const fullPath = Deno.realPathSync(path);
                if (Deno.statSync(fullPath).isFile && !files.includes(fullPath)) {
                    return undefined;
                }
                return {
                    dir,
                    engines,
                    files: {
                        input: files,
                        resources: projectResourceFiles(dir, projectConfig),
                        config: configFiles,
                        configResources: projectConfigResources(dir, projectConfig, type)
                    },
                    config: projectConfig,
                    formatExtras: type.formatExtras
                };
            } else {
                const { files: files1 , engines: engines1  } = projectInputFiles(dir);
                return {
                    dir,
                    engines: engines1,
                    config: projectConfig,
                    files: {
                        input: files1,
                        resources: projectResourceFiles(dir, projectConfig),
                        config: configFiles,
                        configResources: projectConfigResources(dir, projectConfig)
                    }
                };
            }
        } else {
            const nextDir = dirname2(dir);
            if (nextDir === dir) {
                if (configResolvers.length > 1) {
                    dir = originalDir;
                    configResolvers.shift();
                } else if (force) {
                    const context = {
                        dir: originalDir,
                        engines: [],
                        config: {
                            project: {}
                        },
                        files: {
                            input: []
                        }
                    };
                    if (Deno.statSync(path).isDirectory) {
                        const { files: files2 , engines: engines2  } = projectInputFiles(originalDir);
                        context.engines = engines2;
                        context.files.input = files2;
                    } else {
                        const input = Deno.realPathSync(path);
                        context.engines = [
                            fileExecutionEngine(input)?.name || kMarkdownEngine, 
                        ];
                        context.files.input = [
                            input
                        ];
                    }
                    return context;
                } else {
                    return undefined;
                }
            } else {
                dir = nextDir;
            }
        }
    }
}
function quartoYamlProjectConfigResolver(configSchema) {
    return async (dir)=>{
        const configFile = projectConfigFile(dir);
        if (configFile) {
            const files = [
                configFile
            ];
            const errMsg = "Project _quarto.yml validation failed.";
            let config = await readAndValidateYamlFromFile(configFile, configSchema, errMsg, kDefaultProjectFileContents);
            config.project = config.project || {};
            const includedMeta = await includedMetadata(dir, config, configSchema);
            const metadata = includedMeta.metadata;
            files.push(...includedMeta.files);
            config = mergeProjectMetadata(config, metadata);
            delete config[kMetadataFile];
            delete config[kMetadataFiles];
            return {
                config,
                files
            };
        } else {
            return undefined;
        }
    };
}
async function projectExtensionsConfigResolver(context, dir) {
    const projectTypeDetectors = (await context.extensions(dir)).reduce((projectTypeDetectors, extension)=>{
        if (extension.contributes.project) {
            const project = extension.contributes.project;
            if (project?.project?.detect) {
                const detect = asArray(project?.project.detect);
                projectTypeDetectors.push({
                    type: extension.id.name,
                    detect
                });
            }
        }
        return projectTypeDetectors;
    }, []);
    return (dir)=>{
        for (const detector of projectTypeDetectors){
            if (detector.detect.some((files)=>files.every((file)=>safeExistsSync(join3(dir, file))))) {
                return Promise.resolve({
                    config: {
                        project: {
                            type: detector.type
                        }
                    },
                    files: []
                });
            }
        }
        return Promise.resolve(undefined);
    };
}
function projectExtensionPathResolver(libDir) {
    return (href, projectOffset)=>{
        const projectRelativeHref = relative2(projectOffset, href);
        if (projectRelativeHref.startsWith("_extensions/")) {
            const projectTargetHref = projectRelativeHref.replace(/^_extensions\//, `${libDir}/quarto-contrib/quarto-project/`);
            copyResourceFile(".", projectRelativeHref, projectTargetHref);
            return join3(projectOffset, projectTargetHref);
        }
        return href;
    };
}
function filterBuiltInExtensions(extensions) {
    const quartoExts = extensions.filter((ext)=>{
        return ext.id.organization === kBuiltInExtOrg;
    });
    const nowBuiltInExtensions = extensions?.filter((ext)=>{
        return ext.id.organization === "quarto-ext" && quartoExts.map((ext)=>ext.id.name).includes(ext.id.name);
    });
    if (nowBuiltInExtensions.length > 0) {
        extensions = filterExtensionAndWarn(extensions, nowBuiltInExtensions);
    }
    return extensions;
}
function filterExtensionAndWarn(extensions, filterOutExtensions) {
    warnToRemoveExtensions(filterOutExtensions);
    return extensions.filter((ext)=>{
        return filterOutExtensions.map((ext)=>ext.id.name).includes(ext.id.name);
    });
}
function warnToRemoveExtensions(extensions) {
    const removeCommands = extensions.map((ext)=>{
        return `quarto remove extension ${extensionIdString(ext.id)}`;
    });
    warnOnce(`One or more extensions have been built in to Quarto. Please use the following command to remove the unneeded extension:\n  ${removeCommands.join("\n  ")}`);
}
function filterExtensions(extensions, extensionId, type) {
    if (extensions && extensions.length > 0) {
        extensions = filterBuiltInExtensions(extensions);
        const ownedExtensions = extensions.filter((ext)=>{
            return ext.id.organization !== undefined;
        }).map((ext)=>{
            return extensionIdString(ext.id);
        });
        if (ownedExtensions.length > 1) {
            warnOnce(`The ${type} '${extensionId}' matched more than one extension. Please use a full name to disambiguate:\n  ${ownedExtensions.join("\n  ")}`);
        }
        const oldBuiltInExt = extensions?.filter((ext)=>{
            return ext.id.organization === kQuartoExtOrganization && kQuartoExtBuiltIn.includes(ext.id.name);
        });
        if (oldBuiltInExt.length > 0) {
            filterExtensionAndWarn(extensions, oldBuiltInExt);
        }
        return extensions;
    } else {
        return extensions;
    }
}
async function resolveProjectExtension(context, projectType, projectConfig, dir) {
    const extensions = await context.find(projectType, dir, "project", projectConfig, dir);
    const filtered = filterExtensions(extensions, projectType, "project");
    if (filtered.length > 0) {
        const extension = filtered[0];
        const projectExt = extension.contributes.project;
        if (projectExt) {
            const projectExtConfig = __VIRTUAL_FILE107(projectExt);
            delete projectExtConfig.project.detect;
            if (projectConfig.project.render) {
                delete projectExtConfig.project.render;
            }
            const extProjType = ()=>{
                const projectMeta = projectExt.project;
                if (projectMeta && typeof projectMeta === "object") {
                    const extType = projectMeta.type;
                    if (typeof extType === "string") {
                        return extType;
                    } else {
                        return "default";
                    }
                } else {
                    return "default";
                }
            };
            projectConfig.project[kProjectType] = extProjType();
            projectConfig = mergeProjectMetadata(projectExtConfig, projectConfig);
        }
    }
    return projectConfig;
}
function migrateProjectConfig(projectConfig) {
    projectConfig = cloneDeep1(projectConfig);
    const kSite = "site";
    if (projectConfig.project[kProjectType] === kSite) {
        projectConfig.project[kProjectType] = kWebsite;
    }
    if (projectConfig[kSite]) {
        projectConfig[kWebsite] = cloneDeep1(projectConfig[kSite]);
        delete projectConfig[kSite];
    }
    return projectConfig;
}
async function resolveLanguageTranslations(projectConfig, dir) {
    const files = [];
    files.push(...await resolveLanguageMetadata(projectConfig, dir));
    const translations = await readLanguageTranslations(join3(dir, "_language.yml"));
    projectConfig[kLanguageDefaults] = mergeConfigs(translations.language, projectConfig[kLanguageDefaults]);
    files.push(...translations.files);
    return files;
}
function projectContextForDirectory(path, flags) {
    return projectContext(path, flags, true);
}
function projectIsWebsite(context) {
    if (context) {
        const projType = projectType(context.config?.project?.[kProjectType]);
        return projectTypeIsWebsite(projType);
    } else {
        return false;
    }
}
function projectPreviewServe(context) {
    return context?.config?.project?.preview?.serve;
}
function projectIsServeable(context) {
    return projectIsWebsite(context) || !!projectPreviewServe(context);
}
function projectTypeIsWebsite(projType) {
    return projType.type === kWebsite || projType.inheritsType === kWebsite;
}
function projectIsBook(context) {
    if (context) {
        const projType = projectType(context.config?.project?.[kProjectType]);
        return projType.type === "book";
    } else {
        return false;
    }
}
function projectIgnoreGlobs(dir) {
    return engineIgnoreGlobs().concat(gitignoreEntries(dir).map((ignore)=>`**/${ignore}**`));
}
async function projectMetadataForInputFile(input, flags, project) {
    if (project) {
        project = cloneDeep1(project);
    } else {
        project = await projectContext(input, flags);
    }
    if (project?.dir && project?.config) {
        return toInputRelativePaths(projectType(project?.config?.project?.[kProjectType]), project.dir, dirname2(input), project.config);
    } else {
        return project?.config || {};
    }
}
async function directoryMetadataForInputFile(project, inputDir) {
    const projectDir = project.dir;
    const metadataFile = (dir)=>{
        return [
            "_metadata.yml",
            "_metadata.yaml"
        ].map((file)=>join3(dir, file)).find(existsSync);
    };
    const relativePath = relative2(projectDir, inputDir);
    const dirs = relativePath.split(SEP_PATTERN);
    let config = {};
    let currentDir = projectDir;
    const frontMatterSchema = await getFrontMatterSchema();
    for(let i1 = 0; i1 < dirs.length; i1++){
        const dir = dirs[i1];
        currentDir = join3(currentDir, dir);
        const file = metadataFile(currentDir);
        if (file) {
            const errMsg = "Directory metadata validation failed.";
            const yaml = await readAndValidateYamlFromFile(file, frontMatterSchema, errMsg) || {};
            if (yaml.format) {
                yaml.format = normalizeFormatYaml(yaml.format);
            }
            config = mergeConfigs(config, toInputRelativePaths(projectType(project?.config?.project?.[kProjectType]), currentDir, inputDir, yaml));
        }
    }
    return config;
}
function normalizeFormatYaml(yamlFormat) {
    if (yamlFormat) {
        if (typeof yamlFormat === "string") {
            yamlFormat = {
                [yamlFormat]: {}
            };
        } else if (typeof yamlFormat === "object") {
            const formats = Object.keys(yamlFormat);
            for (const format of formats){
                if (yamlFormat[format] === "default") {
                    yamlFormat[format] = {};
                }
            }
        }
    }
    return yamlFormat || {};
}
function projectHiddenIgnoreGlob(dir) {
    return projectIgnoreGlobs(dir).concat([
        "**/_*",
        "**/_*/**"
    ]).concat([
        "**/.*",
        "**/.*/**"
    ]).concat([
        "**/README.?([Rrq])md"
    ]);
}
function projectInputFiles(dir, metadata) {
    const files = [];
    const engines = [];
    const keepFiles = [];
    const outputDir = metadata?.project[kProjectOutputDir];
    const projIgnoreGlobs = projectHiddenIgnoreGlob(dir);
    const projectIgnores = projIgnoreGlobs.map((glob)=>globToRegExp(glob, {
            extended: true,
            globstar: true
        }));
    const addFile = (file)=>{
        if (!outputDir || !ensureTrailingSlash(dirname2(file)).startsWith(ensureTrailingSlash(join3(dir, outputDir))) || !ensureTrailingSlash(join3(dir, outputDir)).startsWith(ensureTrailingSlash(dir))) {
            const engine = fileExecutionEngine(file);
            if (engine) {
                if (!engines.includes(engine.name)) {
                    engines.push(engine.name);
                }
                files.push(file);
                const keep = executionEngineKeepFiles(engine, file);
                if (keep) {
                    keepFiles.push(...keep);
                }
            }
        }
    };
    const addDir = (dir)=>{
        for (const walk of walkSync(dir, {
            includeDirs: false,
            followSymlinks: false,
            skip: [
                kSkipHidden
            ].concat(engineIgnoreDirs().map((ignore)=>globToRegExp(join3(dir, ignore) + SEP)))
        })){
            const pathRelative = pathWithForwardSlashes(relative2(dir, walk.path));
            if (!projectIgnores.some((regex)=>regex.test(pathRelative))) {
                addFile(walk.path);
            }
        }
    };
    const renderFiles = metadata?.project[kProjectRender];
    if (renderFiles) {
        const exclude = projIgnoreGlobs.concat(outputDir ? [
            outputDir
        ] : []);
        const resolved = resolvePathGlobs(dir, renderFiles, exclude, {
            mode: "auto"
        });
        __VIRTUAL_FILE137(resolved.include, resolved.exclude).forEach((file)=>{
            if (Deno.statSync(file).isDirectory) {
                addDir(file);
            } else {
                addFile(file);
            }
        });
    } else {
        addDir(dir);
    }
    const inputFiles = __VIRTUAL_FILE137(__VIRTUAL_FILE181(files), __VIRTUAL_FILE181(keepFiles));
    return {
        files: inputFiles,
        engines
    };
}
function projectConfigResources(dir, metadata, type) {
    const resourceIgnoreFields = ignoreFieldsForProjectType(type);
    const resources = [];
    const findResources = (collection, parentKey)=>{
        __VIRTUAL_FILE144(collection, (value, index)=>{
            if (parentKey === kHtmlMathMethod && index === "method") {} else if (resourceIgnoreFields.includes(index)) {} else if (Array.isArray(value)) {
                findResources(value);
            } else if (typeof value === "object") {
                findResources(value, index);
            } else if (typeof value === "string") {
                const path = isAbsolute2(value) ? value : join3(dir, value);
                try {
                    if (existsSync(path) && !Deno.statSync(path).isDirectory) {
                        resources.push(Deno.realPathSync(path));
                    }
                } catch  {}
            }
        });
    };
    findResources(metadata);
    return resources;
}
const loadExtensions = async (cache, input, projectDir)=>{
    const extensionPath = inputExtensionDirs(input, projectDir);
    const allExtensions = {};
    for (const extensionDir of extensionPath){
        if (cache[extensionDir]) {
            cache[extensionDir].forEach((ext)=>{
                allExtensions[extensionIdString(ext.id)] = cloneDeep1(ext);
            });
        } else {
            const extensions = await readExtensions(extensionDir);
            extensions.forEach((extension)=>{
                allExtensions[extensionIdString(extension.id)] = cloneDeep1(extension);
            });
            cache[extensionDir] = extensions;
        }
    }
    return allExtensions;
};
const loadExtension = async (extension, input, projectDir)=>{
    const extensionId = toExtensionId(extension);
    const extensionPath = discoverExtensionPath(input, extensionId, projectDir);
    if (extensionPath) {
        const file = extensionFile(extensionPath);
        if (file) {
            const extension1 = await readExtension(extensionId, file);
            validateExtension(extension1);
            return extension1;
        } else {
            throw new Error(`The extension '${extension}' is missing the expected '_extension.yml' file.`);
        }
    } else {
        throw new Error(`Unable to read the extension '${extension}'.\nPlease ensure that you provided the correct id and that the extension is installed.`);
    }
};
function findExtensions(extensions, extensionId, contributes) {
    const exts = extensions.filter((ext)=>{
        if (contributes === "shortcodes" && ext.contributes.shortcodes) {
            return true;
        } else if (contributes === "filters" && ext.contributes.filters) {
            return true;
        } else if (contributes === "formats" && ext.contributes.formats) {
            return true;
        } else if (contributes === "project" && ext.contributes.project) {
            return true;
        } else if (contributes === kRevealJSPlugins && ext.contributes[kRevealJSPlugins]) {
            return true;
        } else {
            return contributes === undefined;
        }
    });
    if (extensionId.organization) {
        const exact = exts.filter((ext)=>{
            return ext.id.name === extensionId.name && ext.id.organization === extensionId.organization;
        });
        if (exact.length > 0) {
            return exact;
        }
    }
    const nameMatches = exts.filter((ext)=>{
        return extensionId.name === ext.id.name;
    });
    const sortedMatches = nameMatches.sort((ext1, _ext2)=>{
        return ext1.id.organization === undefined ? -1 : 1;
    });
    return sortedMatches;
}
function extensionProjectType(extension, config) {
    if (extension.contributes.project) {
        const projType = extension.contributes.project?.type || "default";
        return projectType(projType);
    } else {
        return projectType(config?.project?.[kProjectType]);
    }
}
function resolveExtensionPaths(extension, input, config) {
    const inputDir = Deno.statSync(input).isDirectory ? input : dirname2(input);
    return toInputRelativePaths(extensionProjectType(extension, config), extension.path, inputDir, extension, kExtensionIgnoreFields);
}
const kExtensionIgnoreFields = [
    "biblio-style",
    "revealjs-plugins"
];
async function readExtensions(extensionsDirectory, organization) {
    const extensions = [];
    const extensionDirs = Deno.readDirSync(extensionsDirectory);
    for (const extensionDir of extensionDirs){
        if (extensionDir.isDirectory) {
            const extFile = extensionFile(join3(extensionsDirectory, extensionDir.name));
            if (extFile) {
                const extensionId = {
                    name: extensionDir.name,
                    organization
                };
                const extension = await readExtension(extensionId, extFile);
                extensions.push(extension);
            } else if (!organization) {
                const ownedExtensions = await readExtensions(join3(extensionsDirectory, extensionDir.name), extensionDir.name);
                if (ownedExtensions) {
                    extensions.push(...ownedExtensions);
                }
            }
        }
    }
    return extensions;
}
function projectExtensionDirs(project) {
    const extensionDirs = [];
    for (const walk of expandGlobSync(join3(project.dir, "**/_extensions"), {
        exclude: [
            ...projectIgnoreGlobs(project.dir),
            "**/.*",
            "**/.*/**"
        ]
    })){
        extensionDirs.push(walk.path);
    }
    return extensionDirs;
}
function extensionFilesFromDirs(dirs) {
    const files = [];
    for (const dir of dirs){
        for (const walk of walkSync(dir, {
            includeDirs: false,
            followSymlinks: false,
            skip: [
                kSkipHidden
            ]
        })){
            files.push(walk.path);
        }
    }
    return files;
}
function inputExtensionDirs(input, projectDir) {
    const extensionsDirPath = (path)=>{
        const extPath = join3(path, kExtensionDir);
        try {
            if (Deno.statSync(extPath).isDirectory) {
                return extPath;
            } else {
                return undefined;
            }
        } catch  {
            return undefined;
        }
    };
    const inputDirName = (inputOrDir)=>{
        if (Deno.statSync(inputOrDir).isDirectory) {
            return inputOrDir;
        } else {
            return dirname2(inputOrDir);
        }
    };
    const extensionDirectories = [
        builtinExtensions()
    ];
    if (projectDir && input) {
        let currentDir = Deno.realPathSync(inputDirName(input));
        do {
            const extensionPath = extensionsDirPath(currentDir);
            if (extensionPath) {
                extensionDirectories.push(extensionPath);
            }
            currentDir = dirname2(currentDir);
        }while (isSubdir(projectDir, currentDir) || projectDir === currentDir)
        return extensionDirectories;
    } else if (input) {
        const dir = extensionsDirPath(inputDirName(input));
        if (dir) {
            extensionDirectories.push(dir);
        }
    }
    return extensionDirectories;
}
function discoverExtensionPath(input, extensionId, projectDir) {
    const extensionDirGlobs = [];
    if (extensionId.organization) {
        extensionDirGlobs.push(`${extensionId.organization}/${extensionId.name}/`);
    } else {
        extensionDirGlobs.push(`${extensionId.name}/`);
        extensionDirGlobs.push(`*/${extensionId.name}/`);
    }
    const findExtensionDir = (extDir, globs)=>{
        const paths = resolvePathGlobs(extDir, globs, [], {
            mode: "strict"
        }).include.filter((path)=>{
            return extensionFile(path);
        });
        if (paths.length > 0) {
            if (paths.length > 1) {
                warning(`More than one extension is available for ${extensionId.name} in the directory ${extDir}.\nExtensions that match:\n${paths.join("\n")}`);
            }
            return relative2(Deno.cwd(), paths[0]);
        } else {
            return undefined;
        }
    };
    const builtinExtensionDir = findExtensionDir(builtinExtensions(), extensionDirGlobs);
    if (builtinExtensionDir) {
        return builtinExtensionDir;
    }
    const sourceDir = Deno.statSync(input).isDirectory ? input : dirname2(input);
    const sourceDirAbs = Deno.realPathSync(sourceDir);
    if (projectDir && isSubdir(projectDir, sourceDirAbs)) {
        let extensionDir;
        let currentDir = normalize3(sourceDirAbs);
        const projDir = normalize3(projectDir);
        while(!extensionDir){
            extensionDir = findExtensionDir(join3(currentDir, kExtensionDir), extensionDirGlobs);
            if (currentDir == projDir) {
                break;
            }
            currentDir = dirname2(currentDir);
        }
        return extensionDir;
    } else {
        return findExtensionDir(join3(sourceDirAbs, kExtensionDir), extensionDirGlobs);
    }
}
function builtinExtensions() {
    return resourcePath("extensions");
}
function validateExtension(extension) {
    let contribCount = 0;
    const contribs = [
        extension.contributes.filters,
        extension.contributes.shortcodes,
        extension.contributes.formats,
        extension.contributes.project,
        extension.contributes[kRevealJSPlugins], 
    ];
    contribs.forEach((contrib)=>{
        if (contrib) {
            if (Array.isArray(contrib)) {
                contribCount = contribCount + contrib.length;
            } else if (typeof contrib === "object") {
                contribCount = contribCount + Object.keys(contrib).length;
            }
        }
    });
    if (contribCount === 0) {
        throw new Error(`The extension ${extension.title || extension.id.name} is not valid- it does not contribute anything.`);
    }
    if (extension.quartoVersion && !satisfies(quartoConfig.version(), extension.quartoVersion)) {
        throw new Error(`The extension ${extension.title || extension.id.name} is incompatible with this quarto version.

Extension requires: ${extension.quartoVersion.raw}
Quarto version: ${quartoConfig.version()}`);
    }
}
async function readExtension(extensionId, extensionFile) {
    const extensionSchema = await getExtensionConfigSchema();
    const yaml = await readAndValidateYamlFromFile(extensionFile, extensionSchema, "YAML Validation Failed");
    const readVersionRange = (str)=>{
        return new Range(str);
    };
    const contributes = yaml.contributes;
    const title = yaml[kTitle1];
    const author = yaml[kAuthor1];
    const versionRaw = yaml[kVersion];
    const quartoVersionRaw = yaml[kQuartoRequired];
    const versionParsed = versionRaw ? coerce(versionRaw) : undefined;
    const quartoVersion = quartoVersionRaw ? readVersionRange(quartoVersionRaw) : undefined;
    const version = versionParsed ? versionParsed : undefined;
    const extensionDirRaw = dirname2(extensionFile);
    const extensionDir = isAbsolute2(extensionDirRaw) ? extensionDirRaw : join3(Deno.cwd(), extensionDirRaw);
    const formats = contributes?.formats || contributes?.format || {};
    const embeddedExtensions = existsSync(join3(extensionDir, kExtensionDir)) ? await readExtensions(join3(extensionDir, kExtensionDir)) : [];
    Object.keys(formats).forEach((key)=>{
        if (formats[key] === "default") {
            formats[key] = {};
        }
    });
    Object.keys(formats).filter((key)=>{
        return key !== kCommon;
    }).forEach((key)=>{
        formats[key] = mergeConfigs(formats[kCommon] || {}, formats[key]);
        const formatMeta = formats[key];
        if (key.endsWith(".lua")) {
            const fullPath = join3(extensionDir, key);
            if (existsSync(fullPath)) {
                formatMeta.writer = fullPath;
            }
        }
        formatMeta.shortcodes = (formatMeta.shortcodes || []).flatMap((shortcode)=>{
            return resolveShortcode(embeddedExtensions, extensionDir, shortcode);
        });
        formatMeta.filters = (formatMeta.filters || []).flatMap((filter)=>{
            return resolveFilter(embeddedExtensions, extensionDir, filter);
        });
        formatMeta[kRevealJSPlugins] = (formatMeta?.[kRevealJSPlugins] || []).flatMap((plugin)=>{
            return resolveRevealJSPlugin(embeddedExtensions, extensionDir, plugin);
        });
    });
    delete formats[kCommon];
    const shortcodes = (contributes?.shortcodes || []).map((shortcode)=>{
        return resolveShortcodePath(extensionDir, shortcode);
    });
    const filters = (contributes?.filters || []).map((filter)=>{
        return resolveFilterPath(extensionDir, filter);
    });
    const project = contributes?.project || {};
    const revealJSPlugins = (contributes?.[kRevealJSPlugins] || []).map((plugin)=>{
        return resolveRevealPlugin(extensionDir, plugin);
    });
    const result1 = {
        title,
        author,
        version,
        quartoVersion,
        id: extensionId,
        path: extensionDir,
        contributes: {
            shortcodes,
            filters,
            formats,
            project,
            [kRevealJSPlugins]: revealJSPlugins
        }
    };
    validateExtension(result1);
    return result1;
}
function resolveRevealJSPlugin(embeddedExtensions, dir, plugin) {
    if (typeof plugin === "string") {
        const extensionId = toExtensionId(plugin);
        const extensions = findExtensions(embeddedExtensions, extensionId, "revealjs-plugins");
        if (extensions.length > 0) {
            const plugins = [];
            for (const plugin1 of extensions[0].contributes[kRevealJSPlugins] || []){
                plugins.push(plugin1);
            }
            return plugins;
        } else {
            validateExtensionPath("revealjs-plugin", dir, plugin);
            return resolveRevealPlugin(dir, plugin);
        }
    } else {
        return plugin;
    }
}
function isPluginRaw(plugin) {
    return plugin.plugin === undefined;
}
function resolveRevealPlugin(extensionDir, plugin) {
    if (typeof plugin === "string") {
        return join3(extensionDir, plugin);
    } else if (isPluginRaw(plugin)) {
        return resolveRevealPluginInline(plugin, extensionDir);
    } else {
        plugin.plugin = join3(extensionDir, plugin.plugin);
        return plugin;
    }
}
function resolveRevealPluginInline(plugin, extensionDir) {
    if (!plugin.name) {
        throw new Error(`Invalid revealjs-plugin in ${extensionDir} - 'name' property is required.`);
    }
    const resolvedPlugin = {
        name: plugin.name,
        path: extensionDir,
        register: plugin.register,
        config: plugin.config
    };
    if (plugin.script) {
        const pluginArr = Array.isArray(plugin.script) ? plugin.script : [
            plugin.script
        ];
        resolvedPlugin.script = pluginArr.map((plug)=>{
            if (typeof plug === "string") {
                return {
                    path: plug
                };
            } else {
                return plug;
            }
        });
    }
    if (plugin.stylesheet) {
        resolvedPlugin.stylesheet = Array.isArray(plugin.stylesheet) ? plugin.stylesheet : [
            plugin.stylesheet
        ];
    }
    return resolvedPlugin;
}
function resolveShortcode(embeddedExtensions, dir, shortcode) {
    const extensionId = toExtensionId(shortcode);
    const extensions = findExtensions(embeddedExtensions, extensionId, "shortcodes");
    if (extensions.length > 0) {
        const shortcodes = [];
        for (const shortcode1 of extensions[0].contributes.shortcodes || []){
            shortcodes.push(resolveShortcodePath(extensions[0].path, shortcode1));
        }
        return shortcodes;
    } else {
        validateExtensionPath("shortcode", dir, shortcode);
        return resolveShortcodePath(dir, shortcode);
    }
}
function resolveShortcodePath(extensionDir, shortcode) {
    if (isAbsolute2(shortcode)) {
        return shortcode;
    } else {
        return join3(extensionDir, shortcode);
    }
}
function resolveFilter(embeddedExtensions, dir, filter) {
    if (typeof filter === "string") {
        const extensionId = toExtensionId(filter);
        const extensions = findExtensions(embeddedExtensions, extensionId, "filters");
        if (extensions.length > 0) {
            const filters = [];
            for (const filter1 of extensions[0].contributes.filters || []){
                filters.push(resolveFilterPath(extensions[0].path, filter1));
            }
            return filters;
        } else {
            validateExtensionPath("filter", dir, filter);
            return resolveFilterPath(dir, filter);
        }
    } else {
        validateExtensionPath("filter", dir, filter.path);
        return resolveFilterPath(dir, filter);
    }
}
function resolveFilterPath(extensionDir, filter) {
    if (typeof filter === "string") {
        return join3(extensionDir, filter);
    } else {
        return {
            type: filter.type,
            path: join3(extensionDir, filter.path)
        };
    }
}
function validateExtensionPath(type, dir, path) {
    const resolves = existsSync(join3(dir, path));
    if (!resolves) {
        throw Error(`Failed to resolve referenced ${type} ${path} - path does not exist.\nIf you are attempting to use another extension within this extension, please install the extension using the 'quarto install --embedded' command.`);
    }
    return resolves;
}
function toExtensionId(extension) {
    if (extension.indexOf("/") > -1) {
        const extParts = extension.split("/");
        if (extParts.length === 2) {
            return {
                name: extParts[1],
                organization: extParts[0]
            };
        } else {
            return {
                name: extension
            };
        }
    } else {
        return {
            name: extension
        };
    }
}
const extensionFile = (dir)=>{
    return [
        "_extension.yml",
        "_extension.yaml"
    ].map((file)=>join3(dir, file)).find(existsSync);
};
const kCrossrefIndexFile = "crossref-index-file";
const kCrossrefResolveRefs = "crossref-resolve-refs";
const kCrossrefIndexDir = "xref";
function crossrefIndexForOutputFile(projectDir, input, output) {
    if (isAbsolute2(input)) {
        input = relative2(projectDir, input);
    }
    input = pathWithForwardSlashes(input);
    const crossrefDir = projectScratchPath(projectDir, kCrossrefIndexDir);
    ensureDirSync(crossrefDir);
    const mainIndexFile = join3(crossrefDir, "INDEX");
    const mainIndex = existsSync(mainIndexFile) ? JSON.parse(Deno.readTextFileSync(mainIndexFile)) : {};
    const outputBaseFile = basename2(output);
    if (mainIndex[input]?.[outputBaseFile] === undefined) {
        if (mainIndex[input] === undefined) {
            mainIndex[input] = {};
        }
        mainIndex[input][outputBaseFile] = shortUuid();
        Deno.writeTextFileSync(mainIndexFile, JSON.stringify(mainIndex, undefined, 2));
    }
    return join3(crossrefDir, mainIndex[input]?.[outputBaseFile]);
}
function deleteCrossrefMetadata(metadata) {
    const crossref = metadata[kCrossref];
    if (crossref) {
        delete crossref[kCrossrefChaptersAppendix];
        delete crossref[kCrossrefChaptersAlpha];
        delete crossref[kCrossrefChapterId];
        if (Object.keys(crossref).length === 0) {
            delete metadata[kCrossref];
        }
    }
}
const kPatchedTemplateExt = ".patched";
const kTemplatePartials = "template-partials";
function readPartials(metadata, inputDir) {
    if (typeof (metadata?.[kTemplatePartials]) === "string") {
        metadata[kTemplatePartials] = [
            metadata[kTemplatePartials]
        ];
    }
    const result1 = metadata?.[kTemplatePartials] || [];
    inputDir = inputDir ? Deno.realPathSync(inputDir) : undefined;
    const resolvePath = (path)=>{
        if (!inputDir || isAbsolute2(path)) {
            return path;
        } else {
            return join3(inputDir, path);
        }
    };
    return result1.flatMap((path)=>{
        const result1 = [];
        for (const walk of expandGlobSync(resolvePath(path))){
            result1.push(walk.path);
        }
        return result1;
    });
}
async function stageTemplate(options, extras, userContext) {
    const stagingDir = options.temp.createDir();
    const template = "template.patched";
    const stageContext = (dir, template, context)=>{
        if (context) {
            if (context.template) {
                copyTo(context.template, join3(dir, template));
            }
            if (context.partials) {
                for (const partial of context.partials){
                    copyTo(partial, join3(stagingDir, basename2(partial)));
                }
            }
            return true;
        } else {
            return false;
        }
    };
    const formatStaged = stageContext(stagingDir, template, extras.templateContext);
    const userStaged = await stageContext(stagingDir, template, userContext);
    if (formatStaged || userStaged) {
        const stagedTemplatePath = join3(stagingDir, template);
        applyTemplatePatches(stagedTemplatePath, options.format, options.flags);
        return stagedTemplatePath;
    } else {
        return undefined;
    }
}
function cleanTemplatePartialMetadata(metadata, builtIns) {
    const partials = metadata[kTemplatePartials];
    if (partials) {
        const cleansed = partials.filter((part)=>builtIns.includes(part));
        if (cleansed.length === 0) {
            delete metadata[kTemplatePartials];
        } else {
            metadata[kTemplatePartials] = cleansed;
        }
    }
}
function applyTemplatePatches(template, format, flags) {
    const patches = [];
    if (isHtmlDocOutput(format.pandoc) || isRevealjsOutput(format.pandoc)) {
        if ((flags && flags[kSelfContained] || format.pandoc[kSelfContained] || flags && flags[kEmbedResources] || format.pandoc[kEmbedResources]) && !format.render[kSelfContainedMath]) {
            const math = mathConfig(format, flags);
            if (math) {
                const mathTemplate = math.method === "mathjax" ? mathjaxScript(math.url) : math.method == "katex" ? katexScript(math.url) : "";
                if (mathTemplate) {
                    patches.push({
                        searchValue: /\$math\$/,
                        contents: mathTemplate
                    });
                }
            }
        }
    }
    if (patches.length) {
        let templateContents = Deno.readTextFileSync(template);
        patches.forEach((patch)=>{
            templateContents = templateContents.replace(patch.searchValue, patch.contents);
        });
        Deno.writeTextFileSync(template, templateContents);
    }
}
function mathConfig(format, flags) {
    if (flags?.mathjax || flags?.katex || flags?.webtex || flags?.gladtex || flags?.mathml) {
        return undefined;
    }
    const math = format.pandoc[kHtmlMathMethod];
    if (math === undefined || math === "mathjax") {
        return {
            method: "mathjax",
            url: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"
        };
    } else if (math === "katex") {
        return {
            method: "katex",
            url: "https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/"
        };
    } else if (__VIRTUAL_FILE18(math)) {
        const mathMethod = math;
        if ((mathMethod.method === "mathjax" || mathMethod.method === "katex") && typeof mathMethod.url === "string") {
            return mathMethod;
        }
    }
}
function mathjaxScript(url) {
    return `
  <script>
    (function () {
      var script = document.createElement("script");
      script.type = "text/javascript";
      script.src  = "${url}";
      document.getElementsByTagName("head")[0].appendChild(script);
    })();
  </script>
`;
}
function katexScript(url) {
    url = url.trim();
    if (!url.endsWith("/")) {
        url += "/";
    }
    return `
  <script>
    document.addEventListener("DOMContentLoaded", function () {
      var head = document.getElementsByTagName("head")[0];
      var link = document.createElement("link");
      link.rel = "stylesheet";
      link.href = "${url}katex.min.css";
      head.appendChild(link);

      var script = document.createElement("script");
      script.type = "text/javascript";
      script.src  = "${url}katex.min.js";
      script.async = false;
      script.addEventListener('load', function() {
        var mathElements = document.getElementsByClassName("math");
          var macros = [];
          for (var i = 0; i < mathElements.length; i++) {
            var texText = mathElements[i].firstChild;
            if (mathElements[i].tagName == "SPAN") {
              window.katex.render(texText.data, mathElements[i], {
                displayMode: mathElements[i].classList.contains('display'),
                throwOnError: false,
                macros: macros,
                fleqn: false
              });
            }
          }
      });
      head.appendChild(script);
    });
  </script>
  `;
}
function filesDirLibDir(input) {
    return join3(inputFilesDir(input), "libs");
}
function filesDirMediabagDir(input) {
    return join3(inputFilesDir(input), "mediabag");
}
function pandocMetadataPath(path) {
    return pathWithForwardSlashes(path);
}
const kBook = "book";
const kBookCoverImage = "cover-image";
const kBookCoverImageAlt = "cover-image-alt";
function bookConfig(name, project) {
    const book = project?.[kBook];
    if (book) {
        return book[name];
    } else {
        return undefined;
    }
}
function setBookConfig(name, value, project) {
    const book = project?.[kBook];
    if (book) {
        book[name] = value;
    }
}
function isBookIndexPage(target) {
    return target !== undefined && target.startsWith("index.");
}
function isNumberedChapter(partitioned) {
    if (partitioned?.yaml) {
        const yaml = partitioned?.yaml;
        if (typeof yaml[kTitle] === "string") {
            const parsedTitle = parsePandocTitle(yaml[kTitle]);
            return !parsedTitle.attr?.classes.includes("unnumbered");
        }
    }
    return !partitioned.headingAttr || !partitioned.headingAttr.classes.includes("unnumbered");
}
function isMultiFileBookFormat(format) {
    const extension = format.extensions?.book;
    if (extension) {
        return !!extension.multiFile;
    } else {
        return false;
    }
}
function crossrefFilter() {
    return resourcePath("filters/crossref/crossref.lua");
}
function crossrefFilterActive(options) {
    return options.format.metadata.crossref !== false;
}
function crossrefFilterParams(options, defaults) {
    const flags = options.flags;
    const metadata = options.format.metadata;
    const kCrossrefFilterParams = [
        kListings,
        kNumberSections,
        kNumberOffset
    ];
    const params = {};
    kCrossrefFilterParams.forEach((option)=>{
        let value = crossrefOption(option, flags, defaults);
        if (value) {
            if (option === kNumberOffset) {
                if (typeof value === "number") {
                    value = [
                        value
                    ];
                }
                if (!Array.isArray(value) || value.some((num)=>!Number.isInteger(num))) {
                    throw new Error("Invalid value for number-offset (should be an array of numbers)");
                }
                if (defaults?.[kNumberSections] === undefined) {
                    params[kNumberSections] = true;
                }
            }
            params[option] = value;
        }
    });
    params[kNumberDepth] = metadata?.[kNumberDepth];
    if (options.project) {
        if (!projectIsBook(options.project) || isMultiFileBookFormat(options.format)) {
            params[kCrossrefIndexFile] = pandocMetadataPath(crossrefIndexForOutputFile(options.project.dir, options.source, options.output));
        }
    } else {
        const crossrefIndex = Deno.env.get("QUARTO_CROSSREF_INDEX_PATH");
        if (crossrefIndex) {
            params[kCrossrefIndexFile] = pandocMetadataPath(crossrefIndex);
        }
    }
    return params;
}
function crossrefOption(name, flags, defaults) {
    if (flags && Object.keys(flags).includes(name)) {
        return flags[name];
    } else if (Object.keys(defaults || {}).includes(name)) {
        return defaults[name];
    } else {
        return undefined;
    }
}
const kMarkdownBlockSeparator = "\n\n<!-- -->\n\n";
const kDefaultHighlightStyle = "arrow";
const kHtmlEmptyPostProcessResult = {
    resources: [],
    supporting: []
};
const kDarkSuffix1 = "dark";
const kLightSuffix1 = "light";
function textHighlightThemePath1(inputDir, theme, style) {
    let resolvedTheme;
    if (typeof theme === "object") {
        if (style && theme[style]) {
            resolvedTheme = theme[style];
        } else {
            resolvedTheme = theme[Object.keys(theme)[0]];
        }
    } else {
        resolvedTheme = theme;
    }
    const userThemePath = join3(inputDir, resolvedTheme);
    if (existsSync(userThemePath)) {
        return Deno.realPathSync(userThemePath);
    }
    const names = [
        `${theme}-${style === "dark" ? kDarkSuffix1 : kLightSuffix1}`,
        theme, 
    ];
    const themePath = names.map((name)=>{
        return resourcePath(join3("pandoc", "highlight-styles", `${name}.theme`));
    }).find((path)=>existsSync(path));
    return themePath;
}
function readHighlightingTheme(inputDir, pandoc, style) {
    const theme = pandoc[kHighlightStyle] || kDefaultHighlightStyle;
    if (theme) {
        const themeRaw = readTheme(inputDir, theme, style);
        if (themeRaw) {
            return {
                json: JSON.parse(themeRaw),
                isAdaptive: isAdaptiveTheme(theme)
            };
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function hasAdaptiveTheme(pandoc) {
    const theme = pandoc[kHighlightStyle] || kDefaultHighlightStyle;
    return theme && isAdaptiveTheme(theme);
}
function isAdaptiveTheme(theme) {
    if (typeof theme === "string") {
        return [
            "a11y",
            "arrow",
            "atom-one",
            "ayu",
            "breeze",
            "github",
            "gruvbox",
            "monochrome", 
        ].includes(theme);
    } else {
        const keys = Object.keys(theme);
        return keys.includes("dark") && keys.includes("light");
    }
}
function readTheme(inputDir, theme, style) {
    const themeFile = textHighlightThemePath1(inputDir, theme, style === "default" ? undefined : style);
    if (themeFile && existsSync(themeFile)) {
        return Deno.readTextFileSync(themeFile);
    } else {
        return undefined;
    }
}
const kAdaptiveTextHighlighting = "adaptive-text-highlighting";
function layoutFilter() {
    return resourcePath("filters/layout/layout.lua");
}
function layoutFilterParams(format) {
    const params = {};
    const pageWidth = format.render[kPageWidth];
    if (pageWidth) {
        params[kPageWidth] = pageWidth;
    }
    if (hasAdaptiveTheme(format.pandoc)) {
        params[kAdaptiveTextHighlighting] = true;
    }
    return params;
}
function overflowXPostprocessor(doc) {
    const outputs = doc.querySelectorAll(".cell-output-display");
    for(let i1 = 0; i1 < outputs.length; i1++){
        const output = outputs[i1];
        const noOverflowX = !!output.querySelector("select") || !!output.querySelector(".rglWebGL");
        if (noOverflowX) {
            output.classList.add("no-overflow-x");
        }
    }
    return Promise.resolve(kHtmlEmptyPostProcessResult);
}
function bibEngine(defaults, flags) {
    return flags?.natbib ? "natbib" : flags?.biblatex ? "biblatex" : defaults[kCiteMethod] === "natbib" ? "natbib" : defaults[kCiteMethod] == "biblatex" ? "biblatex" : undefined;
}
function pdfEngine(defaults, render, flags) {
    const pdfEngine = flags?.pdfEngine || defaults[kPdfEngine] || "pdflatex";
    const pdfEngineOpts = defaults[kPdfEngineOpts] || [];
    if (defaults[kPdfEngineOpt]) {
        pdfEngineOpts.push(defaults[kPdfEngineOpt]);
    }
    if (flags?.pdfEngineOpts) {
        pdfEngineOpts.push(...flags?.pdfEngineOpts);
    }
    const indexEngine = render[kLatexMakeIndex];
    const indexEngineOpts = render[kLatexMakeIndexOpts] || [];
    if (flags?.makeIndexOpts) {
        indexEngineOpts?.push(...flags?.makeIndexOpts);
    }
    const tlmgrOpts = render[kLatexTlmgrOpts] || [];
    if (flags?.tlmgrOpts) {
        tlmgrOpts?.push(...flags?.tlmgrOpts);
    }
    return {
        pdfEngine,
        pdfEngineOpts,
        bibEngine: bibEngine(defaults, flags),
        indexEngine,
        indexEngineOpts,
        tlmgrOpts
    };
}
function isLatexPdfEngine(engine) {
    return [
        "pdflatex",
        "xelatex",
        "lualatex",
        "latexmk"
    ].includes(engine.pdfEngine);
}
const kAuthorsActive = "author-parsing";
function authorsFilter() {
    return resourcePath("filters/authors/authors.lua");
}
function authorsFilterActive(options) {
    return options.format.metadata[kAuthorsActive] !== false;
}
function formatHasBootstrap(format) {
    if (format && isHtmlOutput(format.pandoc, true)) {
        return hasBootstrapTheme(format.metadata);
    } else {
        return false;
    }
}
function hasBootstrapTheme(metadata) {
    const theme = metadata[kTheme];
    return theme !== "none" && theme !== "pandoc";
}
function formatDarkMode(format) {
    const isBootstrap = formatHasBootstrap(format);
    if (isBootstrap) {
        return darkModeDefault(format.metadata);
    }
    return undefined;
}
function darkModeDefault(metadata) {
    if (metadata !== undefined) {
        const theme = metadata[kTheme];
        if (theme && typeof theme === "object") {
            const keys = Object.keys(theme);
            if (keys.includes("dark")) {
                if (keys[0] === "dark") {
                    return true;
                } else {
                    return false;
                }
            }
        }
    }
    return undefined;
}
const kQuartoParams = "quarto-params";
const kProjectOffset = "project-offset";
const kProjectOutputDir1 = "project-output-dir";
const kMediabagDir = "mediabag-dir";
const kResultsFile = "results-file";
const kTimingFile = "timings-file";
const kHasBootstrap = "has-bootstrap";
const kQuartoVersion1 = "quarto-version";
const kQuartoSource = "quarto-source";
async function filterParamsJson(args, options, defaults, filterParams, resultsFile, dependenciesFile, timingFile) {
    const includes = options.format.render[kMergeIncludes] !== false ? extractIncludeParams(args, options.format.metadata, defaults || {}) : {};
    const quartoColumnParams = extractColumnParams(args, options.format.metadata, defaults);
    const params = {
        ...includes,
        ...initFilterParams(dependenciesFile),
        ...ipynbFilterParams(options),
        ...projectFilterParams(options),
        ...quartoColumnParams,
        ...await quartoFilterParams(options, defaults),
        ...crossrefFilterParams(options, defaults),
        ...layoutFilterParams(options.format),
        ...languageFilterParams(options.format.language),
        ...filterParams,
        [kResultsFile]: pandocMetadataPath(resultsFile),
        [kTimingFile]: pandocMetadataPath(timingFile)
    };
    return JSON.stringify(params);
}
function removeFilterParams(metadata) {
    delete metadata[kQuartoParams];
}
function quartoInitFilter() {
    return resourcePath("filters/quarto-init/quarto-init.lua");
}
function quartoPreFilter() {
    return resourcePath("filters/quarto-pre/quarto-pre.lua");
}
function quartoPostFilter() {
    return resourcePath("filters/quarto-post/quarto-post.lua");
}
function quartoFinalizeFilter() {
    return resourcePath("filters/quarto-finalize/quarto-finalize.lua");
}
function extractIncludeParams(args, metadata, defaults) {
    const includes = mergeConfigs(extractSmartIncludeText(metadata), extractSmartIncludeText(defaults || {}), extractSmartIncludeText(defaults.variables || {}), extractIncludeVariables(metadata), extractIncludeVariables(defaults.variables || {}));
    if (defaults.variables && Object.keys(defaults.variables).length === 0) {
        delete defaults.variables;
    }
    const inHeaderFiles = [];
    const beforeBodyFiles = [];
    const afterBodyFiles = [];
    const smartMetadataFiles = extractSmartIncludeFile(metadata);
    const smartDefaultsFiles = extractSmartIncludeFile(defaults || {});
    const smartDefaultsVariablesFiles = extractSmartIncludeFile(defaults.variables || {});
    inHeaderFiles.push(...defaults[kIncludeInHeader] || []);
    beforeBodyFiles.push(...defaults[kIncludeBeforeBody] || []);
    afterBodyFiles.push(...defaults[kIncludeAfterBody] || []);
    inHeaderFiles.push(...smartMetadataFiles[kIncludeInHeader]);
    beforeBodyFiles.push(...smartMetadataFiles[kIncludeBeforeBody]);
    afterBodyFiles.push(...smartMetadataFiles[kIncludeAfterBody]);
    inHeaderFiles.push(...smartDefaultsFiles[kIncludeInHeader]);
    beforeBodyFiles.push(...smartDefaultsFiles[kIncludeBeforeBody]);
    afterBodyFiles.push(...smartDefaultsFiles[kIncludeAfterBody]);
    inHeaderFiles.push(...smartDefaultsVariablesFiles[kIncludeInHeader]);
    beforeBodyFiles.push(...smartDefaultsVariablesFiles[kIncludeBeforeBody]);
    afterBodyFiles.push(...smartDefaultsVariablesFiles[kIncludeAfterBody]);
    delete defaults[kIncludeInHeader];
    delete defaults[kIncludeAfterBody];
    delete defaults[kIncludeBeforeBody];
    for(const arg in args){
        switch(arg){
            case kIncludeInHeader:
                inHeaderFiles.push(arg);
                break;
            case kIncludeBeforeBody:
                beforeBodyFiles.push(arg);
                break;
            case kIncludeAfterBody:
                afterBodyFiles.push(arg);
                break;
        }
    }
    const removeArgs = new Map();
    removeArgs.set(kIncludeInHeader, true);
    removeArgs.set(kIncludeBeforeBody, true);
    removeArgs.set(kIncludeAfterBody, true);
    removePandocArgsInPlace(args, removeArgs);
    const result1 = {
        ...includes,
        [kIncludeInHeader]: inHeaderFiles.map(pandocMetadataPath),
        [kIncludeBeforeBody]: beforeBodyFiles.map(pandocMetadataPath),
        [kIncludeAfterBody]: afterBodyFiles.map(pandocMetadataPath)
    };
    return result1;
}
function extractSmartIncludeText(obj) {
    return extractSmartIncludeInternal(obj, "text");
}
function extractSmartIncludeFile(obj) {
    const inner = extractSmartIncludeInternal(obj, "file");
    return {
        [kIncludeInHeader]: inner[kHeaderIncludes],
        [kIncludeBeforeBody]: inner[kIncludeBefore],
        [kIncludeAfterBody]: inner[kIncludeAfter]
    };
}
function extractSmartIncludeInternal(obj, key) {
    const isContent = (v)=>{
        if (typeof v !== "object") {
            return false;
        }
        return typeof v[key] === "string";
    };
    const extractVariable = (name)=>{
        const value = obj[name];
        if (value === undefined) {
            return [];
        }
        if (Array.isArray(value)) {
            const contents = value.filter(isContent);
            const nonContents = value.filter((v)=>!isContent(v));
            obj[name] = nonContents;
            return contents.map((v)=>v[key]);
        } else if (isContent(value)) {
            delete obj[name];
            return [
                value[key]
            ];
        } else {
            return [];
        }
    };
    return {
        [kHeaderIncludes]: extractVariable(kIncludeInHeader),
        [kIncludeBefore]: extractVariable(kIncludeBeforeBody),
        [kIncludeAfter]: extractVariable(kIncludeAfterBody)
    };
}
function extractIncludeVariables(obj) {
    const extractVariable = (name)=>{
        const value = obj[name];
        delete obj[name];
        if (!value) {
            return [];
        } else if (Array.isArray(value)) {
            return value;
        } else {
            return [
                value
            ];
        }
    };
    return {
        [kHeaderIncludes]: extractVariable(kHeaderIncludes),
        [kIncludeBefore]: extractVariable(kIncludeBefore),
        [kIncludeAfter]: extractVariable(kIncludeAfter)
    };
}
function extractColumnParams(args, metadata, defaults) {
    const quartoColumnParams = {};
    if (defaults?.[kReferenceLocation] === "margin" || referenceLocationArg(args) === "margin") {
        quartoColumnParams[kReferenceLocation] = "margin";
        const removeArgs = new Map();
        removeArgs.set(`--${kReferenceLocation}`, true);
        removePandocArgsInPlace(args, removeArgs);
        if (defaults) {
            delete defaults[kReferenceLocation];
        }
    }
    if (metadata[kCitationLocation]) {
        quartoColumnParams[kCitationLocation] = metadata[kCitationLocation];
    }
    return quartoColumnParams;
}
function removePandocArgsInPlace(args, removeArgs) {
    const cleanedArgs = removePandocArgs(args, removeArgs);
    if (cleanedArgs.length !== args.length) {
        args.splice(0, args.length);
        args.push(...cleanedArgs);
    }
}
function referenceLocationArg(args) {
    const argIndex = args.findIndex((arg)=>{
        return arg === `--${kReferenceLocation}`;
    });
    if (argIndex > -1 && args.length > argIndex + 1) {
        const referenceLocation = args[argIndex + 1];
        return referenceLocation;
    } else {
        return undefined;
    }
}
function languageFilterParams(language) {
    const params = {
        [kCodeSummary]: language[kCodeSummary],
        [kTocTitleDocument]: language[kTocTitleDocument]
    };
    Object.keys(language).forEach((key)=>{
        if (key.startsWith("callout-") || key.startsWith("crossref-") || key.startsWith("environment-")) {
            params[key] = language[key];
        }
    });
    [
        "fig",
        "tbl",
        "lst",
        "thm",
        "lem",
        "cor",
        "prp",
        "cnj",
        "def",
        "exm",
        "exr", 
    ].forEach((type)=>{
        params[`crossref-${type}-prefix`] = language[`crossref-${type}-title`];
    });
    return params;
}
function projectFilterParams(options) {
    const projType = projectType(options.project?.config?.project?.[kProjectType]);
    const params = (projType.filterParams ? projType.filterParams(options) : undefined) || {};
    const additionalParams = {};
    const outputDir = options.project?.config?.project["output-dir"];
    if (outputDir) {
        additionalParams[kProjectOutputDir1] = outputDir;
    }
    if (options.offset) {
        additionalParams[kProjectOffset] = options.offset;
    }
    return {
        ...additionalParams,
        ...params
    };
}
function ipynbFilterParams(options) {
    return {
        [kIPynbTitleBlockTemplate]: options.format.metadata[kIPynbTitleBlockTemplate]
    };
}
async function quartoFilterParams(options, defaults) {
    const format = options.format;
    const params = {
        [kOutputDivs]: format.render[kOutputDivs]
    };
    params[kMediabagDir] = options.mediabagDir;
    const figAlign = format.render[kFigAlign];
    if (figAlign) {
        params[kFigAlign] = figAlign;
    }
    const figPos = format.render[kFigPos];
    if (figPos) {
        params[kFigPos] = figPos;
    }
    const figEnv = format.render[kFigEnv];
    if (figEnv) {
        params[kFigEnv] = figEnv;
    }
    const foldCode = format.render[kCodeFold];
    if (foldCode) {
        params[kCodeFold] = foldCode;
    }
    const tblColwidths = format.render[kTblColwidths];
    if (tblColwidths !== undefined) {
        params[kTblColwidths] = tblColwidths;
    }
    const shortcodes = format.render[kShortcodes];
    if (shortcodes !== undefined) {
        params[kShortcodes] = shortcodes;
    }
    const extShortcodes = await extensionShortcodes(options);
    if (extShortcodes) {
        params[kShortcodes] = params[kShortcodes] || [];
        params[kShortcodes].push(...extShortcodes);
    }
    params[kHtmlMathMethod] = defaults?.[kHtmlMathMethod];
    const figResponsive = format.metadata[kFigResponsive] === true;
    if (figResponsive) {
        params[kFigResponsive] = figResponsive;
    }
    const lineNumbers = format.render[kCodeLineNumbers];
    if (lineNumbers) {
        params[kCodeLineNumbers] = lineNumbers;
    }
    const keepHidden = format.render[kKeepHidden];
    if (keepHidden) {
        params[kKeepHidden] = kKeepHidden;
    }
    params[kCiteMethod] = citeMethod(options);
    params[kPdfEngine] = pdfEngine1(options);
    params[kHasBootstrap] = formatHasBootstrap(options.format);
    params[kQuartoSource] = options.source;
    params[kQuartoProfile.toLowerCase()] = activeProfiles();
    params[kQuartoVersion1] = quartoConfig.version();
    return params;
}
async function extensionShortcodes(options) {
    const extensionShortcodes = [];
    if (options.extension) {
        const allExtensions = await options.extension?.extensions(options.source, options.project?.config, options.project?.dir);
        const shortCodeExtensions = filterBuiltInExtensions(allExtensions.filter((ext)=>{
            return !!ext.contributes.shortcodes;
        }));
        shortCodeExtensions.forEach((extension)=>{
            const shortcodes = extension.contributes.shortcodes || [];
            extensionShortcodes.push(...shortcodes);
        });
    }
    return extensionShortcodes;
}
function initFilterParams(dependenciesFile) {
    const params = {};
    if (Deno.build.os === "windows") {
        const value = readCodePage();
        if (value) {
            Deno.env.set("QUARTO_WIN_CODEPAGE", value);
        }
    }
    Deno.env.set("QUARTO_FILTER_DEPENDENCY_FILE", dependenciesFile);
    return params;
}
const kQuartoFilterMarker = "quarto";
const kQuartoCiteProcMarker = "citeproc";
async function resolveFilters(filters, options) {
    const quartoFilters = [];
    quartoFilters.push(quartoPreFilter());
    if (crossrefFilterActive(options)) {
        quartoFilters.push(crossrefFilter());
    }
    quartoFilters.push(layoutFilter());
    quartoFilters.push(quartoPostFilter());
    filters = await resolveFilterExtension(options, filters);
    const quartoLoc = filters.findIndex((filter)=>filter === kQuartoFilterMarker);
    if (quartoLoc !== -1) {
        filters = [
            ...filters.slice(0, quartoLoc),
            ...quartoFilters,
            ...filters.slice(quartoLoc + 1), 
        ];
    } else {
        filters.push(...quartoFilters);
    }
    if (authorsFilterActive(options)) {
        filters.unshift(authorsFilter());
    }
    filters.unshift(quartoInitFilter());
    filters.push(quartoFinalizeFilter());
    filters = filters.filter((filter)=>filter !== kQuartoCiteProcMarker);
    const citeproc = citeMethod(options) === kQuartoCiteProcMarker;
    if (citeproc) {
        if (options.format.pandoc.citeproc === true) {
            delete options.format.pandoc.citeproc;
        }
        filters.push(kQuartoCiteProcMarker);
    }
    if (filters.length > 0) {
        return filters;
    } else {
        return undefined;
    }
}
function citeMethod(options) {
    const pandoc = options.format.pandoc;
    const metadata = options.format.metadata;
    const engine = bibEngine(options.format.pandoc, options.flags);
    if (pandoc.citeproc) {
        if (engine) {
            throw new Error(`The bibliography engine '${engine}' was set when 'citeproc' was also explicitly requested.`);
        }
        return "citeproc";
    }
    if (!metadata[kBibliography] && !metadata.references) {
        return null;
    }
    if (engine) {
        return engine;
    }
    if (pandoc.citeproc !== false) {
        return "citeproc";
    } else {
        return null;
    }
}
function pdfEngine1(options) {
    const pdfEngine = options.flags?.pdfEngine || options.metadata?.[kPdfEngine] || "pdflatex";
    return pdfEngine;
}
async function resolveFilterExtension(options, filters) {
    const results = [];
    const getFilter = async (filter)=>{
        if (filter !== kQuartoFilterMarker && filter !== kQuartoCiteProcMarker && typeof filter === "string" && !existsSync(filter)) {
            let extensions = await options.extension?.find(filter, options.source, "filters", options.project?.config, options.project?.dir) || [];
            extensions = filterExtensions(extensions || [], filter, "filter");
            if (extensions.length > 0) {
                const filters = extensions[0].contributes.filters;
                if (filters) {
                    return filters;
                } else {
                    return filter;
                }
            } else {
                return filter;
            }
        } else {
            return filter;
        }
    };
    for (const filter of filters){
        const r = await getFilter(filter);
        results.push(r);
    }
    return results.flat();
}
async function generateDefaults(options) {
    let allDefaults;
    if (options.format.pandoc) {
        allDefaults = options.format.pandoc || {};
        const resolvedFilters = await resolveFilters([
            ...allDefaults[kFilters] || [], 
        ], options);
        if (resolvedFilters) {
            allDefaults[kFilters] = resolvedFilters;
        }
        if (isLatexOutput(options.format.pandoc)) {
            if (options.format.metadata[kNumberDepth] !== undefined) {
                allDefaults.variables = allDefaults.variables || {};
                allDefaults.variables["secnumdepth"] = options.format.metadata[kNumberDepth];
            }
        }
        return allDefaults;
    } else {
        return undefined;
    }
}
async function writeDefaultsFile(defaults, temp) {
    const defaultsStr = "---\n" + stringify(defaults, {
        indent: 2,
        lineWidth: -1,
        sortKeys: false,
        skipInvalid: true
    });
    const defaultsFile = temp.createFile({
        prefix: "quarto-defaults",
        suffix: ".yml"
    });
    await Deno.writeTextFile(defaultsFile, defaultsStr);
    return defaultsFile;
}
function pandocDefaultsMessage(pandoc, sysFilters, debug) {
    const kDebugOnly = [
        kIncludeInHeader,
        kIncludeBeforeBody,
        kIncludeAfterBody, 
    ];
    const kOrder = [
        kTo,
        kFrom,
        kOutputFile,
        kTemplate,
        kStandalone,
        kEmbedResources,
        kSelfContained, 
    ];
    const defaults = {};
    kOrder.forEach((key)=>{
        if (Object.keys(pandoc).includes(key)) {
            defaults[key] = pandoc[key];
        }
    });
    Object.keys(pandoc).forEach((key)=>{
        if (!kOrder.includes(key) && (debug || !kDebugOnly.includes(key))) {
            defaults[key] = pandoc[key];
        }
    });
    const filtersContains = (filters, filter)=>{
        return filters.find((sysFilter)=>{
            const sysPath = typeof sysFilter === "string" ? sysFilter : sysFilter.path;
            const filterPath = typeof filter === "string" ? filter : filter.path;
            return sysPath === filterPath;
        });
    };
    if (defaults.filters?.length) {
        defaults.filters = defaults.filters.map((filter)=>{
            if (filter === crossrefFilter()) {
                return "crossref";
            } else {
                return filter;
            }
        }).filter((filter)=>{
            return filter !== quartoPreFilter() && filter !== quartoPostFilter() && filter !== layoutFilter() && filter !== authorsFilter() && filter !== quartoFinalizeFilter() && filtersContains(sysFilters, filter);
        });
        if (defaults.filters?.length === 0) {
            delete defaults.filters;
        }
    }
    if (defaults.template && extname2(defaults.template) === kPatchedTemplateExt) {
        delete defaults.template;
    }
    if (defaults.writer) {
        if (defaults.writer.match(/(?:^|[\\/])_extensions[\\/]/) || defaults.writer.match(/(?:^|[\\/])extensions[\\/]quarto[\\/]/)) {
            delete defaults.writer;
        }
    }
    return stringify(defaults);
}
function executionEngineCanKeepSource(engine, target) {
    return !engine.canKeepSource || engine.canKeepSource(target);
}
const kHideAllCodeLinkId = "quarto-hide-all-code";
const kShowAllCodeLinkId = "quarto-show-all-code";
const kViewSourceLinkId = "quarto-view-source";
const kEmbeddedSourceClass = "quarto-embedded-source-code";
const kEmbeddedSourceModalId = kEmbeddedSourceClass + "-modal";
const kEmbeddedSourceModalLabelId = kEmbeddedSourceClass + "-modal-label";
const kKeepSourceSentinel = "quarto-executable-code-5450563D";
const kCodeToolsSourceButtonId = "quarto-code-tools-source";
const kCodeToolsMenuButtonId = "quarto-code-tools-menu";
const kDataQuartoSourceUrl = "data-quarto-source-url";
function formatHasCodeTools(format) {
    const codeTools = format.render?.[kCodeTools];
    return !!codeTools && isHtmlOutput(format.pandoc, true) && formatHasBootstrap(format);
}
function resolveKeepSource(format, engine, target) {
    const codeTools = format.render?.[kCodeTools];
    if (codeTools === true || typeof codeTools === "object" && (codeTools?.source === undefined || codeTools?.source === true)) {
        format.render[kKeepSource] = true;
    }
    format.render[kKeepSource] = format.render[kKeepSource] && isHtmlOutput(format.pandoc, true) && formatHasBootstrap(format) && executionEngineCanKeepSource(engine, target);
}
function keepSourceBlock(format, source) {
    if (format.render[kKeepSource]) {
        let code = Deno.readTextFileSync(source).trimLeft();
        if (!code.endsWith("\n")) {
            code = code + "\n";
        }
        code = code.replaceAll(/\n```{(\w+)}\s*\n/g, "\n" + kKeepSourceSentinel + "\n\n```$1\n");
        const kKeepSourceBackticks = "```````````````````";
        return `${kMarkdownBlockSeparator}::: {.${kEmbeddedSourceClass}}\n${kKeepSourceBackticks}` + `{.markdown shortcodes="false"}\n${code}` + `${kKeepSourceBackticks}\n:::\n`;
    } else {
        return "";
    }
}
function codeToolsPostprocessor(format) {
    return (doc)=>{
        return withTiming("codeToolsPostprocessor", ()=>{
            if (format.render[kKeepSource]) {
                const lines = doc.querySelectorAll(`.${kEmbeddedSourceClass} > div.sourceCode > pre > code > span`);
                if (lines.length > 0) {
                    const newLines = [];
                    for(let i1 = 0; i1 < lines.length; i1++){
                        const line = lines[i1];
                        if (line.innerText === kKeepSourceSentinel) {
                            i1 += 2;
                            const codeBlockLine = lines[i1];
                            const anchor = codeBlockLine.querySelector("a");
                            const text = codeBlockLine.innerText;
                            codeBlockLine.textContent = "";
                            codeBlockLine.appendChild(anchor);
                            const newSpan = doc.createElement("span");
                            newSpan.classList.add("in");
                            newSpan.innerText = text.replace(/```(\w+)/, "```{$1}");
                            codeBlockLine.appendChild(newSpan);
                            newLines.push(codeBlockLine);
                        } else {
                            newLines.push(line);
                        }
                    }
                    if (newLines.length !== lines.length) {
                        const parent = lines[0].parentElement;
                        parent.innerHTML = "";
                        newLines.forEach((line)=>{
                            parent.appendChild(line);
                            parent.appendChild(doc.createTextNode("\n"));
                        });
                    }
                }
            }
            if (formatHasCodeTools(format)) {
                const codeTools = resolveCodeTools(format, doc);
                if (codeTools.source || codeTools.toggle) {
                    const title = doc.querySelector("#title-block-header h1");
                    if (title) {
                        const header = title.parentElement;
                        const titleDiv = doc.createElement("div");
                        titleDiv.classList.add("quarto-title-block");
                        const layoutDiv = doc.createElement("div");
                        titleDiv.appendChild(layoutDiv);
                        header?.replaceChild(titleDiv, title);
                        layoutDiv.appendChild(title);
                        const button = doc.createElement("button");
                        button.setAttribute("type", "button");
                        button.classList.add("btn").add("code-tools-button");
                        const icon = doc.createElement("i");
                        icon.classList.add("bi");
                        button.appendChild(icon);
                        if (codeTools.caption !== "none") {
                            button.appendChild(doc.createTextNode(" " + codeTools.caption));
                        }
                        layoutDiv.appendChild(button);
                        header.appendChild(titleDiv);
                        if (codeTools.toggle) {
                            button.setAttribute("id", kCodeToolsMenuButtonId);
                            button.classList.add("dropdown-toggle");
                            button.setAttribute("data-bs-toggle", "dropdown");
                            button.setAttribute("aria-expanded", "false");
                            const ul = doc.createElement("ul");
                            ul.classList.add("dropdown-menu").add("dropdown-menu-end");
                            ul.setAttribute("aria-labelelledby", kCodeToolsMenuButtonId);
                            const addListItem = (id, text)=>{
                                const a = doc.createElement("a");
                                a.setAttribute("id", id);
                                a.classList.add("dropdown-item");
                                a.setAttribute("href", "javascript:void(0)");
                                a.setAttribute("role", "button");
                                a.appendChild(doc.createTextNode(text));
                                const li = doc.createElement("li");
                                li.appendChild(a);
                                ul.appendChild(li);
                                return li;
                            };
                            const addDivider = ()=>{
                                const hr = doc.createElement("hr");
                                hr.classList.add("dropdown-divider");
                                const li = doc.createElement("li");
                                li.appendChild(hr);
                                ul.appendChild(li);
                            };
                            addListItem(kShowAllCodeLinkId, format.language[kCodeToolsShowAllCode]);
                            addListItem(kHideAllCodeLinkId, format.language[kCodeToolsHideAllCode]);
                            if (codeTools.source) {
                                addDivider();
                                const vsLi = addListItem(kViewSourceLinkId, format.language[kCodeToolsViewSource]);
                                if (typeof codeTools.source === "string") {
                                    vsLi.firstChild.setAttribute(kDataQuartoSourceUrl, codeTools.source);
                                }
                            }
                            layoutDiv.appendChild(ul);
                        } else {
                            button.setAttribute("id", kCodeToolsSourceButtonId);
                            if (typeof codeTools.source === "string") {
                                button.setAttribute(kDataQuartoSourceUrl, codeTools.source);
                            }
                        }
                    }
                    if (codeTools.source) {
                        const embeddedCode = doc.querySelector(`.${kEmbeddedSourceClass}`);
                        if (embeddedCode) {
                            const modalDiv = doc.createElement("div");
                            modalDiv.classList.add("modal").add("fade");
                            modalDiv.setAttribute("id", kEmbeddedSourceModalId);
                            modalDiv.setAttribute("tabindex", "-1");
                            modalDiv.setAttribute("aria-labelledby", kEmbeddedSourceModalLabelId);
                            modalDiv.setAttribute("aria-hidden", "true");
                            const modalDialogDiv = doc.createElement("div");
                            modalDialogDiv.classList.add("modal-dialog").add("modal-dialog-scrollable");
                            const modalContentDiv = doc.createElement("div");
                            modalContentDiv.classList.add("modal-content");
                            const modalDialogHeader = doc.createElement("div");
                            modalDialogHeader.classList.add("modal-header");
                            const h5 = doc.createElement("h5");
                            h5.classList.add("modal-title");
                            h5.setAttribute("id", kEmbeddedSourceModalLabelId);
                            h5.appendChild(doc.createTextNode(format.language[kCodeToolsSourceCode]));
                            modalDialogHeader.appendChild(h5);
                            const button1 = doc.createElement("button");
                            button1.classList.add("btn-close");
                            button1.setAttribute("data-bs-dismiss", "modal");
                            modalDialogHeader.appendChild(button1);
                            modalContentDiv.appendChild(modalDialogHeader);
                            const modalBody = doc.createElement("div");
                            modalBody.classList.add("modal-body");
                            modalContentDiv.appendChild(modalBody);
                            modalDialogDiv.appendChild(modalContentDiv);
                            modalDiv.appendChild(modalDialogDiv);
                            const mainEl = doc.querySelector("main.content");
                            if (mainEl) {
                                const mainParentEl = mainEl.parentElement;
                                mainParentEl?.insertBefore(modalDiv, mainParentEl.lastChild);
                            } else {
                                embeddedCode.parentElement?.insertBefore(modalDiv, embeddedCode);
                            }
                            modalBody.appendChild(embeddedCode);
                            embeddedCode.classList.delete(kEmbeddedSourceClass);
                        }
                    }
                    for (const el of Array.from(doc.querySelectorAll("details div pre.hidden"))){
                        const det = el.parentElement.parentElement;
                        det.classList.add("hidden");
                    }
                }
            }
            return Promise.resolve(kHtmlEmptyPostProcessResult);
        });
    };
}
function resolveCodeTools(format, doc) {
    const kCodeCaption = format.language[kCodeToolsMenuCaption];
    const codeTools = format?.render[kCodeTools];
    const codeToolsResolved = {
        source: typeof codeTools === "boolean" ? codeTools : codeTools?.source !== undefined ? codeTools?.source : true,
        toggle: typeof codeTools === "boolean" ? codeTools : codeTools?.toggle !== undefined ? !!codeTools?.toggle : true,
        caption: typeof codeTools === "boolean" ? kCodeCaption : codeTools?.caption || kCodeCaption
    };
    if (codeToolsResolved.source === true) {
        codeToolsResolved.source = !!format.render[kKeepSource];
    }
    if (codeToolsResolved.toggle) {
        const codeDetails = doc.querySelector(".cell > details > .sourceCode");
        const codeHidden = doc.querySelector(".cell .sourceCode.hidden:not(div pre.js)");
        codeToolsResolved.toggle = !!codeDetails || !!codeHidden;
    }
    return codeToolsResolved;
}
const db = JSON.parse(`{
  "application/1d-interleaved-parityfec": {
    "source": "iana"
  },
  "application/3gpdash-qoe-report+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/3gpp-ims+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/3gpphal+json": {
    "source": "iana",
    "compressible": true
  },
  "application/3gpphalforms+json": {
    "source": "iana",
    "compressible": true
  },
  "application/a2l": {
    "source": "iana"
  },
  "application/activemessage": {
    "source": "iana"
  },
  "application/activity+json": {
    "source": "iana",
    "compressible": true
  },
  "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/alto-updatestreamcontrol+json": {
    "source": "iana",
    "compressible": true
  },
  "application/alto-updatestreamparams+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",
    "compressible": true,
    "extensions": ["atomcat"]
  },
  "application/atomdeleted+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["atomdeleted"]
  },
  "application/atomicmail": {
    "source": "iana"
  },
  "application/atomsvc+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["atomsvc"]
  },
  "application/atsc-dwd+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["dwd"]
  },
  "application/atsc-dynamic-event-message": {
    "source": "iana"
  },
  "application/atsc-held+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["held"]
  },
  "application/atsc-rdt+json": {
    "source": "iana",
    "compressible": true
  },
  "application/atsc-rsat+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["rsat"]
  },
  "application/atxml": {
    "source": "iana"
  },
  "application/auth-policy+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/bacnet-xdd+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/batch-smtp": {
    "source": "iana"
  },
  "application/bdoc": {
    "compressible": false,
    "extensions": ["bdoc"]
  },
  "application/beep+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/calendar+json": {
    "source": "iana",
    "compressible": true
  },
  "application/calendar+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xcs"]
  },
  "application/call-completion": {
    "source": "iana"
  },
  "application/cals-1840": {
    "source": "iana"
  },
  "application/captive+json": {
    "source": "iana",
    "compressible": true
  },
  "application/cbor": {
    "source": "iana"
  },
  "application/cbor-seq": {
    "source": "iana"
  },
  "application/cccex": {
    "source": "iana"
  },
  "application/ccmp+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/ccxml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["ccxml"]
  },
  "application/cdfx+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["cdfx"]
  },
  "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",
    "compressible": true
  },
  "application/cellml+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/cfw": {
    "source": "iana"
  },
  "application/clr": {
    "source": "iana"
  },
  "application/clue+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/clue_info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/cms": {
    "source": "iana"
  },
  "application/cnrp+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/coap-group+json": {
    "source": "iana",
    "compressible": true
  },
  "application/coap-payload": {
    "source": "iana"
  },
  "application/commonground": {
    "source": "iana"
  },
  "application/conference-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/cose": {
    "source": "iana"
  },
  "application/cose-key": {
    "source": "iana"
  },
  "application/cose-key-set": {
    "source": "iana"
  },
  "application/cpl+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/csrattrs": {
    "source": "iana"
  },
  "application/csta+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/cstadata+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/csvm+json": {
    "source": "iana",
    "compressible": true
  },
  "application/cu-seeme": {
    "source": "apache",
    "extensions": ["cu"]
  },
  "application/cwt": {
    "source": "iana"
  },
  "application/cybercash": {
    "source": "iana"
  },
  "application/dart": {
    "compressible": true
  },
  "application/dash+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["mpd"]
  },
  "application/dashdelta": {
    "source": "iana"
  },
  "application/davmount+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["davmount"]
  },
  "application/dca-rft": {
    "source": "iana"
  },
  "application/dcd": {
    "source": "iana"
  },
  "application/dec-dx": {
    "source": "iana"
  },
  "application/dialog-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/dicom": {
    "source": "iana"
  },
  "application/dicom+json": {
    "source": "iana",
    "compressible": true
  },
  "application/dicom+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/dii": {
    "source": "iana"
  },
  "application/dit": {
    "source": "iana"
  },
  "application/dns": {
    "source": "iana"
  },
  "application/dns+json": {
    "source": "iana",
    "compressible": true
  },
  "application/dns-message": {
    "source": "iana"
  },
  "application/docbook+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["dbk"]
  },
  "application/dots+cbor": {
    "source": "iana"
  },
  "application/dskpp+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/dssc+der": {
    "source": "iana",
    "extensions": ["dssc"]
  },
  "application/dssc+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xdssc"]
  },
  "application/dvcs": {
    "source": "iana"
  },
  "application/ecmascript": {
    "source": "iana",
    "compressible": true,
    "extensions": ["es","ecma"]
  },
  "application/edi-consent": {
    "source": "iana"
  },
  "application/edi-x12": {
    "source": "iana",
    "compressible": false
  },
  "application/edifact": {
    "source": "iana",
    "compressible": false
  },
  "application/efi": {
    "source": "iana"
  },
  "application/elm+json": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/elm+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.cap+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/emergencycalldata.comment+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.control+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.deviceinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.ecall.msd": {
    "source": "iana"
  },
  "application/emergencycalldata.providerinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.serviceinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.subscriberinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emergencycalldata.veds+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/emma+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["emma"]
  },
  "application/emotionml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["emotionml"]
  },
  "application/encaprtp": {
    "source": "iana"
  },
  "application/epp+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/epub+zip": {
    "source": "iana",
    "compressible": false,
    "extensions": ["epub"]
  },
  "application/eshop": {
    "source": "iana"
  },
  "application/exi": {
    "source": "iana",
    "extensions": ["exi"]
  },
  "application/expect-ct-report+json": {
    "source": "iana",
    "compressible": true
  },
  "application/fastinfoset": {
    "source": "iana"
  },
  "application/fastsoap": {
    "source": "iana"
  },
  "application/fdt+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["fdt"]
  },
  "application/fhir+json": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/fhir+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/fido.trusted-apps+json": {
    "compressible": true
  },
  "application/fits": {
    "source": "iana"
  },
  "application/flexfec": {
    "source": "iana"
  },
  "application/font-sfnt": {
    "source": "iana"
  },
  "application/font-tdpfr": {
    "source": "iana",
    "extensions": ["pfr"]
  },
  "application/font-woff": {
    "source": "iana",
    "compressible": false
  },
  "application/framework-attributes+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/geo+json": {
    "source": "iana",
    "compressible": true,
    "extensions": ["geojson"]
  },
  "application/geo+json-seq": {
    "source": "iana"
  },
  "application/geopackage+sqlite3": {
    "source": "iana"
  },
  "application/geoxacml+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/gltf-buffer": {
    "source": "iana"
  },
  "application/gml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["gml"]
  },
  "application/gpx+xml": {
    "source": "apache",
    "compressible": true,
    "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",
    "compressible": true
  },
  "application/hjson": {
    "extensions": ["hjson"]
  },
  "application/http": {
    "source": "iana"
  },
  "application/hyperstudio": {
    "source": "iana",
    "extensions": ["stk"]
  },
  "application/ibe-key-request+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/ibe-pkg-reply+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/ibe-pp-data": {
    "source": "iana"
  },
  "application/iges": {
    "source": "iana"
  },
  "application/im-iscomposing+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "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",
    "compressible": true,
    "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",
    "compressible": true,
    "extensions": ["its"]
  },
  "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/jscalendar+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",
    "compressible": true
  },
  "application/kpml-response+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/ld+json": {
    "source": "iana",
    "compressible": true,
    "extensions": ["jsonld"]
  },
  "application/lgr+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["lgr"]
  },
  "application/link-format": {
    "source": "iana"
  },
  "application/load-control+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/lost+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["lostxml"]
  },
  "application/lostsync+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/lpf+zip": {
    "source": "iana",
    "compressible": false
  },
  "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",
    "compressible": true,
    "extensions": ["mads"]
  },
  "application/manifest+json": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true,
    "extensions": ["webmanifest"]
  },
  "application/marc": {
    "source": "iana",
    "extensions": ["mrc"]
  },
  "application/marcxml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["mrcx"]
  },
  "application/mathematica": {
    "source": "iana",
    "extensions": ["ma","nb","mb"]
  },
  "application/mathml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["mathml"]
  },
  "application/mathml-content+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mathml-presentation+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-associated-procedure-description+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-deregister+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-envelope+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-msk+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-msk-response+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-protection-description+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-reception-report+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-register+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-register-response+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-schedule+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbms-user-service-description+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mbox": {
    "source": "iana",
    "extensions": ["mbox"]
  },
  "application/media-policy-dataset+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/media_control+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/mediaservercontrol+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["mscml"]
  },
  "application/merge-patch+json": {
    "source": "iana",
    "compressible": true
  },
  "application/metalink+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["metalink"]
  },
  "application/metalink4+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["meta4"]
  },
  "application/mets+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["mets"]
  },
  "application/mf4": {
    "source": "iana"
  },
  "application/mikey": {
    "source": "iana"
  },
  "application/mipc": {
    "source": "iana"
  },
  "application/missing-blocks+cbor-seq": {
    "source": "iana"
  },
  "application/mmt-aei+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["maei"]
  },
  "application/mmt-usd+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["musd"]
  },
  "application/mods+xml": {
    "source": "iana",
    "compressible": true,
    "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",
    "compressible": true
  },
  "application/mrb-publish+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/msc-ivr+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/msc-mixer+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/msword": {
    "source": "iana",
    "compressible": false,
    "extensions": ["doc","dot"]
  },
  "application/mud+json": {
    "source": "iana",
    "compressible": true
  },
  "application/multipart-core": {
    "source": "iana"
  },
  "application/mxf": {
    "source": "iana",
    "extensions": ["mxf"]
  },
  "application/n-quads": {
    "source": "iana",
    "extensions": ["nq"]
  },
  "application/n-triples": {
    "source": "iana",
    "extensions": ["nt"]
  },
  "application/nasdata": {
    "source": "iana"
  },
  "application/news-checkgroups": {
    "source": "iana",
    "charset": "US-ASCII"
  },
  "application/news-groupinfo": {
    "source": "iana",
    "charset": "US-ASCII"
  },
  "application/news-transmission": {
    "source": "iana"
  },
  "application/nlsml+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/node": {
    "source": "iana",
    "extensions": ["cjs"]
  },
  "application/nss": {
    "source": "iana"
  },
  "application/oauth-authz-req+jwt": {
    "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/odm+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/odx": {
    "source": "iana"
  },
  "application/oebps-package+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["opf"]
  },
  "application/ogg": {
    "source": "iana",
    "compressible": false,
    "extensions": ["ogx"]
  },
  "application/omdoc+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["omdoc"]
  },
  "application/onenote": {
    "source": "apache",
    "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
  },
  "application/opc-nodeset+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/oscore": {
    "source": "iana"
  },
  "application/oxps": {
    "source": "iana",
    "extensions": ["oxps"]
  },
  "application/p21+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/p2p-overlay+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["relo"]
  },
  "application/parityfec": {
    "source": "iana"
  },
  "application/passport": {
    "source": "iana"
  },
  "application/patch-ops-error+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xer"]
  },
  "application/pdf": {
    "source": "iana",
    "compressible": false,
    "extensions": ["pdf"]
  },
  "application/pdx": {
    "source": "iana"
  },
  "application/pem-certificate-chain": {
    "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",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/pidf-diff+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "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",
    "compressible": true,
    "extensions": ["pls"]
  },
  "application/poc-settings+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/provenance+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["provx"]
  },
  "application/prs.alvestrand.titrax-sheet": {
    "source": "iana"
  },
  "application/prs.cww": {
    "source": "iana",
    "extensions": ["cww"]
  },
  "application/prs.cyn": {
    "source": "iana",
    "charset": "7-BIT"
  },
  "application/prs.hpub+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/prs.nprend": {
    "source": "iana"
  },
  "application/prs.plucker": {
    "source": "iana"
  },
  "application/prs.rdf-xml-crypt": {
    "source": "iana"
  },
  "application/prs.xsf+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/pskc+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["pskcxml"]
  },
  "application/pvd+json": {
    "source": "iana",
    "compressible": true
  },
  "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","owl"]
  },
  "application/reginfo+xml": {
    "source": "iana",
    "compressible": true,
    "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",
    "compressible": true,
    "extensions": ["rl"]
  },
  "application/resource-lists-diff+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["rld"]
  },
  "application/rfc+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/riscos": {
    "source": "iana"
  },
  "application/rlmi+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/rls-services+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["rs"]
  },
  "application/route-apd+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["rapd"]
  },
  "application/route-s-tsid+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["sls"]
  },
  "application/route-usd+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["rusd"]
  },
  "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",
    "compressible": true,
    "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",
    "compressible": true
  },
  "application/samlmetadata+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/sarif+json": {
    "source": "iana",
    "compressible": true
  },
  "application/sarif-external-properties+json": {
    "source": "iana",
    "compressible": true
  },
  "application/sbe": {
    "source": "iana"
  },
  "application/sbml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["sbml"]
  },
  "application/scaip+xml": {
    "source": "iana",
    "compressible": true
  },
  "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/secevent+jwt": {
    "source": "iana"
  },
  "application/senml+cbor": {
    "source": "iana"
  },
  "application/senml+json": {
    "source": "iana",
    "compressible": true
  },
  "application/senml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["senmlx"]
  },
  "application/senml-etch+cbor": {
    "source": "iana"
  },
  "application/senml-etch+json": {
    "source": "iana",
    "compressible": true
  },
  "application/senml-exi": {
    "source": "iana"
  },
  "application/sensml+cbor": {
    "source": "iana"
  },
  "application/sensml+json": {
    "source": "iana",
    "compressible": true
  },
  "application/sensml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["sensmlx"]
  },
  "application/sensml-exi": {
    "source": "iana"
  },
  "application/sep+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true,
    "extensions": ["shf"]
  },
  "application/sieve": {
    "source": "iana",
    "extensions": ["siv","sieve"]
  },
  "application/simple-filter+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/simple-message-summary": {
    "source": "iana"
  },
  "application/simplesymbolcontainer": {
    "source": "iana"
  },
  "application/sipc": {
    "source": "iana"
  },
  "application/slate": {
    "source": "iana"
  },
  "application/smil": {
    "source": "iana"
  },
  "application/smil+xml": {
    "source": "iana",
    "compressible": true,
    "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",
    "compressible": true,
    "extensions": ["srx"]
  },
  "application/spirits-event+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/sql": {
    "source": "iana"
  },
  "application/srgs": {
    "source": "iana",
    "extensions": ["gram"]
  },
  "application/srgs+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["grxml"]
  },
  "application/sru+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["sru"]
  },
  "application/ssdl+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["ssdl"]
  },
  "application/ssml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["ssml"]
  },
  "application/stix+json": {
    "source": "iana",
    "compressible": true
  },
  "application/swid+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["swidtag"]
  },
  "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/taxii+json": {
    "source": "iana",
    "compressible": true
  },
  "application/td+json": {
    "source": "iana",
    "compressible": true
  },
  "application/tei+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["tei","teicorpus"]
  },
  "application/tetra_isi": {
    "source": "iana"
  },
  "application/thraud+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["tfi"]
  },
  "application/timestamp-query": {
    "source": "iana"
  },
  "application/timestamp-reply": {
    "source": "iana"
  },
  "application/timestamped-data": {
    "source": "iana",
    "extensions": ["tsd"]
  },
  "application/tlsrpt+gzip": {
    "source": "iana"
  },
  "application/tlsrpt+json": {
    "source": "iana",
    "compressible": true
  },
  "application/tnauthlist": {
    "source": "iana"
  },
  "application/toml": {
    "compressible": true,
    "extensions": ["toml"]
  },
  "application/trickle-ice-sdpfrag": {
    "source": "iana"
  },
  "application/trig": {
    "source": "iana",
    "extensions": ["trig"]
  },
  "application/ttml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["ttml"]
  },
  "application/tve-trigger": {
    "source": "iana"
  },
  "application/tzif": {
    "source": "iana"
  },
  "application/tzif-leap": {
    "source": "iana"
  },
  "application/ubjson": {
    "compressible": false,
    "extensions": ["ubj"]
  },
  "application/ulpfec": {
    "source": "iana"
  },
  "application/urc-grpsheet+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/urc-ressheet+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["rsheet"]
  },
  "application/urc-targetdesc+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["td"]
  },
  "application/urc-uisocketdesc+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vcard+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vcard+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vemmi": {
    "source": "iana"
  },
  "application/vividence.scriptfile": {
    "source": "apache"
  },
  "application/vnd.1000minds.decision-model+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["1km"]
  },
  "application/vnd.3gpp-prose+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp-prose-pc3ch+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp-v2x-local-service-information": {
    "source": "iana"
  },
  "application/vnd.3gpp.5gnas": {
    "source": "iana"
  },
  "application/vnd.3gpp.access-transfer-events+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.bsf+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.gmop+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.gtpc": {
    "source": "iana"
  },
  "application/vnd.3gpp.interworking-data": {
    "source": "iana"
  },
  "application/vnd.3gpp.lpp": {
    "source": "iana"
  },
  "application/vnd.3gpp.mc-signalling-ear": {
    "source": "iana"
  },
  "application/vnd.3gpp.mcdata-affiliation-command+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcdata-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcdata-payload": {
    "source": "iana"
  },
  "application/vnd.3gpp.mcdata-service-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcdata-signalling": {
    "source": "iana"
  },
  "application/vnd.3gpp.mcdata-ue-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcdata-user-profile+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-affiliation-command+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-floor-request+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-location-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-mbms-usage-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-service-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-signed+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-ue-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-ue-init-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcptt-user-profile+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-affiliation-command+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-affiliation-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-location-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-service-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-transmission-request+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-ue-config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mcvideo-user-profile+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.mid-call+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.ngap": {
    "source": "iana"
  },
  "application/vnd.3gpp.pfcp": {
    "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.s1ap": {
    "source": "iana"
  },
  "application/vnd.3gpp.sms": {
    "source": "iana"
  },
  "application/vnd.3gpp.sms+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.srvcc-ext+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.srvcc-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.state-and-event-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp.ussd+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.3gpp2.bcmcsinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": false,
    "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",
    "compressible": true,
    "extensions": ["xdp"]
  },
  "application/vnd.adobe.xfdf": {
    "source": "iana",
    "extensions": ["xfdf"]
  },
  "application/vnd.aether.imp": {
    "source": "iana"
  },
  "application/vnd.afpc.afplinedata": {
    "source": "iana"
  },
  "application/vnd.afpc.afplinedata-pagedef": {
    "source": "iana"
  },
  "application/vnd.afpc.cmoca-cmresource": {
    "source": "iana"
  },
  "application/vnd.afpc.foca-charset": {
    "source": "iana"
  },
  "application/vnd.afpc.foca-codedfont": {
    "source": "iana"
  },
  "application/vnd.afpc.foca-codepage": {
    "source": "iana"
  },
  "application/vnd.afpc.modca": {
    "source": "iana"
  },
  "application/vnd.afpc.modca-cmtable": {
    "source": "iana"
  },
  "application/vnd.afpc.modca-formdef": {
    "source": "iana"
  },
  "application/vnd.afpc.modca-mediummap": {
    "source": "iana"
  },
  "application/vnd.afpc.modca-objectcontainer": {
    "source": "iana"
  },
  "application/vnd.afpc.modca-overlay": {
    "source": "iana"
  },
  "application/vnd.afpc.modca-pagesegment": {
    "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",
    "compressible": true
  },
  "application/vnd.android.ota": {
    "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.arrow.file": {
    "source": "iana"
  },
  "application/vnd.apache.arrow.stream": {
    "source": "iana"
  },
  "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.aplextor.warrp+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.apothekende.reservation+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.apple.installer+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["mpkg"]
  },
  "application/vnd.apple.keynote": {
    "source": "iana",
    "extensions": ["key"]
  },
  "application/vnd.apple.mpegurl": {
    "source": "iana",
    "extensions": ["m3u8"]
  },
  "application/vnd.apple.numbers": {
    "source": "iana",
    "extensions": ["numbers"]
  },
  "application/vnd.apple.pages": {
    "source": "iana",
    "extensions": ["pages"]
  },
  "application/vnd.apple.pkpass": {
    "compressible": false,
    "extensions": ["pkpass"]
  },
  "application/vnd.arastra.swi": {
    "source": "iana"
  },
  "application/vnd.aristanetworks.swi": {
    "source": "iana",
    "extensions": ["swi"]
  },
  "application/vnd.artisan+json": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.balsamiq.bmml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["bmml"]
  },
  "application/vnd.balsamiq.bmpr": {
    "source": "iana"
  },
  "application/vnd.banana-accounting": {
    "source": "iana"
  },
  "application/vnd.bbf.usp.error": {
    "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",
    "compressible": true
  },
  "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.bpf": {
    "source": "iana"
  },
  "application/vnd.bpf3": {
    "source": "iana"
  },
  "application/vnd.businessobjects": {
    "source": "iana",
    "extensions": ["rep"]
  },
  "application/vnd.byu.uapi+json": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true,
    "extensions": ["cdxml"]
  },
  "application/vnd.chess-pgn": {
    "source": "iana"
  },
  "application/vnd.chipnuts.karaoke-mmd": {
    "source": "iana",
    "extensions": ["mmd"]
  },
  "application/vnd.ciedi": {
    "source": "iana"
  },
  "application/vnd.cinderella": {
    "source": "iana",
    "extensions": ["cdy"]
  },
  "application/vnd.cirpack.isdn-ext": {
    "source": "iana"
  },
  "application/vnd.citationstyles.style+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["csl"]
  },
  "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",
    "compressible": false
  },
  "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",
    "compressible": true,
    "extensions": ["wbs"]
  },
  "application/vnd.cryptii.pipe+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.crypto-shade-file": {
    "source": "iana"
  },
  "application/vnd.cryptomator.encrypted": {
    "source": "iana"
  },
  "application/vnd.cryptomator.vault": {
    "source": "iana"
  },
  "application/vnd.ctc-posml": {
    "source": "iana",
    "extensions": ["pml"]
  },
  "application/vnd.ctct.ws+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.cybank": {
    "source": "iana"
  },
  "application/vnd.cyclonedx+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.cyclonedx+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.d2l.coursepackage1p0+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/vnd.d3m-dataset": {
    "source": "iana"
  },
  "application/vnd.d3m-problem": {
    "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.dbf": {
    "source": "iana",
    "extensions": ["dbf"]
  },
  "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",
    "compressible": true,
    "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.dir-bi.plate-dl-nosuffix": {
    "source": "iana"
  },
  "application/vnd.dm.delegation+xml": {
    "source": "iana",
    "compressible": true
  },
  "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.dvbisl+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.dvb.notif-container+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.dvb.notif-generic+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.dvb.notif-ia-msglist+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.dvb.notif-ia-registration-request+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.dvb.notif-ia-registration-response+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.dvb.notif-init+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.enliven": {
    "source": "iana",
    "extensions": ["nml"]
  },
  "application/vnd.enphase.envoy": {
    "source": "iana"
  },
  "application/vnd.eprints.data+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": false
  },
  "application/vnd.eszigno3+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["es3","et3"]
  },
  "application/vnd.etsi.aoc+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.asic-e+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/vnd.etsi.asic-s+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/vnd.etsi.cug+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvcommand+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvdiscovery+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvprofile+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvsad-bc+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvsad-cod+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvsad-npvr+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvservice+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvsync+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.iptvueprofile+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.mcid+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.mheg5": {
    "source": "iana"
  },
  "application/vnd.etsi.overload-control-policy-dataset+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.pstn+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.sci+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.simservs+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.etsi.timestamp-token": {
    "source": "iana"
  },
  "application/vnd.etsi.tsl+xml": {
    "source": "iana",
    "compressible": true
  },
  "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.exstream-empower+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/vnd.exstream-package": {
    "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.ficlab.flb+zip": {
    "source": "iana",
    "compressible": false
  },
  "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.fujifilm.fb.docuworks": {
    "source": "iana"
  },
  "application/vnd.fujifilm.fb.docuworks.binder": {
    "source": "iana"
  },
  "application/vnd.fujifilm.fb.docuworks.container": {
    "source": "iana"
  },
  "application/vnd.fujifilm.fb.jfi+xml": {
    "source": "iana",
    "compressible": true
  },
  "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.futoin+cbor": {
    "source": "iana"
  },
  "application/vnd.futoin+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.fuzzysheet": {
    "source": "iana",
    "extensions": ["fzs"]
  },
  "application/vnd.genomatix.tuxedo": {
    "source": "iana",
    "extensions": ["txd"]
  },
  "application/vnd.gentics.grd+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.geo+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.geocube+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.geogebra.file": {
    "source": "iana",
    "extensions": ["ggb"]
  },
  "application/vnd.geogebra.slides": {
    "source": "iana"
  },
  "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",
    "compressible": true
  },
  "application/vnd.gov.sk.e-form+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/vnd.gov.sk.xmldatacontainer+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true,
    "extensions": ["hal"]
  },
  "application/vnd.handheld-entertainment+xml": {
    "source": "iana",
    "compressible": true,
    "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+json": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": false
  },
  "application/vnd.imagemeter.image+zip": {
    "source": "iana",
    "compressible": false
  },
  "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",
    "compressible": true
  },
  "application/vnd.informix-visionary": {
    "source": "iana"
  },
  "application/vnd.infotech.project": {
    "source": "iana"
  },
  "application/vnd.infotech.project+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.iptc.g2.conceptitem+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.iptc.g2.knowledgeitem+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.iptc.g2.newsitem+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.iptc.g2.newsmessage+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.iptc.g2.packageitem+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.iptc.g2.planningitem+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.ipunplugged.rcprofile": {
    "source": "iana",
    "extensions": ["rcprofile"]
  },
  "application/vnd.irepository.package+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["irp"]
  },
  "application/vnd.is-xpr": {
    "source": "iana",
    "extensions": ["xpr"]
  },
  "application/vnd.isac.fcs": {
    "source": "iana",
    "extensions": ["fcs"]
  },
  "application/vnd.iso11783-10+zip": {
    "source": "iana",
    "compressible": false
  },
  "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": {
    "source": "iana"
  },
  "application/vnd.las.las+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.las.las+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["lasxml"]
  },
  "application/vnd.laszip": {
    "source": "iana"
  },
  "application/vnd.leap+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.liberty-request+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.llamagraphics.life-balance.desktop": {
    "source": "iana",
    "extensions": ["lbd"]
  },
  "application/vnd.llamagraphics.life-balance.exchange+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["lbe"]
  },
  "application/vnd.logipipe.circuit+zip": {
    "source": "iana",
    "compressible": false
  },
  "application/vnd.loom": {
    "source": "iana"
  },
  "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",
    "extensions": ["mvt"]
  },
  "application/vnd.marlin.drm.actiontoken+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.marlin.drm.conftoken+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.marlin.drm.license+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.ms-printing.printticket+xml": {
    "source": "apache",
    "compressible": true
  },
  "application/vnd.ms-printschematicket+xml": {
    "source": "iana",
    "compressible": true
  },
  "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.nebumind.line": {
    "source": "iana"
  },
  "application/vnd.nervana": {
    "source": "iana"
  },
  "application/vnd.netfpx": {
    "source": "iana"
  },
  "application/vnd.neurolanguage.nlu": {
    "source": "iana",
    "extensions": ["nlu"]
  },
  "application/vnd.nimn": {
    "source": "iana"
  },
  "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",
    "compressible": true
  },
  "application/vnd.nokia.iptv.config+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.nokia.isds-radio-presets": {
    "source": "iana"
  },
  "application/vnd.nokia.landmark+wbxml": {
    "source": "iana"
  },
  "application/vnd.nokia.landmark+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.nokia.landmarkcollection+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.nokia.n-gage.ac+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["ac"]
  },
  "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",
    "compressible": true
  },
  "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.oci.image.manifest.v1+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oftn.l10n+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.contentaccessdownload+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.contentaccessstreaming+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.cspg-hexbinary": {
    "source": "iana"
  },
  "application/vnd.oipf.dae.svg+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.dae.xhtml+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.mippvcontrolmessage+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.pae.gem": {
    "source": "iana"
  },
  "application/vnd.oipf.spdiscovery+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.spdlist+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.ueprofile+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oipf.userprofile+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.oma.bcast.drm-trigger+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.bcast.imd+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.bcast.ltkm": {
    "source": "iana"
  },
  "application/vnd.oma.bcast.notification+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.bcast.provisioningtrigger": {
    "source": "iana"
  },
  "application/vnd.oma.bcast.sgboot": {
    "source": "iana"
  },
  "application/vnd.oma.bcast.sgdd+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.oma.bcast.sprov+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.bcast.stkm": {
    "source": "iana"
  },
  "application/vnd.oma.cab-address-book+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.cab-feature-handler+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.cab-pcc+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.cab-subs-invite+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.cab-user-prefs+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.dcd": {
    "source": "iana"
  },
  "application/vnd.oma.dcdc": {
    "source": "iana"
  },
  "application/vnd.oma.dd2+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["dd2"]
  },
  "application/vnd.oma.drm.risd+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.group-usage-list+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.lwm2m+cbor": {
    "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",
    "compressible": true
  },
  "application/vnd.oma.poc.detailed-progress-report+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.poc.final-report+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.poc.groups+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.poc.invocation-descriptor+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.poc.optimized-progress-report+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.push": {
    "source": "iana"
  },
  "application/vnd.oma.scidm.messages+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.oma.xcap-directory+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.omads-email+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/vnd.omads-file+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "application/vnd.omads-folder+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "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",
    "compressible": true,
    "extensions": ["obgx"]
  },
  "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",
    "compressible": true,
    "extensions": ["osm"]
  },
  "application/vnd.opentimestamps.ots": {
    "source": "iana"
  },
  "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawing+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
    "source": "iana",
    "compressible": false,
    "extensions": ["pptx"]
  },
  "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slide": {
    "source": "iana",
    "extensions": ["sldx"]
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
    "source": "iana",
    "extensions": ["ppsx"]
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.template": {
    "source": "iana",
    "extensions": ["potx"]
  },
  "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
    "source": "iana",
    "compressible": false,
    "extensions": ["xlsx"]
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
    "source": "iana",
    "extensions": ["xltx"]
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.theme+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.vmldrawing": {
    "source": "iana"
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
    "source": "iana",
    "compressible": false,
    "extensions": ["docx"]
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
    "source": "iana",
    "extensions": ["dotx"]
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-package.core-properties+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.openxmlformats-package.relationships+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "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.patentdive": {
    "source": "iana"
  },
  "application/vnd.patientecommsdoc": {
    "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",
    "compressible": true
  },
  "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.psfs": {
    "source": "iana"
  },
  "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",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "application/vnd.radisys.msml+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-audit+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-audit-conf+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-audit-conn+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-audit-dialog+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-audit-stream+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-conf+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog-base+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog-fax-detect+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog-group+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog-speech+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.radisys.msml-dialog-transform+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.rainstor.data": {
    "source": "iana"
  },
  "application/vnd.rapid": {
    "source": "iana"
  },
  "application/vnd.rar": {
    "source": "iana",
    "extensions": ["rar"]
  },
  "application/vnd.realvnc.bed": {
    "source": "iana",
    "extensions": ["bed"]
  },
  "application/vnd.recordare.musicxml": {
    "source": "iana",
    "extensions": ["mxl"]
  },
  "application/vnd.recordare.musicxml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["musicxml"]
  },
  "application/vnd.renlearn.rlprint": {
    "source": "iana"
  },
  "application/vnd.resilient.logic": {
    "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",
    "compressible": true,
    "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.sar": {
    "source": "iana"
  },
  "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.seis+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.sema": {
    "source": "iana",
    "extensions": ["sema"]
  },
  "application/vnd.semd": {
    "source": "iana",
    "extensions": ["semd"]
  },
  "application/vnd.semf": {
    "source": "iana",
    "extensions": ["semf"]
  },
  "application/vnd.shade-save-file": {
    "source": "iana"
  },
  "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.shootproof+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.shopkick+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.shp": {
    "source": "iana"
  },
  "application/vnd.shx": {
    "source": "iana"
  },
  "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.snesdev-page-table": {
    "source": "iana"
  },
  "application/vnd.software602.filler.form+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["fo"]
  },
  "application/vnd.software602.filler.form-xml-zip": {
    "source": "iana"
  },
  "application/vnd.solent.sdkm+xml": {
    "source": "iana",
    "compressible": true,
    "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.sycle+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.symbian.install": {
    "source": "apache",
    "extensions": ["sis","sisx"]
  },
  "application/vnd.syncml+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true,
    "extensions": ["xsm"]
  },
  "application/vnd.syncml.dm+wbxml": {
    "source": "iana",
    "charset": "UTF-8",
    "extensions": ["bdm"]
  },
  "application/vnd.syncml.dm+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true,
    "extensions": ["xdm"]
  },
  "application/vnd.syncml.dm.notification": {
    "source": "iana"
  },
  "application/vnd.syncml.dmddf+wbxml": {
    "source": "iana"
  },
  "application/vnd.syncml.dmddf+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true,
    "extensions": ["ddf"]
  },
  "application/vnd.syncml.dmtnds+wbxml": {
    "source": "iana"
  },
  "application/vnd.syncml.dmtnds+xml": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true
  },
  "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.think-cell.ppttc+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.tmd.mediaflex.api+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true,
    "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.veritone.aion+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vnd.veryant.thin": {
    "source": "iana"
  },
  "application/vnd.ves.encrypted": {
    "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",
    "charset": "UTF-8",
    "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.dpp": {
    "source": "iana"
  },
  "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",
    "compressible": true
  },
  "application/vnd.wv.ssp+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true
  },
  "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",
    "compressible": true,
    "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",
    "compressible": true,
    "extensions": ["zaz"]
  },
  "application/voicexml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["vxml"]
  },
  "application/voucher-cms+json": {
    "source": "iana",
    "compressible": true
  },
  "application/vq-rtcpxr": {
    "source": "iana"
  },
  "application/wasm": {
    "source": "iana",
    "compressible": true,
    "extensions": ["wasm"]
  },
  "application/watcherinfo+xml": {
    "source": "iana",
    "compressible": true
  },
  "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",
    "compressible": true,
    "extensions": ["wsdl"]
  },
  "application/wspolicy+xml": {
    "source": "iana",
    "compressible": true,
    "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",
    "compressible": true,
    "extensions": ["ncx"]
  },
  "application/x-dtbook+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["dtb"]
  },
  "application/x-dtbresource+xml": {
    "source": "apache",
    "compressible": true,
    "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-keepass2": {
    "extensions": ["kdbx"]
  },
  "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-pki-message": {
    "source": "iana"
  },
  "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": "iana",
    "extensions": ["der","crt","pem"]
  },
  "application/x-x509-ca-ra-cert": {
    "source": "iana"
  },
  "application/x-x509-next-ca-cert": {
    "source": "iana"
  },
  "application/x-xfig": {
    "source": "apache",
    "extensions": ["fig"]
  },
  "application/x-xliff+xml": {
    "source": "apache",
    "compressible": true,
    "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",
    "compressible": true
  },
  "application/xaml+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["xaml"]
  },
  "application/xcap-att+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xav"]
  },
  "application/xcap-caps+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xca"]
  },
  "application/xcap-diff+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xdf"]
  },
  "application/xcap-el+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xel"]
  },
  "application/xcap-error+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/xcap-ns+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xns"]
  },
  "application/xcon-conference-info+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/xcon-conference-info-diff+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/xenc+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xenc"]
  },
  "application/xhtml+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xhtml","xht"]
  },
  "application/xhtml-voice+xml": {
    "source": "apache",
    "compressible": true
  },
  "application/xliff+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xlf"]
  },
  "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",
    "compressible": true
  },
  "application/xmpp+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/xop+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xop"]
  },
  "application/xproc+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["xpl"]
  },
  "application/xslt+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["xsl","xslt"]
  },
  "application/xspf+xml": {
    "source": "apache",
    "compressible": true,
    "extensions": ["xspf"]
  },
  "application/xv+xml": {
    "source": "iana",
    "compressible": true,
    "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",
    "compressible": true
  },
  "application/yang-patch+json": {
    "source": "iana",
    "compressible": true
  },
  "application/yang-patch+xml": {
    "source": "iana",
    "compressible": true
  },
  "application/yin+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["yin"]
  },
  "application/zip": {
    "source": "iana",
    "compressible": false,
    "extensions": ["zip"]
  },
  "application/zlib": {
    "source": "iana"
  },
  "application/zstd": {
    "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/aac": {
    "source": "iana"
  },
  "audio/ac3": {
    "source": "iana"
  },
  "audio/adpcm": {
    "source": "apache",
    "extensions": ["adp"]
  },
  "audio/amr": {
    "source": "iana",
    "extensions": ["amr"]
  },
  "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/flexfec": {
    "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/mhas": {
    "source": "iana"
  },
  "audio/midi": {
    "source": "apache",
    "extensions": ["mid","midi","kar","rmi"]
  },
  "audio/mobile-xmf": {
    "source": "iana",
    "extensions": ["mxmf"]
  },
  "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","opus"]
  },
  "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/scip": {
    "source": "iana"
  },
  "audio/silk": {
    "source": "apache",
    "extensions": ["sil"]
  },
  "audio/smv": {
    "source": "iana"
  },
  "audio/smv-qcp": {
    "source": "iana"
  },
  "audio/smv0": {
    "source": "iana"
  },
  "audio/sofa": {
    "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/tetra_acelp": {
    "source": "iana"
  },
  "audio/tetra_acelp_bb": {
    "source": "iana"
  },
  "audio/tone": {
    "source": "iana"
  },
  "audio/tsvcis": {
    "source": "iana"
  },
  "audio/uemclip": {
    "source": "iana"
  },
  "audio/ulpfec": {
    "source": "iana"
  },
  "audio/usac": {
    "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.dts.uhd": {
    "source": "iana"
  },
  "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",
    "compressible": true,
    "extensions": ["ttf"]
  },
  "font/woff": {
    "source": "iana",
    "extensions": ["woff"]
  },
  "font/woff2": {
    "source": "iana",
    "extensions": ["woff2"]
  },
  "image/aces": {
    "source": "iana",
    "extensions": ["exr"]
  },
  "image/apng": {
    "compressible": false,
    "extensions": ["apng"]
  },
  "image/avci": {
    "source": "iana"
  },
  "image/avcs": {
    "source": "iana"
  },
  "image/avif": {
    "source": "iana",
    "compressible": false,
    "extensions": ["avif"]
  },
  "image/bmp": {
    "source": "iana",
    "compressible": true,
    "extensions": ["bmp"]
  },
  "image/cgm": {
    "source": "iana",
    "extensions": ["cgm"]
  },
  "image/dicom-rle": {
    "source": "iana",
    "extensions": ["drle"]
  },
  "image/emf": {
    "source": "iana",
    "extensions": ["emf"]
  },
  "image/fits": {
    "source": "iana",
    "extensions": ["fits"]
  },
  "image/g3fax": {
    "source": "iana",
    "extensions": ["g3"]
  },
  "image/gif": {
    "source": "iana",
    "compressible": false,
    "extensions": ["gif"]
  },
  "image/heic": {
    "source": "iana",
    "extensions": ["heic"]
  },
  "image/heic-sequence": {
    "source": "iana",
    "extensions": ["heics"]
  },
  "image/heif": {
    "source": "iana",
    "extensions": ["heif"]
  },
  "image/heif-sequence": {
    "source": "iana",
    "extensions": ["heifs"]
  },
  "image/hej2k": {
    "source": "iana",
    "extensions": ["hej2"]
  },
  "image/hsj2": {
    "source": "iana",
    "extensions": ["hsj2"]
  },
  "image/ief": {
    "source": "iana",
    "extensions": ["ief"]
  },
  "image/jls": {
    "source": "iana",
    "extensions": ["jls"]
  },
  "image/jp2": {
    "source": "iana",
    "compressible": false,
    "extensions": ["jp2","jpg2"]
  },
  "image/jpeg": {
    "source": "iana",
    "compressible": false,
    "extensions": ["jpeg","jpg","jpe"]
  },
  "image/jph": {
    "source": "iana",
    "extensions": ["jph"]
  },
  "image/jphc": {
    "source": "iana",
    "extensions": ["jhc"]
  },
  "image/jpm": {
    "source": "iana",
    "compressible": false,
    "extensions": ["jpm"]
  },
  "image/jpx": {
    "source": "iana",
    "compressible": false,
    "extensions": ["jpx","jpf"]
  },
  "image/jxr": {
    "source": "iana",
    "extensions": ["jxr"]
  },
  "image/jxra": {
    "source": "iana",
    "extensions": ["jxra"]
  },
  "image/jxrs": {
    "source": "iana",
    "extensions": ["jxrs"]
  },
  "image/jxs": {
    "source": "iana",
    "extensions": ["jxs"]
  },
  "image/jxsc": {
    "source": "iana",
    "extensions": ["jxsc"]
  },
  "image/jxsi": {
    "source": "iana",
    "extensions": ["jxsi"]
  },
  "image/jxss": {
    "source": "iana",
    "extensions": ["jxss"]
  },
  "image/ktx": {
    "source": "iana",
    "extensions": ["ktx"]
  },
  "image/ktx2": {
    "source": "iana",
    "extensions": ["ktx2"]
  },
  "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",
    "extensions": ["pti"]
  },
  "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",
    "extensions": ["t38"]
  },
  "image/tiff": {
    "source": "iana",
    "compressible": false,
    "extensions": ["tif","tiff"]
  },
  "image/tiff-fx": {
    "source": "iana",
    "extensions": ["tfx"]
  },
  "image/vnd.adobe.photoshop": {
    "source": "iana",
    "compressible": true,
    "extensions": ["psd"]
  },
  "image/vnd.airzip.accelerator.azv": {
    "source": "iana",
    "extensions": ["azv"]
  },
  "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",
    "extensions": ["ico"]
  },
  "image/vnd.mix": {
    "source": "iana"
  },
  "image/vnd.mozilla.apng": {
    "source": "iana"
  },
  "image/vnd.ms-dds": {
    "extensions": ["dds"]
  },
  "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.pco.b16": {
    "source": "iana",
    "extensions": ["b16"]
  },
  "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",
    "extensions": ["tap"]
  },
  "image/vnd.valve.source.texture": {
    "source": "iana",
    "extensions": ["vtf"]
  },
  "image/vnd.wap.wbmp": {
    "source": "iana",
    "extensions": ["wbmp"]
  },
  "image/vnd.xiff": {
    "source": "iana",
    "extensions": ["xif"]
  },
  "image/vnd.zbrush.pcx": {
    "source": "iana",
    "extensions": ["pcx"]
  },
  "image/webp": {
    "source": "apache",
    "extensions": ["webp"]
  },
  "image/wmf": {
    "source": "iana",
    "extensions": ["wmf"]
  },
  "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",
    "extensions": ["3mf"]
  },
  "model/e57": {
    "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/mtl": {
    "source": "iana",
    "extensions": ["mtl"]
  },
  "model/obj": {
    "source": "iana",
    "extensions": ["obj"]
  },
  "model/step+zip": {
    "source": "iana",
    "compressible": false,
    "extensions": ["stpz"]
  },
  "model/step-xml+zip": {
    "source": "iana",
    "compressible": false,
    "extensions": ["stpxz"]
  },
  "model/stl": {
    "source": "iana",
    "extensions": ["stl"]
  },
  "model/vnd.collada+xml": {
    "source": "iana",
    "compressible": true,
    "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",
    "compressible": true
  },
  "model/vnd.mts": {
    "source": "iana",
    "extensions": ["mts"]
  },
  "model/vnd.opengex": {
    "source": "iana",
    "extensions": ["ogex"]
  },
  "model/vnd.parasolid.transmit.binary": {
    "source": "iana",
    "extensions": ["x_b"]
  },
  "model/vnd.parasolid.transmit.text": {
    "source": "iana",
    "extensions": ["x_t"]
  },
  "model/vnd.pytha.pyox": {
    "source": "iana"
  },
  "model/vnd.rosette.annotated-data-model": {
    "source": "iana"
  },
  "model/vnd.sap.vds": {
    "source": "iana",
    "extensions": ["vds"]
  },
  "model/vnd.usdz+zip": {
    "source": "iana",
    "compressible": false,
    "extensions": ["usdz"]
  },
  "model/vnd.valve.source.compiled-map": {
    "source": "iana",
    "extensions": ["bsp"]
  },
  "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",
    "extensions": ["x3db"]
  },
  "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",
    "extensions": ["x3dv"]
  },
  "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"
  },
  "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/cql": {
    "source": "iana"
  },
  "text/cql-expression": {
    "source": "iana"
  },
  "text/cql-identifier": {
    "source": "iana"
  },
  "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/fhirpath": {
    "source": "iana"
  },
  "text/flexfec": {
    "source": "iana"
  },
  "text/fwdred": {
    "source": "iana"
  },
  "text/gff3": {
    "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": {
    "compressible": true,
    "extensions": ["less"]
  },
  "text/markdown": {
    "source": "iana",
    "compressible": true,
    "extensions": ["markdown","md"]
  },
  "text/mathml": {
    "source": "nginx",
    "extensions": ["mml"]
  },
  "text/mdx": {
    "compressible": true,
    "extensions": ["mdx"]
  },
  "text/mizar": {
    "source": "iana"
  },
  "text/n3": {
    "source": "iana",
    "charset": "UTF-8",
    "compressible": true,
    "extensions": ["n3"]
  },
  "text/parameters": {
    "source": "iana",
    "charset": "UTF-8"
  },
  "text/parityfec": {
    "source": "iana"
  },
  "text/plain": {
    "source": "iana",
    "compressible": true,
    "extensions": ["txt","text","conf","def","list","log","in","ini"]
  },
  "text/provenance-notation": {
    "source": "iana",
    "charset": "UTF-8"
  },
  "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/shaclc": {
    "source": "iana"
  },
  "text/shex": {
    "source": "iana",
    "extensions": ["shex"]
  },
  "text/slim": {
    "extensions": ["slim","slm"]
  },
  "text/spdx": {
    "source": "iana",
    "extensions": ["spdx"]
  },
  "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",
    "charset": "UTF-8",
    "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",
    "charset": "UTF-8"
  },
  "text/vnd.dmclientscript": {
    "source": "iana"
  },
  "text/vnd.dvb.subtitle": {
    "source": "iana",
    "extensions": ["sub"]
  },
  "text/vnd.esmertec.theme-descriptor": {
    "source": "iana",
    "charset": "UTF-8"
  },
  "text/vnd.ficlab.flt": {
    "source": "iana"
  },
  "text/vnd.fly": {
    "source": "iana",
    "extensions": ["fly"]
  },
  "text/vnd.fmi.flexstor": {
    "source": "iana",
    "extensions": ["flx"]
  },
  "text/vnd.gml": {
    "source": "iana"
  },
  "text/vnd.graphviz": {
    "source": "iana",
    "extensions": ["gv"]
  },
  "text/vnd.hans": {
    "source": "iana"
  },
  "text/vnd.hgl": {
    "source": "iana"
  },
  "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.senx.warpscript": {
    "source": "iana"
  },
  "text/vnd.si.uricatalogue": {
    "source": "iana"
  },
  "text/vnd.sosi": {
    "source": "iana"
  },
  "text/vnd.sun.j2me.app-descriptor": {
    "source": "iana",
    "charset": "UTF-8",
    "extensions": ["jad"]
  },
  "text/vnd.trolltech.linguist": {
    "source": "iana",
    "charset": "UTF-8"
  },
  "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": {
    "source": "iana",
    "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": {
    "compressible": true,
    "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/av1": {
    "source": "iana"
  },
  "video/bmpeg": {
    "source": "iana"
  },
  "video/bt656": {
    "source": "iana"
  },
  "video/celb": {
    "source": "iana"
  },
  "video/dv": {
    "source": "iana"
  },
  "video/encaprtp": {
    "source": "iana"
  },
  "video/ffv1": {
    "source": "iana"
  },
  "video/flexfec": {
    "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",
    "extensions": ["m4s"]
  },
  "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/scip": {
    "source": "iana"
  },
  "video/smpte291": {
    "source": "iana"
  },
  "video/smpte292m": {
    "source": "iana"
  },
  "video/ulpfec": {
    "source": "iana"
  },
  "video/vc1": {
    "source": "iana"
  },
  "video/vc2": {
    "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/vnd.youtube.yt": {
    "source": "iana"
  },
  "video/vp8": {
    "source": "iana"
  },
  "video/vp9": {
    "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
  }
}`);
const extensions = new Map();
const types = new Map();
function populateMaps(extensions, types) {
    const preference = [
        "nginx",
        "apache",
        undefined,
        "iana"
    ];
    for (const type of Object.keys(db)){
        const mime = db[type];
        const exts = mime.extensions;
        if (!exts || !exts.length) {
            continue;
        }
        extensions.set(type, exts);
        for (const ext of exts){
            const current = types.get(ext);
            if (current) {
                const from = preference.indexOf(db[current].source);
                const to = preference.indexOf(mime.source);
                if (current !== "application/octet-stream" && (from > to || from === to && current.substr(0, 12) === "application/")) {
                    continue;
                }
            }
            types.set(ext, type);
        }
    }
}
populateMaps(extensions, types);
function lookup1(path) {
    const extension = extname2("x." + path).toLowerCase().substr(1);
    return types.get(extension);
}
var reservedWords = {
    3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
    5: "class enum extends super const export import",
    6: "enum",
    strict: "implements interface let package private protected public static yield",
    strictBind: "eval arguments"
};
var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
var keywords = {
    5: ecma5AndLessKeywords,
    "5module": ecma5AndLessKeywords + " export import",
    6: ecma5AndLessKeywords + " const class extends export import super"
};
var keywordRelationalOperator = /^in(stanceof)?$/;
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u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F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
var astralIdentifierStartCodes = [
    0,
    11,
    2,
    25,
    2,
    18,
    2,
    1,
    2,
    14,
    3,
    13,
    35,
    122,
    70,
    52,
    268,
    28,
    4,
    48,
    48,
    31,
    14,
    29,
    6,
    37,
    11,
    29,
    3,
    35,
    5,
    7,
    2,
    4,
    43,
    157,
    19,
    35,
    5,
    35,
    5,
    39,
    9,
    51,
    157,
    310,
    10,
    21,
    11,
    7,
    153,
    5,
    3,
    0,
    2,
    43,
    2,
    1,
    4,
    0,
    3,
    22,
    11,
    22,
    10,
    30,
    66,
    18,
    2,
    1,
    11,
    21,
    11,
    25,
    71,
    55,
    7,
    1,
    65,
    0,
    16,
    3,
    2,
    2,
    2,
    28,
    43,
    28,
    4,
    28,
    36,
    7,
    2,
    27,
    28,
    53,
    11,
    21,
    11,
    18,
    14,
    17,
    111,
    72,
    56,
    50,
    14,
    50,
    14,
    35,
    349,
    41,
    7,
    1,
    79,
    28,
    11,
    0,
    9,
    21,
    107,
    20,
    28,
    22,
    13,
    52,
    76,
    44,
    33,
    24,
    27,
    35,
    30,
    0,
    3,
    0,
    9,
    34,
    4,
    0,
    13,
    47,
    15,
    3,
    22,
    0,
    2,
    0,
    36,
    17,
    2,
    24,
    85,
    6,
    2,
    0,
    2,
    3,
    2,
    14,
    2,
    9,
    8,
    46,
    39,
    7,
    3,
    1,
    3,
    21,
    2,
    6,
    2,
    1,
    2,
    4,
    4,
    0,
    19,
    0,
    13,
    4,
    159,
    52,
    19,
    3,
    21,
    2,
    31,
    47,
    21,
    1,
    2,
    0,
    185,
    46,
    42,
    3,
    37,
    47,
    21,
    0,
    60,
    42,
    14,
    0,
    72,
    26,
    230,
    43,
    117,
    63,
    32,
    7,
    3,
    0,
    3,
    7,
    2,
    1,
    2,
    23,
    16,
    0,
    2,
    0,
    95,
    7,
    3,
    38,
    17,
    0,
    2,
    0,
    29,
    0,
    11,
    39,
    8,
    0,
    22,
    0,
    12,
    45,
    20,
    0,
    35,
    56,
    264,
    8,
    2,
    36,
    18,
    0,
    50,
    29,
    113,
    6,
    2,
    1,
    2,
    37,
    22,
    0,
    26,
    5,
    2,
    1,
    2,
    31,
    15,
    0,
    328,
    18,
    190,
    0,
    80,
    921,
    103,
    110,
    18,
    195,
    2749,
    1070,
    4050,
    582,
    8634,
    568,
    8,
    30,
    114,
    29,
    19,
    47,
    17,
    3,
    32,
    20,
    6,
    18,
    689,
    63,
    129,
    74,
    6,
    0,
    67,
    12,
    65,
    1,
    2,
    0,
    29,
    6135,
    9,
    1237,
    43,
    8,
    8952,
    286,
    50,
    2,
    18,
    3,
    9,
    395,
    2309,
    106,
    6,
    12,
    4,
    8,
    8,
    9,
    5991,
    84,
    2,
    70,
    2,
    1,
    3,
    0,
    3,
    1,
    3,
    3,
    2,
    11,
    2,
    0,
    2,
    6,
    2,
    64,
    2,
    3,
    3,
    7,
    2,
    6,
    2,
    27,
    2,
    3,
    2,
    4,
    2,
    0,
    4,
    6,
    2,
    339,
    3,
    24,
    2,
    24,
    2,
    30,
    2,
    24,
    2,
    30,
    2,
    24,
    2,
    30,
    2,
    24,
    2,
    30,
    2,
    24,
    2,
    7,
    2357,
    44,
    11,
    6,
    17,
    0,
    370,
    43,
    1301,
    196,
    60,
    67,
    8,
    0,
    1205,
    3,
    2,
    26,
    2,
    1,
    2,
    0,
    3,
    0,
    2,
    9,
    2,
    3,
    2,
    0,
    2,
    0,
    7,
    0,
    5,
    0,
    2,
    0,
    2,
    0,
    2,
    2,
    2,
    1,
    2,
    0,
    3,
    0,
    2,
    0,
    2,
    0,
    2,
    0,
    2,
    0,
    2,
    1,
    2,
    0,
    3,
    3,
    2,
    6,
    2,
    3,
    2,
    3,
    2,
    0,
    2,
    9,
    2,
    16,
    6,
    2,
    2,
    4,
    2,
    16,
    4421,
    42717,
    35,
    4148,
    12,
    221,
    3,
    5761,
    15,
    7472,
    3104,
    541,
    1507,
    4938
];
var astralIdentifierCodes = [
    509,
    0,
    227,
    0,
    150,
    4,
    294,
    9,
    1368,
    2,
    2,
    1,
    6,
    3,
    41,
    2,
    5,
    0,
    166,
    1,
    574,
    3,
    9,
    9,
    370,
    1,
    154,
    10,
    176,
    2,
    54,
    14,
    32,
    9,
    16,
    3,
    46,
    10,
    54,
    9,
    7,
    2,
    37,
    13,
    2,
    9,
    6,
    1,
    45,
    0,
    13,
    2,
    49,
    13,
    9,
    3,
    2,
    11,
    83,
    11,
    7,
    0,
    161,
    11,
    6,
    9,
    7,
    3,
    56,
    1,
    2,
    6,
    3,
    1,
    3,
    2,
    10,
    0,
    11,
    1,
    3,
    6,
    4,
    4,
    193,
    17,
    10,
    9,
    5,
    0,
    82,
    19,
    13,
    9,
    214,
    6,
    3,
    8,
    28,
    1,
    83,
    16,
    16,
    9,
    82,
    12,
    9,
    9,
    84,
    14,
    5,
    9,
    243,
    14,
    166,
    9,
    71,
    5,
    2,
    1,
    3,
    3,
    2,
    0,
    2,
    1,
    13,
    9,
    120,
    6,
    3,
    6,
    4,
    0,
    29,
    9,
    41,
    6,
    2,
    3,
    9,
    0,
    10,
    10,
    47,
    15,
    406,
    7,
    2,
    7,
    17,
    9,
    57,
    21,
    2,
    13,
    123,
    5,
    4,
    0,
    2,
    1,
    2,
    6,
    2,
    0,
    9,
    9,
    49,
    4,
    2,
    1,
    2,
    4,
    9,
    9,
    330,
    3,
    19306,
    9,
    135,
    4,
    60,
    6,
    26,
    9,
    1014,
    0,
    2,
    54,
    8,
    3,
    82,
    0,
    12,
    1,
    19628,
    1,
    5319,
    4,
    4,
    5,
    9,
    7,
    3,
    6,
    31,
    3,
    149,
    2,
    1418,
    49,
    513,
    54,
    5,
    49,
    9,
    0,
    15,
    0,
    23,
    4,
    2,
    14,
    1361,
    6,
    2,
    16,
    3,
    6,
    2,
    1,
    2,
    4,
    262,
    6,
    10,
    9,
    419,
    13,
    1495,
    6,
    110,
    6,
    6,
    9,
    4759,
    9,
    787719,
    239
];
function isInAstralSet(code, set) {
    var pos = 65536;
    for(var i1 = 0; i1 < set.length; i1 += 2){
        pos += set[i1];
        if (pos > code) {
            return false;
        }
        pos += set[i1 + 1];
        if (pos >= code) {
            return true;
        }
    }
}
function isIdentifierStart(code, astral) {
    if (code < 65) {
        return code === 36;
    }
    if (code < 91) {
        return true;
    }
    if (code < 97) {
        return code === 95;
    }
    if (code < 123) {
        return true;
    }
    if (code <= 65535) {
        return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
    }
    if (astral === false) {
        return false;
    }
    return isInAstralSet(code, astralIdentifierStartCodes);
}
function isIdentifierChar(code, astral) {
    if (code < 48) {
        return code === 36;
    }
    if (code < 58) {
        return true;
    }
    if (code < 65) {
        return false;
    }
    if (code < 91) {
        return true;
    }
    if (code < 97) {
        return code === 95;
    }
    if (code < 123) {
        return true;
    }
    if (code <= 65535) {
        return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
    }
    if (astral === false) {
        return false;
    }
    return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
}
var TokenType = function TokenType2(label, conf) {
    if (conf === void 0) conf = {};
    this.label = label;
    this.keyword = conf.keyword;
    this.beforeExpr = !!conf.beforeExpr;
    this.startsExpr = !!conf.startsExpr;
    this.isLoop = !!conf.isLoop;
    this.isAssign = !!conf.isAssign;
    this.prefix = !!conf.prefix;
    this.postfix = !!conf.postfix;
    this.binop = conf.binop || null;
    this.updateContext = null;
};
function binop(name, prec) {
    return new TokenType(name, {
        beforeExpr: true,
        binop: prec
    });
}
var beforeExpr = {
    beforeExpr: true
}, startsExpr = {
    startsExpr: true
};
var keywords$1 = {};
function kw(name, options) {
    if (options === void 0) options = {};
    options.keyword = name;
    return keywords$1[name] = new TokenType(name, options);
}
var types1 = {
    num: new TokenType("num", startsExpr),
    regexp: new TokenType("regexp", startsExpr),
    string: new TokenType("string", startsExpr),
    name: new TokenType("name", startsExpr),
    eof: new TokenType("eof"),
    bracketL: new TokenType("[", {
        beforeExpr: true,
        startsExpr: true
    }),
    bracketR: new TokenType("]"),
    braceL: new TokenType("{", {
        beforeExpr: true,
        startsExpr: true
    }),
    braceR: new TokenType("}"),
    parenL: new TokenType("(", {
        beforeExpr: true,
        startsExpr: true
    }),
    parenR: new TokenType(")"),
    comma: new TokenType(",", beforeExpr),
    semi: new TokenType(";", beforeExpr),
    colon: new TokenType(":", beforeExpr),
    dot: new TokenType("."),
    question: new TokenType("?", beforeExpr),
    questionDot: new TokenType("?."),
    arrow: new TokenType("=>", beforeExpr),
    template: new TokenType("template"),
    invalidTemplate: new TokenType("invalidTemplate"),
    ellipsis: new TokenType("...", beforeExpr),
    backQuote: new TokenType("`", startsExpr),
    dollarBraceL: new TokenType("${", {
        beforeExpr: true,
        startsExpr: true
    }),
    eq: new TokenType("=", {
        beforeExpr: true,
        isAssign: true
    }),
    assign: new TokenType("_=", {
        beforeExpr: true,
        isAssign: true
    }),
    incDec: new TokenType("++/--", {
        prefix: true,
        postfix: true,
        startsExpr: true
    }),
    prefix: new TokenType("!/~", {
        beforeExpr: true,
        prefix: true,
        startsExpr: true
    }),
    logicalOR: binop("||", 1),
    logicalAND: binop("&&", 2),
    bitwiseOR: binop("|", 3),
    bitwiseXOR: binop("^", 4),
    bitwiseAND: binop("&", 5),
    equality: binop("==/!=/===/!==", 6),
    relational: binop("</>/<=/>=", 7),
    bitShift: binop("<</>>/>>>", 8),
    plusMin: new TokenType("+/-", {
        beforeExpr: true,
        binop: 9,
        prefix: true,
        startsExpr: true
    }),
    modulo: binop("%", 10),
    star: binop("*", 10),
    slash: binop("/", 10),
    starstar: new TokenType("**", {
        beforeExpr: true
    }),
    coalesce: binop("??", 1),
    _break: kw("break"),
    _case: kw("case", beforeExpr),
    _catch: kw("catch"),
    _continue: kw("continue"),
    _debugger: kw("debugger"),
    _default: kw("default", beforeExpr),
    _do: kw("do", {
        isLoop: true,
        beforeExpr: true
    }),
    _else: kw("else", beforeExpr),
    _finally: kw("finally"),
    _for: kw("for", {
        isLoop: true
    }),
    _function: kw("function", startsExpr),
    _if: kw("if"),
    _return: kw("return", beforeExpr),
    _switch: kw("switch"),
    _throw: kw("throw", beforeExpr),
    _try: kw("try"),
    _var: kw("var"),
    _const: kw("const"),
    _while: kw("while", {
        isLoop: true
    }),
    _with: kw("with"),
    _new: kw("new", {
        beforeExpr: true,
        startsExpr: true
    }),
    _this: kw("this", startsExpr),
    _super: kw("super", startsExpr),
    _class: kw("class", startsExpr),
    _extends: kw("extends", beforeExpr),
    _export: kw("export"),
    _import: kw("import", startsExpr),
    _null: kw("null", startsExpr),
    _true: kw("true", startsExpr),
    _false: kw("false", startsExpr),
    _in: kw("in", {
        beforeExpr: true,
        binop: 7
    }),
    _instanceof: kw("instanceof", {
        beforeExpr: true,
        binop: 7
    }),
    _typeof: kw("typeof", {
        beforeExpr: true,
        prefix: true,
        startsExpr: true
    }),
    _void: kw("void", {
        beforeExpr: true,
        prefix: true,
        startsExpr: true
    }),
    _delete: kw("delete", {
        beforeExpr: true,
        prefix: true,
        startsExpr: true
    })
};
var lineBreak = /\r\n?|\n|\u2028|\u2029/;
var lineBreakG = new RegExp(lineBreak.source, "g");
function isNewLine(code, ecma2019String) {
    return code === 10 || code === 13 || !ecma2019String && (code === 8232 || code === 8233);
}
var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
var ref = Object.prototype;
var hasOwnProperty15 = ref.hasOwnProperty;
var toString2 = ref.toString;
function has(obj, propName) {
    return hasOwnProperty15.call(obj, propName);
}
var isArray1 = Array.isArray || function(obj) {
    return toString2.call(obj) === "[object Array]";
};
function wordsRegexp(words) {
    return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
}
var Position = function Position2(line, col) {
    this.line = line;
    this.column = col;
};
Position.prototype.offset = function offset(n) {
    return new Position(this.line, this.column + n);
};
var SourceLocation = function SourceLocation2(p, start, end) {
    this.start = start;
    this.end = end;
    if (p.sourceFile !== null) {
        this.source = p.sourceFile;
    }
};
function getLineInfo(input, offset2) {
    for(var line = 1, cur = 0;;){
        lineBreakG.lastIndex = cur;
        var match = lineBreakG.exec(input);
        if (match && match.index < offset2) {
            ++line;
            cur = match.index + match[0].length;
        } else {
            return new Position(line, offset2 - cur);
        }
    }
}
var defaultOptions = {
    ecmaVersion: 10,
    sourceType: "script",
    onInsertedSemicolon: null,
    onTrailingComma: null,
    allowReserved: null,
    allowReturnOutsideFunction: false,
    allowImportExportEverywhere: false,
    allowAwaitOutsideFunction: false,
    allowHashBang: false,
    locations: false,
    onToken: null,
    onComment: null,
    ranges: false,
    program: null,
    sourceFile: null,
    directSourceFile: null,
    preserveParens: false
};
function getOptions(opts) {
    var options = {};
    for(var opt in defaultOptions){
        options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt];
    }
    if (options.ecmaVersion >= 2015) {
        options.ecmaVersion -= 2009;
    }
    if (options.allowReserved == null) {
        options.allowReserved = options.ecmaVersion < 5;
    }
    if (isArray1(options.onToken)) {
        var tokens = options.onToken;
        options.onToken = function(token) {
            return tokens.push(token);
        };
    }
    if (isArray1(options.onComment)) {
        options.onComment = pushComment(options, options.onComment);
    }
    return options;
}
function pushComment(options, array) {
    return function(block, text, start, end, startLoc, endLoc) {
        var comment = {
            type: block ? "Block" : "Line",
            value: text,
            start,
            end
        };
        if (options.locations) {
            comment.loc = new SourceLocation(this, startLoc, endLoc);
        }
        if (options.ranges) {
            comment.range = [
                start,
                end
            ];
        }
        array.push(comment);
    };
}
var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128;
function functionFlags(async, generator) {
    return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
}
var BIND_NONE = 0, BIND_VAR = 1, BIND_LEXICAL = 2, BIND_FUNCTION = 3, BIND_SIMPLE_CATCH = 4, BIND_OUTSIDE = 5;
var Parser = function Parser2(options, input, startPos) {
    this.options = options = getOptions(options);
    this.sourceFile = options.sourceFile;
    this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
    var reserved = "";
    if (options.allowReserved !== true) {
        for(var v = options.ecmaVersion;; v--){
            if (reserved = reservedWords[v]) {
                break;
            }
        }
        if (options.sourceType === "module") {
            reserved += " await";
        }
    }
    this.reservedWords = wordsRegexp(reserved);
    var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
    this.reservedWordsStrict = wordsRegexp(reservedStrict);
    this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
    this.input = String(input);
    this.containsEsc = false;
    if (startPos) {
        this.pos = startPos;
        this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
        this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
    } else {
        this.pos = this.lineStart = 0;
        this.curLine = 1;
    }
    this.type = types1.eof;
    this.value = null;
    this.start = this.end = this.pos;
    this.startLoc = this.endLoc = this.curPosition();
    this.lastTokEndLoc = this.lastTokStartLoc = null;
    this.lastTokStart = this.lastTokEnd = this.pos;
    this.context = this.initialContext();
    this.exprAllowed = true;
    this.inModule = options.sourceType === "module";
    this.strict = this.inModule || this.strictDirective(this.pos);
    this.potentialArrowAt = -1;
    this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
    this.labels = [];
    this.undefinedExports = {};
    if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
        this.skipLineComment(2);
    }
    this.scopeStack = [];
    this.enterScope(SCOPE_TOP);
    this.regexpState = null;
};
var prototypeAccessors = {
    inFunction: {
        configurable: true
    },
    inGenerator: {
        configurable: true
    },
    inAsync: {
        configurable: true
    },
    allowSuper: {
        configurable: true
    },
    allowDirectSuper: {
        configurable: true
    },
    treatFunctionsAsVar: {
        configurable: true
    }
};
Parser.prototype.parse = function parse() {
    var node = this.options.program || this.startNode();
    this.nextToken();
    return this.parseTopLevel(node);
};
prototypeAccessors.inFunction.get = function() {
    return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
};
prototypeAccessors.inGenerator.get = function() {
    return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
};
prototypeAccessors.inAsync.get = function() {
    return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
};
prototypeAccessors.allowSuper.get = function() {
    return (this.currentThisScope().flags & SCOPE_SUPER) > 0;
};
prototypeAccessors.allowDirectSuper.get = function() {
    return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
};
prototypeAccessors.treatFunctionsAsVar.get = function() {
    return this.treatFunctionsAsVarInScope(this.currentScope());
};
Parser.prototype.inNonArrowFunction = function inNonArrowFunction() {
    return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;
};
Parser.extend = function extend() {
    var plugins = [], len = arguments.length;
    while(len--)plugins[len] = arguments[len];
    var cls = this;
    for(var i1 = 0; i1 < plugins.length; i1++){
        cls = plugins[i1](cls);
    }
    return cls;
};
Parser.parse = function parse2(input, options) {
    return new this(options, input).parse();
};
Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) {
    var parser = new this(options, input, pos);
    parser.nextToken();
    return parser.parseExpression();
};
Parser.tokenizer = function tokenizer(input, options) {
    return new this(options, input);
};
Object.defineProperties(Parser.prototype, prototypeAccessors);
var pp = Parser.prototype;
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
pp.strictDirective = function(start) {
    for(;;){
        skipWhiteSpace.lastIndex = start;
        start += skipWhiteSpace.exec(this.input)[0].length;
        var match = literal.exec(this.input.slice(start));
        if (!match) {
            return false;
        }
        if ((match[1] || match[2]) === "use strict") {
            skipWhiteSpace.lastIndex = start + match[0].length;
            var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
            var next = this.input.charAt(end);
            return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
        }
        start += match[0].length;
        skipWhiteSpace.lastIndex = start;
        start += skipWhiteSpace.exec(this.input)[0].length;
        if (this.input[start] === ";") {
            start++;
        }
    }
};
pp.eat = function(type) {
    if (this.type === type) {
        this.next();
        return true;
    } else {
        return false;
    }
};
pp.isContextual = function(name) {
    return this.type === types1.name && this.value === name && !this.containsEsc;
};
pp.eatContextual = function(name) {
    if (!this.isContextual(name)) {
        return false;
    }
    this.next();
    return true;
};
pp.expectContextual = function(name) {
    if (!this.eatContextual(name)) {
        this.unexpected();
    }
};
pp.canInsertSemicolon = function() {
    return this.type === types1.eof || this.type === types1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
};
pp.insertSemicolon = function() {
    if (this.canInsertSemicolon()) {
        if (this.options.onInsertedSemicolon) {
            this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
        }
        return true;
    }
};
pp.semicolon = function() {
    if (!this.eat(types1.semi) && !this.insertSemicolon()) {
        this.unexpected();
    }
};
pp.afterTrailingComma = function(tokType, notNext) {
    if (this.type === tokType) {
        if (this.options.onTrailingComma) {
            this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
        }
        if (!notNext) {
            this.next();
        }
        return true;
    }
};
pp.expect = function(type) {
    this.eat(type) || this.unexpected();
};
pp.unexpected = function(pos) {
    this.raise(pos != null ? pos : this.start, "Unexpected token");
};
function DestructuringErrors() {
    this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
}
pp.checkPatternErrors = function(refDestructuringErrors, isAssign) {
    if (!refDestructuringErrors) {
        return;
    }
    if (refDestructuringErrors.trailingComma > -1) {
        this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
    }
    var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
    if (parens > -1) {
        this.raiseRecoverable(parens, "Parenthesized pattern");
    }
};
pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
    if (!refDestructuringErrors) {
        return false;
    }
    var shorthandAssign = refDestructuringErrors.shorthandAssign;
    var doubleProto = refDestructuringErrors.doubleProto;
    if (!andThrow) {
        return shorthandAssign >= 0 || doubleProto >= 0;
    }
    if (shorthandAssign >= 0) {
        this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
    }
    if (doubleProto >= 0) {
        this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
    }
};
pp.checkYieldAwaitInDefaultParams = function() {
    if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
        this.raise(this.yieldPos, "Yield expression cannot be a default value");
    }
    if (this.awaitPos) {
        this.raise(this.awaitPos, "Await expression cannot be a default value");
    }
};
pp.isSimpleAssignTarget = function(expr) {
    if (expr.type === "ParenthesizedExpression") {
        return this.isSimpleAssignTarget(expr.expression);
    }
    return expr.type === "Identifier" || expr.type === "MemberExpression";
};
var pp$1 = Parser.prototype;
pp$1.parseTopLevel = function(node) {
    var exports = {};
    if (!node.body) {
        node.body = [];
    }
    while(this.type !== types1.eof){
        var stmt = this.parseStatement(null, true, exports);
        node.body.push(stmt);
    }
    if (this.inModule) {
        for(var i1 = 0, list = Object.keys(this.undefinedExports); i1 < list.length; i1 += 1){
            var name = list[i1];
            this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
        }
    }
    this.adaptDirectivePrologue(node.body);
    this.next();
    node.sourceType = this.options.sourceType;
    return this.finishNode(node, "Program");
};
var loopLabel = {
    kind: "loop"
}, switchLabel = {
    kind: "switch"
};
pp$1.isLet = function(context) {
    if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
        return false;
    }
    skipWhiteSpace.lastIndex = this.pos;
    var skip = skipWhiteSpace.exec(this.input);
    var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
    if (nextCh === 91) {
        return true;
    }
    if (context) {
        return false;
    }
    if (nextCh === 123) {
        return true;
    }
    if (isIdentifierStart(nextCh, true)) {
        var pos = next + 1;
        while(isIdentifierChar(this.input.charCodeAt(pos), true)){
            ++pos;
        }
        var ident = this.input.slice(next, pos);
        if (!keywordRelationalOperator.test(ident)) {
            return true;
        }
    }
    return false;
};
pp$1.isAsyncFunction = function() {
    if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
        return false;
    }
    skipWhiteSpace.lastIndex = this.pos;
    var skip = skipWhiteSpace.exec(this.input);
    var next = this.pos + skip[0].length;
    return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8)));
};
pp$1.parseStatement = function(context, topLevel, exports) {
    var starttype = this.type, node = this.startNode(), kind;
    if (this.isLet(context)) {
        starttype = types1._var;
        kind = "let";
    }
    switch(starttype){
        case types1._break:
        case types1._continue:
            return this.parseBreakContinueStatement(node, starttype.keyword);
        case types1._debugger:
            return this.parseDebuggerStatement(node);
        case types1._do:
            return this.parseDoStatement(node);
        case types1._for:
            return this.parseForStatement(node);
        case types1._function:
            if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
                this.unexpected();
            }
            return this.parseFunctionStatement(node, false, !context);
        case types1._class:
            if (context) {
                this.unexpected();
            }
            return this.parseClass(node, true);
        case types1._if:
            return this.parseIfStatement(node);
        case types1._return:
            return this.parseReturnStatement(node);
        case types1._switch:
            return this.parseSwitchStatement(node);
        case types1._throw:
            return this.parseThrowStatement(node);
        case types1._try:
            return this.parseTryStatement(node);
        case types1._const:
        case types1._var:
            kind = kind || this.value;
            if (context && kind !== "var") {
                this.unexpected();
            }
            return this.parseVarStatement(node, kind);
        case types1._while:
            return this.parseWhileStatement(node);
        case types1._with:
            return this.parseWithStatement(node);
        case types1.braceL:
            return this.parseBlock(true, node);
        case types1.semi:
            return this.parseEmptyStatement(node);
        case types1._export:
        case types1._import:
            if (this.options.ecmaVersion > 10 && starttype === types1._import) {
                skipWhiteSpace.lastIndex = this.pos;
                var skip = skipWhiteSpace.exec(this.input);
                var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
                if (nextCh === 40 || nextCh === 46) {
                    return this.parseExpressionStatement(node, this.parseExpression());
                }
            }
            if (!this.options.allowImportExportEverywhere) {
                if (!topLevel) {
                    this.raise(this.start, "'import' and 'export' may only appear at the top level");
                }
                if (!this.inModule) {
                    this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
                }
            }
            return starttype === types1._import ? this.parseImport(node) : this.parseExport(node, exports);
        default:
            if (this.isAsyncFunction()) {
                if (context) {
                    this.unexpected();
                }
                this.next();
                return this.parseFunctionStatement(node, true, !context);
            }
            var maybeName = this.value, expr = this.parseExpression();
            if (starttype === types1.name && expr.type === "Identifier" && this.eat(types1.colon)) {
                return this.parseLabeledStatement(node, maybeName, expr, context);
            } else {
                return this.parseExpressionStatement(node, expr);
            }
    }
};
pp$1.parseBreakContinueStatement = function(node, keyword) {
    var isBreak = keyword === "break";
    this.next();
    if (this.eat(types1.semi) || this.insertSemicolon()) {
        node.label = null;
    } else if (this.type !== types1.name) {
        this.unexpected();
    } else {
        node.label = this.parseIdent();
        this.semicolon();
    }
    var i1 = 0;
    for(; i1 < this.labels.length; ++i1){
        var lab = this.labels[i1];
        if (node.label == null || lab.name === node.label.name) {
            if (lab.kind != null && (isBreak || lab.kind === "loop")) {
                break;
            }
            if (node.label && isBreak) {
                break;
            }
        }
    }
    if (i1 === this.labels.length) {
        this.raise(node.start, "Unsyntactic " + keyword);
    }
    return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
};
pp$1.parseDebuggerStatement = function(node) {
    this.next();
    this.semicolon();
    return this.finishNode(node, "DebuggerStatement");
};
pp$1.parseDoStatement = function(node) {
    this.next();
    this.labels.push(loopLabel);
    node.body = this.parseStatement("do");
    this.labels.pop();
    this.expect(types1._while);
    node.test = this.parseParenExpression();
    if (this.options.ecmaVersion >= 6) {
        this.eat(types1.semi);
    } else {
        this.semicolon();
    }
    return this.finishNode(node, "DoWhileStatement");
};
pp$1.parseForStatement = function(node) {
    this.next();
    var awaitAt = this.options.ecmaVersion >= 9 && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await") ? this.lastTokStart : -1;
    this.labels.push(loopLabel);
    this.enterScope(0);
    this.expect(types1.parenL);
    if (this.type === types1.semi) {
        if (awaitAt > -1) {
            this.unexpected(awaitAt);
        }
        return this.parseFor(node, null);
    }
    var isLet = this.isLet();
    if (this.type === types1._var || this.type === types1._const || isLet) {
        var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
        this.next();
        this.parseVar(init$1, true, kind);
        this.finishNode(init$1, "VariableDeclaration");
        if ((this.type === types1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
            if (this.options.ecmaVersion >= 9) {
                if (this.type === types1._in) {
                    if (awaitAt > -1) {
                        this.unexpected(awaitAt);
                    }
                } else {
                    node.await = awaitAt > -1;
                }
            }
            return this.parseForIn(node, init$1);
        }
        if (awaitAt > -1) {
            this.unexpected(awaitAt);
        }
        return this.parseFor(node, init$1);
    }
    var refDestructuringErrors = new DestructuringErrors();
    var init = this.parseExpression(true, refDestructuringErrors);
    if (this.type === types1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
        if (this.options.ecmaVersion >= 9) {
            if (this.type === types1._in) {
                if (awaitAt > -1) {
                    this.unexpected(awaitAt);
                }
            } else {
                node.await = awaitAt > -1;
            }
        }
        this.toAssignable(init, false, refDestructuringErrors);
        this.checkLVal(init);
        return this.parseForIn(node, init);
    } else {
        this.checkExpressionErrors(refDestructuringErrors, true);
    }
    if (awaitAt > -1) {
        this.unexpected(awaitAt);
    }
    return this.parseFor(node, init);
};
pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) {
    this.next();
    return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
};
pp$1.parseIfStatement = function(node) {
    this.next();
    node.test = this.parseParenExpression();
    node.consequent = this.parseStatement("if");
    node.alternate = this.eat(types1._else) ? this.parseStatement("if") : null;
    return this.finishNode(node, "IfStatement");
};
pp$1.parseReturnStatement = function(node) {
    if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
        this.raise(this.start, "'return' outside of function");
    }
    this.next();
    if (this.eat(types1.semi) || this.insertSemicolon()) {
        node.argument = null;
    } else {
        node.argument = this.parseExpression();
        this.semicolon();
    }
    return this.finishNode(node, "ReturnStatement");
};
pp$1.parseSwitchStatement = function(node) {
    this.next();
    node.discriminant = this.parseParenExpression();
    node.cases = [];
    this.expect(types1.braceL);
    this.labels.push(switchLabel);
    this.enterScope(0);
    var cur;
    for(var sawDefault = false; this.type !== types1.braceR;){
        if (this.type === types1._case || this.type === types1._default) {
            var isCase = this.type === types1._case;
            if (cur) {
                this.finishNode(cur, "SwitchCase");
            }
            node.cases.push(cur = this.startNode());
            cur.consequent = [];
            this.next();
            if (isCase) {
                cur.test = this.parseExpression();
            } else {
                if (sawDefault) {
                    this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
                }
                sawDefault = true;
                cur.test = null;
            }
            this.expect(types1.colon);
        } else {
            if (!cur) {
                this.unexpected();
            }
            cur.consequent.push(this.parseStatement(null));
        }
    }
    this.exitScope();
    if (cur) {
        this.finishNode(cur, "SwitchCase");
    }
    this.next();
    this.labels.pop();
    return this.finishNode(node, "SwitchStatement");
};
pp$1.parseThrowStatement = function(node) {
    this.next();
    if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
        this.raise(this.lastTokEnd, "Illegal newline after throw");
    }
    node.argument = this.parseExpression();
    this.semicolon();
    return this.finishNode(node, "ThrowStatement");
};
var empty = [];
pp$1.parseTryStatement = function(node) {
    this.next();
    node.block = this.parseBlock();
    node.handler = null;
    if (this.type === types1._catch) {
        var clause = this.startNode();
        this.next();
        if (this.eat(types1.parenL)) {
            clause.param = this.parseBindingAtom();
            var simple = clause.param.type === "Identifier";
            this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
            this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
            this.expect(types1.parenR);
        } else {
            if (this.options.ecmaVersion < 10) {
                this.unexpected();
            }
            clause.param = null;
            this.enterScope(0);
        }
        clause.body = this.parseBlock(false);
        this.exitScope();
        node.handler = this.finishNode(clause, "CatchClause");
    }
    node.finalizer = this.eat(types1._finally) ? this.parseBlock() : null;
    if (!node.handler && !node.finalizer) {
        this.raise(node.start, "Missing catch or finally clause");
    }
    return this.finishNode(node, "TryStatement");
};
pp$1.parseVarStatement = function(node, kind) {
    this.next();
    this.parseVar(node, false, kind);
    this.semicolon();
    return this.finishNode(node, "VariableDeclaration");
};
pp$1.parseWhileStatement = function(node) {
    this.next();
    node.test = this.parseParenExpression();
    this.labels.push(loopLabel);
    node.body = this.parseStatement("while");
    this.labels.pop();
    return this.finishNode(node, "WhileStatement");
};
pp$1.parseWithStatement = function(node) {
    if (this.strict) {
        this.raise(this.start, "'with' in strict mode");
    }
    this.next();
    node.object = this.parseParenExpression();
    node.body = this.parseStatement("with");
    return this.finishNode(node, "WithStatement");
};
pp$1.parseEmptyStatement = function(node) {
    this.next();
    return this.finishNode(node, "EmptyStatement");
};
pp$1.parseLabeledStatement = function(node, maybeName, expr, context) {
    for(var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1){
        var label = list[i$1];
        if (label.name === maybeName) {
            this.raise(expr.start, "Label '" + maybeName + "' is already declared");
        }
    }
    var kind = this.type.isLoop ? "loop" : this.type === types1._switch ? "switch" : null;
    for(var i1 = this.labels.length - 1; i1 >= 0; i1--){
        var label$1 = this.labels[i1];
        if (label$1.statementStart === node.start) {
            label$1.statementStart = this.start;
            label$1.kind = kind;
        } else {
            break;
        }
    }
    this.labels.push({
        name: maybeName,
        kind,
        statementStart: this.start
    });
    node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
    this.labels.pop();
    node.label = expr;
    return this.finishNode(node, "LabeledStatement");
};
pp$1.parseExpressionStatement = function(node, expr) {
    node.expression = expr;
    this.semicolon();
    return this.finishNode(node, "ExpressionStatement");
};
pp$1.parseBlock = function(createNewLexicalScope, node, exitStrict) {
    if (createNewLexicalScope === void 0) createNewLexicalScope = true;
    if (node === void 0) node = this.startNode();
    node.body = [];
    this.expect(types1.braceL);
    if (createNewLexicalScope) {
        this.enterScope(0);
    }
    while(this.type !== types1.braceR){
        var stmt = this.parseStatement(null);
        node.body.push(stmt);
    }
    if (exitStrict) {
        this.strict = false;
    }
    this.next();
    if (createNewLexicalScope) {
        this.exitScope();
    }
    return this.finishNode(node, "BlockStatement");
};
pp$1.parseFor = function(node, init) {
    node.init = init;
    this.expect(types1.semi);
    node.test = this.type === types1.semi ? null : this.parseExpression();
    this.expect(types1.semi);
    node.update = this.type === types1.parenR ? null : this.parseExpression();
    this.expect(types1.parenR);
    node.body = this.parseStatement("for");
    this.exitScope();
    this.labels.pop();
    return this.finishNode(node, "ForStatement");
};
pp$1.parseForIn = function(node, init) {
    var isForIn = this.type === types1._in;
    this.next();
    if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
        this.raise(init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer");
    } else if (init.type === "AssignmentPattern") {
        this.raise(init.start, "Invalid left-hand side in for-loop");
    }
    node.left = init;
    node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
    this.expect(types1.parenR);
    node.body = this.parseStatement("for");
    this.exitScope();
    this.labels.pop();
    return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
};
pp$1.parseVar = function(node, isFor, kind) {
    node.declarations = [];
    node.kind = kind;
    for(;;){
        var decl = this.startNode();
        this.parseVarId(decl, kind);
        if (this.eat(types1.eq)) {
            decl.init = this.parseMaybeAssign(isFor);
        } else if (kind === "const" && !(this.type === types1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
            this.unexpected();
        } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types1._in || this.isContextual("of")))) {
            this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
        } else {
            decl.init = null;
        }
        node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
        if (!this.eat(types1.comma)) {
            break;
        }
    }
    return node;
};
pp$1.parseVarId = function(decl, kind) {
    decl.id = this.parseBindingAtom();
    this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
};
var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) {
    this.initFunction(node);
    if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
        if (this.type === types1.star && statement & FUNC_HANGING_STATEMENT) {
            this.unexpected();
        }
        node.generator = this.eat(types1.star);
    }
    if (this.options.ecmaVersion >= 8) {
        node.async = !!isAsync;
    }
    if (statement & FUNC_STATEMENT) {
        node.id = statement & FUNC_NULLABLE_ID && this.type !== types1.name ? null : this.parseIdent();
        if (node.id && !(statement & FUNC_HANGING_STATEMENT)) {
            this.checkLVal(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);
        }
    }
    var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
    this.yieldPos = 0;
    this.awaitPos = 0;
    this.awaitIdentPos = 0;
    this.enterScope(functionFlags(node.async, node.generator));
    if (!(statement & FUNC_STATEMENT)) {
        node.id = this.type === types1.name ? this.parseIdent() : null;
    }
    this.parseFunctionParams(node);
    this.parseFunctionBody(node, allowExpressionBody, false);
    this.yieldPos = oldYieldPos;
    this.awaitPos = oldAwaitPos;
    this.awaitIdentPos = oldAwaitIdentPos;
    return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
};
pp$1.parseFunctionParams = function(node) {
    this.expect(types1.parenL);
    node.params = this.parseBindingList(types1.parenR, false, this.options.ecmaVersion >= 8);
    this.checkYieldAwaitInDefaultParams();
};
pp$1.parseClass = function(node, isStatement) {
    this.next();
    var oldStrict = this.strict;
    this.strict = true;
    this.parseClassId(node, isStatement);
    this.parseClassSuper(node);
    var classBody = this.startNode();
    var hadConstructor = false;
    classBody.body = [];
    this.expect(types1.braceL);
    while(this.type !== types1.braceR){
        var element = this.parseClassElement(node.superClass !== null);
        if (element) {
            classBody.body.push(element);
            if (element.type === "MethodDefinition" && element.kind === "constructor") {
                if (hadConstructor) {
                    this.raise(element.start, "Duplicate constructor in the same class");
                }
                hadConstructor = true;
            }
        }
    }
    this.strict = oldStrict;
    this.next();
    node.body = this.finishNode(classBody, "ClassBody");
    return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
};
pp$1.parseClassElement = function(constructorAllowsSuper) {
    var this$1 = this;
    if (this.eat(types1.semi)) {
        return null;
    }
    var method = this.startNode();
    var tryContextual = function(k, noLineBreak) {
        if (noLineBreak === void 0) noLineBreak = false;
        var start = this$1.start, startLoc = this$1.startLoc;
        if (!this$1.eatContextual(k)) {
            return false;
        }
        if (this$1.type !== types1.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) {
            return true;
        }
        if (method.key) {
            this$1.unexpected();
        }
        method.computed = false;
        method.key = this$1.startNodeAt(start, startLoc);
        method.key.name = k;
        this$1.finishNode(method.key, "Identifier");
        return false;
    };
    method.kind = "method";
    method.static = tryContextual("static");
    var isGenerator = this.eat(types1.star);
    var isAsync = false;
    if (!isGenerator) {
        if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) {
            isAsync = true;
            isGenerator = this.options.ecmaVersion >= 9 && this.eat(types1.star);
        } else if (tryContextual("get")) {
            method.kind = "get";
        } else if (tryContextual("set")) {
            method.kind = "set";
        }
    }
    if (!method.key) {
        this.parsePropertyName(method);
    }
    var key = method.key;
    var allowsDirectSuper = false;
    if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) {
        if (method.kind !== "method") {
            this.raise(key.start, "Constructor can't have get/set modifier");
        }
        if (isGenerator) {
            this.raise(key.start, "Constructor can't be a generator");
        }
        if (isAsync) {
            this.raise(key.start, "Constructor can't be an async method");
        }
        method.kind = "constructor";
        allowsDirectSuper = constructorAllowsSuper;
    } else if (method.static && key.type === "Identifier" && key.name === "prototype") {
        this.raise(key.start, "Classes may not have a static property named prototype");
    }
    this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper);
    if (method.kind === "get" && method.value.params.length !== 0) {
        this.raiseRecoverable(method.value.start, "getter should have no params");
    }
    if (method.kind === "set" && method.value.params.length !== 1) {
        this.raiseRecoverable(method.value.start, "setter should have exactly one param");
    }
    if (method.kind === "set" && method.value.params[0].type === "RestElement") {
        this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params");
    }
    return method;
};
pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
    method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
    return this.finishNode(method, "MethodDefinition");
};
pp$1.parseClassId = function(node, isStatement) {
    if (this.type === types1.name) {
        node.id = this.parseIdent();
        if (isStatement) {
            this.checkLVal(node.id, BIND_LEXICAL, false);
        }
    } else {
        if (isStatement === true) {
            this.unexpected();
        }
        node.id = null;
    }
};
pp$1.parseClassSuper = function(node) {
    node.superClass = this.eat(types1._extends) ? this.parseExprSubscripts() : null;
};
pp$1.parseExport = function(node, exports) {
    this.next();
    if (this.eat(types1.star)) {
        if (this.options.ecmaVersion >= 11) {
            if (this.eatContextual("as")) {
                node.exported = this.parseIdent(true);
                this.checkExport(exports, node.exported.name, this.lastTokStart);
            } else {
                node.exported = null;
            }
        }
        this.expectContextual("from");
        if (this.type !== types1.string) {
            this.unexpected();
        }
        node.source = this.parseExprAtom();
        this.semicolon();
        return this.finishNode(node, "ExportAllDeclaration");
    }
    if (this.eat(types1._default)) {
        this.checkExport(exports, "default", this.lastTokStart);
        var isAsync;
        if (this.type === types1._function || (isAsync = this.isAsyncFunction())) {
            var fNode = this.startNode();
            this.next();
            if (isAsync) {
                this.next();
            }
            node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
        } else if (this.type === types1._class) {
            var cNode = this.startNode();
            node.declaration = this.parseClass(cNode, "nullableID");
        } else {
            node.declaration = this.parseMaybeAssign();
            this.semicolon();
        }
        return this.finishNode(node, "ExportDefaultDeclaration");
    }
    if (this.shouldParseExportStatement()) {
        node.declaration = this.parseStatement(null);
        if (node.declaration.type === "VariableDeclaration") {
            this.checkVariableExport(exports, node.declaration.declarations);
        } else {
            this.checkExport(exports, node.declaration.id.name, node.declaration.id.start);
        }
        node.specifiers = [];
        node.source = null;
    } else {
        node.declaration = null;
        node.specifiers = this.parseExportSpecifiers(exports);
        if (this.eatContextual("from")) {
            if (this.type !== types1.string) {
                this.unexpected();
            }
            node.source = this.parseExprAtom();
        } else {
            for(var i1 = 0, list = node.specifiers; i1 < list.length; i1 += 1){
                var spec = list[i1];
                this.checkUnreserved(spec.local);
                this.checkLocalExport(spec.local);
            }
            node.source = null;
        }
        this.semicolon();
    }
    return this.finishNode(node, "ExportNamedDeclaration");
};
pp$1.checkExport = function(exports, name, pos) {
    if (!exports) {
        return;
    }
    if (has(exports, name)) {
        this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
    }
    exports[name] = true;
};
pp$1.checkPatternExport = function(exports, pat) {
    var type = pat.type;
    if (type === "Identifier") {
        this.checkExport(exports, pat.name, pat.start);
    } else if (type === "ObjectPattern") {
        for(var i1 = 0, list = pat.properties; i1 < list.length; i1 += 1){
            var prop = list[i1];
            this.checkPatternExport(exports, prop);
        }
    } else if (type === "ArrayPattern") {
        for(var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1){
            var elt = list$1[i$1];
            if (elt) {
                this.checkPatternExport(exports, elt);
            }
        }
    } else if (type === "Property") {
        this.checkPatternExport(exports, pat.value);
    } else if (type === "AssignmentPattern") {
        this.checkPatternExport(exports, pat.left);
    } else if (type === "RestElement") {
        this.checkPatternExport(exports, pat.argument);
    } else if (type === "ParenthesizedExpression") {
        this.checkPatternExport(exports, pat.expression);
    }
};
pp$1.checkVariableExport = function(exports, decls) {
    if (!exports) {
        return;
    }
    for(var i1 = 0, list = decls; i1 < list.length; i1 += 1){
        var decl = list[i1];
        this.checkPatternExport(exports, decl.id);
    }
};
pp$1.shouldParseExportStatement = function() {
    return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
};
pp$1.parseExportSpecifiers = function(exports) {
    var nodes = [], first = true;
    this.expect(types1.braceL);
    while(!this.eat(types1.braceR)){
        if (!first) {
            this.expect(types1.comma);
            if (this.afterTrailingComma(types1.braceR)) {
                break;
            }
        } else {
            first = false;
        }
        var node = this.startNode();
        node.local = this.parseIdent(true);
        node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local;
        this.checkExport(exports, node.exported.name, node.exported.start);
        nodes.push(this.finishNode(node, "ExportSpecifier"));
    }
    return nodes;
};
pp$1.parseImport = function(node) {
    this.next();
    if (this.type === types1.string) {
        node.specifiers = empty;
        node.source = this.parseExprAtom();
    } else {
        node.specifiers = this.parseImportSpecifiers();
        this.expectContextual("from");
        node.source = this.type === types1.string ? this.parseExprAtom() : this.unexpected();
    }
    this.semicolon();
    return this.finishNode(node, "ImportDeclaration");
};
pp$1.parseImportSpecifiers = function() {
    var nodes = [], first = true;
    if (this.type === types1.name) {
        var node = this.startNode();
        node.local = this.parseIdent();
        this.checkLVal(node.local, BIND_LEXICAL);
        nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
        if (!this.eat(types1.comma)) {
            return nodes;
        }
    }
    if (this.type === types1.star) {
        var node$1 = this.startNode();
        this.next();
        this.expectContextual("as");
        node$1.local = this.parseIdent();
        this.checkLVal(node$1.local, BIND_LEXICAL);
        nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
        return nodes;
    }
    this.expect(types1.braceL);
    while(!this.eat(types1.braceR)){
        if (!first) {
            this.expect(types1.comma);
            if (this.afterTrailingComma(types1.braceR)) {
                break;
            }
        } else {
            first = false;
        }
        var node$2 = this.startNode();
        node$2.imported = this.parseIdent(true);
        if (this.eatContextual("as")) {
            node$2.local = this.parseIdent();
        } else {
            this.checkUnreserved(node$2.imported);
            node$2.local = node$2.imported;
        }
        this.checkLVal(node$2.local, BIND_LEXICAL);
        nodes.push(this.finishNode(node$2, "ImportSpecifier"));
    }
    return nodes;
};
pp$1.adaptDirectivePrologue = function(statements) {
    for(var i1 = 0; i1 < statements.length && this.isDirectiveCandidate(statements[i1]); ++i1){
        statements[i1].directive = statements[i1].expression.raw.slice(1, -1);
    }
};
pp$1.isDirectiveCandidate = function(statement) {
    return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (this.input[statement.start] === '"' || this.input[statement.start] === "'");
};
var pp$2 = Parser.prototype;
pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) {
    if (this.options.ecmaVersion >= 6 && node) {
        switch(node.type){
            case "Identifier":
                if (this.inAsync && node.name === "await") {
                    this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
                }
                break;
            case "ObjectPattern":
            case "ArrayPattern":
            case "RestElement":
                break;
            case "ObjectExpression":
                node.type = "ObjectPattern";
                if (refDestructuringErrors) {
                    this.checkPatternErrors(refDestructuringErrors, true);
                }
                for(var i1 = 0, list = node.properties; i1 < list.length; i1 += 1){
                    var prop = list[i1];
                    this.toAssignable(prop, isBinding);
                    if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
                        this.raise(prop.argument.start, "Unexpected token");
                    }
                }
                break;
            case "Property":
                if (node.kind !== "init") {
                    this.raise(node.key.start, "Object pattern can't contain getter or setter");
                }
                this.toAssignable(node.value, isBinding);
                break;
            case "ArrayExpression":
                node.type = "ArrayPattern";
                if (refDestructuringErrors) {
                    this.checkPatternErrors(refDestructuringErrors, true);
                }
                this.toAssignableList(node.elements, isBinding);
                break;
            case "SpreadElement":
                node.type = "RestElement";
                this.toAssignable(node.argument, isBinding);
                if (node.argument.type === "AssignmentPattern") {
                    this.raise(node.argument.start, "Rest elements cannot have a default value");
                }
                break;
            case "AssignmentExpression":
                if (node.operator !== "=") {
                    this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
                }
                node.type = "AssignmentPattern";
                delete node.operator;
                this.toAssignable(node.left, isBinding);
            case "AssignmentPattern":
                break;
            case "ParenthesizedExpression":
                this.toAssignable(node.expression, isBinding, refDestructuringErrors);
                break;
            case "ChainExpression":
                this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
                break;
            case "MemberExpression":
                if (!isBinding) {
                    break;
                }
            default:
                this.raise(node.start, "Assigning to rvalue");
        }
    } else if (refDestructuringErrors) {
        this.checkPatternErrors(refDestructuringErrors, true);
    }
    return node;
};
pp$2.toAssignableList = function(exprList, isBinding) {
    var end = exprList.length;
    for(var i1 = 0; i1 < end; i1++){
        var elt = exprList[i1];
        if (elt) {
            this.toAssignable(elt, isBinding);
        }
    }
    if (end) {
        var last = exprList[end - 1];
        if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
            this.unexpected(last.argument.start);
        }
    }
    return exprList;
};
pp$2.parseSpread = function(refDestructuringErrors) {
    var node = this.startNode();
    this.next();
    node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
    return this.finishNode(node, "SpreadElement");
};
pp$2.parseRestBinding = function() {
    var node = this.startNode();
    this.next();
    if (this.options.ecmaVersion === 6 && this.type !== types1.name) {
        this.unexpected();
    }
    node.argument = this.parseBindingAtom();
    return this.finishNode(node, "RestElement");
};
pp$2.parseBindingAtom = function() {
    if (this.options.ecmaVersion >= 6) {
        switch(this.type){
            case types1.bracketL:
                var node = this.startNode();
                this.next();
                node.elements = this.parseBindingList(types1.bracketR, true, true);
                return this.finishNode(node, "ArrayPattern");
            case types1.braceL:
                return this.parseObj(true);
        }
    }
    return this.parseIdent();
};
pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
    var elts = [], first = true;
    while(!this.eat(close)){
        if (first) {
            first = false;
        } else {
            this.expect(types1.comma);
        }
        if (allowEmpty && this.type === types1.comma) {
            elts.push(null);
        } else if (allowTrailingComma && this.afterTrailingComma(close)) {
            break;
        } else if (this.type === types1.ellipsis) {
            var rest = this.parseRestBinding();
            this.parseBindingListItem(rest);
            elts.push(rest);
            if (this.type === types1.comma) {
                this.raise(this.start, "Comma is not permitted after the rest element");
            }
            this.expect(close);
            break;
        } else {
            var elem = this.parseMaybeDefault(this.start, this.startLoc);
            this.parseBindingListItem(elem);
            elts.push(elem);
        }
    }
    return elts;
};
pp$2.parseBindingListItem = function(param) {
    return param;
};
pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
    left = left || this.parseBindingAtom();
    if (this.options.ecmaVersion < 6 || !this.eat(types1.eq)) {
        return left;
    }
    var node = this.startNodeAt(startPos, startLoc);
    node.left = left;
    node.right = this.parseMaybeAssign();
    return this.finishNode(node, "AssignmentPattern");
};
pp$2.checkLVal = function(expr, bindingType, checkClashes) {
    if (bindingType === void 0) bindingType = BIND_NONE;
    switch(expr.type){
        case "Identifier":
            if (bindingType === BIND_LEXICAL && expr.name === "let") {
                this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
            }
            if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
                this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
            }
            if (checkClashes) {
                if (has(checkClashes, expr.name)) {
                    this.raiseRecoverable(expr.start, "Argument name clash");
                }
                checkClashes[expr.name] = true;
            }
            if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) {
                this.declareName(expr.name, bindingType, expr.start);
            }
            break;
        case "ChainExpression":
            this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
            break;
        case "MemberExpression":
            if (bindingType) {
                this.raiseRecoverable(expr.start, "Binding member expression");
            }
            break;
        case "ObjectPattern":
            for(var i1 = 0, list = expr.properties; i1 < list.length; i1 += 1){
                var prop = list[i1];
                this.checkLVal(prop, bindingType, checkClashes);
            }
            break;
        case "Property":
            this.checkLVal(expr.value, bindingType, checkClashes);
            break;
        case "ArrayPattern":
            for(var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1){
                var elem = list$1[i$1];
                if (elem) {
                    this.checkLVal(elem, bindingType, checkClashes);
                }
            }
            break;
        case "AssignmentPattern":
            this.checkLVal(expr.left, bindingType, checkClashes);
            break;
        case "RestElement":
            this.checkLVal(expr.argument, bindingType, checkClashes);
            break;
        case "ParenthesizedExpression":
            this.checkLVal(expr.expression, bindingType, checkClashes);
            break;
        default:
            this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue");
    }
};
var pp$3 = Parser.prototype;
pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) {
    if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
        return;
    }
    if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
        return;
    }
    var key = prop.key;
    var name;
    switch(key.type){
        case "Identifier":
            name = key.name;
            break;
        case "Literal":
            name = String(key.value);
            break;
        default:
            return;
    }
    var kind = prop.kind;
    if (this.options.ecmaVersion >= 6) {
        if (name === "__proto__" && kind === "init") {
            if (propHash.proto) {
                if (refDestructuringErrors) {
                    if (refDestructuringErrors.doubleProto < 0) {
                        refDestructuringErrors.doubleProto = key.start;
                    }
                } else {
                    this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
                }
            }
            propHash.proto = true;
        }
        return;
    }
    name = "$" + name;
    var other = propHash[name];
    if (other) {
        var redefinition;
        if (kind === "init") {
            redefinition = this.strict && other.init || other.get || other.set;
        } else {
            redefinition = other.init || other[kind];
        }
        if (redefinition) {
            this.raiseRecoverable(key.start, "Redefinition of property");
        }
    } else {
        other = propHash[name] = {
            init: false,
            get: false,
            set: false
        };
    }
    other[kind] = true;
};
pp$3.parseExpression = function(noIn, refDestructuringErrors) {
    var startPos = this.start, startLoc = this.startLoc;
    var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);
    if (this.type === types1.comma) {
        var node = this.startNodeAt(startPos, startLoc);
        node.expressions = [
            expr
        ];
        while(this.eat(types1.comma)){
            node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors));
        }
        return this.finishNode(node, "SequenceExpression");
    }
    return expr;
};
pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
    if (this.isContextual("yield")) {
        if (this.inGenerator) {
            return this.parseYield(noIn);
        } else {
            this.exprAllowed = false;
        }
    }
    var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1;
    if (refDestructuringErrors) {
        oldParenAssign = refDestructuringErrors.parenthesizedAssign;
        oldTrailingComma = refDestructuringErrors.trailingComma;
        refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
    } else {
        refDestructuringErrors = new DestructuringErrors();
        ownDestructuringErrors = true;
    }
    var startPos = this.start, startLoc = this.startLoc;
    if (this.type === types1.parenL || this.type === types1.name) {
        this.potentialArrowAt = this.start;
    }
    var left = this.parseMaybeConditional(noIn, refDestructuringErrors);
    if (afterLeftParse) {
        left = afterLeftParse.call(this, left, startPos, startLoc);
    }
    if (this.type.isAssign) {
        var node = this.startNodeAt(startPos, startLoc);
        node.operator = this.value;
        node.left = this.type === types1.eq ? this.toAssignable(left, false, refDestructuringErrors) : left;
        if (!ownDestructuringErrors) {
            refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
        }
        if (refDestructuringErrors.shorthandAssign >= node.left.start) {
            refDestructuringErrors.shorthandAssign = -1;
        }
        this.checkLVal(left);
        this.next();
        node.right = this.parseMaybeAssign(noIn);
        return this.finishNode(node, "AssignmentExpression");
    } else {
        if (ownDestructuringErrors) {
            this.checkExpressionErrors(refDestructuringErrors, true);
        }
    }
    if (oldParenAssign > -1) {
        refDestructuringErrors.parenthesizedAssign = oldParenAssign;
    }
    if (oldTrailingComma > -1) {
        refDestructuringErrors.trailingComma = oldTrailingComma;
    }
    return left;
};
pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) {
    var startPos = this.start, startLoc = this.startLoc;
    var expr = this.parseExprOps(noIn, refDestructuringErrors);
    if (this.checkExpressionErrors(refDestructuringErrors)) {
        return expr;
    }
    if (this.eat(types1.question)) {
        var node = this.startNodeAt(startPos, startLoc);
        node.test = expr;
        node.consequent = this.parseMaybeAssign();
        this.expect(types1.colon);
        node.alternate = this.parseMaybeAssign(noIn);
        return this.finishNode(node, "ConditionalExpression");
    }
    return expr;
};
pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
    var startPos = this.start, startLoc = this.startLoc;
    var expr = this.parseMaybeUnary(refDestructuringErrors, false);
    if (this.checkExpressionErrors(refDestructuringErrors)) {
        return expr;
    }
    return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn);
};
pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
    var prec = this.type.binop;
    if (prec != null && (!noIn || this.type !== types1._in)) {
        if (prec > minPrec) {
            var logical = this.type === types1.logicalOR || this.type === types1.logicalAND;
            var coalesce = this.type === types1.coalesce;
            if (coalesce) {
                prec = types1.logicalAND.binop;
            }
            var op = this.value;
            this.next();
            var startPos = this.start, startLoc = this.startLoc;
            var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);
            var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
            if (logical && this.type === types1.coalesce || coalesce && (this.type === types1.logicalOR || this.type === types1.logicalAND)) {
                this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
            }
            return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
        }
    }
    return left;
};
pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
    var node = this.startNodeAt(startPos, startLoc);
    node.left = left;
    node.operator = op;
    node.right = right;
    return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
};
pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
    var startPos = this.start, startLoc = this.startLoc, expr;
    if (this.isContextual("await") && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction)) {
        expr = this.parseAwait();
        sawUnary = true;
    } else if (this.type.prefix) {
        var node = this.startNode(), update = this.type === types1.incDec;
        node.operator = this.value;
        node.prefix = true;
        this.next();
        node.argument = this.parseMaybeUnary(null, true);
        this.checkExpressionErrors(refDestructuringErrors, true);
        if (update) {
            this.checkLVal(node.argument);
        } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
            this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
        } else {
            sawUnary = true;
        }
        expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
    } else {
        expr = this.parseExprSubscripts(refDestructuringErrors);
        if (this.checkExpressionErrors(refDestructuringErrors)) {
            return expr;
        }
        while(this.type.postfix && !this.canInsertSemicolon()){
            var node$1 = this.startNodeAt(startPos, startLoc);
            node$1.operator = this.value;
            node$1.prefix = false;
            node$1.argument = expr;
            this.checkLVal(expr);
            this.next();
            expr = this.finishNode(node$1, "UpdateExpression");
        }
    }
    if (!sawUnary && this.eat(types1.starstar)) {
        return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false);
    } else {
        return expr;
    }
};
pp$3.parseExprSubscripts = function(refDestructuringErrors) {
    var startPos = this.start, startLoc = this.startLoc;
    var expr = this.parseExprAtom(refDestructuringErrors);
    if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
        return expr;
    }
    var result1 = this.parseSubscripts(expr, startPos, startLoc);
    if (refDestructuringErrors && result1.type === "MemberExpression") {
        if (refDestructuringErrors.parenthesizedAssign >= result1.start) {
            refDestructuringErrors.parenthesizedAssign = -1;
        }
        if (refDestructuringErrors.parenthesizedBind >= result1.start) {
            refDestructuringErrors.parenthesizedBind = -1;
        }
    }
    return result1;
};
pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
    var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start;
    var optionalChained = false;
    while(true){
        var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained);
        if (element.optional) {
            optionalChained = true;
        }
        if (element === base || element.type === "ArrowFunctionExpression") {
            if (optionalChained) {
                var chainNode = this.startNodeAt(startPos, startLoc);
                chainNode.expression = element;
                element = this.finishNode(chainNode, "ChainExpression");
            }
            return element;
        }
        base = element;
    }
};
pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained) {
    var optionalSupported = this.options.ecmaVersion >= 11;
    var optional = optionalSupported && this.eat(types1.questionDot);
    if (noCalls && optional) {
        this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
    }
    var computed = this.eat(types1.bracketL);
    if (computed || optional && this.type !== types1.parenL && this.type !== types1.backQuote || this.eat(types1.dot)) {
        var node = this.startNodeAt(startPos, startLoc);
        node.object = base;
        node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never");
        node.computed = !!computed;
        if (computed) {
            this.expect(types1.bracketR);
        }
        if (optionalSupported) {
            node.optional = optional;
        }
        base = this.finishNode(node, "MemberExpression");
    } else if (!noCalls && this.eat(types1.parenL)) {
        var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
        this.yieldPos = 0;
        this.awaitPos = 0;
        this.awaitIdentPos = 0;
        var exprList = this.parseExprList(types1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
        if (maybeAsyncArrow && !optional && !this.canInsertSemicolon() && this.eat(types1.arrow)) {
            this.checkPatternErrors(refDestructuringErrors, false);
            this.checkYieldAwaitInDefaultParams();
            if (this.awaitIdentPos > 0) {
                this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
            }
            this.yieldPos = oldYieldPos;
            this.awaitPos = oldAwaitPos;
            this.awaitIdentPos = oldAwaitIdentPos;
            return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true);
        }
        this.checkExpressionErrors(refDestructuringErrors, true);
        this.yieldPos = oldYieldPos || this.yieldPos;
        this.awaitPos = oldAwaitPos || this.awaitPos;
        this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
        var node$1 = this.startNodeAt(startPos, startLoc);
        node$1.callee = base;
        node$1.arguments = exprList;
        if (optionalSupported) {
            node$1.optional = optional;
        }
        base = this.finishNode(node$1, "CallExpression");
    } else if (this.type === types1.backQuote) {
        if (optional || optionalChained) {
            this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
        }
        var node$2 = this.startNodeAt(startPos, startLoc);
        node$2.tag = base;
        node$2.quasi = this.parseTemplate({
            isTagged: true
        });
        base = this.finishNode(node$2, "TaggedTemplateExpression");
    }
    return base;
};
pp$3.parseExprAtom = function(refDestructuringErrors) {
    if (this.type === types1.slash) {
        this.readRegexp();
    }
    var node, canBeArrow = this.potentialArrowAt === this.start;
    switch(this.type){
        case types1._super:
            if (!this.allowSuper) {
                this.raise(this.start, "'super' keyword outside a method");
            }
            node = this.startNode();
            this.next();
            if (this.type === types1.parenL && !this.allowDirectSuper) {
                this.raise(node.start, "super() call outside constructor of a subclass");
            }
            if (this.type !== types1.dot && this.type !== types1.bracketL && this.type !== types1.parenL) {
                this.unexpected();
            }
            return this.finishNode(node, "Super");
        case types1._this:
            node = this.startNode();
            this.next();
            return this.finishNode(node, "ThisExpression");
        case types1.name:
            var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
            var id = this.parseIdent(false);
            if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types1._function)) {
                return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true);
            }
            if (canBeArrow && !this.canInsertSemicolon()) {
                if (this.eat(types1.arrow)) {
                    return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [
                        id
                    ], false);
                }
                if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types1.name && !containsEsc) {
                    id = this.parseIdent(false);
                    if (this.canInsertSemicolon() || !this.eat(types1.arrow)) {
                        this.unexpected();
                    }
                    return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [
                        id
                    ], true);
                }
            }
            return id;
        case types1.regexp:
            var value = this.value;
            node = this.parseLiteral(value.value);
            node.regex = {
                pattern: value.pattern,
                flags: value.flags
            };
            return node;
        case types1.num:
        case types1.string:
            return this.parseLiteral(this.value);
        case types1._null:
        case types1._true:
        case types1._false:
            node = this.startNode();
            node.value = this.type === types1._null ? null : this.type === types1._true;
            node.raw = this.type.keyword;
            this.next();
            return this.finishNode(node, "Literal");
        case types1.parenL:
            var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow);
            if (refDestructuringErrors) {
                if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
                    refDestructuringErrors.parenthesizedAssign = start;
                }
                if (refDestructuringErrors.parenthesizedBind < 0) {
                    refDestructuringErrors.parenthesizedBind = start;
                }
            }
            return expr;
        case types1.bracketL:
            node = this.startNode();
            this.next();
            node.elements = this.parseExprList(types1.bracketR, true, true, refDestructuringErrors);
            return this.finishNode(node, "ArrayExpression");
        case types1.braceL:
            return this.parseObj(false, refDestructuringErrors);
        case types1._function:
            node = this.startNode();
            this.next();
            return this.parseFunction(node, 0);
        case types1._class:
            return this.parseClass(this.startNode(), false);
        case types1._new:
            return this.parseNew();
        case types1.backQuote:
            return this.parseTemplate();
        case types1._import:
            if (this.options.ecmaVersion >= 11) {
                return this.parseExprImport();
            } else {
                return this.unexpected();
            }
        default:
            this.unexpected();
    }
};
pp$3.parseExprImport = function() {
    var node = this.startNode();
    if (this.containsEsc) {
        this.raiseRecoverable(this.start, "Escape sequence in keyword import");
    }
    var meta = this.parseIdent(true);
    switch(this.type){
        case types1.parenL:
            return this.parseDynamicImport(node);
        case types1.dot:
            node.meta = meta;
            return this.parseImportMeta(node);
        default:
            this.unexpected();
    }
};
pp$3.parseDynamicImport = function(node) {
    this.next();
    node.source = this.parseMaybeAssign();
    if (!this.eat(types1.parenR)) {
        var errorPos = this.start;
        if (this.eat(types1.comma) && this.eat(types1.parenR)) {
            this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
        } else {
            this.unexpected(errorPos);
        }
    }
    return this.finishNode(node, "ImportExpression");
};
pp$3.parseImportMeta = function(node) {
    this.next();
    var containsEsc = this.containsEsc;
    node.property = this.parseIdent(true);
    if (node.property.name !== "meta") {
        this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
    }
    if (containsEsc) {
        this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
    }
    if (this.options.sourceType !== "module") {
        this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
    }
    return this.finishNode(node, "MetaProperty");
};
pp$3.parseLiteral = function(value) {
    var node = this.startNode();
    node.value = value;
    node.raw = this.input.slice(this.start, this.end);
    if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
        node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
    }
    this.next();
    return this.finishNode(node, "Literal");
};
pp$3.parseParenExpression = function() {
    this.expect(types1.parenL);
    var val = this.parseExpression();
    this.expect(types1.parenR);
    return val;
};
pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
    var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
    if (this.options.ecmaVersion >= 6) {
        this.next();
        var innerStartPos = this.start, innerStartLoc = this.startLoc;
        var exprList = [], first = true, lastIsComma = false;
        var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
        this.yieldPos = 0;
        this.awaitPos = 0;
        while(this.type !== types1.parenR){
            first ? first = false : this.expect(types1.comma);
            if (allowTrailingComma && this.afterTrailingComma(types1.parenR, true)) {
                lastIsComma = true;
                break;
            } else if (this.type === types1.ellipsis) {
                spreadStart = this.start;
                exprList.push(this.parseParenItem(this.parseRestBinding()));
                if (this.type === types1.comma) {
                    this.raise(this.start, "Comma is not permitted after the rest element");
                }
                break;
            } else {
                exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
            }
        }
        var innerEndPos = this.start, innerEndLoc = this.startLoc;
        this.expect(types1.parenR);
        if (canBeArrow && !this.canInsertSemicolon() && this.eat(types1.arrow)) {
            this.checkPatternErrors(refDestructuringErrors, false);
            this.checkYieldAwaitInDefaultParams();
            this.yieldPos = oldYieldPos;
            this.awaitPos = oldAwaitPos;
            return this.parseParenArrowList(startPos, startLoc, exprList);
        }
        if (!exprList.length || lastIsComma) {
            this.unexpected(this.lastTokStart);
        }
        if (spreadStart) {
            this.unexpected(spreadStart);
        }
        this.checkExpressionErrors(refDestructuringErrors, true);
        this.yieldPos = oldYieldPos || this.yieldPos;
        this.awaitPos = oldAwaitPos || this.awaitPos;
        if (exprList.length > 1) {
            val = this.startNodeAt(innerStartPos, innerStartLoc);
            val.expressions = exprList;
            this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
        } else {
            val = exprList[0];
        }
    } else {
        val = this.parseParenExpression();
    }
    if (this.options.preserveParens) {
        var par = this.startNodeAt(startPos, startLoc);
        par.expression = val;
        return this.finishNode(par, "ParenthesizedExpression");
    } else {
        return val;
    }
};
pp$3.parseParenItem = function(item) {
    return item;
};
pp$3.parseParenArrowList = function(startPos, startLoc, exprList) {
    return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);
};
var empty$1 = [];
pp$3.parseNew = function() {
    if (this.containsEsc) {
        this.raiseRecoverable(this.start, "Escape sequence in keyword new");
    }
    var node = this.startNode();
    var meta = this.parseIdent(true);
    if (this.options.ecmaVersion >= 6 && this.eat(types1.dot)) {
        node.meta = meta;
        var containsEsc = this.containsEsc;
        node.property = this.parseIdent(true);
        if (node.property.name !== "target") {
            this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
        }
        if (containsEsc) {
            this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
        }
        if (!this.inNonArrowFunction()) {
            this.raiseRecoverable(node.start, "'new.target' can only be used in functions");
        }
        return this.finishNode(node, "MetaProperty");
    }
    var startPos = this.start, startLoc = this.startLoc, isImport = this.type === types1._import;
    node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
    if (isImport && node.callee.type === "ImportExpression") {
        this.raise(startPos, "Cannot use new with import()");
    }
    if (this.eat(types1.parenL)) {
        node.arguments = this.parseExprList(types1.parenR, this.options.ecmaVersion >= 8, false);
    } else {
        node.arguments = empty$1;
    }
    return this.finishNode(node, "NewExpression");
};
pp$3.parseTemplateElement = function(ref2) {
    var isTagged = ref2.isTagged;
    var elem = this.startNode();
    if (this.type === types1.invalidTemplate) {
        if (!isTagged) {
            this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
        }
        elem.value = {
            raw: this.value,
            cooked: null
        };
    } else {
        elem.value = {
            raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
            cooked: this.value
        };
    }
    this.next();
    elem.tail = this.type === types1.backQuote;
    return this.finishNode(elem, "TemplateElement");
};
pp$3.parseTemplate = function(ref2) {
    if (ref2 === void 0) ref2 = {};
    var isTagged = ref2.isTagged;
    if (isTagged === void 0) isTagged = false;
    var node = this.startNode();
    this.next();
    node.expressions = [];
    var curElt = this.parseTemplateElement({
        isTagged
    });
    node.quasis = [
        curElt
    ];
    while(!curElt.tail){
        if (this.type === types1.eof) {
            this.raise(this.pos, "Unterminated template literal");
        }
        this.expect(types1.dollarBraceL);
        node.expressions.push(this.parseExpression());
        this.expect(types1.braceR);
        node.quasis.push(curElt = this.parseTemplateElement({
            isTagged
        }));
    }
    this.next();
    return this.finishNode(node, "TemplateLiteral");
};
pp$3.isAsyncProp = function(prop) {
    return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types1.name || this.type === types1.num || this.type === types1.string || this.type === types1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
};
pp$3.parseObj = function(isPattern, refDestructuringErrors) {
    var node = this.startNode(), first = true, propHash = {};
    node.properties = [];
    this.next();
    while(!this.eat(types1.braceR)){
        if (!first) {
            this.expect(types1.comma);
            if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types1.braceR)) {
                break;
            }
        } else {
            first = false;
        }
        var prop = this.parseProperty(isPattern, refDestructuringErrors);
        if (!isPattern) {
            this.checkPropClash(prop, propHash, refDestructuringErrors);
        }
        node.properties.push(prop);
    }
    return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
};
pp$3.parseProperty = function(isPattern, refDestructuringErrors) {
    var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
    if (this.options.ecmaVersion >= 9 && this.eat(types1.ellipsis)) {
        if (isPattern) {
            prop.argument = this.parseIdent(false);
            if (this.type === types1.comma) {
                this.raise(this.start, "Comma is not permitted after the rest element");
            }
            return this.finishNode(prop, "RestElement");
        }
        if (this.type === types1.parenL && refDestructuringErrors) {
            if (refDestructuringErrors.parenthesizedAssign < 0) {
                refDestructuringErrors.parenthesizedAssign = this.start;
            }
            if (refDestructuringErrors.parenthesizedBind < 0) {
                refDestructuringErrors.parenthesizedBind = this.start;
            }
        }
        prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
        if (this.type === types1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
            refDestructuringErrors.trailingComma = this.start;
        }
        return this.finishNode(prop, "SpreadElement");
    }
    if (this.options.ecmaVersion >= 6) {
        prop.method = false;
        prop.shorthand = false;
        if (isPattern || refDestructuringErrors) {
            startPos = this.start;
            startLoc = this.startLoc;
        }
        if (!isPattern) {
            isGenerator = this.eat(types1.star);
        }
    }
    var containsEsc = this.containsEsc;
    this.parsePropertyName(prop);
    if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
        isAsync = true;
        isGenerator = this.options.ecmaVersion >= 9 && this.eat(types1.star);
        this.parsePropertyName(prop, refDestructuringErrors);
    } else {
        isAsync = false;
    }
    this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
    return this.finishNode(prop, "Property");
};
pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
    if ((isGenerator || isAsync) && this.type === types1.colon) {
        this.unexpected();
    }
    if (this.eat(types1.colon)) {
        prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
        prop.kind = "init";
    } else if (this.options.ecmaVersion >= 6 && this.type === types1.parenL) {
        if (isPattern) {
            this.unexpected();
        }
        prop.kind = "init";
        prop.method = true;
        prop.value = this.parseMethod(isGenerator, isAsync);
    } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type !== types1.comma && this.type !== types1.braceR && this.type !== types1.eq) {
        if (isGenerator || isAsync) {
            this.unexpected();
        }
        prop.kind = prop.key.name;
        this.parsePropertyName(prop);
        prop.value = this.parseMethod(false);
        var paramCount = prop.kind === "get" ? 0 : 1;
        if (prop.value.params.length !== paramCount) {
            var start = prop.value.start;
            if (prop.kind === "get") {
                this.raiseRecoverable(start, "getter should have no params");
            } else {
                this.raiseRecoverable(start, "setter should have exactly one param");
            }
        } else {
            if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
                this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
            }
        }
    } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
        if (isGenerator || isAsync) {
            this.unexpected();
        }
        this.checkUnreserved(prop.key);
        if (prop.key.name === "await" && !this.awaitIdentPos) {
            this.awaitIdentPos = startPos;
        }
        prop.kind = "init";
        if (isPattern) {
            prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
        } else if (this.type === types1.eq && refDestructuringErrors) {
            if (refDestructuringErrors.shorthandAssign < 0) {
                refDestructuringErrors.shorthandAssign = this.start;
            }
            prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
        } else {
            prop.value = prop.key;
        }
        prop.shorthand = true;
    } else {
        this.unexpected();
    }
};
pp$3.parsePropertyName = function(prop) {
    if (this.options.ecmaVersion >= 6) {
        if (this.eat(types1.bracketL)) {
            prop.computed = true;
            prop.key = this.parseMaybeAssign();
            this.expect(types1.bracketR);
            return prop.key;
        } else {
            prop.computed = false;
        }
    }
    return prop.key = this.type === types1.num || this.type === types1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
};
pp$3.initFunction = function(node) {
    node.id = null;
    if (this.options.ecmaVersion >= 6) {
        node.generator = node.expression = false;
    }
    if (this.options.ecmaVersion >= 8) {
        node.async = false;
    }
};
pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
    var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
    this.initFunction(node);
    if (this.options.ecmaVersion >= 6) {
        node.generator = isGenerator;
    }
    if (this.options.ecmaVersion >= 8) {
        node.async = !!isAsync;
    }
    this.yieldPos = 0;
    this.awaitPos = 0;
    this.awaitIdentPos = 0;
    this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
    this.expect(types1.parenL);
    node.params = this.parseBindingList(types1.parenR, false, this.options.ecmaVersion >= 8);
    this.checkYieldAwaitInDefaultParams();
    this.parseFunctionBody(node, false, true);
    this.yieldPos = oldYieldPos;
    this.awaitPos = oldAwaitPos;
    this.awaitIdentPos = oldAwaitIdentPos;
    return this.finishNode(node, "FunctionExpression");
};
pp$3.parseArrowExpression = function(node, params, isAsync) {
    var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
    this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
    this.initFunction(node);
    if (this.options.ecmaVersion >= 8) {
        node.async = !!isAsync;
    }
    this.yieldPos = 0;
    this.awaitPos = 0;
    this.awaitIdentPos = 0;
    node.params = this.toAssignableList(params, true);
    this.parseFunctionBody(node, true, false);
    this.yieldPos = oldYieldPos;
    this.awaitPos = oldAwaitPos;
    this.awaitIdentPos = oldAwaitIdentPos;
    return this.finishNode(node, "ArrowFunctionExpression");
};
pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) {
    var isExpression = isArrowFunction && this.type !== types1.braceL;
    var oldStrict = this.strict, useStrict = false;
    if (isExpression) {
        node.body = this.parseMaybeAssign();
        node.expression = true;
        this.checkParams(node, false);
    } else {
        var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
        if (!oldStrict || nonSimple) {
            useStrict = this.strictDirective(this.end);
            if (useStrict && nonSimple) {
                this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
            }
        }
        var oldLabels = this.labels;
        this.labels = [];
        if (useStrict) {
            this.strict = true;
        }
        this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
        if (this.strict && node.id) {
            this.checkLVal(node.id, BIND_OUTSIDE);
        }
        node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
        node.expression = false;
        this.adaptDirectivePrologue(node.body.body);
        this.labels = oldLabels;
    }
    this.exitScope();
};
pp$3.isSimpleParamList = function(params) {
    for(var i1 = 0, list = params; i1 < list.length; i1 += 1){
        var param = list[i1];
        if (param.type !== "Identifier") {
            return false;
        }
    }
    return true;
};
pp$3.checkParams = function(node, allowDuplicates) {
    var nameHash = {};
    for(var i1 = 0, list = node.params; i1 < list.length; i1 += 1){
        var param = list[i1];
        this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash);
    }
};
pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
    var elts = [], first = true;
    while(!this.eat(close)){
        if (!first) {
            this.expect(types1.comma);
            if (allowTrailingComma && this.afterTrailingComma(close)) {
                break;
            }
        } else {
            first = false;
        }
        var elt = void 0;
        if (allowEmpty && this.type === types1.comma) {
            elt = null;
        } else if (this.type === types1.ellipsis) {
            elt = this.parseSpread(refDestructuringErrors);
            if (refDestructuringErrors && this.type === types1.comma && refDestructuringErrors.trailingComma < 0) {
                refDestructuringErrors.trailingComma = this.start;
            }
        } else {
            elt = this.parseMaybeAssign(false, refDestructuringErrors);
        }
        elts.push(elt);
    }
    return elts;
};
pp$3.checkUnreserved = function(ref2) {
    var start = ref2.start;
    var end = ref2.end;
    var name = ref2.name;
    if (this.inGenerator && name === "yield") {
        this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator");
    }
    if (this.inAsync && name === "await") {
        this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function");
    }
    if (this.keywords.test(name)) {
        this.raise(start, "Unexpected keyword '" + name + "'");
    }
    if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) {
        return;
    }
    var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
    if (re.test(name)) {
        if (!this.inAsync && name === "await") {
            this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function");
        }
        this.raiseRecoverable(start, "The keyword '" + name + "' is reserved");
    }
};
pp$3.parseIdent = function(liberal, isBinding) {
    var node = this.startNode();
    if (this.type === types1.name) {
        node.name = this.value;
    } else if (this.type.keyword) {
        node.name = this.type.keyword;
        if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
            this.context.pop();
        }
    } else {
        this.unexpected();
    }
    this.next(!!liberal);
    this.finishNode(node, "Identifier");
    if (!liberal) {
        this.checkUnreserved(node);
        if (node.name === "await" && !this.awaitIdentPos) {
            this.awaitIdentPos = node.start;
        }
    }
    return node;
};
pp$3.parseYield = function(noIn) {
    if (!this.yieldPos) {
        this.yieldPos = this.start;
    }
    var node = this.startNode();
    this.next();
    if (this.type === types1.semi || this.canInsertSemicolon() || this.type !== types1.star && !this.type.startsExpr) {
        node.delegate = false;
        node.argument = null;
    } else {
        node.delegate = this.eat(types1.star);
        node.argument = this.parseMaybeAssign(noIn);
    }
    return this.finishNode(node, "YieldExpression");
};
pp$3.parseAwait = function() {
    if (!this.awaitPos) {
        this.awaitPos = this.start;
    }
    var node = this.startNode();
    this.next();
    node.argument = this.parseMaybeUnary(null, false);
    return this.finishNode(node, "AwaitExpression");
};
var pp$4 = Parser.prototype;
pp$4.raise = function(pos, message) {
    var loc = getLineInfo(this.input, pos);
    message += " (" + loc.line + ":" + loc.column + ")";
    var err = new SyntaxError(message);
    err.pos = pos;
    err.loc = loc;
    err.raisedAt = this.pos;
    throw err;
};
pp$4.raiseRecoverable = pp$4.raise;
pp$4.curPosition = function() {
    if (this.options.locations) {
        return new Position(this.curLine, this.pos - this.lineStart);
    }
};
var pp$5 = Parser.prototype;
var Scope = function Scope2(flags) {
    this.flags = flags;
    this.var = [];
    this.lexical = [];
    this.functions = [];
};
pp$5.enterScope = function(flags) {
    this.scopeStack.push(new Scope(flags));
};
pp$5.exitScope = function() {
    this.scopeStack.pop();
};
pp$5.treatFunctionsAsVarInScope = function(scope) {
    return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;
};
pp$5.declareName = function(name, bindingType, pos) {
    var redeclared = false;
    if (bindingType === BIND_LEXICAL) {
        var scope = this.currentScope();
        redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
        scope.lexical.push(name);
        if (this.inModule && scope.flags & SCOPE_TOP) {
            delete this.undefinedExports[name];
        }
    } else if (bindingType === BIND_SIMPLE_CATCH) {
        var scope$1 = this.currentScope();
        scope$1.lexical.push(name);
    } else if (bindingType === BIND_FUNCTION) {
        var scope$2 = this.currentScope();
        if (this.treatFunctionsAsVar) {
            redeclared = scope$2.lexical.indexOf(name) > -1;
        } else {
            redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1;
        }
        scope$2.functions.push(name);
    } else {
        for(var i1 = this.scopeStack.length - 1; i1 >= 0; --i1){
            var scope$3 = this.scopeStack[i1];
            if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
                redeclared = true;
                break;
            }
            scope$3.var.push(name);
            if (this.inModule && scope$3.flags & SCOPE_TOP) {
                delete this.undefinedExports[name];
            }
            if (scope$3.flags & SCOPE_VAR) {
                break;
            }
        }
    }
    if (redeclared) {
        this.raiseRecoverable(pos, "Identifier '" + name + "' has already been declared");
    }
};
pp$5.checkLocalExport = function(id) {
    if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
        this.undefinedExports[id.name] = id;
    }
};
pp$5.currentScope = function() {
    return this.scopeStack[this.scopeStack.length - 1];
};
pp$5.currentVarScope = function() {
    for(var i1 = this.scopeStack.length - 1;; i1--){
        var scope = this.scopeStack[i1];
        if (scope.flags & SCOPE_VAR) {
            return scope;
        }
    }
};
pp$5.currentThisScope = function() {
    for(var i1 = this.scopeStack.length - 1;; i1--){
        var scope = this.scopeStack[i1];
        if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
            return scope;
        }
    }
};
var Node1 = function Node2(parser, pos, loc) {
    this.type = "";
    this.start = pos;
    this.end = 0;
    if (parser.options.locations) {
        this.loc = new SourceLocation(parser, loc);
    }
    if (parser.options.directSourceFile) {
        this.sourceFile = parser.options.directSourceFile;
    }
    if (parser.options.ranges) {
        this.range = [
            pos,
            0
        ];
    }
};
var pp$6 = Parser.prototype;
pp$6.startNode = function() {
    return new Node1(this, this.start, this.startLoc);
};
pp$6.startNodeAt = function(pos, loc) {
    return new Node1(this, pos, loc);
};
function finishNodeAt(node, type, pos, loc) {
    node.type = type;
    node.end = pos;
    if (this.options.locations) {
        node.loc.end = loc;
    }
    if (this.options.ranges) {
        node.range[1] = pos;
    }
    return node;
}
pp$6.finishNode = function(node, type) {
    return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
};
pp$6.finishNodeAt = function(node, type, pos, loc) {
    return finishNodeAt.call(this, node, type, pos, loc);
};
var TokContext = function TokContext2(token, isExpr, preserveSpace, override, generator) {
    this.token = token;
    this.isExpr = !!isExpr;
    this.preserveSpace = !!preserveSpace;
    this.override = override;
    this.generator = !!generator;
};
var types$1 = {
    b_stat: new TokContext("{", false),
    b_expr: new TokContext("{", true),
    b_tmpl: new TokContext("${", false),
    p_stat: new TokContext("(", false),
    p_expr: new TokContext("(", true),
    q_tmpl: new TokContext("`", true, true, function(p) {
        return p.tryReadTemplateToken();
    }),
    f_stat: new TokContext("function", false),
    f_expr: new TokContext("function", true),
    f_expr_gen: new TokContext("function", true, false, null, true),
    f_gen: new TokContext("function", false, false, null, true)
};
var pp$7 = Parser.prototype;
pp$7.initialContext = function() {
    return [
        types$1.b_stat
    ];
};
pp$7.braceIsBlock = function(prevType) {
    var parent = this.curContext();
    if (parent === types$1.f_expr || parent === types$1.f_stat) {
        return true;
    }
    if (prevType === types1.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) {
        return !parent.isExpr;
    }
    if (prevType === types1._return || prevType === types1.name && this.exprAllowed) {
        return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
    }
    if (prevType === types1._else || prevType === types1.semi || prevType === types1.eof || prevType === types1.parenR || prevType === types1.arrow) {
        return true;
    }
    if (prevType === types1.braceL) {
        return parent === types$1.b_stat;
    }
    if (prevType === types1._var || prevType === types1._const || prevType === types1.name) {
        return false;
    }
    return !this.exprAllowed;
};
pp$7.inGeneratorContext = function() {
    for(var i1 = this.context.length - 1; i1 >= 1; i1--){
        var context = this.context[i1];
        if (context.token === "function") {
            return context.generator;
        }
    }
    return false;
};
pp$7.updateContext = function(prevType) {
    var update, type = this.type;
    if (type.keyword && prevType === types1.dot) {
        this.exprAllowed = false;
    } else if (update = type.updateContext) {
        update.call(this, prevType);
    } else {
        this.exprAllowed = type.beforeExpr;
    }
};
types1.parenR.updateContext = types1.braceR.updateContext = function() {
    if (this.context.length === 1) {
        this.exprAllowed = true;
        return;
    }
    var out = this.context.pop();
    if (out === types$1.b_stat && this.curContext().token === "function") {
        out = this.context.pop();
    }
    this.exprAllowed = !out.isExpr;
};
types1.braceL.updateContext = function(prevType) {
    this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr);
    this.exprAllowed = true;
};
types1.dollarBraceL.updateContext = function() {
    this.context.push(types$1.b_tmpl);
    this.exprAllowed = true;
};
types1.parenL.updateContext = function(prevType) {
    var statementParens = prevType === types1._if || prevType === types1._for || prevType === types1._with || prevType === types1._while;
    this.context.push(statementParens ? types$1.p_stat : types$1.p_expr);
    this.exprAllowed = true;
};
types1.incDec.updateContext = function() {};
types1._function.updateContext = types1._class.updateContext = function(prevType) {
    if (prevType.beforeExpr && prevType !== types1.semi && prevType !== types1._else && !(prevType === types1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types1.colon || prevType === types1.braceL) && this.curContext() === types$1.b_stat)) {
        this.context.push(types$1.f_expr);
    } else {
        this.context.push(types$1.f_stat);
    }
    this.exprAllowed = false;
};
types1.backQuote.updateContext = function() {
    if (this.curContext() === types$1.q_tmpl) {
        this.context.pop();
    } else {
        this.context.push(types$1.q_tmpl);
    }
    this.exprAllowed = false;
};
types1.star.updateContext = function(prevType) {
    if (prevType === types1._function) {
        var index = this.context.length - 1;
        if (this.context[index] === types$1.f_expr) {
            this.context[index] = types$1.f_expr_gen;
        } else {
            this.context[index] = types$1.f_gen;
        }
    }
    this.exprAllowed = true;
};
types1.name.updateContext = function(prevType) {
    var allowed = false;
    if (this.options.ecmaVersion >= 6 && prevType !== types1.dot) {
        if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
            allowed = true;
        }
    }
    this.exprAllowed = allowed;
};
var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
var ecma11BinaryProperties = ecma10BinaryProperties;
var unicodeBinaryProperties = {
    9: ecma9BinaryProperties,
    10: ecma10BinaryProperties,
    11: ecma11BinaryProperties
};
var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
var unicodeScriptValues = {
    9: ecma9ScriptValues,
    10: ecma10ScriptValues,
    11: ecma11ScriptValues
};
var data = {};
function buildUnicodeData(ecmaVersion) {
    var d = data[ecmaVersion] = {
        binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues),
        nonBinary: {
            General_Category: wordsRegexp(unicodeGeneralCategoryValues),
            Script: wordsRegexp(unicodeScriptValues[ecmaVersion])
        }
    };
    d.nonBinary.Script_Extensions = d.nonBinary.Script;
    d.nonBinary.gc = d.nonBinary.General_Category;
    d.nonBinary.sc = d.nonBinary.Script;
    d.nonBinary.scx = d.nonBinary.Script_Extensions;
}
buildUnicodeData(9);
buildUnicodeData(10);
buildUnicodeData(11);
var pp$8 = Parser.prototype;
var RegExpValidationState = function RegExpValidationState2(parser) {
    this.parser = parser;
    this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
    this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion];
    this.source = "";
    this.flags = "";
    this.start = 0;
    this.switchU = false;
    this.switchN = false;
    this.pos = 0;
    this.lastIntValue = 0;
    this.lastStringValue = "";
    this.lastAssertionIsQuantifiable = false;
    this.numCapturingParens = 0;
    this.maxBackReference = 0;
    this.groupNames = [];
    this.backReferenceNames = [];
};
RegExpValidationState.prototype.reset = function reset(start, pattern, flags) {
    var unicode = flags.indexOf("u") !== -1;
    this.start = start | 0;
    this.source = pattern + "";
    this.flags = flags;
    this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
    this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
};
RegExpValidationState.prototype.raise = function raise(message) {
    this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
};
RegExpValidationState.prototype.at = function at(i1, forceU) {
    if (forceU === void 0) forceU = false;
    var s = this.source;
    var l1 = s.length;
    if (i1 >= l1) {
        return -1;
    }
    var c = s.charCodeAt(i1);
    if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i1 + 1 >= l1) {
        return c;
    }
    var next = s.charCodeAt(i1 + 1);
    return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
};
RegExpValidationState.prototype.nextIndex = function nextIndex(i1, forceU) {
    if (forceU === void 0) forceU = false;
    var s = this.source;
    var l1 = s.length;
    if (i1 >= l1) {
        return l1;
    }
    var c = s.charCodeAt(i1), next;
    if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i1 + 1 >= l1 || (next = s.charCodeAt(i1 + 1)) < 56320 || next > 57343) {
        return i1 + 1;
    }
    return i1 + 2;
};
RegExpValidationState.prototype.current = function current(forceU) {
    if (forceU === void 0) forceU = false;
    return this.at(this.pos, forceU);
};
RegExpValidationState.prototype.lookahead = function lookahead(forceU) {
    if (forceU === void 0) forceU = false;
    return this.at(this.nextIndex(this.pos, forceU), forceU);
};
RegExpValidationState.prototype.advance = function advance(forceU) {
    if (forceU === void 0) forceU = false;
    this.pos = this.nextIndex(this.pos, forceU);
};
RegExpValidationState.prototype.eat = function eat(ch, forceU) {
    if (forceU === void 0) forceU = false;
    if (this.current(forceU) === ch) {
        this.advance(forceU);
        return true;
    }
    return false;
};
function codePointToString(ch) {
    if (ch <= 65535) {
        return String.fromCharCode(ch);
    }
    ch -= 65536;
    return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
}
pp$8.validateRegExpFlags = function(state) {
    var validFlags = state.validFlags;
    var flags = state.flags;
    for(var i1 = 0; i1 < flags.length; i1++){
        var flag = flags.charAt(i1);
        if (validFlags.indexOf(flag) === -1) {
            this.raise(state.start, "Invalid regular expression flag");
        }
        if (flags.indexOf(flag, i1 + 1) > -1) {
            this.raise(state.start, "Duplicate regular expression flag");
        }
    }
};
pp$8.validateRegExpPattern = function(state) {
    this.regexp_pattern(state);
    if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
        state.switchN = true;
        this.regexp_pattern(state);
    }
};
pp$8.regexp_pattern = function(state) {
    state.pos = 0;
    state.lastIntValue = 0;
    state.lastStringValue = "";
    state.lastAssertionIsQuantifiable = false;
    state.numCapturingParens = 0;
    state.maxBackReference = 0;
    state.groupNames.length = 0;
    state.backReferenceNames.length = 0;
    this.regexp_disjunction(state);
    if (state.pos !== state.source.length) {
        if (state.eat(41)) {
            state.raise("Unmatched ')'");
        }
        if (state.eat(93) || state.eat(125)) {
            state.raise("Lone quantifier brackets");
        }
    }
    if (state.maxBackReference > state.numCapturingParens) {
        state.raise("Invalid escape");
    }
    for(var i1 = 0, list = state.backReferenceNames; i1 < list.length; i1 += 1){
        var name = list[i1];
        if (state.groupNames.indexOf(name) === -1) {
            state.raise("Invalid named capture referenced");
        }
    }
};
pp$8.regexp_disjunction = function(state) {
    this.regexp_alternative(state);
    while(state.eat(124)){
        this.regexp_alternative(state);
    }
    if (this.regexp_eatQuantifier(state, true)) {
        state.raise("Nothing to repeat");
    }
    if (state.eat(123)) {
        state.raise("Lone quantifier brackets");
    }
};
pp$8.regexp_alternative = function(state) {
    while(state.pos < state.source.length && this.regexp_eatTerm(state)){}
};
pp$8.regexp_eatTerm = function(state) {
    if (this.regexp_eatAssertion(state)) {
        if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
            if (state.switchU) {
                state.raise("Invalid quantifier");
            }
        }
        return true;
    }
    if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
        this.regexp_eatQuantifier(state);
        return true;
    }
    return false;
};
pp$8.regexp_eatAssertion = function(state) {
    var start = state.pos;
    state.lastAssertionIsQuantifiable = false;
    if (state.eat(94) || state.eat(36)) {
        return true;
    }
    if (state.eat(92)) {
        if (state.eat(66) || state.eat(98)) {
            return true;
        }
        state.pos = start;
    }
    if (state.eat(40) && state.eat(63)) {
        var lookbehind = false;
        if (this.options.ecmaVersion >= 9) {
            lookbehind = state.eat(60);
        }
        if (state.eat(61) || state.eat(33)) {
            this.regexp_disjunction(state);
            if (!state.eat(41)) {
                state.raise("Unterminated group");
            }
            state.lastAssertionIsQuantifiable = !lookbehind;
            return true;
        }
    }
    state.pos = start;
    return false;
};
pp$8.regexp_eatQuantifier = function(state, noError) {
    if (noError === void 0) noError = false;
    if (this.regexp_eatQuantifierPrefix(state, noError)) {
        state.eat(63);
        return true;
    }
    return false;
};
pp$8.regexp_eatQuantifierPrefix = function(state, noError) {
    return state.eat(42) || state.eat(43) || state.eat(63) || this.regexp_eatBracedQuantifier(state, noError);
};
pp$8.regexp_eatBracedQuantifier = function(state, noError) {
    var start = state.pos;
    if (state.eat(123)) {
        var min = 0, max = -1;
        if (this.regexp_eatDecimalDigits(state)) {
            min = state.lastIntValue;
            if (state.eat(44) && this.regexp_eatDecimalDigits(state)) {
                max = state.lastIntValue;
            }
            if (state.eat(125)) {
                if (max !== -1 && max < min && !noError) {
                    state.raise("numbers out of order in {} quantifier");
                }
                return true;
            }
        }
        if (state.switchU && !noError) {
            state.raise("Incomplete quantifier");
        }
        state.pos = start;
    }
    return false;
};
pp$8.regexp_eatAtom = function(state) {
    return this.regexp_eatPatternCharacters(state) || state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
};
pp$8.regexp_eatReverseSolidusAtomEscape = function(state) {
    var start = state.pos;
    if (state.eat(92)) {
        if (this.regexp_eatAtomEscape(state)) {
            return true;
        }
        state.pos = start;
    }
    return false;
};
pp$8.regexp_eatUncapturingGroup = function(state) {
    var start = state.pos;
    if (state.eat(40)) {
        if (state.eat(63) && state.eat(58)) {
            this.regexp_disjunction(state);
            if (state.eat(41)) {
                return true;
            }
            state.raise("Unterminated group");
        }
        state.pos = start;
    }
    return false;
};
pp$8.regexp_eatCapturingGroup = function(state) {
    if (state.eat(40)) {
        if (this.options.ecmaVersion >= 9) {
            this.regexp_groupSpecifier(state);
        } else if (state.current() === 63) {
            state.raise("Invalid group");
        }
        this.regexp_disjunction(state);
        if (state.eat(41)) {
            state.numCapturingParens += 1;
            return true;
        }
        state.raise("Unterminated group");
    }
    return false;
};
pp$8.regexp_eatExtendedAtom = function(state) {
    return state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
};
pp$8.regexp_eatInvalidBracedQuantifier = function(state) {
    if (this.regexp_eatBracedQuantifier(state, true)) {
        state.raise("Nothing to repeat");
    }
    return false;
};
pp$8.regexp_eatSyntaxCharacter = function(state) {
    var ch = state.current();
    if (isSyntaxCharacter(ch)) {
        state.lastIntValue = ch;
        state.advance();
        return true;
    }
    return false;
};
function isSyntaxCharacter(ch) {
    return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
}
pp$8.regexp_eatPatternCharacters = function(state) {
    var start = state.pos;
    var ch = 0;
    while((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)){
        state.advance();
    }
    return state.pos !== start;
};
pp$8.regexp_eatExtendedPatternCharacter = function(state) {
    var ch = state.current();
    if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
        state.advance();
        return true;
    }
    return false;
};
pp$8.regexp_groupSpecifier = function(state) {
    if (state.eat(63)) {
        if (this.regexp_eatGroupName(state)) {
            if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
                state.raise("Duplicate capture group name");
            }
            state.groupNames.push(state.lastStringValue);
            return;
        }
        state.raise("Invalid group");
    }
};
pp$8.regexp_eatGroupName = function(state) {
    state.lastStringValue = "";
    if (state.eat(60)) {
        if (this.regexp_eatRegExpIdentifierName(state) && state.eat(62)) {
            return true;
        }
        state.raise("Invalid capture group name");
    }
    return false;
};
pp$8.regexp_eatRegExpIdentifierName = function(state) {
    state.lastStringValue = "";
    if (this.regexp_eatRegExpIdentifierStart(state)) {
        state.lastStringValue += codePointToString(state.lastIntValue);
        while(this.regexp_eatRegExpIdentifierPart(state)){
            state.lastStringValue += codePointToString(state.lastIntValue);
        }
        return true;
    }
    return false;
};
pp$8.regexp_eatRegExpIdentifierStart = function(state) {
    var start = state.pos;
    var forceU = this.options.ecmaVersion >= 11;
    var ch = state.current(forceU);
    state.advance(forceU);
    if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
        ch = state.lastIntValue;
    }
    if (isRegExpIdentifierStart(ch)) {
        state.lastIntValue = ch;
        return true;
    }
    state.pos = start;
    return false;
};
function isRegExpIdentifierStart(ch) {
    return isIdentifierStart(ch, true) || ch === 36 || ch === 95;
}
pp$8.regexp_eatRegExpIdentifierPart = function(state) {
    var start = state.pos;
    var forceU = this.options.ecmaVersion >= 11;
    var ch = state.current(forceU);
    state.advance(forceU);
    if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
        ch = state.lastIntValue;
    }
    if (isRegExpIdentifierPart(ch)) {
        state.lastIntValue = ch;
        return true;
    }
    state.pos = start;
    return false;
};
function isRegExpIdentifierPart(ch) {
    return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
}
pp$8.regexp_eatAtomEscape = function(state) {
    if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
        return true;
    }
    if (state.switchU) {
        if (state.current() === 99) {
            state.raise("Invalid unicode escape");
        }
        state.raise("Invalid escape");
    }
    return false;
};
pp$8.regexp_eatBackReference = function(state) {
    var start = state.pos;
    if (this.regexp_eatDecimalEscape(state)) {
        var n = state.lastIntValue;
        if (state.switchU) {
            if (n > state.maxBackReference) {
                state.maxBackReference = n;
            }
            return true;
        }
        if (n <= state.numCapturingParens) {
            return true;
        }
        state.pos = start;
    }
    return false;
};
pp$8.regexp_eatKGroupName = function(state) {
    if (state.eat(107)) {
        if (this.regexp_eatGroupName(state)) {
            state.backReferenceNames.push(state.lastStringValue);
            return true;
        }
        state.raise("Invalid named reference");
    }
    return false;
};
pp$8.regexp_eatCharacterEscape = function(state) {
    return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
};
pp$8.regexp_eatCControlLetter = function(state) {
    var start = state.pos;
    if (state.eat(99)) {
        if (this.regexp_eatControlLetter(state)) {
            return true;
        }
        state.pos = start;
    }
    return false;
};
pp$8.regexp_eatZero = function(state) {
    if (state.current() === 48 && !isDecimalDigit(state.lookahead())) {
        state.lastIntValue = 0;
        state.advance();
        return true;
    }
    return false;
};
pp$8.regexp_eatControlEscape = function(state) {
    var ch = state.current();
    if (ch === 116) {
        state.lastIntValue = 9;
        state.advance();
        return true;
    }
    if (ch === 110) {
        state.lastIntValue = 10;
        state.advance();
        return true;
    }
    if (ch === 118) {
        state.lastIntValue = 11;
        state.advance();
        return true;
    }
    if (ch === 102) {
        state.lastIntValue = 12;
        state.advance();
        return true;
    }
    if (ch === 114) {
        state.lastIntValue = 13;
        state.advance();
        return true;
    }
    return false;
};
pp$8.regexp_eatControlLetter = function(state) {
    var ch = state.current();
    if (isControlLetter(ch)) {
        state.lastIntValue = ch % 32;
        state.advance();
        return true;
    }
    return false;
};
function isControlLetter(ch) {
    return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
}
pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
    if (forceU === void 0) forceU = false;
    var start = state.pos;
    var switchU = forceU || state.switchU;
    if (state.eat(117)) {
        if (this.regexp_eatFixedHexDigits(state, 4)) {
            var lead = state.lastIntValue;
            if (switchU && lead >= 55296 && lead <= 56319) {
                var leadSurrogateEnd = state.pos;
                if (state.eat(92) && state.eat(117) && this.regexp_eatFixedHexDigits(state, 4)) {
                    var trail = state.lastIntValue;
                    if (trail >= 56320 && trail <= 57343) {
                        state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
                        return true;
                    }
                }
                state.pos = leadSurrogateEnd;
                state.lastIntValue = lead;
            }
            return true;
        }
        if (switchU && state.eat(123) && this.regexp_eatHexDigits(state) && state.eat(125) && isValidUnicode(state.lastIntValue)) {
            return true;
        }
        if (switchU) {
            state.raise("Invalid unicode escape");
        }
        state.pos = start;
    }
    return false;
};
function isValidUnicode(ch) {
    return ch >= 0 && ch <= 1114111;
}
pp$8.regexp_eatIdentityEscape = function(state) {
    if (state.switchU) {
        if (this.regexp_eatSyntaxCharacter(state)) {
            return true;
        }
        if (state.eat(47)) {
            state.lastIntValue = 47;
            return true;
        }
        return false;
    }
    var ch = state.current();
    if (ch !== 99 && (!state.switchN || ch !== 107)) {
        state.lastIntValue = ch;
        state.advance();
        return true;
    }
    return false;
};
pp$8.regexp_eatDecimalEscape = function(state) {
    state.lastIntValue = 0;
    var ch = state.current();
    if (ch >= 49 && ch <= 57) {
        do {
            state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
            state.advance();
        }while ((ch = state.current()) >= 48 && ch <= 57)
        return true;
    }
    return false;
};
pp$8.regexp_eatCharacterClassEscape = function(state) {
    var ch = state.current();
    if (isCharacterClassEscape(ch)) {
        state.lastIntValue = -1;
        state.advance();
        return true;
    }
    if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 80 || ch === 112)) {
        state.lastIntValue = -1;
        state.advance();
        if (state.eat(123) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(125)) {
            return true;
        }
        state.raise("Invalid property name");
    }
    return false;
};
function isCharacterClassEscape(ch) {
    return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
}
pp$8.regexp_eatUnicodePropertyValueExpression = function(state) {
    var start = state.pos;
    if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
        var name = state.lastStringValue;
        if (this.regexp_eatUnicodePropertyValue(state)) {
            var value = state.lastStringValue;
            this.regexp_validateUnicodePropertyNameAndValue(state, name, value);
            return true;
        }
    }
    state.pos = start;
    if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
        var nameOrValue = state.lastStringValue;
        this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
        return true;
    }
    return false;
};
pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
    if (!has(state.unicodeProperties.nonBinary, name)) {
        state.raise("Invalid property name");
    }
    if (!state.unicodeProperties.nonBinary[name].test(value)) {
        state.raise("Invalid property value");
    }
};
pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
    if (!state.unicodeProperties.binary.test(nameOrValue)) {
        state.raise("Invalid property name");
    }
};
pp$8.regexp_eatUnicodePropertyName = function(state) {
    var ch = 0;
    state.lastStringValue = "";
    while(isUnicodePropertyNameCharacter(ch = state.current())){
        state.lastStringValue += codePointToString(ch);
        state.advance();
    }
    return state.lastStringValue !== "";
};
function isUnicodePropertyNameCharacter(ch) {
    return isControlLetter(ch) || ch === 95;
}
pp$8.regexp_eatUnicodePropertyValue = function(state) {
    var ch = 0;
    state.lastStringValue = "";
    while(isUnicodePropertyValueCharacter(ch = state.current())){
        state.lastStringValue += codePointToString(ch);
        state.advance();
    }
    return state.lastStringValue !== "";
};
function isUnicodePropertyValueCharacter(ch) {
    return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
}
pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
    return this.regexp_eatUnicodePropertyValue(state);
};
pp$8.regexp_eatCharacterClass = function(state) {
    if (state.eat(91)) {
        state.eat(94);
        this.regexp_classRanges(state);
        if (state.eat(93)) {
            return true;
        }
        state.raise("Unterminated character class");
    }
    return false;
};
pp$8.regexp_classRanges = function(state) {
    while(this.regexp_eatClassAtom(state)){
        var left = state.lastIntValue;
        if (state.eat(45) && this.regexp_eatClassAtom(state)) {
            var right = state.lastIntValue;
            if (state.switchU && (left === -1 || right === -1)) {
                state.raise("Invalid character class");
            }
            if (left !== -1 && right !== -1 && left > right) {
                state.raise("Range out of order in character class");
            }
        }
    }
};
pp$8.regexp_eatClassAtom = function(state) {
    var start = state.pos;
    if (state.eat(92)) {
        if (this.regexp_eatClassEscape(state)) {
            return true;
        }
        if (state.switchU) {
            var ch$1 = state.current();
            if (ch$1 === 99 || isOctalDigit(ch$1)) {
                state.raise("Invalid class escape");
            }
            state.raise("Invalid escape");
        }
        state.pos = start;
    }
    var ch = state.current();
    if (ch !== 93) {
        state.lastIntValue = ch;
        state.advance();
        return true;
    }
    return false;
};
pp$8.regexp_eatClassEscape = function(state) {
    var start = state.pos;
    if (state.eat(98)) {
        state.lastIntValue = 8;
        return true;
    }
    if (state.switchU && state.eat(45)) {
        state.lastIntValue = 45;
        return true;
    }
    if (!state.switchU && state.eat(99)) {
        if (this.regexp_eatClassControlLetter(state)) {
            return true;
        }
        state.pos = start;
    }
    return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
};
pp$8.regexp_eatClassControlLetter = function(state) {
    var ch = state.current();
    if (isDecimalDigit(ch) || ch === 95) {
        state.lastIntValue = ch % 32;
        state.advance();
        return true;
    }
    return false;
};
pp$8.regexp_eatHexEscapeSequence = function(state) {
    var start = state.pos;
    if (state.eat(120)) {
        if (this.regexp_eatFixedHexDigits(state, 2)) {
            return true;
        }
        if (state.switchU) {
            state.raise("Invalid escape");
        }
        state.pos = start;
    }
    return false;
};
pp$8.regexp_eatDecimalDigits = function(state) {
    var start = state.pos;
    var ch = 0;
    state.lastIntValue = 0;
    while(isDecimalDigit(ch = state.current())){
        state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
        state.advance();
    }
    return state.pos !== start;
};
function isDecimalDigit(ch) {
    return ch >= 48 && ch <= 57;
}
pp$8.regexp_eatHexDigits = function(state) {
    var start = state.pos;
    var ch = 0;
    state.lastIntValue = 0;
    while(isHexDigit(ch = state.current())){
        state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
        state.advance();
    }
    return state.pos !== start;
};
function isHexDigit(ch) {
    return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
}
function hexToInt(ch) {
    if (ch >= 65 && ch <= 70) {
        return 10 + (ch - 65);
    }
    if (ch >= 97 && ch <= 102) {
        return 10 + (ch - 97);
    }
    return ch - 48;
}
pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) {
    if (this.regexp_eatOctalDigit(state)) {
        var n1 = state.lastIntValue;
        if (this.regexp_eatOctalDigit(state)) {
            var n2 = state.lastIntValue;
            if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
                state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
            } else {
                state.lastIntValue = n1 * 8 + n2;
            }
        } else {
            state.lastIntValue = n1;
        }
        return true;
    }
    return false;
};
pp$8.regexp_eatOctalDigit = function(state) {
    var ch = state.current();
    if (isOctalDigit(ch)) {
        state.lastIntValue = ch - 48;
        state.advance();
        return true;
    }
    state.lastIntValue = 0;
    return false;
};
function isOctalDigit(ch) {
    return ch >= 48 && ch <= 55;
}
pp$8.regexp_eatFixedHexDigits = function(state, length) {
    var start = state.pos;
    state.lastIntValue = 0;
    for(var i1 = 0; i1 < length; ++i1){
        var ch = state.current();
        if (!isHexDigit(ch)) {
            state.pos = start;
            return false;
        }
        state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
        state.advance();
    }
    return true;
};
var Token = function Token2(p) {
    this.type = p.type;
    this.value = p.value;
    this.start = p.start;
    this.end = p.end;
    if (p.options.locations) {
        this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
    }
    if (p.options.ranges) {
        this.range = [
            p.start,
            p.end
        ];
    }
};
var pp$9 = Parser.prototype;
pp$9.next = function(ignoreEscapeSequenceInKeyword) {
    if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
        this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
    }
    if (this.options.onToken) {
        this.options.onToken(new Token(this));
    }
    this.lastTokEnd = this.end;
    this.lastTokStart = this.start;
    this.lastTokEndLoc = this.endLoc;
    this.lastTokStartLoc = this.startLoc;
    this.nextToken();
};
pp$9.getToken = function() {
    this.next();
    return new Token(this);
};
if (typeof Symbol !== "undefined") {
    pp$9[Symbol.iterator] = function() {
        var this$1 = this;
        return {
            next: function() {
                var token = this$1.getToken();
                return {
                    done: token.type === types1.eof,
                    value: token
                };
            }
        };
    };
}
pp$9.curContext = function() {
    return this.context[this.context.length - 1];
};
pp$9.nextToken = function() {
    var curContext = this.curContext();
    if (!curContext || !curContext.preserveSpace) {
        this.skipSpace();
    }
    this.start = this.pos;
    if (this.options.locations) {
        this.startLoc = this.curPosition();
    }
    if (this.pos >= this.input.length) {
        return this.finishToken(types1.eof);
    }
    if (curContext.override) {
        return curContext.override(this);
    } else {
        this.readToken(this.fullCharCodeAtPos());
    }
};
pp$9.readToken = function(code) {
    if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92) {
        return this.readWord();
    }
    return this.getTokenFromCode(code);
};
pp$9.fullCharCodeAtPos = function() {
    var code = this.input.charCodeAt(this.pos);
    if (code <= 55295 || code >= 57344) {
        return code;
    }
    var next = this.input.charCodeAt(this.pos + 1);
    return (code << 10) + next - 56613888;
};
pp$9.skipBlockComment = function() {
    var startLoc = this.options.onComment && this.curPosition();
    var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
    if (end === -1) {
        this.raise(this.pos - 2, "Unterminated comment");
    }
    this.pos = end + 2;
    if (this.options.locations) {
        lineBreakG.lastIndex = start;
        var match;
        while((match = lineBreakG.exec(this.input)) && match.index < this.pos){
            ++this.curLine;
            this.lineStart = match.index + match[0].length;
        }
    }
    if (this.options.onComment) {
        this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());
    }
};
pp$9.skipLineComment = function(startSkip) {
    var start = this.pos;
    var startLoc = this.options.onComment && this.curPosition();
    var ch = this.input.charCodeAt(this.pos += startSkip);
    while(this.pos < this.input.length && !isNewLine(ch)){
        ch = this.input.charCodeAt(++this.pos);
    }
    if (this.options.onComment) {
        this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());
    }
};
pp$9.skipSpace = function() {
    loop: while(this.pos < this.input.length){
        var ch = this.input.charCodeAt(this.pos);
        switch(ch){
            case 32:
            case 160:
                ++this.pos;
                break;
            case 13:
                if (this.input.charCodeAt(this.pos + 1) === 10) {
                    ++this.pos;
                }
            case 10:
            case 8232:
            case 8233:
                ++this.pos;
                if (this.options.locations) {
                    ++this.curLine;
                    this.lineStart = this.pos;
                }
                break;
            case 47:
                switch(this.input.charCodeAt(this.pos + 1)){
                    case 42:
                        this.skipBlockComment();
                        break;
                    case 47:
                        this.skipLineComment(2);
                        break;
                    default:
                        break loop;
                }
                break;
            default:
                if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
                    ++this.pos;
                } else {
                    break loop;
                }
        }
    }
};
pp$9.finishToken = function(type, val) {
    this.end = this.pos;
    if (this.options.locations) {
        this.endLoc = this.curPosition();
    }
    var prevType = this.type;
    this.type = type;
    this.value = val;
    this.updateContext(prevType);
};
pp$9.readToken_dot = function() {
    var next = this.input.charCodeAt(this.pos + 1);
    if (next >= 48 && next <= 57) {
        return this.readNumber(true);
    }
    var next2 = this.input.charCodeAt(this.pos + 2);
    if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
        this.pos += 3;
        return this.finishToken(types1.ellipsis);
    } else {
        ++this.pos;
        return this.finishToken(types1.dot);
    }
};
pp$9.readToken_slash = function() {
    var next = this.input.charCodeAt(this.pos + 1);
    if (this.exprAllowed) {
        ++this.pos;
        return this.readRegexp();
    }
    if (next === 61) {
        return this.finishOp(types1.assign, 2);
    }
    return this.finishOp(types1.slash, 1);
};
pp$9.readToken_mult_modulo_exp = function(code) {
    var next = this.input.charCodeAt(this.pos + 1);
    var size = 1;
    var tokentype = code === 42 ? types1.star : types1.modulo;
    if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {
        ++size;
        tokentype = types1.starstar;
        next = this.input.charCodeAt(this.pos + 2);
    }
    if (next === 61) {
        return this.finishOp(types1.assign, size + 1);
    }
    return this.finishOp(tokentype, size);
};
pp$9.readToken_pipe_amp = function(code) {
    var next = this.input.charCodeAt(this.pos + 1);
    if (next === code) {
        if (this.options.ecmaVersion >= 12) {
            var next2 = this.input.charCodeAt(this.pos + 2);
            if (next2 === 61) {
                return this.finishOp(types1.assign, 3);
            }
        }
        return this.finishOp(code === 124 ? types1.logicalOR : types1.logicalAND, 2);
    }
    if (next === 61) {
        return this.finishOp(types1.assign, 2);
    }
    return this.finishOp(code === 124 ? types1.bitwiseOR : types1.bitwiseAND, 1);
};
pp$9.readToken_caret = function() {
    var next = this.input.charCodeAt(this.pos + 1);
    if (next === 61) {
        return this.finishOp(types1.assign, 2);
    }
    return this.finishOp(types1.bitwiseXOR, 1);
};
pp$9.readToken_plus_min = function(code) {
    var next = this.input.charCodeAt(this.pos + 1);
    if (next === code) {
        if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
            this.skipLineComment(3);
            this.skipSpace();
            return this.nextToken();
        }
        return this.finishOp(types1.incDec, 2);
    }
    if (next === 61) {
        return this.finishOp(types1.assign, 2);
    }
    return this.finishOp(types1.plusMin, 1);
};
pp$9.readToken_lt_gt = function(code) {
    var next = this.input.charCodeAt(this.pos + 1);
    var size = 1;
    if (next === code) {
        size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
        if (this.input.charCodeAt(this.pos + size) === 61) {
            return this.finishOp(types1.assign, size + 1);
        }
        return this.finishOp(types1.bitShift, size);
    }
    if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
        this.skipLineComment(4);
        this.skipSpace();
        return this.nextToken();
    }
    if (next === 61) {
        size = 2;
    }
    return this.finishOp(types1.relational, size);
};
pp$9.readToken_eq_excl = function(code) {
    var next = this.input.charCodeAt(this.pos + 1);
    if (next === 61) {
        return this.finishOp(types1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
    }
    if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) {
        this.pos += 2;
        return this.finishToken(types1.arrow);
    }
    return this.finishOp(code === 61 ? types1.eq : types1.prefix, 1);
};
pp$9.readToken_question = function() {
    var ecmaVersion = this.options.ecmaVersion;
    if (ecmaVersion >= 11) {
        var next = this.input.charCodeAt(this.pos + 1);
        if (next === 46) {
            var next2 = this.input.charCodeAt(this.pos + 2);
            if (next2 < 48 || next2 > 57) {
                return this.finishOp(types1.questionDot, 2);
            }
        }
        if (next === 63) {
            if (ecmaVersion >= 12) {
                var next2$1 = this.input.charCodeAt(this.pos + 2);
                if (next2$1 === 61) {
                    return this.finishOp(types1.assign, 3);
                }
            }
            return this.finishOp(types1.coalesce, 2);
        }
    }
    return this.finishOp(types1.question, 1);
};
pp$9.getTokenFromCode = function(code) {
    switch(code){
        case 46:
            return this.readToken_dot();
        case 40:
            ++this.pos;
            return this.finishToken(types1.parenL);
        case 41:
            ++this.pos;
            return this.finishToken(types1.parenR);
        case 59:
            ++this.pos;
            return this.finishToken(types1.semi);
        case 44:
            ++this.pos;
            return this.finishToken(types1.comma);
        case 91:
            ++this.pos;
            return this.finishToken(types1.bracketL);
        case 93:
            ++this.pos;
            return this.finishToken(types1.bracketR);
        case 123:
            ++this.pos;
            return this.finishToken(types1.braceL);
        case 125:
            ++this.pos;
            return this.finishToken(types1.braceR);
        case 58:
            ++this.pos;
            return this.finishToken(types1.colon);
        case 96:
            if (this.options.ecmaVersion < 6) {
                break;
            }
            ++this.pos;
            return this.finishToken(types1.backQuote);
        case 48:
            var next = this.input.charCodeAt(this.pos + 1);
            if (next === 120 || next === 88) {
                return this.readRadixNumber(16);
            }
            if (this.options.ecmaVersion >= 6) {
                if (next === 111 || next === 79) {
                    return this.readRadixNumber(8);
                }
                if (next === 98 || next === 66) {
                    return this.readRadixNumber(2);
                }
            }
        case 49:
        case 50:
        case 51:
        case 52:
        case 53:
        case 54:
        case 55:
        case 56:
        case 57:
            return this.readNumber(false);
        case 34:
        case 39:
            return this.readString(code);
        case 47:
            return this.readToken_slash();
        case 37:
        case 42:
            return this.readToken_mult_modulo_exp(code);
        case 124:
        case 38:
            return this.readToken_pipe_amp(code);
        case 94:
            return this.readToken_caret();
        case 43:
        case 45:
            return this.readToken_plus_min(code);
        case 60:
        case 62:
            return this.readToken_lt_gt(code);
        case 61:
        case 33:
            return this.readToken_eq_excl(code);
        case 63:
            return this.readToken_question();
        case 126:
            return this.finishOp(types1.prefix, 1);
    }
    this.raise(this.pos, "Unexpected character '" + codePointToString$1(code) + "'");
};
pp$9.finishOp = function(type, size) {
    var str = this.input.slice(this.pos, this.pos + size);
    this.pos += size;
    return this.finishToken(type, str);
};
pp$9.readRegexp = function() {
    var escaped, inClass, start = this.pos;
    for(;;){
        if (this.pos >= this.input.length) {
            this.raise(start, "Unterminated regular expression");
        }
        var ch = this.input.charAt(this.pos);
        if (lineBreak.test(ch)) {
            this.raise(start, "Unterminated regular expression");
        }
        if (!escaped) {
            if (ch === "[") {
                inClass = true;
            } else if (ch === "]" && inClass) {
                inClass = false;
            } else if (ch === "/" && !inClass) {
                break;
            }
            escaped = ch === "\\";
        } else {
            escaped = false;
        }
        ++this.pos;
    }
    var pattern = this.input.slice(start, this.pos);
    ++this.pos;
    var flagsStart = this.pos;
    var flags = this.readWord1();
    if (this.containsEsc) {
        this.unexpected(flagsStart);
    }
    var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));
    state.reset(start, pattern, flags);
    this.validateRegExpFlags(state);
    this.validateRegExpPattern(state);
    var value = null;
    try {
        value = new RegExp(pattern, flags);
    } catch (e) {}
    return this.finishToken(types1.regexp, {
        pattern,
        flags,
        value
    });
};
pp$9.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
    var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
    var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
    var start = this.pos, total = 0, lastCode = 0;
    for(var i1 = 0, e = len == null ? Infinity : len; i1 < e; ++i1, ++this.pos){
        var code = this.input.charCodeAt(this.pos), val = void 0;
        if (allowSeparators && code === 95) {
            if (isLegacyOctalNumericLiteral) {
                this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
            }
            if (lastCode === 95) {
                this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
            }
            if (i1 === 0) {
                this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
            }
            lastCode = code;
            continue;
        }
        if (code >= 97) {
            val = code - 97 + 10;
        } else if (code >= 65) {
            val = code - 65 + 10;
        } else if (code >= 48 && code <= 57) {
            val = code - 48;
        } else {
            val = Infinity;
        }
        if (val >= radix) {
            break;
        }
        lastCode = code;
        total = total * radix + val;
    }
    if (allowSeparators && lastCode === 95) {
        this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
    }
    if (this.pos === start || len != null && this.pos - start !== len) {
        return null;
    }
    return total;
};
function stringToNumber(str, isLegacyOctalNumericLiteral) {
    if (isLegacyOctalNumericLiteral) {
        return parseInt(str, 8);
    }
    return parseFloat(str.replace(/_/g, ""));
}
function stringToBigInt(str) {
    if (typeof BigInt !== "function") {
        return null;
    }
    return BigInt(str.replace(/_/g, ""));
}
pp$9.readRadixNumber = function(radix) {
    var start = this.pos;
    this.pos += 2;
    var val = this.readInt(radix);
    if (val == null) {
        this.raise(this.start + 2, "Expected number in radix " + radix);
    }
    if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
        val = stringToBigInt(this.input.slice(start, this.pos));
        ++this.pos;
    } else if (isIdentifierStart(this.fullCharCodeAtPos())) {
        this.raise(this.pos, "Identifier directly after number");
    }
    return this.finishToken(types1.num, val);
};
pp$9.readNumber = function(startsWithDot) {
    var start = this.pos;
    if (!startsWithDot && this.readInt(10, void 0, true) === null) {
        this.raise(start, "Invalid number");
    }
    var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48;
    if (octal && this.strict) {
        this.raise(start, "Invalid number");
    }
    var next = this.input.charCodeAt(this.pos);
    if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
        var val$1 = stringToBigInt(this.input.slice(start, this.pos));
        ++this.pos;
        if (isIdentifierStart(this.fullCharCodeAtPos())) {
            this.raise(this.pos, "Identifier directly after number");
        }
        return this.finishToken(types1.num, val$1);
    }
    if (octal && /[89]/.test(this.input.slice(start, this.pos))) {
        octal = false;
    }
    if (next === 46 && !octal) {
        ++this.pos;
        this.readInt(10);
        next = this.input.charCodeAt(this.pos);
    }
    if ((next === 69 || next === 101) && !octal) {
        next = this.input.charCodeAt(++this.pos);
        if (next === 43 || next === 45) {
            ++this.pos;
        }
        if (this.readInt(10) === null) {
            this.raise(start, "Invalid number");
        }
    }
    if (isIdentifierStart(this.fullCharCodeAtPos())) {
        this.raise(this.pos, "Identifier directly after number");
    }
    var val = stringToNumber(this.input.slice(start, this.pos), octal);
    return this.finishToken(types1.num, val);
};
pp$9.readCodePoint = function() {
    var ch = this.input.charCodeAt(this.pos), code;
    if (ch === 123) {
        if (this.options.ecmaVersion < 6) {
            this.unexpected();
        }
        var codePos = ++this.pos;
        code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
        ++this.pos;
        if (code > 1114111) {
            this.invalidStringToken(codePos, "Code point out of bounds");
        }
    } else {
        code = this.readHexChar(4);
    }
    return code;
};
function codePointToString$1(code) {
    if (code <= 65535) {
        return String.fromCharCode(code);
    }
    code -= 65536;
    return String.fromCharCode((code >> 10) + 55296, (code & 1023) + 56320);
}
pp$9.readString = function(quote) {
    var out = "", chunkStart = ++this.pos;
    for(;;){
        if (this.pos >= this.input.length) {
            this.raise(this.start, "Unterminated string constant");
        }
        var ch = this.input.charCodeAt(this.pos);
        if (ch === quote) {
            break;
        }
        if (ch === 92) {
            out += this.input.slice(chunkStart, this.pos);
            out += this.readEscapedChar(false);
            chunkStart = this.pos;
        } else {
            if (isNewLine(ch, this.options.ecmaVersion >= 10)) {
                this.raise(this.start, "Unterminated string constant");
            }
            ++this.pos;
        }
    }
    out += this.input.slice(chunkStart, this.pos++);
    return this.finishToken(types1.string, out);
};
var INVALID_TEMPLATE_ESCAPE_ERROR = {};
pp$9.tryReadTemplateToken = function() {
    this.inTemplateElement = true;
    try {
        this.readTmplToken();
    } catch (err) {
        if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
            this.readInvalidTemplateToken();
        } else {
            throw err;
        }
    }
    this.inTemplateElement = false;
};
pp$9.invalidStringToken = function(position, message) {
    if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
        throw INVALID_TEMPLATE_ESCAPE_ERROR;
    } else {
        this.raise(position, message);
    }
};
pp$9.readTmplToken = function() {
    var out = "", chunkStart = this.pos;
    for(;;){
        if (this.pos >= this.input.length) {
            this.raise(this.start, "Unterminated template");
        }
        var ch = this.input.charCodeAt(this.pos);
        if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
            if (this.pos === this.start && (this.type === types1.template || this.type === types1.invalidTemplate)) {
                if (ch === 36) {
                    this.pos += 2;
                    return this.finishToken(types1.dollarBraceL);
                } else {
                    ++this.pos;
                    return this.finishToken(types1.backQuote);
                }
            }
            out += this.input.slice(chunkStart, this.pos);
            return this.finishToken(types1.template, out);
        }
        if (ch === 92) {
            out += this.input.slice(chunkStart, this.pos);
            out += this.readEscapedChar(true);
            chunkStart = this.pos;
        } else if (isNewLine(ch)) {
            out += this.input.slice(chunkStart, this.pos);
            ++this.pos;
            switch(ch){
                case 13:
                    if (this.input.charCodeAt(this.pos) === 10) {
                        ++this.pos;
                    }
                case 10:
                    out += "\n";
                    break;
                default:
                    out += String.fromCharCode(ch);
                    break;
            }
            if (this.options.locations) {
                ++this.curLine;
                this.lineStart = this.pos;
            }
            chunkStart = this.pos;
        } else {
            ++this.pos;
        }
    }
};
pp$9.readInvalidTemplateToken = function() {
    for(; this.pos < this.input.length; this.pos++){
        switch(this.input[this.pos]){
            case "\\":
                ++this.pos;
                break;
            case "$":
                if (this.input[this.pos + 1] !== "{") {
                    break;
                }
            case "`":
                return this.finishToken(types1.invalidTemplate, this.input.slice(this.start, this.pos));
        }
    }
    this.raise(this.start, "Unterminated template");
};
pp$9.readEscapedChar = function(inTemplate) {
    var ch = this.input.charCodeAt(++this.pos);
    ++this.pos;
    switch(ch){
        case 110:
            return "\n";
        case 114:
            return "\r";
        case 120:
            return String.fromCharCode(this.readHexChar(2));
        case 117:
            return codePointToString$1(this.readCodePoint());
        case 116:
            return "	";
        case 98:
            return "\b";
        case 118:
            return "\v";
        case 102:
            return "\f";
        case 13:
            if (this.input.charCodeAt(this.pos) === 10) {
                ++this.pos;
            }
        case 10:
            if (this.options.locations) {
                this.lineStart = this.pos;
                ++this.curLine;
            }
            return "";
        case 56:
        case 57:
            if (inTemplate) {
                var codePos = this.pos - 1;
                this.invalidStringToken(codePos, "Invalid escape sequence in template string");
                return null;
            }
        default:
            if (ch >= 48 && ch <= 55) {
                var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
                var octal = parseInt(octalStr, 8);
                if (octal > 255) {
                    octalStr = octalStr.slice(0, -1);
                    octal = parseInt(octalStr, 8);
                }
                this.pos += octalStr.length - 1;
                ch = this.input.charCodeAt(this.pos);
                if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
                    this.invalidStringToken(this.pos - 1 - octalStr.length, inTemplate ? "Octal literal in template string" : "Octal literal in strict mode");
                }
                return String.fromCharCode(octal);
            }
            if (isNewLine(ch)) {
                return "";
            }
            return String.fromCharCode(ch);
    }
};
pp$9.readHexChar = function(len) {
    var codePos = this.pos;
    var n = this.readInt(16, len);
    if (n === null) {
        this.invalidStringToken(codePos, "Bad character escape sequence");
    }
    return n;
};
pp$9.readWord1 = function() {
    this.containsEsc = false;
    var word = "", first = true, chunkStart = this.pos;
    var astral = this.options.ecmaVersion >= 6;
    while(this.pos < this.input.length){
        var ch = this.fullCharCodeAtPos();
        if (isIdentifierChar(ch, astral)) {
            this.pos += ch <= 65535 ? 1 : 2;
        } else if (ch === 92) {
            this.containsEsc = true;
            word += this.input.slice(chunkStart, this.pos);
            var escStart = this.pos;
            if (this.input.charCodeAt(++this.pos) !== 117) {
                this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
            }
            ++this.pos;
            var esc = this.readCodePoint();
            if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) {
                this.invalidStringToken(escStart, "Invalid Unicode escape");
            }
            word += codePointToString$1(esc);
            chunkStart = this.pos;
        } else {
            break;
        }
        first = false;
    }
    return word + this.input.slice(chunkStart, this.pos);
};
pp$9.readWord = function() {
    var word = this.readWord1();
    var type = types1.name;
    if (this.keywords.test(word)) {
        type = keywords$1[word];
    }
    return this.finishToken(type, word);
};
var version = "7.4.1";
Parser.acorn = {
    Parser,
    version,
    defaultOptions,
    Position,
    SourceLocation,
    getLineInfo,
    Node: Node1,
    TokenType,
    tokTypes: types1,
    keywordTypes: keywords$1,
    TokContext,
    tokContexts: types$1,
    isIdentifierChar,
    isIdentifierStart,
    Token,
    isNewLine,
    lineBreak,
    lineBreakG,
    nonASCIIwhitespace
};
function parse31(input, options) {
    return Parser.parse(input, options);
}
function simple(node, visitors, baseVisitor, state, override) {
    if (!baseVisitor) {
        baseVisitor = base1;
    }
    (function c(node2, st, override2) {
        var type = override2 || node2.type, found = visitors[type];
        baseVisitor[type](node2, st, c);
        if (found) {
            found(node2, st);
        }
    })(node, state, override);
}
function ancestor(node, visitors, baseVisitor, state, override) {
    var ancestors = [];
    if (!baseVisitor) {
        baseVisitor = base1;
    }
    (function c(node2, st, override2) {
        var type = override2 || node2.type, found = visitors[type];
        var isNew = node2 !== ancestors[ancestors.length - 1];
        if (isNew) {
            ancestors.push(node2);
        }
        baseVisitor[type](node2, st, c);
        if (found) {
            found(node2, st || ancestors, ancestors);
        }
        if (isNew) {
            ancestors.pop();
        }
    })(node, state, override);
}
var create = Object.create || function(proto) {
    function Ctor() {}
    Ctor.prototype = proto;
    return new Ctor();
};
function make(funcs, baseVisitor) {
    var visitor = create(baseVisitor || base1);
    for(var type in funcs){
        visitor[type] = funcs[type];
    }
    return visitor;
}
function skipThrough(node, st, c) {
    c(node, st);
}
function ignore(_node, _st, _c) {}
var base1 = {};
base1.Program = base1.BlockStatement = function(node, st, c) {
    for(var i1 = 0, list = node.body; i1 < list.length; i1 += 1){
        var stmt = list[i1];
        c(stmt, st, "Statement");
    }
};
base1.Statement = skipThrough;
base1.EmptyStatement = ignore;
base1.ExpressionStatement = base1.ParenthesizedExpression = base1.ChainExpression = function(node, st, c) {
    return c(node.expression, st, "Expression");
};
base1.IfStatement = function(node, st, c) {
    c(node.test, st, "Expression");
    c(node.consequent, st, "Statement");
    if (node.alternate) {
        c(node.alternate, st, "Statement");
    }
};
base1.LabeledStatement = function(node, st, c) {
    return c(node.body, st, "Statement");
};
base1.BreakStatement = base1.ContinueStatement = ignore;
base1.WithStatement = function(node, st, c) {
    c(node.object, st, "Expression");
    c(node.body, st, "Statement");
};
base1.SwitchStatement = function(node, st, c) {
    c(node.discriminant, st, "Expression");
    for(var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1){
        var cs = list$1[i$1];
        if (cs.test) {
            c(cs.test, st, "Expression");
        }
        for(var i1 = 0, list = cs.consequent; i1 < list.length; i1 += 1){
            var cons = list[i1];
            c(cons, st, "Statement");
        }
    }
};
base1.SwitchCase = function(node, st, c) {
    if (node.test) {
        c(node.test, st, "Expression");
    }
    for(var i1 = 0, list = node.consequent; i1 < list.length; i1 += 1){
        var cons = list[i1];
        c(cons, st, "Statement");
    }
};
base1.ReturnStatement = base1.YieldExpression = base1.AwaitExpression = function(node, st, c) {
    if (node.argument) {
        c(node.argument, st, "Expression");
    }
};
base1.ThrowStatement = base1.SpreadElement = function(node, st, c) {
    return c(node.argument, st, "Expression");
};
base1.TryStatement = function(node, st, c) {
    c(node.block, st, "Statement");
    if (node.handler) {
        c(node.handler, st);
    }
    if (node.finalizer) {
        c(node.finalizer, st, "Statement");
    }
};
base1.CatchClause = function(node, st, c) {
    if (node.param) {
        c(node.param, st, "Pattern");
    }
    c(node.body, st, "Statement");
};
base1.WhileStatement = base1.DoWhileStatement = function(node, st, c) {
    c(node.test, st, "Expression");
    c(node.body, st, "Statement");
};
base1.ForStatement = function(node, st, c) {
    if (node.init) {
        c(node.init, st, "ForInit");
    }
    if (node.test) {
        c(node.test, st, "Expression");
    }
    if (node.update) {
        c(node.update, st, "Expression");
    }
    c(node.body, st, "Statement");
};
base1.ForInStatement = base1.ForOfStatement = function(node, st, c) {
    c(node.left, st, "ForInit");
    c(node.right, st, "Expression");
    c(node.body, st, "Statement");
};
base1.ForInit = function(node, st, c) {
    if (node.type === "VariableDeclaration") {
        c(node, st);
    } else {
        c(node, st, "Expression");
    }
};
base1.DebuggerStatement = ignore;
base1.FunctionDeclaration = function(node, st, c) {
    return c(node, st, "Function");
};
base1.VariableDeclaration = function(node, st, c) {
    for(var i1 = 0, list = node.declarations; i1 < list.length; i1 += 1){
        var decl = list[i1];
        c(decl, st);
    }
};
base1.VariableDeclarator = function(node, st, c) {
    c(node.id, st, "Pattern");
    if (node.init) {
        c(node.init, st, "Expression");
    }
};
base1.Function = function(node, st, c) {
    if (node.id) {
        c(node.id, st, "Pattern");
    }
    for(var i1 = 0, list = node.params; i1 < list.length; i1 += 1){
        var param = list[i1];
        c(param, st, "Pattern");
    }
    c(node.body, st, node.expression ? "Expression" : "Statement");
};
base1.Pattern = function(node, st, c) {
    if (node.type === "Identifier") {
        c(node, st, "VariablePattern");
    } else if (node.type === "MemberExpression") {
        c(node, st, "MemberPattern");
    } else {
        c(node, st);
    }
};
base1.VariablePattern = ignore;
base1.MemberPattern = skipThrough;
base1.RestElement = function(node, st, c) {
    return c(node.argument, st, "Pattern");
};
base1.ArrayPattern = function(node, st, c) {
    for(var i1 = 0, list = node.elements; i1 < list.length; i1 += 1){
        var elt = list[i1];
        if (elt) {
            c(elt, st, "Pattern");
        }
    }
};
base1.ObjectPattern = function(node, st, c) {
    for(var i1 = 0, list = node.properties; i1 < list.length; i1 += 1){
        var prop = list[i1];
        if (prop.type === "Property") {
            if (prop.computed) {
                c(prop.key, st, "Expression");
            }
            c(prop.value, st, "Pattern");
        } else if (prop.type === "RestElement") {
            c(prop.argument, st, "Pattern");
        }
    }
};
base1.Expression = skipThrough;
base1.ThisExpression = base1.Super = base1.MetaProperty = ignore;
base1.ArrayExpression = function(node, st, c) {
    for(var i1 = 0, list = node.elements; i1 < list.length; i1 += 1){
        var elt = list[i1];
        if (elt) {
            c(elt, st, "Expression");
        }
    }
};
base1.ObjectExpression = function(node, st, c) {
    for(var i1 = 0, list = node.properties; i1 < list.length; i1 += 1){
        var prop = list[i1];
        c(prop, st);
    }
};
base1.FunctionExpression = base1.ArrowFunctionExpression = base1.FunctionDeclaration;
base1.SequenceExpression = function(node, st, c) {
    for(var i1 = 0, list = node.expressions; i1 < list.length; i1 += 1){
        var expr = list[i1];
        c(expr, st, "Expression");
    }
};
base1.TemplateLiteral = function(node, st, c) {
    for(var i1 = 0, list = node.quasis; i1 < list.length; i1 += 1){
        var quasi = list[i1];
        c(quasi, st);
    }
    for(var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1){
        var expr = list$1[i$1];
        c(expr, st, "Expression");
    }
};
base1.TemplateElement = ignore;
base1.UnaryExpression = base1.UpdateExpression = function(node, st, c) {
    c(node.argument, st, "Expression");
};
base1.BinaryExpression = base1.LogicalExpression = function(node, st, c) {
    c(node.left, st, "Expression");
    c(node.right, st, "Expression");
};
base1.AssignmentExpression = base1.AssignmentPattern = function(node, st, c) {
    c(node.left, st, "Pattern");
    c(node.right, st, "Expression");
};
base1.ConditionalExpression = function(node, st, c) {
    c(node.test, st, "Expression");
    c(node.consequent, st, "Expression");
    c(node.alternate, st, "Expression");
};
base1.NewExpression = base1.CallExpression = function(node, st, c) {
    c(node.callee, st, "Expression");
    if (node.arguments) {
        for(var i1 = 0, list = node.arguments; i1 < list.length; i1 += 1){
            var arg = list[i1];
            c(arg, st, "Expression");
        }
    }
};
base1.MemberExpression = function(node, st, c) {
    c(node.object, st, "Expression");
    if (node.computed) {
        c(node.property, st, "Expression");
    }
};
base1.ExportNamedDeclaration = base1.ExportDefaultDeclaration = function(node, st, c) {
    if (node.declaration) {
        c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression");
    }
    if (node.source) {
        c(node.source, st, "Expression");
    }
};
base1.ExportAllDeclaration = function(node, st, c) {
    if (node.exported) {
        c(node.exported, st);
    }
    c(node.source, st, "Expression");
};
base1.ImportDeclaration = function(node, st, c) {
    for(var i1 = 0, list = node.specifiers; i1 < list.length; i1 += 1){
        var spec = list[i1];
        c(spec, st);
    }
    c(node.source, st, "Expression");
};
base1.ImportExpression = function(node, st, c) {
    c(node.source, st, "Expression");
};
base1.ImportSpecifier = base1.ImportDefaultSpecifier = base1.ImportNamespaceSpecifier = base1.Identifier = base1.Literal = ignore;
base1.TaggedTemplateExpression = function(node, st, c) {
    c(node.tag, st, "Expression");
    c(node.quasi, st, "Expression");
};
base1.ClassDeclaration = base1.ClassExpression = function(node, st, c) {
    return c(node, st, "Class");
};
base1.Class = function(node, st, c) {
    if (node.id) {
        c(node.id, st, "Pattern");
    }
    if (node.superClass) {
        c(node.superClass, st, "Expression");
    }
    c(node.body, st);
};
base1.ClassBody = function(node, st, c) {
    for(var i1 = 0, list = node.body; i1 < list.length; i1 += 1){
        var elt = list[i1];
        c(elt, st);
    }
};
base1.MethodDefinition = base1.Property = function(node, st, c) {
    if (node.computed) {
        c(node.key, st, "Expression");
    }
    c(node.value, st, "Expression");
};
var defaultGlobals = new Set([
    "Array",
    "ArrayBuffer",
    "atob",
    "AudioContext",
    "Blob",
    "Boolean",
    "BigInt",
    "btoa",
    "clearInterval",
    "clearTimeout",
    "console",
    "crypto",
    "CustomEvent",
    "DataView",
    "Date",
    "decodeURI",
    "decodeURIComponent",
    "devicePixelRatio",
    "document",
    "encodeURI",
    "encodeURIComponent",
    "Error",
    "escape",
    "eval",
    "fetch",
    "File",
    "FileList",
    "FileReader",
    "Float32Array",
    "Float64Array",
    "Function",
    "Headers",
    "Image",
    "ImageData",
    "Infinity",
    "Int16Array",
    "Int32Array",
    "Int8Array",
    "Intl",
    "isFinite",
    "isNaN",
    "JSON",
    "Map",
    "Math",
    "NaN",
    "Number",
    "navigator",
    "Object",
    "parseFloat",
    "parseInt",
    "performance",
    "Path2D",
    "Promise",
    "Proxy",
    "RangeError",
    "ReferenceError",
    "Reflect",
    "RegExp",
    "cancelAnimationFrame",
    "requestAnimationFrame",
    "Set",
    "setInterval",
    "setTimeout",
    "String",
    "Symbol",
    "SyntaxError",
    "TextDecoder",
    "TextEncoder",
    "this",
    "TypeError",
    "Uint16Array",
    "Uint32Array",
    "Uint8Array",
    "Uint8ClampedArray",
    "undefined",
    "unescape",
    "URIError",
    "URL",
    "WeakMap",
    "WeakSet",
    "WebSocket",
    "Worker",
    "window"
]);
var walk = make({
    Import () {},
    ViewExpression (node, st, c) {
        c(node.id, st, "Identifier");
    },
    MutableExpression (node, st, c) {
        c(node.id, st, "Identifier");
    }
});
function isScope(node) {
    return node.type === "FunctionExpression" || node.type === "FunctionDeclaration" || node.type === "ArrowFunctionExpression" || node.type === "Program";
}
function isBlockScope(node) {
    return node.type === "BlockStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || isScope(node);
}
function declaresArguments(node) {
    return node.type === "FunctionExpression" || node.type === "FunctionDeclaration";
}
function findReferences(cell, globals) {
    const ast = {
        type: "Program",
        body: [
            cell.body
        ]
    };
    const locals = new Map();
    const globalSet = new Set(globals);
    const references = [];
    function hasLocal(node, name) {
        const l1 = locals.get(node);
        return l1 ? l1.has(name) : false;
    }
    function declareLocal(node, id) {
        const l1 = locals.get(node);
        if (l1) l1.add(id.name);
        else locals.set(node, new Set([
            id.name
        ]));
    }
    function declareClass(node) {
        if (node.id) declareLocal(node, node.id);
    }
    function declareFunction(node) {
        node.params.forEach((param)=>declarePattern(param, node));
        if (node.id) declareLocal(node, node.id);
    }
    function declareCatchClause(node) {
        if (node.param) declarePattern(node.param, node);
    }
    function declarePattern(node, parent) {
        switch(node.type){
            case "Identifier":
                declareLocal(parent, node);
                break;
            case "ObjectPattern":
                node.properties.forEach((node2)=>declarePattern(node2, parent));
                break;
            case "ArrayPattern":
                node.elements.forEach((node2)=>node2 && declarePattern(node2, parent));
                break;
            case "Property":
                declarePattern(node.value, parent);
                break;
            case "RestElement":
                declarePattern(node.argument, parent);
                break;
            case "AssignmentPattern":
                declarePattern(node.left, parent);
                break;
            default:
                throw new Error("Unrecognized pattern type: " + node.type);
        }
    }
    function declareModuleSpecifier(node) {
        declareLocal(ast, node.local);
    }
    ancestor(ast, {
        VariableDeclaration: (node, parents)=>{
            let parent = null;
            for(let i1 = parents.length - 1; i1 >= 0 && parent === null; --i1){
                if (node.kind === "var" ? isScope(parents[i1]) : isBlockScope(parents[i1])) {
                    parent = parents[i1];
                }
            }
            node.declarations.forEach((declaration)=>declarePattern(declaration.id, parent));
        },
        FunctionDeclaration: (node, parents)=>{
            let parent = null;
            for(let i1 = parents.length - 2; i1 >= 0 && parent === null; --i1){
                if (isScope(parents[i1])) {
                    parent = parents[i1];
                }
            }
            declareLocal(parent, node.id);
            declareFunction(node);
        },
        Function: declareFunction,
        ClassDeclaration: (node, parents)=>{
            let parent = null;
            for(let i1 = parents.length - 2; i1 >= 0 && parent === null; i1--){
                if (isScope(parents[i1])) {
                    parent = parents[i1];
                }
            }
            declareLocal(parent, node.id);
        },
        Class: declareClass,
        CatchClause: declareCatchClause,
        ImportDefaultSpecifier: declareModuleSpecifier,
        ImportSpecifier: declareModuleSpecifier,
        ImportNamespaceSpecifier: declareModuleSpecifier
    }, walk);
    function identifier(node, parents) {
        let name = node.name;
        if (name === "undefined") return;
        for(let i1 = parents.length - 2; i1 >= 0; --i1){
            if (name === "arguments") {
                if (declaresArguments(parents[i1])) {
                    return;
                }
            }
            if (hasLocal(parents[i1], name)) {
                return;
            }
            if (parents[i1].type === "ViewExpression") {
                node = parents[i1];
                name = `viewof ${node.id.name}`;
            }
            if (parents[i1].type === "MutableExpression") {
                node = parents[i1];
                name = `mutable ${node.id.name}`;
            }
        }
        if (!globalSet.has(name)) {
            if (name === "arguments") {
                throw Object.assign(new SyntaxError(`arguments is not allowed`), {
                    node
                });
            }
            references.push(node);
        }
    }
    ancestor(ast, {
        VariablePattern: identifier,
        Identifier: identifier
    }, walk);
    function checkConst(node, parents) {
        if (!node) return;
        switch(node.type){
            case "Identifier":
            case "VariablePattern":
                {
                    for (const parent of parents){
                        if (hasLocal(parent, node.name)) {
                            return;
                        }
                    }
                    if (parents[parents.length - 2].type === "MutableExpression") {
                        return;
                    }
                    throw Object.assign(new SyntaxError(`Assignment to constant variable ${node.name}`), {
                        node
                    });
                }
            case "ArrayPattern":
                {
                    for (const element of node.elements){
                        checkConst(element, parents);
                    }
                    return;
                }
            case "ObjectPattern":
                {
                    for (const property of node.properties){
                        checkConst(property, parents);
                    }
                    return;
                }
            case "Property":
                {
                    checkConst(node.value, parents);
                    return;
                }
            case "RestElement":
                {
                    checkConst(node.argument, parents);
                    return;
                }
        }
    }
    function checkConstArgument(node, parents) {
        checkConst(node.argument, parents);
    }
    function checkConstLeft(node, parents) {
        checkConst(node.left, parents);
    }
    ancestor(ast, {
        AssignmentExpression: checkConstLeft,
        AssignmentPattern: checkConstLeft,
        UpdateExpression: checkConstArgument,
        ForOfStatement: checkConstLeft,
        ForInStatement: checkConstLeft
    }, walk);
    return references;
}
function findFeatures(cell, featureName) {
    const ast = {
        type: "Program",
        body: [
            cell.body
        ]
    };
    const features = new Map();
    const { references  } = cell;
    simple(ast, {
        CallExpression: (node)=>{
            const { callee , arguments: args  } = node;
            if (callee.type !== "Identifier" || callee.name !== featureName || references.indexOf(callee) < 0) return;
            if (args.length !== 1 || !(args[0].type === "Literal" && /^['"]/.test(args[0].raw) || args[0].type === "TemplateLiteral" && args[0].expressions.length === 0)) {
                throw Object.assign(new SyntaxError(`${featureName} requires a single literal string argument`), {
                    node
                });
            }
            const [arg] = args;
            const name = arg.type === "Literal" ? arg.value : arg.quasis[0].value.cooked;
            const location = {
                start: arg.start,
                end: arg.end
            };
            if (features.has(name)) features.get(name).push(location);
            else features.set(name, [
                location
            ]);
        }
    }, walk);
    return features;
}
Symbol("start");
Symbol("modifier");
Symbol("function");
Symbol("name");
class CellParser extends Parser {
    constructor(options, ...args){
        super(Object.assign({
            ecmaVersion: 12
        }, options), ...args);
    }
    enterScope(flags) {
        if (flags & 2) ++this.O_function;
        return super.enterScope(flags);
    }
    exitScope() {
        if (this.currentScope().flags & 2) --this.O_function;
        return super.exitScope();
    }
    parseForIn(node, init) {
        if (this.O_function === 1 && node.await) this.O_async = true;
        return super.parseForIn(node, init);
    }
    parseAwait() {
        if (this.O_function === 1) this.O_async = true;
        return super.parseAwait();
    }
    parseYield(noIn) {
        if (this.O_function === 1) this.O_generator = true;
        return super.parseYield(noIn);
    }
    parseImport(node) {
        this.next();
        node.specifiers = this.parseImportSpecifiers();
        if (this.type === types1._with) {
            this.next();
            node.injections = this.parseImportSpecifiers();
        }
        this.expectContextual("from");
        node.source = this.type === types1.string ? this.parseExprAtom() : this.unexpected();
        return this.finishNode(node, "ImportDeclaration");
    }
    parseImportSpecifiers() {
        const nodes = [];
        const identifiers = new Set();
        let first = true;
        this.expect(types1.braceL);
        while(!this.eat(types1.braceR)){
            if (first) {
                first = false;
            } else {
                this.expect(types1.comma);
                if (this.afterTrailingComma(types1.braceR)) break;
            }
            const node = this.startNode();
            node.view = this.eatContextual("viewof");
            node.mutable = node.view ? false : this.eatContextual("mutable");
            node.imported = this.parseIdent();
            this.checkUnreserved(node.imported);
            this.checkLocal(node.imported);
            if (this.eatContextual("as")) {
                node.local = this.parseIdent();
                this.checkUnreserved(node.local);
                this.checkLocal(node.local);
            } else {
                node.local = node.imported;
            }
            this.checkLVal(node.local, "let");
            if (identifiers.has(node.local.name)) {
                this.raise(node.local.start, `Identifier '${node.local.name}' has already been declared`);
            }
            identifiers.add(node.local.name);
            nodes.push(this.finishNode(node, "ImportSpecifier"));
        }
        return nodes;
    }
    parseExprAtom(refDestructuringErrors) {
        return this.parseMaybeKeywordExpression("viewof", "ViewExpression") || this.parseMaybeKeywordExpression("mutable", "MutableExpression") || super.parseExprAtom(refDestructuringErrors);
    }
    startCell() {
        this.O_function = 0;
        this.O_async = false;
        this.O_generator = false;
        this.strict = true;
        this.enterScope(2 | 4 | 8);
    }
    finishCell(node, body, id) {
        if (id) this.checkLocal(id);
        node.id = id;
        node.body = body;
        node.async = this.O_async;
        node.generator = this.O_generator;
        this.exitScope();
        return this.finishNode(node, "Cell");
    }
    parseCell(node, eof) {
        const lookahead = new CellParser({}, this.input, this.start);
        let token = lookahead.getToken();
        let body = null;
        let id = null;
        this.startCell();
        if (token.type === types1._import && lookahead.getToken().type !== types1.parenL) {
            body = this.parseImport(this.startNode());
        } else if (token.type !== types1.eof && token.type !== types1.semi) {
            if (token.type === types1.name) {
                if (token.value === "viewof" || token.value === "mutable") {
                    token = lookahead.getToken();
                    if (token.type !== types1.name) {
                        lookahead.unexpected();
                    }
                }
                token = lookahead.getToken();
                if (token.type === types1.eq) {
                    id = this.parseMaybeKeywordExpression("viewof", "ViewExpression") || this.parseMaybeKeywordExpression("mutable", "MutableExpression") || this.parseIdent();
                    token = lookahead.getToken();
                    this.expect(types1.eq);
                }
            }
            if (token.type === types1.braceL) {
                body = this.parseBlock();
            } else {
                body = this.parseExpression();
                if (id === null && (body.type === "FunctionExpression" || body.type === "ClassExpression")) {
                    id = body.id;
                }
            }
        }
        this.semicolon();
        if (eof) this.expect(types1.eof);
        return this.finishCell(node, body, id);
    }
    parseTopLevel(node) {
        return this.parseCell(node, true);
    }
    toAssignable(node, isBinding, refDestructuringErrors) {
        return node.type === "MutableExpression" ? node : super.toAssignable(node, isBinding, refDestructuringErrors);
    }
    checkLocal(id) {
        const node = id.id || id;
        if (defaultGlobals.has(node.name) || node.name === "arguments") {
            this.raise(node.start, `Identifier '${node.name}' is reserved`);
        }
    }
    checkUnreserved(node) {
        if (node.name === "viewof" || node.name === "mutable") {
            this.raise(node.start, `Unexpected keyword '${node.name}'`);
        }
        return super.checkUnreserved(node);
    }
    checkLVal(expr, bindingType, checkClashes) {
        return super.checkLVal(expr.type === "MutableExpression" ? expr.id : expr, bindingType, checkClashes);
    }
    unexpected(pos) {
        this.raise(pos != null ? pos : this.start, this.type === types1.eof ? "Unexpected end of input" : "Unexpected token");
    }
    parseMaybeKeywordExpression(keyword, type) {
        if (this.isContextual(keyword)) {
            const node = this.startNode();
            this.next();
            node.id = this.parseIdent();
            return this.finishNode(node, type);
        }
    }
}
new TokContext("`", true, true, (parser)=>readTemplateToken.call(parser));
function readTemplateToken() {
    out: for(; this.pos < this.input.length; this.pos++){
        switch(this.input.charCodeAt(this.pos)){
            case 92:
                {
                    if (this.pos < this.input.length - 1) ++this.pos;
                    break;
                }
            case 36:
                {
                    if (this.input.charCodeAt(this.pos + 1) === 123) {
                        if (this.pos === this.start && this.type === types1.invalidTemplate) {
                            this.pos += 2;
                            return this.finishToken(types1.dollarBraceL);
                        }
                        break out;
                    }
                    break;
                }
        }
    }
    return this.finishToken(types1.invalidTemplate, this.input.slice(this.start, this.pos));
}
function parseModule(input, { globals  } = {}) {
    const program = ModuleParser.parse(input);
    for (const cell of program.cells){
        parseReferences(cell, input, globals);
        parseFeatures(cell, input);
    }
    return program;
}
class ModuleParser extends CellParser {
    parseTopLevel(node) {
        if (!node.cells) node.cells = [];
        while(this.type !== types1.eof){
            const cell = this.parseCell(this.startNode());
            cell.input = this.input;
            node.cells.push(cell);
        }
        this.next();
        return this.finishNode(node, "Program");
    }
}
function parseReferences(cell, input, globals = defaultGlobals) {
    if (!cell.body) {
        cell.references = [];
    } else if (cell.body.type === "ImportDeclaration") {
        cell.references = cell.body.injections ? cell.body.injections.map((i1)=>i1.imported) : [];
    } else {
        try {
            cell.references = findReferences(cell, globals);
        } catch (error) {
            if (error.node) {
                const loc = getLineInfo(input, error.node.start);
                error.message += ` (${loc.line}:${loc.column})`;
                error.pos = error.node.start;
                error.loc = loc;
                delete error.node;
            }
            throw error;
        }
    }
    return cell;
}
function parseFeatures(cell, input) {
    if (cell.body && cell.body.type !== "ImportDeclaration") {
        try {
            cell.fileAttachments = findFeatures(cell, "FileAttachment");
            cell.databaseClients = findFeatures(cell, "DatabaseClient");
            cell.secrets = findFeatures(cell, "Secret");
        } catch (error) {
            if (error.node) {
                const loc = getLineInfo(input, error.node.start);
                error.message += ` (${loc.line}:${loc.column})`;
                error.pos = error.node.start;
                error.loc = loc;
                delete error.node;
            }
            throw error;
        }
    } else {
        cell.fileAttachments = new Map();
        cell.databaseClients = new Map();
        cell.secrets = new Map();
    }
    return cell;
}
async function esbuildCompile(input, workingDir, args, format) {
    format = format ?? "esm";
    const fullArgs = [
        "--bundle",
        `--format=${format}`,
        ...args || [], 
    ];
    return await esbuildCommand(fullArgs, input, workingDir);
}
async function esbuildCommand(args, input, workingDir) {
    const cmd = [
        Deno.env.get("QUARTO_ESBUILD") || toolsPath("esbuild"),
        ...args, 
    ];
    const result1 = await execProcess({
        cmd,
        cwd: workingDir,
        stdout: "piped"
    }, input);
    if (result1.success) {
        return result1.stdout;
    } else {
        throw new Error("esbuild command failed");
    }
}
const walkerBase = make({
    Import () {},
    ViewExpression (node, st, c) {
        c(node.id, st, "Identifier");
    },
    MutableExpression (node, st, c) {
        c(node.id, st, "Identifier");
    },
    Cell (node, st, c) {
        c(node.body, st);
    },
    Program (node, st, c) {
        if (node.body) {
            for(let i1 = 0, list = node.body; i1 < list.length; i1 += 1){
                const stmt = list[i1];
                c(stmt, st, "Statement");
            }
        } else if (node.cells) {
            for(let i11 = 0, list1 = node.cells; i11 < list1.length; i11 += 1){
                const stmt1 = list1[i11];
                c(stmt1, st);
            }
        } else {
            error("I don't know how to walk this node", node);
            throw new Error("Internal error while walking OJS source");
        }
    }
});
function ojsSimpleWalker(parse, visitor) {
    simple(parse, visitor, walkerBase);
}
function resolveResourceFilename(resource, rootDir) {
    if (resource.pathType == "relative") {
        const result1 = resolve2(rootDir, dirname2(resource.referent), resource.filename);
        return result1;
    } else if (resource.pathType === "root-relative") {
        const result11 = resolve2(rootDir, dirname2(resource.referent), `.${resource.filename}`);
        return result11;
    } else {
        throw new Error(`Unrecognized pathType ${resource.pathType}`);
    }
}
function uniqueResources(resourceList) {
    const result1 = [];
    const uniqResources = new Map();
    for (const resource of resourceList){
        if (!uniqResources.has(resource.filename)) {
            result1.push(resource);
            uniqResources.set(resource.filename, resource);
        }
    }
    return result1;
}
const resolveES6Path = (path, originDir, projectRoot)=>{
    if (path.startsWith("/")) {
        if (projectRoot === undefined) {
            return {
                pathType: "root-relative",
                resolvedImportPath: resolve2(originDir, `.${path}`)
            };
        } else {
            return {
                pathType: "root-relative",
                resolvedImportPath: resolve2(projectRoot, `.${path}`)
            };
        }
    } else {
        return {
            pathType: "relative",
            resolvedImportPath: resolve2(originDir, path)
        };
    }
};
const localImports = (parse)=>{
    const result1 = [];
    ojsSimpleWalker(parse, {
        ExportNamedDeclaration (node) {
            if (node.source?.value) {
                const source = node.source?.value;
                if (source.startsWith("/") || source.startsWith(".")) {
                    result1.push(source);
                }
            }
        },
        ImportDeclaration (node) {
            const source = node.source?.value;
            if (source.startsWith("/") || source.startsWith(".")) {
                result1.push(source);
            }
        }
    });
    return result1;
};
async function directDependencies(source, fileDir, language, projectRoot) {
    let ast;
    if (language === "js") {
        try {
            ast = parse31(source.value, {
                ecmaVersion: "2020",
                sourceType: "module"
            });
        } catch (e) {
            if (!(e instanceof SyntaxError)) {
                throw e;
            }
            return [];
        }
    } else if (language === "ojs") {
        try {
            ast = parseModule(source.value);
        } catch (e1) {
            if (!(e1 instanceof SyntaxError)) throw e1;
            return [];
        }
    } else {
        const ojsCellsSrc = (await breakQuartoMd(source)).cells.filter((cell)=>cell.cell_type !== "markdown" && cell.cell_type !== "raw" && cell.cell_type?.language === "ojs").flatMap((v)=>v.source);
        return await directDependencies(mappedConcat(ojsCellsSrc), fileDir, "ojs", projectRoot);
    }
    return localImports(ast).map((importPath)=>{
        const { resolvedImportPath , pathType  } = resolveES6Path(importPath, fileDir, projectRoot);
        return {
            resolvedImportPath,
            pathType,
            importPath
        };
    });
}
async function extractResolvedResourceFilenamesFromQmd(markdown, mdDir, projectRoot) {
    const pageResources = [];
    for (const cell of (await breakQuartoMd(markdown)).cells){
        if (cell.cell_type !== "markdown" && cell.cell_type !== "raw" && cell.cell_type?.language === "ojs") {
            pageResources.push(...await extractResourceDescriptionsFromOJSChunk(cell.source, mdDir, projectRoot));
        }
    }
    const result1 = new Set();
    for (const resource of uniqueResources(pageResources)){
        result1.add(resolveResourceFilename(resource, Deno.cwd()));
    }
    return Array.from(result1);
}
const literalFileAttachments = (parse)=>{
    const result1 = [];
    ojsSimpleWalker(parse, {
        CallExpression (node) {
            if (node.callee?.type !== "Identifier") {
                return;
            }
            if (node.callee?.name !== "FileAttachment") {
                return;
            }
            const args = node.arguments || [];
            if (args.length < 1) {
                return;
            }
            if (args[0]?.type !== "Literal") {
                return;
            }
            result1.push(args[0]?.value);
        }
    });
    return result1;
};
async function resolveImport(file, referent, projectRoot, mdDir, visited) {
    visited = visited ?? new Set();
    let source;
    const createdResources = [];
    if (!file.endsWith(".ts") && !file.endsWith(".tsx")) {
        try {
            source = Deno.readTextFileSync(file);
        } catch (_e) {
            error(`OJS dependency ${file} (from ${referent}) not found.`);
            throw new Error();
        }
        return {
            source,
            createdResources
        };
    }
    projectRoot = projectRoot ?? dirname2(referent);
    const deno = Deno.env.get("_");
    const p = Deno.run({
        cmd: [
            deno,
            "check",
            file,
            "-c",
            resourcePath("conf/deno-ts-compile.jsonc"),
            `--importmap=${resourcePath("conf/jsx-import-map.json")}`, 
        ],
        stderr: "piped"
    });
    const [status, stderr] = await Promise.all([
        p.status(),
        p.stderrOutput()
    ]);
    if (!status.success) {
        error("Compilation of typescript dependencies in ojs cell failed.");
        let errStr = new TextDecoder().decode(stderr);
        const errorLines = lines(stripColor2(errStr));
        const denoBugErrorLines = errorLines.map((l1, i1)=>({
                text: l1,
                line: i1
            })).filter((x)=>x.text.trim().indexOf("TS7026 [ERROR]: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.") !== -1);
        console.log(errorLines);
        const errorCountRe = /^Found (\d+) errors.$/;
        const errorCount = Number((errorLines.filter((x)=>x.trim().match(errorCountRe))[0] ?? "Found 1 errors.").match(errorCountRe)[1]);
        if (denoBugErrorLines.length > 0) {
            const m = errorLines[denoBugErrorLines[0].line + 3].trim().match(/^.*(file:.+):\d+:\d+$/);
            if (m === null) {
                console.log(errStr);
                throw new Error();
            }
            const badFile = fromFileUrl2(m[1]);
            const badContents = Deno.readTextFileSync(badFile);
            if (!badContents.startsWith("/** @jsxImportSource quarto-tsx */")) {
                console.log(`
File ${red1(badFile)} must start with

${yellow1("/** @jsxImportSource quarto-tsx */")}

We apologize for the inconvenience; this is a temporary workaround for an upstream bug.
`);
            }
            if (denoBugErrorLines.length !== errorCount) {
                console.log(`Other compilation errors follow below.\n`);
                let colorErrorLines = lines(errStr);
                for(let i1 = denoBugErrorLines.length - 1; i1 >= 0; i1--){
                    colorErrorLines.splice(denoBugErrorLines[i1].line, 5);
                }
                colorErrorLines = colorErrorLines.map((line)=>{
                    if (line.match(errorCountRe)) {
                        return `Found ${errorCount - denoBugErrorLines.length} errors.`;
                    }
                    return line;
                });
                errStr = colorErrorLines.slice(1).join("\n");
            }
            throw new Error();
        }
        console.log(errStr);
        throw new Error();
    }
    const localFile = file.replace(/[.]ts$/, ".js").replace(/[.]tsx$/, ".js");
    const fileDir = dirname2(localFile);
    if (!fileDir.startsWith(resolve2(projectRoot))) {
        error(`ERROR: File ${file} has typescript import dependency ${localFile},
outside of main folder ${resolve2(projectRoot)}. 
quarto will only generate javascript files in ${resolve2(projectRoot)} or subfolders.`);
        throw new Error();
    }
    const jsSource = await esbuildCommand([
        file,
        "--format=esm",
        "--sourcemap=inline",
        "--jsx-factory=window._ojs.jsx.createElement", 
    ], "", fileDir);
    if (typeof jsSource === "undefined") {
        throw new Error(`Internal error: esbuild compilation of file ${file} failed`);
    }
    let fixedSource = jsSource;
    const ast = parse31(jsSource, {
        sourceType: "module"
    });
    const recursionList = [];
    const patchDeclaration = (node)=>{
        if (node.source?.value.endsWith(".ts") || node.source?.value.endsWith(".tsx")) {
            recursionList.push(node.source.value);
            const rawReplacement = JSON.stringify(node.source.value.replace(/[.]ts$/, ".js").replace(/[.]tsx$/, ".js"));
            fixedSource = fixedSource.substring(0, node.source.start) + rawReplacement + fixedSource.slice(node.source.end);
        }
    };
    ojsSimpleWalker(ast, {
        ExportNamedDeclaration: patchDeclaration,
        ImportDeclaration: patchDeclaration
    });
    for (const tsImport of recursionList){
        if (!visited.has(tsImport)) {
            visited.add(tsImport);
            const { createdResources: recursionCreatedResources  } = await resolveImport(resolve2(dirname2(file), tsImport), file, projectRoot, mdDir, visited);
            createdResources.push(...recursionCreatedResources);
        }
    }
    const transformedSource = fixedSource;
    Deno.writeTextFileSync(localFile, transformedSource);
    createdResources.push({
        pathType: "relative",
        resourceType: "import",
        referent,
        filename: resolve2(dirname2(referent), localFile),
        importPath: `./${relative2(resolve2(mdDir), localFile)}`
    });
    source = Deno.readTextFileSync(localFile);
    return {
        source,
        createdResources
    };
}
async function extractResourceDescriptionsFromOJSChunk(ojsSource, mdDir, projectRoot) {
    let result1 = [];
    const handled = new Set();
    const imports = new Map();
    const rootReferent = `${mdDir}/<<root>>.qmd`;
    for (const { resolvedImportPath , pathType , importPath  } of (await directDependencies(ojsSource, mdDir, "ojs", projectRoot))){
        if (!imports.has(resolvedImportPath)) {
            const v = {
                filename: resolvedImportPath,
                referent: rootReferent,
                pathType,
                importPath,
                resourceType: "import"
            };
            result1.push(v);
            imports.set(resolvedImportPath, v);
        }
    }
    while(imports.size > 0){
        const [thisResolvedImportPath, importResource] = imports.entries().next().value;
        imports.delete(thisResolvedImportPath);
        if (handled.has(thisResolvedImportPath)) {
            continue;
        }
        handled.add(thisResolvedImportPath);
        const resolvedImport = await resolveImport(thisResolvedImportPath, importResource.referent, projectRoot, mdDir);
        if (resolvedImport === undefined) {
            console.error(`WARNING: While following dependencies, could not resolve reference:`);
            console.error(`  Reference: ${importResource.importPath}`);
            console.error(`  In file: ${importResource.referent}`);
            continue;
        }
        const source = resolvedImport.source;
        result1.push(...resolvedImport.createdResources);
        if (projectRoot) {
            getNamedLifetime("render-services").attach({
                cleanup () {
                    for (const res of resolvedImport.createdResources){
                        try {
                            Deno.removeSync(res.filename);
                        } catch (e) {
                            if (e.name !== "NotFound") {
                                throw e;
                            }
                        }
                    }
                    return;
                }
            });
        }
        let language;
        if (thisResolvedImportPath.endsWith(".js") || thisResolvedImportPath.endsWith(".ts") || thisResolvedImportPath.endsWith(".tsx")) {
            language = "js";
        } else if (thisResolvedImportPath.endsWith(".ojs")) {
            language = "ojs";
        } else if (thisResolvedImportPath.endsWith(".qmd")) {
            language = "qmd";
        } else {
            throw new Error(`Unknown language in file "${thisResolvedImportPath}"`);
        }
        for (const { resolvedImportPath: resolvedImportPath1 , pathType: pathType1 , importPath: importPath1  } of (await directDependencies(asMappedString(source), dirname2(thisResolvedImportPath), language, projectRoot))){
            if (!imports.has(resolvedImportPath1)) {
                const v1 = {
                    filename: resolvedImportPath1,
                    referent: thisResolvedImportPath,
                    pathType: pathType1,
                    importPath: importPath1,
                    resourceType: "import"
                };
                result1.push(v1);
                imports.set(resolvedImportPath1, v1);
            }
        }
    }
    const fileAttachments = [];
    for (const importFile of result1){
        if (importFile.filename.endsWith(".ojs")) {
            try {
                const ast = parseModule(Deno.readTextFileSync(importFile.filename));
                for (const attachment of literalFileAttachments(ast)){
                    fileAttachments.push({
                        filename: attachment,
                        referent: importFile.filename
                    });
                }
            } catch (e) {
                if (!(e instanceof SyntaxError)) {
                    throw e;
                }
            }
        }
    }
    try {
        const ast1 = parseModule(ojsSource.value);
        for (const attachment1 of literalFileAttachments(ast1)){
            fileAttachments.push({
                filename: attachment1,
                referent: rootReferent
            });
        }
    } catch (e1) {
        if (!(e1 instanceof SyntaxError)) {
            throw e1;
        }
    }
    result1 = result1.filter((description)=>!description.filename.endsWith(".qmd") && !description.filename.endsWith(".ts") && !description.filename.endsWith(".tsx"));
    result1 = result1.map((description)=>{
        const { referent , resourceType , importPath , pathType  } = description;
        let relName = relative2(mdDir, description.filename);
        if (!relName.startsWith(".")) {
            relName = `./${relName}`;
        }
        return {
            filename: relName,
            referent,
            importPath,
            pathType,
            resourceType
        };
    });
    result1.push(...fileAttachments.map(({ filename , referent  })=>{
        let pathType;
        if (filename.startsWith("/")) {
            pathType = "root-relative";
        } else {
            pathType = "relative";
        }
        return {
            referent,
            filename,
            pathType,
            resourceType: "FileAttachment"
        };
    }));
    return result1;
}
async function makeSelfContainedResources(resourceList, wd) {
    const asDataURL = (content, mimeType)=>{
        const b64Src = encode(content);
        return `data:${mimeType};base64,${b64Src}`;
    };
    const uniqResources = uniqueResources(resourceList);
    const jsFiles = uniqResources.filter((r)=>r.resourceType === "import" && r.filename.endsWith(".js"));
    const ojsFiles = uniqResources.filter((r)=>r.resourceType === "import" && r.filename.endsWith("ojs"));
    const attachments = uniqResources.filter((r)=>r.resourceType !== "import");
    const jsModuleResolves = [];
    if (jsFiles.length > 0) {
        const bundleInput = jsFiles.map((r)=>`export * from "${r.filename}";`).join("\n");
        const es6BundledModule = await esbuildCompile(bundleInput, wd, [
            "--target=es2018"
        ]);
        const jsModule = asDataURL(es6BundledModule, "application/javascript");
        jsModuleResolves.push(...jsFiles.map((f)=>[
                f.importPath,
                jsModule
            ]));
    }
    const result1 = [
        ...jsModuleResolves,
        ...ojsFiles.map((f)=>[
                f.importPath,
                asDataURL(Deno.readTextFileSync(f.filename), "application/ojs-javascript"), 
            ]),
        ...attachments.map((f)=>{
            const resolvedFileName = resolveResourceFilename(f, Deno.cwd());
            const mimeType = lookup1(resolvedFileName) || "application/octet-stream";
            return [
                f.filename,
                asDataURL(Deno.readFileSync(resolvedFileName).buffer, mimeType), 
            ];
        }), 
    ];
    return result1;
}
function resourcesFromMetadata(resourcesMetadata) {
    const resources = [];
    if (resourcesMetadata) {
        if (Array.isArray(resourcesMetadata)) {
            for (const file of resourcesMetadata){
                resources.push(String(file));
            }
        } else {
            resources.push(String(resourcesMetadata));
        }
    }
    return resources;
}
async function resolveFileResources(rootDir, fileDir, excludeDirs, markdown, globs, skipOjsDiscovery) {
    const ignore = engineIgnoreGlobs().concat(kQuartoScratch + "/").concat([
        "**/.*",
        "**/.*/**"
    ]).concat(...excludeDirs);
    const resources = resolvePathGlobs(fileDir, globs, ignore);
    if (markdown.length > 0 && !skipOjsDiscovery) {
        resources.include.push(...await extractResolvedResourceFilenamesFromQmd(asMappedString(markdown), fileDir, rootDir));
    }
    return resources;
}
function resourceFilesFromRenderedFile(baseDir, excludeDirs, renderedFile, partitioned) {
    return resourceFilesFromFile(baseDir, excludeDirs, renderedFile.file, renderedFile.resourceFiles, renderedFile.selfContained, renderedFile.supporting, partitioned, true);
}
async function resourceFilesFromFile(baseDir, excludeDirs, file, resources, selfContained, supporting, partitioned, skipOjsDiscovery) {
    const resourceDir = join3(baseDir, dirname2(file));
    const markdown = partitioned ? partitioned.markdown : "";
    const globs = resources.globs;
    const fileResourceFiles = await resolveFileResources(baseDir, resourceDir, excludeDirs, markdown, globs, skipOjsDiscovery);
    if (!selfContained) {
        const resultFiles = resources.files.map((file)=>join3(resourceDir, file)).filter(existsSync).map(Deno.realPathSync);
        fileResourceFiles.include.push(...resultFiles);
    }
    const resourceFiles = fileResourceFiles.include.filter((file)=>{
        if (fileResourceFiles.exclude.includes(file)) {
            return false;
        } else if (supporting && supporting.some((support)=>file.startsWith(join3(baseDir, support)))) {
            return false;
        } else {
            return true;
        }
    });
    return resourceFiles;
}
async function dartCompile(input, outputFilePath, temp, loadPaths, compressed) {
    const inputFilePath = temp.createFile({
        suffix: ".scss"
    });
    Deno.writeTextFileSync(inputFilePath, input);
    const args = [
        inputFilePath,
        outputFilePath,
        "--style",
        compressed ? "compressed" : "expanded", 
    ];
    if (loadPaths) {
        loadPaths.forEach((loadPath)=>{
            args.push(`--load-path=${loadPath}`);
        });
    }
    await dartCommand(args);
    return outputFilePath;
}
async function dartCommand(args) {
    const resolvePath = ()=>{
        const dartOverrideCmd = Deno.env.get("QUARTO_DART_SASS");
        if (dartOverrideCmd) {
            if (!existsSync(dartOverrideCmd)) {
                warnOnce(`Specified QUARTO_DART_SASS does not exist, using built in dart sass.`);
            } else {
                return dartOverrideCmd;
            }
        }
        const command = Deno.build.os === "windows" ? "sass.bat" : "sass";
        return toolsPath(join3("dart-sass", command));
    };
    const sass = resolvePath();
    const cmd = [
        sass,
        ...args, 
    ];
    const result1 = await execProcess({
        cmd,
        stdout: "piped",
        stderr: "piped"
    });
    if (result1.success) {
        if (result1.stderr) {
            info(result1.stderr);
        }
        return result1.stdout;
    } else {
        const errLines = lines(result1.stderr || "");
        const errMsg = errLines.slice(0, errLines.length - 2).join("\n");
        throw new Error("Theme file compilation failed:\n\n" + errMsg);
    }
}
function sassVariable(name, value, formatter) {
    return {
        name: name,
        value: formatter ? formatter(value) : value
    };
}
function outputVariable(variable, isDefault = true) {
    return `$${variable.name}: ${variable.value}${isDefault ? " !default" : ""};`;
}
async function compileSass(bundles, temp, minified = true) {
    const frameWorkUses = bundles.map((bundle)=>bundle.framework?.uses || "");
    const frameworkFunctions = bundles.map((bundle)=>bundle.framework?.functions || "");
    const frameworkDefaults = bundles.map((bundle)=>bundle.framework?.defaults || "");
    const frameworkRules = bundles.map((bundle)=>bundle.framework?.rules || "");
    const frameworkMixins = bundles.map((bundle)=>bundle.framework?.mixins || "");
    const quartoUses = bundles.map((bundle)=>bundle.quarto?.uses || "");
    const quartoFunctions = bundles.map((bundle)=>bundle.quarto?.functions || "");
    const quartoDefaults = bundles.map((bundle)=>bundle.quarto?.defaults || "");
    const quartoRules = bundles.map((bundle)=>bundle.quarto?.rules || "");
    const quartoMixins = bundles.map((bundle)=>bundle.quarto?.mixins || "");
    const userUses = bundles.map((bundle)=>bundle.user?.uses || "");
    const userFunctions = bundles.map((bundle)=>bundle.user?.functions || "");
    const userDefaults = bundles.map((bundle)=>bundle.user?.defaults || "");
    const userRules = bundles.map((bundle)=>bundle.user?.rules || "");
    const userMixins = bundles.map((bundle)=>bundle.user?.mixins || "");
    const loadPaths = [];
    bundles.forEach((bundle)=>{
        if (bundle.loadPaths) {
            loadPaths.push(...bundle.loadPaths);
        }
    });
    const scssInput = [
        ...frameWorkUses,
        ...quartoUses,
        ...userUses,
        ...frameworkFunctions,
        ...quartoFunctions,
        ...userFunctions,
        ...userDefaults.reverse(),
        ...quartoDefaults.reverse(),
        ...frameworkDefaults.reverse(),
        ...frameworkMixins,
        ...quartoMixins,
        ...userMixins,
        ...frameworkRules,
        ...quartoRules,
        ...userRules, 
    ].join("\n\n");
    const cacheKey = bundles.map((bundle)=>bundle.key).join("|") + "-" + (minified ? "min" : "nomin");
    return await compileWithCache(scssInput, loadPaths, temp, minified, cacheKey);
}
const layoutBoundary = "^\/\\*\\-\\-[ \\t]*scss:(uses|functions|rules|defaults|mixins)[ \\t]*\\-\\-\\*\\/$";
const kLayerBoundaryLine = RegExp(layoutBoundary);
const kLayerBoundaryTest = RegExp(layoutBoundary, "m");
function mergeLayers(...layers) {
    const themeUses = [];
    const themeDefaults = [];
    const themeRules = [];
    const themeFunctions = [];
    const themeMixins = [];
    layers.forEach((theme)=>{
        if (theme.uses) {
            themeUses.push(theme.uses);
        }
        if (theme.defaults) {
            themeDefaults.unshift(theme.defaults);
        }
        if (theme.rules) {
            themeRules.push(theme.rules);
        }
        if (theme.functions) {
            themeFunctions.push(theme.functions);
        }
        if (theme.mixins) {
            themeMixins.push(theme.mixins);
        }
    });
    return {
        uses: themeUses.join("\n"),
        defaults: themeDefaults.join("\n"),
        functions: themeFunctions.join("\n"),
        mixins: themeMixins.join("\n"),
        rules: themeRules.join("\n")
    };
}
function sassLayer(path) {
    if (Deno.statSync(path).isFile) {
        return sassLayerFile(path);
    } else {
        return sassLayerDir(path, {
            uses: "_use.scss",
            functions: "_functions.scss",
            defaults: "_defaults.scss",
            mixins: "_mixins.scss",
            rules: "_rules.scss"
        });
    }
}
function sassLayerFile(theme) {
    const rawContents = Deno.readTextFileSync(theme);
    return sassLayerStr(rawContents, theme);
}
function sassLayerStr(rawContents, errorHint) {
    if (!kLayerBoundaryTest.test(rawContents)) {
        throw new Error(`The file ${errorHint} doesn't contain at least one layer boundary (/*-- scss:defaults --*/, /*-- scss:rules --*/, /*-- scss:mixins --*/, /*-- scss:functions --*/, or /*-- scss:uses --*/)`);
    }
    const uses = [];
    const defaults = [];
    const rules = [];
    const functions = [];
    const mixins = [];
    let accum = defaults;
    lines(rawContents).forEach((line)=>{
        const scopeMatch = line.match(kLayerBoundaryLine);
        if (scopeMatch) {
            const scope = scopeMatch[1];
            switch(scope){
                case "uses":
                    accum = uses;
                    break;
                case "defaults":
                    accum = defaults;
                    break;
                case "rules":
                    accum = rules;
                    break;
                case "functions":
                    accum = functions;
                    break;
                case "mixins":
                    accum = mixins;
                    break;
            }
        } else {
            accum.push(line);
        }
    });
    return {
        uses: uses.join("\n"),
        defaults: defaults.join("\n"),
        rules: rules.join("\n"),
        mixins: mixins.join("\n"),
        functions: functions.join("\n")
    };
}
function sassLayerDir(dir, names) {
    const read = (path)=>{
        if (path) {
            path = join3(dir, path);
            if (existsSync(path)) {
                return Deno.readTextFileSync(path);
            } else {
                return "";
            }
        } else {
            return "";
        }
    };
    return {
        uses: read(names.uses),
        defaults: read(names.defaults),
        rules: read(names.rules),
        mixins: read(names.mixins),
        functions: read(names.functions)
    };
}
async function compileWithCache(input, loadPaths, temp, compressed, cacheIdentifier) {
    if (cacheIdentifier) {
        const identifierHash = md5Hash(cacheIdentifier);
        const inputHash = md5Hash(input);
        const cacheDir = quartoCacheDir("sass");
        const cacheIdxPath = join3(cacheDir, "index.json");
        const outputFile = `${identifierHash}.css`;
        const outputFilePath = join3(cacheDir, outputFile);
        let cacheIndex = {};
        let writeCache = true;
        if (existsSync(outputFilePath)) {
            cacheIndex = JSON.parse(Deno.readTextFileSync(cacheIdxPath));
            const existingEntry = cacheIndex[identifierHash];
            writeCache = !existingEntry || existingEntry.hash !== inputHash;
        }
        if (writeCache) {
            try {
                await dartCompile(input, outputFilePath, temp, loadPaths, compressed);
            } catch (error) {
                try {
                    Deno.removeSync(outputFilePath);
                } finally{}
                throw error;
            }
            cacheIndex[identifierHash] = {
                key: cacheIdentifier,
                hash: inputHash
            };
            Deno.writeTextFileSync(cacheIdxPath, JSON.stringify(cacheIndex));
        }
        return outputFilePath;
    } else {
        const outputFilePath1 = temp.createFile({
            suffix: ".css"
        });
        await dartCompile(input, outputFilePath1, temp, __VIRTUAL_FILE181(loadPaths), compressed);
        return outputFilePath1;
    }
}
function renderEjs(file, data, removeEmptyLines = true, cache = true) {
    const template = compileTemplate(file, removeEmptyLines, cache);
    return lines(template(data).trimLeft()).filter((line)=>!removeEmptyLines || line.trim().length > 0).join("\n") + "\n";
}
const compiledTemplates = new Map();
function compileTemplate(file, removeEmptyLines, cache = true) {
    if (!cache || !compiledTemplates.has(file)) {
        const template = `<% const partial = (file, data) => print(include(file, data)); %>
      ${Deno.readTextFileSync(file)}`;
        compiledTemplates.set(file, __VIRTUAL_FILE176(template, {
            imports: {
                include: (includeFile, includeData)=>{
                    return renderEjs(join3(dirname2(file), includeFile), includeData, removeEmptyLines);
                }
            }
        }));
    }
    return compiledTemplates.get(file);
}
function hasTableOfContents(flags, format) {
    return !!(flags[kToc] || format.pandoc[kToc] || format.pandoc[kTableOfContents]);
}
function disabledTableOfContents(format) {
    return format.pandoc[kToc] === false || format.pandoc[kTableOfContents] === false;
}
const kTabsets = "tabsets";
const kCodeCopy = "code-copy";
const kAnchorSections = "anchor-sections";
const kCitationsHover = "citations-hover";
const kFootnotesHover = "footnotes-hover";
const kSmoothScroll = "smooth-scroll";
const kMinimal = "minimal";
const kPageLayout = "page-layout";
const kPageLayoutArticle = "article";
const kPageLayoutCustom = "custom";
const kPageLayoutFull = "full";
const kComments = "comments";
const kHypothesis = "hypothesis";
const kUtterances = "utterances";
const kGiscus = "giscus";
const kGiscusRepoId = "repo-id";
const kGiscusCategoryId = "category-id";
const kDraft = "draft";
const kAppendixStyle = "appendix-style";
const kLicense = "license";
const kCitation = "citation";
const kDocumentCss = "document-css";
const kBootstrapDependencyName = "bootstrap";
const clipboardDependency = ()=>{
    const dependency = {
        name: "clipboard"
    };
    dependency.scripts = [];
    dependency.scripts.push({
        name: "clipboard.min.js",
        path: formatResourcePath("html", join3("clipboard", "clipboard.min.js"))
    });
    return dependency;
};
const bootstrapFunctions = ()=>{
    return Deno.readTextFileSync(join3(bootstrapResourceDir(), "_functions.scss"));
};
const bootstrapMixins = ()=>{
    return Deno.readTextFileSync(join3(bootstrapResourceDir(), "_mixins.scss"));
};
const bootstrapVariables = ()=>{
    return Deno.readTextFileSync(join3(bootstrapResourceDir(), "_variables.scss"));
};
const bootstrapRules = ()=>{
    return Deno.readTextFileSync(join3(bootstrapResourceDir(), "bootstrap.scss"));
};
const bootstrapResourceDir = ()=>{
    return formatResourcePath("html", join3("bootstrap", "dist", "scss"));
};
const sassUtilFunctions = (name)=>{
    const bootstrapDistDir = formatResourcePath("html", join3("bootstrap", "dist"));
    const path = join3(bootstrapDistDir, "sass-utils", name);
    return Deno.readTextFileSync(path);
};
const quartoRules = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-rules.scss"));
const quartoCopyCodeDefaults = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-variables-copy-code.scss"));
const quartoCopyCodeRules = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-rules-copy-code.scss"));
const quartoLinkExternalRules = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-rules-link-external.scss"));
const quartoCodeFilenameRules = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-rules-code-filename.scss"));
const quartoTabbyRules = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-rules-tabby.scss"));
const quartoFigResponsiveRules = ()=>{
    return [
        ".img-fluid {",
        "  max-width: 100%;",
        "  height: auto;",
        "}", 
    ].join("\n");
};
const quartoGlobalCssVariableRules = ()=>{
    return `
  $font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
  /*! quarto-variables-start */
  :root {
    --quarto-font-monospace: #{inspect($font-family-monospace)};
  }
  /*! quarto-variables-end */
  `;
};
const quartoBootstrapCustomizationLayer = ()=>{
    const path = formatResourcePath("html", join3("bootstrap", "_bootstrap-customize.scss"));
    return sassLayer(path);
};
const quartoBootstrapRules = ()=>Deno.readTextFileSync(formatResourcePath("html", join3("bootstrap", "_bootstrap-rules.scss")));
const quartoBootstrapMixins = ()=>Deno.readTextFileSync(formatResourcePath("html", join3("bootstrap", "_bootstrap-mixins.scss")));
const quartoBootstrapFunctions = ()=>Deno.readTextFileSync(formatResourcePath("html", join3("bootstrap", "_bootstrap-functions.scss")));
const quartoBaseLayer = (format, codeCopy = false, tabby = false, figResponsive = false, codeFilename = false)=>{
    const rules = [
        quartoRules()
    ];
    const defaults = [
        quartoDefaults(format),
        quartoVariables()
    ];
    if (codeCopy) {
        rules.push(quartoCopyCodeRules());
        defaults.push(quartoCopyCodeDefaults());
    }
    if (tabby) {
        rules.push(quartoTabbyRules());
    }
    if (figResponsive) {
        rules.push(quartoFigResponsiveRules());
    }
    if (codeFilename) {
        rules.push(quartoCodeFilenameRules());
    }
    if (format.render[kLinkExternalIcon]) {
        rules.push(quartoLinkExternalRules());
    }
    return {
        uses: quartoUses(),
        defaults: defaults.join("\n"),
        functions: quartoFunctions(),
        mixins: "",
        rules: rules.join("\n")
    };
};
const quartoVariables = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-variables.scss"));
const quartoUses = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-uses.scss"));
const quartoFunctions = ()=>Deno.readTextFileSync(formatResourcePath("html", "_quarto-functions.scss"));
const quartoDefaults = (format)=>{
    const defaults = [];
    defaults.push(outputVariable(sassVariable("code-copy-selector", format.metadata[kCodeCopy] === undefined || format.metadata[kCodeCopy] === "hover" ? '"pre.sourceCode:hover > "' : '""')));
    defaults.push(outputVariable(sassVariable("code-white-space", format.render[kCodeOverflow] === "wrap" ? "pre-wrap" : "pre")));
    defaults.push(outputVariable(sassVariable(kTblCapLoc, format.metadata[kTblCapLoc] || format.metadata[kCapLoc] || kCapTop)));
    return defaults.join("\n");
};
function insertFootnotesTitle(doc, footnotesEl, language, level = 2, classes = []) {
    prependHeading(doc, footnotesEl, language[kSectionTitleFootnotes], level, classes);
}
function insertReferencesTitle(doc, refsEl, language, level = 2, classes = []) {
    prependHeading(doc, refsEl, language[kSectionTitleReferences], level, classes);
}
function insertTitle(doc, el, title, level = 2, headingClasses = []) {
    prependHeading(doc, el, title, level, headingClasses);
}
function prependHeading(doc, el, title, level, classes) {
    const heading = doc.createElement("h" + level);
    if (typeof title == "string" && title !== "none") {
        heading.innerHTML = title;
    }
    if (classes) {
        classes.forEach((clz)=>{
            heading.classList.add(clz);
        });
    }
    el.insertBefore(heading, el.firstChild);
    const hr = el.querySelector("hr");
    if (hr) {
        hr.remove();
    }
}
function removeFootnoteBacklinks(footnotesEl) {
    const backlinks = footnotesEl.querySelectorAll(".footnote-back");
    for (const backlink of backlinks){
        backlink.remove();
    }
}
function setMainColumn(doc, column) {
    const selectors = [
        "main.content",
        ".page-navigation",
        ".quarto-title-banner .quarto-title",
        "div[class^='quarto-about-']",
        "div[class*=' quarto-about-']", 
    ];
    selectors.forEach((selector)=>{
        const el = doc.querySelector(selector);
        if (el) {
            for (const clz of el.classList){
                if (clz.startsWith("column-")) {
                    el.classList.remove(clz);
                }
            }
            el.classList.add(column);
        }
    });
}
function hasMarginRefs(format, flags) {
    return format.pandoc[kReferenceLocation] === "margin" || flags[kReferenceLocation] === "margin";
}
function hasMarginCites(format) {
    return format.metadata[kCitationLocation] === "margin";
}
function createCodeCopyButton(doc, format) {
    const copyButton = doc.createElement("button");
    const title = format.language[kCopyButtonTooltip];
    copyButton.setAttribute("title", title);
    copyButton.classList.add("code-copy-button");
    const copyIcon = doc.createElement("i");
    copyIcon.classList.add("bi");
    copyButton.appendChild(copyIcon);
    return copyButton;
}
function createCodeBlock(doc, htmlContents, language) {
    const preEl = doc.createElement("PRE");
    preEl.classList.add("sourceCode");
    preEl.classList.add("code-with-copy");
    const codeEl = doc.createElement("CODE");
    codeEl.classList.add("sourceCode");
    if (language) {
        codeEl.classList.add(language);
    }
    codeEl.innerHTML = htmlContents;
    preEl.appendChild(codeEl);
    return preEl;
}
function writeMetaTag(name, content, doc) {
    const m = doc.createElement("META");
    if (name.startsWith("og:")) {
        m.setAttribute("property", name);
    } else {
        m.setAttribute("name", name);
    }
    m.setAttribute("content", content);
    const nl = doc.createTextNode("\n");
    doc.querySelector("head")?.appendChild(m);
    doc.querySelector("head")?.appendChild(nl);
}
function layerQuartoScss(key, dependency, sassLayer, format, darkLayer, darkDefault, loadPaths) {
    const frameworkFunctions = [
        bootstrapFunctions(),
        sassUtilFunctions("color-contrast.scss"), 
    ].join("\n");
    const frameworkVariables = [
        bootstrapVariables(),
        pandocVariablesToThemeScss(format.metadata), 
    ].join("\n");
    const defaults = [
        quartoDefaults(format),
        quartoBootstrapDefaults(format.metadata),
        quartoCopyCodeDefaults(), 
    ].join("\n");
    return {
        dependency,
        key,
        user: sassLayer,
        quarto: {
            uses: quartoUses(),
            defaults,
            functions: [
                quartoFunctions(),
                quartoBootstrapFunctions()
            ].join("\n"),
            mixins: quartoBootstrapMixins(),
            rules: [
                quartoRules(),
                quartoCopyCodeRules(),
                quartoBootstrapRules(),
                quartoGlobalCssVariableRules(),
                quartoLinkExternalRules(),
                quartoCodeFilenameRules(), 
            ].join("\n")
        },
        framework: {
            uses: "",
            defaults: frameworkVariables,
            functions: frameworkFunctions,
            mixins: bootstrapMixins(),
            rules: bootstrapRules()
        },
        loadPaths: [
            bootstrapResourceDir(),
            ...loadPaths || []
        ],
        dark: darkLayer ? {
            user: darkLayer,
            default: darkDefault
        } : undefined,
        attribs: {
            id: "quarto-bootstrap"
        }
    };
}
function resolveBootstrapScss(input, format, sassLayers) {
    const quartoThemesDir = formatResourcePath("html", join3("bootstrap", "themes"));
    const theme = format.metadata[kTheme] || [];
    const [themeSassLayers, defaultDark, loadPaths] = resolveThemeLayer(format, input, theme, quartoThemesDir, sassLayers);
    const sassBundles = [];
    sassBundles.push(layerQuartoScss("quarto-theme", kBootstrapDependencyName, themeSassLayers.light, format, themeSassLayers.dark, defaultDark, loadPaths));
    return sassBundles;
}
function layerTheme(input, themes, quartoThemesDir) {
    let injectedCustomization = false;
    const loadPaths = [];
    const layers = themes.flatMap((theme)=>{
        const resolvedThemePath = join3(quartoThemesDir, `${theme}.scss`);
        if (existsSync(resolvedThemePath)) {
            const themeLayer = sassLayer(resolvedThemePath);
            injectedCustomization = true;
            return [
                themeLayer,
                quartoBootstrapCustomizationLayer()
            ];
        } else {
            const themePath = join3(dirname2(input), theme);
            if (existsSync(themePath)) {
                const themeDir = dirname2(themePath);
                loadPaths.push(themeDir);
                return sassLayer(themePath);
            } else {
                return {
                    uses: "",
                    defaults: "",
                    functions: "",
                    mixins: "",
                    rules: ""
                };
            }
        }
    });
    if (!injectedCustomization) {
        layers.unshift(quartoBootstrapCustomizationLayer());
    }
    return {
        layers,
        loadPaths
    };
}
function resolveTextHighlightingLayer(input, format, style) {
    const layer = {
        uses: "",
        defaults: "",
        functions: "",
        mixins: "",
        rules: ""
    };
    const themeDescriptor = readHighlightingTheme(dirname2(input), format.pandoc, style);
    if (format.metadata[kCodeBlockBackground] === undefined) {
        if (themeDescriptor && !themeDescriptor.isAdaptive) {
            const backgroundColor = ()=>{
                if (themeDescriptor.json["background-color"]) {
                    return themeDescriptor.json["background-color"];
                } else {
                    const editorColors = themeDescriptor.json["editor-colors"];
                    if (editorColors && editorColors["BackgroundColor"]) {
                        return editorColors["BackgroundColor"];
                    } else {
                        return undefined;
                    }
                }
            };
            const background = backgroundColor();
            if (background) {
                layer.defaults = outputVariable(sassVariable("code-block-bg", asCssColor(background)), true);
            }
            const textColor = themeDescriptor.json["text-color"];
            if (textColor) {
                layer.defaults = layer.defaults + "\n" + outputVariable(sassVariable("code-block-color", asCssColor(textColor)), true);
            }
        }
    }
    if (themeDescriptor) {
        const readTextColor = (name)=>{
            const textStyles = themeDescriptor.json["text-styles"];
            if (textStyles && typeof textStyles === "object") {
                const commentColor = textStyles[name];
                if (commentColor && typeof commentColor === "object") {
                    const textColor = commentColor["text-color"];
                    return textColor;
                } else {
                    return undefined;
                }
            } else {
                return undefined;
            }
        };
        const commentColor = readTextColor("Comment");
        if (commentColor) {
            layer.defaults = layer.defaults + "\n" + outputVariable(sassVariable("btn-code-copy-color", asCssColor(commentColor)), true);
        }
        const functionColor = readTextColor("Function");
        if (commentColor) {
            layer.defaults = layer.defaults + "\n" + outputVariable(sassVariable("btn-code-copy-color-active", asCssColor(functionColor)), true);
        }
    }
    return layer;
}
function resolveThemeLayer(format, input, themes, quartoThemesDir, sassLayers) {
    let theme = undefined;
    let defaultDark = false;
    if (typeof themes === "string") {
        theme = {
            light: [
                themes
            ]
        };
    } else if (Array.isArray(themes)) {
        theme = {
            light: themes
        };
    } else if (typeof themes === "object") {
        const themeArr = (theme)=>{
            const themes = [];
            if (theme) {
                if (typeof theme === "string") {
                    themes.push(theme);
                } else if (Array.isArray(theme)) {
                    themes.push(...theme);
                }
            }
            return themes;
        };
        const themeObj = themes;
        const keyList = Object.keys(themeObj);
        defaultDark = keyList.length > 1 && keyList[0] === "dark";
        theme = {
            light: themeArr(themeObj.light),
            dark: themeObj.dark ? themeArr(themeObj.dark) : undefined
        };
    } else {
        theme = {
            light: []
        };
    }
    const lightLayerContext = layerTheme(input, theme.light, quartoThemesDir);
    lightLayerContext.layers.unshift(...sassLayers);
    const highlightingLayer = resolveTextHighlightingLayer(input, format, "light");
    if (highlightingLayer) {
        lightLayerContext.layers.unshift(highlightingLayer);
    }
    const darkLayerContext = theme.dark ? layerTheme(input, theme.dark, quartoThemesDir) : undefined;
    if (darkLayerContext) {
        darkLayerContext.layers.push(...sassLayers);
        const darkHighlightingLayer = resolveTextHighlightingLayer(input, format, "dark");
        if (darkHighlightingLayer) {
            darkLayerContext.layers.unshift(darkHighlightingLayer);
        }
    }
    const themeSassLayer = {
        light: mergeLayers(...lightLayerContext.layers),
        dark: darkLayerContext?.layers ? mergeLayers(...darkLayerContext?.layers) : undefined
    };
    const loadPaths = [
        ...lightLayerContext.loadPaths,
        ...darkLayerContext?.loadPaths || [], 
    ];
    return [
        themeSassLayer,
        defaultDark,
        loadPaths
    ];
}
function pandocVariablesToThemeDefaults(metadata) {
    const explicitVars = [];
    const add = (defaults, name, value, formatter)=>{
        if (value) {
            const sassVar = sassVariable(name, value, formatter);
            defaults.push(sassVar);
        }
    };
    add(explicitVars, "line-height-base", metadata["linestretch"], asCssNumber);
    add(explicitVars, "font-size-root", metadata["fontsize"]);
    add(explicitVars, "body-bg", metadata["backgroundcolor"]);
    add(explicitVars, "body-color", metadata["fontcolor"]);
    add(explicitVars, "link-color", metadata["linkcolor"]);
    add(explicitVars, "font-family-base", metadata["mainfont"], asCssFont);
    add(explicitVars, "font-family-code", metadata["monofont"], asCssFont);
    add(explicitVars, "mono-background-color", metadata["monobackgroundcolor"]);
    const explicitSizes = [
        "max-width",
        "margin-top",
        "margin-bottom",
        "margin-left",
        "margin-right", 
    ];
    explicitSizes.forEach((attrib)=>{
        add(explicitVars, attrib, metadata[attrib], asCssSize);
    });
    return explicitVars;
}
function pandocVariablesToThemeScss(metadata, asDefaults = false) {
    return pandocVariablesToThemeDefaults(metadata).map((variable)=>{
        return outputVariable(variable, asDefaults);
    }).join("\n");
}
const kCodeBorderLeft = "code-block-border-left";
const kCodeBlockBackground = "code-block-bg";
const kBackground = "background";
const kForeground = "foreground";
const kColor = "color";
const kBorder = "border";
const quartoBootstrapDefaults = (metadata)=>{
    const varFilePath = formatResourcePath("html", join3("bootstrap", "_bootstrap-variables.scss"));
    const variables = [
        Deno.readTextFileSync(varFilePath)
    ];
    const colorDefaults = [];
    const navbar = metadata[kWebsite]?.[kSiteNavbar];
    if (navbar && typeof navbar === "object") {
        const navbarBackground = navbar[kBackground];
        if (navbarBackground !== undefined) {
            resolveBootstrapColorDefault(navbarBackground, colorDefaults);
            variables.push(outputVariable(sassVariable("navbar-bg", navbarBackground, typeof navbarBackground === "string" ? asBootstrapColor : undefined)));
        }
        const navbarForeground = navbar[kForeground];
        if (navbarForeground !== undefined) {
            resolveBootstrapColorDefault(navbarForeground, colorDefaults);
            variables.push(outputVariable(sassVariable("navbar-fg", navbarForeground, typeof navbarForeground === "string" ? asBootstrapColor : undefined)));
        }
    }
    const sidebars = metadata[kWebsite]?.[kSiteSidebar];
    const sidebar = Array.isArray(sidebars) ? sidebars[0] : typeof sidebars === "object" ? sidebars : undefined;
    if (sidebar) {
        const sidebarBackground = sidebar[kBackground];
        if (sidebarBackground !== undefined) {
            resolveBootstrapColorDefault(sidebarBackground, colorDefaults);
            variables.push(outputVariable(sassVariable("sidebar-bg", sidebarBackground, typeof sidebarBackground === "string" ? asBootstrapColor : undefined)));
        } else if (sidebar.style === "floating" || navbar) {
            variables.push(`$sidebar-bg: if(variable-exists(body-bg), $body-bg, #fff) !default;`);
        }
        const sidebarForeground = sidebar[kForeground];
        if (sidebarForeground !== undefined) {
            resolveBootstrapColorDefault(sidebarForeground, colorDefaults);
            variables.push(outputVariable(sassVariable("sidebar-fg", sidebarForeground, typeof sidebarForeground === "string" ? asBootstrapColor : undefined)));
        }
        const sidebarBorder = sidebar[kBorder];
        variables.push(outputVariable(sassVariable("sidebar-border", sidebarBorder !== undefined ? sidebarBorder : sidebar.style === "docked")));
    } else {
        variables.push(`$sidebar-bg: if(variable-exists(body-bg), $body-bg, #fff) !default;`);
    }
    const footer = metadata[kWebsite]?.[kPageFooter];
    if (footer !== undefined && typeof footer === "object") {
        const footerBg = footer[kBackground];
        if (footerBg !== undefined) {
            resolveBootstrapColorDefault(footerBg, colorDefaults);
            variables.push(outputVariable(sassVariable("footer-bg", footerBg, typeof footerBg === "string" ? asBootstrapColor : undefined)));
        }
        const footerFg = footer[kForeground];
        if (footerFg !== undefined) {
            resolveBootstrapColorDefault(footerFg, colorDefaults);
            variables.push(outputVariable(sassVariable("footer-fg", footerFg, typeof footerFg === "string" ? asBootstrapColor : undefined)));
        }
        const footerBorder = footer[kBorder];
        if (footerBorder !== false) {
            variables.push(outputVariable(sassVariable("footer-border", true)));
        }
        if (footerBorder !== undefined && typeof footerBorder === "string") {
            resolveBootstrapColorDefault(footerBorder, colorDefaults);
            variables.push(outputVariable(sassVariable("footer-border-color", footerBorder, asBootstrapColor)));
        }
        const footerColor = footer[kColor];
        if (footerColor && typeof footerColor === "string") {
            resolveBootstrapColorDefault(footerColor, colorDefaults);
            variables.push(outputVariable(sassVariable("footer-color", footerColor, asBootstrapColor)));
        }
    }
    const codeblockLeftBorder = metadata[kCodeBorderLeft];
    const codeblockBackground = metadata[kCodeBlockBackground];
    if (codeblockLeftBorder !== undefined) {
        resolveBootstrapColorDefault(codeblockLeftBorder, colorDefaults);
        variables.push(outputVariable(sassVariable(kCodeBorderLeft, codeblockLeftBorder, typeof codeblockLeftBorder === "string" ? asBootstrapColor : undefined)));
        if (codeblockBackground === undefined && codeblockLeftBorder !== false) {
            variables.push(outputVariable(sassVariable(kCodeBlockBackground, false)));
        }
    }
    if (codeblockBackground !== undefined) {
        variables.push(outputVariable(sassVariable(kCodeBlockBackground, codeblockBackground, typeof codeblockBackground === "string" ? asBootstrapColor : undefined)));
    }
    colorDefaults.forEach((colorDefault)=>{
        variables.push(colorDefault);
    });
    return variables.reverse().join("\n");
};
function resolveBootstrapColorDefault(value, variables) {
    if (value) {
        const variable = bootstrapColorDefault(value);
        if (variable && !variables.find((existingVar)=>{
            return existingVar === variable;
        })) {
            variables.unshift(variable);
        }
    }
}
function bootstrapColorDefault(value) {
    if (typeof value === "string") {
        return bootstrapColorVars[value];
    }
}
const bootstrapColorVars = {
    primary: "$primary: #0d6efd !default;",
    secondary: "$secondary: #6c757d !default;",
    success: "$success: #198754 !default;",
    info: "$info: #0dcaf0 !default;",
    warning: "$warning: #ffc107 !default;",
    danger: "$danger: #dc3545 !default;",
    light: "$light: #f8f9fa !default;",
    dark: "$dark: #212529 !default;"
};
async function bibliographyCslJson(input, metadata) {
    const bibliography = metadata[kBibliography];
    if (bibliography) {
        const references = await renderToCSLJSON(dirname2(input), asArray(bibliography));
        return references;
    }
}
async function renderHtml(entry, csl) {
    const cmd = [
        pandocBinaryPath()
    ];
    cmd.push("-f");
    cmd.push("csljson");
    cmd.push("-t");
    cmd.push("html5");
    cmd.push("--citeproc");
    if (csl) {
        cmd.push("--csl");
        cmd.push(csl);
    }
    const cslStr = JSON.stringify([
        entry
    ], undefined, 2);
    const result1 = await execProcess({
        cmd,
        stdout: "piped",
        stderr: "piped"
    }, cslStr);
    if (result1.success) {
        return result1.stdout;
    } else {
        throw new Error(`Failed to render citation: error code ${result1.code}\n${result1.stderr}`);
    }
}
async function renderBibTex(entry) {
    const cmd = [
        pandocBinaryPath()
    ];
    cmd.push("-f");
    cmd.push("csljson");
    cmd.push("-t");
    cmd.push("biblatex");
    cmd.push("--citeproc");
    const cslStr = JSON.stringify([
        entry
    ], undefined, 2);
    const result1 = await execProcess({
        cmd,
        stdout: "piped",
        stderr: "piped"
    }, cslStr);
    if (result1.success) {
        return result1.stdout;
    } else {
        throw new Error(`Failed to generate bibtex, rendering failed with code ${result1.code}\n${result1.stderr}`);
    }
}
async function renderToCSLJSON(dir, biblios) {
    const bibloEntries = [];
    for (const biblio of biblios){
        const biblioPath = join3(dir, biblio);
        const cmd = [
            pandocBinaryPath()
        ];
        cmd.push(isAbsolute(biblioPath) ? biblioPath : join3(Deno.cwd(), biblioPath));
        cmd.push("-t");
        cmd.push("csljson");
        cmd.push("--citeproc");
        const result1 = await execProcess({
            cmd,
            stdout: "piped",
            stderr: "piped",
            cwd: dir
        });
        if (result1.success) {
            if (result1.stdout) {
                const entries = JSON.parse(result1.stdout);
                bibloEntries.push(...entries);
            }
        } else {
            throw new Error(`Failed to generate bibliography, rendering failed with code ${result1.code}\n${result1.stderr}`);
        }
    }
    return bibloEntries;
}
const kName = "name";
const kAffiliation = "affiliation";
const kAfilliationUrl = "affiliation-url";
const kOrcid = "orcid";
const kUrl = "url";
function parseAuthor(authorRaw, strict) {
    if (authorRaw) {
        const parsed = [];
        const authors = Array.isArray(authorRaw) ? authorRaw : [
            authorRaw
        ];
        let unrecognized = 0;
        authors.forEach((author)=>{
            if (typeof author === "string") {
                parsed.push({
                    name: author
                });
            } else if (typeof author === "object") {
                const name = author[kName];
                if (name) {
                    const auth = {
                        name
                    };
                    const affilation = author[kAffiliation];
                    if (affilation) {
                        auth.affilliation = {
                            name: affilation
                        };
                        if (author[kAfilliationUrl]) {
                            auth.affilliation.url = author[kAfilliationUrl];
                        }
                    }
                    const orcid = author[kOrcid];
                    if (orcid) {
                        auth.orcid = orcid;
                    }
                    const url = author[kUrl];
                    if (url) {
                        auth.url = url;
                    }
                    parsed.push(auth);
                } else {
                    unrecognized = unrecognized + 1;
                }
            }
        });
        if (strict && unrecognized > 0) {
            return undefined;
        } else {
            return parsed;
        }
    } else {
        return undefined;
    }
}
class Token1 {
    constructor(value, type){
        this._value = value;
        this._type = type;
        this._format = "";
    }
    get value() {
        return this._value;
    }
    set value(value) {
        this._value = value;
    }
    get type() {
        return this._type;
    }
    set type(type) {
        this._type = type;
    }
    get format() {
        return this._format;
    }
    set format(format) {
        this._format = format;
    }
}
class Parser1 {
    constructor(name, pattern){
        this.name = name;
        this.pattern = pattern;
    }
    parse(date) {
        const match = this.pattern.exec(date);
        if (!match || !match.groups) {
            return;
        }
        let tokens = [];
        for (const [key, val] of Object.entries(match.groups)){
            if (val) {
                tokens.push(new Token1(val, /delim\d+/.test(key) ? "delimiter" : key));
            }
        }
        return {
            tokens,
            index: match.index,
            parser: this.name
        };
    }
}
const abbreviatedTimezones = "UT|CAT|CET|CVT|EAT|EET|GMT|MUT|RET|SAST|SCT|WAST|WAT|WEST|WET|WST|WT|ADT|AFT|ALMT|AMST|AMT|ANAST|ANAT|AQTT|AST|AZST|AZT|BNT|BST|BTT|CHOST|CHOT|CST|EEST|EET|GET|GST|HKT|HOVST|HOVT|ICT|IDT|IRDT|IRKST|IRKT|IST|JST|KGT|KRAST|KRAT|KST|MAGST|MAGT|MMT|MSK|MVT|NOVST|NOVT|NPT|OMSST|OMST|ORAT|PETST|PETT|PHT|PKT|PYT|QYZT|SAKT|SGT|SRET|TJT|TLT|TMT|TRT|ULAST|ULAT|UZT|VLAST|VLAT|WIB|WIT|YAKST|YAKT|YEKST|YEKT|ART|CAST|CEST|CLST|CLT|DAVT|DDUT|GMT|MAWT|NZDT|NZST|ROTT|SYOT|VOST|ADT|AST|AT|AZOST|AZOT|ACDT|ACST|ACT|ACWST|AEDT|AEST|AET|AWDT|AWST|CXT|LHDT|LHST|NFDT|NFT|AST|AT|CDT|CIDST|CIST|CST|EDT|EST|ET|CST|CT|EST|ET|BST|CEST|CET|EEST|EET|FET|GET|GMT|IST|KUYT|MSD|MSK|SAMT|TRT|WEST|WET|CCT|EAT|IOT|TFT|ADT|AKDT|AKST|AST|AT|CDT|CST|CT|EDT|EGST|EGT|ET|GMT|HDT|HST|MDT|MST|MT|NDT|NST|PDT|PMDT|PMST|PST|PT|WGST|WGT|AoE|BST|CHADT|CHAST|CHUT|CKT|ChST|EASST|EAST|FJST|FJT|GALT|GAMT|GILT|HST|KOST|LINT|MART|MHT|NCT|NRT|NUT|NZDT|NZST|PGT|PHOT|PONT|PST|PWT|SBT|SST|TAHT|TKT|TOST|TOT|TVT|VUT|WAKT|WFT|WST|YAPT|ACT|AMST|AMT|ART|BOT|BRST|BRT|CLST|CLT|COT|ECT|FKST|FKT|FNT|GFT|GST|GYT|PET|PYST|PYT|SRT|UYST|UYT|VET|WARST";
const dayOfMonthAndMonthNameDateFormatParser = new Parser1("DayOfMonthAndMonthNameDateFormatParser", new RegExp(`^(?<dayOfWeek>(?:Sun?|Mon?|Tu(?:es)?|We(?:dnes)?|Th(?:urs)?|Fri?|Sa(?:tur)?)(?:day)?)?(?<delim1>,)?(?<delim2>\\s)?(?<dayOfMonth>(?:3[0-1]|[1-2]\\d|0?[1-9])(?:st|nd|rd|th)?)(?<delim3>\\s)(?<month>Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)(?<delim4>,)?(?<delim5>\\s)?(?<year>\\d{4}|\\d{2})?(?:(?<delim6>,)?(?<delim7>\\s)(?:(?<twentyFourHour>2[0-3]|0?\\d|1\\d)|(?<twelveHour>0?[1-9]|1[0-2]))(?:(?<delim8>[:.])(?<minute>[0-5]\\d))?(?:(?<delim9>[:.])(?<second>[0-5]\\d))?(?:(?<delim10>.)(?<millisecond>\\d{3}))?(?<delim11>\\s)?(?<meridiem>am|pm|AM|PM)?(?:(?<delim12>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?)?$`));
const iSO8601BasicDateTimeFormatParser = new Parser1("ISO8601BasicDateTimeFormatParser", new RegExp("^(?<year>[+-]\\d{6}|\\d{4})(?:(?<month>\\d{2})(?:(?<dayOfMonth>\\d{2}))?|(?<escapeText>W)(?<isoWeekOfYear>\\d{2})(?:(?<isoDayOfWeek>\\d))?|(?<dayOfYear>\\d{3}))?(?:(?<delim1>T| )(?:(?<twentyFourHour>\\d{2})(?:(?<minute>\\d{2})(?:(?<second>\\d{2})(?:(?<delim2>[.,])(?<millisecond>\\d{1,9}))?)?)?)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z)?)?$"));
const iSO8601ExtendedDateTimeFormatParser = new Parser1("ISO8601ExtendedDateTimeFormatParser", new RegExp("^(?<year>[+-]\\d{6}|\\d{4})(?<delim1>\\-)(?:(?<month>\\d{2})(?:(?<delim2>\\-)(?<dayOfMonth>\\d{2}))?|(?<escapeText>W)(?<isoWeekOfYear>\\d{2})(?:(?<delim3>\\-)(?<isoDayOfWeek>\\d))?|(?<dayOfYear>\\d{3}))(?:(?<delim4>T| )(?:(?<twentyFourHour>\\d{2})(?:(?<delim5>:)(?<minute>\\d{2})(?:(?<delim6>:)(?<second>\\d{2})(?:(?<delim7>[.,])(?<millisecond>\\d{1,9}))?)?)?)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z)?)?$"));
const monthNameAndDayOfMonthDateFormatParser = new Parser1("MonthNameAndDayOfMonthDateFormatParser", new RegExp(`^(?<dayOfWeek>(?:Sun?|Mon?|Tu(?:es)?|We(?:dnes)?|Th(?:urs)?|Fri?|Sa(?:tur)?)(?:day)?)?(?<delim1>,)?(?<delim2>\\s)?(?<month>Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)(?<delim3>\\s)(?<dayOfMonth>(?:3[0-1]|[1-2]\\d|0?[1-9])(?:st|nd|rd|th)?)(?<delim4>,)?(?<delim5>\\s)?(?<year>\\d{4}|\\d{2})?(?:(?:(?<delim6>,)?(?<delim7>\\s)(?:(?<twentyFourHour>2[0-3]|0?\\d|1\\d)|(?<twelveHour>0?[1-9]|1[0-2]))(?:(?<delim8>[:.])(?<minute>[0-5]\\d))?(?:(?<delim9>[:.])(?<second>[0-5]\\d))?(?:(?<delim10>.)(?<millisecond>\\d{3}))?(?<delim11>\\s)?(?<meridiem>am|pm|AM|PM)?(?:(?<delim12>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?)?)?$`));
const rFC2822DateTimeFormatParser = new Parser1("RFC2822DateTimeFormatParser", new RegExp("^(?:(?<dayOfWeek>Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?<delim1>,)?(?<delim2>\\s))?(?<dayOfMonth>\\d{1,2})(?<delim3>\\s)(?<month>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(?<delim4>\\s)(?<year>\\d{2,4})(?<delim5>\\s)(?<twentyFourHour>\\d{2})(?<delim6>:)(?<minute>\\d{2})(?:(?<delim7>:)(?<second>\\d{2}))?(?<delim8>\\s)(?<timezone>(?:(?:UT|GMT|[ECMP][SD]T)|[Zz]|[+-]\\d{4}))$"));
const slashDelimitedDateTimeFormatParser = new Parser1("SlashDelimitedDateFormatParser", new RegExp(`^(?<year>\\d{4}|\\d{2})(?<delim1>[/.-])(?<month>0?[1-9]|1[0-2])(?:(?<delim2>[/.-])(?<dayOfMonth>0?[1-9]|[1-2]\\d|3[0-1]))?(?:(?:(?<delim3>,)?(?<delim4>\\s)(?:(?<twentyFourHour>2[0-3]|0?\\d|1\\d)|(?<twelveHour>0?[1-9]|1[0-2]))(?:(?<delim5>[:.])(?<minute>[0-5]\\d))?(?:(?<delim6>[:.])(?<second>[0-5]\\d))?(?:(?<delim7>.)(?<millisecond>\\d{3}))?(?<delim8>\\s)?(?<meridiem>am|pm|AM|PM)?(?:(?<delim9>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?)?)?$`));
const twelveHourTimeFormatParser = new Parser1("TwelveHourTimeFormatParser", new RegExp(`^(?<twelveHour>0?[1-9]|1[0-2])(?:(?<delim1>[:.])(?<minute>[0-5]\\d))?(?:(?<delim2>[:.])(?<second>[0-5]\\d))?(?:(?<delim3>.)(?<millisecond>\\d{3}))?(?<delim4>\\s)?(?<meridiem>am|pm|AM|PM)(?:(?<delim5>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?$`));
const twentyFourHourTimeFormatParser = new Parser1("TwentyFourHourTimeFormatParser", new RegExp(`^(?<twentyFourHour>2[0-3]|0?\\d|1\\d)(?<delim1>[:.])(?<minute>[0-5]\\d)(?:(?<delim2>[:.])(?<second>[0-5]\\d))?(?:(?<delim3>.)(?<millisecond>\\d{3}))?(?:(?<delim4>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?$`));
const uKStyleSlashDelimitedDateTimeFormatParser = new Parser1("UKStyleSlashDelimitedDateFormatParser", new RegExp(`^(?<dayOfMonth>0?[1-9]|[1-2]\\d|3[0-1])(?<delim1>[/.-])(?<month>0?[1-9]|1[0-2])(?:(?<delim2>[/.-])(?<year>\\d{4}|\\d{2}))?(?:(?:(?<delim3>,)?(?<delim4>\\s)(?:(?<twentyFourHour>2[0-3]|0?\\d|1\\d)|(?<twelveHour>0?[1-9]|1[0-2]))(?:(?<delim5>[:.])(?<minute>[0-5]\\d))?(?:(?<delim6>[:.])(?<second>[0-5]\\d))?(?:(?<delim7>.)(?<millisecond>\\d{3}))?(?<delim8>\\s)?(?<meridiem>am|pm|AM|PM)?(?:(?<delim9>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?)?)?$`));
const uSStyleSlashDelimitedDateTimeFormatParser = new Parser1("USStyleSlashDelimitedDateFormatParser", new RegExp(`^(?<month>0?[1-9]|1[0-2])(?<delim1>[/.-])(?<dayOfMonth>0?[1-9]|[1-2]\\d|3[0-1])(?:(?<delim2>[/.-])(?<year>\\d{4}|\\d{2}))?(?:(?:(?<delim3>,)?(?<delim4>\\s)(?:(?<twentyFourHour>2[0-3]|0?\\d|1\\d)|(?<twelveHour>0?[1-9]|1[0-2]))(?:(?<delim5>[:.])(?<minute>[0-5]\\d))?(?:(?<delim6>[:.])(?<second>[0-5]\\d))?(?:(?<delim7>.)(?<millisecond>\\d{3}))?(?<delim8>\\s)?(?<meridiem>am|pm|AM|PM)?(?:(?<delim9>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?)?)?$`));
const dashDelimitedWithMonthNameDateTimeFormatParser = new Parser1("DashDelimitedWithMonthNameDateTimeFormatParser", new RegExp(`^(?<dayOfMonth>0?[1-9]|[1-2]\\d|3[0-1])(?<delim1>-)(?<month>Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)(?<delim2>-)?(?<year>\\d{4}|\\d{2})?(?:(?:(?<delim3>,)?(?<delim4>\\s)(?:(?<twentyFourHour>2[0-3]|0?\\d|1\\d)|(?<twelveHour>0?[1-9]|1[0-2]))(?:(?<delim5>[:.])(?<minute>[0-5]\\d))?(?:(?<delim6>[:.])(?<second>[0-5]\\d))?(?:(?<delim7>.)(?<millisecond>\\d{3}))?(?<delim8>\\s)?(?<meridiem>am|pm|AM|PM)?(?:(?<delim9>\\s)(?<timezone>[+-]\\d{2}(?::?\\d{2})?|Z|${abbreviatedTimezones}))?)?)?$`));
const parsers = [
    iSO8601ExtendedDateTimeFormatParser,
    iSO8601BasicDateTimeFormatParser,
    rFC2822DateTimeFormatParser,
    slashDelimitedDateTimeFormatParser,
    uKStyleSlashDelimitedDateTimeFormatParser,
    uSStyleSlashDelimitedDateTimeFormatParser,
    monthNameAndDayOfMonthDateFormatParser,
    dayOfMonthAndMonthNameDateFormatParser,
    twentyFourHourTimeFormatParser,
    twelveHourTimeFormatParser,
    dashDelimitedWithMonthNameDateTimeFormatParser
];
class StandardFormatParsersRefiner {
    constructor(name){
        this.name = name;
    }
    refine(parsedResults) {
        const res = parsedResults.filter((r)=>{
            return r.parser === "ISO8601ExtendedDateTimeFormatParser" || r.parser === "ISO8601BasicDateTimeFormatParser" || r.parser === "RFC2822DateTimeFormatParser";
        });
        if (res.length === 0) {
            return parsedResults;
        }
        return res;
    }
}
class TimeFormatRefiner {
    constructor(name){
        this.name = name;
    }
    refine(parsedResults) {
        parsedResults.forEach((r)=>{
            let meridiemExists = false;
            r.tokens.forEach((t)=>{
                if (t.type === "meridiem") {
                    meridiemExists = true;
                }
            });
            if (meridiemExists) {
                r.tokens.forEach((t)=>{
                    if (t.type === "twentyFourHour") {
                        t.type = "twelveHour";
                    }
                });
            }
        });
        return parsedResults;
    }
}
const timeFormatRefiner = new TimeFormatRefiner("TimeFormatRefiner");
const standardFormatParsersRefiner = new StandardFormatParsersRefiner("StandardFormatParsersRefiner");
const refiners = [
    standardFormatParsersRefiner,
    timeFormatRefiner
];
class YearFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{2}/, "YY");
            this._map.set(/\d{4}/, "YYYY");
            this._map.set(/[+-]\d{6}/, "YYYYYY");
        } else {
            this._map.set(/\d{2}/, "%y");
            this._map.set(/\d{4}/, "%Y");
            this._map.set(/[+-]\d{6}/, "NA");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class MonthFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{1,2}/, "M");
            this._map.set(/\d{2}/, "MM");
            this._map.set(/\d{1,2}(?:st|nd|rd|th)/, "Mo");
            this._map.set(/^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/, "MMM");
            this._map.set(/^(January|February|March|April|May|June|July|August|September|October|November|December)$/, "MMMM");
        } else {
            this._map.set(/\d{1,2}/, "NA");
            this._map.set(/\d{2}/, "%m");
            this._map.set(/\d{1,2}(?:st|nd|rd|th)/, "NA");
            this._map.set(/^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/, "%b");
            this._map.set(/^(January|February|March|April|May|June|July|August|September|October|November|December)$/, "%B");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class DayOfMonthFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{1,2}/, "D");
            this._map.set(/\d{2}/, "DD");
            this._map.set(/\d{1,2}(?:st|nd|rd|th)/, "Do");
        } else {
            this._map.set(/\d{1,2}/, "%-e");
            this._map.set(/\d{2}/, "%d");
            this._map.set(/\d{1,2}(?:st|nd|rd|th)/, "%o");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class DelimiterFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.format = format;
        this.type = type;
    }
    assign(token) {}
}
class MinuteFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{1,2}/, "m");
            this._map.set(/\d{2}/, "mm");
        } else {
            this._map.set(/\d{1,2}/, "NA");
            this._map.set(/\d{2}/, "%M");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class SecondFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{1,2}/, "s");
            this._map.set(/\d{2}/, "ss");
        } else {
            this._map.set(/\d{1,2}/, "NA");
            this._map.set(/\d{2}/, "%S");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class MillisecondFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d/, "S");
            this._map.set(/\d{2}/, "SS");
            this._map.set(/\d{3}/, "SSS");
        } else {
            this._map.set(/\d/, "NA");
            this._map.set(/\d{2}/, "NA");
            this._map.set(/\d{3}/, "%L");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class TimezoneFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        const abbreviatedTimezoneRegex = new RegExp("UT|CAT|CET|CVT|EAT|EET|GMT|MUT|RET|SAST|SCT|WAST|WAT|WEST|WET|WST|WT|ADT|AFT|ALMT|AMST|AMT|ANAST|ANAT|AQTT|AST|AZST|AZT|BNT|BST|BTT|CHOST|CHOT|CST|EEST|EET|GET|GST|HKT|HOVST|HOVT|ICT|IDT|IRDT|IRKST|IRKT|IST|JST|KGT|KRAST|KRAT|KST|MAGST|MAGT|MMT|MSK|MVT|NOVST|NOVT|NPT|OMSST|OMST|ORAT|PETST|PETT|PHT|PKT|PYT|QYZT|SAKT|SGT|SRET|TJT|TLT|TMT|TRT|ULAST|ULAT|UZT|VLAST|VLAT|WIB|WIT|YAKST|YAKT|YEKST|YEKT|ART|CAST|CEST|CLST|CLT|DAVT|DDUT|GMT|MAWT|NZDT|NZST|ROTT|SYOT|VOST|ADT|AST|AT|AZOST|AZOT|ACDT|ACST|ACT|ACWST|AEDT|AEST|AET|AWDT|AWST|CXT|LHDT|LHST|NFDT|NFT|AST|AT|CDT|CIDST|CIST|CST|EDT|EST|ET|CST|CT|EST|ET|BST|CEST|CET|EEST|EET|FET|GET|GMT|IST|KUYT|MSD|MSK|SAMT|TRT|WEST|WET|CCT|EAT|IOT|TFT|ADT|AKDT|AKST|AST|AT|CDT|CST|CT|EDT|EGST|EGT|ET|GMT|HDT|HST|MDT|MST|MT|NDT|NST|PDT|PMDT|PMST|PST|PT|WGST|WGT|AoE|BST|CHADT|CHAST|CHUT|CKT|ChST|EASST|EAST|FJST|FJT|GALT|GAMT|GILT|HST|KOST|LINT|MART|MHT|NCT|NRT|NUT|NZDT|NZST|PGT|PHOT|PONT|PST|PWT|SBT|SST|TAHT|TKT|TOST|TOT|TVT|VUT|WAKT|WFT|WST|YAPT|ACT|AMST|AMT|ART|BOT|BRST|BRT|CLST|CLT|COT|ECT|FKST|FKT|FNT|GFT|GST|GYT|PET|PYST|PYT|SRT|UYST|UYT|VET|WARST");
        if (!format || format === "default") {
            this._map.set(/[+-]\d{2}(?::\d{2})?/, "Z");
            this._map.set(/[+-]\d{4}/, "ZZ");
            this._map.set(/Z/, "[Z]");
            this._map.set(/z/, "[z]");
            this._map.set(abbreviatedTimezoneRegex, "z");
        } else {
            this._map.set(/[+-]\d{2}(?::\d{2})?/, "%:z");
            this._map.set(/[+-]\d{4}/, "%z");
            this._map.set(/Z/, "Z");
            this._map.set(/z/, "z");
            this._map.set(abbreviatedTimezoneRegex, "%Z");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class DayOfYearFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{1,3}/, "DDD");
            this._map.set(/\d{3}/, "DDDD");
            this._map.set(/\d{1,3}(?:st|nd|rd|th)/, "DDDo");
        } else {
            this._map.set(/\d{1,3}/, "NA");
            this._map.set(/\d{3}/, "%j");
            this._map.set(/\d{1,3}(?:st|nd|rd|th)/, "NA");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class EscapeTextFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        if (this._testTokenType(token)) {
            token.format = !this.format || this.format === "default" ? `[${token.value}]` : token.value;
        }
    }
}
class ISODayOfWeekFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/[1-7]/, "E");
        } else {
            this._map.set(/[1-7]/, "%u");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class ISOWeekOfYearFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/\d{1,2}/, "W");
            this._map.set(/\d{2}/, "WW");
            this._map.set(/\d{1,2}(?:st|nd|rd|th)/, "Wo");
        } else {
            this._map.set(/\d{1,2}/, "NA");
            this._map.set(/\d{2}/, "%U");
            this._map.set(/\d{1,2}(?:st|nd|rd|th)/, "NA");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class TwentyFourHourFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/^(\d|1\d|2[0-3])$/, "H");
            this._map.set(/^([0-1]\d|2[0-3])$/, "HH");
        } else {
            this._map.set(/^(\d|1\d|2[0-3])$/, "%-k");
            this._map.set(/^([0-1]\d|2[0-3])$/, "%H");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class TwelveHourFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/^([1-9]|1[0-2])$/, "h");
            this._map.set(/^(0\d|1[0-2])$/, "hh");
        } else {
            this._map.set(/^([1-9]|1[0-2])$/, "%-l");
            this._map.set(/^(0\d|1[0-2])$/, "%I");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class DayOfWeekFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/[0-6]/, "d");
            this._map.set(/[0-6](?:st|nd|rd|th)/, "do");
            this._map.set(/(?:Su|Mo|Tu|We|Th|Fr|Sa)/, "dd");
            this._map.set(/(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)/, "ddd");
            this._map.set(/(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/, "dddd");
        } else {
            this._map.set(/[0-6]/, "%w");
            this._map.set(/[0-6](?:st|nd|rd|th)/, "NA");
            this._map.set(/(?:Su|Mo|Tu|We|Th|Fr|Sa)/, "NA");
            this._map.set(/(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)/, "%a");
            this._map.set(/(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/, "%A");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
class MeridiemFormatTokenAssigner {
    constructor(name, type, format){
        this.name = name;
        this.type = type;
        this.format = format;
        this._map = new Map();
        if (!format || format === "default") {
            this._map.set(/am|pm/, "a");
            this._map.set(/AM|PM/, "A");
        } else {
            this._map.set(/am|pm/, "%P");
            this._map.set(/AM|PM/, "%p");
        }
    }
    _testTokenType(token) {
        return token.type === this.type;
    }
    assign(token) {
        this._map.forEach((formatToken, pattern)=>{
            if (this._testTokenType(token) && pattern.test(token.value)) {
                token.format = formatToken;
            }
        });
    }
}
const dayOfMonthFormatTokenAssigner = new DayOfMonthFormatTokenAssigner("DelimiterFormatTokenAssigner", "dayOfMonth");
const dayOfWeekFormatTokenAssigner = new DayOfWeekFormatTokenAssigner("DayOfWeekFormatTokenAssigner", "dayOfWeek");
const dayOfYearFormatTokenAssigner = new DayOfYearFormatTokenAssigner("DayOfYearFormatTokenAssigner", "dayOfYear");
const delimiterFormatTokenAssigner = new DelimiterFormatTokenAssigner("DelimiterFormatTokenAssigner", "delimiter");
const escapeTextFormatTokenAssigner = new EscapeTextFormatTokenAssigner("EscapeTextFormatTokenAssigner", "escapeText");
const iSODayOfWeekFormatTokenAssigner = new ISODayOfWeekFormatTokenAssigner("ISODayOfWeekFormatTokenAssigner", "isoDayOfWeek");
const iSOWeekOfYearFormatTokenAssigner = new ISOWeekOfYearFormatTokenAssigner("ISOWeekOfYearFormatTokenAssigner", "isoWeekOfYear");
const meridiemFormatTokenAssigner = new MeridiemFormatTokenAssigner("MeridiemFormatTokenAssigner", "meridiem");
const millisecondFormatTokenAssigner = new MillisecondFormatTokenAssigner("MillisecondFormatTokenAssigner", "millisecond");
const minuteFormatTokenAssigner = new MinuteFormatTokenAssigner("MinuteFormatTokenAssigner", "minute");
const monthFormatTokenAssigner = new MonthFormatTokenAssigner("MonthFormatTokenAssigner", "month");
const secondFormatTokenAssigner = new SecondFormatTokenAssigner("SecondFormatTokenAssigner", "second");
const timezoneFormatTokenAssigner = new TimezoneFormatTokenAssigner("TimezoneFormatTokenAssigner", "timezone");
const twelveHourFormatTokenAssigner = new TwelveHourFormatTokenAssigner("TwelveHourFormatTokenAssigner", "twelveHour");
const twentyFourHourFormatTokenAssigner = new TwentyFourHourFormatTokenAssigner("TwentyFourHourFormatTokenAssigner", "twentyFourHour");
const yearFormatTokenAssigner = new YearFormatTokenAssigner("YearFormatTokenAssigner", "year");
const strftimeDayOfMonthFormatTokenAssigner = new DayOfMonthFormatTokenAssigner("DelimiterFormatTokenAssigner", "dayOfMonth", "strftime");
const strftimeDayOfWeekFormatTokenAssigner = new DayOfWeekFormatTokenAssigner("DayOfWeekFormatTokenAssigner", "dayOfWeek", "strftime");
const strftimeDayOfYearFormatTokenAssigner = new DayOfYearFormatTokenAssigner("DayOfYearFormatTokenAssigner", "dayOfYear", "strftime");
const strftimeDelimiterFormatTokenAssigner = new DelimiterFormatTokenAssigner("DelimiterFormatTokenAssigner", "delimiter", "strftime");
const strftimeEscapeTextFormatTokenAssigner = new EscapeTextFormatTokenAssigner("EscapeTextFormatTokenAssigner", "escapeText", "strftime");
const strftimeISODayOfWeekFormatTokenAssigner = new ISODayOfWeekFormatTokenAssigner("ISODayOfWeekFormatTokenAssigner", "isoDayOfWeek", "strftime");
const strftimeISOWeekOfYearFormatTokenAssigner = new ISOWeekOfYearFormatTokenAssigner("ISOWeekOfYearFormatTokenAssigner", "isoWeekOfYear", "strftime");
const strftimeMeridiemFormatTokenAssigner = new MeridiemFormatTokenAssigner("MeridiemFormatTokenAssigner", "meridiem", "strftime");
const strftimeMillisecondFormatTokenAssigner = new MillisecondFormatTokenAssigner("MillisecondFormatTokenAssigner", "millisecond", "strftime");
const strftimeMinuteFormatTokenAssigner = new MinuteFormatTokenAssigner("MinuteFormatTokenAssigner", "minute", "strftime");
const strftimeMonthFormatTokenAssigner = new MonthFormatTokenAssigner("MonthFormatTokenAssigner", "month", "strftime");
const strftimeSecondFormatTokenAssigner = new SecondFormatTokenAssigner("SecondFormatTokenAssigner", "second", "strftime");
const strftimeTimezoneFormatTokenAssigner = new TimezoneFormatTokenAssigner("TimezoneFormatTokenAssigner", "timezone", "strftime");
const strftimeTwelveHourFormatTokenAssigner = new TwelveHourFormatTokenAssigner("TwelveHourFormatTokenAssigner", "twelveHour", "strftime");
const strftimeTwentyFourHourFormatTokenAssigner = new TwentyFourHourFormatTokenAssigner("TwentyFourHourFormatTokenAssigner", "twentyFourHour", "strftime");
const strftimeYearFormatTokenAssigner = new YearFormatTokenAssigner("YearFormatTokenAssigner", "year", "strftime");
const defaultAssigners = [
    yearFormatTokenAssigner,
    monthFormatTokenAssigner,
    dayOfMonthFormatTokenAssigner,
    delimiterFormatTokenAssigner,
    minuteFormatTokenAssigner,
    secondFormatTokenAssigner,
    millisecondFormatTokenAssigner,
    timezoneFormatTokenAssigner,
    dayOfYearFormatTokenAssigner,
    escapeTextFormatTokenAssigner,
    iSODayOfWeekFormatTokenAssigner,
    iSOWeekOfYearFormatTokenAssigner,
    twentyFourHourFormatTokenAssigner,
    twelveHourFormatTokenAssigner,
    dayOfWeekFormatTokenAssigner,
    meridiemFormatTokenAssigner
];
const strftimeAssigners = [
    strftimeDayOfMonthFormatTokenAssigner,
    strftimeDayOfWeekFormatTokenAssigner,
    strftimeDayOfYearFormatTokenAssigner,
    strftimeDelimiterFormatTokenAssigner,
    strftimeEscapeTextFormatTokenAssigner,
    strftimeISODayOfWeekFormatTokenAssigner,
    strftimeISOWeekOfYearFormatTokenAssigner,
    strftimeMeridiemFormatTokenAssigner,
    strftimeMillisecondFormatTokenAssigner,
    strftimeMinuteFormatTokenAssigner,
    strftimeMonthFormatTokenAssigner,
    strftimeSecondFormatTokenAssigner,
    strftimeTimezoneFormatTokenAssigner,
    strftimeTwelveHourFormatTokenAssigner,
    strftimeTwentyFourHourFormatTokenAssigner,
    strftimeYearFormatTokenAssigner
];
class Guesser {
    constructor(){}
    static parse(date) {
        const parsedResults = [];
        parsers.forEach((parser)=>{
            const parsedResult = parser.parse(date);
            if (parsedResult) {
                parsedResults.push(Object.assign({}, parsedResult));
            }
        });
        return parsedResults;
    }
    static refine(parsedResults) {
        let refinedParsedResults = [
            ...parsedResults
        ];
        refiners.forEach((refiner)=>{
            refinedParsedResults = [
                ...refiner.refine(refinedParsedResults)
            ];
        });
        return refinedParsedResults;
    }
    static assign(tokens, format) {
        let assigners = !format || format === "default" ? defaultAssigners : strftimeAssigners;
        assigners.forEach((assigner)=>{
            tokens.forEach((token)=>{
                assigner.assign(token);
            });
        });
    }
    static getFormatString(tokens) {
        let formatString = "";
        tokens.forEach((token)=>{
            if (token.format === "NA") {
                throw Error(`Couldn't find strftime modifier for "${token.value}"`);
            }
            formatString += token.format ? token.format : token.value;
        });
        return formatString;
    }
}
function guessFormat(date, format) {
    const parsedResults = Guesser.parse(date);
    const refinedParsedResults = Guesser.refine(parsedResults);
    if (refinedParsedResults.length === 0) {
        throw Error("Couldn't parse date");
    }
    refinedParsedResults.forEach((r)=>Guesser.assign(r.tokens, format));
    let matchedFormats = [];
    refinedParsedResults.forEach((r)=>matchedFormats.push(Guesser.getFormatString(r.tokens)));
    return matchedFormats.length === 1 ? matchedFormats[0] : matchedFormats;
}
class Tokenizer {
    rules;
    constructor(rules = []){
        this.rules = rules;
    }
    addRule(test, fn) {
        this.rules.push({
            test,
            fn
        });
        return this;
    }
    tokenize(string, receiver = (token)=>token) {
        function* generator(rules) {
            let index = 0;
            for (const rule of rules){
                const result1 = rule.test(string);
                if (result1) {
                    const { value , length  } = result1;
                    index += length;
                    string = string.slice(length);
                    const token = {
                        ...rule.fn(value),
                        index
                    };
                    yield receiver(token);
                    yield* generator(rules);
                }
            }
        }
        const tokenGenerator = generator(this.rules);
        const tokens = [];
        for (const token of tokenGenerator){
            tokens.push(token);
        }
        if (string.length) {
            throw new Error(`parser error: string not fully parsed! ${string.slice(0, 25)}`);
        }
        return tokens;
    }
}
function digits(value, count = 2) {
    return String(value).padStart(count, "0");
}
function createLiteralTestFunction(value) {
    return (string)=>{
        return string.startsWith(value) ? {
            value,
            length: value.length
        } : undefined;
    };
}
function createMatchTestFunction(match) {
    return (string)=>{
        const result1 = match.exec(string);
        if (result1) return {
            value: result1,
            length: result1[0].length
        };
    };
}
const defaultRules = [
    {
        test: createLiteralTestFunction("yyyy"),
        fn: ()=>({
                type: "year",
                value: "numeric"
            })
    },
    {
        test: createLiteralTestFunction("yy"),
        fn: ()=>({
                type: "year",
                value: "2-digit"
            })
    },
    {
        test: createLiteralTestFunction("MM"),
        fn: ()=>({
                type: "month",
                value: "2-digit"
            })
    },
    {
        test: createLiteralTestFunction("M"),
        fn: ()=>({
                type: "month",
                value: "numeric"
            })
    },
    {
        test: createLiteralTestFunction("dd"),
        fn: ()=>({
                type: "day",
                value: "2-digit"
            })
    },
    {
        test: createLiteralTestFunction("d"),
        fn: ()=>({
                type: "day",
                value: "numeric"
            })
    },
    {
        test: createLiteralTestFunction("HH"),
        fn: ()=>({
                type: "hour",
                value: "2-digit"
            })
    },
    {
        test: createLiteralTestFunction("H"),
        fn: ()=>({
                type: "hour",
                value: "numeric"
            })
    },
    {
        test: createLiteralTestFunction("hh"),
        fn: ()=>({
                type: "hour",
                value: "2-digit",
                hour12: true
            })
    },
    {
        test: createLiteralTestFunction("h"),
        fn: ()=>({
                type: "hour",
                value: "numeric",
                hour12: true
            })
    },
    {
        test: createLiteralTestFunction("mm"),
        fn: ()=>({
                type: "minute",
                value: "2-digit"
            })
    },
    {
        test: createLiteralTestFunction("m"),
        fn: ()=>({
                type: "minute",
                value: "numeric"
            })
    },
    {
        test: createLiteralTestFunction("ss"),
        fn: ()=>({
                type: "second",
                value: "2-digit"
            })
    },
    {
        test: createLiteralTestFunction("s"),
        fn: ()=>({
                type: "second",
                value: "numeric"
            })
    },
    {
        test: createLiteralTestFunction("SSS"),
        fn: ()=>({
                type: "fractionalSecond",
                value: 3
            })
    },
    {
        test: createLiteralTestFunction("SS"),
        fn: ()=>({
                type: "fractionalSecond",
                value: 2
            })
    },
    {
        test: createLiteralTestFunction("S"),
        fn: ()=>({
                type: "fractionalSecond",
                value: 1
            })
    },
    {
        test: createLiteralTestFunction("a"),
        fn: (value)=>({
                type: "dayPeriod",
                value: value
            })
    },
    {
        test: createMatchTestFunction(/^(')(?<value>\\.|[^\']*)\1/),
        fn: (match)=>({
                type: "literal",
                value: match.groups.value
            })
    },
    {
        test: createMatchTestFunction(/^.+?\s*/),
        fn: (match)=>({
                type: "literal",
                value: match[0]
            })
    }, 
];
class DateTimeFormatter {
    #format;
    constructor(formatString, rules = defaultRules){
        const tokenizer = new Tokenizer(rules);
        this.#format = tokenizer.tokenize(formatString, ({ type , value , hour12  })=>{
            const result1 = {
                type,
                value
            };
            if (hour12) result1.hour12 = hour12;
            return result1;
        });
    }
    format(date, options = {}) {
        let string = "";
        const utc = options.timeZone === "UTC";
        for (const token of this.#format){
            const type = token.type;
            switch(type){
                case "year":
                    {
                        const value = utc ? date.getUTCFullYear() : date.getFullYear();
                        switch(token.value){
                            case "numeric":
                                {
                                    string += value;
                                    break;
                                }
                            case "2-digit":
                                {
                                    string += digits(value, 2).slice(-2);
                                    break;
                                }
                            default:
                                throw Error(`FormatterError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "month":
                    {
                        const value1 = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
                        switch(token.value){
                            case "numeric":
                                {
                                    string += value1;
                                    break;
                                }
                            case "2-digit":
                                {
                                    string += digits(value1, 2);
                                    break;
                                }
                            default:
                                throw Error(`FormatterError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "day":
                    {
                        const value2 = utc ? date.getUTCDate() : date.getDate();
                        switch(token.value){
                            case "numeric":
                                {
                                    string += value2;
                                    break;
                                }
                            case "2-digit":
                                {
                                    string += digits(value2, 2);
                                    break;
                                }
                            default:
                                throw Error(`FormatterError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "hour":
                    {
                        let value3 = utc ? date.getUTCHours() : date.getHours();
                        value3 -= token.hour12 && date.getHours() > 12 ? 12 : 0;
                        switch(token.value){
                            case "numeric":
                                {
                                    string += value3;
                                    break;
                                }
                            case "2-digit":
                                {
                                    string += digits(value3, 2);
                                    break;
                                }
                            default:
                                throw Error(`FormatterError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "minute":
                    {
                        const value4 = utc ? date.getUTCMinutes() : date.getMinutes();
                        switch(token.value){
                            case "numeric":
                                {
                                    string += value4;
                                    break;
                                }
                            case "2-digit":
                                {
                                    string += digits(value4, 2);
                                    break;
                                }
                            default:
                                throw Error(`FormatterError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "second":
                    {
                        const value5 = utc ? date.getUTCSeconds() : date.getSeconds();
                        switch(token.value){
                            case "numeric":
                                {
                                    string += value5;
                                    break;
                                }
                            case "2-digit":
                                {
                                    string += digits(value5, 2);
                                    break;
                                }
                            default:
                                throw Error(`FormatterError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "fractionalSecond":
                    {
                        const value6 = utc ? date.getUTCMilliseconds() : date.getMilliseconds();
                        string += digits(value6, Number(token.value));
                        break;
                    }
                case "timeZoneName":
                    {
                        break;
                    }
                case "dayPeriod":
                    {
                        string += token.value ? date.getHours() >= 12 ? "PM" : "AM" : "";
                        break;
                    }
                case "literal":
                    {
                        string += token.value;
                        break;
                    }
                default:
                    throw Error(`FormatterError: { ${token.type} ${token.value} }`);
            }
        }
        return string;
    }
    parseToParts(string) {
        const parts = [];
        for (const token of this.#format){
            const type = token.type;
            let value = "";
            switch(token.type){
                case "year":
                    {
                        switch(token.value){
                            case "numeric":
                                {
                                    value = /^\d{1,4}/.exec(string)?.[0];
                                    break;
                                }
                            case "2-digit":
                                {
                                    value = /^\d{1,2}/.exec(string)?.[0];
                                    break;
                                }
                        }
                        break;
                    }
                case "month":
                    {
                        switch(token.value){
                            case "numeric":
                                {
                                    value = /^\d{1,2}/.exec(string)?.[0];
                                    break;
                                }
                            case "2-digit":
                                {
                                    value = /^\d{2}/.exec(string)?.[0];
                                    break;
                                }
                            case "narrow":
                                {
                                    value = /^[a-zA-Z]+/.exec(string)?.[0];
                                    break;
                                }
                            case "short":
                                {
                                    value = /^[a-zA-Z]+/.exec(string)?.[0];
                                    break;
                                }
                            case "long":
                                {
                                    value = /^[a-zA-Z]+/.exec(string)?.[0];
                                    break;
                                }
                            default:
                                throw Error(`ParserError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "day":
                    {
                        switch(token.value){
                            case "numeric":
                                {
                                    value = /^\d{1,2}/.exec(string)?.[0];
                                    break;
                                }
                            case "2-digit":
                                {
                                    value = /^\d{2}/.exec(string)?.[0];
                                    break;
                                }
                            default:
                                throw Error(`ParserError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "hour":
                    {
                        switch(token.value){
                            case "numeric":
                                {
                                    value = /^\d{1,2}/.exec(string)?.[0];
                                    if (token.hour12 && parseInt(value) > 12) {
                                        console.error(`Trying to parse hour greater than 12. Use 'H' instead of 'h'.`);
                                    }
                                    break;
                                }
                            case "2-digit":
                                {
                                    value = /^\d{2}/.exec(string)?.[0];
                                    if (token.hour12 && parseInt(value) > 12) {
                                        console.error(`Trying to parse hour greater than 12. Use 'HH' instead of 'hh'.`);
                                    }
                                    break;
                                }
                            default:
                                throw Error(`ParserError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "minute":
                    {
                        switch(token.value){
                            case "numeric":
                                {
                                    value = /^\d{1,2}/.exec(string)?.[0];
                                    break;
                                }
                            case "2-digit":
                                {
                                    value = /^\d{2}/.exec(string)?.[0];
                                    break;
                                }
                            default:
                                throw Error(`ParserError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "second":
                    {
                        switch(token.value){
                            case "numeric":
                                {
                                    value = /^\d{1,2}/.exec(string)?.[0];
                                    break;
                                }
                            case "2-digit":
                                {
                                    value = /^\d{2}/.exec(string)?.[0];
                                    break;
                                }
                            default:
                                throw Error(`ParserError: value "${token.value}" is not supported`);
                        }
                        break;
                    }
                case "fractionalSecond":
                    {
                        value = new RegExp(`^\\d{${token.value}}`).exec(string)?.[0];
                        break;
                    }
                case "timeZoneName":
                    {
                        value = token.value;
                        break;
                    }
                case "dayPeriod":
                    {
                        value = /^(A|P)M/.exec(string)?.[0];
                        break;
                    }
                case "literal":
                    {
                        if (!string.startsWith(token.value)) {
                            throw Error(`Literal "${token.value}" not found "${string.slice(0, 25)}"`);
                        }
                        value = token.value;
                        break;
                    }
                default:
                    throw Error(`${token.type} ${token.value}`);
            }
            if (!value) {
                throw Error(`value not valid for token { ${type} ${value} } ${string.slice(0, 25)}`);
            }
            parts.push({
                type,
                value
            });
            string = string.slice(value.length);
        }
        if (string.length) {
            throw Error(`datetime string was not fully parsed! ${string.slice(0, 25)}`);
        }
        return parts;
    }
    sortDateTimeFormatPart(parts) {
        let result1 = [];
        const typeArray = [
            "year",
            "month",
            "day",
            "hour",
            "minute",
            "second",
            "fractionalSecond", 
        ];
        for (const type of typeArray){
            const current = parts.findIndex((el)=>el.type === type);
            if (current !== -1) {
                result1 = result1.concat(parts.splice(current, 1));
            }
        }
        result1 = result1.concat(parts);
        return result1;
    }
    partsToDate(parts) {
        const date = new Date();
        const utc = parts.find((part)=>part.type === "timeZoneName" && part.value === "UTC");
        const dayPart = parts.find((part)=>part.type === "day");
        utc ? date.setUTCHours(0, 0, 0, 0) : date.setHours(0, 0, 0, 0);
        for (const part of parts){
            switch(part.type){
                case "year":
                    {
                        const value = Number(part.value.padStart(4, "20"));
                        utc ? date.setUTCFullYear(value) : date.setFullYear(value);
                        break;
                    }
                case "month":
                    {
                        const value1 = Number(part.value) - 1;
                        if (dayPart) {
                            utc ? date.setUTCMonth(value1, Number(dayPart.value)) : date.setMonth(value1, Number(dayPart.value));
                        } else {
                            utc ? date.setUTCMonth(value1) : date.setMonth(value1);
                        }
                        break;
                    }
                case "day":
                    {
                        const value2 = Number(part.value);
                        utc ? date.setUTCDate(value2) : date.setDate(value2);
                        break;
                    }
                case "hour":
                    {
                        let value3 = Number(part.value);
                        const dayPeriod = parts.find((part)=>part.type === "dayPeriod");
                        if (dayPeriod?.value === "PM") value3 += 12;
                        utc ? date.setUTCHours(value3) : date.setHours(value3);
                        break;
                    }
                case "minute":
                    {
                        const value4 = Number(part.value);
                        utc ? date.setUTCMinutes(value4) : date.setMinutes(value4);
                        break;
                    }
                case "second":
                    {
                        const value5 = Number(part.value);
                        utc ? date.setUTCSeconds(value5) : date.setSeconds(value5);
                        break;
                    }
                case "fractionalSecond":
                    {
                        const value6 = Number(part.value);
                        utc ? date.setUTCMilliseconds(value6) : date.setMilliseconds(value6);
                        break;
                    }
            }
        }
        return date;
    }
    parse(string) {
        const parts = this.parseToParts(string);
        const sortParts = this.sortDateTimeFormatPart(parts);
        return this.partsToDate(sortParts);
    }
}
var Day;
(function(Day) {
    Day[Day["Sun"] = 0] = "Sun";
    Day[Day["Mon"] = 1] = "Mon";
    Day[Day["Tue"] = 2] = "Tue";
    Day[Day["Wed"] = 3] = "Wed";
    Day[Day["Thu"] = 4] = "Thu";
    Day[Day["Fri"] = 5] = "Fri";
    Day[Day["Sat"] = 6] = "Sat";
})(Day || (Day = {}));
function parse13(dateString, formatString) {
    const formatter = new DateTimeFormatter(formatString);
    const parts = formatter.parseToParts(dateString);
    const sortParts = formatter.sortDateTimeFormatPart(parts);
    return formatter.partsToDate(sortParts);
}
var commonjsGlobal3 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function createCommonjsModule5(fn, basedir, module) {
    return module = {
        path: basedir,
        exports: {},
        require: function(path, base) {
            return commonjsRequire2(path, base === void 0 || base === null ? module.path : base);
        }
    }, fn(module, module.exports), module.exports;
}
function commonjsRequire2() {
    throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
}
var dayjs_min = createCommonjsModule5(function(module, exports) {
    !function(t, n) {
        module.exports = n();
    }(commonjsGlobal3, function() {
        var t = "millisecond", n = "second", e = "minute", r = "hour", i1 = "day", s = "week", u = "month", o = "quarter", a = "year", h = /^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/, f = /\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, c = function(t2, n2, e2) {
            var r2 = String(t2);
            return !r2 || r2.length >= n2 ? t2 : "" + Array(n2 + 1 - r2.length).join(e2) + t2;
        }, d = {
            s: c,
            z: function(t2) {
                var n2 = -t2.utcOffset(), e2 = Math.abs(n2), r2 = Math.floor(e2 / 60), i2 = e2 % 60;
                return (n2 <= 0 ? "+" : "-") + c(r2, 2, "0") + ":" + c(i2, 2, "0");
            },
            m: function(t2, n2) {
                var e2 = 12 * (n2.year() - t2.year()) + (n2.month() - t2.month()), r2 = t2.clone().add(e2, u), i2 = n2 - r2 < 0, s2 = t2.clone().add(e2 + (i2 ? -1 : 1), u);
                return Number(-(e2 + (n2 - r2) / (i2 ? r2 - s2 : s2 - r2)) || 0);
            },
            a: function(t2) {
                return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
            },
            p: function(h2) {
                return ({
                    M: u,
                    y: a,
                    w: s,
                    d: i1,
                    D: "date",
                    h: r,
                    m: e,
                    s: n,
                    ms: t,
                    Q: o
                })[h2] || String(h2 || "").toLowerCase().replace(/s$/, "");
            },
            u: function(t2) {
                return t2 === void 0;
            }
        }, $ = {
            name: "en",
            weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
            months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_")
        }, l1 = "en", m = {};
        m[l1] = $;
        var y = function(t2) {
            return t2 instanceof v;
        }, M = function(t2, n2, e2) {
            var r2;
            if (!t2) return l1;
            if (typeof t2 == "string") m[t2] && (r2 = t2), n2 && (m[t2] = n2, r2 = t2);
            else {
                var i2 = t2.name;
                m[i2] = t2, r2 = i2;
            }
            return e2 || (l1 = r2), r2;
        }, g = function(t2, n2, e2) {
            if (y(t2)) return t2.clone();
            var r2 = n2 ? typeof n2 == "string" ? {
                format: n2,
                pl: e2
            } : n2 : {};
            return r2.date = t2, new v(r2);
        }, D = d;
        D.l = M, D.i = y, D.w = function(t2, n2) {
            return g(t2, {
                locale: n2.$L,
                utc: n2.$u,
                $offset: n2.$offset
            });
        };
        var v = function() {
            function c2(t2) {
                this.$L = this.$L || M(t2.locale, null, true), this.parse(t2);
            }
            var d2 = c2.prototype;
            return d2.parse = function(t2) {
                this.$d = function(t3) {
                    var n2 = t3.date, e2 = t3.utc;
                    if (n2 === null) return new Date(NaN);
                    if (D.u(n2)) return new Date();
                    if (n2 instanceof Date) return new Date(n2);
                    if (typeof n2 == "string" && !/Z$/i.test(n2)) {
                        var r2 = n2.match(h);
                        if (r2) return e2 ? new Date(Date.UTC(r2[1], r2[2] - 1, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, r2[7] || 0)) : new Date(r2[1], r2[2] - 1, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, r2[7] || 0);
                    }
                    return new Date(n2);
                }(t2), this.init();
            }, d2.init = function() {
                var t2 = this.$d;
                this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
            }, d2.$utils = function() {
                return D;
            }, d2.isValid = function() {
                return !(this.$d.toString() === "Invalid Date");
            }, d2.isSame = function(t2, n2) {
                var e2 = g(t2);
                return this.startOf(n2) <= e2 && e2 <= this.endOf(n2);
            }, d2.isAfter = function(t2, n2) {
                return g(t2) < this.startOf(n2);
            }, d2.isBefore = function(t2, n2) {
                return this.endOf(n2) < g(t2);
            }, d2.$g = function(t2, n2, e2) {
                return D.u(t2) ? this[n2] : this.set(e2, t2);
            }, d2.year = function(t2) {
                return this.$g(t2, "$y", a);
            }, d2.month = function(t2) {
                return this.$g(t2, "$M", u);
            }, d2.day = function(t2) {
                return this.$g(t2, "$W", i1);
            }, d2.date = function(t2) {
                return this.$g(t2, "$D", "date");
            }, d2.hour = function(t2) {
                return this.$g(t2, "$H", r);
            }, d2.minute = function(t2) {
                return this.$g(t2, "$m", e);
            }, d2.second = function(t2) {
                return this.$g(t2, "$s", n);
            }, d2.millisecond = function(n2) {
                return this.$g(n2, "$ms", t);
            }, d2.unix = function() {
                return Math.floor(this.valueOf() / 1e3);
            }, d2.valueOf = function() {
                return this.$d.getTime();
            }, d2.startOf = function(t2, o2) {
                var h2 = this, f2 = !!D.u(o2) || o2, c3 = D.p(t2), d3 = function(t3, n2) {
                    var e2 = D.w(h2.$u ? Date.UTC(h2.$y, n2, t3) : new Date(h2.$y, n2, t3), h2);
                    return f2 ? e2 : e2.endOf(i1);
                }, $2 = function(t3, n2) {
                    return D.w(h2.toDate()[t3].apply(h2.toDate(), (f2 ? [
                        0,
                        0,
                        0,
                        0
                    ] : [
                        23,
                        59,
                        59,
                        999
                    ]).slice(n2)), h2);
                }, l2 = this.$W, m2 = this.$M, y2 = this.$D, M2 = "set" + (this.$u ? "UTC" : "");
                switch(c3){
                    case a:
                        return f2 ? d3(1, 0) : d3(31, 11);
                    case u:
                        return f2 ? d3(1, m2) : d3(0, m2 + 1);
                    case s:
                        var g2 = this.$locale().weekStart || 0, v2 = (l2 < g2 ? l2 + 7 : l2) - g2;
                        return d3(f2 ? y2 - v2 : y2 + (6 - v2), m2);
                    case i1:
                    case "date":
                        return $2(M2 + "Hours", 0);
                    case r:
                        return $2(M2 + "Minutes", 1);
                    case e:
                        return $2(M2 + "Seconds", 2);
                    case n:
                        return $2(M2 + "Milliseconds", 3);
                    default:
                        return this.clone();
                }
            }, d2.endOf = function(t2) {
                return this.startOf(t2, false);
            }, d2.$set = function(s2, o2) {
                var h2, f2 = D.p(s2), c3 = "set" + (this.$u ? "UTC" : ""), d3 = (h2 = {}, h2[i1] = c3 + "Date", h2.date = c3 + "Date", h2[u] = c3 + "Month", h2[a] = c3 + "FullYear", h2[r] = c3 + "Hours", h2[e] = c3 + "Minutes", h2[n] = c3 + "Seconds", h2[t] = c3 + "Milliseconds", h2)[f2], $2 = f2 === i1 ? this.$D + (o2 - this.$W) : o2;
                if (f2 === u || f2 === a) {
                    var l2 = this.clone().set("date", 1);
                    l2.$d[d3]($2), l2.init(), this.$d = l2.set("date", Math.min(this.$D, l2.daysInMonth())).toDate();
                } else d3 && this.$d[d3]($2);
                return this.init(), this;
            }, d2.set = function(t2, n2) {
                return this.clone().$set(t2, n2);
            }, d2.get = function(t2) {
                return this[D.p(t2)]();
            }, d2.add = function(t2, o2) {
                var h2, f2 = this;
                t2 = Number(t2);
                var c3 = D.p(o2), d3 = function(n2) {
                    var e2 = g(f2);
                    return D.w(e2.date(e2.date() + Math.round(n2 * t2)), f2);
                };
                if (c3 === u) return this.set(u, this.$M + t2);
                if (c3 === a) return this.set(a, this.$y + t2);
                if (c3 === i1) return d3(1);
                if (c3 === s) return d3(7);
                var $2 = (h2 = {}, h2[e] = 6e4, h2[r] = 36e5, h2[n] = 1e3, h2)[c3] || 1, l2 = this.$d.getTime() + t2 * $2;
                return D.w(l2, this);
            }, d2.subtract = function(t2, n2) {
                return this.add(-1 * t2, n2);
            }, d2.format = function(t2) {
                var n2 = this;
                if (!this.isValid()) return "Invalid Date";
                var e2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", r2 = D.z(this), i2 = this.$locale(), s2 = this.$H, u2 = this.$m, o2 = this.$M, a2 = i2.weekdays, h2 = i2.months, c3 = function(t3, r3, i3, s3) {
                    return t3 && (t3[r3] || t3(n2, e2)) || i3[r3].substr(0, s3);
                }, d3 = function(t3) {
                    return D.s(s2 % 12 || 12, t3, "0");
                }, $2 = i2.meridiem || function(t3, n3, e3) {
                    var r3 = t3 < 12 ? "AM" : "PM";
                    return e3 ? r3.toLowerCase() : r3;
                }, l2 = {
                    YY: String(this.$y).slice(-2),
                    YYYY: this.$y,
                    M: o2 + 1,
                    MM: D.s(o2 + 1, 2, "0"),
                    MMM: c3(i2.monthsShort, o2, h2, 3),
                    MMMM: h2[o2] || h2(this, e2),
                    D: this.$D,
                    DD: D.s(this.$D, 2, "0"),
                    d: String(this.$W),
                    dd: c3(i2.weekdaysMin, this.$W, a2, 2),
                    ddd: c3(i2.weekdaysShort, this.$W, a2, 3),
                    dddd: a2[this.$W],
                    H: String(s2),
                    HH: D.s(s2, 2, "0"),
                    h: d3(1),
                    hh: d3(2),
                    a: $2(s2, u2, true),
                    A: $2(s2, u2, false),
                    m: String(u2),
                    mm: D.s(u2, 2, "0"),
                    s: String(this.$s),
                    ss: D.s(this.$s, 2, "0"),
                    SSS: D.s(this.$ms, 3, "0"),
                    Z: r2
                };
                return e2.replace(f, function(t3, n3) {
                    return n3 || l2[t3] || r2.replace(":", "");
                });
            }, d2.utcOffset = function() {
                return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
            }, d2.diff = function(t2, h2, f2) {
                var c3, d3 = D.p(h2), $2 = g(t2), l2 = 6e4 * ($2.utcOffset() - this.utcOffset()), m2 = this - $2, y2 = D.m(this, $2);
                return y2 = (c3 = {}, c3[a] = y2 / 12, c3[u] = y2, c3[o] = y2 / 3, c3[s] = (m2 - l2) / 6048e5, c3[i1] = (m2 - l2) / 864e5, c3[r] = m2 / 36e5, c3[e] = m2 / 6e4, c3[n] = m2 / 1e3, c3)[d3] || m2, f2 ? y2 : D.a(y2);
            }, d2.daysInMonth = function() {
                return this.endOf(u).$D;
            }, d2.$locale = function() {
                return m[this.$L];
            }, d2.locale = function(t2, n2) {
                if (!t2) return this.$L;
                var e2 = this.clone(), r2 = M(t2, n2, true);
                return r2 && (e2.$L = r2), e2;
            }, d2.clone = function() {
                return D.w(this.$d, this);
            }, d2.toDate = function() {
                return new Date(this.valueOf());
            }, d2.toJSON = function() {
                return this.isValid() ? this.toISOString() : null;
            }, d2.toISOString = function() {
                return this.$d.toISOString();
            }, d2.toString = function() {
                return this.$d.toUTCString();
            }, c2;
        }();
        return g.prototype = v.prototype, g.extend = function(t2, n2) {
            return t2(n2, v, g), g;
        }, g.locale = M, g.isDayjs = y, g.unix = function(t2) {
            return g(1e3 * t2);
        }, g.en = m[l1], g.Ls = m, g;
    });
});
dayjs_min.Ls;
dayjs_min.en;
dayjs_min.extend;
dayjs_min.isDayjs;
dayjs_min.locale;
dayjs_min.unix;
const MILLISECONDS_A_MINUTE = 60 * 1e3;
const MS = "millisecond";
const MIN = "minute";
const D = "day";
const W = "week";
const Y = "year";
const FORMAT_DEFAULT = "YYYY-MM-DDTHH:mm:ssZ";
const __default5 = (o, c, d)=>{
    const proto = c.prototype;
    const oldFormat = proto.format;
    d.en.ordinal = (number)=>{
        const s = [
            "th",
            "st",
            "nd",
            "rd"
        ];
        const v = number % 100;
        return `[${number}${s[(v - 20) % 10] || s[v] || s[0]}]`;
    };
    proto.format = function(formatStr) {
        const locale = this.$locale();
        if (!this.isValid()) {
            return oldFormat.bind(this)(formatStr);
        }
        const utils = this.$utils();
        const str = formatStr || FORMAT_DEFAULT;
        const result1 = str.replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, (match)=>{
            switch(match){
                case "Q":
                    return Math.ceil((this.$M + 1) / 3);
                case "Do":
                    return locale.ordinal(this.$D);
                case "gggg":
                    return this.weekYear();
                case "GGGG":
                    return this.isoWeekYear();
                case "wo":
                    return locale.ordinal(this.week(), "W");
                case "w":
                case "ww":
                    return utils.s(this.week(), match === "w" ? 1 : 2, "0");
                case "W":
                case "WW":
                    return utils.s(this.isoWeek(), match === "W" ? 1 : 2, "0");
                case "k":
                case "kk":
                    return utils.s(String(this.$H === 0 ? 24 : this.$H), match === "k" ? 1 : 2, "0");
                case "X":
                    return Math.floor(this.$d.getTime() / 1000);
                case "x":
                    return this.$d.getTime();
                case "z":
                    return `[${this.offsetName()}]`;
                case "zzz":
                    return `[${this.offsetName("long")}]`;
                default:
                    return match;
            }
        });
        return oldFormat.bind(this)(result1);
    };
};
const typeToPos = {
    year: 0,
    month: 1,
    day: 2,
    hour: 3,
    minute: 4,
    second: 5
};
const dtfCache = {};
const getDateTimeFormat = (timezone, options = {})=>{
    const timeZoneName = options.timeZoneName || "short";
    const key = `${timezone}|${timeZoneName}`;
    let dtf = dtfCache[key];
    if (!dtf) {
        dtf = new Intl.DateTimeFormat("en-US", {
            hour12: false,
            timeZone: timezone,
            year: "numeric",
            month: "2-digit",
            day: "2-digit",
            hour: "2-digit",
            minute: "2-digit",
            second: "2-digit",
            timeZoneName
        });
        dtfCache[key] = dtf;
    }
    return dtf;
};
const __default6 = (o, c, d)=>{
    let defaultTimezone;
    const makeFormatParts = (timestamp, timezone, options = {})=>{
        const date = new Date(timestamp);
        const dtf = getDateTimeFormat(timezone, options);
        return dtf.formatToParts(date);
    };
    const tzOffset = (timestamp, timezone)=>{
        const formatResult = makeFormatParts(timestamp, timezone);
        const filled = [];
        for(let i1 = 0; i1 < formatResult.length; i1 += 1){
            const { type , value  } = formatResult[i1];
            const pos = typeToPos[type];
            if (pos >= 0) {
                filled[pos] = parseInt(value, 10);
            }
        }
        const hour = filled[3];
        const fixedHour = hour === 24 ? 0 : hour;
        const utcString = `${filled[0]}-${filled[1]}-${filled[2]} ${fixedHour}:${filled[4]}:${filled[5]}:000`;
        const utcTs = d.utc(utcString).valueOf();
        let asTS = +timestamp;
        const over = asTS % 1000;
        asTS -= over;
        return (utcTs - asTS) / (60 * 1000);
    };
    const fixOffset = (localTS, o0, tz)=>{
        let utcGuess = localTS - o0 * 60 * 1000;
        const o2 = tzOffset(utcGuess, tz);
        if (o0 === o2) {
            return [
                utcGuess,
                o0
            ];
        }
        utcGuess -= (o2 - o0) * 60 * 1000;
        const o3 = tzOffset(utcGuess, tz);
        if (o2 === o3) {
            return [
                utcGuess,
                o2
            ];
        }
        return [
            localTS - Math.min(o2, o3) * 60 * 1000,
            Math.max(o2, o3)
        ];
    };
    const proto = c.prototype;
    proto.tz = function(timezone = defaultTimezone, keepLocalTime) {
        const oldOffset = this.utcOffset();
        const date = this.toDate();
        const target = date.toLocaleString("en-US", {
            timeZone: timezone
        });
        const diff = Math.round((date - new Date(target)) / 1000 / 60);
        let ins = d(target).$set(MS, this.$ms).utcOffset(-Math.round(date.getTimezoneOffset() / 15) * 15 - diff, true);
        if (keepLocalTime) {
            const newOffset = ins.utcOffset();
            ins = ins.add(oldOffset - newOffset, MIN);
        }
        ins.$x.$timezone = timezone;
        return ins;
    };
    proto.offsetName = function(type) {
        const zone = this.$x?.$timezone || d.tz.guess();
        const result1 = makeFormatParts(this.valueOf(), zone, {
            timeZoneName: type
        }).find((m)=>m.type.toLowerCase() === "timezonename");
        return result1 && result1.value;
    };
    const oldStartOf = proto.startOf;
    proto.startOf = function(units, startOf) {
        if (!this.$x || !this.$x.$timezone) {
            return oldStartOf.call(this, units, startOf);
        }
        const withoutTz = d(this.format("YYYY-MM-DD HH:mm:ss:SSS"));
        const startOfWithoutTz = oldStartOf.call(withoutTz, units, startOf);
        return startOfWithoutTz.tz(this.$x.$timezone, true);
    };
    d.tz = function(input, arg1, arg2) {
        const parseFormat = arg2 && arg1;
        const timezone = arg2 || arg1 || defaultTimezone;
        const previousOffset = tzOffset(+d(), timezone);
        if (typeof input !== "string") {
            return d(input).tz(timezone);
        }
        const localTs = d.utc(input, parseFormat).valueOf();
        const [targetTs, targetOffset] = fixOffset(localTs, previousOffset, timezone);
        const ins = d(targetTs).utcOffset(targetOffset);
        ins.$x.$timezone = timezone;
        return ins;
    };
    d.tz.guess = function() {
        return Intl.DateTimeFormat().resolvedOptions().timeZone;
    };
    d.tz.setDefault = function(timezone) {
        defaultTimezone = timezone;
    };
};
const REGEX_VALID_OFFSET_FORMAT = /[+-]\d\d(?::?\d\d)?/g;
const REGEX_OFFSET_HOURS_MINUTES_FORMAT = /([+-]|\d\d)/g;
function offsetFromString(value = "") {
    const offset = value.match(REGEX_VALID_OFFSET_FORMAT);
    if (!offset) {
        return null;
    }
    const [indicator, hoursOffset, minutesOffset] = `${offset[0]}`.match(REGEX_OFFSET_HOURS_MINUTES_FORMAT) || [
        "-",
        0,
        0
    ];
    const totalOffsetInMinutes = +hoursOffset * 60 + +minutesOffset;
    if (totalOffsetInMinutes === 0) {
        return 0;
    }
    return indicator === "+" ? totalOffsetInMinutes : -totalOffsetInMinutes;
}
const __default7 = (option, Dayjs, dayjs)=>{
    const proto = Dayjs.prototype;
    dayjs.utc = function(date) {
        const cfg = {
            date,
            utc: true,
            args: arguments
        };
        return new Dayjs(cfg);
    };
    proto.utc = function(keepLocalTime) {
        const ins = dayjs(this.toDate(), {
            locale: this.$L,
            utc: true
        });
        if (keepLocalTime) {
            return ins.add(this.utcOffset(), MIN);
        }
        return ins;
    };
    proto.local = function() {
        return dayjs(this.toDate(), {
            locale: this.$L,
            utc: false
        });
    };
    const oldParse = proto.parse;
    proto.parse = function(cfg) {
        if (cfg.utc) {
            this.$u = true;
        }
        if (!this.$utils().u(cfg.$offset)) {
            this.$offset = cfg.$offset;
        }
        oldParse.call(this, cfg);
    };
    const oldInit = proto.init;
    proto.init = function() {
        if (this.$u) {
            const { $d  } = this;
            this.$y = $d.getUTCFullYear();
            this.$M = $d.getUTCMonth();
            this.$D = $d.getUTCDate();
            this.$W = $d.getUTCDay();
            this.$H = $d.getUTCHours();
            this.$m = $d.getUTCMinutes();
            this.$s = $d.getUTCSeconds();
            this.$ms = $d.getUTCMilliseconds();
        } else {
            oldInit.call(this);
        }
    };
    const oldUtcOffset = proto.utcOffset;
    proto.utcOffset = function(input, keepLocalTime) {
        const { u  } = this.$utils();
        if (u(input)) {
            if (this.$u) {
                return 0;
            }
            if (!u(this.$offset)) {
                return this.$offset;
            }
            return oldUtcOffset.call(this);
        }
        if (typeof input === "string") {
            input = offsetFromString(input);
            if (input === null) {
                return this;
            }
        }
        const offset = Math.abs(input) <= 16 ? input * 60 : input;
        let ins = this;
        if (keepLocalTime) {
            ins.$offset = offset;
            ins.$u = input === 0;
            return ins;
        }
        if (input !== 0) {
            const localTimezoneOffset = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
            ins = this.local().add(offset + localTimezoneOffset, MIN);
            ins.$offset = offset;
            ins.$x.$localOffset = localTimezoneOffset;
        } else {
            ins = this.utc();
        }
        return ins;
    };
    const oldFormat = proto.format;
    const UTC_FORMAT_DEFAULT = "YYYY-MM-DDTHH:mm:ss[Z]";
    proto.format = function(formatStr) {
        const str = formatStr || (this.$u ? UTC_FORMAT_DEFAULT : "");
        return oldFormat.call(this, str);
    };
    proto.valueOf = function() {
        const addedOffset = !this.$utils().u(this.$offset) ? this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()) : 0;
        return this.$d.valueOf() - addedOffset * MILLISECONDS_A_MINUTE;
    };
    proto.isUTC = function() {
        return !!this.$u;
    };
    proto.toISOString = function() {
        return this.toDate().toISOString();
    };
    proto.toString = function() {
        return this.toDate().toUTCString();
    };
    const oldToDate = proto.toDate;
    proto.toDate = function(type) {
        if (type === "s" && this.$offset) {
            return dayjs(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate();
        }
        return oldToDate.call(this);
    };
    const oldDiff = proto.diff;
    proto.diff = function(input, units, __float) {
        if (input && this.$u === input.$u) {
            return oldDiff.call(this, input, units, __float);
        }
        const localThis = this.local();
        const localInput = dayjs(input).local();
        return oldDiff.call(localThis, localInput, units, __float);
    };
};
const isoWeekPrettyUnit = "isoweek";
const __default8 = (o, c, d)=>{
    const getYearFirstThursday = (year, isUtc)=>{
        const yearFirstDay = (isUtc ? d.utc : d)().year(year).startOf(Y);
        let addDiffDays = 4 - yearFirstDay.isoWeekday();
        if (yearFirstDay.isoWeekday() > 4) {
            addDiffDays += 7;
        }
        return yearFirstDay.add(addDiffDays, D);
    };
    const getCurrentWeekThursday = (ins)=>ins.add(4 - ins.isoWeekday(), D);
    const proto = c.prototype;
    proto.isoWeekYear = function() {
        const nowWeekThursday = getCurrentWeekThursday(this);
        return nowWeekThursday.year();
    };
    proto.isoWeek = function(week) {
        if (!this.$utils().u(week)) {
            return this.add((week - this.isoWeek()) * 7, D);
        }
        const nowWeekThursday = getCurrentWeekThursday(this);
        const diffWeekThursday = getYearFirstThursday(this.isoWeekYear(), this.$u);
        return nowWeekThursday.diff(diffWeekThursday, W) + 1;
    };
    proto.isoWeekday = function(week) {
        if (!this.$utils().u(week)) {
            return this.day(this.day() % 7 ? week : week - 7);
        }
        return this.day() || 7;
    };
    const oldStartOf = proto.startOf;
    proto.startOf = function(units, startOf) {
        const utils = this.$utils();
        const isStartOf = !utils.u(startOf) ? startOf : true;
        const unit = utils.p(units);
        if (unit === isoWeekPrettyUnit) {
            return isStartOf ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day");
        }
        return oldStartOf.bind(this)(units, startOf);
    };
};
const __default9 = (o, c, d)=>{
    const proto = c.prototype;
    proto.week = function(week = null) {
        if (week !== null) {
            return this.add((week - this.week()) * 7, D);
        }
        const yearStart = this.$locale().yearStart || 1;
        if (this.month() === 11 && this.date() > 25) {
            const nextYearStartDay = d(this).startOf(Y).add(1, Y).date(yearStart);
            const thisEndOfWeek = d(this).endOf(W);
            if (nextYearStartDay.isBefore(thisEndOfWeek)) {
                return 1;
            }
        }
        const yearStartDay = d(this).startOf(Y).date(yearStart);
        const yearStartWeek = yearStartDay.startOf(W).subtract(1, MS);
        const diffInWeek = this.diff(yearStartWeek, W, true);
        if (diffInWeek < 0) {
            return d(this).startOf("week").week();
        }
        return Math.ceil(diffInWeek);
    };
    proto.weeks = function(week = null) {
        return this.week(week);
    };
};
const __default10 = (o, c)=>{
    const proto = c.prototype;
    proto.weekYear = function() {
        const month = this.month();
        const weekOfYear = this.week();
        const year = this.year();
        if (weekOfYear === 1 && month === 11) {
            return year + 1;
        }
        if (month === 0 && weekOfYear >= 52) {
            return year - 1;
        }
        return year;
    };
};
const kLastModified = "last-modified";
const kToday = "today";
const rSysDate = "`r Sys.time()`";
const kNow = "now";
function today() {
    const today = new Date();
    today.setHours(0);
    today.setMinutes(0);
    today.setSeconds(0);
    today.setMilliseconds(0);
    return today;
}
function resolveAndFormatDate(input, date, format) {
    const resolveDate = (date)=>{
        if (date) {
            if (typeof date === "string") {
                return {
                    value: date,
                    format: format || "short"
                };
            } else if (typeof date === "object") {
                const schemaDate = date;
                return {
                    value: schemaDate.value,
                    format: schemaDate.format || format || "short"
                };
            }
        } else {
            return undefined;
        }
    };
    const resolvedDate = resolveDate(date);
    if (resolvedDate) {
        if (isSpecialDate(resolvedDate.value)) {
            resolvedDate.value = parseSpecialDate(input, resolvedDate.value);
        }
        const parsed = parsePandocDate(resolvedDate.value);
        return formatDate(parsed, resolvedDate.format);
    }
}
function resolveDate(input, val) {
    if (isSpecialDate(val)) {
        return parseSpecialDate(input, val);
    } else {
        return val;
    }
}
function isSpecialDate(val) {
    return val === kLastModified || val === kToday || val === kNow;
}
function parseSpecialDate(input, val) {
    if (val === kLastModified || val === rSysDate) {
        if (!Array.isArray(input)) {
            input = [
                input
            ];
        }
        let lastModifiedTs = 0;
        for (const inp of input){
            const stat = Deno.statSync(inp);
            if (stat.mtime) {
                lastModifiedTs = Math.max(lastModifiedTs, stat.mtime.getTime());
            }
        }
        return formatDate(new Date(lastModifiedTs), "YYYY-MM-DDTHH:mm:ssZ");
    } else if (val === kToday) {
        return formatDate(today(), "YYYY-MM-DDTHH:mm:ssZ");
    } else if (val === kNow) {
        return formatDate(new Date(), "YYYY-MM-DDTHH:mm:ssZ");
    } else {
        return val;
    }
}
function initDayJsPlugins() {
    dayjs_min.extend(__default7);
    dayjs_min.extend(__default6);
    dayjs_min.extend(__default8);
    dayjs_min.extend(__default10);
    dayjs_min.extend(__default9);
    dayjs_min.extend(__default5);
}
async function setDateLocale(locale) {
    locale = locale.toLowerCase();
    if (locale !== dayjs_min.locale()) {
        const localePath = resourcePath(`library/dayjs/locale/${locale}.js`);
        if (existsSync(localePath)) {
            const localeUrl = toFileUrl2(localePath).href;
            const localeModule = await import(localeUrl);
            dayjs_min.locale(localeModule.default, null, true);
            dayjs_min.locale(locale);
        }
    }
}
const formatDate = (date, dateStyle, timeStyle)=>{
    if (dateStyle === "full" || dateStyle === "long" || dateStyle === "medium" || dateStyle === "short") {
        const options = {
            dateStyle
        };
        if (timeStyle) {
            options.timeStyle = timeStyle;
        }
        return date.toLocaleString(dayjs_min.locale(), options);
    } else {
        if (dateStyle === "iso") dateStyle = "YYYY-MM-DD";
        return dayjs_min(date).format(dateStyle);
    }
};
const parsePandocDate = (dateRaw)=>{
    const formats = [
        "MM/dd/yyyy",
        "MM-dd-yyyy",
        "MM/dd/yy",
        "MM-dd-yy",
        "yyyy-MM-dd",
        "dd MM yyyy",
        "MM dd, yyyy", 
    ];
    const parseFormat = (dateStr)=>{
        for (const format of formats){
            try {
                const date = parse13(dateStr, format);
                return date;
            } catch  {}
        }
        try {
            const formats1 = guessFormat(dateRaw);
            if (formats1) {
                try {
                    const format1 = Array.isArray(formats1) ? formats1[0] : formats1;
                    const date1 = dayjs_min(dateStr, format1);
                    return date1.toDate();
                } catch  {}
            }
        } catch  {}
        try {
            return new Date(dateStr);
        } catch  {
            return undefined;
        }
    };
    return parseFormat(dateRaw);
};
const kPdfUrl = "pdf-url";
const kAbstractUrl = "abstract-url";
const kEIssn = "eissn";
function suggestId(author, date) {
    let citeIdLeading = "";
    if (author && author.length > 0) {
        if (author[0].family) {
            citeIdLeading = author[0].family;
        } else if (author[0].literal) {
            citeIdLeading = author[0].literal;
        }
    }
    let datePart = "";
    if (date && date["date-parts"] && date["date-parts"].length > 0) {
        const yearIssued = date["date-parts"][0][0];
        if (yearIssued) {
            datePart = yearIssued + "";
        }
    }
    let suggestedId = `${citeIdLeading.toLowerCase()}${datePart}`;
    if (suggestedId.length === 0) {
        suggestedId = "untitled";
    }
    return suggestedId;
}
function cslDateToEDTFDate(date) {
    if (date["date-parts"]) {
        const paddedParts = date["date-parts"][0].map((part)=>{
            const partStr = part?.toString();
            if (partStr?.length === 1) {
                return `0${partStr}`;
            }
            return partStr;
        });
        return paddedParts.join("-");
    }
}
function cslNames(authors) {
    const cslNames = [];
    const authorList = Array.isArray(authors) ? authors : [
        authors
    ];
    authorList.forEach((auth)=>{
        if (auth) {
            const name = authorToCslName(auth);
            if (name) {
                cslNames.push(name);
            }
        }
    });
    return cslNames;
}
function cslDate(dateRaw) {
    const toDateArray = (dateArr)=>{
        if (dateArr.length === 0) {
            return undefined;
        } else if (dateArr.length === 1) {
            return {
                "date-parts": [
                    [
                        dateArr[0], 
                    ]
                ]
            };
        } else if (dateArr.length === 2) {
            return {
                "date-parts": [
                    [
                        dateArr[0],
                        dateArr[1], 
                    ]
                ]
            };
        } else if (dateArr.length >= 3) {
            return {
                "date-parts": [
                    [
                        dateArr[0],
                        dateArr[1],
                        dateArr[2], 
                    ]
                ]
            };
        }
    };
    if (Array.isArray(dateRaw)) {
        const dateArr = dateRaw;
        return toDateArray(dateArr);
    } else if (typeof dateRaw === "number") {
        const parseNumeric = (dateStr)=>{
            let dateParsed = dateStr;
            const chomps = [
                4,
                2,
                2
            ];
            const date = [];
            for (const chomp of chomps){
                if (dateParsed.length >= chomp) {
                    const part = dateParsed.substring(0, chomp);
                    if (!isNaN(+part)) {
                        date.push(+part);
                        dateParsed = dateParsed.substring(chomp);
                    } else {
                        break;
                    }
                } else {
                    break;
                }
            }
            if (date.length > 0) {
                return date;
            } else {
                return undefined;
            }
        };
        const dateStr = String(dateRaw);
        const dateArr1 = parseNumeric(dateStr);
        if (dateArr1) {
            return toDateArray(dateArr1);
        }
    } else if (typeof dateRaw === "string") {
        const date = parsePandocDate(dateRaw);
        if (date) {
            return {
                "date-parts": [
                    [
                        date.getFullYear(),
                        date.getMonth() + 1,
                        date.getDate(), 
                    ]
                ],
                literal: formatDate(date, "YYYY-MM-DD"),
                raw: formatDate(date, "YYYY-MM-DD")
            };
        }
        return undefined;
    }
}
function authorToCslName(author) {
    const parts = author.split(" ");
    if (parts.length > 0) {
        const given = parts.shift() || "";
        const family = parts.length > 0 ? parts.join("") : "";
        return {
            family,
            given,
            literal: author
        };
    }
}
function cslType(type) {
    if (types2.includes(type)) {
        return type;
    } else {
        if (type === "journal") {
            return "article-journal";
        } else if (type === "conference") {
            return "paper-conference";
        } else if (type === "dissertation") {
            return "thesis";
        }
        return "article";
    }
}
const types2 = [
    "article",
    "article-journal",
    "article-magazine",
    "article-newspaper",
    "bill",
    "book",
    "broadcast",
    "chapter",
    "classic",
    "collection",
    "dataset",
    "document",
    "entry",
    "entry-dictionary",
    "entry-encyclopedia",
    "event",
    "figure",
    "graphic",
    "hearing",
    "interview",
    "legal_case",
    "legislation",
    "manuscript",
    "map",
    "motion_picture",
    "musical_score",
    "pamphlet",
    "paper-conference",
    "patent",
    "performance",
    "periodical",
    "personal_communication",
    "post",
    "post-weblog",
    "regulation",
    "report",
    "review",
    "review-book",
    "software",
    "song",
    "speech",
    "standard",
    "thesis",
    "treaty",
    "webpage", 
];
const kDOI = "DOI";
const kCitation1 = "citation";
const kURL = "URL";
const kId = "id";
const kCitationKey = "citation-key";
const kEditor = "editor";
const kType = "type";
const kCategories = "categories";
const kLanguage = "language";
const kAvailableDate = "available-date";
const kIssued = "issued";
const kDate1 = "date";
const kPublisher = "publisher";
const kContainerTitle = "container-title";
const kVolume = "volume";
const kIssue = "issue";
const kISSN = "issn";
const kISBN = "isbn";
const kPMCID = "pmcid";
const kPMID = "pmid";
const kFirstPage = "page-first";
const kLastPage = "page-last";
const kPage = "page";
const kNumber = "number";
const kCustom = "custom";
const kArchiveCollection = "archive_collection";
const kArchiveLocation = "archive_location";
const getCSLPath = (input, format)=>{
    const cslPath = format.metadata[kCsl];
    if (cslPath) {
        if (isAbsolute2(cslPath)) {
            return cslPath;
        } else {
            return join3(dirname2(input), cslPath);
        }
    } else {
        return undefined;
    }
};
function documentCSL(input, inputMetadata, defaultType, outputFile, offset) {
    const citationMetadata = citationMeta(inputMetadata);
    const type = citationMetadata[kType] ? cslType(citationMetadata[kType]) : defaultType;
    const title = citationMetadata[kTitle] || inputMetadata[kTitle];
    const csl = {
        title,
        type
    };
    const key = citationMetadata[kCitationKey];
    if (key) {
        csl[kCitationKey] = key;
    }
    const authors = parseAuthor(citationMetadata[kAuthor] || inputMetadata[kAuthor]);
    csl.author = cslNames(authors?.filter((auth)=>auth !== undefined).map((auth)=>auth?.name));
    const editors = parseAuthor(citationMetadata[kEditor]);
    csl.editor = cslNames(editors?.filter((editor)=>editor !== undefined).map((editor)=>editor?.name));
    if (csl.editor && csl.editor.length === 0) {
        delete csl.editor;
    }
    const categories = citationMetadata[kCategories] || inputMetadata[kCategories];
    if (categories) {
        csl.categories = Array.isArray(categories) ? categories : [
            categories
        ];
    }
    const language = citationMetadata[kLanguage] || inputMetadata[kLang];
    if (language) {
        csl.language = language;
    }
    const availableDate = citationMetadata[kAvailableDate] || resolveAndFormatDate(input, inputMetadata[kDate1]);
    if (availableDate) {
        csl[kAvailableDate] = cslDate(availableDate);
    }
    const issued = citationMetadata[kIssued] || resolveAndFormatDate(input, inputMetadata[kDate1]);
    if (issued) {
        csl.issued = cslDate(issued);
    }
    const __abstract = citationMetadata[kAbstract] || inputMetadata[kAbstract];
    if (__abstract) {
        csl.abstract = __abstract;
    }
    const publisher = citationMetadata[kPublisher];
    if (publisher) {
        csl.publisher = publisher;
    }
    const containerTitle = citationMetadata[kContainerTitle];
    if (containerTitle) {
        csl[kContainerTitle] = containerTitle;
    }
    csl.id = citationMetadata[kId] || suggestId(csl.author, csl.issued);
    const findValue = (baseKey, metadata, transform)=>{
        const keys = [
            baseKey,
            transform(baseKey)
        ];
        for (const key of keys){
            for (const md of metadata){
                const value = md[key];
                if (value) {
                    return value;
                }
            }
        }
    };
    const lowercase = (key)=>{
        return key.toLocaleLowerCase();
    };
    const kebabcase = (key)=>{
        return key.replaceAll("_", "_");
    };
    const url = findValue(kURL, [
        citationMetadata
    ], lowercase);
    if (url) {
        csl.URL = url;
    } else {
        csl.URL = synthesizeCitationUrl(input, inputMetadata, outputFile, offset);
    }
    const doi = findValue(kDOI, [
        citationMetadata,
        inputMetadata
    ], lowercase);
    if (doi) {
        csl.DOI = doi;
    }
    const issue = citationMetadata[kIssue];
    if (issue) {
        csl.issue = issue;
    }
    const volume = citationMetadata[kVolume];
    if (volume) {
        csl.volume = volume;
    }
    const number = citationMetadata[kNumber];
    if (number) {
        csl.number = number;
    }
    const isbn = findValue(kISBN, [
        citationMetadata
    ], lowercase);
    if (isbn) {
        csl.ISBN = isbn;
    }
    const issn = findValue(kISSN, [
        citationMetadata
    ], lowercase);
    if (issn) {
        csl.ISSN = issn;
    }
    const pmcid = findValue(kPMCID, [
        citationMetadata
    ], lowercase);
    if (pmcid) {
        csl.PMCID = pmcid;
    }
    const pmid = findValue(kPMID, [
        citationMetadata
    ], lowercase);
    if (pmid) {
        csl.PMID = pmid;
    }
    const pageRange = pages(citationMetadata);
    if (pageRange.firstPage) {
        csl["page-first"] = pageRange.firstPage;
    }
    if (pageRange.lastPage) {
        csl["page-last"] = pageRange.lastPage;
    }
    if (pageRange.page) {
        csl.page = pageRange.page;
    }
    const archiveCollection = findValue(kArchiveCollection, [
        citationMetadata
    ], kebabcase);
    if (archiveCollection) {
        csl[kArchiveCollection] = archiveCollection;
    }
    const archiveLocation = findValue(kArchiveLocation, [
        citationMetadata
    ], kebabcase);
    if (archiveLocation) {
        csl[kArchiveLocation] = archiveLocation;
    }
    const forwardStringValue = (key)=>{
        if (citationMetadata[key] !== undefined) {
            csl[key] = citationMetadata[key];
        }
    };
    [
        "title-short",
        "annote",
        "archive",
        "archive-place",
        "authority",
        "call-number",
        "chapter-number",
        "citation-number",
        "citation-label",
        "collection-number",
        "collection-title",
        "container-title-short",
        "dimensions",
        "division",
        "edition",
        "event-title",
        "event-place",
        "first-reference-note-number",
        "genre",
        "jurisdiction",
        "keyword",
        "locator",
        "medium",
        "note",
        "number",
        "number-of-pages",
        "number-of-volumes",
        "original-publisher",
        "original-publisher-place",
        "original-title",
        "part",
        "part-title",
        "printing",
        "publisher-place",
        "references",
        "reviewed-genre",
        "reviewed-title",
        "scale",
        "section",
        "source",
        "status",
        "supplement",
        "version",
        "volume-title",
        "volume-title-short",
        "year-suffix", 
    ].forEach(forwardStringValue);
    const forwardCSLNameValue = (key)=>{
        if (citationMetadata[key]) {
            const authors = parseAuthor(citationMetadata[key]);
            csl[key] = cslNames(authors?.filter((auth)=>auth !== undefined).map((auth)=>auth?.name));
        }
    };
    [
        "chair",
        "collection-editor",
        "compiler",
        "composer",
        "container-author",
        "contributor",
        "curator",
        "director",
        "editor",
        "editorial-director",
        "executive-producer",
        "guest",
        "host",
        "interviewer",
        "illustrator",
        "narrator",
        "organizer",
        "original-author",
        "performer",
        "producer",
        "recipient",
        "reviewed-author",
        "script-writer",
        "series-creator",
        "translator", 
    ].forEach(forwardCSLNameValue);
    const forwardCSLDateValue = (key)=>{
        if (citationMetadata[key]) {
            csl[key] = cslDate(citationMetadata[key]);
        }
    };
    [
        "accessed",
        "event-date",
        "original-date",
        "submitted"
    ].forEach(forwardCSLDateValue);
    const custom = citationMetadata[kCustom];
    if (custom) {
        csl[kCustom] = custom;
    }
    const extras = {};
    const kwString = citationMetadata.keyword;
    if (kwString && typeof kwString === "string") {
        extras.keywords = kwString.split(",");
    } else if (inputMetadata.keywords) {
        const kw = inputMetadata.keywords;
        extras.keywords = Array.isArray(kw) ? kw : [
            kw
        ];
    }
    if (citationMetadata[kPdfUrl]) {
        extras[kPdfUrl] = citationMetadata[kPdfUrl];
    }
    if (citationMetadata[kAbstractUrl]) {
        extras[kAbstractUrl] = citationMetadata[kAbstractUrl];
    }
    if (citationMetadata[kEIssn]) {
        extras[kEIssn] = citationMetadata[kEIssn];
    }
    return {
        csl,
        extras
    };
}
function citationMeta(metadata) {
    if (typeof metadata[kCitation1] === "object") {
        return metadata[kCitation1];
    } else {
        return {};
    }
}
function synthesizeCitationUrl(input, metadata, outputFile, offset) {
    const siteMeta = metadata[kWebsite];
    const baseUrl = siteMeta?.[kSiteUrl];
    if (baseUrl && outputFile && offset) {
        const rootDir = Deno.realPathSync(join3(dirname2(input), offset));
        if (outputFile === "index.html") {
            return `${baseUrl}/${pathWithForwardSlashes(relative2(rootDir, dirname2(input)))}`;
        } else {
            const relativePath = relative2(rootDir, join3(dirname2(outputFile), basename2(outputFile)));
            const part = pathWithForwardSlashes(relativePath);
            return `${baseUrl}/${part}`;
        }
    } else {
        return undefined;
    }
}
function pages(citationMetadata) {
    let firstPage = citationMetadata[kFirstPage];
    let lastPage = citationMetadata[kLastPage];
    let pages = citationMetadata[kPage];
    if (pages && pages.includes("-")) {
        const pagesSplit = pages.split("-");
        if (!firstPage) {
            firstPage = pagesSplit[0];
        }
        if (!lastPage) {
            lastPage = pagesSplit[1];
        }
    } else if (pages && !firstPage) {
        firstPage = pages;
    } else if (!pages) {
        if (firstPage && lastPage) {
            pages = `${firstPage} - ${lastPage}`;
        } else if (firstPage) {
            pages = `${firstPage}`;
        }
    }
    return {
        firstPage: firstPage,
        lastPage: lastPage,
        page: pages
    };
}
const kAppendixCreativeCommonsLic = [
    "CC BY",
    "CC BY-SA",
    "CC BY-ND",
    "CC BY-NC", 
];
const kStylePlain = "plain";
const kStyleDefault = "default";
const kAppendixHeadingClass = "quarto-appendix-heading";
const kAppendixContentsClass = "quarto-appendix-contents";
const kQuartoSecondaryLabelClass = "quarto-appendix-secondary-label";
const kQuartoCiteAsClass = "quarto-appendix-citeas";
const kQuartoCiteBibtexClass = "quarto-appendix-bibtex";
const kAppendixId = "quarto-appendix";
async function processDocumentAppendix(input, inputTraits, format, flags, doc, offset) {
    if (format.metadata.book || format.metadata[kAppendixStyle] === false || format.metadata[kAppendixStyle] === "none") {
        return;
    }
    const appendixStyle = parseStyle(format.metadata[kAppendixStyle]);
    const mainEl = doc.querySelector("main.content");
    if (mainEl) {
        const appendixEl = doc.createElement("DIV");
        appendixEl.setAttribute("id", kAppendixId);
        if (appendixStyle !== kStylePlain) {
            appendixEl.classList.add(appendixStyle);
        }
        const headingClasses = [
            "anchored",
            kAppendixHeadingClass
        ];
        const appendixSections = [];
        const addSection = (fn, title)=>{
            const containerEl = doc.createElement("SECTION");
            containerEl.classList.add(kAppendixContentsClass);
            fn(containerEl);
            if (title) {
                insertTitle(doc, containerEl, title, 2, headingClasses);
            }
            appendixSections.push(containerEl);
        };
        if (!hasMarginCites(format) && !inputTraits[kPositionedRefs]) {
            const refsEl = doc.getElementById("refs");
            if (refsEl) {
                const findRefTitle = (refsEl)=>{
                    const parentEl = refsEl.parentElement;
                    if (parentEl && parentEl.tagName === "SECTION" && parentEl.childElementCount === 2) {
                        const headingEl = parentEl.querySelector("h1, h2, h3, h4, h5, h6");
                        if (headingEl) {
                            headingEl.remove();
                            return headingEl.innerText;
                        }
                    }
                };
                const existingTitle = findRefTitle(refsEl);
                addSection((sectionEl)=>{
                    sectionEl.setAttribute("role", "doc-bibliography");
                    sectionEl.appendChild(refsEl);
                    if (existingTitle) {
                        insertTitle(doc, sectionEl, existingTitle, 2, headingClasses);
                    } else {
                        insertReferencesTitle(doc, sectionEl, format.language, 2, headingClasses);
                    }
                });
            }
        }
        if (!hasMarginRefs(format, flags)) {
            const footnoteEls = doc.querySelectorAll('section[role="doc-endnotes"]');
            if (footnoteEls && footnoteEls.length === 1) {
                const footnotesEl = footnoteEls.item(0);
                insertFootnotesTitle(doc, footnotesEl, format.language, 2, headingClasses);
                appendixSections.push(footnotesEl);
            }
        }
        if (format.metadata[kLicense]) {
            addSection((sectionEl)=>{
                const contentsDiv = doc.createElement("DIV");
                contentsDiv.id = "quarto-reuse";
                contentsDiv.classList.add(kAppendixContentsClass);
                const creativeCommons = creativeCommonsLicense(format.metadata[kLicense]);
                if (creativeCommons) {
                    const licenseUrl = creativeCommonsUrl(creativeCommons, format.metadata[kLang]);
                    const linkEl = doc.createElement("A");
                    linkEl.innerText = licenseUrl;
                    linkEl.setAttribute("rel", "license");
                    linkEl.setAttribute("href", licenseUrl);
                    contentsDiv.appendChild(linkEl);
                } else {
                    const licenseEl = doc.createElement("DIV");
                    licenseEl.innerText = format.metadata[kLicense];
                    contentsDiv.appendChild(licenseEl);
                }
                sectionEl.appendChild(contentsDiv);
            }, format.language[kSectionTitleReuse] || "Usage");
        }
        if (format.metadata[kCitation]) {
            const cite = await generateCite(input, format, offset);
            if (cite?.bibtex || cite?.html) {
                addSection((sectionEl)=>{
                    const contentsDiv = doc.createElement("DIV");
                    sectionEl.appendChild(contentsDiv);
                    if (cite?.bibtex) {
                        const bibTexLabelEl = doc.createElement("DIV");
                        bibTexLabelEl.classList.add(kQuartoSecondaryLabelClass);
                        bibTexLabelEl.innerText = format.language[kAppendixAttributionBibTex] || "BibLaTeX citation";
                        contentsDiv.appendChild(bibTexLabelEl);
                        const bibTexDiv = createCodeBlock(doc, cite.bibtex, "bibtex");
                        bibTexDiv.classList.add(kQuartoCiteBibtexClass);
                        contentsDiv.appendChild(bibTexDiv);
                        const copyButton = createCodeCopyButton(doc, format);
                        bibTexDiv.appendChild(copyButton);
                    }
                    if (cite?.html) {
                        const citeLabelEl = doc.createElement("DIV");
                        citeLabelEl.classList.add(kQuartoSecondaryLabelClass);
                        citeLabelEl.innerText = format.language[kAppendixAttributionCiteAs] || "For attribution, please cite this work as:";
                        contentsDiv.appendChild(citeLabelEl);
                        const entry = extractCiteEl(cite.html, doc);
                        if (entry) {
                            entry.classList.add(kQuartoCiteAsClass);
                            contentsDiv.appendChild(entry);
                        }
                    }
                }, format.language[kSectionTitleCitation] || "Citation");
            }
        }
        const appendixSectionNodes = doc.querySelectorAll("section.appendix");
        const appendixSectionEls = [];
        for (const appendixSectionNode of appendixSectionNodes){
            const appendSectionEl = appendixSectionNode;
            if (appendSectionEl) {
                const extractHeaderEl = ()=>{
                    const headerEl = appendSectionEl.querySelector("h1, h2, h3, h4, h5, h6");
                    if (headerEl) {
                        headerEl.remove();
                        const h2 = doc.createElement("h2");
                        h2.innerHTML = headerEl.innerHTML;
                        return h2;
                    } else {
                        const h21 = doc.createElement("h2");
                        return h21;
                    }
                };
                const headerEl = extractHeaderEl();
                headerEl.classList.add(kAppendixHeadingClass);
                const containerDivEl = doc.createElement("DIV");
                containerDivEl.classList.add(kAppendixContentsClass);
                while(appendSectionEl.childNodes.length > 0){
                    containerDivEl.appendChild(appendSectionEl.childNodes[0]);
                }
                appendSectionEl.appendChild(headerEl);
                appendSectionEl.appendChild(containerDivEl);
                appendixSectionEls.push(appendSectionEl);
            }
        }
        if (appendixSectionEls.length > 0) {
            appendixSections.unshift(...appendixSectionEls);
        }
        appendixSections.forEach((el)=>{
            appendixEl.appendChild(el);
        });
        if (appendixEl.childElementCount > 0) {
            mainEl.appendChild(appendixEl);
        }
    }
}
function parseStyle(style) {
    switch(style){
        case "plain":
            return "plain";
        default:
            return kStyleDefault;
    }
}
function creativeCommonsLicense(license) {
    if (license && kAppendixCreativeCommonsLic.includes(license)) {
        return license;
    } else {
        return undefined;
    }
}
function creativeCommonsUrl(license, lang) {
    const licenseType = license.substring(3);
    if (lang && lang !== "en") {
        return `https://creativecommons.org/licenses/${licenseType.toLowerCase()}/4.0/deed.${lang.toLowerCase().replace("-", "_")}`;
    } else {
        return `https://creativecommons.org/licenses/${licenseType.toLowerCase()}/4.0/`;
    }
}
async function generateCite(input, format, offset) {
    const { csl  } = documentCSL(input, format.metadata, "webpage", format.pandoc["output-file"], offset);
    if (csl) {
        const cslPath = getCSLPath(input, format);
        const html = await renderHtml(csl, cslPath);
        const bibtex = await renderBibTex(csl);
        return {
            html,
            bibtex
        };
    } else {
        return undefined;
    }
}
function extractCiteEl(html, doc) {
    const htmlDiv = doc.createElement("DIV");
    htmlDiv.innerHTML = html;
    const entry = htmlDiv.querySelector(".csl-entry");
    if (entry) {
        const leftMarginEl = entry.querySelector(".csl-left-margin");
        if (leftMarginEl) {
            leftMarginEl.remove();
            const rightEl = entry.querySelector(".csl-right-inline");
            if (rightEl) {
                rightEl.classList.remove("csl-right-inline");
            }
        }
        return entry;
    } else {
        return undefined;
    }
}
const kTitleBlockStyle = "title-block-style";
const kTitleBlockBanner = "title-block-banner";
const ktitleBlockColor = "title-block-banner-color";
const kTitleBlockCategories = "title-block-categories";
function documentTitleScssLayer(format) {
    if (format.metadata[kTitleBlockStyle] === false || format.metadata[kTitleBlockStyle] === "none" || format.metadata[kTitleBlockStyle] === "plain") {
        return undefined;
    } else {
        const titleBlockScss = formatResourcePath("html", join3("templates", "title-block.scss"));
        return sassLayer(titleBlockScss);
    }
}
function documentTitleMetadata(format) {
    if (format.metadata[kTitleBlockStyle] !== false && format.metadata[kTitleBlockStyle] !== "none" && format.metadata[kDateFormat] === undefined) {
        return {
            [kDateFormat]: "long"
        };
    } else {
        return undefined;
    }
}
function documentTitleIncludeInHeader(input, format, temp) {
    const variables = [];
    const banner = format.metadata[kTitleBlockBanner];
    if (banner) {
        const titleBlockColor = titleColor(format.metadata[ktitleBlockColor]);
        if (titleBlockColor) {
            variables.push(`color: ${titleBlockColor};`);
        }
        if (banner === true) {} else if (isBannerImage(input, banner)) {
            variables.push(`background-image: url(${banner});`);
            variables.push(`background-size: cover;`);
        } else {
            variables.push(`background: ${banner};`);
        }
    }
    if (variables.length > 0) {
        const styles = `<style>
    .quarto-title-block .quarto-title-banner {
      ${variables.join("\n")}
    }
    </style>`;
        const file = temp.createFile({
            suffix: ".css"
        });
        Deno.writeTextFileSync(file, styles);
        return file;
    } else {
        return undefined;
    }
}
function documentTitlePartial(format) {
    if (format.metadata[kTitleBlockStyle] === false || format.metadata[kTitleBlockStyle] === "none") {
        return {
            partials: [],
            templateParams: {}
        };
    } else {
        const partials = [];
        const templateParams = {};
        templateParams[kTitleBlockCategories] = format.metadata[kTitleBlockCategories] !== false ? "true" : "";
        const banner = format.metadata[kTitleBlockBanner];
        if (banner) {
            partials.push("banner/title-block.html");
        } else {
            partials.push("title-block.html");
        }
        partials.push("title-metadata.html");
        if (banner) {
            const tocLeft = format.metadata[kTocLocation] === "left";
            if (tocLeft) {
                templateParams["banner-header-class"] = "toc-left";
            }
        }
        return {
            partials: partials.map((partial)=>{
                return formatResourcePath("html", join3("templates", partial));
            }),
            templateParams
        };
    }
}
function processDocumentTitle(input, format, _flags, doc) {
    const resources = [];
    const banner = format.metadata[kTitleBlockBanner];
    if (banner) {
        const headerEl = doc.getElementById("title-block-header");
        const contentEl = doc.getElementById("quarto-content");
        if (contentEl && headerEl) {
            headerEl.remove();
            contentEl.parentElement?.insertBefore(headerEl, contentEl);
        }
        const mainEl = doc.querySelector("main.content");
        mainEl?.classList.add("quarto-banner-title-block");
        if (isBannerImage(input, banner)) {
            resources.push(banner);
        }
    }
    return resources;
}
function isBannerImage(input, banner) {
    if (typeof banner === "string") {
        let path;
        if (isAbsolute2(banner)) {
            path = banner;
        } else {
            path = join3(dirname2(input), banner);
        }
        return existsSync(path);
    } else {
        return false;
    }
}
const titleColor = (block)=>{
    if (block === "body" || block === "body-bg") {
        return undefined;
    } else {
        return block;
    }
};
function formatPageLayout(format) {
    return format.metadata[kPageLayout] || kPageLayoutArticle;
}
function formatHasFullLayout(format) {
    return format.metadata[kPageLayout] === kPageLayoutFull;
}
function formatHasArticleLayout(format) {
    return format.metadata[kPageLayout] === undefined || format.metadata[kPageLayout] === kPageLayoutArticle || format.metadata[kPageLayout] === kPageLayoutFull;
}
function bootstrapFormatDependency() {
    const boostrapResource = (resource)=>formatResourcePath("html", join3("bootstrap", "dist", resource));
    const bootstrapDependency = (resource)=>({
            name: resource,
            path: boostrapResource(resource)
        });
    return {
        name: kBootstrapDependencyName,
        stylesheets: [
            bootstrapDependency("bootstrap-icons.css"), 
        ],
        scripts: [
            bootstrapDependency("bootstrap.min.js"), 
        ],
        resources: [
            bootstrapDependency("bootstrap-icons.woff"), 
        ]
    };
}
function boostrapExtras(input, flags, format, temp, offset) {
    const toc = hasTableOfContents(flags, format);
    const tocLocation = toc ? format.metadata[kTocLocation] || "right" : undefined;
    const renderTemplate = (template, pageLayout)=>{
        return renderEjs(formatResourcePath("html", `templates/${template}`), {
            toc,
            tocLocation,
            pageLayout
        });
    };
    const pageLayout = formatPageLayout(format);
    const bodyEnvelope = formatHasArticleLayout(format) ? {
        before: renderTemplate("before-body-article.ejs", pageLayout),
        afterPreamble: renderTemplate("after-body-article-preamble.ejs", pageLayout),
        afterPostamble: renderTemplate("after-body-article-postamble.ejs", pageLayout)
    } : {
        before: renderTemplate("before-body-custom.ejs", kPageLayoutCustom),
        afterPreamble: renderTemplate("after-body-custom-preamble.ejs", kPageLayoutCustom),
        afterPostamble: renderTemplate("after-body-custom-postamble.ejs", kPageLayoutCustom)
    };
    const { partials , templateParams  } = documentTitlePartial(format);
    const sassLayers = [];
    const titleSassLayer = documentTitleScssLayer(format);
    if (titleSassLayer) {
        sassLayers.push(titleSassLayer);
    }
    const includeInHeader = [];
    const titleInclude = documentTitleIncludeInHeader(input, format, temp);
    if (titleInclude) {
        includeInHeader.push(titleInclude);
    }
    const titleMetadata = documentTitleMetadata(format);
    const scssBundles = resolveBootstrapScss(input, format, sassLayers);
    return {
        pandoc: {
            [kSectionDivs]: true,
            [kHtmlMathMethod]: "mathjax"
        },
        metadata: {
            [kDocumentCss]: false,
            [kLinkCitations]: true,
            [kTemplatePartials]: partials,
            [kQuartoTemplateParams]: templateParams,
            ...titleMetadata
        },
        [kIncludeInHeader]: includeInHeader,
        html: {
            [kSassBundles]: scssBundles,
            [kDependencies]: [
                bootstrapFormatDependency()
            ],
            [kBodyEnvelope]: bodyEnvelope,
            [kHtmlPostprocessors]: [
                bootstrapHtmlPostprocessor(input, format, flags, offset), 
            ],
            [kHtmlFinalizers]: [
                bootstrapHtmlFinalizer(format, flags), 
            ]
        }
    };
}
const getColumnLayoutElements = (doc)=>{
    return doc.querySelectorAll('[class^="column-"], [class*=" column-"], aside, [class*="margin-caption"], [class*=" margin-caption"], [class*="margin-ref"], [class*=" margin-ref"]');
};
function bootstrapHtmlPostprocessor(input, format, flags, offset) {
    return async (doc, _inputMedata, inputTraits)=>{
        const title = doc.querySelector("header > .title");
        if (title) {
            title.classList.add("display-7");
        }
        const subtitle = doc.querySelector("header > .subtitle");
        if (subtitle) {
            subtitle.classList.add("lead");
        }
        const blockquotes = doc.querySelectorAll("blockquote");
        for(let i1 = 0; i1 < blockquotes.length; i1++){
            const classList = blockquotes[i1].classList;
            classList.add("blockquote");
        }
        const figures = doc.querySelectorAll("figure");
        for(let i11 = 0; i11 < figures.length; i11++){
            const figure = figures[i11];
            figure.classList.add("figure");
            const images = figure.querySelectorAll("img");
            for(let j = 0; j < images.length; j++){
                images[j].classList.add("figure-img");
            }
            const captions = figure.querySelectorAll("figcaption");
            for(let j1 = 0; j1 < captions.length; j1++){
                captions[j1].classList.add("figure-caption");
            }
        }
        const toc = doc.querySelector('nav[role="doc-toc"]');
        const tocTarget = doc.getElementById("quarto-toc-target");
        if (toc && tocTarget) {
            toc.classList.add("toc-active");
            const tocLinks = doc.querySelectorAll('nav[role="doc-toc"] > ul a');
            for(let i2 = 0; i2 < tocLinks.length; i2++){
                const tocLink = tocLinks[i2];
                tocLink.classList.add("nav-link");
                if (i2 === 0) {
                    tocLink.classList.add("active");
                }
                if (!tocLink.hasAttribute("data-scroll-target")) {
                    tocLink.setAttribute("data-scroll-target", tocLink.getAttribute("href")?.replaceAll(":", "\\:"));
                }
            }
            const tocDepth = format.pandoc[kTocDepth] || 3;
            if (tocDepth > 1) {
                const ulSelector = "ul ".repeat(tocDepth - 1).trim();
                const nestedUls = toc.querySelectorAll(ulSelector);
                for(let i3 = 0; i3 < nestedUls.length; i3++){
                    const ul = nestedUls[i3];
                    ul.classList.add("collapse");
                }
            }
            toc.remove();
            tocTarget.replaceWith(toc);
        } else {
            tocTarget?.remove();
        }
        const addTableClasses = (table, computational = false)=>{
            table.classList.add("table");
            if (computational) {
                table.classList.add("table-sm").add("table-striped");
            }
        };
        const tableHeaders = doc.querySelectorAll("tbody > tr:first-child.odd");
        for(let i4 = 0; i4 < tableHeaders.length; i4++){
            const th = tableHeaders[i4];
            if (th.parentNode?.parentNode) {
                const table = th.parentNode.parentNode;
                table.removeAttribute("style");
                addTableClasses(table, !!findParent(table, (el)=>el.classList.contains("cell")));
            }
        }
        const pandasTables = doc.querySelectorAll("table.dataframe");
        for(let i5 = 0; i5 < pandasTables.length; i5++){
            const table1 = pandasTables[i5];
            table1.removeAttribute("border");
            addTableClasses(table1, true);
            const headerRows = table1.querySelectorAll("tr");
            for(let r = 0; r < headerRows.length; r++){
                headerRows[r].removeAttribute("style");
            }
            if (table1.previousElementSibling && table1.previousElementSibling.tagName === "STYLE") {
                table1.previousElementSibling.remove();
            }
        }
        const dataFramesTables = doc.querySelectorAll("table.data-frame");
        for(let i6 = 0; i6 < dataFramesTables.length; i6++){
            const table2 = dataFramesTables[i6];
            addTableClasses(table2, true);
        }
        const sections = doc.querySelectorAll('section[class^="level"]');
        for(let i7 = 0; i7 < sections.length; i7++){
            const section = sections[i7];
            const heading = section.querySelector("h2") || section.querySelector("h3") || section.querySelector("h4") || section.querySelector("h5") || section.querySelector("h6");
            if (heading) {
                heading.setAttribute("data-anchor-id", section.id);
            }
        }
        const resources = [];
        const titleResourceFiles = processDocumentTitle(input, format, flags, doc);
        resources.push(...titleResourceFiles);
        if (format.metadata[kAppendixStyle] !== false && format.metadata[kAppendixStyle] !== "none") {
            await processDocumentAppendix(input, inputTraits, format, flags, doc, offset);
        }
        return Promise.resolve({
            resources,
            supporting: []
        });
    };
}
function bootstrapHtmlFinalizer(format, flags) {
    return (doc)=>{
        const { citesInMargin , refsInMargin  } = processColumnElements(doc, format, flags);
        if (refsInMargin) {
            const footNoteSectionEl = doc.querySelector("section.footnotes");
            if (footNoteSectionEl) {
                footNoteSectionEl.remove();
            }
        }
        if (citesInMargin) {
            const bibliographyDiv = doc.querySelector("div#refs");
            if (bibliographyDiv) {
                bibliographyDiv.remove();
            }
        }
        const fullLayout = formatHasFullLayout(format);
        if (fullLayout) {
            const leftSidebar = hasContents(kSidebarId, doc);
            if (!leftSidebar) {
                const sidebarEl = doc.getElementById(kSidebarId);
                sidebarEl?.remove();
            }
            const column = suggestColumn(doc);
            setMainColumn(doc, column);
        }
        const hasToc = !!format.pandoc.toc;
        const leftSidebar1 = doc.getElementById("quarto-sidebar");
        const hasLeftContent = leftSidebar1 && leftSidebar1.children.length > 0;
        const rightSidebar = doc.getElementById("quarto-margin-sidebar");
        const hasRightContent = rightSidebar && rightSidebar.children.length > 0;
        const hasMarginContent = doc.querySelectorAll(".column-margin").length > 0 || doc.querySelectorAll(".margin-caption").length > 0 || doc.querySelectorAll(".margin-ref").length > 0;
        if (rightSidebar && !hasRightContent && !hasMarginContent && !hasToc) {
            rightSidebar.remove();
        }
        const hasColumnElements = getColumnLayoutElements(doc).length > 0;
        if (hasColumnElements) {
            if (hasLeftContent && hasMarginContent) {
                doc.body.classList.add("slimcontent");
            } else if (hasRightContent || hasMarginContent || fullLayout || hasToc) {} else {
                doc.body.classList.add("fullcontent");
            }
        } else {
            if (!hasRightContent && !hasMarginContent && !hasToc) {
                doc.body.classList.add("fullcontent");
            } else {}
        }
        const isFullLayout = format.metadata[kPageLayout] === "full";
        if (!hasMarginContent && isFullLayout && !hasRightContent) {
            const marginSidebarEl = doc.getElementById("quarto-margin-sidebar");
            marginSidebarEl?.classList.add("zindex-bottom");
        }
        return Promise.resolve();
    };
}
function processColumnElements(doc, format, flags) {
    if (!formatHasArticleLayout(format)) {
        return {
            citesInMargin: false,
            refsInMargin: false
        };
    }
    processMarginCaptions(doc);
    processMarginElsInCallouts(doc);
    const marginProcessors = [
        simpleMarginProcessor, 
    ];
    const refsInMargin = hasMarginRefs(format, flags);
    if (refsInMargin) {
        marginProcessors.unshift(footnoteMarginProcessor);
    }
    const citesInMargin = hasMarginCites(format);
    if (citesInMargin) {
        marginProcessors.push(referenceMarginProcessor);
    }
    processMarginNodes(doc, marginProcessors);
    const columnLayouts = getColumnLayoutElements(doc);
    if (columnLayouts && columnLayouts.length > 0) {
        const processEl = (el)=>{
            if (el.tagName === "DIV" && el.id === "quarto-content") {
                return false;
            } else if (el.tagName === "BODY") {
                return false;
            } else {
                return true;
            }
        };
        const ensureInGrid = (el, setLayout)=>{
            if (processEl(el)) {
                if (!el.classList.contains("page-columns")) {
                    el.classList.add("page-columns");
                }
                if (setLayout && !el.classList.contains("page-full")) {
                    el.classList.add("page-full");
                }
                const parent = el.parentElement;
                if (parent) {
                    ensureInGrid(parent, true);
                }
            }
        };
        columnLayouts.forEach((node)=>{
            const el = node;
            if (el.parentElement) {
                ensureInGrid(el.parentElement, true);
            }
        });
    }
    return {
        citesInMargin,
        refsInMargin
    };
}
const processMarginNodes = (doc, processors)=>{
    const marginSelector = processors.map((proc)=>proc.selector).join(", ");
    const marginNodes = doc.querySelectorAll(marginSelector);
    marginNodes.forEach((marginNode)=>{
        const marginEl = marginNode;
        for (const processor of processors){
            if (processor.canProcess(marginEl)) {
                processor.process(marginEl, doc);
                break;
            }
        }
        marginEl.classList.remove("column-margin");
    });
};
const findQuartoFigure = (el)=>{
    if (el.classList.contains("quarto-figure") || el.classList.contains("quarto-layout-panel")) {
        return el;
    } else if (el.parentElement) {
        return findQuartoFigure(el.parentElement);
    } else {
        return undefined;
    }
};
const moveClassToCaption = (container, sel)=>{
    const target = container.querySelector(sel);
    if (target) {
        target.classList.add("margin-caption");
        return true;
    } else {
        return false;
    }
};
const removeCaptionClass = (el)=>{
    el.classList.remove("margin-caption");
};
const processLayoutPanelMarginCaption = (captionContainer)=>{
    const figure = captionContainer.querySelector("figure");
    if (figure) {
        for (const child of figure.children){
            if (child.tagName === "FIGCAPTION") {
                child.classList.add("margin-caption");
                removeCaptionClass(captionContainer);
                break;
            }
        }
    } else {
        const caption = captionContainer.querySelector(".panel-caption");
        if (caption) {
            caption.classList.add("margin-caption");
            removeCaptionClass(captionContainer);
        }
    }
};
const processFigureMarginCaption = (captionContainer, doc)=>{
    const foundCaption = moveClassToCaption(captionContainer, "figcaption");
    if (!foundCaption) {
        const captionEl = captionContainer.querySelector("caption");
        if (captionEl) {
            const parentDivEl = captionEl?.parentElement?.parentElement;
            if (parentDivEl) {
                captionEl.classList.add("hidden");
                const divCopy = doc.createElement("div");
                divCopy.classList.add("figure-caption");
                divCopy.classList.add("margin-caption");
                divCopy.innerHTML = captionEl.innerHTML;
                parentDivEl.appendChild(divCopy);
                removeCaptionClass(captionContainer);
            }
        }
    } else {
        removeCaptionClass(captionContainer);
    }
};
const processTableMarginCaption = (captionContainer, doc)=>{
    const caption = captionContainer.querySelector("caption");
    if (caption) {
        const marginCapEl = doc.createElement("DIV");
        marginCapEl.classList.add("quarto-table-caption");
        marginCapEl.classList.add("margin-caption");
        marginCapEl.innerHTML = caption.innerHTML;
        captionContainer.parentElement?.insertBefore(marginCapEl, captionContainer.nextElementSibling);
        caption.remove();
        removeCaptionClass(captionContainer);
    }
};
const processMarginCaptions = (doc)=>{
    const marginCaptions = doc.querySelectorAll(".margin-caption");
    marginCaptions.forEach((node)=>{
        const figureEl = node;
        const captionContainer = findQuartoFigure(figureEl);
        if (captionContainer) {
            const isLayoutPanel = captionContainer.classList.contains("quarto-layout-panel");
            if (isLayoutPanel) {
                processLayoutPanelMarginCaption(captionContainer);
            } else {
                processFigureMarginCaption(captionContainer, doc);
            }
        } else {
            if (figureEl.classList.contains("tbl-parent")) {
                const capDivEl = figureEl.querySelector("div.panel-caption");
                if (capDivEl) {
                    capDivEl.classList.add("margin-caption");
                    capDivEl.remove();
                    figureEl.appendChild(capDivEl);
                }
            } else {
                const table = figureEl.querySelector("table");
                if (table) {
                    processTableMarginCaption(table, doc);
                }
            }
        }
        removeCaptionClass(figureEl);
    });
};
const processMarginElsInCallouts = (doc)=>{
    const calloutNodes = doc.querySelectorAll("div.callout");
    calloutNodes.forEach((calloutNode)=>{
        const calloutEl = calloutNode;
        const collapseEl = calloutEl.querySelector(".callout-collapse");
        const isSimple = calloutEl.classList.contains("callout-style-simple");
        const collapseClasses = [];
        if (collapseEl) {
            collapseEl.classList.forEach((clz)=>collapseClasses.push(clz));
        }
        const marginNodes = calloutEl.querySelectorAll(".callout-body-container .column-margin, .callout-body-container aside, .callout-body-container .aside");
        if (marginNodes.length > 0) {
            const marginArr = Array.from(marginNodes);
            marginArr.reverse().forEach((marginNode)=>{
                const marginEl = marginNode;
                collapseClasses.forEach((clz)=>{
                    marginEl.classList.add(clz);
                });
                marginEl.classList.add("callout-margin-content");
                if (isSimple) {
                    marginEl.classList.add("callout-margin-content-simple");
                }
                calloutEl.after(marginEl);
            });
        }
    });
};
const simpleMarginProcessor = {
    selector: ".column-margin:not(.column-container)",
    canProcess (el) {
        return el.classList.contains("column-margin") && !el.classList.contains("column-container");
    },
    process (el, doc) {
        el.classList.remove("column-margin");
        addContentToMarginContainerForEl(el, el, doc);
    }
};
const footnoteMarginProcessor = {
    selector: ".footnote-ref",
    canProcess (el) {
        return el.classList.contains("footnote-ref");
    },
    process (el, doc) {
        if (el.hasAttribute("href")) {
            const target = el.getAttribute("href");
            if (target) {
                const refId = target.slice(1);
                const refContentsEl = doc.getElementById(refId);
                if (refContentsEl) {
                    const backLinkEl = refContentsEl.querySelector(".footnote-back");
                    if (backLinkEl) {
                        backLinkEl.remove();
                    }
                    if (refContentsEl.childNodes.length > 0) {
                        const firstChild = refContentsEl.childNodes[0];
                        firstChild.insertBefore(doc.createTextNode("\u00A0"), firstChild.firstChild);
                        firstChild.insertBefore(el.firstChild.cloneNode(true), firstChild.firstChild);
                    }
                    addContentToMarginContainerForEl(el, refContentsEl, doc);
                }
            }
        }
    }
};
const referenceMarginProcessor = {
    selector: "a[role='doc-biblioref']",
    canProcess (el) {
        return el.hasAttribute("role") && el.getAttribute("role") === "doc-biblioref";
    },
    process (el, doc) {
        if (el.hasAttribute("href")) {
            const target = el.getAttribute("href");
            if (target) {
                const refId = target.slice(1);
                const refContentsEl = doc.getElementById(refId);
                const findCaptionEl = (el)=>{
                    if (el.parentElement?.tagName === "FIGCAPTION") {
                        return el.parentElement;
                    } else if (el.parentElement) {
                        return findCaptionEl(el.parentElement);
                    } else {
                        return undefined;
                    }
                };
                const findNonSpanParentEl = (el)=>{
                    if (el.parentElement && el.parentElement.tagName !== "SPAN") {
                        return el.parentElement;
                    } else if (el.parentElement) {
                        return findNonSpanParentEl(el.parentElement);
                    } else {
                        return undefined;
                    }
                };
                const figureCaptionEl = findCaptionEl(el);
                if (refContentsEl && figureCaptionEl) {
                    if (figureCaptionEl.classList.contains("margin-caption")) {
                        figureCaptionEl.appendChild(refContentsEl.cloneNode(true));
                    } else {
                        addContentToMarginContainerForEl(figureCaptionEl, refContentsEl, doc);
                    }
                } else if (refContentsEl) {
                    const nonSpanParent = findNonSpanParentEl(el);
                    if (nonSpanParent) {
                        addContentToMarginContainerForEl(nonSpanParent, refContentsEl, doc);
                    }
                }
            }
        }
    }
};
const isContainer = (el)=>{
    return el && el.tagName === "DIV" && el.classList.contains("column-container") && el.classList.contains("column-margin");
};
const isAlreadyInMargin = (el)=>{
    const elInMargin = el.classList.contains("column-margin") || el.classList.contains("aside") || el.classList.contains("margin-caption");
    if (elInMargin) {
        return true;
    } else if (el.parentElement !== null) {
        return isAlreadyInMargin(el.parentElement);
    } else {
        return false;
    }
};
const createMarginContainer = (doc)=>{
    const container = doc.createElement("div");
    container.classList.add("no-row-height");
    container.classList.add("column-margin");
    container.classList.add("column-container");
    return container;
};
const marginContainerForEl = (el, doc)=>{
    if (el.parentElement && isAlreadyInMargin(el.parentElement)) {
        return el.parentElement;
    }
    if (el.nextElementSibling && isContainer(el.nextElementSibling)) {
        return el.nextElementSibling;
    }
    if (el.previousElementSibling && isContainer(el.previousElementSibling)) {
        return el.previousElementSibling;
    }
    const list = findOutermostParentElOfType(el, [
        "OL",
        "UL",
        "TABLE"
    ]);
    if (list) {
        if (list.nextElementSibling && isContainer(list.nextElementSibling)) {
            return list.nextElementSibling;
        } else {
            const container = createMarginContainer(doc);
            if (list.parentNode) {
                list.parentNode.insertBefore(container, list.nextElementSibling);
            }
            return container;
        }
    }
    const parentEl = el.parentElement;
    const cantContainBlockTags = [
        "P"
    ];
    if (parentEl && cantContainBlockTags.includes(parentEl.tagName)) {
        if (parentEl.parentElement && parentEl.parentElement.tagName === "DIV" && parentEl.nextElementSibling && isContainer(parentEl.nextElementSibling)) {
            return parentEl.nextElementSibling;
        } else {
            const container1 = createMarginContainer(doc);
            const wrapper = doc.createElement("div");
            parentEl.replaceWith(wrapper);
            wrapper.appendChild(parentEl);
            wrapper.appendChild(container1);
            return container1;
        }
    }
    const container2 = createMarginContainer(doc);
    el.parentNode?.insertBefore(container2, el.nextElementSibling);
    return container2;
};
const addContentToMarginContainerForEl = (el, content, doc)=>{
    const container = marginContainerForEl(el, doc);
    if (container) {
        container.appendChild(content);
    }
};
const findOutermostParentElOfType = (el, tagNames)=>{
    let outEl = undefined;
    if (el.parentElement) {
        if (el.parentElement.tagName === "MAIN") {
            return outEl;
        } else {
            if (tagNames.includes(el.parentElement.tagName)) {
                outEl = el.parentElement;
            }
            outEl = findOutermostParentElOfType(el.parentElement, tagNames) || outEl;
            return outEl;
        }
    } else {
        return undefined;
    }
};
const hasContents = (id, doc)=>{
    const el = doc.getElementById(id);
    if (el === null) {
        return false;
    }
    if (el.children.length > 0) {
        return true;
    }
    return !!el.innerText.trim();
};
function suggestColumn(doc) {
    const leftSidebar = hasContents(kSidebarId, doc);
    const leftToc = hasContents(kTocLeftSidebarId, doc);
    const rightSidebar = hasContents(kMarginSidebarId, doc);
    const columnClasses = getColumnClasses(doc);
    const leftContent = [
        ...fullOccludeClz,
        ...leftOccludeClz
    ].some((clz)=>{
        return columnClasses.has(clz);
    });
    const rightContent = [
        ...fullOccludeClz,
        ...rightOccludeClz
    ].some((clz)=>{
        return columnClasses.has(clz);
    });
    const leftUsed = leftSidebar || leftContent || leftToc;
    const rightUsed = rightSidebar || rightContent;
    if (leftUsed && rightUsed) {
        return "column-body";
    } else if (leftUsed) {
        return "column-page-right";
    } else if (rightUsed) {
        return "column-page-left";
    } else {
        return "column-page";
    }
}
const kSidebarId = "quarto-sidebar";
const kMarginSidebarId = "quarto-margin-sidebar";
const kTocLeftSidebarId = "quarto-sidebar-toc-left";
const fullOccludeClz = [
    "column-page",
    "column-screen",
    "column-screen-inset", 
];
const leftOccludeClz = [
    "column-page-left",
    "column-screen-inset-left",
    "column-screen-left", 
];
const rightOccludeClz = [
    "column-margin",
    "column-page-right",
    "column-screen-inset-right",
    "column-screen-right",
    "margin-caption",
    "margin-ref", 
];
const getColumnClasses = (doc)=>{
    const classes = new Set();
    const colNodes = getColumnLayoutElements(doc);
    for (const colNode of colNodes){
        const colEl = colNode;
        colEl.classList.forEach((clz)=>{
            if (clz === "margin-caption" || clz === "margin-ref" || clz.startsWith("column-")) {
                classes.add(clz);
            }
        });
    }
    return classes;
};
function getDiscussionCategoryId(categoryName, metadata) {
    if (metadata.categories) {
        for (const category of metadata.categories){
            if (category.name === categoryName) {
                return category.id;
            }
        }
    }
    return undefined;
}
async function getGithubDiscussionsMetadata(repo) {
    const url = encodeURI(`https://giscus.app/api/discussions/categories?repo=${repo}`);
    const response = await fetch(url);
    const jsonObj = await response.json();
    return jsonObj;
}
const kGoogleScholar = "google-scholar";
function metadataPostProcessor(input, format, offset) {
    return async (doc, inputMetadata)=>{
        if (googleScholarEnabled(format)) {
            const { csl , extras  } = documentCSL(input, inputMetadata, "webpage", format.pandoc["output-file"], offset);
            const documentMetadata = googleScholarMeta(csl, extras);
            const referenceMetadata = await googleScholarReferences(input, inputMetadata);
            [
                ...documentMetadata,
                ...referenceMetadata
            ].forEach((meta)=>{
                writeMetaTag(meta.name, meta.content, doc);
            });
        }
        return Promise.resolve(kHtmlEmptyPostProcessResult);
    };
}
function googleScholarEnabled(format) {
    if (format.metadata[kGoogleScholar] === true) {
        return true;
    }
    const siteMeta = format.metadata[kWebsite];
    if (siteMeta && siteMeta[kGoogleScholar] === true) {
        return true;
    }
    return false;
}
function googleScholarMeta(csl, extras) {
    const scholarMeta = [];
    const write = metadataWriter(scholarMeta);
    if (csl.title) {
        write("citation_title", csl.title);
    }
    if (csl.abstract) {
        write("citation_abstract", csl.abstract);
    }
    if (extras.keywords) {
        write("citation_keywords", extras.keywords);
    }
    if (csl.author) {
        csl.author.forEach((author)=>{
            write("citation_author", author.literal || `${author.given} ${author.family}`);
        });
    }
    if (csl.editor) {
        csl.editor.forEach((editor)=>{
            write("citation_editor", editor.literal || `${editor.given} ${editor.family}`);
        });
    }
    if (csl.issued) {
        const edtfIssued = cslDateToEDTFDate(csl.issued);
        write("citation_publication_date", edtfIssued);
        write("citation_cover_date", edtfIssued);
        const parts = csl.issued["date-parts"];
        if (parts) {
            write("citation_year", parts[0][0]);
        }
    }
    if (csl["available-date"]) {
        write("citation_online_date", cslDateToEDTFDate(csl["available-date"]));
    }
    if (csl.URL) {
        write("citation_fulltext_html_url", csl.URL);
    }
    if (extras[kPdfUrl]) {
        write("citation_pdf_url", extras[kPdfUrl]);
    }
    if (extras[kAbstractUrl]) {
        write("citation_abstract_html_url", extras[kAbstractUrl]);
    }
    if (csl.issue) {
        write("citation_issue", csl.issue);
    }
    if (csl.DOI) {
        write("citation_doi", csl.DOI);
    }
    if (csl.ISBN) {
        write("citation_isbn", csl.ISBN);
    }
    if (csl.ISSN) {
        write("citation_issn", csl.ISSN);
    }
    if (extras[kEIssn]) {
        write("citation_eissn", extras[kEIssn]);
    }
    if (csl.PMID) {
        write("citation_pmid", csl.PMID);
    }
    if (csl.volume) {
        write("citation_volume", csl.volume);
    }
    if (csl.language) {
        write("citation_language", csl.language);
    }
    if (csl["page-first"]) {
        write("citation_firstpage", csl["page-first"]);
    }
    if (csl["page-last"]) {
        write("citation_lastpage", csl["page-last"]);
    }
    const type = csl.type;
    if (type === "paper-conference") {
        if (csl["container-title"]) {
            write("citation_conference_title", csl["container-title"]);
        }
        if (csl.publisher) {
            write("citation_conference", csl.publisher);
        }
    } else if (type === "thesis") {
        if (csl.publisher) {
            write("citation_dissertation_institution", csl.publisher);
        }
    } else if (type === "report") {
        if (csl.publisher) {
            write("citation_technical_report_institution", csl.publisher);
        }
        if (csl.number) {
            write("citation_technical_report_number", csl.number);
        }
    } else if (type === "book") {
        if (csl["container-title"]) {
            write("citation_book_title", csl["container-title"]);
        }
    } else if (type === "chapter") {
        write("citation_inbook_title", csl["container-title"]);
    } else {
        if (csl["container-title"]) {
            write("citation_journal_title", csl["container-title"]);
        }
        if (csl["container-title-short"]) {
            write("citation_journal_abbrev", csl["container-title-short"]);
        }
        if (csl.publisher) {
            write("citation_publisher", csl.publisher);
        }
    }
    if (csl["collection-title"]) {
        write("citation_series_title", csl["collection-title"]);
    }
    return scholarMeta;
}
async function googleScholarReferences(input, metadata) {
    const scholarMeta = [];
    const write = metadataWriter(scholarMeta);
    const references = await bibliographyCslJson(input, metadata);
    if (references) {
        references.forEach((reference)=>{
            const refMetas = googleScholarMeta(reference, {});
            const metaStrs = refMetas.map((refMeta)=>{
                return `${refMeta.name}=${refMeta.content};`;
            });
            write("citation_reference", metaStrs.join());
        });
    }
    return scholarMeta;
}
function metadataWriter(metadata) {
    const write = (key, value)=>{
        metadata.push({
            name: key,
            content: encodeAttributeValue(value)
        });
    };
    return write;
}
function htmlFormat(figwidth, figheight) {
    return mergeConfigs(createHtmlFormat(figwidth, figheight), {
        resolveFormat: (format)=>{
            if (format.metadata[kMinimal] === true) {
                if (format.metadata[kFigResponsive] === undefined) {
                    format.metadata[kFigResponsive] = false;
                }
                if (format.metadata[kTheme] === undefined) {
                    format.metadata[kTheme] = "none";
                }
            }
        },
        formatExtras: async (input, _markdown, flags, format, _libDir, temp, offset)=>{
            const htmlFilterParams = htmlFormatFilterParams(format);
            return mergeConfigs(await htmlFormatExtras(input, flags, offset, format, temp), themeFormatExtras(input, flags, format, temp, offset), {
                [kFilterParams]: htmlFilterParams
            });
        },
        extensions: {
            book: {
                multiFile: true
            }
        }
    });
}
const kQuartoHtmlDependency = "quarto-html";
async function htmlFormatExtras(input, _flags, offset, format, temp, featureDefaults, tippyOptions, scssOptions) {
    const bootstrap = formatHasBootstrap(format);
    if (!featureDefaults) {
        featureDefaults = htmlFormatFeatureDefaults(format);
    }
    if (!tippyOptions) {
        tippyOptions = {};
    }
    if (!tippyOptions.config) {
        tippyOptions.config = {};
    }
    if (!scssOptions) {
        scssOptions = {};
    }
    if (scssOptions.quartoBase === undefined) {
        scssOptions.quartoBase = true;
    }
    if (scssOptions.quartoCssVars === undefined) {
        scssOptions.quartoCssVars = true;
    }
    const scripts = [];
    const stylesheets = [];
    const sassBundles = [];
    const dependencies = [];
    const options = __VIRTUAL_FILE18(format.metadata[kComments]) ? {
        [kHypothesis]: format.metadata[kComments][kHypothesis] || false,
        [kUtterances]: format.metadata[kComments][kUtterances] || false,
        [kGiscus]: format.metadata[kComments][kGiscus] || false
    } : {};
    options.codeLink = format.metadata[kCodeLink] || false;
    if (featureDefaults.tabby) {
        options.tabby = format.metadata[kTabsets] !== false;
    } else {
        options.tabby = format.metadata[kTabsets] || false;
    }
    if (featureDefaults.copyCode) {
        options.copyCode = format.metadata[kCodeCopy] !== false;
    } else {
        options.copyCode = format.metadata[kCodeCopy] || false;
    }
    if (featureDefaults.anchors) {
        options.anchors = format.metadata[kAnchorSections] !== false;
    } else {
        options.anchors = format.metadata[kAnchorSections] || false;
    }
    if (featureDefaults.hoverCitations) {
        options.hoverCitations = format.metadata[kCitationsHover] !== false;
    } else {
        options.hoverCitations = format.metadata[kCitationsHover] || false;
    }
    if (featureDefaults.hoverFootnotes) {
        options.hoverFootnotes = format.metadata[kFootnotesHover] !== false;
    } else {
        options.hoverFootnotes = format.metadata[kFootnotesHover] || false;
    }
    if (featureDefaults.figResponsive) {
        options.figResponsive = format.metadata[kFigResponsive] !== false;
    } else {
        options.figResponsive = format.metadata[kFigResponsive] || false;
    }
    options.zenscroll = format.metadata[kSmoothScroll];
    options.codeTools = formatHasCodeTools(format);
    options.darkMode = formatDarkMode(format);
    options.darkModeDefault = darkModeDefault(format.metadata);
    options.linkExternalIcon = format.render[kLinkExternalIcon];
    options.linkExternalNewwindow = format.render[kLinkExternalNewwindow];
    options.linkExternalFilter = format.render[kLinkExternalFilter];
    const siteMetadata = format.metadata[kWebsite];
    if (!options.linkExternalFilter && siteMetadata) {
        const siteUrl = siteMetadata[kSiteUrl];
        if (siteUrl) {
            options.linkExternalFilter = siteUrl.replaceAll(".", "\\.").replaceAll("/", "\\/");
        }
    }
    if (bootstrap) {
        scripts.push({
            name: "quarto.js",
            path: formatResourcePath("html", "quarto.js")
        });
    }
    if (options.tabby) {
        scripts.push({
            name: "tabby.min.js",
            path: formatResourcePath("html", join3("tabby", "js", "tabby.js"))
        });
    }
    const includeInHeader = [];
    if (options.zenscroll) {
        scripts.push({
            name: "zenscroll-min.js",
            path: formatResourcePath("html", join3("zenscroll", "zenscroll-min.js")),
            afterBody: true
        });
        const zenscrollStyle = temp.createFile({
            suffix: "-zen.html"
        });
        Deno.writeTextFileSync(zenscrollStyle, "<style>html{ scroll-behavior: smooth; }</style>");
        includeInHeader.push(zenscrollStyle);
    }
    options.tippy = options.hoverCitations || options.hoverFootnotes;
    if (bootstrap || options.tippy) {
        scripts.push({
            name: "popper.min.js",
            path: formatResourcePath("html", join3("popper", "popper.min.js"))
        });
    }
    if (options.tippy) {
        scripts.push({
            name: "tippy.umd.min.js",
            path: formatResourcePath("html", join3("tippy", "tippy.umd.min.js"))
        });
        stylesheets.push({
            name: "tippy.css",
            path: formatResourcePath("html", join3("tippy", "tippy.css"))
        });
        if (tippyOptions.theme === undefined) {
            if (bootstrap) {
                tippyOptions.theme = "quarto";
                sassBundles.push({
                    key: "tippy.scss",
                    dependency: kBootstrapDependencyName,
                    quarto: {
                        uses: "",
                        functions: "",
                        defaults: "",
                        mixins: "",
                        rules: Deno.readTextFileSync(formatResourcePath("html", join3("tippy", "_tippy.scss")))
                    }
                });
            } else {
                tippyOptions.theme = "light-border";
                stylesheets.push({
                    name: "light-border.css",
                    path: formatResourcePath("html", join3("tippy", "light-border.css"))
                });
            }
        }
    }
    options.tippyOptions = tippyOptions;
    if (options.copyCode) {
        dependencies.push(clipboardDependency());
    }
    options.language = format.language;
    if (options.anchors) {
        scripts.push({
            name: "anchor.min.js",
            path: formatResourcePath("html", join3("anchor", "anchor.min.js"))
        });
        options.anchors = typeof options.anchors === "string" ? options.anchors : true;
    }
    if (!bootstrap) {
        if (scssOptions.quartoBase) {
            sassBundles.push({
                dependency: kQuartoHtmlDependency,
                key: kQuartoHtmlDependency,
                quarto: quartoBaseLayer(format, !!options.copyCode, !!options.tabby, !!options.figResponsive)
            });
        }
        if (scssOptions.quartoCssVars) {
            sassBundles.push({
                dependency: kQuartoHtmlDependency,
                key: kQuartoHtmlDependency,
                quarto: {
                    uses: "",
                    defaults: "",
                    functions: "",
                    mixins: "",
                    rules: quartoGlobalCssVariableRules()
                }
            });
        }
    }
    if (options.hypothesis) {
        const hypothesisHeader = temp.createFile({
            suffix: "-hypoth.html"
        });
        Deno.writeTextFileSync(hypothesisHeader, renderEjs(formatResourcePath("html", join3("hypothesis", "hypothesis.ejs")), {
            hypothesis: options.hypothesis
        }));
        includeInHeader.push(hypothesisHeader);
    }
    const includeAfterBody = [];
    const quartoHtmlRequired = Object.keys(options).some((option)=>!!options[option]);
    if (quartoHtmlRequired) {
        const quartoHtmlScript = temp.createFile();
        const renderedHtml = renderEjs(formatResourcePath("html", join3("templates", "quarto-html.ejs")), options);
        if (renderedHtml.trim() !== "") {
            Deno.writeTextFileSync(quartoHtmlScript, renderedHtml);
            includeAfterBody.push(quartoHtmlScript);
        }
    }
    if (options.utterances) {
        if (typeof options.utterances !== "object") {
            throw new Error("Invalid utterances configuration (must provide a repo");
        }
        const utterances = options.utterances;
        if (!utterances["repo"]) {
            throw new Error("Invalid utterances coniguration (must provide a repo)");
        }
        utterances["issue-term"] = utterances["issue-term"] || "pathname";
        utterances["theme"] = utterances["theme"] || "github-light";
        const utterancesAfterBody = temp.createFile({
            suffix: "-utter.html"
        });
        Deno.writeTextFileSync(utterancesAfterBody, renderEjs(formatResourcePath("html", join3("utterances", "utterances.ejs")), {
            utterances
        }));
        includeAfterBody.push(utterancesAfterBody);
    }
    if (options.giscus) {
        const giscus = options.giscus;
        giscus.category = giscus.category || "General";
        giscus.theme = giscus.theme || "light";
        giscus.mapping = giscus.mapping || "title";
        giscus["reactions-enabled"] = giscus["reactions-enabled"] !== undefined ? giscus["reactions-enabled"] : true;
        giscus["input-position"] = giscus["input-position"] || "top";
        giscus.language = giscus.language || "en";
        if (giscus[kGiscusRepoId] === undefined || giscus[kGiscusCategoryId] === undefined) {
            const discussionData = await getGithubDiscussionsMetadata(giscus.repo);
            if (giscus[kGiscusRepoId] === undefined && discussionData.repositoryId) {
                giscus[kGiscusRepoId] = discussionData.repositoryId;
            }
            const categoryId = getDiscussionCategoryId(giscus.category, discussionData);
            if (giscus[kGiscusCategoryId] === undefined && categoryId) {
                giscus[kGiscusCategoryId] = categoryId;
            }
        }
        const giscusAfterBody = temp.createFile({
            suffix: "-giscus.html"
        });
        Deno.writeTextFileSync(giscusAfterBody, renderEjs(formatResourcePath("html", join3("giscus", "giscus.ejs")), {
            giscus
        }));
        includeAfterBody.push(giscusAfterBody);
    }
    dependencies.push({
        name: kQuartoHtmlDependency,
        scripts,
        stylesheets
    });
    const templateDir = formatResourcePath("html", "pandoc");
    const partials = [
        "metadata.html",
        "title-block.html",
        "toc.html", 
    ];
    const templateContext = {
        template: join3(templateDir, "template.html"),
        partials: partials.map((partial)=>join3(templateDir, partial))
    };
    const metadata = {};
    return {
        [kIncludeInHeader]: includeInHeader,
        [kIncludeAfterBody]: includeAfterBody,
        metadata,
        templateContext,
        html: {
            [kDependencies]: dependencies,
            [kSassBundles]: sassBundles,
            [kHtmlPostprocessors]: [
                htmlFormatPostprocessor(format, featureDefaults),
                metadataPostProcessor(input, format, offset), 
            ]
        }
    };
}
const kFormatHasBootstrap = "has-bootstrap";
function htmlFormatFilterParams(format) {
    return {
        [kFormatHasBootstrap]: formatHasBootstrap(format)
    };
}
function htmlFormatFeatureDefaults(format) {
    const bootstrap = formatHasBootstrap(format);
    const minimal = format.metadata[kMinimal] === true;
    return {
        tabby: !minimal && !bootstrap,
        copyCode: !minimal,
        anchors: !minimal,
        hoverCitations: !minimal,
        hoverFootnotes: !minimal,
        figResponsive: !minimal
    };
}
function htmlFormatPostprocessor(format, featureDefaults) {
    const haveBootstrap = formatHasBootstrap(format);
    if (!featureDefaults) {
        featureDefaults = htmlFormatFeatureDefaults(format);
    }
    const codeCopy = featureDefaults.copyCode ? format.metadata[kCodeCopy] !== false : format.metadata[kCodeCopy] || false;
    const anchors = featureDefaults.anchors ? format.metadata[kAnchorSections] !== false : format.metadata[kAnchorSections] || false;
    return (doc)=>{
        const codeBlocks = doc.querySelectorAll("pre.sourceCode");
        for(let i1 = 0; i1 < codeBlocks.length; i1++){
            const code = codeBlocks[i1];
            const parentHoist = (clz)=>{
                if (code.classList.contains(clz)) {
                    code.classList.delete(clz);
                    code.parentElement?.classList.add(clz);
                }
            };
            parentHoist("cell-code");
            parentHoist("hidden");
            if (code.classList.contains("hidden")) {
                code.classList.delete("hidden");
                code.parentElement?.classList.add("hidden");
            }
            if (codeCopy) {
                code.classList.add("code-with-copy");
                const copyButton = createCodeCopyButton(doc, format);
                code.appendChild(copyButton);
            }
            if (code.parentElement?.getAttribute("data-code-preview")) {
                const codeExample = doc.createElement("iframe");
                for (const parentClass of code.classList){
                    codeExample.classList.add(parentClass);
                }
                codeExample.setAttribute("src", code.parentElement.getAttribute("data-code-preview").replace(/\.qmd$/, ".html"));
                code.parentElement.removeAttribute("data-code-preview");
                code.parentElement.appendChild(codeExample);
            }
        }
        if (anchors) {
            const container = haveBootstrap ? doc.querySelector("main") : doc.querySelector("body");
            if (container) {
                [
                    "h2",
                    "h3",
                    "h4",
                    "h5",
                    "h6",
                    ".quarto-figure[id]",
                    "div[id^=tbl-]"
                ].forEach((selector)=>{
                    const headings = container.querySelectorAll(selector);
                    for(let i1 = 0; i1 < headings.length; i1++){
                        const heading = headings[i1];
                        if (heading.id !== "toc-title") {
                            if (!heading.classList.contains("no-anchor")) {
                                heading.classList.add("anchored");
                            }
                        }
                    }
                });
            }
        }
        const headerSections = doc.querySelectorAll(".header-section-number");
        for(let i11 = 0; i11 < headerSections.length; i11++){
            const secNumber = headerSections[i11];
            const prevElement = secNumber.previousElementSibling;
            if (prevElement && prevElement.classList.contains("toc-section-number")) {
                secNumber.remove();
            }
        }
        return Promise.resolve(kHtmlEmptyPostProcessResult);
    };
}
function themeFormatExtras(input, flags, format, temp, offset) {
    const theme = format.metadata[kTheme];
    if (theme === "none") {
        return {
            metadata: {
                [kDocumentCss]: false
            }
        };
    } else if (theme === "pandoc") {
        return pandocExtras(format);
    } else {
        return boostrapExtras(input, flags, format, temp, offset);
    }
}
function pandocExtras(format) {
    const maxWidth = format.metadata["max-width"];
    const headerIncludes = maxWidth ? `<style type="text/css">body { max-width: ${asCssSize(maxWidth)};}</style>` : undefined;
    return {
        metadata: {
            [kDocumentCss]: true,
            [kHeaderIncludes]: headerIncludes
        }
    };
}
async function resolveSassBundles(inputDir, extras, pandoc, temp, formatBundles, projectBundles, project) {
    extras = cloneDeep1(extras);
    const mergedBundles = {};
    const group = (bundles, groupedBundles)=>{
        bundles.forEach((bundle)=>{
            if (!groupedBundles[bundle.dependency]) {
                groupedBundles[bundle.dependency] = [];
            }
            groupedBundles[bundle.dependency].push(bundle);
        });
    };
    if (projectBundles) {
        group(projectBundles, mergedBundles);
    }
    if (formatBundles) {
        group(formatBundles, mergedBundles);
    }
    let hasDarkStyles = false;
    let defaultStyle = undefined;
    for (const dependency of Object.keys(mergedBundles)){
        const bundles = mergedBundles[dependency];
        const hasDark = bundles.some((bundle)=>bundle.dark !== undefined);
        defaultStyle = bundles.some((bundle)=>bundle.dark !== undefined && bundle.dark.default) ? "dark" : "light";
        const targets = [
            {
                name: `${dependency}.min.css`,
                bundles,
                attribs: {}
            }
        ];
        if (hasDark) {
            targets[0].attribs = {
                ...targets[0].attribs,
                ...attribForThemeStyle("light", defaultStyle)
            };
            const darkBundles = bundles.map((bundle)=>{
                bundle = cloneDeep1(bundle);
                bundle.user = bundle.dark?.user || bundle.user;
                bundle.quarto = bundle.dark?.quarto || bundle.quarto;
                bundle.framework = bundle.dark?.framework || bundle.framework;
                bundle.key = bundle.key + "-dark";
                return bundle;
            });
            targets.push({
                name: `${dependency}-dark.min.css`,
                bundles: darkBundles,
                attribs: attribForThemeStyle("dark", defaultStyle)
            });
            hasDarkStyles = true;
        }
        for (const target of targets){
            let cssPath = await compileSass(target.bundles, temp);
            const cssResult = processCssIntoExtras(cssPath, extras, temp);
            cssPath = cssResult.path;
            for (const bundle of target.bundles){
                if (bundle.attribs) {
                    for (const key of Object.keys(bundle.attribs)){
                        if (target.attribs[key] === undefined) {
                            target.attribs[key] = bundle.attribs[key];
                        }
                    }
                }
            }
            target.attribs["data-mode"] = cssResult.dark ? "dark" : "light";
            const css = Deno.readTextFileSync(cssPath);
            const toDependencies = (paths)=>{
                return paths.map((path)=>{
                    return {
                        name: path,
                        path: project ? join3(project.dir, path) : path,
                        attribs: target.attribs
                    };
                });
            };
            const resources = toDependencies(cssResources(css));
            const imports = toDependencies(cssImports(css));
            const extraDeps = extras.html?.[kDependencies];
            if (extraDeps) {
                const existingDependency = extraDeps.find((extraDep)=>extraDep.name === dependency);
                if (existingDependency) {
                    if (!existingDependency.stylesheets) {
                        existingDependency.stylesheets = [];
                    }
                    existingDependency.stylesheets.push({
                        name: target.name,
                        path: cssPath,
                        attribs: target.attribs
                    });
                    existingDependency.stylesheets.push(...imports);
                    existingDependency.resources?.push(...resources);
                } else {
                    extraDeps.push({
                        name: dependency,
                        stylesheets: [
                            {
                                name: target.name,
                                path: cssPath,
                                attribs: target.attribs
                            },
                            ...imports
                        ],
                        resources
                    });
                }
            }
        }
    }
    extras = await resolveQuartoSyntaxHighlighting(inputDir, extras, pandoc, temp, hasDarkStyles ? "light" : "default", defaultStyle);
    if (hasDarkStyles) {
        extras = await resolveQuartoSyntaxHighlighting(inputDir, extras, pandoc, temp, "dark", defaultStyle);
    }
    if (isHtmlOutput(pandoc, true)) {
        setTextHighlightStyle("none", extras);
    }
    return extras;
}
function cssHasDarkModeSentinel(css) {
    return !!css.match(/\/\*! dark \*\//g);
}
async function resolveQuartoSyntaxHighlighting(inputDir, extras, pandoc, temp, style, defaultStyle) {
    extras = cloneDeep1(extras);
    const mediaAttr = attribForThemeStyle(style, defaultStyle);
    if (style === "default") {
        if (extras.html?.[kTextHighlightingMode] === "dark") {
            style = "dark";
        }
    }
    mediaAttr.id = "quarto-text-highlighting-styles";
    const cssFileName = `quarto-syntax-highlighting${style === "dark" ? "-dark" : ""}.css`;
    const themeDescriptor = readHighlightingTheme(inputDir, pandoc, style);
    if (themeDescriptor) {
        const extraVariables = extras.html?.[kQuartoCssVariables] || [];
        const highlightCss = generateThemeCssVars(themeDescriptor.json);
        if (highlightCss) {
            const rules = [
                highlightCss,
                "",
                "/* other quarto variables */",
                ...extraVariables, 
            ];
            const textHighlightCssRules = generateThemeCssClasses(themeDescriptor.json);
            if (textHighlightCssRules) {
                rules.push(...textHighlightCssRules);
            }
            rules.push(".prevent-inlining { content: '</' }");
            const highlightCssPath = await compileSass([
                {
                    key: cssFileName,
                    quarto: {
                        uses: "",
                        defaults: "",
                        functions: "",
                        mixins: "",
                        rules: rules.join("\n")
                    }
                }
            ], temp, false);
            const extraDeps = extras.html?.[kDependencies];
            if (extraDeps) {
                const quartoDependency = extraDeps.find((extraDep)=>extraDep.name === kQuartoHtmlDependency);
                const existingDependency = quartoDependency;
                if (existingDependency) {
                    existingDependency.stylesheets = existingDependency.stylesheets || [];
                    existingDependency.stylesheets.push({
                        name: cssFileName,
                        path: highlightCssPath,
                        attribs: mediaAttr
                    });
                }
            }
        }
    }
    return extras;
}
function generateThemeCssVars(themeJson) {
    const textStyles = themeJson["text-styles"];
    if (textStyles) {
        const lines = [];
        lines.push("/* quarto syntax highlight colors */");
        lines.push(":root {");
        Object.keys(textStyles).forEach((styleName)=>{
            const abbr = kAbbrevs[styleName];
            if (abbr) {
                const textValues = textStyles[styleName];
                Object.keys(textValues).forEach((textAttr)=>{
                    switch(textAttr){
                        case "text-color":
                            lines.push(`  --quarto-hl-${abbr}-color: ${textValues[textAttr] || "inherit"};`);
                            break;
                    }
                });
            }
        });
        lines.push("}");
        return lines.join("\n");
    }
    return undefined;
}
function generateThemeCssClasses(themeJson) {
    const textStyles = themeJson["text-styles"];
    if (textStyles) {
        const lines = [];
        Object.keys(textStyles).forEach((styleName)=>{
            const abbr = kAbbrevs[styleName];
            if (abbr !== undefined) {
                const textValues = textStyles[styleName];
                const cssValues = generateCssKeyValues(textValues);
                if (abbr !== "") {
                    lines.push(`\ncode span.${abbr} {`);
                    lines.push(...cssValues);
                    lines.push("}\n");
                } else {
                    [
                        "pre > code.sourceCode > span",
                        "code span",
                        "code.sourceCode > span",
                        "div.sourceCode,\ndiv.sourceCode pre.sourceCode", 
                    ].forEach((selector)=>{
                        lines.push(`\n${selector} {`);
                        lines.push(...cssValues);
                        lines.push("}\n");
                    });
                }
            }
        });
        return lines;
    }
    return undefined;
}
function processCssIntoExtras(cssPath, extras, temp) {
    extras.html = extras.html || {};
    const css = Deno.readTextFileSync(cssPath);
    const hasDarkSentinel = cssHasDarkModeSentinel(css);
    if (!extras.html[kTextHighlightingMode] && hasDarkSentinel) {
        setTextHighlightStyle("dark", extras);
    }
    const matches = css.matchAll(kVariablesRegex);
    if (matches) {
        extras.html[kQuartoCssVariables] = extras.html[kQuartoCssVariables] || [];
        let dirty = false;
        for (const match of matches){
            const variables = match[1];
            extras.html[kQuartoCssVariables]?.push(variables);
            dirty = true;
        }
        extras.html[kQuartoCssVariables] = uniqBy1(extras.html[kQuartoCssVariables], (val)=>{
            return val;
        });
        if (dirty) {
            const cleanedCss = css.replaceAll(kVariablesRegex, "");
            const newCssPath = temp.createFile({
                suffix: ".css"
            });
            let mode;
            if (Deno.build.os !== "windows") {
                const stat = Deno.statSync(cssPath);
                if (stat.mode !== null) {
                    mode = stat.mode;
                }
            }
            if (mode !== undefined) {
                Deno.writeTextFileSync(newCssPath, cleanedCss, {
                    mode
                });
            } else {
                Deno.writeTextFileSync(newCssPath, cleanedCss);
            }
            return {
                dark: hasDarkSentinel,
                path: newCssPath
            };
        }
    }
    return {
        dark: hasDarkSentinel,
        path: cssPath
    };
}
const kVariablesRegex = /\/\*\! quarto-variables-start \*\/([\S\s]*)\/\*\! quarto-variables-end \*\//g;
function generateCssKeyValues(textValues) {
    const lines = [];
    Object.keys(textValues).forEach((textAttr)=>{
        switch(textAttr){
            case "text-color":
                lines.push(`color: ${textValues[textAttr]};`);
                break;
            case "background":
                lines.push(`background-color: ${textValues[textAttr]};`);
                break;
            case "bold":
                if (textValues[textAttr]) {
                    lines.push("font-weight: bold;");
                }
                break;
            case "italic":
                if (textValues[textAttr]) {
                    lines.push("font-style: italic;");
                }
                break;
            case "underline":
                if (textValues[textAttr]) {
                    lines.push("text-decoration: underline;");
                }
                break;
        }
    });
    return lines;
}
function defaultSyntaxHighlightingClassMap() {
    const classToStyleMapping = {};
    const themeRaw = readTheme("", kDefaultHighlightStyle, "default");
    if (themeRaw) {
        const themeJson = JSON.parse(themeRaw);
        const textStyles = themeJson["text-styles"];
        if (textStyles) {
            Object.keys(textStyles).forEach((styleName)=>{
                const abbr = kAbbrevs[styleName];
                if (abbr !== undefined) {
                    const textValues = textStyles[styleName];
                    const cssValues = generateCssKeyValues(textValues);
                    classToStyleMapping[abbr] = cssValues;
                }
            });
        }
    }
    return classToStyleMapping;
}
const kAbbrevs = {
    "Keyword": "kw",
    "DataType": "dt",
    "DecVal": "dv",
    "BaseN": "bn",
    "Float": "fl",
    "Char": "ch",
    "String": "st",
    "Comment": "co",
    "Other": "ot",
    "Alert": "al",
    "Function": "fu",
    "RegionMarker": "re",
    "Error": "er",
    "Constant": "cn",
    "SpecialChar": "sc",
    "VerbatimString": "vs",
    "SpecialString": "ss",
    "Import": "im",
    "Documentation": "do",
    "Annotation": "an",
    "CommentVar": "cv",
    "Variable": "va",
    "ControlFlow": "cf",
    "Operator": "op",
    "BuiltIn": "bu",
    "Extension": "ex",
    "Preprocessor": "pp",
    "Attribute": "at",
    "Information": "in",
    "Warning": "wa",
    "Normal": ""
};
function attribForThemeStyle(style, defaultStyle) {
    const colorModeAttrs = (mode, disabled)=>{
        const attr = {
            class: `quarto-color-scheme${mode === "dark" ? " quarto-color-alternate" : ""}`
        };
        if (disabled) {
            attr.rel = "prefetch";
        }
        return attr;
    };
    switch(style){
        case "dark":
            return colorModeAttrs("dark", defaultStyle !== "dark");
        case "light":
            return colorModeAttrs("light", false);
        case "default":
        default:
            return {};
    }
}
function setTextHighlightStyle(style, extras) {
    extras.html = extras.html || {};
    extras.html[kTextHighlightingMode] = style;
}
const kYamlMetadataBlock = "yaml_metadata_block";
async function pandocListFormats() {
    const result1 = await execProcess({
        cmd: [
            pandocBinaryPath(),
            "--list-output-formats"
        ],
        stdout: "piped"
    });
    if (result1.success) {
        return lines(result1.stdout).filter((line)=>line.length > 0);
    } else {
        return Promise.reject();
    }
}
function pandocFormatWith(format, prepend, append) {
    const split = splitPandocFormatString(format);
    return `${split.format}${prepend}${split.options}${append}`;
}
function splitPandocFormatString(format) {
    let optionsPos = format.indexOf("-");
    if (optionsPos === -1) {
        optionsPos = format.indexOf("+");
    }
    const base = optionsPos === -1 ? format : format.substr(0, optionsPos);
    const options = optionsPos === -1 ? "" : format.substr(optionsPos);
    return {
        format: base,
        options
    };
}
const isValidFormat = (formatDesc, pandoc)=>{
    if (isBuiltInFormat(formatDesc.baseFormat)) {
        return true;
    } else if (pandoc.writer) {
        return true;
    } else {
        return false;
    }
};
const parseFormatString = (formatStr)=>{
    const formatDesc = breakFormatString(formatStr);
    if (formatDesc) {
        return formatDesc;
    } else {
        if (formatStr === "hugo") {
            formatStr = "hugo-md";
        }
        const splitFormat = formatStr.split(/-/);
        const lastEl = splitFormat.pop();
        if (lastEl) {
            const lastElFormatDesc = breakFormatString(lastEl, false);
            if (lastElFormatDesc) {
                lastElFormatDesc.extension = splitFormat.join("-");
                return lastElFormatDesc;
            } else {
                throw new Error("Invalid format string");
            }
        } else {
            throw new Error("Invalid format string");
        }
    }
};
class FormatAliases {
    static pandoc;
}
function isBuiltInFormat(format) {
    if (!FormatAliases.pandoc) {
        const formatAliases = readYaml(resourcePath("schema/format-aliases.yml"));
        const pandocFormats = formatAliases["aliases"]["pandoc-all"];
        FormatAliases.pandoc = pandocFormats;
    }
    return FormatAliases.pandoc.includes(format) || extname2(format) === ".lua";
}
function breakFormatString(formatStr, strict = true) {
    const firstEl = formatStr.split(/[+-]/)[0];
    if (isBuiltInFormat(firstEl)) {
        const variantMatches = formatStr.matchAll(/[\+\-]\S*?(?=\-|\+|$)/g);
        const variantCommands = [];
        for (const match of variantMatches){
            variantCommands.push(match[0]);
        }
        const variants = [];
        const modifiers = [];
        variantCommands.forEach((cmd)=>{
            if (pandocVariants.includes(cmd)) {
                variants.push(cmd);
            } else {
                modifiers.push(cmd);
            }
        });
        return {
            baseFormat: firstEl,
            variants,
            modifiers,
            formatWithVariants: `${firstEl}${variants.join("")}`
        };
    } else {
        if (strict) {
            return undefined;
        } else {
            return {
                baseFormat: formatStr,
                variants: [],
                modifiers: [],
                formatWithVariants: formatStr
            };
        }
    }
}
const pandocVariants = [
    "-abbreviations",
    "+all_symbols_escapable",
    "-amuse",
    "-angle_brackets_escapable",
    "-ascii_identifiers",
    "-attributes",
    "+auto_identifiers",
    "-autolink_bare_uris",
    "+backtick_code_blocks",
    "+blank_before_blockquote",
    "+blank_before_header",
    "+bracketed_spans",
    "+citations",
    "-compact_definition_lists",
    "+definition_lists",
    "-east_asian_line_breaks",
    "-element_citations",
    "-emoji",
    "-empty_paragraphs",
    "-epub_html_exts",
    "+escaped_line_breaks",
    "+example_lists",
    "+fancy_lists",
    "+fenced_code_attributes",
    "+fenced_code_blocks",
    "+fenced_divs",
    "+footnotes",
    "-four_space_rule",
    "-gfm_auto_identifiers",
    "+grid_tables",
    "-gutenberg",
    "-hard_line_breaks",
    "+header_attributes",
    "-ignore_line_breaks",
    "+implicit_figures",
    "+implicit_header_references",
    "+inline_code_attributes",
    "+inline_notes",
    "+intraword_underscores",
    "+latex_macros",
    "+line_blocks",
    "+link_attributes",
    "-lists_without_preceding_blankline",
    "-literate_haskell",
    "-markdown_attribute",
    "+markdown_in_html_blocks",
    "-mmd_header_identifiers",
    "-mmd_link_attributes",
    "-mmd_title_block",
    "+multiline_tables",
    "+native_divs",
    "+native_spans",
    "-native_numbering",
    "-ntb",
    "-old_dashes",
    "+pandoc_title_block",
    "+pipe_tables",
    "+raw_attribute",
    "+raw_html",
    "+raw_tex",
    "-raw_markdown",
    "-rebase_relative_paths",
    "-short_subsuperscripts",
    "+shortcut_reference_links",
    "+simple_tables",
    "+smart",
    "-sourcepos",
    "+space_in_atx_header",
    "-spaced_reference_links",
    "+startnum",
    "+strikeout",
    "+subscript",
    "+superscript",
    "-styles",
    "+task_lists",
    "+table_captions",
    "+tex_math_dollars",
    "-tex_math_double_backslash",
    "-tex_math_single_backslash",
    "-xrefs_name",
    "-xrefs_number",
    "+yaml_metadata_block", 
];
function katexPostProcessor() {
    return (doc)=>{
        const katexScript = doc.querySelector(`script[src$="katex.min.js"]`);
        const katexCss = doc.querySelector(`link[href$="katex.min.css"]`);
        if (katexScript && katexCss) {
            katexScript.removeAttribute("defer");
            const katexBefore = doc.createElement("script");
            katexBefore.innerText = "window.backupDefine = window.define; window.define = undefined;";
            katexScript.parentNode?.insertBefore(katexBefore, katexScript);
            const katexAfter = doc.createElement("script");
            katexAfter.innerText = "window.define = window.backupDefine; window.backupDefine = undefined;";
            katexCss?.parentNode?.insertBefore(katexAfter, katexCss);
        }
        return Promise.resolve(kHtmlEmptyPostProcessResult);
    };
}
" ".charCodeAt(0);
"\t".charCodeAt(0);
":".charCodeAt(0);
new TextDecoder();
async function appendTextFile(path, text) {
    const file = await Deno.open(path, {
        append: true
    });
    try {
        const encoder = new TextEncoder();
        file.writeSync(encoder.encode(text));
    } finally{
        file.close();
    }
}
async function touch(path) {
    if (Deno.build.os === "windows") {
        const contents = await Deno.readTextFile(path);
        await Deno.writeTextFile(path, contents);
    } else {
        await execProcess({
            cmd: [
                "touch",
                path
            ]
        });
    }
}
function appendDependencies(dependenciesFile, dependencies) {
    const dependencyLines = [];
    for (const dependency of dependencies){
        dependencyLines.push(JSON.stringify(dependency));
    }
    if (dependencyLines.length > 0) {
        appendTextFile(dependenciesFile, `${dependencyLines.join("\n")}\n`);
    }
}
function writeDependencies(dependenciesFile, extras) {
    if (extras.html?.[kDependencies]) {
        const dependencies = extras.html[kDependencies].map((dep)=>{
            return {
                type: "html",
                content: dep
            };
        });
        appendDependencies(dependenciesFile, dependencies);
    }
}
function readAndInjectDependencies(dependenciesFile, inputDir, libDir, doc, project) {
    const dependencyJsonStream = Deno.readTextFileSync(dependenciesFile);
    const htmlDependencies = [];
    const htmlAttachments = [];
    lines(dependencyJsonStream).forEach((json)=>{
        if (json) {
            const dependency = JSON.parse(json);
            if (dependency.type === "html") {
                htmlDependencies.push(dependency.content);
            } else if (dependency.type === "html-attachment") {
                htmlAttachments.push(dependency);
            }
        }
    });
    const injectedDependencies = [];
    if (htmlDependencies.length > 0) {
        const injector = domDependencyInjector(doc);
        const injected = processHtmlDependencies(htmlDependencies, inputDir, libDir, injector, project);
        injectedDependencies.push(...injected);
        injector.finalizeInjection();
    }
    if (htmlAttachments.length > 0) {
        for (const attachment of htmlAttachments){
            const parentDependency = injectedDependencies.find((dep)=>{
                return dep.name === attachment.content.name;
            });
            if (parentDependency) {
                const directoryInfo = targetDirectoryInfo(inputDir, libDir, parentDependency);
                copyDependencyFile(attachment.content.file, directoryInfo.absolute, !!parentDependency.external);
            }
        }
    }
    return Promise.resolve({
        resources: [],
        supporting: []
    });
}
function resolveDependencies(extras, inputDir, libDir, temp, project) {
    extras = cloneDeep1(extras);
    const lines = [];
    const afterBodyLines = [];
    if (extras.html?.[kDependencies]) {
        const injector = lineDependencyInjector(lines, afterBodyLines);
        processHtmlDependencies(extras.html[kDependencies], inputDir, libDir, injector, project);
        injector.finalizeInjection();
        delete extras.html?.[kDependencies];
        const dependenciesHead = temp.createFile({
            prefix: "dependencies",
            suffix: ".html"
        });
        Deno.writeTextFileSync(dependenciesHead, lines.join("\n"));
        extras[kIncludeInHeader] = [
            dependenciesHead
        ].concat(extras[kIncludeInHeader] || []);
        if (afterBodyLines.length > 0) {
            const dependenciesAfter = temp.createFile({
                prefix: "dependencies-after",
                suffix: ".html"
            });
            Deno.writeTextFileSync(dependenciesAfter, afterBodyLines.join("\n"));
            extras[kIncludeAfterBody] = [
                dependenciesAfter
            ].concat(extras[kIncludeAfterBody] || []);
        }
    }
    return extras;
}
function processHtmlDependencies(dependencies, inputDir, libDir, injector, project) {
    const copiedDependencies = [];
    for (const dependency of dependencies){
        if (copiedDependencies.find((copiedDep)=>{
            return copiedDep.name === dependency.name;
        })) {
            continue;
        }
        const directoryInfo = targetDirectoryInfo(inputDir, libDir, dependency);
        const copyFile = (file, attribs, afterBody, inject)=>{
            copyDependencyFile(file, directoryInfo.absolute, dependency.external || false);
            if (inject) {
                const href = join3(directoryInfo.relative, file.name);
                inject(href, attribs, afterBody);
            }
        };
        if (dependency.scripts) {
            dependency.scripts.forEach((script)=>copyFile(script, script.attribs, script.afterBody, injector.injectScript));
        }
        if (dependency.stylesheets) {
            dependency.stylesheets.forEach((stylesheet)=>{
                copyFile(stylesheet, stylesheet.attribs, stylesheet.afterBody, injector.injectStyle);
            });
        }
        if (dependency.serviceworkers) {
            dependency.serviceworkers.forEach((serviceWorker)=>{
                const resolveDestination = (worker, inputDir, project)=>{
                    if (!worker.destination) {
                        if (project) {
                            worker.destination = `/${basename2(worker.source)}`;
                        } else {
                            worker.destination = `${basename2(worker.source)}`;
                        }
                    }
                    if (worker.destination.startsWith("/")) {
                        if (project) {
                            const projectDir = projectOutputDir(project);
                            return join3(projectDir, worker.destination.slice(1));
                        } else {
                            throw new Error("A service worker is being provided with a project relative destination path but no valid Quarto project was found.");
                        }
                    } else {
                        return join3(inputDir, worker.destination);
                    }
                };
                const destinationFile = resolveDestination(serviceWorker, inputDir, project);
                const destinationDir = dirname2(destinationFile);
                ensureDirSync(destinationDir);
                copyFileIfNewer(serviceWorker.source, destinationFile);
            });
        }
        if (dependency.head) {
            injector.injectHtml(dependency.head);
        }
        if (dependency.links) {
            dependency.links.forEach((link)=>{
                injector.injectLink(link.href, link.rel, link.type);
            });
        }
        if (dependency.meta) {
            injector.injectMeta(dependency.meta);
        }
        if (dependency.resources) {
            dependency.resources.forEach((resource)=>copyFile(resource));
        }
        copiedDependencies.push(dependency);
    }
    return copiedDependencies;
}
function copyDependencyFile(file, targetDir, external) {
    const targetPath = join3(targetDir, file.name);
    ensureDirSync(dirname2(targetPath));
    copyFileIfNewer(file.path, targetPath);
    if (external && isCssFile(file.path)) {
        processCssFile(dirname2(file.path), targetPath);
    }
}
function targetDirectoryInfo(inputDir, libDir, dependency) {
    const targetLibDir = dependency.external ? join3(libDir, "quarto-contrib") : libDir;
    const dir = dependency.version ? `${dependency.name}-${dependency.version}` : dependency.name;
    const relativeTargetDir = join3(targetLibDir, dir);
    const absoluteTargetDir = join3(inputDir, relativeTargetDir);
    return {
        absolute: absoluteTargetDir,
        relative: relativeTargetDir
    };
}
function processCssFile(srcDir, file) {
    const css = Deno.readTextFileSync(file);
    const destCss = fixupCssReferences(css, (ref)=>{
        const refPath = join3(srcDir, ref);
        if (safeExistsSync(refPath)) {
            const refDir = dirname2(ref);
            const targetRef = refDir && refDir !== "." && refDir.includes("..") ? join3(insecureHash(dirname2(ref)), basename2(ref)) : ref;
            const refDestPath = join3(dirname2(file), targetRef);
            copyFileIfNewer(refPath, refDestPath);
            return pathWithForwardSlashes(targetRef);
        } else {
            return ref;
        }
    });
    if (destCss !== css) {
        Deno.writeTextFileSync(file, destCss);
    }
}
const kDependencyTarget = "htmldependencies:E3FAD763";
function domDependencyInjector(doc) {
    const findTargetComment = ()=>{
        for (const node of doc.head.childNodes){
            if (node.nodeType === NodeType.COMMENT_NODE) {
                if (node.textContent && node.textContent.trim() === kDependencyTarget) {
                    return node;
                }
            }
        }
        return doc.head.firstChild;
    };
    const targetComment = findTargetComment();
    const injectEl = (el, attribs, afterBody)=>{
        if (attribs) {
            for (const key of Object.keys(attribs)){
                el.setAttribute(key, attribs[key]);
            }
        }
        if (!afterBody) {
            doc.head.insertBefore(doc.createTextNode("\n"), targetComment);
            doc.head.insertBefore(el, targetComment);
        } else {
            doc.body.appendChild(el);
            doc.body.appendChild(doc.createTextNode("\n"));
        }
    };
    const injectScript = (href, attribs, afterBody)=>{
        const scriptEl = doc.createElement("script");
        scriptEl.setAttribute("src", pathWithForwardSlashes(href));
        injectEl(scriptEl, attribs, afterBody);
    };
    const injectStyle = (href, attribs, afterBody)=>{
        const linkEl = doc.createElement("link");
        linkEl.setAttribute("href", pathWithForwardSlashes(href));
        linkEl.setAttribute("rel", "stylesheet");
        injectEl(linkEl, attribs, afterBody);
    };
    const injectLink = (href, rel, type)=>{
        const linkEl = doc.createElement("link");
        linkEl.setAttribute("href", pathWithForwardSlashes(href));
        linkEl.setAttribute("rel", rel);
        if (type) {
            linkEl.setAttribute("type", type);
        }
        injectEl(linkEl);
    };
    const injectHtml = (html)=>{
        const container = doc.createElement("div");
        container.innerHTML = html;
        for (const childEl of container.children){
            injectEl(childEl);
        }
    };
    const injectMeta = (meta)=>{
        Object.keys(meta).forEach((key)=>{
            const metaEl = doc.createElement("meta");
            metaEl.setAttribute("name", key);
            metaEl.setAttribute("content", meta[key]);
            injectEl(metaEl);
        });
    };
    const finalizeInjection = ()=>{
        if (targetComment) {
            targetComment.remove();
        }
    };
    return {
        injectScript,
        injectStyle,
        injectLink,
        injectMeta,
        injectHtml,
        finalizeInjection
    };
}
function lineDependencyInjector(lines, afterBodyLines) {
    const metaTemplate = __VIRTUAL_FILE176(`<meta name="<%- name %>" content="<%- value %>"/>`);
    const scriptTemplate = __VIRTUAL_FILE176(`<script <%= attribs %> src="<%- href %>"></script>`);
    const stylesheetTempate = __VIRTUAL_FILE176(`<link <%= attribs %> href="<%- href %>" rel="stylesheet" />`);
    const rawLinkTemplate = __VIRTUAL_FILE176(`<link href="<%- href %>" rel="<%- rel %>"<% if (type) { %> type="<%- type %>"<% } %> />`);
    const inject = (content, afterBody)=>{
        if (afterBody) {
            afterBodyLines.push(content);
        } else {
            lines.push(content);
        }
    };
    const formatAttribs = (attribs)=>{
        return attribs ? Object.entries(attribs).map((entry)=>{
            const attrib = `${entry[0]}="${entry[1]}"`;
            return attrib;
        }).join(" ") : "";
    };
    const injectScript = (href, attribs, afterBody)=>{
        inject(scriptTemplate({
            href: pathWithForwardSlashes(href),
            attribs: formatAttribs(attribs)
        }, afterBody));
    };
    const injectStyle = (href, attribs, afterBody)=>{
        inject(stylesheetTempate({
            href: pathWithForwardSlashes(href),
            attribs: formatAttribs(attribs)
        }, afterBody));
    };
    const injectLink = (href, rel, type)=>{
        if (!type) {
            type = "";
        }
        lines.push(rawLinkTemplate({
            href: pathWithForwardSlashes(href),
            type,
            rel
        }));
    };
    const injectHtml = (html)=>{
        lines.push(html + "\n");
    };
    const injectMeta = (meta)=>{
        Object.keys(meta).forEach((name)=>{
            lines.push(metaTemplate({
                name,
                value: meta[name]
            }));
        });
    };
    const finalizeInjection = ()=>{};
    return {
        injectScript,
        injectStyle,
        injectLink,
        injectMeta,
        injectHtml,
        finalizeInjection
    };
}
function writeFormatResources(inputDir, dependenciesFile, formatResources) {
    if (formatResources) {
        const files = Array.isArray(formatResources) ? formatResources : [
            formatResources
        ];
        const dependencies = files.map((file)=>{
            const absPath = join3(inputDir, file);
            if (!existsSync(absPath)) {
                throw new Error(`The referenced format resource '${file}' does not exist.`);
            }
            return {
                type: kFormatResources,
                content: {
                    file: absPath
                }
            };
        });
        appendDependencies(dependenciesFile, dependencies);
    }
}
async function processFormatResources(inputDir, dependenciesFile) {
    const dependencyJsonStream = await Deno.readTextFile(dependenciesFile);
    for (const jsonBlob of lines(dependencyJsonStream)){
        if (jsonBlob) {
            const dependency = JSON.parse(jsonBlob);
            if (dependency.type === kFormatResources) {
                const formatResource = dependency.content;
                const targetFile = join3(inputDir, basename2(formatResource.file));
                copyTo(formatResource.file, targetFile, {
                    overwrite: true,
                    preserveTimestamps: true
                });
                if (Deno.build.os !== "windows") {
                    Deno.chmodSync(targetFile, 0o555);
                }
            }
        }
    }
}
async function runPandoc(options, sysFilters) {
    const cwd = dirname2(options.source);
    const cmd = [
        pandocBinaryPath(),
        "+RTS",
        "-K512m",
        "-RTS"
    ];
    const args = [
        ...options.args
    ];
    if (logLevel() === "DEBUG") {
        args.push("--verbose");
        args.push("--trace");
    }
    if (options.flags?.quiet || logLevel() === "ERROR") {
        args.push("--quiet");
    }
    if (options.metadata) {
        options.format.metadata = mergeConfigs(options.format.metadata, options.metadata);
    }
    const printArgs = [
        ...args
    ];
    let printMetadata = {
        ...__VIRTUAL_FILE107(options.format.metadata),
        ...options.flags?.metadata
    };
    const cleanMetadataForPrinting = (metadata)=>{
        delete metadata.params;
        delete metadata[kQuartoVarsKey];
        delete metadata[kQuartoVersion];
        delete metadata[kFigResponsive];
        delete metadata[kQuartoTemplateParams];
        delete metadata[kRevealJsScripts];
        deleteProjectMetadata(metadata);
        deleteCrossrefMetadata(metadata);
        if (metadata[kRevealJSPlugins] && metadata[kRevealJSPlugins].length === 0) {
            delete metadata[kRevealJSPlugins];
        }
    };
    cleanMetadataForPrinting(printMetadata);
    kQuartoForwardedMetadataFields.forEach((field)=>{
        if (options.flags?.pandocMetadata?.[field]) {
            options.format.metadata[field] = options.flags.pandocMetadata[field];
        }
    });
    let allDefaults = await generateDefaults(options) || {};
    let printAllDefaults = __VIRTUAL_FILE107(allDefaults);
    const formatFilterParams = {};
    const kOJSFilter = "ojs";
    if (sysFilters.includes(kOJSFilter)) {
        formatFilterParams[kOJSFilter] = true;
        sysFilters = sysFilters.filter((filter)=>filter !== kOJSFilter);
    }
    options.format.language = await formatLanguage(options.format.metadata, options.format.language, options.flags);
    formatFilterParams["language"] = options.format.language;
    if (!options.format.metadata[kTocTitle] && !isAstOutput(options.format.pandoc)) {
        options.format.metadata[kTocTitle] = options.format.language[projectIsWebsite(options.project) && !projectIsBook(options.project) && isHtmlOutput(options.format.pandoc, true) ? kTocTitleWebsite : kTocTitleDocument];
    }
    if (options.format.metadata[kTocLocation] && options.format.pandoc.toc === undefined) {
        options.format.pandoc.toc = true;
    }
    if (options.format.metadata[kAbstract] && (isHtmlDocOutput(options.format.pandoc) || isEpubOutput(options.format.pandoc))) {
        options.format.metadata[kAbstractTitle] = options.format.language[kSectionTitleAbstract];
    }
    const postprocessors = [];
    const htmlPostprocessors = [];
    const htmlFinalizers = [];
    const htmlRenderAfterBody = [];
    const dependenciesFile = options.temp.createFile();
    if (sysFilters.length > 0 || options.format.formatExtras || options.project?.formatExtras) {
        const projectExtras = options.project?.formatExtras ? await options.project.formatExtras(options.project, options.source, options.flags || {}, options.format, options.temp) : {};
        const formatExtras = options.format.formatExtras ? await options.format.formatExtras(options.source, options.markdown, options.flags || {}, options.format, options.libDir, options.temp, options.offset, options.extension, options.project) : {};
        const extras = await resolveExtras(projectExtras, formatExtras, options.format, cwd, options.libDir, options.temp, dependenciesFile, options.project);
        postprocessors.push(...extras.postprocessors || []);
        if (options.format?.render[kKeepSource] || formatHasCodeTools(options.format)) {
            htmlPostprocessors.push(codeToolsPostprocessor(options.format));
        }
        htmlPostprocessors.push(...extras.html?.[kHtmlPostprocessors] || []);
        htmlFinalizers.push(...extras.html?.[kHtmlFinalizers] || []);
        if (isHtmlFileOutput(options.format.pandoc)) {
            htmlPostprocessors.push(overflowXPostprocessor);
            if (options.flags?.katex || options.format.pandoc[kHtmlMathMethod] === "katex") {
                htmlPostprocessors.push(katexPostProcessor());
            }
            if (!projectIsWebsite(options.project)) {
                htmlPostprocessors.push(discoverResourceRefs);
                htmlPostprocessors.push(fixEmptyHrefs);
            }
        }
        htmlRenderAfterBody.push(...extras.html?.[kMarkdownAfterBody] || []);
        if (sysFilters.length > 0) {
            extras.filters = extras.filters || {};
            extras.filters.post = extras.filters.post || [];
            extras.filters.post.unshift(...sysFilters.map((filter)=>resourcePath(join3("filters", filter))));
        }
        if (extras.args) {
            args.push(...extras.args);
            printArgs.push(...extras.args);
        }
        if (extras.pandoc) {
            if (typeof allDefaults[kFrom] === "string" && typeof extras.pandoc[kFrom] === "string") {
                const userFrom = splitPandocFormatString(allDefaults[kFrom]);
                const extrasFrom = splitPandocFormatString(extras.pandoc[kFrom]);
                allDefaults[kFrom] = pandocFormatWith(userFrom.format, "", extrasFrom.options + userFrom.options);
                printAllDefaults[kFrom] = allDefaults[kFrom];
            }
            allDefaults = mergeConfigs(extras.pandoc, allDefaults);
            printAllDefaults = mergeConfigs(extras.pandoc, printAllDefaults);
            if (extras.pandoc[kHighlightStyle]) {
                delete printAllDefaults[kHighlightStyle];
                allDefaults[kHighlightStyle] = extras.pandoc[kHighlightStyle];
            }
        }
        if (extras.metadata) {
            options.format.metadata = {
                ...mergeConfigs(extras.metadata, options.format.metadata),
                ...extras.metadataOverride
            };
            printMetadata = mergeConfigs(extras.metadata, printMetadata);
            cleanMetadataForPrinting(printMetadata);
        }
        const userTemplate = getPandocArg(args, "--template") || allDefaults[kTemplate];
        const userPartials = readPartials(options.format.metadata, cwd);
        const inputDir = Deno.realPathSync(cwd);
        const resolvePath = (path)=>{
            if (isAbsolute2(path)) {
                return path;
            } else {
                return join3(inputDir, path);
            }
        };
        const templateContext = extras.templateContext;
        if (templateContext) {
            cleanTemplatePartialMetadata(printMetadata, templateContext.partials || []);
            const template = userTemplate ? resolvePath(userTemplate) : templateContext.template;
            if (!userTemplate && userPartials.length > 0) {
                const templateNames = templateContext.partials?.map((temp)=>basename2(temp));
                if (templateNames) {
                    const userPartialNames = userPartials.map((userPartial)=>basename2(userPartial));
                    const hasAtLeastOnePartial = userPartialNames.find((userPartial)=>{
                        return templateNames.includes(userPartial);
                    });
                    if (!hasAtLeastOnePartial) {
                        const errorMsg = `The format '${allDefaults.to}' only supports the following partials:\n${templateNames.join("\n")}\n\nPlease provide one or more of these partials.`;
                        throw new Error(errorMsg);
                    }
                } else {
                    throw new Error(`The format ${allDefaults.to} does not support providing any template partials.`);
                }
            }
            const partials = templateContext.partials || [];
            partials.push(...userPartials);
            const stagedTemplate = await stageTemplate(options, extras, {
                template,
                partials
            });
            delete options.format.metadata[kTemplatePartials];
            allDefaults[kTemplate] = stagedTemplate;
        } else {
            if (userPartials.length > 0 && !isIpynbOutput(options.format.pandoc)) {
                throw new Error(`The format ${allDefaults.to} does not support providing any template partials.`);
            } else if (userTemplate) {
                allDefaults[kTemplate] = userTemplate;
            }
        }
        options.format.metadata = cleanupPandocMetadata(options.format.metadata);
        printMetadata = cleanupPandocMetadata(printMetadata);
        if (extras[kIncludeInHeader]) {
            if (allDefaults[kIncludeInHeader] !== undefined && !__VIRTUAL_FILE53(allDefaults[kIncludeInHeader])) {
                allDefaults[kIncludeInHeader] = [
                    allDefaults[kIncludeInHeader], 
                ];
            }
            allDefaults = {
                ...allDefaults,
                [kIncludeInHeader]: [
                    ...extras[kIncludeInHeader] || [],
                    ...allDefaults[kIncludeInHeader] || [], 
                ]
            };
        }
        if (extras[kIncludeBeforeBody]) {
            if (allDefaults[kIncludeBeforeBody] !== undefined && !__VIRTUAL_FILE53(allDefaults[kIncludeBeforeBody])) {
                allDefaults[kIncludeBeforeBody] = [
                    allDefaults[kIncludeBeforeBody], 
                ];
            }
            allDefaults = {
                ...allDefaults,
                [kIncludeBeforeBody]: [
                    ...extras[kIncludeBeforeBody] || [],
                    ...allDefaults[kIncludeBeforeBody] || [], 
                ]
            };
        }
        if (extras[kIncludeAfterBody]) {
            if (allDefaults[kIncludeAfterBody] !== undefined && !__VIRTUAL_FILE53(allDefaults[kIncludeAfterBody])) {
                allDefaults[kIncludeAfterBody] = [
                    allDefaults[kIncludeAfterBody], 
                ];
            }
            allDefaults = {
                ...allDefaults,
                [kIncludeAfterBody]: [
                    ...allDefaults[kIncludeAfterBody] || [],
                    ...extras[kIncludeAfterBody] || [], 
                ]
            };
        }
        if (extras.html?.[kBodyEnvelope] && projectExtras.html?.[kBodyEnvelope]) {
            extras.html[kBodyEnvelope] = projectExtras.html[kBodyEnvelope];
        }
        resolveBodyEnvelope(allDefaults, extras, options.temp);
        allDefaults.filters = [
            ...extras.filters?.pre || [],
            ...allDefaults.filters || [],
            ...extras.filters?.post || [], 
        ];
        allDefaults.filters = allDefaults.filters.map((filter)=>{
            if (typeof filter === "string") {
                return pandocMetadataPath(filter);
            } else {
                return {
                    type: filter.type,
                    path: pandocMetadataPath(filter.path)
                };
            }
        });
        const filterParams = extras[kFilterParams];
        if (filterParams) {
            Object.keys(filterParams).forEach((key)=>{
                formatFilterParams[key] = filterParams[key];
            });
        }
    }
    if (isMarkdownOutput(options.format.pandoc) && requiresShortcodeUnescapePostprocessor(options.markdown)) {
        postprocessors.push(shortcodeUnescapePostprocessor);
    }
    const title = allDefaults?.[kVariables]?.[kTitle] || options.format.metadata[kTitle];
    const pageTitle = allDefaults?.[kVariables]?.[kPageTitle] || options.format.metadata[kPageTitle];
    const titlePrefix = allDefaults?.[kTitlePrefix];
    if (!title && !pageTitle && isHtmlFileOutput(options.format.pandoc)) {
        const [_dir, stem] = dirAndStem(options.source);
        args.push("--metadata", `pagetitle:${pandocAutoIdentifier(stem, false)}`);
    }
    if (pageTitle !== undefined && pageTitle === titlePrefix || pageTitle === undefined && title === titlePrefix) {
        delete allDefaults[kTitlePrefix];
    }
    if (options.keepYaml && allDefaults.to) {
        allDefaults.to = allDefaults.to.replaceAll(`+${kYamlMetadataBlock}`, "");
    }
    if (Deno.build.os === "windows") {
        await cacheCodePage();
    }
    const filterResultsFile = options.temp.createFile();
    const timingResultsFile = options.temp.createFile();
    let pandocArgs = args;
    const paramsJson = await filterParamsJson(pandocArgs, options, allDefaults, formatFilterParams, filterResultsFile, dependenciesFile, timingResultsFile);
    if (!isLatexOutput(options.format.pandoc) && !isMarkdownOutput(options.format.pandoc) && crossrefFilterActive(options)) {
        delete allDefaults[kNumberSections];
        delete allDefaults[kNumberOffset];
        const removeArgs = new Map();
        removeArgs.set("--number-sections", false);
        removeArgs.set("--number-offset", true);
        pandocArgs = removePandocArgs(pandocArgs, removeArgs);
    }
    const dataDirArgs = new Map();
    dataDirArgs.set("--data-dir", true);
    pandocArgs = removePandocArgs(pandocArgs, dataDirArgs);
    pandocArgs.push("--data-dir", resourcePath("pandoc/datadir"));
    allDefaults[kSyntaxDefinitions] = allDefaults[kSyntaxDefinitions] || [];
    const syntaxDefinitions = expandGlobSync(join3(resourcePath(join3("pandoc", "syntax-definitions")), "*.xml"));
    for (const syntax of syntaxDefinitions){
        allDefaults[kSyntaxDefinitions]?.push(syntax.path);
    }
    if (allDefaults[kHtmlMathMethod] === "webtex") {
        allDefaults[kHtmlMathMethod] = {
            method: "webtex",
            url: "https://latex.codecogs.com/svg.latex?"
        };
    }
    if (!allDefaults[kTemplate] && !havePandocArg(args, "--template") && !options.keepYaml && allDefaults.to) {
        const formatDesc = parseFormatString(allDefaults.to);
        const lookupTo = formatDesc.baseFormat;
        if ([
            "gfm",
            "commonmark",
            "commonmark_x",
            "markdown_strict",
            "markdown_phpextra",
            "markdown_github",
            "markua", 
        ].includes(lookupTo)) {
            allDefaults[kTemplate] = resourcePath(join3("pandoc", "templates", "default.markdown"));
        }
    }
    if (isHtmlFileOutput(options.format.pandoc)) {
        pandocArgs = pandocArgs.filter((arg)=>arg !== "--self-contained" && arg !== "--embed-resources");
        delete allDefaults[kSelfContained];
        delete allDefaults[kEmbedResources];
    }
    if (allDefaults) {
        const defaultsFile = await writeDefaultsFile(allDefaults, options.temp);
        cmd.push("--defaults", defaultsFile);
    }
    const paritioned = partitionYamlFrontMatter(options.markdown);
    const engineMetadata = paritioned?.yaml ? readYamlFromMarkdown(paritioned.yaml) : {};
    const markdown = paritioned?.markdown || options.markdown;
    const pandocMetadata = __VIRTUAL_FILE107(options.format.metadata || {});
    for (const key of Object.keys(engineMetadata)){
        const isChapterTitle = key === kTitle && projectIsBook(options.project);
        if (!isQuartoMetadata(key) && !isChapterTitle && !isIncludeMetadata(key)) {
            const formats = engineMetadata[kMetadataFormat];
            if (__VIRTUAL_FILE18(formats) && metadataGetDeep(formats, key).length > 0) {
                continue;
            }
            pandocMetadata[key] = engineMetadata[key];
        }
    }
    const dateFields = [
        kDate,
        kDateModified
    ];
    dateFields.forEach((dateField)=>{
        const date = pandocMetadata[dateField];
        const format = pandocMetadata[kDateFormat];
        pandocMetadata[dateField] = resolveAndFormatDate(options.source, date, format);
    });
    const authorsRaw = pandocMetadata[kAuthors] || pandocMetadata[kAuthor];
    if (authorsRaw) {
        const authors = parseAuthor(pandocMetadata[kAuthor], true);
        if (authors) {
            pandocMetadata[kAuthor] = authors.map((author)=>author.name);
            pandocMetadata[kAuthors] = Array.isArray(authorsRaw) ? authorsRaw : [
                authorsRaw
            ];
        }
    }
    const instituteRaw = pandocMetadata[kInstitute];
    if (instituteRaw) {
        pandocMetadata[kInstitutes] = Array.isArray(instituteRaw) ? instituteRaw : [
            instituteRaw
        ];
    }
    if (isLatexOutput(options.format.pandoc) && !isBeamerOutput(options.format.pandoc)) {
        const docClass = pandocMetadata[kDocumentClass];
        const isPrintDocumentClass = docClass && [
            "book",
            "scrbook"
        ].includes(docClass);
        if (!isPrintDocumentClass) {
            if (pandocMetadata[kColorLinks] === undefined) {
                pandocMetadata[kColorLinks] = true;
            }
            if (pandocMetadata[kLinkColor] === undefined) {
                pandocMetadata[kLinkColor] = "blue";
            }
        }
    }
    const markdownWithRenderAfter = isHtmlOutput(options.format.pandoc) && htmlRenderAfterBody.length > 0 ? markdown + "\n\n\n" + htmlRenderAfterBody.join("\n") + "\n\n" : markdown;
    const input = markdownWithRenderAfter + keepSourceBlock(options.format, options.source);
    const inputTemp = options.temp.createFile({
        prefix: "quarto-input",
        suffix: ".md"
    });
    Deno.writeTextFileSync(inputTemp, input);
    cmd.push(inputTemp);
    const metadataTemp = options.temp.createFile({
        prefix: "quarto-metadata",
        suffix: ".yml"
    });
    const pandocPassedMetadata = __VIRTUAL_FILE107(pandocMetadata);
    delete pandocPassedMetadata.format;
    delete pandocPassedMetadata.project;
    Deno.writeTextFileSync(metadataTemp, stringify(pandocPassedMetadata, {
        indent: 2,
        lineWidth: -1,
        sortKeys: false,
        skipInvalid: true
    }));
    cmd.push("--metadata-file", metadataTemp);
    cmd.push(...pandocArgs);
    if (!options.quiet && !options.flags?.quiet) {
        runPandocMessage(printArgs, printAllDefaults, sysFilters, printMetadata);
    }
    const luaEpoch = await getLuaTiming();
    const result1 = await execProcess({
        cmd,
        cwd,
        env: {
            "QUARTO_FILTER_PARAMS": encode(paramsJson)
        }
    });
    const resources = resourcesFromMetadata(options.format.metadata[kResources]);
    let inputTraits = {};
    if (existsSync(filterResultsFile)) {
        const filterResultsJSON = Deno.readTextFileSync(filterResultsFile);
        if (filterResultsJSON.trim().length > 0) {
            const filterResults = JSON.parse(filterResultsJSON);
            inputTraits = filterResults.inputTraits;
            const resourceFiles = filterResults.resourceFiles || [];
            resources.push(...resourceFiles);
        }
    }
    if (existsSync(timingResultsFile)) {
        const timingResultsJSON = Deno.readTextFileSync(timingResultsFile);
        if (timingResultsJSON.length > 0 && Deno.env.get("QUARTO_PROFILER_OUTPUT")) {
            const luaNow = await getLuaTiming();
            const entries = JSON.parse(timingResultsJSON);
            insertExplicitTimingEntries(luaEpoch, luaNow, entries, "pandoc");
        }
    }
    if (result1.success) {
        return {
            inputMetadata: pandocMetadata,
            inputTraits,
            resources,
            postprocessors,
            htmlPostprocessors: isHtmlOutput(options.format.pandoc) ? htmlPostprocessors : [],
            htmlFinalizers: isHtmlDocOutput(options.format.pandoc) ? htmlFinalizers : []
        };
    } else {
        if (Deno.build.os === "windows") {
            clearCodePageCache();
        }
        return null;
    }
}
function cleanupPandocMetadata(metadata) {
    const cleaned = __VIRTUAL_FILE107(metadata);
    const classoption = cleaned[kClassOption];
    if (Array.isArray(classoption)) {
        cleaned[kClassOption] = uniqBy1(classoption.reverse(), (option)=>{
            return option.replace(/=.+$/, "");
        }).reverse();
    }
    return cleaned;
}
async function resolveExtras(projectExtras, formatExtras, format, inputDir, libDir, temp, dependenciesFile, project) {
    let extras = mergeConfigs(projectExtras, formatExtras);
    if (projectExtras.metadata?.[kDocumentClass]) {
        extras.metadata = extras.metadata || {};
        extras.metadata[kDocumentClass] = projectExtras.metadata?.[kDocumentClass];
    }
    writeFormatResources(inputDir, dependenciesFile, format.render[kFormatResources]);
    if (isHtmlOutput(format.pandoc)) {
        extras = await resolveSassBundles(inputDir, extras, format.pandoc, temp, formatExtras.html?.[kSassBundles], projectExtras.html?.[kSassBundles], project);
        writeDependencies(dependenciesFile, extras);
        const htmlDependenciesPostProcesor = (doc, _inputMedata)=>{
            return withTiming("pandocDependenciesPostProcessor", async ()=>await readAndInjectDependencies(dependenciesFile, inputDir, libDir, doc, project));
        };
        extras.html = extras.html || {};
        extras.html[kHtmlPostprocessors] = extras.html?.[kHtmlPostprocessors] || [];
        if (isHtmlFileOutput(format.pandoc)) {
            extras.html[kHtmlPostprocessors].unshift(htmlDependenciesPostProcesor);
        }
        delete extras.html?.[kDependencies];
    } else {
        delete extras.html;
    }
    const resourceDependenciesPostProcessor = async (_output)=>{
        await processFormatResources(inputDir, dependenciesFile);
    };
    extras.postprocessors = extras.postprocessors || [];
    extras.postprocessors.push(resourceDependenciesPostProcessor);
    extras = resolveTextHighlightStyle(inputDir, extras, format.pandoc);
    return extras;
}
function resolveBodyEnvelope(pandoc, extras, temp) {
    const envelope = extras.html?.[kBodyEnvelope];
    if (envelope) {
        const writeBodyFile = (type, prepend, content)=>{
            if (content) {
                const file = temp.createFile({
                    suffix: ".html"
                });
                Deno.writeTextFileSync(file, content);
                if (!prepend) {
                    pandoc[type] = (pandoc[type] || []).concat(file);
                } else {
                    pandoc[type] = [
                        file
                    ].concat(pandoc[type] || []);
                }
            }
        };
        writeBodyFile(kIncludeInHeader, true, envelope.header);
        writeBodyFile(kIncludeBeforeBody, true, envelope.before);
        writeBodyFile(kIncludeAfterBody, true, envelope.afterPreamble);
        writeBodyFile(kIncludeAfterBody, false, envelope.afterPostamble);
    }
}
function runPandocMessage(args, pandoc, sysFilters, metadata, debug) {
    info(`pandoc ${args.join(" ")}`, {
        bold: true
    });
    if (pandoc) {
        info(pandocDefaultsMessage(pandoc, sysFilters, debug), {
            indent: 2
        });
    }
    const keys = Object.keys(metadata);
    if (keys.length > 0) {
        const printMetadata = __VIRTUAL_FILE107(metadata);
        delete printMetadata.format;
        removeFilterParams(printMetadata);
        if (Object.keys(printMetadata).length > 0) {
            info("metadata", {
                bold: true
            });
            info(stringify(printMetadata, {
                indent: 2,
                lineWidth: -1,
                sortKeys: false,
                skipInvalid: true
            }), {
                indent: 2
            });
        }
    }
}
function resolveTextHighlightStyle(inputDir, extras, pandoc) {
    extras = cloneDeep1(extras);
    const highlightTheme = pandoc[kHighlightStyle] || kDefaultHighlightStyle;
    const textHighlightingMode = extras.html?.[kTextHighlightingMode];
    if (highlightTheme === "none") {
        pandoc[kHighlightStyle] = null;
        if (extras.pandoc) {
            delete extras.pandoc[kHighlightStyle];
        }
        return extras;
    }
    switch(textHighlightingMode){
        case "light":
        case "dark":
            extras.pandoc = extras.pandoc || {};
            extras.pandoc[kHighlightStyle] = textHighlightThemePath1(inputDir, highlightTheme, textHighlightingMode) || highlightTheme;
            break;
        case "none":
            delete pandoc[kHighlightStyle];
            if (extras.pandoc) {
                delete extras.pandoc[kHighlightStyle];
            }
            break;
        case undefined:
        default:
            extras.pandoc = extras.pandoc || {};
            extras.pandoc[kHighlightStyle] = textHighlightThemePath1(inputDir, highlightTheme, "light") || highlightTheme;
            break;
    }
    return extras;
}
function renderCleanup(input, output, format, supporting, keepMd) {
    const figureFormat = isLatexOutput(format.pandoc) ? extname2(output).slice(1) : format.pandoc.to;
    if (!isAbsolute2(output)) {
        output = join3(dirname2(input), output);
    }
    if (keepMd && !format.execute[kKeepMd] && keepMd !== output) {
        removeIfExists(keepMd);
    }
    if (!format.execute[kKeepMd] && !format.render[kKeepTex] && supporting) {
        if (isHtmlFileOutput(format.pandoc)) {
            const libDir = join3(dirname2(input), filesDirLibDir(input));
            if (existsSync(libDir)) {
                supporting.push(Deno.realPathSync(libDir));
            }
        } else {
            let filesDir = join3(dirname2(input), inputFilesDir(input));
            if (existsSync(filesDir)) {
                filesDir = Deno.realPathSync(filesDir);
            }
            supporting = supporting.map((supportingDir)=>{
                if (filesDir === supportingDir) {
                    return join3(filesDir, figuresDir(figureFormat));
                } else {
                    return supportingDir;
                }
            });
        }
        const mediabagDir = join3(dirname2(input), filesDirMediabagDir(input));
        if (existsSync(mediabagDir)) {
            supporting.push(mediabagDir);
        }
        __VIRTUAL_FILE181(supporting).forEach((path)=>{
            if (existsSync(path)) {
                Deno.removeSync(path, {
                    recursive: true
                });
            }
        });
    }
    const filesDir1 = join3(dirname2(input), inputFilesDir(input));
    const figsDir = join3(filesDir1, figuresDir(figureFormat));
    const libDir1 = join3(dirname2(input), filesDirLibDir(input));
    const mediabagDir1 = join3(dirname2(input), filesDirMediabagDir(input));
    removeIfEmptyDir(figsDir);
    removeIfEmptyDir(libDir1);
    removeIfEmptyDir(mediabagDir1);
    removeIfEmptyDir(filesDir1);
}
function isSelfContained(flags, format) {
    return !!(flags[kSelfContained] || format.pandoc[kSelfContained] || flags[kEmbedResources] || format.pandoc[kEmbedResources]);
}
const kStandaloneExtensionNames = [
    "pdf",
    "epub",
    "fb2",
    "docx",
    "rtf",
    "pptx",
    "odt",
    "ipynb", 
];
const kStandaloneExtensions = kStandaloneExtensionNames.map((name)=>`.${name}`);
function isSelfContainedOutput(flags, format, finalOutput) {
    return isSelfContained(flags, format) || kStandaloneExtensions.includes(extname2(finalOutput));
}
function renderProgress(message) {
    logProgress(message);
}
async function renderPandoc(file, quiet) {
    const { context , recipe , executeResult , resourceFiles  } = file;
    const format = recipe.format;
    if (executeResult.includes) {
        format.pandoc = mergePandocIncludes(format.pandoc || {}, executeResult.includes);
    }
    if (executeResult.pandoc) {
        format.pandoc = mergeConfigs(format.pandoc || {}, executeResult.pandoc);
    }
    if (executeResult.engineDependencies) {
        for (const engineName of Object.keys(executeResult.engineDependencies)){
            const engine = executionEngine(engineName);
            const dependenciesResult = await engine.dependencies({
                target: context.target,
                format,
                output: recipe.output,
                resourceDir: resourcePath(),
                tempDir: context.options.services.temp.createDir(),
                projectDir: context.project?.dir,
                libDir: context.libDir,
                dependencies: executeResult.engineDependencies[engineName],
                quiet: context.options.flags?.quiet
            });
            format.pandoc = mergePandocIncludes(format.pandoc, dependenciesResult.includes);
        }
    }
    const mediabagDir = filesDirMediabagDir(context.target.source);
    ensureDirSync(join3(dirname2(context.target.source), mediabagDir));
    const pandocOptions = {
        markdown: executeResult.markdown,
        source: context.target.source,
        output: recipe.output,
        keepYaml: recipe.keepYaml,
        mediabagDir,
        libDir: context.libDir,
        format,
        project: context.project,
        args: recipe.args,
        temp: context.options.services.temp,
        metadata: executeResult.metadata,
        extension: context.options.services.extension,
        quiet,
        flags: context.options.flags
    };
    if (context.project) {
        pandocOptions.offset = projectOffset(context.project, context.target.input);
    }
    const pandocResult = await runPandoc(pandocOptions, executeResult.filters);
    if (!pandocResult) {
        return Promise.reject();
    }
    push("render-postprocessor");
    if (executeResult.postProcess) {
        await withTimingAsync("engine-postprocess", async ()=>{
            return await context.engine.postprocess({
                engine: context.engine,
                target: context.target,
                format,
                output: recipe.output,
                tempDir: context.options.services.temp.createDir(),
                projectDir: context.project?.dir,
                preserve: executeResult.preserve,
                quiet: context.options.flags?.quiet
            });
        });
    }
    const canHtmlPostProcess = isHtmlFileOutput(format.pandoc);
    if (!canHtmlPostProcess && pandocResult.htmlPostprocessors.length > 0) {
        const postProcessorNames = pandocResult.htmlPostprocessors.map((p)=>p.name).join(", ");
        const msg = `Attempt to HTML post process non HTML output using: ${postProcessorNames}`;
        throw new Error(msg);
    }
    const htmlPostProcessors = canHtmlPostProcess ? pandocResult.htmlPostprocessors : [];
    const htmlFinalizers = canHtmlPostProcess ? pandocResult.htmlFinalizers || [] : [];
    const htmlPostProcessResult = await runHtmlPostprocessors(pandocResult.inputMetadata, pandocResult.inputTraits, pandocOptions, htmlPostProcessors, htmlFinalizers);
    const outputFile = isAbsolute2(pandocOptions.output) ? pandocOptions.output : join3(dirname2(pandocOptions.source), pandocOptions.output);
    if (pandocResult.postprocessors) {
        for (const postprocessor of pandocResult.postprocessors){
            await postprocessor(outputFile);
        }
    }
    let finalOutput;
    let selfContained;
    await withTimingAsync("postprocess-selfcontained", async ()=>{
        const flags = context.options.flags || {};
        finalOutput = await recipe.complete(pandocOptions) || recipe.output;
        selfContained = isSelfContainedOutput(flags, format, finalOutput);
        if (selfContained && isHtmlFileOutput(format.pandoc)) {
            await pandocIngestSelfContainedContent(outputFile);
        }
    });
    let filesDir = inputFilesDir(context.target.source);
    filesDir = existsSync(join3(dirname2(context.target.source), filesDir)) ? filesDir : undefined;
    let supporting = filesDir ? executeResult.supporting : undefined;
    if (filesDir && isHtmlFileOutput(format.pandoc)) {
        const filesDirAbsolute = join3(dirname2(context.target.source), filesDir);
        if (existsSync(filesDirAbsolute) && (!supporting || !supporting.includes(filesDirAbsolute))) {
            const filesLibs = join3(dirname2(context.target.source), context.libDir);
            if (existsSync(filesLibs) && (!supporting || !supporting.includes(filesLibs))) {
                supporting = supporting || [];
                supporting.push(filesLibs);
            }
        }
    }
    if (htmlPostProcessResult.supporting && htmlPostProcessResult.supporting.length > 0) {
        supporting = supporting || [];
        supporting.push(...htmlPostProcessResult.supporting);
    }
    withTiming("render-cleanup", ()=>renderCleanup(context.target.input, finalOutput, format, selfContained ? supporting : undefined, executionEngineKeepMd(context.target.input)));
    const projectPath = (path)=>{
        if (context.project) {
            if (isAbsolute2(path)) {
                return relative2(Deno.realPathSync(context.project.dir), Deno.realPathSync(path));
            } else {
                return relative2(Deno.realPathSync(context.project.dir), Deno.realPathSync(join3(dirname2(context.target.source), path)));
            }
        } else {
            return path;
        }
    };
    pop();
    return {
        input: projectPath(context.target.source),
        markdown: executeResult.markdown,
        format,
        supporting: supporting ? supporting.filter(existsSync).map((file)=>context.project ? relative2(context.project.dir, file) : file) : undefined,
        file: projectPath(finalOutput),
        resourceFiles: {
            globs: pandocResult.resources,
            files: resourceFiles.concat(htmlPostProcessResult.resources)
        },
        selfContained: selfContained
    };
}
function renderResultFinalOutput(renderResults, relativeToInputDir) {
    let result1 = renderResults.files.find((file)=>{
        return !file.supplemental;
    });
    if (!result1) {
        return undefined;
    }
    for (const fileResult of renderResults.files){
        if (fileResult.file === "index.html" && !fileResult.supplemental) {
            result1 = fileResult;
            break;
        }
    }
    let finalInput = result1.input;
    let finalOutput = result1.file;
    if (renderResults.baseDir) {
        finalInput = join3(renderResults.baseDir, finalInput);
        if (renderResults.outputDir) {
            finalOutput = join3(renderResults.baseDir, renderResults.outputDir, finalOutput);
        } else {
            finalOutput = join3(renderResults.baseDir, finalOutput);
        }
    } else {
        finalOutput = join3(dirname2(finalInput), finalOutput);
    }
    if (!existsSync(finalOutput)) {
        return undefined;
    }
    if (relativeToInputDir) {
        const inputRealPath = Deno.realPathSync(relativeToInputDir);
        const outputRealPath = Deno.realPathSync(finalOutput);
        return relative2(inputRealPath, outputRealPath);
    } else {
        return finalOutput;
    }
}
function renderResultUrlPath(renderResult) {
    if (renderResult.baseDir && renderResult.outputDir) {
        const finalOutput = renderResultFinalOutput(renderResult);
        if (finalOutput) {
            const targetPath = pathWithForwardSlashes(relative2(join3(renderResult.baseDir, renderResult.outputDir), finalOutput));
            return targetPath;
        }
    }
    return undefined;
}
function mergePandocIncludes(format, pandocIncludes) {
    return mergeConfigs(format, pandocIncludes);
}
async function runHtmlPostprocessors(inputMetadata, inputTraits, options, htmlPostprocessors, htmlFinalizers) {
    const postProcessResult = {
        resources: [],
        supporting: []
    };
    if (htmlPostprocessors.length > 0 || htmlFinalizers.length > 0) {
        await withTimingAsync("htmlPostprocessors", async ()=>{
            const outputFile = isAbsolute2(options.output) ? options.output : join3(dirname2(options.source), options.output);
            const htmlInput = Deno.readTextFileSync(outputFile);
            const doctypeMatch = htmlInput.match(/^<!DOCTYPE.*?>/);
            const doc = await parseHtml(htmlInput);
            for(let i1 = 0; i1 < htmlPostprocessors.length; i1++){
                const postprocessor = htmlPostprocessors[i1];
                const result1 = await postprocessor(doc, inputMetadata, inputTraits);
                postProcessResult.resources.push(...result1.resources);
                postProcessResult.supporting.push(...result1.supporting);
            }
            for(let i11 = 0; i11 < htmlFinalizers.length; i11++){
                const finalizer = htmlFinalizers[i11];
                await finalizer(doc);
            }
            const htmlOutput = (doctypeMatch ? doctypeMatch[0] + "\n" : "") + doc.documentElement?.outerHTML;
            Deno.writeTextFileSync(outputFile, htmlOutput);
        });
    }
    return postProcessResult;
}
const pandocIngestSelfContainedContent = async (file)=>{
    const filename = basename2(file);
    const workingDir = dirname2(file);
    const template = formatResourcePath("html", "pandoc-selfcontained/selfcontained.html");
    const contents = Deno.readTextFileSync(file);
    const input = [];
    input.push("````````{=html}");
    input.push(contents);
    input.push("````````");
    const cmd = [
        pandocBinaryPath()
    ];
    cmd.push("--to", "html");
    cmd.push("--from", "markdown");
    cmd.push("--template", template);
    cmd.push("--output", filename);
    cmd.push("--metadata", "title=placeholder");
    cmd.push("--embed-resources");
    const result1 = await execProcess({
        cmd,
        stdout: "piped",
        cwd: workingDir
    }, input.join("\n"));
    if (result1.success) {
        return result1.stdout;
    } else {
        throw new Error();
    }
};
function inInches(size) {
    if (size.endsWith("in")) {
        return Number(size.slice(0, -2));
    }
    if (size.endsWith("pt") || size.endsWith("px")) {
        return Number(size.slice(0, -2)) / 96;
    }
    return Number(size);
}
async function resolveSize(svg, options) {
    const dom = (await getDomParser()).parseFromString(svg, "text/html");
    const svgEl = dom?.querySelector("svg");
    if (!svgEl) {
        throw new Error("Internal Error: need an svg element");
    }
    const width = svgEl.getAttribute("width");
    const height = svgEl.getAttribute("height");
    if (!width || !height) {
        throw new Error("Internal error: couldn't find figure dimensions");
    }
    const getViewBox = ()=>{
        const vb = svgEl.attributes.getNamedItem("viewBox").value;
        if (!vb) return undefined;
        const lst = vb.trim().split(" ").map(Number);
        if (lst.length !== 4) return undefined;
        if (lst.some(isNaN)) return undefined;
        return lst;
    };
    let svgWidthInInches, svgHeightInInches;
    if (width.slice(0, -2) === "pt" && height.slice(0, -2) === "pt" || width.slice(0, -2) === "px" && height.slice(0, -2) === "px" || !isNaN(Number(width)) && !isNaN(Number(height))) {
        svgWidthInInches = Number(width.slice(0, -2)) / 96;
        svgHeightInInches = Number(height.slice(0, -2)) / 96;
    }
    const viewBox = getViewBox();
    if (viewBox !== undefined) {
        const [_mx, _my, vbWidth, vbHeight] = viewBox;
        svgWidthInInches = vbWidth / 96;
        svgHeightInInches = vbHeight / 96;
    } else {
        throw new Error("Internal Error: Couldn't resolve width and height of SVG");
    }
    const svgWidthOverHeight = svgWidthInInches / svgHeightInInches;
    let widthInInches, heightInInches;
    if (options?.[kFigWidth] && options?.[kFigHeight]) {
        widthInInches = inInches(String(options?.[kFigWidth]));
        heightInInches = inInches(String(options?.[kFigHeight]));
    } else if (options?.[kFigWidth]) {
        widthInInches = inInches(String(options?.[kFigWidth]));
        heightInInches = widthInInches / svgWidthOverHeight;
    } else if (options?.[kFigHeight]) {
        heightInInches = inInches(String(options?.[kFigHeight]));
        widthInInches = heightInInches * svgWidthOverHeight;
    } else {
        heightInInches = svgHeightInInches;
        widthInInches = svgWidthInInches;
    }
    return {
        widthInInches,
        heightInInches,
        widthInPoints: Math.round(widthInInches * 96),
        heightInPoints: Math.round(heightInInches * 96)
    };
}
const fixupAlignment = (svg, align)=>{
    let style = svg.getAttribute("style") ?? "";
    switch(align){
        case "left":
            style = `${style} display: block; margin: auto auto auto 0`;
            break;
        case "right":
            style = `${style} display: block; margin: auto 0 auto auto`;
            break;
        case "center":
            style = `${style} display: block; margin: auto auto auto auto`;
            break;
    }
    svg.setAttribute("style", style);
};
async function setSvgSize(svgSrc, options, extra) {
    const mappedSvgSrc = asMappedString(svgSrc);
    const { widthInPoints , heightInPoints ,  } = await resolveSize(mappedSvgSrc.value, options);
    const dom = (await getDomParser()).parseFromString(mappedSvgSrc.value, "text/html");
    const svg = dom.querySelector("svg");
    svg.setAttribute("width", widthInPoints);
    svg.setAttribute("height", heightInPoints);
    if (extra) {
        extra(svg);
    }
    return mappedDiff(mappedSvgSrc, svg.outerHTML);
}
async function makeResponsive(svgSrc, extras) {
    const mappedSvgSrc = asMappedString(svgSrc);
    const dom = (await getDomParser()).parseFromString(mappedSvgSrc.value, "text/html");
    if (dom === null) {
        throw new Error("Couldn't parse element");
    }
    const svg = dom.querySelector("svg");
    if (svg === null) {
        throw new Error("Couldn't find SVG element");
    }
    const width = svg.getAttribute("width");
    if (width === null) {
        throw new Error("Couldn't find SVG width");
    }
    const numWidth = Number(width.slice(0, -2));
    let changed = false;
    if (numWidth > 650) {
        changed = true;
        svg.setAttribute("width", "100%");
        svg.removeAttribute("height");
    }
    if (extras) {
        changed = true;
        extras(svg);
    }
    if (changed) {
        return mappedDiff(mappedSvgSrc, svg.outerHTML);
    } else {
        return mappedSvgSrc;
    }
}
const mermaidHandler = {
    ...baseHandler,
    schema () {
        return Promise.resolve(convertFromYaml(readYamlFromString(`
object:
  properties:
    mermaid-format:
      enum: [png, svg, js]
`)));
    },
    type: "cell",
    stage: "post-engine",
    languageName: "mermaid",
    languageClass: (options)=>{
        if (isMarkdownOutput(options.format.pandoc, [
            "gfm"
        ])) {
            return "mermaid-source";
        } else {
            return "default";
        }
    },
    defaultOptions: {
        echo: false,
        eval: true,
        include: true
    },
    comment: "%%",
    async cell (handlerContext, cell, options) {
        const cellContent = handlerContext.cellContent(cell);
        const content = `<html>
<head>
<script src="./mermaid.min.js"></script>
</head>
<body>
<pre class="mermaid">\n${__VIRTUAL_FILE172(cellContent.value)}\n</pre> 
<script>
mermaid.initialize();
</script>
</html>`;
        const selector = "pre.mermaid svg";
        const resources = [
            [
                "mermaid.min.js",
                Deno.readTextFileSync(formatResourcePath("html", join3("mermaid", "mermaid.min.js"))), 
            ]
        ];
        const setupMermaidSvgJsRuntime = ()=>{
            if (handlerContext.getState().hasSetupMermaidSvgJsRuntime) {
                return;
            }
            handlerContext.getState().hasSetupMermaidSvgJsRuntime = true;
            const dep = {
                name: "quarto-diagram",
                scripts: [
                    {
                        name: "mermaid-postprocess-shim.js",
                        path: formatResourcePath("html", join3("mermaid", "mermaid-postprocess-shim.js")),
                        afterBody: true
                    }, 
                ]
            };
            handlerContext.addHtmlDependency(dep);
        };
        const setupMermaidJsRuntime = ()=>{
            if (handlerContext.getState().hasSetupMermaidJsRuntime) {
                return;
            }
            handlerContext.getState().hasSetupMermaidJsRuntime = true;
            const jsName = handlerContext.options.context.format.metadata?.["mermaid-debug"] ? "mermaid.js" : "mermaid.min.js";
            const dep = {
                name: "quarto-diagram",
                scripts: [
                    {
                        name: jsName,
                        path: formatResourcePath("html", join3("mermaid", jsName))
                    },
                    {
                        name: "mermaid-init.js",
                        path: formatResourcePath("html", join3("mermaid", "mermaid-init.js")),
                        afterBody: true
                    }, 
                ],
                stylesheets: [
                    {
                        name: "mermaid.css",
                        path: formatResourcePath("html", join3("mermaid", "mermaid.css"))
                    }, 
                ]
            };
            handlerContext.addHtmlDependency(dep);
        };
        const makeFigLink = (sourceName, width, height, includeCaption)=>{
            const posSpecifier = isLatexOutput(handlerContext.options.format.pandoc) ? " fig-pos='H'" : "";
            const idSpecifier = cell.options?.label && includeCaption ? ` #${cell.options?.label}` : "";
            const widthSpecifier = width ? `width="${Math.round(width * 100) / 100}in"` : "";
            const heightSpecifier = height ? ` height="${Math.round(height * 100) / 100}in"` : "";
            const captionSpecifier = includeCaption ? cell.options?.["fig-cap"] || "" : "";
            return `\n![${captionSpecifier}](${sourceName}){${widthSpecifier}${heightSpecifier}${posSpecifier}${idSpecifier}}\n`;
        };
        const responsive = handlerContext.options.context.format.metadata?.[kFigResponsive];
        const makeSvg = async ()=>{
            setupMermaidSvgJsRuntime();
            let svg = asMappedString((await handlerContext.extractHtml({
                html: content,
                selector,
                resources
            }))[0]);
            const fixupRevealAlignment = (svg)=>{
                if (isRevealjsOutput(handlerContext.options.context.format.pandoc)) {
                    const align = (options?.[kFigAlign]) ?? "center";
                    fixupAlignment(svg, align);
                }
            };
            let newId = undefined;
            const idsToPatch = [];
            const fixupMermaidSvg = (svg)=>{
                const { baseName: newMermaidId  } = handlerContext.uniqueFigureName("mermaid-figure-", "");
                newId = newMermaidId;
                fixupRevealAlignment(svg);
                const oldId = svg.getAttribute("id");
                svg.setAttribute("id", newMermaidId);
                const style = svg.querySelector("style");
                style.innerHTML = style.innerHTML.replaceAll(oldId, newMermaidId);
                for (const defNode of svg.querySelectorAll("defs")){
                    const defEl = defNode;
                    const m = defEl.innerHTML.match(/id="([^\"]+)"/);
                    if (m) {
                        const id = m[1];
                        idsToPatch.push(id);
                    }
                }
            };
            if (responsive && options[kFigWidth] === undefined && options[kFigHeight] === undefined) {
                svg = await makeResponsive(svg, fixupMermaidSvg);
            } else {
                svg = await setSvgSize(svg, options, (svg)=>{
                    svg.removeAttribute("style");
                    fixupMermaidSvg(svg);
                });
            }
            if (idsToPatch.length) {
                let oldSvgSrc = svg.value;
                for (const idToPatch of idsToPatch){
                    const to = `${newId}-${idToPatch}`;
                    oldSvgSrc = oldSvgSrc.replaceAll(`"${idToPatch}"`, `"${to}"`);
                    oldSvgSrc = oldSvgSrc.replaceAll(`#${idToPatch}`, `#${to}`);
                }
                svg = mappedDiff(svg, oldSvgSrc);
            }
            if (isMarkdownOutput(handlerContext.options.format.pandoc, [
                "gfm"
            ])) {
                const { sourceName , fullName  } = handlerContext.uniqueFigureName("mermaid-figure-", ".svg");
                Deno.writeTextFileSync(fullName, svg.value);
                const { widthInInches , heightInInches ,  } = await resolveSize(svg.value, cell.options ?? {});
                return asMappedString(makeFigLink(sourceName, widthInInches, heightInInches, true));
            } else {
                return this.build(handlerContext, cell, svg, options, undefined, new Set([
                    "fig-width",
                    "fig-height",
                    "mermaid-format"
                ]));
            }
        };
        const makePng = async ()=>{
            const { filenames: [sourceName] , elements: [svgText] ,  } = await handlerContext.createPngsFromHtml({
                prefix: "mermaid-figure-",
                selector,
                count: 1,
                deviceScaleFactor: Number(options.deviceScaleFactor) || 4,
                html: content,
                resources
            });
            const { widthInInches , heightInInches ,  } = await resolveSize(svgText, cell.options ?? {});
            if (isMarkdownOutput(handlerContext.options.format.pandoc, [
                "gfm"
            ])) {
                return asMappedString(makeFigLink(sourceName, widthInInches, heightInInches, true));
            } else {
                return this.build(handlerContext, cell, asMappedString(makeFigLink(sourceName, widthInInches, heightInInches)), options, undefined, new Set([
                    "fig-width",
                    "fig-height",
                    "mermaid-format"
                ]));
            }
        };
        const makeJs = async ()=>{
            setupMermaidJsRuntime();
            const { baseName: tooltipName  } = handlerContext.uniqueFigureName("mermaid-tooltip-", "");
            const preEl = pandocHtmlBlock("pre")({
                classes: [
                    "mermaid",
                    "mermaid-js"
                ],
                attrs: [
                    `tooltip-selector="#${tooltipName}"`
                ]
            });
            preEl.push(pandocRawStr(__VIRTUAL_FILE172(cell.source.value)));
            const attrs = {};
            if (isRevealjsOutput(handlerContext.options.context.format.pandoc)) {
                attrs.reveal = true;
            }
            return this.build(handlerContext, cell, mappedConcat([
                preEl.mappedString(),
                `\n<div id="${tooltipName}" class="mermaidTooltip"></div>`, 
            ]), options, attrs, new Set([
                "mermaid-format"
            ]));
        };
        const makeDefault = async ()=>{
            if (isJavascriptCompatible(handlerContext.options.format)) {
                return await makeJs();
            } else if (isMarkdownOutput(handlerContext.options.format.pandoc, [
                "gfm"
            ])) {
                return mappedConcat([
                    "\n``` mermaid\n",
                    __VIRTUAL_FILE172(cellContent.value),
                    "\n```\n", 
                ]);
            } else {
                return await makePng();
            }
        };
        const format = options[kMermaidFormat] || handlerContext.options.format.execute[kMermaidFormat];
        if (format === "svg") {
            return await makeSvg();
        } else if (format === "png") {
            return await makePng();
        } else if (format === "js") {
            if (!isJavascriptCompatible(handlerContext.options.format)) {
                const error = new LocalizedError("IncompatibleOutput", `\`mermaid-format: js\` not supported in format ${handlerContext.options.format.pandoc.to ?? ""}`, cell.sourceVerbatim, 0);
                warning(error.message);
                console.log("");
                return await makeDefault();
            } else {
                if (isRevealjsOutput(handlerContext.options.context.format.pandoc)) {
                    const error1 = new LocalizedError("NotRecommended", `\`mermaid-format: js\` not recommended in format ${handlerContext.options.format.pandoc.to ?? ""}`, cell.sourceVerbatim, 0);
                    warning(error1.message);
                    console.log("");
                }
                return await makeJs();
            }
        } else {
            return await makeDefault();
        }
    }
};
install1(mermaidHandler);
const includeHandler = {
    ...baseHandler,
    languageName: "include",
    type: "directive",
    stage: "pre-engine",
    directive (handlerContext, directive) {
        const source = handlerContext.options.context.target.source;
        const retrievedFiles = [
            source
        ];
        const textFragments = [];
        const retrieveInclude = (filename)=>{
            const path = handlerContext.resolvePath(filename);
            if (retrievedFiles.indexOf(path) !== -1) {
                throw new Error(`Include directive found circular include of file ${filename}.`);
            }
            let includeSrc;
            try {
                includeSrc = asMappedString(Deno.readTextFileSync(path), path);
            } catch (_e) {
                const errMsg = [
                    `Include directive failed.`
                ];
                errMsg.push(...retrievedFiles.map((s)=>`  in file ${s}, `));
                errMsg.push(`  could not find file ${path}.`);
                throw new Error(errMsg.join("\n"));
            }
            retrievedFiles.push(filename);
            let rangeStart = 0;
            for (const { substring , range  } of rangedLines(includeSrc.value)){
                const m = isBlockShortcode(substring);
                if (m && m.name.toLocaleLowerCase() === "include") {
                    textFragments.push(mappedString(includeSrc, [
                        {
                            start: rangeStart,
                            end: range.start
                        }
                    ]));
                    rangeStart = range.end;
                    const params = m.params;
                    if (params.length === 0) {
                        throw new Error("Include directive needs file parameter");
                    }
                    retrieveInclude(params[0]);
                }
            }
            if (rangeStart !== includeSrc.value.length) {
                textFragments.push(mappedString(includeSrc, [
                    {
                        start: rangeStart,
                        end: includeSrc.value.length
                    }
                ]));
            }
            textFragments.push(includeSrc.value.endsWith("\n") ? "\n" : "\n\n");
            retrievedFiles.pop();
        };
        const param = directive.shortcode.params[0];
        if (!param) {
            throw new Error("Include directive needs filename as a parameter");
        }
        retrieveInclude(param);
        return Promise.resolve(mappedConcat(textFragments));
    }
};
install1(includeHandler);
const dotHandler = {
    ...baseHandler,
    type: "cell",
    stage: "post-engine",
    languageName: "dot",
    defaultOptions: {
        echo: false,
        eval: true,
        include: true,
        "graph-layout": "dot"
    },
    comment: "//",
    async cell (handlerContext, cell, options) {
        const cellContent = handlerContext.cellContent(cell);
        const graphvizModule = await import(toFileUrl2(resourcePath(join3("js", "graphviz-wasm.js"))).href);
        let svg;
        const oldConsoleLog = console.log;
        const oldConsoleWarn = console.warn;
        console.log = ()=>{};
        console.warn = ()=>{};
        try {
            svg = await graphvizModule.graphviz().layout(cellContent.value, "svg", options["graph-layout"]);
            console.log = oldConsoleLog;
            console.warn = oldConsoleWarn;
        } catch (e) {
            console.log = oldConsoleLog;
            console.warn = oldConsoleWarn;
            const m = e.message.match(/(.*)syntax error in line (\d+)(.*)/);
            if (m) {
                const number = Number(m[2]) - 1;
                const locF = mappedIndexToLineCol(cellContent);
                const offsets = Array.from(lineOffsets(cellContent.value));
                const offset = offsets[number];
                const mapResult = cellContent.map(offset, true);
                const { line  } = locF(offset);
                e.message = e.message.replace(m[0], `${m[1]}syntax error in file ${mapResult.originalString.fileName}, line ${line + 1}${m[3]}`);
                throw e;
            } else {
                throw e;
            }
        }
        const fixupRevealAlignment = (svg)=>{
            if (isRevealjsOutput(handlerContext.options.context.format.pandoc)) {
                const align = (options?.[kFigAlign]) ?? "center";
                fixupAlignment(svg, align);
            }
        };
        if (isJavascriptCompatible(handlerContext.options.format)) {
            const responsive = options?.[kFigResponsive] ?? handlerContext.options.context.format.metadata?.[kFigResponsive];
            svg = (await parseHtml(svg)).querySelector("svg").outerHTML;
            if (responsive && options[kFigWidth] === undefined && options[kFigHeight] === undefined) {
                svg = await makeResponsive(svg, fixupRevealAlignment);
            } else {
                svg = await setSvgSize(svg, options, fixupRevealAlignment);
            }
            return this.build(handlerContext, cell, svg, options);
        } else {
            const { filenames: [sourceName] ,  } = await handlerContext.createPngsFromHtml({
                prefix: "dot-figure-",
                selector: "svg",
                count: 1,
                deviceScaleFactor: Number(options.deviceScaleFactor) || 4,
                html: `<!DOCTYPE html><html><body>${svg}</body></html>`
            });
            const { widthInInches , heightInInches ,  } = await resolveSize(svg, options);
            return this.build(handlerContext, cell, mappedConcat([
                `\n![](${sourceName}){width="${widthInInches}in" height="${heightInInches}in" fig-pos='H'}\n`, 
            ]), options);
        }
    }
};
install1(dotHandler);
async function validateDocumentFromSource(src, engine, errorFn) {
    const result1 = [];
    const reportSet = new Set();
    const nb = await breakQuartoMd(src);
    if (nb.cells.length < 1) {
        return [];
    }
    const firstCell = nb.cells[0];
    let firstContentCellIndex;
    if (firstCell.source.value.startsWith("---")) {
        firstContentCellIndex = 1;
        if (!firstCell.source.value.trimEnd().endsWith("---")) {
            throw new Error("Expected front matter to end with '---'");
        }
        const lineRanges = rangedLines(firstCell.source.value.trimEnd());
        const frontMatterText = mappedString(firstCell.source, [
            {
                start: lineRanges[1].range.start,
                end: lineRanges[lineRanges.length - 2].range.end
            }
        ]);
        const annotation = readAnnotatedYamlFromMappedString(frontMatterText);
        if (annotation.result === null || !__VIRTUAL_FILE18(annotation.result) || annotation.result["validate-yaml"] !== false) {
            const frontMatterSchema = await getFrontMatterSchema();
            await withValidator(frontMatterSchema, async (frontMatterValidator)=>{
                const fmValidation = await frontMatterValidator.validateParseWithErrors(frontMatterText, annotation, "Validation of YAML front matter failed.", errorFn, reportOnce((err)=>error(tidyverseFormatError(err), {
                        colorize: false
                    }), reportSet));
                if (fmValidation && fmValidation.errors.length) {
                    result1.push(...fmValidation.errors);
                }
            });
        }
    } else {
        firstContentCellIndex = 0;
    }
    for (const cell of nb.cells.slice(firstContentCellIndex)){
        if (cell.cell_type === "markdown" || cell.cell_type === "raw") {
            continue;
        }
        const lang = cell.cell_type.language;
        try {
            const fullCell = mappedString(cell.sourceVerbatim, [
                {
                    start: lang.length + 6,
                    end: cell.sourceVerbatim.value.length - 3
                }
            ]);
            await partitionCellOptionsMapped(lang, fullCell, true, engine);
        } catch (e) {
            if (e instanceof ValidationError2) {
                error("Validation of YAML cell metadata failed.");
                for (const err of e.validationErrors){
                    console.log(tidyverseFormatError(err.niceError));
                }
                result1.push(...e.validationErrors);
            } else {
                throw e;
            }
        }
    }
    return result1;
}
async function validateDocument(context) {
    if (context.target.markdown.value === "") {
        return [];
    }
    return validateDocumentFromSource(context.target.markdown, context.engine.name, error);
}
function annotateOjsLineNumbers(context) {
    const canPatch = !isJupyterNotebook(context.target.source);
    if (canPatch) {
        const source = lines(Deno.readTextFileSync(context.target.source));
        const ojsBlockLineNumbers = [];
        let lineNumber = 1;
        const chunkBegin = /^[\t ]*```+\s*\{(ojs( *[ ,].*)?)\}\s*$/;
        source.forEach((line)=>{
            lineNumber++;
            if (line.match(chunkBegin)) {
                ojsBlockLineNumbers.push(lineNumber);
            }
        });
        return {
            ojsBlockLineNumbers
        };
    } else {
        return {
            ojsBlockLineNumbers: []
        };
    }
}
function ojsParseError(acornError, ojsSource) {
    const acornMsg = String(acornError).split("\n")[0].trim().replace(/ *\(\d+:\d+\)$/, "");
    const { line , column  } = mappedIndexToLineCol(ojsSource)(acornError.pos);
    const errLines = [];
    const ourError = (msg)=>{
        if (msg.length) {
            errLines.push(msg);
        }
    };
    const errMsg = `OJS parsing failed on line ${line + 1}, column ${column + 1}`;
    ourError(errMsg);
    ourError(acornMsg);
    if (acornMsg.endsWith("Unexpected character '#'") && ojsSource.value.slice(acornError.pos, acornError.pos + 2) === "#|") {
        ourError("\n(Did you mean to use '//|' instead?)\n");
    }
    ourError("----- OJS Source:");
    const ojsSourceSplit = ojsSource.value.split("\n");
    for(let i1 = 0; i1 < ojsSourceSplit.length; ++i1){
        ourError(ojsSourceSplit[i1]);
        if (i1 + 1 === acornError.loc.line) {
            ourError(" ".repeat(acornError.loc.column) + "^");
        }
    }
    ourError("-----");
    if (errLines.length) {
        error(errLines.join("\n"));
    }
}
async function ojsCompile(options) {
    const { markdown , project , ojsBlockLineNumbers  } = options;
    const output = await breakQuartoMd(markdown, true);
    const hasOjsDefines = markdown.value.indexOf("ojs_define") !== -1;
    if (!isJavascriptCompatible(options.format) || options.format.metadata?.["ojs-engine"] === false) {
        return {
            markdown: markdown
        };
    }
    const languages = languagesInMarkdown(markdown.value);
    if (options.format.metadata?.["ojs-engine"] !== true && !languages.has("ojs") && !hasOjsDefines) {
        return {
            markdown: markdown
        };
    }
    const projDir = project?.dir;
    const selfContained = options.format.pandoc?.[kSelfContained] ?? options.format.pandoc?.[kEmbedResources] ?? false;
    const isHtmlMarkdown = isMarkdownOutput(options.format.pandoc, [
        "gfm",
        "commonmark", 
    ]);
    let ojsCellID = 0;
    let ojsBlockIndex = 0;
    const userIds = new Set();
    const scriptContents = [];
    const ojsRuntimeDir = resolve2(dirname2(options.source), options.libDir + "/ojs");
    const docDir = dirname2(options.source);
    const rootDir = projDir ?? "./";
    const runtimeToDoc = pathWithForwardSlashes(relative2(ojsRuntimeDir, docDir));
    const runtimeToRoot = pathWithForwardSlashes(relative2(ojsRuntimeDir, rootDir));
    const docToRoot = pathWithForwardSlashes(relative2(docDir, rootDir));
    scriptContents.push(`window._ojs.paths.runtimeToDoc = "${runtimeToDoc}";`);
    scriptContents.push(`window._ojs.paths.runtimeToRoot = "${runtimeToRoot}";`);
    scriptContents.push(`window._ojs.paths.docToRoot = "${docToRoot}";`);
    scriptContents.push(`window._ojs.selfContained = ${selfContained};`);
    const moduleContents = [];
    function interpret(jsSrc, inline, lenient) {
        const inlineStr = inline ? "inline-" : "";
        const methodName = lenient ? "interpretLenient" : "interpret";
        moduleContents.push({
            methodName,
            cellName: `ojs-${inlineStr}cell-${ojsCellID}`,
            inline,
            source: jsSrc.value
        });
    }
    const ls = [];
    const resourceFiles = [];
    const pageResources = [];
    const ojsViews = new Set();
    const ojsIdentifiers = new Set();
    for (const cell of output.cells){
        const errorVal = cell.options?.[kError] ?? options.format.execute?.[kError] ?? false;
        const handleOJSCell = async (cell, mdClassList)=>{
            const cellSrcStr = cell.source;
            const bumpOjsCellIdString = ()=>{
                ojsCellID += 1;
                return `ojs-cell-${ojsCellID}`;
            };
            const ojsId = bumpOjsCellIdString();
            const userCellId = ()=>{
                const chooseId = (label)=>{
                    const htmlLabel = asHtmlId(label);
                    if (userIds.has(htmlLabel)) {
                        throw new Error(`FATAL: duplicate label ${htmlLabel}`);
                    } else {
                        userIds.add(htmlLabel);
                        return htmlLabel;
                    }
                };
                if (cell.options?.label) {
                    return chooseId(cell.options.label);
                } else if (cell.options?.[kCellLstLabel]) {
                    return chooseId(cell.options[kCellLstLabel]);
                } else if (cell.options?.[kCellFigCap] || cell.options?.[kCellFigSubCap] || cell.options?.[kCellLstCap]) {
                    return chooseId(`fig-${ojsId}`);
                } else {
                    return undefined;
                }
            };
            const userId = userCellId();
            const attrs = [];
            const hasFigureSubCaptions = ()=>{
                return cell.options?.[kCellFigSubCap];
            };
            const cellStartingLoc = ojsBlockLineNumbers[ojsBlockIndex++] || 0;
            if (cellStartingLoc === 0) {
                warning("OJS block count mismatch. Line number reporting is likely to be wrong");
            }
            const handleError = (err, cellSrc)=>{
                const div = pandocDiv({
                    classes: [
                        "quarto-ojs-syntax-error"
                    ]
                });
                const msg = String(err).split("\n")[0].trim().replace(/ *\(\d+:\d+\)$/, "");
                ojsParseError(err, cellSrc);
                const preDiv = pandocBlock("````")({
                    classes: [
                        "numberLines",
                        "java"
                    ],
                    attrs: [
                        `startFrom="${cellStartingLoc - 1}"`,
                        `syntax-error-position="${err.pos}"`,
                        `source-offset="${cell.sourceOffset}"`, 
                    ]
                });
                preDiv.push(pandocRawStr(cell.sourceVerbatim.value.trim()));
                div.push(preDiv);
                const errMsgDiv = pandocDiv({
                    classes: [
                        "cell-output",
                        "cell-output-error"
                    ]
                });
                const calloutDiv = pandocDiv({
                    classes: [
                        "callout-important"
                    ]
                });
                const [_heading, fullMsg] = msg.split(": ");
                calloutDiv.push(pandocRawStr(`#### OJS Syntax Error (line ${err.loc.line + cellStartingLoc + cell.sourceStartLine - 1}, column ${err.loc.column + 1})`));
                calloutDiv.push(pandocRawStr(`${fullMsg}`));
                errMsgDiv.push(calloutDiv);
                div.push(errMsgDiv);
                div.emit(ls);
            };
            let nCells = 0;
            const parsedCells = [];
            try {
                const parse = parseModule(cellSrcStr.value);
                let info = [];
                const flushSeqSrc = ()=>{
                    parsedCells.push({
                        info
                    });
                    for(let i1 = 1; i1 < info.length; ++i1){
                        parsedCells.push({
                            info: []
                        });
                    }
                    info = [];
                };
                ojsSimpleWalker(parse, {
                    Cell (node) {
                        if (node.id && node.id.type === "ViewExpression") {
                            ojsViews.add(node.id.id.name);
                        } else if (node.id && node.id.type === "Identifier") {
                            ojsIdentifiers.add(node.id.name);
                        }
                        if (node.id === null && node.body.type !== "ImportDeclaration") {
                            info.push({
                                start: node.start,
                                end: node.end,
                                cellType: "expression"
                            });
                            flushSeqSrc();
                        } else {
                            info.push({
                                start: node.start,
                                end: node.end,
                                cellType: "declaration"
                            });
                        }
                    }
                });
                nCells = parse.cells.length;
                if (info.length > 0) {
                    flushSeqSrc();
                }
            } catch (e) {
                if (e instanceof SyntaxError) {
                    handleError(e, cellSrcStr);
                    return;
                } else {
                    logError(e);
                    throw new Error();
                }
            }
            pageResources.push(...await extractResourceDescriptionsFromOJSChunk(cellSrcStr, dirname2(options.source), projDir));
            const hasManyRowsCols = ()=>{
                const cols = cell.options?.[kLayoutNcol];
                const rows = cell.options?.[kLayoutNrow];
                return Number(cols) && Number(cols) > 1 || Number(rows) && Number(rows) > 1 || nCells > 1;
            };
            const nCol = ()=>{
                const col = cell.options?.[kLayoutNcol];
                if (!col) {
                    return 1;
                }
                return Number(col);
            };
            const nRow = ()=>{
                const row = cell.options?.[kLayoutNrow];
                if (!row) {
                    return Math.ceil(nCells / nCol());
                }
                return Number(row);
            };
            const hasSubFigures = ()=>{
                return hasFigureSubCaptions() || hasManyRowsCols() && nRow() * nCol() > 1;
            };
            const idPlacement = ()=>{
                if (hasSubFigures() || cell.options?.[kCellLstLabel]) {
                    return "outer";
                } else {
                    return "inner";
                }
            };
            const outputVal = cell.options?.[kOutput] ?? options.format.execute[kOutput] ?? true;
            if (outputVal === "all") {
                attrs.push(`output="all"`);
            }
            if (cell.options?.[kCellLstCap]) {
                attrs.push(`caption="${cell.options?.[kCellLstCap]}"`);
            }
            const { classes , attrs: otherAttrs ,  } = getDivAttributes(cell.options || {});
            attrs.push(...otherAttrs);
            const evalVal = cell.options?.[kEval] ?? options.format.execute[kEval] ?? true;
            const echoVal = cell.options?.[kEcho] ?? options.format.execute[kEcho] ?? true;
            const div = pandocDiv({
                id: idPlacement() === "outer" ? userId : undefined,
                classes: [
                    "cell",
                    ...classes, 
                ],
                attrs
            });
            const includeVal = cell.options?.[kInclude] ?? options.format.execute[kInclude] ?? true;
            const srcClasses = mdClassList ?? [
                "js",
                "cell-code"
            ];
            const srcAttrs = [];
            if (!echoVal) {
                srcClasses.push("hidden");
            }
            if (cell.options?.[kCodeOverflow] === "wrap") {
                srcClasses.push("code-overflow-wrap");
            } else if (cell.options?.[kCodeOverflow] === "scroll") {
                srcClasses.push("code-overflow-scroll");
            }
            if (asUndefined(options.format.render?.[kCodeFold], "none") ?? cell.options?.[kCodeFold]) {
                srcAttrs.push(`${kCodeFold}="${cell.options?.[kCodeFold]}"`);
            }
            if (cell.options?.[kCodeLineNumbers]) {
                srcAttrs.push(`${kCodeLineNumbers}="${cell.options?.[kCodeLineNumbers]}"`);
            }
            const srcConfig = {
                classes: srcClasses.slice(),
                attrs: srcAttrs.slice()
            };
            if (evalVal) {
                interpret(cell.source, false, errorVal);
            }
            const outputCellClasses = [
                "cell-output",
                "cell-output-display"
            ];
            if (!outputVal || !includeVal) {
                outputCellClasses.push("hidden");
            }
            if (echoVal === "fenced") {
                const ourAttrs = srcConfig.attrs.slice();
                const ourClasses = srcConfig.classes.filter((d)=>d !== "js");
                ourClasses.push("java");
                ourAttrs.push(`startFrom="${cellStartingLoc - 1}"`, `source-offset="${cell.sourceOffset}"`);
                const srcDiv = pandocBlock("````")({
                    classes: ourClasses,
                    attrs: ourAttrs
                });
                srcDiv.push(pandocRawStr(cell.sourceVerbatim.value.trim()));
                div.push(srcDiv);
            }
            const shouldEmitSource = echoVal !== "fenced" && !(echoVal === false && isHtmlMarkdown);
            const makeSubFigures = (specs)=>{
                let subfigIx = 1;
                const cellInfo = [].concat(...parsedCells.map((n)=>n.info));
                for (const spec of specs){
                    const outputDiv = pandocDiv({
                        classes: outputCellClasses
                    });
                    const outputInnerDiv = pandocDiv({
                        id: userId && `${userId}-${subfigIx}`
                    });
                    const innerInfo = parsedCells[subfigIx - 1].info;
                    const ojsDiv = pandocDiv({
                        id: `${ojsId}-${subfigIx}`,
                        attrs: [
                            `nodetype="${cellInfo[subfigIx - 1].cellType}"`
                        ]
                    });
                    if (shouldEmitSource && innerInfo.length > 0 && srcConfig !== undefined) {
                        const ourAttrs = srcConfig.attrs.slice();
                        const linesSkipped = cellSrcStr.value.substring(0, innerInfo[0].start).split("\n").length;
                        ourAttrs.push(`startFrom="${cellStartingLoc + cell.sourceStartLine - 1 + linesSkipped}"`);
                        ourAttrs.push(`source-offset="-${innerInfo[0].start}"`);
                        const srcDiv = pandocCode({
                            attrs: ourAttrs,
                            classes: srcConfig.classes
                        });
                        srcDiv.push(pandocRawStr(cellSrcStr.value.substring(innerInfo[0].start, innerInfo[innerInfo.length - 1].end).trim()));
                        div.push(srcDiv);
                    }
                    subfigIx++;
                    outputDiv.push(outputInnerDiv);
                    outputInnerDiv.push(ojsDiv);
                    if (spec.caption) {
                        outputInnerDiv.push(pandocRawStr(spec.caption));
                    }
                    div.push(outputDiv);
                }
            };
            if (!hasFigureSubCaptions() && hasManyRowsCols()) {
                const cellCount = Math.max(nRow() * nCol(), nCells, 1);
                const specs = [];
                for(let i1 = 0; i1 < cellCount; ++i1){
                    specs.push({
                        caption: ""
                    });
                }
                makeSubFigures(specs);
                if (cell.options?.[kCellFigCap]) {
                    div.push(pandocRawStr(cell.options[kCellFigCap]));
                }
            } else if (hasFigureSubCaptions()) {
                let subCap = (cell.options?.[kCellFigSubCap]);
                if (subCap === true) {
                    subCap = [
                        ""
                    ];
                }
                if (!Array.isArray(subCap)) {
                    subCap = [
                        subCap
                    ];
                }
                if (hasManyRowsCols() && subCap.length !== nRow() * nCol()) {
                    throw new Error("Cannot have subcaptions and multi-row/col layout with mismatched number of cells");
                }
                const specs1 = subCap.map((caption)=>({
                        caption
                    }));
                makeSubFigures(specs1);
                if (cell.options?.[kCellFigCap]) {
                    div.push(pandocRawStr(cell.options[kCellFigCap]));
                }
            } else {
                if (parsedCells.length === 0) {
                    throw new Error(`Fatal: OJS cell starting on line ${cellStartingLoc} is empty. OJS cells require at least one declaration.`);
                }
                const innerInfo = parsedCells[0].info;
                if (innerInfo.length > 0 && srcConfig !== undefined) {
                    const ourAttrs1 = srcConfig.attrs.slice();
                    ourAttrs1.push(`startFrom="${cellStartingLoc + cell.sourceStartLine - 1}"`);
                    ourAttrs1.push(`source-offset="0"`);
                    if (shouldEmitSource) {
                        const srcDiv1 = pandocCode({
                            attrs: ourAttrs1,
                            classes: srcConfig.classes
                        });
                        srcDiv1.push(pandocRawStr(mappedTrim(cellSrcStr)));
                        div.push(srcDiv1);
                    }
                }
                const outputDiv = pandocDiv({
                    id: idPlacement() === "inner" ? userId : undefined,
                    classes: outputCellClasses
                });
                div.push(outputDiv);
                outputDiv.push(pandocDiv({
                    id: ojsId,
                    attrs: [
                        `nodetype="${innerInfo[0].cellType}"`
                    ]
                }));
                if (cell.options?.[kCellFigCap]) {
                    outputDiv.push(pandocRawStr(cell.options[kCellFigCap]));
                }
            }
            div.emit(ls);
        };
        if (cell.cell_type === "raw" || cell.cell_type === "markdown") {
            ls.push(cell.sourceVerbatim);
        } else if (cell.cell_type?.language === "ojs") {
            await handleOJSCell(cell);
        } else {
            ls.push(cell.sourceVerbatim);
        }
    }
    if (selfContained) {
        const selfContainedPageResources = await makeSelfContainedResources(pageResources, docDir);
        const resolver = JSON.stringify(Object.fromEntries(Array.from(selfContainedPageResources)));
        scriptContents.unshift(`window._ojs.runtime.setLocalResolver(${resolver});`);
    } else {
        for (const resource of uniqueResources(pageResources)){
            resourceFiles.push(resource.filename);
        }
    }
    const serverMetadata = options.format.metadata?.server;
    const normalizeMetadata = (key, def)=>{
        if (!serverMetadata || serverMetadata["type"] !== "shiny" || !serverMetadata[key]) {
            return def;
        }
        if (typeof serverMetadata[key] === "string") {
            return [
                serverMetadata[key]
            ];
        } else {
            return serverMetadata[key];
        }
    };
    const shinyInputMetadata = normalizeMetadata("ojs-export", [
        "viewof"
    ]);
    const shinyOutputMetadata = normalizeMetadata("ojs-import", []);
    const shinyInputs = new Set();
    const shinyInputExcludes = new Set();
    if (serverMetadata?.["ojs-exports"]) {
        throw new Error("Document metadata contains server.ojs-exports; did you mean 'ojs-export' instead?");
    }
    if (serverMetadata?.["ojs-imports"]) {
        throw new Error("Document metadata contains server.ojs-imports; did you mean 'ojs-import' instead?");
    }
    let importAllViews = false;
    let importEverything = false;
    for (const shinyInput of shinyInputMetadata){
        if (shinyInput === "viewof") {
            importAllViews = true;
        } else if (shinyInput === "all") {
            importEverything = true;
        } else if (shinyInput.startsWith("~")) {
            shinyInputExcludes.add(shinyInput.slice(1));
        } else {
            shinyInputs.add(shinyInput);
        }
    }
    const resultSet = new Set();
    if (importEverything) {
        for (const el of ojsViews){
            resultSet.add(el);
        }
        for (const el1 of ojsIdentifiers){
            resultSet.add(el1);
        }
    }
    if (importAllViews) {
        for (const el2 of ojsViews){
            resultSet.add(el2);
        }
    }
    for (const el3 of shinyInputs){
        resultSet.add(el3);
    }
    for (const el4 of shinyInputExcludes){
        resultSet.delete(el4);
    }
    for (const el5 of resultSet){
        moduleContents.push({
            methodName: "interpretQuiet",
            source: `shinyInput('${el5}')`
        });
    }
    for (const el6 of shinyOutputMetadata){
        moduleContents.push({
            methodName: "interpretQuiet",
            source: `${el6} = shinyOutput('${el6}')`
        });
    }
    scriptContents.push("window._ojs.runtime.interpretFromScriptTags();");
    const afterBody = [
        `<script type="ojs-module-contents">`,
        JSON.stringify({
            contents: moduleContents
        }),
        `</script>`,
        `<script type="module">`,
        ...scriptContents,
        `</script>`, 
    ].join("\n");
    const includeAfterBodyFile = options.temp.createFile();
    Deno.writeTextFileSync(includeAfterBodyFile, afterBody);
    const extras = resolveDependencies({
        html: {
            [kDependencies]: [
                ojsFormatDependency(selfContained)
            ]
        }
    }, dirname2(options.source), options.libDir, options.temp, project);
    const ojsBundleTempFiles = [];
    if (selfContained) {
        const ojsBundleFilename = join3(quartoConfig.sharePath(), "formats/html/ojs/quarto-ojs-runtime.js");
        const ojsBundle = [
            `<script type="module">`,
            Deno.readTextFileSync(ojsBundleFilename),
            `</script>`, 
        ];
        const filename = options.temp.createFile();
        Deno.writeTextFileSync(filename, ojsBundle.join("\n"));
        ojsBundleTempFiles.push(filename);
    }
    const includeInHeader = [
        ...extras?.[kIncludeInHeader] || [],
        ...ojsBundleTempFiles, 
    ];
    return {
        markdown: join4(ls, ""),
        filters: [
            "ojs", 
        ],
        includes: {
            [kIncludeInHeader]: includeInHeader,
            [kIncludeAfterBody]: [
                includeAfterBodyFile
            ]
        },
        resourceFiles
    };
}
async function ojsExecuteResult(context, executeResult, ojsBlockLineNumbers) {
    executeResult = cloneDeep1(executeResult);
    const { markdown , includes , filters , resourceFiles  } = await ojsCompile({
        source: context.target.source,
        format: context.format,
        markdown: executeResult.markdown,
        libDir: context.libDir,
        project: context.project,
        temp: context.options.services.temp,
        ojsBlockLineNumbers
    });
    executeResult.markdown = markdown;
    if (includes) {
        executeResult.includes = mergeConfigs(includes, executeResult.includes || {});
    }
    if (filters) {
        executeResult.filters = (executeResult.filters || []).concat(filters);
    }
    return {
        executeResult,
        resourceFiles: resourceFiles || []
    };
}
function asUndefined(value, test) {
    if (value === test) {
        return undefined;
    }
    return value;
}
function ojsFormatDependency(selfContained) {
    const ojsResource = (resource)=>formatResourcePath("html", join3("ojs", resource));
    const ojsDependency = (resource, attribs)=>({
            name: resource,
            path: ojsResource(resource),
            attribs
        });
    const scripts = selfContained ? [] : [
        ojsDependency("quarto-ojs-runtime.js", {
            type: "module"
        }), 
    ];
    return {
        name: "quarto-ojs",
        stylesheets: [
            ojsDependency("quarto-ojs.css"), 
        ],
        scripts
    };
}
const kLatexHeaderMessageOptions = {
    bold: true
};
const kLatexBodyMessageOptions = {
    indent: 2
};
function hasTinyTex() {
    const installDir = tinyTexInstallDir();
    if (installDir && existsSync(installDir)) {
        return true;
    } else {
        return false;
    }
}
function tinyTexInstallDir() {
    switch(Deno.build.os){
        case "windows":
            return expandPath(join3(getenv("APPDATA", undefined), "TinyTeX"));
        case "linux":
            return expandPath("~/.TinyTeX");
        case "darwin":
            return expandPath("~/Library/TinyTeX");
        default:
            return undefined;
    }
}
function tinyTexBinDir() {
    const basePath = tinyTexInstallDir();
    if (basePath) {
        switch(Deno.build.os){
            case "windows":
                return join3(basePath, "bin\\win32\\");
            case "linux":
                return join3(basePath, `bin/${Deno.build.arch}-linux`);
            case "darwin":
                return join3(basePath, "bin/universal-darwin");
            default:
                return undefined;
        }
    } else {
        return undefined;
    }
}
async function texLiveContext(preferTinyTex) {
    const hasTiny = hasTinyTex();
    const hasTex = await hasTexLive();
    const binDir = tinyTexBinDir();
    const usingGlobal = await texLiveInPath() && !hasTiny;
    return {
        preferTinyTex,
        hasTinyTex: hasTiny,
        hasTexLive: hasTex,
        usingGlobal,
        binDir
    };
}
function systemTexLiveContext() {
    return {
        preferTinyTex: false,
        hasTinyTex: false,
        hasTexLive: false,
        usingGlobal: true
    };
}
async function hasTexLive() {
    if (hasTinyTex()) {
        return true;
    } else {
        if (await texLiveInPath()) {
            return true;
        } else {
            return false;
        }
    }
}
async function texLiveInPath() {
    try {
        const systemContext = systemTexLiveContext();
        const result1 = await tlmgrCommand("--version", [], systemContext);
        return result1.code === 0;
    } catch  {
        return false;
    }
}
async function findPackages(searchTerms, context, opts, quiet) {
    const results = [];
    const args = [
        "--file",
        "--global"
    ];
    for (const searchTerm of searchTerms){
        if (!quiet) {
            info(`finding package for ${searchTerm}`, kLatexHeaderMessageOptions);
        }
        if (searchTerm === "fandol") {
            results.push("fandol");
        } else {
            const result1 = await tlmgrCommand("search", [
                ...args,
                ...opts || [],
                searchTerm
            ], context, true);
            if (result1.code === 0 && result1.stdout) {
                const text = result1.stdout;
                const packageNameRegex = /^(.+)\:$/;
                const searchTermRegex = new RegExp(`\/${searchTerm}$`);
                let currentPackage = undefined;
                lines(text).forEach((line)=>{
                    const packageMatch = line.match(packageNameRegex);
                    if (packageMatch) {
                        const packageName = packageMatch[1];
                        if (packageName.includes(".")) {
                            currentPackage = packageName.split(".")[0];
                        } else {
                            currentPackage = packageName;
                        }
                    } else {
                        if (currentPackage) {
                            const searchTermMatch = line.match(searchTermRegex);
                            if (searchTermMatch) {
                                results.push(currentPackage);
                                currentPackage = undefined;
                            }
                        }
                    }
                });
            } else {
                const errorMessage = tlMgrError(result1.stderr);
                if (errorMessage) {
                    throw new Error(errorMessage);
                }
            }
        }
    }
    return __VIRTUAL_FILE181(results);
}
function updatePackages(all, self1, context, opts, quiet) {
    const args = [];
    if (opts) {
        args.push(...opts);
    }
    if (all) {
        args.push("--all");
    }
    if (self1) {
        args.push("--self");
    }
    return tlmgrCommand("update", args || [], context, quiet);
}
async function installPackages(pkgs, context, opts, quiet) {
    if (!quiet) {
        info(`> ${pkgs.length} ${pkgs.length === 1 ? "package" : "packages"} to install`, kLatexHeaderMessageOptions);
    }
    let count = 1;
    for (const pkg of pkgs){
        if (!quiet) {
            info(`> installing ${pkg} (${count} of ${pkgs.length})`, kLatexHeaderMessageOptions);
        }
        await installPackage(pkg, context, opts, quiet);
        count = count + 1;
    }
    if (context.usingGlobal) {
        await addPath(context);
    }
}
function addPath(context, opts) {
    return tlmgrCommand("path", [
        "add",
        ...opts || []
    ], context, true);
}
function removePath(context, opts, quiet) {
    return tlmgrCommand("path", [
        "remove",
        ...opts || []
    ], context, quiet);
}
async function installPackage(pkg, context, opts, quiet) {
    let installResult = await tlmgrCommand("install", [
        ...opts || [],
        pkg
    ], context, quiet);
    if (installResult.code !== 0 && installResult.code !== 255) {
        return Promise.reject(`tlmgr returned a non zero status code\n${installResult.stderr}`);
    }
    const isInstalled = await verifyPackageInstalled(pkg, context);
    if (!isInstalled) {
        const updateResult = await updatePackages(false, true, context, opts, quiet);
        if (updateResult.code !== 0) {
            return Promise.reject();
        }
        installResult = await tlmgrCommand("install", [
            ...opts || [],
            pkg
        ], context, quiet);
    }
    return installResult;
}
function texLiveCmd(cmd, context) {
    if (context.preferTinyTex && context.hasTinyTex) {
        if (context.binDir) {
            return {
                cmd,
                fullPath: join3(context.binDir, cmd)
            };
        } else {
            return {
                cmd,
                fullPath: cmd
            };
        }
    } else {
        return {
            cmd,
            fullPath: cmd
        };
    }
}
function tlMgrError(msg) {
    if (msg && msg.indexOf("is older than remote repository") > -1) {
        const message = `Your TexLive version is not updated enough to connect to the remote repository and download packages. Please update your installation of TexLive or TinyTex.\n\nUnderlying message:`;
        return `${message} ${msg.replace("\ntlmgr: ", "")}`;
    } else {
        return undefined;
    }
}
async function verifyPackageInstalled(pkg, context, opts) {
    const result1 = await tlmgrCommand("info", [
        "--list",
        "--only-installed",
        "--data",
        "name",
        ...opts || [],
        pkg, 
    ], context);
    return result1.stdout?.trim() === pkg;
}
function tlmgrCommand(tlmgrCmd, args, context, _quiet) {
    const execTlmgr = (tlmgrCmd)=>{
        return execProcess({
            cmd: tlmgrCmd,
            stdout: "piped",
            stderr: "piped"
        });
    };
    const tlmgr = texLiveCmd("tlmgr", context);
    if (Deno.build.os === "windows") {
        const quoted = requireQuoting(args);
        return safeWindowsExec(tlmgr.fullPath, [
            tlmgrCmd,
            ...quoted.args
        ], execTlmgr);
    } else {
        return execTlmgr([
            tlmgr.fullPath,
            tlmgrCmd,
            ...args
        ]);
    }
}
async function hasLatexDistribution() {
    try {
        const result1 = await execProcess({
            cmd: [
                "pdftex",
                "--version"
            ],
            stdout: "piped",
            stderr: "piped"
        });
        return result1.code === 0;
    } catch  {
        return false;
    }
}
async function runPdfEngine(input, engine, texLive, outputDir, texInputDirs, pkgMgr, quiet) {
    const [cwd, stem] = dirAndStem(input);
    const targetDir = outputDir ? join3(cwd, outputDir) : cwd;
    const output = join3(targetDir, `${stem}.pdf`);
    const log = join3(targetDir, `${stem}.log`);
    [
        log,
        output
    ].forEach((file)=>{
        if (existsSync(file)) {
            Deno.removeSync(file);
        }
    });
    const args = [
        "-interaction=batchmode",
        "-halt-on-error"
    ];
    if (outputDir !== undefined) {
        args.push(`-output-directory=${outputDir}`);
    }
    if (engine.pdfEngineOpts) {
        args.push(...engine.pdfEngineOpts);
    }
    args.push(basename2(input));
    const result1 = await runLatexCommand(engine.pdfEngine, args, {
        pkgMgr,
        cwd,
        texInputDirs,
        texLive
    }, quiet);
    return {
        result: result1,
        output,
        log
    };
}
async function runIndexEngine(input, texLive, engine, args, pkgMgr, quiet) {
    const [cwd, stem] = dirAndStem(input);
    const log = join3(cwd, `${stem}.ilg`);
    if (existsSync(log)) {
        Deno.removeSync(log);
    }
    const result1 = await runLatexCommand(engine || "makeindex", [
        ...args || [],
        basename2(input)
    ], {
        cwd,
        pkgMgr,
        texLive
    }, quiet);
    return {
        result: result1,
        log
    };
}
async function runBibEngine(engine, input, cwd, texLive, pkgMgr, texInputDirs, quiet) {
    const [dir, stem] = dirAndStem(input);
    const log = join3(dir, `${stem}.blg`);
    if (existsSync(log)) {
        Deno.removeSync(log);
    }
    const result1 = await runLatexCommand(engine, [
        input
    ], {
        pkgMgr,
        cwd,
        texInputDirs,
        texLive
    }, quiet);
    return {
        result: result1,
        log
    };
}
async function runLatexCommand(latexCmd, args, context, quiet) {
    const fullLatexCmd = texLiveCmd(latexCmd, context.texLive);
    const runOptions = {
        cmd: [
            fullLatexCmd.fullPath,
            ...args
        ],
        stdout: "piped",
        stderr: "piped"
    };
    if (context.texLive.binDir) {
        runOptions.env = runOptions.env || {};
        runOptions.env["PATH"] = withPath({
            prepend: [
                context.texLive.binDir
            ]
        });
    }
    if (context.cwd) {
        runOptions.cwd = context.cwd;
    }
    if (context.texInputDirs && context.texInputDirs.length > 0) {
        runOptions.env = runOptions.env || {};
        runOptions.env["TEXINPUTS"] = `${context.texInputDirs.join(";")};`;
        runOptions.env["BSTINPUTS"] = `${context.texInputDirs.join(";")};`;
    }
    const runCmd = async ()=>{
        const result1 = await execProcess(runOptions, undefined, "stdout>stderr");
        if (!quiet && result1.stderr) {
            info(result1.stderr, kLatexBodyMessageOptions);
        }
        return result1;
    };
    try {
        return await runCmd();
    } catch (_e) {
        const tex = await hasTexLive() || await hasLatexDistribution();
        if (!tex) {
            info("\nNo TeX installation was detected.\n\nPlease run 'quarto install tinytex' to install TinyTex.\nIf you prefer, you may install TexLive or another TeX distribution.\n");
            return Promise.reject();
        } else if (context.pkgMgr && context.pkgMgr.autoInstall) {
            if (!quiet) {
                info(`command ${latexCmd} not found, attempting install`, kLatexHeaderMessageOptions);
            }
            const packageForCommand = await context.pkgMgr.searchPackages([
                latexCmd
            ]);
            if (packageForCommand) {
                await context.pkgMgr.installPackages(packagesForCommand(latexCmd));
            }
            return await runCmd();
        } else {
            error(`Error executing ${latexCmd}`, kLatexHeaderMessageOptions);
            return Promise.reject();
        }
    }
}
function packagesForCommand(cmd) {
    if (cmd === "texindy") {
        return [
            "xindy"
        ];
    } else {
        return [
            cmd
        ];
    }
}
function packageManager(mkOptions, texLive) {
    let lastPkgs = [];
    return {
        autoInstall: mkOptions.autoInstall === undefined ? true : mkOptions.autoInstall,
        installPackages: async (pkgs)=>{
            const difference = __VIRTUAL_FILE137(pkgs, lastPkgs);
            if (difference.length > 0) {
                await installPackages(pkgs, texLive, mkOptions.engine.tlmgrOpts, mkOptions.quiet);
                lastPkgs = pkgs;
                return true;
            } else {
                return false;
            }
        },
        updatePackages: (all, self1)=>{
            return updatePackages(all, self1, texLive, mkOptions.engine.tlmgrOpts, mkOptions.quiet);
        },
        searchPackages: (searchTerms)=>{
            return findPackages(searchTerms, texLive, mkOptions.engine.tlmgrOpts, mkOptions.quiet);
        }
    };
}
const kMissingFontLog = "missfont.log";
function findMissingFontsAndPackages(logText, dir) {
    const missingFonts = findMissingFonts(dir);
    const missingPackages = findMissingPackages(logText);
    return __VIRTUAL_FILE181([
        ...missingPackages,
        ...missingFonts
    ]);
}
function needsRecompilation(log) {
    if (existsSync(log)) {
        const logContents = Deno.readTextFileSync(log);
        const explicitMatches = explicitMatchers.some((matcher)=>{
            return logContents.match(matcher);
        });
        if (explicitMatches) {
            return true;
        } else {
            const unresolvedMatches = resolvingMatchers.some((resolvingMatcher)=>{
                resolvingMatcher.unresolvedMatch.lastIndex = 0;
                let unresolvedMatch = resolvingMatcher.unresolvedMatch.exec(logContents);
                const unresolvedMatches = [];
                while(unresolvedMatch){
                    const resolvedRegex = new RegExp(resolvingMatcher.resolvedMatch.replace(kCaptureToken, unresolvedMatch[1]), "gm");
                    if (!logContents.match(resolvedRegex)) {
                        unresolvedMatches.push(unresolvedMatch[1]);
                    }
                    unresolvedMatch = resolvingMatcher.unresolvedMatch.exec(logContents);
                }
                if (unresolvedMatches.length > 0) {
                    return true;
                } else {
                    return false;
                }
            });
            return !!unresolvedMatches;
        }
    }
    return false;
}
const explicitMatchers = [
    /(Rerun to get |Please \(re\)run | Rerun LaTeX\.)/
];
const kCaptureToken = "${unresolvedCapture}";
const resolvingMatchers = [
    {
        unresolvedMatch: /^.*xpos seems to be \\@mn@currxpos.*?line ([0-9]*)\.$/gm,
        resolvedMatch: `^.*xpos seems to be [0-9]*\.[0-9]*pt.*?line ${kCaptureToken}\.$`
    }, 
];
function findMissingHyphenationFiles(logText) {
    const babelWarningRegex = /^Package babel Warning:/m;
    const hasWarning = logText.match(babelWarningRegex);
    if (hasWarning) {
        const languageRegex = /^\(babel\).* language `(\S+)'.*$/m;
        const languageMatch = logText.match(languageRegex);
        if (languageMatch) {
            const language = languageMatch[1];
            return `hyphen-${language.toLowerCase()}`;
        }
    }
}
const kErrorRegex = /^\!\s([\s\S]+)?Here is how much/m;
const kEmptyRegex = /(No pages of output)\./;
function findLatexError(logText, stderr) {
    const errors = [];
    const match = logText.match(kErrorRegex);
    if (match) {
        const hint = suggestHint(logText, stderr);
        if (hint) {
            errors.push(`${match[1]}\n${hint}`);
        } else {
            errors.push(match[1]);
        }
    }
    if (errors.length === 0) {
        const emptyMatch = logText.match(kEmptyRegex);
        if (emptyMatch) {
            errors.push(`${emptyMatch[1]} - the document appears to have produced no output.`);
        }
    }
    return errors.join("\n");
}
const kIndexErrorRegex = /^\s\s\s--\s(.*)/m;
function findIndexError(logText) {
    const match = logText.match(kIndexErrorRegex);
    if (match) {
        return match[1];
    } else {
        return undefined;
    }
}
function findMissingFonts(dir) {
    const missingFonts = [];
    const missFontLog = join3(dir, kMissingFontLog);
    if (existsSync(missFontLog)) {
        const missFontLogText = Deno.readTextFileSync(missFontLog);
        const fontSearchTerms = findInMissingFontLog(missFontLogText);
        missingFonts.push(...fontSearchTerms);
    }
    return missingFonts;
}
const formatFontFilter = (match, _text)=>{
    const base = basename2(match);
    return fontSearchTerm(base);
};
const estoPdfFilter = (_match, _text)=>{
    return "epstopdf";
};
const packageMatchers = [
    {
        regex: /.*! Font [^=]+=([^ ]+).+ not loadable.*/g,
        filter: formatFontFilter
    },
    {
        regex: /.*! .*The font "([^"]+)" cannot be found.*/g,
        filter: formatFontFilter
    },
    {
        regex: /.*!.+ error:.+\(file ([^)]+)\): .*/g,
        filter: formatFontFilter
    },
    {
        regex: /.*Package widetext error: Install the ([^ ]+) package.*/g,
        filter: (match, _text)=>{
            return `${match}.sty`;
        }
    },
    {
        regex: /.*Unable to find TFM file "([^"]+)".*/g,
        filter: formatFontFilter
    },
    {
        regex: /.* File `(.+eps-converted-to.pdf)'.*/g,
        filter: estoPdfFilter
    },
    {
        regex: /.*xdvipdfmx:fatal: pdf_ref_obj.*/g,
        filter: estoPdfFilter
    },
    {
        regex: /.* (tikzlibrary[^ ]+?[.]code[.]tex).*/g,
        filter: (match, text)=>{
            if (text.match(/! Package tikz Error:/)) {
                return match;
            } else {
                return undefined;
            }
        }
    },
    {
        regex: /module 'lua-uni-normalize' not found:/g,
        filter: (_match, _text)=>{
            return "lua-uni-algos.lua";
        }
    },
    {
        regex: /.*! LaTeX Error: File `([^']+)' not found.*/g
    },
    {
        regex: /.* file ['`]?([^' ]+)'? not found.*/g
    },
    {
        regex: /.*the language definition file ([^ ]+) .*/g
    },
    {
        regex: /.* \\(file ([^)]+)\\): cannot open .*/g
    },
    {
        regex: /.*file `([^']+)' .*is missing.*/g
    },
    {
        regex: /.*! CTeX fontset `([^']+)' is unavailable.*/g
    },
    {
        regex: /.*: ([^:]+): command not found.*/g
    },
    {
        regex: /.*! I can't find file `([^']+)'.*/g
    }, 
];
function fontSearchTerm(font) {
    return `${font}(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)`;
}
function findMissingPackages(logFileText) {
    const toInstall = [];
    packageMatchers.forEach((packageMatcher)=>{
        packageMatcher.regex.lastIndex = 0;
        let match = packageMatcher.regex.exec(logFileText);
        while(match != null){
            const file = match[1];
            const filteredFile = packageMatcher.filter ? packageMatcher.filter(file, logFileText) : file;
            if (filteredFile) {
                toInstall.push(filteredFile);
            }
            match = packageMatcher.regex.exec(logFileText);
        }
        packageMatcher.regex.lastIndex = 0;
    });
    return __VIRTUAL_FILE181(toInstall);
}
function findInMissingFontLog(missFontLogText) {
    const toInstall = [];
    lines(missFontLogText).forEach((line)=>{
        line = line.trim();
        const fontMatch = line.match(/([^\s]*)$/);
        if (fontMatch && fontMatch[1].trim() !== "") {
            toInstall.push(fontMatch[1]);
        }
        const commandMatch = line.match(/^([^\s]*)/);
        if (commandMatch && commandMatch[1].trim() !== "") {
            toInstall.push(commandMatch[1]);
        }
    });
    return __VIRTUAL_FILE181(toInstall);
}
const kUnicodePattern = {
    regex: /\! Package inputenc Error: Unicode character/,
    hint: "Possible unsupported unicode character in this configuration. Perhaps try another LaTeX engine (e.g. XeLaTeX)."
};
const kInlinePattern = {
    regex: /Missing \$ inserted\./,
    hint: "You may need to $ $ around an expression in this file."
};
const kGhostPattern = {
    regex: /^\!\!\! Error: Cannot open Ghostscript for piped input/m,
    hint: "GhostScript is likely required to compile this document. Please be sure GhostScript (https://ghostscript.com) is installed and try again."
};
const kGhostCorruptPattern = {
    regex: /^GPL Ghostscript .*: Can't find initialization file gs_init.ps/m,
    hint: "GhostScript is likely required to compile this document. Please be sure GhostScript (https://ghostscript.com) is installed and configured properly and try again."
};
const kLogOutputPatterns = [
    kUnicodePattern,
    kInlinePattern
];
const kStdErrPatterns = [
    kGhostPattern,
    kGhostCorruptPattern
];
function suggestHint(logText, stderr) {
    const stderrHint = kStdErrPatterns.find((errPattern)=>stderr?.match(errPattern.regex));
    if (stderrHint) {
        return stderrHint.hint;
    } else {
        const logHint = kLogOutputPatterns.find((logPattern)=>logText.match(logPattern.regex));
        if (logHint) {
            return logHint.hint;
        } else {
            return undefined;
        }
    }
}
async function generatePdf(mkOptions) {
    if (!mkOptions.quiet) {
        info(`running ${mkOptions.engine.pdfEngine} - 1`, kLatexHeaderMessageOptions);
    }
    const [cwd, stem] = dirAndStem(mkOptions.input);
    const workingDir = mkOptions.outputDir ? join3(cwd, mkOptions.outputDir) : cwd;
    if (!existsSync(workingDir)) {
        Deno.mkdirSync(workingDir);
    } else {
        cleanup(workingDir, stem);
    }
    const allowUpdate = await hasTexLive();
    mkOptions.autoInstall = mkOptions.autoInstall && allowUpdate;
    const texLive = await texLiveContext(mkOptions.tinyTex !== false);
    const pkgMgr = packageManager(mkOptions, texLive);
    const response = await initialCompileLatex(mkOptions.input, mkOptions.engine, pkgMgr, texLive, mkOptions.outputDir, mkOptions.texInputDirs, mkOptions.quiet);
    const initialCompileNeedsRerun = needsRecompilation(response.log);
    const indexCreated = await makeIndexIntermediates(workingDir, stem, pkgMgr, texLive, mkOptions.engine.indexEngine, mkOptions.engine.indexEngineOpts, mkOptions.quiet);
    const bibliographyCreated = await makeBibliographyIntermediates(mkOptions.input, mkOptions.engine.bibEngine || "citeproc", pkgMgr, texLive, mkOptions.outputDir, mkOptions.texInputDirs, mkOptions.quiet);
    const minRuns = (mkOptions.minRuns || 1) - 1;
    const maxRuns = (mkOptions.maxRuns || 10) - 1;
    if ((indexCreated || bibliographyCreated || minRuns || initialCompileNeedsRerun) && maxRuns > 0) {
        await recompileLatexUntilComplete(mkOptions.input, mkOptions.engine, pkgMgr, mkOptions.minRuns || 1, maxRuns, texLive, mkOptions.outputDir, mkOptions.texInputDirs, mkOptions.quiet);
    }
    if (mkOptions.clean) {
        cleanup(workingDir, stem);
    }
    if (!mkOptions.quiet) {
        info("");
    }
    return mkOptions.outputDir ? join3(mkOptions.outputDir, stem + ".pdf") : join3(cwd, stem + ".pdf");
}
async function initialCompileLatex(input, engine, pkgMgr, texLive, outputDir, texInputDirs, quiet) {
    let packagesUpdated = false;
    while(true){
        const response = await runPdfEngine(input, engine, texLive, outputDir, texInputDirs, pkgMgr, quiet);
        const success = response.result.code === 0 && (!response.output || existsSync(response.output));
        if (success) {
            const logText = Deno.readTextFileSync(response.log);
            const missingHyphenationFile = findMissingHyphenationFiles(logText);
            if (missingHyphenationFile) {
                if (await pkgMgr.installPackages([
                    missingHyphenationFile
                ])) {
                    continue;
                } else {
                    writeError("missing hyphenation file", "", response.log);
                    return Promise.reject();
                }
            }
        } else if (pkgMgr.autoInstall) {
            if (!packagesUpdated) {
                if (!quiet) {
                    info("updating tlmgr", kLatexHeaderMessageOptions);
                }
                await pkgMgr.updatePackages(false, true);
                info("");
                if (!quiet) {
                    info("updating existing packages", kLatexHeaderMessageOptions);
                }
                await pkgMgr.updatePackages(true, false);
                packagesUpdated = true;
            }
            const packagesInstalled = await findAndInstallPackages(pkgMgr, response.log, response.result.stderr, quiet);
            if (packagesInstalled) {
                continue;
            } else {
                displayError("missing packages (automatic installation failed)", response.log, response.result);
                return Promise.reject();
            }
        } else {
            displayError("missing packages (automatic installed disabled)", response.log, response.result);
            return Promise.reject();
        }
        return Promise.resolve(response);
    }
}
function displayError(title, log, result1) {
    if (existsSync(log)) {
        const logText = Deno.readTextFileSync(log);
        writeError(title, findLatexError(logText, result1.stderr), log);
    } else {
        writeError(title);
    }
}
async function makeIndexIntermediates(dir, stem, pkgMgr, texLive, engine, args, quiet) {
    const indexFile = join3(dir, `${stem}.idx`);
    if (existsSync(indexFile)) {
        if (!quiet) {
            info("making index", kLatexHeaderMessageOptions);
        }
        try {
            const response = await runIndexEngine(indexFile, texLive, engine, args, pkgMgr, quiet);
            const indexLogExists = existsSync(response.log);
            if (response.result.code !== 0) {
                writeError(`result code ${response.result.code}`, "", response.log);
                return Promise.reject();
            } else if (indexLogExists) {
                const logText = Deno.readTextFileSync(response.log);
                const error = findIndexError(logText);
                if (error) {
                    writeError(`error generating index`, error, response.log);
                    return Promise.reject();
                }
            }
            return true;
        } catch  {
            writeError(`error generating index`);
            return Promise.reject();
        }
    } else {
        return false;
    }
}
async function makeBibliographyIntermediates(input, engine, pkgMgr, texLive, outputDir, texInputDirs, quiet) {
    const bibCommand = engine === "natbib" ? "bibtex" : "biber";
    const [cwd, stem] = dirAndStem(input);
    while(true){
        const auxBibFile = bibCommand === "biber" ? `${stem}.bcf` : `${stem}.aux`;
        const auxBibPath = outputDir ? join3(outputDir, auxBibFile) : auxBibFile;
        const auxBibFullPath = join3(cwd, auxBibPath);
        if (existsSync(auxBibFullPath)) {
            const auxFileData = Deno.readTextFileSync(auxBibFullPath);
            const requiresProcessing = bibCommand === "biber" ? true : containsBiblioData(auxFileData);
            if (requiresProcessing) {
                if (!quiet) {
                    info("generating bibliography", kLatexHeaderMessageOptions);
                }
                if (Deno.build.os === "windows") {
                    if (bibCommand !== "biber" && !hasTexLive()) {
                        const fixedAuxFileData = auxFileData.replaceAll(/(^\\bibdata{.+)\.bib(.*})$/gm, (_substr, prefix, postfix)=>{
                            return prefix + postfix;
                        });
                        Deno.writeTextFileSync(auxBibFullPath, fixedAuxFileData);
                    }
                }
                const response = await runBibEngine(bibCommand, auxBibPath, cwd, texLive, pkgMgr, texInputDirs, quiet);
                if (response.result.code !== 0 && pkgMgr.autoInstall) {
                    const log = join3(dirname2(auxBibFullPath), `${stem}.blg`);
                    if (existsSync(log)) {
                        const logOutput = Deno.readTextFileSync(log);
                        const match = logOutput.match(/.* open style file ([^ ]+).*/);
                        if (match) {
                            const file = match[1];
                            if (await findAndInstallPackages(pkgMgr, file, response.result.stderr, quiet)) {
                                continue;
                            } else {
                                writeError(`error generating bibliography`, "", log);
                                return Promise.reject();
                            }
                        }
                    }
                }
                return true;
            }
        }
        return false;
    }
}
async function findAndInstallPackages(pkgMgr, logFile, stderr, _quiet) {
    if (existsSync(logFile)) {
        const logText = Deno.readTextFileSync(logFile);
        const searchTerms = findMissingFontsAndPackages(logText, dirname2(logFile));
        if (searchTerms.length > 0) {
            const packages = await pkgMgr.searchPackages(searchTerms);
            if (packages.length > 0) {
                const packagesInstalled = await pkgMgr.installPackages(packages);
                if (packagesInstalled) {
                    return true;
                } else {
                    writeError("package installation error", findLatexError(logText, stderr), logFile);
                    return Promise.reject();
                }
            } else {
                writeError("no matching packages", findLatexError(logText, stderr), logFile);
                return Promise.reject();
            }
        } else {
            writeError("error", findLatexError(logText, stderr), logFile);
            return Promise.reject();
        }
    }
    return false;
}
function writeError(primary, secondary, logFile) {
    info(`\ncompilation failed- ${primary}`, kLatexHeaderMessageOptions);
    if (secondary) {
        info(secondary);
    }
    if (logFile) {
        info(`see ${logFile} for more information.`);
    }
}
async function recompileLatexUntilComplete(input, engine, pkgMgr, minRuns, maxRuns, texLive, outputDir, texInputDirs, quiet) {
    let runCount = 0;
    minRuns = minRuns - 1;
    while(true){
        if (runCount >= maxRuns) {
            if (!quiet) {
                warning(`maximum number of runs (${maxRuns}) reached`, kLatexHeaderMessageOptions);
            }
            break;
        }
        if (!quiet) {
            info(`running ${engine.pdfEngine} - ${runCount + 2}`, kLatexHeaderMessageOptions);
        }
        const result1 = await runPdfEngine(input, engine, texLive, outputDir, texInputDirs, pkgMgr, quiet);
        if (!result1.result.success) {
            displayError("Error compiling latex", result1.log, result1.result);
            return Promise.reject();
        } else {
            runCount = runCount + 1;
            if (existsSync(result1.log) && needsRecompilation(result1.log) || runCount < minRuns) {
                continue;
            }
            break;
        }
    }
}
function containsBiblioData(auxData) {
    return auxData.match(/^\\(bibdata|citation|bibstyle)\{/m);
}
function auxFile(stem, ext) {
    return `${stem}.${ext}`;
}
function cleanup(workingDir, stem) {
    const auxFiles = [
        "log",
        "idx",
        "aux",
        "bcf",
        "blg",
        "bbl",
        "fls",
        "out",
        "lof",
        "lot",
        "toc",
        "nav",
        "snm",
        "vrb",
        "ilg",
        "ind",
        "xwm",
        "brf",
        "run.xml", 
    ].map((aux)=>join3(workingDir, auxFile(stem, aux)));
    auxFiles.push(join3(workingDir, kMissingFontLog));
    auxFiles.forEach((auxFile)=>{
        if (existsSync(auxFile)) {
            Deno.removeSync(auxFile);
        }
    });
}
function texSafeFilename(file) {
    return file.replaceAll(/[ <>()|\:&;#?*']/g, "-");
}
function texToPdfOutputRecipe(input, finalOutput, options, format, pdfIntermediateTo, pdfGenerator, pdfOutputDir) {
    const [inputDir, inputStem] = dirAndStem(input);
    const texStem = texSafeFilename(inputStem);
    const output = texStem + ".tex";
    let args = options.pandocArgs || [];
    const pandoc = {
        ...format.pandoc
    };
    if (options.flags?.output) {
        args = replacePandocOutputArg(args, output);
    } else {
        pandoc[kOutputFile] = output;
    }
    const complete = async (pandocOptions)=>{
        const input = join3(inputDir, output);
        const pdfOutput = await pdfGenerator(input, format, pandocOptions);
        const compileTex = join3(inputDir, output);
        if (!format.render[kKeepTex]) {
            Deno.removeSync(compileTex);
        }
        const normalizePath = (input, output)=>{
            if (isAbsolute2(output)) {
                return output;
            } else {
                return relative2(Deno.realPathSync(dirname2(input)), Deno.realPathSync(output));
            }
        };
        if (finalOutput) {
            if (finalOutput === kStdOut) {
                writeFileToStdout(pdfOutput);
                Deno.removeSync(pdfOutput);
            } else {
                const outputPdf = expandPath(finalOutput);
                if (normalize3(pdfOutput) !== normalize3(outputPdf)) {
                    ensureDirSync(dirname2(outputPdf));
                    Deno.renameSync(pdfOutput, outputPdf);
                }
            }
            if (pdfOutputDir) {
                try {
                    Deno.removeSync(pdfOutputDir, {
                        recursive: false
                    });
                } catch  {}
            }
            return normalizePath(input, finalOutput);
        } else {
            return normalizePath(input, pdfOutput);
        }
    };
    const to = format.pandoc.to === "pdf" ? pdfIntermediateTo : format.pandoc.to;
    return {
        output,
        keepYaml: false,
        args,
        format: {
            ...format,
            pandoc: {
                ...pandoc,
                to
            }
        },
        complete
    };
}
function useContextPdfOutputRecipe(format, flags) {
    const kContextPdfEngine = "context";
    if (format.pandoc.to === "pdf" && format.render[kOutputExt] === "pdf") {
        const engine = pdfEngine(format.pandoc, format.render, flags);
        return engine.pdfEngine === kContextPdfEngine;
    } else {
        return false;
    }
}
function contextPdfOutputRecipe(input, finalOutput, options, format) {
    const pdfGenerator = async (input, format, pandocOptions)=>{
        const engine = pdfEngine(format.pandoc, format.render, pandocOptions.flags);
        const cmd = [
            "context",
            input
        ];
        if (engine.pdfEngineOpts) {
            cmd.push(...engine.pdfEngineOpts);
        }
        cmd.push("--purgeall", "--batchmode");
        const result1 = await execProcess({
            cmd
        });
        if (result1.success) {
            const [dir, stem] = dirAndStem(input);
            return join3(dir, stem + ".pdf");
        } else {
            throw new Error();
        }
    };
    return texToPdfOutputRecipe(input, finalOutput, options, format, "context", pdfGenerator);
}
function useQuartoLatexmk(format, flags) {
    const to = format.pandoc.to;
    const ext = format.render[kOutputExt] || "html";
    if (format.render[kLatexAutoMk] === false) {
        return false;
    }
    if ([
        "beamer",
        "pdf"
    ].includes(to || "") && ext === "pdf") {
        const engine = pdfEngine(format.pandoc, format.render, flags);
        return isLatexPdfEngine(engine) && engine.pdfEngine !== "latexmk";
    }
    return false;
}
function quartoLatexmkOutputRecipe(input, finalOutput, options, format) {
    const outputDir = format.render[kLatexOutputDir];
    const pdfGenerator = (input, format, pandocOptions)=>{
        const texInputDirs = [];
        if (format.render[kLatexInputPaths]) {
            texInputDirs.push(...format.render[kLatexInputPaths]);
        }
        const mkOptions = {
            input,
            engine: pdfEngine(format.pandoc, format.render, pandocOptions.flags),
            autoInstall: format.render[kLatexAutoInstall],
            autoMk: format.render[kLatexAutoMk],
            minRuns: format.render[kLatexMinRuns],
            maxRuns: format.render[kLatexMaxRuns],
            tinyTex: format.render[kLatexTinyTex],
            texInputDirs,
            outputDir: outputDir === null ? undefined : outputDir,
            clean: !options.flags?.debug && format.render[kLatexClean] !== false,
            quiet: pandocOptions.flags?.quiet
        };
        return generatePdf(mkOptions);
    };
    return texToPdfOutputRecipe(input, finalOutput, options, format, "latex", pdfGenerator, outputDir);
}
function outputRecipe(context) {
    const input = context.target.input;
    const options = context.options;
    const format = context.format;
    let output = options.flags?.output;
    if (!output) {
        const outputFile = formatOutputFile(format);
        if (outputFile) {
            if (outputFile.match(SEP_PATTERN)) {
                throw new Error(`\nIn file ${context.target.source}\n  Invalid value for \`output-file\`: paths are not allowed`);
            }
            output = join3(dirname2(input), outputFile);
        } else {
            output = "";
        }
    }
    if (useQuartoLatexmk(format, options.flags)) {
        return quartoLatexmkOutputRecipe(input, output, options, format);
    } else if (useContextPdfOutputRecipe(format, options.flags)) {
        return contextPdfOutputRecipe(input, output, options, format);
    } else {
        const completeActions = [];
        const recipe = {
            output,
            keepYaml: false,
            args: options.pandocArgs || [],
            format: {
                ...format
            },
            complete: ()=>{
                completeActions.forEach((action)=>action());
                return Promise.resolve();
            }
        };
        resolveKeepSource(recipe.format, context.engine, context.target);
        const updateOutput = (output)=>{
            recipe.output = output;
            if (options.flags?.output) {
                recipe.args = replacePandocOutputArg(recipe.args, output);
            } else {
                recipe.format.pandoc[kOutputFile] = output;
            }
        };
        const ext = format.render[kOutputExt] || "html";
        const [inputDir, inputStem] = dirAndStem(input);
        if (format.render[kVariant]) {
            const to = format.pandoc.to;
            const variant = format.render[kVariant];
            recipe.format = {
                ...recipe.format,
                pandoc: {
                    ...recipe.format.pandoc,
                    to: `${to}${variant}`
                }
            };
            if (recipe.format.pandoc.to?.includes(`+${kYamlMetadataBlock}`)) {
                recipe.keepYaml = true;
            }
        }
        if (recipe.keepYaml) {
            completeActions.push(()=>{
                const inputMd = partitionYamlFrontMatter(context.target.markdown.value);
                if (inputMd) {
                    const outputFile = isAbsolute2(recipe.output) ? recipe.output : join3(dirname2(context.target.input), recipe.output);
                    const output = Deno.readTextFileSync(outputFile);
                    const outputMd = partitionYamlFrontMatter(Deno.readTextFileSync(outputFile));
                    const markdown = outputMd?.markdown || output;
                    Deno.writeTextFileSync(outputFile, inputMd.yaml + "\n\n" + markdown);
                }
            });
        }
        if (!recipe.output) {
            let outputExt = ext;
            if (extname2(input) === ".md" && ext === "md") {
                outputExt = `${format.pandoc.to}.md`;
            }
            let output1 = inputStem + "." + outputExt;
            if (output1 === basename2(context.target.source)) {
                output1 = inputStem + ".out." + outputExt;
            }
            updateOutput(output1);
        } else if (recipe.output === kStdOut) {
            updateOutput(options.services.temp.createFile({
                suffix: "." + ext
            }));
            completeActions.push(()=>{
                writeFileToStdout(recipe.output);
                Deno.removeSync(recipe.output);
            });
        } else if (!isAbsolute2(recipe.output)) {
            updateOutput(relative2(inputDir, recipe.output));
        } else {
            updateOutput(expandPath(recipe.output));
        }
        return recipe;
    }
}
const kProjectFreezeDir = "_freeze";
const kOldFreezeExecuteResults = "execute";
const kFreezeExecuteResults = "execute-results";
function freezeExecuteResult(input, output, result1) {
    result1 = cloneDeep1(result1);
    const resolveIncludes = (name)=>{
        if (result1.includes) {
            if (result1.includes[name]) {
                result1.includes[name] = result1.includes[name].map((file)=>Deno.readTextFileSync(file));
            }
        }
    };
    resolveIncludes(kIncludeInHeader);
    resolveIncludes(kIncludeBeforeBody);
    resolveIncludes(kIncludeAfterBody);
    result1.supporting = result1.supporting.map((file)=>{
        if (isAbsolute2(file)) {
            return relative2(Deno.realPathSync(dirname2(input)), file);
        } else {
            return file;
        }
    });
    const hash = freezeInputHash(input);
    const freezeJsonFile = freezeResultFile(input, output, true);
    Deno.writeTextFileSync(freezeJsonFile, JSON.stringify({
        hash,
        result: result1
    }, undefined, 2));
    return freezeJsonFile;
}
function defrostExecuteResult(source, output, temp, force = false) {
    const resultFile = freezeResultFile(source, output);
    if (existsSync(resultFile)) {
        const { hash , result: result1  } = JSON.parse(Deno.readTextFileSync(resultFile));
        if (force || hash === freezeInputHash(source)) {
            result1.supporting = result1.supporting.map((file)=>join3(Deno.realPathSync(dirname2(source)), file));
            const resolveIncludes = (name)=>{
                if (result1.includes) {
                    if (result1.includes[name]) {
                        result1.includes[name] = result1.includes[name].map((content)=>{
                            const includeFile = temp.createFile();
                            Deno.writeTextFileSync(includeFile, content);
                            return includeFile;
                        });
                    }
                }
            };
            resolveIncludes(kIncludeInHeader);
            resolveIncludes(kIncludeBeforeBody);
            resolveIncludes(kIncludeAfterBody);
            return result1;
        }
    }
}
function projectFreezerDir(dir, hidden) {
    const freezeDir = hidden ? projectScratchPath(dir, kProjectFreezeDir) : join3(dir, kProjectFreezeDir);
    ensureDirSync(freezeDir);
    return Deno.realPathSync(freezeDir);
}
function copyToProjectFreezer(project, file, hidden, incremental) {
    const freezerDir = projectFreezerDir(project.dir, hidden);
    const srcFilesDir = join3(project.dir, file);
    const destFilesDir = join3(freezerDir, asFreezerDir(file));
    if (incremental) {
        for (const dir of Deno.readDirSync(srcFilesDir)){
            if (dir.name === kFreezeExecuteResults) {
                const resultsDir = join3(srcFilesDir, dir.name);
                const destResultsDir = join3(destFilesDir, kFreezeExecuteResults);
                ensureDirSync(destResultsDir);
                for (const json of Deno.readDirSync(resultsDir)){
                    if (json.isFile) {
                        copyTo(join3(resultsDir, json.name), join3(destResultsDir, json.name));
                    }
                }
            } else {
                copyMinimal(join3(srcFilesDir, dir.name), join3(destFilesDir, dir.name));
            }
        }
    } else {
        copyMinimal(srcFilesDir, destFilesDir);
    }
}
function copyFromProjectFreezer(project, file, hidden) {
    const freezerDir = projectFreezerDir(project.dir, hidden);
    const srcFilesDir = join3(freezerDir, asFreezerDir(file));
    const destFilesDir = join3(project.dir, file);
    if (existsSync(srcFilesDir)) {
        copyMinimal(srcFilesDir, destFilesDir);
    }
}
function pruneProjectFreezerDir(project, dir, files, hidden) {
    const freezerDir = projectFreezerDir(project.dir, hidden);
    files.map((file)=>{
        const filePath = join3(freezerDir, dir, file);
        safeRemoveIfExists(filePath);
    });
    removeIfEmptyDir(join3(freezerDir, dir));
}
function pruneProjectFreezer(project, hidden) {
    const freezerDir = projectFreezerDir(project.dir, hidden);
    const libDir = project.config?.project[kProjectLibDir];
    if (libDir) {
        let remove = true;
        for (const entry of Deno.readDirSync(freezerDir)){
            if (entry.isFile || entry.name !== libDir) {
                remove = false;
                break;
            }
        }
        if (remove) {
            removeIfExists(freezerDir);
        }
    } else {
        removeIfEmptyDir(freezerDir);
    }
}
function freezerFreezeFile(project, freezeFile) {
    const filesDir = asFreezerDir(dirname2(dirname2(freezeFile)));
    return join3(project.dir, kProjectFreezeDir, filesDir, kFreezeExecuteResults, basename2(freezeFile));
}
function freezerFigsDir(project, filesDir, figsDir) {
    return join3(project.dir, kProjectFreezeDir, asFreezerDir(filesDir), figsDir);
}
function freezeResultFile(input, output, ensureDir = false) {
    const filesDir = join3(dirname2(input), inputFilesDir(input));
    const freezeDir = join3(filesDir, kFreezeExecuteResults);
    if (ensureDir) {
        ensureDirSync(freezeDir);
    }
    return join3(freezeDir, extname2(output).slice(1) + ".json");
}
function removeFreezeResults(filesDir) {
    const freezeDir = join3(filesDir, kFreezeExecuteResults);
    removeIfExists(freezeDir);
    const oldFreezeDir = join3(filesDir, kOldFreezeExecuteResults);
    removeIfExists(oldFreezeDir);
    if (existsSync(filesDir)) {
        removeIfEmptyDir(filesDir);
    }
}
function freezeInputHash(input) {
    return md5Hash(Deno.readTextFileSync(input));
}
function asFreezerDir(dir) {
    return dir.replace(/_files$/, "");
}
function pdfFormat() {
    return mergeConfigs(createPdfFormat(), {
        extensions: {
            book: pdfBookExtension
        }
    });
}
function beamerFormat() {
    return createFormat("pdf", createPdfFormat(false, false), {
        execute: {
            [kFigWidth]: 10,
            [kFigHeight]: 7,
            [kEcho]: false,
            [kWarning]: false
        }
    });
}
function latexFormat() {
    return createFormat("tex", createPdfFormat());
}
function createPdfFormat(autoShiftHeadings = true, koma = true) {
    return createFormat("pdf", {
        execute: {
            [kFigWidth]: 5.5,
            [kFigHeight]: 3.5,
            [kFigFormat]: "pdf",
            [kFigDpi]: 300
        },
        pandoc: {
            [kPdfEngine]: "xelatex",
            standalone: true,
            variables: {
                graphics: true,
                tables: true
            },
            [kDefaultImageExtension]: "pdf"
        },
        metadata: {
            ["block-headings"]: true
        },
        formatExtras: (_input, markdown, flags, format, _libDir, temp)=>{
            const extras = {};
            const engine = pdfEngine(format.pandoc, format.render, flags);
            if (!isLatexPdfEngine(engine)) {
                return extras;
            }
            extras.postprocessors = [
                pdfLatexPostProcessor(flags, format, temp)
            ];
            const documentclass = format.metadata[kDocumentClass];
            const usingCustomTemplates = format.pandoc.template !== undefined || format.metadata[kTemplatePartials] !== undefined;
            if (usingCustomTemplates || documentclass && ![
                "srcbook",
                "scrreprt",
                "scrreport",
                "scrartcl",
                "scrarticle", 
            ].includes(documentclass)) {
                koma = false;
            }
            if (koma) {
                const captionOptions = [];
                const tblCaploc = tblCapLocation(format);
                captionOptions.push(tblCaploc === kCapTop ? "tableheading" : "tablesignature");
                if (figCapLocation(format) === kCapTop) {
                    captionOptions.push("figureheading");
                }
                const defaultClassOptions = [
                    "DIV=11"
                ];
                if (format.metadata[kLang] !== "de") {
                    defaultClassOptions.push("numbers=noendperiod");
                }
                const userClassOptions = format.metadata[kClassOption];
                const classOptions = defaultClassOptions.filter((option)=>{
                    if (Array.isArray(userClassOptions)) {
                        const name = option.split("=")[0];
                        return !userClassOptions.some((userOption)=>String(userOption).startsWith(name + "="));
                    } else {
                        return true;
                    }
                });
                const headerIncludes = [];
                headerIncludes.push("\\KOMAoption{captions}{" + captionOptions.join(",") + "}");
                extras.metadata = {
                    [kDocumentClass]: "scrartcl",
                    [kClassOption]: classOptions,
                    [kPaperSize]: "letter",
                    [kHeaderIncludes]: headerIncludes
                };
            }
            const partialNames = [
                "before-bib",
                "biblio",
                "citations",
                "doc-class",
                "graphics",
                "after-body",
                "before-body",
                "pandoc",
                "tables",
                "tightlist",
                "title",
                "toc", 
            ];
            extras.templateContext = {
                template: formatResourcePath("pdf", "pandoc/template.tex"),
                partials: partialNames.map((name)=>{
                    return formatResourcePath("pdf", `pandoc/${name}.tex`);
                })
            };
            const hasLevelOneHeadings = !!markdown.match(/\n^#\s.*$/gm);
            if (!hasLevelOneHeadings && autoShiftHeadings && (flags?.[kNumberSections] === true || format.pandoc[kNumberSections] === true) && flags?.[kTopLevelDivision] === undefined && format.pandoc?.[kTopLevelDivision] === undefined && flags?.[kShiftHeadingLevelBy] === undefined && format.pandoc?.[kShiftHeadingLevelBy] === undefined) {
                extras.pandoc = {
                    [kShiftHeadingLevelBy]: -1
                };
            }
            extras.pandoc = extras.pandoc || {};
            if (documentclass === "scrbook" && format.pandoc[kNumberSections] !== false && flags[kNumberSections] !== false) {
                extras.pandoc[kNumberSections] = true;
            }
            return extras;
        }
    });
}
const pdfBookExtension = {
    onSingleFilePostRender: (project, renderedFile)=>{
        if (renderedFile.format.render[kKeepTex]) {
            const finalOutputFile = renderedFile.file;
            const texOutputFile = texSafeFilename(basename2(finalOutputFile, extname2(finalOutputFile))) + ".tex";
            Deno.renameSync(join3(project.dir, "index.tex"), join3(project.dir, texOutputFile));
        }
    }
};
function pdfLatexPostProcessor(flags, format, temp) {
    return async (output)=>{
        const lineProcessors = [
            sidecaptionLineProcessor(),
            calloutFigureHoldLineProcessor(), 
        ];
        const marginCites = format.metadata[kCitationLocation];
        const renderedCites = {};
        if (marginCites) {
            if (format.pandoc[kCiteMethod] === "biblatex") {
                lineProcessors.push(suppressBibLatexBibliographyLineProcessor());
                lineProcessors.push(bibLatexCiteLineProcessor());
            } else if (format.pandoc[kCiteMethod] === "natbib") {
                lineProcessors.push(suppressNatbibBibliographyLineProcessor());
                lineProcessors.push(natbibCiteLineProcessor());
            } else {
                lineProcessors.push(indexAndSuppressPandocBibliography(renderedCites));
            }
        }
        if (tblCapLocation(format) === kCapBottom) {
            lineProcessors.push(longtableBottomCaptionProcessor());
        }
        if (marginRefs(flags, format)) {
            lineProcessors.push(sideNoteLineProcessor());
        }
        lineProcessors.push(captionFootnoteLineProcessor());
        await processLines(output, lineProcessors, temp);
        if (Object.keys(renderedCites).length > 0) {
            await processLines(output, [
                placePandocBibliographyEntries(renderedCites), 
            ], temp);
        }
    };
}
function tblCapLocation(format) {
    return format.metadata[kTblCapLoc] || format.metadata[kCapLoc] || kCapTop;
}
function figCapLocation(format) {
    return format.metadata[kFigCapLoc] || format.metadata[kCapLoc] || kCapBottom;
}
function marginRefs(flags, format) {
    return format.pandoc[kReferenceLocation] === "margin" || flags[kReferenceLocation] === "margin";
}
async function processLines(inputFile, lineProcessors, temp) {
    const outputFile = temp.createFile({
        suffix: ".tex"
    });
    const file = await Deno.open(inputFile);
    try {
        for await (const line of readLines(file)){
            let processedLine = line;
            for (const processor of lineProcessors){
                if (processedLine !== undefined) {
                    processedLine = processor(processedLine);
                }
            }
            if (processedLine !== undefined) {
                Deno.writeTextFileSync(outputFile, processedLine + "\n", {
                    append: true
                });
            }
        }
    } finally{
        file.close();
        copyTo(outputFile, inputFile);
    }
}
const kBeginScanRegex = /^%quartopost-sidecaption-206BE349/;
const kEndScanRegex = /^%\/quartopost-sidecaption-206BE349/;
const sidecaptionLineProcessor = ()=>{
    let state = "scanning";
    return (line)=>{
        switch(state){
            case "scanning":
                if (line.match(kBeginScanRegex)) {
                    state = "replacing";
                    return kbeginLongTablesideCap;
                } else {
                    return line;
                }
            case "replacing":
                if (line.match(kEndScanRegex)) {
                    state = "scanning";
                    return kEndLongTableSideCap;
                } else {
                    return line;
                }
        }
    };
};
const readBalancedCommand = (latex)=>{
    let braceCount = 0;
    let entered = false;
    const chars = [];
    for(let i1 = 0; i1 < latex.length; i1++){
        const __char = latex.charAt(i1);
        if (__char === "{") {
            braceCount++;
            entered = true;
        } else if (__char === "}") {
            braceCount--;
        }
        chars.push(__char);
        if (entered && braceCount === 0) {
            break;
        }
    }
    return chars.join("");
};
const processElementCaptionFootnotes = (latexFigure)=>{
    const footnoteMark = "\\footnote{";
    const captionMark = "\\caption{";
    const contents = [];
    const captionIndex = latexFigure.indexOf(captionMark);
    if (captionIndex > -1) {
        contents.push(latexFigure.substring(0, captionIndex));
        const captionStartStr = latexFigure.slice(captionIndex);
        const captionLatex = readBalancedCommand(captionStartStr);
        const figureSuffix = captionStartStr.slice(captionLatex.length);
        let captionContents = captionLatex.slice(captionMark.length, captionLatex.length - 1);
        let footNoteIndex = captionContents.indexOf(footnoteMark);
        if (footNoteIndex > -1) {
            const captionText = [];
            const captionWithNote = [];
            const footNotes = [];
            while(footNoteIndex > -1){
                const prefix = captionContents.substring(0, footNoteIndex);
                captionContents = captionContents.slice(footNoteIndex);
                captionText.push(prefix);
                captionWithNote.push(prefix);
                const footnoteLatex = readBalancedCommand(captionContents);
                captionContents = captionContents.slice(footnoteLatex.length);
                footNoteIndex = captionContents.indexOf(footnoteMark);
                captionWithNote.push("\\footnotemark{}");
                footNotes.push(footnoteLatex.slice(footnoteMark.length, footnoteLatex.length - 1));
            }
            captionText.push(captionContents);
            captionWithNote.push(captionContents);
            contents.push(`\\caption[${captionText.join("")}]{${captionWithNote.join("")}}`);
            contents.push(figureSuffix);
            contents.push("\n");
            if (footNotes.length > 1) {
                contents.push(`\\addtocounter{footnote}{-${footNotes.length - 1}}`);
            }
            for(let i1 = 0; i1 < footNotes.length; i1++){
                contents.push(`\\footnotetext{${footNotes[i1]}}`);
                if (footNotes.length > 1 && i1 < footNotes.length - 1) {
                    contents.push(`\\addtocounter{footnote}{1}`);
                }
            }
            return contents.join("");
        } else {
            return latexFigure;
        }
    } else {
        return latexFigure;
    }
};
const captionFootnoteLineProcessor = ()=>{
    let state = "scanning";
    let capturedLines = [];
    return (line)=>{
        switch(state){
            case "scanning":
                if (line.match(/^\\begin{figure}$/)) {
                    state = "capturing";
                    capturedLines = [
                        line
                    ];
                    return undefined;
                } else {
                    return line;
                }
            case "capturing":
                capturedLines.push(line);
                if (line.match(/^\\end{figure}$/)) {
                    state = "scanning";
                    const lines = capturedLines.join("\n");
                    capturedLines = [];
                    return processElementCaptionFootnotes(lines);
                } else {
                    return undefined;
                }
        }
    };
};
const calloutFigureHoldLineProcessor = ()=>{
    let state = "scanning";
    return (line)=>{
        switch(state){
            case "scanning":
                if (line.match(/^\\begin{tcolorbox}/)) {
                    state = "replacing";
                    return line;
                } else {
                    return line;
                }
            case "replacing":
                if (line.match(/^\\end{tcolorbox}/)) {
                    state = "scanning";
                    return line;
                } else if (line.match(/^\\begin{figure}$/)) {
                    return "\\begin{figure}[H]";
                } else {
                    return line;
                }
        }
    };
};
const suppressBibLatexBibliographyLineProcessor = ()=>{
    return (line)=>{
        if (line.match(/^\\printbibliography$/)) {
            return "";
        }
        return line;
    };
};
const suppressNatbibBibliographyLineProcessor = ()=>{
    return (line)=>{
        return line.replace(/^\s*\\bibliography{(.*)}$/, (_match, bib)=>{
            return `\\newsavebox\\mytempbib
\\savebox\\mytempbib{\\parbox{\\textwidth}{\\bibliography{${bib}}}}`;
        });
    };
};
const kQuartoCiteRegex = /{\?quarto-cite:(.*?)}/g;
const bibLatexCiteLineProcessor = ()=>{
    return (line)=>{
        return line.replaceAll(kQuartoCiteRegex, (_match, citeKey)=>{
            return `\\fullcite{${citeKey}}`;
        });
    };
};
const natbibCiteLineProcessor = ()=>{
    return (line)=>{
        return line.replaceAll(kQuartoCiteRegex, (_match, citeKey)=>{
            return `\\bibentry{${citeKey}}`;
        });
    };
};
const sideNoteLineProcessor = ()=>{
    return (line)=>{
        return line.replaceAll(/\\footnote{/g, "\\sidenote{\\footnotesize ");
    };
};
const longtableBottomCaptionProcessor = ()=>{
    let scanning = false;
    let capturing = false;
    let caption;
    return (line)=>{
        const isEndOfDocument = !!line.match(/^\\end{document}/);
        if (isEndOfDocument && caption) {
            return `${caption}\n${line}`;
        } else if (scanning) {
            if (capturing) {
                caption = `${caption}\n${line}`;
                capturing = !line.match(/\\tabularnewline$/);
                return undefined;
            } else {
                if (line.match(/^\\caption.*?\\tabularnewline$/)) {
                    caption = line;
                    return undefined;
                } else if (line.match(/^\\caption.*?/)) {
                    caption = line;
                    capturing = true;
                    return undefined;
                } else if (line.match(/^\\end{longtable}$/)) {
                    scanning = false;
                    if (caption) {
                        line = caption + "\n" + line;
                        caption = undefined;
                        return line;
                    }
                }
            }
        } else {
            scanning = !!line.match(/^\\begin{longtable}/);
        }
        return line;
    };
};
const indexAndSuppressPandocBibliography = (renderedCites)=>{
    let consuming = false;
    let currentCiteKey = undefined;
    return (line)=>{
        if (!consuming && line.match(/^\\hypertarget{refs}{}$/)) {
            consuming = true;
            return undefined;
        } else if (consuming && line.match(/^\\end{CSLReferences}$/)) {
            consuming = false;
            return undefined;
        } else if (consuming) {
            const matches = line.match(/pre{\\hypertarget{ref\-(.*?)}{}}\%/);
            if (matches && matches[1]) {
                currentCiteKey = matches[1];
                renderedCites[currentCiteKey] = [
                    line.replace("pre{\\hypertarget{ref", "pre{\\protect\\hypertarget{ref"), 
                ];
            } else if (line.length === 0) {
                currentCiteKey = undefined;
            } else if (currentCiteKey) {
                renderedCites[currentCiteKey].push(line);
            }
        }
        if (consuming) {
            return undefined;
        } else {
            return line;
        }
    };
};
const placePandocBibliographyEntries = (renderedCites)=>{
    return (line)=>{
        return line.replaceAll(kQuartoCiteRegex, (_match, citeKey)=>{
            const citeLines = renderedCites[citeKey];
            if (citeLines) {
                return citeLines.join("\n");
            } else {
                return citeKey;
            }
        });
    };
};
const kbeginLongTablesideCap = `{
\\makeatletter
\\def\\LT@makecaption#1#2#3{%
  \\noalign{\\smash{\\hbox{\\kern\\textwidth\\rlap{\\kern\\marginparsep
  \\parbox[t]{\\marginparwidth}{%
    \\footnotesize{%
      \\vspace{(1.1\\baselineskip)}
    #1{#2: }\\ignorespaces #3}}}}}}%
    }
\\makeatother`;
const kEndLongTableSideCap = "}";
function epubFormat() {
    return mergeConfigs(createEbookFormat("epub"), {
        extensions: {
            book: epubBookExtension
        }
    });
}
const epubBookExtension = {
    onSingleFilePreRender: (format, config)=>{
        if (!format.pandoc[kEPubCoverImage] && !format.metadata[kBookCoverImage]) {
            const coverImage = bookConfig(kBookCoverImage, config);
            if (coverImage) {
                format.metadata[kBookCoverImage] = coverImage;
            }
        }
        return format;
    }
};
const kIconCaution = "icon-caution";
const kIconImportant = "icon-important";
const kIconNote = "icon-note";
const kIconTip = "icon-tip";
const kIconWarning = "icon-warning";
function docxFormat() {
    return mergeConfigs(createWordprocessorFormat("docx"), {
        formatExtras: ()=>{
            return {
                [kFilterParams]: {
                    [kIconCaution]: iconPath("caution.png"),
                    [kIconImportant]: iconPath("important.png"),
                    [kIconNote]: iconPath("note.png"),
                    [kIconTip]: iconPath("tip.png"),
                    [kIconWarning]: iconPath("warning.png")
                }
            };
        },
        extensions: {
            book: {}
        }
    });
}
function iconPath(icon) {
    return formatResourcePath("docx", icon);
}
function optionsToKebab(options) {
    return options.reduce((options, option)=>{
        const kebab = camelToKebab(option);
        if (kebab !== option) {
            options.push(kebab);
        }
        return options;
    }, []);
}
function revealMetadataFilter(metadata, kebabOptions = kRevealKebabOptions) {
    const filtered = {};
    Object.keys(metadata).forEach((key)=>{
        const value = metadata[key];
        if (kebabOptions.includes(key)) {
            filtered[kebabToCamel(key)] = value;
        } else {
            filtered[key] = value;
        }
    });
    return filtered;
}
const kRevealOptions = [
    "controls",
    "controlsTutorial",
    "controlsLayout",
    "controlsBackArrows",
    "progress",
    "slideNumber",
    "showSlideNumber",
    "hash",
    "hashOneBasedIndex",
    "respondToHashChanges",
    "history",
    "keyboard",
    "overview",
    "disableLayout",
    "center",
    "touch",
    "loop",
    "rtl",
    "navigationMode",
    "shuffle",
    "fragments",
    "fragmentInURL",
    "embedded",
    "help",
    "pause",
    "showNotes",
    "autoPlayMedia",
    "preloadIframes",
    "autoAnimate",
    "autoAnimateMatcher",
    "autoAnimateEasing",
    "autoAnimateDuration",
    "autoAnimateUnmatched",
    "autoAnimateStyles",
    "autoSlide",
    "autoSlideStoppable",
    "autoSlideMethod",
    "defaultTiming",
    "mouseWheel",
    "display",
    "hideInactiveCursor",
    "hideCursorTime",
    "previewLinks",
    "transition",
    "transitionSpeed",
    "backgroundTransition",
    "viewDistance",
    "mobileViewDistance",
    "parallaxBackgroundImage",
    "parallaxBackgroundSize",
    "parallaxBackgroundHorizontal",
    "parallaxBackgroundVertical",
    "width",
    "height",
    "margin",
    "minScale",
    "maxScale",
    "mathjax",
    "pdfSeparateFragments",
    "pdfPageHeightOffset", 
];
const kRevealKebabOptions = optionsToKebab(kRevealOptions);
const kRevealJsMultiplex = "multiplex";
function revealMultiplexPlugin(format) {
    if (format.metadata[kRevealJsMultiplex]) {
        return formatResourcePath("revealjs", join3("plugins", "multiplex"));
    } else {
        return undefined;
    }
}
function revealMuliplexPreviewFile(file) {
    const speakerFile = revealSpeakerOutput(file);
    if (existsSync(speakerFile) && existsSync(file)) {
        const modTime = Deno.statSync(file).mtime;
        const speakerModTime = Deno.statSync(speakerFile).mtime;
        if (modTime && speakerModTime && speakerModTime > modTime) {
            return speakerFile;
        }
    }
    return file;
}
function revealMultiplexExtras(format, flags) {
    if (format.metadata[kRevealJsMultiplex]) {
        return {
            postprocessors: [
                async (output)=>{
                    const token = await revealMultiplexToken(format, output);
                    const content = await Deno.readTextFile(output);
                    const speakerContent = withMultiplexToken(content, token);
                    token.secret = null;
                    const clientContent = withMultiplexToken(content, token).replace(/(\/\/ reveal\.js plugins\n\s*plugins: \[[^\[]+?)(RevealNotes,)([^\[]+?\])/, "$1$3");
                    await Deno.writeTextFile(output, clientContent);
                    const speakerOutput = revealSpeakerOutput(output);
                    await Deno.writeTextFile(speakerOutput, speakerContent);
                    const selfContained = isSelfContainedOutput(flags, format, speakerOutput);
                    if (selfContained) {
                        await pandocIngestSelfContainedContent(speakerOutput);
                    }
                }
            ]
        };
    } else {
        return undefined;
    }
}
function revealSpeakerOutput(output) {
    const [dir, stem] = dirAndStem(output);
    return join3(dir, `${stem}-speaker.html`);
}
const kDefaultMultiplexUrl = "https://reveal-multiplex.glitch.me/";
async function revealMultiplexToken(format, output) {
    const multiplex = format.metadata[kRevealJsMultiplex];
    if (typeof multiplex === "object" && typeof multiplex.secret === "string" && typeof multiplex.id === "string") {
        multiplex.url = multiplex.url || kDefaultMultiplexUrl;
        return multiplex;
    }
    const speakerOutput = revealSpeakerOutput(output);
    if (existsSync(speakerOutput)) {
        const speakerContent = await Deno.readTextFile(speakerOutput);
        const initPos = speakerContent.lastIndexOf("Reveal.initialize({");
        if (initPos !== -1) {
            const initLines = lines(speakerContent.substring(initPos));
            const kMultiplexStart = "'multiplex': {";
            const kMultiplexEnd = "},";
            for (const line of initLines){
                if (line.startsWith(kMultiplexStart) && line.endsWith(kMultiplexEnd)) {
                    const multiplexJson = "{ " + line.substring(kMultiplexStart.length, line.length - kMultiplexEnd.length) + " }";
                    const multiplex1 = JSON.parse(multiplexJson);
                    if (!!multiplex1.id && !!multiplex1.secret) {
                        return multiplex1;
                    }
                }
            }
        }
    }
    const url = typeof multiplex === "object" ? multiplex.url || kDefaultMultiplexUrl : kDefaultMultiplexUrl;
    try {
        const response = await fetch(pathWithForwardSlashes(join3(url, "token")));
        const jsonData = await response.json();
        const multiplex2 = {
            secret: jsonData.secret,
            id: jsonData.socketId,
            url
        };
        return multiplex2;
    } catch (e) {
        throw Error("Error attempting to provision multiplex token from '" + url + "': " + e.message);
    }
}
function withMultiplexToken(content, token) {
    return content.replace(/(Reveal.initialize\({[\s\S]*?'multiplex': )({.*?},)/g, `$1${JSON.stringify(token)},`);
}
const scriptSchema = anyOfSchema(stringSchema, objectSchema({
    properties: {
        path: stringSchema,
        "async": booleanSchema
    },
    required: [
        "path"
    ]
}));
const revealPluginSchema = idSchema(objectSchema({
    properties: {
        path: stringSchema,
        name: stringSchema,
        register: booleanSchema,
        script: anyOfSchema(scriptSchema, arraySchema(scriptSchema)),
        stylesheet: anyOfSchema(stringSchema, arraySchema(stringSchema)),
        [kSelfContained]: booleanSchema
    },
    required: [
        "name"
    ]
}), "plugin-reveal");
const kRevealjsPlugins = "revealjs-plugins";
const kRevealSlideTone = "slide-tone";
const kRevealMenu = "menu";
const kRevealChalkboard = "chalkboard";
const kRevealPluginOptions = [
    "side",
    "width",
    "numbers",
    "titleSelector",
    "useTextContentForMissingTitles",
    "hideMissingTitles",
    "markers",
    "custom",
    "themes",
    "themesPath",
    "transitions",
    "openButton",
    "openSlideNumber",
    "keyboard",
    "sticky",
    "autoOpen",
    "delayInit",
    "openOnInit",
    "loadIcons",
    "boardmarkerWidth",
    "chalkWidth",
    "chalkEffect",
    "storage",
    "src",
    "readOnly",
    "transition",
    "theme",
    "background",
    "grid",
    "eraser",
    "boardmarkers",
    "chalks",
    "rememberColor",
    "pdfExportShortcut", 
];
const kRevealPluginKebabOptions = optionsToKebab(kRevealPluginOptions);
function isPluginBundle(plugin) {
    return plugin.plugin !== undefined;
}
async function revealPluginExtras(input, format, flags, temp, revealUrl, revealDestDir, extensionContext, project) {
    const pluginsDestDir = join3(revealDestDir, "plugin");
    const register = [];
    const scripts = [];
    const stylesheets = [];
    const config = {};
    const metadata = [];
    const dependencies = [];
    const pluginBundles = [
        {
            plugin: formatResourcePath("revealjs", join3("plugins", "line-highlight"))
        },
        {
            plugin: formatResourcePath("revealjs", join3("plugins", "pdfexport"))
        }, 
    ];
    const menuPlugin = revealMenuPlugin(format);
    if (menuPlugin) {
        pluginBundles.push(menuPlugin);
    }
    const chalkboardPlugiln = revealChalkboardPlugin(format);
    if (chalkboardPlugiln) {
        pluginBundles.push(chalkboardPlugiln);
    }
    const tonePlugin = revealTonePlugin(format);
    if (tonePlugin) {
        dependencies.push(toneDependency());
        pluginBundles.push(tonePlugin);
    }
    const multiplexPlugin = revealMultiplexPlugin(format);
    if (multiplexPlugin) {
        pluginBundles.push(multiplexPlugin);
    }
    const resolvePluginPath = async (plugin)=>{
        let extensions = await extensionContext?.find(plugin, input, kRevealJSPlugins, project?.config, project?.dir) || [];
        extensions = filterExtensions(extensions || [], plugin, "revealjs-plugins");
        if (extensions.length > 0) {
            return extensions[0].contributes[kRevealJSPlugins] || [];
        } else {
            return [
                plugin
            ];
        }
    };
    const resolvePlugin = async (plugin)=>{
        if (typeof plugin === "string") {
            if (existsSync(plugin)) {
                return [
                    plugin
                ];
            } else {
                return await resolvePluginPath(plugin);
            }
        } else {
            if (isPluginBundle(plugin)) {
                const path = plugin.plugin;
                const resolvedPlugins = await resolvePluginPath(path);
                const pluginBundles = resolvedPlugins.map((resolvedPlug)=>{
                    if (typeof resolvedPlug === "string") {
                        return {
                            plugin: resolvedPlug,
                            config: plugin.config
                        };
                    } else if (isPluginBundle(resolvedPlug)) {
                        return {
                            plugin: resolvedPlug.plugin,
                            config: mergeConfigs(plugin.config, resolvedPlug.config)
                        };
                    } else {
                        return plugin;
                    }
                });
                return pluginBundles;
            } else {
                return Promise.resolve([
                    plugin
                ]);
            }
        }
    };
    if (Array.isArray(format.metadata[kRevealjsPlugins])) {
        for (const plugin of format.metadata[kRevealJSPlugins]){
            const resolvedPlugins = await resolvePlugin(plugin);
            pluginBundles.push(...resolvedPlugins);
        }
    }
    pluginBundles.push({
        plugin: formatResourcePath("revealjs", join3("plugins", "support"))
    });
    for (let bundle of pluginBundles){
        if (typeof bundle === "string") {
            bundle = {
                plugin: bundle
            };
        }
        const plugin1 = isPluginBundle(bundle) ? await pluginFromBundle(bundle) : bundle;
        if (isSelfContained(flags, format)) {
            if (plugin1[kSelfContained] === false) {
                throw new Error("Reveal plugin '" + plugin1.name + " is not compatible with self-contained output");
            }
        }
        if (plugin1.register !== false) {
            register.push(plugin1.name);
        }
        const pluginUrl = pathWithForwardSlashes(join3(revealUrl, "plugin", camelToKebab(plugin1.name)));
        const pluginDir = join3(pluginsDestDir, camelToKebab(plugin1.name));
        if (isPluginBundle(bundle)) {
            copyMinimal(bundle.plugin, pluginDir);
        } else {
            ensureDirSync(pluginDir);
            plugin1.script?.forEach((script)=>{
                Deno.copyFileSync(join3(plugin1.path, script.path), join3(pluginDir, basename(script.path)));
            });
            plugin1.stylesheet?.forEach((style)=>{
                Deno.copyFileSync(join3(plugin1.path, style), join3(pluginDir, basename(style)));
            });
        }
        if (plugin1.script) {
            for (const script of plugin1.script){
                script.path = pathWithForwardSlashes(join3(pluginUrl, script.path));
                scripts.push(script);
            }
        }
        if (plugin1.stylesheet) {
            for (const stylesheet of plugin1.stylesheet){
                const pluginStylesheet = pathWithForwardSlashes(join3(pluginUrl, stylesheet));
                stylesheets.push(pathWithForwardSlashes(pluginStylesheet));
            }
        }
        if (plugin1.config) {
            for (const key of Object.keys(plugin1.config)){
                const kebabKey = camelToKebab(key);
                if (typeof plugin1.config[key] === "object") {
                    config[key] = plugin1.config[key];
                    if (typeof format.metadata[kebabKey] === "object") {
                        config[key] = mergeConfigs(revealMetadataFilter(config[key], kRevealPluginKebabOptions), revealMetadataFilter(format.metadata[kebabKey], kRevealPluginKebabOptions));
                    }
                } else {
                    config[key] = plugin1.config[key];
                    if (format.metadata[key] !== undefined) {
                        config[key] = format.metadata[key];
                    }
                }
            }
        }
        if (plugin1.metadata) {
            metadata.push(...plugin1.metadata);
        }
    }
    const extras = {
        [kIncludeInHeader]: [],
        html: {
            [kDependencies]: dependencies
        }
    };
    const linkTags = stylesheets.map((file)=>{
        return `<link href="${file}" rel="stylesheet">`;
    }).join("\n");
    const linkTagsInclude = temp.createFile({
        suffix: ".html"
    });
    Deno.writeTextFileSync(linkTagsInclude, linkTags);
    extras[kIncludeInHeader]?.push(linkTagsInclude);
    metadata.forEach((option)=>{
        if (format.metadata[option] !== undefined) {
            config[option] = format.metadata[option];
        }
    });
    const result1 = {
        pluginInit: {
            scripts,
            register,
            revealConfig: config
        },
        extras
    };
    return result1;
}
function revealMenuPlugin(format) {
    return {
        plugin: formatResourcePath("revealjs", join3("plugins", "menu")),
        config: {
            menu: {
                custom: [
                    {
                        title: "Tools",
                        icon: '<i class="fas fa-gear"></i>',
                        content: revealMenuTools(format)
                    }
                ],
                openButton: format.metadata[kRevealMenu] !== false
            }
        }
    };
}
function revealChalkboardPlugin(format) {
    if (format.metadata[kRevealChalkboard]) {
        return {
            plugin: formatResourcePath("revealjs", join3("plugins", "chalkboard"))
        };
    } else {
        return undefined;
    }
}
function revealMenuTools(format) {
    const tools = [
        {
            title: "Fullscreen",
            key: "f",
            handler: "fullscreen"
        },
        {
            title: "Speaker View",
            key: "s",
            handler: "speakerMode"
        },
        {
            title: "Slide Overview",
            key: "o",
            handler: "overview"
        },
        {
            title: "PDF Export Mode",
            key: "e",
            handler: "overview"
        }, 
    ];
    if (format.metadata[kRevealChalkboard]) {
        tools.push({
            title: "Toggle Chalkboard",
            key: "b",
            handler: "toggleChalkboard"
        }, {
            title: "Toggle Notes Canvas",
            key: "c",
            handler: "toggleNotesCanvas"
        }, {
            title: "Download Drawings",
            key: "d",
            handler: "downloadDrawings"
        });
    }
    tools.push({
        title: "Keyboard Help",
        key: "?",
        handler: "keyboardHelp"
    });
    const lines = [
        '<ul class="slide-menu-items">'
    ];
    lines.push(...tools.map((tool, index)=>{
        return `<li class="slide-tool-item${index === 0 ? " active" : ""}" data-item="${index}"><a href="#" onclick="RevealMenuToolHandlers.${tool.handler}(event)"><kbd>${tool.key || " "}</kbd> ${tool.title}</a></li>`;
    }));
    lines.push("</ul>");
    return lines.join("\n");
}
function revealTonePlugin(format) {
    if (format.metadata[kRevealSlideTone]) {
        return {
            plugin: formatResourcePath("revealjs", join3("plugins", "tone"))
        };
    } else {
        return undefined;
    }
}
function toneDependency() {
    const dependency = {
        name: "tone",
        scripts: [
            {
                name: "tone.js",
                path: formatResourcePath("revealjs", join3("tone", "tone.js"))
            }
        ]
    };
    return dependency;
}
async function pluginFromBundle(bundle) {
    if (!existsSync(bundle.plugin) || !Deno.statSync(bundle.plugin).isDirectory) {
        throw new Error("Specified Reveal plugin directory '" + bundle.plugin + "' does not exist.");
    }
    let plugin;
    try {
        plugin = await readAndValidateYamlFromFile(join3(bundle.plugin, "plugin.yml"), revealPluginSchema, "Validation of reveal plugin object failed.");
        plugin.path = bundle.plugin;
    } catch (e) {
        error(`Validation of plugin configuration ${join3(bundle.plugin, "plugin.yml")} failed.`);
        throw e;
    }
    if (plugin.script && !Array.isArray(plugin.script)) {
        plugin.script = [
            plugin.script
        ];
    }
    plugin.script = plugin.script?.map((script)=>{
        if (typeof script === "string") {
            return {
                path: script
            };
        } else {
            return script;
        }
    });
    if (plugin.stylesheet && !Array.isArray(plugin.stylesheet)) {
        plugin.stylesheet = [
            plugin.stylesheet
        ];
    }
    plugin.stylesheet = plugin.stylesheet?.map((stylesheet)=>String(stylesheet));
    validatePlugin(plugin);
    if (typeof bundle.config === "object") {
        plugin.config = mergeConfigs(plugin.config || {}, bundle.config || {});
    }
    if (typeof plugin.metadata === "string") {
        plugin.metadata = [
            plugin.metadata
        ];
    }
    return plugin;
}
function validatePlugin(plugin) {
    if (typeof plugin.name !== "string") {
        throw new Error("Reveal plugin definition must include a name.");
    }
    if (!Array.isArray(plugin.script)) {
        throw new Error("Reveal plugin definition must include a script.");
    }
    for (const script of plugin.script){
        if (!existsSync(join3(plugin.path, script.path))) {
            throw new Error("Reveal plugin script '" + script + "' not found.");
        }
    }
    if (plugin.stylesheet) {
        for (const stylesheet of plugin.stylesheet){
            if (!existsSync(join3(plugin.path, stylesheet))) {
                throw new Error("Reveal plugin stylesheet '" + stylesheet + "' not found.");
            }
        }
    }
    if (plugin.config) {
        if (typeof plugin.config !== "object") {
            throw new Error("Reveal plugin config must be an object.");
        }
    }
}
const kRevealJsUrl = "revealjs-url";
const kRevealJsConfig = "revealjs-config";
const kSlideLogo = "logo";
const kSlideFooter = "footer";
const kHashType = "hash-type";
const kScrollable = "scrollable";
const kSmaller = "smaller";
const kCenter = "center";
const kCenterTitleSlide = "center-title-slide";
const kControlsAuto = "controlsAuto";
const kPreviewLinksAuto = "previewLinksAuto";
const kPdfSeparateFragments = "pdfSeparateFragments";
const kAutoAnimateEasing = "autoAnimateEasing";
const kAutoAnimateDuration = "autoAnimateDuration";
const kAutoAnimateUnmatched = "autoAnimateUnmatched";
const kAutoStretch = "auto-stretch";
const kStylePandoc = "pandoc";
function titleSlidePartial(format) {
    if (isLegacyTitleStyle(format)) {
        return "title-slide.html";
    } else {
        return "title-fancy/title-slide.html";
    }
}
function titleSlideScss(format) {
    if (isLegacyTitleStyle(format)) {
        return undefined;
    } else {
        const titleBlockScss = formatResourcePath("revealjs", join3("pandoc", "title-fancy/title-slide.scss"));
        return sassLayer(titleBlockScss);
    }
}
function isLegacyTitleStyle(format) {
    return format.metadata["title-slide-style"] === kStylePandoc;
}
async function revealTheme(format, input, libDir, temp) {
    const metadata = {};
    const revealDir = join3(libDir, "revealjs");
    const revealJsUrl = format.metadata[kRevealJsUrl];
    if (revealJsUrl && !isFileRef(revealJsUrl)) {
        throw new Error("Invalid revealjs-url: " + revealJsUrl + " (remote urls are not supported)");
    }
    const revealUrl = pathWithForwardSlashes(revealDir);
    metadata[kRevealJsUrl] = revealUrl;
    const revealSrcDir = revealJsUrl || formatResourcePath("revealjs", "reveal");
    const revealDestDir = join3(dirname2(input), libDir, "revealjs");
    [
        "dist",
        "plugin"
    ].forEach((dir)=>{
        copyMinimal(join3(revealSrcDir, dir), join3(revealDestDir, dir));
    });
    const themeConfig = (format.metadata?.[kTheme]) || "default";
    const themeLayers = (Array.isArray(themeConfig) ? themeConfig : [
        themeConfig
    ]).map((theme)=>{
        const themePath = join3(relative2(Deno.cwd(), dirname2(input)), theme);
        if (existsSync(themePath)) {
            return themeLayer(themePath);
        } else {
            if (theme === "white") {
                theme = "default";
            } else if (theme === "black") {
                theme = "dark";
            }
            theme = formatResourcePath("revealjs", join3("themes", `${theme}.scss`));
            return themeLayer(theme);
        }
    });
    const yamlLayer = {
        uses: "",
        defaults: pandocVariablesToThemeScss1(format.metadata, true),
        functions: "",
        mixins: "",
        rules: ""
    };
    const highlightingLayer = !hasAdaptiveTheme(format.pandoc) ? resolveTextHighlightingLayer(input, format, "light") : undefined;
    const userLayers = [
        yamlLayer
    ];
    if (highlightingLayer) {
        userLayers.push(highlightingLayer);
    }
    userLayers.push(...themeLayers);
    const cssThemeDir = join3(revealSrcDir, "css", "theme");
    const loadPaths = [
        join3(cssThemeDir, "source"),
        join3(cssThemeDir, "template"), 
    ];
    const quartoLayers = [
        quartoBaseLayer(format, true, true, false, true),
        quartoLayer(), 
    ];
    const titleSlideLayer = titleSlideScss(format);
    if (titleSlideLayer) {
        userLayers.unshift(titleSlideLayer);
    }
    const bundleLayers = {
        key: "reveal-theme",
        user: mergeLayers(...userLayers),
        quarto: mergeLayers(...quartoLayers),
        framework: revealFrameworkLayer(revealSrcDir),
        loadPaths
    };
    const css = await compileSass([
        bundleLayers
    ], temp);
    copyTo(css, join3(revealDestDir, "dist", "theme", "quarto.css"));
    metadata[kTheme] = "quarto";
    const highlightingMode = cssHasDarkModeSentinel(Deno.readTextFileSync(css)) ? "dark" : "light";
    return {
        revealUrl,
        revealDestDir,
        metadata,
        [kTextHighlightingMode]: highlightingMode
    };
}
function revealFrameworkLayer(revealDir) {
    const readTemplate = (template)=>{
        return Deno.readTextFileSync(join3(revealDir, "css", "theme", "template", template));
    };
    return {
        uses: "",
        defaults: "",
        functions: "",
        mixins: readTemplate("mixins.scss"),
        rules: readTemplate("theme.scss")
    };
}
function pandocVariablesToThemeScss1(metadata, asDefaults = false) {
    return pandocVariablesToRevealDefaults(metadata).map((variable)=>{
        return outputVariable(variable, asDefaults);
    }).join("\n");
}
function pandocVariablesToRevealDefaults(metadata) {
    const explicitVars = [];
    const add = (defaults, name, value, formatter)=>{
        if (value) {
            const sassVar = sassVariable(name, value, formatter);
            defaults.push(sassVar);
        }
    };
    add(explicitVars, "font-family-sans-serif", metadata["mainfont"], asCssFont);
    add(explicitVars, "font-family-monospace", metadata["monofont"], asCssFont);
    add(explicitVars, "presentation-font-size-root", metadata["fontsize"]);
    add(explicitVars, "presentation-line-height", metadata["linestretch"], asCssNumber);
    add(explicitVars, "code-block-bg", metadata["monobackgroundcolor"]);
    return explicitVars;
}
function quartoLayer() {
    return sassLayerFile(formatResourcePath("revealjs", "quarto.scss"));
}
function themeLayer(theme) {
    return sassLayerFile(theme);
}
function revealResolveFormat(format) {
    format.metadata = revealMetadataFilter(format.metadata);
    if (format.metadata["navigationMode"] === "vertical") {
        format.metadata["navigationMode"] = "default";
    }
}
function revealjsFormat() {
    return mergeConfigs(createHtmlPresentationFormat(10, 5), {
        pandoc: {
            [kHtmlMathMethod]: {
                method: "mathjax",
                url: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full"
            },
            [kSlideLevel]: 2
        },
        render: {
            [kCodeLineNumbers]: true
        },
        metadata: {
            [kAutoStretch]: true
        },
        resolveFormat: revealResolveFormat,
        formatPreviewFile: revealMuliplexPreviewFile,
        formatExtras: async (input, _markdown, flags, format, libDir, temp, offset, extensionContext, project)=>{
            const stylesFile = temp.createFile({
                suffix: ".html"
            });
            const styles = renderEjs(formatResourcePath("revealjs", "styles.html"), {
                [kScrollable]: format.metadata[kScrollable]
            });
            Deno.writeTextFileSync(stylesFile, styles);
            const metadataOverride = {};
            const controlsAuto = typeof format.metadata["controls"] !== "boolean";
            if (controlsAuto) {
                metadataOverride.controls = false;
            }
            const previewLinksAuto = format.metadata["previewLinks"] === "auto";
            if (previewLinksAuto) {
                metadataOverride.previewLinks = false;
            }
            const extraConfig = {
                [kControlsAuto]: controlsAuto,
                [kPreviewLinksAuto]: previewLinksAuto,
                [kSmaller]: !!format.metadata[kSmaller],
                [kPdfSeparateFragments]: !!format.metadata[kPdfSeparateFragments],
                [kAutoAnimateEasing]: format.metadata[kAutoAnimateEasing] || "ease",
                [kAutoAnimateDuration]: format.metadata[kAutoAnimateDuration] || 1.0,
                [kAutoAnimateUnmatched]: format.metadata[kAutoAnimateUnmatched] !== undefined ? format.metadata[kAutoAnimateUnmatched] : true
            };
            const theme = await revealTheme(format, input, libDir, temp);
            const revealPluginData = await revealPluginExtras(input, format, flags, temp, theme.revealUrl, theme.revealDestDir, extensionContext, project);
            const templateDir = formatResourcePath("revealjs", "pandoc");
            const partials = [
                "toc-slide.html",
                titleSlidePartial(format), 
            ];
            const templateContext = {
                template: join3(templateDir, "template.html"),
                partials: partials.map((partial)=>join3(templateDir, partial))
            };
            let extras = mergeConfigs(await htmlFormatExtras(input, flags, offset, format, temp, {
                tabby: true,
                anchors: false,
                copyCode: true,
                hoverCitations: true,
                hoverFootnotes: true,
                figResponsive: false
            }, {
                theme: "quarto-reveal",
                parent: "section.slide",
                config: {
                    offset: [
                        0,
                        0
                    ],
                    maxWidth: 700
                }
            }, {
                quartoBase: false
            }), {
                args: [],
                pandoc: {},
                metadata: {
                    [kLinkCitations]: true,
                    [kRevealJsScripts]: revealPluginData.pluginInit.scripts.map((script)=>{
                        return script.path;
                    })
                },
                metadataOverride,
                templateContext,
                [kIncludeInHeader]: [
                    formatResourcePath("html", "styles-callout.html"),
                    stylesFile, 
                ],
                html: {
                    [kHtmlPostprocessors]: [
                        revealHtmlPostprocessor(format, extraConfig, revealPluginData.pluginInit, theme["text-highlighting-mode"]), 
                    ],
                    [kMarkdownAfterBody]: [
                        revealMarkdownAfterBody(format)
                    ]
                }
            });
            extras.metadataOverride = {
                ...extras.metadataOverride,
                ...theme.metadata
            };
            extras.html[kTextHighlightingMode] = theme[kTextHighlightingMode];
            extras = mergeConfigs(revealPluginData.extras, extras);
            const multiplexExtras = revealMultiplexExtras(format, flags);
            if (multiplexExtras) {
                extras = mergeConfigs(extras, multiplexExtras);
            }
            if (format.metadata[kRevealJsConfig] !== "default") {
                const navigationMode = format.metadata["navigationMode"];
                const verticalSlides = navigationMode === "default" || navigationMode === "grid";
                if (format.metadata["slideNumber"] === true) {
                    extras.metadataOverride["slideNumber"] = verticalSlides ? "h.v" : "c/t";
                }
                extras.metadata = {
                    ...extras.metadata,
                    ...revealMetadataFilter({
                        width: 1050,
                        height: 700,
                        margin: 0.1,
                        center: false,
                        navigationMode: "linear",
                        controlsLayout: "edges",
                        controlsTutorial: false,
                        hash: true,
                        history: true,
                        hashOneBasedIndex: false,
                        fragmentInURL: false,
                        transition: "none",
                        backgroundTransition: "none",
                        pdfSeparateFragments: false
                    })
                };
            }
            if (format.metadata[kHashType] === "number") {
                extras.pandoc = {
                    ...extras.pandoc,
                    from: pandocFormatWith(format.pandoc[kFrom] || "markdown", "", "-auto_identifiers")
                };
            }
            return extras;
        }
    });
}
function revealMarkdownAfterBody(format) {
    const lines = [];
    if (format.metadata[kSlideLogo]) {
        lines.push(`<img src="${format.metadata[kSlideLogo]}" class="slide-logo" />`);
        lines.push("\n");
    }
    lines.push("::: {.footer .footer-default}");
    if (format.metadata[kSlideFooter]) {
        lines.push(String(format.metadata[kSlideFooter]));
    } else {
        lines.push("");
    }
    lines.push(":::");
    lines.push("\n");
    return lines.join("\n");
}
const kOutputLocationSlide = "output-location-slide";
function revealHtmlPostprocessor(format, extraConfig, pluginInit, highlightingMode) {
    return (doc)=>{
        doc.body.classList.add("quarto-" + highlightingMode);
        const slideFootnotes = format.pandoc[kReferenceLocation] !== "document";
        const slideLevel = format.pandoc[kSlideLevel] || 2;
        const slideHeadingTags = Array.from(Array(slideLevel)).map((_e, i1)=>"H" + (i1 + 1));
        const slideOutputs = doc.querySelectorAll(`.${kOutputLocationSlide}`);
        for (const slideOutput of slideOutputs){
            const slideOutputEl = slideOutput;
            const parentSlide = findParentSlide(slideOutputEl);
            if (parentSlide && parentSlide.parentElement) {
                const newSlide = doc.createElement("section");
                newSlide.setAttribute("id", parentSlide?.id ? parentSlide.id + "-output" : "");
                for (const clz of parentSlide.classList){
                    newSlide.classList.add(clz);
                }
                newSlide.classList.add(kOutputLocationSlide);
                if (slideHeadingTags.includes(parentSlide.firstElementChild?.tagName || "")) {
                    const headingEl = doc.createElement(parentSlide.firstElementChild?.tagName);
                    headingEl.innerHTML = parentSlide.firstElementChild?.innerHTML || "";
                    newSlide.appendChild(headingEl);
                }
                newSlide.appendChild(slideOutputEl);
                const nextSlide = parentSlide.nextElementSibling;
                parentSlide.parentElement.insertBefore(newSlide, nextSlide);
            }
        }
        if (format.metadata[kHashType] === "number") {
            const titleSlide = doc.getElementById("title-slide");
            if (titleSlide) {
                titleSlide.removeAttribute("id");
            }
        }
        const scripts = doc.querySelectorAll("script");
        for (const script of scripts){
            const scriptEl = script;
            if (scriptEl.innerText && scriptEl.innerText.indexOf("Reveal.initialize({") !== -1) {
                scriptEl.innerText = scriptEl.innerText.replace(/slideNumber: (h[\.\/]v|c(?:\/t)?)/, "slideNumber: '$1'");
                if (pluginInit.register.length > 0) {
                    const kRevealPluginArray = "plugins: [";
                    scriptEl.innerText = scriptEl.innerText.replace(kRevealPluginArray, kRevealPluginArray + pluginInit.register.join(", ") + ",\n");
                }
                const configJs = [];
                Object.keys(extraConfig).forEach((key)=>{
                    configJs.push(`'${key}': ${JSON.stringify(extraConfig[key])}`);
                });
                Object.keys(pluginInit.revealConfig).forEach((key)=>{
                    configJs.push(`'${key}': ${JSON.stringify(pluginInit.revealConfig[key])}`);
                });
                const configStr = configJs.join(",\n");
                scriptEl.innerText = scriptEl.innerText.replace("Reveal.initialize({", `Reveal.initialize({\n${configStr},\n`);
            }
        }
        const invisibleSlides = doc.querySelectorAll('section.slide[data-visibility="hidden"]');
        for(let i1 = invisibleSlides.length - 1; i1 >= 0; i1--){
            const slide = invisibleSlides.item(i1);
            const id = slide.id;
            if (id) {
                const tocEntry = doc.querySelector('nav[role="doc-toc"] a[href="#/' + id + '"]');
                if (tocEntry) {
                    tocEntry.parentNode?.remove();
                }
            }
            slide.parentNode?.removeChild(slide);
        }
        const slideHeadings = doc.querySelectorAll("section.slide > :first-child");
        slideHeadings.forEach((slideHeading)=>{
            const slideHeadingEl = slideHeading;
            if (slideHeadingTags.includes(slideHeadingEl.tagName)) {
                for (const attrib of slideHeadingEl.getAttributeNames()){
                    slideHeadingEl.removeAttribute(attrib);
                    if (attrib === "data-auto-animate") {
                        slideHeadingEl.setAttribute("data-id", "quarto-animate-title");
                        const codeBlocks = slideHeadingEl.parentElement?.querySelectorAll("div.sourceCode > pre > code");
                        if (codeBlocks?.length === 1) {
                            const codeEl = codeBlocks.item(0);
                            const preEl = codeEl.parentElement;
                            preEl.setAttribute("data-id", "quarto-animate-code");
                            codeEl.classList.add("hljs");
                            codeEl.childNodes.forEach((spanNode)=>{
                                if (spanNode.nodeType === NodeType.ELEMENT_NODE) {
                                    const spanEl = spanNode;
                                    spanEl.classList.add("hljs-ln-code");
                                }
                            });
                        }
                    }
                }
            }
        });
        if (format.metadata[kCenterTitleSlide] !== false) {
            const titleSlide1 = doc.getElementById("title-slide");
            if (titleSlide1) {
                titleSlide1.classList.add("center");
            }
            const titleSlides = doc.querySelectorAll(".title-slide");
            for (const slide1 of titleSlides){
                slide1.classList.add("center");
            }
        }
        if (format.metadata[kCenter] === true) {
            for (const slide2 of doc.querySelectorAll("section.slide")){
                const slideEl = slide2;
                slideEl.classList.add("center");
            }
        }
        const notes = doc.querySelectorAll("aside.notes");
        for (const note of notes){
            const style = doc.createElement("style");
            style.setAttribute("type", "text/css");
            style.innerHTML = `
        span.MJX_Assistive_MathML {
          position:absolute!important;
          clip: rect(1px, 1px, 1px, 1px);
          padding: 1px 0 0 0!important;
          border: 0!important;
          height: 1px!important;
          width: 1px!important;
          overflow: hidden!important;
          display:block!important;
      }`;
            note.appendChild(style);
        }
        const slides = doc.querySelectorAll("section.slide");
        for (const slide3 of slides){
            const slideEl1 = slide3;
            const asides = slideEl1.querySelectorAll("aside:not(.notes)");
            const asideDivs = slideEl1.querySelectorAll("div.aside");
            const footnotes = slideEl1.querySelectorAll('a[role="doc-noteref"]');
            if (asides.length > 0 || asideDivs.length > 0 || footnotes.length > 0) {
                const aside = doc.createElement("aside");
                const collectAsides = (asideList)=>{
                    asideList.forEach((asideEl)=>{
                        const asideDiv = doc.createElement("div");
                        asideDiv.innerHTML = asideEl.innerHTML;
                        aside.appendChild(asideDiv);
                    });
                    asideList.forEach((asideEl)=>{
                        asideEl.remove();
                    });
                };
                collectAsides(asides);
                collectAsides(asideDivs);
                if (slideFootnotes && footnotes.length > 0) {
                    const ol = doc.createElement("ol");
                    ol.classList.add("aside-footnotes");
                    footnotes.forEach((note, index)=>{
                        const noteEl = note;
                        const href = noteEl.getAttribute("href");
                        if (href) {
                            const noteLi = doc.getElementById(href.replace(/^#\//, ""));
                            if (noteLi) {
                                const footnoteBack = noteLi.querySelector(".footnote-back");
                                if (footnoteBack) {
                                    footnoteBack.remove();
                                }
                                ol.appendChild(noteLi);
                            }
                        }
                        const sup = doc.createElement("sup");
                        sup.innerText = index + 1 + "";
                        noteEl.replaceWith(sup);
                    });
                    aside.appendChild(ol);
                }
                slide3.appendChild(aside);
            }
        }
        const footnotes1 = doc.querySelectorAll('section[role="doc-endnotes"]');
        if (slideFootnotes) {
            for (const footnoteSection of footnotes1){
                footnoteSection.remove();
            }
        } else {
            let footnotesId;
            const footnotes2 = doc.querySelectorAll('section[role="doc-endnotes"]');
            if (footnotes2.length === 1) {
                const footnotesEl = footnotes2[0];
                footnotesId = footnotesEl?.getAttribute("id") || "footnotes";
                footnotesEl.setAttribute("id", footnotesId);
                insertFootnotesTitle(doc, footnotesEl, format.language, slideLevel);
                footnotesEl.classList.add("smaller");
                footnotesEl.classList.add("scrollable");
                footnotesEl.classList.remove("center");
                removeFootnoteBacklinks(footnotesEl);
            }
            const notes1 = doc.querySelectorAll('a[role="doc-noteref"]');
            for (const note1 of notes1){
                const noteEl = note1;
                noteEl.setAttribute("data-footnote-href", noteEl.getAttribute("href"));
                noteEl.setAttribute("href", footnotesId ? `#/${footnotesId}` : "");
                noteEl.setAttribute("onclick", footnotesId ? "" : "return false;");
            }
        }
        let refsId;
        const refs = doc.querySelector("#refs");
        if (refs) {
            const refsSlide = findParentSlide(refs);
            if (refsSlide) {
                refsId = refsSlide?.getAttribute("id") || "references";
                refsSlide.setAttribute("id", refsId);
            }
            applyClassesToParentSlide(refs, [
                "smaller",
                "scrollable"
            ]);
            removeClassesFromParentSlide(refs, [
                "center"
            ]);
        }
        const cites = doc.querySelectorAll('a[role="doc-biblioref"]');
        for (const cite of cites){
            const citeEl = cite;
            citeEl.setAttribute("href", refsId ? `#/${refsId}` : "");
            citeEl.setAttribute("onclick", refsId ? "" : "return false;");
        }
        applyStretch(doc, format.metadata[kAutoStretch]);
        const result1 = {
            resources: [],
            supporting: []
        };
        const chalkboard = format.metadata["chalkboard"];
        if (typeof chalkboard === "object") {
            const chalkboardSrc = chalkboard["src"];
            if (typeof chalkboardSrc === "string") {
                result1.resources.push(chalkboardSrc);
            }
        }
        return Promise.resolve(result1);
    };
}
function applyStretch(doc, autoStretch) {
    const allSlides = doc.querySelectorAll("section.slide");
    for (const slide of allSlides){
        const slideEl = slide;
        if (slideEl.classList.contains("nostretch")) continue;
        const images = slideEl.querySelectorAll("img");
        if (images.length === 1) {
            const image = images[0];
            const imageEl = image;
            if (findParent(imageEl, (el)=>{
                return el.classList.contains("column") || el.classList.contains("quarto-layout-panel") || el.classList.contains("fragment") || el.classList.contains(kOutputLocationSlide) || !!el.className.match(/panel-/);
            }) || slideEl.querySelectorAll("aside:not(.notes)").length !== 0) {
                continue;
            }
            let selNode;
            for (const node of slide.childNodes){
                if (node.contains(image)) {
                    selNode = node;
                    break;
                }
            }
            const nodeEl = selNode;
            if (!nodeEl || nodeEl.nodeName === "P" && nodeEl.childNodes.length > 1) {
                continue;
            }
            const hasStretchClass = function(el) {
                return el.classList.contains("stretch") || el.classList.contains("r-stretch");
            };
            if (nodeEl.nodeName === "P" || nodeEl.nodeName === "DIV" && nodeEl.classList.contains("quarto-figure") || nodeEl.nodeName === "DIV" && nodeEl.classList.contains("cell") || nodeEl.nodeName === "DIV" && hasStretchClass(nodeEl)) {
                if (nodeEl.nodeName === "DIV" && hasStretchClass(nodeEl)) {
                    nodeEl.classList.remove("r-stretch");
                    nodeEl.classList.remove("stretch");
                }
                if (autoStretch === true && !hasStretchClass(imageEl) && !imageEl.getAttribute("style")?.match("height:") && !imageEl.hasAttribute("height") && !imageEl.classList.contains("absolute")) {
                    imageEl.classList.add("r-stretch");
                }
                if (hasStretchClass(imageEl) && imageEl.parentNode?.nodeName !== "SECTION") {
                    const removeEmpty = function(el) {
                        const parentEl = el.parentElement;
                        parentEl?.removeChild(el);
                        if (parentEl?.innerText.trim() === "" && parentEl?.nodeName !== "SECTION") {
                            removeEmpty(parentEl);
                        }
                    };
                    const quartoFig = slideEl.querySelector("div.quarto-figure");
                    const caption = doc.createElement("p");
                    if (quartoFig) {
                        const align = quartoFig.className.match("quarto-figure-(center|left|right)");
                        if (align) imageEl.classList.add(align[0]);
                        const figCaption = nodeEl.querySelector("figcaption");
                        if (figCaption) {
                            caption.classList.add("caption");
                            caption.innerHTML = figCaption.innerHTML;
                        }
                    }
                    const nextEl = nodeEl.nextElementSibling;
                    removeEmpty(imageEl);
                    slideEl.insertBefore(image, nextEl);
                    if (caption.classList.contains("caption")) {
                        slideEl.insertBefore(caption, imageEl.nextElementSibling);
                    }
                    if (quartoFig) removeEmpty(quartoFig);
                }
            }
        }
    }
}
function applyClassesToParentSlide(el, classes, slideClass = "slide") {
    const slideEl = findParentSlide(el, slideClass);
    if (slideEl) {
        classes.forEach((clz)=>slideEl.classList.add(clz));
    }
}
function removeClassesFromParentSlide(el, classes, slideClass = "slide") {
    const slideEl = findParentSlide(el, slideClass);
    if (slideEl) {
        classes.forEach((clz)=>slideEl.classList.remove(clz));
    }
}
function findParentSlide(el, slideClass = "slide") {
    return findParent(el, (el)=>{
        return el.classList.contains(slideClass);
    });
}
function ipynbFormat() {
    return createFormat("ipynb", {
        pandoc: {
            standalone: true,
            [kDefaultImageExtension]: "png"
        },
        formatExtras: (input, _markdown, _flags, format)=>{
            const resolveTemplate = ()=>{
                const titleTemplate = formatResourcePath("ipynb", join3("templates", "title-block.md"));
                const partials = readPartials(format.metadata, dirname2(input));
                if (partials.length > 0) {
                    const userTitleTemplate = partials.find((part)=>{
                        return basename2(part) === "title-block.md";
                    });
                    if (userTitleTemplate) {
                        return userTitleTemplate;
                    } else {
                        return titleTemplate;
                    }
                } else {
                    return titleTemplate;
                }
            };
            return {
                metadata: {
                    [kIPynbTitleBlockTemplate]: resolveTemplate()
                },
                postprocessors: [
                    (output)=>{
                        const nb = jupyterFromFile(output);
                        nb.cells = nb.cells.map((cell)=>{
                            if (cell.cell_type == "raw") {
                                if (cell.metadata[kCellFormat]) {
                                    const format = cell.metadata[kCellFormat];
                                    delete cell.metadata[kCellFormat];
                                    if (format === kTextHtml) {
                                        cell.metadata[kCellRawMimeType] = format;
                                    } else if (format === "tex") {
                                        cell.metadata[kCellRawMimeType] = kTextLatex;
                                    } else if (format === "rst") {
                                        cell.metadata[kCellRawMimeType] = kRestructuredText;
                                    } else if (format === "rtf") {
                                        cell.metadata[kCellRawMimeType] = kApplicationRtf;
                                    } else {
                                        cell.metadata[kCellFormat] = format;
                                    }
                                }
                            }
                            return cell;
                        });
                        Deno.writeTextFileSync(output, JSON.stringify(nb, null, 2));
                        return Promise.resolve();
                    }
                ]
            };
        }
    });
}
function defaultWriterFormat(to) {
    const lookupTo = parseFormatString(to).baseFormat;
    let pandocTo = lookupTo;
    let writerFormat;
    switch(lookupTo){
        case "html":
        case "html4":
        case "html5":
            writerFormat = htmlFormat(7, 5);
            break;
        case "pdf":
            writerFormat = pdfFormat();
            break;
        case "beamer":
            writerFormat = beamerFormat();
            break;
        case "latex":
        case "context":
            writerFormat = latexFormat();
            break;
        case "s5":
        case "dzslides":
        case "slidy":
        case "slideous":
            writerFormat = createHtmlPresentationFormat(9.5, 6.5);
            break;
        case "revealjs":
            writerFormat = revealjsFormat();
            break;
        case "markdown":
            writerFormat = pandocMarkdownFormat();
            pandocTo = to;
            break;
        case "markdown_phpextra":
        case "markdown_github":
        case "markdown_mmd":
        case "markdown_strict":
        case "markua":
            writerFormat = markdownFormat();
            pandocTo = to;
            break;
        case "md":
            writerFormat = markdownWithCommonmarkExtensionsFormat();
            pandocTo = "markdown_strict";
            break;
        case "commonmark":
        case "commonmark_x":
            writerFormat = commonmarkFormat(to);
            pandocTo = to;
            break;
        case "gfm":
            writerFormat = gfmFormat();
            pandocTo = to;
            break;
        case "asciidoc":
            writerFormat = plaintextFormat("txt");
            break;
        case "asciidoctor":
            writerFormat = plaintextFormat("adoc");
            break;
        case "docbook":
        case "docbook4":
        case "docbook5":
            writerFormat = plaintextFormat("xml");
            break;
        case "docx":
            writerFormat = docxFormat();
            break;
        case "pptx":
            writerFormat = powerpointFormat();
            break;
        case "odt":
            writerFormat = createWordprocessorFormat("odt");
            break;
        case "opendocument":
            writerFormat = createWordprocessorFormat("xml");
            break;
        case "rtf":
            writerFormat = rtfFormat();
            break;
        case "plain":
            writerFormat = plaintextFormat("txt");
            break;
        case "epub":
        case "epub2":
        case "epub3":
            writerFormat = epubFormat();
            break;
        case "fb2":
            writerFormat = createEbookFormat("fb2");
            break;
        case "zimwiki":
            writerFormat = plaintextFormat("zim");
            break;
        case "jats":
        case "jats_archiving":
        case "jats_articleauthoring":
        case "jats_publishing":
            writerFormat = plaintextFormat("xml");
            break;
        case "ipynb":
            writerFormat = ipynbFormat();
            break;
        case "biblatex":
        case "bibtex":
            writerFormat = bibliographyFormat("bib");
            break;
        case "csljson":
            writerFormat = bibliographyFormat("csl");
            break;
        case "texttile":
        case "texinfo":
        case "tei":
        case "rst":
        case "org":
        case "opml":
        case "muse":
        case "ms":
        case "native":
        case "man":
        case "dokuwiki":
        case "haddock":
        case "json":
        case "icml":
        case "jira":
        case "mediawiki":
        case "xwiki":
            writerFormat = plaintextFormat(to);
            break;
        default:
            writerFormat = unknownFormat("txt");
    }
    writerFormat.pandoc = writerFormat.pandoc || {};
    if (!writerFormat.pandoc.to) {
        writerFormat.pandoc.to = pandocTo;
    }
    return writerFormat;
}
function powerpointFormat() {
    return createFormat("pptx", {
        render: {
            [kPageWidth]: 10,
            [kOutputDivs]: false
        },
        execute: {
            [kFigWidth]: 11,
            [kFigHeight]: 5.5,
            [kEcho]: false,
            [kWarning]: false
        },
        pandoc: {
            [kDefaultImageExtension]: "png"
        }
    });
}
function rtfFormat() {
    return createFormat("rtf", createWordprocessorFormat("rtf"), {
        pandoc: {
            standalone: true
        }
    });
}
function unknownFormat(ext) {
    return createFormat(ext);
}
function bibliographyFormat(ext) {
    return createFormat(ext);
}
function websiteConfigBoolean(name, defaultValue, project) {
    const config = websiteConfig(name, project);
    if (typeof config === "string") {
        return !!config;
    } else if (typeof config == "boolean") {
        return config;
    } else {
        return defaultValue;
    }
}
function websiteConfigString(name, project) {
    const config = websiteConfig(name, project);
    if (typeof config === "string") {
        return config;
    } else {
        return undefined;
    }
}
function websiteConfigMetadata(name, project) {
    const config = websiteConfig(name, project);
    if (typeof config === "object" && !Array.isArray(config)) {
        return config;
    } else {
        return undefined;
    }
}
function websiteConfigArray(name, project) {
    const config = websiteConfig(name, project);
    if (Array.isArray(config)) {
        return config;
    } else {
        return undefined;
    }
}
function websiteConfig(name, project) {
    const site = project?.[kWebsite];
    if (site) {
        return site[name];
    } else {
        return undefined;
    }
}
function websiteTitle(project) {
    return websiteConfigString(kSiteTitle, project);
}
function websiteBaseurl(project) {
    return websiteConfigString(kSiteUrl, project);
}
function websiteImage(project) {
    return websiteConfigString(kImage, project);
}
function websiteDescription(project) {
    return websiteConfigString(kDescription, project);
}
function websitePath(project) {
    let path = websiteConfigString(kSitePath, project);
    if (path) {
        if (!path.endsWith("/")) {
            path = path + "/";
        }
        return path;
    } else {
        const baseUrl = websiteBaseurl(project);
        if (baseUrl) {
            try {
                const url = new URL(baseUrl);
                let path1 = url.pathname;
                if (!path1.endsWith("/")) {
                    path1 = path1 + "/";
                }
                return path1;
            } catch  {
                return "/";
            }
        } else {
            return "/";
        }
    }
}
function websiteRepoInfo(project) {
    let repoUrl = websiteConfigString(kSiteRepoUrl, project);
    if (repoUrl) {
        repoUrl = ensureTrailingSlash(repoUrl);
        const repoSubdir = websiteConfigString(kSiteRepoSubdir, project);
        if (repoSubdir) {
            return {
                baseUrl: repoUrl,
                path: ensureTrailingSlash(repoSubdir)
            };
        } else {
            return {
                baseUrl: repoUrl,
                path: ""
            };
        }
    } else {
        return undefined;
    }
}
function websiteRepoBranch(project) {
    return websiteConfigString(kSiteRepoBranch, project) || "main";
}
function websiteMetadataFields() {
    return [
        kWebsite,
        "site"
    ];
}
function repoUrlIcon(url) {
    if (url.indexOf("github.com") !== -1) {
        return "github";
    } else {
        return "git";
    }
}
function websiteConfigActions(key, subkey, project) {
    const book = project?.[subkey];
    if (book) {
        const value = book[key];
        if (typeof value === "string") {
            if (value === "none") {
                return [];
            } else {
                return [
                    value
                ];
            }
        } else if (Array.isArray(value)) {
            return value.map((x)=>String(x));
        } else {
            return [];
        }
    } else {
        return [];
    }
}
function websiteFormatPreferHtml(format) {
    if (format !== undefined) {
        if (typeof format === "string") {
            return {
                [format]: "default"
            };
        } else {
            const formats = Object.keys(format);
            const orderedFormats = {};
            const htmlFormatPos = formats.findIndex((format)=>isHtmlOutput(format, true));
            if (htmlFormatPos !== -1) {
                const htmlFormatName = formats.splice(htmlFormatPos, 1)[0];
                orderedFormats[htmlFormatName] = format[htmlFormatName];
            }
            for (const formatName of formats){
                orderedFormats[formatName] = format[formatName];
            }
            return orderedFormats;
        }
    } else {
        return {
            html: "default"
        };
    }
}
function formatsPreferHtml(formats) {
    const orderedFormats = {};
    const formatNames = Object.keys(formats);
    const htmlFormatPos = formatNames.findIndex((format)=>isHtmlOutput(format, true));
    if (htmlFormatPos !== -1) {
        const htmlFormatName = formatNames.splice(htmlFormatPos, 1)[0];
        orderedFormats[htmlFormatName] = formats[htmlFormatName];
    }
    for (const formatName of formatNames){
        orderedFormats[formatName] = formats[formatName];
    }
    return orderedFormats;
}
function websiteProjectConfig(projectDir, config, flags) {
    config = cloneDeep1(config);
    const format = config[kMetadataFormat];
    config[kMetadataFormat] = websiteFormatPreferHtml(format);
    const ensureArray = (val)=>{
        if (Array.isArray(val)) {
            return val;
        } else if (typeof val === "string") {
            return [
                val
            ];
        }
    };
    const siteMeta = config[kWebsite] || {};
    siteMeta[kSiteTitle] = siteMeta[kSiteTitle] || config.project[kProjectTitle];
    if (flags?.siteUrl) {
        siteMeta[kSiteUrl] = flags.siteUrl;
    }
    if (siteMeta[kBodyHeader]) {
        siteMeta[kBodyHeader] = ensureArray(siteMeta[kBodyHeader]);
    }
    if (siteMeta[kBodyFooter]) {
        siteMeta[kBodyFooter] = ensureArray(siteMeta[kBodyFooter]);
    }
    const resolveProjectPaths = (maybePath)=>{
        if (existsSync(maybePath)) {
            return join3(projectDir, maybePath);
        } else {
            return maybePath;
        }
    };
    if (siteMeta[kMarginHeader]) {
        siteMeta[kMarginHeader] = ensureArray(siteMeta[kMarginHeader])?.map(resolveProjectPaths);
    }
    if (siteMeta[kMarginFooter]) {
        siteMeta[kMarginFooter] = ensureArray(siteMeta[kMarginFooter])?.map(resolveProjectPaths);
    }
    config[kWebsite] = siteMeta;
    const sidebarRaw = siteMeta[kSiteSidebar];
    const sidebars = Array.isArray(sidebarRaw) ? sidebarRaw : typeof sidebarRaw == "object" ? [
        sidebarRaw
    ] : undefined;
    sidebars?.forEach((sidebar)=>{
        const headerRaw = sidebar[kSiteSidebarHeader];
        if (headerRaw) {
            sidebar[kSiteSidebarHeader] = ensureArray(sidebar[kSiteSidebarHeader]);
        }
    });
    sidebars?.forEach((sidebar)=>{
        const footerRaw = sidebar[kSiteSidebarFooter];
        if (footerRaw) {
            sidebar[kSiteSidebarFooter] = ensureArray(sidebar[kSiteSidebarFooter]);
        }
    });
    if (websiteConfigMetadata(kComments, config) && config[kComments] === undefined) {
        config[kComments] = websiteConfigMetadata(kComments, config);
    }
    return Promise.resolve(config);
}
function websiteHtmlFormat(project) {
    const projConfig = project.config || {};
    const baseFormat = metadataAsFormat(projConfig);
    const format = formatFromMetadata(baseFormat, formatKeys(projConfig)[0]);
    return mergeConfigs(baseFormat, format);
}
function makeInitializer(thunk) {
    let initStarted = false;
    const hasInitSemaphore = new Semaphore(0);
    return async ()=>{
        if (initStarted) {
            await hasInitSemaphore.runExclusive(async ()=>{});
            return;
        }
        initStarted = true;
        await thunk();
        hasInitSemaphore.release();
    };
}
let initializer = ()=>{
    throw new Error("initializer not set!!");
};
async function initState() {
    await initializer();
}
let hasSet = false;
function setInitializer(init) {
    if (hasSet) {
        return;
    }
    initializer = makeInitializer(init);
    hasSet = true;
}
var Module = {};
var wasmBinaryFile;
let wasmInstantiateResolve;
let wasmInstantiatePromise = new Promise((resolve, reject)=>{
    wasmInstantiateResolve = resolve;
});
function setWasmBinaryFile(wbf) {
    wasmBinaryFile = wbf;
}
let init1 = false;
let TreeSitter = function() {
    class Parser {
        constructor(){
            this.initialize();
        }
        initialize() {
            throw new Error("cannot construct a Parser before calling `init()`");
        }
        static async init(moduleOptions) {
            if (init1) return;
            Module = Object.assign({}, Module, moduleOptions);
            var moduleOverrides = {};
            var key;
            for(key in Module){
                if (Module.hasOwnProperty(key)) {
                    moduleOverrides[key] = Module[key];
                }
            }
            var arguments_ = [];
            var thisProgram = './this.program';
            var quit_ = function(status, toThrow) {
                throw toThrow;
            };
            var ENVIRONMENT_IS_DENO = true;
            var read_, readBinary;
            if (ENVIRONMENT_IS_DENO) {
                read_ = function shell_read(filename, binary) {
                    var ret = tryParseAsDataURI(filename);
                    if (ret) {
                        return binary ? ret : ret.toString();
                    }
                    filename = Deno.realPathSync(filename);
                    if (binary) {
                        return Deno.readFileSync(filename);
                    } else {
                        return Deno.readTextFileSync(filename);
                    }
                };
                readBinary = function readBinary(filename) {
                    var ret = read_(filename, true);
                    if (!ret.buffer) {
                        ret = new Uint8Array(ret);
                    }
                    assert(ret.buffer);
                    return ret;
                };
                quit_ = function(status) {
                    Deno.exit(status);
                };
                Module['inspect'] = function() {
                    return '[Emscripten Module object]';
                };
            } else {
                throw new Error('environment detection error');
            }
            var out = Module['print'] || console.log.bind(console);
            var err = Module['printErr'] || console.warn.bind(console);
            for(key in moduleOverrides){
                if (moduleOverrides.hasOwnProperty(key)) {
                    Module[key] = moduleOverrides[key];
                }
            }
            moduleOverrides = null;
            var STACK_ALIGN = 16;
            function alignMemory(size, factor) {
                if (!factor) factor = STACK_ALIGN;
                return Math.ceil(size / factor) * factor;
            }
            function warnOnce(text) {
                if (!warnOnce.shown) warnOnce.shown = {};
                if (!warnOnce.shown[text]) {
                    warnOnce.shown[text] = 1;
                    err(text);
                }
            }
            function convertJsFunctionToWasm(func, sig) {
                if (typeof WebAssembly.Function === "function") {
                    var typeNames = {
                        'i': 'i32',
                        'j': 'i64',
                        'f': 'f32',
                        'd': 'f64'
                    };
                    var type = {
                        parameters: [],
                        results: sig[0] == 'v' ? [] : [
                            typeNames[sig[0]]
                        ]
                    };
                    for(var i1 = 1; i1 < sig.length; ++i1){
                        type.parameters.push(typeNames[sig[i1]]);
                    }
                    return new WebAssembly.Function(type, func);
                }
                var typeSection = [
                    0x01,
                    0x00,
                    0x01,
                    0x60
                ];
                var sigRet = sig.slice(0, 1);
                var sigParam = sig.slice(1);
                var typeCodes = {
                    'i': 0x7f,
                    'j': 0x7e,
                    'f': 0x7d,
                    'd': 0x7c
                };
                typeSection.push(sigParam.length);
                for(var i1 = 0; i1 < sigParam.length; ++i1){
                    typeSection.push(typeCodes[sigParam[i1]]);
                }
                if (sigRet == 'v') {
                    typeSection.push(0x00);
                } else {
                    typeSection = typeSection.concat([
                        0x01,
                        typeCodes[sigRet]
                    ]);
                }
                typeSection[1] = typeSection.length - 2;
                var bytes = new Uint8Array([
                    0x00,
                    0x61,
                    0x73,
                    0x6d,
                    0x01,
                    0x00,
                    0x00,
                    0x00
                ].concat(typeSection, [
                    0x02,
                    0x07,
                    0x01,
                    0x01,
                    0x65,
                    0x01,
                    0x66,
                    0x00,
                    0x00,
                    0x07,
                    0x05,
                    0x01,
                    0x01,
                    0x66,
                    0x00,
                    0x00, 
                ]));
                var module = new WebAssembly.Module(bytes);
                var instance = new WebAssembly.Instance(module, {
                    'e': {
                        'f': func
                    }
                });
                var wrappedFunc = instance.exports['f'];
                return wrappedFunc;
            }
            var freeTableIndexes = [];
            var functionsInTableMap;
            function getEmptyTableSlot() {
                if (freeTableIndexes.length) {
                    return freeTableIndexes.pop();
                }
                try {
                    wasmTable.grow(1);
                } catch (err) {
                    if (!(err instanceof RangeError)) {
                        throw err;
                    }
                    throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.';
                }
                return wasmTable.length - 1;
            }
            function addFunctionWasm(func, sig) {
                if (!functionsInTableMap) {
                    functionsInTableMap = new WeakMap();
                    for(var i1 = 0; i1 < wasmTable.length; i1++){
                        var item = wasmTable.get(i1);
                        if (item) {
                            functionsInTableMap.set(item, i1);
                        }
                    }
                }
                if (functionsInTableMap.has(func)) {
                    return functionsInTableMap.get(func);
                }
                var ret = getEmptyTableSlot();
                try {
                    wasmTable.set(ret, func);
                } catch (err) {
                    if (!(err instanceof TypeError)) {
                        throw err;
                    }
                    assert(typeof sig !== 'undefined', 'Missing signature argument to addFunction: ' + func);
                    var wrapped = convertJsFunctionToWasm(func, sig);
                    wasmTable.set(ret, wrapped);
                }
                functionsInTableMap.set(func, ret);
                return ret;
            }
            var setTempRet0 = function(value) {
                value;
            };
            var dynamicLibraries = Module['dynamicLibraries'] || [];
            if (typeof WebAssembly !== 'object') {
                abort('no native wasm support detected');
            }
            function setValue(ptr, value, type, noSafe) {
                type = type || 'i8';
                if (type.charAt(type.length - 1) === '*') type = 'i32';
                switch(type){
                    case 'i1':
                        HEAP8[ptr >> 0] = value;
                        break;
                    case 'i8':
                        HEAP8[ptr >> 0] = value;
                        break;
                    case 'i16':
                        HEAP16[ptr >> 1] = value;
                        break;
                    case 'i32':
                        HEAP32[ptr >> 2] = value;
                        break;
                    case 'i64':
                        tempI64 = [
                            value >>> 0,
                            (tempDouble = value, +Math.abs(tempDouble) >= 1.0 ? tempDouble > 0.0 ? (Math.min(+Math.floor(tempDouble / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296.0) >>> 0 : 0)
                        ], HEAP32[ptr >> 2] = tempI64[0], HEAP32[ptr + 4 >> 2] = tempI64[1];
                        break;
                    case 'float':
                        HEAPF32[ptr >> 2] = value;
                        break;
                    case 'double':
                        HEAPF64[ptr >> 3] = value;
                        break;
                    default:
                        abort('invalid type for setValue: ' + type);
                }
            }
            function getValue(ptr, type, noSafe) {
                type = type || 'i8';
                if (type.charAt(type.length - 1) === '*') type = 'i32';
                switch(type){
                    case 'i1':
                        return HEAP8[ptr >> 0];
                    case 'i8':
                        return HEAP8[ptr >> 0];
                    case 'i16':
                        return HEAP16[ptr >> 1];
                    case 'i32':
                        return HEAP32[ptr >> 2];
                    case 'i64':
                        return HEAP32[ptr >> 2];
                    case 'float':
                        return HEAPF32[ptr >> 2];
                    case 'double':
                        return HEAPF64[ptr >> 3];
                    default:
                        abort('invalid type for getValue: ' + type);
                }
                return null;
            }
            var wasmMemory;
            var ABORT = false;
            function assert(condition, text) {
                if (!condition) {
                    abort('Assertion failed: ' + text);
                }
            }
            var ALLOC_STACK = 1;
            function allocate(slab, allocator) {
                var ret;
                assert(typeof allocator === 'number', 'allocate no longer takes a type argument');
                assert(typeof slab !== 'number', 'allocate no longer takes a number as arg0');
                if (allocator == ALLOC_STACK) {
                    ret = stackAlloc(slab.length);
                } else {
                    ret = _malloc(slab.length);
                }
                if (slab.subarray || slab.slice) {
                    HEAPU8.set(slab, ret);
                } else {
                    HEAPU8.set(new Uint8Array(slab), ret);
                }
                return ret;
            }
            var UTF8Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined;
            function UTF8ArrayToString(heap, idx, maxBytesToRead) {
                var endIdx = idx + maxBytesToRead;
                var endPtr = idx;
                while(heap[endPtr] && !(endPtr >= endIdx))++endPtr;
                if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) {
                    return UTF8Decoder.decode(heap.subarray(idx, endPtr));
                } else {
                    var str = '';
                    while(idx < endPtr){
                        var u0 = heap[idx++];
                        if (!(u0 & 0x80)) {
                            str += String.fromCharCode(u0);
                            continue;
                        }
                        var u1 = heap[idx++] & 63;
                        if ((u0 & 0xE0) == 0xC0) {
                            str += String.fromCharCode((u0 & 31) << 6 | u1);
                            continue;
                        }
                        var u2 = heap[idx++] & 63;
                        if ((u0 & 0xF0) == 0xE0) {
                            u0 = (u0 & 15) << 12 | u1 << 6 | u2;
                        } else {
                            if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte 0x' + u0.toString(16) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!');
                            u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63;
                        }
                        if (u0 < 0x10000) {
                            str += String.fromCharCode(u0);
                        } else {
                            var ch = u0 - 0x10000;
                            str += String.fromCharCode(0xD800 | ch >> 10, 0xDC00 | ch & 0x3FF);
                        }
                    }
                }
                return str;
            }
            function UTF8ToString(ptr, maxBytesToRead) {
                return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
            }
            function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
                if (!(maxBytesToWrite > 0)) return 0;
                var startIdx = outIdx;
                var endIdx = outIdx + maxBytesToWrite - 1;
                for(var i1 = 0; i1 < str.length; ++i1){
                    var u = str.charCodeAt(i1);
                    if (u >= 0xD800 && u <= 0xDFFF) {
                        var u1 = str.charCodeAt(++i1);
                        u = 0x10000 + ((u & 0x3FF) << 10) | u1 & 0x3FF;
                    }
                    if (u <= 0x7F) {
                        if (outIdx >= endIdx) break;
                        heap[outIdx++] = u;
                    } else if (u <= 0x7FF) {
                        if (outIdx + 1 >= endIdx) break;
                        heap[outIdx++] = 0xC0 | u >> 6;
                        heap[outIdx++] = 0x80 | u & 63;
                    } else if (u <= 0xFFFF) {
                        if (outIdx + 2 >= endIdx) break;
                        heap[outIdx++] = 0xE0 | u >> 12;
                        heap[outIdx++] = 0x80 | u >> 6 & 63;
                        heap[outIdx++] = 0x80 | u & 63;
                    } else {
                        if (outIdx + 3 >= endIdx) break;
                        if (u >= 0x200000) warnOnce('Invalid Unicode code point 0x' + u.toString(16) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x1FFFFF).');
                        heap[outIdx++] = 0xF0 | u >> 18;
                        heap[outIdx++] = 0x80 | u >> 12 & 63;
                        heap[outIdx++] = 0x80 | u >> 6 & 63;
                        heap[outIdx++] = 0x80 | u & 63;
                    }
                }
                heap[outIdx] = 0;
                return outIdx - startIdx;
            }
            function stringToUTF8(str, outPtr, maxBytesToWrite) {
                assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
                return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
            }
            function lengthBytesUTF8(str) {
                var len = 0;
                for(var i1 = 0; i1 < str.length; ++i1){
                    var u = str.charCodeAt(i1);
                    if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | str.charCodeAt(++i1) & 0x3FF;
                    if (u <= 0x7F) ++len;
                    else if (u <= 0x7FF) len += 2;
                    else if (u <= 0xFFFF) len += 3;
                    else len += 4;
                }
                return len;
            }
            function AsciiToString(ptr) {
                var str = '';
                while(1){
                    var ch = HEAPU8[ptr++ >> 0];
                    if (!ch) return str;
                    str += String.fromCharCode(ch);
                }
            }
            typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined;
            function stringToUTF16(str, outPtr, maxBytesToWrite) {
                assert(outPtr % 2 == 0, 'Pointer passed to stringToUTF16 must be aligned to two bytes!');
                assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
                if (maxBytesToWrite === undefined) {
                    maxBytesToWrite = 0x7FFFFFFF;
                }
                if (maxBytesToWrite < 2) return 0;
                maxBytesToWrite -= 2;
                var startPtr = outPtr;
                var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
                for(var i1 = 0; i1 < numCharsToWrite; ++i1){
                    var codeUnit = str.charCodeAt(i1);
                    HEAP16[outPtr >> 1] = codeUnit;
                    outPtr += 2;
                }
                HEAP16[outPtr >> 1] = 0;
                return outPtr - startPtr;
            }
            function allocateUTF8OnStack(str) {
                var size = lengthBytesUTF8(str) + 1;
                var ret = stackAlloc(size);
                stringToUTF8Array(str, HEAP8, ret, size);
                return ret;
            }
            function alignUp(x, multiple) {
                if (x % multiple > 0) {
                    x += multiple - x % multiple;
                }
                return x;
            }
            var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
            function updateGlobalBufferAndViews(buf) {
                buffer = buf;
                Module['HEAP8'] = HEAP8 = new Int8Array(buf);
                Module['HEAP16'] = HEAP16 = new Int16Array(buf);
                Module['HEAP32'] = HEAP32 = new Int32Array(buf);
                Module['HEAPU8'] = HEAPU8 = new Uint8Array(buf);
                Module['HEAPU16'] = HEAPU16 = new Uint16Array(buf);
                Module['HEAPU32'] = HEAPU32 = new Uint32Array(buf);
                Module['HEAPF32'] = HEAPF32 = new Float32Array(buf);
                Module['HEAPF64'] = HEAPF64 = new Float64Array(buf);
            }
            var TOTAL_STACK = 5242880;
            if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime');
            var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 33554432;
            if (!Object.getOwnPropertyDescriptor(Module, 'INITIAL_MEMORY')) {
                Object.defineProperty(Module, 'INITIAL_MEMORY', {
                    configurable: true,
                    get: function() {
                        abort('Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)');
                    }
                });
            }
            assert(INITIAL_MEMORY >= TOTAL_STACK, 'INITIAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')');
            assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, 'JS engine does not provide full typed array support');
            if (Module['wasmMemory']) {
                wasmMemory = Module['wasmMemory'];
            } else {
                wasmMemory = new WebAssembly.Memory({
                    'initial': INITIAL_MEMORY / 65536,
                    'maximum': 2147483648 / 65536
                });
            }
            if (wasmMemory) {
                buffer = wasmMemory.buffer;
            }
            INITIAL_MEMORY = buffer.byteLength;
            assert(INITIAL_MEMORY % 65536 === 0);
            updateGlobalBufferAndViews(buffer);
            var wasmTable = new WebAssembly.Table({
                'initial': 21,
                'element': 'anyfunc'
            });
            function writeStackCookie() {
                var max = _emscripten_stack_get_end();
                assert((max & 3) == 0);
                HEAPU32[(max >> 2) + 1] = 0x2135467;
                HEAPU32[(max >> 2) + 2] = 0x89BACDFE;
                HEAP32[0] = 0x63736d65;
            }
            function checkStackCookie() {
                if (ABORT) return;
                var max = _emscripten_stack_get_end();
                var cookie1 = HEAPU32[(max >> 2) + 1];
                var cookie2 = HEAPU32[(max >> 2) + 2];
                if (cookie1 != 0x2135467 || cookie2 != 0x89BACDFE) {
                    abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x' + cookie2.toString(16) + ' ' + cookie1.toString(16));
                }
                if (HEAP32[0] !== 0x63736d65) abort('Runtime error: The application has corrupted its heap memory area (address zero)!');
            }
            (function() {
                var h16 = new Int16Array(1);
                var h8 = new Int8Array(h16.buffer);
                h16[0] = 0x6373;
                if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)';
            })();
            var __ATPRERUN__ = [];
            var __ATINIT__ = [];
            var __ATMAIN__ = [];
            var __ATPOSTRUN__ = [];
            var runtimeInitialized = false;
            var runtimeExited = false;
            function preRun() {
                if (Module['preRun']) {
                    if (typeof Module['preRun'] == 'function') Module['preRun'] = [
                        Module['preRun']
                    ];
                    while(Module['preRun'].length){
                        addOnPreRun(Module['preRun'].shift());
                    }
                }
                callRuntimeCallbacks(__ATPRERUN__);
            }
            function initRuntime() {
                checkStackCookie();
                assert(!runtimeInitialized);
                runtimeInitialized = true;
                callRuntimeCallbacks(__ATINIT__);
            }
            function preMain() {
                checkStackCookie();
                callRuntimeCallbacks(__ATMAIN__);
            }
            function exitRuntime() {
                checkStackCookie();
                runtimeExited = true;
            }
            function postRun() {
                checkStackCookie();
                if (Module['postRun']) {
                    if (typeof Module['postRun'] == 'function') Module['postRun'] = [
                        Module['postRun']
                    ];
                    while(Module['postRun'].length){
                        addOnPostRun(Module['postRun'].shift());
                    }
                }
                callRuntimeCallbacks(__ATPOSTRUN__);
            }
            function addOnPreRun(cb) {
                __ATPRERUN__.unshift(cb);
            }
            function addOnInit(cb) {
                __ATINIT__.unshift(cb);
            }
            function addOnPostRun(cb) {
                __ATPOSTRUN__.unshift(cb);
            }
            assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
            assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
            assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
            assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
            var runDependencies = 0;
            var runDependencyWatcher = null;
            var dependenciesFulfilled = null;
            var runDependencyTracking = {};
            function addRunDependency(id) {
                runDependencies++;
                if (Module['monitorRunDependencies']) {
                    Module['monitorRunDependencies'](runDependencies);
                }
                if (id) {
                    assert(!runDependencyTracking[id]);
                    runDependencyTracking[id] = 1;
                    if (runDependencyWatcher === null && typeof setInterval !== 'undefined') {
                        runDependencyWatcher = setInterval(function() {
                            if (ABORT) {
                                clearInterval(runDependencyWatcher);
                                runDependencyWatcher = null;
                                return;
                            }
                            var shown = false;
                            for(var dep in runDependencyTracking){
                                if (!shown) {
                                    shown = true;
                                    err('still waiting on run dependencies:');
                                }
                                err('dependency: ' + dep);
                            }
                            if (shown) {
                                err('(end of list)');
                            }
                        }, 10000);
                    }
                } else {
                    err('warning: run dependency added without ID');
                }
            }
            function removeRunDependency(id) {
                runDependencies--;
                if (Module['monitorRunDependencies']) {
                    Module['monitorRunDependencies'](runDependencies);
                }
                if (id) {
                    assert(runDependencyTracking[id]);
                    delete runDependencyTracking[id];
                } else {
                    err('warning: run dependency removed without ID');
                }
                if (runDependencies == 0) {
                    if (runDependencyWatcher !== null) {
                        clearInterval(runDependencyWatcher);
                        runDependencyWatcher = null;
                    }
                    if (dependenciesFulfilled) {
                        var callback = dependenciesFulfilled;
                        dependenciesFulfilled = null;
                        callback();
                    }
                }
            }
            Module["preloadedImages"] = {};
            Module["preloadedAudios"] = {};
            Module["preloadedWasm"] = {};
            function abort(what) {
                if (Module['onAbort']) {
                    Module['onAbort'](what);
                }
                what += '';
                err(what);
                ABORT = true;
                1;
                var output = 'abort(' + what + ') at ' + stackTrace();
                what = output;
                var e = new WebAssembly.RuntimeError(what);
                throw e;
            }
            var FS = {
                error: function() {
                    abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with  -s FORCE_FILESYSTEM=1');
                },
                init: function() {
                    FS.error();
                },
                createDataFile: function() {
                    FS.error();
                },
                createPreloadedFile: function() {
                    FS.error();
                },
                createLazyFile: function() {
                    FS.error();
                },
                open: function() {
                    FS.error();
                },
                mkdev: function() {
                    FS.error();
                },
                registerDevice: function() {
                    FS.error();
                },
                analyzePath: function() {
                    FS.error();
                },
                loadFilesFromDB: function() {
                    FS.error();
                },
                ErrnoError: function ErrnoError() {
                    FS.error();
                }
            };
            Module['FS_createDataFile'] = FS.createDataFile;
            Module['FS_createPreloadedFile'] = FS.createPreloadedFile;
            var dataURIPrefix = 'data:application/octet-stream;base64,';
            function isDataURI(filename) {
                return filename.startsWith(dataURIPrefix);
            }
            function createExportWrapper(name, fixedasm) {
                return function() {
                    var displayName = name;
                    var asm = fixedasm;
                    if (!fixedasm) {
                        asm = Module['asm'];
                    }
                    assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization');
                    assert(!runtimeExited, 'native function `' + displayName + '` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
                    if (!asm[name]) {
                        assert(asm[name], 'exported native function `' + displayName + '` not found');
                    }
                    return asm[name].apply(null, arguments);
                };
            }
            async function createWasm() {
                var info = {
                    'env': asmLibraryArg,
                    'wasi_snapshot_preview1': asmLibraryArg,
                    'GOT.mem': new Proxy(asmLibraryArg, GOTHandler),
                    'GOT.func': new Proxy(asmLibraryArg, GOTHandler)
                };
                function receiveInstance(instance, module) {
                    var exports = instance.exports;
                    exports = relocateExports(exports, 1024);
                    Module['asm'] = exports;
                    var metadata = getDylinkMetadata(module);
                    if (metadata.neededDynlibs) {
                        dynamicLibraries = metadata.neededDynlibs.concat(dynamicLibraries);
                    }
                    mergeLibSymbols(exports, 'main');
                    addOnInit(Module['asm']['__wasm_call_ctors']);
                    removeRunDependency('wasm-instantiate');
                    wasmInstantiateResolve();
                }
                addRunDependency('wasm-instantiate');
                var trueModule = Module;
                function receiveInstantiationResult(result1) {
                    assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?');
                    trueModule = null;
                    receiveInstance(result1['instance'], result1['module']);
                }
                let wasmModule = new WebAssembly.Module(wasmBinaryFile);
                let wasmInstance = new WebAssembly.Instance(wasmModule, info);
                receiveInstantiationResult({
                    module: wasmModule,
                    instance: wasmInstance
                });
                return {};
            }
            var tempDouble;
            var tempI64;
            var GOT = {};
            var GOTHandler = {
                get: function(obj, symName) {
                    if (!GOT[symName]) {
                        GOT[symName] = new WebAssembly.Global({
                            'value': 'i32',
                            'mutable': true
                        });
                    }
                    return GOT[symName];
                }
            };
            function callRuntimeCallbacks(callbacks) {
                while(callbacks.length > 0){
                    var callback = callbacks.shift();
                    if (typeof callback == 'function') {
                        callback(Module);
                        continue;
                    }
                    var func = callback.func;
                    if (typeof func === 'number') {
                        if (callback.arg === undefined) {
                            wasmTable.get(func)();
                        } else {
                            wasmTable.get(func)(callback.arg);
                        }
                    } else {
                        func(callback.arg === undefined ? null : callback.arg);
                    }
                }
            }
            function demangle(func) {
                warnOnce('warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling');
                return func;
            }
            function demangleAll(text) {
                var regex = /\b_Z[\w\d_]+/g;
                return text.replace(regex, function(x) {
                    var y = demangle(x);
                    return x === y ? x : y + ' [' + x + ']';
                });
            }
            function getDylinkMetadata(binary) {
                var next = 0;
                function getLEB() {
                    var ret = 0;
                    var mul = 1;
                    while(1){
                        var __byte = binary[next++];
                        ret += (__byte & 0x7f) * mul;
                        mul *= 0x80;
                        if (!(__byte & 0x80)) break;
                    }
                    return ret;
                }
                if (binary instanceof WebAssembly.Module) {
                    var dylinkSection = WebAssembly.Module.customSections(binary, "dylink");
                    assert(dylinkSection.length != 0, 'need dylink section');
                    binary = new Int8Array(dylinkSection[0]);
                } else {
                    var int32View = new Uint32Array(new Uint8Array(binary.subarray(0, 24)).buffer);
                    assert(int32View[0] == 0x6d736100, 'need to see wasm magic number');
                    assert(binary[8] === 0, 'need the dylink section to be first');
                    next = 9;
                    getLEB();
                    assert(binary[next] === 6);
                    next++;
                    assert(binary[next] === 'd'.charCodeAt(0));
                    next++;
                    assert(binary[next] === 'y'.charCodeAt(0));
                    next++;
                    assert(binary[next] === 'l'.charCodeAt(0));
                    next++;
                    assert(binary[next] === 'i'.charCodeAt(0));
                    next++;
                    assert(binary[next] === 'n'.charCodeAt(0));
                    next++;
                    assert(binary[next] === 'k'.charCodeAt(0));
                    next++;
                }
                var customSection = {};
                customSection.memorySize = getLEB();
                customSection.memoryAlign = getLEB();
                customSection.tableSize = getLEB();
                customSection.tableAlign = getLEB();
                var tableAlign = Math.pow(2, customSection.tableAlign);
                assert(tableAlign === 1, 'invalid tableAlign ' + tableAlign);
                var neededDynlibsCount = getLEB();
                customSection.neededDynlibs = [];
                for(var i1 = 0; i1 < neededDynlibsCount; ++i1){
                    var nameLen = getLEB();
                    var nameUTF8 = binary.subarray(next, next + nameLen);
                    next += nameLen;
                    var name = UTF8ArrayToString(nameUTF8, 0);
                    customSection.neededDynlibs.push(name);
                }
                return customSection;
            }
            function jsStackTrace() {
                var error = new Error();
                if (!error.stack) {
                    try {
                        throw new Error();
                    } catch (e) {
                        error = e;
                    }
                    if (!error.stack) {
                        return '(no stack trace available)';
                    }
                }
                return error.stack.toString();
            }
            var runtimeKeepaliveCounter = 0;
            function keepRuntimeAlive() {
                return noExitRuntime || runtimeKeepaliveCounter > 0;
            }
            function asmjsMangle(x) {
                var unmangledSymbols = [
                    'stackAlloc',
                    'stackSave',
                    'stackRestore'
                ];
                return x.indexOf('dynCall_') == 0 || unmangledSymbols.includes(x) ? x : '_' + x;
            }
            function mergeLibSymbols(exports, libName) {
                for(var sym in exports){
                    if (!exports.hasOwnProperty(sym)) {
                        continue;
                    }
                    if (!asmLibraryArg.hasOwnProperty(sym)) {
                        asmLibraryArg[sym] = exports[sym];
                    }
                    var module_sym = asmjsMangle(sym);
                    if (!Module.hasOwnProperty(module_sym)) {
                        Module[module_sym] = exports[sym];
                    }
                }
            }
            var LDSO = {
                nextHandle: 1,
                loadedLibs: {},
                loadedLibNames: {}
            };
            function dynCallLegacy(sig, ptr, args) {
                assert('dynCall_' + sig in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
                if (args && args.length) {
                    assert(args.length === sig.substring(1).replace(/j/g, '--').length);
                } else {
                    assert(sig.length == 1);
                }
                var f = Module["dynCall_" + sig];
                return args && args.length ? f.apply(null, [
                    ptr
                ].concat(args)) : f.call(null, ptr);
            }
            function dynCall(sig, ptr, args) {
                if (sig.includes('j')) {
                    return dynCallLegacy(sig, ptr, args);
                }
                assert(wasmTable.get(ptr), 'missing table entry in dynCall: ' + ptr);
                return wasmTable.get(ptr).apply(null, args);
            }
            function createInvokeFunction(sig) {
                return function() {
                    var sp = stackSave();
                    try {
                        return dynCall(sig, arguments[0], Array.prototype.slice.call(arguments, 1));
                    } catch (e) {
                        stackRestore(sp);
                        if (e !== e + 0 && e !== 'longjmp') throw e;
                        _setThrew(1, 0);
                    }
                };
            }
            var ___heap_base = 5251008;
            Module["___heap_base"] = ___heap_base;
            function getMemory(size) {
                if (runtimeInitialized) return _malloc(size);
                var ret = ___heap_base;
                var end = ret + size + 15 & -16;
                assert(end <= HEAP8.length, 'failure to getMemory - memory growth etc. is not supported there, call malloc/sbrk directly or increase INITIAL_MEMORY');
                ___heap_base = end;
                GOT['__heap_base'].value = end;
                return ret;
            }
            function isInternalSym(symName) {
                return [
                    '__cpp_exception',
                    '__wasm_apply_data_relocs',
                    '__dso_handle',
                    '__set_stack_limits'
                ].includes(symName);
            }
            function updateGOT(exports) {
                for(var symName in exports){
                    if (isInternalSym(symName)) {
                        continue;
                    }
                    var replace = false;
                    var value = exports[symName];
                    if (symName.startsWith('orig$')) {
                        symName = symName.split('$')[1];
                        replace = true;
                    }
                    if (!GOT[symName]) {
                        GOT[symName] = new WebAssembly.Global({
                            'value': 'i32',
                            'mutable': true
                        });
                    }
                    if (replace || GOT[symName].value == 0) {
                        if (typeof value === 'function') {
                            GOT[symName].value = addFunctionWasm(value);
                        } else if (typeof value === 'number') {
                            GOT[symName].value = value;
                        } else {
                            err("unhandled export type for `" + symName + "`: " + typeof value);
                        }
                    }
                }
            }
            function relocateExports(exports, memoryBase) {
                var relocated = {};
                for(var e in exports){
                    var value = exports[e];
                    if (typeof value === 'object') {
                        value = value.value;
                    }
                    if (typeof value === 'number') {
                        value += memoryBase;
                    }
                    relocated[e] = value;
                }
                updateGOT(relocated);
                return relocated;
            }
            function resolveGlobalSymbol(symName, direct) {
                var sym;
                if (direct) {
                    sym = asmLibraryArg['orig$' + symName];
                }
                if (!sym) {
                    sym = asmLibraryArg[symName];
                }
                if (!sym) {
                    sym = Module[asmjsMangle(symName)];
                }
                if (!sym && symName.startsWith('invoke_')) {
                    sym = createInvokeFunction(symName.split('_')[1]);
                }
                return sym;
            }
            function loadWebAssemblyModule(binary, flags) {
                var metadata = getDylinkMetadata(binary);
                var originalTable = wasmTable;
                function loadModule() {
                    var memAlign = Math.pow(2, metadata.memoryAlign);
                    memAlign = Math.max(memAlign, STACK_ALIGN);
                    var memoryBase = alignMemory(getMemory(metadata.memorySize + memAlign), memAlign);
                    var tableBase = wasmTable.length;
                    wasmTable.grow(metadata.tableSize);
                    for(var i1 = memoryBase; i1 < memoryBase + metadata.memorySize; i1++){
                        HEAP8[i1] = 0;
                    }
                    for(var i1 = tableBase; i1 < tableBase + metadata.tableSize; i1++){
                        wasmTable.set(i1, null);
                    }
                    var moduleExports;
                    function resolveSymbol(sym) {
                        var resolved = resolveGlobalSymbol(sym, false);
                        if (!resolved) {
                            resolved = moduleExports[sym];
                        }
                        assert(resolved, 'undefined symbol `' + sym + '`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment');
                        return resolved;
                    }
                    var proxyHandler = {
                        'get': function(stubs, prop) {
                            switch(prop){
                                case '__memory_base':
                                    return memoryBase;
                                case '__table_base':
                                    return tableBase;
                            }
                            if (prop in asmLibraryArg) {
                                return asmLibraryArg[prop];
                            }
                            if (!(prop in stubs)) {
                                var resolved;
                                stubs[prop] = function() {
                                    if (!resolved) resolved = resolveSymbol(prop, true);
                                    return resolved.apply(null, arguments);
                                };
                            }
                            return stubs[prop];
                        }
                    };
                    var proxy = new Proxy({}, proxyHandler);
                    var info = {
                        'GOT.mem': new Proxy({}, GOTHandler),
                        'GOT.func': new Proxy({}, GOTHandler),
                        'env': proxy,
                        wasi_snapshot_preview1: proxy
                    };
                    function postInstantiation(instance) {
                        assert(wasmTable === originalTable);
                        for(var i1 = 0; i1 < metadata.tableSize; i1++){
                            var item = wasmTable.get(tableBase + i1);
                            assert(item !== undefined, 'table entry was not filled in');
                            if (item) {
                                functionsInTableMap.set(item, tableBase + i1);
                            }
                        }
                        moduleExports = relocateExports(instance.exports, memoryBase);
                        if (!flags.allowUndefined) {
                            reportUndefinedSymbols();
                        }
                        var init = moduleExports['__wasm_call_ctors'];
                        if (!init) {
                            init = moduleExports['__post_instantiate'];
                        }
                        if (init) {
                            if (runtimeInitialized) {
                                init();
                            } else {
                                __ATINIT__.push(init);
                            }
                        }
                        return moduleExports;
                    }
                    var module = binary instanceof WebAssembly.Module ? binary : new WebAssembly.Module(binary);
                    var instance = new WebAssembly.Instance(module, info);
                    return postInstantiation(instance);
                }
                if (flags.loadAsync) {
                    return metadata.neededDynlibs.reduce(function(chain, dynNeeded) {
                        return chain.then(function() {
                            return loadDynamicLibrary(dynNeeded, flags);
                        });
                    }, Promise.resolve()).then(function() {
                        return loadModule();
                    });
                }
                metadata.neededDynlibs.forEach(function(dynNeeded) {
                    loadDynamicLibrary(dynNeeded, flags);
                });
                return loadModule();
            }
            function fetchBinary(url) {
                return fetch(url, {
                    credentials: 'same-origin'
                }).then(function(response) {
                    if (!response['ok']) {
                        throw "failed to load binary file at '" + url + "'";
                    }
                    return response['arrayBuffer']();
                }).then(function(buffer) {
                    return new Uint8Array(buffer);
                });
            }
            function loadDynamicLibrary(lib, flags) {
                if (lib == '__main__' && !LDSO.loadedLibNames[lib]) {
                    LDSO.loadedLibs[-1] = {
                        refcount: Infinity,
                        name: '__main__',
                        module: Module['asm'],
                        global: true
                    };
                    LDSO.loadedLibNames['__main__'] = -1;
                }
                flags = flags || {
                    global: true,
                    nodelete: true
                };
                var handle = LDSO.loadedLibNames[lib];
                var dso;
                if (handle) {
                    dso = LDSO.loadedLibs[handle];
                    if (flags.global && !dso.global) {
                        dso.global = true;
                        if (dso.module !== 'loading') {
                            mergeLibSymbols(dso.module, lib);
                        }
                    }
                    if (flags.nodelete && dso.refcount !== Infinity) {
                        dso.refcount = Infinity;
                    }
                    dso.refcount++;
                    return flags.loadAsync ? Promise.resolve(handle) : handle;
                }
                handle = LDSO.nextHandle++;
                dso = {
                    refcount: flags.nodelete ? Infinity : 1,
                    name: lib,
                    module: 'loading',
                    global: flags.global
                };
                LDSO.loadedLibNames[lib] = handle;
                LDSO.loadedLibs[handle] = dso;
                function loadLibData(libFile) {
                    if (flags.fs) {
                        var libData = flags.fs.readFile(libFile, {
                            encoding: 'binary'
                        });
                        if (!(libData instanceof Uint8Array)) {
                            libData = new Uint8Array(libData);
                        }
                        return flags.loadAsync ? Promise.resolve(libData) : libData;
                    }
                    if (flags.loadAsync) {
                        return fetchBinary(libFile);
                    }
                    return readBinary(libFile);
                }
                function getLibModule() {
                    if (Module['preloadedWasm'] !== undefined && Module['preloadedWasm'][lib] !== undefined) {
                        var libModule = Module['preloadedWasm'][lib];
                        return flags.loadAsync ? Promise.resolve(libModule) : libModule;
                    }
                    if (flags.loadAsync) {
                        return loadLibData(lib).then(function(libData) {
                            return loadWebAssemblyModule(libData, flags);
                        });
                    }
                    return loadWebAssemblyModule(loadLibData(lib), flags);
                }
                function moduleLoaded(libModule) {
                    if (dso.global) {
                        mergeLibSymbols(libModule, lib);
                    }
                    dso.module = libModule;
                }
                if (flags.loadAsync) {
                    return getLibModule().then(function(libModule) {
                        moduleLoaded(libModule);
                        return handle;
                    });
                }
                moduleLoaded(getLibModule());
                return handle;
            }
            function reportUndefinedSymbols() {
                for(var symName in GOT){
                    if (GOT[symName].value == 0) {
                        var value = resolveGlobalSymbol(symName, true);
                        assert(value, 'undefined symbol `' + symName + '`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment');
                        if (typeof value === 'function') {
                            GOT[symName].value = addFunctionWasm(value, value.sig);
                        } else if (typeof value === 'number') {
                            GOT[symName].value = value;
                        } else {
                            assert(false, 'bad export type for `' + symName + '`: ' + typeof value);
                        }
                    }
                }
            }
            function preloadDylibs() {
                if (!dynamicLibraries.length) {
                    reportUndefinedSymbols();
                    return;
                }
                if (!readBinary) {
                    addRunDependency('preloadDylibs');
                    dynamicLibraries.reduce(function(chain, lib) {
                        return chain.then(function() {
                            return loadDynamicLibrary(lib, {
                                loadAsync: true,
                                global: true,
                                nodelete: true,
                                allowUndefined: true
                            });
                        });
                    }, Promise.resolve()).then(function() {
                        removeRunDependency('preloadDylibs');
                        reportUndefinedSymbols();
                    });
                    return;
                }
                dynamicLibraries.forEach(function(lib) {
                    loadDynamicLibrary(lib, {
                        global: true,
                        nodelete: true,
                        allowUndefined: true
                    });
                });
                reportUndefinedSymbols();
            }
            function stackTrace() {
                var js = jsStackTrace();
                if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace']();
                return demangleAll(js);
            }
            var ___stack_pointer = new WebAssembly.Global({
                'value': 'i32',
                'mutable': true
            }, 5251008);
            function _abort() {
                abort();
            }
            Module["_abort"] = _abort;
            _abort.sig = 'v';
            var _emscripten_get_now = function() {
                return performance.now();
            };
            var _emscripten_get_now_is_monotonic = true;
            function setErrNo(value) {
                HEAP32[___errno_location() >> 2] = value;
                return value;
            }
            function _clock_gettime(clk_id, tp) {
                var now;
                if (clk_id === 0) {
                    now = Date.now();
                } else if ((clk_id === 1 || clk_id === 4) && _emscripten_get_now_is_monotonic) {
                    now = _emscripten_get_now();
                } else {
                    setErrNo(28);
                    return -1;
                }
                HEAP32[tp >> 2] = now / 1000 | 0;
                HEAP32[tp + 4 >> 2] = now % 1000 * 1000 * 1000 | 0;
                return 0;
            }
            _clock_gettime.sig = 'iii';
            function _emscripten_memcpy_big(dest, src, num) {
                HEAPU8.copyWithin(dest, src, src + num);
            }
            function emscripten_realloc_buffer(size) {
                try {
                    wasmMemory.grow(size - buffer.byteLength + 65535 >>> 16);
                    updateGlobalBufferAndViews(wasmMemory.buffer);
                    return 1;
                } catch (e) {
                    console.error('emscripten_realloc_buffer: Attempted to grow heap from ' + buffer.byteLength + ' bytes to ' + size + ' bytes, but got error: ' + e);
                }
            }
            function _emscripten_resize_heap(requestedSize) {
                var oldSize = HEAPU8.length;
                requestedSize = requestedSize >>> 0;
                assert(requestedSize > oldSize);
                var maxHeapSize = 2147483648;
                if (requestedSize > maxHeapSize) {
                    err('Cannot enlarge memory, asked to go up to ' + requestedSize + ' bytes, but the limit is ' + maxHeapSize + ' bytes!');
                    return false;
                }
                for(var cutDown = 1; cutDown <= 4; cutDown *= 2){
                    var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);
                    overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);
                    var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));
                    var replacement = emscripten_realloc_buffer(newSize);
                    if (replacement) {
                        return true;
                    }
                }
                err('Failed to grow the heap from ' + oldSize + ' bytes to ' + newSize + ' bytes, not enough memory!');
                return false;
            }
            function _exit(status) {
                exit(status);
            }
            _exit.sig = 'vi';
            var SYSCALLS = {
                mappings: {},
                DEFAULT_POLLMASK: 5,
                umask: 511,
                calculateAt: function(dirfd, path, allowEmpty) {
                    if (path[0] === '/') {
                        return path;
                    }
                    var dir;
                    if (dirfd === -100) {
                        dir = FS.cwd();
                    } else {
                        var dirstream = FS.getStream(dirfd);
                        if (!dirstream) throw new FS.ErrnoError(8);
                        dir = dirstream.path;
                    }
                    if (path.length == 0) {
                        if (!allowEmpty) {
                            throw new FS.ErrnoError(44);
                        }
                        return dir;
                    }
                    return PATH.join2(dir, path);
                },
                doStat: function(func, path, buf) {
                    try {
                        var stat = func(path);
                    } catch (e) {
                        if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
                            return -54;
                        }
                        throw e;
                    }
                    HEAP32[buf >> 2] = stat.dev;
                    HEAP32[buf + 4 >> 2] = 0;
                    HEAP32[buf + 8 >> 2] = stat.ino;
                    HEAP32[buf + 12 >> 2] = stat.mode;
                    HEAP32[buf + 16 >> 2] = stat.nlink;
                    HEAP32[buf + 20 >> 2] = stat.uid;
                    HEAP32[buf + 24 >> 2] = stat.gid;
                    HEAP32[buf + 28 >> 2] = stat.rdev;
                    HEAP32[buf + 32 >> 2] = 0;
                    tempI64 = [
                        stat.size >>> 0,
                        (tempDouble = stat.size, +Math.abs(tempDouble) >= 1.0 ? tempDouble > 0.0 ? (Math.min(+Math.floor(tempDouble / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296.0) >>> 0 : 0)
                    ], HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1];
                    HEAP32[buf + 48 >> 2] = 4096;
                    HEAP32[buf + 52 >> 2] = stat.blocks;
                    HEAP32[buf + 56 >> 2] = stat.atime.getTime() / 1000 | 0;
                    HEAP32[buf + 60 >> 2] = 0;
                    HEAP32[buf + 64 >> 2] = stat.mtime.getTime() / 1000 | 0;
                    HEAP32[buf + 68 >> 2] = 0;
                    HEAP32[buf + 72 >> 2] = stat.ctime.getTime() / 1000 | 0;
                    HEAP32[buf + 76 >> 2] = 0;
                    tempI64 = [
                        stat.ino >>> 0,
                        (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1.0 ? tempDouble > 0.0 ? (Math.min(+Math.floor(tempDouble / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296.0) >>> 0 : 0)
                    ], HEAP32[buf + 80 >> 2] = tempI64[0], HEAP32[buf + 84 >> 2] = tempI64[1];
                    return 0;
                },
                doMsync: function(addr, stream, len, flags, offset) {
                    var buffer = HEAPU8.slice(addr, addr + len);
                    FS.msync(stream, buffer, offset, len, flags);
                },
                doMkdir: function(path, mode) {
                    path = PATH.normalize(path);
                    if (path[path.length - 1] === '/') path = path.substr(0, path.length - 1);
                    FS.mkdir(path, mode, 0);
                    return 0;
                },
                doMknod: function(path, mode, dev) {
                    switch(mode & 61440){
                        case 32768:
                        case 8192:
                        case 24576:
                        case 4096:
                        case 49152:
                            break;
                        default:
                            return -28;
                    }
                    FS.mknod(path, mode, dev);
                    return 0;
                },
                doReadlink: function(path, buf, bufsize) {
                    if (bufsize <= 0) return -28;
                    var ret = FS.readlink(path);
                    var len = Math.min(bufsize, lengthBytesUTF8(ret));
                    var endChar = HEAP8[buf + len];
                    stringToUTF8(ret, buf, bufsize + 1);
                    HEAP8[buf + len] = endChar;
                    return len;
                },
                doAccess: function(path, amode) {
                    if (amode & ~7) {
                        return -28;
                    }
                    var node;
                    var lookup = FS.lookupPath(path, {
                        follow: true
                    });
                    node = lookup.node;
                    if (!node) {
                        return -44;
                    }
                    var perms = '';
                    if (amode & 4) perms += 'r';
                    if (amode & 2) perms += 'w';
                    if (amode & 1) perms += 'x';
                    if (perms && FS.nodePermissions(node, perms)) {
                        return -2;
                    }
                    return 0;
                },
                doDup: function(path, flags, suggestFD) {
                    var suggest = FS.getStream(suggestFD);
                    if (suggest) FS.close(suggest);
                    return FS.open(path, flags, 0, suggestFD, suggestFD).fd;
                },
                doReadv: function(stream, iov, iovcnt, offset) {
                    var ret = 0;
                    for(var i1 = 0; i1 < iovcnt; i1++){
                        var ptr = HEAP32[iov + i1 * 8 >> 2];
                        var len = HEAP32[iov + (i1 * 8 + 4) >> 2];
                        var curr = FS.read(stream, HEAP8, ptr, len, offset);
                        if (curr < 0) return -1;
                        ret += curr;
                        if (curr < len) break;
                    }
                    return ret;
                },
                doWritev: function(stream, iov, iovcnt, offset) {
                    var ret = 0;
                    for(var i1 = 0; i1 < iovcnt; i1++){
                        var ptr = HEAP32[iov + i1 * 8 >> 2];
                        var len = HEAP32[iov + (i1 * 8 + 4) >> 2];
                        var curr = FS.write(stream, HEAP8, ptr, len, offset);
                        if (curr < 0) return -1;
                        ret += curr;
                    }
                    return ret;
                },
                varargs: undefined,
                get: function() {
                    assert(SYSCALLS.varargs != undefined);
                    SYSCALLS.varargs += 4;
                    var ret = HEAP32[SYSCALLS.varargs - 4 >> 2];
                    return ret;
                },
                getStr: function(ptr) {
                    var ret = UTF8ToString(ptr);
                    return ret;
                },
                getStreamFromFD: function(fd) {
                    var stream = FS.getStream(fd);
                    if (!stream) throw new FS.ErrnoError(8);
                    return stream;
                },
                get64: function(low, high) {
                    if (low >= 0) assert(high === 0);
                    else assert(high === -1);
                    return low;
                }
            };
            function _fd_close(fd) {
                try {
                    var stream = SYSCALLS.getStreamFromFD(fd);
                    FS.close(stream);
                    return 0;
                } catch (e) {
                    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
                    return e.errno;
                }
            }
            _fd_close.sig = 'ii';
            function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
                try {
                    var stream = SYSCALLS.getStreamFromFD(fd);
                    var HIGH_OFFSET = 0x100000000;
                    var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0);
                    var DOUBLE_LIMIT = 0x20000000000000;
                    if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) {
                        return -61;
                    }
                    FS.llseek(stream, offset, whence);
                    tempI64 = [
                        stream.position >>> 0,
                        (tempDouble = stream.position, +Math.abs(tempDouble) >= 1.0 ? tempDouble > 0.0 ? (Math.min(+Math.floor(tempDouble / 4294967296.0), 4294967295.0) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296.0) >>> 0 : 0)
                    ], HEAP32[newOffset >> 2] = tempI64[0], HEAP32[newOffset + 4 >> 2] = tempI64[1];
                    if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null;
                    return 0;
                } catch (e) {
                    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
                    return e.errno;
                }
            }
            function _fd_write(fd, iov, iovcnt, pnum) {
                try {
                    var stream = SYSCALLS.getStreamFromFD(fd);
                    var num = SYSCALLS.doWritev(stream, iov, iovcnt);
                    HEAP32[pnum >> 2] = num;
                    return 0;
                } catch (e) {
                    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
                    return e.errno;
                }
            }
            _fd_write.sig = 'iiiii';
            function _setTempRet0(val) {
                setTempRet0(val);
            }
            _setTempRet0.sig = 'vi';
            function _tree_sitter_log_callback(isLexMessage, messageAddress) {
                if (currentLogCallback) {
                    const message = UTF8ToString(messageAddress);
                    currentLogCallback(message, isLexMessage !== 0);
                }
            }
            function _tree_sitter_parse_callback(inputBufferAddress, index, row, column, lengthAddress) {
                var INPUT_BUFFER_SIZE = 10 * 1024;
                var string = currentParseCallback(index, {
                    row: row,
                    column: column
                });
                if (typeof string === 'string') {
                    setValue(lengthAddress, string.length, 'i32');
                    stringToUTF16(string, inputBufferAddress, INPUT_BUFFER_SIZE);
                } else {
                    setValue(lengthAddress, 0, 'i32');
                }
            }
            var ___memory_base = 1024;
            var ___table_base = 1;
            var decodeBase64 = typeof atob === 'function' ? atob : function(input) {
                var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
                var output = '';
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i1 = 0;
                input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
                do {
                    enc1 = keyStr.indexOf(input.charAt(i1++));
                    enc2 = keyStr.indexOf(input.charAt(i1++));
                    enc3 = keyStr.indexOf(input.charAt(i1++));
                    enc4 = keyStr.indexOf(input.charAt(i1++));
                    chr1 = enc1 << 2 | enc2 >> 4;
                    chr2 = (enc2 & 15) << 4 | enc3 >> 2;
                    chr3 = (enc3 & 3) << 6 | enc4;
                    output = output + String.fromCharCode(chr1);
                    if (enc3 !== 64) {
                        output = output + String.fromCharCode(chr2);
                    }
                    if (enc4 !== 64) {
                        output = output + String.fromCharCode(chr3);
                    }
                }while (i1 < input.length)
                return output;
            };
            function intArrayFromBase64(s) {
                try {
                    var decoded = decodeBase64(s);
                    var bytes = new Uint8Array(decoded.length);
                    for(var i1 = 0; i1 < decoded.length; ++i1){
                        bytes[i1] = decoded.charCodeAt(i1);
                    }
                    return bytes;
                } catch (_) {
                    throw new Error('Converting base64 string to bytes failed.');
                }
            }
            function tryParseAsDataURI(filename) {
                if (!isDataURI(filename)) {
                    return undefined;
                }
                return intArrayFromBase64(filename.slice(dataURIPrefix.length));
            }
            var asmLibraryArg = {
                "__heap_base": ___heap_base,
                "__indirect_function_table": wasmTable,
                "__memory_base": ___memory_base,
                "__stack_pointer": ___stack_pointer,
                "__table_base": ___table_base,
                "abort": _abort,
                "clock_gettime": _clock_gettime,
                "emscripten_memcpy_big": _emscripten_memcpy_big,
                "emscripten_resize_heap": _emscripten_resize_heap,
                "exit": _exit,
                "fd_close": _fd_close,
                "fd_seek": _fd_seek,
                "fd_write": _fd_write,
                "memory": wasmMemory,
                "setTempRet0": _setTempRet0,
                "tree_sitter_log_callback": _tree_sitter_log_callback,
                "tree_sitter_parse_callback": _tree_sitter_parse_callback
            };
            await createWasm();
            Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors");
            Module["_ts_language_symbol_count"] = createExportWrapper("ts_language_symbol_count");
            Module["_ts_language_version"] = createExportWrapper("ts_language_version");
            Module["_ts_language_field_count"] = createExportWrapper("ts_language_field_count");
            Module["_ts_language_symbol_name"] = createExportWrapper("ts_language_symbol_name");
            Module["_ts_language_symbol_for_name"] = createExportWrapper("ts_language_symbol_for_name");
            Module["_ts_language_symbol_type"] = createExportWrapper("ts_language_symbol_type");
            Module["_ts_language_field_name_for_id"] = createExportWrapper("ts_language_field_name_for_id");
            Module["_memcpy"] = createExportWrapper("memcpy");
            Module["_free"] = createExportWrapper("free");
            Module["_calloc"] = createExportWrapper("calloc");
            Module["_ts_parser_delete"] = createExportWrapper("ts_parser_delete");
            Module["_ts_parser_set_language"] = createExportWrapper("ts_parser_set_language");
            Module["_ts_parser_reset"] = createExportWrapper("ts_parser_reset");
            Module["_ts_parser_timeout_micros"] = createExportWrapper("ts_parser_timeout_micros");
            Module["_ts_parser_set_timeout_micros"] = createExportWrapper("ts_parser_set_timeout_micros");
            Module["_ts_query_new"] = createExportWrapper("ts_query_new");
            Module["_ts_query_delete"] = createExportWrapper("ts_query_delete");
            var _malloc = Module["_malloc"] = createExportWrapper("malloc");
            Module["_iswspace"] = createExportWrapper("iswspace");
            Module["_ts_query_pattern_count"] = createExportWrapper("ts_query_pattern_count");
            Module["_ts_query_capture_count"] = createExportWrapper("ts_query_capture_count");
            Module["_ts_query_string_count"] = createExportWrapper("ts_query_string_count");
            Module["_ts_query_capture_name_for_id"] = createExportWrapper("ts_query_capture_name_for_id");
            Module["_ts_query_string_value_for_id"] = createExportWrapper("ts_query_string_value_for_id");
            Module["_ts_query_predicates_for_pattern"] = createExportWrapper("ts_query_predicates_for_pattern");
            Module["_memmove"] = createExportWrapper("memmove");
            Module["_memcmp"] = createExportWrapper("memcmp");
            Module["_ts_tree_copy"] = createExportWrapper("ts_tree_copy");
            Module["_ts_tree_delete"] = createExportWrapper("ts_tree_delete");
            Module["_iswalnum"] = createExportWrapper("iswalnum");
            Module["_ts_init"] = createExportWrapper("ts_init");
            Module["_ts_parser_new_wasm"] = createExportWrapper("ts_parser_new_wasm");
            Module["_ts_parser_enable_logger_wasm"] = createExportWrapper("ts_parser_enable_logger_wasm");
            Module["_ts_parser_parse_wasm"] = createExportWrapper("ts_parser_parse_wasm");
            Module["_ts_language_type_is_named_wasm"] = createExportWrapper("ts_language_type_is_named_wasm");
            Module["_ts_language_type_is_visible_wasm"] = createExportWrapper("ts_language_type_is_visible_wasm");
            Module["_ts_tree_root_node_wasm"] = createExportWrapper("ts_tree_root_node_wasm");
            Module["_ts_tree_edit_wasm"] = createExportWrapper("ts_tree_edit_wasm");
            Module["_ts_tree_get_changed_ranges_wasm"] = createExportWrapper("ts_tree_get_changed_ranges_wasm");
            Module["_ts_tree_cursor_new_wasm"] = createExportWrapper("ts_tree_cursor_new_wasm");
            Module["_ts_tree_cursor_delete_wasm"] = createExportWrapper("ts_tree_cursor_delete_wasm");
            Module["_ts_tree_cursor_reset_wasm"] = createExportWrapper("ts_tree_cursor_reset_wasm");
            Module["_ts_tree_cursor_goto_first_child_wasm"] = createExportWrapper("ts_tree_cursor_goto_first_child_wasm");
            Module["_ts_tree_cursor_goto_next_sibling_wasm"] = createExportWrapper("ts_tree_cursor_goto_next_sibling_wasm");
            Module["_ts_tree_cursor_goto_parent_wasm"] = createExportWrapper("ts_tree_cursor_goto_parent_wasm");
            Module["_ts_tree_cursor_current_node_type_id_wasm"] = createExportWrapper("ts_tree_cursor_current_node_type_id_wasm");
            Module["_ts_tree_cursor_current_node_is_named_wasm"] = createExportWrapper("ts_tree_cursor_current_node_is_named_wasm");
            Module["_ts_tree_cursor_current_node_is_missing_wasm"] = createExportWrapper("ts_tree_cursor_current_node_is_missing_wasm");
            Module["_ts_tree_cursor_current_node_id_wasm"] = createExportWrapper("ts_tree_cursor_current_node_id_wasm");
            Module["_ts_tree_cursor_start_position_wasm"] = createExportWrapper("ts_tree_cursor_start_position_wasm");
            Module["_ts_tree_cursor_end_position_wasm"] = createExportWrapper("ts_tree_cursor_end_position_wasm");
            Module["_ts_tree_cursor_start_index_wasm"] = createExportWrapper("ts_tree_cursor_start_index_wasm");
            Module["_ts_tree_cursor_end_index_wasm"] = createExportWrapper("ts_tree_cursor_end_index_wasm");
            Module["_ts_tree_cursor_current_field_id_wasm"] = createExportWrapper("ts_tree_cursor_current_field_id_wasm");
            Module["_ts_tree_cursor_current_node_wasm"] = createExportWrapper("ts_tree_cursor_current_node_wasm");
            Module["_ts_node_symbol_wasm"] = createExportWrapper("ts_node_symbol_wasm");
            Module["_ts_node_child_count_wasm"] = createExportWrapper("ts_node_child_count_wasm");
            Module["_ts_node_named_child_count_wasm"] = createExportWrapper("ts_node_named_child_count_wasm");
            Module["_ts_node_child_wasm"] = createExportWrapper("ts_node_child_wasm");
            Module["_ts_node_named_child_wasm"] = createExportWrapper("ts_node_named_child_wasm");
            Module["_ts_node_child_by_field_id_wasm"] = createExportWrapper("ts_node_child_by_field_id_wasm");
            Module["_ts_node_next_sibling_wasm"] = createExportWrapper("ts_node_next_sibling_wasm");
            Module["_ts_node_prev_sibling_wasm"] = createExportWrapper("ts_node_prev_sibling_wasm");
            Module["_ts_node_next_named_sibling_wasm"] = createExportWrapper("ts_node_next_named_sibling_wasm");
            Module["_ts_node_prev_named_sibling_wasm"] = createExportWrapper("ts_node_prev_named_sibling_wasm");
            Module["_ts_node_parent_wasm"] = createExportWrapper("ts_node_parent_wasm");
            Module["_ts_node_descendant_for_index_wasm"] = createExportWrapper("ts_node_descendant_for_index_wasm");
            Module["_ts_node_named_descendant_for_index_wasm"] = createExportWrapper("ts_node_named_descendant_for_index_wasm");
            Module["_ts_node_descendant_for_position_wasm"] = createExportWrapper("ts_node_descendant_for_position_wasm");
            Module["_ts_node_named_descendant_for_position_wasm"] = createExportWrapper("ts_node_named_descendant_for_position_wasm");
            Module["_ts_node_start_point_wasm"] = createExportWrapper("ts_node_start_point_wasm");
            Module["_ts_node_end_point_wasm"] = createExportWrapper("ts_node_end_point_wasm");
            Module["_ts_node_start_index_wasm"] = createExportWrapper("ts_node_start_index_wasm");
            Module["_ts_node_end_index_wasm"] = createExportWrapper("ts_node_end_index_wasm");
            Module["_ts_node_to_string_wasm"] = createExportWrapper("ts_node_to_string_wasm");
            Module["_ts_node_children_wasm"] = createExportWrapper("ts_node_children_wasm");
            Module["_ts_node_named_children_wasm"] = createExportWrapper("ts_node_named_children_wasm");
            Module["_ts_node_descendants_of_type_wasm"] = createExportWrapper("ts_node_descendants_of_type_wasm");
            Module["_ts_node_is_named_wasm"] = createExportWrapper("ts_node_is_named_wasm");
            Module["_ts_node_has_changes_wasm"] = createExportWrapper("ts_node_has_changes_wasm");
            Module["_ts_node_has_error_wasm"] = createExportWrapper("ts_node_has_error_wasm");
            Module["_ts_node_is_missing_wasm"] = createExportWrapper("ts_node_is_missing_wasm");
            Module["_ts_query_matches_wasm"] = createExportWrapper("ts_query_matches_wasm");
            Module["_ts_query_captures_wasm"] = createExportWrapper("ts_query_captures_wasm");
            var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location");
            Module["_iswalpha"] = createExportWrapper("iswalpha");
            Module["_towupper"] = createExportWrapper("towupper");
            Module["_iswlower"] = createExportWrapper("iswlower");
            Module["_iswdigit"] = createExportWrapper("iswdigit");
            Module["_memchr"] = createExportWrapper("memchr");
            Module["_strlen"] = createExportWrapper("strlen");
            var stackSave = Module["stackSave"] = createExportWrapper("stackSave");
            var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore");
            var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc");
            var _emscripten_stack_set_limits = Module["_emscripten_stack_set_limits"] = function() {
                return (_emscripten_stack_set_limits = Module["_emscripten_stack_set_limits"] = Module["asm"]["emscripten_stack_set_limits"]).apply(null, arguments);
            };
            var _emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = function() {
                return (_emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = Module["asm"]["emscripten_stack_get_free"]).apply(null, arguments);
            };
            var _emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = function() {
                return (_emscripten_stack_get_end = Module["_emscripten_stack_get_end"] = Module["asm"]["emscripten_stack_get_end"]).apply(null, arguments);
            };
            var _setThrew = Module["_setThrew"] = createExportWrapper("setThrew");
            Module["__Znwm"] = createExportWrapper("_Znwm");
            Module["__ZdlPv"] = createExportWrapper("_ZdlPv");
            Module["__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv"] = createExportWrapper("_ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv");
            Module["__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev"] = createExportWrapper("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev");
            Module["__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm"] = createExportWrapper("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm");
            Module["__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm"] = createExportWrapper("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm");
            Module["__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm"] = createExportWrapper("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm");
            Module["__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm"] = createExportWrapper("_ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm");
            Module["__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc"] = createExportWrapper("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc");
            Module["__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev"] = createExportWrapper("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev");
            Module["__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw"] = createExportWrapper("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw");
            Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji");
            Module["_orig$ts_parser_timeout_micros"] = createExportWrapper("orig$ts_parser_timeout_micros");
            Module["_orig$ts_parser_set_timeout_micros"] = createExportWrapper("orig$ts_parser_set_timeout_micros");
            Module['_stderr'] = 7088;
            Module['_TRANSFER_BUFFER'] = 7472;
            Module['___THREW__'] = 8116;
            Module['___threwValue'] = 8120;
            Module['___cxa_new_handler'] = 8112;
            Module['___data_end'] = 8124;
            if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() {
                abort("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() {
                abort("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ccall")) Module["ccall"] = function() {
                abort("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "cwrap")) Module["cwrap"] = function() {
                abort("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() {
                abort("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() {
                abort("'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            Module["allocate"] = allocate;
            if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() {
                abort("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() {
                abort("'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() {
                abort("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() {
                abort("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() {
                abort("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() {
                abort("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() {
                abort("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() {
                abort("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() {
                abort("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() {
                abort("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() {
                abort("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() {
                abort("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() {
                abort("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() {
                abort("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addRunDependency")) Module["addRunDependency"] = function() {
                abort("'addRunDependency' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "removeRunDependency")) Module["removeRunDependency"] = function() {
                abort("'removeRunDependency' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createFolder")) Module["FS_createFolder"] = function() {
                abort("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createPath")) Module["FS_createPath"] = function() {
                abort("'FS_createPath' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createDataFile")) Module["FS_createDataFile"] = function() {
                abort("'FS_createDataFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createPreloadedFile")) Module["FS_createPreloadedFile"] = function() {
                abort("'FS_createPreloadedFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createLazyFile")) Module["FS_createLazyFile"] = function() {
                abort("'FS_createLazyFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createLink")) Module["FS_createLink"] = function() {
                abort("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_createDevice")) Module["FS_createDevice"] = function() {
                abort("'FS_createDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "FS_unlink")) Module["FS_unlink"] = function() {
                abort("'FS_unlink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() {
                abort("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() {
                abort("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() {
                abort("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() {
                abort("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "addFunction")) Module["addFunction"] = function() {
                abort("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "removeFunction")) Module["removeFunction"] = function() {
                abort("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() {
                abort("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() {
                abort("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() {
                abort("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() {
                abort("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() {
                abort("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() {
                abort("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() {
                abort("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() {
                abort("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() {
                abort("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "abort")) Module["abort"] = function() {
                abort("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stringToNewUTF8")) Module["stringToNewUTF8"] = function() {
                abort("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setFileTime")) Module["setFileTime"] = function() {
                abort("'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "emscripten_realloc_buffer")) Module["emscripten_realloc_buffer"] = function() {
                abort("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() {
                abort("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ERRNO_CODES")) Module["ERRNO_CODES"] = function() {
                abort("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ERRNO_MESSAGES")) Module["ERRNO_MESSAGES"] = function() {
                abort("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setErrNo")) Module["setErrNo"] = function() {
                abort("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "inetPton4")) Module["inetPton4"] = function() {
                abort("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "inetNtop4")) Module["inetNtop4"] = function() {
                abort("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "inetPton6")) Module["inetPton6"] = function() {
                abort("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "inetNtop6")) Module["inetNtop6"] = function() {
                abort("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "readSockaddr")) Module["readSockaddr"] = function() {
                abort("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeSockaddr")) Module["writeSockaddr"] = function() {
                abort("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "DNS")) Module["DNS"] = function() {
                abort("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getHostByName")) Module["getHostByName"] = function() {
                abort("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GAI_ERRNO_MESSAGES")) Module["GAI_ERRNO_MESSAGES"] = function() {
                abort("'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "Protocols")) Module["Protocols"] = function() {
                abort("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "Sockets")) Module["Sockets"] = function() {
                abort("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getRandomDevice")) Module["getRandomDevice"] = function() {
                abort("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "traverseStack")) Module["traverseStack"] = function() {
                abort("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "UNWIND_CACHE")) Module["UNWIND_CACHE"] = function() {
                abort("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "withBuiltinMalloc")) Module["withBuiltinMalloc"] = function() {
                abort("'withBuiltinMalloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "readAsmConstArgsArray")) Module["readAsmConstArgsArray"] = function() {
                abort("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "readAsmConstArgs")) Module["readAsmConstArgs"] = function() {
                abort("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "mainThreadEM_ASM")) Module["mainThreadEM_ASM"] = function() {
                abort("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "jstoi_q")) Module["jstoi_q"] = function() {
                abort("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "jstoi_s")) Module["jstoi_s"] = function() {
                abort("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getExecutableName")) Module["getExecutableName"] = function() {
                abort("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "listenOnce")) Module["listenOnce"] = function() {
                abort("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "autoResumeAudioContext")) Module["autoResumeAudioContext"] = function() {
                abort("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "dynCallLegacy")) Module["dynCallLegacy"] = function() {
                abort("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getDynCaller")) Module["getDynCaller"] = function() {
                abort("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() {
                abort("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "callRuntimeCallbacks")) Module["callRuntimeCallbacks"] = function() {
                abort("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "runtimeKeepaliveCounter")) Module["runtimeKeepaliveCounter"] = function() {
                abort("'runtimeKeepaliveCounter' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "keepRuntimeAlive")) Module["keepRuntimeAlive"] = function() {
                abort("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "runtimeKeepalivePush")) Module["runtimeKeepalivePush"] = function() {
                abort("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "runtimeKeepalivePop")) Module["runtimeKeepalivePop"] = function() {
                abort("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "callUserCallback")) Module["callUserCallback"] = function() {
                abort("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "maybeExit")) Module["maybeExit"] = function() {
                abort("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "asmjsMangle")) Module["asmjsMangle"] = function() {
                abort("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "reallyNegative")) Module["reallyNegative"] = function() {
                abort("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "unSign")) Module["unSign"] = function() {
                abort("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "reSign")) Module["reSign"] = function() {
                abort("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "formatString")) Module["formatString"] = function() {
                abort("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "PATH")) Module["PATH"] = function() {
                abort("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "PATH_FS")) Module["PATH_FS"] = function() {
                abort("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "SYSCALLS")) Module["SYSCALLS"] = function() {
                abort("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "syscallMmap2")) Module["syscallMmap2"] = function() {
                abort("'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "syscallMunmap")) Module["syscallMunmap"] = function() {
                abort("'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getSocketFromFD")) Module["getSocketFromFD"] = function() {
                abort("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getSocketAddress")) Module["getSocketAddress"] = function() {
                abort("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "JSEvents")) Module["JSEvents"] = function() {
                abort("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerKeyEventCallback")) Module["registerKeyEventCallback"] = function() {
                abort("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "specialHTMLTargets")) Module["specialHTMLTargets"] = function() {
                abort("'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "maybeCStringToJsString")) Module["maybeCStringToJsString"] = function() {
                abort("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "findEventTarget")) Module["findEventTarget"] = function() {
                abort("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "findCanvasEventTarget")) Module["findCanvasEventTarget"] = function() {
                abort("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getBoundingClientRect")) Module["getBoundingClientRect"] = function() {
                abort("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillMouseEventData")) Module["fillMouseEventData"] = function() {
                abort("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerMouseEventCallback")) Module["registerMouseEventCallback"] = function() {
                abort("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerWheelEventCallback")) Module["registerWheelEventCallback"] = function() {
                abort("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerUiEventCallback")) Module["registerUiEventCallback"] = function() {
                abort("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerFocusEventCallback")) Module["registerFocusEventCallback"] = function() {
                abort("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillDeviceOrientationEventData")) Module["fillDeviceOrientationEventData"] = function() {
                abort("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerDeviceOrientationEventCallback")) Module["registerDeviceOrientationEventCallback"] = function() {
                abort("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillDeviceMotionEventData")) Module["fillDeviceMotionEventData"] = function() {
                abort("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerDeviceMotionEventCallback")) Module["registerDeviceMotionEventCallback"] = function() {
                abort("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "screenOrientation")) Module["screenOrientation"] = function() {
                abort("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillOrientationChangeEventData")) Module["fillOrientationChangeEventData"] = function() {
                abort("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerOrientationChangeEventCallback")) Module["registerOrientationChangeEventCallback"] = function() {
                abort("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillFullscreenChangeEventData")) Module["fillFullscreenChangeEventData"] = function() {
                abort("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerFullscreenChangeEventCallback")) Module["registerFullscreenChangeEventCallback"] = function() {
                abort("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerRestoreOldStyle")) Module["registerRestoreOldStyle"] = function() {
                abort("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "hideEverythingExceptGivenElement")) Module["hideEverythingExceptGivenElement"] = function() {
                abort("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "restoreHiddenElements")) Module["restoreHiddenElements"] = function() {
                abort("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setLetterbox")) Module["setLetterbox"] = function() {
                abort("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "currentFullscreenStrategy")) Module["currentFullscreenStrategy"] = function() {
                abort("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "restoreOldWindowedStyle")) Module["restoreOldWindowedStyle"] = function() {
                abort("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "softFullscreenResizeWebGLRenderTarget")) Module["softFullscreenResizeWebGLRenderTarget"] = function() {
                abort("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "doRequestFullscreen")) Module["doRequestFullscreen"] = function() {
                abort("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillPointerlockChangeEventData")) Module["fillPointerlockChangeEventData"] = function() {
                abort("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerPointerlockChangeEventCallback")) Module["registerPointerlockChangeEventCallback"] = function() {
                abort("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerPointerlockErrorEventCallback")) Module["registerPointerlockErrorEventCallback"] = function() {
                abort("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "requestPointerLock")) Module["requestPointerLock"] = function() {
                abort("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillVisibilityChangeEventData")) Module["fillVisibilityChangeEventData"] = function() {
                abort("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerVisibilityChangeEventCallback")) Module["registerVisibilityChangeEventCallback"] = function() {
                abort("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerTouchEventCallback")) Module["registerTouchEventCallback"] = function() {
                abort("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillGamepadEventData")) Module["fillGamepadEventData"] = function() {
                abort("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerGamepadEventCallback")) Module["registerGamepadEventCallback"] = function() {
                abort("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerBeforeUnloadEventCallback")) Module["registerBeforeUnloadEventCallback"] = function() {
                abort("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fillBatteryEventData")) Module["fillBatteryEventData"] = function() {
                abort("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "battery")) Module["battery"] = function() {
                abort("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "registerBatteryEventCallback")) Module["registerBatteryEventCallback"] = function() {
                abort("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setCanvasElementSize")) Module["setCanvasElementSize"] = function() {
                abort("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getCanvasElementSize")) Module["getCanvasElementSize"] = function() {
                abort("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "polyfillSetImmediate")) Module["polyfillSetImmediate"] = function() {
                abort("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "demangle")) Module["demangle"] = function() {
                abort("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "demangleAll")) Module["demangleAll"] = function() {
                abort("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "jsStackTrace")) Module["jsStackTrace"] = function() {
                abort("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() {
                abort("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getEnvStrings")) Module["getEnvStrings"] = function() {
                abort("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "checkWasiClock")) Module["checkWasiClock"] = function() {
                abort("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64")) Module["writeI53ToI64"] = function() {
                abort("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64Clamped")) Module["writeI53ToI64Clamped"] = function() {
                abort("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64Signaling")) Module["writeI53ToI64Signaling"] = function() {
                abort("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToU64Clamped")) Module["writeI53ToU64Clamped"] = function() {
                abort("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToU64Signaling")) Module["writeI53ToU64Signaling"] = function() {
                abort("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "readI53FromI64")) Module["readI53FromI64"] = function() {
                abort("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "readI53FromU64")) Module["readI53FromU64"] = function() {
                abort("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "convertI32PairToI53")) Module["convertI32PairToI53"] = function() {
                abort("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "convertU32PairToI53")) Module["convertU32PairToI53"] = function() {
                abort("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "resolveGlobalSymbol")) Module["resolveGlobalSymbol"] = function() {
                abort("'resolveGlobalSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GOT")) Module["GOT"] = function() {
                abort("'GOT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GOTHandler")) Module["GOTHandler"] = function() {
                abort("'GOTHandler' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "isInternalSym")) Module["isInternalSym"] = function() {
                abort("'isInternalSym' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "updateGOT")) Module["updateGOT"] = function() {
                abort("'updateGOT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "relocateExports")) Module["relocateExports"] = function() {
                abort("'relocateExports' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "reportUndefinedSymbols")) Module["reportUndefinedSymbols"] = function() {
                abort("'reportUndefinedSymbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "DLFCN")) Module["DLFCN"] = function() {
                abort("'DLFCN' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "LDSO")) Module["LDSO"] = function() {
                abort("'LDSO' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "createInvokeFunction")) Module["createInvokeFunction"] = function() {
                abort("'createInvokeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getMemory")) Module["getMemory"] = function() {
                abort("'getMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "fetchBinary")) Module["fetchBinary"] = function() {
                abort("'fetchBinary' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getDylinkMetadata")) Module["getDylinkMetadata"] = function() {
                abort("'getDylinkMetadata' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "mergeLibSymbols")) Module["mergeLibSymbols"] = function() {
                abort("'mergeLibSymbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function() {
                abort("'loadWebAssemblyModule' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function() {
                abort("'loadDynamicLibrary' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "preloadDylibs")) Module["preloadDylibs"] = function() {
                abort("'preloadDylibs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "uncaughtExceptionCount")) Module["uncaughtExceptionCount"] = function() {
                abort("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "exceptionLast")) Module["exceptionLast"] = function() {
                abort("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "exceptionCaught")) Module["exceptionCaught"] = function() {
                abort("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ExceptionInfoAttrs")) Module["ExceptionInfoAttrs"] = function() {
                abort("'ExceptionInfoAttrs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ExceptionInfo")) Module["ExceptionInfo"] = function() {
                abort("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "CatchInfo")) Module["CatchInfo"] = function() {
                abort("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "exception_addRef")) Module["exception_addRef"] = function() {
                abort("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "exception_decRef")) Module["exception_decRef"] = function() {
                abort("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "Browser")) Module["Browser"] = function() {
                abort("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "funcWrappers")) Module["funcWrappers"] = function() {
                abort("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() {
                abort("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "setMainLoop")) Module["setMainLoop"] = function() {
                abort("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "tempFixedLengthArray")) Module["tempFixedLengthArray"] = function() {
                abort("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "miniTempWebGLFloatBuffers")) Module["miniTempWebGLFloatBuffers"] = function() {
                abort("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "heapObjectForWebGLType")) Module["heapObjectForWebGLType"] = function() {
                abort("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "heapAccessShiftForWebGLHeap")) Module["heapAccessShiftForWebGLHeap"] = function() {
                abort("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() {
                abort("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGet")) Module["emscriptenWebGLGet"] = function() {
                abort("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "computeUnpackAlignedImageSize")) Module["computeUnpackAlignedImageSize"] = function() {
                abort("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetTexPixelData")) Module["emscriptenWebGLGetTexPixelData"] = function() {
                abort("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetUniform")) Module["emscriptenWebGLGetUniform"] = function() {
                abort("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "webglGetUniformLocation")) Module["webglGetUniformLocation"] = function() {
                abort("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "webglPrepareUniformLocationsBeforeFirstUse")) Module["webglPrepareUniformLocationsBeforeFirstUse"] = function() {
                abort("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "webglGetLeftBracePos")) Module["webglGetLeftBracePos"] = function() {
                abort("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetVertexAttrib")) Module["emscriptenWebGLGetVertexAttrib"] = function() {
                abort("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "writeGLArray")) Module["writeGLArray"] = function() {
                abort("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "AL")) Module["AL"] = function() {
                abort("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "SDL_unicode")) Module["SDL_unicode"] = function() {
                abort("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "SDL_ttfContext")) Module["SDL_ttfContext"] = function() {
                abort("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "SDL_audio")) Module["SDL_audio"] = function() {
                abort("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "SDL")) Module["SDL"] = function() {
                abort("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "SDL_gfx")) Module["SDL_gfx"] = function() {
                abort("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GLUT")) Module["GLUT"] = function() {
                abort("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "EGL")) Module["EGL"] = function() {
                abort("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GLFW_Window")) Module["GLFW_Window"] = function() {
                abort("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GLFW")) Module["GLFW"] = function() {
                abort("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "GLEW")) Module["GLEW"] = function() {
                abort("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "IDBStore")) Module["IDBStore"] = function() {
                abort("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "runAndAbortIfError")) Module["runAndAbortIfError"] = function() {
                abort("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() {
                abort("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() {
                abort("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() {
                abort("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() {
                abort("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() {
                abort("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() {
                abort("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() {
                abort("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() {
                abort("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() {
                abort("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() {
                abort("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() {
                abort("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() {
                abort("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() {
                abort("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8OnStack")) Module["allocateUTF8OnStack"] = function() {
                abort("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            Module["writeStackCookie"] = writeStackCookie;
            Module["checkStackCookie"] = checkStackCookie;
            if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromBase64")) Module["intArrayFromBase64"] = function() {
                abort("'intArrayFromBase64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "tryParseAsDataURI")) Module["tryParseAsDataURI"] = function() {
                abort("'tryParseAsDataURI' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
            };
            if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", {
                configurable: true,
                get: function() {
                    abort("'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
                }
            });
            if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", {
                configurable: true,
                get: function() {
                    abort("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)");
                }
            });
            var calledRun;
            function ExitStatus(status) {
                this.name = "ExitStatus";
                this.message = "Program terminated with exit(" + status + ")";
                this.status = status;
            }
            dependenciesFulfilled = function runCaller() {
                if (!calledRun) run();
                if (!calledRun) dependenciesFulfilled = runCaller;
            };
            function callMain(args) {
                assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');
                assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called');
                var entryFunction = Module['_main'];
                if (!entryFunction) return;
                args = args || [];
                var argc = args.length + 1;
                var argv = stackAlloc((argc + 1) * 4);
                HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram);
                for(var i1 = 1; i1 < argc; i1++){
                    HEAP32[(argv >> 2) + i1] = allocateUTF8OnStack(args[i1 - 1]);
                }
                HEAP32[(argv >> 2) + argc] = 0;
                try {
                    var ret = entryFunction(argc, argv);
                    exit(ret, true);
                } catch (e) {
                    if (e instanceof ExitStatus) {
                        return;
                    } else if (e == 'unwind') {
                        return;
                    } else {
                        var toLog = e;
                        if (e && typeof e === 'object' && e.stack) {
                            toLog = [
                                e,
                                e.stack
                            ];
                        }
                        err('exception thrown: ' + toLog);
                        quit_(1, e);
                    }
                } finally{
                    true;
                }
            }
            function stackCheckInit() {
                _emscripten_stack_set_limits(5251008, 8128);
                writeStackCookie();
            }
            var dylibsLoaded = false;
            async function run(args) {
                args = args || arguments_;
                await wasmInstantiatePromise;
                if (runDependencies > 0) {
                    return;
                }
                stackCheckInit();
                if (!dylibsLoaded) {
                    preloadDylibs();
                    dylibsLoaded = true;
                    if (runDependencies > 0) {
                        return;
                    }
                }
                preRun();
                if (runDependencies > 0) {
                    return;
                }
                function doRun() {
                    if (calledRun) return;
                    calledRun = true;
                    Module['calledRun'] = true;
                    if (ABORT) return;
                    initRuntime();
                    preMain();
                    if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();
                    if (shouldRunNow) callMain(args);
                    postRun();
                }
                doRun();
                checkStackCookie();
            }
            Module['run'] = run;
            function checkUnflushedContent() {
                var oldOut = out;
                var oldErr = err;
                var has = false;
                out = err = function(x) {
                    has = true;
                };
                try {
                    var flush = Module['_fflush'];
                    if (flush) flush(0);
                } catch (e) {}
                out = oldOut;
                err = oldErr;
                if (has) {
                    warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.');
                    warnOnce('(this may also be due to not including full filesystem support - try building with -s FORCE_FILESYSTEM=1)');
                }
            }
            function exit(status, implicit) {
                status;
                checkUnflushedContent();
                if (implicit && keepRuntimeAlive() && status === 0) {
                    return;
                }
                if (keepRuntimeAlive()) {
                    if (!implicit) {
                        var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
                        err(msg);
                    }
                } else {
                    exitRuntime();
                    if (Module['onExit']) Module['onExit'](status);
                    ABORT = true;
                }
                quit_(status, new ExitStatus(status));
            }
            if (Module['preInit']) {
                if (typeof Module['preInit'] == 'function') Module['preInit'] = [
                    Module['preInit']
                ];
                while(Module['preInit'].length > 0){
                    Module['preInit'].pop()();
                }
            }
            var shouldRunNow = true;
            if (Module['noInitialRun']) shouldRunNow = false;
            const C = Module;
            const INTERNAL = {};
            const SIZE_OF_INT = 4;
            const SIZE_OF_NODE = 5 * 4;
            const SIZE_OF_POINT = 2 * 4;
            const SIZE_OF_RANGE = 2 * 4 + 2 * SIZE_OF_POINT;
            const ZERO_POINT = {
                row: 0,
                column: 0
            };
            const QUERY_WORD_REGEX = /[\w-.]*/g;
            const LANGUAGE_FUNCTION_REGEX = /^_?tree_sitter_\w+/;
            var VERSION;
            var MIN_COMPATIBLE_VERSION;
            var TRANSFER_BUFFER;
            var currentParseCallback;
            var currentLogCallback;
            class ParserImpl {
                static init() {
                    TRANSFER_BUFFER = C._ts_init();
                    VERSION = getValue(TRANSFER_BUFFER, 'i32');
                    MIN_COMPATIBLE_VERSION = getValue(TRANSFER_BUFFER + SIZE_OF_INT, 'i32');
                }
                initialize() {
                    C._ts_parser_new_wasm();
                    this[0] = getValue(TRANSFER_BUFFER, 'i32');
                    this[1] = getValue(TRANSFER_BUFFER + SIZE_OF_INT, 'i32');
                }
                delete() {
                    C._ts_parser_delete(this[0]);
                    C._free(this[1]);
                    this[0] = 0;
                    this[1] = 0;
                }
                setLanguage(language) {
                    let address;
                    if (!language) {
                        address = 0;
                        language = null;
                    } else if (language.constructor === Language) {
                        address = language[0];
                        const version = C._ts_language_version(address);
                        if (version < MIN_COMPATIBLE_VERSION || VERSION < version) {
                            throw new Error(`Incompatible language version ${version}. ` + `Compatibility range ${MIN_COMPATIBLE_VERSION} through ${VERSION}.`);
                        }
                    } else {
                        throw new Error('Argument must be a Language');
                    }
                    this.language = language;
                    C._ts_parser_set_language(this[0], address);
                    return this;
                }
                getLanguage() {
                    return this.language;
                }
                parse(callback, oldTree, options) {
                    if (typeof callback === 'string') {
                        currentParseCallback = (index, _, endIndex)=>callback.slice(index, endIndex);
                    } else if (typeof callback === 'function') {
                        currentParseCallback = callback;
                    } else {
                        throw new Error("Argument must be a string or a function");
                    }
                    if (this.logCallback) {
                        currentLogCallback = this.logCallback;
                        C._ts_parser_enable_logger_wasm(this[0], 1);
                    } else {
                        currentLogCallback = null;
                        C._ts_parser_enable_logger_wasm(this[0], 0);
                    }
                    let rangeCount = 0;
                    let rangeAddress = 0;
                    if (options && options.includedRanges) {
                        rangeCount = options.includedRanges.length;
                        rangeAddress = C._calloc(rangeCount, SIZE_OF_RANGE);
                        let address = rangeAddress;
                        for(let i1 = 0; i1 < rangeCount; i1++){
                            marshalRange(address, options.includedRanges[i1]);
                            address += SIZE_OF_RANGE;
                        }
                    }
                    const treeAddress = C._ts_parser_parse_wasm(this[0], this[1], oldTree ? oldTree[0] : 0, rangeAddress, rangeCount);
                    if (!treeAddress) {
                        currentParseCallback = null;
                        currentLogCallback = null;
                        throw new Error('Parsing failed');
                    }
                    const result1 = new Tree(INTERNAL, treeAddress, this.language, currentParseCallback);
                    currentParseCallback = null;
                    currentLogCallback = null;
                    return result1;
                }
                reset() {
                    C._ts_parser_reset(this[0]);
                }
                setTimeoutMicros(timeout) {
                    C._ts_parser_set_timeout_micros(this[0], timeout);
                }
                getTimeoutMicros() {
                    return C._ts_parser_timeout_micros(this[0]);
                }
                setLogger(callback) {
                    if (!callback) {
                        callback = null;
                    } else if (typeof callback !== "function") {
                        throw new Error("Logger callback must be a function");
                    }
                    this.logCallback = callback;
                    return this;
                }
                getLogger() {
                    return this.logCallback;
                }
            }
            class Tree {
                constructor(internal, address, language, textCallback){
                    assertInternal(internal);
                    this[0] = address;
                    this.language = language;
                    this.textCallback = textCallback;
                }
                copy() {
                    const address = C._ts_tree_copy(this[0]);
                    return new Tree(INTERNAL, address, this.language, this.textCallback);
                }
                delete() {
                    C._ts_tree_delete(this[0]);
                    this[0] = 0;
                }
                edit(edit) {
                    marshalEdit(edit);
                    C._ts_tree_edit_wasm(this[0]);
                }
                get rootNode() {
                    C._ts_tree_root_node_wasm(this[0]);
                    return unmarshalNode(this);
                }
                getLanguage() {
                    return this.language;
                }
                walk() {
                    return this.rootNode.walk();
                }
                getChangedRanges(other) {
                    if (other.constructor !== Tree) {
                        throw new TypeError('Argument must be a Tree');
                    }
                    C._ts_tree_get_changed_ranges_wasm(this[0], other[0]);
                    const count = getValue(TRANSFER_BUFFER, 'i32');
                    const buffer = getValue(TRANSFER_BUFFER + 4, 'i32');
                    const result1 = new Array(count);
                    if (count > 0) {
                        let address = buffer;
                        for(let i1 = 0; i1 < count; i1++){
                            result1[i1] = unmarshalRange(address);
                            address += SIZE_OF_RANGE;
                        }
                        C._free(buffer);
                    }
                    return result1;
                }
            }
            class Node {
                constructor(internal, tree){
                    assertInternal(internal);
                    this.tree = tree;
                }
                get typeId() {
                    marshalNode(this);
                    return C._ts_node_symbol_wasm(this.tree[0]);
                }
                get type() {
                    return this.tree.language.types[this.typeId] || 'ERROR';
                }
                get endPosition() {
                    marshalNode(this);
                    C._ts_node_end_point_wasm(this.tree[0]);
                    return unmarshalPoint(TRANSFER_BUFFER);
                }
                get endIndex() {
                    marshalNode(this);
                    return C._ts_node_end_index_wasm(this.tree[0]);
                }
                get text() {
                    return getText(this.tree, this.startIndex, this.endIndex);
                }
                isNamed() {
                    marshalNode(this);
                    return C._ts_node_is_named_wasm(this.tree[0]) === 1;
                }
                hasError() {
                    marshalNode(this);
                    return C._ts_node_has_error_wasm(this.tree[0]) === 1;
                }
                hasChanges() {
                    marshalNode(this);
                    return C._ts_node_has_changes_wasm(this.tree[0]) === 1;
                }
                isMissing() {
                    marshalNode(this);
                    return C._ts_node_is_missing_wasm(this.tree[0]) === 1;
                }
                equals(other) {
                    return this.id === other.id;
                }
                child(index) {
                    marshalNode(this);
                    C._ts_node_child_wasm(this.tree[0], index);
                    return unmarshalNode(this.tree);
                }
                namedChild(index) {
                    marshalNode(this);
                    C._ts_node_named_child_wasm(this.tree[0], index);
                    return unmarshalNode(this.tree);
                }
                childForFieldId(fieldId) {
                    marshalNode(this);
                    C._ts_node_child_by_field_id_wasm(this.tree[0], fieldId);
                    return unmarshalNode(this.tree);
                }
                childForFieldName(fieldName) {
                    const fieldId = this.tree.language.fields.indexOf(fieldName);
                    if (fieldId !== -1) return this.childForFieldId(fieldId);
                    return undefined;
                }
                get childCount() {
                    marshalNode(this);
                    return C._ts_node_child_count_wasm(this.tree[0]);
                }
                get namedChildCount() {
                    marshalNode(this);
                    return C._ts_node_named_child_count_wasm(this.tree[0]);
                }
                get firstChild() {
                    return this.child(0);
                }
                get firstNamedChild() {
                    return this.namedChild(0);
                }
                get lastChild() {
                    return this.child(this.childCount - 1);
                }
                get lastNamedChild() {
                    return this.namedChild(this.namedChildCount - 1);
                }
                get children() {
                    if (!this._children) {
                        marshalNode(this);
                        C._ts_node_children_wasm(this.tree[0]);
                        const count = getValue(TRANSFER_BUFFER, 'i32');
                        const buffer = getValue(TRANSFER_BUFFER + 4, 'i32');
                        this._children = new Array(count);
                        if (count > 0) {
                            let address = buffer;
                            for(let i1 = 0; i1 < count; i1++){
                                this._children[i1] = unmarshalNode(this.tree, address);
                                address += SIZE_OF_NODE;
                            }
                            C._free(buffer);
                        }
                    }
                    return this._children;
                }
                get namedChildren() {
                    if (!this._namedChildren) {
                        marshalNode(this);
                        C._ts_node_named_children_wasm(this.tree[0]);
                        const count = getValue(TRANSFER_BUFFER, 'i32');
                        const buffer = getValue(TRANSFER_BUFFER + 4, 'i32');
                        this._namedChildren = new Array(count);
                        if (count > 0) {
                            let address = buffer;
                            for(let i1 = 0; i1 < count; i1++){
                                this._namedChildren[i1] = unmarshalNode(this.tree, address);
                                address += SIZE_OF_NODE;
                            }
                            C._free(buffer);
                        }
                    }
                    return this._namedChildren;
                }
                descendantsOfType(types, startPosition, endPosition) {
                    if (!Array.isArray(types)) types = [
                        types
                    ];
                    if (!startPosition) startPosition = ZERO_POINT;
                    if (!endPosition) endPosition = ZERO_POINT;
                    const symbols = [];
                    const typesBySymbol = this.tree.language.types;
                    for(let i1 = 0, n = typesBySymbol.length; i1 < n; i1++){
                        if (types.includes(typesBySymbol[i1])) {
                            symbols.push(i1);
                        }
                    }
                    const symbolsAddress = C._malloc(4 * symbols.length);
                    for(let i11 = 0, n1 = symbols.length; i11 < n1; i11++){
                        setValue(symbolsAddress + i11 * 4, symbols[i11], 'i32');
                    }
                    marshalNode(this);
                    C._ts_node_descendants_of_type_wasm(this.tree[0], symbolsAddress, symbols.length, startPosition.row, startPosition.column, endPosition.row, endPosition.column);
                    const descendantCount = getValue(TRANSFER_BUFFER, 'i32');
                    const descendantAddress = getValue(TRANSFER_BUFFER + 4, 'i32');
                    const result1 = new Array(descendantCount);
                    if (descendantCount > 0) {
                        let address = descendantAddress;
                        for(let i2 = 0; i2 < descendantCount; i2++){
                            result1[i2] = unmarshalNode(this.tree, address);
                            address += SIZE_OF_NODE;
                        }
                    }
                    C._free(descendantAddress);
                    C._free(symbolsAddress);
                    return result1;
                }
                get nextSibling() {
                    marshalNode(this);
                    C._ts_node_next_sibling_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                get previousSibling() {
                    marshalNode(this);
                    C._ts_node_prev_sibling_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                get nextNamedSibling() {
                    marshalNode(this);
                    C._ts_node_next_named_sibling_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                get previousNamedSibling() {
                    marshalNode(this);
                    C._ts_node_prev_named_sibling_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                get parent() {
                    marshalNode(this);
                    C._ts_node_parent_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                descendantForIndex(start, end = start) {
                    if (typeof start !== 'number' || typeof end !== 'number') {
                        throw new Error('Arguments must be numbers');
                    }
                    marshalNode(this);
                    let address = TRANSFER_BUFFER + SIZE_OF_NODE;
                    setValue(address, start, 'i32');
                    setValue(address + 4, end, 'i32');
                    C._ts_node_descendant_for_index_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                namedDescendantForIndex(start, end = start) {
                    if (typeof start !== 'number' || typeof end !== 'number') {
                        throw new Error('Arguments must be numbers');
                    }
                    marshalNode(this);
                    let address = TRANSFER_BUFFER + SIZE_OF_NODE;
                    setValue(address, start, 'i32');
                    setValue(address + 4, end, 'i32');
                    C._ts_node_named_descendant_for_index_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                descendantForPosition(start, end = start) {
                    if (!isPoint(start) || !isPoint(end)) {
                        throw new Error('Arguments must be {row, column} objects');
                    }
                    marshalNode(this);
                    let address = TRANSFER_BUFFER + SIZE_OF_NODE;
                    marshalPoint(address, start);
                    marshalPoint(address + SIZE_OF_POINT, end);
                    C._ts_node_descendant_for_position_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                namedDescendantForPosition(start, end = start) {
                    if (!isPoint(start) || !isPoint(end)) {
                        throw new Error('Arguments must be {row, column} objects');
                    }
                    marshalNode(this);
                    let address = TRANSFER_BUFFER + SIZE_OF_NODE;
                    marshalPoint(address, start);
                    marshalPoint(address + SIZE_OF_POINT, end);
                    C._ts_node_named_descendant_for_position_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                walk() {
                    marshalNode(this);
                    C._ts_tree_cursor_new_wasm(this.tree[0]);
                    return new TreeCursor(INTERNAL, this.tree);
                }
                toString() {
                    marshalNode(this);
                    const address = C._ts_node_to_string_wasm(this.tree[0]);
                    const result1 = AsciiToString(address);
                    C._free(address);
                    return result1;
                }
            }
            class TreeCursor {
                constructor(internal, tree){
                    assertInternal(internal);
                    this.tree = tree;
                    unmarshalTreeCursor(this);
                }
                delete() {
                    marshalTreeCursor(this);
                    C._ts_tree_cursor_delete_wasm(this.tree[0]);
                    this[0] = this[1] = this[2] = 0;
                }
                reset(node) {
                    marshalNode(node);
                    marshalTreeCursor(this, TRANSFER_BUFFER + SIZE_OF_NODE);
                    C._ts_tree_cursor_reset_wasm(this.tree[0]);
                    unmarshalTreeCursor(this);
                }
                get nodeType() {
                    return this.tree.language.types[this.nodeTypeId] || 'ERROR';
                }
                get nodeTypeId() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0]);
                }
                get nodeId() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_current_node_id_wasm(this.tree[0]);
                }
                get nodeIsNamed() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0]) === 1;
                }
                get nodeIsMissing() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0]) === 1;
                }
                get nodeText() {
                    marshalTreeCursor(this);
                    const startIndex = C._ts_tree_cursor_start_index_wasm(this.tree[0]);
                    const endIndex = C._ts_tree_cursor_end_index_wasm(this.tree[0]);
                    return getText(this.tree, startIndex, endIndex);
                }
                get startPosition() {
                    marshalTreeCursor(this);
                    C._ts_tree_cursor_start_position_wasm(this.tree[0]);
                    return unmarshalPoint(TRANSFER_BUFFER);
                }
                get endPosition() {
                    marshalTreeCursor(this);
                    C._ts_tree_cursor_end_position_wasm(this.tree[0]);
                    return unmarshalPoint(TRANSFER_BUFFER);
                }
                get startIndex() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_start_index_wasm(this.tree[0]);
                }
                get endIndex() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_end_index_wasm(this.tree[0]);
                }
                currentNode() {
                    marshalTreeCursor(this);
                    C._ts_tree_cursor_current_node_wasm(this.tree[0]);
                    return unmarshalNode(this.tree);
                }
                currentFieldId() {
                    marshalTreeCursor(this);
                    return C._ts_tree_cursor_current_field_id_wasm(this.tree[0]);
                }
                currentFieldName() {
                    return this.tree.language.fields[this.currentFieldId()];
                }
                gotoFirstChild() {
                    marshalTreeCursor(this);
                    const result1 = C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);
                    unmarshalTreeCursor(this);
                    return result1 === 1;
                }
                gotoNextSibling() {
                    marshalTreeCursor(this);
                    const result1 = C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);
                    unmarshalTreeCursor(this);
                    return result1 === 1;
                }
                gotoParent() {
                    marshalTreeCursor(this);
                    const result1 = C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);
                    unmarshalTreeCursor(this);
                    return result1 === 1;
                }
            }
            class Language {
                constructor(internal, address){
                    assertInternal(internal);
                    this[0] = address;
                    this.types = new Array(C._ts_language_symbol_count(this[0]));
                    for(let i1 = 0, n = this.types.length; i1 < n; i1++){
                        if (C._ts_language_symbol_type(this[0], i1) < 2) {
                            this.types[i1] = UTF8ToString(C._ts_language_symbol_name(this[0], i1));
                        }
                    }
                    this.fields = new Array(C._ts_language_field_count(this[0]) + 1);
                    for(let i11 = 0, n1 = this.fields.length; i11 < n1; i11++){
                        const fieldName = C._ts_language_field_name_for_id(this[0], i11);
                        if (fieldName !== 0) {
                            this.fields[i11] = UTF8ToString(fieldName);
                        } else {
                            this.fields[i11] = null;
                        }
                    }
                }
                get version() {
                    return C._ts_language_version(this[0]);
                }
                get fieldCount() {
                    return this.fields.length - 1;
                }
                fieldIdForName(fieldName) {
                    const result1 = this.fields.indexOf(fieldName);
                    if (result1 !== -1) {
                        return result1;
                    } else {
                        return null;
                    }
                }
                fieldNameForId(fieldId) {
                    return this.fields[fieldId] || null;
                }
                idForNodeType(type, named) {
                    const typeLength = lengthBytesUTF8(type);
                    const typeAddress = C._malloc(typeLength + 1);
                    stringToUTF8(type, typeAddress, typeLength + 1);
                    const result1 = C._ts_language_symbol_for_name(this[0], typeAddress, typeLength, named);
                    C._free(typeAddress);
                    return result1 || null;
                }
                get nodeTypeCount() {
                    return C._ts_language_symbol_count(this[0]);
                }
                nodeTypeForId(typeId) {
                    const name = C._ts_language_symbol_name(this[0], typeId);
                    return name ? UTF8ToString(name) : null;
                }
                nodeTypeIsNamed(typeId) {
                    return C._ts_language_type_is_named_wasm(this[0], typeId) ? true : false;
                }
                nodeTypeIsVisible(typeId) {
                    return C._ts_language_type_is_visible_wasm(this[0], typeId) ? true : false;
                }
                query(source) {
                    const sourceLength = lengthBytesUTF8(source);
                    const sourceAddress = C._malloc(sourceLength + 1);
                    stringToUTF8(source, sourceAddress, sourceLength + 1);
                    const address = C._ts_query_new(this[0], sourceAddress, sourceLength, TRANSFER_BUFFER, TRANSFER_BUFFER + 4);
                    if (!address) {
                        const errorId = getValue(TRANSFER_BUFFER + 4, 'i32');
                        const errorByte = getValue(TRANSFER_BUFFER, 'i32');
                        const errorIndex = UTF8ToString(sourceAddress, errorByte).length;
                        const suffix = source.substr(errorIndex, 100).split('\n')[0];
                        let word = suffix.match(QUERY_WORD_REGEX)[0];
                        let error;
                        switch(errorId){
                            case 2:
                                error = new RangeError(`Bad node name '${word}'`);
                                break;
                            case 3:
                                error = new RangeError(`Bad field name '${word}'`);
                                break;
                            case 4:
                                error = new RangeError(`Bad capture name @${word}`);
                                break;
                            case 5:
                                error = new TypeError(`Bad pattern structure at offset ${errorIndex}: '${suffix}'...`);
                                word = "";
                                break;
                            default:
                                error = new SyntaxError(`Bad syntax at offset ${errorIndex}: '${suffix}'...`);
                                word = "";
                                break;
                        }
                        error.index = errorIndex;
                        error.length = word.length;
                        C._free(sourceAddress);
                        throw error;
                    }
                    const stringCount = C._ts_query_string_count(address);
                    const captureCount = C._ts_query_capture_count(address);
                    const patternCount = C._ts_query_pattern_count(address);
                    const captureNames = new Array(captureCount);
                    const stringValues = new Array(stringCount);
                    for(let i1 = 0; i1 < captureCount; i1++){
                        const nameAddress = C._ts_query_capture_name_for_id(address, i1, TRANSFER_BUFFER);
                        const nameLength = getValue(TRANSFER_BUFFER, 'i32');
                        captureNames[i1] = UTF8ToString(nameAddress, nameLength);
                    }
                    for(let i11 = 0; i11 < stringCount; i11++){
                        const valueAddress = C._ts_query_string_value_for_id(address, i11, TRANSFER_BUFFER);
                        const nameLength1 = getValue(TRANSFER_BUFFER, 'i32');
                        stringValues[i11] = UTF8ToString(valueAddress, nameLength1);
                    }
                    const setProperties = new Array(patternCount);
                    const assertedProperties = new Array(patternCount);
                    const refutedProperties = new Array(patternCount);
                    const predicates = new Array(patternCount);
                    const textPredicates = new Array(patternCount);
                    for(let i2 = 0; i2 < patternCount; i2++){
                        const predicatesAddress = C._ts_query_predicates_for_pattern(address, i2, TRANSFER_BUFFER);
                        const stepCount = getValue(TRANSFER_BUFFER, 'i32');
                        predicates[i2] = [];
                        textPredicates[i2] = [];
                        const steps = [];
                        let stepAddress = predicatesAddress;
                        for(let j = 0; j < stepCount; j++){
                            const stepType = getValue(stepAddress, 'i32');
                            stepAddress += SIZE_OF_INT;
                            const stepValueId = getValue(stepAddress, 'i32');
                            stepAddress += SIZE_OF_INT;
                            if (stepType === 1) {
                                steps.push({
                                    type: 'capture',
                                    name: captureNames[stepValueId]
                                });
                            } else if (stepType === 2) {
                                steps.push({
                                    type: 'string',
                                    value: stringValues[stepValueId]
                                });
                            } else if (steps.length > 0) {
                                if (steps[0].type !== 'string') {
                                    throw new Error('Predicates must begin with a literal value');
                                }
                                const operator = steps[0].value;
                                let isPositive = true;
                                switch(operator){
                                    case 'not-eq?':
                                        isPositive = false;
                                    case 'eq?':
                                        if (steps.length !== 3) throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${steps.length - 1}`);
                                        if (steps[1].type !== 'capture') throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${steps[1].value}"`);
                                        if (steps[2].type === 'capture') {
                                            const captureName1 = steps[1].name;
                                            const captureName2 = steps[2].name;
                                            textPredicates[i2].push(function(captures) {
                                                let node1, node2;
                                                for (const c of captures){
                                                    if (c.name === captureName1) node1 = c.node;
                                                    if (c.name === captureName2) node2 = c.node;
                                                }
                                                if (node1 === undefined || node2 === undefined) return true;
                                                return node1.text === node2.text === isPositive;
                                            });
                                        } else {
                                            const captureName = steps[1].name;
                                            const stringValue = steps[2].value;
                                            textPredicates[i2].push(function(captures) {
                                                for (const c of captures){
                                                    if (c.name === captureName) {
                                                        return c.node.text === stringValue === isPositive;
                                                    }
                                                }
                                                return true;
                                            });
                                        }
                                        break;
                                    case 'not-match?':
                                        isPositive = false;
                                    case 'match?':
                                        if (steps.length !== 3) throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${steps.length - 1}.`);
                                        if (steps[1].type !== 'capture') throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${steps[1].value}".`);
                                        if (steps[2].type !== 'string') throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${steps[2].value}.`);
                                        const captureName3 = steps[1].name;
                                        const regex = new RegExp(steps[2].value);
                                        textPredicates[i2].push(function(captures) {
                                            for (const c of captures){
                                                if (c.name === captureName3) return regex.test(c.node.text) === isPositive;
                                            }
                                            return true;
                                        });
                                        break;
                                    case 'set!':
                                        if (steps.length < 2 || steps.length > 3) throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`);
                                        if (steps.some((s)=>s.type !== 'string')) throw new Error(`Arguments to \`#set!\` predicate must be a strings.".`);
                                        if (!setProperties[i2]) setProperties[i2] = {};
                                        setProperties[i2][steps[1].value] = steps[2] ? steps[2].value : null;
                                        break;
                                    case 'is?':
                                    case 'is-not?':
                                        if (steps.length < 2 || steps.length > 3) throw new Error(`Wrong number of arguments to \`#${operator}\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`);
                                        if (steps.some((s)=>s.type !== 'string')) throw new Error(`Arguments to \`#${operator}\` predicate must be a strings.".`);
                                        const properties = operator === 'is?' ? assertedProperties : refutedProperties;
                                        if (!properties[i2]) properties[i2] = {};
                                        properties[i2][steps[1].value] = steps[2] ? steps[2].value : null;
                                        break;
                                    default:
                                        predicates[i2].push({
                                            operator,
                                            operands: steps.slice(1)
                                        });
                                }
                                steps.length = 0;
                            }
                        }
                        Object.freeze(setProperties[i2]);
                        Object.freeze(assertedProperties[i2]);
                        Object.freeze(refutedProperties[i2]);
                    }
                    C._free(sourceAddress);
                    return new Query(INTERNAL, address, captureNames, textPredicates, predicates, Object.freeze(setProperties), Object.freeze(assertedProperties), Object.freeze(refutedProperties));
                }
                static load(input) {
                    let bytes;
                    if (input instanceof Uint8Array) {
                        bytes = Promise.resolve(input);
                    } else {
                        bytes = Promise.resolve(Deno.readFileSync(input));
                    }
                    const loadModule = loadWebAssemblyModule;
                    return bytes.then((bytes)=>loadModule(bytes, {
                            loadAsync: true
                        })).then((mod)=>{
                        const symbolNames = Object.keys(mod);
                        const functionName = symbolNames.find((key)=>LANGUAGE_FUNCTION_REGEX.test(key) && !key.includes("external_scanner_"));
                        if (!functionName) {
                            console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(symbolNames, null, 2)}`);
                        }
                        const languageAddress = mod[functionName]();
                        return new Language(INTERNAL, languageAddress);
                    });
                }
            }
            class Query {
                constructor(internal, address, captureNames, textPredicates, predicates, setProperties, assertedProperties, refutedProperties){
                    assertInternal(internal);
                    this[0] = address;
                    this.captureNames = captureNames;
                    this.textPredicates = textPredicates;
                    this.predicates = predicates;
                    this.setProperties = setProperties;
                    this.assertedProperties = assertedProperties;
                    this.refutedProperties = refutedProperties;
                    this.exceededMatchLimit = false;
                }
                delete() {
                    C._ts_query_delete(this[0]);
                    this[0] = 0;
                }
                matches(node, startPosition, endPosition, options) {
                    if (!startPosition) startPosition = ZERO_POINT;
                    if (!endPosition) endPosition = ZERO_POINT;
                    if (!options) options = {};
                    let matchLimit = options.matchLimit;
                    if (typeof matchLimit === 'undefined') {
                        matchLimit = 0;
                    } else if (typeof matchLimit !== 'number') {
                        throw new Error('Arguments must be numbers');
                    }
                    marshalNode(node);
                    C._ts_query_matches_wasm(this[0], node.tree[0], startPosition.row, startPosition.column, endPosition.row, endPosition.column, matchLimit);
                    const rawCount = getValue(TRANSFER_BUFFER, 'i32');
                    const startAddress = getValue(TRANSFER_BUFFER + 4, 'i32');
                    const didExceedMatchLimit = getValue(TRANSFER_BUFFER + 2 * 4, 'i32');
                    const result1 = new Array(rawCount);
                    this.exceededMatchLimit = !!didExceedMatchLimit;
                    let filteredCount = 0;
                    let address = startAddress;
                    for(let i1 = 0; i1 < rawCount; i1++){
                        const pattern = getValue(address, 'i32');
                        address += SIZE_OF_INT;
                        const captureCount = getValue(address, 'i32');
                        address += SIZE_OF_INT;
                        const captures = new Array(captureCount);
                        address = unmarshalCaptures(this, node.tree, address, captures);
                        if (this.textPredicates[pattern].every((p)=>p(captures))) {
                            result1[filteredCount++] = {
                                pattern,
                                captures
                            };
                            const setProperties = this.setProperties[pattern];
                            if (setProperties) result1[i1].setProperties = setProperties;
                            const assertedProperties = this.assertedProperties[pattern];
                            if (assertedProperties) result1[i1].assertedProperties = assertedProperties;
                            const refutedProperties = this.refutedProperties[pattern];
                            if (refutedProperties) result1[i1].refutedProperties = refutedProperties;
                        }
                    }
                    result1.length = filteredCount;
                    C._free(startAddress);
                    return result1;
                }
                captures(node, startPosition, endPosition, options) {
                    if (!startPosition) startPosition = ZERO_POINT;
                    if (!endPosition) endPosition = ZERO_POINT;
                    if (!options) options = {};
                    let matchLimit = options.matchLimit;
                    if (typeof matchLimit === 'undefined') {
                        matchLimit = 0;
                    } else if (typeof matchLimit !== 'number') {
                        throw new Error('Arguments must be numbers');
                    }
                    marshalNode(node);
                    C._ts_query_captures_wasm(this[0], node.tree[0], startPosition.row, startPosition.column, endPosition.row, endPosition.column, matchLimit);
                    const count = getValue(TRANSFER_BUFFER, 'i32');
                    const startAddress = getValue(TRANSFER_BUFFER + 4, 'i32');
                    const didExceedMatchLimit = getValue(TRANSFER_BUFFER + 2 * 4, 'i32');
                    const result1 = [];
                    this.exceededMatchLimit = !!didExceedMatchLimit;
                    const captures = [];
                    let address = startAddress;
                    for(let i1 = 0; i1 < count; i1++){
                        const pattern = getValue(address, 'i32');
                        address += SIZE_OF_INT;
                        const captureCount = getValue(address, 'i32');
                        address += SIZE_OF_INT;
                        const captureIndex = getValue(address, 'i32');
                        address += SIZE_OF_INT;
                        captures.length = captureCount;
                        address = unmarshalCaptures(this, node.tree, address, captures);
                        if (this.textPredicates[pattern].every((p)=>p(captures))) {
                            const capture = captures[captureIndex];
                            const setProperties = this.setProperties[pattern];
                            if (setProperties) capture.setProperties = setProperties;
                            const assertedProperties = this.assertedProperties[pattern];
                            if (assertedProperties) capture.assertedProperties = assertedProperties;
                            const refutedProperties = this.refutedProperties[pattern];
                            if (refutedProperties) capture.refutedProperties = refutedProperties;
                            result1.push(capture);
                        }
                    }
                    C._free(startAddress);
                    return result1;
                }
                predicatesForPattern(patternIndex) {
                    return this.predicates[patternIndex];
                }
                didExceedMatchLimit() {
                    return this.exceededMatchLimit;
                }
            }
            function getText(tree, startIndex, endIndex) {
                const length = endIndex - startIndex;
                let result1 = tree.textCallback(startIndex, null, endIndex);
                startIndex += result1.length;
                while(startIndex < endIndex){
                    const string = tree.textCallback(startIndex, null, endIndex);
                    if (string && string.length > 0) {
                        startIndex += string.length;
                        result1 += string;
                    } else {
                        break;
                    }
                }
                if (startIndex > endIndex) {
                    result1 = result1.slice(0, length);
                }
                return result1;
            }
            function unmarshalCaptures(query, tree, address, result1) {
                for(let i1 = 0, n = result1.length; i1 < n; i1++){
                    const captureIndex = getValue(address, 'i32');
                    address += SIZE_OF_INT;
                    const node = unmarshalNode(tree, address);
                    address += SIZE_OF_NODE;
                    result1[i1] = {
                        name: query.captureNames[captureIndex],
                        node
                    };
                }
                return address;
            }
            function assertInternal(x) {
                if (x !== INTERNAL) throw new Error('Illegal constructor');
            }
            function isPoint(point) {
                return point && typeof point.row === 'number' && typeof point.column === 'number';
            }
            function marshalNode(node) {
                let address = TRANSFER_BUFFER;
                setValue(address, node.id, 'i32');
                address += SIZE_OF_INT;
                setValue(address, node.startIndex, 'i32');
                address += SIZE_OF_INT;
                setValue(address, node.startPosition.row, 'i32');
                address += SIZE_OF_INT;
                setValue(address, node.startPosition.column, 'i32');
                address += SIZE_OF_INT;
                setValue(address, node[0], 'i32');
            }
            function unmarshalNode(tree, address = TRANSFER_BUFFER) {
                const id = getValue(address, 'i32');
                address += SIZE_OF_INT;
                if (id === 0) return null;
                const index = getValue(address, 'i32');
                address += SIZE_OF_INT;
                const row = getValue(address, 'i32');
                address += SIZE_OF_INT;
                const column = getValue(address, 'i32');
                address += SIZE_OF_INT;
                const other = getValue(address, 'i32');
                const result1 = new Node(INTERNAL, tree);
                result1.id = id;
                result1.startIndex = index;
                result1.startPosition = {
                    row,
                    column
                };
                result1[0] = other;
                return result1;
            }
            function marshalTreeCursor(cursor, address = TRANSFER_BUFFER) {
                setValue(address + 0 * 4, cursor[0], 'i32'), setValue(address + 1 * 4, cursor[1], 'i32'), setValue(address + 2 * 4, cursor[2], 'i32');
            }
            function unmarshalTreeCursor(cursor) {
                cursor[0] = getValue(TRANSFER_BUFFER + 0 * SIZE_OF_INT, 'i32'), cursor[1] = getValue(TRANSFER_BUFFER + 1 * SIZE_OF_INT, 'i32'), cursor[2] = getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, 'i32');
            }
            function marshalPoint(address, point) {
                setValue(address, point.row, 'i32');
                setValue(address + 4, point.column, 'i32');
            }
            function unmarshalPoint(address) {
                return {
                    row: getValue(address, 'i32'),
                    column: getValue(address + 4, 'i32')
                };
            }
            function marshalRange(address, range) {
                marshalPoint(address, range.startPosition);
                address += SIZE_OF_POINT;
                marshalPoint(address, range.endPosition);
                address += SIZE_OF_POINT;
                setValue(address, range.startIndex, 'i32');
                address += SIZE_OF_INT;
                setValue(address, range.endIndex, 'i32');
                address += SIZE_OF_INT;
            }
            function unmarshalRange(address) {
                const result1 = {};
                result1.startPosition = unmarshalPoint(address);
                address += SIZE_OF_POINT;
                result1.endPosition = unmarshalPoint(address);
                address += SIZE_OF_POINT;
                result1.startIndex = getValue(address, 'i32');
                address += SIZE_OF_INT;
                result1.endIndex = getValue(address, 'i32');
                return result1;
            }
            function marshalEdit(edit) {
                let address = TRANSFER_BUFFER;
                marshalPoint(address, edit.startPosition);
                address += SIZE_OF_POINT;
                marshalPoint(address, edit.oldEndPosition);
                address += SIZE_OF_POINT;
                marshalPoint(address, edit.newEndPosition);
                address += SIZE_OF_POINT;
                setValue(address, edit.startIndex, 'i32');
                address += SIZE_OF_INT;
                setValue(address, edit.oldEndIndex, 'i32');
                address += SIZE_OF_INT;
                setValue(address, edit.newEndIndex, 'i32');
                address += SIZE_OF_INT;
            }
            for (const name of Object.getOwnPropertyNames(ParserImpl.prototype)){
                Object.defineProperty(Parser.prototype, name, {
                    value: ParserImpl.prototype[name],
                    enumerable: false,
                    writable: false
                });
            }
            Parser.Language = Language;
            Module.onRuntimeInitialized = ()=>{
                ParserImpl.init();
            };
            await run();
            init1 = true;
        }
    }
    return Parser;
}();
function setMainPath(path) {
    path;
}
async function initTreeSitter() {
    setWasmBinaryFile(Deno.readFileSync(resourcePath("editor/tools/yaml/tree-sitter.wasm")));
    await TreeSitter.init();
    const parser = new TreeSitter();
    const language = await TreeSitter.Language.load(resourcePath("editor/tools/yaml/tree-sitter-yaml.wasm"));
    parser.setLanguage(language);
    setMainPath("https://example.com");
    setTreeSitter(parser);
}
function patchMarkdownDescriptions() {
    const descriptionList = getYamlIntelligenceResource("schema/html-descriptions.yml");
    const schemaList = Object.values(getSchemaDefinitionsObject());
    let cursor = 0;
    for (const schema of schemaList){
        walkSchema(schema, (s)=>{
            if (s === false || s === true) {
                return;
            }
            const description = s && s.tags && s.tags.description;
            if (!description) {
                return;
            }
            const fixedDescription = descriptionList[cursor++];
            if (typeof fixedDescription === "string") {
                s.documentation = fixedDescription;
            } else if (typeof (fixedDescription && fixedDescription.short) === "string") {
                s.documentation = fixedDescription.short;
            }
        });
    }
}
async function initYamlIntelligence(obj) {
    const { resourceModule , patchMarkdown ,  } = obj;
    setYamlIntelligenceResources(resourceModule);
    await loadDefaultSchemaDefinitions();
    getFormatAliases();
    await getFrontMatterSchema();
    await getProjectConfigSchema();
    await getEngineOptionsSchema();
    for (const schema of getYamlIntelligenceResource("schema/external-schemas.yml")){
        setSchemaDefinition(schema);
    }
    try {
        const extendedLangCommentChars = getYamlIntelligenceResource("handlers/lang-comment-chars.yml");
        for (const [lang, comment] of Object.entries(extendedLangCommentChars)){
            kLangCommentChars[lang] = comment;
        }
    } catch (_e) {
        console.warn(`"handlers/lang-comment-chars.yml" not found.
initialization does not contain language extensions`);
    }
    if (patchMarkdown === undefined || patchMarkdown) {
        patchMarkdownDescriptions();
    }
}
async function initYamlIntelligenceResourcesFromFilesystem() {
    const resourceModule = (await import(toFileUrl2(resourcePath("editor/tools/yaml/yaml-intelligence-resources.json")).href, {
        assert: {
            type: "json"
        }
    })).default;
    await initYamlIntelligence({
        resourceModule
    });
    await initTreeSitter();
}
function renderServices() {
    const temp = createTempContext();
    const extension = createExtensionContext();
    if (getNamedLifetime("render-services")) {
        return {
            temp,
            extension,
            lifetime: getNamedLifetime("render-services"),
            cleanup: ()=>{}
        };
    } else {
        const lifetime = createNamedLifetime("render-services");
        lifetime.attach(temp);
        return {
            temp,
            extension,
            lifetime,
            cleanup: ()=>{
                lifetime.cleanup();
            }
        };
    }
}
async function resolveFormatsFromMetadata(metadata, input, formats, flags) {
    const includeDir = dirname2(input);
    const frontMatterSchema = await getFrontMatterSchema();
    const included = await includedMetadata(includeDir, metadata, frontMatterSchema);
    const allMetadata = mergeQuartoConfigs(metadata, included.metadata, flags?.metadata || {});
    await resolveLanguageMetadata(allMetadata, includeDir);
    const baseFormat = metadataAsFormat(allMetadata);
    if (formats === undefined) {
        formats = formatKeys(allMetadata);
    }
    if (formats.length === 0) {
        formats.push(baseFormat.pandoc.to || baseFormat.pandoc.writer || "html");
    }
    const renderFormats = [];
    if (flags?.to === undefined) {
        renderFormats.push(...formats);
    } else if (flags?.to === "default") {
        renderFormats.push(formats[0]);
    } else {
        const toFormats = flags.to.split(",").flatMap((to)=>{
            if (to === "all") {
                return formats;
            } else {
                return [
                    to
                ];
            }
        });
        renderFormats.push(...toFormats);
    }
    const resolved = {};
    renderFormats.forEach((to)=>{
        const format = formatFromMetadata(baseFormat, to, flags?.debug);
        const config = mergeFormatMetadata(baseFormat, format);
        const resolveFormat = defaultWriterFormat(to).resolveFormat;
        if (resolveFormat) {
            resolveFormat(config);
        }
        if (flags?.execute !== undefined) {
            config.execute[kExecuteEnabled] = flags?.execute;
        }
        if (flags?.executeCache !== undefined) {
            config.execute[kCache] = flags?.executeCache;
        }
        if (flags?.executeDaemon !== undefined) {
            config.execute[kExecuteDaemon] = flags.executeDaemon;
        }
        if (flags?.executeDaemonRestart !== undefined) {
            config.execute[kExecuteDaemonRestart] = flags.executeDaemonRestart;
        }
        if (flags?.executeDebug !== undefined) {
            config.execute[kExecuteDebug] = flags.executeDebug;
        }
        resolved[to] = config;
    });
    return resolved;
}
async function renderContexts(file, options, forExecute, project) {
    options = cloneDeep1(options);
    const { engine , target  } = await fileExecutionEngineAndTarget(file.path, options.flags, undefined, project);
    const engineClaimReason = fileEngineClaimReason(file.path);
    const formats = await resolveFormats(file, target, engine, options, project);
    options = removePandocTo(options);
    let libDir = project?.config?.project[kProjectLibDir];
    if (project && libDir) {
        libDir = relative2(dirname2(file.path), join3(project.dir, libDir));
    } else {
        libDir = filesDirLibDir(file.path);
    }
    const contexts = {};
    for (const format of Object.keys(formats)){
        const context = {
            target,
            options,
            engine,
            format: formats[format],
            project,
            libDir: libDir
        };
        contexts[format] = context;
        if (!isJupyterNotebook(context.target.source)) {
            const preEngineCellHandlerOptions = {
                name: "",
                temp: options.services.temp,
                format: context.format,
                markdown: context.target.markdown,
                context,
                stage: "pre-engine"
            };
            const { markdown , results  } = await handleLanguageCells(preEngineCellHandlerOptions);
            context.target.markdown = markdown;
            if (results) {
                context.target.preEngineExecuteResults = results;
            }
            if (engineClaimReason === "markdown") {
                const { engine: engine1 , target: target1  } = await fileExecutionEngineAndTarget(file.path, options.flags, markdown, project);
                context.engine = engine1;
                context.target = target1;
            }
        }
        if (!forExecute && engine.executeTargetSkipped) {
            engine.executeTargetSkipped(target, formats[format]);
        }
    }
    return contexts;
}
async function renderFormats(file, to = "all", project) {
    const services = renderServices();
    try {
        const contexts = await renderContexts({
            path: file
        }, {
            services,
            flags: {
                to
            }
        }, false, project);
        const formats = {};
        Object.keys(contexts).forEach((formatName)=>{
            const context = contexts[formatName];
            const format = context.format;
            delete format.metadata.format;
            deleteProjectMetadata(format.metadata);
            if (!format.pandoc[kOutputFile]) {
                const [_dir, stem] = dirAndStem(file);
                format.pandoc[kOutputFile] = `${stem}.${format.render[kOutputExt]}`;
            }
            format.execute[kEngine] = context.engine.name;
            formats[formatName] = format;
        });
        return formats;
    } finally{
        services.cleanup();
    }
}
async function inputTargetIndex(project, input) {
    const inputFile = join3(project.dir, input);
    if (!existsSync(inputFile) || Deno.statSync(inputFile).isDirectory) {
        return Promise.resolve(undefined);
    }
    if (!project.files.input.includes(Deno.realPathSync(inputFile))) {
        return Promise.resolve(undefined);
    }
    const engine = fileExecutionEngine(inputFile);
    if (engine === undefined) {
        return Promise.resolve(undefined);
    }
    const targetIndex = readInputTargetIndex(project.dir, input);
    if (targetIndex) {
        return targetIndex;
    }
    const formats = await renderFormats(inputFile, "all", project);
    const firstFormat = Object.values(formats)[0];
    const markdown = await engine.partitionedMarkdown(inputFile, firstFormat);
    const index = {
        title: firstFormat?.metadata?.[kTitle] || markdown.yaml?.[kTitle] || markdown.headingText,
        markdown,
        formats
    };
    if (index.title) {
        const parsedTitle = parsePandocTitle(index.title);
        index.title = parsedTitle.heading;
    } else {
        index.title = index.markdown.headingText;
    }
    const indexFile = inputTargetIndexFile(project.dir, input);
    Deno.writeTextFileSync(indexFile, JSON.stringify(index));
    return index;
}
function readInputTargetIndex(projectDir, input) {
    const index = readInputTargetIndexIfStillCurrent(projectDir, input);
    if (index) {
        if (Object.keys(index.formats).includes("html")) {
            index.formats = websiteFormatPreferHtml(index.formats);
        }
        const formats = Object.keys(index.formats);
        const projConfigFile = projectConfigFile(projectDir);
        if (projConfigFile) {
            let contents = Deno.readTextFileSync(projConfigFile);
            if (contents.trim().length === 0) {
                contents = kDefaultProjectFileContents;
            }
            const config = readYamlFromString(contents);
            const projFormats = formatKeys(config);
            if (__VIRTUAL_FILE211(formats, projFormats)) {
                return index;
            } else {
                return undefined;
            }
        } else {
            return index;
        }
    } else {
        return undefined;
    }
}
function inputTargetIsEmpty(index) {
    if (index.markdown.markdown.trim().length > 0) {
        return false;
    }
    if (index.markdown.yaml && Object.keys(index.markdown.yaml).find((key)=>key !== kTitle)) {
        return false;
    }
    return true;
}
function readInputTargetIndexIfStillCurrent(projectDir, input) {
    const inputFile = join3(projectDir, input);
    const indexFile = inputTargetIndexFile(projectDir, input);
    if (existsSync(indexFile)) {
        const inputMod = Deno.statSync(inputFile).mtime;
        const indexMod = Deno.statSync(indexFile).mtime;
        if (inputMod && indexMod && indexMod >= inputMod) {
            try {
                return JSON.parse(Deno.readTextFileSync(indexFile));
            } catch  {
                return undefined;
            }
        }
    }
}
async function resolveInputTarget(project, href, absolute = true) {
    const index = await inputTargetIndex(project, href);
    if (index) {
        const formats = formatsPreferHtml(index.formats);
        const format = Object.values(formats)[0];
        const [hrefDir, hrefStem] = dirAndStem(href);
        const outputFile = formatOutputFile(format) || `${hrefStem}.html`;
        const outputHref = pathWithForwardSlashes((absolute ? "/" : "") + join3(hrefDir, outputFile));
        return {
            title: index.title,
            outputHref
        };
    } else {
        return undefined;
    }
}
async function inputFileForOutputFile(project, output) {
    const outputDir = projectOutputDir(project);
    output = join3(outputDir, output);
    for (const file of project.files.input){
        const inputRelative = relative2(project.dir, file);
        const index = await inputTargetIndex(project, relative2(project.dir, file));
        if (index) {
            const hasOutput = Object.keys(index.formats).some((key)=>{
                const format = index.formats[key];
                const outputFile = formatOutputFile(format);
                if (outputFile) {
                    const formatOutputPath = join3(outputDir, dirname2(inputRelative), outputFile);
                    return output === formatOutputPath;
                }
            });
            if (hasOutput) {
                return file;
            }
        }
    }
}
async function inputTargetIndexForOutputFile(project, outputRelative) {
    const input = await inputFileForOutputFile(project, outputRelative);
    if (input) {
        return await inputTargetIndex(project, relative2(project.dir, input));
    } else {
        return undefined;
    }
}
function clearProjectIndex(projectDir) {
    const indexPath = projectScratchPath(projectDir, "idx");
    removeIfExists(indexPath);
}
const sidebarContext = ()=>{
    return {
        counter: 0
    };
};
function normalizeSidebarItem(projectDir, item, context) {
    item = cloneDeep1(item);
    if (typeof item === "string") {
        if (safeExistsSync(join3(projectDir, item))) {
            item = {
                href: item
            };
        } else {
            item = {
                text: item
            };
        }
    } else {
        resolveHrefAttribute(item);
        const section = item.section;
        if (section) {
            context.counter = context.counter + 1;
            const sectionPath = join3(projectDir, section);
            if (safeExistsSync(sectionPath) && Deno.statSync(sectionPath).isFile) {
                item.href = section;
            } else {
                item.text = section;
            }
            item.sectionId = `${kQuartoSidebarPrefix}${context.counter}`;
            delete item.section;
            item.contents = item.contents || [];
        }
        if (item.contents) {
            for(let i1 = 0; i1 < item.contents.length; i1++){
                item.contents[i1] = normalizeSidebarItem(projectDir, item.contents[i1], context);
            }
        }
    }
    return item;
}
const kQuartoSidebarPrefix = "quarto-sidebar-section-";
function resolveHrefAttribute(item) {
    item.href = item.href || item.file || item.url;
    delete item.file;
    delete item.url;
}
async function partitionedMarkdownForInput(projectDir, input) {
    const index = readInputTargetIndex(projectDir, input);
    if (index) {
        return index.markdown;
    } else {
        const inputPath = join3(projectDir, input);
        const engine = fileExecutionEngine(inputPath);
        if (engine) {
            return await engine.partitionedMarkdown(inputPath);
        } else {
            return undefined;
        }
    }
}
async function renderExecute(context, output, options) {
    const versionConstraint = context.format.metadata[kQuartoVersion];
    if (versionConstraint) {
        const ourVersion = quartoConfig.version();
        let result1;
        try {
            result1 = satisfies(ourVersion, versionConstraint);
        } catch (_e) {
            throw new Error(`In file ${context.target.source}:\nVersion constraint is invalid: ${versionConstraint}.`);
        }
        if (!result1) {
            throw new Error(`in file ${context.target.source}:\nQuarto version ${ourVersion} does not satisfy version constraint ${versionConstraint}.`);
        }
    }
    const { resolveDependencies =true , alwaysExecute =false  } = options;
    const flags = context.options.flags || {};
    const filesDir = inputFilesDir(context.target.source);
    let projRelativeFilesDir;
    if (context.project) {
        const inputDir = relative2(context.project.dir, dirname2(context.target.source));
        projRelativeFilesDir = join3(inputDir, filesDir);
    }
    const canFreeze = context.engine.canFreeze && context.format.execute[kExecuteEnabled] !== false;
    if (context.project && !alwaysExecute) {
        const thaw = canFreeze && (context.format.execute[kFreeze] || (context.options.useFreezer ? "auto" : false));
        if (thaw) {
            const hidden = context.format.execute[kFreeze] === false;
            copyFromProjectFreezer(context.project, projRelativeFilesDir, hidden);
            const thawedResult = defrostExecuteResult(context.target.source, output, context.options.services.temp, thaw === true);
            if (thawedResult) {
                const libDir = context.project?.config?.project[kProjectLibDir];
                if (libDir) {
                    copyFromProjectFreezer(context.project, libDir, hidden);
                }
                removeFreezeResults(join3(context.project.dir, projRelativeFilesDir));
                if (context.engine.executeTargetSkipped) {
                    context.engine.executeTargetSkipped(context.target, context.format);
                }
                return thawedResult;
            }
        }
    }
    const figsDir = join3(filesDir, figuresDir(context.format.pandoc.to));
    push("render-execute");
    const executeResult = await context.engine.execute({
        target: context.target,
        resourceDir: resourcePath(),
        tempDir: context.options.services.temp.createDir(),
        dependencies: resolveDependencies,
        libDir: context.libDir,
        format: context.format,
        projectDir: context.project?.dir,
        cwd: flags.executeDir || dirname2(Deno.realPathSync(context.target.source)),
        params: resolveParams(flags.params, flags.paramsFile),
        quiet: flags.quiet,
        previewServer: context.options.previewServer,
        handledLanguages: languages()
    });
    pop();
    if (context.project && canFreeze) {
        const freezeFile = freezeExecuteResult(context.target.source, output, executeResult);
        copyToProjectFreezer(context.project, projRelativeFilesDir, true, true);
        if (context.format.execute[kFreeze] !== false) {
            copyToProjectFreezer(context.project, projRelativeFilesDir, false, true);
        } else {
            const freezeFigsDir = freezerFigsDir(context.project, projRelativeFilesDir, basename2(figsDir));
            removeIfExists(freezeFigsDir);
            const projRelativeFreezeFile = relative2(context.project.dir, freezeFile);
            const freezerFile = freezerFreezeFile(context.project, projRelativeFreezeFile);
            removeIfExists(freezerFile);
            removeIfEmptyDir(dirname2(freezerFile));
            removeIfEmptyDir(dirname2(freezeFigsDir));
            removeIfEmptyDir(join3(context.project.dir, kProjectFreezeDir));
        }
        removeFreezeResults(join3(context.project.dir, projRelativeFilesDir));
    }
    return executeResult;
}
async function renderFiles(files, options, alwaysExecuteFiles, pandocRenderer, project) {
    pandocRenderer = pandocRenderer || defaultPandocRenderer(options, project);
    const tempContext = createTempContext();
    try {
        options = cloneDeep1(options);
        const progress = options.progress || project && files.length > 1 && !options.flags?.quiet;
        const pandocQuiet = !!progress;
        const numWidth = String(files.length).length;
        for(let i1 = 0; i1 < files.length; i1++){
            const file = files[i1];
            if (progress) {
                renderProgress(`[${String(i1 + 1).padStart(numWidth)}/${files.length}] ${relative2(project.dir, file.path)}`);
            }
            let contexts;
            try {
                contexts = await renderContexts(file, options, true, project);
            } catch (e) {
                const { engine , target  } = await fileExecutionEngineAndTarget(file.path, options.flags);
                const validationResult = await validateDocumentFromSource(target.markdown, engine.name, error);
                if (validationResult.length) {
                    throw new RenderInvalidYAMLError();
                } else {
                    throw e;
                }
            }
            const mergeHandlerResults = (results, executeResult, context)=>{
                if (results === undefined) {
                    return;
                }
                if (executeResult.includes) {
                    executeResult.includes = mergeConfigs(executeResult.includes, results.includes);
                } else {
                    executeResult.includes = results.includes;
                }
                const extras = resolveDependencies(results.extras, dirname2(context.target.source), context.libDir, tempContext, project);
                if (extras[kIncludeInHeader]) {
                    executeResult.includes[kIncludeInHeader] = [
                        ...extras[kIncludeInHeader] || [],
                        ...executeResult.includes[kIncludeInHeader] || [], 
                    ];
                }
                executeResult.supporting.push(...results.supporting);
            };
            for (const format of Object.keys(contexts)){
                push("render-context");
                const context = __VIRTUAL_FILE107(contexts[format]);
                initDayJsPlugins();
                if (context.format.metadata[kLang] && typeof context.format.metadata[kLang] === "string") {
                    await setDateLocale(options.flags?.pandocMetadata?.[kLang] || context.format.metadata[kLang]);
                }
                const fileLifetime = createNamedLifetime("render-file");
                fileLifetime.attach({
                    cleanup () {
                        resetFigureCounter();
                    }
                });
                try {
                    if (isHtmlCompatible(context.format)) {
                        await initDenoDom();
                    }
                    const recipe = await outputRecipe(context);
                    const executeOptions = mergeConfigs({
                        alwaysExecute: alwaysExecuteFiles?.includes(file.path)
                    }, pandocRenderer.onBeforeExecute(recipe.format));
                    const validate = context.format.metadata?.["validate-yaml"];
                    if (validate !== false) {
                        const validationResult1 = await validateDocument(context);
                        if (validationResult1.length) {
                            throw new RenderInvalidYAMLError();
                        }
                    }
                    const { ojsBlockLineNumbers  } = annotateOjsLineNumbers(context);
                    const baseExecuteResult = await renderExecute(context, recipe.output, executeOptions);
                    let mappedMarkdown;
                    withTiming("diff-execute-result", ()=>{
                        if (!isJupyterNotebook(context.target.source)) {
                            mappedMarkdown = mappedDiff(context.target.markdown, baseExecuteResult.markdown);
                        } else {
                            mappedMarkdown = asMappedString(baseExecuteResult.markdown);
                        }
                    });
                    const resourceFiles = [];
                    if (baseExecuteResult.resourceFiles) {
                        resourceFiles.push(...baseExecuteResult.resourceFiles);
                    }
                    const languageCellHandlerOptions = {
                        name: "",
                        temp: tempContext,
                        format: recipe.format,
                        markdown: mappedMarkdown,
                        context,
                        stage: "post-engine"
                    };
                    let unmappedExecuteResult;
                    await withTimingAsync("handle-language-cells", async ()=>{
                        const { markdown , results  } = await handleLanguageCells(languageCellHandlerOptions);
                        const mappedExecuteResult = {
                            ...baseExecuteResult,
                            markdown
                        };
                        mergeHandlerResults(context.target.preEngineExecuteResults, mappedExecuteResult, context);
                        mergeHandlerResults(results, mappedExecuteResult, context);
                        const { executeResult , resourceFiles: ojsResourceFiles  } = await ojsExecuteResult(context, mappedExecuteResult, ojsBlockLineNumbers);
                        resourceFiles.push(...ojsResourceFiles);
                        const keepMd = executionEngineKeepMd(context.target.input);
                        if (keepMd && context.format.execute[kKeepMd]) {
                            Deno.writeTextFileSync(keepMd, executeResult.markdown.value);
                        }
                        unmappedExecuteResult = {
                            ...executeResult,
                            markdown: executeResult.markdown.value
                        };
                    });
                    push("render-pandoc");
                    await pandocRenderer.onRender(format, {
                        context,
                        recipe,
                        executeResult: unmappedExecuteResult,
                        resourceFiles
                    }, pandocQuiet);
                    pop();
                } finally{
                    fileLifetime.cleanup();
                    pop();
                }
            }
        }
        if (progress) {
            info("");
        }
        return await pandocRenderer.onComplete(false, options.flags?.quiet);
    } catch (error1) {
        return {
            files: (await pandocRenderer.onComplete(true)).files,
            error: error1 || new Error()
        };
    } finally{
        tempContext.cleanup();
        if (Deno.env.get("QUARTO_PROFILER_OUTPUT")) {
            Deno.writeTextFileSync(Deno.env.get("QUARTO_PROFILER_OUTPUT"), JSON.stringify(getData()));
        }
    }
}
async function renderProject(context, options, files) {
    const projType = projectType(context.config?.project?.[kProjectType]);
    const projDir = Deno.realPathSync(context.dir);
    const incremental = !!files;
    let alwaysExecuteFiles = incremental && !options.useFreezer ? __VIRTUAL_FILE107(files) : undefined;
    const normalizeFiles = (targetFiles)=>{
        return targetFiles.map((file)=>{
            const target = isAbsolute2(file) ? file : join3(Deno.cwd(), file);
            if (!existsSync(target)) {
                throw new Error("Render target does not exist: " + file);
            }
            return Deno.realPathSync(target);
        });
    };
    if (files) {
        if (alwaysExecuteFiles) {
            alwaysExecuteFiles = normalizeFiles(alwaysExecuteFiles);
            files = normalizeFiles(files);
        } else if (options.useFreezer) {
            files = normalizeFiles(files);
        }
    }
    if (files && alwaysExecuteFiles && projType.incrementalRenderAll && await projType.incrementalRenderAll(context, options, files)) {
        files = context.files.input;
        options = {
            ...options,
            useFreezer: true
        };
    }
    const renderAll = !files || files.length === context.files.input.length;
    const prePostEnv = {
        "QUARTO_PROJECT_OUTPUT_DIR": context.config?.project?.[kProjectOutputDir] || ".",
        ...renderAll ? {
            QUARTO_PROJECT_RENDER_ALL: "1"
        } : {}
    };
    files = files || context.files.input;
    const filesToRender = files.map((file)=>{
        return {
            path: file
        };
    });
    const projectSupplement = (filesToRender)=>{
        if (projType.supplementRender && !options.devServerReload) {
            return projType.supplementRender(context, filesToRender, incremental);
        } else {
            return {
                files: []
            };
        }
    };
    const supplements = projectSupplement(filesToRender);
    filesToRender.push(...supplements.files);
    const projResults = {
        baseDir: projDir,
        outputDir: context.config?.project?.[kProjectOutputDir],
        files: []
    };
    await ensureGitignore(context.dir);
    const progress = !!options.progress || filesToRender.length > 1;
    const projOutputDir = context.config?.project?.[kProjectOutputDir];
    if (renderAll && typeof projOutputDir === "string" && options.flags?.clean == true && projType.cleanOutputDir === true) {
        const realProjectDir = Deno.realPathSync(context.dir);
        let realOutputDir = join3(realProjectDir, projOutputDir);
        if (existsSync(realOutputDir)) {
            realOutputDir = Deno.realPathSync(realOutputDir);
            if (realOutputDir !== realProjectDir && realOutputDir.startsWith(realProjectDir)) {
                removeIfExists(realOutputDir);
            }
        }
        clearProjectIndex(realProjectDir);
    }
    if (filesToRender.length > 0 && context.config?.project?.[kProjectPreRender]) {
        await runPreRender(projDir, asArray(context.config?.project?.[kProjectPreRender]), progress, !!options.flags?.quiet, {
            ...prePostEnv,
            QUARTO_PROJECT_INPUT_FILES: filesToRender.map((fileToRender)=>fileToRender.path).map((file)=>relative2(projDir, file)).join("\n")
        });
    }
    if (projType.preRender) {
        await projType.preRender(context);
    }
    const executeDir = context.config?.project?.[kProjectExecuteDir];
    if (options.flags?.executeDir === undefined && executeDir === "project") {
        options = {
            ...options,
            flags: {
                ...options.flags,
                executeDir: projDir
            }
        };
    }
    if (filesToRender.length > 3 && options.flags && options.flags.executeDaemon === undefined) {
        options.flags.executeDaemon = 0;
    }
    const outputDir = projResults.outputDir;
    const outputDirAbsolute = outputDir ? join3(projDir, outputDir) : undefined;
    if (outputDirAbsolute) {
        ensureDirSync(outputDirAbsolute);
    }
    const libDir = context.config?.project[kProjectLibDir];
    const resourcesFrom = async (file)=>{
        const partitioned = await partitionedMarkdownForInput(projDir, file.input);
        const excludeDirs = context ? projectExcludeDirs(context) : [];
        const resourceFiles = resourceFilesFromRenderedFile(projDir, excludeDirs, file, partitioned);
        return resourceFiles;
    };
    const fileResults = await renderFiles(filesToRender, options, alwaysExecuteFiles, projType?.pandocRenderer ? projType.pandocRenderer(options, context) : undefined, context);
    if (outputDirAbsolute) {
        const relocateDir = (dir, copy = false)=>{
            const targetDir = join3(outputDirAbsolute, dir);
            if (existsSync(targetDir)) {
                Deno.removeSync(targetDir, {
                    recursive: true
                });
            }
            const srcDir = join3(projDir, dir);
            if (existsSync(srcDir)) {
                ensureDirSync(dirname2(targetDir));
                if (copy) {
                    copyTo(srcDir, targetDir);
                } else {
                    Deno.renameSync(srcDir, targetDir);
                }
            }
        };
        const moveDir = relocateDir;
        const copyDir = (dir)=>relocateDir(dir, true);
        let keepLibsDir = false;
        for(let i1 = 0; i1 < fileResults.files.length; i1++){
            const renderedFile = fileResults.files[i1];
            const outputFile = join3(outputDirAbsolute, renderedFile.file);
            ensureDirSync(dirname2(outputFile));
            Deno.renameSync(join3(projDir, renderedFile.file), outputFile);
            const keepFiles = !!renderedFile.format.execute[kKeepMd];
            keepLibsDir = keepLibsDir || keepFiles;
            if (renderedFile.supporting) {
                renderedFile.supporting = renderedFile.supporting.filter((file)=>file !== libDir);
                renderedFile.supporting = renderedFile.supporting.filter((file)=>{
                    return !renderedFile.supporting.some((dir)=>file.startsWith(dir) && file !== dir);
                });
                if (keepFiles) {
                    renderedFile.supporting.map((file)=>copyDir(file));
                } else {
                    renderedFile.supporting.map((file)=>moveDir(file));
                }
            }
            if (!keepFiles) {
                const filesDir = join3(projDir, dirname2(renderedFile.file), inputFilesDir(renderedFile.file));
                removeIfEmptyDir(filesDir);
            }
            projResults.files.push({
                input: renderedFile.input,
                markdown: renderedFile.markdown,
                format: renderedFile.format,
                file: renderedFile.file,
                supporting: renderedFile.supporting,
                resourceFiles: await resourcesFrom(renderedFile)
            });
        }
        if (libDir) {
            const libDirFull = join3(context.dir, libDir);
            if (existsSync(libDirFull)) {
                const libsIncremental = !!(incremental || options.useFreezer);
                const formatLibDirs = projType.formatLibDirs ? projType.formatLibDirs() : [];
                const freezeLibDir = (hidden)=>{
                    copyToProjectFreezer(context, libDir, hidden, false);
                    pruneProjectFreezerDir(context, libDir, formatLibDirs, hidden);
                    pruneProjectFreezer(context, hidden);
                };
                freezeLibDir(true);
                if (existsSync(join3(context.dir, kProjectFreezeDir))) {
                    freezeLibDir(false);
                }
                if (libsIncremental) {
                    for (const lib of Deno.readDirSync(libDirFull)){
                        if (lib.isDirectory) {
                            const copyDir1 = join3(libDir, lib.name);
                            const srcDir = join3(projDir, copyDir1);
                            const targetDir = join3(outputDirAbsolute, copyDir1);
                            copyMinimal(srcDir, targetDir);
                            if (!keepLibsDir) {
                                safeRemoveIfExists(srcDir);
                            }
                        }
                    }
                    if (!keepLibsDir) {
                        safeRemoveIfExists(libDirFull);
                    }
                } else {
                    if (keepLibsDir) {
                        copyDir(libDir);
                    } else {
                        moveDir(libDir);
                    }
                }
            }
        }
        const outputFiles = projResults.files.map((result1)=>join3(projDir, result1.file));
        projResults.files.forEach((file)=>{
            file.resourceFiles = file.resourceFiles.filter((resource)=>!outputFiles.includes(resource));
        });
        const allResourceFiles = __VIRTUAL_FILE181((context.files.resources || []).concat(projResults.files.flatMap((file)=>file.resourceFiles)));
        allResourceFiles.forEach((file)=>{
            const sourcePath = relative2(projDir, file);
            const destPath = join3(outputDirAbsolute, sourcePath);
            if (existsSync(file)) {
                if (Deno.statSync(file).isFile) {
                    copyResourceFile(context.dir, file, destPath);
                }
            } else if (!existsSync(destPath)) {
                warning(`File '${sourcePath}' was not found.`);
            }
        });
    } else {
        for (const result1 of fileResults.files){
            const resourceFiles = await resourcesFrom(result1);
            projResults.files.push({
                input: result1.input,
                markdown: result1.markdown,
                format: result1.format,
                file: result1.file,
                supporting: result1.supporting,
                resourceFiles
            });
        }
    }
    projResults.error = fileResults.error;
    if (!projResults.error) {
        const outputFiles1 = projResults.files.map((result1)=>{
            const file = outputDir ? join3(outputDir, result1.file) : result1.file;
            return {
                file: join3(projDir, file),
                format: result1.format
            };
        });
        if (projType.postRender) {
            await projType.postRender(context, incremental, outputFiles1);
        }
        if (filesToRender.length > 0 && context.config?.project?.[kProjectPostRender]) {
            await runPostRender(projDir, asArray(context.config?.project?.[kProjectPostRender]), progress, !!options.flags?.quiet, {
                ...prePostEnv,
                QUARTO_PROJECT_OUTPUT_FILES: outputFiles1.map((outputFile)=>relative2(projDir, outputFile.file)).join("\n")
            });
        }
    }
    projResults.files.forEach((file)=>{
        if (supplements.files.find((supFile)=>{
            return supFile.path === join3(projDir, file.input);
        })) {
            file.supplemental = true;
        }
    });
    const nonSupplementalFiles = projResults.files.filter((file)=>!file.supplemental).map((file)=>file.file);
    if (supplements.onRenderComplete) {
        await supplements.onRenderComplete(context, nonSupplementalFiles, incremental);
    }
    return projResults;
}
async function render(path, options) {
    setInitializer(initYamlIntelligenceResourcesFromFilesystem);
    await initState();
    const context = await projectContext(path, options.flags);
    if (context && options.setProjectDir) {
        Deno.env.set("QUARTO_PROJECT_DIR", context.dir);
    }
    if (Deno.statSync(path).isDirectory) {
        let files;
        if (context) {
            const renderDir = Deno.realPathSync(path);
            const projectDir = Deno.realPathSync(context.dir);
            if (renderDir !== projectDir) {
                files = context.files.input.filter((file)=>file.startsWith(renderDir));
            }
            return renderProject(context || await projectContextForDirectory(path, options.flags), options, files);
        } else {
            throw new Error("The specified directory ('" + path + "') is not a Quarto project");
        }
    } else if (context?.config) {
        if (isProjectInputFile(path, context)) {
            return renderProject(context, options, [
                path
            ]);
        }
    }
    validateDocumentRenderFlags(options.flags);
    const result1 = await renderFiles([
        {
            path
        }
    ], options);
    const engine = fileExecutionEngine(path);
    const partitioned = engine && result1.files.length > 0 ? await engine.partitionedMarkdown(path) : undefined;
    const excludeDirs = context ? projectExcludeDirs(context) : [];
    return {
        files: await Promise.all(result1.files.map(async (file)=>{
            const resourceFiles = await resourceFilesFromRenderedFile(dirname2(path), excludeDirs, file, partitioned);
            return {
                input: file.input,
                markdown: file.markdown,
                format: file.format,
                file: file.file,
                supporting: file.supporting,
                resourceFiles
            };
        })),
        error: result1.error
    };
}
function printWatchingForChangesMessage() {
    info("Watching files for changes", {
        format: green1
    });
}
function previewURL(host, port, path) {
    const showHost = host == "127.0.0.1" ? "localhost" : host;
    const url = `http://${showHost}:${port}/${path}`;
    return url;
}
async function printBrowsePreviewMessage(host, port, path) {
    if ((isJupyterServer() || isVSCodeTerminal()) && isRStudioWorkbench()) {
        const url = await rswURL(port, path);
        info(`\nPreview server: ${previewURL(host, port, path = "")}`);
        info(`\nBrowse at ${url}`, {
            format: green1
        });
    } else if (isVSCodeTerminal() && isVSCodeServer()) {
        const sep = path.startsWith("/") ? "" : "/";
        const browseUrl = vsCodeServerProxyUri().replace("{{port}}", `${port}`) + sep + path;
        info(`\nBrowse at ${browseUrl}`, {
            format: green1
        });
    } else if (isJupyterHubServer()) {
        const httpReferrer = `${jupyterHubHttpReferrer() || "<jupyterhub-server-url>/"}user/${jupyterHubUser()}/`;
        info(`\nBrowse at ${httpReferrer}proxy/${port}/${path}`, {
            format: green1
        });
    } else {
        const url1 = previewURL(host, port, path);
        if (!isRStudioServer()) {
            info(`Browse at `, {
                newline: false,
                format: green1
            });
        }
        info(url1, {
            format: (str)=>underline1(green1(str))
        });
    }
}
async function rswURL(port, path) {
    const server = Deno.env.get("RS_SERVER_URL");
    const session = Deno.env.get("RS_SESSION_URL");
    const portToken = await rswPortToken(port);
    const url = `${server}${session.slice(1)}p/${portToken}/${path}`;
    return url;
}
async function rswPortToken(port) {
    const result1 = await execProcess({
        cmd: [
            "/usr/lib/rstudio-server/bin/rserver-url",
            String(port)
        ],
        stdout: "piped",
        stderr: "piped"
    });
    if (result1.success) {
        return result1.stdout;
    } else {
        throw new Error(`Failed to map RSW port token (status ${result1.code})\n${result1.stderr}`);
    }
}
const kQuartoRenderCommand = "90B3C9E8-0DBC-4BC0-B164-AA2D5C031B28";
function previewUnableToRenderResponse() {
    return new Response("not found", {
        status: 404,
        headers: {
            "Content-Type": kTextPlain
        }
    });
}
let quartoRenderToken;
function renderToken() {
    const kQuartoRenderToken = "QUARTO_RENDER_TOKEN";
    if (quartoRenderToken === undefined) {
        quartoRenderToken = Deno.env.get(kQuartoRenderToken) || null;
        Deno.env.delete(kQuartoRenderToken);
    }
    return quartoRenderToken;
}
function validateDocumentRenderFlags(flags) {
    if (flags) {
        const projectOnly = {
            ["--output-dir"]: flags.outputDir,
            ["--site-url"]: flags.siteUrl
        };
        for (const arg of Object.keys(projectOnly)){
            if (projectOnly[arg]) {
                throw new Error(`The ${arg} flag can only be used when rendering projects.`);
            }
        }
    }
}
async function runPreRender(projDir, preRender, progress, quiet, env) {
    await runScripts(projDir, preRender, progress, quiet, env);
}
async function runPostRender(projDir, postRender, progress, quiet, env) {
    await runScripts(projDir, postRender, progress, quiet, env);
}
async function runScripts(projDir, scripts, progress, quiet, env) {
    for(let i1 = 0; i1 < scripts.length; i1++){
        const args = parseShellRunCommand(scripts[i1]);
        const script = args[0];
        if (progress && !quiet) {
            info(bold1(blue1(`${script}`)));
        }
        const handler = handlerForScript(script);
        if (handler) {
            await handler.run(script, args.splice(1), undefined, {
                cwd: projDir,
                stdout: quiet ? "piped" : "inherit",
                env
            });
        } else {
            await execProcess({
                cmd: args,
                cwd: projDir,
                stdout: quiet ? "piped" : "inherit",
                env
            });
        }
    }
    if (scripts.length > 0) {
        info("");
    }
}
function inputTargetIndexFile(projectDir, input) {
    return indexPath(projectDir, `${input}.json`);
}
function indexPath(projectDir, path) {
    return projectScratchPath(projectDir, join3("idx", path));
}
function mergeQuartoConfigs(config, ...configs) {
    config = cloneDeep1(config);
    configs = cloneDeep1(configs);
    const fixupMergeableScalars = (metadata)=>{
        [
            kBibliography,
            kCss,
            kHeaderIncludes,
            kIncludeBefore,
            kIncludeAfter,
            kIncludeInHeader,
            kIncludeBeforeBody,
            kIncludeAfterBody, 
        ].forEach((key)=>{
            if (typeof metadata[key] === "string") {
                metadata[key] = [
                    metadata[key]
                ];
            }
        });
    };
    const fixupFormat = (config)=>{
        const format = config[kMetadataFormat];
        if (typeof format === "string") {
            config.format = {
                [format]: {}
            };
        } else if (format instanceof Object) {
            Object.keys(format).forEach((key)=>{
                if (typeof Reflect.get(format, key) !== "object") {
                    Reflect.set(format, key, {});
                }
                fixupMergeableScalars(Reflect.get(format, key));
            });
        }
        fixupMergeableScalars(config);
        return config;
    };
    return mergeConfigs(fixupFormat(config), ...configs.map((c)=>fixupFormat(c)));
}
async function resolveFormats(file, target, engine, options, project) {
    const inputMetadata = target.metadata;
    const directoryMetadata = project?.dir ? await directoryMetadataForInputFile(project, dirname2(target.input)) : {};
    const projMetadata = await projectMetadataForInputFile(target.input, options.flags, project);
    let formats = [];
    const projFormatKeys = formatKeys(projMetadata);
    const dirFormatKeys = formatKeys(directoryMetadata);
    const inputFormatKeys = __VIRTUAL_FILE181(formatKeys(inputMetadata).concat(dirFormatKeys));
    const projType = projectType(project?.config?.project?.[kProjectType]);
    if (projType.projectFormatsOnly) {
        formats = projFormatKeys;
    } else if (inputFormatKeys.length > 0) {
        formats = inputFormatKeys;
    } else {
        formats = projFormatKeys;
    }
    if (file.formats) {
        formats = formats.filter((format)=>{
            return file.formats?.includes(format);
        });
        options = cloneDeep1(options);
        delete options.flags?.to;
    }
    const projFormats = await resolveFormatsFromMetadata(projMetadata, target.input, formats, options.flags);
    const directoryFormats = await resolveFormatsFromMetadata(directoryMetadata, target.input, formats, options.flags);
    const inputFormats = await resolveFormatsFromMetadata(inputMetadata, target.input, formats, options.flags);
    const targetFormats = __VIRTUAL_FILE181(Object.keys(projFormats).concat(Object.keys(directoryFormats)).concat(Object.keys(inputFormats)));
    const mergedFormats = {};
    for (const format of targetFormats){
        const projFormat = projFormats[format];
        const directoryFormat = directoryFormats[format];
        const inputFormat = inputFormats[format];
        if (project && isHtmlOutput(format, true) && formatHasBootstrap(projFormat) && projectTypeIsWebsite(projType)) {
            if (formatHasBootstrap(inputFormat)) {
                delete inputFormat.metadata[kTheme];
            }
            if (formatHasBootstrap(directoryFormat)) {
                delete directoryFormat.metadata[kTheme];
            }
        }
        const userFormat = mergeFormatMetadata(projFormat || {}, directoryFormat || {}, inputFormat || {});
        if (userFormat.execute[kEcho] === undefined) {
            if (userFormat.metadata[kServer] !== undefined) {
                userFormat.execute[kEcho] = false;
            }
        }
        const formatDesc = parseFormatString(format);
        const extensionMetadata = await readExtensionFormat(target.source, formatDesc, options.services.extension, project);
        mergedFormats[format] = mergeFormatMetadata(defaultWriterFormat(formatDesc.formatWithVariants), extensionMetadata[formatDesc.baseFormat], userFormat);
        mergedFormats[format].mergeAdditionalFormats = (...configs)=>{
            return mergeFormatMetadata(defaultWriterFormat(formatDesc.formatWithVariants), extensionMetadata[formatDesc.baseFormat], ...configs, userFormat);
        };
        const formatIsValid = isValidFormat(formatDesc, mergedFormats[format].pandoc);
        if (!formatIsValid) {
            throw new Error(`Unknown format ${format}`);
        }
    }
    for (const formatName of Object.keys(mergedFormats)){
        const format1 = mergedFormats[formatName];
        if (projType.isSupportedFormat) {
            if (!projType.isSupportedFormat(format1)) {
                delete mergedFormats[formatName];
                warnOnce(`The ${formatName} format is not supported by ${projType.type} projects`);
            }
        }
    }
    for (const formatName1 of Object.keys(mergedFormats)){
        let format2 = mergedFormats[formatName1];
        if (hasIpynbFilters(format2.execute)) {
            const markdown = await engine.partitionedMarkdown(target.source, format2);
            if (markdown.yaml) {
                const nbFormats = await resolveFormatsFromMetadata(markdown.yaml, target.source, [
                    formatName1
                ], {
                    ...options.flags,
                    to: undefined
                });
                format2 = mergeConfigs(format2, nbFormats[formatName1]);
            }
        }
        if (engine.filterFormat) {
            format2 = engine.filterFormat(target.source, options, format2);
        }
        mergedFormats[formatName1] = format2;
    }
    return mergedFormats;
}
const readExtensionFormat = async (file, formatDesc, extensionContext, project)=>{
    if (formatDesc.extension) {
        const extension = await extensionContext.extension(formatDesc.extension, file, project?.config, project?.dir);
        const extensionFormat = extension?.contributes.formats;
        if (extensionFormat) {
            const extensionMetadata = extensionFormat[formatDesc.baseFormat] || {};
            const formats = await resolveFormatsFromMetadata(extensionMetadata, extension.path, [
                formatDesc.baseFormat
            ]);
            return formats;
        } else {
            throw new Error(`No valid format ${formatDesc.baseFormat} is provided by the extension ${formatDesc.extension}`);
        }
    } else {
        return {};
    }
};
function hasIpynbFilters(execute) {
    return execute[kIpynbFilters] && execute[kIpynbFilters]?.length;
}
function defaultPandocRenderer(_options, _project) {
    const renderedFiles = [];
    return {
        onBeforeExecute: (_format)=>({}),
        onRender: async (_format, executedFile, quiet)=>{
            renderedFiles.push(await renderPandoc(executedFile, quiet));
        },
        onComplete: async ()=>{
            return {
                files: await Promise.resolve(renderedFiles)
            };
        }
    };
}
class RenderInvalidYAMLError extends YAMLValidationError {
    constructor(){
        super("Render failed due to invalid YAML.");
    }
}
const renderCommand = new Command().name("render").stopEarly().arguments("[input:string] [...args]").description("Render files or projects to various document types.").option("-t, --to", "Specify output format(s).").option("-o, --output", "Write output to FILE (use '--output -' for stdout).").option("--output-dir", "Write project output to DIR (path is project relative)").option("-M, --metadata", "Metadata value (KEY:VALUE).").option("--site-url", "Override site-url for website or book output").option("--execute", "Execute code (--no-execute to skip execution).").option("-P, --execute-param", "Execution parameter (KEY:VALUE).").option("--execute-params", "YAML file with execution parameters.").option("--execute-dir", "Working directory for code execution.").option("--execute-daemon", "Keep Jupyter kernel alive (defaults to 300 seconds).").option("--execute-daemon-restart", "Restart keepalive Jupyter kernel before render.").option("--execute-debug", "Show debug output for Jupyter kernel.").option("--use-freezer", "Force use of frozen computations for an incremental file render.").option("--cache", "Cache execution output (--no-cache to prevent cache).").option("--cache-refresh", "Force refresh of execution cache.").option("--no-clean", "Do not clean project output-dir prior to render").option("--debug", "Leave intermediate files in place after render.").option("pandoc-args...", "Additional pandoc command line arguments.").example("Render Markdown", "quarto render document.qmd\n" + "quarto render document.qmd --to html\n" + "quarto render document.qmd --to pdf --toc").example("Render Notebook", "quarto render notebook.ipynb\n" + "quarto render notebook.ipynb --to docx\n" + "quarto render notebook.ipynb --to pdf --toc").example("Render Project", "quarto render\n" + "quarto render projdir").example("Render w/ Metadata", "quarto render document.qmd -M echo:false\n" + "quarto render document.qmd -M code-fold:true").example("Render to Stdout", "quarto render document.qmd --output -").action(async (options, input, args)=>{
    args = args || [];
    delete options.clean;
    if (Object.keys(options).length === 1) {
        const option = Object.keys(options)[0];
        const optionArg = option.replaceAll(/([A-Z])/g, (_match, p1)=>`-${p1.toLowerCase()}`);
        if (input) {
            args.unshift(input);
            input = undefined;
        }
        args.unshift("--" + optionArg);
        delete options[option];
    }
    if (args.length > 0 && args[0] === "--help") {
        renderCommand.showHelp();
        return;
    }
    input = input || ".";
    const inputs = [
        input
    ];
    const firstPandocArg = args.findIndex((arg)=>arg.startsWith("-"));
    if (firstPandocArg !== -1) {
        inputs.push(...args.slice(0, firstPandocArg));
        args = args.slice(firstPandocArg);
    }
    const normalizedArgs = [];
    for (const arg of args){
        const equalSignIndex = arg.indexOf("=");
        if (equalSignIndex > 0 && arg.startsWith("-")) {
            normalizedArgs.push(arg.slice(0, equalSignIndex));
            normalizedArgs.push(arg.slice(equalSignIndex + 1));
        } else {
            normalizedArgs.push(arg);
        }
    }
    args = normalizedArgs;
    const flags = await parseRenderFlags(args);
    args = fixupPandocArgs(args, flags);
    let renderResult;
    let renderResultInput;
    for (const input1 of inputs){
        for (const walk of expandGlobSync(input1)){
            const services = renderServices();
            try {
                renderResultInput = relative2(Deno.cwd(), walk.path) || ".";
                renderResult = await render(renderResultInput, {
                    services,
                    flags,
                    pandocArgs: args,
                    useFreezer: flags.useFreezer === true,
                    setProjectDir: true
                });
                if (renderResult.error) {
                    throw renderResult.error;
                }
            } finally{
                services.cleanup();
            }
        }
    }
    if (renderResult && renderResultInput) {
        if (!options.flags?.quiet && options.flags?.output !== kStdOut) {
            const finalOutput = renderResultFinalOutput(renderResult, Deno.statSync(renderResultInput).isDirectory ? renderResultInput : dirname2(renderResultInput));
            if (finalOutput) {
                info("Output created: " + finalOutput + "\n");
            }
        }
    } else {
        throw new Error(`No valid input files passed to render`);
    }
});
async function serve(options) {
    const engine = await fileExecutionEngine(options.input);
    if (engine?.run) {
        const target = await engine.target(options.input, options.quiet);
        if (target) {
            const services = renderServices();
            try {
                if (options.render) {
                    const result1 = await render(target.input, {
                        services
                    });
                    if (result1.error) {
                        throw result1.error;
                    }
                }
                await engine.run({
                    ...options,
                    input: target.input
                });
                return processSuccessResult();
            } finally{
                services.cleanup();
            }
        }
    }
    return Promise.reject(new Error("Unable to run computations for input file"));
}
const serveCommand = new Command().name("serve").arguments("[input:string]").option("--no-render", "Do not render the document before serving.").option("-p, --port [port:number]", "The TCP port that the application should listen on.").option("--host [host:string]", "Hostname to bind to (defaults to 127.0.0.1)").description("Serve a Shiny interactive document.\n\nBy default, the document will be rendered first and then served. " + "If you have previously rendered the document, pass --no-render to skip the rendering step.").example("Serve an interactive Shiny document", "quarto serve dashboard.qmd").example("Serve a document without rendering", "quarto serve dashboard.qmd --no-render").action(async (options, input)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    if (!input) {
        error("No input passed to serve.\n" + "If you are attempting to preview a website or book use the " + bold1("quarto preview") + " command instead.");
        Deno.exit(1);
    }
    const context = await projectContext(input);
    const result1 = await serve({
        input,
        render: options.render,
        port: options.port,
        host: options.host,
        projectDir: context?.dir,
        tempDir: Deno.makeTempDirSync()
    });
    if (!result1.success) {
        Deno.exit(result1.code);
    }
});
async function jupyterCreateVenv(dir, packages) {
    const kEnvDir = "env";
    info(`Creating virtual environment at ${bold1(kEnvDir + "/")}:`);
    const caps = await jupyterCapabilitiesNoConda();
    if (caps) {
        const executable = caps.pyLauncher ? "py" : caps.executable;
        const result1 = await execProcess({
            cmd: [
                executable,
                "-m",
                "venv",
                kEnvDir
            ],
            cwd: dir
        });
        if (!result1.success) {
            throw new Error();
        }
        const pip3 = join3(dir, kEnvDir, isWindows() ? "Scripts\\pip.exe" : "bin/pip3");
        packages = uniq1([
            "jupyter"
        ].concat(packages || []));
        const installResult = await execProcess({
            cmd: [
                pip3,
                "install",
                ...packages
            ],
            cwd: dir
        });
        if (!installResult.success) {
            throw new Error();
        }
    } else {
        throw new Error("Unable to create venv (Non-conda Python 3 not found)");
    }
}
async function jupyterCreateCondaenv(dir, packages) {
    const kEnvDir = "env";
    info(`Creating conda environment at ${bold1(kEnvDir + "/")}:`);
    const conda = await which("conda");
    if (conda) {
        info(`Using conda at ${conda}`);
        packages = uniq1([
            "jupyter"
        ].concat(packages || []));
        const installResult = await execProcess({
            cmd: [
                "conda",
                "create",
                "--yes",
                "--prefix",
                "env",
                ...packages
            ],
            cwd: dir
        });
        if (!installResult.success) {
            throw new Error();
        }
    } else {
        throw new Error("Unable to create condaenv (conda not found)");
    }
}
async function projectCreate(options) {
    options = await readOptions(options);
    const engine = executionEngine(options.engine);
    if (!engine) {
        throw Error(`Invalid execution engine: ${options.engine}`);
    }
    ensureDirSync(options.dir);
    options.dir = Deno.realPathSync(options.dir);
    if (!options.quiet) {
        info(`Creating project at `, {
            newline: false
        });
        info(`${options.dir}`, {
            bold: true,
            newline: false
        });
        info(":");
    }
    if (options.type === "site") {
        options.type = kWebsite;
    }
    const projType = projectType(options.type);
    const projCreate = projType.create(options.title, options.template);
    const quartoConfig = renderEjs(projCreate.configTemplate, {
        title: options.title,
        editor: options.editor,
        ext: engine.defaultExt
    }, false);
    Deno.writeTextFileSync(join3(options.dir, "_quarto.yml"), quartoConfig);
    if (!options.quiet) {
        info("- Created _quarto.yml", {
            indent: 2
        });
    }
    if (await ensureGitignore(options.dir, !!options.venv || !!options.condaenv) && !options.quiet) {
        info("- Created .gitignore", {
            indent: 2
        });
    }
    if (options.scaffold && projCreate.scaffold) {
        for (const scaffold of projCreate.scaffold(options.engine, options.kernel, options.envPackages)){
            const md = projectMarkdownFile(options.dir, scaffold.name, scaffold.content, engine, options.kernel, scaffold.title, scaffold.noEngineContent, scaffold.yaml, scaffold.subdirectory, scaffold.supporting);
            if (md && !options.quiet) {
                info("- Created " + md, {
                    indent: 2
                });
            }
        }
    }
    if (projCreate.supporting) {
        for (const supporting of projCreate.supporting){
            let src;
            let dest;
            let displayName;
            if (typeof supporting === "string") {
                src = join3(projCreate.resourceDir, supporting);
                dest = join3(options.dir, supporting);
                displayName = supporting;
            } else {
                src = join3(projCreate.resourceDir, supporting.from);
                dest = join3(options.dir, supporting.to);
                displayName = supporting.to;
            }
            ensureDirSync(dirname2(dest));
            copyTo(src, dest);
            if (!options.quiet) {
                info("- Created " + displayName, {
                    indent: 2
                });
            }
        }
    }
    if (options.venv) {
        await jupyterCreateVenv(options.dir, options.envPackages);
    } else if (options.condaenv) {
        await jupyterCreateCondaenv(options.dir, options.envPackages);
    }
}
async function readOptions(options) {
    options = cloneDeep1(options);
    if (options.engine === "jupyter") {
        const kernel = options.kernel || "python3";
        const kernelspec = await jupyterKernelspec(kernel);
        if (!kernelspec) {
            throw new Error(`Specified jupyter kernel ('${kernel}') not found.`);
        }
    } else {
        if (options.venv) {
            throw new Error("You can only use --with-venv with the jupyter engine");
        }
    }
    options.title = options.title || basename2(options.dir);
    if (projectConfigFile(options.dir)) {
        throw new Error(`The directory '${options.dir}' already contains a quarto project`);
    }
    return options;
}
function projectMarkdownFile(dir, name, content, engine, kernel, title, noEngineContent, yaml, subdirectory, supporting) {
    const lines = [
        "---"
    ];
    if (title) {
        lines.push(`title: "${title}"`);
    }
    if (yaml) {
        lines.push(yaml);
    }
    if (!noEngineContent) {
        lines.push(...engine.defaultYaml(kernel));
    }
    lines.push("---", "");
    if (lines.length === 3) {
        lines.splice(0, lines.length);
    }
    lines.push(content);
    if (!noEngineContent) {
        const engineContent = engine.defaultContent(kernel);
        if (engineContent.length > 0) {
            lines.push("");
            lines.push(...engineContent);
        }
    }
    name = name + engine.defaultExt;
    const ensureSubDir = (dir, name, subdirectory)=>{
        if (subdirectory) {
            const newDir = join3(dir, subdirectory);
            ensureDirSync(newDir);
            return join3(newDir, name);
        } else {
            return join3(dir, name);
        }
    };
    const path = ensureSubDir(dir, name, subdirectory);
    if (!existsSync(path)) {
        Deno.writeTextFileSync(path, lines.join("\n") + "\n");
        supporting?.forEach((from)=>{
            const name = basename2(from);
            const target = join3(dirname2(path), name);
            copyTo(from, target);
        });
        return subdirectory ? join3(subdirectory, name) : name;
    } else {
        return undefined;
    }
}
function removeChapterNumber(item) {
    const numberSpan = item.querySelector(".chapter-number");
    const titleSpan = item.querySelector(".chapter-title");
    if (numberSpan && titleSpan) {
        item.innerHTML = "";
        item.appendChild(titleSpan);
    }
}
const kGoogleAnalytics = "google-analytics";
const kTrackingId = "tracking-id";
const kStorage = "storage";
const kAnonymizeIp = "anonymize-ip";
const kVersion1 = "version";
const kCookieConsent = "cookie-consent";
const kCookieConsentType = "type";
const kCookieConsentStyle = "style";
const kCookieConsentPalette = "palette";
const kCookieConsentPolicyUrl = "policy-url";
const kCookiePrefsText = "prefs-text";
function scriptTagWithConsent(consentRequired, consentlevel, contents, src) {
    const srcAttr = src ? ` src="${src}"` : "";
    if (consentRequired) {
        return `
<script type="text/plain" cookie-consent="${consentlevel}"${srcAttr}>
${contents}
</script>`;
    } else {
        return `
<script type="text/javascript"${srcAttr}>
${contents}
</script>`;
    }
}
function websiteAnalyticsScriptFile(project, temp) {
    const siteMeta = project.config?.[kWebsite];
    let gaConfig = undefined;
    if (siteMeta) {
        const siteGa = siteMeta[kGoogleAnalytics];
        if (typeof siteGa === "object") {
            const siteGaMeta = siteGa;
            const trackingId = siteGaMeta[kTrackingId];
            const storage = siteGaMeta[kStorage];
            const anonymizedIp = siteGaMeta[kAnonymizeIp];
            const version = siteGaMeta[kVersion1];
            gaConfig = googleAnalyticsConfig(project, trackingId, storage, anonymizedIp, version);
        } else if (siteGa && typeof siteGa === "string") {
            gaConfig = googleAnalyticsConfig(project, siteGa);
        }
    }
    if (gaConfig) {
        const script = analyticsScript(gaConfig);
        if (script) {
            return scriptFile(script, temp);
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function cookieConsentDependencies(project, temp) {
    const siteMeta = project.config?.[kWebsite];
    if (siteMeta) {
        const title = siteMeta[kTitle] || "";
        let configuration = undefined;
        let changePrefsText = undefined;
        const consent = siteMeta[kCookieConsent];
        if (typeof consent === "object") {
            const cookieMeta = consent;
            configuration = cookieConsentConfiguration(title, cookieMeta[kCookieConsentType], cookieMeta[kCookieConsentStyle], cookieMeta[kCookieConsentPalette], cookieMeta[kCookieConsentPolicyUrl]);
            changePrefsText = cookieMeta[kCookiePrefsText];
        } else if (consent) {
            configuration = cookieConsentConfiguration(title);
        }
        if (configuration) {
            const consentResourcesDir = join3(projectTypeResourcePath("website"), "cookie-consent");
            const name = "cookie-consent.js";
            const path = join3(consentResourcesDir, name);
            const cssName = "cookie-consent.css";
            const cssPath = join3(consentResourcesDir, cssName);
            return {
                scriptFile: scriptFile(cookieConsentScript(configuration), temp),
                dependency: {
                    name: "cookie-consent",
                    scripts: [
                        {
                            name,
                            path
                        }
                    ],
                    stylesheets: [
                        {
                            name: cssName,
                            path: cssPath
                        }
                    ]
                },
                htmlPostProcessor: (doc)=>{
                    const anchorId = "open_preferences_center";
                    const prefsAnchor = doc.getElementById(anchorId);
                    if (!prefsAnchor) {
                        const footer = doc.querySelector("div.nav-footer .nav-footer-center");
                        if (footer) {
                            const anchor = doc.createElement("a");
                            anchor.setAttribute("href", "#");
                            anchor.setAttribute("id", anchorId);
                            anchor.innerHTML = changePrefsText || "Cookie Preferences";
                            const anchorContainer = doc.createElement("div");
                            anchorContainer.setAttribute("class", "cookie-consent-footer");
                            anchorContainer.appendChild(anchor);
                            footer.appendChild(anchorContainer);
                        }
                    }
                    return Promise.resolve(kHtmlEmptyPostProcessResult);
                }
            };
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function cookieConsentEnabled(project) {
    const siteMeta = project.config?.[kWebsite];
    if (siteMeta) {
        return !!siteMeta[kCookieConsent];
    } else {
        return false;
    }
}
function cookieConsentConfiguration(_siteName, type, style, palette, policyUrl) {
    return {
        siteName: "",
        type: type || "implied",
        style: style || "simple",
        palette: palette || "light",
        policyUrl
    };
}
function googleAnalyticsConfig(project, trackingId, storage, anoymizeIp, version) {
    return {
        trackingId,
        consent: cookieConsentEnabled(project),
        storage: storage || "cookies",
        anonymizeIp: anoymizeIp === undefined ? true : !!anoymizeIp,
        version: version || (trackingId.startsWith("UA-") ? 3 : 4)
    };
}
function analyticsScript(config) {
    if (config.version === 3) {
        return ga3Script(config);
    } else if (config.version === 4) {
        return ga4Script(config);
    } else {
        return undefined;
    }
}
function ga3Script(config) {
    const scripts = [];
    scripts.push(`
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');`);
    if (config.storage === "none") {
        scripts.push(`ga('create', '${config.trackingId}', { 'storage': 'none' });`);
    } else {
        scripts.push(`ga('create', '${config.trackingId}', 'auto');`);
    }
    scripts.push(`
ga('send', {
  hitType: 'pageview',
  'anonymizeIp': ${config.anonymizeIp},
});`);
    return scriptTagWithConsent(!!config.consent, "tracking", scripts.join("\n"));
}
function ga4Script(config) {
    const scripts = [];
    scripts.push(`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());`);
    if (config.storage === "none") {
        scripts.push(` 
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'analytics_storage': 'denied'
  });`);
    }
    scripts.push(`gtag('config', '${config.trackingId}', { 'anonymize_ip': ${config.anonymizeIp}});`);
    return [
        `<script async src="https://www.googletagmanager.com/gtag/js?id=${config.trackingId}"></script>`,
        scriptTagWithConsent(!!config.consent, "tracking", scripts.join("\n")), 
    ].join("\n");
}
function cookieConsentScript(config) {
    const consentLevels = config.type === "implied" ? `["strictly-necessary","functionality","tracking","targeting"]` : `["strictly-necessary"]`;
    const privacyJs = config.policyUrl !== undefined ? `,\n"website_privacy_policy_url":"${config.policyUrl}"` : "";
    return `
<script type="text/javascript" charset="UTF-8">
document.addEventListener('DOMContentLoaded', function () {
cookieconsent.run({
  "notice_banner_type":"${config.style}",
  "consent_type":"${config.type}",
  "palette":"${config.palette === "dark" ? "dark" : "light"}",
  "language":"en",
  "page_load_consent_levels":${consentLevels},
  "notice_banner_reject_button_hide":false,
  "preferences_center_close_button_hide":false,
  "website_name":"${config.siteName}"${privacyJs}
  });
});
</script> 
  `;
}
function scriptFile(script, temp) {
    const gaScriptFile = temp.createFile({
        suffix: "-lytics.js"
    });
    Deno.writeTextFileSync(gaScriptFile, script);
    return gaScriptFile;
}
function computePageTitle(format, extras) {
    const meta = extras?.metadata || {};
    const pageTitle = meta[kPageTitle] || format.metadata[kPageTitle];
    const titlePrefix = extras?.pandoc?.[kTitlePrefix] || format.metadata[kWebsite]?.[kTitle];
    const title = format.metadata[kTitle];
    if (pageTitle !== undefined) {
        return pageTitle;
    } else if (titlePrefix !== undefined) {
        if (titlePrefix === title) {
            return title;
        } else if (title !== undefined) {
            return titlePrefix + " - " + title;
        } else {
            return undefined;
        }
    } else {
        return title;
    }
}
function inputFileHref(href) {
    const [hrefDir, hrefStem] = dirAndStem(href);
    const htmlHref = "/" + join3(hrefDir, `${hrefStem}.html`);
    return pathWithForwardSlashes(htmlHref);
}
function websiteNavigationConfig(project) {
    let navbar = websiteConfigMetadata(kSiteNavbar, project.config);
    if (typeof navbar !== "object") {
        navbar = undefined;
    }
    const sidebar = websiteConfig(kSiteSidebar, project.config);
    const sidebars = Array.isArray(sidebar) ? sidebar : typeof sidebar == "object" ? [
        sidebar
    ] : undefined;
    if (sidebars && sidebars[0]) {
        if (sidebars[0].style === undefined) {
            sidebars[0].style = "floating";
        }
        if (sidebars[0].contents === undefined) {
            sidebars[0].contents = [];
        }
        if (sidebars[0].tools === undefined) {
            sidebars[0].tools = [];
        }
        for (const sb of sidebars){
            if (sb.contents && !Array.isArray(sb.contents)) {
                if (typeof sb.contents === "string") {
                    if (sb.contents === "auto") {
                        sb.contents = [
                            {
                                auto: true
                            }
                        ];
                    } else {
                        sb.contents = [
                            {
                                auto: sb.contents
                            }
                        ];
                    }
                } else {
                    sb.contents = [
                        sb.contents
                    ];
                }
            }
        }
    }
    if (sidebars && sidebars.length > 1) {
        const sidebarOptions = __VIRTUAL_FILE107(sidebars[0]);
        delete sidebarOptions.id;
        delete sidebarOptions.title;
        sidebarOptions.contents.splice(0, sidebarOptions.contents.length);
        for(let i1 = 1; i1 < sidebars.length; i1++){
            sidebars[i1] = {
                ...sidebarOptions,
                ...sidebars[i1]
            };
        }
    }
    const pageNavigation = websiteConfigBoolean(kSitePageNavigation, false, project.config);
    const footerValue = (value)=>{
        if (typeof value === "string") {
            return value;
        } else if (Array.isArray(value)) {
            return value;
        } else {
            return undefined;
        }
    };
    const footer = {};
    const footerConfig = websiteConfig(kPageFooter, project.config);
    if (typeof footerConfig === "string") {
        footer.center = footerConfig;
    } else if (!Array.isArray(footerConfig)) {
        footer.left = footerValue(footerConfig?.left);
        footer.center = footerValue(footerConfig?.center);
        footer.right = footerValue(footerConfig?.right);
    }
    if (footer.center === undefined && cookieConsentEnabled(project)) {
        footer.center = " ";
    }
    const pageMargin = {};
    const headerVal = websiteConfigArray(kMarginHeader, project.config);
    if (headerVal) {
        pageMargin.header = headerVal;
    }
    const footerVal = websiteConfigArray(kMarginFooter, project.config);
    if (footerVal) {
        pageMargin.footer = footerVal;
    }
    const bodyDecorators = {};
    const bodyHeaderVal = websiteConfigArray(kBodyHeader, project.config);
    if (bodyHeaderVal) {
        bodyDecorators.header = bodyHeaderVal;
    }
    const bodyFooterVal = websiteConfigArray(kBodyFooter, project.config);
    if (bodyFooterVal) {
        bodyDecorators.footer = bodyFooterVal;
    }
    return {
        navbar,
        sidebars,
        pageNavigation,
        footer,
        pageMargin,
        bodyDecorators
    };
}
function flattenItems(sidebarItems, includeItem) {
    const items = [];
    const flatten = (sidebarItem)=>{
        if (includeItem(sidebarItem)) {
            items.push(sidebarItem);
        }
        if (sidebarItem.contents) {
            items.push(...flattenItems(sidebarItem.contents, includeItem));
        }
    };
    sidebarItems.forEach(flatten);
    return items;
}
const kSearch = "search";
const kType1 = "type";
const kLocation = "location";
const kCopyButton = "copy-button";
const kCollapseAfter = "collapse-after";
const kPanelPlacement = "panel-placement";
const kLimit = "limit";
const kAlgolia = "algolia";
const kSearchOnlyApiKey = "search-only-api-key";
const kSearchApplicationId = "application-id";
const kSearchParams = "params";
const kSearchIndexName = "index-name";
const kIndexFields = "index-fields";
const kAnalyticsEvents = "analytics-events";
const kShowLogo = "show-logo";
async function updateSearchIndex(context, outputFiles, incremental) {
    const outputDir = projectOutputDir(context);
    const searchJsonPath = join3(outputDir, "search.json");
    const searchJson = existsSync(searchJsonPath) ? Deno.readTextFileSync(searchJsonPath) : undefined;
    const searchDocs = new Array();
    if (incremental && searchJson) {
        const existingSearchJson = JSON.parse(searchJson);
        searchDocs.push(...existingSearchJson);
    }
    await initDenoDom();
    const updatedSearchDocs = outputFiles.reduce((searchDocs, outputFile)=>{
        const file = outputFile.file;
        const href = pathWithForwardSlashes(relative2(outputDir, file));
        if (outputFile.format.metadata[kSearch] === false || outputFile.format.metadata[kDraft]) {
            searchDocs = searchDocs.filter((doc)=>{
                return doc.href !== href && !doc.href.startsWith(href + "#");
            });
            return searchDocs;
        }
        if (!isHtmlFileOutput(outputFile.format.pandoc)) {
            return searchDocs;
        }
        const updateDoc = (doc)=>{
            const idx = searchDocs.findIndex((d)=>d.href === doc.href);
            if (idx !== -1) {
                searchDocs[idx] = doc;
            } else {
                searchDocs.push(doc);
            }
        };
        const contents = Deno.readTextFileSync(file);
        const doc = new DOMParser().parseFromString(contents, "text/html");
        const titleEl = doc.querySelector("h1.title");
        const title = titleEl ? titleEl.textContent : websiteTitle(context.config) || "";
        const header = doc.getElementById("title-block-header");
        if (header) {
            header.remove();
        }
        const toc = doc.querySelector(`nav[role="doc-toc"]`);
        if (toc) {
            toc.remove();
        }
        [
            "script",
            "style"
        ].forEach((tag)=>{
            const els = doc.querySelectorAll(tag);
            if (els) {
                els.forEach((el)=>el.remove());
            }
        });
        const sections = doc.querySelectorAll("section.level2");
        if (sections.length > 0) {
            const mainSelector = projectIsBook(context) ? "section.level1" : "main.content";
            const mainEl = doc.querySelector(mainSelector);
            const firstEl = mainEl?.firstElementChild;
            const pageText = [];
            if (firstEl) {
                const headings = firstEl.querySelectorAll("h1, h2, h3, h4, h5, h6");
                headings.forEach((heading)=>heading.remove());
                const trimmed = firstEl.textContent.trim();
                if (trimmed) {
                    pageText.push(trimmed);
                }
                firstEl.remove();
            }
            const pararaphNodes = doc.querySelectorAll(`${mainSelector} > p`);
            for (const paragraphNode of pararaphNodes){
                const text = paragraphNode.textContent.trim();
                if (text) {
                    pageText.push(text);
                }
                paragraphNode.remove();
            }
            if (pageText.length > 0) {
                updateDoc({
                    objectID: href,
                    href: href,
                    title,
                    section: "",
                    text: pageText.join("\n")
                });
            }
            for(let i1 = 0; i1 < sections.length; i1++){
                const section = sections[i1];
                const h2 = section.querySelector("h2");
                if (h2 && section.id) {
                    const sectionTitle = h2.textContent;
                    const hrefWithAnchor = `${href}#${section.id}`;
                    const sectionText = section.textContent.trim();
                    h2.remove();
                    if (sectionText) {
                        updateDoc({
                            objectID: hrefWithAnchor,
                            href: hrefWithAnchor,
                            title,
                            section: sectionTitle,
                            text: sectionText
                        });
                    }
                }
            }
        } else {
            const main = doc.querySelector("main");
            if (main) {
                const mainText = main.textContent.trim();
                if (mainText) {
                    updateDoc({
                        objectID: href,
                        href,
                        title,
                        section: "",
                        text: mainText
                    });
                }
            }
        }
        return searchDocs;
    }, searchDocs);
    if (updatedSearchDocs.length > 0) {
        const updatedSearchJson = JSON.stringify(updatedSearchDocs, undefined, 2);
        if (searchJson !== updatedSearchJson) {
            Deno.writeTextFileSync(searchJsonPath, updatedSearchJson);
        }
    }
}
function searchOptions(project) {
    const searchMetadata = websiteConfigMetadata(kSearch, project.config);
    const location = searchInputLocation(project);
    if (searchMetadata) {
        const collapseMatches = typeof searchMetadata[kCollapseAfter] === "number" ? searchMetadata[kCollapseAfter] : searchMetadata[kCollapseAfter] !== false ? 3 : false;
        return {
            [kLocation]: location,
            [kCopyButton]: searchMetadata[kCopyButton] === true,
            [kCollapseAfter]: collapseMatches,
            [kPanelPlacement]: location === "navbar" ? "end" : "start",
            [kType1]: searchType(searchMetadata[kType1], location),
            [kLimit]: searchInputLimit(searchMetadata),
            [kAlgolia]: algoliaOptions(searchMetadata, project)
        };
    } else {
        const searchRaw = websiteConfig(kSearch, project.config);
        if (searchRaw === undefined || !!searchRaw) {
            return {
                [kLocation]: location,
                [kCopyButton]: false,
                [kCollapseAfter]: 3,
                [kPanelPlacement]: location === "navbar" ? "end" : "start",
                [kType1]: searchType(undefined, location),
                [kLimit]: searchInputLimit(undefined)
            };
        }
    }
}
function searchInputLimit(searchConfig) {
    if (searchConfig && typeof searchConfig === "object") {
        const limit = searchConfig[kLimit];
        if (typeof limit === "number") {
            return limit;
        }
    }
    return 20;
}
function searchType(userType, location) {
    if (userType && typeof userType === "string") {
        switch(userType){
            case "overlay":
                return "overlay";
            default:
            case "textbox":
                return "textbox";
        }
    } else {
        if (location === "sidebar") {
            return "textbox";
        } else {
            return "overlay";
        }
    }
}
function algoliaOptions(searchConfig, project) {
    const algoliaRaw = searchConfig[kAlgolia];
    if (algoliaRaw && typeof algoliaRaw === "object") {
        const algoliaObj = algoliaRaw;
        const applicationId = algoliaObj[kSearchApplicationId];
        const apiKey = algoliaObj[kSearchOnlyApiKey];
        const indexName = algoliaObj[kSearchIndexName];
        const params = algoliaObj[kSearchParams];
        const indexKeys = algoliaObj[kIndexFields];
        const analytics = !!algoliaObj[kAnalyticsEvents];
        const showLogo = !!algoliaObj[kShowLogo];
        return {
            [kSearchApplicationId]: applicationId,
            [kSearchOnlyApiKey]: apiKey,
            [kSearchIndexName]: indexName,
            [kSearchParams]: params,
            [kIndexFields]: indexKeys,
            [kAnalyticsEvents]: analytics,
            [kShowLogo]: showLogo,
            libDir: project?.config?.project[kProjectLibDir]
        };
    } else {
        return undefined;
    }
}
function searchInputLocation(project) {
    const searchConfig = websiteConfigMetadata(kSearch, project.config);
    if (searchConfig && searchConfig[kLocation]) {
        switch(searchConfig[kLocation]){
            case "sidebar":
                return "sidebar";
            case "navbar":
            default:
                return "navbar";
        }
    } else {
        const { navbar  } = websiteNavigationConfig(project);
        if (navbar) {
            return "navbar";
        } else {
            return "sidebar";
        }
    }
}
const kDependencyName = "quarto-search";
function websiteSearchSassBundle() {
    const scssPath = searchDependency("quarto-search.scss").path;
    const layer = sassLayer(scssPath);
    return {
        dependency: kBootstrapDependencyName,
        key: scssPath,
        quarto: {
            name: "quarto-search.css",
            ...layer
        }
    };
}
function websiteSearchIncludeInHeader(project, format, temp) {
    const websiteSearchScript = temp.createFile({
        suffix: "-search.html"
    });
    const options = searchOptions(project) || {};
    options[kLanguageDefaults] = {};
    Object.keys(format.language).forEach((key)=>{
        if (key.startsWith("search-")) {
            options[kLanguageDefaults][key] = format.language[key];
        }
    });
    const searchOptionsJson = JSON.stringify(options, null, 2);
    const searchOptionsScript = `<script id="quarto-search-options" type="application/json">${searchOptionsJson}</script>`;
    const includes = [
        searchOptionsScript
    ];
    if (options[kAlgolia]) {
        includes.push(kAlogioSearchApiScript);
        if (options[kAlgolia]?.[kAnalyticsEvents]) {
            const cookieConsent = cookieConsentEnabled(project);
            includes.push(algoliaSearchInsightsScript(cookieConsent));
            includes.push(autocompleteInsightsPluginScript(cookieConsent));
        }
    }
    Deno.writeTextFileSync(websiteSearchScript, includes.join("\n"));
    return websiteSearchScript;
}
function websiteSearchDependency(project, source) {
    const searchDependencies = [];
    const resources = [];
    const options = searchOptions(project);
    if (options) {
        const sourceRelative = relative2(project.dir, source);
        const offset = projectOffset(project, source);
        const href = inputFileHref(sourceRelative);
        const scripts = [
            searchDependency("autocomplete.umd.js"),
            searchDependency("fuse.min.js"),
            searchDependency("quarto-search.js"), 
        ];
        const algoliaOpts = options[kAlgolia];
        if (algoliaOpts) {
            if (algoliaOpts[kShowLogo]) {
                resources.push(searchDependency("search-by-algolia.svg"));
            }
            if (algoliaOpts[kSearchApplicationId] && algoliaOpts[kSearchOnlyApiKey] && algoliaOpts[kSearchIndexName]) {
                scripts.push(searchDependency("autocomplete-preset-algolia.umd.js"));
            } else {
                warning("Algolia search is misconfigured. Please ensure that you provide an application-id, search-only-api-key, and index-name.");
            }
            const limit = options[kLimit];
            if (limit) {
                if (typeof limit === "number" && limit > 20) {
                    warning("Algolia Insights is limited to 20 objectIds when recording the `Items Viewed` event. Please reduce the limit for your search to avoid a truncated event.");
                }
            }
        }
        searchDependencies.push(clipboardDependency());
        searchDependencies.push({
            name: kDependencyName,
            meta: {
                "quarto:offset": href === "/404.html" ? websitePath(project.config) : offset + "/"
            },
            stylesheets: [],
            scripts,
            resources
        });
    }
    return searchDependencies;
}
function searchDependency(resource) {
    return {
        name: basename2(resource),
        path: resourcePath(`projects/website/search/${resource}`)
    };
}
function autocompleteInsightsPluginScript(cookieConsent) {
    return scriptTagWithConsent(cookieConsent, "tracking", "", "https://cdn.jsdelivr.net/npm/@algolia/autocomplete-plugin-algolia-insights");
}
function algoliaSearchInsightsScript(cookieConsent) {
    return scriptTagWithConsent(cookieConsent, "tracking", `var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights/dist/search-insights.iife.min.js";
!function(e,a,t,n,s,i,c){e.AlgoliaAnalyticsObject=s,e[s]=e[s]||function(){
(e[s].queue=e[s].queue||[]).push(arguments)},i=a.createElement(t),c=a.getElementsByTagName(t)[0],
i.async=1,i.src=n,c.parentNode.insertBefore(i,c)
}(window,document,"script",ALGOLIA_INSIGHTS_SRC,"aa");`);
}
const kAlogioSearchApiScript = `<script src="https://cdn.jsdelivr.net/npm/algoliasearch@4.5.1/dist/algoliasearch-lite.umd.js"></script>
`;
const kSidebarTitleId = "quarto-int-sidebar-title";
const kNavbarTitleId = "quarto-int-navbar-title";
const kNavNextId = "quarto-int-next";
const kNavPrevId = "quarto-int-prev";
const kSidebarIdPrefix = "quarto-int-sidebar:";
const kNavbarIdPrefix = "quarto-int-navbar:";
function navigationMarkdownHandlers(context) {
    return [
        sidebarTitleHandler(context),
        navbarTitleHandler(context),
        nextPageTitleHandler(context),
        prevPageTitleHandler(context),
        sidebarContentsHandler(context),
        sidebarHeaderFooterHandler(context),
        navbarContentsHandler(context),
        footerHandler(context),
        marginHeaderFooterHandler(context),
        bodyHeaderFooterHandler(context), 
    ];
}
function title(format) {
    const site = format.metadata[kWebsite];
    if (site && site[kTitle] && typeof site[kTitle] !== "object") {
        return String(site[kTitle]);
    } else if (format.metadata[kTitle] && typeof format.metadata[kTitle] !== "object") {
        return String(format.metadata[kTitle]);
    }
}
const sidebarTitleHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.sidebar?.title) {
                return {
                    inlines: {
                        [kSidebarTitleId]: context.sidebar.title
                    }
                };
            } else {
                const mainTitle = title(context.format);
                if (mainTitle) {
                    return {
                        inlines: {
                            [kSidebarTitleId]: mainTitle
                        }
                    };
                }
            }
        },
        processRendered (rendered, doc) {
            const renderedEl = rendered[kSidebarTitleId];
            if (renderedEl) {
                const sidebarTitleEl = doc.querySelector("#quarto-sidebar .sidebar-title a") || doc.querySelector("#quarto-sidebar .sidebar-title");
                if (sidebarTitleEl && sidebarTitleEl.innerText) {
                    sidebarTitleEl.innerHTML = renderedEl.innerHTML;
                }
            }
        }
    };
};
const navbarTitleHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.navigation?.navbar?.title) {
                return {
                    inlines: {
                        [kNavbarTitleId]: context.navigation.navbar.title
                    }
                };
            } else {
                const mainTitle = title(context.format);
                if (mainTitle) {
                    return {
                        inlines: {
                            [kNavbarTitleId]: mainTitle
                        }
                    };
                }
            }
        },
        processRendered (rendered, doc) {
            const renderedEl = rendered[kNavbarTitleId];
            if (renderedEl) {
                const navbarTitleEl = doc.querySelector("#quarto-header .navbar-brand .navbar-title");
                if (navbarTitleEl && navbarTitleEl.innerText) {
                    navbarTitleEl.innerHTML = renderedEl.innerHTML;
                }
            }
        }
    };
};
const nextPageTitleHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.pageNavigation.nextPage?.text) {
                return {
                    inlines: {
                        [kNavNextId]: context.pageNavigation.nextPage.text
                    }
                };
            }
        },
        processRendered (rendered, doc) {
            const renderedEl = rendered[kNavNextId];
            if (renderedEl) {
                const el = doc.querySelector(`.page-navigation .nav-page-next a .nav-page-text`);
                if (el) {
                    el.innerHTML = renderedEl.innerHTML;
                }
            }
        }
    };
};
const prevPageTitleHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.pageNavigation.prevPage?.text) {
                return {
                    inlines: {
                        [kNavPrevId]: context.pageNavigation.prevPage.text
                    }
                };
            }
        },
        processRendered (rendered, doc) {
            const renderedEl = rendered[kNavPrevId];
            if (renderedEl) {
                const el = doc.querySelector(`.page-navigation .nav-page-previous a .nav-page-text`);
                if (el) {
                    el.innerHTML = renderedEl.innerHTML;
                }
            }
        }
    };
};
const sidebarContentsHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.sidebar?.contents) {
                const sidebarItems = flattenItems(context.sidebar?.contents, (_)=>{
                    return true;
                });
                const markdown = {};
                sidebarItems.forEach((item)=>{
                    if (item.text) {
                        if (item.sectionId) {
                            markdown[`${kSidebarIdPrefix}${item.sectionId}`] = item.text;
                        } else {
                            markdown[`${kSidebarIdPrefix}${item.href}`] = item.text;
                        }
                    }
                });
                return {
                    inlines: markdown
                };
            }
        },
        processRendered (rendered, doc) {
            const sidebarItemEls = doc.querySelectorAll(".sidebar-item:not(.sidebar-item-section) .sidebar-item-text");
            for(let i1 = 0; i1 < sidebarItemEls.length; i1++){
                const link = sidebarItemEls[i1];
                const href = link.getAttribute("href");
                const sidebarText = rendered[`${kSidebarIdPrefix}${href}`];
                if (sidebarText) {
                    link.innerHTML = sidebarText.innerHTML;
                }
            }
            const sidebarSectionEls = doc.querySelectorAll(".sidebar-item.sidebar-item-section .sidebar-item-text");
            for(let i11 = 0; i11 < sidebarSectionEls.length; i11++){
                const link1 = sidebarSectionEls[i11];
                const target = link1.getAttribute("data-bs-target");
                if (target) {
                    const id = target.slice(1);
                    const sectionText = rendered[`${kSidebarIdPrefix}${id}`];
                    if (sectionText) {
                        link1.innerHTML = sectionText.innerHTML;
                    }
                }
            }
        }
    };
};
const navbarContentsHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.navigation?.navbar) {
                const markdown = {};
                const entries = [
                    ...context.navigation.navbar.left || [],
                    ...context.navigation.navbar.right || [], 
                ];
                const addEntry = (entry)=>{
                    if (typeof entry === "string") {
                        markdown[`${kNavbarIdPrefix}${entry.trim()}`] = entry;
                        return;
                    }
                    if (entry.text) {
                        markdown[`${kNavbarIdPrefix}${entry.text.trim()}`] = entry.text;
                    }
                    if (entry.menu?.entries) {
                        for (const childEntry of entry.menu){
                            addEntry(childEntry);
                        }
                    }
                };
                entries.forEach((entry)=>{
                    addEntry(entry);
                });
                return {
                    inlines: markdown
                };
            }
        },
        processRendered (rendered, doc) {
            const selectors = [
                ".navbar-nav .nav-item a.nav-link .menu-text",
                ".navbar-nav .dropdown-menu .dropdown-item .dropdown-text",
                ".navbar-nav .dropdown-menu .dropdown-header", 
            ];
            selectors.forEach((selector)=>{
                const navItemEls = doc.querySelectorAll(selector);
                for(let i1 = 0; i1 < navItemEls.length; i1++){
                    const link = navItemEls[i1];
                    const id = link.innerText.trim();
                    if (id) {
                        const renderedEl = rendered[`${kNavbarIdPrefix}${id}`];
                        if (renderedEl) {
                            link.innerHTML = renderedEl?.innerHTML;
                        }
                    }
                }
            });
        }
    };
};
const toHeaderFooterMarkdown = (source, prefix, content)=>{
    const markdown = content.map((con)=>{
        return expandMarkdown(source, prefix, con);
    });
    return markdown.reduce((previousValue, currentValue)=>{
        return `${previousValue}\n:::{.${prefix}-item}\n${currentValue}\n:::\n`;
    }, "");
};
const toHeaderFooterContainer = (doc, prefix, contentEl)=>{
    const containerEl = doc.createElement("div");
    containerEl.classList.add(`quarto-${prefix}`);
    for (const child of contentEl.children){
        containerEl.appendChild(child);
    }
    return containerEl;
};
const sidebarHeaderFooterHandler = (context)=>{
    const kSidebarHeader = "sidebar-header";
    const kSidebarFooter = "sidebar-footer";
    return {
        getUnrendered () {
            const result1 = {};
            if (context.sidebar?.header) {
                if (context.sidebar?.header && context.sidebar?.header.length > 0) {
                    result1[kSidebarHeader] = toHeaderFooterMarkdown(context.source, kSidebarHeader, context.sidebar.header);
                }
            }
            if (context.sidebar?.footer) {
                if (context.sidebar?.footer && context.sidebar?.footer.length > 0) {
                    result1[kSidebarFooter] = toHeaderFooterMarkdown(context.source, kSidebarFooter, context.sidebar.footer);
                }
            }
            return {
                blocks: result1
            };
        },
        processRendered (rendered, doc) {
            const sidebarEl = doc.getElementById("quarto-sidebar");
            if (sidebarEl) {
                const renderedHeaderEl = rendered[kSidebarHeader];
                if (renderedHeaderEl) {
                    const headerEl = toHeaderFooterContainer(doc, kSidebarHeader, renderedHeaderEl);
                    sidebarEl.insertBefore(headerEl, sidebarEl.firstChild);
                }
                const renderedFooterEl = rendered[kSidebarFooter];
                if (renderedFooterEl) {
                    const footerEl = toHeaderFooterContainer(doc, kSidebarFooter, renderedFooterEl);
                    sidebarEl.appendChild(footerEl);
                }
            }
        }
    };
};
const bodyHeaderFooterHandler = (context)=>{
    return {
        getUnrendered () {
            const result1 = {};
            if (context.bodyDecorators?.header) {
                result1[kBodyHeader] = toHeaderFooterMarkdown(context.source, kBodyHeader, context.bodyDecorators?.header);
            }
            if (context.bodyDecorators?.footer) {
                result1[kBodyFooter] = toHeaderFooterMarkdown(context.source, kBodyFooter, context.bodyDecorators?.footer);
            }
            return {
                blocks: result1
            };
        },
        processRendered (rendered, doc) {
            const mainEl = doc.querySelector("main");
            if (mainEl) {
                const renderedHeaderEl = rendered[kBodyHeader];
                if (renderedHeaderEl) {
                    const headerEl = renderedHeaderEl.querySelector(`.${kBodyHeader}-item`);
                    if (headerEl) {
                        const titleBlock = mainEl.querySelector("#title-block-header");
                        const insertBefore = titleBlock?.nextElementSibling || mainEl.childNodes[0] || null;
                        for (const child of headerEl.children){
                            if (insertBefore) {
                                mainEl.insertBefore(child, insertBefore);
                            } else {
                                mainEl.appendChild(child);
                            }
                        }
                    }
                }
                const renderedFooterEl = rendered[kBodyFooter];
                if (renderedFooterEl) {
                    const footerEl = renderedFooterEl.querySelector(`.${kBodyFooter}-item`);
                    if (footerEl) {
                        for (const child1 of footerEl.children){
                            mainEl.appendChild(child1);
                        }
                    }
                }
            }
        }
    };
};
const marginHeaderFooterHandler = (context)=>{
    return {
        getUnrendered () {
            const result1 = {};
            if (context.navigation?.pageMargin) {
                const projectHeaders = context.navigation.pageMargin.header;
                const pageHeaderRaw = context.format.metadata[kMarginHeader];
                const pageHeaders = pageHeaderRaw !== undefined ? Array.isArray(pageHeaderRaw) ? pageHeaderRaw : [
                    pageHeaderRaw
                ] : [];
                const marginHeaders = [
                    ...projectHeaders || [],
                    ...pageHeaders || [], 
                ];
                if (marginHeaders && marginHeaders.length > 0) {
                    result1[kMarginHeader] = toHeaderFooterMarkdown(context.source, kMarginHeader, marginHeaders);
                }
                const projectFooters = context.navigation.pageMargin.footer;
                const pageFooterRaw = context.format.metadata[kMarginFooter];
                const pageFooters = pageFooterRaw !== undefined ? Array.isArray(pageFooterRaw) ? pageFooterRaw : [
                    pageFooterRaw
                ] : [];
                const marginFooters = [
                    ...projectFooters || [],
                    ...pageFooters || [], 
                ].filter((item)=>item !== undefined);
                if (marginFooters && marginFooters.length > 0) {
                    result1[kMarginFooter] = toHeaderFooterMarkdown(context.source, kMarginFooter, marginFooters);
                }
            }
            return {
                blocks: result1
            };
        },
        processRendered (rendered, doc) {
            const sidebarEl = doc.getElementById("quarto-margin-sidebar");
            if (sidebarEl) {
                const renderedHeaderEl = rendered[kMarginHeader];
                if (renderedHeaderEl) {
                    const headerEl = toHeaderFooterContainer(doc, kMarginHeader, renderedHeaderEl);
                    sidebarEl.insertBefore(headerEl, sidebarEl.firstChild);
                }
                const renderedFooterEl = rendered[kMarginFooter];
                if (renderedFooterEl) {
                    const footerEl = toHeaderFooterContainer(doc, kMarginFooter, renderedFooterEl);
                    sidebarEl.appendChild(footerEl);
                }
            }
        }
    };
};
const kNavFooterPrefix = "footer-";
const footerHandler = (context)=>{
    return {
        getUnrendered () {
            if (context.navigation?.footer) {
                const markdown = {};
                const addEntry = (key, value)=>{
                    if (typeof value === "string") {
                        markdown[`${kNavFooterPrefix}${key}`] = value;
                    } else {
                        value.forEach((navItem)=>{
                            if (typeof navItem === "object") {
                                if (navItem.text) {
                                    markdown[`${kNavFooterPrefix}${key}-${navItem.href || navItem.text}`] = navItem.text;
                                }
                            }
                        });
                    }
                };
                if (context.navigation.footer.left) {
                    addEntry("left", context.navigation.footer.left);
                }
                if (context.navigation.footer.center) {
                    addEntry("center", context.navigation.footer.center);
                }
                if (context.navigation.footer.right) {
                    addEntry("right", context.navigation.footer.right);
                }
                return {
                    inlines: markdown
                };
            }
        },
        processRendered (rendered, doc) {
            const process = (key)=>{
                const footerEl = doc.querySelector(`.nav-footer .nav-footer-${key}`);
                if (footerEl) {
                    const footer = rendered[`${kNavFooterPrefix}${key}`];
                    if (footer) {
                        footerEl.innerHTML = footer.innerHTML;
                    }
                }
                const navItemEls = doc.querySelectorAll(".nav-footer .nav-item a.nav-link");
                for(let i1 = 0; i1 < navItemEls.length; i1++){
                    const link = navItemEls[i1];
                    const href = link.getAttribute("href");
                    const id = href || link.innerText;
                    if (id) {
                        const renderedEl = rendered[`${kNavFooterPrefix}${key}-${id}`];
                        if (renderedEl) {
                            removeChapterNumber(renderedEl);
                            link.innerHTML = renderedEl?.innerHTML;
                        }
                    }
                }
            };
            process("left");
            process("center");
            process("right");
        }
    };
};
function expandMarkdown(source, name, val) {
    if (Array.isArray(val)) {
        return val.map((pathOrMarkdown)=>{
            return expandMarkdownFilePath(source, pathOrMarkdown);
        });
    } else if (typeof val == "string") {
        return [
            expandMarkdownFilePath(source, val)
        ];
    } else {
        throw Error(`Invalid value for ${name}:\n${val}`);
    }
}
function expandMarkdownFilePath(source, path) {
    const absPath = isAbsolute2(path) ? path : join3(dirname2(source), path);
    if (safeExistsSync(absPath)) {
        const fileContents = Deno.readTextFileSync(absPath);
        const ext = extname2(absPath);
        if (ext === ".html") {
            return "```{=html}\n" + fileContents + "\n```";
        } else {
            return fileContents;
        }
    } else {
        return path;
    }
}
const createMarkdownPipeline = (envelopeId, handlers)=>{
    return {
        markdownAfterBody () {
            const pipelineMarkdown = {};
            handlers.forEach((handler)=>{
                const handlerPipelineMarkdown = handler.getUnrendered();
                if (handlerPipelineMarkdown) {
                    const inlines = handlerPipelineMarkdown.inlines;
                    if (inlines) {
                        pipelineMarkdown.inlines = pipelineMarkdown.inlines || {};
                        for (const key of Object.keys(inlines)){
                            pipelineMarkdown.inlines[key] = inlines[key];
                        }
                    }
                    const blocks = handlerPipelineMarkdown.blocks;
                    if (blocks) {
                        pipelineMarkdown.blocks = pipelineMarkdown.blocks || {};
                        for (const key1 of Object.keys(blocks)){
                            pipelineMarkdown.blocks[key1] = blocks[key1];
                        }
                    }
                }
            });
            return createMarkdownRenderEnvelope(envelopeId, pipelineMarkdown);
        },
        readMarkdown (doc) {
            return readEnvelope(doc, envelopeId);
        },
        processRenderedMarkdown (doc) {
            processMarkdownRenderEnvelope(doc, envelopeId, handlers.map((handler)=>{
                return handler.processRendered;
            }));
        }
    };
};
function createMarkdownRenderEnvelope(envelopeId, pipelineMarkdown) {
    const envelope = markdownEnvelopeWriter(envelopeId);
    if (pipelineMarkdown.inlines) {
        for (const key of Object.keys(pipelineMarkdown.inlines)){
            envelope.addInline(key, pipelineMarkdown.inlines[key]);
        }
    }
    if (pipelineMarkdown.blocks) {
        for (const key1 of Object.keys(pipelineMarkdown.blocks)){
            envelope.addBlock(key1, pipelineMarkdown.blocks[key1]);
        }
    }
    return envelope.toMarkdown();
}
function processMarkdownRenderEnvelope(doc, envelopeId, processors) {
    const renderedMarkdown = readEnvelope(doc, envelopeId);
    processors.forEach((processor)=>{
        processor(renderedMarkdown, doc);
    });
}
const markdownEnvelopeWriter = (envelopeId)=>{
    const renderList = [];
    const hiddenSpan = (id, contents)=>{
        return `[${contents}]{.hidden render-id="${id}"}`;
    };
    const hiddenDiv = (id, contents)=>{
        return `\n:::{.hidden render-id="${id}"}\n${contents}\n:::\n`;
    };
    return {
        addBlock: (id, value)=>{
            renderList.push(hiddenDiv(id, value));
        },
        addInline: (id, value)=>{
            renderList.push(hiddenSpan(id, value));
        },
        toMarkdown: ()=>{
            const contents = renderList.join("\n");
            return `\n:::{#${envelopeId} .hidden}\n${contents}\n:::\n`;
        }
    };
};
const readEnvelope = (doc, envelopeId)=>{
    const envelope = doc.getElementById(envelopeId);
    const contents = {};
    const addContent = (node)=>{
        const el = node;
        const id = el.getAttribute("data-render-id");
        if (id) {
            contents[id] = el;
        }
    };
    if (envelope) {
        const blockNodes = envelope.querySelectorAll("div[data-render-id]");
        blockNodes.forEach((blockNode)=>{
            addContent(blockNode);
        });
        const inlineNodes = envelope.querySelectorAll("span[data-render-id]");
        inlineNodes.forEach((inlineNode)=>{
            addContent(inlineNode);
        });
        envelope.remove();
    }
    return contents;
};
function asNumber(x, defaultValue = 0) {
    if (x === undefined) {
        return x;
    } else if (typeof x === "number") {
        return x;
    } else if (typeof x === "string") {
        try {
            return parseFloat(x);
        } catch  {
            return defaultValue;
        }
    } else if (typeof x === "boolean") {
        return x ? 1 : 0;
    } else {
        return defaultValue;
    }
}
async function expandAutoSidebarItems(project, items) {
    items = normalizeSidebarItems(cloneDeep1(items));
    const expanded = [];
    for (const item of items){
        if (item.auto) {
            const autoItems = await sidebarItemsFromAuto(project, item.auto);
            expanded.push(...autoItems);
        } else {
            if (item.contents) {
                if (typeof item.contents === "string") {
                    if (item.section) {
                        const hasProjectHref = project.files.input.includes(join3(project.dir, item.section)) || item.href && project.files.input.includes(join3(project.dir, item.href));
                        if (!hasProjectHref) {
                            const globbedDir = globbedDirectory(project, item.contents);
                            if (globbedDir) {
                                const indexFileHref = indexFileHrefForDir(project, globbedDir);
                                if (indexFileHref) {
                                    item.text = item.section;
                                    item.section = indexFileHref;
                                }
                            }
                        }
                    }
                }
                item.contents = await expandAutoSidebarItems(project, item.contents);
            }
            expanded.push(item);
        }
    }
    return expanded;
}
function globbedDirectory(project, contentsGlob) {
    const isValidDirectory = (dir)=>{
        return safeExistsSync(dir) && Deno.statSync(dir).isDirectory;
    };
    const literalTargetDir = join3(project.dir, contentsGlob);
    if (isValidDirectory(literalTargetDir)) {
        return literalTargetDir;
    }
    const match = contentsGlob.match(/(.*?)\/\*.*$/);
    if (match) {
        const globTargetDir = join3(project.dir, match[1]);
        if (isValidDirectory(globTargetDir)) {
            return globTargetDir;
        }
    }
}
function normalizeSidebarItems(items) {
    if (!Array.isArray(items)) {
        if (typeof items === "string") {
            if (items === "auto") {
                items = [
                    {
                        auto: true
                    }
                ];
            } else {
                items = [
                    {
                        auto: items
                    }
                ];
            }
        } else {
            items = [
                items
            ];
        }
    }
    return items;
}
async function sidebarItemsFromAuto(project, auto) {
    const isAutoDir = typeof auto === "string" && !!auto.match(/^[^\*]+$/) && safeExistsSync(join3(project.dir, auto));
    const globs = globsFromAuto(project, auto);
    const entries = [];
    for (const nodeSet of autoSidebarNodes(project, globs)){
        if (isAutoDir) {
            const root = nodeSet.root.split("/");
            nodeSet.root = root.slice(0, -1).join("/");
            nodeSet.nodes = {
                [root.slice(-1)[0]]: nodeSet.nodes
            };
        }
        entries.push(...await nodesToEntries(project, `${nodeSet.root ? nodeSet.root + "/" : ""}`, nodeSet.nodes));
    }
    return sidebarItemsFromEntries(entries.sort(sortEntries));
}
function globsFromAuto(project, auto) {
    const globs = [];
    if (typeof auto === "boolean") {
        if (auto === true) {
            globs.push("*");
        }
    } else {
        if (!Array.isArray(auto)) {
            auto = [
                auto
            ];
        }
        globs.push(...auto.map((glob)=>{
            const target = join3(project.dir, glob);
            if (safeExistsSync(target) && Deno.statSync(target).isDirectory) {
                glob = join3(glob, "**");
            }
            return glob;
        }));
    }
    return globs;
}
function autoSidebarNodes(project, globs) {
    return globs.map((glob)=>{
        const inputs = __VIRTUAL_FILE181(filterPaths(project.dir, project.files.input, [
            glob
        ], {
            mode: "always"
        }).include).filter((input)=>!/^index\.\w+$/.test(input)).map((input)=>pathWithForwardSlashes(relative2(project.dir, input)));
        let directory = "";
        const match = glob.match(/(.*?)[\/\\]\*.*$/);
        if (match && safeExistsSync(join3(project.dir, match[1]))) {
            directory = match[1];
        }
        let result1 = {};
        inputs.forEach((p)=>p.split("/").reduce((o, k)=>o[k] = o[k] || {}, result1));
        if (directory) {
            directory.split("/").forEach((p)=>{
                result1 = result1[p];
            });
        }
        return {
            root: directory,
            nodes: result1
        };
    });
}
function indexFileHrefForDir(project, dir) {
    const indexFileExt = engineValidExtensions().find((ext)=>{
        return safeExistsSync(join3(dir, `index${ext}`));
    });
    if (indexFileExt) {
        return relative2(project.dir, join3(dir, `index${indexFileExt}`));
    }
}
async function nodesToEntries(project, root, nodes) {
    nodes = cloneDeep1(nodes);
    const indexFile = findIndexFile(nodes);
    if (indexFile) {
        delete nodes[indexFile];
    }
    const entries = [];
    for (const node of Object.keys(nodes)){
        const href = `${root}${node}`;
        const path = join3(project.dir, href);
        if (safeExistsSync(path)) {
            if (Deno.statSync(path).isDirectory) {
                const childNodes = __VIRTUAL_FILE107(nodes[node]);
                const indexFile1 = findIndexFile(childNodes);
                if (indexFile1) {
                    delete childNodes[indexFile1];
                }
                if (indexFile1) {
                    entries.push({
                        ...await entryFromHref(project, relative2(project.dir, join3(path, indexFile1))),
                        children: childNodes && Object.keys(childNodes).length > 0 ? await nodesToEntries(project, `${root}${node}/`, childNodes) : undefined
                    });
                } else {
                    entries.push({
                        title: titleFromPath(href),
                        children: await nodesToEntries(project, `${root}${node}/`, childNodes)
                    });
                }
            } else {
                entries.push(await entryFromHref(project, href));
            }
        }
    }
    return entries.sort(sortEntries);
}
function findIndexFile(nodes) {
    return Object.keys(nodes).find((input)=>/^index\.\w+$/.test(input));
}
function sortEntries(a, b) {
    const titleOrder = a.title.toLocaleUpperCase().localeCompare(b.title.toLocaleUpperCase());
    if (a.children && !b.children) {
        return 1;
    } else if (b.children && !a.children) {
        return -1;
    }
    if (a.order !== undefined && b.order !== undefined) {
        const order = a.order - b.order;
        return order !== 0 ? order : titleOrder;
    } else if (a.order !== undefined) {
        return -1;
    } else if (b.order !== undefined) {
        return 1;
    } else {
        return titleOrder;
    }
}
async function entryFromHref(project, href) {
    const index = await inputTargetIndex(project, href);
    return {
        title: index?.title || (await resolveInputTarget(project, href))?.title || titleFromPath(dirAndStem(href)[1]),
        href: href,
        order: asNumber(index?.markdown.yaml?.[kOrder]),
        empty: index ? inputTargetIsEmpty(index) : false
    };
}
function titleFromPath(path) {
    const name = basename2(path);
    if (!name.includes(" ")) {
        return capitalizeTitle(name.replaceAll(/[_\-]+/g, " "));
    } else {
        return name;
    }
}
function sidebarItemsFromEntries(entries) {
    return entries.map((entry)=>{
        if (entry.children) {
            return {
                section: !entry.href || entry.empty ? entry.title : entry.href,
                contents: sidebarItemsFromEntries(entry.children)
            };
        } else {
            return {
                text: entry.title,
                href: entry.href
            };
        }
    });
}
const navigation = {
    sidebars: []
};
const kSidebarLogo = "logo";
async function initWebsiteNavigation(project) {
    resetMenuIds();
    const { navbar , sidebars , pageNavigation , footer , pageMargin , bodyDecorators ,  } = websiteNavigationConfig(project);
    if (!navbar && !sidebars && !pageNavigation) {
        return;
    }
    if (sidebars) {
        navigation.sidebars = await sidebarsEjsData(project, sidebars);
        navigation.sidebars = resolveNavReferences(navigation.sidebars);
    } else {
        navigation.sidebars = [];
    }
    if (navbar) {
        navigation.navbar = await navbarEjsData(project, navbar);
        navigation.navbar = resolveNavReferences(navigation.navbar);
    } else {
        navigation.navbar = undefined;
    }
    navigation.pageNavigation = pageNavigation;
    navigation.footer = await resolveFooter(project, footer);
    navigation.bodyDecorators = bodyDecorators;
    navigation.pageMargin = pageMargin;
}
async function websiteNavigationExtras(project, source, flags, format, temp) {
    const usesCustomLayout = !formatHasArticleLayout(format);
    const hasToc = ()=>{
        if (disabledTableOfContents(format)) {
            return false;
        } else if (hasTableOfContents(flags, format)) {
            return true;
        } else if (usesCustomLayout) {
            return false;
        } else {
            return true;
        }
    };
    const inputRelative = relative2(project.dir, source);
    const dependencies = [
        websiteNavigationDependency(project), 
    ];
    const includeInHeader = [];
    const sassBundles = [
        websiteNavigationSassBundle()
    ];
    const searchDep = websiteSearchDependency(project, source);
    if (searchDep) {
        dependencies.push(...searchDep);
        sassBundles.push(websiteSearchSassBundle());
        includeInHeader.push(websiteSearchIncludeInHeader(project, format, temp));
    }
    const disableNavbar = format.metadata[kSiteNavbar] !== undefined && format.metadata[kSiteNavbar] === false;
    const disableSidebar = format.metadata[kSiteSidebar] !== undefined && format.metadata[kSiteSidebar] === false || usesCustomLayout;
    const target = await resolveInputTarget(project, inputRelative);
    const href = target?.outputHref || inputFileHref(inputRelative);
    const sidebar = sidebarForHref(href, format);
    const nav = {
        hasToc: hasToc(),
        [kTocLocation]: format.metadata[kTocLocation] || "right",
        layout: formatPageLayout(format),
        navbar: disableNavbar ? undefined : navigation.navbar,
        sidebar: disableSidebar ? undefined : expandedSidebar(href, sidebar),
        sidebarStyle: sidebarStyle(),
        footer: navigation.footer
    };
    const pageNavigation = nextAndPrevious(href, sidebar);
    if (navigation.pageNavigation && !usesCustomLayout) {
        nav.prevPage = pageNavigation.prevPage;
        nav.nextPage = pageNavigation.nextPage;
        const metaLinks = [];
        if (pageNavigation.nextPage?.href) {
            metaLinks.push({
                rel: "next",
                href: pageNavigation.nextPage?.href
            });
        }
        if (pageNavigation.prevPage?.href) {
            metaLinks.push({
                rel: "prev",
                href: pageNavigation.prevPage?.href
            });
        }
        if (metaLinks.length > 0) {
            dependencies.push({
                name: "website-pagination",
                links: metaLinks
            });
        }
    }
    if (navigation.footer) {
        nav.footer = navigation.footer;
    }
    const darkMode = formatDarkMode(format);
    if (darkMode !== undefined && nav.navbar) {
        nav.navbar.darkToggle = true;
    } else if (darkMode !== undefined && nav.sidebar) {
        nav.sidebar.darkToggle = true;
    }
    const readerMode = websiteConfigBoolean(kSiteReaderMode, false, project.config);
    if (readerMode && nav.navbar) {
        nav.navbar.readerToggle = true;
    } else if (readerMode && nav.sidebar) {
        nav.sidebar.readerToggle = true;
    }
    const projTemplate = (template)=>resourcePath(`projects/website/templates/${template}`);
    const bodyEnvelope = {
        before: renderEjs(projTemplate("nav-before-body.ejs"), {
            nav
        }),
        afterPreamble: renderEjs(projTemplate("nav-after-body-preamble.ejs"), {
            nav
        }),
        afterPostamble: renderEjs(projTemplate("nav-after-body-postamble.ejs"), {
            nav
        })
    };
    const pipelineHandlers = navigationMarkdownHandlers({
        source,
        format,
        sidebar,
        navigation,
        pageNavigation,
        bodyDecorators: navigation.bodyDecorators
    });
    const markdownPipeline = createMarkdownPipeline("quarto-navigation-envelope", pipelineHandlers);
    return {
        [kIncludeInHeader]: includeInHeader,
        html: {
            [kSassBundles]: sassBundles,
            [kDependencies]: dependencies,
            [kBodyEnvelope]: bodyEnvelope,
            [kHtmlPostprocessors]: [
                navigationHtmlPostprocessor(project, format, source, markdownPipeline, format.language), 
            ],
            [kMarkdownAfterBody]: [
                markdownPipeline.markdownAfterBody(), 
            ]
        }
    };
}
async function ensureIndexPage(project) {
    const outputDir = projectOutputDir(project);
    const indexPage = join3(outputDir, "index.html");
    if (!safeExistsSync(indexPage)) {
        const firstInput = project.files.input[0];
        if (firstInput) {
            const firstInputHref = relative2(project.dir, firstInput);
            const resolved = await resolveInputTarget(project, firstInputHref, false);
            if (resolved) {
                writeRedirectPage(indexPage, resolved.outputHref);
            }
        }
    }
}
function writeRedirectPage(path, href) {
    const redirectTemplate = resourcePath("projects/website/templates/redirect-simple.ejs");
    const redirectHtml = renderEjs(redirectTemplate, {
        url: href
    });
    Deno.writeTextFileSync(path, redirectHtml);
}
function navigationHtmlPostprocessor(project, format, source, markdownPipeline, language) {
    const sourceRelative = relative2(project.dir, source);
    const offset = projectOffset(project, source);
    const href = inputFileHref(sourceRelative);
    return async (doc)=>{
        markdownPipeline.processRenderedMarkdown(doc);
        const sidebar = sidebarForHref(href, format);
        const sidebarHidden = format.metadata[kSiteSidebar] === false;
        if (sidebar && !sidebarHidden) {
            doc.body.classList.add("nav-sidebar");
        }
        const sidebarEl = doc.body.getElementById("quarto-sidebar");
        if (sidebarEl?.classList.contains("floating")) {
            doc.body.classList.add("floating");
        } else if (sidebarEl?.classList.contains("docked")) {
            doc.body.classList.add("docked");
        }
        const headerEl = doc.body.querySelector("#quarto-header.fixed-top nav.navbar");
        if (headerEl) {
            doc.body.classList.add("nav-fixed");
        }
        const navLinks = doc.querySelectorAll("a.nav-link");
        for(let i1 = 0; i1 < navLinks.length; i1++){
            const navLink = navLinks[i1];
            const navLinkHref = navLink.getAttribute("href");
            const sidebarLink = doc.querySelector('.sidebar-navigation a[href="' + navLinkHref + '"]');
            if (sidebarLink || navLinkHref === href) {
                navLink.classList.add("active");
                navLink.setAttribute("aria-current", "page");
                break;
            }
        }
        const title = doc.querySelector("header .title .quarto-section-identifier") || doc.querySelector("header .title");
        const secondaryNavTitleEl = doc.querySelector(".quarto-secondary-nav .quarto-secondary-nav-title");
        if (secondaryNavTitleEl) {
            if (title) {
                title.classList.add("d-none");
                title.classList.add("d-lg-block");
            }
            if (title) {
                secondaryNavTitleEl.innerHTML = title.innerHTML;
            } else {
                const sidebarTitle = doc.querySelector(".sidebar-title a");
                if (sidebarTitle) {
                    secondaryNavTitleEl.innerHTML = sidebarTitle.innerHTML;
                } else {
                    const sidebarTitleBare = doc.querySelector(".sidebar-title");
                    if (sidebarTitleBare) {
                        secondaryNavTitleEl.innerHTML = sidebarTitleBare.innerHTML;
                    }
                }
            }
            const titleBlock = doc.querySelector("header > .quarto-title-block");
            if (titleBlock) {
                titleBlock.classList.add("d-none");
                titleBlock.classList.add("d-lg-block");
            }
        }
        const links = doc.querySelectorAll("a[href]");
        for(let i11 = 0; i11 < links.length; i11++){
            const link = links[i11];
            const href1 = getDecodedAttribute(link, "href");
            if (href1 && !isExternalPath(href1)) {
                let projRelativeHref = href1.startsWith("/") ? href1.slice(1) : join3(dirname2(sourceRelative), href1);
                const hashLoc = projRelativeHref.indexOf("#");
                const hash = hashLoc !== -1 ? projRelativeHref.slice(hashLoc) : "";
                if (hash) {
                    projRelativeHref = projRelativeHref.slice(0, hashLoc);
                }
                const resolved = await resolveInputTarget(project, projRelativeHref);
                if (resolved) {
                    link.setAttribute("href", offset + resolved.outputHref + hash);
                } else {
                    if (!safeExistsSync(join3(project.dir, projRelativeHref))) {
                        const targetFile = join3(projectOutputDir(project), projRelativeHref);
                        if (engineValidExtensions().includes(extname2(targetFile)) && !safeExistsSync(join3(projectOutputDir(project), projRelativeHref))) {
                            warning("Unable to resolve link target: " + projRelativeHref);
                        }
                    }
                }
            }
        }
        handleRepoLinks(format, doc, pathWithForwardSlashes(sourceRelative), language, project.config);
        const numberSections = websiteHtmlFormat(project).pandoc[kNumberSections] !== false;
        if (numberSections === false) {
            const sidebarItems = doc.querySelectorAll(".sidebar-item .sidebar-item-text");
            for(let i2 = 0; i2 < sidebarItems.length; i2++){
                const sidebarItem = sidebarItems[i2];
                removeChapterNumber(sidebarItem);
            }
            const sels = [
                "h1.title",
                ".page-navigation .nav-page-next .nav-page-text",
                ".page-navigation .nav-page-previous .nav-page-text",
                "h1.quarto-secondary-nav-title", 
            ];
            for (const sel of sels){
                const el = doc.querySelector(sel);
                if (el) {
                    removeChapterNumber(el);
                }
            }
        }
        return Promise.resolve(kHtmlEmptyPostProcessResult);
    };
}
function handleRepoLinks(format, doc, source, language, config) {
    const repoActions = websiteConfigActions(kSiteRepoActions, kWebsite, config);
    const forecRepoActions = format.metadata[kSiteRepoActions] === true;
    const elRepoSource = doc.querySelector("[" + kDataQuartoSourceUrl + '="repo"]');
    if (repoActions.length > 0 || elRepoSource) {
        const repoInfo = websiteRepoInfo(config);
        if (repoInfo) {
            if (repoActions.length > 0) {
                let repoTarget = doc.querySelector(`nav[role="doc-toc"]`);
                if (repoTarget === null && forecRepoActions) {
                    repoTarget = doc.querySelector("#quarto-margin-sidebar");
                }
                if (repoTarget) {
                    const links = repoActionLinks(repoActions, repoInfo, websiteRepoBranch(config), source, language);
                    const actionsDiv = doc.createElement("div");
                    actionsDiv.classList.add("toc-actions");
                    const iconDiv = doc.createElement("div");
                    const iconEl = doc.createElement("i");
                    iconEl.classList.add("bi").add("bi-" + repoUrlIcon(repoInfo.baseUrl));
                    iconDiv.appendChild(iconEl);
                    actionsDiv.appendChild(iconDiv);
                    const linksDiv = doc.createElement("div");
                    linksDiv.classList.add("action-links");
                    links.forEach((link)=>{
                        const a = doc.createElement("a");
                        a.setAttribute("href", link.url);
                        a.classList.add("toc-action");
                        a.innerHTML = link.text;
                        const p = doc.createElement("p");
                        p.appendChild(a);
                        linksDiv.appendChild(p);
                    });
                    actionsDiv.appendChild(linksDiv);
                    repoTarget.appendChild(actionsDiv);
                }
            }
            if (elRepoSource) {
                elRepoSource.setAttribute(kDataQuartoSourceUrl, `${repoInfo.baseUrl}blob/${websiteRepoBranch(config)}/${repoInfo.path}${source}`);
            }
        } else {
            warnOnce(`Repository links require that you specify a ${kSiteRepoUrl}`);
        }
    }
}
function repoActionLinks(actions, repoInfo, branch, source, language) {
    return actions.map((action)=>{
        switch(action){
            case "edit":
                if (!isJupyterNotebook(source)) {
                    return {
                        text: language[kRepoActionLinksEdit],
                        url: `${repoInfo.baseUrl}edit/${branch}/${repoInfo.path}${source}`
                    };
                } else if (repoInfo.baseUrl.indexOf("github.com") !== -1) {
                    return {
                        text: language[kRepoActionLinksEdit],
                        url: `${repoInfo.baseUrl.replace("github.com", "github.dev")}blob/${branch}/${repoInfo.path}${source}`
                    };
                } else {
                    return null;
                }
            case "source":
                return {
                    text: language[kRepoActionLinksSource],
                    url: `${repoInfo.baseUrl}blob/${branch}/${repoInfo.path}${source}`
                };
            case "issue":
                return {
                    text: language[kRepoActionLinksIssue],
                    url: `${repoInfo.baseUrl}issues/new`
                };
            default:
                {
                    warnOnce(`Unknown repo action '${action}'`);
                    return null;
                }
        }
    }).filter((action)=>action !== null);
}
async function resolveFooter(project, footer) {
    const resolveItems = async (contents)=>{
        if (Array.isArray(contents)) {
            const resolvedItems = [];
            for(let i1 = 0; i1 < contents.length; i1++){
                const item = contents[i1];
                const navItem = await navigationItem(project, item);
                resolvedItems.push(navItem);
            }
            return resolvedItems;
        } else {
            return contents;
        }
    };
    if (footer) {
        footer.left = await resolveItems(footer.left);
        footer.center = await resolveItems(footer.center);
        footer.right = await resolveItems(footer.right);
    }
    return footer;
}
async function sidebarsEjsData(project, sidebars) {
    const ejsSidebars = [];
    for(let i1 = 0; i1 < sidebars.length; i1++){
        ejsSidebars.push(await sidebarEjsData(project, sidebars[i1]));
    }
    return Promise.resolve(ejsSidebars);
}
async function sidebarEjsData(project, sidebar) {
    sidebar = cloneDeep1(sidebar);
    if (sidebar.title && !sidebar.id) {
        sidebar.id = asHtmlId(sidebar.title);
    }
    sidebar.title = sidebarTitle(sidebar, project);
    sidebar.logo = resolveLogo(sidebar.logo);
    const searchOpts = searchOptions(project);
    sidebar.search = sidebar.search !== undefined ? sidebar.search : searchOpts && searchOpts.location === "sidebar" ? searchOpts.type : false;
    sidebar[kCollapseLevel] = sidebar[kCollapseLevel] || 2;
    sidebar.aligment = sidebar.aligment || "center";
    sidebar.pinned = sidebar.pinned !== undefined ? !!sidebar.pinned : false;
    await resolveSidebarItems(project, sidebar);
    await resolveSidebarTools(project, sidebar.tools);
    return sidebar;
}
async function resolveSidebarItems(project, container) {
    if (!container.contents) {
        return;
    }
    const context = sidebarContext();
    container.contents = await expandAutoSidebarItems(project, container.contents || []);
    const items = container.contents;
    for(let i1 = 0; i1 < items.length; i1++){
        let item = normalizeSidebarItem(project.dir, items[i1], context);
        if (Object.keys(item).includes("contents")) {
            const subItems = item.contents || [];
            if (item.href) {
                item = await resolveItem(project, item.href, item, true);
            }
            for(let i11 = 0; i11 < subItems.length; i11++){
                subItems[i11] = await resolveSidebarItem(project, normalizeSidebarItem(project.dir, subItems[i11], context));
            }
            items[i1] = item;
        } else {
            items[i1] = await resolveSidebarItem(project, item);
        }
    }
}
async function resolveSidebarItem(project, item) {
    if (item.href) {
        item = await resolveItem(project, item.href, item, true);
    }
    if (item.contents !== undefined) {
        await resolveSidebarItems(project, item);
        return item;
    } else {
        return item;
    }
}
async function resolveSidebarTools(project, tools) {
    if (tools) {
        for(let i1 = 0; i1 < tools.length; i1++){
            if (Object.keys(tools[i1]).includes("menu")) {
                const items = tools[i1].menu || [];
                for(let i11 = 0; i11 < items.length; i11++){
                    const toolItem = await navigationItem(project, items[i11], 1);
                    if (typeof toolItem === "object" && toolItem.href) {
                        const tool = await resolveItem(project, toolItem.href, toolItem);
                        validateTool(tool);
                        items[i11] = tool;
                    }
                }
            } else {
                const toolItem1 = tools[i1];
                resolveHrefAttribute(toolItem1);
                if (toolItem1.href) {
                    tools[i1] = await resolveItem(project, toolItem1.href, toolItem1);
                    validateTool(tools[i1]);
                }
            }
        }
    }
}
function validateTool(tool) {
    if (tool.icon === undefined && tool.text === undefined) {
        warning("A sidebar tool is defined without text or an icon.");
    }
}
function sidebarForHref(href, format) {
    if (navigation.sidebars.length === 1) {
        return navigation.sidebars[0];
    } else {
        for (const sidebar of navigation.sidebars){
            if (sidebar.id === format.metadata[kSiteSidebar]) {
                return sidebar;
            } else if (containsHref(href, sidebar.contents)) {
                return sidebar;
            }
        }
    }
}
function sidebarStyle() {
    if (navigation.sidebars.length > 0) {
        return navigation.sidebars[0].style;
    } else {
        return undefined;
    }
}
function containsHref(href, items) {
    for(let i1 = 0; i1 < items.length; i1++){
        if (items[i1].href && items[i1].href === href) {
            return true;
        } else if (Object.keys(items[i1]).includes("contents")) {
            const subItems = items[i1].contents || [];
            const subItemsHasHref = containsHref(href, subItems);
            if (subItemsHasHref) {
                return true;
            }
        } else {
            if (itemHasNavTarget(items[i1], href)) {
                return true;
            }
        }
    }
    return false;
}
function expandedSidebar(href, sidebar) {
    if (sidebar) {
        const resolveExpandedItems = (href, items)=>{
            for(let i1 = 0; i1 < items.length; i1++){
                const item = items[i1];
                item.active = itemHasNavTarget(item, href);
                if (Object.keys(item).includes("contents")) {
                    if (resolveExpandedItems(href, item.contents || []) || item.href === href) {
                        item.expanded = true;
                        return true;
                    }
                } else if (item.active) {
                    return true;
                }
            }
            return false;
        };
        const expandedSidebar = __VIRTUAL_FILE107(sidebar);
        resolveExpandedItems(href, expandedSidebar.contents);
        return expandedSidebar;
    }
}
function itemHasNavTarget(item, href) {
    return item.href === href || item.href === href.replace(/\/index\.html/, "/");
}
function isSeparator(item) {
    return !!item && !!item.text?.match(/^\-\-\-[\-\s]*$/);
}
function nextAndPrevious(href, sidebar) {
    if (sidebar?.contents) {
        const sidebarItems = flattenItems(sidebar?.contents, (item)=>{
            return item.href !== undefined && !isExternalPath(item.href) || isSeparator(item);
        });
        const sidebarItemsUniq = __VIRTUAL_FILE210(sidebarItems, (sidebarItem)=>{
            return sidebarItem.href || Math.random().toString();
        });
        const index = sidebarItemsUniq.findIndex((item)=>item.href === href);
        const nextPage = index > -1 && index < sidebarItemsUniq.length - 1 && !isSeparator(sidebarItemsUniq[index + 1]) ? sidebarItemsUniq[index + 1] : undefined;
        const prevPage = index > -1 && index <= sidebarItemsUniq.length - 1 && !isSeparator(sidebarItemsUniq[index - 1]) ? sidebarItemsUniq[index - 1] : undefined;
        return {
            nextPage,
            prevPage
        };
    } else {
        return {};
    }
}
async function navbarEjsData(project, navbar) {
    const collapse = navbar.collapse !== undefined ? !!navbar.collapse : true;
    const searchOpts = searchOptions(project);
    const data = {
        ...navbar,
        search: searchOpts && searchOpts.location === "navbar" ? searchOpts.type : false,
        background: navbar.background || "primary",
        logo: resolveLogo(navbar.logo),
        [kLogoAlt]: navbar[kLogoAlt],
        [kLogoHref]: navbar[kLogoHref],
        collapse,
        [kCollapseBelow]: !collapse ? "" : "-" + (navbar[kCollapseBelow] || "lg"),
        pinned: navbar.pinned !== undefined ? !!navbar.pinned : false
    };
    if (!data.title && data.title !== false) {
        data.title = websiteTitle(project.config);
    }
    data.title = data.title || "";
    const sidebarMenus = navbar[kSidebarMenus] !== false;
    if (navbar.left) {
        if (!Array.isArray(navbar.left)) {
            throw new Error("navbar 'left' must be an array of nav items");
        }
        data.left = new Array();
        for(let i1 = 0; i1 < navbar.left.length; i1++){
            data.left.push(await navigationItem(project, navbar.left[i1], 0, sidebarMenus));
        }
    }
    if (navbar.right) {
        if (!Array.isArray(navbar.right)) {
            throw new Error("navbar 'right' must be an array of nav items");
        }
        data.right = new Array();
        for(let i11 = 0; i11 < navbar.right.length; i11++){
            data.right.push(await navigationItem(project, navbar.right[i11], 0, sidebarMenus));
        }
    }
    if (navbar.tools) {
        await resolveSidebarTools(project, navbar.tools);
        data.right?.push(...navbar.tools.map((tool)=>{
            const navItem = tool;
            navItem[kAriaLabel] = navItem.text;
            delete navItem.text;
            resolveIcon(navItem);
            return navItem;
        }));
    }
    return data;
}
function resolveIcon(navItem) {
    navItem.icon = navItem.icon ? !navItem.icon.startsWith("bi-") ? `bi-${navItem.icon}` : navItem.icon : navItem.icon;
}
function resolveSidebarRef(navItem) {
    const ref = navItem.href || navItem.text;
    if (ref) {
        const id = sidebarTargetId(ref);
        if (id) {
            const sidebar = navigation.sidebars.find(sidebarHasId(id));
            if (sidebar) {
                navItem.href = undefined;
                navItem.text = sidebar.title || id;
                navItem.menu = new Array();
                for (const item of sidebar.contents){
                    if (item.text && item.contents) {
                        if (navItem.menu.length > 0) {
                            navItem.menu.push({
                                text: "---"
                            });
                        }
                        navItem.menu.push({
                            text: item.text
                        });
                        for (const subItem of item.contents){
                            const targetItem = subItem.contents?.length ? !subItem.contents[0].contents ? subItem.contents[0] : undefined : subItem;
                            if (targetItem?.href) {
                                navItem.menu.push({
                                    text: subItem.text,
                                    href: targetItem.href
                                });
                            }
                        }
                    } else if (item.href) {
                        navItem.menu.push({
                            text: item.text,
                            href: item.href
                        });
                    }
                }
            }
        }
    }
}
async function navigationItem(project, navItem, level = 0, sidebarMenus = false) {
    navItem = cloneDeep1(navItem);
    if (typeof navItem === "string") {
        const navItemPath = join3(project.dir, navItem);
        if (safeExistsSync(navItemPath) && Deno.statSync(navItemPath).isFile) {
            navItem = {
                href: navItem
            };
        } else {
            navItem = {
                text: navItem
            };
        }
    }
    resolveIcon(navItem);
    resolveHrefAttribute(navItem);
    if (level === 0 && sidebarMenus) {
        resolveSidebarRef(navItem);
    }
    if (navItem.href) {
        return await resolveItem(project, navItem.href, navItem);
    } else if (navItem.menu) {
        if (level > 0) {
            throw Error(`"${navItem.text || ""}" menu: this menu does not support sub-menus`);
        }
        for(let i1 = 0; i1 < navItem.menu.length; i1++){
            navItem.menu[i1] = await navigationItem(project, navItem.menu[i1], level + 1, false);
        }
        return {
            ...navItem,
            id: uniqueMenuId(navItem),
            text: navItem.text || ""
        };
    } else {
        return navItem;
    }
}
const menuIds = new Map();
function resetMenuIds() {
    menuIds.clear();
}
function uniqueMenuId(navItem) {
    const id = asHtmlId(navItem.text || navItem.icon || "");
    const number = menuIds.get(id) || 0;
    menuIds.set(id, number + 1);
    return `nav-menu-${id}${number ? "-" + number : ""}`;
}
async function resolveItem(project, href, item, number = false) {
    if (!isExternalPath(href)) {
        const resolved = await resolveInputTarget(project, href);
        if (resolved) {
            const inputItem = {
                ...item,
                href: resolved.outputHref,
                text: item.text || resolved.title || basename2(resolved.outputHref)
            };
            const projType = projectType(project.config?.project?.[kProjectType]);
            if (projType.navItemText) {
                inputItem.text = await projType.navItemText(project, href, inputItem.text, number);
            }
            return inputItem;
        } else {
            return {
                ...item,
                href: !href.startsWith("/") ? "/" + href : href
            };
        }
    } else {
        return item;
    }
}
function sidebarTitle(sidebar, project) {
    const { navbar  } = websiteNavigationConfig(project);
    if (sidebar.title) {
        return sidebar.title;
    } else if (!sidebar.logo) {
        if (!navbar) {
            return websiteTitle(project.config);
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function resolveLogo(logo) {
    if (logo && !isExternalPath(logo) && !logo.startsWith("/")) {
        return "/" + logo;
    } else {
        return logo;
    }
}
function websiteHeadroom(project) {
    const { navbar , sidebars  } = websiteNavigationConfig(project);
    if (navbar || sidebars?.length) {
        const navbarPinned = navbar?.pinned === true;
        const anySidebarPinned = sidebars && sidebars.some((sidebar)=>sidebar.pinned === true);
        return !navbarPinned && !anySidebarPinned;
    } else {
        return false;
    }
}
const kDependencyName1 = "quarto-nav";
function websiteNavigationSassBundle() {
    const scssPath = navigationDependency("quarto-nav.scss").path;
    const navSassLayer = sassLayer(scssPath);
    return {
        dependency: kBootstrapDependencyName,
        key: scssPath,
        quarto: {
            ...navSassLayer,
            name: "quarto-nav.css"
        }
    };
}
function websiteNavigationDependency(project) {
    const scripts = [
        navigationDependency("quarto-nav.js")
    ];
    if (websiteHeadroom(project)) {
        scripts.push(navigationDependency("headroom.min.js"));
    }
    return {
        name: kDependencyName1,
        scripts
    };
}
function navigationDependency(resource) {
    return {
        name: basename2(resource),
        path: resourcePath(`projects/website/navigation/${resource}`)
    };
}
function isExternalPath(path) {
    return /^\w+:/.test(path);
}
function resolveNavReferences(collection) {
    if (!collection) {
        return collection;
    }
    __VIRTUAL_FILE144(collection, (value, index, collection)=>{
        const assign = (value)=>{
            if (typeof index === "number") {
                collection[index] = value;
            } else if (typeof index === "string") {
                collection[index] = value;
            }
        };
        if (Array.isArray(value)) {
            assign(resolveNavReferences(value));
        } else if (typeof value === "object") {
            assign(resolveNavReferences(value));
        } else if (typeof value === "string") {
            const navRef = resolveNavReference(value);
            if (navRef) {
                const navItem = collection;
                navItem["href"] = navRef.href;
                navItem["text"] = navRef.text;
            }
        }
    });
    return collection;
}
function resolveNavReference(href) {
    const id = sidebarTargetId(href);
    if (id) {
        const sidebar = navigation.sidebars.find(sidebarHasId(id));
        if (sidebar && sidebar.contents?.length) {
            const item = findFirstItem(sidebar.contents[0]);
            if (item) {
                return {
                    href: item.href,
                    text: sidebar.title || id
                };
            }
        }
    }
    return undefined;
}
function sidebarTargetId(href) {
    if (href) {
        const match = href.match(/^sidebar:([^\s]+).*$/);
        if (match) {
            return match[1];
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function sidebarHasId(id) {
    return (sidebar)=>{
        return sidebar.id === id;
    };
}
function findFirstItem(item) {
    if (item.contents?.length) {
        return findFirstItem(item.contents[0]);
    } else if (item.href) {
        return item;
    } else {
        return undefined;
    }
}
class QName {
    _qName;
    _prefix;
    _localPart;
    constructor(qName){
        this._qName = qName;
        const i1 = qName.indexOf(':');
        const q = i1 < 0 ? [
            '',
            qName
        ] : qName.split(':');
        this._prefix = q[0];
        this._localPart = q[1];
    }
    get qName() {
        return this._qName;
    }
    get prefix() {
        return this._prefix;
    }
    get localPart() {
        return this._localPart;
    }
}
class Attribute extends QName {
    uri;
    value = '';
    constructor(qName){
        super(qName);
        if (qName === 'xmlns') {
            this._prefix = 'xmlns';
            this._localPart = '';
        }
    }
}
class Element2 extends QName {
    _attributes = [];
    _parent;
    uri;
    emptyElement = false;
    constructor(name, parent){
        super(name);
        this._parent = parent;
    }
    get parent() {
        return this._parent;
    }
    newAttribute(qName) {
        const attribute = new Attribute(qName);
        this._attributes.push(attribute);
    }
    peekAttribute() {
        const i1 = this._attributes.length - 1;
        if (i1 < 0) {
            return undefined;
        }
        return this._attributes[i1];
    }
    get attributes() {
        return this._attributes;
    }
    get prefixMappings() {
        const filterd = this._attributes.filter((attr)=>attr.prefix === 'xmlns');
        return filterd.map((attr)=>({
                ns: attr.localPart,
                uri: attr.value
            }));
    }
}
class AttributeInfo extends QName {
    _attribute;
    constructor(attribute){
        super(attribute.qName);
        if (attribute.qName === 'xmlns') {
            this._prefix = 'xmlns';
            this._localPart = '';
        }
        this._attribute = attribute;
    }
    get uri() {
        return this._attribute.uri;
    }
    get value() {
        return this._attribute.value;
    }
}
class ElementInfo extends QName {
    _element;
    constructor(element){
        super(element.qName);
        this._element = element;
    }
    get uri() {
        return this._element.uri;
    }
    get parent() {
        const parent = this._element.parent;
        if (parent) {
            return new ElementInfo(parent);
        }
        return undefined;
    }
    get attributes() {
        return this._element.attributes.map((attribute)=>{
            return new AttributeInfo(attribute);
        });
    }
    get emptyElement() {
        return this._element.emptyElement;
    }
}
class XMLParseContext {
    _locator;
    _memento = '';
    _elementStack = [];
    _namespaces = {};
    quote = '';
    state = 'BEFORE_DOCUMENT';
    constructor(locator){
        this._locator = locator;
    }
    get position() {
        return this._locator?.position || {
            line: -1,
            column: -1
        };
    }
    appendMemento(value) {
        this._memento += value;
    }
    clearMemento() {
        this._memento = '';
    }
    get memento() {
        return this._memento;
    }
    newElement(qName) {
        const parent = this.peekElement();
        this._elementStack.push(new Element2(qName, parent));
    }
    peekElement() {
        return this._elementStack[this._elementStack.length - 1];
    }
    popElement() {
        const element = this._elementStack.pop();
        element?.prefixMappings.forEach(({ ns  })=>{
            this._namespaces[ns] = undefined;
        });
        return element;
    }
    get elementLength() {
        return this._elementStack.length;
    }
    registerNamespace(ns, uri) {
        this._namespaces[ns] = uri;
    }
    getNamespaceURI(ns) {
        return this._namespaces[ns];
    }
}
class XMLParseError extends Error {
    _position;
    constructor(message, cx){
        super(message);
        this._position = cx.position;
    }
    get line() {
        return this._position.line;
    }
    get column() {
        return this._position.column;
    }
}
const NAME_HEAD = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
const NAME_BODY = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
function isWhitespace2(c) {
    return c === ' ' || c === '\n' || c === '\r' || c === '\t';
}
function isQuote(c) {
    return c === '"' || c === '\'';
}
function resolveEntity(text) {
    let result1 = text;
    [
        {
            reg: /&amp;/g,
            ch: '&'
        },
        {
            reg: /&gt;/g,
            ch: '>'
        },
        {
            reg: /&lt;/g,
            ch: '<'
        },
        {
            reg: /&quot;/g,
            ch: '"'
        },
        {
            reg: /&apos;/g,
            ch: '\''
        }, 
    ].forEach(({ reg , ch  })=>{
        result1 = result1.replace(reg, ch);
    });
    return result1;
}
function handleBeforeDocument(cx, c) {
    if (c === '<') {
        cx.state = 'FOUND_LT';
    } else {
        if (!isWhitespace2(c)) {
            throw new XMLParseError('Non-whitespace before document.', cx);
        }
    }
    return [];
}
function handleGeneralStuff(cx, c) {
    if (c === '<') {
        cx.state = 'FOUND_LT';
    } else {
        cx.appendMemento(c);
    }
    return [];
}
function handleFoundLT(cx, c) {
    let events = [];
    const text = resolveEntity(cx.memento).trim();
    cx.clearMemento();
    if (text) {
        events = [
            [
                'text',
                text,
                new ElementInfo(cx.peekElement()),
                false
            ]
        ];
    }
    if (!isWhitespace2(c)) {
        if (c === '?') {
            cx.state = 'PROC_INST';
        } else if (c === '!') {
            cx.state = 'SGML_DECL';
        } else if (NAME_HEAD.test(c)) {
            cx.appendMemento(c);
            cx.state = 'START_TAG';
        } else if (c === '/') {
            cx.state = 'END_TAG';
        } else {
            throw new XMLParseError('Unencoded <', cx);
        }
    }
    return events;
}
function handleProcInst(cx, c) {
    if (c === '?') {
        cx.state = 'PROC_INST_ENDING';
    } else {
        cx.appendMemento(c);
    }
    return [];
}
function handleProcInstEnding(cx, c) {
    let events = [];
    if (c === '>') {
        events = [
            [
                'processing_instruction',
                cx.memento
            ]
        ];
        cx.clearMemento();
        cx.state = cx.elementLength > 0 ? 'GENERAL_STUFF' : 'BEFORE_DOCUMENT';
    } else {
        cx.appendMemento(`?${c}`);
        cx.state = 'PROC_INST';
    }
    return events;
}
function handleSgmlDecl(cx, c) {
    let events = [];
    const sgmlCmd = `${cx.memento}${c}`.toUpperCase();
    if (sgmlCmd === '[CDATA[') {
        cx.clearMemento();
        cx.state = 'CDATA';
    } else if (sgmlCmd === '--') {
        cx.clearMemento();
        cx.state = 'COMMENT';
    } else if (sgmlCmd === 'DOCTYPE') {
        if (cx.elementLength > 0) {
            throw new XMLParseError('Inappropriately located doctype declaration', cx);
        }
        cx.clearMemento();
        cx.state = 'DOCTYPE';
    } else if (c === '>') {
        events = [
            [
                'sgml_declaration',
                cx.memento
            ]
        ];
        cx.clearMemento();
        cx.state = cx.elementLength > 0 ? 'GENERAL_STUFF' : 'BEFORE_DOCUMENT';
    } else {
        cx.appendMemento(c);
    }
    return events;
}
function handleCdata(cx, c) {
    if (c === ']') {
        cx.state = 'CDATA_ENDING';
    } else {
        cx.appendMemento(c);
    }
    return [];
}
function handleCdataEnding(cx, c) {
    if (c === ']') {
        cx.state = 'CDATA_ENDING_2';
    } else {
        cx.appendMemento(`]${c}`);
        cx.state = 'CDATA';
    }
    return [];
}
function handleCdataEnding2(cx, c) {
    let events = [];
    if (c === '>') {
        if (cx.memento) {
            events = [
                [
                    'text',
                    cx.memento,
                    new ElementInfo(cx.peekElement()),
                    true
                ]
            ];
            cx.clearMemento();
        }
        cx.state = 'GENERAL_STUFF';
    } else if (c === ']') {
        cx.appendMemento(']');
    } else {
        cx.appendMemento(`]]${c}`);
        cx.state = 'CDATA';
    }
    return events;
}
function handleComment(cx, c) {
    if (c === '-') {
        cx.state = 'COMMENT_ENDING';
    } else {
        cx.appendMemento(c);
    }
    return [];
}
function handleCommentEnding(cx, c) {
    if (c === '-') {
        cx.state = 'COMMENT_ENDING_2';
    } else {
        cx.appendMemento(`-${c}`);
        cx.state = 'COMMENT';
    }
    return [];
}
function handleCommentEnding2(cx, c) {
    let events = [];
    if (c === '>') {
        const comment = cx.memento;
        if (comment) {
            events = [
                [
                    'comment',
                    comment
                ]
            ];
        }
        cx.clearMemento();
        cx.state = 'GENERAL_STUFF';
    } else {
        cx.appendMemento(`--${c}`);
        cx.state = 'COMMENT';
    }
    return events;
}
function handleDoctype(cx, c) {
    let events = [];
    if (c === '>') {
        events = [
            [
                'doctype',
                cx.memento
            ]
        ];
        cx.clearMemento();
        cx.state = 'BEFORE_DOCUMENT';
    } else {
        cx.appendMemento(c);
    }
    return events;
}
function emitStartElement(cx) {
    const events = [];
    if (cx.elementLength === 1) {
        events.push([
            'start_document'
        ]);
    }
    const element = cx.peekElement();
    for (const { ns , uri  } of element.prefixMappings){
        cx.registerNamespace(ns, uri);
        events.push([
            'start_prefix_mapping',
            ns,
            uri
        ]);
    }
    element.uri = cx.getNamespaceURI(element.prefix);
    for (const attribute of element.attributes){
        attribute.uri = cx.getNamespaceURI(attribute.prefix);
    }
    events.push([
        'start_element',
        new ElementInfo(element)
    ]);
    return events;
}
function handleStartTag(cx, c) {
    let events = [];
    if (NAME_BODY.test(c)) {
        cx.appendMemento(c);
    } else {
        cx.newElement(cx.memento);
        cx.clearMemento();
        if (c === '>') {
            events = emitStartElement(cx);
            cx.state = 'GENERAL_STUFF';
        } else if (c === '/') {
            cx.state = 'EMPTY_ELEMENT_TAG';
        } else {
            if (!isWhitespace2(c)) {
                throw new XMLParseError('Invalid character in element name', cx);
            }
            cx.state = 'START_TAG_STUFF';
        }
    }
    return events;
}
function handleStartTagStuff(cx, c) {
    let events = [];
    if (!isWhitespace2(c)) {
        if (c === '>') {
            events = emitStartElement(cx);
            cx.state = 'GENERAL_STUFF';
        } else if (c === '/') {
            cx.state = 'EMPTY_ELEMENT_TAG';
        } else if (NAME_HEAD.test(c)) {
            cx.appendMemento(c);
            cx.state = 'ATTRIBUTE_NAME';
        } else {
            throw new XMLParseError('Invalid attribute name', cx);
        }
    }
    return events;
}
function emitEndElement(cx, qName) {
    let events = [];
    const element = cx.popElement();
    if (element.qName !== qName) {
        throw new XMLParseError(`Illegal element structure, ${element.qName} & ${qName}`, cx);
    }
    events = [
        [
            'end_element',
            new ElementInfo(element)
        ]
    ];
    for (const { ns , uri  } of element.prefixMappings){
        events.push([
            'end_prefix_mapping',
            ns,
            uri
        ]);
    }
    return events;
}
function handleEmptyElementTag(cx, c) {
    let events = [];
    if (c !== '>') {
        throw new XMLParseError('Forward-slash in start-tag not followed by &gt', cx);
    }
    const element = cx.peekElement();
    element.emptyElement = true;
    events = emitStartElement(cx).concat(emitEndElement(cx, element.qName));
    cx.state = 'GENERAL_STUFF';
    return events;
}
function newAttribute(cx) {
    const qName = cx.memento;
    cx.clearMemento();
    cx.peekElement().newAttribute(qName);
    cx.state = 'ATTRIBUTE_EQUAL';
}
function handleAttributeName(cx, c) {
    if (NAME_BODY.test(c)) {
        cx.appendMemento(c);
    } else if (isWhitespace2(c)) {
        cx.state = 'ATTRIBUTE_NAME_SAW_WHITE';
    } else if (c === '=') {
        newAttribute(cx);
    } else {
        throw new XMLParseError(c === '>' ? 'Attribute without value' : 'Invalid attribute name', cx);
    }
    return [];
}
function handleAttributeNameSawWhite(cx, c) {
    if (c === '=') {
        newAttribute(cx);
    } else if (!isWhitespace2(c)) {
        throw new XMLParseError('Attribute without value', cx);
    }
    return [];
}
function handleAttributeEqual(cx, c) {
    if (!isWhitespace2(c)) {
        if (isQuote(c)) {
            cx.quote = c;
            cx.state = 'ATTRIBUTE_VALUE_START';
        } else {
            throw new XMLParseError('Unquoted attribute value', cx);
        }
    }
    return [];
}
function handleAttributeValueStart(cx, c) {
    if (c === cx.quote) {
        const value = cx.memento;
        cx.clearMemento();
        cx.peekElement().peekAttribute().value = resolveEntity(value);
        cx.quote = '';
        cx.state = 'ATTRIBUTE_VALUE_END';
    } else {
        cx.appendMemento(c);
    }
    return [];
}
function handleAttributeValueEnd(cx, c) {
    let events = [];
    if (isWhitespace2(c)) {
        cx.state = 'START_TAG_STUFF';
    } else if (c === '/') {
        cx.state = 'EMPTY_ELEMENT_TAG';
    } else if (c === '>') {
        events = emitStartElement(cx);
        cx.state = 'GENERAL_STUFF';
    } else {
        throw new XMLParseError('Invalid attribute name', cx);
    }
    return events;
}
function closeElement(cx) {
    const events = emitEndElement(cx, cx.memento);
    cx.clearMemento();
    if (cx.elementLength === 0) {
        events.push([
            'end_document'
        ]);
        cx.state = 'AFTER_DOCUMENT';
    } else {
        cx.state = 'GENERAL_STUFF';
    }
    return events;
}
function handleEndTag(cx, c) {
    let events = [];
    if (NAME_BODY.test(c)) {
        cx.appendMemento(c);
    } else if (c === '>') {
        events = closeElement(cx);
    } else if (isWhitespace2(c)) {
        cx.state = 'END_TAG_SAW_WHITE';
    } else {
        throw new XMLParseError('Invalid element name', cx);
    }
    return events;
}
function handleEndTagSawWhite(cx, c) {
    let events = [];
    if (c === '>') {
        events = closeElement(cx);
    } else if (!isWhitespace2(c)) {
        throw new XMLParseError('Invalid characters in end-tag', cx);
    }
    return events;
}
function handleAfterDocument(cx, c) {
    if (!isWhitespace2(c)) {
        throw new XMLParseError('Non-whitespace after document.', cx);
    }
    return [];
}
class ParserBase {
    _cx = new XMLParseContext(this);
    _handlers = {};
    _chunk = '';
    _index = -1;
    _position = {
        line: 1,
        column: 0
    };
    constructor(){
        this.appendHandler('BEFORE_DOCUMENT', handleBeforeDocument);
        this.appendHandler('GENERAL_STUFF', handleGeneralStuff);
        this.appendHandler('FOUND_LT', handleFoundLT);
        this.appendHandler('PROC_INST', handleProcInst);
        this.appendHandler('PROC_INST_ENDING', handleProcInstEnding);
        this.appendHandler('SGML_DECL', handleSgmlDecl);
        this.appendHandler('CDATA', handleCdata);
        this.appendHandler('CDATA_ENDING', handleCdataEnding);
        this.appendHandler('CDATA_ENDING_2', handleCdataEnding2);
        this.appendHandler('COMMENT', handleComment);
        this.appendHandler('COMMENT_ENDING', handleCommentEnding);
        this.appendHandler('COMMENT_ENDING_2', handleCommentEnding2);
        this.appendHandler('DOCTYPE', handleDoctype);
        this.appendHandler('START_TAG', handleStartTag);
        this.appendHandler('START_TAG_STUFF', handleStartTagStuff);
        this.appendHandler('EMPTY_ELEMENT_TAG', handleEmptyElementTag);
        this.appendHandler('ATTRIBUTE_NAME', handleAttributeName);
        this.appendHandler('ATTRIBUTE_NAME_SAW_WHITE', handleAttributeNameSawWhite);
        this.appendHandler('ATTRIBUTE_EQUAL', handleAttributeEqual);
        this.appendHandler('ATTRIBUTE_VALUE_START', handleAttributeValueStart);
        this.appendHandler('ATTRIBUTE_VALUE_END', handleAttributeValueEnd);
        this.appendHandler('END_TAG', handleEndTag);
        this.appendHandler('END_TAG_SAW_WHITE', handleEndTagSawWhite);
        this.appendHandler('AFTER_DOCUMENT', handleAfterDocument);
    }
    get cx() {
        return this._cx;
    }
    appendHandler(state, handler) {
        this._handlers[state] = handler;
        return this;
    }
    get handlers() {
        return this._handlers;
    }
    set chunk(chunk) {
        this._chunk = chunk;
        this._index = -1;
    }
    hasNext() {
        return this._index < this._chunk.length - 1;
    }
    readNext() {
        this._index += 1;
        const c = this._chunk[this._index];
        if (c === '\n') {
            this._position.line += 1;
            this._position.column = 0;
        } else {
            this._position.column += 1;
        }
        return c;
    }
    get position() {
        return this._position;
    }
}
class SAXParser extends ParserBase {
    _listeners = {};
    _controller;
    fireListeners(event) {
        const [name, ...args] = event;
        const list = this._listeners[name] || [];
        for (const listener of list){
            listener.call(this, ...args);
        }
    }
    run() {
        try {
            while(this.hasNext()){
                const state = this.cx.state;
                const handler = this.handlers[state];
                if (!handler) {
                    throw new Error(`Handler for ${state} not found`);
                }
                const events = handler(this.cx, this.readNext());
                for (const event of events){
                    this.fireListeners(event);
                }
            }
        } catch (e) {
            if (e instanceof XMLParseError) {
                this.fireListeners([
                    'error',
                    e
                ]);
                this._controller?.error(e);
            } else {
                throw e;
            }
        }
    }
    write(chunk, controller) {
        try {
            this._controller = controller;
            this.chunk = new TextDecoder().decode(chunk);
            this.run();
        } finally{
            this._controller = undefined;
        }
    }
    getStream() {
        return new WritableStream(this);
    }
    getWriter() {
        const streamWriter = this.getStream().getWriter();
        return {
            async write (p) {
                await streamWriter.ready;
                await streamWriter.write(p);
                return p.length;
            }
        };
    }
    async parse(source) {
        if (typeof source === 'string') {
            this.chunk = source;
            this.run();
        } else if (source instanceof Uint8Array) {
            this.write(source);
        } else {
            await Deno.copy(source, this.getWriter());
        }
    }
    on(event, listener) {
        const list = this._listeners[event] || [];
        list.push(listener);
        this._listeners[event] = list;
        return this;
    }
}
async function updateSitemap(context, outputFiles, incremental) {
    const outputDir = projectOutputDir(context);
    const filteredOutputFiles = [];
    for (const outputFile of outputFiles){
        if (basename2(outputFile.file) === "index.html") {
            const index = await inputTargetIndexForOutputFile(context, relative2(outputDir, outputFile.file));
            if (index && inputTargetIsEmpty(index)) {
                continue;
            }
        }
        filteredOutputFiles.push(outputFile);
    }
    outputFiles = filteredOutputFiles;
    const robotsTxtPath = join3(context.dir, "robots.txt");
    const srcRobotsTxt = existsSync(robotsTxtPath) ? robotsTxtPath : undefined;
    const destRobotsTxt = join3(outputDir, "robots.txt");
    if (srcRobotsTxt) {
        copyTo(srcRobotsTxt, destRobotsTxt);
    }
    const baseUrlConfig = websiteBaseurl(context.config);
    const sitemapPath = join3(outputDir, "sitemap.xml");
    if (typeof baseUrlConfig === "string") {
        let baseUrl = baseUrlConfig;
        if (!baseUrl.endsWith("/")) {
            baseUrl += "/";
        }
        const fileLoc = (file)=>baseUrl + pathWithForwardSlashes(relative2(outputDir, file));
        const fileLastMod = (file)=>(Deno.statSync(file).mtime || new Date(0)).toISOString();
        const urlsetEntry = (outputFile)=>{
            const file = outputFile.file;
            const isDraft = !!outputFile.format.metadata[kDraft];
            return {
                loc: fileLoc(file),
                lastmod: fileLastMod(file),
                draft: isDraft
            };
        };
        if (!incremental || !existsSync(sitemapPath)) {
            writeSitemap(sitemapPath, outputFiles.map(urlsetEntry));
        } else {
            const urlset = outputFiles.reduce((urlset, outputFile)=>{
                const file = outputFile.file;
                const loc = fileLoc(file);
                const url = urlset.find((url)=>url.loc === loc);
                if (url) {
                    url.lastmod = fileLastMod(file);
                    url.draft = !!outputFile.format.metadata[kDraft];
                } else {
                    urlset.push(urlsetEntry(outputFile));
                }
                return urlset;
            }, await readSitemap(sitemapPath));
            writeSitemap(sitemapPath, urlset);
        }
        if (!srcRobotsTxt) {
            const robotsTxt = `Sitemap: ${baseUrl}sitemap.xml\n`;
            if (!existsSync(destRobotsTxt) || Deno.readTextFileSync(destRobotsTxt) !== robotsTxt) {
                Deno.writeTextFileSync(destRobotsTxt, robotsTxt);
            }
        }
    } else {
        removeIfExists(sitemapPath);
    }
}
async function readSitemap(sitemapPath) {
    const urlset = new Array();
    const parser = new SAXParser();
    let loc;
    let lastmod;
    parser.on("text", (text, element)=>{
        if (element.qName === "loc") {
            loc = text;
        } else if (element.qName == "lastmod") {
            lastmod = text;
        }
    });
    parser.on("end_element", (element)=>{
        if (element.qName === "url" && loc && lastmod) {
            urlset.push({
                loc,
                lastmod
            });
        }
    });
    const reader = await Deno.open(sitemapPath);
    await parser.parse(reader);
    reader.close();
    return urlset;
}
function writeSitemap(sitemapPath, urlset) {
    const nonDraftUrls = urlset.filter((url)=>!url.draft);
    const sitemap = renderEjs(resourcePath(join3("projects", "website", "templates", "sitemap.ejs.xml")), {
        urlset: nonDraftUrls
    });
    Deno.writeTextFileSync(sitemapPath, sitemap);
}
const kAliases = "aliases";
async function updateAliases(context, outputFiles, incremental) {
    const redirectMap = {};
    const allOutputFiles = [];
    const outputDir = projectOutputDir(context);
    for (const outputFile of outputFiles){
        const aliases = outputFile.format.metadata[kAliases];
        if (aliases && Array.isArray(aliases)) {
            addRedirectsToMap(aliases, outputFile.file, outputDir, true, redirectMap);
        }
    }
    if (Object.keys(redirectMap).length > 0) {
        for (const file of context.files.input){
            const relativePath = relative2(context.dir, file);
            const inputIndexEntry = await inputTargetIndex(context, relativePath);
            if (inputIndexEntry) {
                const format = Object.values(inputIndexEntry.formats)[0];
                const outputTarget = await resolveInputTarget(context, relativePath, false);
                if (outputTarget) {
                    const fileFullPath = context.config?.project[kProjectOutputDir] !== undefined ? join3(context.config?.project[kProjectOutputDir], outputTarget.outputHref) : outputTarget.outputHref;
                    allOutputFiles.push(join3(context.dir, fileFullPath));
                    if (incremental) {
                        const aliases1 = format.metadata[kAliases];
                        if (aliases1 && Array.isArray(aliases1)) {
                            addRedirectsToMap(aliases1, join3(outputDir, outputTarget.outputHref), outputDir, false, redirectMap);
                        }
                    }
                }
            }
        }
    }
    for (const targetFile of Object.keys(redirectMap)){
        const targetHrefs = redirectMap[targetFile];
        const redirects = {};
        for (const targetHref of targetHrefs){
            const aliasHref = relative2(dirname2(targetFile), targetHref.outputFile);
            redirects[targetHref.hash || ""] = aliasHref;
        }
        if (!existsSync(targetFile)) {
            ensureDirSync(dirname2(targetFile));
        }
        if (allOutputFiles.find((outputFile)=>outputFile === targetFile)) {
            warning(`Aliases that you have created would overwrite the output file ${targetFile}. The aliases file was not created.`);
        } else {
            writeMultipleRedirectPage(targetFile, redirects);
        }
    }
}
function addRedirectsToMap(aliases, outputFile, outputDir, allowNewAnchors, anchorMap) {
    for (const alias of aliases){
        const anchor = toAnchor(alias, outputFile);
        const aliasTarget = anchor.href.startsWith("/") ? join3(outputDir, anchor.href.slice(1)) : join3(dirname2(outputFile), anchor.href);
        if (allowNewAnchors && !anchorMap[aliasTarget]) {
            anchorMap[aliasTarget] = [];
        }
        if (anchorMap[aliasTarget]) {
            anchorMap[aliasTarget].push(anchor);
        }
    }
}
function toAnchor(url, outputFile) {
    const fixupHref = (href)=>{
        if (href.endsWith("/")) {
            return `${href}index.html`;
        } else if (extname2(href) === "") {
            return `${href}/index.html`;
        } else {
            return href;
        }
    };
    if (url.includes("#")) {
        const anchorParts = url.split("#");
        return {
            href: fixupHref(anchorParts[0]),
            outputFile,
            hash: anchorParts[1]
        };
    } else {
        return {
            href: fixupHref(url),
            outputFile
        };
    }
}
function writeMultipleRedirectPage(path, redirects) {
    const redirectTemplate = resourcePath("projects/website/templates/redirect-map.ejs");
    const redirectHtml = renderEjs(redirectTemplate, {
        redirects
    });
    Deno.writeTextFileSync(path, redirectHtml);
}
const kPreviewImgClass = "preview-image";
const kNamedFilePattern = "(.*?(?:preview|feature|cover|thumbnail).*?(?:\\.png|\\.gif|\\.jpg|\\.jpeg|\\.webp))";
const kPreviewClassPattern = `!\\[[^\\]]*\\]\\((.*?)(?:\\".*\\")?\\)\\{[^\\|]*\\.${kPreviewImgClass}[\\s\\}]+`;
const kMdNamedImagePattern = `!\\[[^\\]]*\\]\\(${kNamedFilePattern}(?:\\".*\\")?\\)(?:\\{[^\\|]*\.*[\\s\\}]+)?`;
const kNamedFileRegex = RegExp(kNamedFilePattern);
const kMdPreviewClassRegex = RegExp(kPreviewClassPattern);
const kMdNamedImageRegex = RegExp(kMdNamedImagePattern);
const kMarkdownImg = /!\[[^\]]*\]\((.*?)(?:\".*\")?\)(?:\{(?:[^\|]*)\})?/;
function findDescription(doc) {
    const paras = doc.querySelectorAll("main.content > p,  main.content > section > p");
    for (const para of paras){
        const paraEl = para;
        if (paraEl.innerText) {
            return paraEl.innerText;
        }
    }
    return undefined;
}
function findPreviewImg(doc) {
    let image = undefined;
    const match = doc.querySelector(`img.${kPreviewImgClass}`);
    if (match) {
        const src = getDecodedAttribute(match, "src");
        if (src !== null) {
            image = src;
        }
    }
    if (image == undefined) {
        const imgs = doc.querySelectorAll("img");
        for(let i1 = 0; i1 < imgs.length; i1++){
            const img = imgs[i1];
            const src1 = getDecodedAttribute(img, "src");
            if (src1 !== null && kNamedFileRegex.test(src1)) {
                image = src1;
                break;
            }
        }
    }
    return image;
}
function estimateReadingTimeMinutes(markdown) {
    if (markdown) {
        const wordCount = markdown.split(" ").length;
        return wordCount / 200;
    }
    return 0;
}
function findPreviewImgMd(markdown) {
    if (markdown) {
        const explicitMatch = markdown.match(kMdPreviewClassRegex);
        if (explicitMatch) {
            return explicitMatch[1];
        }
        const fileNameMatch = markdown.match(kMdNamedImageRegex);
        if (fileNameMatch) {
            return fileNameMatch[1];
        }
        const match = markdown.match(kMarkdownImg);
        if (match) {
            return match[1];
        }
    }
    return undefined;
}
function imageSize(path) {
    if (path !== undefined) {
        if (path.endsWith(".png")) {
            if (existsSync(path)) {
                const imageData = Deno.readFileSync(path);
                try {
                    const png = new PngImage(imageData);
                    return {
                        height: png.height,
                        width: png.width
                    };
                } catch (error) {
                    throw new Error(`Error reading file ${path}\n${error.message}`);
                }
            }
        }
    }
}
function imageContentType(path) {
    const ext = extname2(path);
    return kimageTypes[ext];
}
const kimageTypes = {
    ".apng": "image/apng",
    ".avif": "image/avif",
    ".gif": "image/gif",
    ".jpg": "image/jpeg",
    ".jpeg": "image/jpeg",
    ".jfif": "image/jpeg",
    ".pjpeg": "image/jpeg",
    ".pjp": "image/jpeg",
    ".png": "image/png",
    ".svg": "image/svg+xml",
    ".webp": "image/webp"
};
function joinUrl(baseUrl, path) {
    const baseHasSlash = baseUrl.endsWith("/");
    const pathHasSlash = path.startsWith("/");
    if (baseHasSlash && pathHasSlash) {
        return `${baseUrl}${path.slice(1)}`;
    } else if (!baseHasSlash && !pathHasSlash) {
        return `${baseUrl}/${path}`;
    } else {
        return `${baseUrl}${path}`;
    }
}
function ensureProtocolAndTrailingSlash(url) {
    if (!url.startsWith("http")) {
        url = `https://${url}`;
    }
    url = ensureTrailingSlash(url);
    return url;
}
const kCard = "card";
function metadataHtmlDependencies(source, project, format, extras) {
    const pipeline = metaMarkdownPipeline(format, extras);
    return {
        [kHtmlPostprocessors]: metadataHtmlPostProcessor(source, project, format, extras, pipeline),
        [kMarkdownAfterBody]: pipeline.markdownAfterBody()
    };
}
function metadataHtmlPostProcessor(source, project, format, extras, pipeline) {
    return (doc)=>{
        const pageMeta = pageMetadata(format, extras);
        const openGraphMetadataProvider = {
            key: kOpenGraph,
            prefix: "og",
            metadata: {
                ...pageMeta,
                ...opengraphMetadata(format)
            },
            filter: (key)=>{
                if ([
                    kImageHeight,
                    kImageWidth,
                    kImageAlt
                ].includes(key)) {
                    return key.replace("-", ":");
                }
                return key;
            },
            resolveValue: (key, value)=>{
                if ([
                    kDescription
                ].includes(key)) {
                    return truncateText(value.trim(), 200, "punctuation");
                }
                return value;
            }
        };
        const twitterMetadataProvider = {
            key: kTwitterCard,
            prefix: "twitter",
            metadata: {
                ...pageMeta,
                ...twitterMetadata(format)
            },
            filter: (key)=>{
                if (key === kCardStyle) {
                    return kCard;
                }
                if ([
                    kImageAlt
                ].includes(key)) {
                    return key.replace("-", ":");
                }
                return key;
            },
            resolveValue: (key, value)=>{
                if ([
                    kDescription
                ].includes(key)) {
                    return truncateText(value.trim(), 200, "punctuation");
                }
                return value;
            },
            resolveDefaults: (finalMetadata)=>{
                if (finalMetadata[kCardStyle] === undefined) {
                    finalMetadata[kCardStyle] = finalMetadata[kImage] ? "summary_large_image" : "summary";
                }
            }
        };
        const resources = [];
        [
            openGraphMetadataProvider,
            twitterMetadataProvider, 
        ].forEach((provider)=>{
            const metadata = provider.metadata;
            const siteMeta = format.metadata[kWebsite];
            if (!format.metadata[provider.key] && (!siteMeta || !siteMeta[provider.key])) {
                return;
            }
            if (metadata[kTitle] === undefined) {
                return;
            }
            if (metadata[kImage] === undefined) {
                metadata[kImage] = findPreviewImg(doc);
            }
            if (metadata[kDescription] === undefined) {
                metadata[kDescription] = findDescription(doc);
            }
            const imagePath = resolveImageMetadata(source, project, format, metadata);
            if (imagePath) {
                resources.push(imagePath);
            }
            if (provider.resolveDefaults) {
                provider.resolveDefaults(metadata);
            }
            Object.keys(metadata).forEach((key)=>{
                if (metadata[key] !== undefined) {
                    const data = metadata[key];
                    const value = provider.resolveValue ? provider.resolveValue(key, data) : data;
                    if (provider.filter) {
                        key = provider.filter(key);
                    }
                    writeMetaTag(`${provider.prefix}:${key}`, value, doc);
                }
            });
        });
        pipeline.processRenderedMarkdown(doc);
        return Promise.resolve({
            resources,
            supporting: []
        });
    };
}
function opengraphMetadata(format) {
    const metadata = {};
    const openGraph = mergedSiteAndDocumentData(kOpenGraph, format);
    const siteMeta = format.metadata[kWebsite];
    if (siteMeta && siteMeta[kTitle]) {
        metadata[kSiteName] = siteMeta[kTitle];
    }
    if (openGraph && typeof openGraph === "object") {
        [
            kTitle,
            kDescription,
            kImage,
            kImageHeight,
            kImageWidth,
            kLocale,
            kSiteName, 
        ].forEach((key)=>{
            if (openGraph[key] !== undefined) {
                metadata[key] = openGraph[key];
            }
        });
    }
    return metadata;
}
function twitterMetadata(format) {
    const metadata = {};
    const twitterData = mergedSiteAndDocumentData(kTwitterCard, format);
    if (twitterData && typeof twitterData === "object") {
        [
            kTitle,
            kDescription,
            kImage,
            kCreator,
            kTwitterSite,
            kCardStyle
        ].forEach((key)=>{
            if (twitterData[key] !== undefined) {
                metadata[key] = twitterData[key];
            }
        });
    }
    return metadata;
}
function pageMetadata(format, extras) {
    const pageTitle = computePageTitle(format, extras);
    const pageDescription = format.metadata[kDescription];
    const pageImage = format.metadata[kImage];
    return {
        [kTitle]: pageTitle,
        [kDescription]: pageDescription || format.metadata[kAbstract] || format.metadata[kSubtitle],
        [kImage]: pageImage
    };
}
function resolveImageMetadata(source, project, format, metadata) {
    const siteMeta = format.metadata[kWebsite];
    if (metadata[kImage] && siteMeta && siteMeta[kSiteUrl] !== undefined) {
        const imgMeta = imageMetadata(metadata[kImage], siteMeta[kSiteUrl], source, project);
        metadata[kImage] = imgMeta.href;
        metadata[kImageHeight] = imgMeta.height;
        metadata[kImageWidth] = imgMeta.width;
        const altText = format.metadata[kImageAlt];
        if (altText && !metadata[kImageAlt]) {
            metadata[kImageAlt] = altText;
        }
        return imgMeta.path;
    }
}
function mergedSiteAndDocumentData(key, format) {
    const siteData = format.metadata[kWebsite];
    const siteMetadata = siteData && siteData[key] !== undefined ? siteData[key] : false;
    const docMetadata = format.metadata[key] !== undefined ? format.metadata[key] : false;
    if (typeof siteMetadata === "object" && typeof docMetadata === "object") {
        return mergeConfigs(siteMetadata, docMetadata);
    } else if (docMetadata !== false) {
        return docMetadata;
    } else if (siteMetadata !== false) {
        return siteMetadata;
    } else {
        return false;
    }
}
function imageMetadata(image, baseUrl, source, context) {
    if (isAbsoluteRef(image)) {
        return {
            href: image
        };
    } else if (image.startsWith("/")) {
        const imagePath = join3(context.dir, image.slice(1));
        const size = imageSize(imagePath);
        return {
            path: image,
            href: `${baseUrl}${image}`,
            height: size?.height,
            width: size?.width
        };
    } else {
        const sourceRelative = relative2(context.dir, source);
        const imageProjectRelative = join3(dirname2(sourceRelative), image);
        const imagePath1 = join3(context.dir, imageProjectRelative);
        const size1 = imageSize(imagePath1);
        return {
            path: imageProjectRelative,
            href: joinUrl(baseUrl, imageProjectRelative),
            height: size1?.height,
            width: size1?.width
        };
    }
}
const kMetaTitleId = "quarto-metatitle";
const kTwitterTitle = "quarto-twittercardtitle";
const kTwitterDesc = "quarto-twittercarddesc";
const kOgTitle = "quarto-ogcardtitle";
const kOgDesc = "quarto-ogcardddesc";
const kMetaSideNameId = "quarto-metasitename";
function metaMarkdownPipeline(format, extras) {
    const titleMetaHandler = {
        getUnrendered () {
            const inlines = {};
            const resolvedTitle = computePageTitle(format);
            if (resolvedTitle !== undefined) {
                inlines[kMetaTitleId] = resolvedTitle;
            }
            const twitterMeta = twitterMetadata(format);
            inlines[kTwitterTitle] = twitterMeta.title || resolvedTitle || "";
            const ogMeta = opengraphMetadata(format);
            inlines[kOgTitle] = ogMeta.title || resolvedTitle || "";
            return {
                inlines
            };
        },
        processRendered (rendered, doc) {
            const renderedEl = rendered[kMetaTitleId];
            if (renderedEl) {
                const el = doc.querySelector(`head title`);
                if (el) {
                    el.innerHTML = renderedEl.innerText;
                }
            }
            [
                {
                    key: kOgTitle,
                    sel: 'meta[property="og:title"]'
                },
                {
                    key: kTwitterTitle,
                    sel: 'meta[name="twitter:title"]'
                }
            ].forEach((obj)=>{
                const renderedObjEl = rendered[obj.key];
                if (renderedObjEl) {
                    const metaEl = doc.querySelector(obj.sel);
                    if (metaEl) {
                        metaEl.setAttribute("content", renderedObjEl.innerText);
                    }
                }
            });
        }
    };
    const siteTitleMetaHandler = {
        getUnrendered () {
            const siteMeta = format.metadata[kWebsite];
            if (siteMeta && siteMeta[kTitle]) {
                return {
                    inlines: {
                        [kMetaSideNameId]: siteMeta[kTitle]
                    }
                };
            }
        },
        processRendered (rendered, doc) {
            const renderedEl = rendered[kMetaSideNameId];
            if (renderedEl) {
                const el = doc.querySelector(`meta[name="og:site-name"]`);
                if (el) {
                    el.setAttribute("content", renderedEl.innerText);
                }
            }
        }
    };
    const descriptionMetaHandler = {
        getUnrendered () {
            const inlines = {};
            const pageMeta = pageMetadata(format, extras);
            const description = pageMeta.description;
            const twitterMeta = twitterMetadata(format);
            inlines[kTwitterDesc] = twitterMeta.title || description || "";
            const ogMeta = opengraphMetadata(format);
            inlines[kOgDesc] = ogMeta.title || description || "";
            if (description !== undefined) {
                return inlines;
            }
        },
        processRendered (rendered, doc) {
            const metaVals = [
                {
                    sel: 'meta[property="og:description"]',
                    key: kTwitterDesc
                },
                {
                    sel: 'meta[name="twitter:description"]',
                    key: kOgDesc
                }
            ];
            metaVals.forEach((metaVal)=>{
                const renderedEl = rendered[metaVal.key];
                if (renderedEl) {
                    const metaEl = doc.querySelector(metaVal.sel);
                    if (metaEl) {
                        metaEl.setAttribute("content", renderedEl.innerText);
                    }
                }
            });
        }
    };
    return createMarkdownPipeline("quarto-meta-markdown", [
        titleMetaHandler,
        siteTitleMetaHandler,
        descriptionMetaHandler, 
    ]);
}
function htmlResourceResolverPostprocessor(source, project, pathResolver) {
    const sourceRelative = relative2(project.dir, source);
    const offset = projectOffset(project, source);
    const href = inputFileHref(sourceRelative);
    return (doc)=>{
        const forceRoot = href === "/404.html" ? websitePath(project.config) : null;
        const resolver = pathResolver ? pathResolver : (href, projectOffset)=>{
            return pathWithForwardSlashes(join3(projectOffset, href));
        };
        const refs = resolveResourceRefs(doc, offset, forceRoot, pathResolver || resolver);
        return Promise.resolve({
            resources: refs,
            supporting: []
        });
    };
}
function resolveResourceRefs(doc, projectOffset, forceRoot, resolvePath) {
    const refs = [];
    Object.keys(kHtmlResourceTags).forEach((tag)=>{
        for (const attrib of kHtmlResourceTags[tag]){
            refs.push(...resolveTag(doc, projectOffset, tag, attrib, forceRoot, resolvePath).map((ref)=>ref.replace(/\/$/, "/index.html")));
        }
    });
    const styles = doc.querySelectorAll("style");
    for(let i1 = 0; i1 < styles.length; i1++){
        const style = styles[i1];
        if (style.innerHTML) {
            style.innerHTML = fixupCssReferences1(style.innerHTML, projectOffset + "/", (ref)=>{
                ref = resolvePath(ref, projectOffset);
                refs.push(ref);
                return ref;
            });
        }
    }
    return refs;
}
function resolveTag(doc, projectOffset, tag, attrib, forceRoot, resolvePath) {
    const refs = [];
    processFileResourceRefs(doc, tag, attrib, (tag, href)=>{
        if (forceRoot) {
            if (!href.startsWith("/")) {
                tag.setAttribute(attrib, forceRoot + href);
            } else if (!href.startsWith(forceRoot)) {
                tag.setAttribute(attrib, forceRoot + href.slice(1));
            }
        } else if (href.startsWith("/") && !href.startsWith("//")) {
            href = resolvePath(projectOffset + href, projectOffset);
            tag.setAttribute(attrib, href);
        } else {
            href = resolvePath(href, projectOffset);
            tag.setAttribute(attrib, href);
        }
        refs.push(href);
    });
    return refs;
}
const kListing = "listing";
const kFields = "fields";
const kFieldDisplayNames = "field-display-names";
const kFieldTypes = "field-types";
const kFieldLinks = "field-links";
const kFieldRequired = "field-required";
const kFieldSort = "field-sort";
const kFieldFilter = "field-filter";
const kPageSize = "page-size";
const kMaxItems = "max-items";
const kFilterUi = "filter-ui";
const kSortUi = "sort-ui";
const kImageHeight1 = "image-height";
const kImageAlign = "image-align";
const kImageAlt1 = "image-alt";
const kImagePlaceholder = "image-placeholder";
const kGridColumns = "grid-columns";
const kMaxDescLength = "max-description-length";
const kDefaultMaxDescLength = 175;
const kTableStriped = "table-striped";
const kTableHover = "table-hover";
const kFieldTitle = "title";
const kFieldSubtitle = "subtitle";
const kFieldAuthor = "author";
const kFieldFileName = "filename";
const kFieldFileModified = "file-modified";
const kFieldDate = "date";
const kFieldImage = "image";
const kFieldImageAlt = "image-alt";
const kFieldDescription = "description";
const kFieldReadingTime = "reading-time";
const kFieldCategories = "categories";
const kFieldOrder = "order";
const kCategoryStyle = "category-style";
const kSortAsc = "asc";
const kSortDesc = "desc";
const kFeed = "feed";
const kItems = "items";
const kDescription1 = "description";
var ListingType;
(function(ListingType) {
    ListingType["Default"] = "default";
    ListingType["Grid"] = "grid";
    ListingType["Table"] = "table";
    ListingType["Custom"] = "custom";
})(ListingType || (ListingType = {}));
var ListingItemSource;
(function(ListingItemSource) {
    ListingItemSource["document"] = "document";
    ListingItemSource["metadata"] = "metadata";
    ListingItemSource["rawfile"] = "rawfile";
})(ListingItemSource || (ListingItemSource = {}));
const kInlineCodeStyle = "inline-code-style";
const kUrlsToAbsolute = "urls-to-absolute";
const renderedContentReader = (project, options, siteUrl)=>{
    const renderedContent = {};
    return (filePath, renderedOptions)=>{
        const cacheStr = renderedOptions ? JSON.stringify(renderedOptions) + filePath : filePath;
        const cacheHash = insecureHash(cacheStr);
        const mergedOptions = {
            ...options,
            ...renderedOptions
        };
        if (!renderedContent[cacheHash]) {
            renderedContent[cacheHash] = readRenderedContents(filePath, project, mergedOptions, siteUrl);
        }
        return renderedContent[cacheHash];
    };
};
const absoluteUrl = (siteUrl, url)=>{
    if (url.startsWith("http:") || url.startsWith("https:")) {
        return url;
    } else {
        const baseUrl = siteUrl.endsWith("/") ? siteUrl.substring(0, siteUrl.length - 1) : siteUrl;
        const path = url.startsWith("/") ? url.substring(1, url.length) : url;
        return `${baseUrl}/${path.replaceAll("\\", "/")}`;
    }
};
function readRenderedContents(filePath, project, options, siteUrl) {
    const htmlInput = Deno.readTextFileSync(filePath);
    const doc = new DOMParser().parseFromString(htmlInput, "text/html");
    const fileRelPath = relative2(projectOutputDir(project), filePath);
    const fileRelFolder = dirname2(fileRelPath);
    const mainEl = doc.querySelector("main.content");
    const titleEl = doc.getElementById("title-block-header");
    const titleText = titleEl?.querySelector("h1.title")?.innerText;
    if (titleEl) {
        titleEl.remove();
    }
    const navEls = doc.querySelectorAll("nav");
    if (navEls) {
        for (const navEl of navEls){
            navEl.remove();
        }
    }
    if (options.transform?.[kUrlsToAbsolute] && siteUrl) {
        const imgNodes = doc.querySelectorAll("img");
        if (imgNodes) {
            for (const imgNode of imgNodes){
                const imgEl = imgNode;
                let src = imgEl.getAttribute("src");
                if (src) {
                    if (!src.startsWith("/")) {
                        src = join3(fileRelFolder, src);
                    }
                    imgEl.setAttribute("src", absoluteUrl(siteUrl, src));
                }
            }
        }
    }
    const stripSelectors = [
        '*[aria-hidden="true"]',
        "button.code-copy-button"
    ];
    stripSelectors.forEach((sel)=>{
        const nodes = doc.querySelectorAll(sel);
        nodes?.forEach((node)=>{
            node.remove();
        });
    });
    const stripAttrs = [
        "role", 
    ];
    stripAttrs.forEach((attr)=>{
        const nodes = doc.querySelectorAll(`[${attr}]`);
        nodes?.forEach((node)=>{
            const el = node;
            el.removeAttribute(attr);
        });
    });
    const stripTags = [];
    if (options.remove?.images) {
        stripTags.push("img");
    }
    stripTags.forEach((tag)=>{
        const nodes = doc.querySelectorAll(`${tag}`);
        nodes?.forEach((node)=>{
            const el = node;
            el.remove();
        });
    });
    if (options.remove?.anchors) {
        const relativeLinkSel = 'a[href^="#"]';
        const linkNodes = doc.querySelectorAll(relativeLinkSel);
        linkNodes.forEach((linkNode)=>{
            const nodesToMove = linkNode.childNodes;
            linkNode.after(...nodesToMove);
            linkNode.remove();
        });
    }
    if (options.transform?.[kInlineCodeStyle]) {
        const highlightingMap = defaultSyntaxHighlightingClassMap();
        const spanNodes = doc.querySelectorAll("code span");
        for (const spanNode of spanNodes){
            const spanEl = spanNode;
            for (const clz of spanEl.classList){
                const styles = highlightingMap[clz];
                if (styles) {
                    spanEl.setAttribute("style", styles.join("\n"));
                    break;
                }
            }
        }
        const codeStyle = "background: #f1f3f5;";
        const codeBlockNodes = doc.querySelectorAll("div.sourceCode");
        for (const codeBlockNode of codeBlockNodes){
            const codeBlockEl = codeBlockNode;
            codeBlockEl.setAttribute("style", codeStyle);
        }
    }
    if (options.transform?.math) {
        const trimMath = (str)=>{
            if (str.length > 4 && (str.startsWith("\\[") || str.startsWith("\\("))) {
                const trimStart = str.slice(2);
                return trimStart.slice(0, trimStart.length - 2);
            } else {
                return str;
            }
        };
        const mathNodes = doc.querySelectorAll("span.math");
        for (const mathNode of mathNodes){
            const mathEl = mathNode;
            const math = trimMath(mathEl.innerText);
            const imgEl1 = doc.createElement("IMG");
            imgEl1.setAttribute("src", kWebTexUrl(math));
            mathNode.parentElement?.replaceChild(imgEl1, mathNode);
        }
    }
    if (options.remove?.links) {
        const relativeLinkSel1 = "a";
        const linkNodes1 = doc.querySelectorAll(relativeLinkSel1);
        linkNodes1.forEach((linkNode)=>{
            const nodesToMove = linkNode.childNodes;
            linkNode.after(...nodesToMove);
            linkNode.remove();
        });
    }
    const replaceTagRegex = /\/tag\{(.*)\}/g;
    const cleanMath = (contents)=>{
        if (!contents) {
            return undefined;
        } else {
            return contents.replaceAll(replaceTagRegex, (_match, content)=>{
                return `\\qquad{${content}}`;
            });
        }
    };
    const truncateNode = (node, maxLen)=>{
        if (maxLen === undefined || maxLen < 0) {
            return node;
        }
        let currentLength = 0;
        const shortenNode = (node)=>{
            const cloned = node.cloneNode(true);
            for (const childNode of cloned.childNodes){
                if (childNode.nodeType === NodeType.TEXT_NODE) {
                    const textNodeLen = childNode.nodeValue?.length || 0;
                    if (currentLength > maxLen) {
                        cloned.replaceChild(doc.createTextNode(""), childNode);
                    } else if (currentLength + textNodeLen > maxLen) {
                        const nodeMaxLen = Math.min(maxLen, currentLength + textNodeLen - maxLen);
                        cloned.replaceChild(doc.createTextNode(truncateText(childNode.nodeValue || "", nodeMaxLen, "space")), childNode);
                    }
                    currentLength = textNodeLen + currentLength;
                } else {
                    const newNode = shortenNode(childNode);
                    cloned.replaceChild(newNode, childNode);
                }
            }
            return cloned;
        };
        return shortenNode(node);
    };
    const getFirstPara = ()=>{
        const paraNodes = mainEl?.querySelectorAll("p");
        if (paraNodes) {
            for (const paraNode of paraNodes){
                const truncatedNode = truncateNode(paraNode, options["max-length"]);
                const paraContents = cleanMath(truncatedNode.innerHTML);
                if (paraContents) {
                    return paraContents;
                }
            }
        }
        return undefined;
    };
    const firstPara = getFirstPara();
    const fullContents = cleanMath(mainEl?.innerHTML);
    return {
        title: titleText,
        fullContents,
        firstPara
    };
}
const kWebTexUrl = (math, type = "png")=>{
    const encodedMath = encodeURI(math);
    return `https://latex.codecogs.com/${type}.latex?${encodedMath}`;
};
function localizedString(format, key, options) {
    if (options) {
        let formattedStr = format.language[key];
        for(let i1 = 0; i1 < options.length; i1++){
            const option = options[i1];
            formattedStr = formattedStr.replace(`{${i1}}`, option);
        }
        return formattedStr;
    } else {
        return format.language[key];
    }
}
const kDefaultListingType = ListingType.Default;
const kDefaultContentsGlobToken = "B3049D40";
const kDefaultContentsGlob = [
    kDefaultContentsGlobToken
];
const kDefaultId = "listing";
const kDefaultTableFields = [
    kFieldDate,
    kFieldTitle,
    kFieldAuthor, 
];
const kDefaultGridFields = [
    kFieldTitle,
    kFieldAuthor,
    kFieldDate,
    kFieldImage,
    kFieldDescription, 
];
const kDefaultFields = [
    kFieldDate,
    kFieldTitle,
    kFieldAuthor,
    kFieldSubtitle,
    kFieldImage,
    kFieldDescription, 
];
const defaultFieldDisplayNames = (format)=>{
    return {
        [kFieldImage]: " ",
        [kFieldDate]: format.language[kListingPageFieldDate] || "",
        [kFieldTitle]: format.language[kListingPageFieldTitle] || "",
        [kFieldDescription]: format.language[kListingPageFieldDescription] || "",
        [kFieldAuthor]: format.language[kListingPageFieldAuthor] || "",
        [kFieldFileName]: format.language[kListingPageFieldFileName] || "",
        [kFieldFileModified]: format.language[kListingPageFieldFileModified] || "",
        [kFieldSubtitle]: format.language[kListingPageFieldSubtitle] || "",
        [kFieldReadingTime]: format.language[kListingPageFieldReadingTime] || "",
        [kFieldCategories]: format.language[kListingPageFieldCategories] || ""
    };
};
const kDefaultFieldTypes = {
    [kFieldDate]: "date",
    [kFieldFileModified]: "date",
    [kFieldReadingTime]: "minutes"
};
const kDefaultFieldLinks = [
    kFieldTitle,
    kFieldFileName
];
const kDefaultFieldSort = [
    kFieldTitle,
    kFieldDate,
    kFieldAuthor,
    kFieldFileName,
    kFieldFileModified, 
];
const kDefaultFieldRequired = [];
async function readListings(source, project, format) {
    const listingItems = [];
    const listings = readDehydratedListings(source, format);
    const firstListingValue = (key, defaultValue)=>{
        for (const listing of listings){
            const value = listing[key];
            if (value !== undefined) {
                return value;
            }
        }
        return defaultValue;
    };
    const categories = firstListingValue(kFieldCategories, false);
    const parseCategoryStyle = (categories)=>{
        if (typeof categories === "string") {
            switch(categories){
                case "unnumbered":
                    return "category-unnumbered";
                case "cloud":
                    return "category-cloud";
                default:
                case "default":
                    return "category-default";
            }
        } else {
            return "category-default";
        }
    };
    const categoryStyle = parseCategoryStyle(categories);
    const sharedOptions = {
        [kFieldCategories]: !!categories,
        [kCategoryStyle]: categoryStyle
    };
    const feed = firstListingValue(kFeed, undefined);
    if (feed !== undefined) {
        if (typeof feed === "object") {
            sharedOptions[kFeed] = feed;
        } else if (feed) {
            sharedOptions[kFeed] = {
                type: "full"
            };
        }
    }
    for (const listing of listings){
        const { items , sources  } = await readContents(source, project, listing);
        const listingHydrated = hydrateListing(format, listing, items, sources, sharedOptions);
        const sortedAndFiltered = (listing, items)=>{
            if (listing.sort && listing.sort.length > 0) {
                return __VIRTUAL_FILE217(items, listing.sort.map((l1)=>{
                    return (item)=>{
                        const value = item[l1.field];
                        if (value === undefined && l1.field === kFieldOrder) {
                            if (l1.direction === "asc") {
                                return Number.MAX_SAFE_INTEGER;
                            } else {
                                return 0;
                            }
                        } else {
                            return value;
                        }
                    };
                }), listing.sort.map((l1)=>l1.direction));
            } else {
                return items;
            }
        };
        const orderedItems = sortedAndFiltered(listingHydrated, items);
        listingItems.push({
            listing: listingHydrated,
            items: orderedItems
        });
    }
    return {
        listingDescriptors: listingItems,
        options: sharedOptions
    };
}
function completeListingDescriptions(context, outputFiles, _incremental) {
    const options = {
        remove: {
            links: true,
            images: true
        }
    };
    const contentReader = renderedContentReader(context, options);
    outputFiles.forEach((outputFile)=>{
        if (outputFile.format.metadata[kListing]) {
            let fileContents = Deno.readTextFileSync(outputFile.file);
            const regex = descriptionPlaceholderRegex;
            regex.lastIndex = 0;
            let match = regex.exec(fileContents);
            while(match){
                const maxDescLength = parseInt(match[1]);
                const relativePath = match[2];
                const absolutePath = join3(projectOutputDir(context), relativePath);
                const placeholder = descriptionPlaceholder(relativePath, maxDescLength);
                if (existsSync(absolutePath)) {
                    const options = maxDescLength > 0 ? {
                        "max-length": maxDescLength
                    } : {};
                    const contents = contentReader(absolutePath, options);
                    fileContents = fileContents.replace(placeholder, contents.firstPara || "");
                } else {
                    fileContents = fileContents.replace(placeholder, "");
                    warning(`Unable to read listing item description from ${relativePath}`);
                }
                match = regex.exec(fileContents);
            }
            regex.lastIndex = 0;
            Deno.writeTextFileSync(outputFile.file, fileContents);
        }
    });
}
function descriptionPlaceholder(file, maxLength) {
    return file ? `<!-- desc(5A0113B34292)[max=${maxLength}]:${file} -->` : "";
}
function isPlaceHolder(text) {
    return text.match(descriptionPlaceholderRegex);
}
const descriptionPlaceholderRegex = /<!-- desc\(5A0113B34292\)\[max\=(.*)\]:(.*) -->/;
function hydrateListing(format, listing, items, sources, options) {
    const fieldsForItems = (items)=>{
        const unionedItem = items.reduce((prev, current)=>{
            const item = {
                ...prev
            };
            for (const key of Object.keys(current)){
                if (current[key] !== undefined) {
                    item[key] = current[key];
                }
            }
            return item;
        }, {});
        return Object.keys(unionedItem).filter((key)=>{
            return unionedItem[key] !== undefined;
        });
    };
    const itemFields = fieldsForItems(items);
    const suggestFields = (type, itemFields)=>{
        if (sources.size === 1 && sources.has(ListingItemSource.rawfile)) {
            return [
                kFieldFileName,
                kFieldFileModified
            ];
        } else if (!sources.has(ListingItemSource.document)) {
            return itemFields;
        } else {
            return defaultFields(type, itemFields);
        }
    };
    const suggestedFields = suggestFields(listing.type, itemFields);
    const fields = suggestedFields.filter((field)=>{
        return itemFields.includes(field);
    });
    const finalFields = fields.length > 0 ? fields : itemFields;
    const defaultSort = listing.type !== ListingType.Custom && listing.type !== ListingType.Table ? kDefaultFieldSort : suggestedFields;
    const defaultLinks = listing.type === ListingType.Table ? kDefaultFieldLinks : [];
    const defaultPageSize = ()=>{
        switch(listing.type){
            case ListingType.Table:
                return 30;
            case ListingType.Grid:
                return 18;
            default:
            case ListingType.Default:
                return 25;
        }
    };
    const hydratedFields = [
        ...finalFields
    ];
    if (options[kFieldCategories] && (listing.type === ListingType.Grid || listing.type === ListingType.Default)) {
        if (!hydratedFields.includes(kFieldCategories)) {
            hydratedFields.push(kFieldCategories);
        }
    }
    const listingHydrated = __VIRTUAL_FILE107({
        fields: hydratedFields,
        [kFieldDisplayNames]: {},
        [kFieldTypes]: kDefaultFieldTypes,
        [kFieldLinks]: defaultLinks,
        [kFieldSort]: defaultSort,
        [kFieldFilter]: hydratedFields,
        [kFieldRequired]: kDefaultFieldRequired,
        [kPageSize]: defaultPageSize(),
        [kFilterUi]: listing[kFilterUi] !== undefined ? listing[kFilterUi] : listing.type === ListingType.Table,
        [kSortUi]: listing[kSortUi] !== undefined ? listing[kSortUi] : listing.type === ListingType.Table,
        ...listing
    });
    const sort = hydratedFields.includes(kFieldTitle) ? [
        {
            field: kFieldOrder,
            direction: "asc"
        },
        {
            field: kFieldTitle,
            direction: "asc"
        }, 
    ] : undefined;
    if (sort && !listingHydrated.sort && sources.has(ListingItemSource.document)) {
        listingHydrated.sort = sort;
    }
    const sortUi = listingHydrated[kSortUi];
    if (sortUi && Array.isArray(sortUi)) {
        listingHydrated[kFieldSort] = sortUi;
    }
    const filterUi = listingHydrated[kFilterUi];
    if (filterUi && Array.isArray(filterUi)) {
        listingHydrated[kFieldFilter] = filterUi;
    }
    if (listing.type === ListingType.Grid) {
        listingHydrated[kGridColumns] = listingHydrated[kGridColumns] || 3;
        listingHydrated[kImageHeight1] = listingHydrated[kImageHeight1] || "150px";
        listingHydrated[kMaxDescLength] = listingHydrated[kMaxDescLength] || kDefaultMaxDescLength;
    } else if (listing.type === ListingType.Default) {
        listingHydrated[kImageAlign] = listingHydrated[kImageAlign] || "right";
    } else if (listing.type === ListingType.Table) {
        listingHydrated[kImageHeight1] = listingHydrated[kImageHeight1] || "40px";
        listingHydrated[kTableStriped] = listingHydrated[kTableStriped] !== undefined ? listingHydrated[kTableStriped] : false;
        listingHydrated[kTableHover] = listingHydrated[kTableHover] !== undefined ? listingHydrated[kTableHover] : false;
    }
    listingHydrated[kFieldTypes] = {
        ...listingHydrated[kFieldTypes],
        ...listing[kFieldTypes]
    };
    listingHydrated[kFieldDisplayNames] = {
        ...defaultFieldDisplayNames(format),
        ...listing[kFieldDisplayNames]
    };
    return listingHydrated;
}
async function readContents(source, project, listing) {
    debug(`[listing] Reading listing '${listing.id}' from ${source}`);
    debug(`[listing] Contents: ${listing.contents.map((lst)=>{
        return typeof lst === "string" ? lst : "<yaml>";
    }).join(",")}`);
    const listingItems = [];
    const listingItemSources = new Set();
    const inputsWithoutSource = project.files.input.filter((file)=>file !== source);
    const filterListingFiles = (globOrPaths)=>{
        const hasDefaultGlob = globOrPaths.some((glob)=>{
            return glob === kDefaultContentsGlobToken;
        });
        const resolvedGlobs = globOrPaths.map((glob)=>{
            if (glob === kDefaultContentsGlobToken) {
                return "*";
            } else {
                return glob;
            }
        });
        const expandedGlobs = resolvedGlobs.map((resolved)=>{
            return expandGlob(source, project, resolved);
        });
        const hasInputs = expandedGlobs.some((expanded)=>{
            return !!expanded.inputs;
        });
        const finalGlobs = expandedGlobs.map((expanded)=>{
            return expanded.glob;
        });
        if (hasInputs || hasDefaultGlob) {
            return filterPaths(dirname2(source), inputsWithoutSource, finalGlobs);
        } else {
            return resolvePathGlobs(dirname2(source), finalGlobs, [
                "_*",
                ".*",
                "**/_*",
                "**/.*",
                source
            ]);
        }
    };
    const contentGlobs = listing.contents.filter((content)=>{
        return typeof content === "string";
    });
    const contentMetadatas = listing.contents.filter((content)=>{
        return typeof content !== "string";
    });
    if (contentGlobs.length > 0) {
        const files = filterListingFiles(contentGlobs);
        debug(`[listing] matches ${files.include.length} files:`);
        for (const file of files.include){
            if (!files.exclude.includes(file)) {
                if (isYamlPath(file)) {
                    debug(`[listing] Reading YAML file ${file}`);
                    const yaml = readYaml(file);
                    if (Array.isArray(yaml)) {
                        const items = yaml;
                        items.forEach((item)=>{
                            if (typeof item === "object") {
                                const listingItem = listItemFromMeta(item);
                                validateItem(listing, listingItem, (field)=>{
                                    return `An item from the file '${file}' is missing the required field '${field}'.`;
                                });
                                listingItemSources.add(ListingItemSource.metadata);
                                listingItems.push(listingItem);
                            } else {
                                throw new Error(`Unexpected listing contents in file ${file}. The array may only contain listing items, not paths or other types of data.`);
                            }
                        });
                    } else if (typeof yaml === "object") {
                        const listingItem = listItemFromMeta(yaml);
                        validateItem(listing, listingItem, (field)=>{
                            return `The item defined in file '${file}' is missing the required field '${field}'.`;
                        });
                        listingItemSources.add(ListingItemSource.metadata);
                        listingItems.push(listingItem);
                    } else {
                        throw new Error(`Unexpected listing contents in file ${file}. The file should contain only one more listing items.`);
                    }
                } else {
                    const isFile = Deno.statSync(file).isFile;
                    if (isFile) {
                        debug(`[listing] Reading file ${file}`);
                        const item = await listItemFromFile(file, project, listing);
                        if (item) {
                            validateItem(listing, item, (field)=>{
                                return `The file ${file} is missing the required field '${field}'.`;
                            });
                            if (item.item.title === undefined) {
                                debug(`[listing] Missing Title in File ${file}`);
                            }
                            listingItemSources.add(item.source);
                            listingItems.push(item.item);
                        }
                    }
                }
            }
        }
    }
    if (contentMetadatas.length > 0) {
        contentMetadatas.forEach((content)=>{
            const listingItem = listItemFromMeta(content);
            validateItem(listing, listingItem, (field)=>{
                return `An item in the listing '${listing.id}' is missing the required field '${field}'.`;
            });
            listingItemSources.add(ListingItemSource.metadata);
            listingItems.push(listingItem);
        });
    }
    return {
        items: listingItems,
        sources: listingItemSources
    };
}
function validateItem(listing, item, message) {
    const requiredFields = (listing)=>{
        const fields = listing[kFieldRequired];
        if (fields) {
            if (Array.isArray(fields)) {
                return fields;
            } else {
                return [
                    fields
                ];
            }
        } else {
            return undefined;
        }
    };
    const validationFields = requiredFields(listing);
    if (validationFields) {
        validationFields.forEach((requiredField)=>{
            if (item[requiredField] === undefined) {
                throw new Error(message(requiredField));
            }
        });
    }
}
function listItemFromMeta(meta) {
    const listingItem = __VIRTUAL_FILE107(meta);
    if (meta.path !== undefined) {
        meta[kFieldFileName] = basename2(meta.path);
        meta[kFieldFileModified] = fileModifiedDate(meta.path);
    }
    if (meta.author) {
        if (!Array.isArray(meta.author)) {
            meta.author = [
                meta.author
            ];
        }
    }
    if (meta.date) {
        if (meta.path !== undefined) {
            listingItem.date = parsePandocDate(resolveDate(meta.path, meta.date));
        } else {
            listingItem.date = parsePandocDate(meta.date);
        }
    }
    return listingItem;
}
async function listItemFromFile(input, project, listing) {
    const projectRelativePath = relative2(project.dir, input);
    const target = await inputTargetIndex(project, projectRelativePath);
    const inputTarget = await resolveInputTarget(project, projectRelativePath, false);
    const docRawMetadata = target?.markdown.yaml;
    const directoryMetadata = await directoryMetadataForInputFile(project, dirname2(input));
    const documentMeta = mergeConfigs(directoryMetadata, docRawMetadata);
    if (documentMeta?.draft) {
        return undefined;
    } else {
        if (!docRawMetadata && extname2(input) === ".qmd" || extname2(input) === ".ipynb") {
            warning(`File ${input} in the listing '${listing.id}' contains no metadata.`);
        }
        const maxDescLength = listing[kMaxDescLength] || 175;
        const filename = basename2(projectRelativePath);
        const filemodified = fileModifiedDate(input);
        const description = documentMeta?.description || documentMeta?.abstract || descriptionPlaceholder(inputTarget?.outputHref, maxDescLength);
        const imageRaw = documentMeta?.image || findPreviewImgMd(target?.markdown.markdown);
        const image = imageRaw !== undefined ? pathWithForwardSlashes(listingItemHref(imageRaw, dirname2(projectRelativePath))) : undefined;
        const imageAlt = documentMeta?.[kImageAlt1];
        const date = documentMeta?.date ? parsePandocDate(resolveDate(input, documentMeta?.date)) : undefined;
        const authors = parseAuthor(documentMeta?.author);
        const author = authors ? authors.map((auth)=>auth.name) : [];
        const readingtime = target?.markdown ? estimateReadingTimeMinutes(target.markdown.markdown) : undefined;
        const categories = documentMeta?.categories ? Array.isArray(documentMeta?.categories) ? documentMeta?.categories : [
            documentMeta?.categories
        ] : undefined;
        const item = {
            ...documentMeta,
            path: `/${projectRelativePath}`,
            [kFieldTitle]: target?.title,
            [kFieldDate]: date,
            [kFieldAuthor]: author,
            [kFieldCategories]: categories,
            [kFieldImage]: image,
            [kFieldImageAlt]: imageAlt,
            [kFieldDescription]: description,
            [kFieldFileName]: filename,
            [kFieldFileModified]: filemodified,
            [kFieldReadingTime]: readingtime
        };
        return {
            item,
            source: target !== undefined ? ListingItemSource.document : ListingItemSource.rawfile
        };
    }
}
function readDehydratedListings(source, format) {
    const listingConfig = format.metadata[kListing];
    const listings = [];
    if (typeof listingConfig == "string") {
        const listing = listingForType(listingType(listingConfig));
        if (listing) {
            listings.push(listing);
        }
    } else if (Array.isArray(listingConfig)) {
        const listingConfigs = listingConfig.filter((listing)=>typeof listing === "object");
        let count = 0;
        listings.push(...listingConfigs.map((listing)=>{
            return listingForMetadata(listing, ()=>{
                count = count + 1;
                return `${kDefaultId}-${count}`;
            }, source);
        }));
    } else if (listingConfig && typeof listingConfig === "object") {
        listings.push(listingForMetadata(listingConfig, ()=>{
            return kDefaultId;
        }, source));
    } else if (listingConfig) {
        listings.push(listingForType(ListingType.Default));
    }
    return listings;
}
function listingForMetadata(meta, synthId, source) {
    const listingType = meta.type || kDefaultListingType;
    const baseListing = listingForType(listingType);
    const ensureArray = (val)=>{
        if (Array.isArray(val)) {
            return val;
        } else {
            return [
                val
            ];
        }
    };
    const listing = {
        ...baseListing,
        ...meta
    };
    listing.id = meta.id || synthId();
    listing.sort = computeListingSort(meta.sort);
    if (meta.contents) {
        listing.contents = ensureArray(meta.contents);
    }
    if (meta.template && typeof meta.template === "string") {
        listing.type = ListingType.Custom;
        listing.template = join3(dirname2(source), meta.template);
    }
    return listing;
}
function computeListingSort(rawValue) {
    const parseValue = (sortValue)=>{
        if (sortValue == undefined) {
            return undefined;
        }
        if (typeof sortValue === "string") {
            const sortStr = sortValue;
            const parts = sortStr.split(" ");
            if (parts.length === 2) {
                return {
                    field: parts[0],
                    direction: parts[1] === kSortAsc ? kSortAsc : kSortDesc
                };
            } else {
                return {
                    field: parts[0],
                    direction: kSortAsc
                };
            }
        }
    };
    if (Array.isArray(rawValue)) {
        return rawValue.map(parseValue).filter((val)=>val !== undefined);
    } else {
        const sort = parseValue(rawValue);
        if (sort) {
            return [
                sort
            ];
        }
    }
    return undefined;
}
function defaultFields(type, itemFields) {
    switch(type){
        case ListingType.Grid:
            return kDefaultGridFields;
        case ListingType.Table:
            return kDefaultTableFields;
        case ListingType.Custom:
            return itemFields;
        case ListingType.Default:
        default:
            return kDefaultFields;
    }
}
function listingType(val) {
    switch(val){
        case ListingType.Grid:
        case ListingType.Default:
        case ListingType.Table:
            return val;
        default:
            return ListingType.Default;
    }
}
function listingForType(type) {
    const listing = {
        id: kDefaultId,
        type: type,
        contents: kDefaultContentsGlob
    };
    return listing;
}
function fileModifiedDate(input) {
    if (existsSync(input)) {
        const fileInfo = Deno.statSync(input);
        return fileInfo.mtime !== null ? fileInfo.mtime : undefined;
    } else {
        return undefined;
    }
}
function listingItemHref(path, projectRelativePath) {
    if (isAbsoluteRef(path) || path.startsWith("/")) {
        return path;
    } else {
        return join3("/", projectRelativePath, path);
    }
}
function expandGlob(source, project, globOrPath) {
    const getPath = ()=>{
        if (globOrPath.startsWith("/")) {
            return join3(project.dir, globOrPath);
        } else {
            const sourcePath = dirname2(source);
            return join3(sourcePath, globOrPath);
        }
    };
    const globOrPathAsPath = getPath();
    try {
        if (Deno.statSync(globOrPathAsPath).isDirectory) {
            return {
                glob: join3(globOrPath, "**"),
                inputs: true
            };
        } else {
            return {
                glob: globOrPath,
                inputs: false
            };
        }
    } catch  {
        return {
            glob: globOrPath,
            inputs: false
        };
    }
}
const kDateFormat1 = "date-format";
const kQuartoListingClass = "quarto-listing";
function templateMarkdownHandler(template, listing, items, format, cache, attributes) {
    const reshapedItems = items.map((item)=>{
        resolveItemForTemplate(item, listing);
        const record = {
            ...item
        };
        if (item.author) {
            if (Array.isArray(item.author)) {
                record.author = item.author.join(", ");
            } else {
                record.author = item.author;
            }
        }
        const dateFormat = listing[kDateFormat1] || format.metadata[kDateFormat1];
        const fieldTypes = listing[kFieldTypes];
        for (const field of Object.keys(fieldTypes)){
            if (fieldTypes[field] === kFieldDate) {
                const dateRaw = item[field];
                if (dateRaw) {
                    const includeTime = field === kFieldFileModified;
                    const date = typeof dateRaw === "string" ? parsePandocDate(dateRaw) : dateRaw;
                    if (date) {
                        record[field] = dateFormat ? formatDate(date, dateFormat) : includeTime ? formatDate(date, "short", "medium") : formatDate(date, "medium");
                    }
                }
            } else if (fieldTypes[field] === "minutes" && item[field]) {
                const val = item[field];
                record[field] = localizedString(format, kListingPageMinutesCompact, [
                    Math.floor(val).toString(), 
                ]);
            }
        }
        if (item.description !== undefined && !isPlaceHolder(item.description)) {
            const maxDescLength = listing[kMaxDescLength] || -1;
            if (maxDescLength > 0) {
                record.description = truncateText(item.description, maxDescLength, "space");
            }
        }
        record.image = record.image || listing[kImagePlaceholder];
        return record;
    });
    const reshapedListing = reshapeListing(listing, format);
    const tempateItems = listing[kMaxItems] ? reshapedItems.slice(0, listing[kMaxItems]) : reshapedItems;
    const paramsForType = (type)=>{
        const ejsParams = {
            items: tempateItems
        };
        ``;
        if (type !== ListingType.Custom) {
            ejsParams.listing = reshapedListing;
        } else {
            ejsParams["metadataAttrs"] = reshapedListing.utilities.metadataAttrs;
        }
        return ejsParams;
    };
    const filterRendered = renderEjs(resourcePath("projects/website/listing/_filter.ejs.md"), {
        items: reshapedItems,
        listing: reshapedListing
    });
    const templateRendered = renderEjs(template, paramsForType(listing.type), true, cache);
    const paginationRendered = renderEjs(resourcePath("projects/website/listing/_pagination.ejs.md"), {
        items: reshapedItems,
        listing: reshapedListing
    });
    const markdown = [
        filterRendered,
        templateRendered,
        paginationRendered
    ].join("\n");
    const pipelineId = (id)=>{
        return `pipeline-listing-${id}`;
    };
    return {
        getUnrendered () {
            return {
                blocks: {
                    [pipelineId(listing.id)]: markdown
                }
            };
        },
        processRendered (rendered, doc) {
            let listingEl = doc.querySelector(`div[id='${listing.id}']`);
            if (listingEl === null) {
                const content = doc.querySelector("#quarto-content main.content");
                listingEl = doc.createElement("div");
                if (content) {
                    content.appendChild(listingEl);
                } else {
                    const customContent = doc.querySelector("#quarto-content");
                    if (customContent) {
                        customContent.appendChild(listingEl);
                    } else {
                        doc.body.appendChild(listingEl);
                    }
                }
            }
            if (!listingEl?.classList.contains(kQuartoListingClass)) {
                listingEl?.classList.add(kQuartoListingClass);
            }
            listingEl?.classList.add(`quarto-listing-container-${listing.type}`);
            const outListingId = `listing-${listing.id}`;
            listingEl?.setAttribute("id", outListingId);
            if (attributes) {
                Object.keys(attributes).forEach((attrName)=>{
                    listingEl?.setAttribute(attrName, attributes[attrName]);
                });
            }
            const renderedEl = rendered[pipelineId(listing.id)];
            if (renderedEl) {
                listingEl.innerHTML = renderedEl.innerHTML;
            }
        }
    };
}
function resolveItemForTemplate(item, listing) {
    const addSortable = (item, field, value)=>{
        item.sortableValues = item.sortableValues || {};
        item.sortableValues[field] = value;
    };
    for (const field of Object.keys(listing[kFieldTypes])){
        const type = listing[kFieldTypes][field];
        if (item[field] !== undefined) {
            if (type === "date") {
                addSortable(item, field, item[field].valueOf().toString());
            } else if (type === "number") {
                addSortable(item, field, item[field].toString());
            } else if (type === "minutes") {
                addSortable(item, field, item[field].toString());
            }
        }
    }
    for (const field1 of listing[kFieldLinks]){
        const val = item[field1];
        if (val !== undefined) {
            addSortable(item, field1, val);
        }
    }
}
function reshapeListing(listing, format) {
    const reshaped = __VIRTUAL_FILE107(listing);
    const utilities = {};
    utilities.sortableFieldData = ()=>{
        const fieldSortData = [];
        reshaped[kFieldSort].filter((field)=>{
            return reshaped.fields.includes(field);
        }).forEach((field)=>{
            if (reshaped[kFieldTypes][field] === "date") {
                fieldSortData.push({
                    listingSort: {
                        field: sortAttrValue(field),
                        direction: kSortAsc
                    },
                    description: `${reshaped[kFieldDisplayNames][field] || field} - ${format.language[kListingPageOrderByDateAsc]}`
                });
                fieldSortData.push({
                    listingSort: {
                        field: sortAttrValue(field),
                        direction: kSortDesc
                    },
                    description: `${reshaped[kFieldDisplayNames][field] || field} - ${format.language[kListingPageOrderByDateDesc]}`
                });
            } else if (reshaped[kFieldTypes][field] === "number" || reshaped[kFieldTypes][field] === "minutes") {
                fieldSortData.push({
                    listingSort: {
                        field: sortAttrValue(field),
                        direction: kSortAsc
                    },
                    description: `${reshaped[kFieldDisplayNames][field] || field} (${format.language[kListingPageOrderByNumberAsc]})`
                });
                fieldSortData.push({
                    listingSort: {
                        field: sortAttrValue(field),
                        direction: kSortDesc
                    },
                    description: `${reshaped[kFieldDisplayNames][field] || field} (${format.language[kListingPageOrderByNumberDesc]})`
                });
            } else {
                const sortField = useSortTarget(listing, field) ? sortAttrValue(field) : `listing-${field}`;
                fieldSortData.push({
                    listingSort: {
                        field: sortField,
                        direction: kSortAsc
                    },
                    description: `${reshaped[kFieldDisplayNames][field] || field}`
                });
            }
        });
        return fieldSortData;
    };
    utilities.fieldName = (field)=>{
        return reshaped[kFieldDisplayNames][field] || field;
    };
    utilities.outputLink = (item, field, val)=>{
        const fieldLinks = reshaped[kFieldLinks];
        const value = val || item[field];
        const path = item.path;
        if (path && value !== undefined && fieldLinks.includes(field)) {
            return `<a href="${path}" class="${field}">${value}</a>`;
        } else {
            return value;
        }
    };
    utilities.sortTarget = (field)=>{
        if (useSortTarget(listing, field)) {
            return sortAttrValue(field);
        } else {
            return `listing-${field}`;
        }
    };
    let itemNumber = 0;
    utilities.itemNumber = ()=>{
        return ++itemNumber;
    };
    utilities.img = (itemNumber, src, classes, alt)=>{
        const pageSize = listing[kPageSize];
        const classAttr = classes ? `class="${classes}"` : "";
        const styleAttr = listing[kImageHeight1] ? `style="height: ${listing[kImageHeight1]};"` : "";
        const altAttr = alt ? `alt="${encodeAttributeValue(alt)}"` : "";
        const srcAttr = itemNumber > pageSize ? "data-src" : "src";
        return `<img ${srcAttr}="${src}" ${classAttr} ${styleAttr} ${altAttr}>`;
    };
    let index = 0;
    utilities.metadataAttrs = (item)=>{
        const attr = {};
        attr["index"] = (index++).toString();
        if (item.categories) {
            attr["categories"] = item.categories.join(",");
        }
        item.sortableValues = item.sortableValues || {};
        for (const field of Object.keys(item.sortableValues)){
            if (useSortTarget(listing, field)) {
                attr[sortAttrValue(field)] = escape1(item.sortableValues[field]);
            }
        }
        const attrs = Object.keys(attr).map((key)=>{
            const value = attr[key];
            return `data-${key}='${value}'`;
        });
        return attrs.join(" ");
    };
    utilities.localizedString = (str)=>{
        const localizedStrings = format.language;
        return localizedStrings[str];
    };
    reshaped.utilities = utilities;
    return reshaped;
}
function sortAttrValue(field) {
    return `listing-${field}-sort`;
}
const useSortTarget = (listing, field)=>{
    const links = listing[kFieldLinks];
    if (links.includes(field)) {
        return true;
    }
    const type = listing[kFieldTypes][field];
    if (type === "date" || type === "number" || type === "minutes") {
        return true;
    } else if (listing[kFieldLinks].includes(field)) {
        return true;
    }
    return false;
};
function templateJsScript(id, listing, itemCount) {
    const pageSize = listing[kPageSize] || 50;
    const columns = listing[kFields] || [];
    const pageOptions = itemCount > pageSize ? `${pageSize ? `page: ${pageSize}` : ""},
    pagination: { item: "<li class='page-item'><a class='page page-link' href='#'></a></li>" },` : "";
    const filterOptions = `searchColumns: [${listing[kFieldFilter].map((field)=>{
        return `"listing-${field}"`;
    }).join(",")}],`;
    const resolvedColumns = columns.map((field)=>{
        return `'listing-${field}'`;
    });
    resolvedColumns.push(`{ data: ['index'] }`, `{ data: ['categories'] }`);
    for (const field of listing[kFieldSort]){
        if (useSortTarget(listing, field)) {
            resolvedColumns.push(`{ data: ['${sortAttrValue(field)}'] }`);
        }
    }
    const rowJs = `[${resolvedColumns.join(",")}]`;
    const jsScript = `
  window.document.addEventListener("DOMContentLoaded", function (_event) {
    const listingTargetEl = window.document.querySelector('#listing-${id} .list');
    if (!listingTargetEl) {
      // No listing discovered, do not attach.
      return; 
    }

    const options = {
      valueNames: ${rowJs},
      ${pageOptions}
      ${filterOptions}
    };

    window['quarto-listings'] = window['quarto-listings'] || {};
    window['quarto-listings']['listing-${id}'] = new List('listing-${id}', options);

    if (window['quarto-listing-loaded']) {
      window['quarto-listing-loaded']();
    }
  });

  window.addEventListener('hashchange',() => {
    if (window['quarto-listing-loaded']) {
      window['quarto-listing-loaded']();
    }
  })
  `;
    return jsScript;
}
function categorySidebar(doc, listingDescriptors, format, options) {
    const categoryStyle = options[kCategoryStyle];
    const headingEl = doc.createElement("h5");
    headingEl.innerText = localizedString(format, kListingPageFieldCategories);
    headingEl.classList.add("quarto-listing-category-title");
    const cats = accumCategories(listingDescriptors);
    const categoriesEl = categoryContainer(doc);
    const totalCategories = itemCount(listingDescriptors);
    categoriesEl.classList.add(categoryStyle);
    const defaultFormat = (category, count)=>{
        return category + ` <span class="quarto-category-count">(${count})</span>`;
    };
    const cloudFormat = (category, count)=>{
        const size = Math.ceil(count / totalCategories * 10);
        return `<span class="quarto-category-count category-cloud-${size}">${category}</span>`;
    };
    const unnumberedFormat = (category, _count)=>{
        return `${category}`;
    };
    const formatFn = categoryStyle === "category-default" ? defaultFormat : categoryStyle === "category-cloud" ? cloudFormat : unnumberedFormat;
    if (categoryStyle === "category-default") {
        const allCategory = localizedString(format, kListingPageCategoryAll);
        const allEl = categoryElement(doc, allCategory, formatFn(allCategory, totalCategories), "");
        categoriesEl.appendChild(allEl);
    }
    for (const cat of Object.keys(cats).sort()){
        const count = cats[cat];
        const catEl = categoryElement(doc, cat, formatFn(cat, count), cat);
        categoriesEl.appendChild(catEl);
    }
    return {
        headingEl,
        categoriesEl
    };
}
function itemCount(listingDescriptors) {
    return listingDescriptors.reduce((previous, listingDescriptor)=>{
        return previous + listingDescriptor.items.length;
    }, 0);
}
function accumCategories(listingDescriptors) {
    const items = listingDescriptors.flatMap((listingDescriptor)=>{
        return listingDescriptor.items;
    });
    const categories = {};
    items.forEach((item)=>{
        if (item.categories) {
            item.categories.forEach((category)=>{
                const currentCount = categories[category] || 0;
                categories[category] = currentCount + 1;
            });
        }
    });
    return categories;
}
function categoryContainer(doc) {
    const container = doc.createElement("div");
    container.classList.add("quarto-listing-category");
    return container;
}
function categoryElement(doc, category, contents, value) {
    const categoryEl = doc.createElement("div");
    categoryEl.classList.add("category");
    categoryEl.setAttribute("data-category", value !== undefined ? value : category);
    categoryEl.innerHTML = contents;
    return categoryEl;
}
async function createFeed(doc, source, project, descriptors, options, format) {
    const siteUrl = websiteBaseurl(project.config);
    if (!siteUrl) {
        warning("Unable to create a feed as the required `site-url` property is missing from this project.");
        return;
    }
    const feedTitle = options.title || websiteTitle(project.config);
    if (!feedTitle) {
        warning("Unable to create a feed as the required `site > title` property is missing from this project.");
        return;
    }
    const feedDescription = options.description || format.metadata[kDescription1] || websiteDescription(project.config) || "";
    const projectRelInput = relative2(project.dir, source);
    const inputTarget = await resolveInputTarget(project, projectRelInput, false);
    const [dir, stem] = dirAndStem(source);
    const finalRelPath = relative2(project.dir, join3(dir, `${stem}.xml`));
    const link = absoluteUrl(siteUrl, inputTarget?.outputHref);
    const feedLink = absoluteUrl(siteUrl, finalRelPath);
    const items = [];
    for (const descriptor of descriptors){
        items.push(...descriptor.items);
    }
    const filteredItems = prepareItems(items, options);
    const mostRecent = mostRecentItem(filteredItems);
    const feed = {
        title: feedTitle,
        description: feedDescription,
        link,
        feedLink,
        generator: `quarto-${quartoConfig.version()}`,
        lastBuildDate: mostRecent && mostRecent.date ? new Date(mostRecent.date).toUTCString() : new Date().toUTCString(),
        language: options.language
    };
    const image = options.image || format.metadata[kImage] || websiteImage(project.config);
    if (image) {
        feed.image = {
            title: feedTitle,
            link: link,
            url: absoluteUrl(siteUrl, image)
        };
        const size = imageSize(image);
        if (size) {
            const [height, width] = feedImageSize(size.height, size.width);
            feed.image.height = height;
            feed.image.width = width;
        }
    }
    const stagedPath = feedPath(dir, stem, options.type === "full");
    const feedFiles = [];
    const rendered = await renderFeed(siteUrl, feed, filteredItems, project, stagedPath);
    if (rendered) {
        feedFiles.push(stagedPath);
        addLinkTagToDocument(doc, feed, `${stem}.xml`);
    }
    options[kFieldCategories] = options[kFieldCategories] || [];
    const feedCategories = Array.isArray(options[kFieldCategories]) ? options[kFieldCategories] : [
        options[kFieldCategories]
    ];
    const categoriesToRender = feedCategories?.map((category)=>{
        const finalRelPath = relative2(project.dir, join3(dir, `${stem}-${category.toLocaleLowerCase()}.xml`));
        return {
            category,
            file: feedPath(dir, `${stem}-${category.toLocaleLowerCase()}`, options.type === "full"),
            finalFile: finalRelPath,
            feedLink: absoluteUrl(siteUrl, finalRelPath)
        };
    });
    if (categoriesToRender) {
        for (const categoryToRender of categoriesToRender){
            const rendered1 = await renderCategoryFeed(siteUrl, categoryToRender, feed, items, options, project);
            if (rendered1) {
                feedFiles.push(categoryToRender.file);
            }
        }
    }
    return feedFiles;
}
const kFeedOptions = {
    remove: {
        anchors: true
    },
    transform: {
        [kUrlsToAbsolute]: true,
        [kInlineCodeStyle]: true,
        math: true
    }
};
function completeStagedFeeds(context, outputFiles, _incremental) {
    const siteUrl = websiteBaseurl(context.config);
    if (siteUrl !== undefined) {
        outputFiles.forEach((outputFile)=>{
            if (outputFile.format.metadata[kListing]) {
                const [dir, stem] = dirAndStem(outputFile.file);
                const files = resolvePathGlobs(dir, [
                    `${stem}${kStagedFileGlob}`
                ], []);
                const contentReader = renderedContentReader(context, kFeedOptions, siteUrl);
                for (const feedFile of files.include){
                    const [feedDir, feedStem] = dirAndStem(feedFile);
                    try {
                        const fullContents = feedFile.endsWith(kFullStagedExt);
                        let feedContents = Deno.readTextFileSync(feedFile);
                        const tagWithReplacements = [
                            {
                                tag: "title",
                                regex: kTitleRegex,
                                replaceValue: (rendered)=>{
                                    if (rendered.title) {
                                        return __VIRTUAL_FILE172(rendered.title);
                                    } else {
                                        return "";
                                    }
                                }
                            },
                            {
                                tag: "description",
                                regex: kDescRegex,
                                replaceValue: (rendered)=>{
                                    if (fullContents) {
                                        return `<![CDATA[ ${rendered.fullContents} ]]>`;
                                    } else {
                                        return `<![CDATA[ ${rendered.firstPara} ]]>`;
                                    }
                                }
                            }, 
                        ];
                        tagWithReplacements.forEach((tagWithReplacement)=>{
                            const regex = tagWithReplacement.regex;
                            const tag = tagWithReplacement.tag;
                            regex.lastIndex = 0;
                            let match = regex.exec(feedContents);
                            while(match){
                                const relativePath = match[1];
                                const absolutePath = relativePath.startsWith("/") ? join3(projectOutputDir(context), relativePath) : join3(feedDir, relativePath);
                                const contents = contentReader(absolutePath);
                                if (contents) {
                                    const targetStr = placholderForReplace(tag, relativePath);
                                    feedContents = feedContents.replace(targetStr, ()=>{
                                        return `<${tag}>${tagWithReplacement.replaceValue(contents)}</${tag}>`;
                                    });
                                }
                                match = regex.exec(feedContents);
                            }
                            regex.lastIndex = 0;
                        });
                        Deno.writeTextFileSync(join3(feedDir, `${feedStem}.${kFinalExt}`), feedContents);
                    } catch (error) {
                        const errorMessage = error.message;
                        warnOnce(`Unable to generate feed '${feedStem}.xml'\n${errorMessage}`);
                    } finally{
                        try {
                            Deno.removeSync(feedFile);
                        } catch  {}
                    }
                }
            }
        });
    }
}
async function renderCategoryFeed(siteUrl, categoryToRender, feed, items, options, project) {
    const categoryItems = items.filter((item)=>{
        const categories = item[kFieldCategories];
        if (categories) {
            return categories.includes(categoryToRender.category);
        } else {
            return false;
        }
    });
    const filteredItems = prepareItems(categoryItems, options);
    const feedMeta = {
        ...feed
    };
    feedMeta.link = feedMeta.link + "#category=" + encodeURI(categoryToRender.category);
    feedMeta.feedLink = categoryToRender.feedLink;
    if (feedMeta.image) {
        feedMeta.image.link = feedMeta.link;
        feedMeta.image.title = feedMeta.title;
    }
    const mostRecent = mostRecentItem(filteredItems);
    feedMeta.lastBuildDate = mostRecent && mostRecent.date ? new Date(mostRecent.date).toUTCString() : new Date().toUTCString();
    return await renderFeed(siteUrl, feedMeta, filteredItems, project, categoryToRender.file);
}
async function renderFeed(siteUrl, feed, items, project, feedPath) {
    const feedItems = [];
    for (const item of items){
        const inputTarget = await resolveInputTarget(project, item.path, false);
        const title = inputTarget?.outputHref ? placeholder(inputTarget?.outputHref) : "";
        const link = absoluteUrl(siteUrl, inputTarget?.outputHref || "");
        const description = inputTarget?.outputHref ? placeholder(inputTarget?.outputHref) : "";
        const pubDate = item.date ? new Date(item.date) : new Date();
        const feedItem = {
            title,
            link,
            description,
            guid: link,
            pubDate
        };
        if (Array.isArray(item[kFieldCategories])) {
            feedItem.categories = item[kFieldCategories];
        }
        if (Array.isArray(item[kFieldAuthor])) {
            feedItem.authors = item[kFieldAuthor];
        }
        if (item[kFieldImage] && typeof (item[kFieldImage] === "string")) {
            const image = item[kFieldImage];
            feedItem.image = absoluteUrl(siteUrl, image);
            const imagePath = join3(project.dir, image);
            feedItem.imageContentType = imageContentType(imagePath);
            const size = imageSize(imagePath);
            if (size) {
                const [height, width] = feedImageSize(size.height, size.width);
                feedItem.imageHeight = height;
                feedItem.imageWidth = width;
            }
        }
        feedItems.push(feedItem);
    }
    await generateFeed(feed, feedItems, feedPath);
    return true;
}
async function generateFeed(feed, feedItems, path) {
    const feedFile = await Deno.open(path, {
        write: true,
        create: true
    });
    try {
        const textEncoder = new TextEncoder();
        const preamble = renderEjs(resourcePath("projects/website/listing/feed/preamble.ejs.md"), {
            feed,
            escape: __VIRTUAL_FILE172
        });
        await Deno.write(feedFile.rid, textEncoder.encode(preamble));
        for (const feedItem of feedItems){
            const item = renderEjs(resourcePath("projects/website/listing/feed/item.ejs.md"), {
                item: feedItem,
                escape: __VIRTUAL_FILE172
            });
            await Deno.write(feedFile.rid, textEncoder.encode(item));
        }
        const postamble = renderEjs(resourcePath("projects/website/listing/feed/postamble.ejs.md"), {
            feed,
            escape: __VIRTUAL_FILE172
        });
        await Deno.write(feedFile.rid, textEncoder.encode(postamble));
    } finally{
        Deno.close(feedFile.rid);
    }
}
function prepareItems(items, options) {
    const validItems = items.filter((item)=>{
        return item.title !== undefined && item.path !== undefined;
    });
    const uniqueItems = __VIRTUAL_FILE210(validItems, (item)=>{
        return item.path;
    });
    const sortedItems = uniqueItems.sort((a, b)=>{
        const aTimestamp = a.date ? new Date(a.date).valueOf() : -1;
        const bTimestamp = b.date ? new Date(b.date).valueOf() : -1;
        return bTimestamp - aTimestamp;
    });
    const itemCount = options[kItems] || 20;
    if (sortedItems.length > itemCount) {
        return sortedItems.slice(0, itemCount);
    } else {
        return sortedItems;
    }
}
function mostRecentItem(items) {
    const sortedItems = items.sort((a, b)=>{
        const aTime = a.date ? a.date.getTime() : 0;
        const bTime = b.date ? b.date.getTime() : 0;
        return bTime - aTime;
    });
    const mostRecentItem = sortedItems.length > 0 ? sortedItems[0] : undefined;
    return mostRecentItem;
}
function addLinkTagToDocument(doc, feed, path) {
    const linkEl = doc.createElement("link");
    linkEl.setAttribute("rel", "alternate");
    linkEl.setAttribute("type", "application/rss+xml");
    linkEl.setAttribute("title", feed.title);
    linkEl.setAttribute("href", path);
    doc.head.appendChild(linkEl);
}
const kFullStagedExt = "feed-full-staged";
const kPartialStageExt = "feed-partial-staged";
const kFinalExt = "xml";
const kStagedFileGlob = "*.feed-*-staged";
function placeholder(outputHref) {
    return `{B4F502887207:${outputHref}}`;
}
function placholderForReplace(tag, outputHref) {
    return `<${tag}>{B4F502887207\:${outputHref}}<\/${tag}>`;
}
const kTitleRegex = tagplaceholderRegex("title");
const kDescRegex = tagplaceholderRegex("description");
function tagplaceholderRegex(tag) {
    return new RegExp(`<${tag}>{B4F502887207\:(.*?)}<\/${tag}>`, "gm");
}
function feedPath(dir, stem, full) {
    const ext = full ? kFullStagedExt : kPartialStageExt;
    const file = `${stem}.${ext}`;
    return join3(dir, file);
}
const feedImageSize = (height, width)=>{
    const heightScale = 400 / height;
    const widthScale = 144 / width;
    if (heightScale >= 1 && widthScale >= 1) {
        return [
            height,
            width
        ];
    } else {
        const scaleFactor = heightScale < widthScale ? heightScale : widthScale;
        return [
            Math.round(height * scaleFactor),
            Math.round(width * scaleFactor), 
        ];
    }
};
const kListingDir = "listing";
const kListingMapFile = "listing-cache.json";
function cacheListingProjectData(project, listingPath, descriptors) {
    const listingContents = descriptors.flatMap((descriptor)=>{
        const contentItems = descriptor.listing.contents;
        return contentItems.filter((item)=>{
            return typeof item === "string";
        });
    });
    const cache = readListingMap(project) || {};
    const listingMap = cache.listingMap || {};
    listingContents.forEach((content)=>{
        const globSet = new Set(listingMap[listingPath] || []);
        globSet.add(content);
        listingMap[listingPath] = [
            ...globSet
        ];
    });
    writeListingCache(project, {
        listingMap
    });
}
function listingProjectData(project) {
    return readListingMap(project);
}
function clearListingProjectData(project) {
    clearListingMap(project);
}
function clearListingMap(project) {
    const file = projectListingMapFile(project.dir);
    try {
        Deno.removeSync(file);
    } catch  {}
}
function readListingMap(project) {
    const file = projectListingMapFile(project.dir);
    try {
        const mapRaw = Deno.readTextFileSync(file);
        const data = JSON.parse(mapRaw);
        return data;
    } catch  {
        return {};
    }
}
function writeListingCache(project, cache) {
    const file = projectListingMapFile(project.dir);
    ensureDirSync(dirname2(file));
    const mapJson = JSON.stringify(cache, undefined, 2);
    Deno.writeTextFileSync(file, mapJson);
}
function projectListingMapFile(dir) {
    return join3(projectScratchPath(dir, kListingDir), kListingMapFile);
}
async function createListingIndex(source, project, descriptors) {
    const projectRelInput = relative2(project.dir, source);
    const inputTarget = await resolveInputTarget(project, projectRelInput, false);
    if (inputTarget) {
        const listingHref = "/" + inputTarget.outputHref;
        const items = [];
        for (const descriptor of descriptors){
            items.push(...descriptor.items);
        }
        const filteredItems = __VIRTUAL_FILE210(items, (item)=>{
            return item.path;
        });
        if (filteredItems) {
            const itemHrefs = [];
            for (const item of filteredItems){
                if (item.path) {
                    const itemTarget = await resolveInputTarget(project, item.path, false);
                    if (itemTarget) {
                        const itemHref = itemTarget.outputHref;
                        itemHrefs.push(itemHref);
                    }
                }
            }
            const listingJson = {
                listing: listingHref,
                items: itemHrefs
            };
            const listingIndexPath = listingIndex(source);
            Deno.writeTextFileSync(listingIndexPath, JSON.stringify(listingJson, undefined, 2));
            return listingIndexPath;
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function updateGlobalListingIndex(context, outputFiles, incremental) {
    const outputDir = projectOutputDir(context);
    const listingJsonPath = join3(outputDir, "listings.json");
    const listingJson = existsSync(listingJsonPath) ? Deno.readTextFileSync(listingJsonPath) : undefined;
    const listingPaths = new Array();
    if (incremental && listingJson) {
        const existingListingJson = JSON.parse(listingJson);
        listingPaths.push(...existingListingJson);
    }
    for (const outputFile of outputFiles){
        const hasListing = !!outputFile.format.metadata[kListing];
        if (hasListing) {
            const indexPath = listingIndex(outputFile.file);
            if (existsSync(indexPath)) {
                const json = Deno.readTextFileSync(indexPath);
                const indexJson = JSON.parse(json);
                const existingIndex = listingPaths.findIndex((paths)=>paths.listing === indexJson.listing);
                if (existingIndex > -1) {
                    listingPaths[existingIndex] = indexJson;
                } else {
                    listingPaths.push(indexJson);
                }
                Deno.removeSync(indexPath);
            }
        }
    }
    if (listingPaths.length > 0) {
        Deno.writeTextFileSync(listingJsonPath, JSON.stringify(listingPaths, undefined, 2));
    }
}
function listingIndex(input) {
    const [dir, stem] = dirAndStem(input);
    return join3(dir, `${stem}-listing.json`);
}
function listingSupplementalFiles(project, inputs, incremental) {
    if (incremental) {
        const listingProjData = listingProjectData(project);
        const listingMap = listingProjData.listingMap || {};
        const listingFiles = Object.keys(listingMap);
        const inputPaths = inputs.map((inp)=>inp.path);
        const matching = listingFiles.filter((listingFile)=>{
            const listingDir = join3(project.dir, dirname2(listingFile));
            const globs = listingMap[listingFile];
            if (filterPaths(listingDir, inputPaths, globs).include.length > 0) {
                return true;
            }
        });
        if (matching.length > 0) {
            const supplementalFiles = matching.map((listingRelativePath)=>{
                return join3(project.dir, listingRelativePath);
            });
            const files = __VIRTUAL_FILE210(supplementalFiles.filter((file)=>{
                return !inputs.find((inp)=>{
                    return inp.path === file;
                }) && existsSync(file);
            }));
            const onRenderComplete = async (project, files, incremental)=>{
                if (incremental) {
                    const outputDir = projectOutputDir(project);
                    for (const file of files){
                        const filePath = join3(outputDir, file);
                        await touch(filePath);
                    }
                }
            };
            return {
                files: files.map((file)=>{
                    return {
                        path: file,
                        formats: [
                            "html",
                            "html4",
                            "html5"
                        ]
                    };
                }),
                onRenderComplete
            };
        } else {
            return {
                files: []
            };
        }
    } else {
        clearListingProjectData(project);
        return {
            files: []
        };
    }
}
async function listingHtmlDependencies(source, project, format, temp, _extras) {
    const { listingDescriptors , options  } = await readListings(source, project, format);
    const pageHasListings = listingDescriptors.length > 0;
    if (pageHasListings) {
        cacheListingProjectData(project, relative2(project.dir, source), listingDescriptors);
    }
    const markdownHandlers = [];
    listingDescriptors.forEach((listingDescriptor)=>{
        markdownHandlers.push(markdownHandler(format, listingDescriptor.listing, listingDescriptor.items));
    });
    markdownHandlers.push({
        getUnrendered: ()=>{
            return {
                inlines: {
                    "quarto-enable-math-inline": "$e = mC^2$"
                }
            };
        },
        processRendered: (_rendered, _doc)=>{}
    });
    const pipeline = createMarkdownPipeline(`quarto-listing-pipeline`, markdownHandlers);
    const kListingDependency = "quarto-listing";
    const jsPaths = [
        resourcePath("projects/website/listing/list.min.js"),
        resourcePath("projects/website/listing/quarto-listing.js"), 
    ];
    const listingDependencies = [
        {
            name: kListingDependency,
            scripts: jsPaths.map((path)=>{
                return {
                    name: basename2(path),
                    path
                };
            })
        }
    ];
    const generateScriptListJsScript = ()=>{
        return listingDescriptors.map((listingItem)=>{
            return templateJsScript(listingItem.listing.id, listingItem.listing, listingItem.items.length);
        });
    };
    const listingPostProcessor = async (doc)=>{
        pipeline.processRenderedMarkdown(doc);
        listingPostProcess(doc, listingDescriptors, options, format);
        const supporting = [];
        if (options[kFeed]) {
            const listingOptions = {
                type: "full",
                ...options[kFeed]
            };
            const feedAbsPaths = await createFeed(doc, source, project, listingDescriptors, listingOptions, format);
            if (feedAbsPaths) {
                feedAbsPaths.forEach((feedAbsPath)=>{
                    supporting.push(feedAbsPath);
                });
            }
        }
        const listingIndexPath = await createListingIndex(source, project, listingDescriptors);
        if (listingIndexPath) {
            supporting.push(listingIndexPath);
        }
        return Promise.resolve({
            resources: [],
            supporting
        });
    };
    return {
        [kSassBundles]: [
            listingSassBundle()
        ],
        [kDependencies]: pageHasListings ? listingDependencies : [],
        [kMarkdownAfterBody]: pageHasListings ? pipeline.markdownAfterBody() : undefined,
        [kIncludeInHeader]: pageHasListings ? [
            scriptFileForScripts(generateScriptListJsScript(), temp), 
        ] : [],
        [kHtmlPostprocessors]: pageHasListings ? listingPostProcessor : undefined
    };
}
function completeListingGeneration(context, outputFiles, incremental) {
    completeStagedFeeds(context, outputFiles, incremental);
    completeListingDescriptions(context, outputFiles, incremental);
    updateGlobalListingIndex(context, outputFiles, incremental);
}
function markdownHandler(format, listing, items) {
    switch(listing.type){
        case ListingType.Table:
            {
                return templateMarkdownHandler(resourcePath("projects/website/listing/listing-table.ejs.md"), listing, items, format, true);
            }
        case ListingType.Grid:
            {
                return templateMarkdownHandler(resourcePath("projects/website/listing/listing-grid.ejs.md"), listing, items, format, true);
            }
        case ListingType.Custom:
            {
                if (listing.template === undefined) {
                    throw new Error("In order to use a listing of type custom, please provide the path to a template.");
                } else {
                    if (!existsSync(listing.template)) {
                        throw new Error(`The template ${listing.template} can't be found.`);
                    }
                }
                return templateMarkdownHandler(listing.template, listing, items, format, false);
            }
        case ListingType.Default:
        default:
            {
                return templateMarkdownHandler(resourcePath("projects/website/listing/listing-default.ejs.md"), listing, items, format, true);
            }
    }
}
function listingPostProcess(doc, listingDescriptors, options, format) {
    const categories = options[kFieldCategories];
    if (categories) {
        const { headingEl , categoriesEl  } = categorySidebar(doc, listingDescriptors, format, options);
        const rightSidebar = doc.getElementById(kMarginSidebarId1);
        const marginHeader = rightSidebar?.querySelector(".quarto-margin-header");
        if (marginHeader) {
            marginHeader.after(...[
                headingEl,
                categoriesEl
            ]);
        } else {
            const marginFooter = rightSidebar?.querySelector(".quarto-margin-footer");
            if (marginFooter) {
                rightSidebar?.insertBefore(headingEl, marginFooter);
                rightSidebar?.insertBefore(categoriesEl, marginFooter);
            } else {
                rightSidebar?.appendChild(headingEl);
                rightSidebar?.appendChild(categoriesEl);
            }
        }
    }
    const descImgs = doc.querySelectorAll(".listing-description img");
    descImgs.forEach((descImg)=>{
        descImg.remove();
    });
}
const kMarginSidebarId1 = "quarto-margin-sidebar";
function scriptFileForScripts(scripts, temp) {
    const scriptFile = temp.createFile({
        suffix: "-listing.html"
    });
    const contents = `<script>\n${scripts.join("\n")}</script>`;
    Deno.writeTextFileSync(scriptFile, contents);
    return scriptFile;
}
function listingSassBundle() {
    const scssPath = resourcePath("projects/website/listing/quarto-listing.scss");
    const layer = sassLayer(scssPath);
    return {
        dependency: kBootstrapDependencyName,
        key: scssPath,
        quarto: {
            name: "quarto-listing.css",
            ...layer
        }
    };
}
const kAbout = "about";
const kTemplate1 = "template";
const kType2 = "type";
const kLinks = "links";
const kImageWidth1 = "image-width";
const kImageShape = "image-shape";
const kImageShapeRound = "round";
const kImageShapeRounded = "rounded";
const kTemplateJolla = "jolla";
const kTemplateTrestles = "trestles";
const kTemplateSolana = "solana";
const kTemplateMarquee = "marquee";
const kTemplateBroadside = "broadside";
const kTemplates = [
    kTemplateJolla,
    kTemplateTrestles,
    kTemplateSolana,
    kTemplateMarquee,
    kTemplateBroadside, 
];
async function aboutHtmlDependencies(source, project, format, _temp, _extras) {
    const aboutPage = await readAbout(source, project, format);
    if (aboutPage) {
        format.pandoc[kToc] = false;
        format.metadata[kAnchorSections] = false;
    }
    const scssPath = join3(projectTypeResourcePath("website"), `about/about.scss`);
    const aboutLayer = sassLayerFile(scssPath);
    const sassBundles = [
        {
            dependency: kBootstrapDependencyName,
            key: scssPath,
            quarto: {
                name: `quarto-about.css`,
                ...aboutLayer
            }
        }, 
    ];
    const markdownHandlers = [];
    if (aboutPage) {
        markdownHandlers.push(aboutLinksMarkdownHandler(aboutPage));
    }
    const pipeline = createMarkdownPipeline(`quarto-about-pipeline`, markdownHandlers);
    return {
        [kMarkdownAfterBody]: markdownHandlers.length > 0 ? [
            pipeline.markdownAfterBody()
        ] : [
            ""
        ],
        [kHtmlPostprocessors]: aboutPage ? aboutPagePostProcessor(aboutPage, pipeline) : undefined,
        [kSassBundles]: sassBundles
    };
}
async function readAbout(source, project, format) {
    const about = format.metadata[kAbout];
    if (about) {
        const resolveOptions = (aboutTemplate, aboutObj, aboutPage)=>{
            const knownFieldList = [
                "image",
                "template",
                "links"
            ];
            for (const key of Object.keys(aboutObj)){
                if (!knownFieldList.includes(key)) {
                    aboutPage.options[key] = aboutObj[key];
                }
            }
            if (aboutPage.options[kImageShape] === undefined) {
                if (aboutTemplate === kTemplateJolla) {
                    aboutPage.options[kImageShape] = kImageShapeRound;
                } else if (aboutTemplate === kTemplateSolana) {
                    aboutPage.options[kImageShape] = kImageShapeRounded;
                } else if (aboutTemplate === kTemplateTrestles) {
                    aboutPage.options[kImageShape] = kImageShapeRounded;
                }
            }
            if (aboutPage.options[kImageWidth1] === undefined) {
                if (aboutTemplate === kTemplateJolla) {
                    aboutPage.options[kImageWidth1] = "15em";
                } else if (aboutTemplate === kTemplateSolana) {
                    aboutPage.options[kImageWidth1] = "15em";
                } else if (aboutTemplate === kTemplateTrestles) {
                    aboutPage.options[kImageWidth1] = "20em";
                } else if (aboutTemplate === kTemplateMarquee) {
                    aboutPage.options[kImageWidth1] = "100%";
                } else if (aboutTemplate === kTemplateBroadside) {
                    aboutPage.options[kImageWidth1] = "15em";
                }
            }
            return aboutPage;
        };
        if (typeof about === "string") {
            const [template, custom] = templatePath(about, source);
            const aboutPage = {
                template,
                custom,
                options: {}
            };
            if (format.metadata[kImage]) {
                aboutPage.image = format.metadata[kImage];
            }
            resolveOptions(about, {}, aboutPage);
            return aboutPage;
        } else if (typeof about === "object") {
            const aboutObj = about;
            const aboutTemplate = aboutObj[kType2] || aboutObj[kTemplate1];
            const [template1, custom1] = templatePath(aboutTemplate, source);
            const id = aboutObj.id;
            const aboutPage1 = {
                id,
                template: template1,
                custom: custom1,
                options: {}
            };
            const aboutImage = aboutObj[kImage];
            if (aboutImage) {
                aboutPage1.image = aboutImage;
            } else {
                if (format.metadata[kImage]) {
                    aboutPage1.image = format.metadata[kImage];
                }
            }
            const aboutLinks = aboutObj[kLinks];
            if (aboutLinks) {
                const links = [];
                for (const aboutLink of aboutLinks){
                    links.push(await navigationItem(project, aboutLink, 0, false));
                }
                aboutPage1.links = links;
            }
            resolveOptions(aboutTemplate, aboutObj, aboutPage1);
            return aboutPage1;
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function templatePath(template, source) {
    if (kTemplates.includes(template)) {
        return [
            join3(projectTypeResourcePath("website"), `about/${template}.ejs.html`),
            false, 
        ];
    } else {
        return [
            join3(dirname2(source), template),
            true
        ];
    }
}
const aboutPagePostProcessor = (aboutPage, pipeline)=>{
    return (doc)=>{
        const titleEl = doc.getElementById("title-block-header");
        titleEl?.remove();
        const title = titleEl?.outerHTML || "";
        let aboutEl = aboutPage.id ? doc.getElementById(aboutPage.id) : undefined;
        if (!aboutEl) {
            aboutEl = doc.querySelector("main.content");
        }
        const body = aboutEl?.outerHTML || "";
        const ejsData = {
            title,
            body,
            image: aboutPage.image,
            links: aboutPage.links,
            options: aboutPage.options
        };
        const aboutPageHtml = renderEjs(aboutPage.template, {
            about: ejsData
        }, true, !aboutPage.custom && !quartoConfig.isDebug());
        const aboutPageContainer = doc.createElement("div");
        aboutPageContainer.innerHTML = aboutPageHtml;
        aboutEl?.after(...aboutPageContainer.childNodes);
        aboutEl?.remove();
        const result1 = {
            resources: [],
            supporting: []
        };
        if (aboutPage.image) {
            result1.resources.push(aboutPage.image);
        }
        pipeline.processRenderedMarkdown(doc);
        return Promise.resolve(result1);
    };
};
const aboutLinksMarkdownHandler = (aboutPage)=>{
    return {
        getUnrendered: ()=>{
            const pipelineMarkdown = {};
            aboutPage.links?.forEach((link)=>{
                if (typeof link === "string") {
                    pipelineMarkdown.inlines = pipelineMarkdown.inlines || {};
                    pipelineMarkdown.inlines[link] = link;
                } else if (link.text) {
                    pipelineMarkdown.inlines = pipelineMarkdown.inlines || {};
                    pipelineMarkdown.inlines[link.text] = link.text;
                }
            });
            return pipelineMarkdown;
        },
        processRendered: (rendered, doc)=>{
            const aboutLinkNodes = doc.querySelectorAll(".about-links .about-link .about-link-text");
            for (const aboutLinkNode of aboutLinkNodes){
                const aboutLinkEl = aboutLinkNode;
                const aboutLinkRendered = rendered[aboutLinkEl.innerText.trim()];
                if (aboutLinkRendered) {
                    aboutLinkEl.innerHTML = aboutLinkRendered.innerHTML;
                }
            }
        }
    };
};
const kGiscusDir = "giscus";
async function resolveFormatForGiscus(project, format) {
    const comments = format.metadata[kComments];
    if (comments) {
        const giscusOptions = comments[kGiscus];
        if (giscusOptions) {
            if (giscusOptions[kGiscusRepoId] === undefined || giscusOptions[kGiscusCategoryId] === undefined) {
                const repo = giscusOptions.repo;
                const fileName = `${repo}.json`;
                let giscusMeta;
                const giscusPath = projectScratchPath(project.dir, kGiscusDir);
                ensureDirSync(giscusPath);
                const path = join3(giscusPath, fileName.replace("/", "."));
                try {
                    const giscusJson = Deno.readTextFileSync(path);
                    giscusMeta = JSON.parse(giscusJson);
                } catch  {
                    removeIfExists(path);
                    giscusMeta = await getGithubDiscussionsMetadata(repo);
                    const jsonStr = JSON.stringify(giscusMeta, undefined, 2);
                    Deno.writeTextFileSync(path, jsonStr);
                }
                if (giscusOptions[kGiscusRepoId] === undefined) {
                    giscusOptions[kGiscusRepoId] = giscusMeta.repositoryId;
                }
                if (giscusOptions[kGiscusCategoryId] === undefined) {
                    giscusOptions[kGiscusCategoryId] = getDiscussionCategoryId(giscusOptions[kGiscusCategoryId] || "", giscusMeta);
                }
            }
        }
    }
}
const kSiteTemplateDefault = "default";
const kSiteTemplateBlog = "blog";
const websiteProjectType = {
    type: kWebsite,
    typeAliases: [
        "site"
    ],
    templates: [
        kSiteTemplateDefault,
        kSiteTemplateBlog
    ],
    create: (title, template)=>{
        const resourceDir = resourcePath(join3("projects", "website"));
        return websiteTemplate(resourceDir, title, template);
    },
    libDir: "site_libs",
    outputDir: "_site",
    cleanOutputDir: true,
    formatLibDirs: ()=>defaultProjectType.formatLibDirs().concat([
            "quarto-nav",
            "quarto-search"
        ]),
    config: websiteProjectConfig,
    metadataFields: websiteMetadataFields,
    resourceIgnoreFields: ()=>[
            kWebsite,
            "site"
        ],
    preRender: async (context)=>{
        await initWebsiteNavigation(context);
    },
    supplementRender: (project, files, incremental)=>{
        const listingSupplements = listingSupplementalFiles(project, files, incremental);
        return listingSupplements;
    },
    formatExtras: async (project, source, flags, format, temp)=>{
        if (isHtmlFileOutput(format.pandoc)) {
            const extras = formatHasBootstrap(format) ? await websiteNavigationExtras(project, source, flags, format, temp) : {};
            extras.pandoc = extras.pandoc || {};
            extras.metadata = extras.metadata || {};
            resolveFormatForGiscus(project, format);
            const title = websiteTitle(project.config);
            if (title) {
                extras.pandoc = {
                    [kTitlePrefix]: title
                };
            }
            const favicon = websiteConfigString(kSiteFavicon, project.config);
            if (favicon) {
                const offset = projectOffset(project, source);
                extras.html = extras.html || {};
                extras.html.dependencies = extras.html.dependencies || [];
                extras.html.dependencies.push({
                    name: kSiteFavicon,
                    links: [
                        {
                            rel: "icon",
                            href: offset + "/" + favicon,
                            type: contentType(favicon)
                        }
                    ]
                });
            }
            const offset1 = projectOffset(project, source);
            const [_dir, stem] = dirAndStem(source);
            const home = stem === "index" && offset1 === ".";
            if (home && !format.metadata[kTitle] && !format.metadata[kPageTitle] && title) {
                extras.metadata[kPageTitle] = title;
            }
            extras.html = extras.html || {};
            extras.html[kHtmlPostprocessors] = extras.html[kHtmlPostprocessors] || [];
            extras.html[kHtmlFinalizers] = extras.html[kHtmlFinalizers] || [];
            extras.html[kMarkdownAfterBody] = extras.html[kMarkdownAfterBody] || [];
            extras.html[kHtmlPostprocessors]?.push(...[
                htmlResourceResolverPostprocessor(source, project, projectExtensionPathResolver(project.config?.project[kProjectLibDir] || "")), 
            ]);
            const hasBootstrap = formatHasBootstrap(format);
            if (hasBootstrap) {
                const htmlListingDependencies = await listingHtmlDependencies(source, project, format, temp, extras);
                if (htmlListingDependencies) {
                    const listingPostProcessor = htmlListingDependencies[kHtmlPostprocessors];
                    if (listingPostProcessor) {
                        extras.html[kHtmlPostprocessors]?.unshift(listingPostProcessor);
                    }
                    const listingAfterBody = htmlListingDependencies[kMarkdownAfterBody];
                    if (listingAfterBody) {
                        extras.html[kMarkdownAfterBody]?.push(listingAfterBody);
                    }
                    extras[kIncludeInHeader] = extras[kIncludeInHeader] || [];
                    extras[kIncludeInHeader].push(...htmlListingDependencies[kIncludeInHeader]);
                    extras.html[kSassBundles] = extras.html[kSassBundles] || [];
                    extras.html[kSassBundles].push(...htmlListingDependencies[kSassBundles]);
                    extras.html[kDependencies] = extras.html[kDependencies] || [];
                    extras.html[kDependencies]?.push(...htmlListingDependencies[kDependencies]);
                }
                const aboutDependencies = await aboutHtmlDependencies(source, project, format, temp, extras);
                if (aboutDependencies) {
                    const aboutPostProcessor = aboutDependencies[kHtmlPostprocessors];
                    if (aboutPostProcessor) {
                        extras.html[kHtmlPostprocessors]?.push(aboutPostProcessor);
                    }
                    extras.html[kSassBundles] = extras.html[kSassBundles] || [];
                    extras.html[kSassBundles].push(...aboutDependencies[kSassBundles]);
                    extras.html[kMarkdownAfterBody] = extras.html[kMarkdownAfterBody] || [];
                    extras.html[kMarkdownAfterBody].push(...aboutDependencies[kMarkdownAfterBody]);
                }
            }
            const htmlMetadataDependencies = metadataHtmlDependencies(source, project, format, extras);
            extras.html[kHtmlPostprocessors]?.push(htmlMetadataDependencies[kHtmlPostprocessors]);
            extras.html[kMarkdownAfterBody]?.push(htmlMetadataDependencies[kMarkdownAfterBody]);
            const analyticsDependency = websiteAnalyticsScriptFile(project, temp);
            if (analyticsDependency) {
                extras[kIncludeInHeader] = extras[kIncludeInHeader] || [];
                extras[kIncludeInHeader]?.push(analyticsDependency);
            }
            const cookieDep = cookieConsentDependencies(project, temp);
            if (cookieDep) {
                extras[kIncludeInHeader] = extras[kIncludeInHeader] || [];
                extras[kIncludeInHeader]?.push(cookieDep.scriptFile);
                extras.html = extras.html || {};
                extras.html[kDependencies] = extras.html[kDependencies] || [];
                extras.html[kDependencies]?.push(cookieDep.dependency);
                extras.html[kHtmlPostprocessors] = extras.html[kHtmlPostprocessors] || [];
                extras.html[kHtmlPostprocessors]?.push(cookieDep.htmlPostProcessor);
            }
            return Promise.resolve(extras);
        } else {
            return Promise.resolve({});
        }
    },
    postRender: async (context, incremental, outputFiles)=>{
        await websitePostRender(context, incremental, websiteOutputFiles(outputFiles));
    }
};
async function websitePostRender(context, incremental, outputFiles) {
    const doc404 = join3(projectOutputDir(context), kProject404File);
    outputFiles = outputFiles.filter((file)=>{
        return file.file !== doc404;
    });
    await updateSitemap(context, outputFiles, incremental);
    await updateSearchIndex(context, outputFiles, incremental);
    completeListingGeneration(context, outputFiles, incremental);
    await updateAliases(context, outputFiles, incremental);
    await ensureIndexPage(context);
}
function websiteOutputFiles(outputFiles) {
    return outputFiles.filter((outputFile)=>{
        return isHtmlFileOutput(outputFile.format.pandoc);
    }).map((outputFile)=>{
        const contents = Deno.readTextFileSync(outputFile.file);
        const doctypeMatch = contents.match(/^<!DOCTYPE.*?>/);
        const doc = new DOMParser().parseFromString(contents, "text/html");
        return {
            ...outputFile,
            doc,
            doctype: doctypeMatch ? doctypeMatch[0] : undefined
        };
    });
}
function websiteTemplate(resourceDir, title, template) {
    if (template === kSiteTemplateBlog) {
        const today = new Date();
        const secondPostDateStr = formatDate(today, "iso");
        today.setDate(today.getDate() - 3);
        const firstPostDateStr = formatDate(today, "iso");
        return {
            configTemplate: join3(resourceDir, "templates", "blog", "_quarto-blog.ejs.yml"),
            resourceDir,
            scaffold: ()=>[
                    {
                        name: "index",
                        content: "",
                        noEngineContent: true,
                        title,
                        yaml: 'listing:\n  contents: posts\n  sort: "date desc"\n  type: default\n  categories: true\n  sort-ui: false\n  filter-ui: false\npage-layout: full\ntitle-block-banner: true'
                    },
                    {
                        name: "index",
                        subdirectory: "posts/welcome",
                        title: "Welcome To My Blog",
                        content: "This is the first post in a Quarto blog. Welcome!\n\n![](thumbnail.jpg)\n\nSince this post doesn't specify an explicit `image`, the first image in the post will be used in the listing page of posts.",
                        noEngineContent: true,
                        yaml: `author: "Tristan O'Malley"\ndate: "${firstPostDateStr}"\ncategories: [news]`,
                        supporting: [
                            join3(resourceDir, "templates", "blog", "thumbnail.jpg"), 
                        ]
                    },
                    {
                        name: "index",
                        subdirectory: "posts/post-with-code",
                        title: "Post With Code",
                        content: "This is a post with executable code.",
                        yaml: `author: "Harlow Malloc"\ndate: "${secondPostDateStr}"\ncategories: [news, code, analysis]\nimage: "image.jpg"`,
                        supporting: [
                            join3(resourceDir, "templates", "blog", "image.jpg"), 
                        ]
                    },
                    {
                        name: "about",
                        title: "About",
                        content: "About this blog",
                        yaml: `image: profile.jpg\nabout:\n  template: jolla\n  links:\n    - icon: twitter\n      text: Twitter\n      href: https://twitter.com\n    - icon: linkedin\n      text: LinkedIn\n      href: https://linkedin.com\n    - icon: github\n      text: Github\n      href: https://github.com\n`,
                        supporting: [
                            join3(resourceDir, "templates", "blog", "profile.jpg"), 
                        ],
                        noEngineContent: true
                    }, 
                ],
            supporting: [
                "styles.css",
                {
                    from: join3("templates", "blog", "_metadata.yml"),
                    to: join3("posts", "_metadata.yml")
                }, 
            ]
        };
    } else {
        return {
            configTemplate: join3(resourceDir, "templates", "_quarto.ejs.yml"),
            resourceDir,
            scaffold: ()=>[
                    {
                        name: "index",
                        content: "This is a Quarto website.\n\nTo learn more about Quarto websites visit <https://quarto.org/docs/websites>.",
                        title
                    },
                    {
                        name: "about",
                        content: "About this site",
                        title: "About"
                    }, 
                ],
            supporting: [
                "styles.css", 
            ]
        };
    }
}
const kBookChapters = "chapters";
const kBookAppendix = "appendices";
const kBookReferences = "references";
const kBookRender = "render";
const kBookOutputFile = "output-file";
const kBookTools = "tools";
const kBookSearch = "search";
const kBookItemChapter = "chapter";
const kBookItemAppendix = "appendix";
const kBookItemPart = "part";
async function bookProjectConfig(projectDir, config, flags) {
    const site = config[kWebsite] || {};
    config[kWebsite] = site;
    const book = config[kBook];
    if (book) {
        site[kSiteTitle] = book[kSiteTitle];
        site[kSiteFavicon] = book[kSiteFavicon];
        site[kSiteUrl] = book[kSiteUrl];
        site[kSitePath] = book[kSitePath];
        site[kSiteRepoUrl] = book[kSiteRepoUrl];
        site[kSiteRepoSubdir] = book[kSiteRepoSubdir];
        site[kSiteRepoBranch] = book[kSiteRepoBranch];
        site[kSiteRepoActions] = book[kSiteRepoActions];
        site[kSiteNavbar] = book[kSiteNavbar];
        site[kSiteSidebar] = book[kSiteSidebar];
        site[kSitePageNavigation] = book[kSitePageNavigation] !== false;
        site[kOpenGraph] = book[kOpenGraph];
        site[kTwitterCard] = book[kTwitterCard];
        site[kImage] = book[kImage];
        site[kMarginHeader] = book[kMarginHeader];
        site[kMarginFooter] = book[kMarginFooter];
        site[kBodyHeader] = book[kBodyHeader];
        site[kBodyFooter] = book[kBodyFooter];
        site[kBookSearch] = book[kBookSearch];
        site[kSiteReaderMode] = book[kSiteReaderMode];
        site[kGoogleAnalytics] = book[kGoogleAnalytics];
        site[kCookieConsent] = book[kCookieConsent];
        site[kComments] = book[kComments];
        if (book[kPageFooter]) {
            site[kPageFooter] = book[kPageFooter];
        }
    }
    const language = await formatLanguage(config, config[kLanguageDefaults], flags);
    site[kSiteSidebar] = site[kSiteSidebar] || {};
    const siteSidebar = site[kSiteSidebar];
    siteSidebar[kSiteTitle] = siteSidebar[kSiteTitle] || book?.[kSiteTitle];
    siteSidebar[kSidebarLogo] = siteSidebar[kSidebarLogo] || book?.[kSidebarLogo];
    siteSidebar[kContents] = [];
    const bookContents = bookConfig(kBookChapters, config);
    if (Array.isArray(bookContents)) {
        siteSidebar[kContents] = bookChaptersToSidebarItems(bookContents);
    }
    const bookReferences = bookConfig(kBookReferences, config);
    if (bookReferences) {
        siteSidebar[kContents].push(bookReferences);
    }
    const bookAppendix = bookConfig(kBookAppendix, config);
    if (Array.isArray(bookAppendix)) {
        siteSidebar[kContents] = siteSidebar[kContents].concat([
            chapterToSidebarItem({
                part: language[kSectionTitleAppendices],
                chapters: bookAppendix
            }), 
        ]);
    }
    if (book?.[kBookSearch] !== false && siteSidebar[kBookSearch] !== false) {
        siteSidebar[kBookSearch] = true;
    }
    siteSidebar[kSiteSidebarStyle] = siteSidebar[kSiteSidebarStyle] || "floating";
    const tools = [];
    if (site[kSiteRepoUrl]) {
        const repoUrl = siteRepoUrl(site);
        const icon = repoUrlIcon(repoUrl);
        tools.push({
            text: "Source Code",
            icon,
            href: repoUrl
        });
    }
    tools.push(...downloadTools(projectDir, config) || []);
    tools.push(...sharingTools(config) || []);
    if (site[kSiteNavbar]) {
        site[kSiteNavbar][kBookTools] = tools;
    } else {
        siteSidebar[kBookTools] = siteSidebar[kBookTools] || [];
        siteSidebar[kBookTools].push(...tools);
    }
    const renderItems = await bookRenderItems(projectDir, language, config);
    book[kBookRender] = renderItems;
    config.project[kProjectRender] = renderItems.filter((target)=>!!target.file).map((target)=>target.file);
    const ext404 = engineValidExtensions().find((ext)=>existsSync(join3(projectDir, `404${ext}`)));
    if (ext404) {
        config.project[kProjectRender].push(`404${ext404}`);
    }
    return await websiteProjectConfig(projectDir, config);
}
function siteRepoUrl(site) {
    const repoUrl = site[kSiteRepoUrl];
    const branch = site[kSiteRepoBranch] || "main";
    if (site[kSiteRepoSubdir]) {
        const subdir = ensureTrailingSlash(site[kSiteRepoSubdir]);
        return `${ensureTrailingSlash(repoUrl)}tree/${branch}/${subdir}`;
    } else {
        return repoUrl;
    }
}
const variableRegex = /{{<\s*var\s+(.*?)\s*>}}/gm;
function resolveVariables(value, config) {
    variableRegex.lastIndex = 0;
    return value.replaceAll(variableRegex, (_, varName)=>{
        const vars = config[kQuartoVarsKey];
        if (vars && vars[varName] !== undefined) {
            return String(vars[varName]);
        } else {
            return `?var:${varName}`;
        }
    });
}
function bookConfigRenderItems(project) {
    return bookConfig(kBookRender, project);
}
async function bookRenderItems(projectDir, language, config) {
    if (!config) {
        return [];
    }
    let nextNumber = 1;
    const inputs = [];
    const findInputs = async (type, items, depth = 0)=>{
        const throwInputNotFound = (input)=>{
            throw new Error(`Book ${type} '${input}' not found`);
        };
        for (const item of items){
            if (item.contents) {
                inputs.push({
                    type: kBookItemPart,
                    file: item.href,
                    text: item.text,
                    depth
                });
                await findInputs(type, item.contents, depth + 1);
            } else if (item.href) {
                const itemPath = join3(projectDir, item.href);
                if (safeExistsSync(itemPath)) {
                    const engine = fileExecutionEngine(itemPath);
                    if (engine) {
                        let number;
                        if (type === kBookItemChapter && await inputIsNumbered(projectDir, item.href)) {
                            number = nextNumber++;
                        }
                        inputs.push({
                            type,
                            file: item.href,
                            number,
                            depth
                        });
                    }
                } else {
                    throwInputNotFound(item.href);
                }
            } else if (item.text && !item.text.trim().match(/^-+$/)) {
                throwInputNotFound(item.text);
            }
        }
    };
    const context = sidebarContext();
    const findChapters = async (key, delimiter)=>{
        nextNumber = 1;
        const bookInputs = bookConfig(key, config);
        if (bookInputs) {
            if (delimiter) {
                inputs.push(delimiter);
            }
            await findInputs(kBookItemChapter, bookChaptersToSidebarItems(bookInputs).map((item)=>normalizeSidebarItem(projectDir, item, context)), key === "chapters" ? 0 : 1);
        }
    };
    await findChapters(kBookChapters);
    const references = bookConfig("references", config);
    if (references) {
        await findInputs(kBookItemChapter, [
            normalizeSidebarItem(projectDir, references, context), 
        ]);
    }
    await findChapters(kBookAppendix, {
        type: kBookItemAppendix,
        text: language[kSectionTitleAppendices] + " {.unnumbered}",
        depth: 0
    });
    const missing = inputs.filter((input)=>input.file && !existsSync(join3(projectDir, input.file)));
    if (missing.length) {
        throw new Error("Book contents file(s) do not exist: " + missing.join(", "));
    }
    const indexPos = inputs.findIndex((input)=>isBookIndexPage(input.file));
    if (indexPos === -1) {
        throw new Error("Book contents must include a home page (e.g. index.md)");
    }
    const index = inputs.splice(indexPos, 1);
    return index.concat(inputs);
}
const kDownloadableItems = {
    "epub": {
        name: "ePub",
        icon: "journal"
    },
    "pdf": {
        name: "PDF",
        icon: "file-pdf"
    },
    "docx": {
        name: "Docx",
        icon: "file-word"
    }
};
function bookChaptersToSidebarItems(chapters) {
    return chapters.map(chapterToSidebarItem);
}
function chapterToSidebarItem(chapter) {
    const item = __VIRTUAL_FILE107(chapter);
    if (item.part) {
        item.section = item.part;
        delete item.part;
    }
    if (item.chapters) {
        item.contents = bookChaptersToSidebarItems(item.chapters);
        delete item.chapters;
    }
    return item;
}
function downloadTools(projectDir, config) {
    const downloadActions = websiteConfigActions("downloads", kBook, config);
    const filteredActions = downloadActions.filter((action)=>{
        const format = defaultWriterFormat(action);
        if (format) {
            return format.extensions?.book && !isMultiFileBookFormat(format);
        } else {
            return false;
        }
    });
    const outputStem = bookOutputStem(projectDir, config);
    const downloads = filteredActions.map((action)=>{
        const format = defaultWriterFormat(action);
        const downloadItem = kDownloadableItems[action];
        if (downloadItem) {
            return {
                icon: downloadItem.icon,
                text: `Download ${downloadItem.name}`,
                href: `/${outputStem}.${format.render[kOutputExt]}`
            };
        } else {
            return {
                text: `Download action}`,
                href: `/${outputStem}.${format.render[kOutputExt]}`
            };
        }
    });
    if (downloads.length === 0) {
        return undefined;
    } else if (downloads.length === 1) {
        return [
            {
                icon: "download",
                ...downloads[0]
            }
        ];
    } else {
        return [
            {
                icon: "download",
                text: "Download",
                menu: downloads
            }
        ];
    }
}
function bookOutputStem(projectDir, config) {
    const outputFile = bookConfig(kBookOutputFile, config) || bookConfig(kTitle, config) || basename2(projectDir);
    return texSafeFilename(config !== undefined ? resolveVariables(outputFile, config) : outputFile);
}
function sharingTools(projectConfig) {
    const sharingActions = websiteConfigActions("sharing", kBook, projectConfig);
    const sidebarTools = [];
    sidebarTools.push(...sharingActions.filter((action)=>{
        const sidebarTool = kSharingUrls[action];
        if (sidebarTool) {
            return true;
        } else {
            return false;
        }
    }).map((action)=>{
        return kSharingUrls[action];
    }));
    if (sidebarTools.length === 0) {
        return undefined;
    } else if (sidebarTools.length === 1) {
        return sidebarTools;
    } else {
        return [
            {
                text: "Share",
                icon: kShareIcon,
                menu: sidebarTools
            }
        ];
    }
}
const kShareIcon = "share";
const kSharingUrls = {
    linkedin: {
        icon: "linkedin",
        text: "LinkedIn",
        href: "https://www.linkedin.com/sharing/share-offsite/?url=|url|"
    },
    facebook: {
        icon: "facebook",
        text: "Facebook",
        url: "https://www.facebook.com/sharer/sharer.php?u=|url|"
    },
    twitter: {
        icon: "twitter",
        text: "Twitter",
        url: "https://twitter.com/intent/tweet?url=|url|"
    }
};
async function inputIsNumbered(projectDir, input) {
    const partitioned = await partitionedMarkdownForInput(projectDir, input);
    if (partitioned) {
        return isNumberedChapter(partitioned);
    } else {
        return false;
    }
}
function onSingleFileBookPreRender(format, config) {
    const extension = format.extensions?.book;
    if (extension && extension.onSingleFilePreRender) {
        extension.onSingleFilePreRender(format, config);
    }
    return format;
}
function onSingleFileBookPostRender(project, file) {
    const extension = file.format.extensions?.book;
    if (extension && extension.onSingleFilePostRender) {
        extension.onSingleFilePostRender(project, file);
    }
}
async function bookMultiFileHtmlOutputs(context) {
    const renderFiles = bookConfigRenderItems(context.config).filter((item)=>!!item.file);
    if (renderFiles.length === 0) {
        return [];
    }
    const index = await inputTargetIndex(context, renderFiles[0].file);
    if (!index) {
        return [];
    }
    const formatName = Object.keys(index.formats).find((name)=>{
        if (isMultiFileBookFormat(defaultWriterFormat(name))) {
            const format = index.formats[name];
            return isHtmlOutput(format.pandoc, true) && !!format.pandoc[kOutputFile];
        } else {
            return false;
        }
    });
    if (!formatName) {
        return [];
    }
    const outputFiles = [];
    for(let i1 = 0; i1 < renderFiles.length; i1++){
        const file = renderFiles[i1].file;
        const index1 = await inputTargetIndex(context, file);
        const outputFile = index1?.formats[formatName].pandoc[kOutputFile];
        if (outputFile) {
            outputFiles.push(join3(projectOutputDir(context), dirname2(file), outputFile));
        }
    }
    return outputFiles;
}
function withChapterMetadata(format, headingText, headingAttr, chapterInfo, config) {
    format = cloneDeep1(format);
    if (headingText) {
        format.metadata[kTitle] = formatChapterTitle(format, headingText, headingAttr, chapterInfo);
    }
    format.metadata[kCrossref] = format.metadata[kCrossref] || {};
    const crossref = format.metadata[kCrossref];
    if (headingAttr?.id) {
        crossref[kCrossrefChapterId] = headingAttr?.id;
    }
    if (chapterInfo) {
        format.pandoc[kNumberOffset] = [
            chapterInfo.number
        ];
        if (chapterInfo.appendix) {
            crossref[kCrossrefChaptersAppendix] = true;
            crossref[kCrossrefChaptersAlpha] = true;
        }
    } else {
        format.pandoc[kNumberSections] = false;
    }
    format.pandoc[kToc] = format.pandoc[kToc] !== undefined ? format.pandoc[kToc] : isListedChapter(headingAttr);
    delete format.metadata[kDoi];
    const description = bookConfig("description", config);
    if (description) {
        format.metadata[kDescription] = description;
    }
    return format;
}
function isListedChapter(headingAttr) {
    return !headingAttr || !headingAttr.classes.includes("unlisted");
}
function chapterInfoForInput(project, chapterHref) {
    const renderItems = bookConfigRenderItems(project.config);
    const appendixPos = renderItems.findIndex((item)=>item.type === kBookItemAppendix);
    const itemPos = renderItems.findIndex((item)=>item.file === chapterHref);
    if (itemPos !== -1) {
        const appendix = appendixPos !== -1 && itemPos > appendixPos;
        const item = renderItems[itemPos];
        if (item.number) {
            return {
                number: item.number,
                appendix,
                labelPrefix: appendix ? String.fromCharCode(64 + item.number) : item.number.toString()
            };
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function formatChapterTitle(format, label, attr, info) {
    const withIdSpan = (text)=>{
        if (!attr?.id) {
            return text;
        } else {
            return `[${text}]{#${attr.id} .quarto-section-identifier}`;
        }
    };
    if (info) {
        if (info.appendix) {
            const crossref = format.metadata?.crossref;
            const title = crossref?.[kCrossrefAppendixTitle] || "Appendix";
            const delim = crossref?.[kCrossrefAppendixDelim] !== undefined ? crossref?.[kCrossrefAppendixDelim] : " —";
            return withIdSpan(`${title} ${info.labelPrefix}${delim} ${label}`);
        } else {
            return withIdSpan(`[${info.labelPrefix}]{.chapter-number}\u00A0 [${label}]{.chapter-title}`);
        }
    } else {
        return withIdSpan(label);
    }
}
function numberChapterHtmlNav(label, info) {
    if (info) {
        return `<span class='chapter-number'>${info.labelPrefix}</span>\u00A0 <span class='chapter-title'>${label}</span>`;
    } else {
        return label;
    }
}
async function bookCrossrefsPostRender(context, outputFiles) {
    const projOutput = projectOutputDir(context);
    const crossrefOutputFiles = outputFiles.filter((file)=>isMultiFileBookFormat(file.format));
    if (crossrefOutputFiles.length > 0) {
        const indexes = await bookCrossrefIndexes(context);
        for (const outputFile of crossrefOutputFiles){
            const fileRelative = relative2(projOutput, outputFile.file);
            const index = bookCrossrefIndexForOutputFile(fileRelative, indexes);
            if (index) {
                resolveCrossrefs(context, fileRelative, outputFile.format, outputFile.doc, index);
            }
        }
    }
}
function resolveCrossrefs(context, file, format, doc, index) {
    const projOutput = projectOutputDir(context);
    const relativePathTo = (target)=>{
        const currentFile = join3(projOutput, file);
        const targetFile = join3(projOutput, target);
        return pathWithForwardSlashes(relative2(dirname2(currentFile), targetFile));
    };
    const refs = doc.querySelectorAll(".quarto-unresolved-ref");
    for(let i1 = 0; i1 < refs.length; i1++){
        const ref = refs[i1];
        const id = ref.textContent;
        const noPrefix = ref.classList.contains("ref-noprefix");
        const type = refType(id);
        if (!type) {
            continue;
        }
        const entry = index.entries[id];
        let parentLink;
        if (ref.parentElement?.tagName === "A" && ref.parentElement?.getAttribute("href") === `#${id}`) {
            parentLink = ref.parentElement;
        }
        if (entry) {
            if (parentLink && file !== entry.file) {
                const relativeFilePath = relativePathTo(entry.file);
                const hash = isChapterRef(entry) ? "" : `#${id}`;
                parentLink.setAttribute("href", `${relativeFilePath}${hash}`);
            }
            ref.innerHTML = formatCrossref(type, index.files[entry.file], entry, noPrefix, format.language, entry.parent ? index.entries[entry.parent] : undefined);
            ref.removeAttribute("class");
        } else {
            warning(`${file}: Unable to resolve crossref @${id}`);
            if (parentLink) {
                const parentLinkParent = parentLink.parentElement;
                if (parentLinkParent) {
                    const span = doc.createElement("span");
                    span.classList.add("quarto-unresolved-ref");
                    span.innerHTML = `?${id}`;
                    parentLinkParent.insertBefore(span, parentLink);
                    parentLink.remove();
                }
            }
        }
    }
    const links = doc.querySelectorAll("a");
    for(let i11 = 0; i11 < links.length; i11++){
        const link = links[i11];
        const href = link.getAttribute("href");
        if (href && href.startsWith("#")) {
            const id1 = href.slice(1);
            if (index.headings[id1]) {
                if (!index.headings[id1].files.includes(file)) {
                    const linkToFile = index.headings[id1].files[0];
                    const hash1 = index.files[linkToFile]?.[kCrossrefChapterId] === id1 ? "" : `#${id1}`;
                    const relativeFilePath1 = relativePathTo(index.headings[id1].files[0]);
                    link.setAttribute("href", `${relativeFilePath1}${hash1}`);
                }
            }
        }
    }
}
function isChapterRef(entry) {
    if (refType(entry.key) === "sec" && entry.order.section) {
        return !entry.order.section.slice(1).some((index)=>index > 0);
    } else {
        return false;
    }
}
function bookCrossrefIndexForOutputFile(outputFile, indexes) {
    return indexes.find((index)=>Object.keys(index.files).find((file)=>file === outputFile));
}
async function bookCrossrefIndexes(context) {
    const indexes = {};
    const renderFiles = bookConfigRenderItems(context.config).filter((item)=>!!item.file);
    for (const renderFile of renderFiles){
        const file = renderFile.file;
        const index = await inputTargetIndex(context, file);
        if (index) {
            for (const formatName of Object.keys(index.formats)){
                if (isMultiFileBookFormat(defaultWriterFormat(formatName))) {
                    const format = index.formats[formatName];
                    if (format.pandoc[kOutputFile]) {
                        const outputFile = join3(dirname2(file), format.pandoc[kOutputFile]);
                        const indexFile = crossrefIndexForOutputFile(context.dir, file, outputFile);
                        if (existsSync(indexFile)) {
                            const indexJson = JSON.parse(Deno.readTextFileSync(indexFile));
                            indexes[formatName] = indexes[formatName] || {
                                files: {},
                                entries: {},
                                headings: {}
                            };
                            const index1 = indexes[formatName];
                            index1.files[outputFile] = indexJson.options || {};
                            indexJson.entries.forEach((entry)=>{
                                index1.entries[entry.key] = {
                                    ...entry,
                                    file: outputFile
                                };
                            });
                            indexJson.headings.forEach((heading)=>{
                                if (!index1.headings[heading]) {
                                    index1.headings[heading] = {
                                        id: heading,
                                        files: []
                                    };
                                }
                                index1.headings[heading].files.push(outputFile);
                            });
                        }
                    }
                }
            }
        }
    }
    return Object.values(indexes);
}
function formatCrossref(type, options, entry, noPrefix, language, parent) {
    if (parent) {
        const crossref = [];
        const parentType = refType(parent.key);
        crossref.push(numberOption(parent.order, options, parentType));
        crossref.push(" (");
        crossref.push(numberOption(entry.order, options, "subref", "alpha a"));
        crossref.push(")");
        return crossref.join("");
    } else {
        const refNumber = numberOption(entry.order, options, type);
        if (type === "sec" && !noPrefix) {
            const prefix = options[kCrossrefChapters] && isChapterRef(entry) ? options[kCrossrefChaptersAppendix] ? language[kCrossrefApxPrefix] : language[kCrossrefChPrefix] : language[kCrossrefSecPrefix];
            const crossref1 = prefix + "&nbsp;" + refNumber;
            return crossref1;
        } else {
            return refNumber;
        }
    }
}
function refWithChapter(options, ref, section) {
    if (options[kCrossrefChapters] !== false) {
        const chapter = section ? section[0] : undefined;
        const chapterPrefix = chapter ? formatChapterIndex(options, chapter) + "." : "";
        return chapterPrefix + ref;
    } else {
        return ref;
    }
}
function refType(id) {
    const match = id.match(/^(\w+)-/);
    return (match ? match[1] : "fig").toLowerCase();
}
function numberOption(order, options, type, defaultFormat) {
    if (type === "sec" && order.section) {
        return sectionNumber(options, order.section);
    }
    const style = numberStyle(options, type, defaultFormat);
    if (Array.isArray(style)) {
        const entryCount = style.length;
        const entryIndex = (order.number - 1) % entryCount;
        const option = style[entryIndex];
        return refWithChapter(options, option, order.section);
    } else if (style.match(/^alpha /)) {
        let startIndexChar = style[style.length - 1];
        if (startIndexChar === " ") {
            startIndexChar = "a";
        }
        const startIndex = startIndexChar.charCodeAt(0);
        return refWithChapter(options, String.fromCharCode(startIndex + order.number - 1), order.section);
    } else if (style.match(/^roman/)) {
        const lower = style.endsWith("i");
        return refWithChapter(options, convertToRoman(order.number, lower), order.section);
    } else {
        return refWithChapter(options, order.number.toString(), order.section);
    }
}
function numberStyle(options, type, defaultFormat) {
    const opt = `${type}-labels`;
    if (defaultFormat === undefined) {
        defaultFormat = "arabic";
    }
    const labelOpt = options[kCrossrefLabels] || defaultFormat;
    return options[opt] || labelOpt;
}
function sectionNumber(options, section) {
    let lastIndex = 0;
    for(let i1 = section.length - 1; i1 >= 0; i1--){
        if (section[i1] > 0) {
            lastIndex = i1;
            break;
        }
    }
    const num = [];
    for(let i11 = 0; i11 <= lastIndex; i11++){
        if (i11 === 0) {
            const chapIndex = formatChapterIndex(options, section[i11]);
            if (chapIndex) {
                num.push(chapIndex);
            }
        } else {
            num.push(section[i11].toString());
        }
    }
    return num.join(".");
}
function formatChapterIndex(options, index) {
    return index ? options[kCrossrefChaptersAlpha] ? String.fromCharCode(64 + index) : index.toString() : "";
}
function convertToRoman(num, lower) {
    const roman = {
        M: 1000,
        CM: 900,
        D: 500,
        CD: 400,
        C: 100,
        XC: 90,
        L: 50,
        XL: 40,
        X: 10,
        IX: 9,
        V: 5,
        IV: 4,
        I: 1
    };
    let str = "";
    for (const i1 of Object.keys(roman)){
        const q = Math.floor(num / roman[i1]);
        num -= q * roman[i1];
        str += lower ? i1.toLowerCase().repeat(q) : i1.repeat(q);
    }
    return str;
}
async function bookBibliographyPostRender(context, incremental, outputFiles) {
    const renderFiles = context.config?.project[kProjectRender] || [];
    let refsHtml;
    for (const file of renderFiles){
        const index = await inputTargetIndex(context, file);
        if (index?.markdown.containsRefs) {
            const target = await resolveInputTarget(context, file, false);
            if (target) {
                refsHtml = join3(projectOutputDir(context), target.outputHref);
            }
            break;
        }
    }
    if (refsHtml && outputFiles.length > 0) {
        const file1 = outputFiles[0];
        const bibliography = file1.format.metadata[kBibliography];
        const nocite = typeof file1.format.metadata[kNoCite] === "string" ? file1.format.metadata[kNoCite] : undefined;
        if (!bibliography) {
            return;
        }
        const fileRelativePath = relative2(projectOutputDir(context), file1.file);
        const inputfile = await inputFileForOutputFile(context, fileRelativePath);
        const bibliographyPaths = [];
        let csl = file1.format.metadata[kCsl];
        if (inputfile) {
            const firstFileDir = dirname2(inputfile);
            bibliographyPaths.push(...bibliography.map((file)=>join3(firstFileDir, file)));
            if (csl) {
                const cslAbsPath = join3(firstFileDir, csl);
                if (safeExistsSync(cslAbsPath)) {
                    csl = cslAbsPath;
                }
            }
        } else {
            throw new Error("Unable to determine proper path to use when computing bibliography path.");
        }
        const citeIds = [];
        outputFiles.forEach((file)=>{
            const refsRelative = pathWithForwardSlashes(relative2(dirname2(file.file), refsHtml));
            forEachCite(file.doc, (cite)=>{
                citeIds.push(...citeIdsFromCite(cite));
                const citeLinks = cite.querySelectorAll("a[role='doc-biblioref']");
                for(let l1 = 0; l1 < citeLinks.length; l1++){
                    const link = citeLinks[l1];
                    link.setAttribute("href", refsRelative + link.getAttribute("href"));
                }
            });
            const refsDiv = file.doc.getElementById("refs");
            if (refsDiv) {
                refsDiv.setAttribute("style", "display: none");
            }
        });
        const refsOutputFile = outputFiles.find((file)=>file.file === refsHtml);
        if (refsOutputFile) {
            if (incremental) {
                const bookHtmlOutputs = await bookMultiFileHtmlOutputs(context);
                for (const htmlOutput of bookHtmlOutputs){
                    if (outputFiles.findIndex((file)=>file.file === htmlOutput) === -1) {
                        if (existsSync(htmlOutput)) {
                            const doc = await parseHtml(Deno.readTextFileSync(htmlOutput));
                            if (doc) {
                                forEachCite(doc, (cite)=>{
                                    citeIds.push(...citeIdsFromCite(cite));
                                });
                            }
                        }
                    }
                }
            }
            if (nocite) {
                citeIds.push(...nocite.split(",").map((x)=>x.trim().replace(/^@/, "")));
            }
            if (citeIds.length > 0) {
                const biblioHtml = await generateBibliographyHTML(context, bibliographyPaths, csl, citeIds);
                const newRefsDiv = refsOutputFile.doc.createElement("div");
                newRefsDiv.innerHTML = biblioHtml;
                const refsDiv = refsOutputFile.doc.getElementById("refs");
                if (refsDiv) {
                    refsDiv.replaceWith(newRefsDiv.firstChild);
                } else {
                    const mainEl = refsOutputFile.doc.querySelector("main");
                    if (mainEl) {
                        mainEl.appendChild(newRefsDiv.firstChild);
                    }
                }
            }
        }
    }
}
async function generateBibliographyHTML(context, bibliography, csl, citeIds) {
    const biblioPaths = bibliography.map((biblio)=>{
        if (isAbsolute2(biblio)) {
            return relative2(context.dir, biblio);
        } else {
            return biblio;
        }
    });
    const yaml = {
        [kBibliography]: biblioPaths,
        [kNoCite]: __VIRTUAL_FILE181(citeIds).map((id)=>"@" + id).join(", ")
    };
    if (csl) {
        yaml[kCsl] = csl;
    }
    const frontMatter = `---\n${stringify(yaml, {
        indent: 2
    })}\n---\n`;
    const result1 = await execProcess({
        cmd: [
            pandocBinaryPath(),
            "--from",
            "markdown",
            "--to",
            "html",
            "--citeproc", 
        ],
        cwd: context.dir,
        stdout: "piped"
    }, frontMatter);
    if (result1.success) {
        return result1.stdout;
    } else {
        error(result1.stderr);
        throw new Error();
    }
}
function forEachCite(doc, f) {
    const cites = doc.querySelectorAll(".citation");
    for(let i1 = 0; i1 < cites.length; i1++){
        const cite = cites[i1];
        f(cite);
    }
}
function citeIdsFromCite(cite) {
    const citeTarget = cite.getAttribute("data-cites");
    if (citeTarget) {
        return citeTarget.split(" ");
    } else {
        return [];
    }
}
function bookPandocRenderer(options, project) {
    const renderedFiles = [];
    const executedFiles = {};
    const cleanupExecutedFiles = ()=>{
        for (const format of Object.keys(executedFiles)){
            executedFiles[format].forEach((executedFile)=>{
                cleanupExecutedFile(executedFile, executedFile.recipe.output);
            });
        }
    };
    return {
        onBeforeExecute: (format)=>{
            return {
                resolveDependencies: isMultiFileBookFormat(format)
            };
        },
        onRender: async (format, file, quiet)=>{
            if (isMultiFileBookFormat(file.context.format)) {
                const partitioned = partitionMarkdown(file.executeResult.markdown);
                const fileRelative = pathWithForwardSlashes(relative2(project.dir, file.context.target.source));
                if (isBookIndexPage(fileRelative)) {
                    file.recipe.format = withBookTitleMetadata(file.recipe.format, project.config);
                    if (!isNumberedChapter(partitioned)) {
                        file.recipe.format.pandoc[kNumberSections] = false;
                    }
                    if (!isListedChapter(partitioned.headingAttr)) {
                        file.recipe.format.pandoc[kToc] = false;
                    }
                    const coverImage = file.recipe.format.metadata[kBookCoverImage] || bookConfig(kBookCoverImage, project.config);
                    if (coverImage) {
                        const coverImageAlt = file.recipe.format.metadata[kBookCoverImageAlt] || bookConfig(kBookCoverImageAlt, project.config);
                        const title = file.recipe.format.metadata[kTitle] || "";
                        const alt = coverImageAlt ? ` fig-alt="${coverImageAlt}"` : "";
                        file.executeResult.markdown = `![](${coverImage} "${title}"){.quarto-cover-image${alt}}\n\n` + file.executeResult.markdown;
                    }
                } else {
                    const chapterInfo = isHtmlOutput(file.recipe.format.pandoc) ? chapterInfoForInput(project, fileRelative) : undefined;
                    file.recipe.format.metadata[kHideDescription] = true;
                    const titleInMetadata = frontMatterTitle(partitioned.yaml);
                    if (titleInMetadata) {
                        const parsedHeading = parsePandocTitle(titleInMetadata);
                        file.recipe.format = withChapterMetadata(file.recipe.format, parsedHeading.heading, parsedHeading.attr, chapterInfo, project.config);
                    } else {
                        if (partitioned.headingText) {
                            file.recipe.format = withChapterMetadata(file.recipe.format, partitioned.headingText, partitioned.headingAttr, chapterInfo, project.config);
                        }
                        const executeMarkdownPartitioned = partitionYamlFrontMatter(file.executeResult.markdown);
                        if (executeMarkdownPartitioned) {
                            file.executeResult.markdown = executeMarkdownPartitioned.yaml + "\n\n" + partitioned.markdown;
                        } else {
                            file.executeResult.markdown = partitioned.markdown;
                        }
                    }
                }
                renderedFiles.push(await renderPandoc(file, quiet));
            } else {
                executedFiles[format] = executedFiles[format] || [];
                executedFiles[format].push(file);
            }
        },
        onComplete: async (error, quiet)=>{
            if (error) {
                cleanupExecutedFiles();
                return {
                    files: renderedFiles
                };
            }
            try {
                const renderFormats = Object.keys(executedFiles);
                for (const renderFormat of renderFormats){
                    const files = executedFiles[renderFormat];
                    if (files.length > 0) {
                        const format = files[0].context.format;
                        if (!isMultiFileBookFormat(format)) {
                            renderedFiles.push(await renderSingleFileBook(project, options, files, !!quiet));
                        }
                    }
                    delete executedFiles[renderFormat];
                }
                return {
                    files: renderedFiles
                };
            } catch (error1) {
                cleanupExecutedFiles();
                return {
                    files: renderedFiles,
                    error: error1 ? typeof error1 === "string" ? new Error(error1) : error1 : new Error()
                };
            }
        }
    };
}
async function renderSingleFileBook(project, options, files, quiet) {
    const executedFile = await mergeExecutedFiles(project, options, files);
    executedFile.recipe.format = withBookTitleMetadata(executedFile.recipe.format, project.config);
    executedFile.recipe.format = onSingleFileBookPreRender(executedFile.recipe.format, project.config);
    const renderedFile = await renderPandoc(executedFile, quiet);
    files.forEach((file)=>{
        cleanupExecutedFile(file, join3(project.dir, renderedFile.file));
    });
    onSingleFileBookPostRender(project, renderedFile);
    return renderedFile;
}
async function mergeExecutedFiles(project, options, files) {
    const context = __VIRTUAL_FILE107(files[0].context);
    context.options = removePandocTo(options);
    const outputStem = bookOutputStem(project.dir, project.config);
    context.format.pandoc[kOutputFile] = `${outputStem}.${context.format.render[kOutputExt]}`;
    const recipe = await outputRecipe(context);
    if (isAbsolute2(recipe.output)) {
        recipe.output = relative2(project.dir, recipe.output);
        recipe.format.pandoc[kOutputFile] = recipe.output;
    }
    const renderItems = bookConfigRenderItems(project.config);
    const markdown = renderItems.reduce((markdown, item)=>{
        let itemMarkdown = "";
        if (item.file) {
            const itemInputPath = join3(project.dir, item.file);
            const file = files.find((file)=>file.context.target.source === itemInputPath);
            if (file) {
                const partitioned = partitionMarkdown(file.executeResult.markdown);
                const resolveTitleMarkdown = (partitioned)=>{
                    const createMarkdownTitle = (text, attr)=>{
                        let attrStr = "";
                        if (attr) {
                            const idStr = attr.id !== "" ? `#${attr.id} ` : "";
                            const clzStr = attr.classes.map((clz)=>{
                                return `.${clz} `;
                            }).join("");
                            const keyValueStr = attr.keyvalue.map((kv)=>{
                                const escapedValue = kv[1].replaceAll(/"/gm, '\\"');
                                return `${kv[0]}="${escapedValue}" `;
                            }).join("");
                            const attrContents = `${idStr}${clzStr}${keyValueStr}`.trim();
                            attrStr = `{${attrContents}}`;
                        }
                        return `# ${text} ${attrStr}\n\n`;
                    };
                    let titleText;
                    let titleAttr;
                    if (partitioned.yaml) {
                        const frontTitle = frontMatterTitle(partitioned.yaml);
                        if (frontTitle) {
                            titleText = frontTitle;
                        } else {
                            titleText = partitioned.headingText;
                            titleAttr = partitioned.headingAttr;
                        }
                    } else {
                        titleText = partitioned.headingText;
                        titleAttr = partitioned.headingAttr;
                    }
                    if (titleText === undefined) {
                        titleText = "";
                    }
                    return createMarkdownTitle(titleText, titleAttr);
                };
                const resolveTitleBlockMarkdown = (yaml)=>{
                    if (yaml) {
                        const titleBlockPath = resourcePath("projects/book/pandoc/title-block.md");
                        const titleAttr = `template='${titleBlockPath}'`;
                        const frontMatter = `---\n${stringify(yaml, {
                            indent: 2
                        })}\n---\n`;
                        const titleBlockMd = "```````{.quarto-title-block " + titleAttr + "}\n" + frontMatter + "\n```````\n\n";
                        return titleBlockMd;
                    } else {
                        return "";
                    }
                };
                const titleMarkdown = resolveTitleMarkdown(partitioned);
                const titleBlockMarkdown = resolveTitleBlockMarkdown(partitioned.yaml);
                itemMarkdown = bookItemMetadata(project, item, file) + titleMarkdown + titleBlockMarkdown + partitioned.markdown;
            } else {
                throw new Error("Executed file not found for book item: " + item.file);
            }
        } else if (item.type === kBookItemPart || item.type === kBookItemAppendix) {
            itemMarkdown = bookPartMarkdown(project, item);
        }
        if ((item.type === kBookItemPart || item.type === kBookItemAppendix) && itemMarkdown.length > 0) {
            itemMarkdown = `\n\n::: {.quarto-book-part}\n${itemMarkdown}\n:::\n\n`;
        }
        return markdown + itemMarkdown;
    }, "");
    const supporting = files.reduce((supporting, file)=>{
        return __VIRTUAL_FILE181(supporting.concat(file.executeResult.supporting.map((f)=>relative2(project.dir, f))));
    }, []);
    const filters = __VIRTUAL_FILE181(files.flatMap((file)=>file.executeResult.filters));
    const engineDependencies = files.reduce((engineDependencies, file)=>{
        const fileEngineDependencies = file.executeResult.engineDependencies;
        if (fileEngineDependencies) {
            for (const engineName of Object.keys(fileEngineDependencies)){
                engineDependencies[engineName] = (engineDependencies[engineName] || []).concat(fileEngineDependencies[engineName]);
            }
        }
        return engineDependencies;
    }, {});
    const preserve = files.reduce((preserve, file)=>{
        return {
            ...preserve,
            ...file.executeResult.preserve
        };
    }, {});
    const postProcess = files.reduce((postProcess, file)=>{
        return postProcess || !!file.executeResult.postProcess;
    }, false);
    const resourceFiles = __VIRTUAL_FILE181(files.flatMap((file)=>file.resourceFiles));
    return Promise.resolve({
        context,
        recipe,
        executeResult: {
            markdown,
            supporting,
            filters,
            engineDependencies,
            preserve,
            postProcess
        },
        resourceFiles
    });
}
async function bookPostRender(context, incremental, outputFiles) {
    const websiteFiles = websiteOutputFiles(outputFiles);
    if (websiteFiles.length > 0) {
        await bookBibliographyPostRender(context, incremental, websiteFiles);
        await bookCrossrefsPostRender(context, websiteFiles);
        websiteFiles.forEach((websiteFile)=>{
            const doctype = websiteFile.doctype;
            const htmlOutput = (doctype ? doctype + "\n" : "") + websiteFile.doc.documentElement?.outerHTML;
            Deno.writeTextFileSync(websiteFile.file, htmlOutput);
        });
        await websitePostRender(context, incremental, outputFiles);
    }
}
async function bookIncrementalRenderAll(context, options, files) {
    for(let i1 = 0; i1 < files.length; i1++){
        const contexts = await renderContexts({
            path: files[i1]
        }, options, false, context);
        for (const context1 of Object.values(contexts)){
            if (!isMultiFileBookFormat(context1.format)) {
                return true;
            }
        }
    }
    return false;
}
function cleanupExecutedFile(file, finalOutput) {
    renderCleanup(file.context.target.input, finalOutput, file.recipe.format, file.executeResult.supporting, executionEngineKeepMd(file.context.target.input));
}
function bookItemMetadata(project, item, file) {
    const resourceDir = file ? relative2(project.dir, dirname2(file.context.target.input)) : undefined;
    const inlineMetadata = {
        resourceDir: resourceDir || "."
    };
    const blockMetadata = {
        ...inlineMetadata,
        bookItemType: item.type,
        bookItemNumber: item.number ? item.number : null,
        bookItemFile: item.file,
        bookItemDepth: item.depth
    };
    const inlineMetadataEncoded = encode(JSON.stringify(inlineMetadata));
    const blockMetadataEncoded = encode(JSON.stringify(blockMetadata));
    return `\n\n\`<!-- quarto-file-metadata: ${inlineMetadataEncoded} -->\`{=html}\n\n\`\`\`{=html}\n<!-- quarto-file-metadata: ${blockMetadataEncoded} -->\n\`\`\`\n\n`;
}
function bookPartMarkdown(project, item) {
    const metadata = bookItemMetadata(project, item);
    return `${metadata}# ${item.text ? item.text : ""}\n\n`;
}
function withBookTitleMetadata(format, config) {
    format = cloneDeep1(format);
    if (config) {
        const setMetadata = (key)=>{
            const value = bookConfig(key, config);
            if (value) {
                format.metadata[key] = value;
            }
        };
        setMetadata(kTitle);
        setMetadata(kSubtitle);
        setMetadata(kAuthor);
        setMetadata(kDate);
        setMetadata(kDateFormat1);
        setMetadata(kAbstract);
        setMetadata(kDescription);
        setMetadata(kDoi);
    }
    return format;
}
function frontMatterTitle(yaml) {
    if (yaml) {
        return yaml[kTitle];
    } else {
        return undefined;
    }
}
const kSingleFileBook = "single-file-book";
const bookProjectType = {
    type: "book",
    inheritsType: websiteProjectType.type,
    create: (_title)=>{
        const resourceDir = resourcePath(join3("projects", "book"));
        return {
            configTemplate: join3(resourceDir, "templates", "_quarto.ejs.yml"),
            resourceDir,
            scaffold: ()=>[
                    {
                        name: "index",
                        content: "# Preface {.unnumbered}\n\n" + "This is a Quarto book.\n\n" + "To learn more about Quarto books visit <https://quarto.org/docs/books>."
                    },
                    {
                        name: "intro",
                        content: "# Introduction\n\n" + "This is a book created from markdown and executable code.\n\n" + "See @knuth84 for additional discussion of literate programming."
                    },
                    {
                        name: "summary",
                        content: "# Summary\n\nIn summary, this book has no content whatsoever."
                    },
                    {
                        name: "references",
                        content: "# References {.unnumbered}\n\n::: {#refs}\n:::",
                        noEngineContent: true
                    }, 
                ],
            supporting: [
                "cover.png",
                "references.bib", 
            ]
        };
    },
    libDir: "site_libs",
    outputDir: "_book",
    cleanOutputDir: true,
    config: bookProjectConfig,
    projectFormatsOnly: true,
    isSupportedFormat: (format)=>{
        return !!format.extensions?.book;
    },
    filterParams: (options)=>{
        if (isMultiFileBookFormat(options.format)) {
            return {
                [kCrossrefResolveRefs]: false
            };
        } else {
            return {
                [kSingleFileBook]: true
            };
        }
    },
    pandocRenderer: bookPandocRenderer,
    navItemText: (context, input, text, number)=>{
        const chapterInfo = chapterInfoForInput(context, input);
        if (chapterInfo && number) {
            return Promise.resolve(numberChapterHtmlNav(text, chapterInfo));
        } else {
            return Promise.resolve(text);
        }
    },
    incrementalRenderAll: bookIncrementalRenderAll,
    preRender: bookPreRender,
    postRender: bookPostRender,
    formatLibDirs: websiteProjectType.formatLibDirs,
    metadataFields: ()=>[
            ...websiteProjectType.metadataFields(),
            "book"
        ],
    resourceIgnoreFields: ()=>[
            ...websiteProjectType.resourceIgnoreFields(),
            kBook, 
        ],
    formatExtras: async (context, source, flags, format, temp)=>{
        let extras = {
            pandoc: {
                [kToc]: !isEpubOutput(format.pandoc),
                [kNumberSections]: true
            },
            metadata: {
                [kCrossref]: {
                    [kCrossrefChapters]: true
                }
            }
        };
        if (isHtmlOutput(format.pandoc, true)) {
            if (formatHasBootstrap(format)) {
                extras.html = {
                    [kSassBundles]: [
                        bookScssBundle()
                    ],
                    [kHtmlPostprocessors]: [
                        bookHtmlPostprocessor()
                    ]
                };
            }
            const websiteExtras = await websiteProjectType.formatExtras(context, source, flags, format, temp);
            extras = mergeConfigs(extras, websiteExtras);
        } else if (isLatexOutput(format.pandoc)) {
            extras = mergeConfigs(extras, {
                metadata: {
                    [kDocumentClass]: "scrreprt",
                    [kPaperSize]: "letter"
                },
                pandoc: {
                    [kTopLevelDivision]: "chapter"
                }
            });
        }
        return extras;
    }
};
function bookPreRender(context) {
    const date = bookConfig(kDate, context.config);
    if (context.config && isSpecialDate(date)) {
        setBookConfig(kDate, parseSpecialDate(context.files.input, date), context.config);
    }
    if (websiteProjectType.preRender) {
        return websiteProjectType.preRender(context);
    } else {
        return Promise.resolve();
    }
}
function bookHtmlPostprocessor() {
    return (doc)=>{
        const coverImage = doc.querySelector(".quarto-cover-image");
        const nextEl = (coverImage?.parentNode)?.nextElementSibling;
        if (nextEl && nextEl.tagName === "SECTION" && coverImage?.parentNode) {
            coverImage?.parentNode.remove();
            nextEl.firstChild.after(coverImage?.parentNode);
        }
        return Promise.resolve(kHtmlEmptyPostProcessResult);
    };
}
function bookScssBundle() {
    const scssPath = resourcePath("projects/book/book.scss");
    return {
        dependency: kBootstrapDependencyName,
        key: scssPath,
        quarto: {
            name: "quarto-book.css",
            uses: "",
            defaults: "",
            functions: "",
            mixins: "",
            rules: Deno.readTextFileSync(scssPath)
        }
    };
}
registerProjectType(bookProjectType);
registerProjectType(defaultProjectType);
registerProjectType(websiteProjectType);
const kProjectTypes = projectTypes();
const kProjectTypeAliases = projectTypeAliases();
const kProjectTypesAndAliases = [
    ...kProjectTypes,
    ...kProjectTypeAliases
];
const kExecutionEngines = executionEngines().reverse();
const kEditorTypes = [
    "source",
    "visual"
];
const createProjectCommand = new Command().name("create-project").description("Create a project for rendering multiple documents").arguments("[dir:string]").option("--title <title:string>", "Project title").option("--type <type:string>", `Project type (${kProjectTypes.join(", ")})`).option("--template <type:string>", `Use a specific project template`).option("--engine <engine:string>", `Use execution engine (${kExecutionEngines.join(", ")})`, {
    value: (value)=>{
        value = value || kMarkdownEngine;
        const engine = executionEngine(value.split(":")[0]);
        if (!engine) {
            throw new Error(`Unknown --engine: ${value}`);
        }
        const match = value.match(/(\w+)(:(.+))?$/);
        if (match) {
            return [
                match[1],
                match[3]
            ];
        } else {
            return [
                value
            ];
        }
    }
}).option("--editor <editor:string>", "Default editor for project ('source' or 'visual')").option("--with-venv [packages:string]", "Create a virtualenv for this project").option("--with-condaenv [packages:string]", "Create a condaenv for this project").option("--no-scaffold", "Don't create initial project file(s)").example("Create a project in the current directory", "quarto create-project").example("Create a project in the 'myproject' directory", "quarto create-project myproject").example("Create a website project", "quarto create-project mysite --type website").example("Create a blog project", "quarto create-project mysite --type website --template blog").example("Create a book project", "quarto create-project mybook --type book").example("Create a website project with jupyter", "quarto create-project mysite --type website --engine jupyter").example("Create a website project with jupyter + kernel", "quarto create-project mysite --type website --engine jupyter:python3").example("Create a book project with knitr", "quarto create-project mybook --type book --engine knitr").example("Create jupyter project with virtualenv", "quarto create-project myproject --engine jupyter --with-venv").example("Create jupyter project with virtualenv + packages", "quarto create-project myproject --engine jupyter --with-venv pandas,matplotlib").example("Create jupyter project with condaenv ", "quarto create-project myproject --engine jupyter --with-condaenv").example("Create jupyter project with condaenv + packages", "quarto create-project myproject --engine jupyter --with-condaenv pandas,matplotlib").action(async (options, dir)=>{
    if (dir === undefined || dir === ".") {
        dir = Deno.cwd();
    }
    const engine = options.engine || [];
    const envPackages = typeof options.withVenv === "string" ? options.withVenv.split(",").map((pkg)=>pkg.trim()) : typeof options.withCondaenv === "string" ? options.withCondaenv.split(",").map((pkg)=>pkg.trim()) : undefined;
    const { type , template  } = parseProjectType(options.type);
    const projectTemplate = options.template || template;
    if (kProjectTypesAndAliases.indexOf(type) === -1) {
        throw new Error(`Project type must be one of ${kProjectTypes.join(", ")}, but got "${type}".`);
    }
    const editorType = options.editor;
    if (editorType && !kEditorTypes.includes(editorType)) {
        throw new Error(`Editor type must be one of ${kEditorTypes.join(", ")}, but got "${editorType}".`);
    }
    const projType = projectType(type);
    if (projectTemplate && !projType.templates?.includes(projectTemplate)) {
        if (projType.templates) {
            throw new Error(`Project template must be one of ${projType.templates.join(", ")}, but got "${projectTemplate}".`);
        } else {
            throw new Error(`The project type ${type} does not support any templates.`);
        }
    }
    await projectCreate({
        dir,
        type: type,
        title: options.title || basename2(dir),
        scaffold: !!options.scaffold,
        engine: engine[0] || kMarkdownEngine,
        kernel: engine[1],
        editor: editorType,
        venv: !!options.withVenv,
        condaenv: !!options.withCondaenv,
        envPackages,
        template: projectTemplate
    });
});
const main = {
    ARROW_UP: "↑",
    ARROW_DOWN: "↓",
    ARROW_LEFT: "←",
    ARROW_RIGHT: "→",
    ARROW_UP_LEFT: "↖",
    ARROW_UP_RIGHT: "↗",
    ARROW_DOWN_RIGHT: "↘",
    ARROW_DOWN_LEFT: "↙",
    RADIO_ON: "◉",
    RADIO_OFF: "◯",
    TICK: "✔",
    CROSS: "✘",
    ELLIPSIS: "…",
    POINTER_SMALL: "›",
    LINE: "─",
    POINTER: "❯",
    INFO: "ℹ",
    TAB_LEFT: "⇤",
    TAB_RIGHT: "⇥",
    ESCAPE: "⎋",
    BACKSPACE: "⌫",
    PAGE_UP: "⇞",
    PAGE_DOWN: "⇟",
    ENTER: "↵",
    SEARCH: "⌕"
};
const win = {
    ...main,
    RADIO_ON: "(*)",
    RADIO_OFF: "( )",
    TICK: "√",
    CROSS: "×",
    POINTER_SMALL: "»"
};
const Figures = Deno.build.os === "windows" ? win : main;
const keyMap = {
    up: "ARROW_UP",
    down: "ARROW_DOWN",
    left: "ARROW_LEFT",
    right: "ARROW_RIGHT",
    pageup: "PAGE_UP",
    pagedown: "PAGE_DOWN",
    tab: "TAB_RIGHT",
    enter: "ENTER",
    return: "ENTER"
};
function getFiguresByKeys(keys) {
    const figures = [];
    for (const key of keys){
        const figure = Figures[keyMap[key]] ?? key;
        if (!figures.includes(figure)) {
            figures.push(figure);
        }
    }
    return figures;
}
const KeyMap = {
    "[P": "f1",
    "[Q": "f2",
    "[R": "f3",
    "[S": "f4",
    "OP": "f1",
    "OQ": "f2",
    "OR": "f3",
    "OS": "f4",
    "[11~": "f1",
    "[12~": "f2",
    "[13~": "f3",
    "[14~": "f4",
    "[[A": "f1",
    "[[B": "f2",
    "[[C": "f3",
    "[[D": "f4",
    "[[E": "f5",
    "[15~": "f5",
    "[17~": "f6",
    "[18~": "f7",
    "[19~": "f8",
    "[20~": "f9",
    "[21~": "f10",
    "[23~": "f11",
    "[24~": "f12",
    "[A": "up",
    "[B": "down",
    "[C": "right",
    "[D": "left",
    "[E": "clear",
    "[F": "end",
    "[H": "home",
    "OA": "up",
    "OB": "down",
    "OC": "right",
    "OD": "left",
    "OE": "clear",
    "OF": "end",
    "OH": "home",
    "[1~": "home",
    "[2~": "insert",
    "[3~": "delete",
    "[4~": "end",
    "[5~": "pageup",
    "[6~": "pagedown",
    "[[5~": "pageup",
    "[[6~": "pagedown",
    "[7~": "home",
    "[8~": "end"
};
const KeyMapShift = {
    "[a": "up",
    "[b": "down",
    "[c": "right",
    "[d": "left",
    "[e": "clear",
    "[2$": "insert",
    "[3$": "delete",
    "[5$": "pageup",
    "[6$": "pagedown",
    "[7$": "home",
    "[8$": "end",
    "[Z": "tab"
};
const KeyMapCtrl = {
    "Oa": "up",
    "Ob": "down",
    "Oc": "right",
    "Od": "left",
    "Oe": "clear",
    "[2^": "insert",
    "[3^": "delete",
    "[5^": "pageup",
    "[6^": "pagedown",
    "[7^": "home",
    "[8^": "end"
};
const SpecialKeyMap = {
    "\r": "return",
    "\n": "enter",
    "\t": "tab",
    "\b": "backspace",
    "\x7f": "backspace",
    "\x1b": "escape",
    " ": "space"
};
const kEscape = "\x1b";
function parse14(data) {
    let index = -1;
    const keys = [];
    const input = data instanceof Uint8Array ? new TextDecoder().decode(data) : data;
    const hasNext = ()=>input.length - 1 >= index + 1;
    const next = ()=>input[++index];
    parseNext();
    return keys;
    function parseNext() {
        let ch = next();
        let s = ch;
        let escaped = false;
        const key = {
            name: undefined,
            sequence: undefined,
            code: undefined,
            ctrl: false,
            meta: false,
            shift: false
        };
        if (ch === kEscape && hasNext()) {
            escaped = true;
            s += ch = next();
            if (ch === kEscape) {
                s += ch = next();
            }
        }
        if (escaped && (ch === "O" || ch === "[")) {
            let code = ch;
            let modifier = 0;
            if (ch === "O") {
                s += ch = next();
                if (ch >= "0" && ch <= "9") {
                    modifier = (Number(ch) >> 0) - 1;
                    s += ch = next();
                }
                code += ch;
            } else if (ch === "[") {
                s += ch = next();
                if (ch === "[") {
                    code += ch;
                    s += ch = next();
                }
                const cmdStart = s.length - 1;
                if (ch >= "0" && ch <= "9") {
                    s += ch = next();
                    if (ch >= "0" && ch <= "9") {
                        s += ch = next();
                    }
                }
                if (ch === ";") {
                    s += ch = next();
                    if (ch >= "0" && ch <= "9") {
                        s += next();
                    }
                }
                const cmd = s.slice(cmdStart);
                let match;
                if (match = cmd.match(/^(\d\d?)(;(\d))?([~^$])$/)) {
                    code += match[1] + match[4];
                    modifier = (Number(match[3]) || 1) - 1;
                } else if (match = cmd.match(/^((\d;)?(\d))?([A-Za-z])$/)) {
                    code += match[4];
                    modifier = (Number(match[3]) || 1) - 1;
                } else {
                    code += cmd;
                }
            }
            key.ctrl = !!(modifier & 4);
            key.meta = !!(modifier & 10);
            key.shift = !!(modifier & 1);
            key.code = code;
            if (code in KeyMap) {
                key.name = KeyMap[code];
            } else if (code in KeyMapShift) {
                key.name = KeyMapShift[code];
                key.shift = true;
            } else if (code in KeyMapCtrl) {
                key.name = KeyMapCtrl[code];
                key.ctrl = true;
            } else {
                key.name = "undefined";
            }
        } else if (ch in SpecialKeyMap) {
            key.name = SpecialKeyMap[ch];
            key.meta = escaped;
        } else if (!escaped && ch <= "\x1a") {
            key.name = String.fromCharCode(ch.charCodeAt(0) + "a".charCodeAt(0) - 1);
            key.ctrl = true;
        } else if (/^[0-9A-Za-z]$/.test(ch)) {
            key.name = ch.toLowerCase();
            key.shift = /^[A-Z]$/.test(ch);
            key.meta = escaped;
        } else if (escaped) {
            key.name = ch.length ? undefined : "escape";
            key.meta = true;
        }
        key.sequence = s;
        if (s.length !== 0 && (key.name !== undefined || escaped)) {
            keys.push(key);
        } else if (charLengthAt(s, 0) === s.length) {
            keys.push(key);
        } else {
            throw new Error("Unrecognized or broken escape sequence");
        }
        if (hasNext()) {
            parseNext();
        }
    }
}
function charLengthAt(str, i1) {
    const pos = str.codePointAt(i1);
    if (typeof pos === "undefined") {
        return 1;
    }
    return pos >= 0x10000 ? 2 : 1;
}
const osType1 = (()=>{
    const { Deno: Deno1  } = globalThis;
    if (typeof Deno1?.build?.os === "string") {
        return Deno1.build.os;
    }
    const { navigator  } = globalThis;
    if (navigator?.appVersion?.includes?.("Win") ?? false) {
        return "windows";
    }
    return "linux";
})();
const isWindows2 = osType1 === "windows";
const CHAR_FORWARD_SLASH2 = 47;
function assertPath2(path) {
    if (typeof path !== "string") {
        throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
    }
}
function isPosixPathSeparator2(code) {
    return code === 47;
}
function isPathSeparator2(code) {
    return isPosixPathSeparator2(code) || code === 92;
}
function isWindowsDeviceRoot2(code) {
    return code >= 97 && code <= 122 || code >= 65 && code <= 90;
}
function normalizeString2(path, allowAboveRoot, separator, isPathSeparator) {
    let res = "";
    let lastSegmentLength = 0;
    let lastSlash = -1;
    let dots = 0;
    let code;
    for(let i1 = 0, len = path.length; i1 <= len; ++i1){
        if (i1 < len) code = path.charCodeAt(i1);
        else if (isPathSeparator(code)) break;
        else code = CHAR_FORWARD_SLASH2;
        if (isPathSeparator(code)) {
            if (lastSlash === i1 - 1 || dots === 1) {} else if (lastSlash !== i1 - 1 && dots === 2) {
                if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
                    if (res.length > 2) {
                        const lastSlashIndex = res.lastIndexOf(separator);
                        if (lastSlashIndex === -1) {
                            res = "";
                            lastSegmentLength = 0;
                        } else {
                            res = res.slice(0, lastSlashIndex);
                            lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
                        }
                        lastSlash = i1;
                        dots = 0;
                        continue;
                    } else if (res.length === 2 || res.length === 1) {
                        res = "";
                        lastSegmentLength = 0;
                        lastSlash = i1;
                        dots = 0;
                        continue;
                    }
                }
                if (allowAboveRoot) {
                    if (res.length > 0) res += `${separator}..`;
                    else res = "..";
                    lastSegmentLength = 2;
                }
            } else {
                if (res.length > 0) res += separator + path.slice(lastSlash + 1, i1);
                else res = path.slice(lastSlash + 1, i1);
                lastSegmentLength = i1 - lastSlash - 1;
            }
            lastSlash = i1;
            dots = 0;
        } else if (code === 46 && dots !== -1) {
            ++dots;
        } else {
            dots = -1;
        }
    }
    return res;
}
function _format2(sep, pathObject) {
    const dir = pathObject.dir || pathObject.root;
    const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
    if (!dir) return base;
    if (dir === pathObject.root) return dir + base;
    return dir + sep + base;
}
const WHITESPACE_ENCODINGS2 = {
    "\u0009": "%09",
    "\u000A": "%0A",
    "\u000B": "%0B",
    "\u000C": "%0C",
    "\u000D": "%0D",
    "\u0020": "%20"
};
function encodeWhitespace2(string) {
    return string.replaceAll(/[\s]/g, (c)=>{
        return WHITESPACE_ENCODINGS2[c] ?? c;
    });
}
class DenoStdInternalError1 extends Error {
    constructor(message){
        super(message);
        this.name = "DenoStdInternalError";
    }
}
function assert2(expr, msg = "") {
    if (!expr) {
        throw new DenoStdInternalError1(msg);
    }
}
const sep6 = "\\";
const delimiter7 = ";";
function resolve6(...pathSegments) {
    let resolvedDevice = "";
    let resolvedTail = "";
    let resolvedAbsolute = false;
    for(let i1 = pathSegments.length - 1; i1 >= -1; i1--){
        let path;
        const { Deno: Deno1  } = globalThis;
        if (i1 >= 0) {
            path = pathSegments[i1];
        } else if (!resolvedDevice) {
            if (typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a drive-letter-less path without a CWD.");
            }
            path = Deno1.cwd();
        } else {
            if (typeof Deno1?.env?.get !== "function" || typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a relative path without a CWD.");
            }
            path = Deno1.cwd();
            if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
                path = `${resolvedDevice}\\`;
            }
        }
        assertPath2(path);
        const len = path.length;
        if (len === 0) continue;
        let rootEnd = 0;
        let device = "";
        let isAbsolute = false;
        const code = path.charCodeAt(0);
        if (len > 1) {
            if (isPathSeparator2(code)) {
                isAbsolute = true;
                if (isPathSeparator2(path.charCodeAt(1))) {
                    let j = 2;
                    let last = j;
                    for(; j < len; ++j){
                        if (isPathSeparator2(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        const firstPart = path.slice(last, j);
                        last = j;
                        for(; j < len; ++j){
                            if (!isPathSeparator2(path.charCodeAt(j))) break;
                        }
                        if (j < len && j !== last) {
                            last = j;
                            for(; j < len; ++j){
                                if (isPathSeparator2(path.charCodeAt(j))) break;
                            }
                            if (j === len) {
                                device = `\\\\${firstPart}\\${path.slice(last)}`;
                                rootEnd = j;
                            } else if (j !== last) {
                                device = `\\\\${firstPart}\\${path.slice(last, j)}`;
                                rootEnd = j;
                            }
                        }
                    }
                } else {
                    rootEnd = 1;
                }
            } else if (isWindowsDeviceRoot2(code)) {
                if (path.charCodeAt(1) === 58) {
                    device = path.slice(0, 2);
                    rootEnd = 2;
                    if (len > 2) {
                        if (isPathSeparator2(path.charCodeAt(2))) {
                            isAbsolute = true;
                            rootEnd = 3;
                        }
                    }
                }
            }
        } else if (isPathSeparator2(code)) {
            rootEnd = 1;
            isAbsolute = true;
        }
        if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
            continue;
        }
        if (resolvedDevice.length === 0 && device.length > 0) {
            resolvedDevice = device;
        }
        if (!resolvedAbsolute) {
            resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
            resolvedAbsolute = isAbsolute;
        }
        if (resolvedAbsolute && resolvedDevice.length > 0) break;
    }
    resolvedTail = normalizeString2(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator2);
    return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
}
function normalize8(path) {
    assertPath2(path);
    const len = path.length;
    if (len === 0) return ".";
    let rootEnd = 0;
    let device;
    let isAbsolute = false;
    const code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator2(code)) {
            isAbsolute = true;
            if (isPathSeparator2(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator2(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    const firstPart = path.slice(last, j);
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator2(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator2(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            return `\\\\${firstPart}\\${path.slice(last)}\\`;
                        } else if (j !== last) {
                            device = `\\\\${firstPart}\\${path.slice(last, j)}`;
                            rootEnd = j;
                        }
                    }
                }
            } else {
                rootEnd = 1;
            }
        } else if (isWindowsDeviceRoot2(code)) {
            if (path.charCodeAt(1) === 58) {
                device = path.slice(0, 2);
                rootEnd = 2;
                if (len > 2) {
                    if (isPathSeparator2(path.charCodeAt(2))) {
                        isAbsolute = true;
                        rootEnd = 3;
                    }
                }
            }
        }
    } else if (isPathSeparator2(code)) {
        return "\\";
    }
    let tail;
    if (rootEnd < len) {
        tail = normalizeString2(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator2);
    } else {
        tail = "";
    }
    if (tail.length === 0 && !isAbsolute) tail = ".";
    if (tail.length > 0 && isPathSeparator2(path.charCodeAt(len - 1))) {
        tail += "\\";
    }
    if (device === undefined) {
        if (isAbsolute) {
            if (tail.length > 0) return `\\${tail}`;
            else return "\\";
        } else if (tail.length > 0) {
            return tail;
        } else {
            return "";
        }
    } else if (isAbsolute) {
        if (tail.length > 0) return `${device}\\${tail}`;
        else return `${device}\\`;
    } else if (tail.length > 0) {
        return device + tail;
    } else {
        return device;
    }
}
function isAbsolute6(path) {
    assertPath2(path);
    const len = path.length;
    if (len === 0) return false;
    const code = path.charCodeAt(0);
    if (isPathSeparator2(code)) {
        return true;
    } else if (isWindowsDeviceRoot2(code)) {
        if (len > 2 && path.charCodeAt(1) === 58) {
            if (isPathSeparator2(path.charCodeAt(2))) return true;
        }
    }
    return false;
}
function join10(...paths) {
    const pathsCount = paths.length;
    if (pathsCount === 0) return ".";
    let joined;
    let firstPart = null;
    for(let i1 = 0; i1 < pathsCount; ++i1){
        const path = paths[i1];
        assertPath2(path);
        if (path.length > 0) {
            if (joined === undefined) joined = firstPart = path;
            else joined += `\\${path}`;
        }
    }
    if (joined === undefined) return ".";
    let needsReplace = true;
    let slashCount = 0;
    assert2(firstPart != null);
    if (isPathSeparator2(firstPart.charCodeAt(0))) {
        ++slashCount;
        const firstLen = firstPart.length;
        if (firstLen > 1) {
            if (isPathSeparator2(firstPart.charCodeAt(1))) {
                ++slashCount;
                if (firstLen > 2) {
                    if (isPathSeparator2(firstPart.charCodeAt(2))) ++slashCount;
                    else {
                        needsReplace = false;
                    }
                }
            }
        }
    }
    if (needsReplace) {
        for(; slashCount < joined.length; ++slashCount){
            if (!isPathSeparator2(joined.charCodeAt(slashCount))) break;
        }
        if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`;
    }
    return normalize8(joined);
}
function relative6(from, to) {
    assertPath2(from);
    assertPath2(to);
    if (from === to) return "";
    const fromOrig = resolve6(from);
    const toOrig = resolve6(to);
    if (fromOrig === toOrig) return "";
    from = fromOrig.toLowerCase();
    to = toOrig.toLowerCase();
    if (from === to) return "";
    let fromStart = 0;
    let fromEnd = from.length;
    for(; fromStart < fromEnd; ++fromStart){
        if (from.charCodeAt(fromStart) !== 92) break;
    }
    for(; fromEnd - 1 > fromStart; --fromEnd){
        if (from.charCodeAt(fromEnd - 1) !== 92) break;
    }
    const fromLen = fromEnd - fromStart;
    let toStart = 0;
    let toEnd = to.length;
    for(; toStart < toEnd; ++toStart){
        if (to.charCodeAt(toStart) !== 92) break;
    }
    for(; toEnd - 1 > toStart; --toEnd){
        if (to.charCodeAt(toEnd - 1) !== 92) break;
    }
    const toLen = toEnd - toStart;
    const length = fromLen < toLen ? fromLen : toLen;
    let lastCommonSep = -1;
    let i1 = 0;
    for(; i1 <= length; ++i1){
        if (i1 === length) {
            if (toLen > length) {
                if (to.charCodeAt(toStart + i1) === 92) {
                    return toOrig.slice(toStart + i1 + 1);
                } else if (i1 === 2) {
                    return toOrig.slice(toStart + i1);
                }
            }
            if (fromLen > length) {
                if (from.charCodeAt(fromStart + i1) === 92) {
                    lastCommonSep = i1;
                } else if (i1 === 2) {
                    lastCommonSep = 3;
                }
            }
            break;
        }
        const fromCode = from.charCodeAt(fromStart + i1);
        const toCode = to.charCodeAt(toStart + i1);
        if (fromCode !== toCode) break;
        else if (fromCode === 92) lastCommonSep = i1;
    }
    if (i1 !== length && lastCommonSep === -1) {
        return toOrig;
    }
    let out = "";
    if (lastCommonSep === -1) lastCommonSep = 0;
    for(i1 = fromStart + lastCommonSep + 1; i1 <= fromEnd; ++i1){
        if (i1 === fromEnd || from.charCodeAt(i1) === 92) {
            if (out.length === 0) out += "..";
            else out += "\\..";
        }
    }
    if (out.length > 0) {
        return out + toOrig.slice(toStart + lastCommonSep, toEnd);
    } else {
        toStart += lastCommonSep;
        if (toOrig.charCodeAt(toStart) === 92) ++toStart;
        return toOrig.slice(toStart, toEnd);
    }
}
function toNamespacedPath6(path) {
    if (typeof path !== "string") return path;
    if (path.length === 0) return "";
    const resolvedPath = resolve6(path);
    if (resolvedPath.length >= 3) {
        if (resolvedPath.charCodeAt(0) === 92) {
            if (resolvedPath.charCodeAt(1) === 92) {
                const code = resolvedPath.charCodeAt(2);
                if (code !== 63 && code !== 46) {
                    return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
                }
            }
        } else if (isWindowsDeviceRoot2(resolvedPath.charCodeAt(0))) {
            if (resolvedPath.charCodeAt(1) === 58 && resolvedPath.charCodeAt(2) === 92) {
                return `\\\\?\\${resolvedPath}`;
            }
        }
    }
    return path;
}
function dirname6(path) {
    assertPath2(path);
    const len = path.length;
    if (len === 0) return ".";
    let rootEnd = -1;
    let end = -1;
    let matchedSlash = true;
    let offset = 0;
    const code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator2(code)) {
            rootEnd = offset = 1;
            if (isPathSeparator2(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator2(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator2(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator2(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            return path;
                        }
                        if (j !== last) {
                            rootEnd = offset = j + 1;
                        }
                    }
                }
            }
        } else if (isWindowsDeviceRoot2(code)) {
            if (path.charCodeAt(1) === 58) {
                rootEnd = offset = 2;
                if (len > 2) {
                    if (isPathSeparator2(path.charCodeAt(2))) rootEnd = offset = 3;
                }
            }
        }
    } else if (isPathSeparator2(code)) {
        return path;
    }
    for(let i1 = len - 1; i1 >= offset; --i1){
        if (isPathSeparator2(path.charCodeAt(i1))) {
            if (!matchedSlash) {
                end = i1;
                break;
            }
        } else {
            matchedSlash = false;
        }
    }
    if (end === -1) {
        if (rootEnd === -1) return ".";
        else end = rootEnd;
    }
    return path.slice(0, end);
}
function basename6(path, ext = "") {
    if (ext !== undefined && typeof ext !== "string") {
        throw new TypeError('"ext" argument must be a string');
    }
    assertPath2(path);
    let start = 0;
    let end = -1;
    let matchedSlash = true;
    let i1;
    if (path.length >= 2) {
        const drive = path.charCodeAt(0);
        if (isWindowsDeviceRoot2(drive)) {
            if (path.charCodeAt(1) === 58) start = 2;
        }
    }
    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
        if (ext.length === path.length && ext === path) return "";
        let extIdx = ext.length - 1;
        let firstNonSlashEnd = -1;
        for(i1 = path.length - 1; i1 >= start; --i1){
            const code = path.charCodeAt(i1);
            if (isPathSeparator2(code)) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else {
                if (firstNonSlashEnd === -1) {
                    matchedSlash = false;
                    firstNonSlashEnd = i1 + 1;
                }
                if (extIdx >= 0) {
                    if (code === ext.charCodeAt(extIdx)) {
                        if (--extIdx === -1) {
                            end = i1;
                        }
                    } else {
                        extIdx = -1;
                        end = firstNonSlashEnd;
                    }
                }
            }
        }
        if (start === end) end = firstNonSlashEnd;
        else if (end === -1) end = path.length;
        return path.slice(start, end);
    } else {
        for(i1 = path.length - 1; i1 >= start; --i1){
            if (isPathSeparator2(path.charCodeAt(i1))) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else if (end === -1) {
                matchedSlash = false;
                end = i1 + 1;
            }
        }
        if (end === -1) return "";
        return path.slice(start, end);
    }
}
function extname6(path) {
    assertPath2(path);
    let start = 0;
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let preDotState = 0;
    if (path.length >= 2 && path.charCodeAt(1) === 58 && isWindowsDeviceRoot2(path.charCodeAt(0))) {
        start = startPart = 2;
    }
    for(let i1 = path.length - 1; i1 >= start; --i1){
        const code = path.charCodeAt(i1);
        if (isPathSeparator2(code)) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        return "";
    }
    return path.slice(startDot, end);
}
function format7(pathObject) {
    if (pathObject === null || typeof pathObject !== "object") {
        throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
    }
    return _format2("\\", pathObject);
}
function parse15(path) {
    assertPath2(path);
    const ret = {
        root: "",
        dir: "",
        base: "",
        ext: "",
        name: ""
    };
    const len = path.length;
    if (len === 0) return ret;
    let rootEnd = 0;
    let code = path.charCodeAt(0);
    if (len > 1) {
        if (isPathSeparator2(code)) {
            rootEnd = 1;
            if (isPathSeparator2(path.charCodeAt(1))) {
                let j = 2;
                let last = j;
                for(; j < len; ++j){
                    if (isPathSeparator2(path.charCodeAt(j))) break;
                }
                if (j < len && j !== last) {
                    last = j;
                    for(; j < len; ++j){
                        if (!isPathSeparator2(path.charCodeAt(j))) break;
                    }
                    if (j < len && j !== last) {
                        last = j;
                        for(; j < len; ++j){
                            if (isPathSeparator2(path.charCodeAt(j))) break;
                        }
                        if (j === len) {
                            rootEnd = j;
                        } else if (j !== last) {
                            rootEnd = j + 1;
                        }
                    }
                }
            }
        } else if (isWindowsDeviceRoot2(code)) {
            if (path.charCodeAt(1) === 58) {
                rootEnd = 2;
                if (len > 2) {
                    if (isPathSeparator2(path.charCodeAt(2))) {
                        if (len === 3) {
                            ret.root = ret.dir = path;
                            return ret;
                        }
                        rootEnd = 3;
                    }
                } else {
                    ret.root = ret.dir = path;
                    return ret;
                }
            }
        }
    } else if (isPathSeparator2(code)) {
        ret.root = ret.dir = path;
        return ret;
    }
    if (rootEnd > 0) ret.root = path.slice(0, rootEnd);
    let startDot = -1;
    let startPart = rootEnd;
    let end = -1;
    let matchedSlash = true;
    let i1 = path.length - 1;
    let preDotState = 0;
    for(; i1 >= rootEnd; --i1){
        code = path.charCodeAt(i1);
        if (isPathSeparator2(code)) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        if (end !== -1) {
            ret.base = ret.name = path.slice(startPart, end);
        }
    } else {
        ret.name = path.slice(startPart, startDot);
        ret.base = path.slice(startPart, end);
        ret.ext = path.slice(startDot, end);
    }
    if (startPart > 0 && startPart !== rootEnd) {
        ret.dir = path.slice(0, startPart - 1);
    } else ret.dir = ret.root;
    return ret;
}
function fromFileUrl6(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol != "file:") {
        throw new TypeError("Must be a file URL.");
    }
    let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
    if (url.hostname != "") {
        path = `\\\\${url.hostname}${path}`;
    }
    return path;
}
function toFileUrl6(path) {
    if (!isAbsolute6(path)) {
        throw new TypeError("Must be an absolute path.");
    }
    const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
    const url = new URL("file:///");
    url.pathname = encodeWhitespace2(pathname.replace(/%/g, "%25"));
    if (hostname != null && hostname != "localhost") {
        url.hostname = hostname;
        if (!url.hostname) {
            throw new TypeError("Invalid hostname.");
        }
    }
    return url;
}
const mod9 = {
    sep: sep6,
    delimiter: delimiter7,
    resolve: resolve6,
    normalize: normalize8,
    isAbsolute: isAbsolute6,
    join: join10,
    relative: relative6,
    toNamespacedPath: toNamespacedPath6,
    dirname: dirname6,
    basename: basename6,
    extname: extname6,
    format: format7,
    parse: parse15,
    fromFileUrl: fromFileUrl6,
    toFileUrl: toFileUrl6
};
const sep7 = "/";
const delimiter8 = ":";
function resolve7(...pathSegments) {
    let resolvedPath = "";
    let resolvedAbsolute = false;
    for(let i1 = pathSegments.length - 1; i1 >= -1 && !resolvedAbsolute; i1--){
        let path;
        if (i1 >= 0) path = pathSegments[i1];
        else {
            const { Deno: Deno1  } = globalThis;
            if (typeof Deno1?.cwd !== "function") {
                throw new TypeError("Resolved a relative path without a CWD.");
            }
            path = Deno1.cwd();
        }
        assertPath2(path);
        if (path.length === 0) {
            continue;
        }
        resolvedPath = `${path}/${resolvedPath}`;
        resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH2;
    }
    resolvedPath = normalizeString2(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator2);
    if (resolvedAbsolute) {
        if (resolvedPath.length > 0) return `/${resolvedPath}`;
        else return "/";
    } else if (resolvedPath.length > 0) return resolvedPath;
    else return ".";
}
function normalize9(path) {
    assertPath2(path);
    if (path.length === 0) return ".";
    const isAbsolute = path.charCodeAt(0) === 47;
    const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
    path = normalizeString2(path, !isAbsolute, "/", isPosixPathSeparator2);
    if (path.length === 0 && !isAbsolute) path = ".";
    if (path.length > 0 && trailingSeparator) path += "/";
    if (isAbsolute) return `/${path}`;
    return path;
}
function isAbsolute7(path) {
    assertPath2(path);
    return path.length > 0 && path.charCodeAt(0) === 47;
}
function join11(...paths) {
    if (paths.length === 0) return ".";
    let joined;
    for(let i1 = 0, len = paths.length; i1 < len; ++i1){
        const path = paths[i1];
        assertPath2(path);
        if (path.length > 0) {
            if (!joined) joined = path;
            else joined += `/${path}`;
        }
    }
    if (!joined) return ".";
    return normalize9(joined);
}
function relative7(from, to) {
    assertPath2(from);
    assertPath2(to);
    if (from === to) return "";
    from = resolve7(from);
    to = resolve7(to);
    if (from === to) return "";
    let fromStart = 1;
    const fromEnd = from.length;
    for(; fromStart < fromEnd; ++fromStart){
        if (from.charCodeAt(fromStart) !== 47) break;
    }
    const fromLen = fromEnd - fromStart;
    let toStart = 1;
    const toEnd = to.length;
    for(; toStart < toEnd; ++toStart){
        if (to.charCodeAt(toStart) !== 47) break;
    }
    const toLen = toEnd - toStart;
    const length = fromLen < toLen ? fromLen : toLen;
    let lastCommonSep = -1;
    let i1 = 0;
    for(; i1 <= length; ++i1){
        if (i1 === length) {
            if (toLen > length) {
                if (to.charCodeAt(toStart + i1) === 47) {
                    return to.slice(toStart + i1 + 1);
                } else if (i1 === 0) {
                    return to.slice(toStart + i1);
                }
            } else if (fromLen > length) {
                if (from.charCodeAt(fromStart + i1) === 47) {
                    lastCommonSep = i1;
                } else if (i1 === 0) {
                    lastCommonSep = 0;
                }
            }
            break;
        }
        const fromCode = from.charCodeAt(fromStart + i1);
        const toCode = to.charCodeAt(toStart + i1);
        if (fromCode !== toCode) break;
        else if (fromCode === 47) lastCommonSep = i1;
    }
    let out = "";
    for(i1 = fromStart + lastCommonSep + 1; i1 <= fromEnd; ++i1){
        if (i1 === fromEnd || from.charCodeAt(i1) === 47) {
            if (out.length === 0) out += "..";
            else out += "/..";
        }
    }
    if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
    else {
        toStart += lastCommonSep;
        if (to.charCodeAt(toStart) === 47) ++toStart;
        return to.slice(toStart);
    }
}
function toNamespacedPath7(path) {
    return path;
}
function dirname7(path) {
    assertPath2(path);
    if (path.length === 0) return ".";
    const hasRoot = path.charCodeAt(0) === 47;
    let end = -1;
    let matchedSlash = true;
    for(let i1 = path.length - 1; i1 >= 1; --i1){
        if (path.charCodeAt(i1) === 47) {
            if (!matchedSlash) {
                end = i1;
                break;
            }
        } else {
            matchedSlash = false;
        }
    }
    if (end === -1) return hasRoot ? "/" : ".";
    if (hasRoot && end === 1) return "//";
    return path.slice(0, end);
}
function basename7(path, ext = "") {
    if (ext !== undefined && typeof ext !== "string") {
        throw new TypeError('"ext" argument must be a string');
    }
    assertPath2(path);
    let start = 0;
    let end = -1;
    let matchedSlash = true;
    let i1;
    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
        if (ext.length === path.length && ext === path) return "";
        let extIdx = ext.length - 1;
        let firstNonSlashEnd = -1;
        for(i1 = path.length - 1; i1 >= 0; --i1){
            const code = path.charCodeAt(i1);
            if (code === 47) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else {
                if (firstNonSlashEnd === -1) {
                    matchedSlash = false;
                    firstNonSlashEnd = i1 + 1;
                }
                if (extIdx >= 0) {
                    if (code === ext.charCodeAt(extIdx)) {
                        if (--extIdx === -1) {
                            end = i1;
                        }
                    } else {
                        extIdx = -1;
                        end = firstNonSlashEnd;
                    }
                }
            }
        }
        if (start === end) end = firstNonSlashEnd;
        else if (end === -1) end = path.length;
        return path.slice(start, end);
    } else {
        for(i1 = path.length - 1; i1 >= 0; --i1){
            if (path.charCodeAt(i1) === 47) {
                if (!matchedSlash) {
                    start = i1 + 1;
                    break;
                }
            } else if (end === -1) {
                matchedSlash = false;
                end = i1 + 1;
            }
        }
        if (end === -1) return "";
        return path.slice(start, end);
    }
}
function extname7(path) {
    assertPath2(path);
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let preDotState = 0;
    for(let i1 = path.length - 1; i1 >= 0; --i1){
        const code = path.charCodeAt(i1);
        if (code === 47) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        return "";
    }
    return path.slice(startDot, end);
}
function format8(pathObject) {
    if (pathObject === null || typeof pathObject !== "object") {
        throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
    }
    return _format2("/", pathObject);
}
function parse16(path) {
    assertPath2(path);
    const ret = {
        root: "",
        dir: "",
        base: "",
        ext: "",
        name: ""
    };
    if (path.length === 0) return ret;
    const isAbsolute = path.charCodeAt(0) === 47;
    let start;
    if (isAbsolute) {
        ret.root = "/";
        start = 1;
    } else {
        start = 0;
    }
    let startDot = -1;
    let startPart = 0;
    let end = -1;
    let matchedSlash = true;
    let i1 = path.length - 1;
    let preDotState = 0;
    for(; i1 >= start; --i1){
        const code = path.charCodeAt(i1);
        if (code === 47) {
            if (!matchedSlash) {
                startPart = i1 + 1;
                break;
            }
            continue;
        }
        if (end === -1) {
            matchedSlash = false;
            end = i1 + 1;
        }
        if (code === 46) {
            if (startDot === -1) startDot = i1;
            else if (preDotState !== 1) preDotState = 1;
        } else if (startDot !== -1) {
            preDotState = -1;
        }
    }
    if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
        if (end !== -1) {
            if (startPart === 0 && isAbsolute) {
                ret.base = ret.name = path.slice(1, end);
            } else {
                ret.base = ret.name = path.slice(startPart, end);
            }
        }
    } else {
        if (startPart === 0 && isAbsolute) {
            ret.name = path.slice(1, startDot);
            ret.base = path.slice(1, end);
        } else {
            ret.name = path.slice(startPart, startDot);
            ret.base = path.slice(startPart, end);
        }
        ret.ext = path.slice(startDot, end);
    }
    if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
    else if (isAbsolute) ret.dir = "/";
    return ret;
}
function fromFileUrl7(url) {
    url = url instanceof URL ? url : new URL(url);
    if (url.protocol != "file:") {
        throw new TypeError("Must be a file URL.");
    }
    return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
}
function toFileUrl7(path) {
    if (!isAbsolute7(path)) {
        throw new TypeError("Must be an absolute path.");
    }
    const url = new URL("file:///");
    url.pathname = encodeWhitespace2(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
    return url;
}
const mod10 = {
    sep: sep7,
    delimiter: delimiter8,
    resolve: resolve7,
    normalize: normalize9,
    isAbsolute: isAbsolute7,
    join: join11,
    relative: relative7,
    toNamespacedPath: toNamespacedPath7,
    dirname: dirname7,
    basename: basename7,
    extname: extname7,
    format: format8,
    parse: parse16,
    fromFileUrl: fromFileUrl7,
    toFileUrl: toFileUrl7
};
const path4 = isWindows2 ? mod9 : mod10;
const { join: join12 , normalize: normalize10  } = path4;
const path5 = isWindows2 ? mod9 : mod10;
const { basename: basename8 , delimiter: delimiter9 , dirname: dirname8 , extname: extname8 , format: format9 , fromFileUrl: fromFileUrl8 , isAbsolute: isAbsolute8 , join: join13 , normalize: normalize11 , parse: parse17 , relative: relative8 , resolve: resolve8 , sep: sep8 , toFileUrl: toFileUrl8 , toNamespacedPath: toNamespacedPath8 ,  } = path5;
class GenericPrompt {
    static injectedValue;
    settings;
    tty = tty;
    indent;
    cursor = {
        x: 0,
        y: 0
    };
    #value;
    #lastError;
    #isFirstRun = true;
    #encoder = new TextEncoder();
    static inject(value) {
        GenericPrompt.injectedValue = value;
    }
    constructor(settings){
        this.settings = {
            ...settings,
            keys: {
                submit: [
                    "enter",
                    "return"
                ],
                ...settings.keys ?? {}
            }
        };
        this.indent = this.settings.indent ?? " ";
    }
    async prompt() {
        try {
            return await this.#execute();
        } finally{
            this.tty.cursorShow();
        }
    }
    clear() {
        this.tty.cursorLeft.eraseDown();
    }
    #execute = async ()=>{
        if (typeof GenericPrompt.injectedValue !== "undefined" && this.#lastError) {
            throw new Error(await this.error());
        }
        await this.render();
        this.#lastError = undefined;
        if (!await this.read()) {
            return this.#execute();
        }
        if (typeof this.#value === "undefined") {
            throw new Error("internal error: failed to read value");
        }
        this.clear();
        const successMessage = this.success(this.#value);
        if (successMessage) {
            console.log(successMessage);
        }
        GenericPrompt.injectedValue = undefined;
        this.tty.cursorShow();
        return this.#value;
    };
    async render() {
        const result1 = await Promise.all([
            this.message(),
            this.body?.(),
            this.footer(), 
        ]);
        const content = result1.filter(Boolean).join("\n");
        const lines = content.split("\n");
        const columns = getColumns();
        const linesCount = columns ? lines.reduce((prev, next)=>{
            const length = stripColor(next).length;
            return prev + (length > columns ? Math.ceil(length / columns) : 1);
        }, 0) : content.split("\n").length;
        const y = linesCount - this.cursor.y - 1;
        if (!this.#isFirstRun || this.#lastError) {
            this.clear();
        }
        this.#isFirstRun = false;
        if (Deno.build.os === "windows") {
            console.log(content);
            this.tty.cursorUp();
        } else {
            Deno.stdout.writeSync(this.#encoder.encode(content));
        }
        if (y) {
            this.tty.cursorUp(y);
        }
        this.tty.cursorTo(this.cursor.x);
    }
    async read() {
        if (typeof GenericPrompt.injectedValue !== "undefined") {
            const value = GenericPrompt.injectedValue;
            await this.#validateValue(value);
        } else {
            const events = await this.#readKey();
            if (!events.length) {
                return false;
            }
            for (const event of events){
                await this.handleEvent(event);
            }
        }
        return typeof this.#value !== "undefined";
    }
    submit() {
        return this.#validateValue(this.getValue());
    }
    message() {
        return `${this.settings.indent}${this.settings.prefix}` + bold(this.settings.message) + this.defaults();
    }
    defaults() {
        let defaultMessage = "";
        if (typeof this.settings.default !== "undefined" && !this.settings.hideDefault) {
            defaultMessage += dim(` (${this.format(this.settings.default)})`);
        }
        return defaultMessage;
    }
    success(value) {
        return `${this.settings.indent}${this.settings.prefix}` + bold(this.settings.message) + this.defaults() + " " + this.settings.pointer + " " + green(this.format(value));
    }
    footer() {
        return this.error() ?? this.hint();
    }
    error() {
        return this.#lastError ? this.settings.indent + red(bold(`${Figures.CROSS} `) + this.#lastError) : undefined;
    }
    hint() {
        return this.settings.hint ? this.settings.indent + italic(blue(dim(`${Figures.POINTER} `) + this.settings.hint)) : undefined;
    }
    setErrorMessage(message) {
        this.#lastError = message;
    }
    async handleEvent(event) {
        switch(true){
            case event.name === "c" && event.ctrl:
                this.clear();
                this.tty.cursorShow();
                Deno.exit(130);
                return;
            case this.isKey(this.settings.keys, "submit", event):
                await this.submit();
                break;
        }
    }
    #readKey = async ()=>{
        const data = await this.#readChar();
        return data.length ? parse14(data) : [];
    };
    #readChar = async ()=>{
        const buffer = new Uint8Array(8);
        const isTty = Deno.isatty(Deno.stdin.rid);
        if (isTty) {
            Deno.setRaw(Deno.stdin.rid, true, {
                cbreak: this.settings.cbreak === true
            });
        }
        const nread = await Deno.stdin.read(buffer);
        if (isTty) {
            Deno.setRaw(Deno.stdin.rid, false);
        }
        if (nread === null) {
            return buffer;
        }
        return buffer.subarray(0, nread);
    };
    #transformValue = (value)=>{
        return this.settings.transform ? this.settings.transform(value) : this.transform(value);
    };
    #validateValue = async (value)=>{
        if (!value && typeof this.settings.default !== "undefined") {
            this.#value = this.settings.default;
            return;
        }
        this.#value = undefined;
        this.#lastError = undefined;
        const validation = await (this.settings.validate ? this.settings.validate(value) : this.validate(value));
        if (validation === false) {
            this.#lastError = `Invalid answer.`;
        } else if (typeof validation === "string") {
            this.#lastError = validation;
        } else {
            this.#value = this.#transformValue(value);
        }
    };
    isKey(keys, name, event) {
        const keyNames = keys?.[name];
        return typeof keyNames !== "undefined" && (typeof event.name !== "undefined" && keyNames.indexOf(event.name) !== -1 || typeof event.sequence !== "undefined" && keyNames.indexOf(event.sequence) !== -1);
    }
}
function getColumns() {
    try {
        return Deno.consoleSize(Deno.stdout.rid).columns;
    } catch (_error) {
        return null;
    }
}
class GenericInput extends GenericPrompt {
    inputValue = "";
    inputIndex = 0;
    constructor(settings){
        super({
            ...settings,
            keys: {
                moveCursorLeft: [
                    "left"
                ],
                moveCursorRight: [
                    "right"
                ],
                deleteCharLeft: [
                    "backspace"
                ],
                deleteCharRight: [
                    "delete"
                ],
                ...settings.keys ?? {}
            }
        });
    }
    getCurrentInputValue() {
        return this.inputValue;
    }
    message() {
        const message = super.message() + " " + this.settings.pointer + " ";
        this.cursor.x = stripColor(message).length + this.inputIndex + 1;
        return message + this.input();
    }
    input() {
        return underline(this.inputValue);
    }
    highlight(value, color1 = dim, color2 = blue) {
        value = value.toString();
        const inputLowerCase = this.getCurrentInputValue().toLowerCase();
        const valueLowerCase = value.toLowerCase();
        const index = valueLowerCase.indexOf(inputLowerCase);
        const matched = value.slice(index, index + inputLowerCase.length);
        return index >= 0 ? color1(value.slice(0, index)) + color2(matched) + color1(value.slice(index + inputLowerCase.length)) : value;
    }
    async handleEvent(event) {
        switch(true){
            case event.name === "c" && event.ctrl:
                this.clear();
                this.tty.cursorShow();
                Deno.exit(130);
                return;
            case this.isKey(this.settings.keys, "moveCursorLeft", event):
                this.moveCursorLeft();
                break;
            case this.isKey(this.settings.keys, "moveCursorRight", event):
                this.moveCursorRight();
                break;
            case this.isKey(this.settings.keys, "deleteCharRight", event):
                this.deleteCharRight();
                break;
            case this.isKey(this.settings.keys, "deleteCharLeft", event):
                this.deleteChar();
                break;
            case this.isKey(this.settings.keys, "submit", event):
                await this.submit();
                break;
            default:
                if (event.sequence && !event.meta && !event.ctrl) {
                    this.addChar(event.sequence);
                }
        }
    }
    addChar(__char) {
        this.inputValue = this.inputValue.slice(0, this.inputIndex) + __char + this.inputValue.slice(this.inputIndex);
        this.inputIndex++;
    }
    moveCursorLeft() {
        if (this.inputIndex > 0) {
            this.inputIndex--;
        }
    }
    moveCursorRight() {
        if (this.inputIndex < this.inputValue.length) {
            this.inputIndex++;
        }
    }
    deleteChar() {
        if (this.inputIndex > 0) {
            this.inputIndex--;
            this.deleteCharRight();
        }
    }
    deleteCharRight() {
        if (this.inputIndex < this.inputValue.length) {
            this.inputValue = this.inputValue.slice(0, this.inputIndex) + this.inputValue.slice(this.inputIndex + 1);
        }
    }
}
class GenericList extends GenericInput {
    options = this.settings.options;
    listIndex = this.getListIndex();
    listOffset = this.getPageOffset(this.listIndex);
    static separator(label = "------------") {
        return {
            value: label,
            disabled: true
        };
    }
    static mapOption(option) {
        return {
            value: option.value,
            name: typeof option.name === "undefined" ? option.value : option.name,
            disabled: !!option.disabled
        };
    }
    constructor(settings){
        super({
            ...settings,
            keys: {
                previous: settings.search ? [
                    "up"
                ] : [
                    "up",
                    "u",
                    "p",
                    "8"
                ],
                next: settings.search ? [
                    "down"
                ] : [
                    "down",
                    "d",
                    "n",
                    "2"
                ],
                previousPage: [
                    "pageup",
                    "left"
                ],
                nextPage: [
                    "pagedown",
                    "right"
                ],
                ...settings.keys ?? {}
            }
        });
    }
    match() {
        const input = this.getCurrentInputValue().toLowerCase();
        if (!input.length) {
            this.options = this.settings.options.slice();
        } else {
            this.options = this.settings.options.filter((option)=>match(option.name) || option.name !== option.value && match(option.value)).sort((a, b)=>distance(a.name, input) - distance(b.name, input));
        }
        this.listIndex = Math.max(0, Math.min(this.options.length - 1, this.listIndex));
        this.listOffset = Math.max(0, Math.min(this.options.length - this.getListHeight(), this.listOffset));
        function match(value) {
            return stripColor(value).toLowerCase().includes(input);
        }
    }
    message() {
        let message = `${this.settings.indent}${this.settings.prefix}` + bold(this.settings.message) + this.defaults();
        if (this.settings.search) {
            message += " " + this.settings.searchLabel + " ";
        }
        this.cursor.x = stripColor(message).length + this.inputIndex + 1;
        return message + this.input();
    }
    body() {
        return this.getList() + this.getInfo();
    }
    getInfo() {
        if (!this.settings.info) {
            return "";
        }
        const selected = this.listIndex + 1;
        const actions = [
            [
                "Next",
                getFiguresByKeys(this.settings.keys?.next ?? [])
            ],
            [
                "Previous",
                getFiguresByKeys(this.settings.keys?.previous ?? [])
            ],
            [
                "Next Page",
                getFiguresByKeys(this.settings.keys?.nextPage ?? [])
            ],
            [
                "Previous Page",
                getFiguresByKeys(this.settings.keys?.previousPage ?? []), 
            ],
            [
                "Submit",
                getFiguresByKeys(this.settings.keys?.submit ?? [])
            ], 
        ];
        return "\n" + this.settings.indent + blue(Figures.INFO) + bold(` ${selected}/${this.options.length} `) + actions.map((cur)=>`${cur[0]}: ${bold(cur[1].join(", "))}`).join(", ");
    }
    getList() {
        const list = [];
        const height = this.getListHeight();
        for(let i1 = this.listOffset; i1 < this.listOffset + height; i1++){
            list.push(this.getListItem(this.options[i1], this.listIndex === i1));
        }
        if (!list.length) {
            list.push(this.settings.indent + dim("  No matches..."));
        }
        return list.join("\n");
    }
    getListHeight() {
        return Math.min(this.options.length, this.settings.maxRows || this.options.length);
    }
    getListIndex(value) {
        return Math.max(0, typeof value === "undefined" ? this.options.findIndex((item)=>!item.disabled) || 0 : this.options.findIndex((item)=>item.value === value) || 0);
    }
    getPageOffset(index) {
        if (index === 0) {
            return 0;
        }
        const height = this.getListHeight();
        return Math.floor(index / height) * height;
    }
    getOptionByValue(value) {
        return this.options.find((option)=>option.value === value);
    }
    read() {
        if (!this.settings.search) {
            this.tty.cursorHide();
        }
        return super.read();
    }
    async handleEvent(event) {
        switch(true){
            case this.isKey(this.settings.keys, "previous", event):
                this.selectPrevious();
                break;
            case this.isKey(this.settings.keys, "next", event):
                this.selectNext();
                break;
            case this.isKey(this.settings.keys, "nextPage", event):
                this.selectNextPage();
                break;
            case this.isKey(this.settings.keys, "previousPage", event):
                this.selectPreviousPage();
                break;
            default:
                await super.handleEvent(event);
        }
    }
    moveCursorLeft() {
        if (this.settings.search) {
            super.moveCursorLeft();
        }
    }
    moveCursorRight() {
        if (this.settings.search) {
            super.moveCursorRight();
        }
    }
    deleteChar() {
        if (this.settings.search) {
            super.deleteChar();
        }
    }
    deleteCharRight() {
        if (this.settings.search) {
            super.deleteCharRight();
            this.match();
        }
    }
    addChar(__char) {
        if (this.settings.search) {
            super.addChar(__char);
            this.match();
        }
    }
    selectPrevious() {
        if (this.options.length < 2) {
            return;
        }
        if (this.listIndex > 0) {
            this.listIndex--;
            if (this.listIndex < this.listOffset) {
                this.listOffset--;
            }
            if (this.options[this.listIndex].disabled) {
                this.selectPrevious();
            }
        } else {
            this.listIndex = this.options.length - 1;
            this.listOffset = this.options.length - this.getListHeight();
            if (this.options[this.listIndex].disabled) {
                this.selectPrevious();
            }
        }
    }
    selectNext() {
        if (this.options.length < 2) {
            return;
        }
        if (this.listIndex < this.options.length - 1) {
            this.listIndex++;
            if (this.listIndex >= this.listOffset + this.getListHeight()) {
                this.listOffset++;
            }
            if (this.options[this.listIndex].disabled) {
                this.selectNext();
            }
        } else {
            this.listIndex = this.listOffset = 0;
            if (this.options[this.listIndex].disabled) {
                this.selectNext();
            }
        }
    }
    selectPreviousPage() {
        if (this.options?.length) {
            const height = this.getListHeight();
            if (this.listOffset >= height) {
                this.listIndex -= height;
                this.listOffset -= height;
            } else if (this.listOffset > 0) {
                this.listIndex -= this.listOffset;
                this.listOffset = 0;
            }
        }
    }
    selectNextPage() {
        if (this.options?.length) {
            const height = this.getListHeight();
            if (this.listOffset + height + height < this.options.length) {
                this.listIndex += height;
                this.listOffset += height;
            } else if (this.listOffset + height < this.options.length) {
                const offset = this.options.length - height;
                this.listIndex += offset - this.listOffset;
                this.listOffset = offset;
            }
        }
    }
}
class Checkbox extends GenericList {
    static inject(value) {
        GenericPrompt.inject(value);
    }
    static prompt(options) {
        return new this({
            pointer: blue(Figures.POINTER_SMALL),
            prefix: yellow("? "),
            indent: " ",
            listPointer: blue(Figures.POINTER),
            maxRows: 10,
            searchLabel: blue(Figures.SEARCH),
            minOptions: 0,
            maxOptions: Infinity,
            check: green(Figures.TICK),
            uncheck: red(Figures.CROSS),
            ...options,
            keys: {
                check: [
                    "space"
                ],
                ...options.keys ?? {}
            },
            options: Checkbox.mapOptions(options)
        }).prompt();
    }
    static separator(label) {
        return {
            ...super.separator(label),
            icon: false
        };
    }
    static mapOptions(options) {
        return options.options.map((item)=>typeof item === "string" ? {
                value: item
            } : item).map((item)=>({
                ...this.mapOption(item),
                checked: typeof item.checked === "undefined" && options.default && options.default.indexOf(item.value) !== -1 ? true : !!item.checked,
                icon: typeof item.icon === "undefined" ? true : item.icon
            }));
    }
    getListItem(item, isSelected) {
        let line = this.settings.indent;
        line += isSelected ? this.settings.listPointer + " " : "  ";
        if (item.icon) {
            let check = item.checked ? this.settings.check + " " : this.settings.uncheck + " ";
            if (item.disabled) {
                check = dim(check);
            }
            line += check;
        } else {
            line += "  ";
        }
        line += `${isSelected && !item.disabled ? this.highlight(item.name, (val)=>val) : this.highlight(item.name)}`;
        return line;
    }
    getValue() {
        return this.settings.options.filter((item)=>item.checked).map((item)=>item.value);
    }
    async handleEvent(event) {
        switch(true){
            case this.isKey(this.settings.keys, "check", event):
                this.checkValue();
                break;
            default:
                await super.handleEvent(event);
        }
    }
    checkValue() {
        const item = this.options[this.listIndex];
        if (item.disabled) {
            this.setErrorMessage("This option is disabled and cannot be changed.");
        } else {
            item.checked = !item.checked;
        }
    }
    validate(value) {
        const isValidValue = Array.isArray(value) && value.every((val)=>typeof val === "string" && val.length > 0 && this.settings.options.findIndex((option)=>option.value === val) !== -1);
        if (!isValidValue) {
            return false;
        }
        if (value.length < this.settings.minOptions) {
            return `The minimum number of options is ${this.settings.minOptions} but got ${value.length}.`;
        }
        if (value.length > this.settings.maxOptions) {
            return `The maximum number of options is ${this.settings.maxOptions} but got ${value.length}.`;
        }
        return true;
    }
    transform(value) {
        return value.map((val)=>val.trim());
    }
    format(value) {
        return value.map((val)=>this.getOptionByValue(val)?.name ?? val).join(", ");
    }
}
const sep9 = Deno.build.os === "windows" ? "\\" : "/";
class GenericSuggestions extends GenericInput {
    suggestionsIndex = -1;
    suggestionsOffset = 0;
    suggestions = [];
    #hasReadPermissions;
    constructor(settings){
        super({
            ...settings,
            keys: {
                complete: [
                    "tab"
                ],
                next: [
                    "up"
                ],
                previous: [
                    "down"
                ],
                nextPage: [
                    "pageup"
                ],
                previousPage: [
                    "pagedown"
                ],
                ...settings.keys ?? {}
            }
        });
    }
    get localStorage() {
        if (this.settings.id && "localStorage" in window) {
            try {
                return window.localStorage;
            } catch (_) {}
        }
        return null;
    }
    loadSuggestions() {
        if (this.settings.id) {
            const json = this.localStorage?.getItem(this.settings.id);
            const suggestions = json ? JSON.parse(json) : [];
            if (!Array.isArray(suggestions)) {
                return [];
            }
            return suggestions;
        }
        return [];
    }
    saveSuggestions(...suggestions) {
        if (this.settings.id) {
            this.localStorage?.setItem(this.settings.id, JSON.stringify([
                ...suggestions,
                ...this.loadSuggestions(), 
            ].filter(uniqueSuggestions)));
        }
    }
    async render() {
        if (this.settings.files && this.#hasReadPermissions === undefined) {
            const status = await Deno.permissions.request({
                name: "read"
            });
            this.#hasReadPermissions = status.state === "granted";
        }
        await this.match();
        return super.render();
    }
    async match() {
        this.suggestions = await this.getSuggestions();
        this.suggestionsIndex = Math.max(this.getCurrentInputValue().trim().length === 0 ? -1 : 0, Math.min(this.suggestions.length - 1, this.suggestionsIndex));
        this.suggestionsOffset = Math.max(0, Math.min(this.suggestions.length - this.getListHeight(), this.suggestionsOffset));
    }
    input() {
        return super.input() + dim(this.getSuggestion());
    }
    getSuggestion() {
        return this.suggestions[this.suggestionsIndex]?.toString().substr(this.getCurrentInputValue().length) ?? "";
    }
    async getUserSuggestions(input) {
        return typeof this.settings.suggestions === "function" ? await this.settings.suggestions(input) : this.settings.suggestions ?? [];
    }
    #isFileModeEnabled() {
        return !!this.settings.files && this.#hasReadPermissions === true;
    }
    async getFileSuggestions(input) {
        if (!this.#isFileModeEnabled()) {
            return [];
        }
        const path = await Deno.stat(input).then((file)=>file.isDirectory ? input : dirname8(input)).catch(()=>dirname8(input));
        return await listDir(path, this.settings.files);
    }
    async getSuggestions() {
        const input = this.getCurrentInputValue();
        const suggestions = [
            ...this.loadSuggestions(),
            ...await this.getUserSuggestions(input),
            ...await this.getFileSuggestions(input), 
        ].filter(uniqueSuggestions);
        if (!input.length) {
            return suggestions;
        }
        return suggestions.filter((value)=>stripColor(value.toString()).toLowerCase().startsWith(input)).sort((a, b)=>distance((a || a).toString(), input) - distance((b || b).toString(), input));
    }
    body() {
        return this.getList() + this.getInfo();
    }
    getInfo() {
        if (!this.settings.info) {
            return "";
        }
        const selected = this.suggestionsIndex + 1;
        const matched = this.suggestions.length;
        const actions = [];
        if (this.suggestions.length) {
            if (this.settings.list) {
                actions.push([
                    "Next",
                    getFiguresByKeys(this.settings.keys?.next ?? [])
                ], [
                    "Previous",
                    getFiguresByKeys(this.settings.keys?.previous ?? [])
                ], [
                    "Next Page",
                    getFiguresByKeys(this.settings.keys?.nextPage ?? [])
                ], [
                    "Previous Page",
                    getFiguresByKeys(this.settings.keys?.previousPage ?? []), 
                ]);
            } else {
                actions.push([
                    "Next",
                    getFiguresByKeys(this.settings.keys?.next ?? [])
                ], [
                    "Previous",
                    getFiguresByKeys(this.settings.keys?.previous ?? [])
                ]);
            }
            actions.push([
                "Complete",
                getFiguresByKeys(this.settings.keys?.complete ?? [])
            ]);
        }
        actions.push([
            "Submit",
            getFiguresByKeys(this.settings.keys?.submit ?? [])
        ]);
        let info = this.settings.indent;
        if (this.suggestions.length) {
            info += blue(Figures.INFO) + bold(` ${selected}/${matched} `);
        }
        info += actions.map((cur)=>`${cur[0]}: ${bold(cur[1].join(" "))}`).join(", ");
        return info;
    }
    getList() {
        if (!this.suggestions.length || !this.settings.list) {
            return "";
        }
        const list = [];
        const height = this.getListHeight();
        for(let i1 = this.suggestionsOffset; i1 < this.suggestionsOffset + height; i1++){
            list.push(this.getListItem(this.suggestions[i1], this.suggestionsIndex === i1));
        }
        if (list.length && this.settings.info) {
            list.push("");
        }
        return list.join("\n");
    }
    getListItem(value, isSelected) {
        let line = this.settings.indent ?? "";
        line += isSelected ? `${this.settings.listPointer} ` : "  ";
        if (isSelected) {
            line += underline(this.highlight(value));
        } else {
            line += this.highlight(value);
        }
        return line;
    }
    getListHeight(suggestions = this.suggestions) {
        return Math.min(suggestions.length, this.settings.maxRows || suggestions.length);
    }
    async handleEvent(event) {
        switch(true){
            case this.isKey(this.settings.keys, "next", event):
                if (this.settings.list) {
                    this.selectPreviousSuggestion();
                } else {
                    this.selectNextSuggestion();
                }
                break;
            case this.isKey(this.settings.keys, "previous", event):
                if (this.settings.list) {
                    this.selectNextSuggestion();
                } else {
                    this.selectPreviousSuggestion();
                }
                break;
            case this.isKey(this.settings.keys, "nextPage", event):
                if (this.settings.list) {
                    this.selectPreviousSuggestionsPage();
                } else {
                    this.selectNextSuggestionsPage();
                }
                break;
            case this.isKey(this.settings.keys, "previousPage", event):
                if (this.settings.list) {
                    this.selectNextSuggestionsPage();
                } else {
                    this.selectPreviousSuggestionsPage();
                }
                break;
            case this.isKey(this.settings.keys, "complete", event):
                await this.#completeValue();
                break;
            case this.isKey(this.settings.keys, "moveCursorRight", event):
                if (this.inputIndex < this.inputValue.length) {
                    this.moveCursorRight();
                } else {
                    await this.#completeValue();
                }
                break;
            default:
                await super.handleEvent(event);
        }
    }
    deleteCharRight() {
        if (this.inputIndex < this.inputValue.length) {
            super.deleteCharRight();
            if (!this.getCurrentInputValue().length) {
                this.suggestionsIndex = -1;
                this.suggestionsOffset = 0;
            }
        }
    }
    async #completeValue() {
        this.inputValue = await this.complete();
        this.inputIndex = this.inputValue.length;
        this.suggestionsIndex = 0;
        this.suggestionsOffset = 0;
    }
    async complete() {
        let input = this.getCurrentInputValue();
        if (!input.length) {
            return input;
        }
        const suggestion = this.suggestions[this.suggestionsIndex]?.toString();
        if (this.settings.complete) {
            input = await this.settings.complete(input, suggestion);
        } else if (this.#isFileModeEnabled() && input.at(-1) !== sep9 && await isDirectory(input) && (this.getCurrentInputValue().at(-1) !== "." || this.getCurrentInputValue().endsWith(".."))) {
            input += sep9;
        } else if (suggestion) {
            input = suggestion;
        }
        return this.#isFileModeEnabled() ? normalize11(input) : input;
    }
    selectPreviousSuggestion() {
        if (this.suggestions.length) {
            if (this.suggestionsIndex > -1) {
                this.suggestionsIndex--;
                if (this.suggestionsIndex < this.suggestionsOffset) {
                    this.suggestionsOffset--;
                }
            }
        }
    }
    selectNextSuggestion() {
        if (this.suggestions.length) {
            if (this.suggestionsIndex < this.suggestions.length - 1) {
                this.suggestionsIndex++;
                if (this.suggestionsIndex >= this.suggestionsOffset + this.getListHeight()) {
                    this.suggestionsOffset++;
                }
            }
        }
    }
    selectPreviousSuggestionsPage() {
        if (this.suggestions.length) {
            const height = this.getListHeight();
            if (this.suggestionsOffset >= height) {
                this.suggestionsIndex -= height;
                this.suggestionsOffset -= height;
            } else if (this.suggestionsOffset > 0) {
                this.suggestionsIndex -= this.suggestionsOffset;
                this.suggestionsOffset = 0;
            }
        }
    }
    selectNextSuggestionsPage() {
        if (this.suggestions.length) {
            const height = this.getListHeight();
            if (this.suggestionsOffset + height + height < this.suggestions.length) {
                this.suggestionsIndex += height;
                this.suggestionsOffset += height;
            } else if (this.suggestionsOffset + height < this.suggestions.length) {
                const offset = this.suggestions.length - height;
                this.suggestionsIndex += offset - this.suggestionsOffset;
                this.suggestionsOffset = offset;
            }
        }
    }
}
function uniqueSuggestions(value, index, self1) {
    return typeof value !== "undefined" && value !== "" && self1.indexOf(value) === index;
}
function isDirectory(path) {
    return Deno.stat(path).then((file)=>file.isDirectory).catch(()=>false);
}
async function listDir(path, mode) {
    const fileNames = [];
    for await (const file of Deno.readDir(path || ".")){
        if (mode === true && (file.name.startsWith(".") || file.name.endsWith("~"))) {
            continue;
        }
        const filePath = join13(path, file.name);
        if (mode instanceof RegExp && !mode.test(filePath)) {
            continue;
        }
        fileNames.push(filePath);
    }
    return fileNames.sort(function(a, b) {
        return a.toLowerCase().localeCompare(b.toLowerCase());
    });
}
class Confirm extends GenericSuggestions {
    static prompt(options) {
        if (typeof options === "string") {
            options = {
                message: options
            };
        }
        return new this({
            pointer: blue(Figures.POINTER_SMALL),
            prefix: yellow("? "),
            indent: " ",
            listPointer: blue(Figures.POINTER),
            maxRows: 8,
            active: "Yes",
            inactive: "No",
            ...options,
            files: false,
            complete: undefined,
            suggestions: [
                options.active ?? "Yes",
                options.inactive ?? "No", 
            ],
            list: false,
            info: false
        }).prompt();
    }
    static inject(value) {
        GenericPrompt.inject(value);
    }
    defaults() {
        let defaultMessage = "";
        if (this.settings.default === true) {
            defaultMessage += this.settings.active[0].toUpperCase() + "/" + this.settings.inactive[0].toLowerCase();
        } else if (this.settings.default === false) {
            defaultMessage += this.settings.active[0].toLowerCase() + "/" + this.settings.inactive[0].toUpperCase();
        } else {
            defaultMessage += this.settings.active[0].toLowerCase() + "/" + this.settings.inactive[0].toLowerCase();
        }
        return defaultMessage ? dim(` (${defaultMessage})`) : "";
    }
    success(value) {
        this.saveSuggestions(this.format(value));
        return super.success(value);
    }
    getValue() {
        return this.inputValue;
    }
    validate(value) {
        return typeof value === "string" && [
            this.settings.active[0].toLowerCase(),
            this.settings.active.toLowerCase(),
            this.settings.inactive[0].toLowerCase(),
            this.settings.inactive.toLowerCase(), 
        ].indexOf(value.toLowerCase()) !== -1;
    }
    transform(value) {
        switch(value.toLowerCase()){
            case this.settings.active[0].toLowerCase():
            case this.settings.active.toLowerCase():
                return true;
            case this.settings.inactive[0].toLowerCase():
            case this.settings.inactive.toLowerCase():
                return false;
        }
        return;
    }
    format(value) {
        return value ? this.settings.active : this.settings.inactive;
    }
}
class Input extends GenericSuggestions {
    static prompt(options) {
        if (typeof options === "string") {
            options = {
                message: options
            };
        }
        return new this({
            pointer: blue(Figures.POINTER_SMALL),
            prefix: yellow("? "),
            indent: " ",
            listPointer: blue(Figures.POINTER),
            maxRows: 8,
            minLength: 0,
            maxLength: Infinity,
            ...options
        }).prompt();
    }
    static inject(value) {
        GenericPrompt.inject(value);
    }
    success(value) {
        this.saveSuggestions(value);
        return super.success(value);
    }
    getValue() {
        return this.settings.files ? normalize11(this.inputValue) : this.inputValue;
    }
    validate(value) {
        if (typeof value !== "string") {
            return false;
        }
        if (value.length < this.settings.minLength) {
            return `Value must be longer then ${this.settings.minLength} but has a length of ${value.length}.`;
        }
        if (value.length > this.settings.maxLength) {
            return `Value can't be longer then ${this.settings.maxLength} but has a length of ${value.length}.`;
        }
        return true;
    }
    transform(value) {
        return value.trim();
    }
    format(value) {
        return value;
    }
}
class Secret extends GenericInput {
    static prompt(options) {
        if (typeof options === "string") {
            options = {
                message: options
            };
        }
        return new this({
            pointer: blue(Figures.POINTER_SMALL),
            prefix: yellow("? "),
            indent: " ",
            label: "Password",
            hidden: false,
            minLength: 0,
            maxLength: Infinity,
            ...options
        }).prompt();
    }
    static inject(value) {
        GenericPrompt.inject(value);
    }
    input() {
        return underline(this.settings.hidden ? "" : "*".repeat(this.inputValue.length));
    }
    read() {
        if (this.settings.hidden) {
            this.tty.cursorHide();
        }
        return super.read();
    }
    validate(value) {
        if (typeof value !== "string") {
            return false;
        }
        if (value.length < this.settings.minLength) {
            return `${this.settings.label} must be longer then ${this.settings.minLength} but has a length of ${value.length}.`;
        }
        if (value.length > this.settings.maxLength) {
            return `${this.settings.label} can't be longer then ${this.settings.maxLength} but has a length of ${value.length}.`;
        }
        return true;
    }
    transform(value) {
        return value;
    }
    format(value) {
        return this.settings.hidden ? "*".repeat(8) : "*".repeat(value.length);
    }
    getValue() {
        return this.inputValue;
    }
}
class Select extends GenericList {
    listIndex = this.getListIndex(this.settings.default);
    static inject(value) {
        GenericPrompt.inject(value);
    }
    static prompt(options) {
        return new this({
            pointer: blue(Figures.POINTER_SMALL),
            prefix: yellow("? "),
            indent: " ",
            listPointer: blue(Figures.POINTER),
            maxRows: 10,
            searchLabel: blue(Figures.SEARCH),
            ...options,
            options: Select.mapOptions(options)
        }).prompt();
    }
    static mapOptions(options) {
        return options.options.map((item)=>typeof item === "string" ? {
                value: item
            } : item).map((item)=>this.mapOption(item));
    }
    input() {
        return underline(blue(this.inputValue));
    }
    getListItem(item, isSelected) {
        let line = this.settings.indent;
        line += isSelected ? `${this.settings.listPointer} ` : "  ";
        line += `${isSelected && !item.disabled ? this.highlight(item.name, (val)=>val) : this.highlight(item.name)}`;
        return line;
    }
    getValue() {
        return this.options[this.listIndex]?.value ?? this.settings.default;
    }
    validate(value) {
        return typeof value === "string" && value.length > 0 && this.options.findIndex((option)=>option.value === value) !== -1;
    }
    transform(value) {
        return value.trim();
    }
    format(value) {
        return this.getOptionByValue(value)?.name ?? value;
    }
}
class Toggle extends GenericPrompt {
    status = typeof this.settings.default !== "undefined" ? this.format(this.settings.default) : "";
    static prompt(options) {
        if (typeof options === "string") {
            options = {
                message: options
            };
        }
        return new this({
            pointer: blue(Figures.POINTER_SMALL),
            prefix: yellow("? "),
            indent: " ",
            active: "Yes",
            inactive: "No",
            ...options,
            keys: {
                active: [
                    "right",
                    "y",
                    "j",
                    "s",
                    "o"
                ],
                inactive: [
                    "left",
                    "n"
                ],
                ...options.keys ?? {}
            }
        }).prompt();
    }
    message() {
        let message = super.message() + " " + this.settings.pointer + " ";
        if (this.status === this.settings.active) {
            message += dim(this.settings.inactive + " / ") + underline(this.settings.active);
        } else if (this.status === this.settings.inactive) {
            message += underline(this.settings.inactive) + dim(" / " + this.settings.active);
        } else {
            message += dim(this.settings.inactive + " / " + this.settings.active);
        }
        return message;
    }
    read() {
        this.tty.cursorHide();
        return super.read();
    }
    async handleEvent(event) {
        switch(true){
            case event.sequence === this.settings.inactive[0].toLowerCase():
            case this.isKey(this.settings.keys, "inactive", event):
                this.selectInactive();
                break;
            case event.sequence === this.settings.active[0].toLowerCase():
            case this.isKey(this.settings.keys, "active", event):
                this.selectActive();
                break;
            default:
                await super.handleEvent(event);
        }
    }
    selectActive() {
        this.status = this.settings.active;
    }
    selectInactive() {
        this.status = this.settings.inactive;
    }
    validate(value) {
        return [
            this.settings.active,
            this.settings.inactive
        ].indexOf(value) !== -1;
    }
    transform(value) {
        switch(value){
            case this.settings.active:
                return true;
            case this.settings.inactive:
                return false;
        }
    }
    format(value) {
        return value ? this.settings.active : this.settings.inactive;
    }
    getValue() {
        return this.status;
    }
}
function prompt(prompts, options) {
    return new PromptList(prompts, options).run(options?.initial);
}
let injected = {};
class PromptList {
    result;
    index;
    names;
    isInBeforeHook;
    get prompt() {
        return this.prompts[this.index];
    }
    constructor(prompts, options){
        this.prompts = prompts;
        this.options = options;
        this.result = {};
        this.index = -1;
        this.isInBeforeHook = false;
        this.names = this.prompts.map((prompt)=>prompt.name);
    }
    async run(name) {
        this.index = -1;
        this.result = {};
        this.isInBeforeHook = false;
        await this.next(name);
        return this.result;
    }
    async next(name) {
        if (this.updateIndex(name)) {
            await this.runBeforeHook(async ()=>{
                this.isInBeforeHook = false;
                await this.runPrompt();
                await this.runAfterHook();
            });
        }
    }
    updateIndex(name) {
        if (name && typeof name === "string") {
            this.index = this.names.indexOf(name);
            if (this.index === -1) {
                throw new Error(`Invalid prompt name: ${name}, allowed prompt names: ${this.names.join(", ")}`);
            }
        } else if (typeof name === "number") {
            if (name < 0 || name > this.names.length) {
                throw new Error(`Invalid prompt index: ${name}, prompt length: ${this.names.length}`);
            }
            this.index = name;
        } else if (name === true && !this.isInBeforeHook) {
            this.index++;
            if (this.index < this.names.length - 1) {
                this.index++;
            }
        } else {
            this.index++;
        }
        this.isInBeforeHook = false;
        if (this.index < this.names.length) {
            return true;
        } else if (this.index === this.names.length) {
            return false;
        } else {
            throw new Error("next() called multiple times");
        }
    }
    async runBeforeHook(run) {
        this.isInBeforeHook = true;
        const next = async (name)=>{
            if (name || typeof name === "number") {
                return this.next(name);
            }
            await run();
        };
        if (this.options?.before) {
            await this.options.before(this.prompt.name, this.result, async (name)=>{
                if (name || typeof name === "number") {
                    return this.next(name);
                } else if (this.prompt.before) {
                    await this.prompt.before(this.result, next);
                } else {
                    await run();
                }
            });
            return;
        } else if (this.prompt.before) {
            await this.prompt.before(this.result, next);
            return;
        }
        await run();
    }
    async runPrompt() {
        const prompt = this.prompt.type;
        if (typeof injected[this.prompt.name] !== "undefined") {
            if (prompt.inject) {
                prompt.inject(injected[this.prompt.name]);
            } else {
                GenericPrompt.inject(injected[this.prompt.name]);
            }
        }
        try {
            this.result[this.prompt.name] = await prompt.prompt({
                cbreak: this.options?.cbreak,
                ...this.prompt
            });
        } finally{
            tty.cursorShow();
        }
    }
    async runAfterHook() {
        if (this.options?.after) {
            await this.options.after(this.prompt.name, this.result, async (name)=>{
                if (name) {
                    return this.next(name);
                } else if (this.prompt.after) {
                    await this.prompt.after(this.result, (name)=>this.next(name));
                } else {
                    await this.next();
                }
            });
        } else if (this.prompt.after) {
            await this.prompt.after(this.result, (name)=>this.next(name));
        } else {
            await this.next();
        }
    }
    prompts;
    options;
}
const kUpdatePath = "update-path";
function unzip(file) {
    const dir = dirname2(file);
    if (file.endsWith("zip")) {
        if (Deno.build.os === "windows") {
            const args = [
                "Expand-Archive",
                file,
                "-DestinationPath",
                dir
            ];
            const quoted = requireQuoting(args);
            return safeWindowsExec("powershell", quoted.args, (cmd)=>{
                return execProcess({
                    cmd: cmd,
                    stdout: "piped"
                });
            });
        } else {
            return execProcess({
                cmd: [
                    "unzip",
                    "-o",
                    file
                ],
                cwd: dir,
                stdout: "piped"
            });
        }
    } else {
        return execProcess({
            cmd: [
                "tar",
                "xfz",
                file
            ],
            cwd: dir,
            stdout: "piped"
        });
    }
}
async function getLatestRelease(repo) {
    const url = `https://api.github.com/repos/${repo}/releases/latest`;
    const response = await fetch(url);
    return response.json();
}
const kDefaultRepos = [
    "https://mirrors.rit.edu/CTAN/systems/texlive/tlnet/",
    "https://ctan.math.illinois.edu/systems/texlive/tlnet/",
    "https://mirror.las.iastate.edu/tex-archive/systems/texlive/tlnet/", 
];
const kTinyTexRepo = "rstudio/tinytex-releases";
const kPackageMaximal = "TinyTeX";
const kVersionFileName = "version";
const tinyTexInstallable = {
    name: "TinyTeX",
    prereqs: [
        {
            check: ()=>{
                return isWritable("/usr/local/bin");
            },
            os: [
                "darwin"
            ],
            message: "The directory /usr/local/bin is not writable."
        },
        {
            check: ()=>{
                const needsSource = needsSourceInstall();
                return Promise.resolve(!needsSource);
            },
            os: [
                "linux"
            ],
            message: "This platform doesn't support installation at this time. Please install manually instead."
        }
    ],
    installed: installed1,
    installDir: installDir1,
    binDir,
    installedVersion: installedVersion1,
    verifyConfiguration,
    latestRelease: remotePackageInfo,
    preparePackage: preparePackage1,
    install: install2,
    afterInstall: afterInstall1,
    uninstall: uninstall1
};
async function installed1() {
    const hasTiny = hasTinyTex();
    if (hasTiny) {
        return true;
    } else {
        if (await hasTexLive()) {
            return await isTinyTex();
        } else {
            return false;
        }
    }
}
async function installDir1() {
    if (await installed1()) {
        return Promise.resolve(tinyTexInstallDir());
    } else {
        return Promise.resolve(undefined);
    }
}
function verifyConfiguration() {
    return Promise.resolve({
        status: "ok"
    });
}
async function binDir() {
    if (await installed1()) {
        const installDir = tinyTexInstallDir();
        if (installDir) {
            return Promise.resolve(binFolder(installDir));
        } else {
            warning("Failed to resolve tinytex install directory even though it is installed.");
            return Promise.resolve(undefined);
        }
    } else {
        return Promise.resolve(undefined);
    }
}
async function installedVersion1() {
    const installDir = tinyTexInstallDir();
    if (installDir) {
        const versionFile = join3(installDir, kVersionFileName);
        if (existsSync(versionFile)) {
            return await Deno.readTextFile(versionFile);
        } else {
            return undefined;
        }
    } else {
        return undefined;
    }
}
function noteInstalledVersion(version) {
    const installDir = tinyTexInstallDir();
    if (installDir) {
        const versionFile = join3(installDir, kVersionFileName);
        Deno.writeTextFileSync(versionFile, version);
    }
}
async function preparePackage1(context) {
    const pkgInfo = await remotePackageInfo();
    const version = pkgInfo.version;
    const pkgName = tinyTexPkgName(kPackageMaximal, version);
    const filePath = join3(context.workingDir, pkgName);
    const url = tinyTexUrl(pkgName, pkgInfo);
    if (url) {
        await context.download(`TinyTex ${version}`, url, filePath);
        return {
            filePath,
            version
        };
    } else {
        context.error("Couldn't determine what URL to use to download");
        return Promise.reject();
    }
}
async function install2(pkgInfo, context) {
    const installDir = tinyTexInstallDir();
    if (installDir) {
        const parentDir = join3(installDir, "..");
        const realParentDir = expandPath(parentDir);
        const tinyTexDirName = Deno.build.os === "linux" ? ".TinyTeX" : "TinyTeX";
        if (existsSync(realParentDir)) {
            await context.withSpinner({
                message: `Unzipping ${basename2(pkgInfo.filePath)}`
            }, async ()=>{
                await unzip(pkgInfo.filePath);
            });
            await context.withSpinner({
                message: `Moving files`
            }, ()=>{
                const from = join3(context.workingDir, tinyTexDirName);
                copyTo(from, installDir);
                Deno.removeSync(from, {
                    recursive: true
                });
                noteInstalledVersion(pkgInfo.version);
                return Promise.resolve();
            });
            context.props[kTlMgrKey] = Deno.build.os === "windows" ? join3(binFolder(installDir), "tlmgr.bat") : join3(binFolder(installDir), "tlmgr");
            return Promise.resolve();
        } else {
            context.error("Installation target directory doesn't exist");
            return Promise.reject();
        }
    } else {
        context.error("Unable to determine installation directory");
        return Promise.reject();
    }
}
function binFolder(installDir) {
    const nixBinFolder = ()=>{
        const oldBinFolder = join3(installDir, "bin", `${Deno.build.arch}-${Deno.build.os}`);
        if (existsSync(oldBinFolder)) {
            return oldBinFolder;
        } else {
            return join3(installDir, "bin", `universal-${Deno.build.os}`);
        }
    };
    return Deno.build.os === "windows" ? join3(installDir, "bin", "win32") : nixBinFolder();
}
async function afterInstall1(context) {
    const tlmgrPath = context.props[kTlMgrKey];
    if (tlmgrPath) {
        await context.withSpinner({
            message: "Verifying tlgpg support"
        }, async ()=>{
            if ([
                "darwin",
                "windows"
            ].includes(Deno.build.os)) {
                await exec(tlmgrPath, [
                    "-q",
                    "--repository",
                    "http://www.preining.info/tlgpg/",
                    "install",
                    "tlgpg", 
                ]);
            }
        });
        let restartRequired = false;
        const defaultRepo = textLiveRepo();
        await context.withSpinner({
            message: `Setting default repository`,
            doneMessage: `Default Repository: ${defaultRepo}`
        }, async ()=>{
            await exec(tlmgrPath, [
                "-q",
                "option",
                "repository",
                defaultRepo
            ]);
        });
        if (context.flags[kUpdatePath]) {
            const message = `Unable to determine a path to use when installing TeX Live. 
To complete the installation, please run the following:

${tlmgrPath} option sys_bin <bin_dir_on_path>
${tlmgrPath} path add

This will instruct TeX Live to create symlinks that it needs in <bin_dir_on_path>.`;
            const configureBinPath = async (path)=>{
                if (Deno.build.os !== "windows") {
                    const expandedPath = expandPath(path);
                    ensureDirSync(expandedPath);
                    await exec(tlmgrPath, [
                        "option",
                        "sys_bin",
                        expandedPath
                    ]);
                    return true;
                } else {
                    return true;
                }
            };
            const paths = [];
            const envPath = Deno.env.get("QUARTO_TEXLIVE_BINPATH");
            if (envPath) {
                paths.push(envPath);
            } else if (Deno.build.os !== "windows") {
                paths.push(...suggestUserBinPaths());
            } else {
                paths.push(tlmgrPath);
            }
            const binPathMessage = envPath ? `Setting TeXLive Binpath: ${envPath}` : Deno.build.os !== "windows" ? `Updating Path (inspecting ${paths.length} possible paths)` : "Updating Path";
            await context.withSpinner({
                message: binPathMessage
            }, async ()=>{
                let result1;
                for (const path of paths){
                    const pathConfigured = await configureBinPath(path);
                    if (pathConfigured) {
                        result1 = await exec(tlmgrPath, [
                            "path",
                            "add"
                        ]);
                        if (result1.success) {
                            break;
                        }
                    }
                }
                if (result1 && !result1.success) {
                    warning(message);
                }
            });
            if (Deno.build.os === "windows") {
                const texLiveInstalled = await hasTexLive();
                const texLivePath = await texLiveInPath();
                restartRequired = restartRequired || !texLiveInstalled || !texLivePath;
            }
        }
        return Promise.resolve(restartRequired);
    } else {
        context.error("Couldn't locate tlmgr after installation");
        return Promise.reject();
    }
}
async function uninstall1(context) {
    if (!isTinyTex()) {
        context.error("Current LateX installation does not appear to be TinyTex");
        return Promise.reject();
    }
    if (context.flags[kUpdatePath]) {
        if (await texLiveInPath()) {
            await context.withSpinner({
                message: "Removing commands"
            }, async ()=>{
                const texLive = await texLiveContext(true);
                const result1 = await removePath(texLive);
                if (!result1.success) {
                    context.error("Failed to uninstall");
                    return Promise.reject();
                }
            });
        }
    }
    await context.withSpinner({
        message: "Removing directory"
    }, async ()=>{
        const installDir = tinyTexInstallDir();
        if (installDir) {
            await Deno.remove(installDir, {
                recursive: true
            });
        } else {
            context.error("Couldn't find install directory");
            return Promise.reject();
        }
    });
}
function exec(path, cmd) {
    return execProcess({
        cmd: [
            path,
            ...cmd
        ],
        stdout: "piped",
        stderr: "piped"
    });
}
const kTlMgrKey = "tlmgr";
function textLiveRepo() {
    const randomInt = Math.floor(Math.random() * kDefaultRepos.length);
    return kDefaultRepos[randomInt];
}
function tinyTexPkgName(base, ver) {
    const ext = Deno.build.os === "windows" ? "zip" : Deno.build.os === "linux" ? "tar.gz" : "tgz";
    base = base || "TinyTeX";
    if (ver) {
        return `${base}-${ver}.${ext}`;
    } else {
        return `${base}.${ext}`;
    }
}
function tinyTexUrl(pkg, remotePkgInfo) {
    const asset = remotePkgInfo.assets.find((asset)=>{
        return asset.name === pkg;
    });
    return asset?.url;
}
async function remotePackageInfo() {
    const githubRelease = await getLatestRelease(kTinyTexRepo);
    return {
        url: githubRelease.html_url,
        version: githubRelease.tag_name,
        assets: githubRelease.assets.map((asset)=>{
            return {
                name: asset.name,
                url: asset.browser_download_url
            };
        })
    };
}
async function isWritable(path) {
    const desc = {
        name: "write",
        path
    };
    const status = await Deno.permissions.query(desc);
    return status.state === "granted";
}
function needsSourceInstall() {
    if (Deno.build.os === "linux" && Deno.build.arch !== "x86_64") {
        return true;
    } else {
        return false;
    }
}
async function isTinyTex() {
    const root = await texLiveRoot();
    if (root) {
        if (root.match(/[/\\][Tt]iny[Tt]e[Xx][/\\]?/)) {
            return true;
        }
        const cnfFile = join3(root, "texmf-dist/web2c/fmtutil.cnf");
        if (existsSync(cnfFile)) {
            const cnfText = Deno.readTextFileSync(cnfFile);
            const match = cnfText.match(/\W[.]?TinyTeX\W/);
            if (match) {
                return true;
            }
        }
        return false;
    }
    return false;
}
async function texLiveRoot() {
    const texLivePath = await which("tlmgr");
    if (texLivePath) {
        const realPath = await Deno.realPath(texLivePath);
        if (Deno.build.os === "windows") {
            return join3(realPath, "..", "..", "..");
        } else {
            const root = join3(realPath, "..", "..", "..", "..");
            const tlBin = join3(root, "bin");
            if (existsSync(tlBin)) {
                return root;
            } else {
                return undefined;
            }
        }
    } else {
        const installDir = tinyTexInstallDir();
        if (installDir && existsSync(installDir)) {
            return installDir;
        } else {
            return undefined;
        }
    }
}
async function downloadWithProgress(url, msg, toFile) {
    const response = await (typeof url === "string" ? fetch(url, {
        redirect: "follow"
    }) : url);
    if (response.status === 200 && response.body) {
        const pkgFile = await Deno.open(toFile, {
            create: true,
            write: true
        });
        const contentLength = response.headers.get("content-length") || 0;
        const contentLengthMb = contentLength / 1024 / 1024;
        const prog = progressBar(contentLengthMb, msg);
        let totalLength = 0;
        for await (const chunk of response.body){
            await writeAll(pkgFile, chunk);
            totalLength = totalLength + chunk.length;
            if (contentLength > 0) {
                prog.update(totalLength / 1024 / 1024, `${(totalLength / 1024 / 1024).toFixed(1)}MB`);
            }
        }
        prog.complete();
        pkgFile.close();
    } else {
        throw new Error(`download failed (HTTP status ${response.status} - ${response.statusText})`);
    }
}
const kInstallableTools = {
    tinytex: tinyTexInstallable,
    chromium: chromiumInstallable
};
async function allTools() {
    const installed = [];
    const notInstalled = [];
    const tools = installableTools();
    for (const name of tools){
        const tool = installableTool(name);
        const isInstalled = await tool.installed();
        if (isInstalled) {
            installed.push(tool);
        } else {
            notInstalled.push(tool);
        }
    }
    return {
        installed,
        notInstalled
    };
}
function installableTools() {
    const tools = [];
    Object.keys(kInstallableTools).forEach((key)=>{
        const tool = kInstallableTools[key];
        tools.push(tool.name.toLowerCase());
    });
    return tools;
}
async function printToolInfo(name) {
    name = name || "";
    const installableTool = kInstallableTools[name.toLowerCase()];
    if (installableTool) {
        const response = {
            name: installableTool.name,
            installed: await installableTool.installed(),
            version: await installableTool.installedVersion(),
            directory: await installableTool.installDir()
        };
        if (installableTool.binDir) {
            response["bin-directory"] = await installableTool.binDir();
        }
        if (response.installed && installableTool.verifyConfiguration) {
            response["configuration"] = await installableTool.verifyConfiguration();
        }
        Deno.stdout.writeSync(new TextEncoder().encode(JSON.stringify(response, null, 2) + "\n"));
    }
}
async function installTool(name, updatePath) {
    name = name || "";
    const installableTool = kInstallableTools[name.toLowerCase()];
    if (installableTool) {
        const workingDir = Deno.makeTempDirSync();
        try {
            const context = installContext(workingDir, updatePath);
            context.info(`Installing ${name}`);
            const alreadyInstalled = await installableTool.installed();
            if (alreadyInstalled) {
                context.error(`Install canceled - ${name} is already installed.`);
                return Promise.reject();
            } else {
                const platformPrereqs = installableTool.prereqs.filter((prereq)=>prereq.os.includes(Deno.build.os));
                for (const prereq of platformPrereqs){
                    const met = await prereq.check(context);
                    if (!met) {
                        context.error(prereq.message);
                        return Promise.reject();
                    }
                }
                const pkgInfo = await installableTool.preparePackage(context);
                await installableTool.install(pkgInfo, context);
                const restartRequired = await installableTool.afterInstall(context);
                context.info("Installation successful");
                if (restartRequired) {
                    context.info("To complete this installation, please restart your system.");
                }
            }
        } finally{
            Deno.removeSync(workingDir, {
                recursive: true
            });
        }
    } else {
        info(`Could not install '${name}'- try again with one of the following:`);
        installableTools().forEach((name)=>info("quarto install tool " + name, {
                indent: 2
            }));
    }
}
async function uninstallTool(name, updatePath) {
    const installableTool = kInstallableTools[name.toLowerCase()];
    if (installableTool) {
        const installed = await installableTool.installed();
        if (installed) {
            const workingDir = Deno.makeTempDirSync();
            const context = installContext(workingDir, updatePath);
            context.info(`Uninstalling ${name}`);
            try {
                await installableTool.uninstall(context);
                info(`Uninstallation successful`);
            } catch (e) {
                logError(e);
            } finally{
                Deno.removeSync(workingDir, {
                    recursive: true
                });
            }
        } else {
            info(`${name} is not installed use 'quarto install tool ${name} to install it.`);
        }
    }
}
async function updateTool(name) {
    const summary = await toolSummary(name);
    const installableTool = kInstallableTools[name];
    if (installableTool && summary && summary.installed) {
        const workingDir = Deno.makeTempDirSync();
        const context = installContext(workingDir);
        try {
            context.info(`Updating ${installableTool.name} from ${summary.installedVersion} to ${summary.latestRelease.version}`);
            const pkgInfo = await installableTool.preparePackage(context);
            context.info(`Removing ${summary.installedVersion}`);
            await installableTool.uninstall(context);
            context.info(`Installing ${summary.latestRelease.version}`);
            await installableTool.install(pkgInfo, context);
            context.info("Finishing update");
            const restartRequired = await installableTool.afterInstall(context);
            context.info("Update successful");
            if (restartRequired) {
                context.info("To complete this update, please restart your system.");
            }
        } catch (e) {
            logError(e);
        } finally{
            Deno.removeSync(workingDir, {
                recursive: true
            });
        }
    } else {
        info(`${name} is not installed use 'quarto install ${name} to install it.`);
    }
}
async function toolSummary(name) {
    const tool = installableTool(name);
    if (tool) {
        const installed = await tool.installed();
        const installedVersion = await tool.installedVersion();
        const latestRelease = await tool.latestRelease();
        const configuration = tool.verifyConfiguration && installed ? await tool.verifyConfiguration() : {
            status: "ok"
        };
        return {
            installed,
            installedVersion,
            latestRelease,
            configuration
        };
    } else {
        return undefined;
    }
}
function installableTool(name) {
    return kInstallableTools[name.toLowerCase()];
}
const installContext = (workingDir, updatePath)=>{
    const installMessaging = {
        info: (msg)=>{
            info(msg);
        },
        error: (msg)=>{
            info(msg);
        },
        confirm: (msg, def)=>{
            if (def !== undefined) {
                return Confirm.prompt({
                    message: msg,
                    default: def
                });
            } else {
                return Confirm.prompt(msg);
            }
        },
        withSpinner
    };
    return {
        download: async (name, url, target)=>{
            try {
                await downloadWithProgress(url, `Downloading ${name}`, target);
            } catch (error) {
                installMessaging.error(error.message);
                return Promise.reject();
            }
        },
        workingDir,
        ...installMessaging,
        props: {},
        flags: {
            [kUpdatePath]: updatePath
        }
    };
};
async function outputTools() {
    const toolRows = [];
    const statusMsgs = [];
    const installStatus = (summary)=>{
        if (summary.installed) {
            if (summary.installedVersion) {
                if (summary.installedVersion === summary.latestRelease.version) {
                    return "Up to date";
                } else {
                    return "Update available";
                }
            } else {
                return "External Installation";
            }
        } else {
            return "Not installed";
        }
    };
    const tools = await loadTools();
    for (const tool of tools){
        const summary = await toolSummary(tool.tool.name);
        if (summary) {
            const toolDetails = [
                tool.tool.name.toLowerCase(),
                installStatus(summary),
                summary.installedVersion || "---",
                summary.latestRelease.version, 
            ];
            toolRows.push(toolDetails);
            if (summary.configuration.status !== "ok") {
                statusMsgs.push(`${summary.configuration.message}`);
            }
        }
    }
    info("");
    const table = new Table().header([
        bold1("Tool"),
        bold1("Status"),
        bold1("Installed"),
        bold1("Latest"), 
    ]).body(toolRows).padding(5);
    info(table.toString());
    statusMsgs.forEach((msg)=>{
        warning(msg);
    });
}
async function loadTools() {
    let sorted = [];
    await withSpinner({
        message: "Inspecting tools"
    }, async ()=>{
        const all = await allTools();
        const toolsWithInstall = [
            {
                tools: all.installed,
                installed: true
            },
            {
                tools: all.notInstalled,
                installed: false
            }
        ];
        const toolInfos = [];
        for (const toolWithInstall of toolsWithInstall){
            for (const tool of toolWithInstall.tools){
                const version = await tool.installedVersion();
                const latest = await tool.latestRelease();
                toolInfos.push({
                    tool,
                    version,
                    installed: toolWithInstall.installed,
                    latest
                });
            }
        }
        sorted = toolInfos.sort((tool1, tool2)=>{
            return tool1.tool.name.localeCompare(tool2.tool.name);
        });
    });
    return sorted;
}
async function afterConfirm(message, action, prompt) {
    if (prompt !== false) {
        const confirmed = await Confirm.prompt({
            message,
            default: true
        });
        if (confirmed) {
            info("");
            return action();
        } else {
            return Promise.resolve();
        }
    } else {
        return action();
    }
}
const removeTool = (toolname, prompt, updatePath)=>{
    return afterConfirm(`Are you sure you'd like to remove ${toolname}?`, ()=>{
        return uninstallTool(toolname, updatePath);
    }, prompt);
};
async function updateOrInstallTool(tool, action, prompt, updatePath) {
    const summary = await toolSummary(tool);
    if (action === "update") {
        if (!summary?.installed) {
            return afterConfirm(`${tool} is not installed. Do you want to install it now?`, ()=>{
                return installTool(tool, updatePath);
            }, prompt);
        } else {
            if (summary.installedVersion === undefined) {
                info(`${tool} was not installed using Quarto. Please use the tool that you used to install ${tool} instead.`);
            } else if (summary.installedVersion === summary.latestRelease.version) {
                info(`${tool} is already up to date.`);
            } else {
                return afterConfirm(`Do you want to update ${tool} from ${summary.installedVersion} to ${summary.latestRelease.version}?`, ()=>{
                    return updateTool(tool);
                }, prompt);
            }
        }
    } else {
        if (summary && summary.installed) {
            if (summary.installedVersion === summary.latestRelease.version) {
                info(`${tool} is already installed and up to date.`);
            } else {
                return afterConfirm(`${tool} is already installed. Do you want to update to ${summary.latestRelease.version}?`, ()=>{
                    return updateTool(tool);
                }, prompt);
            }
        } else {
            return installTool(tool, updatePath);
        }
    }
}
async function selectTool(toolsInfo, action) {
    const name = (toolInfo)=>{
        if (action === "install" || action == "update") {
            if (toolInfo.installed) {
                return `${toolInfo.tool.name}${toolInfo.version ? " (" + toolInfo.version + " installed)" : ""}`;
            } else {
                return `${toolInfo.tool.name}${toolInfo.latest.version ? " (" + toolInfo.latest.version + ")" : ""}`;
            }
        } else {
            if (!toolInfo.installed) {
                return `${toolInfo.tool.name} (not installed)`;
            } else {
                return `${toolInfo.tool.name}${toolInfo.version ? " (" + toolInfo.version + " installed)" : ""}`;
            }
        }
    };
    const toolTarget = await Select.prompt({
        message: `Select a tool to ${action}`,
        hint: !haveArrowKeys() ? "Press 'u' and 'd' to navigate between tools" : undefined,
        options: toolsInfo.map((toolInfo)=>{
            return {
                name: name(toolInfo),
                value: toolInfo.tool.name.toLowerCase(),
                disabled: action === "install" ? toolInfo.installed : !toolInfo.installed
            };
        })
    });
    return toolTarget;
}
const toolsCommand = new Command().name("tools").hidden().arguments("<command:string> [tool:string]").description(`Installation and update of ancillary tools.
    
  tools:\n  ${installableTools().map((name)=>"  " + name).join("\n  ")}

  commands:
    install
    uninstall
    update
    
Use 'quarto tools' with no arguments to show the status of all tools.`).example("Install TinyTex", "quarto tools install tinytex").example("Uninstall TinyTex", "quarto tools uninstall tinytex").example("Update TinyTex", "quarto tools update tinytex").example("Show tool status", "quarto tools list").action(async (_options, command, tool)=>{
    switch(command){
        case "info":
            if (tool) {
                await printToolInfo(tool);
            }
            break;
        case "install":
            if (tool) {
                await updateOrInstallTool(tool, "install");
            }
            break;
        case "uninstall":
            if (tool) {
                await removeTool(tool);
            }
            break;
        case "update":
            if (tool) {
                await updateOrInstallTool(tool, "update");
            }
            break;
        default:
        case "list":
            await outputTools();
            break;
    }
});
async function openUrl(url) {
    const shellOpen = {
        windows: "explorer",
        darwin: "open",
        linux: "xdg-open"
    };
    const cmd = shellOpen[Deno.build.os];
    if (Deno.build.os === "windows") {
        const safeArgs = requireQuoting([
            url
        ]);
        if (safeArgs.status) {
            await safeWindowsExec(cmd, safeArgs.args, (cmd)=>{
                return execProcess({
                    cmd,
                    stdout: "piped",
                    stderr: "piped"
                });
            });
        } else {
            if (await which(cmd)) {
                Deno.run({
                    cmd: [
                        cmd,
                        url
                    ]
                });
            }
        }
    } else {
        if (await which(cmd)) {
            Deno.run({
                cmd: [
                    cmd,
                    url
                ]
            });
        }
    }
}
function httpDevServer(port, timeout, isRendering, stopServer, isPresentation) {
    const clients = [];
    const hasClients = ()=>{
        return isRendering() || !!clients.find((client)=>client.socket.readyState !== WebSocket.CLOSED);
    };
    let onSocketClose;
    if (timeout > 0 && !isRStudioPreview()) {
        onSocketClose = debounce1(()=>{
            if (!hasClients()) {
                stopServer();
            }
        }, timeout * 1000);
    }
    LogEventsHandler.onLog(async (logRecord, msg)=>{
        for(let i1 = clients.length - 1; i1 >= 0; i1--){
            const socket = clients[i1].socket;
            try {
                await socket.send("log:" + JSON.stringify({
                    ...logRecord,
                    msgFormatted: msg
                }));
            } catch (_e) {}
        }
    });
    let injectClientInitialized = false;
    let iframeURL;
    return {
        handle: (req)=>{
            return req.headers.get("upgrade") === "websocket";
        },
        connect: (req)=>{
            try {
                const { socket , response  } = Deno.upgradeWebSocket(req);
                const client = {
                    socket
                };
                if (onSocketClose) {
                    socket.onclose = onSocketClose;
                }
                clients.push(client);
                return Promise.resolve(response);
            } catch (e) {
                maybeDisplaySocketError(e);
                return Promise.resolve(undefined);
            }
        },
        injectClient: (req, file, inputFile)=>{
            if (!injectClientInitialized) {
                iframeURL = viewerIFrameURL(req);
                injectClientInitialized = true;
            }
            const script = devServerClientScript(port, inputFile, isPresentation, iframeURL);
            const scriptContents = new TextEncoder().encode("\n" + script);
            const fileWithScript = new Uint8Array(file.length + scriptContents.length);
            fileWithScript.set(file);
            fileWithScript.set(scriptContents, file.length);
            return {
                contentType: kTextHtml,
                body: fileWithScript
            };
        },
        reloadClients: async (reloadTarget = "")=>{
            for(let i1 = clients.length - 1; i1 >= 0; i1--){
                const socket = clients[i1].socket;
                try {
                    const message = "reload";
                    await socket.send(`${message}${reloadTarget}`);
                } catch (e) {
                    maybeDisplaySocketError(e);
                } finally{
                    if (!socket.CLOSED && !socket.CLOSING) {
                        try {
                            socket.close();
                        } catch (e1) {
                            maybeDisplaySocketError(e1);
                        }
                    }
                    clients.splice(i1, 1);
                }
            }
        },
        hasClients
    };
}
function devServerClientScript(port, inputFile, isPresentation, iframeURL) {
    const devserver = [
        renderEjs(devserverHtmlResourcePath("core"), {
            localhost: kLocalhost,
            port
        }), 
    ];
    if (isPresentation) {
        devserver.push(renderEjs(devserverHtmlResourcePath("revealjs"), {}));
    } else {
        devserver.push(renderEjs(devserverHtmlResourcePath("viewer"), {
            inputFile: inputFile || ""
        }));
    }
    if (iframeURL) {
        devserver.push(renderEjs(devserverHtmlResourcePath("iframe"), {
            origin: devserverOrigin(iframeURL),
            search: iframeURL.search
        }));
    }
    return devserver.join("\n");
}
function devserverOrigin(iframeURL) {
    if (isRStudioServer()) {
        return iframeURL.searchParams.get("host") || iframeURL.origin;
    } else {
        return iframeURL.origin;
    }
}
function devserverHtmlResourcePath(resource) {
    return resourcePath(`editor/devserver/devserver-${resource}.html`);
}
function viewerIFrameURL(req) {
    for (const url of [
        req.url,
        req.referrer
    ]){
        const isViewer = url && (url.includes("capabilities=") || url.includes("vscodeBrowserReqId=") || url.includes("quartoPreviewReqId="));
        if (isViewer) {
            return new URL(url);
        }
    }
}
class PromiseQueue {
    queue = new Array();
    running = false;
    enqueue(promise, clearPending = false) {
        return new Promise((resolve, reject)=>{
            if (clearPending) {
                this.queue.splice(0, this.queue.length);
            }
            this.queue.push({
                promise,
                resolve,
                reject
            });
            this.dequeue();
        });
    }
    isRunning() {
        return this.running;
    }
    dequeue() {
        if (this.running) {
            return false;
        }
        const item = this.queue.shift();
        if (!item) {
            return false;
        }
        try {
            this.running = true;
            item.promise().then((value)=>{
                this.running = false;
                item.resolve(value);
                this.dequeue();
            }).catch((err)=>{
                this.running = false;
                item.reject(err);
                this.dequeue();
            });
        } catch (err) {
            this.running = false;
            item.reject(err);
            this.dequeue();
        }
        return true;
    }
}
const kPdfJsDefaultFile = "compressed.tracemonkey-pldi-09.pdf";
const kPdfJsViewerToolbarButtonSelector = `.toolbarButton,
.dropdownToolbarButton,
.secondaryToolbarButton,
.overlayButton {`;
const kPdfJsViewerSidebarTransitionDurationPattern = /(--sidebar-transition-duration: )(\d+ms)/;
const kPdfJsInitialPath = "web/viewer.html";
function pdfJsBaseDir() {
    return formatResourcePath("pdf", "pdfjs");
}
function pdfJsFileHandler(pdfFile, htmlHandler) {
    let isViewer;
    return async (file, req)=>{
        if (isViewer === undefined) {
            isViewer = !!viewerIFrameURL(req);
        }
        if (htmlHandler) {
            const contents = await htmlHandler(file, req);
            if (contents) {
                return contents;
            }
        }
        const previewPath = (dir, file)=>{
            return pathWithForwardSlashes(join3(pdfJsBaseDir(), dir, file));
        };
        if (file === previewPath("web", "viewer.js")) {
            let viewerJs = Deno.readTextFileSync(file).replace(kPdfJsDefaultFile, basename2(pdfFile()));
            if (isViewer) {
                viewerJs = viewerJs.replace("sidebarView: sidebarView", "sidebarView: _ui_utils.SidebarView.NONE");
            }
            return {
                contentType: contentType(file),
                body: new TextEncoder().encode(viewerJs)
            };
        } else if (file == previewPath("web", "viewer.css")) {
            const viewerCss = normalizeNewlines(Deno.readTextFileSync(file)).replace(kPdfJsViewerToolbarButtonSelector, kPdfJsViewerToolbarButtonSelector + "\n  z-index: 199;").replace(kPdfJsViewerSidebarTransitionDurationPattern, "$1 0");
            return {
                contentType: contentType(file),
                body: new TextEncoder().encode(viewerCss)
            };
        } else if (file === previewPath("build", "pdf.worker.js")) {
            const filePathHash = "quarto-preview-pdf-" + md5Hash(pdfFile());
            const workerJs = Deno.readTextFileSync(file).replace(/(key: "fingerprint",\s+get: function get\(\) {\s+)(var hash;)/, `$1return "${filePathHash}"; $2`);
            return {
                contentType: contentType(file),
                body: new TextEncoder().encode(workerJs)
            };
        } else if (file === previewPath("web", basename2(pdfFile()))) {
            return {
                contentType: contentType(file),
                body: Deno.readFileSync(pdfFile())
            };
        }
    };
}
function watchForFileChanges(files, pollingInterval) {
    const fileList = ()=>{
        if (Array.isArray(files)) {
            return files;
        } else {
            return files();
        }
    };
    const lastModified = new Map();
    fileList().forEach((file)=>lastModified.set(file, existsSync(file) ? Deno.statSync(file).mtime : null));
    if (!pollingInterval) {
        pollingInterval = Math.max(200, lastModified.size);
    }
    let stop = false;
    return {
        close: ()=>{
            stop = true;
        },
        async *[Symbol.asyncIterator] () {
            try {
                while(!stop){
                    await sleep(pollingInterval);
                    const created = [];
                    const modified = [];
                    const currentFiles = fileList();
                    for(let i1 = 0; i1 < currentFiles.length; i1++){
                        const file = currentFiles[i1];
                        if (existsSync(file)) {
                            const prevMod = lastModified.get(file);
                            const lastMod = Deno.statSync(file).mtime;
                            lastModified.set(file, lastMod);
                            if (!prevMod) {
                                created.push(file);
                            } else if (lastMod?.getTime() !== prevMod?.getTime()) {
                                modified.push(file);
                            }
                        }
                    }
                    if (created.length > 0) {
                        yield {
                            kind: "create",
                            paths: created
                        };
                    }
                    if (modified.length > 0) {
                        yield {
                            kind: "modify",
                            paths: modified
                        };
                    }
                }
            } catch (err) {
                error("Unexpected error while scanning for file changes: " + err.message);
            }
        }
    };
}
async function preview(file, flags, pandocArgs, options) {
    const project = await projectContext(file);
    const format = await previewFormat(file, flags.to, project);
    setPreviewFormat(format, flags, pandocArgs);
    let isRendering = false;
    const render = async ()=>{
        const services = renderServices();
        try {
            isRendering = true;
            return await renderForPreview(file, services, flags, pandocArgs, project);
        } finally{
            isRendering = false;
            services.cleanup();
        }
    };
    const result1 = await render();
    options = {
        ...options,
        ...await resolvePreviewOptions(options)
    };
    const listener = Deno.listen({
        port: options.port,
        hostname: options.host
    });
    const stopServer = ()=>listener.close();
    const reloader = httpDevServer(options.port, options.timeout, ()=>isRendering, stopServer, options.presentation || format === "revealjs");
    const changeHandler = createChangeHandler(result1, reloader, render, options[kProjectWatchInputs]);
    const handler = isPdfContent(result1.outputFile) ? pdfFileRequestHandler(result1.outputFile, Deno.realPathSync(file), flags, result1.format, options.port, reloader, changeHandler.render) : project ? projectHtmlFileRequestHandler(project, Deno.realPathSync(file), flags, result1.format, reloader, changeHandler.render) : htmlFileRequestHandler(result1.outputFile, Deno.realPathSync(file), flags, result1.format, reloader, changeHandler.render);
    const initialPath = isPdfContent(result1.outputFile) ? kPdfJsInitialPath : project ? pathWithForwardSlashes(relative2(projectOutputDir(project), result1.outputFile)) : "";
    if (options.browser && !isRStudioServer() && !isRStudioWorkbench() && !isJupyterHubServer() && isBrowserPreviewable(result1.outputFile)) {
        await openUrl(previewURL(options.host, options.port, initialPath));
    }
    await printBrowsePreviewMessage(options.host, options.port, initialPath);
    monitorPreviewTerminationConditions(stopServer);
    for await (const conn of listener){
        (async ()=>{
            try {
                for await (const { request , respondWith  } of Deno.serveHttp(conn)){
                    await respondWith(handler(request));
                }
            } catch (err) {
                warning(err.message);
                try {
                    conn.close();
                } catch  {}
            }
        })();
    }
}
function isPreviewRenderRequest(req) {
    if (req.url.includes(kQuartoRenderCommand)) {
        return true;
    } else {
        const token = renderToken();
        if (token) {
            return req.url.includes(token);
        } else {
            return false;
        }
    }
}
function isPreviewTerminateRequest(req) {
    const kTerminateToken = "4231F431-58D3-4320-9713-994558E4CC45";
    return req.url.includes(kTerminateToken);
}
function previewRenderRequest(req, hasClients, baseDir) {
    const match = req.url.match(new RegExp(`/${kQuartoRenderCommand}/(.*)$`));
    if (match && baseDir) {
        return {
            version: 1,
            path: join3(baseDir, match[1])
        };
    } else {
        const token = renderToken();
        if (token && req.url.includes(token)) {
            const url = new URL(req.url);
            const path = url.searchParams.get("path");
            if (path) {
                if (hasClients) {
                    return {
                        version: 2,
                        path,
                        format: url.searchParams.get("format") || undefined
                    };
                }
            }
        }
    }
}
async function previewRenderRequestIsCompatible(request, flags, project) {
    if (request.version === 1) {
        return true;
    } else {
        const format = await previewFormat(request.path, request.format, project);
        return format === flags.to;
    }
}
async function previewFormat(file, format, project) {
    format = format || Object.keys(await renderFormats(file, "all", project))[0] || "html";
    return format;
}
function setPreviewFormat(format, flags, pandocArgs) {
    flags.to = format;
    replacePandocArg(pandocArgs, "--to", format);
}
function handleRenderResult(file, renderResult) {
    const finalOutput = renderResultFinalOutput(renderResult, dirname2(file));
    if (!finalOutput) {
        throw new Error("No output created by quarto render " + basename2(file));
    }
    info("Output created: " + finalOutput + "\n");
    return finalOutput;
}
async function renderForPreview(file, services, flags, pandocArgs, project) {
    const renderResult = await render(file, {
        services,
        flags,
        pandocArgs: pandocArgs,
        previewServer: true
    });
    if (renderResult.error) {
        throw renderResult.error;
    }
    const finalOutput = handleRenderResult(file, renderResult);
    printWatchingForChangesMessage();
    file = Deno.realPathSync(file);
    const filesDir = join3(dirname2(file), inputFilesDir(file));
    const resourceFiles = renderResult.files.reduce((resourceFiles, file)=>{
        const resources = file.resourceFiles.concat(cssFileResourceReferences(file.resourceFiles));
        return resourceFiles.concat(resources.filter((resFile)=>!resFile.startsWith(filesDir)));
    }, []);
    const extensionFiles = extensionFilesFromDirs(inputExtensionDirs(file, project?.dir));
    extensionFiles.push(...renderResult.files.reduce((extensionFiles, file)=>{
        const shortcodes = file.format.render.shortcodes || [];
        const filters = (file.format.pandoc.filters || []).map((filter)=>isPandocFilter(filter) ? filter.path : filter);
        const ipynbFilters = file.format.execute["ipynb-filters"] || [];
        [
            ...shortcodes,
            ...filters.map((filter)=>filter),
            ...ipynbFilters
        ].forEach((extensionFile)=>{
            if (!isAbsolute2(extensionFile)) {
                const extensionFullPath = join3(dirname2(file.input), extensionFile);
                if (existsSync(extensionFullPath)) {
                    extensionFiles.push(Deno.realPathSync(extensionFullPath));
                }
            }
        });
        return extensionFiles;
    }, []));
    return {
        file,
        format: renderResult.files[0].format,
        outputFile: join3(dirname2(file), finalOutput),
        extensionFiles,
        resourceFiles
    };
}
function createChangeHandler(result1, reloader, render, renderOnChange) {
    const renderQueue = new PromiseQueue();
    let watcher;
    let lastResult = result1;
    const renderHandler = __VIRTUAL_FILE113(async ()=>{
        try {
            await renderQueue.enqueue(async ()=>{
                const result1 = await render();
                sync(result1);
            }, true);
        } catch (e) {
            if (e.message) {
                if (isJupyterNotebook(result1.file) && e.message.indexOf("Unexpected end of JSON input") !== -1) {
                    return;
                }
                logError(e);
            }
        }
    }, 50);
    const sync = (result1)=>{
        const requiresSync = !watcher || resultRequiresSync(result1, lastResult);
        lastResult = result1;
        if (requiresSync) {
            if (watcher) {
                watcher.stop();
            }
            const watches = [];
            if (renderOnChange) {
                watches.push({
                    files: [
                        result1.file
                    ],
                    handler: renderHandler
                });
            }
            watches.push({
                files: result1.extensionFiles,
                handler: renderHandler
            });
            const reloadFiles = isPdfContent(result1.outputFile) ? pdfReloadFiles(result1) : resultReloadFiles(result1);
            const reloadTarget = isPdfContent(result1.outputFile) ? "/" + kPdfJsInitialPath : "";
            watches.push({
                files: reloadFiles,
                handler: __VIRTUAL_FILE113(async ()=>{
                    await renderQueue.enqueue(async ()=>{
                        await reloader.reloadClients(reloadTarget);
                    });
                }, 50)
            });
            watcher = previewWatcher(watches);
            watcher.start();
        }
    };
    sync(result1);
    return {
        render: renderHandler
    };
}
function previewWatcher(watches) {
    watches = watches.map((watch)=>{
        return {
            ...watch,
            files: watch.files.filter(existsSync).map((file)=>{
                return Deno.realPathSync(file);
            })
        };
    });
    const handlerForFile = (file)=>{
        const watch = watches.find((watch)=>watch.files.includes(file));
        return watch?.handler;
    };
    const files = watches.flatMap((watch)=>watch.files);
    const fsWatcher = watchForFileChanges(files);
    const watchForChanges = async ()=>{
        for await (const event of fsWatcher){
            try {
                if (event.kind === "modify") {
                    const handlers = new Set();
                    event.paths.forEach((path)=>{
                        const handler = handlerForFile(path);
                        if (handler && !handlers.has(handler)) {
                            handlers.add(handler);
                        }
                    });
                    for (const handler of handlers){
                        await handler();
                    }
                }
            } catch (e) {
                logError(e);
            }
        }
    };
    return {
        start: watchForChanges,
        stop: ()=>fsWatcher.close()
    };
}
function projectHtmlFileRequestHandler(context, inputFile, flags, format, reloader, renderHandler) {
    return httpFileRequestHandler(htmlFileRequestHandlerOptions(projectOutputDir(context), "index.html", inputFile, flags, format, reloader, renderHandler));
}
function htmlFileRequestHandler(htmlFile, inputFile, flags, format, reloader, renderHandler) {
    return httpFileRequestHandler(htmlFileRequestHandlerOptions(dirname2(htmlFile), basename2(htmlFile), inputFile, flags, format, reloader, renderHandler));
}
function htmlFileRequestHandlerOptions(baseDir, defaultFile, inputFile, flags, format, reloader, renderHandler) {
    return {
        baseDir,
        defaultFile,
        printUrls: "404",
        onRequest: async (req)=>{
            if (reloader.handle(req)) {
                return Promise.resolve(reloader.connect(req));
            } else if (isPreviewTerminateRequest(req)) {
                exitWithCleanup(0);
            } else if (req.url.endsWith("/quarto-render/")) {
                renderHandler();
                return Promise.resolve(httpContentResponse("rendered"));
            } else if (isPreviewRenderRequest(req)) {
                const outputFile = format.pandoc[kOutputFile];
                const prevReq = previewRenderRequest(req, !isBrowserPreviewable(outputFile) || reloader.hasClients());
                if (prevReq && existsSync(prevReq.path) && Deno.realPathSync(prevReq.path) === Deno.realPathSync(inputFile) && await previewRenderRequestIsCompatible(prevReq, flags)) {
                    renderHandler();
                    return Promise.resolve(httpContentResponse("rendered"));
                } else {
                    return Promise.resolve(previewUnableToRenderResponse());
                }
            } else {
                return Promise.resolve(undefined);
            }
        },
        onFile: async (file, req)=>{
            if (isHtmlContent(file)) {
                if (format.formatPreviewFile) {
                    file = format.formatPreviewFile(file, format);
                }
                const fileContents = await Deno.readFile(file);
                return reloader.injectClient(req, fileContents, inputFile);
            } else if (isTextContent(file)) {
                const html = await textPreviewHtml(file, req);
                const fileContents1 = new TextEncoder().encode(html);
                return reloader.injectClient(req, fileContents1, inputFile);
            }
        }
    };
}
function resultReloadFiles(result1) {
    return [
        result1.outputFile
    ].concat(result1.resourceFiles);
}
function pdfFileRequestHandler(pdfFile, inputFile, flags, format, port, reloader, renderHandler) {
    const pdfOptions = htmlFileRequestHandlerOptions(dirname2(pdfFile), basename2(pdfFile), inputFile, flags, format, reloader, renderHandler);
    pdfOptions.baseDir = pdfJsBaseDir();
    if (pdfOptions.onRequest) {
        const onRequest = pdfOptions.onRequest;
        pdfOptions.onRequest = async (req)=>{
            if (new URL(req.url).pathname === "/") {
                const url = isRStudioWorkbench() ? await rswURL(port, kPdfJsInitialPath) : "/" + kPdfJsInitialPath;
                return Promise.resolve(serveRedirect(url));
            } else {
                return Promise.resolve(onRequest(req));
            }
        };
    }
    pdfOptions.onFile = pdfJsFileHandler(()=>pdfFile, pdfOptions.onFile);
    return httpFileRequestHandler(pdfOptions);
}
function pdfReloadFiles(result1) {
    return [
        result1.outputFile
    ];
}
function resultRequiresSync(result1, lastResult) {
    if (!lastResult) {
        return true;
    }
    return result1.file !== lastResult.file || result1.outputFile !== lastResult.outputFile || !__VIRTUAL_FILE211(result1.extensionFiles, lastResult.extensionFiles) || !__VIRTUAL_FILE211(result1.resourceFiles, lastResult.resourceFiles);
}
async function textPreviewHtml(file, req) {
    const kQuartoPreviewThemeCategory = "quartoPreviewThemeCategory";
    const themeCategory = new URL(req.url).searchParams.get(kQuartoPreviewThemeCategory);
    const darkHighlightStyle = themeCategory && themeCategory !== "light";
    const backgroundColor = darkHighlightStyle ? "rgb(30,30,30)" : "#FFFFFF";
    const frontMatter = [
        "---"
    ];
    frontMatter.push(`pagetitle: "Quarto Preview"`);
    frontMatter.push(`document-css: false`);
    frontMatter.push("---");
    const styles = [
        "```{=html}",
        `<style type="text/css">`,
        `body { margin: 8px 12px; background-color: ${backgroundColor} }`,
        `div.sourceCode { background-color: transparent; }`,
        `</style>`,
        "```", 
    ];
    const lang = (extname2(file) || ".default").slice(1).toLowerCase();
    const kFence = "````````````````";
    const markdown = frontMatter.join("\n") + "\n\n" + styles.join("\n") + "\n\n" + kFence + lang + "\n" + Deno.readTextFileSync(file) + "\n" + kFence;
    const cmd = [
        pandocBinaryPath()
    ];
    cmd.push("--to", "html");
    cmd.push("--highlight-style", textHighlightThemePath("atom-one", darkHighlightStyle ? "dark" : "light"));
    cmd.push("--standalone");
    const result1 = await execProcess({
        cmd,
        stdout: "piped"
    }, markdown);
    if (result1.success) {
        return result1.stdout;
    } else {
        throw new Error();
    }
}
function watchProject(project, extensionDirs, resourceFiles, flags, pandocArgs, options, renderingOnReload, renderManager, stopServer) {
    const refreshProjectConfig = async ()=>{
        project = await projectContext(project.dir, flags, false);
    };
    const projDir = Deno.realPathSync(project.dir);
    const projDirHidden = projDir + "/.";
    const outputDir = projectOutputDir(project);
    const libDirConfig = project.config?.project[kProjectLibDir];
    const libDirSource = libDirConfig ? join3(project.dir, libDirConfig) : undefined;
    const isResourceFile = (path)=>{
        if (libDirSource && path.startsWith(libDirSource)) {
            return false;
        } else {
            return project.files.resources?.includes(path) || resourceFiles.includes(path);
        }
    };
    const isExtensionFile = (path)=>{
        return extensionDirs.some((extensionDir)=>path.startsWith(extensionDir));
    };
    const isInputFile = (path)=>{
        return project.files.input.includes(path);
    };
    const rendered = new Map();
    const handleWatchEvent = async (event)=>{
        try {
            const paths = __VIRTUAL_FILE181(event.paths.filter((path)=>!path.startsWith(projDirHidden)).filter((path)=>outputDir === project.dir || !path.startsWith(outputDir)));
            if (paths.length === 0) {
                return;
            }
            if ([
                "modify",
                "create"
            ].includes(event.kind)) {
                if (options[kProjectWatchInputs]) {
                    const inputs = paths.filter(isInputFile).filter(existsSync).filter((input)=>{
                        return !rendered.has(input) || rendered.get(input) !== md5Hash(Deno.readTextFileSync(input));
                    });
                    if (inputs.length) {
                        const services = renderServices();
                        try {
                            const result1 = await renderManager.renderQueue().enqueue(()=>{
                                if (inputs.length > 1) {
                                    return renderProject(project, {
                                        services,
                                        progress: true,
                                        flags,
                                        pandocArgs,
                                        previewServer: true
                                    }, inputs);
                                } else {
                                    return render(inputs[0], {
                                        services,
                                        flags,
                                        pandocArgs: pandocArgs,
                                        previewServer: true
                                    });
                                }
                            });
                            if (result1.error) {
                                if (result1.error.message) {
                                    logError(result1.error);
                                }
                                return undefined;
                            } else {
                                for (const input of inputs.filter(existsSync)){
                                    rendered.set(input, md5Hash(Deno.readTextFileSync(input)));
                                }
                                renderManager.onRenderResult(result1, extensionDirs, resourceFiles, project);
                                return {
                                    config: false,
                                    output: true,
                                    reloadTarget: result1.files.length && !isPdfContent(result1.files[0].file) ? join3(outputDir, result1.files[0].file) : undefined
                                };
                            }
                        } finally{
                            services.cleanup();
                        }
                    }
                }
                const configFile = paths.some((path)=>(project.files.config || []).includes(path));
                const inputFileRemoved = project.files.input.some((file)=>!existsSync(file));
                const configResourceFile = paths.some((path)=>(project.files.configResources || []).includes(path));
                const resourceFile = paths.some(isResourceFile);
                const extensionFile = paths.some(isExtensionFile);
                const reload = configFile || configResourceFile || resourceFile || extensionFile || inputFileRemoved;
                if (reload) {
                    return {
                        config: configFile || configResourceFile || inputFileRemoved,
                        output: false
                    };
                } else {
                    return;
                }
            } else {
                return;
            }
        } catch (e) {
            logError(e);
            return;
        }
    };
    const devServer = httpDevServer(options.port, options.timeout, ()=>renderManager.renderQueue().isRunning(), stopServer);
    const reloadClients = __VIRTUAL_FILE113(async (changes)=>{
        const services = renderServices();
        try {
            if (!changes.output && !renderingOnReload) {
                await refreshProjectConfig();
                const result1 = await renderManager.renderQueue().enqueue(()=>renderProject(project, {
                        services,
                        useFreezer: true,
                        devServerReload: true,
                        flags,
                        pandocArgs,
                        previewServer: true
                    }));
                if (result1.error) {
                    logError(result1.error);
                } else {
                    renderManager.onRenderResult(result1, extensionDirs, resourceFiles, project);
                }
            }
            if (changes.config) {
                await refreshProjectConfig();
            }
            let reloadTarget = changes.reloadTarget || "";
            if (reloadTarget && await preventReload(project, reloadTarget, options)) {
                return;
            }
            if (reloadTarget && options.navigate) {
                if (reloadTarget.startsWith(outputDir)) {
                    reloadTarget = relative2(outputDir, reloadTarget);
                } else {
                    reloadTarget = relative2(projDir, reloadTarget);
                }
                if (existsSync(join3(outputDir, reloadTarget))) {
                    reloadTarget = "/" + pathWithForwardSlashes(reloadTarget);
                } else {
                    reloadTarget = "";
                }
            } else {
                reloadTarget = "";
            }
            devServer.reloadClients(reloadTarget);
        } catch (e) {
            logError(e);
        } finally{
            services.cleanup();
        }
    }, 100);
    const runWatcher = (watcherOptions)=>{
        const watchPaths = asArray(watcherOptions.paths);
        const watcher = Deno.watchFs(watchPaths, watcherOptions.options);
        const watchForChanges = async ()=>{
            for await (const event of watcher){
                try {
                    if (event.kind === "create" && !watcherOptions.options?.recursive) {
                        event.paths.forEach((path)=>{
                            if (existsSync(path)) {
                                try {
                                    const stat = Deno.statSync(path);
                                    if (stat.isDirectory) {
                                        if (watchPaths.some((p)=>p === dirname2(path))) {
                                            runWatcher({
                                                paths: path,
                                                options: {
                                                    recursive: true
                                                }
                                            });
                                        }
                                    }
                                } catch (e) {
                                    if (e instanceof Deno.errors.NotFound) {
                                        return;
                                    }
                                    throw e;
                                }
                            }
                        });
                    }
                    const result1 = await handleWatchEvent(event);
                    if (result1) {
                        await reloadClients(result1);
                    }
                } catch (e) {
                    logError(e);
                }
            }
        };
        watchForChanges();
    };
    computeWatchers(project).forEach(runWatcher);
    return Promise.resolve({
        handle: (req)=>{
            return devServer.handle(req);
        },
        connect: devServer.connect,
        injectClient: (req, file, inputFile)=>{
            return devServer.injectClient(req, file, inputFile);
        },
        hasClients: ()=>devServer.hasClients(),
        reloadClients: async (output, reloadTarget)=>{
            await reloadClients({
                config: false,
                output,
                reloadTarget
            });
        },
        project: ()=>project,
        refreshProject: async ()=>{
            await refreshProjectConfig();
            return project;
        }
    });
}
function computeWatchers(project) {
    const projectDirs = [];
    for (const walk of walkSync(project.dir, {
        includeDirs: true,
        includeFiles: false,
        maxDepth: 1,
        followSymlinks: false,
        skip: [
            kSkipHidden
        ].concat(engineIgnoreDirs().map((ignore)=>globToRegExp(join3(project.dir, ignore) + SEP)))
    })){
        if (walk.path !== project.dir) {
            projectDirs.push(walk.path);
        }
    }
    if (projectDirs.length <= 30) {
        return [
            {
                paths: project.dir,
                options: {
                    recursive: false
                }
            },
            {
                paths: projectDirs,
                options: {
                    recursive: true
                }
            }
        ];
    } else {
        return [
            {
                paths: project.dir,
                options: {
                    recursive: true
                }
            }
        ];
    }
}
async function preventReload(project, lastHtmlFile, options) {
    if (isRStudio() && !options[kProjectWatchInputs]) {
        const index = await inputTargetIndexForOutputFile(project, relative2(projectOutputDir(project), lastHtmlFile));
        if (index) {
            return isRevealjsOutput(Object.keys(index.formats)[0]);
        }
    }
    return false;
}
class ServeRenderManager {
    renderQueue() {
        return this.renderQueue_;
    }
    fileRequiresReRender(file, inputFile, extensionDirs, resourceFiles, project) {
        const lastRenderHash = this.fileRenders_.get(file);
        if (lastRenderHash) {
            return lastRenderHash !== this.fileRenderHash(file, inputFile, extensionDirs, resourceFiles, project);
        } else {
            return true;
        }
    }
    onRenderResult(result1, extensionDirs, resourceFiles, project) {
        const outputDir = projectOutputDir(project);
        result1.files.forEach((resultFile)=>{
            const file = isAbsolute2(resultFile.file) ? resultFile.file : join3(outputDir, resultFile.file);
            const inputFile = isAbsolute2(resultFile.input) ? resultFile.input : join3(project.dir, resultFile.input);
            this.fileRenders_.set(file, this.fileRenderHash(file, inputFile, extensionDirs, resourceFiles, project));
        });
    }
    fileRenderHash(file, inputFile, extensionDirs, resourceFiles, project) {
        const resourceHash = [
            file,
            inputFile,
            ...resourceFiles,
            ...extensionFilesFromDirs(extensionDirs),
            ...project.files.config || [],
            ...project.files.configResources || [],
            ...project.files.resources || [], 
        ].reduce((hash, file)=>{
            try {
                return hash + Deno.statSync(file).mtime?.toUTCString();
            } catch  {
                return hash;
            }
        }, "");
        if (isJupyterNotebook(inputFile) || !isHtmlContent(file)) {
            return String(Deno.statSync(file).mtime) + String(Deno.statSync(inputFile).mtime) + resourceHash;
        } else {
            return md5Hash(Deno.readTextFileSync(file)) + md5Hash(Deno.readTextFileSync(inputFile)) + resourceHash;
        }
    }
    fileRenders_ = new Map();
    renderQueue_ = new PromiseQueue();
}
async function handleHttpRequests(listener, handler) {
    for await (const conn of listener){
        (async ()=>{
            try {
                for await (const { request , respondWith  } of Deno.serveHttp(conn)){
                    await respondWith(handler(request));
                }
            } catch (err) {
                warning(err.message);
                try {
                    conn.close();
                } catch  {}
            }
        })();
    }
}
const kRenderNone = "none";
const kRenderDefault = "default";
async function serveProject(target, services, flags, pandocArgs, options, noServe) {
    let project;
    if (typeof target === "string") {
        if (target === ".") {
            target = Deno.cwd();
        }
        project = await projectContext(target, flags);
        if (!project || !project?.config) {
            throw new Error(`${target} is not a project`);
        }
    } else {
        project = target;
    }
    acquirePreviewLock(project);
    monitorPreviewTerminationConditions();
    clearProjectIndex(project.dir);
    Deno.env.set("QUARTO_PROJECT_DIR", project.dir);
    options = {
        ...options,
        ...await resolvePreviewOptions(options, project)
    };
    const renderBefore = options.render !== kRenderNone;
    if (renderBefore) {
        renderProgress("Rendering:");
    } else {
        renderProgress("Preparing to preview");
    }
    flags = {
        ...flags,
        ...renderBefore && options.render !== kRenderDefault ? {
            to: options.render
        } : {}
    };
    if (flags.to === undefined) {
        flags.to = kRenderDefault;
    }
    const pdfOutput = isPdfOutput(flags.to || "");
    let files;
    let resourceFiles = [];
    if (!renderBefore) {
        if (pdfOutput) {
            files = project.files.input;
        } else {
            const srvFiles = await serveFiles(project);
            files = srvFiles.files;
            resourceFiles = srvFiles.resourceFiles;
        }
    }
    const renderResult = await renderProject(project, {
        services,
        progress: true,
        useFreezer: !renderBefore,
        flags,
        pandocArgs,
        previewServer: true
    }, files);
    if (renderResult.error) {
        throw renderResult.error;
    }
    resourceFiles.push(...__VIRTUAL_FILE181(renderResult.files.flatMap((file)=>file.resourceFiles)));
    const extensionDirs = projectExtensionDirs(project);
    const renderManager = new ServeRenderManager();
    renderManager.onRenderResult(renderResult, extensionDirs, resourceFiles, project);
    let stopServer = ()=>{};
    const watcher = await watchProject(project, extensionDirs, resourceFiles, flags, pandocArgs, options, !pdfOutput, renderManager, stopServer);
    printWatchingForChangesMessage();
    const serve = noServe ? false : projectPreviewServe(project) || true;
    const previewServer = serve === false ? await noPreviewServer() : serve === true ? await internalPreviewServer(project, renderResult, renderManager, pdfOutput, watcher, extensionDirs, resourceFiles, flags, pandocArgs, options) : await externalPreviewServer(project, serve, options, renderManager, watcher, extensionDirs, resourceFiles, flags, pandocArgs);
    stopServer = previewServer.stop;
    const path = await previewServer.start();
    if (path !== undefined) {
        printBrowsePreviewMessage(options.host, options.port, path);
        if (options.browser && !isRStudioServer() && !isRStudioWorkbench() && !isJupyterHubServer()) {
            await openUrl(previewURL(options.host, options.port, path));
        }
    }
    onCleanup(stopServer);
    if (options.touchPath) {
        await touch(options.touchPath);
    }
    await previewServer.serve();
}
function noPreviewServer() {
    return Promise.resolve({
        start: ()=>Promise.resolve(undefined),
        serve: ()=>{
            return new Promise(()=>{});
        },
        stop: ()=>{
            return Promise.resolve();
        }
    });
}
function externalPreviewServer(project, serve, options, renderManager, watcher, extensionDirs, resourceFiles, flags, pandocArgs) {
    let controlListener;
    if (renderToken()) {
        const outputDir = projectOutputDir(project);
        const handlerOptions = {
            baseDir: outputDir,
            onRequest: previewControlChannelRequestHandler(project, renderManager, watcher, extensionDirs, resourceFiles, flags, pandocArgs, false)
        };
        const handler = httpFileRequestHandler(handlerOptions);
        const port = findOpenPort();
        controlListener = Deno.listen({
            port,
            hostname: kLocalhost
        });
        handleHttpRequests(controlListener, handler).then(()=>{}).catch((_error)=>{});
        info(`Preview service running (${port})`);
    }
    const cmd = serve.cmd.split(/[\t ]/).map((arg)=>{
        if (arg === "{host}") {
            return options.host || kLocalhost;
        } else if (arg === "{port}") {
            return String(options.port);
        } else {
            return arg;
        }
    });
    if (serve.args) {
        cmd.push(...serve.args);
    }
    const process = Deno.run({
        cmd,
        env: serve.env,
        cwd: projectOutputDir(project),
        stdout: "piped",
        stderr: "piped"
    });
    const readyPattern = new RegExp(serve.ready);
    const multiplexIterator = new MuxAsyncIterator();
    multiplexIterator.add(iterateReader(process.stdout));
    multiplexIterator.add(iterateReader(process.stderr));
    const decoder = new TextDecoder();
    return Promise.resolve({
        start: async ()=>{
            for await (const chunk of multiplexIterator){
                const text = decoder.decode(chunk);
                if (readyPattern.test(text)) {
                    break;
                }
                Deno.stderr.writeSync(chunk);
            }
            return "";
        },
        serve: async ()=>{
            for await (const chunk of multiplexIterator){
                Deno.stderr.writeSync(chunk);
            }
            await process.status();
        },
        stop: ()=>{
            process.kill("SIGTERM");
            process.close();
            if (controlListener) {
                controlListener.close();
            }
            return Promise.resolve();
        }
    });
}
async function internalPreviewServer(project, renderResult, renderManager, pdfOutput, watcher, extensionDirs, resourceFiles, flags, pandocArgs, options) {
    const projType = projectType(project?.config?.project?.[kProjectType]);
    const outputDir = projectOutputDir(project);
    const finalOutput = renderResultFinalOutput(renderResult);
    const pdfOutputFile = finalOutput && pdfOutput ? ()=>{
        const project = watcher.project();
        return join3(dirname2(finalOutput), bookOutputStem(project.dir, project.config) + ".pdf");
    } : undefined;
    const handlerOptions = {
        baseDir: outputDir,
        printUrls: "all",
        onRequest: previewControlChannelRequestHandler(project, renderManager, watcher, extensionDirs, resourceFiles, flags, pandocArgs, isBrowserPreviewable(finalOutput)),
        onFile: async (file, req)=>{
            if (isHtmlContent(file) || isPdfContent(file)) {
                const serveDir = projectOutputDir(watcher.project());
                const filePathRelative = relative2(serveDir, file);
                let inputFile = await inputFileForOutputFile(watcher.project(), filePathRelative);
                if (!inputFile || !existsSync(inputFile)) {
                    inputFile = await inputFileForOutputFile(await watcher.refreshProject(), filePathRelative);
                }
                let result1;
                let renderError;
                if (inputFile) {
                    if (renderManager.fileRequiresReRender(file, inputFile, extensionDirs, resourceFiles, watcher.project())) {
                        const renderFlags = {
                            ...flags,
                            quiet: true
                        };
                        const renderPandocArgs = projType.projectFormatsOnly ? pandocArgs : removePandocToArg(pandocArgs);
                        if (!projType.projectFormatsOnly) {
                            delete renderFlags?.to;
                        }
                        if (renderFlags?.to == "all") {
                            renderFlags.to = isHtmlContent(file) ? "html" : "pdf";
                        }
                        const services = renderServices();
                        try {
                            result1 = await renderManager.renderQueue().enqueue(()=>renderProject(watcher.project(), {
                                    services,
                                    useFreezer: true,
                                    devServerReload: true,
                                    flags: renderFlags,
                                    pandocArgs: renderPandocArgs
                                }, [
                                    inputFile
                                ]));
                            if (result1.error) {
                                logError(result1.error);
                                renderError = result1.error;
                            } else {
                                renderManager.onRenderResult(result1, extensionDirs, resourceFiles, project);
                            }
                        } catch (e) {
                            logError(e);
                            renderError = e;
                        } finally{
                            services.cleanup();
                        }
                    }
                }
                const fileContents = renderError ? renderErrorPage(renderError) : Deno.readFileSync(file);
                if (isHtmlContent(file) && inputFile) {
                    const projInputFile = join3(project.dir, relative2(watcher.project().dir, inputFile));
                    return watcher.injectClient(req, fileContents, projInputFile);
                } else {
                    return {
                        contentType: contentType(file),
                        body: fileContents
                    };
                }
            } else {
                return undefined;
            }
        },
        on404: (url, req)=>{
            const print = !basename2(url).startsWith("jupyter-");
            let body = new TextEncoder().encode("Not Found");
            const custom404 = join3(outputDir, kProject404File);
            if (existsSync(custom404)) {
                let content404 = Deno.readTextFileSync(custom404);
                const sitePath = websitePath(project?.config);
                if (sitePath !== "/" || isRStudioServer()) {
                    let replacePath = "/";
                    const referer = req.headers.get("referer");
                    if (isRStudioServer() && referer) {
                        const match = referer.match(/\/p\/.*?\//);
                        if (match) {
                            replacePath = match[0];
                        }
                    }
                    content404 = content404.replaceAll(new RegExp('((?:content|ref|src)=")(' + sitePath + ")", "g"), "$1" + replacePath);
                }
                body = new TextEncoder().encode(content404);
            }
            return {
                print,
                response: watcher.injectClient(req, body)
            };
        }
    };
    if (finalOutput && pdfOutput) {
        handlerOptions.baseDir = pdfJsBaseDir();
        handlerOptions.onFile = pdfJsFileHandler(pdfOutputFile, async (file, req)=>{
            if (isHtmlContent(file)) {
                const fileContents = await Deno.readFile(file);
                return watcher.injectClient(req, fileContents);
            } else {
                return undefined;
            }
        });
    }
    const handler = httpFileRequestHandler(handlerOptions);
    let browserPath = options.browserPath ? options.browserPath.replace(/^\//, "") : undefined;
    if (browserPath) {
        const browserPathTarget = await resolveInputTarget(project, browserPath, false);
        if (browserPathTarget) {
            browserPath = browserPathTarget.outputHref;
        }
    }
    const targetPath = browserPath ? browserPath : pdfOutput ? kPdfJsInitialPath : renderResultUrlPath(renderResult);
    const path = targetPath && targetPath !== "index.html" ? targetPath : "";
    const listener = Deno.listen({
        port: options.port,
        hostname: options.host
    });
    return {
        start: ()=>Promise.resolve(path),
        serve: async ()=>{
            await handleHttpRequests(listener, handler);
        },
        stop: ()=>{
            listener.close();
            return Promise.resolve();
        }
    };
}
function previewControlChannelRequestHandler(project, renderManager, watcher, extensionDirs, resourceFiles, flags, pandocArgs, requireActiveClient) {
    return async (req)=>{
        if (watcher.handle(req)) {
            return await watcher.connect(req);
        } else if (isPreviewTerminateRequest(req)) {
            exitWithCleanup(0);
        } else if (isPreviewRenderRequest(req)) {
            const prevReq = previewRenderRequest(req, requireActiveClient ? watcher.hasClients() : true, project.dir);
            if (prevReq && await previewRenderRequestIsCompatible(prevReq, flags, project)) {
                if (isProjectInputFile(prevReq.path, project)) {
                    const services = renderServices();
                    const to = flags.to === "all" ? prevReq.format || "html" : flags.to;
                    render(prevReq.path, {
                        services,
                        flags: {
                            ...flags,
                            to
                        },
                        pandocArgs,
                        previewServer: true
                    }).then((result1)=>{
                        if (result1.error) {
                            if (result1.error?.message) {
                                logError(result1.error);
                            }
                        } else {
                            const finalOutput = renderResultFinalOutput(result1, dirname2(prevReq.path));
                            if (!finalOutput) {
                                throw new Error("No output created by quarto render " + basename2(prevReq.path));
                            }
                            renderManager.onRenderResult(result1, extensionDirs, resourceFiles, watcher.project());
                            info("Output created: " + finalOutput + "\n");
                            printWatchingForChangesMessage();
                            watcher.reloadClients(true, !isPdfContent(finalOutput) ? join3(dirname2(prevReq.path), finalOutput) : undefined);
                        }
                    }).finally(()=>{
                        services.cleanup();
                    });
                    return httpContentResponse("rendered");
                } else if (extname2(prevReq.path) === ".md" && projectPreviewServe(project)) {
                    return httpContentResponse("rendered");
                } else {
                    return previewUnableToRenderResponse();
                }
            } else {
                return previewUnableToRenderResponse();
            }
        } else {
            return undefined;
        }
    };
}
function sleepSync(timeout) {
    const sab = new SharedArrayBuffer(1024);
    const int32 = new Int32Array(sab);
    Atomics.wait(int32, 0, 0, timeout);
}
function acquirePreviewLock(project) {
    const lockfile = previewLockFile(project);
    if (existsSync(lockfile)) {
        const pid = parseInt(Deno.readTextFileSync(lockfile)) || undefined;
        if (pid) {
            info(bold1(blue1("Terminating existing preview server....")), {
                newline: false
            });
            try {
                Deno.kill(pid, "SIGTERM");
                sleepSync(3000);
            } catch  {} finally{
                info(bold1(blue1("DONE\n")));
            }
        }
    }
    Deno.writeTextFileSync(lockfile, String(Deno.pid));
    onCleanup(()=>releasePreviewLock(project));
}
function releasePreviewLock(project) {
    try {
        Deno.removeSync(previewLockFile(project));
    } catch  {}
}
function previewLockFile(project) {
    return projectScratchPath(project.dir, join3("preview", "lock"));
}
function renderErrorPage(e) {
    const content = `
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Quarto Render Error</title>
<script id="quarto-render-error" type="text/plain">${e.message}</script>
</head>
<body>
</body>
</html>
`;
    return new TextEncoder().encode(content);
}
async function serveFiles(project) {
    await initDenoDom();
    const files = [];
    const resourceFiles = [];
    for(let i1 = 0; i1 < project.files.input.length; i1++){
        const inputFile = project.files.input[i1];
        const projRelative = relative2(project.dir, inputFile);
        const target = await resolveInputTarget(project, projRelative, false);
        if (target) {
            const outputFile = join3(projectOutputDir(project), target?.outputHref);
            if (isModifiedAfter(inputFile, outputFile)) {
                files.push(inputFile);
            } else {
                const files1 = [];
                if (isHtmlContent(outputFile)) {
                    const htmlInput = Deno.readTextFileSync(outputFile);
                    const doc = new DOMParser().parseFromString(htmlInput, "text/html");
                    const resolver = htmlResourceResolverPostprocessor(inputFile, project);
                    files1.push(...(await resolver(doc)).resources);
                }
                const partitioned = await partitionedMarkdownForInput(project.dir, projRelative);
                const globs = [];
                if (partitioned?.yaml) {
                    const metadata = partitioned.yaml;
                    globs.push(...resourcesFromMetadata(metadata[kResources]));
                }
                resourceFiles.push(...await resourceFilesFromFile(project.dir, projectExcludeDirs(project), projRelative, {
                    files: files1,
                    globs
                }, false, [
                    join3(dirname2(projRelative), inputFilesDir(projRelative))
                ], partitioned));
            }
        } else {
            warning("Unabled to resolve output target for " + inputFile);
        }
    }
    return {
        files,
        resourceFiles: __VIRTUAL_FILE181(resourceFiles)
    };
}
const previewCommand = new Command().name("preview").stopEarly().option("--port [port:number]", "Suggested port to listen on (defaults to random value between 3000 and 8000).\n" + "If the port is not available then a random port between 3000 and 8000 will be selected.").option("--host [host:string]", "Hostname to bind to (defaults to 127.0.0.1)").option("--render [format:string]", "Render to the specified format(s) before previewing", {
    default: kRenderNone
}).option("--no-serve", "Don't run a local preview web server (just monitor and re-render input files)").option("--no-navigate", "Don't navigate the browser automatically when outputs are updated.").option("--no-browser", "Don't open a browser to preview the site.").option("--no-watch-inputs", "Do not re-render input files when they change.").option("--timeout", "Time (in seconds) after which to exit if there are no active clients.").arguments("[file:string] [...args:string]").description("Render and preview a document or website project.\n\nAutomatically reloads the browser when" + "input files or document resources (e.g. CSS) change.\n\n" + "For website preview, the most recent execution results of computational documents are used to render\n" + "the site (this is to optimize startup time). If you want to perform a full render prior to\n" + 'previewing pass the --render option with "all" or a comma-separated list of formats to render.\n\n' + "For document preview, input file changes will result in a re-render (pass --no-watch to prevent).\n\n" + "You can also include arbitrary command line arguments to be forwarded to " + bold1("quarto render") + ".").example("Preview document", "quarto preview doc.qmd").example("Preview document with render command line args", "quarto preview doc.qmd --toc").example("Preview document (don't watch for input changes)", "quarto preview doc.qmd --no-watch-inputs").example("Preview website with most recent execution results", "quarto preview").example("Previewing website using a specific port", "quarto preview --port 4444").example("Preview website (don't open a browser)", "quarto preview --no-browser").example("Fully render all website/book formats then preview", "quarto preview --render all").example("Fully render the html format then preview", "quarto preview --render html").action(async (options, file, args)=>{
    setInitializer(initYamlIntelligenceResourcesFromFilesystem);
    await initState();
    file = file || Deno.cwd();
    if (!existsSync(file)) {
        throw new Error(`${file} not found`);
    }
    args = args || [];
    if (args.length > 0 && args[0] === "--help") {
        previewCommand.showHelp();
        return;
    }
    const portPos = args.indexOf("--port");
    if (portPos !== -1) {
        options.port = parseInt(args[portPos + 1]);
        args.splice(portPos, 2);
    }
    const hostPos = args.indexOf("--host");
    if (hostPos !== -1) {
        options.host = String(args[hostPos + 1]);
        args.splice(hostPos, 2);
    }
    const renderPos = args.indexOf("--render");
    if (renderPos !== -1) {
        options.render = String(args[renderPos + 1]);
        args.splice(renderPos, 2);
    }
    const presentationPos = args.indexOf("--presentation");
    if (presentationPos !== -1) {
        options.presentation = true;
        args.splice(presentationPos, 1);
    } else {
        options.presentation = false;
    }
    const browserPathPos = args.indexOf("--browser-path");
    if (browserPathPos !== -1) {
        options.browserPath = String(args[browserPathPos + 1]);
        args.splice(browserPathPos, 2);
    }
    const noServePos = args.indexOf("--no-serve");
    if (noServePos !== -1) {
        options.noServe = true;
        args.splice(noServePos, 1);
    }
    const noBrowsePos = args.indexOf("--no-browse");
    if (noBrowsePos !== -1) {
        options.browse = false;
        args.splice(noBrowsePos, 1);
    }
    const noBrowserPos = args.indexOf("--no-browser");
    if (noBrowserPos !== -1) {
        options.browser = false;
        args.splice(noBrowserPos, 1);
    }
    const navigatePos = args.indexOf("--navigate");
    if (navigatePos !== -1) {
        options.navigate = true;
        args.splice(navigatePos, 1);
    }
    const noNavigatePos = args.indexOf("--no-navigate");
    if (noNavigatePos !== -1) {
        options.navigate = false;
        args.splice(noNavigatePos, 1);
    }
    const watchInputsPos = args.indexOf("--watch-inputs");
    if (watchInputsPos !== -1) {
        options.watchInputs = true;
        args.splice(watchInputsPos, 1);
    }
    const noWatchInputsPos = args.indexOf("--no-watch-inputs");
    if (noWatchInputsPos !== -1) {
        options.watchInputs = false;
        args.splice(noWatchInputsPos, 1);
    }
    const timeoutPos = args.indexOf("--timeout");
    if (timeoutPos !== -1) {
        options.timeout = parseInt(args[timeoutPos + 1]);
        args.splice(timeoutPos, 2);
    }
    const noWatchPos = args.indexOf("--no-watch");
    if (noWatchPos !== -1) {
        options.watchInputs = false;
        args.splice(noWatchPos, 1);
    }
    const noRenderPos = args.indexOf("--no-render");
    if (noRenderPos !== -1) {
        options.watchInputs = false;
        args.splice(noRenderPos, 1);
    }
    if (options.port) {
        const port = parseInt(options.port);
        if (await waitForPort({
            port,
            hostname: kLocalhost
        })) {
            options.port = port;
        } else {
            throw new Error(`Requested port ${options.port} is already in use.`);
        }
    }
    const flags = await parseRenderFlags(args);
    args = fixupPandocArgs(args, flags);
    let touchPath;
    let projectTarget = file;
    if (Deno.statSync(file).isFile) {
        const project = await projectContext(dirname2(file));
        if (project && projectIsServeable(project)) {
            const format = await previewFormat(file, flags.to, project);
            const filePath = Deno.realPathSync(file);
            if (!project.files.input.includes(filePath)) {
                if (extname2(file) === ".md" && projectPreviewServe(project)) {
                    setPreviewFormat(format, flags, args);
                    touchPath = filePath;
                    options.browserPath = "";
                    file = project.dir;
                    projectTarget = project;
                }
            } else {
                if (isHtmlOutput(parseFormatString(format).baseFormat, true) || projectPreviewServe(project)) {
                    setPreviewFormat(format, flags, args);
                    const services = renderServices();
                    try {
                        const renderResult = await renderProject(project, {
                            services,
                            progress: false,
                            useFreezer: false,
                            flags,
                            pandocArgs: args,
                            previewServer: true
                        }, [
                            file
                        ]);
                        if (renderResult.error) {
                            throw renderResult.error;
                        }
                        handleRenderResult(file, renderResult);
                        if (projectPreviewServe(project) && renderResult.baseDir) {
                            touchPath = join3(renderResult.baseDir, renderResult.files[0].file);
                        }
                    } finally{
                        services.cleanup();
                    }
                    if (projectPreviewServe(project)) {
                        options.browserPath = "";
                    } else {
                        options.browserPath = relative2(project.dir, file);
                    }
                    file = project.dir;
                    projectTarget = project;
                }
            }
        }
    }
    if (Deno.statSync(file).isDirectory) {
        const services1 = renderServices();
        try {
            await serveProject(projectTarget, services1, flags, args, {
                port: options.port,
                host: options.host,
                browser: options.browser === false || options.browse === false ? false : undefined,
                [kProjectWatchInputs]: options.watchInputs,
                timeout: options.timeout,
                render: options.render,
                touchPath,
                browserPath: options.browserPath,
                navigate: options.navigate
            }, options.noServe === true);
        } finally{
            services1.cleanup();
        }
    } else {
        if (options.render !== kRenderNone && options.render !== kRenderDefault && args.indexOf("--to") === -1) {
            args.push("--to", options.render);
        }
        await preview(relative2(Deno.cwd(), file), flags, args, {
            port: options.port,
            host: options.host,
            browser: options.browser === false || options.browse === false ? false : undefined,
            [kProjectWatchInputs]: options.watchInputs,
            timeout: options.timeout,
            presentation: options.presentation
        });
    }
});
async function markdownToJupyterNotebook(file, includeIds) {
    const markdown = Deno.readTextFileSync(file);
    const notebook = await quartoMdToJupyter(markdown, includeIds);
    return JSON.stringify(notebook, null, 2);
}
async function jupyterNotebookToMarkdown(file, includeIds) {
    const notebook = jupyterFromFile(file);
    const kernelspec = notebook.metadata.kernelspec;
    const md = [];
    let frontMatter;
    for(let i1 = 0; i1 < notebook.cells.length; i1++){
        {
            const cell = notebook.cells[i1];
            switch(cell.cell_type){
                case "markdown":
                    md.push(...mdFromContentCell(cell));
                    break;
                case "raw":
                    if (i1 === 0) {
                        frontMatter = partitionYamlFrontMatter(cell.source.join(""))?.yaml;
                        if (!frontMatter) {
                            md.push(...mdFromRawCell(cell));
                        }
                    } else {
                        md.push(...mdFromRawCell(cell));
                    }
                    break;
                case "code":
                    md.push(...await mdFromCodeCell1(kernelspec.language.toLowerCase(), cell, includeIds));
                    break;
                default:
                    throw new Error("Unexpected cell type " + cell.cell_type);
            }
            if (i1 > 0 || !frontMatter) {
                md.push("\n");
            }
        }
    }
    const mdSource = md.join("");
    const yaml = frontMatter ? readYamlFromMarkdown(frontMatter) : {};
    yaml.jupyter = notebook.metadata.jupytext ? {
        jupytext: notebook.metadata.jupytext,
        kernelspec: notebook.metadata.kernelspec
    } : notebook.metadata.kernelspec.name;
    if (typeof yaml.jupyter === "string") {
        if (!await jupyterKernelspec(yaml.jupyter)) {
            yaml.jupyter = {
                kernelspec: notebook.metadata.kernelspec
            };
        }
    }
    const yamlText = stringify(yaml, {
        indent: 2,
        lineWidth: -1,
        sortKeys: false,
        skipInvalid: true
    });
    return `---\n${yamlText}---\n\n${mdSource}`;
}
async function mdFromCodeCell1(language, cell, includeIds) {
    if (!cell.source.length) {
        return [];
    }
    const md = [
        "```{" + language + "}\n"
    ];
    const { yaml , source  } = await partitionCellOptions(language, cell.source);
    const options = yaml ? yaml : {};
    if (cell.id) {
        if (!includeIds) {
            cell.id = undefined;
        } else if (options[kCellLabel]) {
            const label = String(options[kCellLabel]);
            if (jupyterAutoIdentifier(label) === cell.id) {
                cell.id = undefined;
            }
        }
    }
    let yamlOptions = {};
    if (cell.id) {
        yamlOptions[kCellId] = cell.id;
    }
    yamlOptions = {
        ...cell.metadata,
        ...yaml,
        ...yamlOptions
    };
    if (yamlOptions[kCellId]) {
        md.push(...jupyterCellOptionsAsComment(language, {
            id: yamlOptions[kCellId]
        }));
        delete yamlOptions[kCellId];
    }
    if (yaml) {
        const yamlOutput = {};
        for(const key in yaml){
            const value = yamlOptions[key];
            if (value !== undefined) {
                yamlOutput[key] = value;
                delete yamlOptions[key];
            }
        }
        md.push(...jupyterCellOptionsAsComment(language, yamlOutput));
    }
    const metadataOutput = {};
    for(const key1 in cell.metadata){
        const value1 = cell.metadata[key1];
        if (value1 !== undefined) {
            metadataOutput[key1] = value1;
            delete yamlOptions[key1];
        }
    }
    md.push(...jupyterCellOptionsAsComment(language, metadataOutput, {
        flowLevel: 1
    }));
    md.push(...mdEnsureTrailingNewline(source));
    md.push("```\n");
    return md;
}
const kObservableSiteUrl = "https://observablehq.com/";
const kObservableApiUrl = "https://api.observablehq.com/";
const kFormatHtml = "format: html";
function isObservableUrl(url) {
    return url.startsWith(kObservableSiteUrl) || url.startsWith(kObservableApiUrl);
}
async function observableNotebookToMarkdown(url, output) {
    const originalUrl = url;
    if (url.startsWith(kObservableSiteUrl)) {
        const nbPath = url.slice(kObservableSiteUrl.length).replace(/^d\//, "");
        url = `${kObservableApiUrl}document/${nbPath}`;
    }
    const res = await fetch(url);
    if (res.status === 404) {
        throw new Error(`Convert ${url} failed with error: ${res.statusText}`);
    }
    const body = new Uint8Array(await res.arrayBuffer());
    const json = new TextDecoder().decode(body);
    const nb = JSON.parse(json);
    if ([
        "isc",
        "mit",
        "bsd-3-clause",
        "apache-2.0"
    ].indexOf(nb.license) === -1) {
        throw new Error(`Convert ${url} failed: notebook doesn't have a permissive open-source license`);
    }
    let file = output ? basename2(output) : undefined;
    if (!file) {
        const slug = nb.slug || nb.fork_of?.slug;
        if (typeof slug === "string") {
            file = slug;
        } else if (typeof nb.title === "string") {
            file = pandocAutoIdentifier(nb.title, false);
        } else {
            file = nb.id;
        }
    }
    let outputFile = output;
    let outputDir = output ? dirname2(output) : undefined;
    if (!outputDir) {
        if (nb.files.length > 0) {
            outputDir = file;
        } else {
            outputDir = Deno.cwd();
        }
    }
    if (!outputFile) {
        outputFile = join3(outputDir, file + ".qmd");
    }
    ensureDirSync(outputDir);
    info(`Writing to ${nb.files.length > 0 ? bold1(basename2(outputDir) + "/") : basename2(outputFile)}`);
    const attachments = [];
    for (const file1 of nb.files){
        info("  " + file1.name + " (attachment)");
        const res1 = await fetch(file1.download_url);
        const contents = new Uint8Array(await res1.arrayBuffer());
        const downloadTo = await Deno.create(join3(outputDir, file1.name));
        await writeAll(downloadTo, contents);
        Deno.close(downloadTo.rid);
        attachments.push(file1.name);
    }
    const pinned = nb.nodes.reduce((pinned, node)=>{
        return pinned + (node.pinned ? 1 : 0);
    }, 0);
    const echo = pinned > nb.nodes.length / 2;
    const kModePrefixes = [
        "md",
        "html",
        "tex"
    ].map((prefix)=>({
            prefix,
            re: new RegExp("^" + prefix + "\\s*`((.|\\n)+)`\\s*;?")
        }));
    const lines = [];
    for(let i1 = 0; i1 < nb.nodes.length; i1++){
        const node = nb.nodes[i1];
        let mode = node.mode;
        let value = node.value;
        const trimmedValue = value.trim();
        if (mode === "js") {
            for (const { prefix , re  } of kModePrefixes){
                const m = trimmedValue.match(re);
                if (m) {
                    mode = prefix;
                    value = m[1];
                }
            }
        }
        if (i1 === 0) {
            const skip = consumeFrontMatter(originalUrl, nb.creator, nb.publish_time, nb.license || "unknown", echo, mode, value, nb.nodes[1], lines);
            if (skip > 0) {
                i1 = skip - 1;
                continue;
            }
        }
        switch(mode){
            case "js":
                lines.push("```{ojs}");
                if (node.pinned && !echo) {
                    lines.push("//| echo: true");
                } else if (!node.pinned && echo) {
                    lines.push("//| echo: false");
                }
                lines.push(value);
                lines.push("```");
                break;
            case "md":
                lines.push(value);
                break;
            case "html":
                lines.push("```{=html}");
                lines.push(value);
                lines.push("```");
                break;
            case "tex":
                lines.push("$$");
                lines.push(value);
                lines.push("$$");
                break;
            default:
                warning("Unknown mode: " + mode);
        }
        lines.push("");
    }
    lines.push("");
    if (nb.files.length > 0) {
        info("  " + basename2(outputFile));
    }
    Deno.writeTextFileSync(outputFile, lines.join("\n"));
}
function consumeFrontMatter(url, creator, date, license, echo, mode, value, nextNode, lines) {
    let skip = 0;
    let needFormat = true;
    let title = "";
    let leadingMd = "";
    lines.push("---");
    if (mode === "md") {
        leadingMd = value.replace(/^\s*#\s+(.*)\n?/, (_m, p1)=>{
            title = p1;
            return "";
        }).trim();
        if (title) {
            skip++;
            lines.push('title: "' + title + '"');
            if (nextNode?.mode === "js") {
                const nodeValue = nextNode.value;
                const metaMatch = nodeValue.match(/^\s*\/\*-{3,}\s*([\S\s)]*)\n\-{3,}\*\/\s*$/);
                if (metaMatch) {
                    const yaml = metaMatch[1];
                    if (yaml.includes("format:")) {
                        needFormat = false;
                    }
                    lines.push(yaml);
                    skip++;
                }
            }
        }
    }
    if (creator?.name) {
        lines.push('author: "' + String(creator?.name) + '"');
    }
    if (date) {
        lines.push("date: " + new Date(date).toISOString().slice(0, 10));
    }
    lines.push("license: " + String(license));
    lines.push(`observablehq-url: ${url}`);
    if (needFormat) {
        lines.push(kFormatHtml);
    }
    if (echo == false) {
        lines.push("execute:");
        lines.push("  echo: false");
    }
    lines.push("---");
    lines.push("");
    if (leadingMd) {
        lines.push(leadingMd);
        lines.push("");
    }
    return skip;
}
const kNotebookFormat = "notebook";
const kMarkdownFormat = "markdown";
const convertCommand = new Command().name("convert").arguments("<input:string>").description("Convert documents to alternate representations.").option("-o, --output [path:string]", "Write output to PATH.").option("--with-ids", "Include ids in conversion").example("Convert notebook to markdown", "quarto convert mydocument.ipynb ").example("Convert markdown to notebook", "quarto convert mydocument.qmd").example("Convert notebook to markdown, writing to file", "quarto convert mydocument.ipynb --output mydoc.qmd").action(async (options, input)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    if (isObservableUrl(input)) {
        await observableNotebookToMarkdown(input, options.output);
    } else {
        if (!await exists(input)) {
            throw new Error(`File not found: '${input}'`);
        }
        const srcFormat = isJupyterNotebook(input) ? kNotebookFormat : kMarkdownFormat;
        const withIds = options.withIds === undefined ? false : !!options.withIds;
        const converted = srcFormat === kNotebookFormat ? await jupyterNotebookToMarkdown(input, withIds) : await markdownToJupyterNotebook(input, withIds);
        const [dir, stem] = dirAndStem(input);
        let output = options.output;
        if (!output) {
            output = join3(dir, stem + (srcFormat === kMarkdownFormat ? ".ipynb" : ".qmd"));
        }
        Deno.writeTextFileSync(output, converted);
        info(`Converted to ${output}`);
    }
});
async function runScript(args) {
    const script = args[0];
    if (!script) {
        error("quarto run: no script specified");
        Deno.exit(1);
    }
    if (!existsSync(script)) {
        error("quarto run: script '" + script + "' not found");
        Deno.exit(1);
    }
    const handler = await handlerForScript(script);
    if (!handler) {
        error("quarto run: no handler found for script '" + script + "'");
        Deno.exit(1);
    }
    return await handler.run(script, args.slice(1));
}
const runCommand = new Command().name("run").stopEarly().arguments("[script:string] [...args]").description("Run a TypeScript, R, Python, or Lua script.\n\n" + "Run a utility script written in a variety of languages. For details, see:\n" + "https://quarto.org/docs/projects/quarto-projects.html#periodic-scripts");
const pandocCommand = new Command().name("pandoc").stopEarly().arguments("[...args]").description("Run the version of Pandoc embedded within Quarto.\n\n" + "You can pass arbitrary command line arguments to quarto pandoc (they will\n" + "be passed through unmodified to Pandoc)").example("Render markdown to HTML", "quarto pandoc document.md --to html --output document.html").example("List Pandoc output formats", "quarto pandoc --list-output-formats");
async function capabilities() {
    const caps = {
        formats: await formats(),
        themes: await themes(),
        python: await jupyterCapabilities()
    };
    if (caps.python) {
        const pythonEx = caps.python;
        if (pythonEx.jupyter_core) {
            pythonEx.kernels = Array.from((await jupyterKernelspecs()).values());
        }
        pythonEx.venv = !pythonEx.conda;
    }
    return caps;
}
async function formats() {
    const formats = await pandocListFormats();
    const commonFormats = [
        "html",
        "pdf",
        "docx",
        "odt",
        "pptx",
        "beamer",
        "revealjs",
        "gfm",
        "epub", 
    ];
    const excludedFormats = [
        "bibtex",
        "biblatex",
        "csljson", 
    ];
    return __VIRTUAL_FILE137(commonFormats.concat(__VIRTUAL_FILE137(formats, commonFormats)), excludedFormats);
}
async function themes() {
    const themesPath = formatResourcePath("html", join3("bootstrap", "themes"));
    const themes = [
        "default"
    ];
    const kScss = ".scss";
    for await (const dirEntry of Deno.readDir(themesPath)){
        if (dirEntry.isFile && dirEntry.name.endsWith(kScss)) {
            themes.push(basename2(dirEntry.name, kScss));
        }
    }
    return themes;
}
const capabilitiesCommand = new Command().name("capabilities").description("Query for current capabilities (formats, engines, kernels etc.)").hidden().action(async ()=>{
    const capsJSON = JSON.stringify(await capabilities(), undefined, 2);
    writeAllSync(Deno.stdout, new TextEncoder().encode(capsJSON));
});
const kIndent = "      ";
async function check(target) {
    const services = renderServices();
    try {
        info("");
        if (target === "install" || target === "all") {
            await checkInstall(services);
        }
        if (target === "jupyter" || target === "all") {
            await checkJupyterInstallation(services);
        }
        if (target === "knitr" || target === "all") {
            await checkKnitrInstallation(services);
        }
    } finally{
        services.cleanup();
    }
}
async function checkInstall(services) {
    completeMessage("Checking Quarto installation......OK");
    info(`      Version: ${quartoConfig.version()}`);
    info(`      Path: ${quartoConfig.binPath()}`);
    if (Deno.build.os === "windows") {
        try {
            const codePage = readCodePage();
            info(`      CodePage: ${codePage || "unknown"}`);
        } catch  {
            info(`      CodePage: Unable to read code page`);
        }
    }
    info("");
    const kMessage = "Checking basic markdown render....";
    await withSpinner({
        message: kMessage,
        doneMessage: kMessage + "OK\n"
    }, async ()=>{
        const mdPath = services.temp.createFile({
            suffix: "check.md"
        });
        Deno.writeTextFileSync(mdPath, `
---
title: "Title"
---

## Header
`);
        const result1 = await render(mdPath, {
            services,
            flags: {
                quiet: true
            }
        });
        if (result1.error) {
            throw result1.error;
        }
    });
}
async function checkJupyterInstallation(services) {
    const kMessage = "Checking Python 3 installation....";
    let caps;
    await withSpinner({
        message: kMessage,
        doneMessage: false
    }, async ()=>{
        caps = await jupyterCapabilities();
    });
    if (caps) {
        completeMessage(kMessage + "OK");
        info(await jupyterCapabilitiesMessage(caps, kIndent));
        info("");
        if (caps.jupyter_core) {
            if (await jupyterKernelspecForLanguage("python")) {
                const kJupyterMessage = "Checking Jupyter engine render....";
                await withSpinner({
                    message: kJupyterMessage,
                    doneMessage: kJupyterMessage + "OK\n"
                }, async ()=>{
                    await checkJupyterRender(services);
                });
            } else {
                info(kIndent + "NOTE: No Jupyter kernel for Python found");
                info("");
            }
        } else {
            info(jupyterInstallationMessage(caps, kIndent));
            info("");
            const envMessage = jupyterUnactivatedEnvMessage(caps, kIndent);
            if (envMessage) {
                info(envMessage);
                info("");
            }
        }
    } else {
        completeMessage(kMessage + "(None)\n");
        info(pythonInstallationMessage(kIndent));
        info("");
    }
}
async function checkJupyterRender(services) {
    const qmdPath = services.temp.createFile({
        suffix: "check.qmd"
    });
    Deno.writeTextFileSync(qmdPath, `
---
title: "Title"
---

## Header

\`\`\`{python}
1 + 1
\`\`\`
`);
    const result1 = await render(qmdPath, {
        services,
        flags: {
            quiet: true,
            executeDaemon: 0
        }
    });
    if (result1.error) {
        throw result1.error;
    }
}
async function checkKnitrInstallation(services) {
    const kMessage = "Checking R installation...........";
    let caps;
    await withSpinner({
        message: kMessage,
        doneMessage: false
    }, async ()=>{
        caps = await knitrCapabilities();
    });
    if (caps) {
        completeMessage(kMessage + "OK");
        info(knitrCapabilitiesMessage(caps, kIndent));
        info("");
        if (caps.rmarkdown) {
            const kKnitrMessage = "Checking Knitr engine render......";
            await withSpinner({
                message: kKnitrMessage,
                doneMessage: kKnitrMessage + "OK\n"
            }, async ()=>{
                await checkKnitrRender(services);
            });
        } else {
            info(knitrInstallationMessage(kIndent));
            info("");
        }
    } else {
        completeMessage(kMessage + "(None)\n");
        info(rInstallationMessage(kIndent));
        info("");
    }
}
async function checkKnitrRender(services) {
    const rmdPath = services.temp.createFile({
        suffix: "check.rmd"
    });
    Deno.writeTextFileSync(rmdPath, `
---
title: "Title"
---

## Header

\`\`\`{r}
1 + 1
\`\`\`
`);
    const result1 = await render(rmdPath, {
        services,
        flags: {
            quiet: true
        }
    });
    if (result1.error) {
        throw result1.error;
    }
}
const kTargets = [
    "install",
    "jupyter",
    "knitr",
    "all"
];
const checkCommand = new Command().name("check").arguments("[target:string]").description("Verify correct functioning of Quarto installation.\n\n" + "Check specific functionality with argument install, jupyter, knitr, or all.").example("Check Quarto installation", "quarto check install").example("Check Jupyter engine", "quarto check jupyter").example("Check Knitr engine", "quarto check knitr").example("Check installation and all engines", "quarto check all").action(async (_options, target)=>{
    target = target || "all";
    if (!kTargets.includes(target)) {
        error("Invalid target '" + target + "' (valid targets are " + kTargets.join(", ") + ").");
    }
    await check(target);
});
function isDocumentConfig(config) {
    return config.formats !== undefined;
}
async function inspectConfig(path) {
    path = path || Deno.cwd();
    if (!existsSync(path)) {
        throw new Error(`${path} not found`);
    }
    let version = quartoConfig.version();
    if (version === kLocalDevelopment) {
        version = "99.9.9";
    }
    const context = await projectContext(path);
    const inspectedProjectConfig = ()=>{
        if (context?.config) {
            const config = {
                quarto: {
                    version
                },
                dir: context.dir,
                engines: context.engines,
                config: context.config,
                files: context.files
            };
            return config;
        } else {
            return undefined;
        }
    };
    const stat = Deno.statSync(path);
    if (stat.isDirectory) {
        const config = inspectedProjectConfig();
        if (config) {
            return config;
        } else {
            throw new Error(`${path} is not a quarto project.`);
        }
    } else {
        const engine = fileExecutionEngine(path);
        if (engine) {
            const partitioned = await engine.partitionedMarkdown(path);
            const formats = await renderFormats(path);
            const resourceConfig = Object.values(formats).reduce((resources, format)=>{
                resources = uniq1(resources.concat(resourcesFromMetadata(format.metadata[kResources])));
                if (format.pandoc[kCss]) {
                    return __VIRTUAL_FILE181(resources.concat(resourcesFromMetadata(format.pandoc[kCss])));
                } else {
                    return resources;
                }
            }, []);
            const context1 = await projectContext(path);
            const fileDir = Deno.realPathSync(dirname2(path));
            const excludeDirs = context1 ? projectExcludeDirs(context1) : [];
            const resources = await resolveResources(context1 ? context1.dir : fileDir, fileDir, excludeDirs, partitioned.markdown, resourceConfig);
            const extensions = join3(fileDir, kExtensionDir);
            if (safeExistsSync(extensions)) {
                resources.push(...extensionFilesFromDirs([
                    extensions
                ]).map((file)=>relative2(fileDir, file)));
            }
            const config1 = {
                quarto: {
                    version
                },
                engines: [
                    engine.name
                ],
                formats,
                resources
            };
            if (context1?.config) {
                config1.project = inspectedProjectConfig();
            }
            return config1;
        } else {
            throw new Error(`${path} is not a valid Quarto input document`);
        }
    }
}
async function resolveResources(rootDir, fileDir, excludeDirs, markdown, globs) {
    const resolved = await resolveFileResources(rootDir, fileDir, excludeDirs, markdown, globs);
    const resources = __VIRTUAL_FILE137(resolved.include, resolved.exclude);
    const allResources = resources.concat(cssFileResourceReferences(resources));
    return allResources.map((file)=>relative2(rootDir, file));
}
const inspectCommand = new Command().name("inspect").arguments("[path:string]").description("Inspect a Quarto project or input path.\n\nInspecting a project returns its config and engines.\n" + "Inspecting an input path return its formats, engine, and dependent resources.\n\n" + "Emits results of inspection as JSON to stdout.").hidden().example("Inspect project in current directory", "quarto inspect").example("Inspect project in directory", "quarto inspect myproject").example("Inspect input path", "quarto inspect document.md").action(async (_options, path)=>{
    setInitializer(initYamlIntelligenceResourcesFromFilesystem);
    await initState();
    path = path || Deno.cwd();
    const config = await inspectConfig(path);
    const output = JSON.stringify(config, undefined, 2);
    Deno.stdout.writeSync(new TextEncoder().encode(output + "\n"));
});
let schemaResourcesLoaded = false;
async function ensureSchemaResources() {
    if (!schemaResourcesLoaded) {
        schemaResourcesLoaded = true;
        const resources = {};
        for (const walk of expandGlobSync(resourcePath("schema/*.yml"))){
            resources[`schema/${walk.name}`] = readYaml(walk.path);
        }
        resources[`pandoc/formats.yml`] = await pandocListFormats();
        setYamlIntelligenceResources(resources);
        await loadDefaultSchemaDefinitions();
    }
}
async function generateTypesFromSchemas(resourcePath) {
    const definitionsSchema = parse3(Deno.readTextFileSync(join3(resourcePath, "/schema/definitions.yml")));
    const projectSchema = parse3(Deno.readTextFileSync(join3(resourcePath, "/schema/project.yml")));
    const schemas = [];
    for (const definition of definitionsSchema){
        schemas.push({
            name: capitalizeWord(toCapitalizationCase(definition.id)),
            schema: definition
        });
    }
    schemas.push({
        name: "ProjectConfig",
        schema: projectSchema[0]
    }, {
        name: "BookProject",
        schema: projectSchema[2]
    });
    const autoGeneratedTypes = [
        `// This file is automatically generated by \`quarto build-js\`! Do not edit.",
//
// If you find yourself trying to rebuild types and \`quarto build-js\` won't run because
// of bad type definitions, run the following:
// $ cd $QUARTO_ROOT
// $ ./package/dist/bin/tools/deno run --importmap=./src/dev_import_map.json --allow-all ./package/src/common/create-schema-types.ts ./src/resources

export type MaybeArrayOf<T> = (T | T[]);
export type SchemaObject = { [key: string]: string };`, 
    ];
    for (const { name , schema  } of schemas){
        try {
            autoGeneratedTypes.push(`export type ${name} = ${schemaToType(schema)}`);
        } catch (e) {
            console.error(JSON.stringify(schema, null, 2));
            throw e;
        }
    }
    Deno.mkdirSync(join3(resourcePath, "/types"), {
        recursive: true
    });
    Deno.writeTextFileSync(join3(resourcePath, "/types/schema-types.ts"), autoGeneratedTypes.join("\n\n"));
    await Deno.run({
        cmd: [
            Deno.execPath(),
            "fmt",
            join3(resourcePath, "/types/schema-types.ts")
        ]
    }).status();
}
function schemaToType(schema) {
    if ([
        true,
        false,
        null
    ].indexOf(schema) !== -1) {
        return String(schema);
    }
    if (typeof schema === "string") {
        switch(schema){
            case "number":
            case "boolean":
            case "string":
            case "null":
                return schema;
            case "path":
                return "string";
            case "object":
                return "SchemaObject";
        }
        throw new Error(`Unimplemented: ${schema}`);
    }
    const document1 = (schemaStr, entry)=>{
        if (typeof entry.description === "string") {
            return `${schemaStr} /* ${entry.description.trim()} */`;
        } else if (typeof schema.description === "string") {
            return `${schemaStr} /* ${schema.description.trim()} */`;
        } else if (typeof entry.description === "object") {
            return `${schemaStr} /* ${entry.description.long.trim()} */`;
        } else if (typeof schema.description === "object") {
            return `${schemaStr} /* ${schema.description.long.trim()} */`;
        } else {
            return schemaStr;
        }
    };
    if (typeof schema === "object") {
        if (schema.schema) return schemaToType(schema.schema);
        if (schema.string) {
            return document1("string", schema.string);
        }
        if (schema.number) {
            return document1("number", schema.number);
        }
        if (schema.boolean) {
            return document1("boolean", schema.boolean);
        }
        if (schema.path) {
            return document1("string", schema.path);
        }
        if (schema.arrayOf) {
            return document1(`(${schemaToType(schema.arrayOf)})[]`, schema.arrayOf);
        }
        if (schema.maybeArrayOf) {
            const t = schemaToType(schema.maybeArrayOf);
            return document1(`MaybeArrayOf<${t}>`, schema.maybeArrayOf);
        }
        if (schema.record) {
            return document1("{" + Object.entries(schema.record).map(([key, value])=>{
                return `${key}: ${schemaToType(value)}`;
            }).join("; ") + "}", {});
        }
        if (schema.enum) {
            const doIt = (v)=>{
                if (v.length === 1) {
                    return JSON.stringify(v[0]);
                }
                return document1("(" + v.map((x)=>JSON.stringify(x)).join(" | ") + ")", schema.enum);
            };
            if (Array.isArray(schema.enum.values)) {
                return doIt(schema.enum.values);
            }
            if (!Array.isArray(schema.enum)) {
                throw new Error(`Unimplemented: ${JSON.stringify(schema)}`);
            }
            return doIt(schema.enum);
        }
        if (schema.ref) {
            return capitalizeWord(toCapitalizationCase(schema.ref));
        }
        if (schema.allOf) {
            if (!Array.isArray(schema.allOf)) {
                throw new Error(`Unimplemented: ${JSON.stringify(schema)}`);
            }
            return document1("(" + schema.allOf.map(schemaToType).join(" & ") + ")", schema.allOf);
        }
        if (schema.anyOf) {
            if (!Array.isArray(schema.anyOf)) {
                throw new Error(`Unimplemented: ${JSON.stringify(schema)}`);
            }
            return document1("(" + schema.anyOf.map(schemaToType).join(" | ") + ")", schema.anyOf);
        }
        if (schema.object) {
            const mainType = schema.object.properties === undefined ? "SchemaObject" : "{" + Object.entries(schema.object.properties).map(([key, value])=>{
                const optionalFlag = schema.object.required === "all" ? false : schema.object.required === undefined ? true : schema.object.required.indexOf(key) === -1;
                return `${key.indexOf("-") !== -1 ? JSON.stringify(key) : key}${optionalFlag ? "?" : ""}: ${schemaToType(value)}`;
            }).sort(([k1, _v1], [k2, _v2])=>k1.localeCompare(k2)).join("; ") + "}";
            if (schema.object?.super?.resolveRef) {
                return document1("(" + mainType + " & " + capitalizeWord(toCapitalizationCase(schema.object?.super?.resolveRef)) + ")", schema.object);
            } else {
                return document1(mainType, schema.object);
            }
        }
    }
    throw new Error(`Unimplemented: ${JSON.stringify(schema)}`);
}
async function buildIntelligenceResources() {
    await ensureSchemaResources();
    getFormatAliases();
    await getFrontMatterSchema();
    await getProjectConfigSchema();
    await getEngineOptionsSchema();
    const externalSchemas = [
        revealPluginSchema
    ];
    for (const schema of externalSchemas){
        setSchemaDefinition(schema);
    }
    const htmlDescriptions = await createHtmlDescriptions();
    setYamlIntelligenceResources({
        "schema/html-descriptions.yml": htmlDescriptions,
        "schema/external-schemas.yml": externalSchemas,
        "handlers/languages.yml": languages(),
        "handlers/lang-comment-chars.yml": kLangCommentChars
    });
    for (const language of languages()){
        let schema1 = await languageSchema(language);
        if (schema1) {
            schema1 = idSchema(schema1, `handlers/${language}`);
            setYamlIntelligenceResources({
                [`handlers/${language}/schema.yml`]: schema1
            });
        }
    }
    const yamlResources = exportYamlIntelligenceResources(true);
    const yamlResourcesPath = resourcePath("/editor/tools/yaml/yaml-intelligence-resources.json");
    Deno.writeTextFileSync(yamlResourcesPath, yamlResources);
    await generateTypesFromSchemas(resourcePath());
}
function getMarkdownDescriptions() {
    const result1 = [];
    const schemaList = Object.values(getSchemaDefinitionsObject());
    for (const schema of schemaList){
        walkSchema(schema, (s)=>{
            if (s === false || s === true) {
                return;
            }
            const description = s?.tags?.description;
            if (description === undefined) {
                return;
            }
            result1.push(`## annotation\n`);
            if (typeof description === "string") {
                result1.push(`### string\n`);
                result1.push(description);
                result1.push("");
            } else {
                result1.push(`### short\n`);
                result1.push(description?.short || "");
                result1.push("");
                result1.push(`### long\n`);
                result1.push(description?.long || "");
                result1.push("");
            }
            return;
        });
    }
    return result1.join("\n");
}
async function createHtmlDescriptions() {
    const markdownDescriptions = getMarkdownDescriptions();
    const descriptionList = [];
    const cmd = [
        pandocBinaryPath(),
        "--to",
        "html"
    ];
    const pandocResult = await execProcess({
        stdout: "piped",
        cmd
    }, markdownDescriptions);
    if (!pandocResult.success) {
        throw new Error("Internal error - couldn't run pandoc");
    }
    await initDenoDom();
    const doc = await parseHtml(pandocResult.stdout);
    for (const entryNode of doc.querySelectorAll("h2")){
        const entry = entryNode;
        const values = {};
        for (const value of filter1(stopWhen(siblings(entry), (e)=>e.tagName === "H2"), (e)=>e.tagName === "H3")){
            const name = value.textContent;
            const html = [];
            for (const p of stopWhen(siblings(value), (e)=>e.tagName !== "P")){
                html.push(p.innerHTML);
            }
            values[name] = html.join("\n");
        }
        if (values["string"]) {
            descriptionList.push(values["string"]);
        } else if (values["short"] || values["long"]) {
            descriptionList.push({
                short: values["short"],
                long: values["long"]
            });
        }
    }
    return descriptionList;
}
function* siblings(entry) {
    do {
        if (entry.nextElementSibling === null) {
            return;
        }
        entry = entry.nextElementSibling;
        yield entry;
    }while (true)
}
function* stopWhen(gen, when) {
    for (const v of gen){
        if (when(v)) {
            break;
        }
        yield v;
    }
}
function* filter1(gen, f) {
    for (const v of gen){
        if (f(v)) {
            yield v;
        }
    }
}
function ensureAllowableIDESyntax(src, filename) {
    const ast = parse31(src, {
        ecmaVersion: "2020",
        sourceType: "module"
    });
    let failed = false;
    simple(ast, {
        ChainExpression (_node) {
            console.error(`Failure: Chain expression \`?.\` not allowed in ${filename}`);
            failed = true;
        },
        LogicalExpression (node) {
            if (node.operator === "??") {
                console.error(`Failure: Nullish coalescing operator \`??\` not allows in ${filename}`);
                failed = true;
            }
        }
    });
    if (failed) {
        throw new Error("Found syntax that is not allowed");
    }
}
async function buildYAMLJS() {
    const treeSitterYamlJson = {
        "data": Array.from(Deno.readFileSync(resourcePath("editor/tools/yaml/tree-sitter-yaml.wasm")))
    };
    Deno.writeTextFileSync(resourcePath("editor/tools/yaml/tree-sitter-yaml.json"), JSON.stringify(treeSitterYamlJson));
    const esbuild = async (cwd, filename, outputType = "iife", checkIde = true)=>{
        const result1 = await esbuildCompile("", cwd, [
            filename
        ], outputType);
        if (checkIde) {
            ensureAllowableIDESyntax(result1, filename);
        }
        return result1;
    };
    Deno.writeTextFileSync(resourcePath("editor/tools/yaml/yaml-intelligence.js"), await esbuild(resourcePath("../core/lib/yaml-intelligence"), "ide-main.ts", "esm"));
    Deno.writeTextFileSync(resourcePath("editor/tools/yaml/yaml.js"), await esbuild(resourcePath("editor/tools/yaml"), "automation.js"));
    const webWorkerSrc = await esbuild(resourcePath("../core/lib/yaml-intelligence"), "web-worker.ts");
    const vsCodeSrc = await esbuild(resourcePath("../core/lib/yaml-intelligence"), "vs-code.ts", "esm", false);
    const treeSitter = Deno.readTextFileSync(resourcePath("editor/tools/yaml/tree-sitter.js"));
    ensureAllowableIDESyntax(treeSitter, "tree-sitter.js");
    Deno.writeTextFileSync(resourcePath("editor/tools/vs-code.mjs"), [
        treeSitter,
        vsCodeSrc
    ].join(""));
    Deno.writeTextFileSync(resourcePath("editor/tools/yaml/web-worker.js"), [
        treeSitter,
        webWorkerSrc
    ].join(""));
}
async function buildAssets() {
    await buildIntelligenceResources();
    await buildYAMLJS();
}
const buildJsCommand = new Command().name("build-js").hidden().description("Builds all the javascript assets necessary for IDE support.\n\n").action(async ()=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    await buildAssets();
});
async function extensionSource(target) {
    if (existsSync(target)) {
        return {
            type: "local",
            resolvedTarget: target
        };
    }
    for (const resolver of extensionHostResolvers){
        const resolved = resolver(target);
        if (!resolved) {
            continue;
        }
        const response = await resolved.response;
        if (response.status === 200) {
            return {
                type: "remote",
                resolvedTarget: response,
                owner: resolved?.owner,
                targetSubdir: resolved?.subdirectory,
                learnMoreUrl: resolved?.learnMoreUrl
            };
        }
    }
    return undefined;
}
const githubLatestUrlProvider = {
    extensionUrl: (host)=>{
        if (host.modifier === undefined || host.modifier === "latest") {
            return `https://github.com/${host.organization}/${host.repo}/archive/refs/heads/main.tar.gz`;
        }
    },
    archiveSubdir: (host)=>{
        const baseDir = `${host.repo}-main`;
        if (host.subdirectory) {
            return baseDir + "/" + host.subdirectory;
        } else {
            return baseDir;
        }
    },
    learnMoreUrl: (host)=>{
        return `https://www.github.com/${host.organization}/${host.repo}`;
    }
};
const githubTagUrlProvider = {
    extensionUrl: (host)=>{
        if (host.modifier) {
            return `https://github.com/${host.organization}/${host.repo}/archive/refs/tags/${host.modifier}.tar.gz`;
        }
    },
    archiveSubdir: (host)=>{
        const baseDir = `${host.repo}-${tagSubDirectory(host.modifier)}`;
        if (host.subdirectory) {
            return baseDir + "/" + host.subdirectory;
        } else {
            return baseDir;
        }
    },
    learnMoreUrl: (host)=>{
        return `https://github.com/${host.organization}/${host.repo}/tree/${host.modifier}`;
    }
};
const githubBranchUrlProvider = {
    extensionUrl: (host)=>{
        if (host.modifier) {
            return `https://github.com/${host.organization}/${host.repo}/archive/refs/heads/${host.modifier}.tar.gz`;
        }
    },
    archiveSubdir: (host)=>{
        const baseDir = `${host.repo}-${host.modifier}`;
        if (host.subdirectory) {
            return baseDir + "/" + host.subdirectory;
        } else {
            return baseDir;
        }
    },
    learnMoreUrl: (host)=>{
        return `https://github.com/${host.organization}/${host.repo}/tree/${host.modifier}`;
    }
};
const kGithubExtensionSource = {
    parse: (name)=>{
        const match = name.match(kGithubExtensionNameRegex);
        if (match) {
            return {
                name,
                organization: match[1],
                repo: match[2],
                subdirectory: match[3],
                modifier: match[4]
            };
        } else {
            return undefined;
        }
    },
    urlProviders: [
        githubLatestUrlProvider,
        githubTagUrlProvider,
        githubBranchUrlProvider, 
    ]
};
const kGithubExtensionNameRegex = /^([a-zA-Z0-9-_\.]*?)\/([a-zA-Z0-9-_\.]*?)(?:\/(.*?)\/?)?(?:@([a-zA-Z0-9-_\.]*))?$/;
const kGithubArchiveUrlSource = {
    parse: (name)=>{
        const match = name.match(kGithubArchiveUrlRegex);
        if (match) {
            return {
                name,
                organization: match[1],
                repo: match[2],
                subdirectory: undefined,
                modifier: match[3]
            };
        } else {
            return undefined;
        }
    },
    urlProviders: [
        {
            extensionUrl: (host)=>host.name,
            archiveSubdir: (host)=>{
                return `${host.repo}-${tagSubDirectory(host.modifier)}`;
            },
            learnMoreUrl: (host)=>`https://www.github.com/${host.organization}/${host.repo}`
        }, 
    ]
};
const kGithubArchiveUrlRegex = /https?\:\/\/github.com\/([a-zA-Z0-9-_\.]+?)\/([a-zA-Z0-9-_\.]+?)\/archive\/refs\/(?:tags|heads)\/(.+)(?:\.tar\.gz|\.zip)$/;
function tagSubDirectory(tag) {
    if (tag) {
        return tag.startsWith("v") ? tag.slice(1) : tag;
    } else {
        return tag;
    }
}
function makeResolvers(source) {
    return source.urlProviders.map((urlProvider)=>{
        return (name)=>{
            const host = source.parse(name);
            if (!host) {
                return undefined;
            }
            const url = urlProvider.extensionUrl(host);
            if (url) {
                return {
                    url,
                    response: fetch(url),
                    owner: host.organization,
                    subdirectory: urlProvider.archiveSubdir(host),
                    learnMoreUrl: urlProvider.learnMoreUrl(host)
                };
            } else {
                return undefined;
            }
        };
    });
}
const kGithubResolvers = [
    ...makeResolvers(kGithubExtensionSource),
    ...makeResolvers(kGithubArchiveUrlSource), 
];
const unknownUrlResolver = (name)=>{
    try {
        new URL(name);
    } catch  {
        return undefined;
    }
    return {
        url: name,
        response: fetch(name)
    };
};
const extensionHostResolvers = [
    ...kGithubResolvers,
    unknownUrlResolver, 
];
const kUnversionedFrom = "  (?)";
const kUnversionedTo = "(?)  ";
async function installExtension(target, temp, allowPrompt, embed) {
    const source = await extensionSource(target);
    if (!source) {
        info(`Extension not found in local or remote sources`);
        return;
    }
    const trusted = await isTrusted(source, allowPrompt);
    if (!trusted) {
        cancelInstallation();
    } else {
        const currentDir = Deno.cwd();
        const installDir = await determineInstallDir(currentDir, allowPrompt, embed);
        const extensionDir = await stageExtension(source, temp.createDir());
        const stagedExtensions = await validateExtension1(extensionDir);
        const confirmed = await confirmInstallation(stagedExtensions, installDir, allowPrompt);
        if (confirmed) {
            await completeInstallation(extensionDir, installDir, source);
        } else {
            cancelInstallation();
        }
    }
}
function cancelInstallation() {
    info("Installation canceled\n");
}
async function isTrusted(source, allowPrompt) {
    if (allowPrompt && source.type === "remote") {
        const preamble = `\nQuarto extensions may execute code when documents are rendered. If you do not \ntrust the authors of the extension, we recommend that you do not install or \nuse the extension.`;
        info(preamble);
        const question = "Do you trust the authors of this extension";
        const confirmed = await Confirm.prompt({
            message: question,
            default: true
        });
        return confirmed;
    } else {
        return true;
    }
}
async function determineInstallDir(dir, allowPrompt, embed) {
    if (embed) {
        const extensionName = embed;
        const context = createExtensionContext();
        const extension = await context.extension(extensionName, dir);
        if (extension) {
            if (Object.keys(extension?.contributes.formats || {}).length > 0) {
                return extension?.path;
            } else {
                throw new Error(`The extension ${embed} does not contribute a format.\nYou can only embed extensions within an extension which itself contributes a format.`);
            }
        } else {
            throw new Error(`Unable to locate the extension '${embed}' that you'd like to embed this within.`);
        }
    } else {
        const project = await projectContext(dir);
        if (project && project.dir !== dir) {
            const question = "Install extension into project?";
            if (allowPrompt) {
                const useProject = await Confirm.prompt(question);
                if (useProject) {
                    return project.dir;
                } else {
                    return dir;
                }
            } else {
                return dir;
            }
        } else {
            return dir;
        }
    }
}
async function stageExtension(source, workingDir) {
    if (source.type === "remote") {
        const archiveDir = join3(workingDir, "archive");
        ensureDirSync(archiveDir);
        const filename = (typeof source.resolvedTarget === "string" ? source.resolvedTarget : source.resolvedTarget.url).split("/").pop() || "extension.zip";
        const toFile = join3(archiveDir, filename);
        await downloadWithProgress(source.resolvedTarget, `Downloading`, toFile);
        return unzipAndStage(toFile, source);
    } else {
        if (typeof source.resolvedTarget !== "string") {
            throw new Error("Internal error: local resolved extension should always have a string target.");
        }
        if (Deno.statSync(source.resolvedTarget).isDirectory) {
            const srcDir = extensionDir(source.resolvedTarget);
            if (srcDir) {
                const destDir = join3(workingDir, kExtensionDir);
                await readAndCopyExtensions(srcDir, destDir);
            }
            return workingDir;
        } else {
            const filename1 = basename2(source.resolvedTarget);
            const toFile1 = join3(workingDir, filename1);
            copyTo(source.resolvedTarget, toFile1);
            return unzipAndStage(toFile1, source);
        }
    }
}
async function unzipAndStage(zipFile, source) {
    await withSpinner({
        message: "Unzipping"
    }, async ()=>{
        const result1 = await unzip(zipFile);
        if (!result1.success) {
            throw new Error("Failed to unzip extension.\n" + result1.stderr);
        }
        await Deno.remove(zipFile);
        return Promise.resolve();
    });
    const archiveDir = dirname2(zipFile);
    const findExtensionDir = ()=>{
        if (source.targetSubdir) {
            return join3(archiveDir, source.targetSubdir);
        } else {
            if (safeExistsSync(join3(archiveDir, kExtensionDir))) {
                return archiveDir;
            } else {
                const dirEntries = Deno.readDirSync(archiveDir);
                let count = 0;
                let name;
                for (const dirEntry of dirEntries){
                    if (dirEntry.isDirectory) {
                        name = dirEntry.name;
                        count++;
                    }
                }
                if (count === 1 && name && name !== kExtensionDir) {
                    if (safeExistsSync(join3(archiveDir, name, kExtensionDir))) {
                        return join3(archiveDir, name);
                    } else {
                        return archiveDir;
                    }
                } else {
                    return archiveDir;
                }
            }
        }
    };
    const extensionsDir = join3(findExtensionDir(), kExtensionDir);
    const finalDir = join3(archiveDir, "staged");
    await copyExtensions(source, extensionsDir, finalDir);
    return finalDir;
}
async function copyExtensions(source, srcDir, targetDir) {
    const finalExtensionsDir = join3(targetDir, kExtensionDir);
    const finalExtensionTargetDir = source.owner ? join3(finalExtensionsDir, source.owner) : finalExtensionsDir;
    ensureDirSync(finalExtensionTargetDir);
    await readAndCopyExtensions(srcDir, finalExtensionTargetDir);
}
async function readAndCopyExtensions(extensionsDir, targetDir) {
    const extensions = await readExtensions(extensionsDir);
    info(`    Found ${extensions.length} ${extensions.length === 1 ? "extension" : "extensions"}.`);
    for (const extension of extensions){
        copyTo(extension.path, join3(targetDir, extension.id.name));
    }
}
async function validateExtension1(path) {
    const extensionsFolder = extensionDir(path);
    if (!extensionsFolder) {
        throw new Error(`Invalid extension\nThe extension staged at ${path} is missing an '_extensions' folder.`);
    }
    const extensions = await readExtensions(extensionsFolder);
    if (extensions.length === 0) {
        throw new Error(`Invalid extension\nThe extension staged at ${path} does not provide any valid extensions.`);
    }
    return extensions;
}
async function confirmInstallation(extensions, installDir, allowPrompt) {
    const readExisting = async ()=>{
        try {
            const existingExtensionsDir = join3(installDir, kExtensionDir);
            if (Deno.statSync(existingExtensionsDir).isDirectory) {
                const existingExtensions = await readExtensions(join3(installDir, kExtensionDir));
                return existingExtensions;
            } else {
                return [];
            }
        } catch  {
            return [];
        }
    };
    const name = (extension)=>{
        const idStr = extension.id.organization ? `${extension.id.organization}/${extension.id.name}` : extension.id.name;
        return extension.title || idStr;
    };
    const existingExtensions = await readExisting();
    const existing = (extension)=>{
        return existingExtensions.find((existing)=>{
            return existing.id.name === extension.id.name && existing.id.organization === extension.id.organization;
        });
    };
    const typeStr = (to)=>{
        const contributes = to.contributes;
        const extTypes = [];
        if (contributes.formats && Object.keys(contributes.formats).length > 0) {
            Object.keys(contributes.formats).length === 1 ? extTypes.push("format") : extTypes.push("formats");
        }
        if (contributes.shortcodes && contributes.shortcodes.length > 0) {
            contributes.shortcodes.length === 1 ? extTypes.push("shortcode") : extTypes.push("shortcodes");
        }
        if (contributes.filters && contributes.filters.length > 0) {
            contributes.filters.length === 1 ? extTypes.push("filter") : extTypes.push("filters");
        }
        if (extTypes.length > 0) {
            return `(${extTypes.join(",")})`;
        } else {
            return "";
        }
    };
    const versionMessage = (to, from)=>{
        if (to && !from) {
            const versionStr = to.version?.format();
            return {
                action: "Install",
                from: "",
                to: versionStr
            };
        } else {
            if (to.version && from?.version) {
                const comparison = to.version.compare(from.version);
                if (comparison === 0) {
                    return {
                        action: "No Change",
                        from: "",
                        to: ""
                    };
                } else if (comparison > 0) {
                    return {
                        action: "Update",
                        from: from.version.format(),
                        to: to.version.format()
                    };
                } else {
                    return {
                        action: "Revert",
                        from: from.version.format(),
                        to: to.version.format()
                    };
                }
            } else if (to.version && !from?.version) {
                return {
                    action: "Update",
                    from: kUnversionedFrom,
                    to: to.version.format()
                };
            } else if (!to.version && from?.version) {
                return {
                    action: "Update",
                    from: from.version.format(),
                    to: kUnversionedTo
                };
            } else {
                return {
                    action: "Update",
                    from: kUnversionedFrom,
                    to: kUnversionedTo
                };
            }
        }
    };
    const extensionRows = [];
    for (const stagedExtension of extensions){
        const installedExtension = existing(stagedExtension);
        const message = versionMessage(stagedExtension, installedExtension);
        const types = typeStr(stagedExtension);
        if (message) {
            extensionRows.push([
                name(stagedExtension) + "  ",
                `[${message.action}]`,
                message.from || "",
                message.to && message.from ? "->" : "",
                message.to || "",
                types, 
            ]);
        }
    }
    if (extensionRows.length > 0) {
        const table = new Table(...extensionRows);
        info(`\nThe following changes will be made:\n${table.toString()}`);
        const question = "Would you like to continue";
        return !allowPrompt || await Confirm.prompt({
            message: question,
            default: true
        });
    } else {
        info(`\nNo changes required - extensions already installed.`);
        return true;
    }
}
async function completeInstallation(downloadDir, installDir, source) {
    info("");
    const message = ()=>{
        const baseMessage = `Extension installation complete.`;
        if (source.learnMoreUrl) {
            return `${baseMessage}\nLearn more about this extension at ${source.learnMoreUrl}`;
        } else {
            return baseMessage;
        }
    };
    await withSpinner({
        message: `Copying`,
        doneMessage: message()
    }, ()=>{
        copyTo(downloadDir, installDir, {
            overwrite: true
        });
        return Promise.resolve();
    });
}
const extensionDir = (path)=>{
    if (basename2(path) === kExtensionDir) {
        return path;
    } else {
        const extDir = join3(path, kExtensionDir);
        if (existsSync(extDir) && Deno.statSync(extDir).isDirectory) {
            return extDir;
        } else {
            return path;
        }
    }
};
async function removeExtension(extension) {
    if (extension.id.organization === kBuiltInExtOrg) {
        throw new Error(`The extension ${extension.title} can't be removed since it is a built in extension.`);
    }
    await Deno.remove(extension.path, {
        recursive: true
    });
    const extensionDir = dirname2(extension.path);
    removeIfEmptyDir(extensionDir);
    const parentDir = dirname2(extensionDir);
    if (parentDir && basename2(parentDir) === kExtensionDir) {
        removeIfEmptyDir(parentDir);
    }
}
const removeCommand = new Command().hidden().name("remove").arguments("[target...]").option("--no-prompt", "Do not prompt to confirm actions").option("--embed <extensionId>", "Remove this extension from within another extension (used when authoring extensions).").option("--update-path", "Update system path when a tool is installed", {
    hidden: true
}).description("Removes an extension.").example("Remove extension using name", "quarto remove <extension-name>").action(async (options, target)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    const temp = createTempContext();
    const extensionContext = createExtensionContext();
    try {
        const resolved = resolveCompatibleArgs(target || [], "extension");
        if (resolved.action === "tool") {
            if (resolved.name) {
                await removeTool(resolved.name, options.prompt, options.updatePath);
            } else {
                const allTools = await loadTools();
                if (allTools.filter((tool)=>tool.installed).length === 0) {
                    info("No tools are installed.");
                } else {
                    const toolTarget = await selectTool(allTools, "remove");
                    if (toolTarget) {
                        info("");
                        await removeTool(toolTarget);
                    }
                }
            }
        } else {
            const workingDir = Deno.cwd();
            const resolveTargetDir = async ()=>{
                if (options.embed) {
                    const context = createExtensionContext();
                    const extension = await context.extension(options.embed, workingDir);
                    if (extension) {
                        return extension?.path;
                    } else {
                        throw new Error(`Unable to find extension '${options.embed}.`);
                    }
                } else {
                    return workingDir;
                }
            };
            const targetDir = await resolveTargetDir();
            if (resolved.name) {
                const extensions = await extensionContext.find(resolved.name, targetDir, undefined, undefined, undefined, {
                    builtIn: false
                });
                if (extensions.length > 0) {
                    await removeExtensions(extensions.slice(), options.prompt);
                } else {
                    info("No matching extension found.");
                }
            } else {
                const project = await projectContext(targetDir);
                const extensions1 = await extensionContext.extensions(targetDir, project?.config, project?.dir, {
                    builtIn: false
                });
                if (extensions1.length > 0) {
                    const extensionsToRemove = await selectExtensions(extensions1);
                    if (extensionsToRemove.length > 0) {
                        await removeExtensions(extensionsToRemove);
                    }
                } else {
                    info("No extensions installed.");
                }
            }
        }
    } finally{
        temp.cleanup();
    }
});
const resolveCompatibleArgs = (args, defaultAction)=>{
    if (args.length === 1) {
        const extname = args[0];
        if (extname === "tool") {
            return {
                action: "tool"
            };
        } else if (extname === "extension") {
            return {
                action: "extension"
            };
        } else if (extname === "tinytex" || extname === "chromium") {
            return {
                action: "tool",
                name: args[0]
            };
        } else {
            return {
                action: defaultAction,
                name: args[0]
            };
        }
    } else if (args.length > 1) {
        const action = args[0];
        const name = args[1];
        if (action === "tool") {
            return {
                action,
                name
            };
        } else if (action === "extension") {
            return {
                action: "extension",
                name
            };
        } else {
            return {
                action: defaultAction,
                name
            };
        }
    } else {
        return {
            action: defaultAction
        };
    }
};
function removeExtensions(extensions, prompt) {
    const removeOneExtension = async (extension)=>{
        return await afterConfirm(`Are you sure you'd like to remove ${extension.title}?`, async ()=>{
            await removeExtension(extension);
            info("Extension removed.");
        }, prompt);
    };
    const removeMultipleExtensions = async (extensions)=>{
        return await afterConfirm(`Are you sure you'd like to remove ${extensions.length} ${extensions.length === 1 ? "extension" : "extensions"}?`, async ()=>{
            for (const extensionToRemove of extensions){
                await removeExtension(extensionToRemove);
            }
            info(`${extensions.length} ${extensions.length === 1 ? "extension" : "extensions"} removed.`);
        }, prompt);
    };
    info("");
    if (extensions.length === 1) {
        return removeOneExtension(extensions[0]);
    } else {
        return removeMultipleExtensions(extensions);
    }
}
async function selectExtensions(extensions) {
    const sorted = extensions.sort((ext1, ext2)=>{
        const orgSort = (ext1.id.organization || "").localeCompare(ext2.id.organization || "");
        if (orgSort !== 0) {
            return orgSort;
        } else {
            return ext1.title.localeCompare(ext2.title);
        }
    });
    const extsToKeep = await Checkbox.prompt({
        message: "Select extension(s) to keep",
        options: sorted.map((ext)=>{
            return {
                name: `${ext.title}${ext.id.organization ? " (" + ext.id.organization + ")" : ""}`,
                value: extensionIdString(ext.id),
                checked: true
            };
        }),
        hint: `Use the ${haveArrowKeys() ? "arrow" : "'u' and 'd'"} keys and spacebar to specify extensions you'd like to remove.\n` + "   Press Enter to confirm the list of accounts you wish to remain available."
    });
    return extensions.filter((extension)=>{
        return !extsToKeep.includes(extensionIdString(extension.id));
    });
}
const installCommand = new Command().name("install").arguments("[target...]").option("--no-prompt", "Do not prompt to confirm actions").option("--embed <extensionId>", "Embed this extension within another extension (used when authoring extensions).", {
    hidden: true
}).option("--update-path", "Update system path when a tool is installed").description("Installs an extension or global dependency.").example("Install TinyTeX", "quarto install tool tinytex").example("Install Chromium", "quarto install tool chromium").example("Choose tool to install", "quarto install tool").action(async (options, target)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    const temp = createTempContext();
    const resolved = resolveCompatibleArgs(target || [], "tool");
    try {
        if (resolved.action === "extension") {
            if (resolved.name) {
                await installExtension(resolved.name, temp, options.prompt !== false, options.embed);
            } else {
                info("Please provide an extension name, url, or path.");
            }
        } else if (resolved.action === "tool") {
            if (resolved.name) {
                await updateOrInstallTool(resolved.name, "install", options.prompt, options.updatePath);
            } else {
                const allTools = await loadTools();
                if (allTools.filter((tool)=>!tool.installed).length === 0) {
                    info("All tools are already installed.");
                } else {
                    const toolTarget = await selectTool(allTools, "install");
                    if (toolTarget) {
                        info("");
                        await installTool(toolTarget, options.updatePath);
                    }
                }
            }
        } else {
            info(`Unrecognized option '${resolved.action}' - please choose 'tool' or 'extension'.`);
        }
    } finally{
        temp.cleanup();
    }
});
const updateCommand = new Command().hidden().name("update").arguments("[target...]").option("--no-prompt", "Do not prompt to confirm actions").option("--embed <extensionId>", "Embed this extension within another extension (used when authoring extensions).").description("Updates an extension or global dependency.").example("Update extension (Github)", "quarto update extension <gh-org>/<gh-repo>").example("Update extension (file)", "quarto update extension <path-to-zip>").example("Update extension (url)", "quarto update extension <url>").example("Update TinyTeX", "quarto update tool tinytex").example("Update Chromium", "quarto update tool chromium").example("Choose tool to update", "quarto update tool").action(async (options, target)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    const temp = createTempContext();
    try {
        const resolved = resolveCompatibleArgs(target || [], "extension");
        if (resolved.action === "extension") {
            if (resolved.name) {
                await installExtension(resolved.name, temp, options.prompt !== false, options.embed);
            } else {
                info("Please provide an extension name, url, or path.");
            }
        } else if (resolved.action === "tool") {
            if (resolved.name) {
                await updateOrInstallTool(resolved.name, "update", options.prompt);
            } else {
                const allTools = await loadTools();
                if (allTools.filter((tool)=>!tool.installed).length === 0) {
                    info("All tools are already installed.");
                } else {
                    const toolTarget = await selectTool(allTools, "update");
                    if (toolTarget) {
                        info("");
                        await updateOrInstallTool(toolTarget, "update");
                    }
                }
            }
        } else {
            info(`Unrecognized option '${resolved.action}' - please choose 'tool' or 'extension'.`);
        }
    } finally{
        temp.cleanup();
    }
});
const CONTROL_CHARS = /[\x00-\x1F\x7F]/;
const COOKIE_NAME_BLOCKED = /[()<>@,;:\\"/[\]?={}]/;
const COOKIE_OCTET_BLOCKED = /[\s",;\\]/;
const COOKIE_OCTET = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/;
const TERMINATORS = [
    "\n",
    "\r",
    "\0"
];
function isSameDomainOrSubdomain(domainA, domainB) {
    if (!domainA || !domainB) {
        return false;
    }
    let longerDomain;
    let shorterDomain;
    if (domainB.length > domainA.length) {
        longerDomain = domainB;
        shorterDomain = domainA;
    } else {
        longerDomain = domainA;
        shorterDomain = domainB;
    }
    const indexOfDomain = longerDomain.indexOf(shorterDomain);
    if (indexOfDomain === -1) {
        return false;
    } else if (indexOfDomain > 0) {
        if (longerDomain.charAt(indexOfDomain - 1) !== ".") {
            return false;
        }
    }
    return true;
}
function trimTerminator(str) {
    if (str === undefined || str === "") return str;
    for(let t = 0; t < TERMINATORS.length; t++){
        const terminatorIdx = str.indexOf(TERMINATORS[t]);
        if (terminatorIdx !== -1) {
            str = str.substr(0, terminatorIdx);
        }
    }
    return str;
}
function isValidName(name) {
    if (!name) {
        return false;
    }
    if (CONTROL_CHARS.test(name) || COOKIE_NAME_BLOCKED.test(name)) {
        return false;
    }
    return true;
}
function trimWrappingDoubleQuotes(val) {
    if (val.length >= 2 && val.at(0) === '"' && val.at(-1) === '"') {
        return val.slice(1, -1);
    }
    return val;
}
function isValidValue(val) {
    if (val === "") {
        return true;
    }
    if (!val) {
        return false;
    }
    if (CONTROL_CHARS.test(val) || COOKIE_OCTET_BLOCKED.test(val) || !COOKIE_OCTET.test(val)) {
        return false;
    }
    return true;
}
function parseURL(input) {
    let copyUrl;
    if (input instanceof Request) {
        copyUrl = input.url;
    } else if (input instanceof URL) {
        copyUrl = input.toString();
    } else {
        copyUrl = input;
    }
    copyUrl = copyUrl.replace(/^\./, "");
    if (!copyUrl.includes("://")) {
        copyUrl = "http://" + copyUrl;
    }
    return new URL(copyUrl);
}
class Cookie {
    name;
    value;
    path;
    domain;
    expires;
    maxAge;
    secure;
    httpOnly;
    sameSite;
    creationDate = Date.now();
    creationIndex;
    static cookiesCreated = 0;
    constructor(options){
        if (options) {
            this.name = options.name;
            this.value = options.value;
            this.path = options.path;
            this.domain = options.domain;
            this.expires = options.expires;
            this.maxAge = options.maxAge;
            this.secure = options.secure;
            this.httpOnly = options.httpOnly;
            this.sameSite = options.sameSite;
            if (options.creationDate) {
                this.creationDate = options.creationDate;
            }
        }
        Object.defineProperty(this, "creationIndex", {
            configurable: false,
            enumerable: false,
            writable: true,
            value: ++Cookie.cookiesCreated
        });
    }
    static from(cookieStr) {
        const options = {
            name: undefined,
            value: undefined,
            path: undefined,
            domain: undefined,
            expires: undefined,
            maxAge: undefined,
            secure: undefined,
            httpOnly: undefined,
            sameSite: undefined,
            creationDate: Date.now()
        };
        const unparsed = cookieStr.slice().trim();
        const attrAndValueList = unparsed.split(";");
        const keyValuePairString = trimTerminator(attrAndValueList.shift() || "").trim();
        const keyValuePairEqualsIndex = keyValuePairString.indexOf("=");
        if (keyValuePairEqualsIndex < 0) {
            return new Cookie();
        }
        const name = keyValuePairString.slice(0, keyValuePairEqualsIndex);
        const value = trimWrappingDoubleQuotes(keyValuePairString.slice(keyValuePairEqualsIndex + 1));
        if (!(isValidName(name) && isValidValue(value))) {
            return new Cookie();
        }
        options.name = name;
        options.value = value;
        while(attrAndValueList.length){
            const cookieAV = attrAndValueList.shift()?.trim();
            if (!cookieAV) {
                continue;
            }
            const avSeperatorIndex = cookieAV.indexOf("=");
            let attrKey, attrValue;
            if (avSeperatorIndex === -1) {
                attrKey = cookieAV;
                attrValue = "";
            } else {
                attrKey = cookieAV.substr(0, avSeperatorIndex);
                attrValue = cookieAV.substr(avSeperatorIndex + 1);
            }
            attrKey = attrKey.trim().toLowerCase();
            if (attrValue) {
                attrValue = attrValue.trim();
            }
            switch(attrKey){
                case "expires":
                    if (attrValue) {
                        const expires = new Date(attrValue).getTime();
                        if (expires && !isNaN(expires)) {
                            options.expires = expires;
                        }
                    }
                    break;
                case "max-age":
                    if (attrValue) {
                        const maxAge = parseInt(attrValue, 10);
                        if (!isNaN(maxAge)) {
                            options.maxAge = maxAge;
                        }
                    }
                    break;
                case "domain":
                    if (attrValue) {
                        const domain = parseURL(attrValue).host;
                        if (domain) {
                            options.domain = domain;
                        }
                    }
                    break;
                case "path":
                    if (attrValue) {
                        options.path = attrValue.startsWith("/") ? attrValue : "/" + attrValue;
                    }
                    break;
                case "secure":
                    options.secure = true;
                    break;
                case "httponly":
                    options.httpOnly = true;
                    break;
                case "samesite":
                    {
                        const lowerCasedSameSite = attrValue.toLowerCase();
                        switch(lowerCasedSameSite){
                            case "strict":
                                options.sameSite = "Strict";
                                break;
                            case "lax":
                                options.sameSite = "Lax";
                                break;
                            case "none":
                                options.sameSite = "None";
                                break;
                            default:
                                break;
                        }
                        break;
                    }
                default:
                    break;
            }
        }
        return new Cookie(options);
    }
    isValid() {
        return isValidName(this.name) && isValidValue(this.value);
    }
    canSendTo(url) {
        const urlObj = parseURL(url);
        if (this.secure && urlObj.protocol !== "https:") {
            return false;
        }
        if (this.sameSite === "None" && !this.secure) return false;
        if (this.path) {
            if (this.path === urlObj.pathname) {
                return true;
            }
            if (urlObj.pathname.startsWith(this.path) && this.path[this.path.length - 1] === "/") {
                return true;
            }
            if (this.path.length < urlObj.pathname.length && urlObj.pathname.startsWith(this.path) && urlObj.pathname[this.path.length] === "/") {
                return true;
            }
            return false;
        }
        if (this.domain) {
            const host = urlObj.host;
            if (isSameDomainOrSubdomain(this.domain, host)) {
                return true;
            }
        }
        return false;
    }
    getCookieString() {
        return `${this.name || ""}=${this.value || ""}`;
    }
    setDomain(url) {
        this.domain = parseURL(url).host;
    }
    setPath(url) {
        const uriPath = parseURL(url).pathname;
        if (!uriPath || uriPath[0] !== "/") {
            this.path = "/";
        } else {
            const rightmostSlashIdx = uriPath.lastIndexOf("/");
            if (rightmostSlashIdx <= 0) {
                this.path = "/";
            } else {
                this.path = uriPath.slice(0, rightmostSlashIdx);
            }
        }
    }
    setExpires(exp) {
        if (exp instanceof Date) {
            this.expires = exp.getTime();
        } else if (typeof exp === "number" && exp >= 0) {
            this.expires = exp;
        }
    }
    isExpired() {
        if (this.maxAge !== undefined) {
            if (Date.now() - this.creationDate >= this.maxAge * 1000) {
                return true;
            }
        }
        if (this.expires !== undefined) {
            if (Date.now() - this.expires >= 0) {
                return true;
            }
        }
        return false;
    }
    toString() {
        let str = this.getCookieString();
        if (this.expires && this.expires !== Infinity) {
            str += "; Expires=" + new Date(this.expires).toUTCString();
        }
        if (this.maxAge && this.maxAge !== Infinity) {
            str += `; Max-Age=${this.maxAge}`;
        }
        if (this.domain) {
            str += `; Domain=${this.domain}`;
        }
        if (this.path) {
            str += `; Path=${this.path}`;
        }
        if (this.secure) {
            str += "; Secure";
        }
        if (this.httpOnly) {
            str += "; HttpOnly";
        }
        if (this.sameSite) {
            str += `; SameSite=${this.sameSite}`;
        }
        return str;
    }
    clone() {
        return new Cookie(JSON.parse(JSON.stringify(this)));
    }
}
const strictMatchProps = [
    "value",
    "secure",
    "httpOnly",
    "maxAge",
    "expires",
    "sameSite", 
];
function cookieMatches(options, comparedWith, strictMatch = false) {
    if (options.path !== undefined && !comparedWith.path?.startsWith(options.path)) {
        return false;
    }
    if (options.domain) {
        if (!isSameDomainOrSubdomain(options.domain, comparedWith.domain)) {
            return false;
        }
    }
    if (options.name !== undefined && options.name !== comparedWith.name) {
        return false;
    }
    if (strictMatch && strictMatchProps.some((propKey)=>options[propKey] !== undefined && options[propKey] !== comparedWith[propKey])) {
        return false;
    }
    return true;
}
function cookieCompare(a, b) {
    let cmp = 0;
    const aPathLen = a.path?.length || 0;
    const bPathLen = b.path?.length || 0;
    cmp = bPathLen - aPathLen;
    if (cmp !== 0) {
        return cmp;
    }
    const aTime = a.creationDate || 2147483647000;
    const bTime = b.creationDate || 2147483647000;
    cmp = aTime - bTime;
    if (cmp !== 0) {
        return cmp;
    }
    cmp = a.creationIndex - b.creationIndex;
    return cmp;
}
class CookieJar {
    cookies = Array();
    constructor(cookies){
        this.replaceCookies(cookies);
    }
    setCookie(cookie, url) {
        let cookieObj;
        if (typeof cookie === "string") {
            cookieObj = Cookie.from(cookie);
        } else {
            cookieObj = cookie;
        }
        if (url) {
            if (!cookieObj.domain) {
                cookieObj.setDomain(url);
            }
            if (!cookieObj.path) {
                cookieObj.setPath(url);
            }
        }
        if (!cookieObj.isValid()) {
            return;
        }
        const foundCookie = this.getCookie(cookieObj);
        if (foundCookie) {
            const indexOfCookie = this.cookies.indexOf(foundCookie);
            if (!cookieObj.isExpired()) {
                this.cookies.splice(indexOfCookie, 1, cookieObj);
            } else {
                this.cookies.splice(indexOfCookie, 1);
            }
        } else if (!cookieObj.isExpired()) {
            this.cookies.push(cookieObj);
        }
        this.cookies.sort(cookieCompare);
    }
    getCookie(options) {
        const strictMatch = typeof options.isValid !== "function";
        for (const [index, cookie] of this.cookies.entries()){
            if (cookieMatches(options, cookie, strictMatch)) {
                if (!cookie.isExpired()) {
                    return cookie;
                } else {
                    this.cookies.splice(index, 1);
                    return undefined;
                }
            }
        }
    }
    getCookies(options) {
        if (options) {
            const matchedCookies = [];
            const removeCookies = [];
            for (const cookie of this.cookies){
                if (cookieMatches(options, cookie)) {
                    if (!cookie.isExpired()) {
                        matchedCookies.push(cookie);
                    } else {
                        removeCookies.push(cookie);
                    }
                }
            }
            if (removeCookies.length) {
                this.cookies = this.cookies.filter((cookie)=>!removeCookies.includes(cookie));
            }
            return matchedCookies;
        } else {
            return this.cookies;
        }
    }
    getCookieString(url) {
        const searchCookie = new Cookie();
        searchCookie.setDomain(url);
        const cookiesToSend = this.getCookies(searchCookie).filter((cookie)=>{
            return cookie.canSendTo(parseURL(url));
        }).map((c)=>c.getCookieString()).join("; ");
        return cookiesToSend;
    }
    toJSON() {
        return this.cookies;
    }
    removeCookie(options) {
        for (const [index, cookie] of this.cookies.entries()){
            if (cookieMatches(options, cookie)) {
                return this.cookies.splice(index, 1)[0];
            }
        }
    }
    removeCookies(options) {
        if (options) {
            const deletedCookies = [];
            this.cookies = this.cookies.filter((cookie)=>{
                if (cookieMatches(options, cookie)) {
                    deletedCookies.push(cookie);
                    return false;
                }
                return true;
            });
            return deletedCookies.length ? deletedCookies : undefined;
        } else {
            this.cookies = [];
        }
    }
    replaceCookies(cookies) {
        if (cookies?.length) {
            if (typeof cookies[0].isValid === "function") {
                this.cookies = cookies;
            } else {
                this.cookies = [];
                for (const option of cookies){
                    this.cookies.push(new Cookie(option));
                }
            }
        } else {
            this.cookies = [];
        }
    }
}
function wrapFetch(options) {
    const { cookieJar =new CookieJar() , fetch: fetch1 = globalThis.fetch  } = options || {};
    async function wrappedFetch(input, init) {
        if (!input) {
            return await fetch1(input);
        }
        const cookieString = cookieJar.getCookieString(input);
        let interceptedInit;
        if (init) {
            interceptedInit = init;
        } else if (input instanceof Request) {
            interceptedInit = input;
        } else {
            interceptedInit = {};
        }
        if (!(interceptedInit.headers instanceof Headers)) {
            interceptedInit.headers = new Headers(interceptedInit.headers || {});
        }
        interceptedInit.headers.set("cookie", cookieString);
        const response = await fetch1(input, interceptedInit);
        response.headers.forEach((value, key)=>{
            if (key.toLowerCase() === "set-cookie") {
                cookieJar.setCookie(value, input);
            }
        });
        return response;
    }
    return wrappedFetch;
}
class ApiError extends Error {
    constructor(status, statusText){
        super(`API Error: ${status} - ${statusText}`);
        this.status = status;
        this.statusText = statusText;
    }
    status;
    statusText;
}
const fetch1 = wrapFetch();
class RSConnectClient {
    constructor(server_, key_){
        this.server_ = server_;
        this.key_ = key_;
        this.get = (path)=>this.fetch("GET", path);
        this.post = (path, body)=>this.fetch("POST", path, body);
        this.fetch = async (method, path, body)=>{
            return this.handleResponse(await fetch1(this.apiUrl(path), {
                method,
                headers: {
                    Accept: "application/json",
                    ...authorizationHeader(this.key_)
                },
                body
            }));
        };
        this.apiUrl = (path)=>`${this.server_}__api__/v1/${path}`;
        this.cookies_ = new Map();
        this.server_ = ensureProtocolAndTrailingSlash(this.server_);
    }
    getUser() {
        return this.get("user");
    }
    createContent(name, title) {
        return this.post("content", JSON.stringify({
            name,
            title
        }));
    }
    getContent(guid) {
        return this.get(`content/${guid}`);
    }
    uploadBundle(guid, fileBody) {
        return this.post(`content/${guid}/bundles`, fileBody);
    }
    deployBundle(bundle) {
        return this.post(`content/${bundle.content_guid}/deploy`, JSON.stringify({
            bundle_id: bundle.id
        }));
    }
    getTaskStatus(task) {
        return this.get(`tasks/${task.task_id}?${new URLSearchParams({
            wait: "1"
        })}`);
    }
    get;
    post;
    fetch;
    apiUrl;
    handleResponse(response) {
        if (response.ok) {
            return response.json();
        } else if (response.status !== 200) {
            throw new ApiError(response.status, response.statusText);
        } else {
            throw new Error(`${response.status} - ${response.statusText}`);
        }
    }
    cookies_;
    server_;
    key_;
}
const authorizationHeader = (key)=>!key ? {} : {
        Authorization: `Key ${key}`
    };
function publishDataDir() {
    return quartoDataDir("publish");
}
function publishRecordsPath() {
    return join3(publishDataDir(), "records.json");
}
function accountsDataDir() {
    const accountsDir = join3(publishDataDir(), "accounts");
    ensureDirSync(accountsDir);
    return accountsDir;
}
async function readAccountsPublishedTo(input, provider, record) {
    const source = Deno.realPathSync(typeof input === "string" ? input : input.dir);
    const tokens = [];
    const publishRecordsFile = publishRecordsPath();
    if (existsSync(publishRecordsFile)) {
        const records = JSON.parse(Deno.readTextFileSync(publishRecordsFile));
        if (records[source] && records[source][provider.name]) {
            const publishIdentifiers = records[source][provider.name];
            const accounts = await provider.accountTokens();
            for (const publishIdentifier of publishIdentifiers){
                const account = accounts.find((account)=>publishIdentifier === publishRecordIdentifier(record, account));
                if (account) {
                    tokens.push(account);
                }
            }
        }
    }
    return tokens;
}
function writePublishRecord(source, provider, account, record) {
    source = Deno.realPathSync(source);
    const publishRecordsFile = publishRecordsPath();
    const publishRecords = existsSync(publishRecordsFile) ? JSON.parse(Deno.readTextFileSync(publishRecordsFile)) : {};
    if (!publishRecords[source]) {
        publishRecords[source] = {
            [provider]: []
        };
    }
    if (!publishRecords[source][provider]) {
        publishRecords[source][provider] = [];
    }
    const publishedTo = publishRecordIdentifier(record, account);
    if (!publishRecords[source][provider].includes(publishedTo)) {
        publishRecords[source][provider].push(publishedTo);
    }
    Deno.writeTextFileSync(publishRecordsFile, JSON.stringify(publishRecords, undefined, 2));
}
function publishRecordIdentifier(record, account) {
    return `${record.id}/${account?.server ? account.server + "/" : ""}${account?.name || ""}`;
}
async function authorizeAccessToken(handler) {
    const ticket = await handler.createTicket();
    const ticketUrl = handler.authorizationUrl(ticket);
    if (isServerSession()) {
        info("Please authorize by opening this url: " + underline1(ticketUrl));
    } else {
        await openUrl(handler.authorizationUrl(ticket));
    }
    let authorizedTicket;
    const checkTicket = async ()=>{
        const t = await handler.checkTicket(ticket);
        if (t.authorized) {
            authorizedTicket = t;
        }
        return Boolean(t.authorized);
    };
    const pollingStart = Date.now();
    const kPollingTimeout = 60 * 1000;
    while(Date.now() - pollingStart < kPollingTimeout){
        if (await checkTicket()) {
            break;
        }
        await sleep1(500);
    }
    if (authorizedTicket) {
        const accessToken = await handler.exchangeTicket(authorizedTicket);
        writeAccessToken(handler.name, accessToken, handler.compareTokens);
        return accessToken;
    } else {
        return undefined;
    }
}
function readAccessTokens(provider) {
    const tokenPath = accessTokensPath(provider);
    if (existsSync(tokenPath)) {
        const tokens = JSON.parse(Deno.readTextFileSync(tokenPath));
        return tokens;
    } else {
        return undefined;
    }
}
function writeAccessTokens(provider, tokens) {
    const tokensPath = accessTokensPath(provider);
    Deno.writeTextFileSync(tokensPath, JSON.stringify(tokens, undefined, 2));
    if (!isWindows()) {
        Deno.chmod(tokensPath, 0o600);
    }
}
function writeAccessToken(provider, token, compareTokens) {
    let writeTokens;
    writeTokens = readAccessTokens(provider) || [];
    if (compareTokens) {
        const updateIdx = writeTokens.findIndex((t)=>compareTokens(t, token));
        if (updateIdx !== -1) {
            writeTokens[updateIdx] = token;
        } else {
            writeTokens.push(token);
        }
    } else {
        writeTokens = [
            token
        ];
    }
    writeAccessTokens(provider, writeTokens);
}
function accessTokensPath(provider) {
    const dir = join3(accountsDataDir(), provider);
    ensureDirSync(dir);
    return join3(dir, "accounts.json");
}
let wasm1;
const cachedTextDecoder1 = new TextDecoder("utf-8", {
    ignoreBOM: true,
    fatal: true
});
cachedTextDecoder1.decode();
let cachedUint8Memory0;
function getUint8Memory01() {
    if (cachedUint8Memory0.byteLength === 0) {
        cachedUint8Memory0 = new Uint8Array(wasm1.memory.buffer);
    }
    return cachedUint8Memory0;
}
function getStringFromWasm01(ptr, len) {
    return cachedTextDecoder1.decode(getUint8Memory01().subarray(ptr, ptr + len));
}
const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
let heap_next = heap.length;
function addHeapObject(obj) {
    if (heap_next === heap.length) heap.push(heap.length + 1);
    const idx = heap_next;
    heap_next = heap[idx];
    heap[idx] = obj;
    return idx;
}
let WASM_VECTOR_LEN1 = 0;
const cachedTextEncoder1 = new TextEncoder("utf-8");
const encodeString1 = function(arg, view) {
    return cachedTextEncoder1.encodeInto(arg, view);
};
function passStringToWasm01(arg, malloc, realloc) {
    if (realloc === undefined) {
        const buf = cachedTextEncoder1.encode(arg);
        const ptr = malloc(buf.length);
        getUint8Memory01().subarray(ptr, ptr + buf.length).set(buf);
        WASM_VECTOR_LEN1 = buf.length;
        return ptr;
    }
    let len = arg.length;
    let ptr1 = malloc(len);
    const mem = getUint8Memory01();
    let offset = 0;
    for(; offset < len; offset++){
        const code = arg.charCodeAt(offset);
        if (code > 0x7F) break;
        mem[ptr1 + offset] = code;
    }
    if (offset !== len) {
        if (offset !== 0) {
            arg = arg.slice(offset);
        }
        ptr1 = realloc(ptr1, len, len = offset + arg.length * 3);
        const view = getUint8Memory01().subarray(ptr1 + offset, ptr1 + len);
        const ret = encodeString1(arg, view);
        offset += ret.written;
    }
    WASM_VECTOR_LEN1 = offset;
    return ptr1;
}
let cachedInt32Memory0;
function getInt32Memory01() {
    if (cachedInt32Memory0.byteLength === 0) {
        cachedInt32Memory0 = new Int32Array(wasm1.memory.buffer);
    }
    return cachedInt32Memory0;
}
function getObject(idx) {
    return heap[idx];
}
function dropObject(idx) {
    if (idx < 36) return;
    heap[idx] = heap_next;
    heap_next = idx;
}
function takeObject(idx) {
    const ret = getObject(idx);
    dropObject(idx);
    return ret;
}
function create_hash(algorithm) {
    try {
        const retptr = wasm1.__wbindgen_add_to_stack_pointer(-16);
        const ptr0 = passStringToWasm01(algorithm, wasm1.__wbindgen_malloc, wasm1.__wbindgen_realloc);
        const len0 = WASM_VECTOR_LEN1;
        wasm1.create_hash(retptr, ptr0, len0);
        var r0 = getInt32Memory01()[retptr / 4 + 0];
        var r1 = getInt32Memory01()[retptr / 4 + 1];
        var r2 = getInt32Memory01()[retptr / 4 + 2];
        if (r2) {
            throw takeObject(r1);
        }
        return DenoHash.__wrap(r0);
    } finally{
        wasm1.__wbindgen_add_to_stack_pointer(16);
    }
}
function _assertClass(instance, klass) {
    if (!(instance instanceof klass)) {
        throw new Error(`expected instance of ${klass.name}`);
    }
    return instance.ptr;
}
function passArray8ToWasm0(arg, malloc) {
    const ptr = malloc(arg.length * 1);
    getUint8Memory01().set(arg, ptr / 1);
    WASM_VECTOR_LEN1 = arg.length;
    return ptr;
}
function update_hash(hash, data) {
    _assertClass(hash, DenoHash);
    const ptr0 = passArray8ToWasm0(data, wasm1.__wbindgen_malloc);
    const len0 = WASM_VECTOR_LEN1;
    wasm1.update_hash(hash.ptr, ptr0, len0);
}
function getArrayU8FromWasm0(ptr, len) {
    return getUint8Memory01().subarray(ptr / 1, ptr / 1 + len);
}
function digest_hash(hash) {
    try {
        const retptr = wasm1.__wbindgen_add_to_stack_pointer(-16);
        _assertClass(hash, DenoHash);
        wasm1.digest_hash(retptr, hash.ptr);
        var r0 = getInt32Memory01()[retptr / 4 + 0];
        var r1 = getInt32Memory01()[retptr / 4 + 1];
        var v0 = getArrayU8FromWasm0(r0, r1).slice();
        wasm1.__wbindgen_free(r0, r1 * 1);
        return v0;
    } finally{
        wasm1.__wbindgen_add_to_stack_pointer(16);
    }
}
const DenoHashFinalization = new FinalizationRegistry((ptr)=>wasm1.__wbg_denohash_free(ptr));
class DenoHash {
    static __wrap(ptr) {
        const obj = Object.create(DenoHash.prototype);
        obj.ptr = ptr;
        DenoHashFinalization.register(obj, obj.ptr, obj);
        return obj;
    }
    __destroy_into_raw() {
        const ptr = this.ptr;
        this.ptr = 0;
        DenoHashFinalization.unregister(this);
        return ptr;
    }
    free() {
        const ptr = this.__destroy_into_raw();
        wasm1.__wbg_denohash_free(ptr);
    }
}
const imports = {
    __wbindgen_placeholder__: {
        __wbindgen_string_new: function(arg0, arg1) {
            const ret = getStringFromWasm01(arg0, arg1);
            return addHeapObject(ret);
        },
        __wbindgen_throw: function(arg0, arg1) {
            throw new Error(getStringFromWasm01(arg0, arg1));
        }
    }
};
function instantiate() {
    return instantiateWithInstance().exports;
}
let instanceWithExports;
function instantiateWithInstance() {
    if (instanceWithExports == null) {
        const instance = instantiateInstance();
        wasm1 = instance.exports;
        cachedInt32Memory0 = new Int32Array(wasm1.memory.buffer);
        cachedUint8Memory0 = new Uint8Array(wasm1.memory.buffer);
        instanceWithExports = {
            instance,
            exports: {
                create_hash,
                update_hash,
                digest_hash,
                DenoHash
            }
        };
    }
    return instanceWithExports;
}
function instantiateInstance() {
    const wasmBytes = base64decode("\
AGFzbQEAAAAB+4CAgAASYAAAYAF/AGABfwF/YAF/AX5gAn9/AGACf38Bf2ADf39/AGADf39/AX9gBH\
9/f38AYAR/f39/AX9gBX9/f39/AGAFf39/f38Bf2AGf39/f39/AGAGf39/f39/AX9gBX9/f35/AGAH\
f39/fn9/fwF/YAJ/fgBgAn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ADIAtqIA0gBXMgBHNqQQt3IAJqIgpqNgIQIAAgASAQaiAFaiACIAdqIAQgFnMgCnNqQQt3ajYCDA\
uBOQIIfwR+IwBB4ANrIgMkACADIAI2AgwgAyABNgIIAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC\
QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAJBfWoOBwAIBwIJAw\
EJCwJAAkAgAUGAgMAAQQMQmAFFDQAgAUGogMAAQQMQmAFFDQEgAUHQgMAAQQMQmAENCiADQbABakEM\
akIANwIAIANBsAFqQRRqQgA3AgAgA0GwAWpBHGpCADcCACADQbABakEkakIANwIAIANBsAFqQSxqQg\
A3AgAgA0GwAWpBNGpCADcCACADQbABakE8akIANwIAIANCADcCtAEgA0HAADYCsAEgA0HIAmogA0Gw\
AWpBxAAQoAEaIANB2ABqIgQgA0HIAmpBPGopAgA3AwAgA0HQAGoiBSADQcgCakE0aikCADcDACADQc\
gAaiIGIANByAJqQSxqKQIANwMAIANBwABqIgcgA0HIAmpBJGopAgA3AwAgA0E4aiIIIANByAJqQRxq\
KQIANwMAIANBMGoiCSADQcgCakEUaikCADcDACADQSBqQQhqIgogA0HIAmpBDGopAgA3AwAgAyADKQ\
LMAjcDIEHgABAIIgJFDQ0gAkEANgIIIAJCADcDACACIAMpAyA3AgwgAkEUaiAKKQMANwIAIAJBHGog\
CSkDADcCACACQSRqIAgpAwA3AgAgAkEsaiAHKQMANwIAIAJBNGogBikDADcCACACQTxqIAUpAwA3Ag\
AgAkHEAGogBCkDADcCACACQdQAakEAKQKwnEA3AgAgAkEAKQKonEA3AkxB1IDAACEEDCELIANBsAFq\
QQxqIgJCADcCACADQgA3ArQBIANBEDYCsAEgA0HIAmpBEGoiBSADQbABakEQaiIGKAIANgIAIANByA\
JqQQhqIgQgA0GwAWpBCGoiBykDADcDACADQSBqQQhqIgggA0HIAmpBDGoiCSkCADcDACADIAMpA7AB\
NwPIAiADIAMpAswCNwMgIAJCADcCACADQgA3ArQBIANBEDYCsAEgBSAGKAIANgIAIAQgBykDADcDAC\
ADIAMpA7ABNwPIAiADQRBqQQhqIgUgCSkCADcDACADIAMpAswCNwMQIAQgCCkDADcDACADIAMpAyA3\
A8gCQdQAEAgiAkUNCiACQQA2AgAgAiADKQPIAjcCBCACQgA3AhQgAiADKQMQNwJEIAJBHGpCADcCAC\
ACQSRqQgA3AgAgAkEsakIANwIAIAJBNGpCADcCACACQTxqQgA3AgAgAkEMaiAEKQMANwIAIAJBzABq\
IAUpAwA3AgBBhIDAACEEDCALIANBsAFqQQxqQgA3AgAgA0GwAWpBFGpCADcCACADQbABakEcakIANw\
IAIANBsAFqQSRqQgA3AgAgA0GwAWpBLGpCADcCACADQbABakE0akIANwIAIANBsAFqQTxqQgA3AgAg\
A0IANwK0ASADQcAANgKwASADQcgCaiADQbABakHEABCgARogA0HYAGoiBCADQcgCakE8aikCADcDAC\
ADQdAAaiIFIANByAJqQTRqKQIANwMAIANByABqIgYgA0HIAmpBLGopAgA3AwAgA0HAAGoiByADQcgC\
akEkaikCADcDACADQThqIgggA0HIAmpBHGopAgA3AwAgA0EwaiIJIANByAJqQRRqKQIANwMAIANBIG\
pBCGoiCiADQcgCakEMaikCADcDACADIAMpAswCNwMgQeAAEAgiAkUNCiACQQA2AgggAkIANwMAIAIg\
AykDIDcCDCACQRRqIAopAwA3AgAgAkEcaiAJKQMANwIAIAJBJGogCCkDADcCACACQSxqIAcpAwA3Ag\
AgAkE0aiAGKQMANwIAIAJBPGogBSkDADcCACACQcQAaiAEKQMANwIAIAJB1ABqQQApArCcQDcCACAC\
QQApAqicQDcCTEGsgMAAIQQMHwsCQAJAIAFB+IDAAEEJEJgBRQ0AIAFBqIHAAEEJEJgBRQ0BIAFBvI\
TAACACEJgBRQ0EIAFB7ITAACACEJgBRQ0FIAFBnIXAACACEJgBRQ0GIAFBzIXAACACEJgBDQkgA0EA\
NgKwASADQbABakEEckEAQcgAEKgBGiADQcgANgKwASADQcgCaiADQbABakHMABCgARogA0EgaiADQc\
gCakEEckHIABCgARpBmAIQCCICRQ0aIAJBAEHMARCoAUHMAWogA0EgakHIABCgARpB2IXAACEEDCAL\
IANBsAFqQQxqQgA3AgAgA0GwAWpBFGpCADcCACADQbABakEcakIANwIAIANBsAFqQSRqQgA3AgAgA0\
GwAWpBLGpCADcCACADQbABakE0akIANwIAIANBsAFqQTxqQgA3AgAgA0IANwK0ASADQcAANgKwASAD\
QcgCaiADQbABakHEABCgARogA0EgakE4aiIEIANByAJqQTxqKQIANwMAIANBIGpBMGoiBSADQcgCak\
E0aikCADcDACADQSBqQShqIgYgA0HIAmpBLGopAgA3AwAgA0HAAGoiByADQcgCakEkaikCADcDACAD\
QSBqQRhqIgggA0HIAmpBHGopAgA3AwAgA0EgakEQaiIJIANByAJqQRRqKQIANwMAIANBIGpBCGoiCi\
ADQcgCakEMaikCADcDACADIAMpAswCNwMgQeAAEAgiAkUNDCACQgA3AwAgAkEANgIcIAIgAykDIDcC\
ICACQQApA+CcQDcDCCACQRBqQQApA+icQDcDACACQRhqQQAoAvCcQDYCACACQShqIAopAwA3AgAgAk\
EwaiAJKQMANwIAIAJBOGogCCkDADcCACACQcAAaiAHKQMANwIAIAJByABqIAYpAwA3AgAgAkHQAGog\
BSkDADcCACACQdgAaiAEKQMANwIAQYSBwAAhBAwfCyADQbABakEMakIANwIAIANBsAFqQRRqQgA3Ag\
AgA0GwAWpBHGpCADcCACADQbABakEkakIANwIAIANBsAFqQSxqQgA3AgAgA0GwAWpBNGpCADcCACAD\
QbABakE8akIANwIAIANCADcCtAEgA0HAADYCsAEgA0HIAmogA0GwAWpBxAAQoAEaIANB2ABqIgQgA0\
HIAmpBPGopAgA3AwAgA0HQAGoiBSADQcgCakE0aikCADcDACADQSBqQShqIgYgA0HIAmpBLGopAgA3\
AwAgA0EgakEgaiIHIANByAJqQSRqKQIANwMAIANBIGpBGGoiCCADQcgCakEcaikCADcDACADQSBqQR\
BqIgkgA0HIAmpBFGopAgA3AwAgA0EgakEIaiIKIANByAJqQQxqKQIANwMAIAMgAykCzAI3AyBB+AAQ\
CCICRQ0MIAJCADcDACACQQA2AjAgAiADKQMgNwI0IAJBACkDuJxANwMIIAJBEGpBACkDwJxANwMAIA\
JBGGpBACkDyJxANwMAIAJBIGpBACkD0JxANwMAIAJBKGpBACkD2JxANwMAIAJBPGogCikDADcCACAC\
QcQAaiAJKQMANwIAIAJBzABqIAgpAwA3AgAgAkHUAGogBykDADcCACACQdwAaiAGKQMANwIAIAJB5A\
BqIAUpAwA3AgAgAkHsAGogBCkDADcCAEG0gcAAIQQMHgsCQAJAAkACQCABQfyBwABBBhCYAUUNACAB\
QaiCwABBBhCYAUUNASABQdSCwABBBhCYAUUNAiABQYCDwABBBhCYAUUNAyABQfyFwABBBhCYAQ0KIA\
NB5QJqIgRBACkDsJ1AIgs3AAAgA0HdAmpBACkDqJ1AIgw3AAAgA0HVAmpBACkDoJ1AIg03AAAgA0EA\
KQOYnUAiDjcAzQJB+A4QCCICRQ0cIAJCADcDACACIA43AwggAkEQaiANNwMAIAJBGGogDDcDACACQS\
BqIAs3AwAgAkEoakEAQcMAEKgBGiACQQA6APAOIAJBiAFqIAQpAAA3AAAgAkGDAWogA0HIAmpBGGop\
AAA3AAAgAkH7AGogA0HIAmpBEGopAAA3AAAgAkHzAGogA0HQAmopAAA3AAAgAiADKQDIAjcAa0GEhs\
AAIQQMIQsgA0GwAWpBDGpCADcCACADQbABakEUakIANwIAIANBsAFqQRxqQgA3AgAgA0GwAWpBJGpC\
ADcCACADQbABakEsakIANwIAIANBsAFqQTRqQgA3AgAgA0GwAWpBPGpCADcCACADQgA3ArQBIANBwA\
A2ArABIANByAJqIANBsAFqQcQAEKABGiADQdgAaiIEIANByAJqQTxqKQIANwMAIANB0ABqIgUgA0HI\
AmpBNGopAgA3AwAgA0HIAGoiBiADQcgCakEsaikCADcDACADQcAAaiIHIANByAJqQSRqKQIANwMAIA\
NBOGoiCCADQcgCakEcaikCADcDACADQTBqIgkgA0HIAmpBFGopAgA3AwAgA0EgakEIaiIKIANByAJq\
QQxqKQIANwMAIAMgAykCzAI3AyBB8AAQCCICRQ0PIAIgAykDIDcCDCACQQA2AgggAkIANwMAIAJBHG\
ogCSkDADcCACACQRRqIAopAwA3AgAgAkEkaiAIKQMANwIAIAJBLGogBykDADcCACACQTRqIAYpAwA3\
AgAgAkE8aiAFKQMANwIAIAJBxABqIAQpAwA3AgAgAkHUAGpBACkC/JxANwIAIAJBACkC9JxANwJMIA\
JB5ABqQQApAoydQDcCACACQdwAakEAKQKEnUA3AgBBhILAACEEDCALIANBsAFqQQxqQgA3AgAgA0Gw\
AWpBFGpCADcCACADQbABakEcakIANwIAIANBsAFqQSRqQgA3AgAgA0GwAWpBLGpCADcCACADQbABak\
E0akIANwIAIANBsAFqQTxqQgA3AgAgA0IANwK0ASADQcAANgKwASADQcgCaiADQbABakHEABCgARog\
A0HYAGoiBCADQcgCakE8aikCADcDACADQdAAaiIFIANByAJqQTRqKQIANwMAIANByABqIgYgA0HIAm\
pBLGopAgA3AwAgA0HAAGoiByADQcgCakEkaikCADcDACADQThqIgggA0HIAmpBHGopAgA3AwAgA0Ew\
aiIJIANByAJqQRRqKQIANwMAIANBIGpBCGoiCiADQcgCakEMaikCADcDACADIAMpAswCNwMgQfAAEA\
giAkUNDyACIAMpAyA3AgwgAkEANgIIIAJCADcDACACQRxqIAkpAwA3AgAgAkEUaiAKKQMANwIAIAJB\
JGogCCkDADcCACACQSxqIAcpAwA3AgAgAkE0aiAGKQMANwIAIAJBPGogBSkDADcCACACQcQAaiAEKQ\
MANwIAIAJB1ABqQQApA6CdQDcCACACQQApA5idQDcCTCACQeQAakEAKQOwnUA3AgAgAkHcAGpBACkD\
qJ1ANwIAQbCCwAAhBAwfCyADQQA2ArABIANBsAFqQQRyQQBBgAEQqAEaIANBgAE2ArABIANByAJqIA\
NBsAFqQYQBEKABGiADQSBqIANByAJqQQRyQYABEKABGkHYARAIIgJFDQ8gAkIANwMIIAJCADcDACAC\
QQA2AlAgAkEAKQO4nUA3AxAgAkEYakEAKQPAnUA3AwAgAkEgakEAKQPInUA3AwAgAkEoakEAKQPQnU\
A3AwAgAkEwakEAKQPYnUA3AwAgAkE4akEAKQPgnUA3AwAgAkHAAGpBACkD6J1ANwMAIAJByABqQQAp\
A/CdQDcDACACQdQAaiADQSBqQYABEKABGkHcgsAAIQQMHgsgA0EANgKwASADQbABakEEckEAQYABEK\
gBGiADQYABNgKwASADQcgCaiADQbABakGEARCgARogA0EgaiADQcgCakEEckGAARCgARpB2AEQCCIC\
RQ0PIAJCADcDCCACQgA3AwAgAkEANgJQIAJBACkD+J1ANwMQIAJBGGpBACkDgJ5ANwMAIAJBIGpBAC\
kDiJ5ANwMAIAJBKGpBACkDkJ5ANwMAIAJBMGpBACkDmJ5ANwMAIAJBOGpBACkDoJ5ANwMAIAJBwABq\
QQApA6ieQDcDACACQcgAakEAKQOwnkA3AwAgAkHUAGogA0EgakGAARCgARpBiIPAACEEDB0LAkACQA\
JAIAEpAABC89CFm9PFjJk0UQ0AIAEpAABC89CFm9PFzJo2UQ0BIAEpAABC89CFm9PljJw0UQ0CIAEp\
AABC89CFm9OlzZgyUg0IIANBADYCsAEgA0GwAWpBBHJBAEHIABCoARogA0HIADYCsAEgA0HIAmogA0\
GwAWpBzAAQoAEaIANBIGogA0HIAmpBBHJByAAQoAEaQZgCEAgiAkUNFSACQQBBzAEQqAFBzAFqIANB\
IGpByAAQoAEaQZiEwAAhBAwfCyADQQA2ArABIANBsAFqQQRyQQBBkAEQqAEaIANBkAE2ArABIANByA\
JqIANBsAFqQZQBEKABGiADQSBqIANByAJqQQRyQZABEKABGkHgAhAIIgJFDREgAkEAQcwBEKgBQcwB\
aiADQSBqQZABEKABGkGsg8AAIQQMHgsgA0EANgKwASADQbABakEEckEAQYgBEKgBGiADQYgBNgKwAS\
ADQcgCaiADQbABakGMARCgARogA0EgaiADQcgCakEEckGIARCgARpB2AIQCCICRQ0RIAJBAEHMARCo\
AUHMAWogA0EgakGIARCgARpB0IPAACEEDB0LIANBADYCsAEgA0GwAWpBBHJBAEHoABCoARogA0HoAD\
YCsAEgA0HIAmogA0GwAWpB7AAQoAEaIANBIGogA0HIAmpBBHJB6AAQoAEaQbgCEAgiAkUNESACQQBB\
zAEQqAFBzAFqIANBIGpB6AAQoAEaQfSDwAAhBAwcCyADQQA2ArABIANBsAFqQQRyQQBBkAEQqAEaIA\
NBkAE2ArABIANByAJqIANBsAFqQZQBEKABGiADQSBqIANByAJqQQRyQZABEKABGkHgAhAIIgJFDRIg\
AkEAQcwBEKgBQcwBaiADQSBqQZABEKABGkHIhMAAIQQMGwsgA0EANgKwASADQbABakEEckEAQYgBEK\
gBGiADQYgBNgKwASADQcgCaiADQbABakGMARCgARogA0EgaiADQcgCakEEckGIARCgARpB2AIQCCIC\
RQ0SIAJBAEHMARCoAUHMAWogA0EgakGIARCgARpB+ITAACEEDBoLIANBADYCsAEgA0GwAWpBBHJBAE\
HoABCoARogA0HoADYCsAEgA0HIAmogA0GwAWpB7AAQoAEaIANBIGogA0HIAmpBBHJB6AAQoAEaQbgC\
EAgiAkUNEiACQQBBzAEQqAFBzAFqIANBIGpB6AAQoAEaQaiFwAAhBAwZCyABQaiGwABBBRCYAQ0BIA\
NBsAFqQQxqQgA3AgAgA0GwAWpBFGpCADcCACADQbABakEcakIANwIAIANBsAFqQSRqQgA3AgAgA0Gw\
AWpBLGpCADcCACADQbABakE0akIANwIAIANBsAFqQTxqQgA3AgAgA0IANwK0ASADQcAANgKwASADQc\
gCaiADQbABakHEABCgARogA0HYAGoiBCADQcgCakE8aikCADcDACADQdAAaiIFIANByAJqQTRqKQIA\
NwMAIANByABqIgYgA0HIAmpBLGopAgA3AwAgA0HAAGoiByADQcgCakEkaikCADcDACADQSBqQRhqIg\
ggA0HIAmpBHGopAgA3AwAgA0EgakEQaiIJIANByAJqQRRqKQIANwMAIANBIGpBCGoiCiADQcgCakEM\
aikCADcDACADIAMpAswCNwMgQ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LM5kBBAEEANg\
LA6UBBAEHU5sAANgLg5kBBAEHM5sAANgLU5kBBAEHU5sAANgLc5kBBAEHc5sAANgLo5kBBAEHc5sAA\
NgLk5kBBAEHk5sAANgLw5kBBAEHk5sAANgLs5kBBAEHs5sAANgL45kBBAEHs5sAANgL05kBBAEH05s\
AANgKA50BBAEH05sAANgL85kBBAEH85sAANgKI50BBAEH85sAANgKE50BBAEGE58AANgKQ50BBAEGE\
58AANgKM50BBAEGM58AANgKY50BBAEGM58AANgKU50BBAEGU58AANgKg50BBAEGc58AANgKo50BBAE\
GU58AANgKc50BBAEGk58AANgKw50BBAEGc58AANgKk50BBAEGs58AANgK450BBAEGk58AANgKs50BB\
AEG058AANgLA50BBAEGs58AANgK050BBAEG858AANgLI50BBAEG058AANgK850BBAEHE58AANgLQ50\
BBAEG858AANgLE50BBAEHM58AANgLY50BBAEHE58AANgLM50BBAEHU58AANgLg50BBAEHM58AANgLU\
50BBAEHc58AANgLo50BBAEHU58AANgLc50BBAEHk58AANgLw50BBAEHc58AANgLk50BBAEHs58AANg\
L450BBAEHk58AANgLs50BBAEH058AANgKA6EBBAEHs58AANgL050BBAEH858AANgKI6EBBAEH058AA\
NgL850BBAEGE6MAANgKQ6EBBAEH858AANgKE6EBBAEGM6MAANgKY6EBBAEGE6MAANgKM6EBBACAGNg\
Ko6UBBAEGM6MAANgKU6EBBACAIQVhqIgA2AqDpQCAGIABBAXI2AgQgBiAAakEoNgIEQQBBgICAATYC\
xOlADAoLIAAoAgwNACAFIAFLDQAgBiABSw0CC0EAQQAoAsjpQCIAIAYgACAGSRs2AsjpQCAGIAhqIQ\
VBtOnAACEAAkACQAJAA0AgACgCACAFRg0BIAAoAggiAA0ADAILCyAAKAIMRQ0BC0G06cAAIQACQANA\
AkAgACgCACIFIAFLDQAgBSAAKAIEaiIFIAFLDQILIAAoAggiAA0ACwALQQAgBjYCqOlAQQAgCEFYai\
IANgKg6UAgBiAAQQFyNgIEIAYgAGpBKDYCBEEAQYCAg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4jAEGwAmsiAyQAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQekAai0AAEEGdCAALQBoaiIERQ0A\
IAAgASACQYAIIARrIgQgBCACSxsiBRA8GiACIAVrIgJFDQEgA0H4AGpBEGogAEEQaiIEKQMANwMAIA\
NB+ABqQRhqIABBGGoiBikDADcDACADQfgAakEgaiAAQSBqIgcpAwA3AwAgA0H4AGpBMGogAEEwaikD\
ADcDACADQfgAakE4aiAAQThqKQMANwMAIANB+ABqQcAAaiAAQcAAaikDADcDACADQfgAakHIAGogAE\
HIAGopAwA3AwAgA0H4AGpB0ABqIABB0ABqKQMANwMAIANB+ABqQdgAaiAAQdgAaikDADcDACADQfgA\
akHgAGogAEHgAGopAwA3AwAgAyAAKQMINwOAASADIAApAyg3A6ABIABB6QBqLQAAIQggAC0AaiEJIA\
MgAC0AaCIKOgDgASADIAApAwAiHjcDeCADIAkgCEVyQQJyIgg6AOEBIANB6AFqQRhqIgkgBykCADcD\
ACADQegBakEQaiIHIAYpAgA3AwAgA0HoAWpBCGoiBiAEKQIANwMAIAMgACkCCDcD6AEgA0HoAWogA0\
H4AGpBKGogCiAeIAgQCiAJKAIAIQggBygCACEHIAYoAgAhCSADKAKEAiEKIAMoAvwBIQsgAygC9AEh\
DCADKALsASENIAMoAugBIQ4gACAAKQMAEBcgAEHwDmoiDy0AACIGQTdPDQIgACAGQQV0aiIEQZABai\
AONgIAIARBrAFqIAo2AgAgBEGoAWogCDYCACAEQaQBaiALNgIAIARBoAFqIAc2AgAgBEGcAWogDDYC\
ACAEQZgBaiAJNgIAIARBlAFqIA02AgAgDyAGQQFqOgAAIABBKGoiBEIANwMAIARBCGpCADcDACAEQR\
BqQgA3AwAgBEEYakIANwMAIARBIGpCADcDACAEQShqQgA3AwAgBEEwakIANwMAIARBOGpCADcDACAA\
QQA7AWggAEEIaiIEIAApA3A3AwAgBEEIaiAAQfgAaikDADcDACAEQRBqIABBgAFqKQMANwMAIARBGG\
ogAEGIAWopAwA3AwAgACAA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isAAEIwBAAvqEQEYfyMAIQIgACgCACEDIAAoAgghBCAAKAIMIQUgACgCBCEG\
IAJBwABrIgJBGGoiB0IANwMAIAJBIGoiCEIANwMAIAJBOGoiCUIANwMAIAJBMGoiCkIANwMAIAJBKG\
oiC0IANwMAIAJBCGoiDCABKQAINwMAIAJBEGoiDSABKQAQNwMAIAcgASgAGCIONgIAIAggASgAICIP\
NgIAIAIgASkAADcDACACIAEoABwiEDYCHCACIAEoACQiETYCJCALIAEoACgiEjYCACACIAEoACwiCz\
YCLCAKIAEoADAiEzYCACACIAEoADQiCjYCNCAJIAEoADgiFDYCACACIAEoADwiCTYCPCAAIAMgDSgC\
ACINIA8gEyACKAIAIhUgESAKIAIoAgQiFiACKAIUIhcgCiARIBcgFiATIA8gDSAGIBUgAyAEIAZxai\
AFIAZBf3NxampB+Miqu31qQQd3aiIBaiAGIAIoAgwiGGogBCAMKAIAIgxqIAUgFmogASAGcWogBCAB\
QX9zcWpB1u6exn5qQQx3IAFqIgIgAXFqIAYgAkF/c3FqQdvhgaECakERdyACaiIHIAJxaiABIAdBf3\
NxakHunfeNfGpBFncgB2oiASAHcWogAiABQX9zcWpBr5/wq39qQQd3IAFqIghqIBAgAWogDiAHaiAX\
IAJqIAggAXFqIAcgCEF/c3FqQaqMn7wEakEMdyAIaiICIAhxaiABIAJBf3NxakGTjMHBempBEXcgAm\
oiASACcWogCCABQX9zcWpBgaqaampBFncgAWoiByABcWogAiAHQX9zcWpB2LGCzAZqQQd3IAdqIghq\
IAsgB2ogEiABaiARIAJqIAggB3FqIAEgCEF/c3FqQa/vk9p4akEMdyAIaiICIAhxaiAHIAJBf3Nxak\
Gxt31qQRF3IAJqIgEgAnFqIAggAUF/c3FqQb6v88p4akEWdyABaiIHIAFxaiACIAdBf3NxakGiosDc\
BmpBB3cgB2oiCGogFCABaiAKIAJqIAggB3FqIAEgCEF/c3FqQZPj4WxqQQx3IAhqIgIgCHFqIAcgAk\
F/cyIZcWpBjofls3pqQRF3IAJq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gAiAVNwO4ASACIAk6ANkBQcAAIQYgAkHAADoA\
2AFCACESIAJCADcDcCABQWBqIQEgCSEKIAtBAWoiC0EBRw0ACwsgAiACQfAAakHwABCgASIBLQBpIQ\
ggAS0AaCEGDAILQQAgC2sgA0H8isAAEI8BAAsgAkEQaiABQRBqKQMANwMAIAJBGGogAUEYaikDADcD\
ACACQSBqIAFBIGopAwA3AwAgAkEwaiABQTBqKQMANwMAIAJBOGogAUE4aikDADcDACACQcAAaiABQc\
AAaikDADcDACACQcgAaiABQcgAaikDADcDACACQdAAaiABQdAAaikDADcDACACQdgAaiABQdgAaikD\
ADcDACACQeAAaiABQeAAaikDADcDACACIAEpAwg3AwggAiABKQMoNwMoIAFB6QBqLQAAIQUgAS0Aai\
EHIAIgAS0AaCIGOgBoIAIgASkDADcDACACIAcgBUVyQQJyIgg6AGkLIAJB8ABqQRhqIgEgAkEgaikD\
ADcDACACQfAAakEQaiIFIAJBGGopAwA3AwAgAkHwAGpBCGoiByACQRBqKQMANwMAIAIgAikDCDcDcC\
ACQfAAaiACQShqIAZCACAIQQhyEAogACABKQMANwAYIAAgBSkDADcAECAAIAcpAwA3AAggACACKQNw\
NwAAIAJB4AFqJAAPCyAHIANB7IrAABCPAQALpwgCAX8tfiAAKQPAASECIAApA5gBIQMgACkDcCEEIA\
ApA0ghBSAAKQMgIQYgACkDuAEhByAAKQOQASEIIAApA2ghCSAAKQNAIQogACkDGCELIAApA7ABIQwg\
ACkDiAEhDSAAKQNgIQ4gACkDOCEPIAApAxAhECAAKQOoASERIAApA4ABIRIgACkDWCETIAApAzAhFC\
AAKQMIIRUgACkDoAEhFiAAKQN4IRcgACkDUCEYIAApAyghGSAAKQMAIRpBwH4hAQNAIAwgDSAOIA8g\
EIWFhYUiG0IBiSAWIBcgGCAZIBqFhYWFIhyFIh0gFIUhHiACIAcgCCAJIAogC4WFhYUiHyAcQgGJhS\
IchSEgIAIgAyAEIAUgBoWFhYUiIUIBiSAbhSIbIAqFQjeJIiIgH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ICJAACQAJAIAEoAgAiA0EQTw0AIAFBBGoiBCADakEQIANr\
IgMgAxCoARogAUEANgIAIAFBFGoiAyAEEA0gAkEQakEIaiIEIAFBzABqIgUpAAA3AwAgAiABQcQAai\
IGKQAANwMQIAMgAkEQahANIAJBCGoiByABQRxqIggpAgA3AwAgAiABKQIUNwMAIAJBEGpBKGoiCUIA\
NwMAIAJBEGpBIGoiCkIANwMAIAJBEGpBGGoiC0IANwMAIAJBEGpBEGoiDEIANwMAIARCADcDACACQg\
A3AxAgAkHQAGpBDGoiDUIANwIAIAJCADcCVCACQRA2AlAgAkHoAGpBEGogAkHQAGpBEGooAgA2AgAg\
AkHoAGpBCGoiDiACQdAAakEIaiIPKQMANwMAIAIgAikDUDcDaCACQRBqQThqIhAgAkHoAGpBDGoiES\
kCADcDACACQRBqQTBqIhIgAikCbDcDACAFIBApAwA3AAAgBiASKQMANwAAIAFBPGogCSkDADcAACAB\
QTRqIAopAwA3AAAgAUEsaiALKQMANwAAIAFBJGogDCkDADcAACAIIAQpAwA3AAAgASACKQMQNwAUIA\
FBADYCAEEQEAgiBUUNASAFIAIpAwA3AAAgBUEIaiAHKQMANwAAIAlCADcDACAKQgA3AwAgC0IANwMA\
IAJBEGpBEGoiBkIANwMAIARCADcDACACQgA3AxAgDUIANwIAIAJCADcCVCACQRA2AlAgAkHoAGpBEG\
ogAkHQAGpBEGooAgA2AgAgDiAPKQMANwMAIAIgAikDUDcDaCAQIBEpAgA3AwAgEiACKQJsNwMAIANB\
OGogECkDADcAACADQTBqIBIpAwA3AAAgA0EoaiAJKQMANwAAIANBIGogCikDADcAACADQRhqIAspAw\
A3AAAgA0EQaiAGKQMANwAAIANBCGogBCkDADcAACADIAIpAxA3AAAgAUEANgIAIABBEDYCBCAAIAU2\
AgAgAkGAAWokAA8LQbSfwABBFyACQRBqQcCbwABB0JvAABCCAQALQRBBAUEAKALc6UAiAkECIAIbEQ\
QAAAv2BQIHfwh+IwBBoAFrIgIkACACQTBqQSxqQgA3AgAgAkEwakEkakIANwIAIAJBMGpBHGpCADcC\
ACACQTBqQRRqQgA3AgAgAkEwakEMakIANwIAIAJCADcCNCACQTA2AjAgAkHoAGpBMGogAkEwakEwai\
gCADYCACACQegAakEoaiACQTBqQShqKQMANwMAIAJB6ABqQSBqIAJBMGpBIGopAwA3AwAgAkHoAGpB\
GGogAkEwakEYaikDADcDACACQegAakEQaiACQTBqQRBqKQMANwMAIAJB6ABqQQhqIAJBMGpBCGopAw\
A3AwAgAiACKQMwNwNoIAJBKGoiAyACQegAakEsaikCADcDACACQSBqIgQgAkHoAGpBJGopAgA3AwAg\
AkEYaiIFIAJB6ABqQRxqKQIANwMAIAJBEGoiBiACQegAakEUaikCADcDACACQQhqIgcgAkHoAGpBDG\
opAgA3AwAgAiACKQJsNwMAIAEgAhAeIAFCADcDCCABQgA3AwAgAUEANgJQIAFBACkDuJ1AIgk3AxAg\
AUEYakEAKQPAnUAiCjcDACABQSBqQQApA8idQCILNwMAIAFBKGpBACkD0J1AIgw3AwAgAUEwakEAKQ\
PYnUAiDTcDACABQThqQQApA+CdQCIONwMAIAFBwABqQQApA+idQCIPNwMAIAFByABqQQApA/CdQCIQ\
NwMAAkBBMBAIIggNAEEwQQFBACgC3OlAIgJBAiACGxEEAAALIAggAikDADcAACAIQShqIAMpAwA3AA\
AgCEEgaiAEKQMANwAAIAhBGGogBSkDADcAACAIQRBqIAYpAwA3AAAgCEEIaiAHKQMANwAAIAFCADcD\
CCABQgA3AwAgAUEANgJQIAFBEGoiASAJNwMAIAFBCGogCjcDACABQRBqIAs3AwAgAUEYaiAMNwMAIA\
FBIGogDTcDACABQShqIA43AwAgAUEwaiAPNwMAIAFBOGogEDcDACAAQTA2AgQgACAINgIAIAJBoAFq\
JAAL4QUCCX8IfiMAQdABayICJAAgAkHAAGpBDGpCADcCACACQcAAakEUakIANwIAIAJBwABqQRxqQg\
A3AgAgAkHAAGpBJGpCADcCACACQcAAakEsakIANwIAIAJBwABqQTRqQgA3AgAgAkH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AEHwAGsiAiQAIAJBIGpBHGpCADcCACACQS\
BqQRRqQgA3AgAgAkEgakEMakIANwIAIAJCADcCJCACQSA2AiAgAkHIAGpBGGogAkEgakEYaikDADcD\
ACACQcgAakEQaiACQSBqQRBqKQMANwMAIAJByABqQQhqIAJBIGpBCGopAwA3AwAgAkHIAGpBIGogAk\
EgakEgaigCADYCACACIAIpAyA3A0ggAkEQaiACQcgAakEUaikCADcDACACQQhqIAJByABqQQxqKQIA\
NwMAIAJBGGogAkHIAGpBHGopAgA3AwAgAiACKQJMNwMAIAIgARASIAFCADcDACABQSBqIAFBiAFqKQ\
MANwMAIAFBGGogAUGAAWopAwA3AwAgAUEQaiABQfgAaikDADcDACABIAEpA3A3AwggAUEoakEAQcIA\
EKgBIQMCQCABQfAOaiIELQAARQ0AIARBADoAAAsCQEEgEAgiBA0AQSBBAUEAKALc6UAiAkECIAIbEQ\
QAAAsgBCACKQMANwAAIARBGGogAkEYaikDADcAACAEQRBqIAJBEGopAwA3AAAgBEEIaiACQQhqKQMA\
NwAAIAFCADcDACABQQhqIgVBGGogAUHwAGoiAUEYaikDADcDACAFQRBqIAFBEGopAwA3AwAgBUEIai\
ABQQhqKQMANwMAIAUgASkDADcDACADQQBBwgAQqAEaIABBIDYCBCAAIAQ2AgAgAkHwAGokAAuJBAEH\
fyMAQaADayICJAAgAkHoAmpBLGpCADcCACACQegCakEkakIANwIAIAJB6AJqQRxqQgA3AgAgAkHoAm\
pBFGpCADcCACACQegCakEMakIANwIAIAJCADcC7AIgAkEwNgLoAiACQTBqQTBqIAJB6AJqQTBqKAIA\
NgIAIAJBMGpBKGogAkHoAmpBKGopAwA3AwAgAkEwakEgaiACQegCakEgaikDADcDACACQTBqQRhqIA\
JB6AJqQRhqKQMANwMAIAJBMGpBEGogAkHoAmpBEGopAwA3AwAgAkEwakEIaiACQegCakEIaikDADcD\
ACACIAIpA+gCNwMwIAJBKGoiAyACQTBqQSxqKQIANwMAIAJBIGoiBCACQTBqQSRqKQIANwMAIAJBGG\
oiBSACQTBqQRxqKQIANwMAIAJBEGoiBiACQTBqQRRqKQIANwMAIAJBCGoiByACQTBqQQxqKQIANwMA\
IAIgAikCNDcDACACQTBqIAFBuAIQoAEaIAJBMGogAhBgAkBBMBAIIggNAEEwQQFBACgC3OlAIgJBAi\
ACGxEEAAALIAggAikDADcAACAIQShqIAMpAwA3AAAgCEEgaiAEKQMANwAAIAhBGGogBSkDADcAACAI\
QRBqIAYpAwA3AAAgCEEIaiAHKQMANwAAIAEQDyAAQTA2AgQgACAINgIAIAJBoANqJAALiQQBB38jAE\
GgA2siAiQAIAJB6AJqQSxqQgA3AgAgAkHoAmpBJGpCADcCACACQegCakEcakIANwIAIAJB6AJqQRRq\
QgA3AgAgAkHoAmpBDGpCADcCACACQgA3AuwCIAJBMDYC6AIgAkEwakEwaiACQegCakEwaigCADYCAC\
ACQTBqQShqIAJB6AJqQShqKQMANwMAIAJBMGpBIGogAkHoAmpBIGopAwA3AwAgAkEwakEYaiACQegC\
akEYaikDADcDACACQTBqQRBqIAJB6AJqQRBqKQMANwMAIAJBMGpBCGogAkHoAmpBCGopAwA3AwAgAi\
ACKQPoAjcDMCACQShqIgMgAkEwakEsaikCADcDACACQSBqIgQgAkEwakEkaikCADcDACACQRhqIgUg\
AkEwakEcaikCADcDACACQRBqIgYgAkEwakEUaikCADcDACACQQhqIgcgAkEwakEMaikCADcDACACIA\
IpAjQ3AwAgAkEwaiABQbgCEKABGiACQTBqIAIQXwJAQTAQCCIIDQBBMEEBQQAoAtzpQCICQQIgAhsR\
BAAACyAIIAIpAwA3AAAgCEEoaiADKQMANwAAIAhBIGogBCkDADcAACAIQRhqIAUpAwA3AAAgCEEQai\
AGKQMANwAAIAhBCGogBykDADcAACABEA8gAEEwNgIEIAAgCDYCACACQaADaiQAC4kEAQd/IwBBwAJr\
IgIkACACQYgCakEsakIANwIAIAJBiAJqQSRqQgA3AgAgAkGIAmpBHGpCADcCACACQYgCakEUakIANw\
IAIAJBiAJqQQxqQgA3AgAgAkIANwKMAiACQTA2AogCIAJBMGpBMGogAkGIAmpBMGooAgA2AgAgAkEw\
akEoaiACQYgCakEoaikDADcDACACQTBqQSBqIAJBiAJqQSBqKQMANwMAIAJBMGpBGGogAkGIAmpBGG\
opAwA3AwAgAkEwakEQaiACQYgCakEQaikDADcDACACQTBqQQhqIAJBiAJqQQhqKQMANwMAIAIgAikD\
iAI3AzAgAkEoaiIDIAJBMGpBLGopAgA3AwAgAkEgaiIEIAJBMGpBJGopAgA3AwAgAkEYaiIFIAJBMG\
pBHGopAgA3AwAgAkEQaiIGIAJBMGpBFGopAgA3AwAgAkEIaiIHIAJBMGpBDGopAgA3AwAgAiACKQI0\
NwMAIAJBMGogAUHYARCgARogAkEwaiACEB4CQEEwEAgiCA0AQTBBAUEAKALc6UAiAkECIAIbEQQAAA\
sgCCACKQMANwAAIAhBKGogAykDADcAACAIQSBqIAQpAwA3AAAgCEEYaiAFKQMANwAAIAhBEGogBikD\
ADcAACAIQQhqIAcpAwA3AAAgARAPIABBMDYCBCAAIAg2AgAgAkHAAmokAAuIBAEHfyMAQaABayICJA\
AgAkEwakEsakIANwIAIAJBMGpBJGpCADcCACACQTBqQRxqQgA3AgAgAkEwakEUakIANwIAIAJBMGpB\
DGpCADcCACACQgA3AjQgAkEwNgIwIAJB6ABqQTBqIAJBMGpBMGooAgA2AgAgAkHoAGpBKGogAkEwak\
EoaikDADcDACACQegAakEgaiACQTBqQSBqKQMANwMAIAJB6ABqQRhqIAJBMGpBGGopAwA3AwAgAkHo\
AGpBEGogAkEwakEQaikDADcDACACQegAakEIaiACQTBqQQhqKQMANwMAIAIgAikDMDcDaCACQShqIg\
MgAkHoAGpBLGopAgA3AwAgAkEgaiIEIAJB6ABqQSRqKQIANwMAIAJBGGoiBSACQegAakEcaikCADcD\
ACACQRBqIgYgAkHoAGpBFGopAgA3AwAgAkEIaiIHIAJB6ABqQQxqKQIANwMAIAIgAikCbDcDACABIA\
IQXyABQQBBzAEQqAEhCAJ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GpBPGopAgA3AwAgAkEwaiIEIAJBwABqQTRqKQIANwMAIAJBKGoi\
BSACQcAAakEsaikCADcDACACQSBqIgYgAkHAAGpBJGopAgA3AwAgAkEYaiIHIAJBwABqQRxqKQIANw\
MAIAJBEGoiCCACQcAAakEUaikCADcDACACQQhqIgkgAkHAAGpBDGopAgA3AwAgAiACKQJENwMAIAJB\
wABqIAFBmAIQoAEaIAJBwABqIAIQTwJAQcAAEAgiCg0AQcAAQQFBACgC3OlAIgJBAiACGxEEAAALIA\
ogAikDADcAACAKQThqIAMpAwA3AAAgCkEwaiAEKQMANwAAIApBKGogBSkDADcAACAKQSBqIAYpAwA3\
AAAgCkEYaiAHKQMANwAAIApBEGogCCkDADcAACAKQQhqIAkpAwA3AAAgARAPIABBwAA2AgQgACAKNg\
IAIAJBoANqJAAL9AMBCX8jAEGgA2siAiQAIAJB2AJqQQxqQgA3AgAgAkHYAmpBFGpCADcCACACQdgC\
akEcakIANwIAIAJB2AJqQSRqQgA3AgAgAkHYAmpBLGpCADcCACACQdgCakE0akIANwIAIAJB2AJqQT\
xqQgA3AgAgAkIANwLcAiACQcAANgLYAiACQcAAaiACQdgCakHEABCgARogAkE4aiIDIAJBwABqQTxq\
KQIANwMAIAJBMGoiBCACQcAAakE0aikCADcDACACQShqIgUgAkHAAGpBLGopAgA3AwAgAkEgaiIGIA\
JBwABqQSRqKQIANwMAIAJBGGoiByACQcAAakEcaikCADcDACACQRBqIgggAkHAAGpBFGopAgA3AwAg\
AkEIaiIJIAJBwABqQQxqKQIANwMAIAIgAikCRDcDACACQcAAaiABQZgCEKABGiACQcAAaiACEFACQE\
HAABAIIgoNAEHAAEEBQQAoAtzpQCICQQIgAhsRBAAACyAKIAIpAwA3AAAgCkE4aiADKQMANwAAIApB\
MGogBCkDADcAACAKQShqIAUpAwA3AAAgCkEgaiAGKQMANwAAIApBGGogBykDADcAACAKQRBqIAgpAw\
A3AAAgCkEIaiAJKQMANwAAIAEQDyAAQcAANgIEIAAgCjYCACACQaADaiQAC/QDAQl/IwBB4AJrIgIk\
ACACQZgCakEMakIANwIAIAJBmAJqQRRqQgA3AgAgAkGYAmpBHGpCADcCACACQZgCakEkakIANwIAIA\
JBmAJqQSxqQgA3AgAgAkGYAmpBNGpCADcCACACQZgCakE8akIANwIAIAJCADcCnAIgAkHAADYCmAIg\
AkHAAGogAkGYAmpBxAAQoAEaIAJBOGoiAyACQcAAakE8aikCADcDACACQTBqIgQgAkHAAGpBNGopAg\
A3AwAgAkEoaiIFIAJBwABqQSxqKQIANwMAIAJBIGoiBiACQcAAakEkaikCADcDACACQRhqIgcgAkHA\
AGpBHGopAgA3AwAgAkEQaiIIIAJBwABqQRRqKQIANwMAIAJBCGoiCSACQcAAakEMaikCADcDACACIA\
IpAkQ3AwAgAkHAAGogAUHYARCgARogAkHAAGogAhAWAkBBwAAQCCIKDQBBwABBAUEAKALc6UAiAkEC\
IAIbEQQAAAsgCiACKQMANwAAIApBOGogAykDADcAACAKQTBqIAQpAwA3AAAgCkEoaiAFKQMANwAAIA\
pBIGogBikDADcAACAKQRhqIAcpAwA3AAAgCkEQaiAIKQMANwAAIApBCGogCSkDADcAACABEA8gAEHA\
ADYCBCAAIAo2AgAgAkHgAmokAAvzAwEJfyMAQdABayICJAAgAkHAAGpBDGpCADcCACACQcAAakEUak\
IANwIAIAJBwABqQRxqQgA3AgAgAkHAAGpBJGpCADcCACACQcAAakEsakIANwIAIAJBwABqQTRqQgA3\
AgAgAkHAAGpBPGpCADcCACACQgA3AkQgAkHAADYCQCACQYgBaiACQcAAakHEABCgARogAkE4aiIDIA\
JBiAFqQTxqKQIANwMAIAJBMGoiBCACQYgBakE0aikCADcDACACQShqIgUgAkGIAWpBLGopAgA3AwAg\
AkEgaiIGIAJBiAFqQSRqKQIANwMAIAJBGGoiByACQYgBakEcaikCADcDACACQRBqIgggAkGIAWpBFG\
opAgA3AwAgAkEIaiIJIAJBiAFqQQxqKQIANwMAIAIgAikCjAE3AwAgASACEE8gAUEAQcwBEKgBIQoC\
QEHAABAIIgENAEHAAEEBQQAoAtzpQCICQQIgAhsRBAAACyABIAIpAwA3AAAgAUE4aiADKQMANwAAIA\
FBMGogBCkDADcAACABQShqIAUpAwA3AAAgAUEgaiAGKQMANwAAIAFBGGogBykDADcAACABQRBqIAgp\
AwA3AAAgAUEIaiAJKQMANwAAIApBAEHMARCoARogAEHAADYCBCAAIAE2AgAgAkHQAWokAAvzAwEJfy\
MAQdABayICJAAgAkHAAGpBDGpCADcCACACQcAAakEUakIANwIAIAJBwABqQRxqQgA3AgAgAkHAAGpB\
JGpCADcCACACQcAAakEsakIANwIAIAJBwABqQTRqQgA3AgAgAkHAAGpBPGpCADcCACACQgA3AkQgAk\
HAADYCQCACQYgBaiACQcAAakHEABCgARogAkE4aiIDIAJBiAFqQTxqKQIANwMAIAJBMGoiBCACQYgB\
akE0aikCADcDACACQShqIgUgAkGIAWpBLGopAgA3AwAgAkEgaiIGIAJBiAFqQSRqKQIANwMAIAJBGG\
oiByACQYgBakEcaikCADcDACACQRBqIgggAkGIAWpBFGopAgA3AwAgAkEIaiIJIAJBiAFqQQxqKQIA\
NwMAIAIgAikCjAE3AwAgASACEFAgAUEAQcwBEKgBIQoCQEHAABAIIgENAEHAAEEBQQAoAtzpQCICQQ\
IgAhsRBAAACyABIAIpAwA3AAAgAUE4aiADKQMANwAAIAFBMGogBCkDADcAACABQShqIAUpAwA3AAAg\
AUEgaiAGKQMANwAAIAFBGGogBykDADcAACABQRBqIAgpAwA3AAAgAUEIaiAJKQMANwAAIApBAEHMAR\
CoARogAEHAADYCBCAAIAE2AgAgAkHQAWokAAvwAwIFfwR+IwBB8ABrIgIkACACQSBqQRxqQgA3AgAg\
AkEgakEUakIANwIAIAJBIGpBDGpCADcCACACQgA3AiQgAkEgNgIgIAJByABqQSBqIAJBIGpBIGooAg\
A2AgAgAkHIAGpBGGogAkEgakEYaikDADcDACACQcgAakEQaiACQSBqQRBqKQMANwMAIAJByABqQQhq\
IAJBIGpBCGopAwA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AWpBJGpCADcC\
ACACQaABakEcakIANwIAIAJBoAFqQRRqQgA3AgAgAkGgAWpBDGpCADcCACACQgA3AqQBIAJBKDYCoA\
EgAkEoakEoaiACQaABakEoaigCADYCACACQShqQSBqIAJBoAFqQSBqKQMANwMAIAJBKGpBGGogAkGg\
AWpBGGopAwA3AwAgAkEoakEQaiACQaABakEQaikDADcDACACQShqQQhqIAJBoAFqQQhqKQMANwMAIA\
IgAikDoAE3AyggAkEgaiIDIAJBKGpBJGopAgA3AwAgAkEYaiIEIAJBKGpBHGopAgA3AwAgAkEQaiIF\
IAJBKGpBFGopAgA3AwAgAkEIaiIGIAJBKGpBDGopAgA3AwAgAiACKQIsNwMAIAJBKGogAUH4ABCgAR\
ogAkEoaiACEE4CQEEoEAgiBw0AQShBAUEAKALc6UAiAkECIAIbEQQAAAsgByACKQMANwAAIAdBIGog\
AykDADcAACAHQRhqIAQpAwA3AAAgB0EQaiAFKQMANwAAIAdBCGogBikDADcAACABEA8gAEEoNgIEIA\
AgBzYCACACQdABaiQAC9kDAgV/BH4jAEHgAGsiAiQAIAJBIGpBHGpBADYCACACQSBqQRRqQgA3AgAg\
AkEgakEMakIANwIAIAJCADcCJCACQRw2AiAgAkHAAGpBEGogAkEgakEQaikDADcDACACQcAAakEIai\
ACQSBqQQhqKQMANwMAIAJBwABqQRhqIAJBIGpBGGopAwA3AwAgAkEIaiIDIAJBwABqQQxqKQIANwMA\
IAJBEGoiBCACQcAAakEUaikCADcDACACQRhqIgUgAkHAAGpBHGooAgA2AgAgAiACKQMgNwNAIAIgAi\
kCRDcDACABIAIQQCABQQA2AgggAUIANwMAIAFBACkC9JxAIgc3AkwgAUHUAGpBACkC/JxAIgg3AgAg\
AUHcAGpBACkChJ1AIgk3AgAgAUHkAGpBACkCjJ1AIgo3AgACQEEcEAgiBg0AQRxBAUEAKALc6UAiAk\
ECIAIbEQQAAAsgBiACKQMANwAAIAZBGGogBSgCADYAACAGQRBqIAQpAwA3AAAgBkEIaiADKQMAN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ARDAELIAIoAgAhAiABIAQ2AgQgASACIABqNgIA\
CwJAIAEoAgQiAEEDcUUNACAAQXhxIgIgA0EQak0NACABIABBAXEgA3JBAnI2AgQgASADaiIAIAIgA2\
siA0EDcjYCBCABIAJqIgIgAigCBEEBcjYCBCAAIAMQEQsgAUEIag8LIAAQCCECCyACC4cDAQV/IwBB\
wAFrIgIkACACQZgBakEcakIANwIAIAJBmAFqQRRqQgA3AgAgAkGYAWpBDGpCADcCACACQgA3ApwBIA\
JBIDYCmAEgAkEoakEgaiACQZgBakEgaigCADYCACACQShqQRhqIAJBmAFqQRhqKQMANwMAIAJBKGpB\
EGogAkGYAWpBEGopAwA3AwAgAkEoakEIaiACQZgBakEIaikDADcDACACIAIpA5gBNwMoIAJBCGpBGG\
oiAyACQShqQRxqKQIANwMAIAJBCGpBEGoiBCACQShqQRRqKQIANwMAIAJBCGpBCGoiBSACQShqQQxq\
KQIANwMAIAIgAikCLDcDCCACQShqIAFB8AAQoAEaIAJBKGogAkEIahAvAkBBIBAIIgYNAEEgQQFBAC\
gC3OlAIgJBAiACGxEEAAALIAYgAikDCDcAACAGQRhqIAMpAwA3AAAgBkEQaiAEKQMANwAAIAZBCGog\
BSkDADcAACABEA8gAEEgNgIEIAAgBjYCACACQcABaiQAC5MDAgR/A34jAEHgAGsiAiQAIAJBIGpBFG\
pCADcCACACQSBqQQxqQgA3AgAgAkIANwIkIAJBGDYCICACQcAAakEQaiACQSBqQRBqKQMANwMAIAJB\
wABqQQhqIAJBIGpBCGopAwA3AwAgAkHAAGpBGGogAkEgakEYaigCADYCACACQQhqQQhqIgMgAkHAAG\
pBDGopAgA3AwAgAkEIakEQaiIEIAJBwABqQRRqKQIANwMAIAIgAikDIDcDQCACIAIpAkQ3AwggASAC\
QQhqEBsgAUIANwMAIAFBADYCICABQQApA+CiQCIGNwMIIAFBEGpBACkD6KJAIgc3AwAgAUEYakEAKQ\
PwokAiCDcDAAJAQRgQCCIFDQBBGEEBQQAoAtzpQCICQQIgA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iQAIAJBIGpBHGpCADcC\
ACACQSBqQRRqQgA3AgAgAkEgakEMakIANwIAIAJCADcCJCACQSA2AiAgAkHIAGpBIGogAkEgakEgai\
gCADYCACACQcgAakEYaiACQSBqQRhqKQMANwMAIAJByABqQRBqIAJBIGpBEGopAwA3AwAgAkHIAGpB\
CGogAkEgakEIaikDADcDACACIAIpAyA3A0ggAkEYaiIDIAJByABqQRxqKQIANwMAIAJBEGoiBCACQc\
gAakEUaikCADcDACACQQhqIgUgAkHIAGpBDGopAgA3AwAgAiACKQJMNwMAIAEgAhBqIAFBAEHMARCo\
ASEGAkBBIBAIIgENAEEgQQFBACgC3OlAIgJBAiACGxEEAAALIAEgAikDADcAACABQRhqIAMpAwA3AA\
AgAUEQaiAEKQMANwAAIAFBCGogBSkDADcAACAGQQBBzAEQqAEaIABBIDYCBCAAIAE2AgAgAkHwAGok\
AAuMAwEHfyMAQbABayICJAAgAkHYAGpBBHIgAUEEahB5IAIgASgCADYCWCACQZgBaiIDIAFBPGopAA\
A3AwAgAkGQAWoiBCABQTRqKQAANwMAIAJBiAFqIgUgAUEsaikAADcDACACQfAAakEQaiIGIAFBJGop\
AAA3AwAgAkHwAGpBCGoiByABQRxqKQAANwMAIAIgASkAFDcDcCACQaABaiIIIAFBxABqEHkgAkEQai\
ACQdgAakEQaigCADYCACACQQhqIAJB2ABqQQhqKQMANwMAIAJBHGogBykDADcCACACQSRqIAYpAwA3\
AgAgAkEsaiAFKQMANwIAIAJBNGogBCkDADcCACACQTxqIAMpAwA3AgAgAkHEAGogCCkDADcCACACQc\
wAaiACQagBaikDADcCACACIAIpA1g3AwAgAiACKQNwNwIUAkBB1AAQCCIBDQBB1ABBBEEAKALc6UAi\
AkECIAIbEQQAAAsgASACQdQAEKABIQEgAEHIlsAANgIEIAAgATYCACACQbABaiQAC/ICAQN/AkACQA\
JAAkACQCAALQBoIgNFDQAgA0HBAE8NAyAAIANqQShqIAEgAkHAACADayIDIAMgAksbIgMQoAEaIAAg\
AC0A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QAgAEEwaiADakEEakEAQT8gBWsQqAEaAkBBwAAg\
ACgCMGtBCE8NACACIAQQBCAAKAIwIgNBwQBPDQMgBEEAIAMQqAEaCyAAQewAaiAGQgOGNwIAIAIgBB\
AEIABBADYCMCABIAAoAgg2AAAgASAAQQxqKQIANwAEIAEgAEEUaikCADcADCABIABBHGopAgA3ABQg\
ASAAQSRqKQIANwAcIAEgAEEsaigCADYAJA8LIANBwABBhJ/AABCMAQALIANBwABBlJ/AABCPAQALIA\
NBwABBpJ/AABCNAQALugIBA38jAEEQayICJAACQCAAKALIASIDQccASw0AIAAgA2pBzAFqQQY6AAAC\
QCADQQFqIgRByABGDQAgACAEakHMAWpBAEHHACADaxCoARoLQQAhAyAAQQA2AsgBIABBkwJqIgQgBC\
0AAEGAAXI6AAADQCAAIANqIgQgBC0AACAEQcwBai0AAHM6AAAgA0EBaiIDQcgARw0ACyAAEBMgASAA\
KQAANwAAIAFBOGogAEE4aikAADcAACABQTBqIABBMGopAAA3AAAgAUEoaiAAQShqKQAANwAAIAFBIG\
ogAEEgaikAADcAACABQRhqIABBGGopAAA3AAAgAUEQaiAAQRBqKQAANwAAIAFBCGogAEEIaikAADcA\
ACACQRBqJAAPC0G0n8AAQRcgAkEIakHMn8AAQZShwAAQggEAC7oCAQN/IwBBEGsiAiQAAkAgACgCyA\
EiA0HHAEsNACAAIANqQcwBakEBOgAAAkAgA0EBaiIEQcgARg0AIAAgBGpBzAFqQQBBxwAgA2sQqAEa\
C0EAIQMgAEEANgLIASAAQZMCaiIEIAQtAABBgAFyOgAAA0AgACADaiIEIAQtAAAgBEHMAWotAABzOg\
AAIANBAWoiA0HIAEcNAAsgABATIAEgACkAADcAACABQThqIABBOGopAAA3AAAgAUEwaiAAQTBqKQAA\
NwAAIAFBKGogAEEoaikAADcAACABQSBqIABBIGopAAA3AAAgAUEYaiAAQRhqKQAANwAAIAFBEGogAE\
EQaikAADcAACABQQhqIABBCGopAAA3AAAgAkEQaiQADwtBtJ/AAEEXIA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BACgC3OlAIgJBAiAC\
GxEEAAALIAEgBzcDACABIAIpA1A3AwggAUEQaiADKQMANwMAIAFBGGogBCkDADcDACABQSBqIAUpAw\
A3AwAgAUEoaiAGKQMANwMAIAFBMGogAkEIakHEABCgARogAEGklsAANgIEIAAgATYCACACQcABaiQA\
C6MCAgR/An4gACAAKQMAIgcgAq1CA4Z8Igg3AwAgAEEIaiIDIAMpAwAgCCAHVK18NwMAAkACQEGAAS\
AAKAJQIgNrIgQgAksNACAAQRBqIQUCQCADRQ0AIANBgQFPDQIgAEHUAGoiBiADaiABIAQQoAEaIABB\
ADYCUCAFIAZBARACIAIgBGshAiABIARqIQELIAUgASACQQd2EAIgAEHUAGogASACQYB/cWogAkH/AH\
EiAhCgARogACACNgJQDwsCQAJAIAMgAmoiBCADSQ0AIARBgAFLDQEgAEHQAGogA2pBBGogASACEKAB\
GiAAIAAoAlAgAmo2AlAPCyADIARB5J7AABCRAQALIARBgAFB5J7AABCNAQALIANBgAFB9J7AABCMAQ\
ALnQIBBH8gACAAKQMAIAKtfDcDAAJAAkBBwAAgACgCICIDayIEIAJLDQAgAEEIaiEFAkAgA0UNACAD\
QcEATw0CIABBJGoiBiADaiABIAQQoAEaIAUgBhAJIAIgBGshAiABIARqIQELIAJBP3EhAyABIAJBQH\
EiAmohBAJAIAJFDQBBACACayECA0AgBSABEAkgAUHAAGohASACQcAAaiICDQALCyAAQSRqIAQgAxCg\
ARogACADNgIgDwsCQAJAIAMgAmoiBSADSQ0AIAVBwABLDQEgAEEgaiADakEEaiABIAIQoAEaIAAgAC\
gCICACajYCIA8LIAMgBUH4osAAEJEBAAsgBUHAAEH4osAAEI0BAAsgA0HAAEGIo8AAEIwBAAueAgEE\
fyAAIAApAwAgAq18NwMAAkACQEHAACAAKAIIIgNrIgQgAksNACAAQcwAaiEFAkAgA0UNACADQcEATw\
0CIABBDGoiBiADaiABIAQQoAEaIAUgBhAMIAIgBGshAiABIARqIQELIAJBP3EhAyABIAJBQHEiAmoh\
B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FIAYQBCACIARrIQIgASAEaiEBCyACQT9xIQMgASACQUBxIgJqIQQCQCACRQ0AQQAgAmshAg\
NAIAUgARAEIAFBwABqIQEgAkHAAGoiAg0ACwsgAEE0aiAEIAMQoAEaIAAgAzYCMA8LAkACQCADIAJq\
IgUgA0kNACAFQcAASw0BIABBMGogA2pBBGogASACEKABGiAAIAAoAjAgAmo2AjAPCyADIAVB+KLAAB\
CRAQALIAVBwABB+KLAABCNAQALIANBwABBiKPAABCMAQALpwICA38CfiMAQcAAayICJAAgAkEQakEM\
akIANwIAIAJCADcCFCACQRA2AhAgAkEoakEQaiACQRBqQRBqKAIANgIAIAJBKGpBCGogAkEQakEIai\
kDADcDACACQQhqIgMgAkEoakEMaikCADcDACACIAIpAxA3AyggAiACKQIsNwMAIAEgAhBkIAFBADYC\
CCABQgA3AwAgAUHUAGpBACkCsJxAIgU3AgAgAUEAKQKonEAiBjcCTAJAQRAQCCIEDQBBEEEBQQAoAt\
zpQCICQQIgAhsRBAAACyAEIAIpAwA3AAAgBEEIaiADKQMANwAAIAFBADYCCCABQgA3AwAgAUHMAGoi\
AUEIaiAFNwIAIAEgBjcCACAAQRA2AgQgACAENgIAIAJBwABqJAALpwICA38CfiMAQcAAayICJAAgAk\
EQakEMakIANwIAIAJCADcCFCACQRA2AhAgAkEoakEQaiACQRBqQRBqKAIANgIAIAJBKGpBCGogAkEQ\
akEIaikDADcDACACQQhqIgMgAkEoakEMaikCADcDACACIAIpAxA3AyggAiACKQIsNwMAIAEgAhBlIA\
FBADYCCCABQgA3AwAgAUHUAGpBACkCsJxAIgU3AgAgAUEAKQKonEAiBjcCTAJAQRAQCCIEDQBBEEEB\
QQAoAtzpQCICQQIgAhsRBAAACyAEIAIpAwA3AAAgBEEIaiADKQMANwAAIAFBADYCCCABQgA3AwAgAU\
HMAGoiAUEIaiAFNwIAIAEgBjcCACAAQRA2AgQgACAENgIAIAJBwABqJAALmgIBBH8jAEGQAWsiAiQA\
IAJB+ABqQRRqQQA2AgAgAkH4AGpBDGpCADcCACACQgA3AnwgAkEUNgJ4IAJBGGpBEGogAkH4AGpBEG\
opAwA3AwAgAkEYakEIaiACQfgAakEIaikDADcDACACQQhqIgMgAkEYakEMaikCADcDACACQRBqIgQg\
AkEYakEUaigCADYCACACIAIpA3g3AxggAiACKQIcNwMAIAJBGGogAUHgABCgARogAkEYaiACECECQE\
EUEAgiBQ0AQRRBAUEAKALc6UAiAkECIAIbEQQAAAsgBSACKQMANwAAIAVBEGogBCgCADYAACAFQQhq\
IAMpAwA3AAAgARAPIABBFDYCBCAAIAU2AgAgAkGQAWokAAuaAgEEfyMAQZABayICJAAgAkH4AGpBFG\
pBADYCACACQfgAakEMakIANwIAIAJCADcCfCACQRQ2AnggAkEYakEQaiACQfgAakEQaikDADcDACAC\
QRhqQQhqIAJB+ABqQQhqKQMANwMAIAJBCGoiAyACQRhqQQxqKQIANwMAIAJBEGoiBCACQRhqQRRqKA\
IANgIAIAIgAikDeDcDGCACIAIpAhw3AwAgAkEYaiABQeAAEKABGiACQRhqIAIQXgJAQRQQCCIFDQBB\
FEEBQQAoAtzpQCICQQIgAhsRBAAACyAFIAIpAwA3AAAgBUEQaiAEKAIANgAAIAVBCGogAykDADcAAC\
ABEA8gAEEUNgIEIAAgBTYCACACQZABaiQAC6QCAgR/AX4gAEEIaiECIAApAwAhBgJAAkACQAJAIAAo\
AhwiA0HAAEcNACACIABBIGoQBUEAIQMgAEEANgIcDAELIANBP0sNAQsgAEEgaiIEIANqQYABOgAAIA\
AgACgCHCIFQQFqIgM2AhwCQCADQcEATw0AIABBHGogA2pBBGpBAEE/IAVrEKgBGgJAQcAAIAAoAhxr\
QQhPDQAgAiAEEAUgACgCHCIDQcEATw0DIARBACADEKgBGgsgAEHYAGogBkIDhjcDACACIAQQBSAAQQ\
A2AhwgASAAKAIINgAAIAEgAEEMaikCADcABCABIABBFGopAgA3AAwPCyADQcAAQYSfwAAQjAEACyAD\
QcAAQZSfwAAQjwEACyADQcAAQaSfwAAQjQEAC5oCAQN/IwBBEGsiAiQAAkAgACgCyAEiA0HnAEsNAC\
AAIANqQcwBakEBOgAAAkAgA0EBaiIEQegARg0AIAAgBGpBzAFqQQBB5wAgA2sQqAEaC0EAIQMgAEEA\
NgLIASAAQbMCaiIEIAQtAABBgAFyOgAAA0AgACADaiIEIAQtAAAgBEHMAWotAABzOgAAIANBAWoiA0\
HoAEcNAAsgABATIAEgACkAADcAACABQShqIABBKGopAAA3AAAgAUEgaiAAQSBqKQAANwAAIAFBGGog\
AEEYaikAADcAACABQRBqIABBEGopAAA3AAAgAUEIaiAAQQhqKQAANwAAIAJBEGokAA8LQbSfwABBFy\
ACQQhqQcyfwABBxKDAABCCAQALmgIBA38jAEEQayICJAACQCAAKALIASIDQecASw0AIAAgA2pBzAFq\
QQY6AAACQCADQQFqIgRB6ABGDQAgACAEakHMAWpBAEHnACADaxCoARoLQQAhAyAAQQA2AsgBIABBsw\
JqIgQgBC0AAEGAAXI6AAADQCAAIANqIgQgBC0AACAEQcwBai0AAHM6AAAgA0EBaiIDQegARw0ACyAA\
EBMgASAAKQAANwAAIAFBKGogAEEoaikAADcAACABQSBqIABBIGopAAA3AAAgAUEYaiAAQRhqKQAANw\
AAIAFBEGogAEEQaikAADcAACABQQhqIABBCGopAAA3AAAgAkEQaiQADwtBtJ/AAEEXIAJBCGpBzJ/A\
AEGEocAAEIIBAAuFAgEEfwJAAkBBECAAKAIAIgNrIgQgAksNACAAQRRqIQUCQCADRQ0AIANBEU8NAi\
AAQQRqIgYgA2ogASAEEKABGiAFIAYQDSACIARrIQIgASAEaiEBCyACQQ9xIQMgASACQXBxIgJqIQQC\
QCACRQ0AQQAgAmshAgNAIAUgARANIAFBEGohASACQRBqIgINAAsLIABBBGogBCADEKABGiAAIAM2Ag\
APCwJAAkAgAyACaiIFIANJDQAgBUEQSw0BIAAgA2pBBGogASACEKABGiAAIAAoAgAgAmo2AgAPCyAD\
IAVB+KLAABCRAQALIAVBEEH4osAAEI0BAAsgA0EQQYijwAAQjAEAC6UCAgJ/An4jAEGQAmsiAiQAIA\
FBCGopAwAhBCABKQMAIQUgAkGIAWpBBHIgAUHUAGoQiAEgAiABKAJQNgKIASACIAJBiAFqQYQBEKAB\
IQMCQEHYARAIIgINAEHYAUEIQQAoAtzpQCIBQQIgARsRBAAACyACIAU3AwAgAiAENwMIIAIgASkDED\
cDECACQRhqIAFBGGopAwA3AwAgAkEgaiABQSBqKQMANwMAIAJBKGogAUEoaikDADcDACACQTBqIAFB\
MGopAwA3AwAgAkE4aiABQThqKQMANwMAIAJBwABqIAFBwABqKQMANwMAIAJByABqIAFByABqKQMANw\
MAIAJB0ABqIANBhAEQoAEaIABBtJfAADYCBCAAIAI2AgAgA0GQAmokAAulAgICfwJ+IwBBkAJrIgIk\
ACABQQhqKQMAIQQgASkDACEFIAJBiAFqQQRyIAFB1ABqEIgBIAIgASgCUDYCiAEgAiACQYgBakGEAR\
CgASEDAkBB2AEQCCICDQBB2AFBCEEAKALc6UAiAUECIAEbEQQAAAsgAiAFNwMAIAIgBDcDCCACIAEp\
AxA3AxAgAkEYaiABQRhqKQMANwMAIAJBIGogAUEgaikDADcDACACQShqIAFBKGopAwA3AwAgAkEwai\
ABQTBqKQMANwMAIAJBOGogAUE4aikDADcDACACQcAAaiABQcAAaikDADcDACACQcgAaiABQcgAaikD\
ADcDACACQdAAaiADQYQBEKABGiAAQdiXwAA2AgQgACACNgIAIANBkAJqJAALmQICBH8BfiAAQcwAai\
ECIAApAwAhBgJAAkACQAJAIAAoAggiA0HAAEcNACACIABBDGoQDEEAIQMgAEEANgIIDAELIANBP0sN\
AQsgAEEMaiIEIANqQYABOgAAIAAgACgCCCIFQQFqIgM2AggCQCADQcEATw0AIABBCGogA2pBBGpBAE\
E/IAVrEKgBGgJAQcAAIAAoAghrQQhPDQAgAiAEEAwgACgCCCIDQcEATw0DIARBACADEKgBGgsgAEHE\
AGogBkIDhjcCACACIAQQDCAAQQA2AgggASAAKQJMNwAAIAEgAEHUAGopAgA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GogAUEQaikDADcDACACQRhqIAFBGGopAwA3AwAgAkEgai\
ADQcQAEKABGiAAQcyUwAA2AgQgACACNgIAIANBkAFqJAALrgECAn8BfiMAQZABayICJAAgASkDACEE\
IAJByABqQQRyIAFBDGoQcSACIAEoAgg2AkggAiACQcgAakHEABCgASEDAkBB4AAQCCICDQBB4ABBCE\
EAKALc6UAiAUECIAEbEQQAAAsgAiAENwMAIAJBCGogA0HEABCgARogAkHUAGogAUHUAGopAgA3AgAg\
AiABKQJMNwJMIABB8JTAADYCBCAAIAI2AgAgA0GQAWokAAuuAQICfwF+IwBBkAFrIgIkACABKQMAIQ\
QgAkHIAGpBBHIgAUEMahBxIAIgASgCCDYCSCACIAJByABqQcQAEKABIQMCQEHgABAIIgINAEHgAEEI\
QQAoAtzpQCIBQQIgARsRBAAACyACIAQ3AwAgAkEIaiADQcQAEKABGiACQdQAaiABQdQAaikCADcCAC\
ACIAEpAkw3AkwgAEG4lcAANgIEIAAgAjYCACADQZABaiQAC5gBAQF/QQAhAwJAAkAgAUEASA0AAkAC\
QAJAAkACQCACKAIAIgNFDQACQCACKAIEDQAgAQ0CDAQLIAMgARAVIQIMAgsgAUUNAgsgARAIIQILAk\
AgAkUNACABIQMMAgsgACABNgIEQQEhAwwCC0EBIQJBACEDCyAAIAI2AgRBACEBDAELQQEhAQsgACAB\
NgIAIABBCGogAzYCAAuVAQEBfyMAQTBrIgJBCWogASkABTcAACACQRFqIAEvAA07AAAgAkETaiABLQ\
APOgAAIAIgAS0AADoABCACIAEoAAE2AAUgAkEQNgIAIAJBGGpBCGogAkEIaikDADcDACACQRhqQRBq\
IAJBEGooAgA2AgAgAiACKQMANwMYIAAgAikCHDcAACAAQQhqIAJBJGopAgA3AAALmwEBAX8jAEHwA2\
siAiQAIAJBCGogAUHIARCgARogAkHgAmpBBHIgAUHMAWoQhwEgAiABKALIATYC4AIgAkEIakHIAWog\
AkHgAmpBjAEQoAEaAkBB2AIQCCIBDQBB2AJBCEEAKALc6UAiAkECIAIbEQQAAAsgASACQQhqQdgCEK\
ABIQEgAEGsksAANgIEIAAgATYCACACQfADaiQAC5sBAQF/IwBBgARrIgIkACACQQhqIAFByAEQoAEa\
IAJB6AJqQQRyIAFBzAFqEIsBIAIgASgCyAE2AugCIAJBCGpByAFqIAJB6AJqQZQBEKABGgJAQeACEA\
giAQ0AQeACQQhBACgC3OlAIgJBAiACGxEEAAALIAEgAkEIakHgAhCgASEBIABB0JLAADYCBCAAIAE2\
AgAgAkGABGokAAubAQEBfyMAQfACayICJAAgAkEIaiABQcgBEKABGiACQaACakEEciABQcwBahCKAS\
ACIAEoAsgBNgKgAiACQQhqQcgBaiACQaACakHMABCgARoCQEGYAhAIIgENAEGYAkEIQQAoAtzpQCIC\
QQIgAhsRBAAACyABIAJBCGpBmAIQoAEhASAAQfSSwAA2AgQgACABNgIAIAJB8AJqJAALmwEBAX8jAE\
GwA2siAiQAIAJBCGogAUHIARCgARogAkHAAmpBBHIgAUHMAWoQiQEgAiABKALIATYCwAIgAkEIakHI\
AWogAkHAAmpB7AAQoAEaAkBBuAIQCCIBDQBBuAJBCEEAKALc6UAiAkECIAIbEQQAAAsgASACQQhqQb\
gCEKABIQEgAEGYk8AANgIEIAAgATYCACACQbADaiQAC5sBAQF/IwBBgARrIgIkACACQQhqIAFByAEQ\
oAEaIAJB6AJqQQRyIAFBzAFqEIsBIAIgASgCyAE2AugCIAJBCGpByAFqIAJB6AJqQZQBEKABGgJAQe\
ACEAgiAQ0AQeACQQhBACgC3OlAIgJBAiACGxEEAAALIAEgAkEIakHgAhCgASEBIABBvJPAADYCBCAA\
IAE2AgAgAkGABGokAAubAQEBfyMAQfACayICJAAgAkEIaiABQcgBEKABGiACQaACakEEciABQcwBah\
CKASACIAEoAsgBNgKgAiACQQhqQcgBaiACQaACakHMABCgARoCQEGYAhAIIgENAEGYAkEIQQAoAtzp\
QCICQQIgAhsRBAAACyABIAJBCGpBmAIQoAEhASAAQeCTwAA2AgQgACABNgIAIAJB8AJqJA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SBqNgIYIAMgA0EEaj\
YCKCADIAM2AiAgA0EIaiACEKYBAAttAQF/IwBBMGsiAyQAIAMgATYCBCADIAA2AgAgA0EcakECNgIA\
IANBLGpBBTYCACADQgI3AgwgA0G0j8AANgIIIANBBTYCJCADIANBIGo2AhggAyADQQRqNgIoIAMgAz\
YCICADQQhqIAIQpgEAC20BAX8jAEEwayIDJAAgAyABNgIEIAMgADYCACADQRxqQQI2AgAgA0EsakEF\
NgIAIANCAzcCDCADQcyRwAA2AgggA0EFNgIkIAMgA0EgajYCGCADIAM2AiggAyADQQRqNgIgIANBCG\
ogAhCmAQALbQEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBHGpBAjYCACADQSxqQQU2AgAgA0IC\
NwIMIANB1IzAADYCCCADQQU2AiQgAyADQSBqNgIYIAMgAzYCKCADIANBBGo2AiAgA0EIaiACEKYBAA\
tkAQJ/IwBBIGsiAiQAIAFBHGooAgAhAyABKAIYIQEgAkEIakEQaiAAQRBqKQIANwMAIAJBCGpBCGog\
AEEIaikCADcDACACIAApAgA3AwggASADIAJBCGoQHCEAIAJBIGokACAAC20BAX8jAEEwayIDJAAgAy\
ABNgIEIAMgADYCACADQRxqQQI2AgAgA0EsakEFNgIAIANCAjcCDCADQYSRwAA2AgggA0EFNgIkIAMg\
A0EgajYCGCADIANBBGo2AiggAyADNgIgIANBCGogAhCmAQALbAAgAEIANwMAIAAgACkDcDcDCCAAQS\
BqIABBiAFqKQMANwMAIABBGGogAEGAAWopAwA3AwAgAEEQaiAAQfgAaikDADcDACAAQShqQQBBwgAQ\
qAEaAkAgAEHwDmoiAC0AAEUNACAAQQA6AAALC3YBAn9BASEAQQBBACgCiOZAIgFBAWo2AojmQAJAAk\
BBACgC0OlAQQFHDQBBACgC1OlAQQFqIQAMAQtBAEEBNgLQ6UALQQAgADYC1OlAAkAgAUEASA0AIABB\
AksNAEEAKALY6UBBf0wNACAAQQFLDQAQzQEACwALYwEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEIak\
EQaiABQRBqKQIANwMAIAJBCGpBCGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakG4h8AAIAJBCGoQ\
HCEBIAJBIGokACABC2YBAX8jAEEgayIEJAAgBCABNgIEIAQgADYCACAEQQhqQRBqIAJBEGopAgA3Aw\
AgBEEIakEIaiACQQhqKQIANwMAIAQgAikCADcDCCAEQYTlwAAgBEEEakGE5cAAIARBCGogAxBIAAtl\
AgF/AX4jAEEQayICJAACQAJAIAFFDQAgASgCAA0BIAFBfzYCACACQQhqIAEoAgQgAUEIaigCACgCEB\
EEACACKQMIIQMgAUEANgIAIAAgAzcDACACQRBqJAAPCxC6AQALELsBAAtRAQJ/AkAgACgCACIDQQRq\
KAIAIANBCGoiBCgCACIAayACTw0AIAMgACACEHIgBCgCACEACyADKAIAIABqIAEgAhCgARogBCAAIA\
JqNgIAQQALSgEDf0EAIQMCQCACRQ0AAkADQCAALQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEg\
AkF/aiICRQ0CDAALCyAEIAVrIQMLIAMLUQECfwJAAkAgAEUNACAAKAIADQEgAEEANgIAIAAoAgQhAS\
AAKAIIIQIgABAPIAEgAigCABEBAAJAIAIoAgRFDQAgARAPCw8LELoBAAsQuwEAC04AAkACQCAARQ0A\
IAAoAgANASAAQX82AgAgACgCBCABIAIgAEEIaigCACgCDBEGAAJAIAJFDQAgARAPCyAAQQA2AgAPCx\
C6AQALELsBAAtUAQF/AkACQAJAIAFBgIDEAEYNAEEBIQQgACgCGCABIABBHGooAgAoAhARBQANAQsg\
Ag0BQQAhBAsgBA8LIAAoAhggAiADIABBHGooAgAoAgwRBwALWAAgAEIANwMAIABBADYCMCAAQQApA7\
icQDcDCCAAQRBqQQApA8CcQDcDACAAQRhqQQApA8icQDcDACAAQSBqQQApA9CcQDcDACAAQShqQQAp\
A9icQDcDAAtIAQF/IwBBIGsiAyQAIANBFGpBADYCACADQaShwAA2AhAgA0IBNwIEIAMgATYCHCADIA\
A2AhggAyAD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c2l6ZTo6aDBhYWIzNzE0ZjBlNzlmMmLMAUQ8RCBhcyBkaWdlc3Q6OmR5bl9k\
aWdlc3Q6OkR5bkRpZ2VzdD46Om91dHB1dF9zaXplOjpoMzU3YjE3ZjM0YmRkMTA5ZM0BCnJ1c3RfcG\
FuaWPOATdzdGQ6OmFsbG9jOjpkZWZhdWx0X2FsbG9jX2Vycm9yX2hvb2s6OmhjYzhmNmMxNGExY2Yw\
MjBhzwFvY29yZTo6cHRyOjpkcm9wX2luX3BsYWNlPCZjb3JlOjppdGVyOjphZGFwdGVyczo6Y29waW\
VkOjpDb3BpZWQ8Y29yZTo6c2xpY2U6Oml0ZXI6Okl0ZXI8dTg+Pj46OmgzZTliNzFhMDc5ZDE2ZTAz\
AO+AgIAACXByb2R1Y2VycwIIbGFuZ3VhZ2UBBFJ1c3QADHByb2Nlc3NlZC1ieQMFcnVzdGMdMS41NS\
4wIChjOGRmY2ZlMDQgMjAyMS0wOS0wNikGd2FscnVzBjAuMTkuMAx3YXNtLWJpbmRnZW4GMC4yLjgx\
\
");
    const wasmModule = new WebAssembly.Module(wasmBytes);
    return new WebAssembly.Instance(wasmModule, imports);
}
function base64decode(b64) {
    const binString = atob(b64);
    const size = binString.length;
    const bytes = new Uint8Array(size);
    for(let i1 = 0; i1 < size; i1++){
        bytes[i1] = binString.charCodeAt(i1);
    }
    return bytes;
}
const hexTable1 = new TextEncoder().encode("0123456789abcdef");
function encode5(src) {
    const dst = new Uint8Array(src.length * 2);
    for(let i1 = 0; i1 < dst.length; i1++){
        const v = src[i1];
        dst[i1 * 2] = hexTable1[v >> 4];
        dst[i1 * 2 + 1] = hexTable1[v & 0x0f];
    }
    return dst;
}
class Hash1 {
    #hash;
    #digested;
    constructor(algorithm){
        this.#hash = instantiate().create_hash(algorithm);
        this.#digested = false;
    }
    update(message) {
        let view;
        if (message instanceof Uint8Array) {
            view = message;
        } else if (typeof message === "string") {
            view = new TextEncoder().encode(message);
        } else if (ArrayBuffer.isView(message)) {
            view = new Uint8Array(message.buffer, message.byteOffset, message.byteLength);
        } else if (message instanceof ArrayBuffer) {
            view = new Uint8Array(message);
        } else {
            throw new Error("hash: `data` is invalid type");
        }
        const chunkSize = 65_536;
        const updateHash = instantiate().update_hash;
        for(let offset = 0; offset < view.byteLength; offset += chunkSize){
            updateHash(this.#hash, new Uint8Array(view.buffer, view.byteOffset + offset, Math.min(65_536, view.byteLength - offset)));
        }
        return this;
    }
    digest() {
        if (this.#digested) throw new Error("hash: already digested");
        this.#digested = true;
        return instantiate().digest_hash(this.#hash);
    }
    toString(format = "hex") {
        const finalized = new Uint8Array(this.digest());
        switch(format){
            case "hex":
                return new TextDecoder().decode(encode5(finalized));
            case "base64":
                return encode(finalized);
            default:
                throw new Error("hash: invalid format");
        }
    }
}
function createHash(algorithm) {
    return new Hash1(algorithm);
}
const recordSize = 512;
const ustar = "ustar\u000000";
const initialChecksum = 8 * 32;
async function readBlock(reader, p) {
    let bytesRead = 0;
    while(bytesRead < p.length){
        const rr = await reader.read(p.subarray(bytesRead));
        if (rr === null) {
            if (bytesRead === 0) {
                return null;
            } else {
                throw new PartialReadError();
            }
        }
        bytesRead += rr;
    }
    return bytesRead;
}
class FileReader {
    #file;
    constructor(filePath){
        this.filePath = filePath;
    }
    async read(p) {
        if (!this.#file) {
            this.#file = await Deno.open(this.filePath, {
                read: true
            });
        }
        const res = await Deno.read(this.#file.rid, p);
        if (res === null) {
            Deno.close(this.#file.rid);
            this.#file = undefined;
        }
        return res;
    }
    filePath;
}
function trim(buffer) {
    const index = buffer.findIndex((v)=>v === 0);
    if (index < 0) return buffer;
    return buffer.subarray(0, index);
}
function clean(length) {
    const buffer = new Uint8Array(length);
    buffer.fill(0, 0, length - 1);
    return buffer;
}
function pad(num, bytes, base = 8) {
    const numString = num.toString(base);
    return "000000000000".substr(numString.length + 12 - bytes) + numString;
}
var FileTypes;
(function(FileTypes) {
    FileTypes[FileTypes["file"] = 0] = "file";
    FileTypes[FileTypes["link"] = 1] = "link";
    FileTypes[FileTypes["symlink"] = 2] = "symlink";
    FileTypes[FileTypes["character-device"] = 3] = "character-device";
    FileTypes[FileTypes["block-device"] = 4] = "block-device";
    FileTypes[FileTypes["directory"] = 5] = "directory";
    FileTypes[FileTypes["fifo"] = 6] = "fifo";
    FileTypes[FileTypes["contiguous-file"] = 7] = "contiguous-file";
})(FileTypes || (FileTypes = {}));
const ustarStructure = [
    {
        field: "fileName",
        length: 100
    },
    {
        field: "fileMode",
        length: 8
    },
    {
        field: "uid",
        length: 8
    },
    {
        field: "gid",
        length: 8
    },
    {
        field: "fileSize",
        length: 12
    },
    {
        field: "mtime",
        length: 12
    },
    {
        field: "checksum",
        length: 8
    },
    {
        field: "type",
        length: 1
    },
    {
        field: "linkName",
        length: 100
    },
    {
        field: "ustar",
        length: 8
    },
    {
        field: "owner",
        length: 32
    },
    {
        field: "group",
        length: 32
    },
    {
        field: "majorNumber",
        length: 8
    },
    {
        field: "minorNumber",
        length: 8
    },
    {
        field: "fileNamePrefix",
        length: 155
    },
    {
        field: "padding",
        length: 12
    }, 
];
function formatHeader(data) {
    const encoder = new TextEncoder(), buffer = clean(512);
    let offset = 0;
    ustarStructure.forEach(function(value) {
        const entry = encoder.encode(data[value.field] || "");
        buffer.set(entry, offset);
        offset += value.length;
    });
    return buffer;
}
function parseHeader(buffer) {
    const data = {};
    let offset = 0;
    ustarStructure.forEach(function(value) {
        const arr = buffer.subarray(offset, offset + value.length);
        data[value.field] = arr;
        offset += value.length;
    });
    return data;
}
class Tar {
    data;
    constructor(){
        this.data = [];
    }
    async append(fn, opts) {
        if (typeof fn !== "string") {
            throw new Error("file name not specified");
        }
        let fileName = fn;
        let fileNamePrefix;
        if (fileName.length > 100) {
            let i1 = fileName.length;
            while(i1 >= 0){
                i1 = fileName.lastIndexOf("/", i1);
                if (i1 <= 155) {
                    fileNamePrefix = fileName.substr(0, i1);
                    fileName = fileName.substr(i1 + 1);
                    break;
                }
                i1--;
            }
            const errMsg = "ustar format does not allow a long file name (length of [file name" + "prefix] + / + [file name] must be shorter than 256 bytes)";
            if (i1 < 0 || fileName.length > 100) {
                throw new Error(errMsg);
            } else {
                assert(fileNamePrefix != null);
                if (fileNamePrefix.length > 155) {
                    throw new Error(errMsg);
                }
            }
        }
        opts = opts || {};
        let info;
        if (opts.filePath) {
            info = await Deno.stat(opts.filePath);
            if (info.isDirectory) {
                info.size = 0;
                opts.reader = new Buffer1();
            }
        }
        const mode = opts.fileMode || info && info.mode || parseInt("777", 8) & 0xfff, mtime = Math.floor(opts.mtime ?? (info?.mtime ?? new Date()).valueOf() / 1000), uid = opts.uid || 0, gid = opts.gid || 0;
        if (typeof opts.owner === "string" && opts.owner.length >= 32) {
            throw new Error("ustar format does not allow owner name length >= 32 bytes");
        }
        if (typeof opts.group === "string" && opts.group.length >= 32) {
            throw new Error("ustar format does not allow group name length >= 32 bytes");
        }
        const fileSize = info?.size ?? opts.contentSize;
        assert(fileSize != null, "fileSize must be set");
        const type = opts.type ? FileTypes[opts.type] : info?.isDirectory ? FileTypes.directory : FileTypes.file;
        const tarData = {
            fileName,
            fileNamePrefix,
            fileMode: pad(mode, 7),
            uid: pad(uid, 7),
            gid: pad(gid, 7),
            fileSize: pad(fileSize, 11),
            mtime: pad(mtime, 11),
            checksum: "        ",
            type: type.toString(),
            ustar,
            owner: opts.owner || "",
            group: opts.group || "",
            filePath: opts.filePath,
            reader: opts.reader
        };
        let checksum = 0;
        const encoder = new TextEncoder();
        Object.keys(tarData).filter((key)=>[
                "filePath",
                "reader"
            ].indexOf(key) < 0).forEach(function(key) {
            checksum += encoder.encode(tarData[key]).reduce((p, c)=>p + c, 0);
        });
        tarData.checksum = pad(checksum, 6) + "\u0000 ";
        this.data.push(tarData);
    }
    getReader() {
        const readers = [];
        this.data.forEach((tarData)=>{
            let { reader  } = tarData;
            const { filePath  } = tarData;
            const headerArr = formatHeader(tarData);
            readers.push(new Buffer1(headerArr));
            if (!reader) {
                assert(filePath != null);
                reader = new FileReader(filePath);
            }
            readers.push(reader);
            assert(tarData.fileSize != null, "fileSize must be set");
            readers.push(new Buffer1(clean(512 - (parseInt(tarData.fileSize, 8) % 512 || 512))));
        });
        readers.push(new Buffer1(clean(512 * 2)));
        return new MultiReader(readers);
    }
}
class TarEntry {
    #header;
    #reader;
    #size;
    #read = 0;
    #consumed = false;
    #entrySize;
    constructor(meta, header, reader){
        Object.assign(this, meta);
        this.#header = header;
        this.#reader = reader;
        this.#size = this.fileSize || 0;
        const blocks = Math.ceil(this.#size / 512);
        this.#entrySize = blocks * recordSize;
    }
    get consumed() {
        return this.#consumed;
    }
    async read(p) {
        const entryBytesLeft = this.#entrySize - this.#read;
        const bufSize = Math.min(p.length, entryBytesLeft);
        if (entryBytesLeft <= 0) {
            this.#consumed = true;
            return null;
        }
        const block = new Uint8Array(bufSize);
        const n = await readBlock(this.#reader, block);
        const bytesLeft = this.#size - this.#read;
        this.#read += n || 0;
        if (n === null || bytesLeft <= 0) {
            if (n === null) this.#consumed = true;
            return null;
        }
        const offset = bytesLeft < n ? bytesLeft : n;
        p.set(block.subarray(0, offset), 0);
        return offset < 0 ? n - Math.abs(offset) : offset;
    }
    async discard() {
        if (this.#consumed) return;
        this.#consumed = true;
        if (typeof this.#reader.seek === "function") {
            await this.#reader.seek(this.#entrySize - this.#read, Deno.SeekMode.Current);
            this.#read = this.#entrySize;
        } else {
            await readAll(this);
        }
    }
}
class Untar {
    reader;
    block;
    #entry;
    constructor(reader){
        this.reader = reader;
        this.block = new Uint8Array(recordSize);
    }
    #checksum(header1) {
        let sum = initialChecksum;
        for(let i8 = 0; i8 < 512; i8++){
            if (i8 >= 148 && i8 < 156) {
                continue;
            }
            sum += header1[i8];
        }
        return sum;
    }
    async #getHeader() {
        await readBlock(this.reader, this.block);
        const header11 = parseHeader(this.block);
        const decoder = new TextDecoder();
        const checksum = this.#checksum(this.block);
        if (parseInt(decoder.decode(header11.checksum), 8) !== checksum) {
            if (checksum === initialChecksum) {
                return null;
            }
            throw new Error("checksum error");
        }
        const magic = decoder.decode(header11.ustar);
        if (magic.indexOf("ustar")) {
            throw new Error(`unsupported archive format: ${magic}`);
        }
        return header11;
    }
    #getMetadata(header2) {
        const decoder1 = new TextDecoder();
        const meta1 = {
            fileName: decoder1.decode(trim(header2.fileName))
        };
        const fileNamePrefix = trim(header2.fileNamePrefix);
        if (fileNamePrefix.byteLength > 0) {
            meta1.fileName = decoder1.decode(fileNamePrefix) + "/" + meta1.fileName;
        }
        [
            "fileMode",
            "mtime",
            "uid",
            "gid"
        ].forEach((key)=>{
            const arr = trim(header2[key]);
            if (arr.byteLength > 0) {
                meta1[key] = parseInt(decoder1.decode(arr), 8);
            }
        });
        [
            "owner",
            "group",
            "type"
        ].forEach((key)=>{
            const arr = trim(header2[key]);
            if (arr.byteLength > 0) {
                meta1[key] = decoder1.decode(arr);
            }
        });
        meta1.fileSize = parseInt(decoder1.decode(header2.fileSize), 8);
        meta1.type = FileTypes[parseInt(meta1.type)] ?? meta1.type;
        return meta1;
    }
    async extract() {
        if (this.#entry && !this.#entry.consumed) {
            await this.#entry.discard();
        }
        const header = await this.#getHeader();
        if (header === null) return null;
        const meta = this.#getMetadata(header);
        this.#entry = new TarEntry(meta, header, this.reader);
        return this.#entry;
    }
    async *[Symbol.asyncIterator]() {
        while(true){
            const entry = await this.extract();
            if (entry === null) return;
            yield entry;
        }
    }
}
async function createBundle(type, files, tempContext) {
    const manifestFiles = {};
    for (const file of files.files){
        const filePath = join3(files.baseDir, file);
        if (Deno.statSync(filePath).isFile) {
            const hash = createHash("md5");
            const f = Deno.openSync(filePath);
            for (const chunk of Deno.iterSync(f)){
                hash.update(chunk);
            }
            Deno.close(f.rid);
            manifestFiles[file] = {
                checksum: hash.toString("hex")
            };
        }
    }
    const manifest = {
        version: 1,
        locale: "en_US",
        platform: "4.2.0",
        metadata: {
            appmode: "static",
            primary_rmd: null,
            primary_html: files.rootFile,
            content_category: type === "site" ? "site" : null,
            has_parameters: false
        },
        packages: null,
        files: manifestFiles,
        users: null
    };
    const stageDir = tempContext.createDir();
    files.files.forEach((file)=>{
        const filePath = join3(files.baseDir, file);
        if (Deno.statSync(filePath).isFile) {
            const targetDir = join3(stageDir, dirname2(file));
            ensureDirSync(targetDir);
            Deno.copyFileSync(filePath, join3(stageDir, file));
        }
    });
    Deno.writeTextFileSync(join3(stageDir, "manifest.json"), JSON.stringify(manifest, undefined, 2));
    const tar = new Tar();
    const tarFiles = [
        ...files.files,
        "manifest.json"
    ];
    for (const tarFile of tarFiles){
        await tar.append(tarFile, {
            filePath: join3(stageDir, tarFile)
        });
    }
    const tarFile1 = tempContext.createFile({
        suffix: ".tar"
    });
    const writer = Deno.openSync(tarFile1, {
        write: true,
        create: true
    });
    await copy2(tar.getReader(), writer);
    writer.close();
    const targzFile = `${tarFile1}.gz`;
    const src = await Deno.open(tarFile1);
    const dest = await Deno.open(targzFile, {
        create: true,
        write: true
    });
    await src.readable.pipeThrough(new CompressionStream("gzip")).pipeTo(dest.writable);
    return targzFile;
}
let wasm2;
const heap1 = new Array(32).fill(undefined);
heap1.push(undefined, null, true, false);
function getObject1(idx) {
    return heap1[idx];
}
let heap_next1 = heap1.length;
function dropObject1(idx) {
    if (idx < 36) return;
    heap1[idx] = heap_next1;
    heap_next1 = idx;
}
function takeObject1(idx) {
    const ret = getObject1(idx);
    dropObject1(idx);
    return ret;
}
function addHeapObject1(obj) {
    if (heap_next1 === heap1.length) heap1.push(heap1.length + 1);
    const idx = heap_next1;
    heap_next1 = heap1[idx];
    heap1[idx] = obj;
    return idx;
}
const cachedTextDecoder2 = new TextDecoder("utf-8", {
    ignoreBOM: true,
    fatal: true
});
cachedTextDecoder2.decode();
let cachedUint8Memory01;
function getUint8Memory02() {
    if (cachedUint8Memory01.byteLength === 0) {
        cachedUint8Memory01 = new Uint8Array(wasm2.memory.buffer);
    }
    return cachedUint8Memory01;
}
function getStringFromWasm02(ptr, len) {
    return cachedTextDecoder2.decode(getUint8Memory02().subarray(ptr, ptr + len));
}
let WASM_VECTOR_LEN2 = 0;
const cachedTextEncoder2 = new TextEncoder("utf-8");
const encodeString2 = function(arg, view) {
    return cachedTextEncoder2.encodeInto(arg, view);
};
function passStringToWasm02(arg, malloc, realloc) {
    if (realloc === undefined) {
        const buf = cachedTextEncoder2.encode(arg);
        const ptr = malloc(buf.length);
        getUint8Memory02().subarray(ptr, ptr + buf.length).set(buf);
        WASM_VECTOR_LEN2 = buf.length;
        return ptr;
    }
    let len = arg.length;
    let ptr1 = malloc(len);
    const mem = getUint8Memory02();
    let offset = 0;
    for(; offset < len; offset++){
        const code = arg.charCodeAt(offset);
        if (code > 0x7F) break;
        mem[ptr1 + offset] = code;
    }
    if (offset !== len) {
        if (offset !== 0) {
            arg = arg.slice(offset);
        }
        ptr1 = realloc(ptr1, len, len = offset + arg.length * 3);
        const view = getUint8Memory02().subarray(ptr1 + offset, ptr1 + len);
        const ret = encodeString2(arg, view);
        offset += ret.written;
    }
    WASM_VECTOR_LEN2 = offset;
    return ptr1;
}
function isLikeNone(x) {
    return x === undefined || x === null;
}
let cachedInt32Memory01;
function getInt32Memory02() {
    if (cachedInt32Memory01.byteLength === 0) {
        cachedInt32Memory01 = new Int32Array(wasm2.memory.buffer);
    }
    return cachedInt32Memory01;
}
function getArrayU8FromWasm01(ptr, len) {
    return getUint8Memory02().subarray(ptr / 1, ptr / 1 + len);
}
function digest(algorithm, data, length) {
    try {
        const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
        const ptr0 = passStringToWasm02(algorithm, wasm2.__wbindgen_malloc, wasm2.__wbindgen_realloc);
        const len0 = WASM_VECTOR_LEN2;
        wasm2.digest(retptr, ptr0, len0, addHeapObject1(data), !isLikeNone(length), isLikeNone(length) ? 0 : length);
        var r0 = getInt32Memory02()[retptr / 4 + 0];
        var r1 = getInt32Memory02()[retptr / 4 + 1];
        var r2 = getInt32Memory02()[retptr / 4 + 2];
        var r3 = getInt32Memory02()[retptr / 4 + 3];
        if (r3) {
            throw takeObject1(r2);
        }
        var v1 = getArrayU8FromWasm01(r0, r1).slice();
        wasm2.__wbindgen_free(r0, r1 * 1);
        return v1;
    } finally{
        wasm2.__wbindgen_add_to_stack_pointer(16);
    }
}
const DigestContextFinalization = new FinalizationRegistry((ptr)=>wasm2.__wbg_digestcontext_free(ptr));
class DigestContext {
    static __wrap(ptr) {
        const obj = Object.create(DigestContext.prototype);
        obj.ptr = ptr;
        DigestContextFinalization.register(obj, obj.ptr, obj);
        return obj;
    }
    __destroy_into_raw() {
        const ptr = this.ptr;
        this.ptr = 0;
        DigestContextFinalization.unregister(this);
        return ptr;
    }
    free() {
        const ptr = this.__destroy_into_raw();
        wasm2.__wbg_digestcontext_free(ptr);
    }
    constructor(algorithm){
        try {
            const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
            const ptr0 = passStringToWasm02(algorithm, wasm2.__wbindgen_malloc, wasm2.__wbindgen_realloc);
            const len0 = WASM_VECTOR_LEN2;
            wasm2.digestcontext_new(retptr, ptr0, len0);
            var r0 = getInt32Memory02()[retptr / 4 + 0];
            var r1 = getInt32Memory02()[retptr / 4 + 1];
            var r2 = getInt32Memory02()[retptr / 4 + 2];
            if (r2) {
                throw takeObject1(r1);
            }
            return DigestContext.__wrap(r0);
        } finally{
            wasm2.__wbindgen_add_to_stack_pointer(16);
        }
    }
    update(data) {
        try {
            const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
            wasm2.digestcontext_update(retptr, this.ptr, addHeapObject1(data));
            var r0 = getInt32Memory02()[retptr / 4 + 0];
            var r1 = getInt32Memory02()[retptr / 4 + 1];
            if (r1) {
                throw takeObject1(r0);
            }
        } finally{
            wasm2.__wbindgen_add_to_stack_pointer(16);
        }
    }
    digest(length) {
        try {
            const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
            wasm2.digestcontext_digest(retptr, this.ptr, !isLikeNone(length), isLikeNone(length) ? 0 : length);
            var r0 = getInt32Memory02()[retptr / 4 + 0];
            var r1 = getInt32Memory02()[retptr / 4 + 1];
            var r2 = getInt32Memory02()[retptr / 4 + 2];
            var r3 = getInt32Memory02()[retptr / 4 + 3];
            if (r3) {
                throw takeObject1(r2);
            }
            var v0 = getArrayU8FromWasm01(r0, r1).slice();
            wasm2.__wbindgen_free(r0, r1 * 1);
            return v0;
        } finally{
            wasm2.__wbindgen_add_to_stack_pointer(16);
        }
    }
    digestAndReset(length) {
        try {
            const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
            wasm2.digestcontext_digestAndReset(retptr, this.ptr, !isLikeNone(length), isLikeNone(length) ? 0 : length);
            var r0 = getInt32Memory02()[retptr / 4 + 0];
            var r1 = getInt32Memory02()[retptr / 4 + 1];
            var r2 = getInt32Memory02()[retptr / 4 + 2];
            var r3 = getInt32Memory02()[retptr / 4 + 3];
            if (r3) {
                throw takeObject1(r2);
            }
            var v0 = getArrayU8FromWasm01(r0, r1).slice();
            wasm2.__wbindgen_free(r0, r1 * 1);
            return v0;
        } finally{
            wasm2.__wbindgen_add_to_stack_pointer(16);
        }
    }
    digestAndDrop(length) {
        try {
            const ptr = this.__destroy_into_raw();
            const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
            wasm2.digestcontext_digestAndDrop(retptr, ptr, !isLikeNone(length), isLikeNone(length) ? 0 : length);
            var r0 = getInt32Memory02()[retptr / 4 + 0];
            var r1 = getInt32Memory02()[retptr / 4 + 1];
            var r2 = getInt32Memory02()[retptr / 4 + 2];
            var r3 = getInt32Memory02()[retptr / 4 + 3];
            if (r3) {
                throw takeObject1(r2);
            }
            var v0 = getArrayU8FromWasm01(r0, r1).slice();
            wasm2.__wbindgen_free(r0, r1 * 1);
            return v0;
        } finally{
            wasm2.__wbindgen_add_to_stack_pointer(16);
        }
    }
    reset() {
        try {
            const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
            wasm2.digestcontext_reset(retptr, this.ptr);
            var r0 = getInt32Memory02()[retptr / 4 + 0];
            var r1 = getInt32Memory02()[retptr / 4 + 1];
            if (r1) {
                throw takeObject1(r0);
            }
        } finally{
            wasm2.__wbindgen_add_to_stack_pointer(16);
        }
    }
    clone() {
        const ret = wasm2.digestcontext_clone(this.ptr);
        return DigestContext.__wrap(ret);
    }
}
const imports1 = {
    __wbindgen_placeholder__: {
        __wbg_new_a4b61a0f54824cfd: function(arg0, arg1) {
            const ret = new TypeError(getStringFromWasm02(arg0, arg1));
            return addHeapObject1(ret);
        },
        __wbindgen_object_drop_ref: function(arg0) {
            takeObject1(arg0);
        },
        __wbg_byteLength_3e250b41a8915757: function(arg0) {
            const ret = getObject1(arg0).byteLength;
            return ret;
        },
        __wbg_byteOffset_4204ecb24a6e5df9: function(arg0) {
            const ret = getObject1(arg0).byteOffset;
            return ret;
        },
        __wbg_buffer_facf0398a281c85b: function(arg0) {
            const ret = getObject1(arg0).buffer;
            return addHeapObject1(ret);
        },
        __wbg_newwithbyteoffsetandlength_4b9b8c4e3f5adbff: function(arg0, arg1, arg2) {
            const ret = new Uint8Array(getObject1(arg0), arg1 >>> 0, arg2 >>> 0);
            return addHeapObject1(ret);
        },
        __wbg_length_1eb8fc608a0d4cdb: function(arg0) {
            const ret = getObject1(arg0).length;
            return ret;
        },
        __wbindgen_memory: function() {
            const ret = wasm2.memory;
            return addHeapObject1(ret);
        },
        __wbg_buffer_397eaa4d72ee94dd: function(arg0) {
            const ret = getObject1(arg0).buffer;
            return addHeapObject1(ret);
        },
        __wbg_new_a7ce447f15ff496f: function(arg0) {
            const ret = new Uint8Array(getObject1(arg0));
            return addHeapObject1(ret);
        },
        __wbg_set_969ad0a60e51d320: function(arg0, arg1, arg2) {
            getObject1(arg0).set(getObject1(arg1), arg2 >>> 0);
        },
        __wbindgen_throw: function(arg0, arg1) {
            throw new Error(getStringFromWasm02(arg0, arg1));
        }
    }
};
function instantiate1() {
    return instantiateWithInstance1().exports;
}
let instanceWithExports1;
function instantiateWithInstance1() {
    if (instanceWithExports1 == null) {
        const instance = instantiateInstance1();
        wasm2 = instance.exports;
        cachedInt32Memory01 = new Int32Array(wasm2.memory.buffer);
        cachedUint8Memory01 = new Uint8Array(wasm2.memory.buffer);
        instanceWithExports1 = {
            instance,
            exports: {
                digest,
                DigestContext
            }
        };
    }
    return instanceWithExports1;
}
function instantiateInstance1() {
    const wasmBytes = base64decode1("\
AGFzbQEAAAABo4GAgAAYYAAAYAABf2ABfwBgAX8Bf2ABfwF+YAJ/fwBgAn9/AX9gA39/fwBgA39/fw\
F/YAR/f39/AGAEf39/fwF/YAV/f39/fwBgBX9/f39/AX9gBn9/f39/fwBgBn9/f39/fwF/YAV/f39+\
fwBgB39/f35/f38Bf2ADf39+AGAFf399f38AYAV/f3x/fwBgAn9+AGAEf31/fwBgBH98f38AYAJ+fw\
F/AqSFgIAADBhfX3diaW5kZ2VuX3BsYWNlaG9sZGVyX18aX193YmdfbmV3X2E0YjYxYTBmNTQ4MjRj\
ZmQABhhfX3diaW5kZ2VuX3BsYWNlaG9sZGVyX18aX193YmluZGdlbl9vYmplY3RfZHJvcF9yZWYAAh\
hfX3diaW5kZ2VuX3BsYWNlaG9sZGVyX18hX193YmdfYnl0ZUxlbmd0aF8zZTI1MGI0MWE4OTE1NzU3\
AAMYX193YmluZGdlbl9wbGFjZWhvbGRlcl9fIV9fd2JnX2J5dGVPZmZzZXRfNDIwNGVjYjI0YTZlNW\
RmOQADGF9fd2JpbmRnZW5fcGxhY2Vob2xkZXJfXx1fX3diZ19idWZmZXJfZmFjZjAzOThhMjgxYzg1\
YgADGF9fd2JpbmRnZW5fcGxhY2Vob2xkZXJfXzFfX3diZ19uZXd3aXRoYnl0ZW9mZnNldGFuZGxlbm\
d0aF80YjliOGM0ZTNmNWFkYmZmAAgYX193YmluZGdlbl9wbGFjZWhvbGRlcl9fHV9fd2JnX2xlbmd0\
aF8xZWI4ZmM2MDhhMGQ0Y2RiAAMYX193YmluZGdlbl9wbGFjZWhvbGRlcl9fEV9fd2JpbmRnZW5fbW\
Vtb3J5AAEYX193YmluZGdlbl9wbGFjZWhvbGRlcl9fHV9fd2JnX2J1ZmZlcl8zO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QTEhEQDw4NDAsKAAsgASgCBCEBQdABEBYiBUUNBCAEQZASakE4aiABQThqKQMANwMAIARBkBJq\
QTBqIAFBMGopAwA3AwAgBEGQEmpBKGogAUEoaikDADcDACAEQZASakEgaiABQSBqKQMANwMAIARBkB\
JqQRhqIAFBGGopAwA3AwAgBEGQEmpBEGogAUEQaikDADcDACAEQZASakEIaiABQQhqKQMANwMAIAQg\
ASkDADcDkBIgASkDQCEWIARBkBJqQcgAaiABQcgAahBDIAQgFjcD0BIgBSAEQZASakHQARA5GkEAIQ\
ZBACEBDB8LIAEoAgQhAUHQARAWIgVFDQQgBEGQEmpBOGogAUE4aikDADcDACAEQZASakEwaiABQTBq\
KQMANwMAIARBkBJqQShqIAFBKGopAwA3AwAgBEGQEmpBIGogAUEgaikDADcDACAEQZASakEYaiABQR\
hqKQMANwMAIARBkBJqQRBqIAFBEGopAwA3AwAgBEGQEmpBCGogAUEIaikDADcDACAEIAEpAwA3A5AS\
IAEpA0AhFiAEQZASakHIAGogAUHIAGoQQyAEIBY3A9ASIAUgBEGQEmpB0AEQORpBASEBDBsLIAEoAg\
QhAUHQARAWIgVFDQQgBEGQEmpBOGogAUE4aikDADcDACAEQZASakEwaiABQTBqKQMANwMAIARBkBJq\
QShqIAFBKGopAwA3AwAgBEGQEmpBIGogAUEgaikDADcDACAEQZASakEYaiABQRhqKQMANwMAIARBkB\
JqQRBqIAFBEGopAwA3AwAgBEGQEmpBCGogAUEIaikDADcDACAEIAEpAwA3A5ASIAEpA0AhFiAEQZAS\
akHIAGogAUHIAGoQQyAEIBY3A9ASIAUgBEGQEmpB0AEQORpBAiEBDBoLIAEoAgQhAUHwABAWIgVFDQ\
QgBEGQEmpBIGogAUEgaikDADcDACAEQZASakEYaiABQRhqKQMANwMAIARBkBJqQRBqIAFBEGopAwA3\
AwAgBCABKQMINwOYEiABKQMAIRYgBEGQEmpBKGogAUEoahA3IAQgFjcDkBIgBSAEQZASakHwABA5Gk\
EDIQEMGQsgASgCBCEBQfgOEBYiBUUNBCAEQZASakGIAWogAUGIAWopAwA3AwAgBEGQEmpBgAFqIAFB\
gAFqKQMANwMAIARBkBJqQfgAaiABQfgAaikDADcDACAEQZASakEQaiABQRBqKQMANwMAIARBkBJqQR\
hqIAFBGGopAwA3AwAgBEGQEmpBIGogAUEgaikDADcDACAEQZASakEwaiABQTBqKQMANwMAIARBkBJq\
QThqIAFBOGopAwA3AwAgBEGQEmpBwABqIAFBwABqKQMANwMAIARBkBJqQcgAaiABQcgAaikDADcDAC\
AEQZASakHQAGogAUHQAGopAwA3AwAgBEGQEmpB2ABqIAFB2ABqKQMANwMAIARBkBJqQeAAaiABQeAA\
aikDADcDACAEIAEpA3A3A4ATIAQgASkDCDcDmBIgBCABKQMoNwO4EiABKQMAIRYgAS0AaiEHIAEtAG\
khCCABLQBoIQkCQCABKAKQAUEFdCIKDQBBACEKDBsLIARBGGoiCyABQZQBaiIGQRhqKQAANwMAIARB\
EGoiDCAGQRBqKQAANwMAIARBCGoiDSAGQQhqKQAANwMAIAQgBikAADcDACABQdQBaiEGQQAgCkFgak\
EFdmshDiAEQcQTaiEBQQIhCgNAIAFBYGoiDyAEKQMANwAAIA9BGGogCykDADcAACAPQRBqIAwpAwA3\
AAAgD0EIaiANKQMANwAAAkACQCAOIApqIhBBAkYNACALIAZBYGoiD0EYaikAADcDACAMIA9BEGopAA\
A3AwAgDSAPQQhqKQAANwMAIAQgDykAADcDACAKQThHDQEQagALIApBf2ohCgwcCyABIAQpAwA3AAAg\
AUEYaiALKQMANwAAIAFBEGogDCkDADcAACABQQhqIA0pAwA3AAAgEEEBRg0bIAsgBkEYaikAADcDAC\
AMIAZBEGopAAA3AwAgDSAGQQhqKQAANwMAIAQgBikAADcDACABQcAAaiEBIApBAmohCiAGQcAAaiEG\
DAALC0HQAUEIQQAoAvjUQCIEQQQgBBsRBQAAC0HQAUEIQQAoAvjUQCIEQQQgBBsRBQAAC0HQAUEIQQ\
AoAvjUQCIEQQQgBBsRBQAAC0HwAE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pAwA3AwAgAUGQEmpBIGogAUH4Dm\
pBIGoiECgCADYCACABIAEpA/gONwOQEiABQbgiakEQaiIOIAFBkBJqQRRqKQIANwMAIAFBuCJqQQhq\
IgcgAUGQEmpBDGopAgA3AwAgAUG4ImpBGGoiCCABQZASakEcaikCADcDACABIAEpApQSNwO4IiABQZ\
ASaiABQdABEDkaIAEgASkD0BIgAUHYE2otAAAiBq18NwPQEiABQdgSaiEPAkAgBkGAAUYNACAPIAZq\
QQBBgAEgBmsQOhoLIAFBADoA2BMgAUGQEmogD0J/EBEgAyANKQMANwMAIAogDCkDADcDACACIAspAw\
A3AwAgECABKQOwEjcDACABQfgOakEoaiABQZASakEoaikDADcDACABQfgOakEwaiABQZASakEwaikD\
ADcDACABQfgOakE4aiABQZASakE4aikDADcDACABIAEpA5ASNwP4DiAHIAMpAwA3AwAgDiAKKQMANw\
MAIAggAikDADcDACABIAEpA/gONwO4IkEgEBYiBkUNHCAGIAEpA7giNwAAIAZBGGogAUG4ImpBGGop\
AwA3AAAgBkEQaiABQbgiakEQaikDADcAACAGQQhqIAFBuCJqQQhqKQMANwAAQSAhAwwZCyAEIAVB0A\
EQOSIBQfgOakEsakIANwIAIAFB+A5qQSRqQgA3AgAgAUH4DmpBHGpCADcCACABQfgOakEUakIANwIA\
IAFB+A5qQQxqQgA3AgAgAUIANwL8DiABQTA2AvgOIAFBkBJqQShqIg0gAUH4DmpBKGoiAikDADcDAC\
ABQZASakEgaiABQfgOakEgaiIKKQMANwMAIAFBkBJqQRhqIhAgAUH4DmpBGGoiAykDADcDACABQZAS\
akEQaiIOIAFB+A5qQRBqIg8pAwA3AwAgAUGQEmpBCGoiByABQfgOakEIaiILKQMANwMAIAFBkBJqQT\
BqIgggAUH4DmpBMGoiCSgCADYCACABIAEpA/gONwOQEiABQbgiakEgaiIRIAFBkBJqQSRqKQIANwMA\
IAFBuCJqQRhqIhIgAUGQEmpBHGopAgA3AwAgAUG4ImpBEGoiEyABQZASakEUaikCADcDACABQbgi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NwMAIAwgCikDADcDACAQIAspAwA3AwAgASABKQOYEiIWNwP4DiABIBY3A+gjQSAQFiIGRQ0cIAYg\
ASkD6CM3AAAgBkEYaiABQegjakEYaikDADcAACAGQRBqIAFB6CNqQRBqKQMANwAAIAZBCGogAUHoI2\
pBCGopAwA3AABBICEDDBcLIAQgBUH4DhA5IQEgA0EASA0SAkACQCADDQBBASEGDAELIAMQFiIGRQ0d\
IAZBfGotAABBA3FFDQAgBkEAIAMQOhoLIAFBkBJqIAFB+A4QORogAUH4DmogAUGQEmoQIyABQfgOai\
AGIAMQGAwWCyAEIAVB4AIQOSIKQZASaiAKQeACEDkaIApBkBJqIApB6BRqLQAAIgFqQcgBaiECAkAg\
AUGQAUYNACACQQBBkAEgAWsQOhoLQQAhBiAKQQA6AOgUIAJBAToAACAKQecUaiIBIAEtAABBgAFyOg\
AAA0AgCkGQEmogBmoiASABLQAAIAFByAFqLQAAczoAACABQQFqIgIgAi0AACABQckBai0AAHM6AAAg\
AUECaiICIAItAAAgAUHKAWotAABzOgAAIAFBA2oiAiACLQAAIAFBywFqLQAAczoAACAGQQRqIgZBkA\
FHDQALIApBkBJqECQgCkH4DmpBGGoiASAKQZASakEYaigCADYCACAKQfgOakEQaiICIApBkBJqQRBq\
KQMANwMAIApB+A5qQQhqIg8gCkGQEmpBCGopAwA3AwAgCiAKKQOQEjcD+A5BHCEDQRwQFiIGRQ0cIA\
YgCikD+A43AAAgBkEYaiABKAIANgAAIAZBEGogAikDADcAACAGQQhqIA8pAwA3AAAMFQsgBCAFQdgC\
EDkiCkGQEmogCkHYAhA5GiAKQZASaiAKQeAUai0AACIBakHIAWohAgJAIAFBiAFGDQAgAkEAQYgBIA\
FrEDoaC0EAIQYgCkEAOgDgFCACQQE6AAAgCkHfFGoiASABLQAAQYABcjoAAANAIApBkBJqIAZqIgEg\
AS0AACABQcgBai0AAHM6AAAgAUEBaiICIAItAAAgAUHJAWotAABzOgAAIAFBAmoiAiACLQAAIAFByg\
FqLQAAczo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ACABQQFqIgIgAi0AACABQckBai0AAHM6AAAgAUECaiICIAItAAAgAUHKAWotAABzOgAAIAFB\
A2oiAiACLQAAIAFBywFqLQAAczoAACAGQQRqIgZByABHDQALIApBkBJqECQgCkH4DmpBOGoiASAKQZ\
ASakE4aikDADcDACAKQfgOakEwaiICIApBkBJqQTBqKQMANwMAIApB+A5qQShqIg8gCkGQEmpBKGop\
AwA3AwAgCkH4DmpBIGoiCyAKQZASakEgaikDADcDACAKQfgOakEYaiIMIApBkBJqQRhqKQMANwMAIA\
pB+A5qQRBqIg0gCkGQEmpBEGopAwA3AwAgCkH4DmpBCGoiECAKQZASakEIaikDADcDACAKIAopA5AS\
NwP4DkHAACEDQcAAEBYiBkUNHCAGIAopA/gONwAAIAZBOGogASkDADcAACAGQTBqIAIpAwA3AAAgBk\
EoaiAPKQMANwAAIAZBIGogCykDADcAACAGQRhqIAwpAwA3AAAgBkEQaiANKQMANwAAIAZBCGogECkD\
ADcAAAwSCyAEIAVB4AAQOSIBQfgOakEMakIANwIAIAFCADcC/A5BECEDIAFBEDYC+A4gAUGQEmpBEG\
ogAUH4DmpBEGooAgA2AgAgAUGQEmpBCGogAUH4DmpBCGopAwA3AwAgAUHoI2pBCGoiAiABQZASakEM\
aikCADcDACABIAEpA/gONwOQEiABIAEpApQSNwPoIyABQZASaiABQeAAEDkaIAFBkBJqIAFBqBJqIA\
FB6CNqEC9BEBAWIgZFDRwgBiABKQPoIzcAACAGQQhqIAIpAwA3AAAMEQsgBCAFQeAAEDkiAUH4DmpB\
DGpCADcCACABQgA3AvwOQRAhAyABQRA2AvgOIAFBkBJqQRBqIAFB+A5qQRBqKAIANgIAIAFBkBJqQQ\
hqIAFB+A5qQQhqKQMANwMAIAFB6CNqQQhqIgIgAUGQEmpBDGopAgA3AwAgASABKQP4DjcDkBIgASAB\
KQKUEjcD6CMgAUGQEmogAUHgABA5GiABQZASaiABQagSaiABQegjahAuQRAQFiIGRQ0cIAYgASkD6C\
M3AAAgBkEIaiACKQMANwAADBALQRQhAyAEIAVB6AAQOSIBQfgOakEUakEANgIAIAFB+A5qQQxqQgA3\
AgAgAUEANgL4DiABQgA3AvwOIAFBFDYC+A4gAUGQEmpBEGogAUH4DmpBEGopAwA3AwAgAUGQEmpBCG\
ogAUH4DmpBCGopAwA3AwAgAUHoI2pBCGoiAiABQZASakEMaikCADcDACABQegjakEQaiIKIAFBkBJq\
QRRqKAIANgIAIAEgASkD+A43A5ASIAEgASkClBI3A+gjIAFBkBJqIAFB6AAQORogAUGQEmogAUGwEm\
ogAUHoI2oQLUEUEBYiBkUNHCAGIAEpA+gjNwAAIAZBEGogCigCADYAACAGQQhqIAIpAwA3AAAMDwtB\
FCEDIAQgBUHoABA5IgFB+A5qQRRqQQA2AgAgAUH4DmpBDGpCADcCACABQQA2AvgOIAFCADcC/A4gAU\
EUNgL4DiABQZASakEQaiABQfgOakEQaikDADcDACABQZASakEIaiABQfgOakEIaikDADcDACABQegj\
akEIaiICIAFBkBJqQQxqKQIANwMAIAFB6CNqQRBqIgogAUGQEmpBFGooAgA2AgAgASABKQP4DjcDkB\
IgASABKQKUEjcD6CMgAUGQEmogAUHoABA5GiABQZASaiABQbASaiABQegjahAoQRQQFiIGRQ0cIAYg\
ASkD6CM3AAAgBkEQaiAKKAIANgAAIAZBCGogAikDADcAAAwOCyAEIAVB4AIQOSIKQZASaiAKQeACED\
kaIApBkBJqIApB6BRqLQAAIgFqQcgBaiECAkAgAUGQAUYNACACQQBBkAEgAWsQOhoLQQAhBiAKQQA6\
AOgUIAJBBjoAACAKQecUaiIBIAEtAABBgAFyOgAAA0AgCkGQEmogBmoiASABLQAAIAFByAFqLQAAcz\
oAACABQQFqIgIgAi0AACABQckBai0AAHM6AAAgAUECaiICIAItAAAgAUHKAWotAABzOgAAIAFBA2oi\
AiACLQAAIAFBywFqLQAAczoAACAGQQRqIgZBkAFHDQALIApBkBJqECQgCkH4DmpBGGoiASAKQZASak\
EYaigCADYCACAKQfgOakEQaiICIApBkBJqQRB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cDACAKQfgOakEQaiILIApBkBJqQRBqKQMANwMAIApB\
+A5qQQhqIgwgCkGQEmpBCGopAwA3AwAgCiAKKQOQEjcD+A5BMCEDQTAQFiIGRQ0cIAYgCikD+A43AA\
AgBkEoaiABKQMANwAAIAZBIGogAikDADcAACAGQRhqIA8pAwA3AAAgBkEQaiALKQMANwAAIAZBCGog\
DCkDADcAAAwLCyAEIAVBmAIQOSIKQZASaiAKQZgCEDkaIApBkBJqIApBoBRqLQAAIgFqQcgBaiECAk\
AgAUHIAEYNACACQQBByAAgAWsQOhoLQQAhBiAKQQA6AKAUIAJBBjoAACAKQZ8UaiIBIAEtAABBgAFy\
OgAAA0AgCkGQEmogBmoiASABLQAAIAFByAFqLQAAczoAACABQQFqIgIgAi0AACABQckBai0AAHM6AA\
AgAUECaiICIAItAAAgAUHKAWotAABzOgAAIAFBA2oiAiACLQAAIAFBywFqLQAAczoAACAGQQRqIgZB\
yABHDQALIApBkBJqECQgCkH4DmpBOGoiASAKQZASakE4aikDADcDACAKQfgOakEwaiICIApBkBJqQT\
BqKQMANwMAIApB+A5qQShqIg8gCkGQEmpBKGopAwA3AwAgCkH4DmpBIGoiCyAKQZASakEgaikDADcD\
ACAKQfgOakEYaiIMIApBkBJqQRhqKQMANwMAIApB+A5qQRBqIg0gCkGQEmpBEGopAwA3AwAgCkH4Dm\
pBCGoiECAKQZASakEIaikDADcDACAKIAopA5ASNwP4DkHAACEDQcAAEBYiBkUNHCAGIAopA/gONwAA\
IAZBOGogASkDADcAACAGQTBqIAIpAwA3AAAgBkEoaiAPKQMANwAAIAZBIGogCykDADcAACAGQRhqIA\
wpAwA3AAAgBkEQaiANKQMANwAAIAZBCGogECkDADcAAAwKCyAEIAVB8AAQOSIBQZASaiABQfAAEDka\
QRwhAyABQegjakEcakIANwIAIAFB6CNqQRRqQgA3AgAgAUHoI2pBDGpCADcCACABQgA3AuwjIAFBID\
YC6CMgAUH4DmpBGGoiAiABQegjakEYaikDADcDACABQfgOakEQaiIKIAFB6CNqQRBqKQMANwMAIAFB\
+A5qQQhqIg8gAUHoI2pBCGopAwA3AwAgAUH4DmpBIGogAUHoI2pBIGooAgA2AgAgASABKQPoIzcD+A\
4gAUG4ImpBEGoiBiABQfgOakEUaikCADcDACABQbgiakEIaiILIAFB+A5qQQxqKQIANwMAIAFBuCJq\
QRhqIgwgAUH4DmpBHGopAgA3AwAgASABKQL8DjcDuCIgAUGQEmogAUG4EmogAUG4ImoQJyACIAwoAg\
A2AgAgCiAGKQMANwMAIA8gCykDADcDACABIAEpA7giNwP4DkEcEBYiBkUNHCAGIAEpA/gONwAAIAZB\
GGogAigCADYAACAGQRBqIAopAwA3AAAgBkEIaiAPKQMANwAADAkLIAQgBUHwABA5IgFBkBJqIAFB8A\
AQORogAUHoI2pBHGpCADcCACABQegjakEUakIANwIAIAFB6CNqQQxqQgA3AgAgAUIANwLsI0EgIQMg\
AUEgNgLoIyABQfgOakEgaiABQegjakEgaigCADYCACABQfgOakEYaiICIAFB6CNqQRhqKQMANwMAIA\
FB+A5qQRBqIgogAUHoI2pBEGopAwA3AwAgAUH4DmpBCGoiDyABQegjakEIaikDADcDACABIAEpA+gj\
NwP4DiABQbgiakEYaiIGIAFB+A5qQRxqKQIANwMAIAFBuCJqQRBqIgsgAUH4DmpBFGopAgA3AwAgAU\
G4ImpBCGoiDCABQfgOakEMaikCADcDACABIAEpAvwONwO4IiABQZASaiABQbgSaiABQbgiahAnIAIg\
BikDADcDACAKIAspAwA3AwAgDyAMKQMANwMAIAEgASkDuCI3A/gOQSAQFiIGRQ0cIAYgASkD+A43AA\
AgBkEYaiACKQMANwAAIAZBEGogCikDADcAACAGQQhqIA8pAwA3AAAMCAsgBCAFQdgBEDkiAUGQEmog\
AUHYARA5GiABQegjakEMakIANwIAIAFB6CNqQRRqQgA3AgAgAUHoI2pBHGpCADcCACABQegjakEkak\
IANwIAIAFB6CNqQSxqQgA3AgAgAUHoI2pBNGpCADcCACABQegjakE8akIANwIAIAFCADcC7CMgAUHA\
ADYC6CMgAUH4DmogAUHoI2pBxAAQORogAUHwImogAUH4DmpBPGopAgA3AwBBMCEDIAFBuCJqQTBqIA\
FB+A5qQTRqKQIANwMAIAFBuCJqQShqIgYgAUH4DmpBLGopAgA3AwAgAUG4ImpBIGoiAiABQfgOakEk\
aikCADcDACABQbgiakEYaiIKIAFB+A5qQRxqKQIANwMAIAFBuCJqQRBqIg8gAUH4DmpBFGopAgA3Aw\
AgAUG4ImpBCGoiCyABQfgOakEMaikCADcDACABIAEpAvwONwO4IiABQZASaiABQeASaiABQbgiahAi\
IAFB+A5qQShqIgwgBikDADcDACABQfgOakEgaiINIAIpAwA3AwAgAUH4DmpBGGoiAiAKKQMANwMAIA\
FB+A5qQRBqIgogDykDADcDACABQfgOakEIaiIPIAspAwA3AwAgASABKQO4IjcD+A5BMBAWIgZFDRwg\
BiABKQP4DjcAACAGQShqIAwpAwA3AAAgBkEgaiANKQMANwAAIAZBGGogAikDADcAACAGQRBqIAopAw\
A3AAAgBkEIaiAPKQMANwAADAcLIAQgBUHYARA5IgFBkBJqIAFB2AEQORogAUHoI2pBDGpCADcCACAB\
QegjakEUakIANwIAIAFB6CNqQRxqQgA3AgAgAUHoI2pBJGpCADcCACABQegjakEsakIANwIAIAFB6C\
NqQTRqQgA3AgAgAUHoI2pBPGpCADcCACABQgA3AuwjQcAAIQMgAUHAADYC6CMgAUH4DmogAUHoI2pB\
xAAQORogAUG4ImpBOGoiBiABQfgOakE8aikCADcDACABQbgiakEwaiICIAFB+A5qQTRqKQIANwMAIA\
FBuCJqQShqIgogAUH4DmpBLGopAgA3AwAgAUG4ImpBIGoiDyABQfgOakEkaikCADcDACABQbgiakEY\
aiILIAFB+A5qQRxqKQIANwMAIAFBuCJqQRBqIgwgAUH4DmpBFGopAgA3AwAgAUG4ImpBCGoiDSABQf\
gOakEMaikCADcDACABIAEpAvwONwO4IiABQZASaiABQeASaiABQbgiahAiIAFB+A5qQThqIhAgBikD\
ADcDACABQfgOakEwaiIOIAI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\
E0akIANwIAIARB0ARqQTxqQgA3AgAgBEIANwLUBCAEQcAANgLQBCAEQShqIARB0ARqQcQAEDkaIARB\
oANqQThqIgYgBEEoakE8aikCADcDACAEQaADakEwaiIHIARBKGpBNGopAgA3AwAgBEGgA2pBKGoiCC\
AEQShqQSxqKQIANwMAIARBoANqQSBqIgkgBEEoakEkaikCADcDACAEQaADakEYaiIKIARBKGpBHGop\
AgA3AwAgBEGgA2pBEGoiCyAEQShqQRRqKQIANwMAIARBoANqQQhqIgwgBEEoakEMaikCADcDACAEIA\
QpAiw3A6ADIAIgAikDQCACQcgBaiIDLQAAIgGtfDcDQCACQcgAaiEFAkAgAUGAAUYNACAFIAFqQQBB\
gAEgAWsQOhoLQQAhASADQQA6AAAgAiAFQn8QESAEQShqQQhqIgUgAkEIaikDACIQNwMAIARBKGpBEG\
ogAkEQaikDACIRNwMAIARBKGpBGGogAkEYaikDACISNwMAIARBKGpBIGogAikDICITNwMAIARBKGpB\
KGogAkEoaikDACIUNwMAIAwgEDcDACALIBE3AwAgCiASNwMAIAkgEzcDACAIIBQ3AwAgByACQTBqKQ\
MANwMAIAYgAkE4aikDADcDACAEIAIpAwAiEDcDKCAEIBA3A6ADIAVBwAAQTyACIAVByAAQORogA0EA\
OgAAQcAAEBYiAkUNGiACIAQpA6ADNwAAIAJBOGogBEGgA2pBOGopAwA3AAAgAkEwaiAEQaADakEwai\
kDADcAACACQShqIARBoANqQShqKQMANwAAIAJBIGogBEGgA2pBIGopAwA3AAAgAkEYaiAEQaADakEY\
aikDADcAACACQRBqIARBoANqQRBqKQMANwAAIAJBCGogBEGgA2pBCGopAwA3AABBwAAhAwwyCyABKA\
IEIQIgBEHQBGpBHGpCADcCACAEQdAEakEUakIANwIAIARB0ARqQQxqQgA3AgAgBEIANwLUBCAEQSA2\
AtAEIARBKGpBGGoiByAEQdAEakEYaikDADcDACAEQShqQRBqIgggBEHQBGpBEGopAwA3AwAgBEEoak\
EIaiIDIARB0ARqQQhqKQMANwMAIARBKGpBIGoiCSAEQdAEakEgaigCADYCACAEIAQpA9AENwMoIARB\
oANqQRBqIgogBEEoakEUaikCADcDACAEQaADakEIaiILIARBKGpBDGopAgA3AwAgBEGgA2pBGGoiDC\
AEQShqQRxqKQIANwMAIAQgBCkCLDcDoAMgAiACKQNAIAJByAFqIgUtAAAiAa18NwNAIAJByABqIQYC\
QCABQYABRg0AIAYgAWpBAEGAASABaxA6GgtBACEBIAVBADoAACACIAZCfxARIAMgAkEIaikDACIQNw\
MAIAggAkEQaikDACIRNwMAIAcgAkEYaikDACISNwMAIAkgAikDIDcDACAEQShqQShqIAJBKGopAwA3\
AwAgCyAQNwMAIAogETcDACAMIBI3AwAgBCACKQMAIhA3AyggBCAQNwOgAyADQSAQTyACIANByAAQOR\
ogBUEAOgAAQSAQFiICRQ0aIAIgBCkDoAM3AAAgAkEYaiAEQaADakEYaikDADcAACACQRBqIARBoANq\
QRBqKQMANwAAIAJBCGogBEGgA2pBCGopAwA3AABBICEDDDELIAEoAgQhAiAEQdAEakEsakIANwIAIA\
RB0ARqQSRqQgA3AgAgBEHQBGpBHGpCADcCACAEQdAEakEUakIANwIAIARB0ARqQQxqQgA3AgAgBEIA\
NwLUBCAEQTA2AtAEIARBKGpBKGoiByAEQdAEakEoaikDADcDACAEQShqQSBqIgggBEHQBGpBIGopAw\
A3AwAgBEEoakEYaiIJIARB0ARqQRhqKQMANwMAIARBKGpBEGoiCiAEQdAEakEQaikDADcDACAEQShq\
QQhqIgMgBEHQBGpBCGopAwA3AwAgBEEoakEwaiAEQdAEakEwaigCADYCACAEIAQpA9AENwMoIARBoA\
NqQSBqIgsgBEEoakEkaikCADcDACAEQaADakEYaiIMIARBKGpBHGopAgA3AwAgBEGgA2pBEGoiDSAE\
QShqQRRqKQIANwMAIARBoANqQQhqIg4gBEEoakEMaikCADcDACAEQaADakEoaiIPIARBKGpBLGopAg\
A3AwAgBCAEKQIsNwOgAyACIAIpA0AgAkHIAWoiBS0AACIBrXw3A0AgAkHI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LQAAIAFBygFqLQAAczoAACABQQNqIgMgAy0AACABQcsBai0AAHM6AAAgAkEEaiICQcgARw0ACyAF\
ECQgBEEoakE4aiIGIAVBOGopAAA3AwAgBEEoakEwaiIHIAVBMGopAAA3AwAgBEEoakEoaiIIIAVBKG\
opAAA3AwAgBEEoakEgaiIJIAVBIGopAAA3AwAgBEEoakEYaiIKIAVBGGopAAA3AwAgBEEoakEQaiIL\
IAVBEGopAAA3AwAgBEEoakEIaiIMIAVBCGopAAA3AwAgBCAFKQAANwMoQQAhASAFQQBByAEQOkGQAm\
pBADoAAEHAACEDQcAAEBYiAkUNGiACIAQpAyg3AAAgAkE4aiAGKQMANwAAIAJBMGogBykDADcAACAC\
QShqIAgpAwA3AAAgAkEgaiAJKQMANwAAIAJBGGogCikDADcAACACQRBqIAspAwA3AAAgAkEIaiAMKQ\
MANwAADCoLIAEoAgQhAiAEQdAEakEMakIANwIAIARCADcC1ARBECEDIARBEDYC0AQgBEEoakEQaiAE\
QdAEakEQaigCADYCACAEQShqQQhqIARB0ARqQQhqKQMANwMAIARBoANqQQhqIgUgBEEoakEMaikCAD\
cDACAEIAQpA9AENwMoIAQgBCkCLDcDoAMgAiACQRhqIARBoANqEC9BACEBIAJB2ABqQQA6AAAgAkEQ\
akL+uevF6Y6VmRA3AwAgAkKBxpS6lvHq5m83AwggAkIANwMAQRAQFiICRQ0aIAIgBCkDoAM3AAAgAk\
EIaiAFKQMANwAADCkLIAEoAgQhAiAEQdAEakEMakIANwIAIARCADcC1ARBECEDIARBEDYC0AQgBEEo\
akEQaiAEQdAEakEQaigCADYCACAEQShqQQhqIARB0ARqQQhqKQMANwMAIARBoANqQQhqIgUgBEEoak\
EMaikCADcDACAEIAQpA9AENwMoIAQgBCkCLDcDoAMgAiACQRhqIARBoANqEC5BACEBIAJB2ABqQQA6\
AAAgAkEQakL+uevF6Y6VmRA3AwAgAkKBxpS6lvHq5m83AwggAkIANwMAQRAQFiICRQ0aIAIgBCkDoA\
M3AAAgAkE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GpBFGpCADcCACAEQdAEakEcakIANw\
IAIARB0ARqQSRqQgA3AgAgBEHQBGpBLGpCADcCACAEQdAEakE0akIANwIAIARB0ARqQTxqQgA3AgAg\
BEIANwLUBCAEQcAANgLQBCAEQShqIARB0ARqQcQAEDkaIARBoANqQThqIARBKGpBPGopAgA3AwBBMC\
EDIARBoANqQTBqIARBKGpBNGopAgA3AwAgBEGgA2pBKGoiASAEQShqQSxqKQIANwMAIARBoANqQSBq\
IgUgBEEoakEkaikCADcDACAEQaADakEYaiIGIARBKGpBHGopAgA3AwAgBEGgA2pBEGoiByAEQShqQR\
RqKQIANwMAIARBoANqQQhqIgggBEEoakEMaikCADcDACAEIAQpAiw3A6ADIAIgAkHQAGogBEGgA2oQ\
IiAEQShqQShqIgkgASkDADcDACAEQShqQSBqIgogBSkDADcDACAEQShqQRhqIgUgBikDADcDACAEQS\
hqQRBqIgYgBykDADcDACAEQShqQQhqIgcgCCkDADcDACAEIAQpA6ADNwMoIAJByABqQgA3AwAgAkIA\
NwNAQQAhASACQThqQQApA6iPQDcDACACQTBqQQApA6CPQDcDACACQShqQQApA5iPQDcDACACQSBqQQ\
ApA5CPQDcDACACQRhqQQApA4iPQDcDACACQRBqQQApA4CPQDcDACACQQhqQQApA/iOQDcDACACQQAp\
A/COQDcDACACQdABakEAOgAAQTAQFiICRQ0aIAIgBCkDKDcAACACQShqIAkpAwA3AAAgAkEgaiAKKQ\
MANwAAIAJBGGogBSkDADcAACACQRBqIAYpAwA3AAAgAkEIaiAHKQMANwAADB8LIAEoAgQhAiAEQdAE\
akEMakIANwIAIARB0ARqQRRqQgA3AgAgBEHQBGpBHGpCADcCACAEQdAEakEkakIANwIAIARB0ARqQS\
xqQgA3AgAgBEHQBGpBNGpCADcCACAEQdAEakE8akIANwIAIARCADcC1ARBwAAhAyAEQcAANgLQBCAE\
QShqIARB0ARqQcQAEDkaIARBoANqQThqIgEgBEEoakE8aikCADcDACAEQaADakEwaiIFIARBKGpBNG\
opAgA3AwAgBEGgA2pBKGoiBiAEQShqQSxqKQIANwMAIARBoANqQSBqIgcgBEEoakEkaikCADcDACAE\
QaADakEYaiIIIARBKGpBHGopAgA3AwAgBEGgA2pBEGoiCSAEQShqQRRqKQIANwMAIARBoANqQQhqIg\
ogBEEoakEMaikCADcDACAEIAQpAiw3A6ADIAIgAkHQAGogBEGgA2oQIiAEQShqQThqIgsgASkDADcD\
ACAEQShqQTBqIgwgBSkDADcDACAEQShqQShqIgUgBikDADcDACAEQShqQSBqIgYgBykDADcDACAEQS\
hqQRhqIgcgCCkDADcDACAEQShqQRBqIgggCSkDADcDACAEQShqQQhqIgkgCikDADcDACAEIAQpA6AD\
NwMoIAJByABqQgA3AwAgAkIANwNAQQAhASACQThqQQApA+iOQDcDACACQTBqQQApA+COQDcDACACQS\
hqQQApA9iOQDcDACACQSBqQQApA9COQDcDACACQRhqQQApA8iOQDcDACACQRBqQQApA8COQDcDACAC\
QQhqQQApA7iOQDcDACACQQApA7COQDcDACACQdABakEAOgAAQcAAEBYiAkUNGiACIAQpAyg3AAAgAk\
E4aiALKQMANwAAIAJBMGogDCkDADcAACACQShqIAUpAwA3AAAgAkEgaiAGKQMANwAAIAJBGGogBykD\
ADcAACACQRBqIAgpAwA3AAAgAkEIaiAJKQMANwAADB4LIANBAEgNASABKAIEIQcCQAJAIAMNAEEBIQ\
IMAQsgAxAWIgJFDRsgAkF8ai0AAEEDcUUNACACQQAgAxA6GgsgByAHQfACaiIILQAAIgFqQcgBaiEG\
AkAgAUGoAUYNACAGQQBBqAEgAWsQOhoLQQAhBSAIQQA6AAAgBkEfOgAAIAdB7wJqIgEgAS0AAEGAAX\
I6AAADQCAHIAVqIgEgAS0AACABQcgBai0AAHM6AAAgAUEBaiIGIAYtAAAgAUHJAWotAABzOgAAIAFB\
AmoiBiAGLQAAIAFBygFqLQAAczoAACABQQNqIgYgBi0AACABQcsBai0AAHM6AAAgBUEEaiIFQagBRw\
0ACyAHECQgBEEoaiAHQcgBEDkaQQAhASAHQ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FFcSIHayIFQQZ0IghrIQIgBU\
UNOSAIRQ05IAZBACAHa2pBBnQhBiABIQUDQCAAIAApAwBCwAB8NwMAIAAgBUEAEBMgBUHAAGohBSAG\
QUBqIgYNAAw6CwsgBCAFaiABIAIQORogBSACaiECDDkLIAAoAgQiCEHpAGotAABBBnQgCC0AaGoiAE\
UNNiAIIAEgAkGACCAAayIAIAAgAksbIgUQMxogAiAFayICRQ1CIANB+ABqQRBqIAhBEGoiACkDADcD\
ACADQfgAakEYaiAIQRhqIgYpAwA3AwAgA0H4AGpBIGogCEEgaiIEKQMANwMAIANB+ABqQTBqIAhBMG\
opAwA3AwAgA0H4AGpBOGogCEE4aikDADcDACADQfgAakHAAGogCEHAAGopAwA3AwAgA0H4AGpByABq\
IAhByABqKQMANwMAIANB+ABqQdAAaiAIQdAAaikDADcDACADQfgAakHYAGogCEHYAGopAwA3AwAgA0\
H4AGpB4ABqIAhB4ABqKQMANwMAIAMgCCkDCDcDgAEgAyAIKQMoNwOgASAIQekAai0AACEHIAgtAGoh\
CSADIAgtAGgiCjoA4AEgAyAIKQMAIh03A3ggAyAJIAdFckECciIHOgDhASADQegBakEYaiIJIAQpAg\
A3AwAgA0HoAWpBEGoiBCAGKQIANwMAIANB6AFqQQhqIgYgACkCADcDACADIAgpAgg3A+gBIANB6AFq\
IANB+ABqQShqIAogHSAHEBkgCSgCACEHIAQoAgAhBCAGKAIAIQkgAygChAIhCiADKAL8ASELIAMoAv\
QBIQwgAygC7AEhDSADKALoASEOIAggCCkDABApIAgoApABIgZBN08NEyAIQZABaiAGQQV0aiIAQSBq\
IAo2AgAgAEEcaiAHNgIAIABBGGogCzYCACAAQRRqIAQ2AgAgAEEQaiAMNgIAIABBDGogCTYCACAAQQ\
hqIA02AgAgAEEEaiAONgIAIAggBkEBajYCkAEgCEEoaiIAQgA3AwAgAEEIakIANwMAIABBEGpCADcD\
ACAAQRhqQgA3AwAgAEEgakIANwMAIABBKGpCADcDACAAQTBqQgA3AwAgAEE4akI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AmotAABzOgAAIABBA2oiAC\
AALQAAIAZBA2otAABzOgAAIAVBBGoiBUGIAUcNAAsgBBAkIAghASAIIAdGDTAMAAsLIAogAGogASAC\
EDkaIAAgAmohCQwvCyAAKAIEIgRByAFqIQoCQEHoACAEQbACai0AACIAayIIIAJLDQACQCAARQ0AIA\
ogAGogASAIEDkaIAIgCGshAkEAIQUDQCAEIAVqIgAgAC0AACAAQcgBai0AAHM6AAAgAEEBaiIGIAYt\
AAAgAEHJAWotAABzOgAAIABBAmoiBiAGLQAAIABBygFqLQAAczoAACAAQQNqIgYgBi0AACAAQcsBai\
0AAHM6AAAgBUEEaiIFQegARw0ACyAEECQgASAIaiEBCyABIAJB6ABuQegAbCIAaiEHIAIgAGshCSAC\
QecATQ0rIABFDSsDQCABQegAaiEIQQAhBQNAIAQgBWoiACAALQAAIAEgBWoiBi0AAHM6AAAgAEEBai\
ICIAItAAAgBkEBai0AAHM6AAAgAEECaiICIAItAAAgBkECai0AAHM6AAAgAEEDaiIAIAAtAAAgBkED\
ai0AAHM6AAAgBUEEaiIFQegARw0ACyAEECQgCCEBIAggB0YNLAwACwsgCiAAaiABIAIQORogACACai\
EJDCsLIAAoAgQiBEHIAWohCgJAQcgAIARBkAJqLQAAIgBrIgggAksNAAJAIABFDQAgCiAAaiABIAgQ\
ORogAiAIayECQQAhBQNAIAQgBWoiACAALQAAIABByAFqLQAAczoAACAAQQFqIgYgBi0AACAAQckBai\
0AAHM6AAAgAEECaiIGIAYtAAAgAEHKAWotAABzOgAAIABBA2oiBiAGLQAAIABBywFqLQAAczoAACAF\
QQRqIgVByABHDQALIAQQJCABIAhqIQELIAEgAkHIAG5ByABsIgBqIQcgAiAAayEJIAJBxwBNDScgAE\
UNJwNAIAFByABqIQhBACEFA0AgBCAFaiIAIAAtAAAgASAFaiIGLQAAczoAACAAQQFqIgIgAi0AACAG\
QQFqLQAAczoAACAAQQJqIgIgAi0AACAGQQJqLQAAczoAACAAQQNqIgAgAC0AACAGQQNqLQAA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QcgAak\
IANwMAIARCADcDQCAEQQA6ANABIARBACkDsI5ANwMAIARBCGpBACkDuI5ANwMAIARBEGpBACkDwI5A\
NwMAIARBGGpBACkDyI5ANwMAIARBIGpBACkD0I5ANwMAIARBKGpBACkD2I5ANwMAIARBMGpBACkD4I\
5ANwMAIARBOGpBACkD6I5ANwMAQRQhBQwjC0HwABAWIgRFDQwgAkGwAWpBCGoQVSAEQSBqIAJB2AFq\
KQMANwMAIARBGGogAkGwAWpBIGopAwA3AwAgBEEQaiACQbABakEYaikDADcDACAEQQhqIAJBsAFqQR\
BqKQMANwMAIAQgAikDuAE3AwAgAkEMakIANwIAIAJBFGpCADcCACACQRxqQgA3AgAgAkEkakIANwIA\
IAJBLGpCADcCACACQTRqQgA3AgAgAkE8akIANwIAIAJCADcCBCACQcAANgIAIAJBsAFqIAJBxAAQOR\
ogBEHgAGogAkGwAWpBPGopAgA3AAAgBEHYAGogAkGwAWpBNGopAgA3AAAgBEHQAGogAkGwAWpBLGop\
AgA3AAAgBEHIAGogAkGwAWpBJGopAgA3AAAgBEHAAGogAkGwAWpBHGopAgA3AAAgBEE4aiACQbABak\
EUaikCADcAACAEQTBqIAJBsAFqQQxqKQIANwAAIAQgAikCtAE3ACggBEEAOgBoQQMhBQwiCwJAAkAC\
QAJAIANBuoDAAEEKEFFFDQAgA0HEgMAAQQoQUUUNASADQc6AwABBChBRRQ0CIANB2IDAAEEKEFFFDQ\
MgA0HogMAAQQoQUQ0MQegAEBYiBEUNFiACQQxqQgA3AgAgAkEUakIANwIAIAJBHGpCADcCACACQSRq\
QgA3AgAgAkEsakIANwIAIAJBNGpCADcCACACQTxqQgA3AgAgAkIANwIEIAJBwAA2AgAgAkGwAWogAk\
HEABA5GiAEQdgAaiACQbABakE8aikCADcAACAEQdAAaiACQbABakE0aikCADcAACAEQcgAaiACQbAB\
akEsaikCADcAACAEQcAAaiACQbABakEkaikCADcAACAEQThqIAJBsAFqQRxqKQIANwAAIARBMGogAk\
GwAWpBFGopAgA3AAAgBEEoaiACQbABakEMaikCADcAACAEIAIpArQBNwAgIARCADcDACAEQQA6AGAg\
BEEAKQPYjUA3AwggBEEQakEAKQPgjUA3AwAgBEEYakEAKALojUA2AgBBCyEFDCULQeACEBYiBEUNDy\
AEQQBByAEQOiEFIAJBADYCACACQQRyQQBBkAEQOhogAkGQATYCACACQbABaiACQZQBEDkaIAVByAFq\
IAJBsAFqQQRyQZABEDkaIAVBADoA2AJBBSEFDCQLQdgCEBYiBEUNDyAEQQBByAEQOiEFIAJBADYCAC\
ACQQRyQQBBiAEQOhogAkGIATYCACACQbABaiACQYwBEDkaIAVByAFqIAJBsAFqQQRyQYgBEDkaIAVB\
ADoA0AJBBiEFDCMLQbgCEBYiBEUNDyAEQQBByAEQOiEFIAJBADYCACACQQRyQQBB6AAQOhogAkHoAD\
YCACACQbABaiACQewAEDkaIAVByAFqIAJBsAFqQQRyQegAEDkaIAVBADoAsAJBByEFDCILQZgCEBYi\
BEUNDyAEQQBByAEQOiEFIAJBADYCACACQQRyQQBByAAQOhogAkHIADYCACACQbABaiACQcwAEDkaIA\
VByAFqIAJBsAFqQQRyQcgAEDkaIAVBADoAkAJBCCEFDCELAkAgA0HigMAAQQMQUUUNACADQeWAwABB\
AxBRDQhB4AAQFiIERQ0RIAJBDGpCADcCACACQRRqQgA3AgAgAkEcakIANwIAIAJBJGpCADcCACACQS\
xqQgA3AgAgAkE0akIANwIAIAJBPGpCADcCACACQgA3AgQgAkHAADYCACACQbABaiACQcQAEDkaIARB\
0ABqIAJBsAFqQTxqKQIANwAAIARByABqIAJBsAFqQTRqKQIANwAAIARBwABqIAJBsAFqQSxqKQIANw\
AAIARBOGogAkGwAWpBJGopAgA3AAAgBEEwaiACQbABakEcaikCADcAACAEQShqIAJBsAFqQRRqKQIA\
NwAAIARBIGogAkGwAWpBDGopAgA3AAAgBCACKQK0ATcAGCAEQv6568XpjpWZEDcDECAEQoHGlLqW8e\
rmbzcDCCAEQgA3AwAgBEEAOgBYQQohBQwhC0HgABAWIgRFDQ8gAkEMakIANwIAIAJBFGpCADcCACAC\
QRxqQgA3AgAgAkEkakIANwIAIAJBLGpCADcCACACQTRqQgA3AgAgAkE8akIANwIAIAJCADcCBCACQc\
AANgIAIAJBsAFqIAJBxAAQORogBEHQAGogAkGwAWpBPGopAgA3AAAgBEHIAGogAkGwAWpBNGopAgA3\
AAAgBEHAAGogAkGwAWpBLGopAgA3AAAgBEE4aiACQbABakEkaikCADcAACAEQTBqIAJBsAFqQRxqKQ\
IANwAAIARBKGogAkGwAWpBFGopAgA3AAAgBEEgaiACQbABakEMaikCADcAACAEIAIpArQBNwAYIARC\
/rnrxemOlZkQNwMQIARCgcaUupbx6uZvNwMIIARCADcDACAEQQA6AFhBCSEFDCALAkACQAJAAkAgAy\
kAAELTkIWa08WMmTRRDQAgAykAAELTkIWa08XMmjZRDQEgAykAAELTkIWa0+WMnDRRDQIgAykAAELT\
kIWa06XNmDJRDQMgAykAAELTkIXa1KiMmThRDQcgAykAAELTkIXa1MjMmjZSDQpB2AIQFiIERQ0eIA\
RBAEHIARA6IQUgAkEANgIAIAJBBHJBAEGIARA6GiACQYgBNgIAIAJBsAFqIAJBjAEQORogBUHIAWog\
AkGwAWpBBHJBiAEQORogBUEAOgDQAkEWIQUMIwtB4AIQFiIERQ0UIARBAEHIARA6IQUgAkEANgIAIA\
JBBHJBAEGQARA6GiACQZABNgIAIAJBsAFqIAJBlAEQORogBUHIAWogAkGwAWpBBHJBkAEQORogBUEA\
OgDYAkENIQUMIgtB2AIQFiIERQ0UIARBAEHIARA6IQUgAkEANgIAIAJBBHJBAEGIARA6GiACQYgBNg\
IAIAJBsAFqIAJBjAEQORogBUHIAWogAkGwAWpBBHJBiAEQORogBUEAOgDQAkEOIQUMIQtBuAIQFiIE\
RQ0UIARBAEHIARA6IQUgAkEANgIAIAJBBHJBAEHoABA6GiACQegANgIAIAJBsAFqIAJB7AAQORogBU\
HIAWogAkGwAWpBBHJB6AAQORogBUEAOgCwAkEPIQUMIAtBmAIQFiIERQ0UIARBAEHIARA6IQUgAkEA\
NgIAIAJBBHJBAEHIABA6GiACQcgANgIAIAJBsAFqIAJBzAAQORogBUHIAWogAkGwAWpBBHJByAAQOR\
ogBUEAOgCQAkEQIQUMHwtB8AAQFiIERQ0UIAJBDGpCADcCACACQRRqQgA3AgAgAkEcakIANwIAIAJB\
JGpCADcCACACQSxqQgA3AgAgAkE0akIANwIAIAJBPGpCADcCACACQgA3AgQgAkHAADYCACACQbABai\
ACQcQAEDkaIARB4ABqIAJBsAFqQTxqKQIANwAAIARB2ABqIAJBsAFqQTRqKQIANwAAIARB0ABqIAJB\
sAFqQSxqKQIANwAAIARByABqIAJBsAFqQSRqKQIANwAAIARBwABqIAJBsAFqQRxqKQIANwAAIARBOG\
ogAkGwAWpBFGopAgA3AAAgBEEwaiACQbABakEMaikCADcAACAEIAIpArQBNwAoIARCADcDACAEQQA6\
AGggBEEAKQOQjkA3AwggBEEQakEAKQOYjkA3AwAgBEEYakEAKQOgjkA3AwAgBEEgakEAKQOojkA3Aw\
BBESEFDB4LQfAAEBYiBEUNFCACQQxqQgA3AgAgAkEUakIANwIAIAJBHGpCADcCACACQSRqQgA3AgAg\
AkEsakIANwIAIAJBNGpCADcCACACQTxqQgA3AgAgAkIANwIEIAJBwAA2AgAgAkGwAWogAkHEABA5Gi\
AEQeAAaiACQbABakE8aikCADcAACAEQdgAaiACQbABakE0aikCADcAACAEQdAAaiACQbABakEsaikC\
ADcAACAEQcgAaiACQbABakEkaikCADcAACAEQcAAaiACQbABakEcaikCADcAACAEQThqIAJBsAFqQR\
RqKQIANwAAIARBMGogAkGwAWpBDGopAgA3AAAgBCACKQK0ATcAKCAEQgA3AwAgBEEAOgBoIARBACkD\
8I1ANwMIIARBEGpBACkD+I1ANwMAIARBGGpBACkDgI5ANwMAIARBIGpBACkDiI5ANwMAQRIhBQwdC0\
HYARAWIgRFDRQgAkEANgIAIAJBBHJBAEGAARA6GiACQYABNgIAIAJBsAFqIAJBhAEQORogBEHQAGog\
AkGwAWpBBHJBgAEQORogBEHIAGpCADcDACAEQgA3A0AgBEEAOgDQASAEQQApA/COQDcDACAEQQhqQQ\
ApA/iOQDcDACAEQRBqQQApA4CPQDcDACAEQRhqQQApA4iPQDcDACAEQSBqQQApA5CPQDcDACAEQShq\
QQApA5iPQDcDACAEQTBqQQApA6CPQDcDACAEQThqQQApA6iPQDcDAEETIQUMHAtB+AIQFiIERQ0VIA\
RBAEHIARA6IQUgAkEANgIAIAJBBHJBAEGoARA6GiACQagBNgIAIAJBsAFqIAJBrAEQORogBUHIAWog\
AkGwAWpBBHJBqAEQORogBUEAOgDwAkEVIQUMGwsgA0HygMAAQQUQUUUNFyADQZOBwABBBRBRDQFB6A\
AQFiIERQ0WIARCADcDACAEQQApA/iRQDcDCCAEQRBqQQApA4CSQDcDACAEQRhqQQApA4iSQDcDACAC\
QQxqQgA3AgAgAkEUakIANwIAIAJBHGpCADcCACACQSRqQgA3AgAgAkEsakIANwIAIAJBNGpCADcCAC\
ACQTxqQgA3AgAgAkIANwIEIAJBwAA2AgAgAkGwAWogAkHEABA5GiAEQdgAaiACQbABakE8aikCADcA\
ACAEQdAAaiACQbABakE0aikCADcAACAEQcgAaiACQbABakEsaikCADcAACAEQcAAaiACQbABakEkai\
kCADcAACAEQThqIAJBsAFqQRxqKQIANwAAIARBMGogAkGwAWpBFGopAgA3AAAgBEEoaiACQbABakEM\
aikCADcAACAEIAIpArQBNwAgIARBADoAYEEXIQUMGgsgA0G0gMAAQQYQUUUNFwtBASEEQZiBwABBFR\
AAIQUMGQtB0AFBCEEAKAL41EAiAkEEIAIbEQUAAAtB0AFBCEEAKAL41EAiAkEEIAIbEQUAAAtB8ABB\
CEEAKAL41EAiAkEEIAIbEQUAAAtB4AJBCEEAKAL41EAiAkEEIAIbEQUAAAtB2AJBCEEAKAL41EAiAk\
EEIAIbEQUAAAtBuAJBCEEAKAL41EAiAkEEIAIbEQUAAAtBmAJBCEEAKAL41EAiAkEEIAIb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0YNASAAIAJBAWo2AgAgAEEE\
aiECAkACQAJAAkACQCAAKAIEDhgAAQIDBB4dHBsaGRgXFhUUExIREA8ODQwACyACKAIEIQNB0AEQFi\
ICRQ0GIAFBCGpBOGogA0E4aikDADcDACABQQhqQTBqIANBMGopAwA3AwAgAUEIakEoaiADQShqKQMA\
NwMAIAFBCGpBIGogA0EgaikDADcDACABQQhqQRhqIANBGGopAwA3AwAgAUEIakEQaiADQRBqKQMANw\
MAIAFBCGpBCGogA0EIaikDADcDACABIAMpAwA3AwggAykDQCEPIAFBCGpByABqIANByABqEEMgASAP\
NwNIIAIgAUEIakHQARA5GkEAIQMMHwsgAigCBCEDQdABEBYiAkUNBiABQQhqQThqIANBOGopAwA3Aw\
AgAUEIakEwaiADQTBqKQMANwMAIAFBCGpBKGogA0EoaikDADcDACABQQhqQSBqIANBIGopAwA3AwAg\
AUEIakEYaiADQRhqKQMANwMAIAFBCGpBEGogA0EQaikDADcDACABQQhqQQhqIANBCGopAwA3AwAgAS\
ADKQMANwMIIAMpA0AhDyABQQhqQcgAaiADQcgAahBDIAEgDzcDSCACIAFBCGpB0AEQORpBASEDDB4L\
IAIoAgQhA0HQARAWIgJFDQYgAUEIakE4aiADQThqKQMANwMAIAFBCGpBMGogA0EwaikDADcDACABQQ\
hqQShqIANBKGopAwA3AwAgAUEIakEgaiADQSBqKQMANwMAIAFBCGpBGGogA0EYaikDADcDACABQQhq\
QRBqIANBEGopAwA3AwAgAUEIakEIaiADQQhqKQMANwMAIAEgAykDADcDCCADKQNAIQ8gAUEIakHIAG\
ogA0HIAGoQQyABIA83A0ggAiABQQhqQdABEDkaQQIhAwwdCyACKAIEIQNB8AAQFiICRQ0GIAFBCGpB\
IGogA0EgaikDADcDACABQQhqQRhqIANBGGopAwA3AwAgAUEIakEQaiADQRBqKQMANwMAIAEgAykDCD\
cDECADKQMAIQ8gAUEIakEoaiADQShqEDcgASAPNwMIIAIgAUEIakHwABA5GkEDIQMMHAsgAigCBCED\
QfgOEBYiAkUNBiABQQhqQYgBaiADQYgBaikDADcDACABQQhqQYABaiADQYABaikDADcDACABQQhqQf\
gAaiADQfgAaikDADcDACABQQhqQRBqIANBEGopAwA3AwAgAUEIakEYaiADQRhqKQMANwMAIAFBCGpB\
IGogA0EgaikDADcDACABQQhqQTBqIANBMGopAwA3AwAgAUEIakE4aiADQThqKQMANwMAIAFBCGpBwA\
BqIANBwABqKQMANwMAIAFBCGpByABqIANByABqKQMANwMAIAFBCGpB0ABqIANB0ABqKQMANwMAIAFB\
CGpB2ABqIANB2ABqKQMANwMAIAFBCGpB4ABqIANB4ABqKQMANwMAIAEgAykDcDcDeCABIAMpAwg3Ax\
AgASADKQMoNwMwIAMpAwAhDyADLQBqIQQgAy0AaSEFIAMtAGghBgJAIAMoApABQQV0IgcNAEEAIQcM\
GwsgAUGAD2pBGGoiCCADQZQBaiIJQRhqKQAANwMAIAFBgA9qQRBqIgogCUEQaikAADcDACABQYAPak\
EIaiILIAlBCGopAAA3AwAgASAJKQAANwOADyADQdQBaiEJQQAgB0FgakEFdmshDCABQbwBaiEDQQIh\
BwNAIANBYGoiDSABKQOADzcAACANQRhqIAgpAwA3AAAgDUEQaiAKKQMANwAAIA1BCGogCykDADcAAA\
JAAkAgDCAHaiIOQQJGDQAgCCAJQWBqIg1BGGopAAA3AwAgCiANQRBqKQAANwMAIAsgDUEIaikAADcD\
ACABIA0pAAA3A4APIAdBOEcNARBqAAsgB0F/aiEHDBwLIAMgASkDgA83AAAgA0EYaiAIKQMANwAAIA\
NBEGogCikDADcAACADQQhqIAspAwA3AAAgDkEBRg0bIAggCUEYaikAADcDACAKIAlBEGopAAA3AwAg\
CyAJQQhqKQAANwMAIAEgCSkAADcDgA8gA0HAAGohAyAHQQJqIQcgCUHAAGohCQwACwsQbgALEG8AC0\
HQAUEIQQAoAvjUQCIBQQQgARsRBQAAC0HQAUEIQQAoAvjUQCIBQQQgARsRBQAAC0HQAUEIQQAoAvjU\
QCIBQQQgARsRBQAAC0HwAEEIQQAoAvjUQCIBQQQgARsRBQAAC0H4DkEIQQAoAvjUQCIBQQQgARsRBQ\
AACyACKAIEIQMCQEHoABAWIgJFDQAgAUEIakEQaiADQRBqKQMANwMAIAFBCGpBGGogA0EYaikDADcD\
ACABIAMpAwg3AxAgAykDACEPIAFBCGpBIGogA0EgahA3IAEgDzcDCCACIAFBCGpB6AAQORpBFyEDDB\
QLQegAQQhBACgC+NRAIgFBBCABGxEFAAALIAIoAgQhAwJAQdgCEBYiAkUNACABQQhqIANByAEQORog\
AUEIakHIAWogA0HIAWoQRCACIAFBCGpB2AIQORpBFiEDDBMLQdgCQQhBACgC+NRAIgFBBCABGxEFAA\
ALIAIoAgQhAwJAQfgCEBYiAkUNACABQQhqIANByAEQORogAUEIakHIAWogA0HIAWoQRSACIAFBCGpB\
+AIQORpBFSEDDBILQfgCQQhBACgC+NRAIgFBBCABGxEFAAALIAIoAgQhAwJAQdgBEBYiAkUNACABQQ\
hqQThqIANBOGopAwA3AwAgAUEIakEwaiADQTBqKQMANwMAIAFBCGpBKGogA0EoaikDADcDACABQQhq\
QSBqIANBIGopAwA3AwAgAUEIakEYaiADQRhqKQMANwMAIAFBCGpBEGogA0EQaikDADcDACABQQhqQQ\
hqIANBCGopAwA3AwAgASADKQMANwMIIANByABqKQMAIQ8gAykDQCEQIAFBCGpB0ABqIANB0ABqEEMg\
AUEIakHIAGogDzcDACABIBA3A0ggAiABQQhqQdgBEDkaQRQhAwwRC0HYAUEIQQAoAvjUQCIBQQQgAR\
sRBQAACyACKAIEIQMCQEHYARAWIgJFDQAgAUEIakE4aiADQThqKQMANwMAIAFBCGpBMGogA0EwaikD\
ADcDACABQQhqQShqIANBKGopAwA3AwAgAUEIakEgaiADQSBqKQMANwMAIAFBCGpBGGogA0EYaikDAD\
cDACABQQhqQRBqIANBEGopAwA3AwAgAUEIakEIaiADQQhqKQMANwMAIAEgAykDADcDCCADQcgAaikD\
ACEPIAMpA0AhECABQQhqQdAAaiADQdAAahBDIAFBCGp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og\
AGogCCACcWogASAIQX9zcWpBk+PhbGpBDHcgCGoiACAIcWogAiAAQX9zIhlxakGOh+WzempBEXcgAG\
oiASAZcWogCSACaiABIABxaiAIIAFBf3MiGXFqQaGQ0M0EakEWdyABaiICIABxakHiyviwf2pBBXcg\
AmoiCGogCyABaiAIIAJBf3NxaiAOIABqIAIgGXFqIAggAXFqQcDmgoJ8akEJdyAIaiIAIAJxakHRtP\
myAmpBDncgAGoiASAAQX9zcWogFSACaiAAIAhBf3NxaiABIAhxakGqj9vNfmpBFHcgAWoiAiAAcWpB\
3aC8sX1qQQV3IAJqIghqIAkgAWogCCACQX9zcWogEiAAaiACIAFBf3NxaiAIIAFxakHTqJASakEJdy\
AIaiIAIAJxakGBzYfFfWpBDncgAGoiASAAQX9zcWogDSACaiAAIAhBf3NxaiABIAhxakHI98++fmpB\
FHcgAWoiAiAAcWpB5puHjwJqQQV3IAJqIghqIBggAWogCCACQX9zcWogFCAAaiACIAFBf3NxaiAIIA\
FxakHWj9yZfGpBCXcgCGoiACACcWpBh5vUpn9qQQ53IABqIgEgAEF/c3FqIA8gAmogACAIQX9zcWog\
ASAIcWpB7anoqgRqQRR3IAFqIgIgAHFqQYXSj896akEFdyACaiIIaiATIAJqIAwgAGogAiABQX9zcW\
ogCCABcWpB+Me+Z2pBCXcgCGoiACAIQX9zcWogECABaiAIIAJBf3NxaiAAIAJxakHZhby7BmpBDncg\
AGoiASAIcWpBipmp6XhqQRR3IAFqIgIgAXMiGSAAc2pBwvJoakEEdyACaiIIaiAUIAJqIAsgAWogDy\
AAaiAIIBlzakGB7ce7eGpBC3cgCGoiASAIcyIAIAJzakGiwvXsBmpBEHcgAWoiAiAAc2pBjPCUb2pB\
F3cgAmoiCCACcyIZIAFzakHE1PulempBBHcgCGoiAGogECACaiAAIAhzIA0gAWogGSAAc2pBqZ/73g\
RqQQt3IABqIgFzakHglu21f2pBEHcgAWoiAiABcyASIAhqIAEgAHMgAnNqQfD4/vV7akEXdyACaiIA\
c2p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H3EgAkEfRht0IQMDQCAFIANBHXZBBHFqQR\
BqIgYoAgAiAkUNAiADQQF0IQMgAiEFIAIoAgRBeHEgAUcNAAsLIAIoAggiASAANgIMIAIgADYCCCAA\
QRhqQQA2AgAgACACNgIMIAAgATYCCA8LIAYgADYCACAAQRhqIAU2AgALIAAgADYCDCAAIAA2AggPCy\
ABQQN2IgJBA3RBjNXAAGohAQJAAkBBACgChNVAIgNBASACdCICcUUNACABKAIIIQIMAQtBACADIAJy\
NgKE1UAgASECCyABIAA2AgggAiAANgIMIAAgATYCDCAAIAI2AggL8wsBA38jAEHQAGsiAiQAAkACQC\
ABRQ0AIAEoAgANASABQX82AgAgAUEEaiEDAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC\
QAJAAkACQAJAAkACQAJAAkAgASgCBA4YAAECAwQFBgcICQoLDA0ODxAREhMUFRYXAAsgAygCBCEDIA\
JBCGoiBEHAABBPIAMgBEHIABA5QcgBakEAOgAADBcLIAMoAgQhAyACQQhqIgRBIBBPIAMgBEHIABA5\
QcgBakEAOgAADBYLIAMoAgQhAyACQQhqIgRBMBBPIAMgBEHIABA5QcgBakEAOgAADBULIAMoAgQhAy\
ACQQhqEFUgA0EgaiACQShqKQMANwMAIANBGGogAkEgaikDADcDACADQRBqIAJBGGopAwA3AwAgA0EI\
aiACQRBqKQMANwMAIAMgAikDCDcDACADQegAakEAOgAADBQLIAMoAgQiA0IANwMAIAMgAykDcDcDCC\
ADQSBqIANBiAFqKQMANwMAIANBGGogA0GAAWopAwA3AwAgA0EQaiADQfgAaikDADcDACADQShqQQBB\
wgAQOhogAygCkAFFDRMgA0EANgKQAQwTCyADKAIEQQBByAEQOkHYAmpBADoAAAwSCyADKAIEQQBByA\
EQOkHQAmpBADoAAAwRCyADKAIEQQBByAEQOkGwAmpBADoAAAwQCyADKAIEQQBByAEQOkGQAmpBADoA\
AAwPCyADKAIEIgNCgcaUupbx6uZvNwMIIANCADcDACADQdgAakEAOgAAIANBEGpC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QQhqIAEQEgwB\
CyADQQhqIAEQEiADQeAAakEMakIANwIAIANB4ABqQRRqQgA3AgAgA0HgAGpBHGpCADcCACADQeAAak\
EkakIANwIAIANB4ABqQSxqQgA3AgAgA0HgAGpBNGpCADcCACADQZwBakIANwIAIANCADcCZCADQcAA\
NgJgIANBqAFqIANB4ABqQcQAEDkaIANB0ABqIANBqAFqQTRqKQIANwMAIANByABqIANBqAFqQSxqKQ\
IANwMAIANBwABqIANBqAFqQSRqKQIANwMAIANBOGogA0GoAWpBHGopAgA3AwAgA0EwaiADQagBakEU\
aikCADcDACADQShqIANBqAFqQQxqKQIANwMAIAMgAykCrAE3AyAgAyAGNwNYIANBCGogA0EgahASCy\
ACIAMoAgg2AAAgAiADKQIMNwAEIAIgAykCFDcADCABQcAAakEAOgAAIANB8AFqJAAL8AMCA38CfiMA\
QfABayIDJAAgAUHAAGotAAAhBCAAKQMAIQYgA0EQaiAAQRBqKQIANwMAIAMgACkCCDcDCCABIARqIg\
BBgAE6AAAgBkIJhiEGIAStQgOGIQcgAyADQQhqNgIcAkAgBEE/cyIFRQ0AIABBAWpBACAFEDoaCyAH\
IAaEIQYCQAJAIARBOHFBOEYNACABQThqIAY3AAAgA0EcaiABEBwMAQsgA0EcaiABEBwgA0HgAGpBDG\
pCADcCACADQeAAakEUakIANwIAIANB4ABqQRxqQgA3AgAgA0HgAGpBJGpCADcCACADQeAAakEsakIA\
NwIAIANB4ABqQTRqQgA3AgAgA0GcAWpCADcCACADQgA3AmQgA0HAADYCYCADQagBaiADQeAAakHEAB\
A5GiADQdAAaiADQagBakE0aikCADcDACADQcgAaiADQagBakEsaikCADcDACADQcAAaiADQagBakEk\
aikCADcDACADQThqIANBqAFqQRxqKQIANwMAIANBMGogA0GoAWpBFGopAgA3AwAgA0EoaiADQagBak\
EMaikCADcDACADIAMpAqwBNwMgIAMgBjcDWCADQRxqIANBIGoQHAsgAUHAAGpBADoAACACIAMpAwg3\
AAAgAiADKQMQNwAIIANB8AFqJAAL2QMCA38CfiMAQeABayIDJAAgACkDACEGIAEgAUHAAGotAAAiBG\
oiBUGAAToAACADQQhqIABBEGopAgA3AwAgAyAAKQIINwMAIAZCCYYhBiAErUIDhiEHAkAgBEE/cyIA\
RQ0AIAVBAWpBACAAEDoaCyAHIAaEIQYCQAJAIARBOHFBOEYNACABQThqIAY3AAAgAyABEB8MAQsgAy\
ABEB8gA0HQAGpBDGpCADcCACADQdAAakEUakIANwIAIANB0ABqQRxqQgA3AgAgA0HQAGpBJGpCADcC\
ACADQdAAakEsakIANwIAIANB0ABqQTRqQgA3AgAgA0GMAWpCADcCACADQgA3AlQgA0HAADYCUCADQZ\
gBaiADQdAAakHEABA5GiADQcAAaiADQZgBakE0aikCADcDACADQThqIANBmAFqQSxqKQIANwMAIANB\
MGogA0GYAWpBJGopAgA3AwAgA0EoaiADQZgBakEcaikCADcDACADQSBqIANBmAFqQRRqKQIANwMAIA\
NBGGogA0GYAWpBDGopAgA3AwAgAyADKQKcATcDECADIAY3A0ggAyADQRBqEB8LIAIgAykDADcAACAC\
IAMpAwg3AAggAUHAAGpBADoAACADQeABaiQAC9QDAgR/An4jAEHQAWsiAyQAIAEgAUHAAGotAAAiBG\
oiBUEBOgAAIAApAwBCCYYhByAErUIDhiEIAkAgBEE/cyIGRQ0AIAVBAWpBACAGEDoaCyAHIAiEIQcC\
QAJAIARBOHFBOEYNACABQThqIAc3AAAgAEEIaiABQQEQFwwBCyAAQQhqIgQgAUEBEBcgA0HAAGpBDG\
pCADcCACADQcAAakEUakIANwIAIANBwABqQRxqQgA3AgAgA0HAAGpBJGpCADcCACADQcAAakEsakIA\
NwIAIANBwABqQTRqQgA3AgAgA0H8AGpCADcCACADQgA3AkQgA0HAADYCQCADQYgBaiADQcAAakHEAB\
A5GiADQTBqIANBiAFqQTRqKQIANwMAIANBKGogA0GIAWpBLGopAgA3AwAgA0EgaiADQYgBakEkaikC\
ADcDACADQRhqIANBiAFqQRxqKQIANwMAIANBEGogA0GIAWpBFGopAgA3AwAgA0EIaiADQYgBakEMai\
kCADcDACADIAMpAowBNwMAIAMgBzcDOCAEIANBARAXCyABQcAAakEAOgAAIAIgACkDCDcAACACIABB\
EGopAwA3AAggAiAAQRhqKQMANwAQIANB0AFqJAALlwMBBX8jAEGQBGsiAyQAIABByAFqIQQCQAJAAk\
ACQAJAIABB8AJqLQAAIgVFDQBBqAEgBWsiBiACSw0BIAEgBCAFaiAGEDkgBmohASACIAZrIQILIAIg\
AkGoAW4iBUGoAWwiB0kNASACIAdrIQYCQCAFQagBbCICRQ0AIAEhBQNAIANB4AJqIABBqAEQORogAB\
AkIAUgA0HgAmpBqAEQOUGoAWohBSACQdh+aiICDQALCwJAIAYNAEEAIQYMBAsgA0EANgKwASADQbAB\
akEEckEAQagBEDoaIANBqAE2ArABIANB4AJqIANBsAFqQawBEDkaIANBCGogA0HgAmpBBHJBqAEQOR\
ogA0HgAmogAEGoARA5GiAAECQgA0EIaiADQeACakGoARA5GiAGQakBTw0CIAEgB2ogA0EIaiAGEDka\
IAQgA0EIakGoARA5GgwDCyABIAQgBWogAhA5GiAFIAJqIQYMAgtBoY3AAEEjQcSNwAAQUwALIAZBqA\
FBxIzAABBJAAsgAEHwAmogBjoAACADQZAEaiQAC5cDAQV/IwBBsANrIgMkACAAQcgBaiEEAkACQAJA\
AkACQCAAQdACai0AACIFRQ0AQYgBIAVrIgYgAksNASABIAQgBWogBhA5IAZqIQEgAiAGayECCyACIA\
JBiAFuIgVBiAFsIgdJDQEgAiAHayEGAkAgBUGIAWwiAkUNACABIQUDQCADQaACaiAAQYgBEDkaIAAQ\
JCAFIANBoAJqQYgBEDlBiAFqIQUgAkH4fmoiAg0ACwsCQCAGDQBBACEGDAQLIANBADYCkAEgA0GQAW\
pBBHJBAEGIARA6GiADQYgBNgKQASADQaACaiADQZABakGMARA5GiADQQhqIANBoAJqQQRyQYgBEDka\
IANBoAJqIABBiAEQORogABAkIANBCGogA0GgAmpBiAEQORogBkGJAU8NAiABIAdqIANBCGogB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ICJAAgAkEUakECNgIAIAJBuIfAADYCECACQQI2AgwgAk\
GYh8AANgIIIAFBHGooAgAhAyABKAIYIQEgAkEsakECNgIAIAJCAjcCHCACQZiIwAA2AhggAiACQQhq\
NgIoIAEgAyACQRhqECshASACQTBqJAAgAQt0AQJ/IwBBkAJrIgIkAEEAIQMgAkEANgIAA0AgAiADak\
EEaiABIANqKAAANgIAIANBBGoiA0GAAUcNAAsgAkGAATYCACACQYgBaiACQYQBEDkaIAAgAkGIAWpB\
BHJBgAEQOSABLQCAAToAgAEgAkGQAmokAAt0AQJ/IwBBoAJrIgIkAEEAIQMgAkEANgIAA0AgAiADak\
EEaiABIANqKAAANgIAIANBBGoiA0GIAUcNAAsgAkGIATYCACACQZABaiACQYwBEDkaIAAgAkGQAWpB\
BHJBiAEQOSABLQCIAToAiAEgAkGgAmokAAt0AQJ/IwBB4AJrIgIkAEEAIQMgAkEANgIAA0AgAiADak\
EEaiABIANqKAAANgIAIANBBGoiA0GoAUcNAAsgAkGoATYCACACQbABaiACQawBEDkaIAAgAkGwAWpB\
BHJBqAEQOSABLQCoAToAqAEgAkHgAmokAAtyAQJ/IwBBoAFrIgIkAEEAIQMgAkEANgIAA0AgAiADak\
EEaiABIANqKAAANgIAIANBBGoiA0HIAEcNAAsgAkHIADYCACACQdAAaiACQcwAEDkaIAAgAkHQAGpB\
BHJByAAQOSABLQBIOgBIIAJBoAFqJAALcgECfyMAQeABayICJABBACEDIAJBADYCAANAIAIgA2pBBG\
ogASADaigAADYCACADQQRqIgNB6ABHDQALIAJB6AA2AgAgAkHwAGogAkHsABA5GiAAIAJB8ABqQQRy\
QegAEDkgAS0AaDoAaCACQeABaiQAC3QBAn8jAEGwAmsiAiQAQQAhAyACQQA2AgADQCACIANqQQRqIA\
EgA2ooAAA2AgAgA0EEaiIDQZABRw0ACyACQZABNgIAIAJBmAFqIAJBlAEQORogACACQZgBakEEckGQ\
ARA5IAEtAJABOgCQASACQbACaiQAC2wBAX8jAEEwayIDJAAgAyABNgIEIAMgADYCACADQRxqQQI2Ag\
AgA0EsakEDNgIAIANCAjcCDCADQciKwAA2AgggA0EDNgIkIAMgA0EgajYCGCADIANBBGo2AiggAyAD\
NgIgIANBCGogAhBWAAtsAQF/IwBBMGsiAyQAIAMgATYCBCADIAA2AgAgA0EcakECNgIAIANBLGpBAz\
YCACADQgI3AgwgA0GoisAANgIIIANBAzYCJCADIANBIGo2AhggAyADQQRqNgIoIAMgAzYCICADQQhq\
IAIQVgALbAEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBHGpBAjYCACADQSxqQQM2AgAgA0ICNw\
IMIANB/IrAADYCCCADQQM2AiQgAyADQSBqNgIYIAMgA0EEajYCKCADIAM2AiAgA0EIaiACEFYAC2wB\
AX8jAEEwayIDJAAgAyABNgIEIAMgADYCACADQRxqQQI2AgAgA0EsakEDNgIAIANCAzcCDCADQcyLwA\
A2AgggA0EDNgIkIAMgA0EgajYCGCADIAM2AiggAyADQQRqNgIgIANBCGogAhBWAAtsAQF/IwBBMGsi\
AyQAIAMgATYCBCADIAA2AgAgA0EcakECNgIAIANBLGpBAzYCACADQgI3AgwgA0GEiMAANgIIIANBAz\
YCJCADIANBIGo2AhggAyADNgIoIAMgA0EEajYCICADQQhqIAIQVgALdQECf0EBIQBBAEEAKAKA1UAi\
AUEBajYCgNVAAkACQEEAKALI2EBBAUcNAEEAKALM2EBBAWohAAwBC0EAQQE2AsjYQAtBACAANgLM2E\
ACQCABQQBIDQAgAEECSw0AQQAoAvzUQEF/TA0AIABBAUsNABBzAAsAC5oBACMAQTBrGiAAQgA3A0Ag\
AEE4akL5wvibkaOz8NsANwMAIABBMGpC6/qG2r+19sEfNwMAIABBKGpCn9j52cKR2oKbfzcDACAAQt\
GFmu/6z5SH0QA3AyAgAELx7fT4paf9p6V/NwMYIABCq/DT9K/uvLc8NwMQIABCu86qptjQ67O7fzcD\
CCAAIAGtQoiS95X/zPmE6gCFNwMAC1UBAn8CQAJAIABFDQAgACgCAA0BIABBADYCACAAKAIIIQEgAC\
gCBCECIAAQHgJAIAJBBEcNACABKAKQAUUNACABQQA2ApABCyABEB4PCxBuAAsQbwALSgEDf0EAIQMC\
QCACRQ0AAkADQCAALQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEgAkF/aiICRQ0CDAALCyAEIA\
VrIQMLIAMLVAEBfwJAAkACQCABQYCAxABGDQBBASEEIAAoAhggASAAQRxqKAIAKAIQEQYADQELIAIN\
AUEAIQQLIAQPCyAAKAIYIAIgAyAAQRxqKAIAKAIMEQgAC0cBAX8jAEEgayIDJAAgA0EUakEANgIAIA\
NBoJHAADYCECADQgE3AgQgAyABNgIcIAMgADYCGCADIANBGGo2AgAgAyACEFYACzkAAkACQCABRQ0A\
IAEoAgANASABQX82AgAgAUEEaiACEDYgAUEANgIAIABCADcDAA8LEG4ACxBvAAtSACAAQsfMo9jW0O\
uzu383AwggAEIANwMAIABBIGpCq7OP/JGjs/DbADcDACAAQRhqQv+kuYjFkdqCm383AwAgAEEQakLy\
5rvjo6f9p6V/NwMACzQBAX8jAEEQayICJAAgAiABNgIMIAIgADYCCCACQcCHwAA2AgQgAkGgkcAANg\
IAIAIQZwALIwACQCAAQXxLDQACQCAADQBBBA8LIAAQFiIARQ0AIAAPCwALJQACQCAADQBBsI/AAEEw\
EHAACyAAIAIgAyAEIAUgASgCEBEMAAsjAAJAIAANAEGwj8AAQTAQcAALIAAgAiADIAQgASgCEBEKAA\
sjAAJAIAANAEGwj8AAQTAQcAALIAAgAiADIAQgASgCEBEJAAsjAAJAIAANAEGwj8AAQTAQcAALIAAg\
AiADIAQgASgCEBEKAAsjAAJAIAANAEGwj8AAQTAQcAALIAAgAiADIAQgASgCEBEJAAsjAAJAIAANAE\
Gwj8AAQTAQcAALIAAgAiADIAQgASgCEBEJAAsjAAJAIAANAEGwj8AAQTAQcAALIAAgAiADIAQgASgC\
EBEVAAsjAAJAIAANAEGwj8AAQTAQcAALIAAgAiADIAQgASgCEBEWAAshAAJAIAANAE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W50ZXJtTm\
NvcmU6OmZtdDo6bnVtOjppbXA6OjxpbXBsIGNvcmU6OmZtdDo6RGlzcGxheSBmb3IgdTMyPjo6Zm10\
OjpoMDQ2ZWNjNWVhYWIzNGNkNW4xd2FzbV9iaW5kZ2VuOjpfX3J0Ojp0aHJvd19udWxsOjpoM2Q3Yj\
Q3NDgzNGRkZjJkOW8yd2FzbV9iaW5kZ2VuOjpfX3J0Ojpib3Jyb3dfZmFpbDo6aGU1Njk3Y2E4ZTIx\
ZWQ1YTVwKndhc21fYmluZGdlbjo6dGhyb3dfc3RyOjpoNWViNDYxODBmZTVlMWQxYXFJc3RkOjpzeX\
NfY29tbW9uOjpiYWNrdHJhY2U6Ol9fcnVzdF9lbmRfc2hvcnRfYmFja3RyYWNlOjpoYTAzYWJlZjAy\
YThiNzBmZHIxPFQgYXMgY29yZTo6YW55OjpBbnk+Ojp0eXBlX2lkOjpoYTBjNDQ5MjIxNmQ0ZDJlN3\
MKcnVzdF9wYW5pY3Q3c3RkOjphbGxvYzo6ZGVmYXVsdF9hbGxvY19lcnJvcl9ob29rOjpoZjljMzkz\
YmEzY2QyODdlMXVvY29yZTo6cHRyOjpkcm9wX2luX3BsYWNlPCZjb3JlOjppdGVyOjphZGFwdGVycz\
o6Y29waWVkOjpDb3BpZWQ8Y29yZTo6c2xpY2U6Oml0ZXI6Okl0ZXI8dTg+Pj46Omg2M2MyZTE0OTdi\
NTJmM2Q3AO+AgIAACXByb2R1Y2VycwIIbGFuZ3VhZ2UBBFJ1c3QADHByb2Nlc3NlZC1ieQMFcnVzdG\
MdMS41Ny4wIChmMWVkZDA0MjkgMjAyMS0xMS0yOSkGd2FscnVzBjAuMTkuMAx3YXNtLWJpbmRnZW4G\
MC4yLjgx\
");
    const wasmModule = new WebAssembly.Module(wasmBytes);
    return new WebAssembly.Instance(wasmModule, imports1);
}
function base64decode1(b64) {
    const binString = atob(b64);
    const size = binString.length;
    const bytes = new Uint8Array(size);
    for(let i1 = 0; i1 < size; i1++){
        bytes[i1] = binString.charCodeAt(i1);
    }
    return bytes;
}
const digestAlgorithms = [
    "BLAKE2B-256",
    "BLAKE2B-384",
    "BLAKE2B",
    "BLAKE2S",
    "BLAKE3",
    "KECCAK-224",
    "KECCAK-256",
    "KECCAK-384",
    "KECCAK-512",
    "SHA-384",
    "SHA3-224",
    "SHA3-256",
    "SHA3-384",
    "SHA3-512",
    "SHAKE128",
    "SHAKE256",
    "TIGER",
    "RIPEMD-160",
    "SHA-224",
    "SHA-256",
    "SHA-512",
    "MD4",
    "MD5",
    "SHA-1", 
];
function timingSafeEqual(a, b) {
    if (a.byteLength !== b.byteLength) {
        return false;
    }
    if (!(a instanceof DataView)) {
        a = new DataView(ArrayBuffer.isView(a) ? a.buffer : a);
    }
    if (!(b instanceof DataView)) {
        b = new DataView(ArrayBuffer.isView(b) ? b.buffer : b);
    }
    assert1(a instanceof DataView);
    assert1(b instanceof DataView);
    const length = a.byteLength;
    let out = 0;
    let i1 = -1;
    while(++i1 < length){
        out |= a.getUint8(i1) ^ b.getUint8(i1);
    }
    return out === 0;
}
function swap32(val) {
    return (val & 0xff) << 24 | (val & 0xff00) << 8 | val >> 8 & 0xff00 | val >> 24 & 0xff;
}
function n16(n) {
    return n & 0xffff;
}
function n32(n) {
    return n >>> 0;
}
function add32WithCarry(a, b) {
    const added = n32(a) + n32(b);
    return [
        n32(added),
        added > 0xffffffff ? 1 : 0
    ];
}
function mul32WithCarry(a, b) {
    const al = n16(a);
    const ah = n16(a >>> 16);
    const bl = n16(b);
    const bh = n16(b >>> 16);
    const [t, tc] = add32WithCarry(al * bh, ah * bl);
    const [n, nc] = add32WithCarry(al * bl, n32(t << 16));
    const carry = nc + (tc << 16) + n16(t >>> 16) + ah * bh;
    return [
        n,
        carry
    ];
}
function mul32(a, b) {
    const al = n16(a);
    const ah = a - al;
    return n32(n32(ah * b) + al * b);
}
function mul64([ah, al], [bh, bl]) {
    const [n, c] = mul32WithCarry(al, bl);
    return [
        n32(mul32(al, bh) + mul32(ah, bl) + c),
        n
    ];
}
const prime32 = 16777619;
const fnv32 = (data)=>{
    let hash = 2166136261;
    data.forEach((c)=>{
        hash = mul32(hash, prime32);
        hash ^= c;
    });
    return Uint32Array.from([
        swap32(hash)
    ]).buffer;
};
const fnv32a = (data)=>{
    let hash = 2166136261;
    data.forEach((c)=>{
        hash ^= c;
        hash = mul32(hash, prime32);
    });
    return Uint32Array.from([
        swap32(hash)
    ]).buffer;
};
const prime64Lo = 435;
const prime64Hi = 256;
const fnv64 = (data)=>{
    let hashLo = 2216829733;
    let hashHi = 3421674724;
    data.forEach((c)=>{
        [hashHi, hashLo] = mul64([
            hashHi,
            hashLo
        ], [
            prime64Hi,
            prime64Lo
        ]);
        hashLo ^= c;
    });
    return new Uint32Array([
        swap32(hashHi >>> 0),
        swap32(hashLo >>> 0)
    ]).buffer;
};
const fnv64a = (data)=>{
    let hashLo = 2216829733;
    let hashHi = 3421674724;
    data.forEach((c)=>{
        hashLo ^= c;
        [hashHi, hashLo] = mul64([
            hashHi,
            hashLo
        ], [
            prime64Hi,
            prime64Lo
        ]);
    });
    return new Uint32Array([
        swap32(hashHi >>> 0),
        swap32(hashLo >>> 0)
    ]).buffer;
};
const fnv = (name, buf)=>{
    if (!buf) {
        throw new TypeError("no data provided for hashing");
    }
    switch(name){
        case "FNV32":
            return fnv32(buf);
        case "FNV64":
            return fnv64(buf);
        case "FNV32A":
            return fnv32a(buf);
        case "FNV64A":
            return fnv64a(buf);
        default:
            throw new TypeError(`unsupported fnv digest: ${name}`);
    }
};
const encoder = new TextEncoder();
function importKey(key) {
    if (typeof key === "string") {
        key = encoder.encode(key);
    } else if (Array.isArray(key)) {
        key = new Uint8Array(key);
    }
    return crypto.subtle.importKey("raw", key, {
        name: "HMAC",
        hash: {
            name: "SHA-256"
        }
    }, true, [
        "sign",
        "verify"
    ]);
}
function sign(data, key) {
    if (typeof data === "string") {
        data = encoder.encode(data);
    } else if (Array.isArray(data)) {
        data = Uint8Array.from(data);
    }
    return crypto.subtle.sign("HMAC", key, data);
}
async function compare1(a, b) {
    const key = new Uint8Array(32);
    globalThis.crypto.getRandomValues(key);
    const cryptoKey = await importKey(key);
    const ah = await sign(a, cryptoKey);
    const bh = await sign(b, cryptoKey);
    return timingSafeEqual(ah, bh);
}
class KeyStack {
    #cryptoKeys = new Map();
    #keys;
    async #toCryptoKey(key) {
        if (!this.#cryptoKeys.has(key)) {
            this.#cryptoKeys.set(key, await importKey(key));
        }
        return this.#cryptoKeys.get(key);
    }
    get length() {
        return this.#keys.length;
    }
    constructor(keys){
        const values = Array.isArray(keys) ? keys : [
            ...keys
        ];
        if (!values.length) {
            throw new TypeError("keys must contain at least one value");
        }
        this.#keys = values;
    }
    async sign(data) {
        const key = await this.#toCryptoKey(this.#keys[0]);
        return encode1(await sign(data, key));
    }
    async verify(data, digest) {
        return await this.indexOf(data, digest) > -1;
    }
    async indexOf(data, digest) {
        for(let i1 = 0; i1 < this.#keys.length; i1++){
            const cryptoKey = await this.#toCryptoKey(this.#keys[i1]);
            if (await compare1(digest, encode1(await sign(data, cryptoKey)))) {
                return i1;
            }
        }
        return -1;
    }
    [Symbol.for("Deno.customInspect")](inspect) {
        const { length  } = this;
        return `${this.constructor.name} ${inspect({
            length
        })}`;
    }
    [Symbol.for("nodejs.util.inspect.custom")](depth, options, inspect) {
        if (depth < 0) {
            return options.stylize(`[${this.constructor.name}]`, "special");
        }
        const newOptions = Object.assign({}, options, {
            depth: options.depth === null ? null : options.depth - 1
        });
        const { length  } = this;
        return `${options.stylize(this.constructor.name, "special")} ${inspect({
            length
        }, newOptions)}`;
    }
}
const webCrypto = ((crypto1)=>({
        getRandomValues: crypto1.getRandomValues?.bind(crypto1),
        randomUUID: crypto1.randomUUID?.bind(crypto1),
        subtle: {
            decrypt: crypto1.subtle?.decrypt?.bind(crypto1.subtle),
            deriveBits: crypto1.subtle?.deriveBits?.bind(crypto1.subtle),
            deriveKey: crypto1.subtle?.deriveKey?.bind(crypto1.subtle),
            digest: crypto1.subtle?.digest?.bind(crypto1.subtle),
            encrypt: crypto1.subtle?.encrypt?.bind(crypto1.subtle),
            exportKey: crypto1.subtle?.exportKey?.bind(crypto1.subtle),
            generateKey: crypto1.subtle?.generateKey?.bind(crypto1.subtle),
            importKey: crypto1.subtle?.importKey?.bind(crypto1.subtle),
            sign: crypto1.subtle?.sign?.bind(crypto1.subtle),
            unwrapKey: crypto1.subtle?.unwrapKey?.bind(crypto1.subtle),
            verify: crypto1.subtle?.verify?.bind(crypto1.subtle),
            wrapKey: crypto1.subtle?.wrapKey?.bind(crypto1.subtle)
        }
    }))(globalThis.crypto);
const bufferSourceBytes = (data)=>{
    let bytes;
    if (data instanceof Uint8Array) {
        bytes = data;
    } else if (ArrayBuffer.isView(data)) {
        bytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
    } else if (data instanceof ArrayBuffer) {
        bytes = new Uint8Array(data);
    }
    return bytes;
};
const stdCrypto = ((x)=>x)({
    ...webCrypto,
    subtle: {
        ...webCrypto.subtle,
        async digest (algorithm, data) {
            const { name , length  } = normalizeAlgorithm(algorithm);
            const bytes = bufferSourceBytes(data);
            if (FNVAlgorithms.includes(name)) {
                return fnv(name, bytes);
            }
            if (webCryptoDigestAlgorithms.includes(name) && bytes) {
                return webCrypto.subtle.digest(algorithm, bytes);
            } else if (digestAlgorithms.includes(name)) {
                if (bytes) {
                    return stdCrypto.subtle.digestSync(algorithm, bytes);
                } else if (data[Symbol.iterator]) {
                    return stdCrypto.subtle.digestSync(algorithm, data);
                } else if (data[Symbol.asyncIterator]) {
                    const wasmCrypto = instantiate1();
                    const context = new wasmCrypto.DigestContext(name);
                    for await (const chunk of data){
                        const chunkBytes = bufferSourceBytes(chunk);
                        if (!chunkBytes) {
                            throw new TypeError("data contained chunk of the wrong type");
                        }
                        context.update(chunkBytes);
                    }
                    return context.digestAndDrop(length).buffer;
                } else {
                    throw new TypeError("data must be a BufferSource or [Async]Iterable<BufferSource>");
                }
            } else if (webCrypto.subtle?.digest) {
                return webCrypto.subtle.digest(algorithm, data);
            } else {
                throw new TypeError(`unsupported digest algorithm: ${algorithm}`);
            }
        },
        digestSync (algorithm, data) {
            algorithm = normalizeAlgorithm(algorithm);
            const bytes = bufferSourceBytes(data);
            if (FNVAlgorithms.includes(algorithm.name)) {
                return fnv(algorithm.name, bytes);
            }
            const wasmCrypto = instantiate1();
            if (bytes) {
                return wasmCrypto.digest(algorithm.name, bytes, algorithm.length).buffer;
            } else if (data[Symbol.iterator]) {
                const context = new wasmCrypto.DigestContext(algorithm.name);
                for (const chunk of data){
                    const chunkBytes = bufferSourceBytes(chunk);
                    if (!chunkBytes) {
                        throw new TypeError("data contained chunk of the wrong type");
                    }
                    context.update(chunkBytes);
                }
                return context.digestAndDrop(algorithm.length).buffer;
            } else {
                throw new TypeError("data must be a BufferSource or Iterable<BufferSource>");
            }
        },
        timingSafeEqual
    }
});
const FNVAlgorithms = [
    "FNV32",
    "FNV32A",
    "FNV64",
    "FNV64A"
];
const webCryptoDigestAlgorithms = [
    "SHA-384",
    "SHA-256",
    "SHA-512",
    "SHA-1", 
];
const normalizeAlgorithm = (algorithm)=>typeof algorithm === "string" ? {
        name: algorithm.toUpperCase()
    } : {
        ...algorithm,
        name: algorithm.name.toUpperCase()
    };
function fileProgress(files) {
    const numWidth = String(files.length).length;
    let i1 = 0;
    return {
        status: ()=>{
            return `[${String(i1 + 1).padStart(numWidth)}/${files.length}] ${files[i1]}`;
        },
        next: ()=>{
            i1++;
        }
    };
}
async function handlePublish(handler, type, title, slug, render, target) {
    if (!target?.id) {
        if (handler.slugAvailable) {
            slug = await promptForSlug(type, handler.slugAvailable, slug);
        }
        info("");
        await withSpinner({
            message: `Creating ${handler.name} ${type}`
        }, async ()=>{
            const site = await handler.createSite(type, title, slug);
            target = {
                id: site.id,
                url: site.url,
                code: !!site.code
            };
        });
        info("");
    }
    target = target;
    const publishFiles = await renderForPublish(render, handler.name, type, title, target.url);
    const publishFilePath = (file)=>{
        return join3(publishFiles.baseDir, file);
    };
    let siteDeploy;
    const files = [];
    await withSpinner({
        message: `Preparing to publish ${type}`
    }, async ()=>{
        const textDecoder = new TextDecoder();
        let size = 0;
        for (const file of publishFiles.files){
            const filePath = publishFilePath(file);
            const fileBuffer = Deno.readFileSync(filePath);
            size = size + fileBuffer.byteLength;
            const sha1 = await stdCrypto.subtle.digest("SHA-1", fileBuffer);
            const encodedSha1 = encode5(new Uint8Array(sha1));
            files.push([
                file,
                textDecoder.decode(encodedSha1)
            ]);
        }
        const deploy = {
            files: {}
        };
        for (const file1 of files){
            deploy.files[`/${pathWithForwardSlashes(file1[0])}`] = file1[1];
        }
        siteDeploy = await handler.createDeploy(target.id, deploy.files, size);
        while(true){
            siteDeploy = await handler.getDeploy(siteDeploy.id);
            if (siteDeploy.state === "prepared" || siteDeploy.state === "ready") {
                break;
            }
            await sleep1(250);
        }
    });
    const required = siteDeploy?.required.map((sha1)=>{
        const file = files.find((file)=>file[1] === sha1);
        return file ? file[0] : null;
    }).filter((file)=>file);
    const progress = fileProgress(required);
    await withSpinner({
        message: ()=>`Uploading files ${progress.status()}`,
        doneMessage: false
    }, async ()=>{
        for (const requiredFile of required){
            const filePath = publishFilePath(requiredFile);
            const fileArray = Deno.readFileSync(filePath);
            await handler.uploadDeployFile(siteDeploy?.id, requiredFile, new Blob([
                fileArray.buffer
            ]));
            progress.next();
        }
    });
    completeMessage(`Uploading files (complete)`);
    let targetUrl = target.url;
    let adminUrl = target.url;
    let launchUrl = target.url;
    await withSpinner({
        message: `Deploying published ${type}`
    }, async ()=>{
        while(true){
            const deployReady = await handler.getDeploy(siteDeploy?.id);
            if (deployReady.state === "ready") {
                targetUrl = deployReady.url || targetUrl;
                adminUrl = deployReady.admin_url || targetUrl;
                launchUrl = deployReady.launch_url || adminUrl;
                break;
            }
            await sleep1(500);
        }
    });
    completeMessage(`Published ${type}: ${targetUrl}`);
    if (handler.updateAccountSite) {
        let accountSite;
        await withSpinner({
            message: `Updating account site`,
            doneMessage: false
        }, async ()=>{
            accountSite = await handler.updateAccountSite();
        });
        completeMessage(`Account site updated: ${accountSite.url}`);
    }
    info("");
    return [
        {
            ...target,
            url: targetUrl
        },
        launchUrl ? new URL(launchUrl) : undefined, 
    ];
}
async function renderForPublish(render, providerName, type, title, siteUrl) {
    let publishFiles = await render(siteUrl);
    if (type === "document" && !isHtmlContent(publishFiles.rootFile) && !isPdfContent(publishFiles.rootFile)) {
        throw new Error(`Documents published to ${providerName} must be either HTML or PDF.`);
    }
    if (type === "document") {
        publishFiles = stageDocumentPublish(title, publishFiles);
    }
    return publishFiles;
}
function stageDocumentPublish(title, publishFiles) {
    const publishDir = globalTempContext().createDir();
    const stagedFiles = window.structuredClone(publishFiles);
    stagedFiles.baseDir = publishDir;
    for (const file of publishFiles.files){
        const src = join3(publishFiles.baseDir, file);
        const target = join3(stagedFiles.baseDir, file);
        ensureDirSync(dirname2(target));
        copyTo(src, target);
    }
    const kIndex = "index.html";
    if (isHtmlContent(publishFiles.rootFile)) {
        if (stagedFiles.rootFile !== "index.html") {
            copyTo(join3(stagedFiles.baseDir, stagedFiles.rootFile), join3(stagedFiles.baseDir, kIndex));
        }
    } else if (isPdfContent(publishFiles.rootFile)) {
        const src1 = formatResourcePath("pdf", "pdfjs");
        const dest = join3(stagedFiles.baseDir, "pdfjs");
        for (const walk of walkSync(src1)){
            if (walk.isFile) {
                const destFile = join3(dest, relative2(src1, walk.path));
                ensureDirSync(dirname2(destFile));
                copyTo(walk.path, destFile);
                stagedFiles.files.push(relative2(stagedFiles.baseDir, destFile));
            }
        }
        const indexHtml = `<!DOCTYPE html>
<html>
<head>
<title>${encodeAttributeValue(title)}</title>
<style type="text/css">
  body, html {
    margin: 0; padding: 0; height: 100%; overflow: hidden;
  }
</style>
</head>
<body>
<iframe id="pdf-js-viewer" src="pdfjs/web/viewer.html?file=../../${encodeAttributeValue(stagedFiles.rootFile)}" title="${encodeAttributeValue(title)}" frameborder="0" width="100%" height="100%"></iframe>

</body>
</html>
`;
        Deno.writeTextFileSync(join3(stagedFiles.baseDir, kIndex), indexHtml);
    }
    if (!stagedFiles.files.includes(kIndex)) {
        stagedFiles.files.push(kIndex);
    }
    stagedFiles.rootFile = kIndex;
    return stagedFiles;
}
async function promptForSlug(type, slugAvailable, slug) {
    const available = await slugAvailable(slug);
    if (!available && type === "document") {
        slug = slug + "-" + randomHex(4);
    }
    if (await slugAvailable(slug)) {
        if (haveArrowKeys()) {
            const kConfirmed = "confirmed";
            const input = await Select.prompt({
                indent: "",
                message: `${typeName(type)} name:`,
                options: [
                    {
                        name: slug,
                        value: kConfirmed
                    },
                    {
                        name: "Use another name...",
                        value: "another"
                    }, 
                ]
            });
            if (input === kConfirmed) {
                return slug;
            }
        } else {
            const result1 = await Confirm.prompt({
                indent: "",
                message: `Publish with name '${slug}'?`,
                default: true,
                hint: "Type 'n' to use a different name"
            });
            if (result1) {
                return slug;
            }
        }
    }
    let hint = `The ${typeName(type).toLowerCase()} name is included within your published URL\n` + `  (e.g. https://username.quarto.pub/${slug}/)`;
    while(true){
        const input1 = await Input.prompt({
            indent: "",
            message: `Publish with name:`,
            hint,
            transform: (slug)=>gfmAutoIdentifier(slug, false),
            validate: (slug)=>{
                if (slug.length === 0) {
                    return true;
                } else if (slug.length < 2) {
                    return `${typeName(type)} name must be at least 2 characters.`;
                } else {
                    return true;
                }
            }
        });
        hint = undefined;
        if (input1.length === 0) {
            throw new Error();
        }
        if (await slugAvailable(input1)) {
            return input1;
        } else {
            info(red1(`  The specified name is already in use within your account.`));
        }
    }
}
function typeName(type) {
    return capitalizeWord(type);
}
const acceptApplicationJsonHeader = {
    Accept: "application/json"
};
const contentTypeApplicationJsonHeader = {
    "Content-Type": "application/json"
};
const authorizationHeader1 = (token)=>!token ? {} : {
        Authorization: `Bearer ${token}`
    };
class ApiError1 extends Error {
    constructor(status, statusText){
        super(`API Error: ${status} (${statusText})`);
        this.status = status;
        this.statusText = statusText;
    }
    status;
    statusText;
}
class QuartoPubClient {
    baseURL_;
    constructor(environment, token_){
        this.token_ = token_;
        this.createTicket = async (client_id)=>{
            const response = await fetch(this.createURL(`tickets?${new URLSearchParams({
                application_id: client_id
            })}`), {
                method: "POST",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader
                }
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
            return await response.json();
        };
        this.showTicket = async (id)=>{
            const response = await fetch(this.createURL(`tickets/${id}`), {
                method: "GET",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader
                }
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
            return await response.json();
        };
        this.exchangeTicket = async (id)=>{
            const response = await fetch(this.createURL(`tickets/${id}/exchange`), {
                method: "POST",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader
                }
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
            return await response.json();
        };
        this.slugAvailable = async (slug)=>{
            const response = await fetch(this.createURL(`slugs/${slug}`), {
                method: "HEAD",
                headers: {
                    ...authorizationHeader1(this.token_)
                }
            });
            if (response.ok) {
                return false;
            }
            if (response.status == 404) {
                return true;
            }
            throw new ApiError1(response.status, response.statusText);
        };
        this.createSite = async (type, title, slug)=>{
            const response = await fetch(this.createURL("sites"), {
                method: "POST",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader
                },
                body: new URLSearchParams({
                    type,
                    title,
                    slug
                })
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
            return await response.json();
        };
        this.createDeploy = async (siteId, files, size)=>{
            const response = await fetch(this.createURL(`sites/${siteId}/deploys`), {
                method: "POST",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader,
                    ...contentTypeApplicationJsonHeader
                },
                body: JSON.stringify({
                    size,
                    files
                })
            });
            if (!response.ok) {
                const description = await descriptionFromErrorResponse(response);
                throw new ApiError1(response.status, description || response.statusText);
            }
            return await response.json();
        };
        this.getDeploy = async (deployId)=>{
            const response = await fetch(this.createURL(`deploys/${deployId}`), {
                method: "GET",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader
                }
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
            return await response.json();
        };
        this.uploadDeployFile = async (deployId, path, fileBody)=>{
            const response = await fetch(this.createURL(`deploys/${deployId}/files/${path}`), {
                method: "PUT",
                headers: {
                    ...authorizationHeader1(this.token_)
                },
                body: fileBody
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
        };
        this.updateAccountSite = async ()=>{
            const response = await fetch(this.createURL("update-account-site"), {
                method: "PUT",
                headers: {
                    ...authorizationHeader1(this.token_),
                    ...acceptApplicationJsonHeader
                }
            });
            if (!response.ok) {
                throw new ApiError1(response.status, response.statusText);
            }
            return await response.json();
        };
        this.createURL = (path)=>`${this.baseURL_}/${path}`;
        switch(environment){
            case "LOCAL":
                this.baseURL_ = "http://localhost:3000/api/v1";
                break;
            case "PRODUCTION":
            default:
                this.baseURL_ = "https://quartopub.com/api/v1";
                break;
        }
    }
    createTicket;
    showTicket;
    exchangeTicket;
    slugAvailable;
    createSite;
    createDeploy;
    getDeploy;
    uploadDeployFile;
    updateAccountSite;
    createURL;
    token_;
}
async function descriptionFromErrorResponse(response) {
    if (response.body) {
        try {
            const result1 = await response.json();
            if (typeof result1.description === "string") {
                return result1.description;
            }
        } catch  {}
    }
}
class BaseHttpRequest {
    constructor(config){
        this.config = config;
    }
    config;
}
class ApiError2 extends Error {
    url;
    status;
    statusText;
    body;
    constructor(response, message){
        super(message);
        this.name = "ApiError";
        this.url = response.url;
        this.status = response.status;
        this.statusText = response.statusText;
        this.body = response.body;
    }
}
class CancelError extends Error {
    constructor(message){
        super(message);
        this.name = "CancelError";
    }
    get isCancelled() {
        return true;
    }
}
class CancelablePromise {
    [Symbol.toStringTag] = "";
    _isResolved;
    _isRejected;
    _isCancelled;
    _cancelHandlers;
    _promise;
    _resolve;
    _reject;
    constructor(executor){
        this._isResolved = false;
        this._isRejected = false;
        this._isCancelled = false;
        this._cancelHandlers = [];
        this._promise = new Promise((resolve, reject)=>{
            this._resolve = resolve;
            this._reject = reject;
            const onResolve = (value)=>{
                if (this._isResolved || this._isRejected || this._isCancelled) {
                    return;
                }
                this._isResolved = true;
                this._resolve?.(value);
            };
            const onReject = (reason)=>{
                if (this._isResolved || this._isRejected || this._isCancelled) {
                    return;
                }
                this._isRejected = true;
                this._reject?.(reason);
            };
            const onCancel = (cancelHandler)=>{
                if (this._isResolved || this._isRejected || this._isCancelled) {
                    return;
                }
                this._cancelHandlers.push(cancelHandler);
            };
            Object.defineProperty(onCancel, "isResolved", {
                get: ()=>this._isResolved
            });
            Object.defineProperty(onCancel, "isRejected", {
                get: ()=>this._isRejected
            });
            Object.defineProperty(onCancel, "isCancelled", {
                get: ()=>this._isCancelled
            });
            return executor(onResolve, onReject, onCancel);
        });
    }
    then(onFulfilled, onRejected) {
        return this._promise.then(onFulfilled, onRejected);
    }
    catch(onRejected) {
        return this._promise.catch(onRejected);
    }
    finally(onFinally) {
        return this._promise.finally(onFinally);
    }
    cancel() {
        if (this._isResolved || this._isRejected || this._isCancelled) {
            return;
        }
        this._isCancelled = true;
        if (this._cancelHandlers.length) {
            try {
                for (const cancelHandler of this._cancelHandlers){
                    cancelHandler();
                }
            } catch (error) {
                console.warn("Cancellation threw an error", error);
                return;
            }
        }
        this._cancelHandlers.length = 0;
        this._reject?.(new CancelError("Request aborted"));
    }
    get isCancelled() {
        return this._isCancelled;
    }
}
const isDefined = (value)=>{
    return value !== undefined && value !== null;
};
const isString = (value)=>{
    return typeof value === "string";
};
const isStringWithValue = (value)=>{
    return isString(value) && value !== "";
};
const isBlob = (value)=>{
    return typeof value === "object" && typeof value.type === "string" && typeof value.stream === "function" && typeof value.arrayBuffer === "function" && typeof value.constructor === "function" && typeof value.constructor.name === "string" && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]);
};
const isFormData = (value)=>{
    return value instanceof FormData;
};
const base64 = (str)=>{
    try {
        return btoa(str);
    } catch (err) {
        return Buffer.from(str).toString("base64");
    }
};
const getQueryString = (params)=>{
    const qs = [];
    const append = (key, value)=>{
        qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
    };
    const process = (key, value)=>{
        if (isDefined(value)) {
            if (Array.isArray(value)) {
                value.forEach((v)=>{
                    process(key, v);
                });
            } else if (typeof value === "object") {
                Object.entries(value).forEach(([k, v])=>{
                    process(`${key}[${k}]`, v);
                });
            } else {
                append(key, value);
            }
        }
    };
    Object.entries(params).forEach(([key, value])=>{
        process(key, value);
    });
    if (qs.length > 0) {
        return `?${qs.join("&")}`;
    }
    return "";
};
const getUrl = (config, options)=>{
    const encoder = config.ENCODE_PATH || encodeURI;
    const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group)=>{
        if (options.path?.hasOwnProperty(group)) {
            return encoder(String(options.path[group]));
        }
        return substring;
    });
    const url = `${config.BASE}${path}`;
    if (options.query) {
        return `${url}${getQueryString(options.query)}`;
    }
    return url;
};
const getFormData = (options)=>{
    if (options.formData) {
        const formData = new FormData();
        const process = (key, value)=>{
            if (isString(value) || isBlob(value)) {
                formData.append(key, value);
            } else {
                formData.append(key, JSON.stringify(value));
            }
        };
        Object.entries(options.formData).filter(([_, value])=>isDefined(value)).forEach(([key, value])=>{
            if (Array.isArray(value)) {
                value.forEach((v)=>process(key, v));
            } else {
                process(key, value);
            }
        });
        return formData;
    }
    return undefined;
};
const resolve9 = async (options, resolver)=>{
    if (typeof resolver === "function") {
        return resolver(options);
    }
    return resolver;
};
const getHeaders = async (config, options)=>{
    const token = await resolve9(options, config.TOKEN);
    const username = await resolve9(options, config.USERNAME);
    const password = await resolve9(options, config.PASSWORD);
    const additionalHeaders = await resolve9(options, config.HEADERS);
    const headers = Object.entries({
        Accept: "application/json",
        ...additionalHeaders,
        ...options.headers
    }).filter(([_, value])=>isDefined(value)).reduce((headers, [key, value])=>({
            ...headers,
            [key]: String(value)
        }), {});
    if (isStringWithValue(token)) {
        headers["Authorization"] = `Bearer ${token}`;
    }
    if (isStringWithValue(username) && isStringWithValue(password)) {
        const credentials = base64(`${username}:${password}`);
        headers["Authorization"] = `Basic ${credentials}`;
    }
    if (options.body) {
        if (options.mediaType) {
            headers["Content-Type"] = options.mediaType;
        } else if (isBlob(options.body)) {
            headers["Content-Type"] = options.body.type || "application/octet-stream";
        } else if (isString(options.body)) {
            headers["Content-Type"] = "text/plain";
        } else if (!isFormData(options.body)) {
            headers["Content-Type"] = "application/json";
        }
    }
    return new Headers(headers);
};
const getRequestBody = (options)=>{
    if (options.body) {
        if (options.mediaType?.includes("/json")) {
            return JSON.stringify(options.body);
        } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
            return options.body;
        } else {
            return JSON.stringify(options.body);
        }
    }
    return undefined;
};
const sendRequest = async (config, options, url, body, formData, headers, onCancel)=>{
    const controller = new AbortController();
    const request = {
        headers,
        body: body ?? formData,
        method: options.method,
        signal: controller.signal
    };
    if (config.WITH_CREDENTIALS) {
        request.credentials = config.CREDENTIALS;
    }
    onCancel(()=>controller.abort());
    return await fetch(url, request);
};
const getResponseHeader = (response, responseHeader)=>{
    if (responseHeader) {
        const content = response.headers.get(responseHeader);
        if (isString(content)) {
            return content;
        }
    }
    return undefined;
};
const getResponseBody = async (response)=>{
    if (response.status !== 204) {
        try {
            const contentType = response.headers.get("Content-Type");
            if (contentType) {
                const isJSON = contentType.toLowerCase().startsWith("application/json");
                if (isJSON) {
                    return await response.json();
                } else {
                    return await response.text();
                }
            }
        } catch (error) {
            console.error(error);
        }
    }
    return undefined;
};
const catchErrorCodes = (options, result1)=>{
    const errors = {
        400: "Bad Request",
        401: "Unauthorized",
        403: "Forbidden",
        404: "Not Found",
        500: "Internal Server Error",
        502: "Bad Gateway",
        503: "Service Unavailable",
        ...options.errors
    };
    const error = errors[result1.status];
    if (error) {
        throw new ApiError2(result1, error);
    }
    if (!result1.ok) {
        throw new ApiError2(result1, "Generic Error");
    }
};
const request = (config, options)=>{
    return new CancelablePromise(async (resolve, reject, onCancel)=>{
        try {
            const url = getUrl(config, options);
            const formData = getFormData(options);
            const body = getRequestBody(options);
            const headers = await getHeaders(config, options);
            if (!onCancel.isCancelled) {
                const response = await sendRequest(config, options, url, body, formData, headers, onCancel);
                const responseBody = await getResponseBody(response);
                const responseHeader = getResponseHeader(response, options.responseHeader);
                const result1 = {
                    url,
                    ok: response.ok,
                    status: response.status,
                    statusText: response.statusText,
                    body: responseHeader ?? responseBody
                };
                catchErrorCodes(options, result1);
                resolve(result1.body);
            }
        } catch (error) {
            reject(error);
        }
    });
};
class FetchHttpRequest extends BaseHttpRequest {
    constructor(config){
        super(config);
    }
    request(options) {
        return request(this.config, options);
    }
}
class AccessTokenService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    exchangeTicket({ ticketId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/oauth/tickets/{ticket_id}/exchange",
            path: {
                "ticket_id": ticketId
            }
        });
    }
    httpRequest;
}
class AccountMembershipService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listAccountsForUser() {
        return this.httpRequest.request({
            method: "GET",
            url: "/accounts"
        });
    }
    createAccount({ accountSetup  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/accounts",
            body: accountSetup
        });
    }
    getAccount({ accountId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/accounts/{account_id}",
            path: {
                "account_id": accountId
            }
        });
    }
    updateAccount({ accountId , accountUpdateSetup  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/accounts/{account_id}",
            path: {
                "account_id": accountId
            },
            body: accountUpdateSetup
        });
    }
    cancelAccount({ accountId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/accounts/{account_id}",
            path: {
                "account_id": accountId
            }
        });
    }
    httpRequest;
}
class AccountTypeService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listAccountTypesForUser() {
        return this.httpRequest.request({
            method: "GET",
            url: "/accounts/types"
        });
    }
    httpRequest;
}
class AssetService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteAssets({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/assets",
            path: {
                "site_id": siteId
            }
        });
    }
    createSiteAsset({ siteId , name , size , contentType , visibility  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/assets",
            path: {
                "site_id": siteId
            },
            query: {
                "name": name,
                "size": size,
                "content_type": contentType,
                "visibility": visibility
            }
        });
    }
    getSiteAssetInfo({ siteId , assetId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/assets/{asset_id}",
            path: {
                "site_id": siteId,
                "asset_id": assetId
            }
        });
    }
    updateSiteAsset({ siteId , assetId , state  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/assets/{asset_id}",
            path: {
                "site_id": siteId,
                "asset_id": assetId
            },
            query: {
                "state": state
            }
        });
    }
    deleteSiteAsset({ siteId , assetId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/sites/{site_id}/assets/{asset_id}",
            path: {
                "site_id": siteId,
                "asset_id": assetId
            }
        });
    }
    httpRequest;
}
class AssetPublicSignatureService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    getSiteAssetPublicSignature({ siteId , assetId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/assets/{asset_id}/public_signature",
            path: {
                "site_id": siteId,
                "asset_id": assetId
            }
        });
    }
    httpRequest;
}
class AuditLogService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listAccountAuditEvents({ accountId , query , logType , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/accounts/{account_id}/audit",
            path: {
                "account_id": accountId
            },
            query: {
                "query": query,
                "log_type": logType,
                "page": page,
                "per_page": perPage
            }
        });
    }
    httpRequest;
}
class BuildService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteBuilds({ siteId , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/builds",
            path: {
                "site_id": siteId
            },
            query: {
                "page": page,
                "per_page": perPage
            }
        });
    }
    createSiteBuild({ siteId , build  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/builds",
            path: {
                "site_id": siteId
            },
            body: build
        });
    }
    getSiteBuild({ buildId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/builds/{build_id}",
            path: {
                "build_id": buildId
            }
        });
    }
    notifyBuildStart({ buildId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/builds/{build_id}/start",
            path: {
                "build_id": buildId
            }
        });
    }
    getAccountBuildStatus({ accountId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/{account_id}/builds/status",
            path: {
                "account_id": accountId
            }
        });
    }
    httpRequest;
}
class BuildHookService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteBuildHooks({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/build_hooks",
            path: {
                "site_id": siteId
            }
        });
    }
    createSiteBuildHook({ siteId , buildHook  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/build_hooks",
            path: {
                "site_id": siteId
            },
            body: buildHook
        });
    }
    getSiteBuildHook({ siteId , id  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/build_hooks/{id}",
            path: {
                "site_id": siteId,
                "id": id
            }
        });
    }
    updateSiteBuildHook({ siteId , id , buildHook  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/build_hooks/{id}",
            path: {
                "site_id": siteId,
                "id": id
            },
            body: buildHook
        });
    }
    deleteSiteBuildHook({ siteId , id  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/sites/{site_id}/build_hooks/{id}",
            path: {
                "site_id": siteId,
                "id": id
            }
        });
    }
    httpRequest;
}
class BuildLogMsgService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    updateSiteBuildLog({ buildId , msg  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/builds/{build_id}/log",
            path: {
                "build_id": buildId
            },
            body: msg
        });
    }
    httpRequest;
}
class DeployService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteDeploys({ siteId , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/deploys",
            path: {
                "site_id": siteId
            },
            query: {
                "page": page,
                "per_page": perPage
            }
        });
    }
    createSiteDeploy({ siteId , deploy , title  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/deploys",
            path: {
                "site_id": siteId
            },
            query: {
                "title": title
            },
            body: deploy
        });
    }
    getSiteDeploy({ siteId , deployId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/deploys/{deploy_id}",
            path: {
                "site_id": siteId,
                "deploy_id": deployId
            }
        });
    }
    updateSiteDeploy({ siteId , deployId , deploy  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/deploys/{deploy_id}",
            path: {
                "site_id": siteId,
                "deploy_id": deployId
            },
            body: deploy
        });
    }
    cancelSiteDeploy({ deployId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/deploys/{deploy_id}/cancel",
            path: {
                "deploy_id": deployId
            }
        });
    }
    restoreSiteDeploy({ siteId , deployId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/deploys/{deploy_id}/restore",
            path: {
                "site_id": siteId,
                "deploy_id": deployId
            }
        });
    }
    rollbackSiteDeploy({ siteId  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/rollback",
            path: {
                "site_id": siteId
            }
        });
    }
    getDeploy({ deployId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/deploys/{deploy_id}",
            path: {
                "deploy_id": deployId
            }
        });
    }
    lockDeploy({ deployId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/deploys/{deploy_id}/lock",
            path: {
                "deploy_id": deployId
            }
        });
    }
    unlockDeploy({ deployId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/deploys/{deploy_id}/unlock",
            path: {
                "deploy_id": deployId
            }
        });
    }
    httpRequest;
}
class DeployedBranchService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteDeployedBranches({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/deployed-branches",
            path: {
                "site_id": siteId
            }
        });
    }
    httpRequest;
}
class DeployKeyService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listDeployKeys() {
        return this.httpRequest.request({
            method: "GET",
            url: "/deploy_keys"
        });
    }
    createDeployKey() {
        return this.httpRequest.request({
            method: "POST",
            url: "/deploy_keys"
        });
    }
    getDeployKey({ keyId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/deploy_keys/{key_id}",
            path: {
                "key_id": keyId
            }
        });
    }
    deleteDeployKey({ keyId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/deploy_keys/{key_id}",
            path: {
                "key_id": keyId
            }
        });
    }
    httpRequest;
}
class DnsZoneService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    getDnsForSite({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/dns",
            path: {
                "site_id": siteId
            }
        });
    }
    configureDnsForSite({ siteId  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/dns",
            path: {
                "site_id": siteId
            }
        });
    }
    createDnsZone({ dnsZoneParams  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/dns_zones",
            body: dnsZoneParams
        });
    }
    getDnsZones({ accountSlug  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/dns_zones",
            query: {
                "account_slug": accountSlug
            }
        });
    }
    getDnsZone({ zoneId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/dns_zones/{zone_id}",
            path: {
                "zone_id": zoneId
            }
        });
    }
    deleteDnsZone({ zoneId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/dns_zones/{zone_id}",
            path: {
                "zone_id": zoneId
            }
        });
    }
    transferDnsZone({ zoneId , accountId , transferAccountId , transferUserId  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/dns_zones/{zone_id}/transfer",
            path: {
                "zone_id": zoneId
            },
            query: {
                "account_id": accountId,
                "transfer_account_id": transferAccountId,
                "transfer_user_id": transferUserId
            }
        });
    }
    getDnsRecords({ zoneId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/dns_zones/{zone_id}/dns_records",
            path: {
                "zone_id": zoneId
            }
        });
    }
    createDnsRecord({ zoneId , dnsRecord  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/dns_zones/{zone_id}/dns_records",
            path: {
                "zone_id": zoneId
            },
            body: dnsRecord
        });
    }
    getIndividualDnsRecord({ zoneId , dnsRecordId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/dns_zones/{zone_id}/dns_records/{dns_record_id}",
            path: {
                "zone_id": zoneId,
                "dns_record_id": dnsRecordId
            }
        });
    }
    deleteDnsRecord({ zoneId , dnsRecordId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/dns_zones/{zone_id}/dns_records/{dns_record_id}",
            path: {
                "zone_id": zoneId,
                "dns_record_id": dnsRecordId
            }
        });
    }
    httpRequest;
}
class FileService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteFiles({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/files",
            path: {
                "site_id": siteId
            }
        });
    }
    getSiteFileByPathName({ siteId , filePath  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/files/{file_path}",
            path: {
                "site_id": siteId,
                "file_path": filePath
            }
        });
    }
    uploadDeployFile({ deployId , path , fileBody , size  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/deploys/{deploy_id}/files/{path}",
            path: {
                "deploy_id": deployId,
                "path": path
            },
            query: {
                "size": size
            },
            body: fileBody
        });
    }
    httpRequest;
}
class FormService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteForms({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/forms",
            path: {
                "site_id": siteId
            }
        });
    }
    deleteSiteForm({ siteId , formId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/sites/{site_id}/forms/{form_id}",
            path: {
                "site_id": siteId,
                "form_id": formId
            }
        });
    }
    httpRequest;
}
class FunctionService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    uploadDeployFunction({ deployId , name , fileBody , runtime , size  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/deploys/{deploy_id}/functions/{name}",
            path: {
                "deploy_id": deployId,
                "name": name
            },
            query: {
                "runtime": runtime,
                "size": size
            },
            body: fileBody
        });
    }
    httpRequest;
}
class HookService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listHooksBySiteId({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/hooks",
            query: {
                "site_id": siteId
            }
        });
    }
    createHookBySiteId({ siteId , hook  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/hooks",
            query: {
                "site_id": siteId
            },
            body: hook
        });
    }
    getHook({ hookId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/hooks/{hook_id}",
            path: {
                "hook_id": hookId
            }
        });
    }
    updateHook({ hookId , hook  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/hooks/{hook_id}",
            path: {
                "hook_id": hookId
            },
            body: hook
        });
    }
    deleteHook({ hookId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/hooks/{hook_id}",
            path: {
                "hook_id": hookId
            }
        });
    }
    enableHook({ hookId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/hooks/{hook_id}/enable",
            path: {
                "hook_id": hookId
            }
        });
    }
    httpRequest;
}
class HookTypeService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listHookTypes() {
        return this.httpRequest.request({
            method: "GET",
            url: "/hooks/types"
        });
    }
    httpRequest;
}
class MemberService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listMembersForAccount({ accountSlug  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/{account_slug}/members",
            path: {
                "account_slug": accountSlug
            }
        });
    }
    addMemberToAccount({ accountSlug , email , role  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/{account_slug}/members",
            path: {
                "account_slug": accountSlug
            },
            query: {
                "role": role,
                "email": email
            }
        });
    }
    httpRequest;
}
class MetadataService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    getSiteMetadata({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/metadata",
            path: {
                "site_id": siteId
            }
        });
    }
    updateSiteMetadata({ siteId , metadata  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/metadata",
            path: {
                "site_id": siteId
            },
            body: metadata
        });
    }
    httpRequest;
}
class PaymentMethodService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listPaymentMethodsForUser() {
        return this.httpRequest.request({
            method: "GET",
            url: "/billing/payment_methods"
        });
    }
    httpRequest;
}
class ServiceService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    getServices({ search  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/services/",
            query: {
                "search": search
            }
        });
    }
    showService({ addonName  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/services/{addonName}",
            path: {
                "addonName": addonName
            }
        });
    }
    showServiceManifest({ addonName  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/services/{addonName}/manifest",
            path: {
                "addonName": addonName
            }
        });
    }
    httpRequest;
}
class ServiceInstanceService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listServiceInstancesForSite({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/service-instances",
            path: {
                "site_id": siteId
            }
        });
    }
    createServiceInstance({ siteId , addon , config  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/services/{addon}/instances",
            path: {
                "site_id": siteId,
                "addon": addon
            },
            body: config
        });
    }
    showServiceInstance({ siteId , addon , instanceId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/services/{addon}/instances/{instance_id}",
            path: {
                "site_id": siteId,
                "addon": addon,
                "instance_id": instanceId
            }
        });
    }
    updateServiceInstance({ siteId , addon , instanceId , config  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/services/{addon}/instances/{instance_id}",
            path: {
                "site_id": siteId,
                "addon": addon,
                "instance_id": instanceId
            },
            body: config
        });
    }
    deleteServiceInstance({ siteId , addon , instanceId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/sites/{site_id}/services/{addon}/instances/{instance_id}",
            path: {
                "site_id": siteId,
                "addon": addon,
                "instance_id": instanceId
            }
        });
    }
    httpRequest;
}
class SiteService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSites({ name , filter , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites",
            query: {
                "name": name,
                "filter": filter,
                "page": page,
                "per_page": perPage
            }
        });
    }
    createSite({ site , configureDns  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites",
            query: {
                "configure_dns": configureDns
            },
            body: site
        });
    }
    getSite({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}",
            path: {
                "site_id": siteId
            }
        });
    }
    updateSite({ siteId , site  }) {
        return this.httpRequest.request({
            method: "PATCH",
            url: "/sites/{site_id}",
            path: {
                "site_id": siteId
            },
            body: site
        });
    }
    deleteSite({ siteId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/sites/{site_id}",
            path: {
                "site_id": siteId
            }
        });
    }
    unlinkSiteRepo({ siteId  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/unlink_repo",
            path: {
                "site_id": siteId
            },
            errors: {
                404: `Site not found`
            }
        });
    }
    createSiteInTeam({ accountSlug , site , configureDns  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/{account_slug}/sites",
            path: {
                "account_slug": accountSlug
            },
            query: {
                "configure_dns": configureDns
            },
            body: site
        });
    }
    listSitesForAccount({ accountSlug , name , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/{account_slug}/sites",
            path: {
                "account_slug": accountSlug
            },
            query: {
                "name": name,
                "page": page,
                "per_page": perPage
            }
        });
    }
    httpRequest;
}
class SniCertificateService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    provisionSiteTlsCertificate({ siteId , certificate , key , caCertificates  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/ssl",
            path: {
                "site_id": siteId
            },
            query: {
                "certificate": certificate,
                "key": key,
                "ca_certificates": caCertificates
            }
        });
    }
    showSiteTlsCertificate({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/ssl",
            path: {
                "site_id": siteId
            }
        });
    }
    httpRequest;
}
class SnippetService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteSnippets({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/snippets",
            path: {
                "site_id": siteId
            }
        });
    }
    createSiteSnippet({ siteId , snippet  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/snippets",
            path: {
                "site_id": siteId
            },
            body: snippet
        });
    }
    getSiteSnippet({ siteId , snippetId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/snippets/{snippet_id}",
            path: {
                "site_id": siteId,
                "snippet_id": snippetId
            }
        });
    }
    updateSiteSnippet({ siteId , snippetId , snippet  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/snippets/{snippet_id}",
            path: {
                "site_id": siteId,
                "snippet_id": snippetId
            },
            body: snippet
        });
    }
    deleteSiteSnippet({ siteId , snippetId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/sites/{site_id}/snippets/{snippet_id}",
            path: {
                "site_id": siteId,
                "snippet_id": snippetId
            }
        });
    }
    httpRequest;
}
class SplitTestService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    createSplitTest({ siteId , branchTests  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/traffic_splits",
            path: {
                "site_id": siteId
            },
            body: branchTests
        });
    }
    getSplitTests({ siteId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/traffic_splits",
            path: {
                "site_id": siteId
            }
        });
    }
    updateSplitTest({ siteId , splitTestId , branchTests  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/traffic_splits/{split_test_id}",
            path: {
                "site_id": siteId,
                "split_test_id": splitTestId
            },
            body: branchTests
        });
    }
    getSplitTest({ siteId , splitTestId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/traffic_splits/{split_test_id}",
            path: {
                "site_id": siteId,
                "split_test_id": splitTestId
            }
        });
    }
    enableSplitTest({ siteId , splitTestId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/traffic_splits/{split_test_id}/publish",
            path: {
                "site_id": siteId,
                "split_test_id": splitTestId
            }
        });
    }
    disableSplitTest({ siteId , splitTestId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/sites/{site_id}/traffic_splits/{split_test_id}/unpublish",
            path: {
                "site_id": siteId,
                "split_test_id": splitTestId
            }
        });
    }
    httpRequest;
}
class SubmissionService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    listSiteSubmissions({ siteId , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/submissions",
            path: {
                "site_id": siteId
            },
            query: {
                "page": page,
                "per_page": perPage
            }
        });
    }
    listFormSubmissions({ formId , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/forms/{form_id}/submissions",
            path: {
                "form_id": formId
            },
            query: {
                "page": page,
                "per_page": perPage
            }
        });
    }
    listFormSubmission({ submissionId , query , page , perPage  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/submissions/{submission_id}",
            path: {
                "submission_id": submissionId
            },
            query: {
                "query": query,
                "page": page,
                "per_page": perPage
            }
        });
    }
    deleteSubmission({ submissionId  }) {
        return this.httpRequest.request({
            method: "DELETE",
            url: "/submissions/{submission_id}",
            path: {
                "submission_id": submissionId
            }
        });
    }
    httpRequest;
}
class TicketService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    createTicket({ clientId  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/oauth/tickets",
            query: {
                "client_id": clientId
            }
        });
    }
    showTicket({ ticketId  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/oauth/tickets/{ticket_id}",
            path: {
                "ticket_id": ticketId
            }
        });
    }
    httpRequest;
}
class UserService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    getCurrentUser() {
        return this.httpRequest.request({
            method: "GET",
            url: "/user"
        });
    }
    httpRequest;
}
class XInternalService {
    constructor(httpRequest){
        this.httpRequest = httpRequest;
    }
    updatePlugin({ siteId , _package , pluginParams  }) {
        return this.httpRequest.request({
            method: "PUT",
            url: "/sites/{site_id}/plugins/{package}",
            path: {
                "site_id": siteId,
                "package": _package
            },
            body: pluginParams
        });
    }
    getLatestPluginRuns({ siteId , packages , state  }) {
        return this.httpRequest.request({
            method: "GET",
            url: "/sites/{site_id}/plugin_runs/latest",
            path: {
                "site_id": siteId
            },
            query: {
                "packages": packages,
                "state": state
            }
        });
    }
    createPluginRun({ deployId , pluginRun  }) {
        return this.httpRequest.request({
            method: "POST",
            url: "/deploys/{deploy_id}/plugin_runs",
            path: {
                "deploy_id": deployId
            },
            body: pluginRun
        });
    }
    httpRequest;
}
class NetlifyClient {
    accessToken;
    accountMembership;
    accountType;
    asset;
    assetPublicSignature;
    auditLog;
    build;
    buildHook;
    buildLogMsg;
    deploy;
    deployedBranch;
    deployKey;
    dnsZone;
    file;
    form;
    function;
    hook;
    hookType;
    member;
    metadata;
    paymentMethod;
    service;
    serviceInstance;
    site;
    sniCertificate;
    snippet;
    splitTest;
    submission;
    ticket;
    user;
    xInternal;
    request;
    constructor(config, HttpRequest = FetchHttpRequest){
        this.request = new HttpRequest({
            BASE: config?.BASE ?? "https://api.netlify.com/api/v1",
            VERSION: config?.VERSION ?? "2.9.0",
            WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
            CREDENTIALS: config?.CREDENTIALS ?? "include",
            TOKEN: config?.TOKEN,
            USERNAME: config?.USERNAME,
            PASSWORD: config?.PASSWORD,
            HEADERS: config?.HEADERS,
            ENCODE_PATH: config?.ENCODE_PATH
        });
        this.accessToken = new AccessTokenService(this.request);
        this.accountMembership = new AccountMembershipService(this.request);
        this.accountType = new AccountTypeService(this.request);
        this.asset = new AssetService(this.request);
        this.assetPublicSignature = new AssetPublicSignatureService(this.request);
        this.auditLog = new AuditLogService(this.request);
        this.build = new BuildService(this.request);
        this.buildHook = new BuildHookService(this.request);
        this.buildLogMsg = new BuildLogMsgService(this.request);
        this.deploy = new DeployService(this.request);
        this.deployedBranch = new DeployedBranchService(this.request);
        this.deployKey = new DeployKeyService(this.request);
        this.dnsZone = new DnsZoneService(this.request);
        this.file = new FileService(this.request);
        this.form = new FormService(this.request);
        this.function = new FunctionService(this.request);
        this.hook = new HookService(this.request);
        this.hookType = new HookTypeService(this.request);
        this.member = new MemberService(this.request);
        this.metadata = new MetadataService(this.request);
        this.paymentMethod = new PaymentMethodService(this.request);
        this.service = new ServiceService(this.request);
        this.serviceInstance = new ServiceInstanceService(this.request);
        this.site = new SiteService(this.request);
        this.sniCertificate = new SniCertificateService(this.request);
        this.snippet = new SnippetService(this.request);
        this.splitTest = new SplitTestService(this.request);
        this.submission = new SubmissionService(this.request);
        this.ticket = new TicketService(this.request);
        this.user = new UserService(this.request);
        this.xInternal = new XInternalService(this.request);
    }
}
var accountSetup;
(function(accountSetup) {
    let period;
    (function(period) {
        period["MONTHLY"] = "monthly";
        period["YEARLY"] = "yearly";
    })(period = accountSetup.period || (accountSetup.period = {}));
})(accountSetup || (accountSetup = {}));
async function withRetry(fn, options) {
    const { attempts =10 , minWait =1000 , maxWait =4000 , retry =()=>true ,  } = options || {};
    let attempt = 0;
    while(true){
        try {
            return fn();
        } catch (err) {
            if (attempt++ >= attempts || retry && !retry(err)) {
                throw err;
            }
            const delay = minWait + Math.floor(Math.random() * (maxWait - minWait));
            await sleep1(delay);
        }
    }
}
var AccountTokenType;
const kNetlify = "netlify";
const kGhpages = "gh-pages";
const kQuartoPub = "quarto-pub";
const kRSConnect = "connect";
async function authorizePrompt(provider) {
    const result1 = await prompt([
        {
            indent: "",
            name: "confirmed",
            message: "Authorize",
            default: true,
            hint: `In order to publish to ${provider.description} you need to authorize your account.\n` + `  Please be sure you are logged into the correct ${provider.description} account in your\n` + "  default web browser, then press Enter or 'Y' to authorize.",
            type: Confirm
        }
    ]);
    return !!result1.confirmed;
}
(function(AccountTokenType) {
    AccountTokenType[AccountTokenType["Environment"] = 0] = "Environment";
    AccountTokenType[AccountTokenType["Authorized"] = 1] = "Authorized";
    AccountTokenType[AccountTokenType["Anonymous"] = 2] = "Anonymous";
})(AccountTokenType || (AccountTokenType = {}));
function accountTokenText(token) {
    return token.name + (token.server ? ` (${token.server})` : "");
}
function anonymousAccount() {
    return {
        type: AccountTokenType.Anonymous,
        name: "anonymous",
        server: null,
        token: "anonymous"
    };
}
const kQuartoPubAuthTokenVar = "QUARTO_PUB_AUTH_TOKEN";
const quartoPubProvider = {
    name: kQuartoPub,
    description: "Quarto Pub",
    requiresServer: false,
    listOriginOnly: false,
    accountTokens: accountTokens2,
    authorizeToken: authorizeToken2,
    removeToken: removeToken2,
    resolveTarget: resolveTarget2,
    publish: publish2,
    isUnauthorized: isUnauthorized2,
    isNotFound: isNotFound2
};
const kGhpagesDescription = "GitHub Pages";
const ghpagesProvider = {
    name: kGhpages,
    description: kGhpagesDescription,
    requiresServer: false,
    listOriginOnly: false,
    accountTokens: accountTokens1,
    authorizeToken: authorizeToken1,
    removeToken: removeToken1,
    publishRecord,
    resolveTarget: resolveTarget1,
    publish: publish1,
    isUnauthorized: isUnauthorized1,
    isNotFound: isNotFound1
};
const kRSConnectDescription = "RStudio Connect";
const kRSConnectServerVar = "CONNECT_SERVER";
const kRSConnectAuthTokenVar = "CONNECT_API_KEY";
const rsconnectProvider = {
    name: kRSConnect,
    description: kRSConnectDescription,
    requiresServer: true,
    listOriginOnly: true,
    accountTokens: accountTokens3,
    authorizeToken: authorizeToken3,
    removeToken: removeToken3,
    resolveTarget: resolveTarget3,
    publish: publish3,
    isUnauthorized: isUnauthorized3,
    isNotFound: isNotFound3
};
const kNetlifyDescription = "Netlify";
const kNetlifyAuthTokenVar = "NETLIFY_AUTH_TOKEN";
const netlifyProvider = {
    name: kNetlify,
    description: kNetlifyDescription,
    requiresServer: false,
    listOriginOnly: false,
    accountTokens,
    authorizeToken,
    removeToken,
    resolveTarget,
    publish,
    isUnauthorized,
    isNotFound
};
const kPublishProviders = [
    quartoPubProvider,
    ghpagesProvider,
    rsconnectProvider,
    netlifyProvider, 
];
async function publishProviders() {
    const providers = [];
    const dotenvConfig = await quartoConfig.dotenv();
    const quartopubAppId = dotenvConfig["QUARTO_PUB_APP_CLIENT_ID"];
    if (quartopubAppId && quartopubAppId !== "None") {
        providers.push(quartoPubProvider);
    }
    providers.push(ghpagesProvider);
    providers.push(rsconnectProvider);
    providers.push(netlifyProvider);
    return providers;
}
function findProvider(name) {
    return kPublishProviders.find((provider)=>provider.name === name);
}
function accountTokens() {
    const envTk = environmentAuthToken();
    const accessTkns = accessTokens();
    const accounts = [];
    if (envTk) {
        accounts.push({
            type: AccountTokenType.Environment,
            name: kNetlifyAuthTokenVar,
            server: null,
            token: envTk
        });
    }
    if (accessTkns) {
        for (const accessTk of accessTkns){
            if (accessTk?.access_token) {
                accounts.push({
                    type: AccountTokenType.Authorized,
                    name: accessTk.email,
                    server: null,
                    token: accessTk?.access_token
                });
            }
        }
    }
    return Promise.resolve(accounts);
}
async function authorizeToken(_options) {
    if (await authorizePrompt(netlifyProvider)) {
        const token = await authorizeNetlifyAccessToken();
        if (token) {
            return {
                type: AccountTokenType.Authorized,
                name: token.email,
                server: null,
                token: token.access_token
            };
        }
    } else {
        return undefined;
    }
}
function removeToken(token) {
    writeAccessTokens(netlifyProvider.name, readAccessTokens(netlifyProvider.name)?.filter((accessToken)=>{
        return accessToken.email !== token.name;
    }) || []);
}
function environmentAuthToken() {
    return Deno.env.get(kNetlifyAuthTokenVar);
}
function accessTokens() {
    return readAccessTokens(kNetlify);
}
async function authorizeNetlifyAccessToken() {
    const client = new NetlifyClient({});
    const clientId = (await quartoConfig.dotenv())["NETLIFY_APP_CLIENT_ID"];
    const handler = {
        name: kNetlifyDescription,
        createTicket: function() {
            return client.ticket.createTicket({
                clientId
            });
        },
        authorizationUrl: function(ticket) {
            return `https://app.netlify.com/authorize?response_type=ticket&ticket=${ticket.id}`;
        },
        checkTicket: function(ticket) {
            return client.ticket.showTicket({
                ticketId: ticket.id
            });
        },
        exchangeTicket: function(ticket) {
            return client.accessToken.exchangeTicket({
                ticketId: ticket.id
            });
        },
        compareTokens: (a, b)=>a.email === b.email
    };
    return authorizeAccessToken(handler);
}
async function resolveTarget(account, target) {
    const client = new NetlifyClient({
        TOKEN: account.token
    });
    const site = await client.site.getSite({
        siteId: target.id
    });
    if (updateProcessingSettings(site)) {
        await client.site.updateSite({
            siteId: target.id,
            site: {
                processing_settings: {
                    css: {
                        bundle: false,
                        minify: false
                    },
                    html: {
                        pretty_urls: false
                    },
                    js: {
                        bundle: false,
                        minify: false
                    }
                }
            }
        });
    }
    target.url = site?.ssl_url || site?.url || target.url;
    return target;
}
function updateProcessingSettings(site) {
    return site.processing_settings?.skip !== true && (site.processing_settings?.css?.bundle || site.processing_settings?.css?.minify || site.processing_settings?.html?.pretty_urls || site.processing_settings?.js?.bundle || site.processing_settings?.js?.minify);
}
function publish(account, type, _input, title, slug, render, _options, target) {
    const client = new NetlifyClient({
        TOKEN: account.token
    });
    const handler = {
        name: kNetlify,
        createSite: async (_type, _title, _slug)=>{
            return withSslUrl(await client.site.createSite({
                site: {
                    force_ssl: true,
                    processing_settings: {
                        skip: true
                    }
                }
            }));
        },
        createDeploy: async (siteId, files)=>{
            return withSslUrl(await client.deploy.createSiteDeploy({
                siteId,
                deploy: {
                    files,
                    async: true
                }
            }));
        },
        getDeploy: async (deployId)=>{
            return withSslUrl(await client.deploy.getDeploy({
                deployId
            }));
        },
        uploadDeployFile: async (deployId, path, fileBody)=>{
            await withRetry(async ()=>{
                await client.file.uploadDeployFile({
                    deployId,
                    path,
                    fileBody
                });
            });
        }
    };
    return handlePublish(handler, type, title, slug, render, target);
}
function withSslUrl(obj) {
    return {
        ...obj,
        url: obj.ssl_url || obj.url
    };
}
function isUnauthorized(err) {
    return err instanceof ApiError2 && err.status === 401;
}
function isNotFound(err) {
    return err instanceof ApiError2 && err.status === 404;
}
function accountTokens1() {
    return Promise.resolve([
        anonymousAccount()
    ]);
}
async function authorizeToken1(options) {
    const ghContext = await gitHubContext(options.input);
    if (!ghContext.git) {
        throwUnableToPublish("git does not appear to be installed on this system");
    }
    if (!ghContext.repo) {
        throwUnableToPublish("the target directory is not a git repository");
    }
    if (!ghContext.originUrl) {
        throwUnableToPublish("the git repository does not have a remote origin");
    }
    return Promise.resolve(anonymousAccount());
}
function removeToken1(_token) {}
async function publishRecord(input) {
    const ghContext = await gitHubContext(input);
    if (ghContext.ghPages) {
        return {
            id: "gh-pages",
            url: ghContext.siteUrl || ghContext.originUrl
        };
    }
}
function resolveTarget1(_account, target) {
    return Promise.resolve(target);
}
async function publish1(_account, type, input, title, _slug, render, options, target) {
    input = Deno.statSync(input).isDirectory ? input : dirname2(input);
    const ghContext = await gitHubContext(options.input);
    const createGhPagesBranch = !ghContext.ghPages;
    if (createGhPagesBranch) {
        const confirmed = await Confirm.prompt({
            indent: "",
            message: `Publish site to ${ghContext.siteUrl || ghContext.originUrl} using gh-pages?`,
            default: true
        });
        if (!confirmed) {
            throw new Error();
        }
        const stash = !await gitDirIsClean(input);
        if (stash) {
            await gitStash(input);
        }
        const oldBranch = await gitCurrentBranch(input);
        try {
            await gitCreateGhPages(input);
        } finally{
            await gitCmds(input, [
                [
                    "checkout",
                    oldBranch
                ]
            ]);
            if (stash) {
                await gitStashApply(input);
            }
        }
    }
    await gitCmds(input, [
        [
            "remote",
            "set-branches",
            "--add",
            "origin",
            "gh-pages"
        ],
        [
            "fetch",
            "origin",
            "gh-pages"
        ], 
    ]);
    const renderResult = await renderForPublish(render, "gh-pages", type, title, target?.url);
    const tempDir = Deno.makeTempDirSync({
        dir: input
    });
    removeIfExists(tempDir);
    const deployId = shortUuid();
    await withWorktree(input, relative2(input, tempDir), async ()=>{
        await copy1(renderResult.baseDir, tempDir, {
            overwrite: true
        });
        Deno.writeTextFileSync(join3(tempDir, ".nojekyll"), deployId);
        await gitCmds(tempDir, [
            [
                "add",
                "-Af",
                "."
            ],
            [
                "commit",
                "--allow-empty",
                "-m",
                "Built site for gh-pages"
            ],
            [
                "remote",
                "-v"
            ],
            [
                "push",
                "--force",
                "origin",
                "HEAD:gh-pages"
            ], 
        ]);
    });
    info("");
    let notifyGhPagesBranch = false;
    let defaultSiteMatch;
    if (ghContext.siteUrl) {
        defaultSiteMatch = ghContext.siteUrl.match(/^https:\/\/(.+?)\.github\.io\/$/);
        if (defaultSiteMatch) {
            if (createGhPagesBranch) {
                notifyGhPagesBranch = true;
            } else {
                try {
                    const response = await fetch(ghContext.siteUrl);
                    if (response.status === 404) {
                        notifyGhPagesBranch = true;
                    }
                } catch  {}
            }
        }
    }
    if (!createGhPagesBranch && !notifyGhPagesBranch) {
        info(yellow1("NOTE: GitHub Pages sites use caching so you might need to click the refresh\n" + "button within your web browser to see changes after deployment.\n"));
    }
    let verified = false;
    if (options.browser && ghContext.siteUrl && !notifyGhPagesBranch) {
        await withSpinner({
            message: "Deploying gh-pages branch to website (this may take a few minutes)"
        }, async ()=>{
            const noJekyllUrl = joinUrl(ghContext.siteUrl, ".nojekyll");
            while(true){
                await sleep1(2000);
                const response = await fetch(noJekyllUrl);
                if (response.status === 200) {
                    if ((await response.text()).trim() === deployId) {
                        verified = true;
                        await sleep1(2000);
                        break;
                    }
                } else if (response.status !== 404) {
                    break;
                }
            }
        });
    }
    completeMessage(`Published to ${ghContext.siteUrl || ghContext.originUrl}`);
    info("");
    if (notifyGhPagesBranch) {
        info(yellow1("To complete publishing, change the source branch for this site to " + bold1("gh-pages") + ".\n\n" + `Set the source branch at: ` + underline1(`https://github.com/${defaultSiteMatch[1]}/${defaultSiteMatch[1]}.github.io/settings/pages`) + "\n"));
    } else if (!verified) {
        info(yellow1("NOTE: GitHub Pages deployments normally take a few minutes (your site updates\n" + "will be visible once the deploy completes)\n"));
    }
    return Promise.resolve([
        undefined,
        verified ? new URL(ghContext.siteUrl) : undefined, 
    ]);
}
function isUnauthorized1(_err) {
    return false;
}
function isNotFound1(_err) {
    return false;
}
async function gitStash(dir) {
    const result1 = await execProcess({
        cmd: [
            "git",
            "stash"
        ],
        cwd: dir
    });
    if (!result1.success) {
        throw new Error();
    }
}
async function gitStashApply(dir) {
    const result1 = await execProcess({
        cmd: [
            "git",
            "stash",
            "apply"
        ],
        cwd: dir
    });
    if (!result1.success) {
        throw new Error();
    }
}
async function gitDirIsClean(dir) {
    const result1 = await execProcess({
        cmd: [
            "git",
            "diff",
            "HEAD"
        ],
        cwd: dir,
        stdout: "piped"
    });
    if (result1.success) {
        return result1.stdout.trim().length === 0;
    } else {
        throw new Error();
    }
}
async function gitCurrentBranch(dir) {
    const result1 = await execProcess({
        cmd: [
            "git",
            "rev-parse",
            "--abbrev-ref",
            "HEAD"
        ],
        cwd: dir,
        stdout: "piped"
    });
    if (result1.success) {
        return result1.stdout.trim();
    } else {
        throw new Error();
    }
}
async function withWorktree(dir, siteDir, f) {
    await execProcess({
        cmd: [
            "git",
            "worktree",
            "add",
            "--track",
            "-B",
            "gh-pages",
            siteDir,
            "origin/gh-pages", 
        ],
        cwd: dir
    });
    try {
        await f();
    } finally{
        await execProcess({
            cmd: [
                "git",
                "worktree",
                "remove",
                siteDir
            ],
            cwd: dir
        });
    }
}
async function gitCreateGhPages(dir) {
    await gitCmds(dir, [
        [
            "checkout",
            "--orphan",
            "gh-pages"
        ],
        [
            "rm",
            "-rf",
            "--quiet",
            "."
        ],
        [
            "commit",
            "--allow-empty",
            "-m",
            `Initializing gh-pages branch`
        ],
        [
            "push",
            "origin",
            `HEAD:gh-pages`
        ], 
    ]);
}
async function gitCmds(dir, cmds) {
    for (const cmd of cmds){
        if (!(await execProcess({
            cmd: [
                "git",
                ...cmd
            ],
            cwd: dir
        })).success) {
            throw new Error();
        }
    }
}
const throwUnableToPublish = (reason)=>{
    throw new Error(`Unable to publish to GitHub Pages (${reason})`);
};
async function gitHubContext(input) {
    const dir = typeof input === "string" ? dirname2(input) : input.dir;
    const context = {
        git: false,
        repo: false
    };
    context.git = !!await which("git");
    if (context.git) {
        context.repo = (await execProcess({
            cmd: [
                "git",
                "rev-parse"
            ],
            cwd: dir,
            stdout: "piped",
            stderr: "piped"
        })).success;
        if (context.repo) {
            const result1 = await execProcess({
                cmd: [
                    "git",
                    "config",
                    "--get",
                    "remote.origin.url"
                ],
                cwd: dir,
                stdout: "piped",
                stderr: "piped"
            });
            if (result1.success) {
                context.originUrl = result1.stdout?.trim();
                context.ghPages = (await execProcess({
                    cmd: [
                        "git",
                        "ls-remote",
                        "--quiet",
                        "--exit-code",
                        "origin",
                        "gh-pages", 
                    ],
                    stdout: "piped",
                    stderr: "piped"
                })).success;
                context.siteUrl = siteUrl(dir, context.originUrl, typeof input !== "string" ? input : undefined);
            }
        }
    }
    return context;
}
function siteUrl(dir, originUrl, project) {
    const configSiteUrl = websiteBaseurl(project?.config);
    if (configSiteUrl) {
        return configSiteUrl;
    }
    const cname = join3(dir, "CNAME");
    if (existsSync(cname)) {
        const url = Deno.readTextFileSync(cname).trim();
        if (/^https?:/i.test(url)) {
            return url;
        } else {
            return `https://${url}`;
        }
    } else {
        const match = originUrl?.match(/^git@([^:]+):([^\/]+)\/(.+?)\.git$/) || originUrl?.match(/^https:\/\/([^\/]+)\/([^\/]+)\/(.+?)\.git$/);
        const kGithubCom = "github.com";
        const kGithubIo = "github.io";
        if (match && match.includes(kGithubCom)) {
            const server = match[1].replace(kGithubCom, kGithubIo);
            const domain = `${match[2]}.${server}`;
            if (domain === match[3]) {
                return `https://${domain}/`;
            } else {
                return `https://${domain}/${match[3]}/`;
            }
        }
    }
}
function accountTokens2() {
    const envTk = environmentAuthToken1();
    const accessTks = readAccessTokens(quartoPubProvider.name);
    const accounts = [];
    if (envTk) {
        accounts.push({
            type: AccountTokenType.Environment,
            name: kQuartoPubAuthTokenVar,
            server: null,
            token: envTk
        });
    }
    if (accessTks) {
        for (const accessTk of accessTks){
            accounts.push({
                type: AccountTokenType.Authorized,
                name: accessTk.email,
                server: null,
                token: accessTk.application_token
            });
        }
    }
    return Promise.resolve(accounts);
}
async function authorizeToken2(_options) {
    if (await authorizePrompt(quartoPubProvider)) {
        const token = await authorizeQuartoPubAccessToken();
        if (token) {
            return {
                type: AccountTokenType.Authorized,
                name: token.email,
                server: null,
                token: token.application_token
            };
        } else {
            return undefined;
        }
    }
}
function removeToken2(token) {
    writeAccessTokens(quartoPubProvider.name, readAccessTokens(quartoPubProvider.name)?.filter((accessToken)=>{
        return accessToken.email !== token.name;
    }) || []);
}
const dotenvConfig1 = await quartoConfig.dotenv();
const quartoPubEnvironment = dotenvConfig1["QUARTO_PUB_ENVIRONMENT"];
function environmentAuthToken1() {
    return Deno.env.get(kQuartoPubAuthTokenVar);
}
function authorizeQuartoPubAccessToken() {
    const client = new QuartoPubClient(quartoPubEnvironment);
    const provider = {
        name: kQuartoPub,
        createTicket: ()=>client.createTicket(dotenvConfig1["QUARTO_PUB_APP_CLIENT_ID"]),
        authorizationUrl: (ticket)=>ticket.authorization_url,
        checkTicket: (ticket)=>client.showTicket(ticket.id),
        exchangeTicket: (ticket)=>client.exchangeTicket(ticket.id),
        compareTokens: (a, b)=>a.account_identifier === b.account_identifier
    };
    return authorizeAccessToken(provider);
}
function resolveTarget2(_account, target) {
    return Promise.resolve(target);
}
function publish2(accountToken, type, _input, title, slug, render, _options, target) {
    const client = new QuartoPubClient(quartoPubEnvironment, accountToken.token);
    const handler = {
        name: kQuartoPub,
        slugAvailable: (slug)=>client.slugAvailable(slug),
        createSite: (type, title, slug)=>client.createSite(type, title, slug),
        createDeploy: (siteId, files, size)=>client.createDeploy(siteId, files, size),
        getDeploy: (deployId)=>client.getDeploy(deployId),
        uploadDeployFile: (deployId, path, fileBody)=>client.uploadDeployFile(deployId, path, fileBody),
        updateAccountSite: ()=>client.updateAccountSite()
    };
    return handlePublish(handler, type, title, slug, render, target);
}
function isUnauthorized2(err) {
    return err instanceof ApiError1 && err.status === 401;
}
function isNotFound2(err) {
    return err instanceof ApiError1 && err.status === 404;
}
function accountTokens3() {
    const accounts = [];
    const server = Deno.env.get(kRSConnectServerVar);
    const apiKey = Deno.env.get(kRSConnectAuthTokenVar);
    if (server && apiKey) {
        accounts.push({
            type: AccountTokenType.Environment,
            name: kRSConnectAuthTokenVar,
            server,
            token: apiKey
        });
    }
    const tokens = readAccessTokens(kRSConnect);
    if (tokens) {
        accounts.push(...tokens.map((token)=>({
                type: AccountTokenType.Authorized,
                name: token.username,
                server: token.server,
                token: token.key
            })));
    }
    return Promise.resolve(accounts);
}
function removeToken3(token) {
    writeAccessTokens(rsconnectProvider.name, readAccessTokens(rsconnectProvider.name)?.filter((accessToken)=>{
        return accessToken.server !== token.server && accessToken.username !== token.name;
    }) || []);
}
async function authorizeToken3(options, target) {
    let server = target?.url ? new URL(target.url).origin : options.server || undefined;
    if (server) {
        server = ensureProtocolAndTrailingSlash(server);
    }
    while(server === undefined){
        server = await Input.prompt({
            message: "Server URL:",
            hint: "e.g. https://connect.example.com/",
            validate: (value)=>{
                if (value.length === 0) {
                    throw new Error();
                }
                try {
                    const url = new URL(ensureProtocolAndTrailingSlash(value));
                    if (![
                        "http:",
                        "https:"
                    ].includes(url.protocol)) {
                        return `${value} is not an HTTP URL`;
                    } else {
                        return true;
                    }
                } catch  {
                    return `${value} is not a valid URL`;
                }
            },
            transform: ensureProtocolAndTrailingSlash
        });
        const client = new RSConnectClient(server);
        try {
            await client.getUser();
        } catch (err) {
            if (isUnauthorized3(err)) {
                break;
            } else {
                info(red1("   Unable to connect to server (is this a valid RStudio Connect Server?)"));
                server = undefined;
            }
        }
    }
    while(true){
        const apiKey = await Secret.prompt({
            message: "API Key:",
            hint: "Learn more at https://docs.rstudio.com/connect/user/api-keys/"
        });
        if (apiKey.length === 0) {
            throw new Error();
        }
        try {
            const client1 = new RSConnectClient(server, apiKey);
            const user = await client1.getUser();
            if (user.user_role !== "viewer") {
                const account = {
                    username: user.username,
                    server,
                    key: apiKey
                };
                writeAccessToken(kRSConnect, account, (a, b)=>a.server === b.server && a.username === b.username);
                return {
                    type: AccountTokenType.Authorized,
                    name: user.username,
                    server,
                    token: apiKey
                };
            } else {
                promptError("API key is for an RStudio Connect viewer rather than a publisher.");
            }
        } catch (err1) {
            if (isUnauthorized3(err1)) {
                promptError("API key is not authorized for this RStudio Connect server.");
            } else {
                throw err1;
            }
        }
    }
}
async function resolveTarget3(account, target) {
    const client = new RSConnectClient(account.server, account.token);
    const content = await client.getContent(target.id);
    return contentAsTarget(content);
}
async function publish3(account, type, _input, title, slug, render, _options, target) {
    const client = new RSConnectClient(account.server, account.token);
    let content;
    await withSpinner({
        message: `Preparing to publish ${type}`
    }, async ()=>{
        if (!target) {
            content = await createContent(client, title, slug);
            if (content) {
                target = contentAsTarget(content);
            } else {
                throw new Error();
            }
        } else {
            content = await client.getContent(target.id);
        }
    });
    info("");
    const publishFiles = await render();
    const tempContext = createTempContext();
    try {
        let task;
        await withSpinner({
            message: ()=>`Uploading files`
        }, async ()=>{
            const bundleTargz = await createBundle(type, publishFiles, tempContext);
            const bundleBytes = Deno.readFileSync(bundleTargz);
            const bundleBlob = new Blob([
                bundleBytes.buffer
            ]);
            const bundle = await client.uploadBundle(target.id, bundleBlob);
            task = await client.deployBundle(bundle);
        });
        await withSpinner({
            message: `Publishing ${type}`
        }, async ()=>{
            while(true){
                const status = await client.getTaskStatus(task);
                if (status.finished) {
                    if (status.code === 0) {
                        break;
                    } else {
                        throw new Error(`Error attempting to publish content: ${status.code} - ${status.error}`);
                    }
                }
            }
        });
        completeMessage(`Published: ${content.content_url}\n`);
        return Promise.resolve([
            target,
            new URL(content.dashboard_url)
        ]);
    } finally{
        tempContext.cleanup();
    }
}
function isUnauthorized3(err) {
    return err instanceof ApiError && err.status === 401;
}
function isConflict(err) {
    return err instanceof ApiError && err.status === 409;
}
function isNotFound3(err) {
    return err instanceof ApiError && err.status === 404;
}
function contentAsTarget(content) {
    return {
        id: content.guid,
        url: content.content_url,
        code: false
    };
}
async function createContent(client, title, slug) {
    while(true){
        const name = slug + "-" + randomHex(4);
        try {
            return await client.createContent(name, title);
        } catch (err) {
            if (!isConflict(err)) {
                throw err;
            }
        }
    }
}
function promptError(msg) {
    info(red1(`  ${msg}`));
}
async function reauthorizePrompt(provider) {
    const result1 = await prompt([
        {
            indent: "",
            name: "confirmed",
            message: "Re-authorize account",
            default: true,
            hint: `The authorization saved for ${provider.description} is no longer valid.\n` + `  Please be sure you are logged into the correct ${provider.description} account in your\n` + "  default web browser, then press Enter to re-authorize.",
            type: Confirm
        }
    ]);
    return !!result1.confirmed;
}
async function handleUnauthorized(provider, account) {
    if (account.type === AccountTokenType.Environment) {
        error(`Unable to authenticate with the provided ${account.name}. Please be sure this token is valid.`);
        return false;
    } else if (account.type === AccountTokenType.Authorized) {
        return await reauthorizePrompt(provider);
    }
}
function readPublishDeployments(source) {
    const [deployDir, deploySource] = resolveDeploymentSource(source);
    const deplomentsFile = publishDeploymentsFile(deployDir);
    if (deplomentsFile) {
        const deployments = readYaml(deplomentsFile);
        if (deployments) {
            if (isDeploymentsArray(deployments)) {
                const sourceDeployments = deployments.find((deployment)=>deployment.source === basename2(deploySource));
                if (sourceDeployments) {
                    delete sourceDeployments.source;
                    Object.values(sourceDeployments).forEach((deployment)=>{
                        if (Array.isArray(deployment)) {
                            deployment = deployment.map((d)=>{
                                d.code = !!d.code;
                                return d;
                            });
                        }
                    });
                    return {
                        dir: deployDir,
                        source: deploySource,
                        records: sourceDeployments
                    };
                }
            } else {
                warning("Unexpcted format for _publish.yml file (not reading publish history)");
            }
        }
    }
    return {
        dir: deployDir,
        source: deploySource,
        records: {}
    };
}
function writePublishDeployment(source, provider, account, publish) {
    publish = cloneDeep1(publish);
    if (publish.code === false) {
        delete publish.code;
    }
    let indent = 2;
    const [deployDir, deploySource] = resolveDeploymentSource(source);
    const deploymentsFile = publishDeploymentsFile(deployDir);
    if (deploymentsFile) {
        const deploymentsFileYaml = Deno.readTextFileSync(deploymentsFile);
        indent = detectIndentLevel(deploymentsFileYaml);
        const deployments = readYamlFromString(deploymentsFileYaml);
        if (isDeploymentsArray(deployments)) {
            const docDeploymentsIdx = deployments.findIndex((deployment)=>deployment.source === basename2(deploySource));
            if (docDeploymentsIdx !== -1) {
                const docDeployments = deployments[docDeploymentsIdx];
                if (docDeployments[provider]) {
                    const deploymentIdx = docDeployments[provider].findIndex((published)=>published.id === publish.id);
                    if (deploymentIdx !== -1) {
                        docDeployments[provider][deploymentIdx] = publish;
                    } else {
                        docDeployments[provider].push(publish);
                    }
                } else {
                    docDeployments[provider] = [
                        publish
                    ];
                }
            } else {
                const deployment = {
                    source: deploySource,
                    [provider]: [
                        publish
                    ]
                };
                deployments.push(deployment);
            }
            Deno.writeTextFileSync(deploymentsFile, stringifyPublishConfig(deployments, indent));
        } else {
            warning("Unexpcted format for _publish.yml file (not writing to publish history)");
        }
    } else {
        Deno.writeTextFileSync(join3(deployDir, kDefaultPublishDeploymentsFile), stringifyPublishConfig([
            {
                source: deploySource,
                [provider]: [
                    publish
                ]
            }
        ], indent));
    }
    writePublishRecord(source, provider, account, publish);
}
function resolveDeploymentSource(source) {
    const deployDir = Deno.statSync(source).isDirectory ? source : dirname2(source);
    const deploySource = Deno.statSync(source).isDirectory ? "project" : basename2(source);
    return [
        deployDir,
        deploySource
    ];
}
function readProjectPublishDeployments(project) {
    return readPublishDeployments(project.dir);
}
function writeProjectPublishDeployment(project, provider, account, publish) {
    writePublishDeployment(project.dir, provider, account, publish);
}
function isDeploymentsArray(obj) {
    return Array.isArray(obj) && typeof obj[0].source === "string";
}
function stringifyPublishConfig(config, indent) {
    return stringify(config, {
        indent,
        lineWidth: -1,
        sortKeys: false,
        skipInvalid: true
    });
}
function detectIndentLevel(yaml) {
    const spaceMatch = yaml.match(/\n(\s+)/);
    return spaceMatch ? spaceMatch[1].length : 2;
}
const kDefaultPublishDeploymentsFile = "_publish.yml";
function publishDeploymentsFile(dir) {
    return [
        kDefaultPublishDeploymentsFile,
        "_publish.yaml"
    ].map((file)=>join3(dir, file)).find(existsSync);
}
async function resolveDeployment(options, providerFilter) {
    const deployments = await publishDeployments(options, providerFilter);
    if (deployments && deployments.length > 0) {
        const siteId = options.id;
        if (siteId) {
            const deployment = deployments.find((deployment)=>{
                return deployment.target.id === siteId;
            });
            if (deployment) {
                if (options.prompt) {
                    const confirmed = await Confirm.prompt({
                        indent: "",
                        message: `Update site at ${deployment.target.url}?`,
                        default: true
                    });
                    if (!confirmed) {
                        throw new Error();
                    }
                }
                return deployment;
            } else {
                throw new Error(`No previous publish with site-id ${siteId} was found`);
            }
        } else if (options.prompt) {
            const confirmPrompt = async (hint)=>{
                return await Confirm.prompt({
                    indent: "",
                    message: `Update site at ${deployments[0].target.url}?`,
                    default: true,
                    hint
                });
            };
            if (deployments.length === 1 && deployments[0].provider.publishRecord && providerFilter === deployments[0].provider.name) {
                const confirmed1 = await confirmPrompt();
                if (confirmed1) {
                    return deployments[0];
                } else {
                    throw new Error();
                }
            } else if (haveArrowKeys()) {
                return await chooseDeployment(deployments);
            } else if (deployments.length === 1) {
                const confirmed2 = await confirmPrompt("Type 'n' to add a new destination");
                if (confirmed2) {
                    return deployments[0];
                } else {
                    return undefined;
                }
            } else {
                throw new Error(`Multiple previous publishes exist (specify one to republish with --id)`);
            }
        } else if (deployments.length === 1) {
            return deployments[0];
        } else {
            throw new Error(`Multiple previous publishes exist (specify one with --id when using --no-prompt)`);
        }
    } else if (!options.prompt) {
        if (!options.prompt) {
            throw new Error(`No _publish.yml file available (_publish.yml specifying a destination required for non-interactive publish)`);
        }
    }
}
async function publishDeployments(options, providerFilter) {
    const deployments = [];
    for (const provider of (await publishProviders())){
        if ((!providerFilter || providerFilter === provider.name) && provider.publishRecord) {
            const record = await provider.publishRecord(options.input);
            if (record) {
                deployments.push({
                    provider,
                    target: record
                });
            }
        }
    }
    const config = typeof options.input === "string" ? readPublishDeployments(options.input) : readProjectPublishDeployments(options.input);
    for (const providerName of Object.keys(config.records)){
        if (providerFilter && providerName !== providerFilter) {
            continue;
        }
        const provider1 = findProvider(providerName);
        if (provider1) {
            for (const record1 of config.records[providerName]){
                let account;
                const publishedToAccounts = await readAccountsPublishedTo(options.input, provider1, record1);
                if (publishedToAccounts.length === 1) {
                    account = publishedToAccounts[0];
                }
                if (account) {
                    const target = await resolveDeploymentTarget(provider1, account, record1);
                    if (target) {
                        deployments.push({
                            provider: provider1,
                            target,
                            account
                        });
                    }
                } else {
                    deployments.push({
                        provider: provider1,
                        target: record1
                    });
                }
            }
        } else {
            warning(`Unkonwn provider ${providerName}`);
        }
    }
    return deployments;
}
async function chooseDeployment(depoyments) {
    depoyments = depoyments.filter((deployment)=>!!deployment.target.url);
    const originCounts = depoyments.reduce((origins, deployment)=>{
        try {
            const originUrl = new URL(deployment.target.url).origin;
            const count = origins.get(originUrl) || 0;
            origins.set(originUrl, count + 1);
        } catch  {}
        return origins;
    }, new Map());
    const kOther = "other";
    const options = depoyments.map((deployment)=>{
        let url = deployment.target.url;
        try {
            const targetOrigin = new URL(deployment.target.url).origin;
            if (originCounts.get(targetOrigin) === 1 && deployment.provider.listOriginOnly) {
                url = targetOrigin;
            }
        } catch  {}
        return {
            name: `${url} (${deployment.provider.description}${deployment.account ? " - " + deployment.account.name : ""})`,
            value: publishRecordIdentifier(deployment.target, deployment.account)
        };
    });
    options.push({
        name: "Add a new destination...",
        value: kOther
    });
    const confirm = await Select.prompt({
        indent: "",
        message: "Publish update to:",
        options
    });
    if (confirm !== kOther) {
        return depoyments.find((deployment)=>publishRecordIdentifier(deployment.target, deployment.account) === confirm);
    } else {
        return undefined;
    }
}
async function resolveDeploymentTarget(provider, account, record) {
    try {
        return await provider.resolveTarget(account, record);
    } catch (err) {
        if (provider.isNotFound(err)) {
            warning(`${record.url} not found (you may need to remove it from the publish configuration)`);
            return undefined;
        } else if (!provider.isUnauthorized(err)) {
            throw err;
        }
    }
    return record;
}
async function resolveAccount(provider, prompt, options, hintAccount, target) {
    if (options.token) {
        if (provider.requiresServer && !options.server) {
            throw new Error(`You must provide the --server argument along with --token for ${provider.description}`);
        }
        return {
            type: AccountTokenType.Authorized,
            name: provider.name,
            server: options.server ? options.server : null,
            token: options.token
        };
    }
    let token;
    let accounts = (await provider.accountTokens()).filter((account)=>{
        if (account.server && target?.url) {
            return target.url.startsWith(account.server);
        } else {
            return true;
        }
    });
    if (prompt === "never") {
        return accounts.length === 1 ? accounts[0] : undefined;
    } else if (prompt === "multiple" && accounts.length === 1) {
        return accounts[0];
    } else if (accounts.length === 1 && accounts[0].type === AccountTokenType.Anonymous) {
        return accounts[0];
    } else {
        if (accounts.length > 0) {
            if (hintAccount) {
                const hintIdx = accounts.findIndex((account)=>account.token === hintAccount.token);
                if (hintIdx !== -1) {
                    const newAccounts = [
                        accounts[hintIdx]
                    ];
                    if (hintIdx > 0) {
                        newAccounts.push(...accounts.slice(0, hintIdx));
                    }
                    if (hintIdx < accounts.length - 1) {
                        newAccounts.push(...accounts.slice(hintIdx + 1));
                    }
                    accounts = newAccounts;
                }
            }
            token = await accountPrompt(provider, accounts);
        }
        if (!token) {
            token = await provider.authorizeToken(options, target);
        }
        return token;
    }
}
async function accountPrompt(_provider, accounts) {
    if (haveArrowKeys()) {
        const options = accounts.filter((account)=>account.type !== AccountTokenType.Anonymous).map((account)=>({
                name: accountTokenText(account),
                value: account.token
            }));
        const kAuthorize = "authorize";
        options.push({
            name: "Use another account...",
            value: kAuthorize
        });
        const result1 = await prompt([
            {
                indent: "",
                name: "token",
                message: `Publish with account:`,
                options,
                type: Select
            }
        ]);
        if (result1.token !== kAuthorize) {
            return accounts.find((account)=>account.token === result1.token);
        }
    } else {
        const result11 = await Confirm.prompt({
            indent: "",
            message: "Publish with account " + accountTokenText(accounts[0]),
            default: true,
            hint: "Press Enter to publish (or type 'n' to use another account)"
        });
        if (result11) {
            return accounts[0];
        }
    }
}
async function manageAccounts() {
    const accounts = [];
    for (const provider of (await publishProviders())){
        for (const account of (await provider.accountTokens())){
            if (account.type === AccountTokenType.Authorized) {
                accounts.push({
                    provider: provider.name,
                    ...account
                });
            }
        }
    }
    if (accounts.length === 0) {
        info("No publishing accounts currently authorized.");
        throw new Error();
    }
    const keepAccounts = await Checkbox.prompt({
        message: "Manage Publishing Accounts",
        options: accounts.map((account)=>({
                name: `${findProvider(account.provider)?.description}: ${account.name}${account.server ? " (" + account.server + ")" : ""}`,
                value: JSON.stringify(account),
                checked: true
            })),
        hint: `Use the ${haveArrowKeys() ? "arrow" : "'u' and 'd'"} keys and spacebar to specify accounts you would like to remove.\n` + `   Press Enter to confirm the list of accounts you wish to remain available.`
    });
    const removeAccounts = [];
    for (const account1 of accounts){
        if (!keepAccounts.find((keepAccountJson)=>{
            const keepAccount = JSON.parse(keepAccountJson);
            return account1.provider == keepAccount.provider && account1.name == keepAccount.name && account1.server == keepAccount.server;
        })) {
            info(`Removing ${findProvider(account1.provider)?.description} account ${account1.name}`);
            removeAccounts.push(account1);
        }
    }
    for (const account2 of removeAccounts){
        const provider1 = findProvider(account2.provider);
        provider1?.removeToken(account2);
    }
}
const kSiteContent = "site";
const kDocumentContent = "document";
async function publishSite(project, provider, account, options, target) {
    const renderForPublish = async (siteUrl)=>{
        if (options.render) {
            renderProgress("Rendering for publish:\n");
            const services = renderServices();
            try {
                const result1 = await render(project.dir, {
                    services,
                    flags: {
                        siteUrl
                    },
                    setProjectDir: true
                });
                if (result1.error) {
                    throw result1.error;
                }
            } finally{
                services.cleanup();
            }
        }
        const outputDir = projectOutputDir(project);
        const files = [];
        for (const walk of walkSync(outputDir)){
            if (walk.isFile) {
                files.push(relative2(outputDir, walk.path));
            }
        }
        return normalizePublishFiles({
            baseDir: outputDir,
            rootFile: "index.html",
            files
        });
    };
    const siteTitle = websiteTitle(project.config) || basename2(project.dir);
    const siteSlug = gfmAutoIdentifier(siteTitle, false);
    const [publishRecord, siteUrl] = await provider.publish(account, kSiteContent, project.dir, siteTitle, siteSlug, renderForPublish, options, target);
    if (publishRecord) {
        if (options.id === undefined) {
            writeProjectPublishDeployment(project, provider.name, account, publishRecord);
        }
    }
    return siteUrl;
}
async function publishDocument(document1, provider, account, options, target) {
    let title = basename2(document1, extname2(document1));
    const fileConfig = await inspectConfig(document1);
    if (isDocumentConfig(fileConfig)) {
        title = Object.values(fileConfig.formats)[0].metadata[kTitle] || title;
    }
    const renderForPublish = async ()=>{
        const files = [];
        if (options.render) {
            renderProgress("Rendering for publish:\n");
            const services = renderServices();
            try {
                const result1 = await render(document1, {
                    services
                });
                if (result1.error) {
                    throw result1.error;
                }
                const baseDir = result1.baseDir || dirname2(document1);
                const asRelative = (file)=>{
                    if (isAbsolute2(file)) {
                        return relative2(baseDir, file);
                    } else {
                        return file;
                    }
                };
                let rootFile;
                for (const resultFile of result1.files){
                    const file = asRelative(resultFile.file);
                    if (!rootFile) {
                        rootFile = file;
                    }
                    files.push(file);
                    if (resultFile.supporting) {
                        files.push(...resultFile.supporting.map((sf)=>Deno.realPathSync(sf)).map(asRelative));
                    }
                    files.push(...resultFile.resourceFiles.map(asRelative));
                }
                return normalizePublishFiles({
                    baseDir,
                    rootFile: rootFile,
                    files
                });
            } finally{
                services.cleanup();
            }
        } else {
            const baseDir1 = dirname2(document1);
            if (isDocumentConfig(fileConfig)) {
                let rootFile1;
                for (const format of Object.values(fileConfig.formats)){
                    title = format.metadata[kTitle] || title;
                    const outputFile = format.pandoc[kOutputFile];
                    if (outputFile && existsSync(join3(baseDir1, outputFile))) {
                        files.push(outputFile);
                        if (!rootFile1) {
                            rootFile1 = outputFile;
                        }
                    } else {
                        throw new Error(`Output file ${outputFile} does not exist.`);
                    }
                }
                const filesDir = inputFilesDir(document1);
                if (existsSync(filesDir)) {
                    files.push(filesDir);
                }
                files.push(...fileConfig.resources);
                return normalizePublishFiles({
                    baseDir: baseDir1,
                    rootFile: rootFile1,
                    files
                });
            } else {
                throw new Error(`The specifed document (${document1}) is not a valid quarto input file`);
            }
        }
    };
    const [publishRecord, siteUrl] = await provider.publish(account, kDocumentContent, document1, title, gfmAutoIdentifier(title, false), renderForPublish, options, target);
    if (publishRecord) {
        if (options.id === undefined) {
            writePublishDeployment(document1, provider.name, account, publishRecord);
        }
    }
    return siteUrl;
}
function normalizePublishFiles(publishFiles) {
    publishFiles.files = publishFiles.files.reduce((files, file)=>{
        const filePath = join3(publishFiles.baseDir, file);
        if (Deno.statSync(filePath).isDirectory) {
            for (const walk of walkSync(filePath)){
                if (walk.isFile) {
                    files.push(relative2(publishFiles.baseDir, walk.path));
                }
            }
        } else {
            files.push(file);
        }
        return files;
    }, new Array());
    publishFiles.files = uniq1(publishFiles.files);
    return publishFiles;
}
const publishCommand = new Command().name("publish").description("Publish a document or project. Available providers include:\n\n" + " - Quarto Pub (quarto-pub)\n" + " - GitHub Pages (gh-pages)\n" + " - RStudio Connect (connect)\n" + " - Netlify (netlify)\n\n" + "Accounts are configured interactively during publishing.\n" + "Manage/remove accounts with: quarto publish accounts").arguments("[provider] [path]").option("--id <id:string>", "Identifier of content to publish").option("--server <server:string>", "Server to publish to").option("--token <token:string>", "Access token for publising provider").option("--no-render", "Do not render before publishing.").option("--no-prompt", "Do not prompt to confirm publishing destination").option("--no-browser", "Do not open a browser to the site after publishing").example("Publish project (prompt for provider)", "quarto publish").example("Publish document (prompt for provider)", "quarto publish document.qmd").example("Publish project to Netlify", "quarto publish netlify").example("Publish with explicit target", "quarto publish netlify --id DA36416-F950-4647-815C-01A24233E294").example("Publish project to GitHub Pages", "quarto publish gh-pages").example("Publish project to RStudio Connect", "quarto publish connect").example("Publish with explicit credentials", "quarto publish connect --server example.com --token 01A24233E294").example("Publish without confirmation prompt", "quarto publish --no-prompt").example("Publish without rendering", "quarto publish --no-render").example("Publish without opening browser", "quarto publish --no-browser").example("Manage/remove publishing accounts", "quarto publish accounts").action(async (options, provider, path)=>{
    if (provider && !path && existsSync(provider)) {
        path = provider;
        provider = undefined;
    }
    if (provider === "accounts") {
        await manageAccounts();
    } else {
        let providerInterface;
        if (provider) {
            providerInterface = findProvider(provider);
            if (!providerInterface) {
                throw new Error(`Publishing source '${provider}' not found`);
            }
        }
        await publishAction(options, providerInterface, path);
    }
});
async function publishAction(options, provider, path) {
    await initYamlIntelligence1();
    const publishOptions = await createPublishOptions(options, path);
    const doPublish = async (publishProvider, accountPrompt, publishTarget, account)=>{
        account = account && !publishOptions.prompt ? account : await resolveAccount(publishProvider, publishOptions.prompt ? accountPrompt : "never", publishOptions, account, publishTarget);
        if (account) {
            await publish4(publishProvider, account, publishOptions, publishTarget);
        }
    };
    const deployment = provider && publishOptions.id ? {
        provider,
        target: {
            id: publishOptions.id
        }
    } : await resolveDeployment(publishOptions, provider?.name);
    provider = deployment?.provider || provider;
    if (deployment) {
        await doPublish(deployment.provider, deployment.account ? "multiple" : "always", deployment.target, deployment.account);
    } else if (publishOptions.prompt) {
        const providers = await publishProviders();
        if (!provider) {
            if (haveArrowKeys()) {
                const result1 = await prompt([
                    {
                        indent: "",
                        name: "provider",
                        message: "Provider:",
                        options: providers.map((provider)=>({
                                name: provider.description,
                                value: provider.name
                            })),
                        type: Select
                    }
                ]);
                if (result1.provider) {
                    provider = findProvider(result1.provider);
                }
            } else {
                throw new Error("You must specify a provider to publish to. For example:\n\n" + providers.map((provider)=>`quarto publish ${provider.name}`).join("\n") + "\n");
            }
        }
        if (provider) {
            await doPublish(provider, "always");
        }
    } else {
        throw new Error("No re-publishing target found (--no-prompt requires an existing 'publish' config to update)");
    }
}
async function publish4(provider, account, options, target) {
    try {
        const siteUrl = typeof options.input !== "string" ? await publishSite(options.input, provider, account, options, target) : await publishDocument(options.input, provider, account, options, target);
        if (siteUrl && options.browser) {
            await openUrl(siteUrl.toString());
        }
    } catch (err) {
        if (provider.isUnauthorized(err) && options.prompt) {
            if (await handleUnauthorized(provider, account)) {
                const authorizedAccount = await provider.authorizeToken(options, target);
                if (authorizedAccount) {
                    return await publish4(provider, authorizedAccount, options, target);
                }
            }
        } else {
            throw err;
        }
    }
}
async function createPublishOptions(options, path) {
    path = path || Deno.cwd();
    if (!existsSync(path)) {
        throw new Error(`The specified path (${path}) does not exist so cannot be published.`);
    }
    let input;
    const project = await projectContext(path);
    if (Deno.statSync(path).isDirectory) {
        if (project) {
            if (projectIsWebsite(project)) {
                input = project;
            } else if (project.files.input.length === 1) {
                input = project.files.input[0];
            }
        } else {
            const inputFiles = projectInputFiles(path);
            if (inputFiles.files.length === 1) {
                input = inputFiles.files[0];
            }
        }
        if (!input) {
            throw new Error(`The specified path (${path}) is not a website or book project so cannot be published.`);
        }
    } else {
        if (project && projectIsWebsite(project)) {
            throw new Error(`The specified path (${path}) is within a website or book project so cannot be published individually`);
        }
        input = path;
    }
    const interactive = isInteractiveTerminal() && !runningInCI() && !options.id;
    return {
        input,
        server: options.server || null,
        token: options.token,
        id: options.id,
        render: !!options.render,
        prompt: !!options.prompt && interactive,
        browser: !!options.browser && interactive && !isServerSession()
    };
}
async function initYamlIntelligence1() {
    setInitializer(initYamlIntelligenceResourcesFromFilesystem);
    await initState();
}
const listCommand = new Command().hidden().name("list").arguments("<type:string>").description("Lists an extension or global dependency.").example("List installed extensions", "quarto list extensions").example("List global tools", "quarto list tools").action(async (_options, type)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    const temp = createTempContext();
    const extensionContext = createExtensionContext();
    try {
        if (type.toLowerCase() === "extensions") {
            await outputExtensions(Deno.cwd(), extensionContext);
        } else if (type.toLowerCase() === "tools") {
            await outputTools();
        } else {
            info(`Unrecognized option '${type}' - please choose 'tools' or 'extensions'.`);
        }
    } finally{
        temp.cleanup();
    }
});
async function outputExtensions(path, extensionContext) {
    const project = await projectContext(path);
    const extensions = await extensionContext.extensions(path, project?.config, project?.dir, {
        builtIn: false
    });
    if (extensions.length === 0) {
        info(`No extensions are installed in this ${project ? "project" : "directory"}.`);
    } else {
        const extensionEntries = [];
        const provides = (extension)=>{
            const contribs = [];
            if (extension.contributes.filters && extension.contributes.filters?.length > 0) {
                contribs.push("filters");
            }
            if (extension.contributes.shortcodes && extension.contributes.shortcodes?.length > 0) {
                contribs.push("shortcodes");
            }
            if (extension.contributes.formats && Object.keys(extension.contributes.formats).length > 0) {
                contribs.push("formats");
            }
            return contribs.join(", ");
        };
        extensions.forEach((ext)=>{
            const row = [
                extensionIdString(ext.id),
                ext.version?.toString() || "(none)",
                `${provides(ext)}`, 
            ];
            extensionEntries.push(row);
        });
        const table = new Table().header([
            "Id",
            "Version",
            "Contributes"
        ]).body(extensionEntries).padding(4);
        info(table.toString());
    }
}
const kQuartoIgnore1 = ".quartoignore";
function templateFiles(dir) {
    const excludes = [];
    const ignoreFile = join3(dir, kQuartoIgnore1);
    if (existsSync(ignoreFile)) {
        const ignoreFileContents = Deno.readTextFileSync(ignoreFile);
        const ignoreLines = lines(ignoreFileContents.trim());
        ignoreLines.forEach((line)=>{
            const splitOnComment = line.split("#");
            const exclude = splitOnComment[0];
            if (exclude) {
                excludes.push(exclude);
            }
        });
    }
    excludes.push(...kBuiltInExcludes);
    const resolved = resolvePathGlobs(dir, [
        "**/*"
    ], excludes);
    return resolved.include;
}
const kBuiltInExcludes = [
    ".*",
    "COPYING.md",
    "COPYRIGHT",
    "README.md",
    "CHANGELOG.md",
    "COPYRIGHT",
    "LICENSE",
    "_extensions", 
];
const kRootTemplateName = "template.qmd";
const useTemplateCommand = new Command().name("template").arguments("<target:string>").description("Use a Quarto template for this directory or project.").option("--no-prompt", "Do not prompt to confirm actions").example("Use a template from Github", "quarto use template <gh-org>/<gh-repo>").action(async (options, target)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    const temp = createTempContext();
    try {
        await useTemplate(options, target, temp);
    } finally{
        temp.cleanup();
    }
});
async function useTemplate(options, target, tempContext) {
    const source = await extensionSource(target);
    if (!source) {
        info(`Extension not found in local or remote sources`);
        return;
    }
    const trusted = await isTrusted1(source, options.prompt !== false);
    if (trusted) {
        const outputDirectory = await determineDirectory(options.prompt !== false);
        const stagedDir = await stageTemplate1(source, tempContext);
        const filesToCopy = templateFiles(stagedDir);
        await withSpinner({
            message: "Copying files..."
        }, async ()=>{
            const extDir = join3(stagedDir, kExtensionDir);
            if (existsSync(extDir)) {
                await copyExtensions(source, extDir, outputDirectory);
            }
            for (const fileToCopy of filesToCopy){
                const isDir = Deno.statSync(fileToCopy).isDirectory;
                const rel = relative2(stagedDir, fileToCopy);
                if (!isDir) {
                    const target = join3(outputDirectory, rel);
                    const targetDir = dirname2(target);
                    await ensureDir(targetDir);
                    await Deno.copyFile(fileToCopy, target);
                    if (rel === kRootTemplateName) {
                        const renamedFile = `${basename2(targetDir)}.qmd`;
                        Deno.renameSync(target, join3(outputDirectory, renamedFile));
                    }
                }
            }
        });
        const dirContents = Deno.readDirSync(outputDirectory);
        info(`\nFiles created:`);
        for (const fileOrDir of dirContents){
            info(` - ${fileOrDir.name}`);
        }
    } else {
        return Promise.resolve();
    }
}
async function stageTemplate1(source, tempContext) {
    if (source.type === "remote") {
        const workingDir = tempContext.createDir();
        const archiveDir = join3(workingDir, "archive");
        ensureDirSync(archiveDir);
        const filename = (typeof source.resolvedTarget === "string" ? source.resolvedTarget : source.resolvedTarget.url).split("/").pop() || "extension.zip";
        const toFile = join3(archiveDir, filename);
        await downloadWithProgress(source.resolvedTarget, `Downloading`, toFile);
        await unzipInPlace(toFile);
        if (source.targetSubdir) {
            return join3(archiveDir, source.targetSubdir);
        } else {
            return archiveDir;
        }
    } else {
        if (typeof source.resolvedTarget !== "string") {
            throw new Error("Internal error: local resolved extension should always have a string target.");
        }
        if (Deno.statSync(source.resolvedTarget).isDirectory) {
            return source.resolvedTarget;
        } else {
            const workingDir1 = tempContext.createDir();
            const targetFile = join3(workingDir1, basename2(source.resolvedTarget));
            Deno.copyFileSync(source.resolvedTarget, targetFile);
            await unzipInPlace(targetFile);
            return workingDir1;
        }
    }
}
async function isTrusted1(source, allowPrompt) {
    if (allowPrompt && source.type === "remote") {
        const preamble = `\nQuarto templates may execute code when documents are rendered. If you do not \ntrust the authors of the template, we recommend that you do not install or \nuse the template.`;
        info(preamble);
        const question = "Do you trust the authors of this template";
        const confirmed = await Confirm.prompt({
            message: question,
            default: true
        });
        return confirmed;
    } else {
        return true;
    }
}
async function determineDirectory(allowPrompt) {
    const currentDir = Deno.cwd();
    if (directoryEmpty(currentDir)) {
        if (!allowPrompt) {
            return currentDir;
        } else {
            const useCurrentDir = await confirmCurrentDir();
            if (useCurrentDir) {
                return currentDir;
            } else {
                return promptForDirectory(currentDir);
            }
        }
    } else {
        if (allowPrompt) {
            return promptForDirectory(currentDir);
        } else {
            throw new Error(`Attempted to use a template with '--no-prompt' in a non-empty directory ${currentDir}.`);
        }
    }
}
async function promptForDirectory(root) {
    const dirName = await Input.prompt({
        message: "Directory name:",
        validate: (input)=>{
            if (input.length === 0) {
                return true;
            }
            const dir = join3(root, input);
            if (!existsSync(dir)) {
                ensureDirSync(dir);
            }
            if (directoryEmpty(dir)) {
                return true;
            } else {
                return `The directory '${input}' is not empty. Please provide the name of a new or empty directory.`;
            }
        }
    });
    if (dirName.length === 0) {
        throw new Error();
    }
    return join3(root, dirName);
}
async function confirmCurrentDir() {
    const message = "Create a subdirectory for template?";
    const useCurrentDir = await Confirm.prompt(message);
    return !useCurrentDir;
}
async function unzipInPlace(zipFile) {
    await withSpinner({
        message: "Unzipping"
    }, async ()=>{
        const result1 = await unzip(zipFile);
        if (!result1.success) {
            throw new Error("Failed to unzip template.\n" + result1.stderr);
        }
        await Deno.remove(zipFile);
        return Promise.resolve();
    });
}
function directoryEmpty(path) {
    const dirContents = Deno.readDirSync(path);
    for (const _content of dirContents){
        return false;
    }
    return true;
}
const useCommand = new Command().hidden().name("use").arguments("<type:string> [target:string]").option("--no-prompt", "Do not prompt to confirm actions").description("Automate document or project setup tasks.").action((_options, type, _target)=>{
    if (type !== useTemplateCommand.getName()) {
        throw new ValidationError1(`Unknown type '${type}'- did you mean 'template'?`);
    }
}).command(useTemplateCommand.getName(), useTemplateCommand);
const addCommand1 = new Command().name("add").arguments("<extension:string>").option("--no-prompt", "Do not prompt to confirm actions").option("--embed <extensionId>", "Embed this extension within another extension (used when authoring extensions).").description("Add an extension to this folder or project").example("Install extension (Github)", "quarto install extension <gh-org>/<gh-repo>").example("Install extension (file)", "quarto install extension <path-to-zip>").example("Install extension (url)", "quarto install extension <url>").action(async (options, extension)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    const temp = createTempContext();
    try {
        if (extension) {
            await installExtension(extension, temp, options.prompt !== false, options.embed);
        } else {
            info("Please provide an extension name, url, or path.");
        }
    } finally{
        temp.cleanup();
    }
});
const uninstallCommand = new Command().hidden().name("uninstall").arguments("[tool]").option("--no-prompt", "Do not prompt to confirm actions").option("--update-path", "Update system path when a tool is installed").description("Removes an extension.").example("Remove extension using name", "quarto remove <extension-name>").action(async (options, tool)=>{
    await initYamlIntelligenceResourcesFromFilesystem();
    if (tool) {
        await removeTool(tool, options.prompt, options.updatePath);
    } else {
        const allTools = await loadTools();
        if (allTools.filter((tool)=>tool.installed).length === 0) {
            info("No tools are installed.");
        } else {
            const toolTarget = await selectTool(allTools, "remove");
            if (toolTarget) {
                info("");
                await removeTool(toolTarget);
            }
        }
    }
});
const keyRegExp = /(.*)qstart-(.*)-qend(.*)/;
function renderAndCopyArtifacts(target, artifactSrcDir, createDirective, data, quiet) {
    ensureDirSync(target);
    const copiedFiles = [];
    for (const artifact of walkSync(artifactSrcDir)){
        if (artifact.isFile) {
            keyRegExp.lastIndex = 0;
            let match = keyRegExp.exec(artifact.path);
            let resolvedPath = artifact.path;
            while(match){
                const prefix = match[1];
                const key = match[2];
                const suffix = match[3];
                if (data[key]) {
                    resolvedPath = `${prefix}${data[key]}${suffix}`;
                } else {
                    resolvedPath = `${prefix}${key}${suffix}`;
                }
                match = keyRegExp.exec(resolvedPath);
            }
            keyRegExp.lastIndex = 0;
            const targetRelativePath = relative2(artifactSrcDir, resolvedPath);
            const targetAbsolutePath = join3(createDirective.directory, targetRelativePath);
            copiedFiles.push(renderArtifact(artifact.path, targetAbsolutePath, data));
        }
    }
    if (!quiet) {
        info(`Creating ${createDirective.displayType} at `, {
            newline: false
        });
        info(`${createDirective.directory}`, {
            bold: true,
            newline: false
        });
        info(":");
        for (const copiedFile of copiedFiles){
            const relPath = relative2(createDirective.directory, copiedFile);
            info(`  - Created ${relPath}`);
        }
    }
    return copiedFiles;
}
const renderArtifact = (src, target, data)=>{
    const srcFileName = basename2(src);
    if (srcFileName.includes(".ejs.")) {
        const renderTarget = target.replace(/\.ejs\./, ".");
        if (safeExistsSync(renderTarget)) {
            throw new Error(`The file ${renderTarget} already exists.`);
        }
        const rendered = renderEjs(src, data, false);
        ensureDirSync(dirname2(renderTarget));
        Deno.writeTextFileSync(renderTarget, rendered);
        return renderTarget;
    } else {
        if (safeExistsSync(target)) {
            throw new Error(`The file ${target} already exists.`);
        }
        ensureDirSync(dirname2(target));
        Deno.copyFileSync(src, target);
        return target;
    }
};
async function ejsData(createDirective) {
    const title = capitalizeTitle(createDirective.name);
    const classname = title.replaceAll(/[^\w]/gm, "");
    const filesafename = gfmAutoIdentifier(createDirective.name, true);
    const version = "1.0.0";
    const author = await gitAuthor() || "First Last";
    const qVer = coerce(quartoConfig.version());
    const quartoversion = `${qVer?.major}.${qVer?.minor}.0`;
    return {
        name: createDirective.name,
        filesafename,
        title,
        classname,
        author: author.trim(),
        version,
        quartoversion
    };
}
async function gitAuthor() {
    const result1 = await execProcess({
        cmd: [
            "git",
            "config",
            "--global",
            "user.name"
        ],
        stdout: "piped",
        stderr: "piped"
    });
    if (result1.success) {
        return result1.stdout;
    } else {
        return undefined;
    }
}
const kType3 = "type";
const kSubType = "subtype";
const kName1 = "name";
const kTypeExtension = "extension";
const kExtensionTypes = [
    {
        name: "shortcode",
        value: "shortcode",
        openfiles: [
            "example.qmd"
        ]
    },
    {
        name: "filter",
        value: "filter",
        openfiles: [
            "example.qmd"
        ]
    },
    {
        name: "revealjs plugin",
        value: "revealjs-plugin",
        openfiles: [
            "example.qmd"
        ]
    },
    {
        name: "journal format",
        value: "journal",
        openfiles: [
            "template.qmd"
        ]
    },
    {
        name: "custom format",
        value: "format",
        openfiles: [
            "template.qmd"
        ]
    }, 
];
const kExtensionSubtypes = {
    "format": [
        "html",
        "pdf",
        "docx",
        "revealjs"
    ]
};
const kExtensionValues = kExtensionTypes.filter((t)=>typeof t === "object").map((t)=>t.value);
const extensionArtifactCreator = {
    displayName: "Extension",
    type: kTypeExtension,
    resolveOptions,
    finalizeOptions,
    nextPrompt,
    createArtifact
};
function resolveOptions(args) {
    const typeRaw = args.length > 0 ? args[0] : undefined;
    const nameRaw = args.length > 1 ? args[1] : undefined;
    const options = {};
    if (typeRaw) {
        const [type, template] = typeRaw.split(":");
        options[kType3] = type;
        options[kSubType] = template;
    }
    if (nameRaw) {
        options[kName1] = nameRaw;
    }
    return options;
}
function finalizeOptions(createOptions) {
    if (!createOptions.options.name) {
        throw new Error("Required property 'name' is missing.");
    }
    const type = createOptions.options[kType3];
    if (!kExtensionValues.includes(type)) {
        throw new Error(`The type ${type} isn't valid. Expected one of ${kExtensionValues.join(", ")}`);
    }
    const subType = createOptions.options[kSubType];
    const subTypes = kExtensionSubtypes[type];
    if (subTypes && !subTypes.includes(subType)) {
        throw new Error(`The sub type ${subType} isn't valid. Expected one of ${subTypes.join(", ")}`);
    }
    const template = createOptions.options[kSubType] ? `${createOptions.options[kType3]}:${createOptions.options[kSubType]}` : createOptions.options[kType3];
    return {
        displayType: "extension",
        name: createOptions.options[kName1],
        directory: join3(createOptions.cwd, createOptions.options[kName1]),
        template
    };
}
function nextPrompt(createOptions) {
    if (!createOptions.options[kType3]) {
        return {
            name: kType3,
            message: "Type",
            type: Select,
            options: kExtensionTypes.map((t)=>{
                if (t === "---") {
                    return Select.separator("--------");
                } else {
                    return t;
                }
            })
        };
    }
    const subTypes = kExtensionSubtypes[createOptions.options[kType3]];
    if (!createOptions.options[kSubType] && subTypes && subTypes.length > 0) {
        return {
            name: kSubType,
            message: "Base Format",
            type: Select,
            options: subTypes.map((t)=>{
                return {
                    name: t,
                    value: t
                };
            })
        };
    }
    if (!createOptions.options[kName1]) {
        return {
            name: kName1,
            message: "Extension Name",
            type: Input
        };
    }
}
function typeFromTemplate(template) {
    return template.split(":")[0];
}
async function createArtifact(createDirective, quiet) {
    const createType = typeFromTemplate(createDirective.template);
    const extType = kExtensionTypes.find((type)=>{
        if (typeof type === "object") {
            return type.value === createType;
        } else {
            return false;
        }
    });
    if (!extType) {
        throw new Error(`Unrecognized extension type ${createType}`);
    }
    const openfiles = extType ? extType.openfiles : [];
    await createExtension(createDirective, quiet);
    return {
        path: createDirective.directory,
        openfiles
    };
}
async function createExtension(createDirective, quiet) {
    const artifact = templateFolder(createDirective);
    const target = createDirective.directory;
    const data = await ejsData(createDirective);
    const filesCreated = renderAndCopyArtifacts(target, artifact, createDirective, data, quiet);
    return filesCreated[0];
}
function templateFolder(createDirective) {
    const basePath = resourcePath(join3("create", "extensions"));
    const artifactFolderName = createDirective.template.replace(":", "-");
    return join3(basePath, artifactFolderName);
}
const kProjectTypes1 = projectTypes();
const kProjectTypeAliases1 = projectTypeAliases();
const kProjectTypesAndAliases1 = [
    ...kProjectTypes1,
    ...kProjectTypeAliases1
];
const kType4 = "type";
const kSubdirectory = "subdirectory";
const kBlogTypeAlias = "blog";
const kTypeProj = "project";
const kProjectCreateTypes = [
    ...kProjectTypes1,
    kBlogTypeAlias
];
const kProjectTypeOrder = [
    "default",
    "website",
    kBlogTypeAlias,
    "book"
];
const projectArtifactCreator = {
    displayName: "Project",
    type: kTypeProj,
    resolveOptions: resolveOptions1,
    finalizeOptions: finalizeOptions1,
    nextPrompt: nextPrompt1,
    createArtifact: createArtifact1
};
function resolveOptions1(args) {
    const typeRaw = args.length > 0 ? args[0] : undefined;
    const directoryRaw = args.length > 1 ? args[1] : undefined;
    const options = {};
    if (typeRaw) {
        if (kProjectCreateTypes.includes(typeRaw)) {
            options[kType4] = typeRaw;
        }
    }
    if (directoryRaw) {
        options[kSubdirectory] = directoryRaw;
    }
    return options;
}
function resolveTemplate(type) {
    if (type === "website") {
        return {
            type,
            template: "default"
        };
    } else if (type === kBlogTypeAlias) {
        return {
            type: "website",
            template: "blog"
        };
    } else {
        return {
            type
        };
    }
}
function finalizeOptions1(createContext) {
    const resolved = resolveTemplate(createContext.options[kType4] || "default");
    const name = createContext.options[kSubdirectory];
    const directory = join3(createContext.cwd, createContext.options[kSubdirectory]);
    const template = resolved.template ? `${resolved.type}:${resolved.template}` : resolved.type;
    return {
        displayType: "project",
        name,
        directory,
        template
    };
}
function nextPrompt1(createOptions) {
    if (!createOptions.options[kType4]) {
        const orderedTypes = kProjectCreateTypes.sort((t1, t2)=>{
            if (t1 === t2) {
                return 0;
            } else if (kProjectTypeOrder.indexOf(t1) === -1) {
                return 1;
            } else {
                return kProjectTypeOrder.indexOf(t1) - kProjectTypeOrder.indexOf(t2);
            }
        });
        return {
            name: kType4,
            message: "Type",
            type: Select,
            options: orderedTypes.map((t)=>{
                return {
                    name: t,
                    value: t
                };
            })
        };
    }
    if (!createOptions.options[kSubdirectory]) {
        return {
            name: kSubdirectory,
            message: "Directory",
            type: Input
        };
    }
}
async function createArtifact1(createDirective, quiet) {
    const dir = createDirective.directory;
    const projectTitle = capitalizeTitle(createDirective.name);
    const directiveType = createDirective.template;
    const { type , template  } = parseProjectType(directiveType);
    if (kProjectTypesAndAliases1.indexOf(type) === -1) {
        throw new Error(`Project type must be one of ${kProjectTypes1.join(", ")}, but got "${type}".`);
    }
    const projType = projectType(type);
    if (template && !projType.templates?.includes(template)) {
        if (projType.templates) {
            throw new Error(`Project template must be one of ${projType.templates.join(", ")}, but got "${template}".`);
        } else {
            throw new Error(`The project type ${type} does not support any templates.`);
        }
    }
    await projectCreate({
        dir,
        type: type,
        title: projectTitle,
        scaffold: true,
        engine: kMarkdownEngine,
        template: template,
        quiet
    });
    return {
        path: dir,
        openfiles: type !== "default" ? [
            "index.qmd",
            "_quarto.yml"
        ] : [
            "_quarto.yml"
        ]
    };
}
const kEditorInfos = [
    vscodeEditorInfo(),
    rstudioEditorInfo(), 
];
async function scanForEditors(editorInfos, createResult) {
    const editors = [];
    for (const editorInfo of editorInfos){
        const editorPath = await findEditorPath(editorInfo.actions);
        if (editorPath) {
            editors.push({
                id: editorInfo.id,
                name: editorInfo.name,
                open: editorInfo.open(editorPath, createResult),
                inEditor: editorInfo.inEditor
            });
        }
    }
    return editors;
}
function vscodeEditorInfo() {
    const editorInfo = {
        id: "vscode",
        name: "vscode",
        open: (path, createResult)=>{
            const artifactPath = createResult.path;
            const cwd = Deno.statSync(artifactPath).isDirectory ? artifactPath : dirname2(artifactPath);
            return ()=>{
                return execProcess({
                    cmd: [
                        path,
                        artifactPath
                    ],
                    cwd,
                    stdin: "null"
                });
            };
        },
        inEditor: isVSCodeTerminal(),
        actions: []
    };
    if (Deno.build.os === "windows") {
        editorInfo.actions.push({
            action: "which",
            arg: "code.exe"
        });
        const pathActions = windowsAppPaths("Microsoft VS Code", "code.exe").map((path)=>{
            return {
                action: "path",
                arg: path
            };
        });
        editorInfo.actions.push(...pathActions);
    } else if (Deno.build.os === "darwin") {
        editorInfo.actions.push({
            action: "which",
            arg: "code"
        });
        const pathActions1 = macosAppPaths("Visual Studio Code.app/Contents/Resources/app/bin/code").map((path)=>{
            return {
                action: "path",
                arg: path
            };
        });
        editorInfo.actions.push(...pathActions1);
    } else {
        editorInfo.actions.push({
            action: "which",
            arg: "code"
        });
        editorInfo.actions.push({
            action: "path",
            arg: "/snap/bin/code"
        });
    }
    return editorInfo;
}
function rstudioEditorInfo() {
    const editorInfo = {
        id: "rstudio",
        name: "RStudio",
        open: (path, createResult)=>{
            return ()=>{
                const artifactPath = createResult.path;
                const cwd = Deno.statSync(artifactPath).isDirectory ? artifactPath : dirname2(artifactPath);
                const artifactName = basename2(artifactPath);
                const rProjPath = join3(cwd, `${artifactName}.rproj`);
                Deno.writeTextFileSync(rProjPath, kRProjContents);
                const cmd = path.endsWith(".app") && Deno.build.os === "darwin" ? [
                    "open",
                    "-na",
                    path,
                    "--args",
                    rProjPath
                ] : [
                    path,
                    rProjPath
                ];
                return execProcess({
                    cmd: cmd,
                    cwd,
                    stdin: "null"
                });
            };
        },
        inEditor: isRStudioTerminal(),
        actions: []
    };
    const rstudioExe = "rstudio.exe";
    if (Deno.build.os === "windows") {
        editorInfo.actions.push({
            action: "env",
            arg: "RS_RPOSTBACK_PATH",
            filter: (path)=>{
                return join3(dirname2(path), rstudioExe);
            }
        });
        const paths = windowsAppPaths(join3("RStudio", "bin"), rstudioExe).map((path)=>{
            return {
                action: "path",
                arg: path
            };
        });
        editorInfo.actions.push(...paths);
    } else if (Deno.build.os === "darwin") {
        const paths1 = macosAppPaths("RStudio.app").map((path)=>{
            return {
                action: "path",
                arg: path
            };
        });
        editorInfo.actions.push(...paths1);
    } else {
        editorInfo.actions.push({
            action: "env",
            arg: "RS_RPOSTBACK_PATH",
            filter: (path)=>{
                return join3(dirname2(path), rstudioExe);
            }
        });
        editorInfo.actions.push({
            action: "path",
            arg: "/usr/lib/rstudio/bin/rstudio"
        });
        editorInfo.actions.push({
            action: "which",
            arg: "rstudio"
        });
    }
    return editorInfo;
}
const kRProjContents = `Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Knitr
LaTeX: pdfLaTeX`;
async function findEditorPath(actions) {
    for (const action of actions){
        const filter = action.filter || ((path)=>{
            return path;
        });
        switch(action.action){
            case "which":
                {
                    const path = await which(action.arg);
                    if (path) {
                        return filter(path);
                    }
                    break;
                }
            case "path":
                if (existsSync(action.arg)) {
                    return filter(action.arg);
                }
                break;
            case "env":
                {
                    const envValue = Deno.env.get(action.arg);
                    if (envValue) {
                        return filter(envValue);
                    }
                }
        }
    }
    return undefined;
}
function windowsAppPaths(folderName, command) {
    const paths = [];
    const localAppData = Deno.env.get("LOCALAPPDATA");
    if (localAppData) {
        paths.push(join3(localAppData, "Programs", folderName, command));
    }
    const programFiles = Deno.env.get("PROGRAMFILES");
    if (programFiles) {
        paths.push(join3(programFiles, folderName, command));
    }
    const programFilesx86 = Deno.env.get("PROGRAMFILES(X86)");
    if (programFilesx86) {
        paths.push(join3(programFilesx86, folderName, command));
    }
    return paths;
}
function macosAppPaths(appName) {
    const paths = [];
    paths.push(join3("/Applications", appName));
    const home = Deno.env.get("HOME");
    if (home) {
        paths.push(join3(home, "Applications", appName));
    }
    return paths;
}
const kArtifactCreators = [
    projectArtifactCreator,
    extensionArtifactCreator
];
const createCommand = new Command().name("create").description("Create a Quarto project or extension").option("--open [editor:string]", `Open new artifact in this editor (${kEditorInfos.map((info)=>info.id).join(",")})`).option("--no-open", "Do not open in an editor").option("--no-prompt", "Do not prompt to confirm actions").option("--json", "Pass serialized creation options via stdin", {
    hidden: true
}).arguments("[type] [commands...]").action(async (options, type, commands)=>{
    if (options.json) {
        await createFromStdin();
    } else {
        const isInteractive = isInteractiveTerminal() && !runningInCI();
        const allowPrompt = isInteractive && !!options.prompt && !options.json;
        const resolved = await resolveArtifact(type, options.prompt);
        const resolvedArtifact = resolved.artifact;
        if (resolvedArtifact) {
            const args = commands || [];
            const commandOpts = resolvedArtifact.resolveOptions(args);
            const createOptions = {
                cwd: Deno.cwd(),
                options: commandOpts
            };
            if (allowPrompt) {
                let nextPrompt = resolvedArtifact.nextPrompt(createOptions);
                while(nextPrompt !== undefined){
                    if (nextPrompt) {
                        if ((nextPrompt.type === Select || nextPrompt.type === Checkbox) && nextPrompt.hint === undefined) {
                            nextPrompt.hint = arrowKeyHint();
                        }
                        const result1 = await prompt([
                            nextPrompt
                        ]);
                        createOptions.options = {
                            ...createOptions.options,
                            ...result1
                        };
                    }
                    nextPrompt = resolvedArtifact.nextPrompt(createOptions);
                }
            }
            const createDirective = resolvedArtifact.finalizeOptions(createOptions);
            const createResult = await resolvedArtifact.createArtifact(createDirective);
            if (allowPrompt && options.open !== false) {
                const resolvedEditor = await resolveEditor(createResult, typeof options.open === "string" ? options.open : undefined);
                if (resolvedEditor) {
                    resolvedEditor.open();
                }
            }
        }
    }
});
const resolveArtifact = async (type, prompt)=>{
    const findArtifact = (type)=>{
        return kArtifactCreators.find((artifact)=>artifact.type === type && artifact.enabled !== false);
    };
    let artifact = type ? findArtifact(type) : undefined;
    while(artifact === undefined){
        if (!prompt) {
            if (type) {
                throw new Error(`Failed to create ${type} - the type isn't recognized`);
            } else {
                throw new Error(`Creation failed - you must provide a type to create when using '--no-prompt'`);
            }
        }
        if (type) {
            info(`Unknown type ${type} - please select from the following:`);
        }
        type = await promptForType();
        artifact = findArtifact(type);
    }
    return {
        artifact
    };
};
function arrowKeyHint() {
    return Deno.build.os === "windows" ? `ℹ | Next: d, n | Previous: u, p |` : undefined;
}
async function promptSelect(message, options) {
    const hint = arrowKeyHint();
    return await Select.prompt({
        message,
        options,
        hint
    });
}
const promptForType = async ()=>{
    return await promptSelect("Create", kArtifactCreators.map((artifact)=>{
        return {
            name: artifact.displayName.toLowerCase(),
            value: artifact.type
        };
    }));
};
const resolveEditor = async (createResult, editor)=>{
    const editors = await scanForEditors(kEditorInfos, createResult);
    const defaultEditor = editors.find((ed)=>{
        return ed.id === editor;
    });
    if (defaultEditor) {
        return defaultEditor;
    } else {
        const inEditor = editors.find((ed)=>ed.inEditor);
        if (inEditor) {
            return inEditor;
        } else if (editors.length > 0) {
            const editorOptions = editors.map((editor)=>{
                return {
                    name: editor.name.toLowerCase(),
                    value: editor.name
                };
            });
            const options = [
                ...editorOptions,
                {
                    name: "(don't open)",
                    value: "do not open"
                }
            ];
            const name = await promptSelect("Open With", options);
            const selectedEditor = editors.find((edit)=>edit.name === name);
            return selectedEditor;
        } else {
            return undefined;
        }
    }
};
async function createFromStdin() {
    const { value: input  } = await readLines(Deno.stdin).next();
    Deno.stdin.close();
    const jsonOptions = JSON.parse(input);
    const type = jsonOptions.type;
    if (!type) {
        throw new Error("The provided json for create artifacts must include a valid type");
    }
    if (!jsonOptions.directive || !jsonOptions.directive.name || !jsonOptions.directive.directory || !jsonOptions.directive.template) {
        throw new Error("The provided json for create artifacts must include a directive with a name, directory, and template.");
    }
    const resolved = await resolveArtifact(type, false);
    const createDirective = jsonOptions.directive;
    const createResult = await resolved.artifact.createArtifact(createDirective, true);
    const resultJSON = JSON.stringify(createResult, undefined);
    Deno.stdout.writeSync(new TextEncoder().encode(resultJSON));
}
function commands() {
    return [
        renderCommand,
        previewCommand,
        serveCommand,
        createCommand,
        createProjectCommand,
        convertCommand,
        pandocCommand,
        runCommand,
        addCommand1,
        installCommand,
        uninstallCommand,
        updateCommand,
        removeCommand,
        listCommand,
        useCommand,
        publishCommand,
        capabilitiesCommand,
        inspectCommand,
        toolsCommand,
        checkCommand,
        buildJsCommand, 
    ];
}
const kDevConfig = "dev-config";
function createDevConfig(deno, deno_dom, pandoc, dartsass, esbuild, scriptDir) {
    const scriptPath = join3(scriptDir, "quarto" + (isWindows() ? ".cmd" : ""));
    const srcDir = Deno.env.get("QUARTO_SRC_PATH") || join3(quartoConfig.sharePath(), "../../src");
    return {
        deno,
        deno_dom,
        pandoc,
        dartsass,
        esbuild,
        script: md5Hash(Deno.readTextFileSync(scriptPath)),
        importMap: md5Hash(Deno.readTextFileSync(join3(srcDir, "import_map.json"))),
        bundleImportMap: md5Hash(Deno.readTextFileSync(join3(srcDir, "resources/vendor/import_map.json")))
    };
}
function readInstalledDevConfig() {
    const binPath = quartoConfig.binPath();
    const configPath = join3(binPath, "..", "config", kDevConfig);
    if (existsSync(configPath)) {
        return JSON.parse(Deno.readTextFileSync(configPath));
    } else {
        return null;
    }
}
function readSourceDevConfig() {
    const rootDir = Deno.env.get("QUARTO_ROOT") || join3(quartoConfig.sharePath(), "../../src");
    const configurationScript = join3(rootDir, "configuration");
    const configurationScriptSrc = Deno.readTextFileSync(configurationScript);
    const readConfig = (key)=>{
        const regex = new RegExp(`${key}=(\\S+)`);
        const match = configurationScriptSrc.match(regex);
        if (match) {
            return match[1];
        } else {
            return "";
        }
    };
    return createDevConfig(readConfig("DENO"), readConfig("DENO_DOM"), readConfig("PANDOC"), readConfig("DARTSASS"), readConfig("ESBUILD"), quartoConfig.binPath());
}
function devConfigsEqual(a, b) {
    return a.deno === b.deno && a.deno_dom === b.deno_dom && a.pandoc === b.pandoc && a.dartsass == b.dartsass && a.esbuild == b.esbuild && a.script == b.script && a.importMap === b.importMap && a.bundleImportMap === b.bundleImportMap;
}
async function reconfigureQuarto(installed, source) {
    const configureScript = isWindows() ? ".\\configure.cmd" : "./configure.sh";
    const quartoDir = Deno.realPathSync(join3(quartoConfig.sharePath(), "..", ".."));
    const process = Deno.run({
        cmd: [
            configureScript
        ],
        cwd: quartoDir
    });
    await process.status();
    info("");
    error(`Quarto required reconfiguration to ${reconfigureReason(installed, source)}. Please try command again.\n`);
}
function reconfigureReason(installed, source) {
    const versionMessage = (dep, version)=>{
        return `install ${dep} version ${version}`;
    };
    if (installed === null || installed.deno !== source.deno) {
        return versionMessage("Deno", source.deno);
    } else if (installed.deno_dom !== source.deno_dom) {
        return versionMessage("Deno Dom", source.deno_dom);
    } else if (installed.pandoc !== source.pandoc) {
        return versionMessage("Pandoc", source.pandoc);
    } else if (installed.dartsass !== source.dartsass) {
        return versionMessage("Dart Sass", source.dartsass);
    } else if (installed.esbuild !== source.esbuild) {
        return versionMessage("Esbuild", source.esbuild);
    } else if (installed.script !== source.script) {
        return "update Quarto wrapper script";
    } else if (installed.importMap !== source.importMap || installed.bundleImportMap !== source.importMap) {
        return "update dev import map";
    }
}
const { hasOwn: hasOwn5  } = Object;
function get1(obj, key) {
    if (hasOwn5(obj, key)) {
        return obj[key];
    }
}
function getForce(obj, key) {
    const v = get1(obj, key);
    assert(v != null);
    return v;
}
function isNumber(x) {
    if (typeof x === "number") return true;
    if (/^0x[0-9a-f]+$/i.test(String(x))) return true;
    return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(String(x));
}
function hasKey(obj, keys) {
    let o = obj;
    keys.slice(0, -1).forEach((key)=>{
        o = get1(o, key) ?? {};
    });
    const key = keys[keys.length - 1];
    return hasOwn5(o, key);
}
function parse18(args, { "--": doubleDash = false , alias ={} , boolean: __boolean = false , default: defaults = {} , stopEarly =false , string =[] , collect =[] , negatable =[] , unknown =(i1)=>i1  } = {}) {
    const flags = {
        bools: {},
        strings: {},
        unknownFn: unknown,
        allBools: false,
        collect: {},
        negatable: {}
    };
    if (__boolean !== undefined) {
        if (typeof __boolean === "boolean") {
            flags.allBools = !!__boolean;
        } else {
            const booleanArgs = typeof __boolean === "string" ? [
                __boolean
            ] : __boolean;
            for (const key of booleanArgs.filter(Boolean)){
                flags.bools[key] = true;
            }
        }
    }
    const aliases = {};
    if (alias !== undefined) {
        for(const key1 in alias){
            const val = getForce(alias, key1);
            if (typeof val === "string") {
                aliases[key1] = [
                    val
                ];
            } else {
                aliases[key1] = val;
            }
            for (const alias1 of getForce(aliases, key1)){
                aliases[alias1] = [
                    key1
                ].concat(aliases[key1].filter((y)=>alias1 !== y));
            }
        }
    }
    if (string !== undefined) {
        const stringArgs = typeof string === "string" ? [
            string
        ] : string;
        for (const key2 of stringArgs.filter(Boolean)){
            flags.strings[key2] = true;
            const alias2 = get1(aliases, key2);
            if (alias2) {
                for (const al of alias2){
                    flags.strings[al] = true;
                }
            }
        }
    }
    if (collect !== undefined) {
        const collectArgs = typeof collect === "string" ? [
            collect
        ] : collect;
        for (const key3 of collectArgs.filter(Boolean)){
            flags.collect[key3] = true;
            const alias3 = get1(aliases, key3);
            if (alias3) {
                for (const al1 of alias3){
                    flags.collect[al1] = true;
                }
            }
        }
    }
    if (negatable !== undefined) {
        const negatableArgs = typeof negatable === "string" ? [
            negatable
        ] : negatable;
        for (const key4 of negatableArgs.filter(Boolean)){
            flags.negatable[key4] = true;
            const alias4 = get1(aliases, key4);
            if (alias4) {
                for (const al2 of alias4){
                    flags.negatable[al2] = true;
                }
            }
        }
    }
    const argv = {
        _: []
    };
    function argDefined(key, arg) {
        return flags.allBools && /^--[^=]+$/.test(arg) || get1(flags.bools, key) || !!get1(flags.strings, key) || !!get1(aliases, key);
    }
    function setKey(obj, name, value, collect = true) {
        let o = obj;
        const keys = name.split(".");
        keys.slice(0, -1).forEach(function(key) {
            if (get1(o, key) === undefined) {
                o[key] = {};
            }
            o = get1(o, key);
        });
        const key = keys[keys.length - 1];
        const collectable = collect && !!get1(flags.collect, name);
        if (!collectable) {
            o[key] = value;
        } else if (get1(o, key) === undefined) {
            o[key] = [
                value
            ];
        } else if (Array.isArray(get1(o, key))) {
            o[key].push(value);
        } else {
            o[key] = [
                get1(o, key),
                value
            ];
        }
    }
    function setArg(key, val, arg = undefined, collect) {
        if (arg && flags.unknownFn && !argDefined(key, arg)) {
            if (flags.unknownFn(arg, key, val) === false) return;
        }
        const value = !get1(flags.strings, key) && isNumber(val) ? Number(val) : val;
        setKey(argv, key, value, collect);
        const alias = get1(aliases, key);
        if (alias) {
            for (const x of alias){
                setKey(argv, x, value, collect);
            }
        }
    }
    function aliasIsBoolean(key) {
        return getForce(aliases, key).some((x)=>typeof get1(flags.bools, x) === "boolean");
    }
    let notFlags = [];
    if (args.includes("--")) {
        notFlags = args.slice(args.indexOf("--") + 1);
        args = args.slice(0, args.indexOf("--"));
    }
    for(let i1 = 0; i1 < args.length; i1++){
        const arg = args[i1];
        if (/^--.+=/.test(arg)) {
            const m = arg.match(/^--([^=]+)=(.*)$/s);
            assert(m != null);
            const [, key5, value] = m;
            if (flags.bools[key5]) {
                const booleanValue = value !== "false";
                setArg(key5, booleanValue, arg);
            } else {
                setArg(key5, value, arg);
            }
        } else if (/^--no-.+/.test(arg) && get1(flags.negatable, arg.replace(/^--no-/, ""))) {
            const m1 = arg.match(/^--no-(.+)/);
            assert(m1 != null);
            setArg(m1[1], false, arg, false);
        } else if (/^--.+/.test(arg)) {
            const m2 = arg.match(/^--(.+)/);
            assert(m2 != null);
            const [, key6] = m2;
            const next = args[i1 + 1];
            if (next !== undefined && !/^-/.test(next) && !get1(flags.bools, key6) && !flags.allBools && (get1(aliases, key6) ? !aliasIsBoolean(key6) : true)) {
                setArg(key6, next, arg);
                i1++;
            } else if (/^(true|false)$/.test(next)) {
                setArg(key6, next === "true", arg);
                i1++;
            } else {
                setArg(key6, get1(flags.strings, key6) ? "" : true, arg);
            }
        } else if (/^-[^-]+/.test(arg)) {
            const letters = arg.slice(1, -1).split("");
            let broken = false;
            for(let j = 0; j < letters.length; j++){
                const next1 = arg.slice(j + 2);
                if (next1 === "-") {
                    setArg(letters[j], next1, arg);
                    continue;
                }
                if (/[A-Za-z]/.test(letters[j]) && /=/.test(next1)) {
                    setArg(letters[j], next1.split(/=(.+)/)[1], arg);
                    broken = true;
                    break;
                }
                if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next1)) {
                    setArg(letters[j], next1, arg);
                    broken = true;
                    break;
                }
                if (letters[j + 1] && letters[j + 1].match(/\W/)) {
                    setArg(letters[j], arg.slice(j + 2), arg);
                    broken = true;
                    break;
                } else {
                    setArg(letters[j], get1(flags.strings, letters[j]) ? "" : true, arg);
                }
            }
            const [key7] = arg.slice(-1);
            if (!broken && key7 !== "-") {
                if (args[i1 + 1] && !/^(-|--)[^-]/.test(args[i1 + 1]) && !get1(flags.bools, key7) && (get1(aliases, key7) ? !aliasIsBoolean(key7) : true)) {
                    setArg(key7, args[i1 + 1], arg);
                    i1++;
                } else if (args[i1 + 1] && /^(true|false)$/.test(args[i1 + 1])) {
                    setArg(key7, args[i1 + 1] === "true", arg);
                    i1++;
                } else {
                    setArg(key7, get1(flags.strings, key7) ? "" : true, arg);
                }
            }
        } else {
            if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
                argv._.push(flags.strings["_"] ?? !isNumber(arg) ? arg : Number(arg));
            }
            if (stopEarly) {
                argv._.push(...args.slice(i1 + 1));
                break;
            }
        }
    }
    for (const [key8, value1] of Object.entries(defaults)){
        if (!hasKey(argv, key8.split("."))) {
            setKey(argv, key8, value1);
            if (aliases[key8]) {
                for (const x of aliases[key8]){
                    setKey(argv, x, value1);
                }
            }
        }
    }
    for (const key9 of Object.keys(flags.bools)){
        if (!hasKey(argv, key9.split("."))) {
            const value2 = get1(flags.collect, key9) ? [] : false;
            setKey(argv, key9, value2, false);
        }
    }
    for (const key10 of Object.keys(flags.strings)){
        if (!hasKey(argv, key10.split(".")) && get1(flags.collect, key10)) {
            setKey(argv, key10, [], false);
        }
    }
    if (doubleDash) {
        argv["--"] = [];
        for (const key11 of notFlags){
            argv["--"].push(key11);
        }
    } else {
        for (const key12 of notFlags){
            argv._.push(key12);
        }
    }
    return argv;
}
const denoRunHandler = {
    canHandle: (script)=>{
        return [
            ".js",
            ".ts"
        ].includes(extname2(script).toLowerCase());
    },
    run: async (script, args, stdin, options)=>{
        const denoDir = initDenoCache();
        options = {
            ...options,
            env: {
                ...options?.env,
                DENO_DIR: denoDir
            }
        };
        const importMap = resourcePath(join3("deno_std", "import_map.json"));
        return await execProcess({
            cmd: [
                toolsPath("deno"),
                "run",
                "--import-map",
                importMap,
                "--cached-only",
                "--allow-all",
                "--unstable",
                script,
                ...args, 
            ],
            ...options
        }, stdin, undefined, undefined, true);
    }
};
function initDenoCache() {
    const distDenoStd = resourcePath("deno_std");
    const distLock = join3(distDenoStd, "deno_std.lock");
    const cacheDenoStd = quartoCacheDir("deno_std");
    const cacheLock = join3(cacheDenoStd, "deno_std.lock");
    if (!existsSync(cacheLock) || Deno.readTextFileSync(cacheLock) != Deno.readTextFileSync(distLock)) {
        removeIfExists(cacheDenoStd);
        copyTo(distDenoStd, cacheDenoStd);
    }
    return join3(cacheDenoStd, "cache");
}
const luaRunHandler = {
    canHandle: (script)=>{
        return [
            ".lua"
        ].includes(extname2(script).toLowerCase());
    },
    run: async (script, args, stdin, options)=>{
        if (typeof stdin === "string") {
            throw new Error("Lua run handlers cannot be passed stdin");
        }
        const cmd = [
            pandocBinaryPath(),
            "--from",
            "markdown",
            "--to",
            "plain", 
        ];
        if (isWindows()) {
            cmd.push("--lua-filter");
            cmd.push(resourcePath("filters/init/init.lua"));
        }
        cmd.push("--lua-filter", script);
        cmd.push(...args);
        return await execProcess({
            cmd,
            ...options
        }, "");
    }
};
const pythonRunHandler = {
    canHandle: (script)=>{
        return [
            ".py"
        ].includes(extname2(script).toLowerCase());
    },
    run: async (script, args, stdin, options)=>{
        return await execProcess({
            cmd: [
                ...await pythonExec(),
                script,
                ...args, 
            ],
            ...options
        }, stdin);
    }
};
const rRunHandler = {
    canHandle: (script)=>{
        return [
            ".r"
        ].includes(extname2(script).toLowerCase());
    },
    run: async (script, args, stdin, options)=>{
        return await execProcess({
            cmd: [
                await rBinaryPath("Rscript"),
                script,
                ...args, 
            ],
            ...options
        }, stdin);
    }
};
installRunHandler(denoRunHandler);
installRunHandler(luaRunHandler);
installRunHandler(pythonRunHandler);
installRunHandler(rRunHandler);
const importMeta1 = {
    url: "file:///home/runner/work/quarto-cli/quarto-cli/src/quarto.ts",
    main: import.meta.main
};
async function quarto(args, cmdHandler) {
    if (quartoConfig.isDebug()) {
        const installed = readInstalledDevConfig();
        const source = readSourceDevConfig();
        if (installed == null || !devConfigsEqual(installed, source)) {
            await reconfigureQuarto(installed, source);
            Deno.exit(1);
        }
    }
    if (args[0] === "pandoc" && args[1] !== "help") {
        const result1 = await execProcess({
            cmd: [
                pandocBinaryPath(),
                ...args.slice(1)
            ]
        });
        Deno.exit(result1.code);
    }
    if (args[0] === "run" && args[1] !== "help" && args[1] !== "--help") {
        const result11 = await runScript(args.slice(1));
        Deno.exit(result11.code);
    }
    if (args.length > 1 && (args[0] === "render" || args[0] === "preview") && args[1].startsWith("-")) {
        args = [
            args[0],
            Deno.cwd(),
            ...args.slice(1)
        ];
    }
    const quartoCommand = new Command().name("quarto").help({
        colors: false
    }).version(quartoConfig.version() + "\n").description("Quarto CLI").throwErrors();
    commands().forEach((command)=>{
        command.help({
            colors: false
        });
        quartoCommand.command(command.getName(), cmdHandler !== undefined ? cmdHandler(command) : command);
    });
    initSessionTempDir();
    onCleanup(cleanupSessionTempDir);
    await quartoCommand.command("help", new HelpCommand().global()).command("completions", new CompletionsCommand()).hidden().parse(args);
}
if (importMeta1.main) {
    try {
        if (Deno.build.os !== "windows") {
            Deno.addSignalListener("SIGINT", abend);
            Deno.addSignalListener("SIGTERM", abend);
        }
        const args1 = parse18(Deno.args);
        await initializeLogger(logOptions(args1));
        setProfileFromArg(args1);
        await quarto(Deno.args, (cmd)=>{
            cmd = appendLogOptions(cmd);
            return appendProfileArg(cmd);
        });
        await cleanupLogger();
        exitWithCleanup(0);
    } catch (e1) {
        if (e1) {
            logError(e1);
        }
        abend();
    }
}
function abend() {
    exitWithCleanup(1);
}
export { quarto as quarto };
