/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __esm = (fn3, res) => function __init() { return fn3 && (res = (0, fn3[__getOwnPropNames(fn3)[0]])(fn3 = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; // src/types/plugin-settings_0_5_0.ts var DEFAULT_PLUGIN_SETTINGS_0_5_0; var init_plugin_settings_0_5_0 = __esm({ "src/types/plugin-settings_0_5_0.ts"() { DEFAULT_PLUGIN_SETTINGS_0_5_0 = { settingsVersion: "0.5.0", onboardingTips: { welcomeTipRead: false, strokeLimitTipRead: false, lastVersionTipRead: "" }, gettingStartedExpanded: true, customAttachmentFolders: false, noteAttachmentFolderLocation: "obsidian", notelessAttachmentFolderLocation: "obsidian", writingSubfolder: "Ink/Writing", drawingSubfolder: "Ink/Drawing", debugLoggingEnabled: false, dominantHand: "right", writingEnabled: true, writingStrokeLimit: 200, writingBufferLines: 3, writingLineHeight: 150, writingDynamicStrokeThickness: true, writingSmoothing: false, writingLinesWhenLocked: true, writingBackgroundWhenLocked: true, drawingEnabled: true, drawingGridEnabledByDefault: true, drawingFrameWhenLocked: false, drawingBackgroundWhenLocked: false }; } }); // src/types/types-map.ts var DEFAULT_SETTINGS; var init_types_map = __esm({ "src/types/types-map.ts"() { init_plugin_settings_0_5_0(); DEFAULT_SETTINGS = DEFAULT_PLUGIN_SETTINGS_0_5_0; } }); // src/types/plugin-settings.ts var init_plugin_settings = __esm({ "src/types/plugin-settings.ts"() { init_types_map(); } }); // src/components/dom-components/modals/confirmation-modal/confirmation-modal.ts var import_obsidian2, ConfirmationModal; var init_confirmation_modal = __esm({ "src/components/dom-components/modals/confirmation-modal/confirmation-modal.ts"() { import_obsidian2 = require("obsidian"); ConfirmationModal = class extends import_obsidian2.Modal { constructor(options) { super(options.plugin.app); this.title = "Confirmation"; this.message = "Are you sure?"; this.cancelLabel = "Cancel"; this.cancelAction = () => { }; this.confirmLabel = "Yes"; this.title = options.title || this.title; this.message = options.message || this.message; this.cancelLabel = options.cancelLabel || this.cancelLabel; this.confirmLabel = options.confirmLabel || this.confirmLabel; this.cancelAction = options.cancelAction || this.cancelAction; this.confirmAction = options.confirmAction; } onOpen() { const { titleEl, contentEl } = this; titleEl.setText(this.title); contentEl.createEl("p", { text: this.message }); new import_obsidian2.Setting(contentEl).addButton((cancelBtn) => { cancelBtn.setClass("uo_button"); cancelBtn.setButtonText(this.cancelLabel); cancelBtn.onClick(() => { this.close(); this.cancelAction(); }); }).addButton((confirmBtn) => { confirmBtn.setClass("uo_button"); confirmBtn.setWarning(); confirmBtn.setButtonText(this.confirmLabel); confirmBtn.onClick(() => { this.close(); this.confirmAction(); }); }); } onClose() { const { titleEl, contentEl } = this; titleEl.empty(); contentEl.empty(); } }; } }); // src/components/dom-components/notice-components.scss var init_ = __esm({ "src/components/dom-components/notice-components.scss"() { } }); // src/components/dom-components/notice-components.ts function createNoticeTemplate(noticeNumber, noticeTotal) { const noticeBody = activeDocument.createDocumentFragment(); const scrollAreaEl = noticeBody.createDiv("ddc_ink_notice-scroll"); createNoticeLabel(scrollAreaEl, noticeNumber, noticeTotal); const footerEl = noticeBody.createDiv("ddc_ink_notice-footer"); return { noticeBody, scrollAreaEl, footerEl }; } function launchPersistentNotice(noticeBody) { const notice = new import_obsidian3.Notice(noticeBody, 0); notice.noticeEl.classList.add("ddc_ink_notice"); wireNoticePointerHandling(notice.noticeEl); return notice; } function wireNoticePointerHandling(noticeContentEl) { noticeContentEl.querySelector(".ddc_ink_notice-scroll")?.addEventListener("click", (event) => { event.stopPropagation(); }); noticeContentEl.querySelector(".ddc_ink_notice-footer")?.addEventListener("click", (event) => { if (event.target instanceof HTMLElement && event.target.closest("a, button")) { return; } event.stopPropagation(); }); } function createNoticeLabel(noticeParent, noticeNumber, noticeTotal) { const labelEl = noticeParent.createEl("p"); let labelText = `Ink plugin`; labelEl.setText(labelText); labelEl.classList.add("ddc_ink_notice-label"); return labelEl; } function createNoticeInlineQuote(parentEl, text) { return parentEl.createEl("q", { cls: "ddc_ink_notice-inline-quote", text }); } function createNoticeCtaBar(footerEl, props) { let primaryBtnEl = null; let tertiaryBtnEl = null; const footerLinkEls = []; const links = props.footerLinks ?? (props.footerLink ? [props.footerLink] : []); if (links.length > 0) { const footerLinksEl = footerEl.createDiv("ddc_ink_notice-footer-links"); for (const link of links) { const footerLinkEl = footerLinksEl.createEl("a"); footerLinkEl.setAttribute("href", link.href); footerLinkEl.setText(link.label); footerLinkEl.onClickEvent((event) => event.stopPropagation()); footerLinkEls.push(footerLinkEl); } } const ctaBarEl = footerEl.createDiv("ddc_ink_notice-cta-bar"); if (props.primaryLabel) { primaryBtnEl = ctaBarEl.createEl("button"); primaryBtnEl.setText(props.primaryLabel); primaryBtnEl.classList.add("ddc_ink_primary-btn"); } if (props.tertiaryLabel) { tertiaryBtnEl = ctaBarEl.createEl("button"); tertiaryBtnEl.setText(props.tertiaryLabel); tertiaryBtnEl.classList.add("ddc_ink_tertiary-btn"); } return { ctaBarEl, primaryBtnEl, tertiaryBtnEl, footerLinkEls }; } var import_obsidian3; var init_notice_components = __esm({ "src/components/dom-components/notice-components.ts"() { init_(); import_obsidian3 = require("obsidian"); } }); // node_modules/semver/internal/constants.js var require_constants = __commonJS({ "node_modules/semver/internal/constants.js"(exports, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; var RELEASE_TYPES = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ]; module2.exports = { MAX_LENGTH, MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_SAFE_INTEGER, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; } }); // node_modules/semver/internal/debug.js var require_debug = __commonJS({ "node_modules/semver/internal/debug.js"(exports, module2) { "use strict"; var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; module2.exports = debug2; } }); // node_modules/semver/internal/re.js var require_re = __commonJS({ "node_modules/semver/internal/re.js"(exports, module2) { "use strict"; var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants(); var debug2 = require_debug(); exports = module2.exports = {}; var re2 = exports.re = []; var safeRe = exports.safeRe = []; var src = exports.src = []; var safeSrc = exports.safeSrc = []; var t3 = exports.t = {}; var R2 = 0; var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; var safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; var makeSafeRegex = (value) => { for (const [token, max3] of safeRegexReplacements) { value = value.split(`${token}*`).join(`${token}{0,${max3}}`).split(`${token}+`).join(`${token}{1,${max3}}`); } return value; }; var createToken = (name, value, isGlobal) => { const safe = makeSafeRegex(value); const index3 = R2++; debug2(name, index3, value); t3[name] = index3; src[index3] = value; safeSrc[index3] = safe; re2[index3] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index3] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); createToken("MAINVERSION", `(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})`); createToken("MAINVERSIONLOOSE", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASEIDENTIFIER", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`); createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASE", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\.${src[t3.PRERELEASEIDENTIFIER]})*))`); createToken("PRERELEASELOOSE", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); createToken("BUILD", `(?:\\+(${src[t3.BUILDIDENTIFIER]}(?:\\.${src[t3.BUILDIDENTIFIER]})*))`); createToken("FULLPLAIN", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`); createToken("FULL", `^${src[t3.FULLPLAIN]}$`); createToken("LOOSEPLAIN", `[v=\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`); createToken("LOOSE", `^${src[t3.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); createToken("XRANGEIDENTIFIERLOOSE", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); createToken("XRANGEIDENTIFIER", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\*`); createToken("XRANGEPLAIN", `[v=\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`); createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`); createToken("XRANGE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAIN]}$`); createToken("XRANGELOOSE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAINLOOSE]}$`); createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); createToken("COERCE", `${src[t3.COERCEPLAIN]}(?:$|[^\\d])`); createToken("COERCEFULL", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\d])`); createToken("COERCERTL", src[t3.COERCE], true); createToken("COERCERTLFULL", src[t3.COERCEFULL], true); createToken("LONETILDE", "(?:~>?)"); createToken("TILDETRIM", `(\\s*)${src[t3.LONETILDE]}\\s+`, true); exports.tildeTrimReplace = "$1~"; createToken("TILDE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`); createToken("TILDELOOSE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); createToken("CARETTRIM", `(\\s*)${src[t3.LONECARET]}\\s+`, true); exports.caretTrimReplace = "$1^"; createToken("CARET", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`); createToken("CARETLOOSE", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`); createToken("COMPARATORLOOSE", `^${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]})$|^$`); createToken("COMPARATOR", `^${src[t3.GTLT]}\\s*(${src[t3.FULLPLAIN]})$|^$`); createToken("COMPARATORTRIM", `(\\s*)${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true); exports.comparatorTrimReplace = "$1$2$3"; createToken("HYPHENRANGE", `^\\s*(${src[t3.XRANGEPLAIN]})\\s+-\\s+(${src[t3.XRANGEPLAIN]})\\s*$`); createToken("HYPHENRANGELOOSE", `^\\s*(${src[t3.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t3.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); } }); // node_modules/semver/internal/parse-options.js var require_parse_options = __commonJS({ "node_modules/semver/internal/parse-options.js"(exports, module2) { "use strict"; var looseOption = Object.freeze({ loose: true }); var emptyOpts = Object.freeze({}); var parseOptions = (options) => { if (!options) { return emptyOpts; } if (typeof options !== "object") { return looseOption; } return options; }; module2.exports = parseOptions; } }); // node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ "node_modules/semver/internal/identifiers.js"(exports, module2) { "use strict"; var numeric = /^[0-9]+$/; var compareIdentifiers = (a2, b2) => { if (typeof a2 === "number" && typeof b2 === "number") { return a2 === b2 ? 0 : a2 < b2 ? -1 : 1; } const anum = numeric.test(a2); const bnum = numeric.test(b2); if (anum && bnum) { a2 = +a2; b2 = +b2; } return a2 === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b2 ? -1 : 1; }; var rcompareIdentifiers = (a2, b2) => compareIdentifiers(b2, a2); module2.exports = { compareIdentifiers, rcompareIdentifiers }; } }); // node_modules/semver/classes/semver.js var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports, module2) { "use strict"; var debug2 = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); var { safeRe: re2, t: t3 } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); var SemVer = class { constructor(version2, options) { options = parseOptions(options); if (version2 instanceof SemVer) { if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { return version2; } else { version2 = version2.version; } } else if (typeof version2 !== "string") { throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); } if (version2.length > MAX_LENGTH) { throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); } debug2("SemVer", version2, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; const m2 = version2.trim().match(options.loose ? re2[t3.LOOSE] : re2[t3.FULL]); if (!m2) { throw new TypeError(`Invalid Version: ${version2}`); } this.raw = version2; this.major = +m2[1]; this.minor = +m2[2]; this.patch = +m2[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m2[4]) { this.prerelease = []; } else { this.prerelease = m2[4].split(".").map((id) => { if (/^[0-9]+$/.test(id)) { const num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m2[5] ? m2[5].split(".") : []; this.format(); } format() { this.version = `${this.major}.${this.minor}.${this.patch}`; if (this.prerelease.length) { this.version += `-${this.prerelease.join(".")}`; } return this.version; } toString() { return this.version; } compare(other) { debug2("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { if (typeof other === "string" && other === this.version) { return 0; } other = new SemVer(other, this.options); } if (other.version === this.version) { return 0; } return this.compareMain(other) || this.comparePre(other); } compareMain(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.major < other.major) { return -1; } if (this.major > other.major) { return 1; } if (this.minor < other.minor) { return -1; } if (this.minor > other.minor) { return 1; } if (this.patch < other.patch) { return -1; } if (this.patch > other.patch) { return 1; } return 0; } comparePre(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } let i2 = 0; do { const a2 = this.prerelease[i2]; const b2 = other.prerelease[i2]; debug2("prerelease compare", i2, a2, b2); if (a2 === void 0 && b2 === void 0) { return 0; } else if (b2 === void 0) { return 1; } else if (a2 === void 0) { return -1; } else if (a2 === b2) { continue; } else { return compareIdentifiers(a2, b2); } } while (++i2); } compareBuild(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } let i2 = 0; do { const a2 = this.build[i2]; const b2 = other.build[i2]; debug2("build compare", i2, a2, b2); if (a2 === void 0 && b2 === void 0) { return 0; } else if (b2 === void 0) { return 1; } else if (a2 === void 0) { return -1; } else if (a2 === b2) { continue; } else { return compareIdentifiers(a2, b2); } } while (++i2); } inc(release, identifier, identifierBase) { if (release.startsWith("pre")) { if (!identifier && identifierBase === false) { throw new Error("invalid increment argument: identifier is empty"); } if (identifier) { const match = `-${identifier}`.match(this.options.loose ? re2[t3.PRERELEASELOOSE] : re2[t3.PRERELEASE]); if (!match || match[1] !== identifier) { throw new Error(`invalid identifier: ${identifier}`); } } } switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier, identifierBase); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier, identifierBase); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier, identifierBase); this.inc("pre", identifier, identifierBase); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier, identifierBase); } this.inc("pre", identifier, identifierBase); break; case "release": if (this.prerelease.length === 0) { throw new Error(`version ${this.raw} is not a prerelease`); } this.prerelease.length = 0; break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": { const base = Number(identifierBase) ? 1 : 0; if (this.prerelease.length === 0) { this.prerelease = [base]; } else { let i2 = this.prerelease.length; while (--i2 >= 0) { if (typeof this.prerelease[i2] === "number") { this.prerelease[i2]++; i2 = -2; } } if (i2 === -1) { if (identifier === this.prerelease.join(".") && identifierBase === false) { throw new Error("invalid increment argument: identifier already exists"); } this.prerelease.push(base); } } if (identifier) { let prerelease = [identifier, base]; if (identifierBase === false) { prerelease = [identifier]; } if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { this.prerelease = prerelease; } } else { this.prerelease = prerelease; } } break; } default: throw new Error(`invalid increment argument: ${release}`); } this.raw = this.format(); if (this.build.length) { this.raw += `+${this.build.join(".")}`; } return this; } }; module2.exports = SemVer; } }); // node_modules/semver/functions/parse.js var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var parse2 = (version2, options, throwErrors = false) => { if (version2 instanceof SemVer) { return version2; } try { return new SemVer(version2, options); } catch (er) { if (!throwErrors) { return null; } throw er; } }; module2.exports = parse2; } }); // node_modules/semver/functions/valid.js var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports, module2) { "use strict"; var parse2 = require_parse(); var valid2 = (version2, options) => { const v2 = parse2(version2, options); return v2 ? v2.version : null; }; module2.exports = valid2; } }); // node_modules/semver/functions/clean.js var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports, module2) { "use strict"; var parse2 = require_parse(); var clean = (version2, options) => { const s2 = parse2(version2.trim().replace(/^[=v]+/, ""), options); return s2 ? s2.version : null; }; module2.exports = clean; } }); // node_modules/semver/functions/inc.js var require_inc = __commonJS({ "node_modules/semver/functions/inc.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var inc = (version2, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; options = void 0; } try { return new SemVer(version2 instanceof SemVer ? version2.version : version2, options).inc(release, identifier, identifierBase).version; } catch (er) { return null; } }; module2.exports = inc; } }); // node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports, module2) { "use strict"; var parse2 = require_parse(); var diff = (version1, version2) => { const v1 = parse2(version1, null, true); const v2 = parse2(version2, null, true); const comparison = v1.compare(v2); if (comparison === 0) { return null; } const v1Higher = comparison > 0; const highVersion = v1Higher ? v1 : v2; const lowVersion = v1Higher ? v2 : v1; const highHasPre = !!highVersion.prerelease.length; const lowHasPre = !!lowVersion.prerelease.length; if (lowHasPre && !highHasPre) { if (!lowVersion.patch && !lowVersion.minor) { return "major"; } if (lowVersion.compareMain(highVersion) === 0) { if (lowVersion.minor && !lowVersion.patch) { return "minor"; } return "patch"; } } const prefix = highHasPre ? "pre" : ""; if (v1.major !== v2.major) { return prefix + "major"; } if (v1.minor !== v2.minor) { return prefix + "minor"; } if (v1.patch !== v2.patch) { return prefix + "patch"; } return "prerelease"; }; module2.exports = diff; } }); // node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var major = (a2, loose) => new SemVer(a2, loose).major; module2.exports = major; } }); // node_modules/semver/functions/minor.js var require_minor = __commonJS({ "node_modules/semver/functions/minor.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var minor = (a2, loose) => new SemVer(a2, loose).minor; module2.exports = minor; } }); // node_modules/semver/functions/patch.js var require_patch = __commonJS({ "node_modules/semver/functions/patch.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var patch = (a2, loose) => new SemVer(a2, loose).patch; module2.exports = patch; } }); // node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports, module2) { "use strict"; var parse2 = require_parse(); var prerelease = (version2, options) => { const parsed = parse2(version2, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; module2.exports = prerelease; } }); // node_modules/semver/functions/compare.js var require_compare = __commonJS({ "node_modules/semver/functions/compare.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var compare = (a2, b2, loose) => new SemVer(a2, loose).compare(new SemVer(b2, loose)); module2.exports = compare; } }); // node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ "node_modules/semver/functions/rcompare.js"(exports, module2) { "use strict"; var compare = require_compare(); var rcompare = (a2, b2, loose) => compare(b2, a2, loose); module2.exports = rcompare; } }); // node_modules/semver/functions/compare-loose.js var require_compare_loose = __commonJS({ "node_modules/semver/functions/compare-loose.js"(exports, module2) { "use strict"; var compare = require_compare(); var compareLoose = (a2, b2) => compare(a2, b2, true); module2.exports = compareLoose; } }); // node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ "node_modules/semver/functions/compare-build.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var compareBuild = (a2, b2, loose) => { const versionA = new SemVer(a2, loose); const versionB = new SemVer(b2, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }; module2.exports = compareBuild; } }); // node_modules/semver/functions/sort.js var require_sort = __commonJS({ "node_modules/semver/functions/sort.js"(exports, module2) { "use strict"; var compareBuild = require_compare_build(); var sort = (list, loose) => list.sort((a2, b2) => compareBuild(a2, b2, loose)); module2.exports = sort; } }); // node_modules/semver/functions/rsort.js var require_rsort = __commonJS({ "node_modules/semver/functions/rsort.js"(exports, module2) { "use strict"; var compareBuild = require_compare_build(); var rsort = (list, loose) => list.sort((a2, b2) => compareBuild(b2, a2, loose)); module2.exports = rsort; } }); // node_modules/semver/functions/gt.js var require_gt = __commonJS({ "node_modules/semver/functions/gt.js"(exports, module2) { "use strict"; var compare = require_compare(); var gt2 = (a2, b2, loose) => compare(a2, b2, loose) > 0; module2.exports = gt2; } }); // node_modules/semver/functions/lt.js var require_lt = __commonJS({ "node_modules/semver/functions/lt.js"(exports, module2) { "use strict"; var compare = require_compare(); var lt = (a2, b2, loose) => compare(a2, b2, loose) < 0; module2.exports = lt; } }); // node_modules/semver/functions/eq.js var require_eq = __commonJS({ "node_modules/semver/functions/eq.js"(exports, module2) { "use strict"; var compare = require_compare(); var eq = (a2, b2, loose) => compare(a2, b2, loose) === 0; module2.exports = eq; } }); // node_modules/semver/functions/neq.js var require_neq = __commonJS({ "node_modules/semver/functions/neq.js"(exports, module2) { "use strict"; var compare = require_compare(); var neq = (a2, b2, loose) => compare(a2, b2, loose) !== 0; module2.exports = neq; } }); // node_modules/semver/functions/gte.js var require_gte = __commonJS({ "node_modules/semver/functions/gte.js"(exports, module2) { "use strict"; var compare = require_compare(); var gte = (a2, b2, loose) => compare(a2, b2, loose) >= 0; module2.exports = gte; } }); // node_modules/semver/functions/lte.js var require_lte = __commonJS({ "node_modules/semver/functions/lte.js"(exports, module2) { "use strict"; var compare = require_compare(); var lte = (a2, b2, loose) => compare(a2, b2, loose) <= 0; module2.exports = lte; } }); // node_modules/semver/functions/cmp.js var require_cmp = __commonJS({ "node_modules/semver/functions/cmp.js"(exports, module2) { "use strict"; var eq = require_eq(); var neq = require_neq(); var gt2 = require_gt(); var gte = require_gte(); var lt = require_lt(); var lte = require_lte(); var cmp = (a2, op, b2, loose) => { switch (op) { case "===": if (typeof a2 === "object") { a2 = a2.version; } if (typeof b2 === "object") { b2 = b2.version; } return a2 === b2; case "!==": if (typeof a2 === "object") { a2 = a2.version; } if (typeof b2 === "object") { b2 = b2.version; } return a2 !== b2; case "": case "=": case "==": return eq(a2, b2, loose); case "!=": return neq(a2, b2, loose); case ">": return gt2(a2, b2, loose); case ">=": return gte(a2, b2, loose); case "<": return lt(a2, b2, loose); case "<=": return lte(a2, b2, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }; module2.exports = cmp; } }); // node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var parse2 = require_parse(); var { safeRe: re2, t: t3 } = require_re(); var coerce = (version2, options) => { if (version2 instanceof SemVer) { return version2; } if (typeof version2 === "number") { version2 = String(version2); } if (typeof version2 !== "string") { return null; } options = options || {}; let match = null; if (!options.rtl) { match = version2.match(options.includePrerelease ? re2[t3.COERCEFULL] : re2[t3.COERCE]); } else { const coerceRtlRegex = options.includePrerelease ? re2[t3.COERCERTLFULL] : re2[t3.COERCERTL]; let next; while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } coerceRtlRegex.lastIndex = -1; } if (match === null) { return null; } const major = match[2]; const minor = match[3] || "0"; const patch = match[4] || "0"; const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options); }; module2.exports = coerce; } }); // node_modules/semver/internal/lrucache.js var require_lrucache = __commonJS({ "node_modules/semver/internal/lrucache.js"(exports, module2) { "use strict"; var LRUCache = class { constructor() { this.max = 1e3; this.map = /* @__PURE__ */ new Map(); } get(key) { const value = this.map.get(key); if (value === void 0) { return void 0; } else { this.map.delete(key); this.map.set(key, value); return value; } } delete(key) { return this.map.delete(key); } set(key, value) { const deleted = this.delete(key); if (!deleted && value !== void 0) { if (this.map.size >= this.max) { const firstKey = this.map.keys().next().value; this.delete(firstKey); } this.map.set(key, value); } return this; } }; module2.exports = LRUCache; } }); // node_modules/semver/classes/range.js var require_range = __commonJS({ "node_modules/semver/classes/range.js"(exports, module2) { "use strict"; var SPACE_CHARACTERS = /\s+/g; var Range3 = class { constructor(range, options) { options = parseOptions(options); if (range instanceof Range3) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range3(range.raw, options); } } if (range instanceof Comparator) { this.raw = range.value; this.set = [[range]]; this.formatted = void 0; return this; } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range.trim().replace(SPACE_CHARACTERS, " "); this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c2) => c2.length); if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${this.raw}`); } if (this.set.length > 1) { const first = this.set[0]; this.set = this.set.filter((c2) => !isNullSet(c2[0])); if (this.set.length === 0) { this.set = [first]; } else if (this.set.length > 1) { for (const c2 of this.set) { if (c2.length === 1 && isAny(c2[0])) { this.set = [c2]; break; } } } } this.formatted = void 0; } get range() { if (this.formatted === void 0) { this.formatted = ""; for (let i2 = 0; i2 < this.set.length; i2++) { if (i2 > 0) { this.formatted += "||"; } const comps = this.set[i2]; for (let k2 = 0; k2 < comps.length; k2++) { if (k2 > 0) { this.formatted += " "; } this.formatted += comps[k2].toString().trim(); } } } return this.formatted; } format() { return this.range; } toString() { return this.range; } parseRange(range) { const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); const memoKey = memoOpts + ":" + range; const cached = cache.get(memoKey); if (cached) { return cached; } const loose = this.options.loose; const hr = loose ? re2[t3.HYPHENRANGELOOSE] : re2[t3.HYPHENRANGE]; range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); debug2("hyphen replace", range); range = range.replace(re2[t3.COMPARATORTRIM], comparatorTrimReplace); debug2("comparator trim", range); range = range.replace(re2[t3.TILDETRIM], tildeTrimReplace); debug2("tilde trim", range); range = range.replace(re2[t3.CARETTRIM], caretTrimReplace); debug2("caret trim", range); let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) { rangeList = rangeList.filter((comp) => { debug2("loose invalid filter", comp, this.options); return !!comp.match(re2[t3.COMPARATORLOOSE]); }); } debug2("range list", rangeList); const rangeMap = /* @__PURE__ */ new Map(); const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); for (const comp of comparators) { if (isNullSet(comp)) { return [comp]; } rangeMap.set(comp.value, comp); } if (rangeMap.size > 1 && rangeMap.has("")) { rangeMap.delete(""); } const result = [...rangeMap.values()]; cache.set(memoKey, result); return result; } intersects(range, options) { if (!(range instanceof Range3)) { throw new TypeError("a Range is required"); } return this.set.some((thisComparators) => { return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options); }); }); }); }); } test(version2) { if (!version2) { return false; } if (typeof version2 === "string") { try { version2 = new SemVer(version2, this.options); } catch (er) { return false; } } for (let i2 = 0; i2 < this.set.length; i2++) { if (testSet(this.set[i2], version2, this.options)) { return true; } } return false; } }; module2.exports = Range3; var LRU = require_lrucache(); var cache = new LRU(); var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug2 = require_debug(); var SemVer = require_semver(); var { safeRe: re2, t: t3, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); var isNullSet = (c2) => c2.value === "<0.0.0-0"; var isAny = (c2) => c2.value === ""; var isSatisfiable = (comparators, options) => { let result = true; const remainingComparators = comparators.slice(); let testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; }; var parseComparator = (comp, options) => { comp = comp.replace(re2[t3.BUILD], ""); debug2("comp", comp, options); comp = replaceCarets(comp, options); debug2("caret", comp); comp = replaceTildes(comp, options); debug2("tildes", comp); comp = replaceXRanges(comp, options); debug2("xrange", comp); comp = replaceStars(comp, options); debug2("stars", comp); return comp; }; var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; var replaceTildes = (comp, options) => { return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" "); }; var replaceTilde = (comp, options) => { const r2 = options.loose ? re2[t3.TILDELOOSE] : re2[t3.TILDE]; return comp.replace(r2, (_2, M2, m2, p2, pr) => { debug2("tilde", comp, _2, M2, m2, p2, pr); let ret; if (isX(M2)) { ret = ""; } else if (isX(m2)) { ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`; } else if (isX(p2)) { ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`; } else if (pr) { debug2("replaceTilde pr", pr); ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${+m2 + 1}.0-0`; } else { ret = `>=${M2}.${m2}.${p2} <${M2}.${+m2 + 1}.0-0`; } debug2("tilde return", ret); return ret; }); }; var replaceCarets = (comp, options) => { return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" "); }; var replaceCaret = (comp, options) => { debug2("caret", comp, options); const r2 = options.loose ? re2[t3.CARETLOOSE] : re2[t3.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r2, (_2, M2, m2, p2, pr) => { debug2("caret", comp, _2, M2, m2, p2, pr); let ret; if (isX(M2)) { ret = ""; } else if (isX(m2)) { ret = `>=${M2}.0.0${z} <${+M2 + 1}.0.0-0`; } else if (isX(p2)) { if (M2 === "0") { ret = `>=${M2}.${m2}.0${z} <${M2}.${+m2 + 1}.0-0`; } else { ret = `>=${M2}.${m2}.0${z} <${+M2 + 1}.0.0-0`; } } else if (pr) { debug2("replaceCaret pr", pr); if (M2 === "0") { if (m2 === "0") { ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${m2}.${+p2 + 1}-0`; } else { ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${+m2 + 1}.0-0`; } } else { ret = `>=${M2}.${m2}.${p2}-${pr} <${+M2 + 1}.0.0-0`; } } else { debug2("no pr"); if (M2 === "0") { if (m2 === "0") { ret = `>=${M2}.${m2}.${p2}${z} <${M2}.${m2}.${+p2 + 1}-0`; } else { ret = `>=${M2}.${m2}.${p2}${z} <${M2}.${+m2 + 1}.0-0`; } } else { ret = `>=${M2}.${m2}.${p2} <${+M2 + 1}.0.0-0`; } } debug2("caret return", ret); return ret; }); }; var replaceXRanges = (comp, options) => { debug2("replaceXRanges", comp, options); return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" "); }; var replaceXRange = (comp, options) => { comp = comp.trim(); const r2 = options.loose ? re2[t3.XRANGELOOSE] : re2[t3.XRANGE]; return comp.replace(r2, (ret, gtlt, M2, m2, p2, pr) => { debug2("xRange", comp, ret, gtlt, M2, m2, p2, pr); const xM = isX(M2); const xm = xM || isX(m2); const xp = xm || isX(p2); const anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m2 = 0; } p2 = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M2 = +M2 + 1; m2 = 0; p2 = 0; } else { m2 = +m2 + 1; p2 = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M2 = +M2 + 1; } else { m2 = +m2 + 1; } } if (gtlt === "<") { pr = "-0"; } ret = `${gtlt + M2}.${m2}.${p2}${pr}`; } else if (xm) { ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`; } else if (xp) { ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`; } debug2("xRange return", ret); return ret; }); }; var replaceStars = (comp, options) => { debug2("replaceStars", comp, options); return comp.trim().replace(re2[t3.STAR], ""); }; var replaceGTE0 = (comp, options) => { debug2("replaceGTE0", comp, options); return comp.trim().replace(re2[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], ""); }; var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = `>=${fM}.0.0${incPr ? "-0" : ""}`; } else if (isX(fp)) { from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; } else if (fpr) { from = `>=${from}`; } else { from = `>=${from}${incPr ? "-0" : ""}`; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = `<${+tM + 1}.0.0-0`; } else if (isX(tp)) { to = `<${tM}.${+tm + 1}.0-0`; } else if (tpr) { to = `<=${tM}.${tm}.${tp}-${tpr}`; } else if (incPr) { to = `<${tM}.${tm}.${+tp + 1}-0`; } else { to = `<=${to}`; } return `${from} ${to}`.trim(); }; var testSet = (set, version2, options) => { for (let i2 = 0; i2 < set.length; i2++) { if (!set[i2].test(version2)) { return false; } } if (version2.prerelease.length && !options.includePrerelease) { for (let i2 = 0; i2 < set.length; i2++) { debug2(set[i2].semver); if (set[i2].semver === Comparator.ANY) { continue; } if (set[i2].semver.prerelease.length > 0) { const allowed = set[i2].semver; if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { return true; } } } return false; } return true; }; } }); // node_modules/semver/classes/comparator.js var require_comparator = __commonJS({ "node_modules/semver/classes/comparator.js"(exports, module2) { "use strict"; var ANY = Symbol("SemVer ANY"); var Comparator = class { static get ANY() { return ANY; } constructor(comp, options) { options = parseOptions(options); if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } comp = comp.trim().split(/\s+/).join(" "); debug2("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug2("comp", this); } parse(comp) { const r2 = this.options.loose ? re2[t3.COMPARATORLOOSE] : re2[t3.COMPARATOR]; const m2 = comp.match(r2); if (!m2) { throw new TypeError(`Invalid comparator: ${comp}`); } this.operator = m2[1] !== void 0 ? m2[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m2[2]) { this.semver = ANY; } else { this.semver = new SemVer(m2[2], this.options.loose); } } toString() { return this.value; } test(version2) { debug2("Comparator.test", version2, this.options.loose); if (this.semver === ANY || version2 === ANY) { return true; } if (typeof version2 === "string") { try { version2 = new SemVer(version2, this.options); } catch (er) { return false; } } return cmp(version2, this.operator, this.semver, this.options); } intersects(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (this.operator === "") { if (this.value === "") { return true; } return new Range3(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") { return true; } return new Range3(this.value, options).test(comp.semver); } options = parseOptions(options); if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { return false; } if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { return false; } if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { return true; } if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { return true; } if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { return true; } if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { return true; } if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { return true; } return false; } }; module2.exports = Comparator; var parseOptions = require_parse_options(); var { safeRe: re2, t: t3 } = require_re(); var cmp = require_cmp(); var debug2 = require_debug(); var SemVer = require_semver(); var Range3 = require_range(); } }); // node_modules/semver/functions/satisfies.js var require_satisfies = __commonJS({ "node_modules/semver/functions/satisfies.js"(exports, module2) { "use strict"; var Range3 = require_range(); var satisfies = (version2, range, options) => { try { range = new Range3(range, options); } catch (er) { return false; } return range.test(version2); }; module2.exports = satisfies; } }); // node_modules/semver/ranges/to-comparators.js var require_to_comparators = __commonJS({ "node_modules/semver/ranges/to-comparators.js"(exports, module2) { "use strict"; var Range3 = require_range(); var toComparators = (range, options) => new Range3(range, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" ")); module2.exports = toComparators; } }); // node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var Range3 = require_range(); var maxSatisfying = (versions, range, options) => { let max3 = null; let maxSV = null; let rangeObj = null; try { rangeObj = new Range3(range, options); } catch (er) { return null; } versions.forEach((v2) => { if (rangeObj.test(v2)) { if (!max3 || maxSV.compare(v2) === -1) { max3 = v2; maxSV = new SemVer(max3, options); } } }); return max3; }; module2.exports = maxSatisfying; } }); // node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = __commonJS({ "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var Range3 = require_range(); var minSatisfying = (versions, range, options) => { let min4 = null; let minSV = null; let rangeObj = null; try { rangeObj = new Range3(range, options); } catch (er) { return null; } versions.forEach((v2) => { if (rangeObj.test(v2)) { if (!min4 || minSV.compare(v2) === 1) { min4 = v2; minSV = new SemVer(min4, options); } } }); return min4; }; module2.exports = minSatisfying; } }); // node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ "node_modules/semver/ranges/min-version.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var Range3 = require_range(); var gt2 = require_gt(); var minVersion = (range, loose) => { range = new Range3(range, loose); let minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (let i2 = 0; i2 < range.set.length; ++i2) { const comparators = range.set[i2]; let setMin = null; comparators.forEach((comparator) => { const compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!setMin || gt2(compver, setMin)) { setMin = compver; } break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); if (setMin && (!minver || gt2(minver, setMin))) { minver = setMin; } } if (minver && range.test(minver)) { return minver; } return null; }; module2.exports = minVersion; } }); // node_modules/semver/ranges/valid.js var require_valid2 = __commonJS({ "node_modules/semver/ranges/valid.js"(exports, module2) { "use strict"; var Range3 = require_range(); var validRange = (range, options) => { try { return new Range3(range, options).range || "*"; } catch (er) { return null; } }; module2.exports = validRange; } }); // node_modules/semver/ranges/outside.js var require_outside = __commonJS({ "node_modules/semver/ranges/outside.js"(exports, module2) { "use strict"; var SemVer = require_semver(); var Comparator = require_comparator(); var { ANY } = Comparator; var Range3 = require_range(); var satisfies = require_satisfies(); var gt2 = require_gt(); var lt = require_lt(); var lte = require_lte(); var gte = require_gte(); var outside = (version2, range, hilo, options) => { version2 = new SemVer(version2, options); range = new Range3(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt2; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt2; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version2, range, options)) { return false; } for (let i2 = 0; i2 < range.set.length; ++i2) { const comparators = range.set[i2]; let high = null; let low = null; comparators.forEach((comparator) => { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version2, low.semver)) { return false; } } return true; }; module2.exports = outside; } }); // node_modules/semver/ranges/gtr.js var require_gtr = __commonJS({ "node_modules/semver/ranges/gtr.js"(exports, module2) { "use strict"; var outside = require_outside(); var gtr = (version2, range, options) => outside(version2, range, ">", options); module2.exports = gtr; } }); // node_modules/semver/ranges/ltr.js var require_ltr = __commonJS({ "node_modules/semver/ranges/ltr.js"(exports, module2) { "use strict"; var outside = require_outside(); var ltr = (version2, range, options) => outside(version2, range, "<", options); module2.exports = ltr; } }); // node_modules/semver/ranges/intersects.js var require_intersects = __commonJS({ "node_modules/semver/ranges/intersects.js"(exports, module2) { "use strict"; var Range3 = require_range(); var intersects = (r1, r2, options) => { r1 = new Range3(r1, options); r2 = new Range3(r2, options); return r1.intersects(r2, options); }; module2.exports = intersects; } }); // node_modules/semver/ranges/simplify.js var require_simplify = __commonJS({ "node_modules/semver/ranges/simplify.js"(exports, module2) { "use strict"; var satisfies = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range, options) => { const set = []; let first = null; let prev = null; const v2 = versions.sort((a2, b2) => compare(a2, b2, options)); for (const version2 of v2) { const included = satisfies(version2, range, options); if (included) { prev = version2; if (!first) { first = version2; } } else { if (prev) { set.push([first, prev]); } prev = null; first = null; } } if (first) { set.push([first, null]); } const ranges = []; for (const [min4, max3] of set) { if (min4 === max3) { ranges.push(min4); } else if (!max3 && min4 === v2[0]) { ranges.push("*"); } else if (!max3) { ranges.push(`>=${min4}`); } else if (min4 === v2[0]) { ranges.push(`<=${max3}`); } else { ranges.push(`${min4} - ${max3}`); } } const simplified = ranges.join(" || "); const original = typeof range.raw === "string" ? range.raw : String(range); return simplified.length < original.length ? simplified : range; }; } }); // node_modules/semver/ranges/subset.js var require_subset = __commonJS({ "node_modules/semver/ranges/subset.js"(exports, module2) { "use strict"; var Range3 = require_range(); var Comparator = require_comparator(); var { ANY } = Comparator; var satisfies = require_satisfies(); var compare = require_compare(); var subset = (sub, dom, options = {}) => { if (sub === dom) { return true; } sub = new Range3(sub, options); dom = new Range3(dom, options); let sawNonNull = false; OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options); sawNonNull = sawNonNull || isSub !== null; if (isSub) { continue OUTER; } } if (sawNonNull) { return false; } } return true; }; var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; var minimumVersion = [new Comparator(">=0.0.0")]; var simpleSubset = (sub, dom, options) => { if (sub === dom) { return true; } if (sub.length === 1 && sub[0].semver === ANY) { if (dom.length === 1 && dom[0].semver === ANY) { return true; } else if (options.includePrerelease) { sub = minimumVersionWithPreRelease; } else { sub = minimumVersion; } } if (dom.length === 1 && dom[0].semver === ANY) { if (options.includePrerelease) { return true; } else { dom = minimumVersion; } } const eqSet = /* @__PURE__ */ new Set(); let gt2, lt; for (const c2 of sub) { if (c2.operator === ">" || c2.operator === ">=") { gt2 = higherGT(gt2, c2, options); } else if (c2.operator === "<" || c2.operator === "<=") { lt = lowerLT(lt, c2, options); } else { eqSet.add(c2.semver); } } if (eqSet.size > 1) { return null; } let gtltComp; if (gt2 && lt) { gtltComp = compare(gt2.semver, lt.semver, options); if (gtltComp > 0) { return null; } else if (gtltComp === 0 && (gt2.operator !== ">=" || lt.operator !== "<=")) { return null; } } for (const eq of eqSet) { if (gt2 && !satisfies(eq, String(gt2), options)) { return null; } if (lt && !satisfies(eq, String(lt), options)) { return null; } for (const c2 of dom) { if (!satisfies(eq, String(c2), options)) { return false; } } return true; } let higher, lower; let hasDomLT, hasDomGT; let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false; if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { needDomLTPre = false; } for (const c2 of dom) { hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">="; hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<="; if (gt2) { if (needDomGTPre) { if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) { needDomGTPre = false; } } if (c2.operator === ">" || c2.operator === ">=") { higher = higherGT(gt2, c2, options); if (higher === c2 && higher !== gt2) { return false; } } else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c2), options)) { return false; } } if (lt) { if (needDomLTPre) { if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomLTPre.major && c2.semver.minor === needDomLTPre.minor && c2.semver.patch === needDomLTPre.patch) { needDomLTPre = false; } } if (c2.operator === "<" || c2.operator === "<=") { lower = lowerLT(lt, c2, options); if (lower === c2 && lower !== lt) { return false; } } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c2), options)) { return false; } } if (!c2.operator && (lt || gt2) && gtltComp !== 0) { return false; } } if (gt2 && hasDomLT && !lt && gtltComp !== 0) { return false; } if (lt && hasDomGT && !gt2 && gtltComp !== 0) { return false; } if (needDomGTPre || needDomLTPre) { return false; } return true; }; var higherGT = (a2, b2, options) => { if (!a2) { return b2; } const comp = compare(a2.semver, b2.semver, options); return comp > 0 ? a2 : comp < 0 ? b2 : b2.operator === ">" && a2.operator === ">=" ? b2 : a2; }; var lowerLT = (a2, b2, options) => { if (!a2) { return b2; } const comp = compare(a2.semver, b2.semver, options); return comp < 0 ? a2 : comp > 0 ? b2 : b2.operator === "<" && a2.operator === "<=" ? b2 : a2; }; module2.exports = subset; } }); // node_modules/semver/index.js var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports, module2) { "use strict"; var internalRe = require_re(); var constants = require_constants(); var SemVer = require_semver(); var identifiers = require_identifiers(); var parse2 = require_parse(); var valid2 = require_valid(); var clean = require_clean(); var inc = require_inc(); var diff = require_diff(); var major = require_major(); var minor = require_minor(); var patch = require_patch(); var prerelease = require_prerelease(); var compare = require_compare(); var rcompare = require_rcompare(); var compareLoose = require_compare_loose(); var compareBuild = require_compare_build(); var sort = require_sort(); var rsort = require_rsort(); var gt2 = require_gt(); var lt = require_lt(); var eq = require_eq(); var neq = require_neq(); var gte = require_gte(); var lte = require_lte(); var cmp = require_cmp(); var coerce = require_coerce(); var Comparator = require_comparator(); var Range3 = require_range(); var satisfies = require_satisfies(); var toComparators = require_to_comparators(); var maxSatisfying = require_max_satisfying(); var minSatisfying = require_min_satisfying(); var minVersion = require_min_version(); var validRange = require_valid2(); var outside = require_outside(); var gtr = require_gtr(); var ltr = require_ltr(); var intersects = require_intersects(); var simplifyRange = require_simplify(); var subset = require_subset(); module2.exports = { parse: parse2, valid: valid2, clean, inc, diff, major, minor, patch, prerelease, compare, rcompare, compareLoose, compareBuild, sort, rsort, gt: gt2, lt, eq, neq, gte, lte, cmp, coerce, Comparator, Range: Range3, satisfies, toComparators, maxSatisfying, minSatisfying, minVersion, validRange, outside, gtr, ltr, intersects, simplifyRange, subset, SemVer, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, RELEASE_TYPES: constants.RELEASE_TYPES, compareIdentifiers: identifiers.compareIdentifiers, rcompareIdentifiers: identifiers.rcompareIdentifiers }; } }); // node_modules/jotai/esm/vanilla.mjs function atom(read2, write2) { const key = `atom${++keyCount}`; const config = { toString() { return (import_meta.env ? import_meta.env.MODE : void 0) !== "production" && this.debugLabel ? key + ":" + this.debugLabel : key; } }; if (typeof read2 === "function") { config.read = read2; } else { config.init = read2; config.read = defaultRead; config.write = defaultWrite; } if (write2) { config.write = write2; } return config; } function defaultRead(get) { return get(this); } function defaultWrite(get, set, arg) { return set(this, typeof arg === "function" ? arg(get(this)) : arg); } var import_meta, keyCount, isSelfAtom, hasInitialValue, isActuallyWritableAtom, CONTINUE_PROMISE, PENDING, FULFILLED, REJECTED, isContinuablePromise, continuablePromiseMap, createContinuablePromise, isPromiseLike, isAtomStateInitialized, returnAtomValue, getPendingContinuablePromise, addPendingContinuablePromiseToDependency, addDependency, createPending, addPendingAtom, addPendingDependent, getPendingDependents, addPendingFunction, flushPending, buildStore, createStore, defaultStore, getDefaultStore; var init_vanilla = __esm({ "node_modules/jotai/esm/vanilla.mjs"() { import_meta = {}; keyCount = 0; isSelfAtom = (atom3, a2) => atom3.unstable_is ? atom3.unstable_is(a2) : a2 === atom3; hasInitialValue = (atom3) => "init" in atom3; isActuallyWritableAtom = (atom3) => !!atom3.write; CONTINUE_PROMISE = Symbol((import_meta.env ? import_meta.env.MODE : void 0) !== "production" ? "CONTINUE_PROMISE" : ""); PENDING = "pending"; FULFILLED = "fulfilled"; REJECTED = "rejected"; isContinuablePromise = (promise) => typeof promise === "object" && promise !== null && CONTINUE_PROMISE in promise; continuablePromiseMap = /* @__PURE__ */ new WeakMap(); createContinuablePromise = (promise, abort, complete) => { if (!continuablePromiseMap.has(promise)) { let continuePromise; const p2 = new Promise((resolve, reject) => { let curr = promise; const onFulfilled = (me) => (v2) => { if (curr === me) { p2.status = FULFILLED; p2.value = v2; resolve(v2); complete(); } }; const onRejected = (me) => (e2) => { if (curr === me) { p2.status = REJECTED; p2.reason = e2; reject(e2); complete(); } }; promise.then(onFulfilled(promise), onRejected(promise)); continuePromise = (nextPromise, nextAbort) => { if (nextPromise) { continuablePromiseMap.set(nextPromise, p2); curr = nextPromise; nextPromise.then(onFulfilled(nextPromise), onRejected(nextPromise)); abort(); abort = nextAbort; } }; }); p2.status = PENDING; p2[CONTINUE_PROMISE] = continuePromise; continuablePromiseMap.set(promise, p2); } return continuablePromiseMap.get(promise); }; isPromiseLike = (x2) => typeof (x2 == null ? void 0 : x2.then) === "function"; isAtomStateInitialized = (atomState) => "v" in atomState || "e" in atomState; returnAtomValue = (atomState) => { if ("e" in atomState) { throw atomState.e; } if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production" && !("v" in atomState)) { throw new Error("[Bug] atom state is not initialized"); } return atomState.v; }; getPendingContinuablePromise = (atomState) => { const value = atomState.v; if (isContinuablePromise(value) && value.status === PENDING) { return value; } return null; }; addPendingContinuablePromiseToDependency = (atom3, promise, dependencyAtomState) => { if (!dependencyAtomState.p.has(atom3)) { dependencyAtomState.p.add(atom3); promise.then(() => { dependencyAtomState.p.delete(atom3); }, () => { dependencyAtomState.p.delete(atom3); }); } }; addDependency = (pending, atom3, atomState, a2, aState) => { var _a; if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production" && a2 === atom3) { throw new Error("[Bug] atom cannot depend on itself"); } atomState.d.set(a2, aState.n); const continuablePromise = getPendingContinuablePromise(atomState); if (continuablePromise) { addPendingContinuablePromiseToDependency(atom3, continuablePromise, aState); } (_a = aState.m) == null ? void 0 : _a.t.add(atom3); if (pending) { addPendingDependent(pending, a2, atom3); } }; createPending = () => [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set()]; addPendingAtom = (pending, atom3, atomState) => { if (!pending[0].has(atom3)) { pending[0].set(atom3, /* @__PURE__ */ new Set()); } pending[1].set(atom3, atomState); }; addPendingDependent = (pending, atom3, dependent) => { const dependents = pending[0].get(atom3); if (dependents) { dependents.add(dependent); } }; getPendingDependents = (pending, atom3) => pending[0].get(atom3); addPendingFunction = (pending, fn3) => { pending[2].add(fn3); }; flushPending = (pending) => { while (pending[1].size || pending[2].size) { pending[0].clear(); const atomStates = new Set(pending[1].values()); pending[1].clear(); const functions = new Set(pending[2]); pending[2].clear(); atomStates.forEach((atomState) => { var _a; return (_a = atomState.m) == null ? void 0 : _a.l.forEach((l2) => l2()); }); functions.forEach((fn3) => fn3()); } }; buildStore = (getAtomState) => { let debugMountedAtoms; if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") { debugMountedAtoms = /* @__PURE__ */ new Set(); } const setAtomStateValueOrPromise = (atom3, atomState, valueOrPromise, abortPromise = () => { }, completePromise = () => { }) => { const hasPrevValue = "v" in atomState; const prevValue = atomState.v; const pendingPromise = getPendingContinuablePromise(atomState); if (isPromiseLike(valueOrPromise)) { if (pendingPromise) { if (pendingPromise !== valueOrPromise) { pendingPromise[CONTINUE_PROMISE](valueOrPromise, abortPromise); ++atomState.n; } } else { const continuablePromise = createContinuablePromise(valueOrPromise, abortPromise, completePromise); if (continuablePromise.status === PENDING) { for (const a2 of atomState.d.keys()) { addPendingContinuablePromiseToDependency(atom3, continuablePromise, getAtomState(a2, atomState)); } } atomState.v = continuablePromise; delete atomState.e; } } else { if (pendingPromise) { pendingPromise[CONTINUE_PROMISE](Promise.resolve(valueOrPromise), abortPromise); } atomState.v = valueOrPromise; delete atomState.e; } if (!hasPrevValue || !Object.is(prevValue, atomState.v)) { ++atomState.n; } }; const readAtomState = (pending, atom3, atomState, force) => { if (!(force == null ? void 0 : force(atom3)) && isAtomStateInitialized(atomState)) { if (atomState.m) { return atomState; } if (Array.from(atomState.d).every(([a2, n2]) => readAtomState(pending, a2, getAtomState(a2, atomState), force).n === n2)) { return atomState; } } atomState.d.clear(); let isSync = true; const getter = (a2) => { if (isSelfAtom(atom3, a2)) { const aState2 = getAtomState(a2, atomState); if (!isAtomStateInitialized(aState2)) { if (hasInitialValue(a2)) { setAtomStateValueOrPromise(a2, aState2, a2.init); } else { throw new Error("no atom init"); } } return returnAtomValue(aState2); } const aState = readAtomState(pending, a2, getAtomState(a2, atomState), force); if (isSync) { addDependency(pending, atom3, atomState, a2, aState); } else { const pending2 = createPending(); addDependency(pending2, atom3, atomState, a2, aState); mountDependencies(pending2, atom3, atomState); flushPending(pending2); } return returnAtomValue(aState); }; let controller; let setSelf; const options = { get signal() { if (!controller) { controller = new AbortController(); } return controller.signal; }, get setSelf() { if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production" && !isActuallyWritableAtom(atom3)) { console.warn("setSelf function cannot be used with read-only atom"); } if (!setSelf && isActuallyWritableAtom(atom3)) { setSelf = (...args) => { if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production" && isSync) { console.warn("setSelf function cannot be called in sync"); } if (!isSync) { return writeAtom(atom3, ...args); } }; } return setSelf; } }; try { const valueOrPromise = atom3.read(getter, options); setAtomStateValueOrPromise(atom3, atomState, valueOrPromise, () => controller == null ? void 0 : controller.abort(), () => { if (atomState.m) { const pending2 = createPending(); mountDependencies(pending2, atom3, atomState); flushPending(pending2); } }); return atomState; } catch (error2) { delete atomState.v; atomState.e = error2; ++atomState.n; return atomState; } finally { isSync = false; } }; const readAtom = (atom3) => returnAtomValue(readAtomState(void 0, atom3, getAtomState(atom3))); const getDependents = (pending, atom3, atomState) => { var _a, _b; const dependents = /* @__PURE__ */ new Map(); for (const a2 of ((_a = atomState.m) == null ? void 0 : _a.t) || []) { dependents.set(a2, getAtomState(a2, atomState)); } for (const atomWithPendingContinuablePromise of atomState.p) { dependents.set(atomWithPendingContinuablePromise, getAtomState(atomWithPendingContinuablePromise, atomState)); } (_b = getPendingDependents(pending, atom3)) == null ? void 0 : _b.forEach((dependent) => { dependents.set(dependent, getAtomState(dependent, atomState)); }); return dependents; }; const recomputeDependents = (pending, atom3, atomState) => { const topsortedAtoms = []; const markedAtoms = /* @__PURE__ */ new Set(); const visit = (a2, aState) => { if (markedAtoms.has(a2)) { return; } markedAtoms.add(a2); for (const [d2, s2] of getDependents(pending, a2, aState)) { if (a2 !== d2) { visit(d2, s2); } } topsortedAtoms.push([a2, aState, aState.n]); }; visit(atom3, atomState); const changedAtoms = /* @__PURE__ */ new Set([atom3]); const isMarked = (a2) => markedAtoms.has(a2); for (let i2 = topsortedAtoms.length - 1; i2 >= 0; --i2) { const [a2, aState, prevEpochNumber] = topsortedAtoms[i2]; let hasChangedDeps = false; for (const dep of aState.d.keys()) { if (dep !== a2 && changedAtoms.has(dep)) { hasChangedDeps = true; break; } } if (hasChangedDeps) { readAtomState(pending, a2, aState, isMarked); mountDependencies(pending, a2, aState); if (prevEpochNumber !== aState.n) { addPendingAtom(pending, a2, aState); changedAtoms.add(a2); } } markedAtoms.delete(a2); } }; const writeAtomState = (pending, atom3, atomState, ...args) => { const getter = (a2) => returnAtomValue(readAtomState(pending, a2, getAtomState(a2, atomState))); const setter = (a2, ...args2) => { const aState = getAtomState(a2, atomState); let r2; if (isSelfAtom(atom3, a2)) { if (!hasInitialValue(a2)) { throw new Error("atom not writable"); } const hasPrevValue = "v" in aState; const prevValue = aState.v; const v2 = args2[0]; setAtomStateValueOrPromise(a2, aState, v2); mountDependencies(pending, a2, aState); if (!hasPrevValue || !Object.is(prevValue, aState.v)) { addPendingAtom(pending, a2, aState); recomputeDependents(pending, a2, aState); } } else { r2 = writeAtomState(pending, a2, aState, ...args2); } flushPending(pending); return r2; }; const result = atom3.write(getter, setter, ...args); return result; }; const writeAtom = (atom3, ...args) => { const pending = createPending(); const result = writeAtomState(pending, atom3, getAtomState(atom3), ...args); flushPending(pending); return result; }; const mountDependencies = (pending, atom3, atomState) => { if (atomState.m && !getPendingContinuablePromise(atomState)) { for (const a2 of atomState.d.keys()) { if (!atomState.m.d.has(a2)) { const aMounted = mountAtom(pending, a2, getAtomState(a2, atomState)); aMounted.t.add(atom3); atomState.m.d.add(a2); } } for (const a2 of atomState.m.d || []) { if (!atomState.d.has(a2)) { atomState.m.d.delete(a2); const aMounted = unmountAtom(pending, a2, getAtomState(a2, atomState)); aMounted == null ? void 0 : aMounted.t.delete(atom3); } } } }; const mountAtom = (pending, atom3, atomState) => { if (!atomState.m) { readAtomState(pending, atom3, atomState); for (const a2 of atomState.d.keys()) { const aMounted = mountAtom(pending, a2, getAtomState(a2, atomState)); aMounted.t.add(atom3); } atomState.m = { l: /* @__PURE__ */ new Set(), d: new Set(atomState.d.keys()), t: /* @__PURE__ */ new Set() }; if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") { debugMountedAtoms.add(atom3); } if (isActuallyWritableAtom(atom3) && atom3.onMount) { const mounted = atomState.m; const { onMount: onMount2 } = atom3; addPendingFunction(pending, () => { const onUnmount = onMount2((...args) => writeAtomState(pending, atom3, atomState, ...args)); if (onUnmount) { mounted.u = onUnmount; } }); } } return atomState.m; }; const unmountAtom = (pending, atom3, atomState) => { if (atomState.m && !atomState.m.l.size && !Array.from(atomState.m.t).some((a2) => { var _a; return (_a = getAtomState(a2, atomState).m) == null ? void 0 : _a.d.has(atom3); })) { const onUnmount = atomState.m.u; if (onUnmount) { addPendingFunction(pending, onUnmount); } delete atomState.m; if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") { debugMountedAtoms.delete(atom3); } for (const a2 of atomState.d.keys()) { const aMounted = unmountAtom(pending, a2, getAtomState(a2, atomState)); aMounted == null ? void 0 : aMounted.t.delete(atom3); } const pendingPromise = getPendingContinuablePromise(atomState); if (pendingPromise) { pendingPromise[CONTINUE_PROMISE](void 0, () => { }); } return void 0; } return atomState.m; }; const subscribeAtom = (atom3, listener) => { const pending = createPending(); const atomState = getAtomState(atom3); const mounted = mountAtom(pending, atom3, atomState); flushPending(pending); const listeners = mounted.l; listeners.add(listener); return () => { listeners.delete(listener); const pending2 = createPending(); unmountAtom(pending2, atom3, atomState); flushPending(pending2); }; }; const unstable_derive = (fn3) => buildStore(...fn3(getAtomState)); const store = { get: readAtom, set: writeAtom, sub: subscribeAtom, unstable_derive }; if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") { const devStore = { dev4_get_internal_weak_map: () => ({ get: (atom3) => { const atomState = getAtomState(atom3); if (atomState.n === 0) { return void 0; } return atomState; } }), dev4_get_mounted_atoms: () => debugMountedAtoms, dev4_restore_atoms: (values) => { const pending = createPending(); for (const [atom3, value] of values) { if (hasInitialValue(atom3)) { const atomState = getAtomState(atom3); const hasPrevValue = "v" in atomState; const prevValue = atomState.v; setAtomStateValueOrPromise(atom3, atomState, value); mountDependencies(pending, atom3, atomState); if (!hasPrevValue || !Object.is(prevValue, atomState.v)) { addPendingAtom(pending, atom3, atomState); recomputeDependents(pending, atom3, atomState); } } } flushPending(pending); } }; Object.assign(store, devStore); } return store; }; createStore = () => { const atomStateMap = /* @__PURE__ */ new WeakMap(); const getAtomState = (atom3) => { let atomState = atomStateMap.get(atom3); if (!atomState) { atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 }; atomStateMap.set(atom3, atomState); } return atomState; }; return buildStore(getAtomState); }; getDefaultStore = () => { if (!defaultStore) { defaultStore = createStore(); if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") { globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore); if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) { console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"); } } } return defaultStore; }; } }); // node_modules/react/cjs/react.production.min.js var require_react_production_min = __commonJS({ "node_modules/react/cjs/react.production.min.js"(exports) { "use strict"; var l2 = Symbol.for("react.element"); var n2 = Symbol.for("react.portal"); var p2 = Symbol.for("react.fragment"); var q = Symbol.for("react.strict_mode"); var r2 = Symbol.for("react.profiler"); var t3 = Symbol.for("react.provider"); var u2 = Symbol.for("react.context"); var v2 = Symbol.for("react.forward_ref"); var w2 = Symbol.for("react.suspense"); var x2 = Symbol.for("react.memo"); var y2 = Symbol.for("react.lazy"); var z = Symbol.iterator; function A2(a2) { if (a2 === null || typeof a2 !== "object") return null; a2 = z && a2[z] || a2["@@iterator"]; return typeof a2 === "function" ? a2 : null; } var B = { isMounted: function() { return false; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }; var C2 = Object.assign; var D2 = {}; function E2(a2, b2, e2) { this.props = a2; this.context = b2; this.refs = D2; this.updater = e2 || B; } E2.prototype.isReactComponent = {}; E2.prototype.setState = function(a2, b2) { if (typeof a2 !== "object" && typeof a2 !== "function" && a2 != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); this.updater.enqueueSetState(this, a2, b2, "setState"); }; E2.prototype.forceUpdate = function(a2) { this.updater.enqueueForceUpdate(this, a2, "forceUpdate"); }; function F2() { } F2.prototype = E2.prototype; function G(a2, b2, e2) { this.props = a2; this.context = b2; this.refs = D2; this.updater = e2 || B; } var H = G.prototype = new F2(); H.constructor = G; C2(H, E2.prototype); H.isPureReactComponent = true; var I2 = Array.isArray; var J = Object.prototype.hasOwnProperty; var K = { current: null }; var L2 = { key: true, ref: true, __self: true, __source: true }; function M2(a2, b2, e2) { var d2, c2 = {}, k2 = null, h2 = null; if (b2 != null) for (d2 in b2.ref !== void 0 && (h2 = b2.ref), b2.key !== void 0 && (k2 = "" + b2.key), b2) J.call(b2, d2) && !L2.hasOwnProperty(d2) && (c2[d2] = b2[d2]); var g2 = arguments.length - 2; if (g2 === 1) c2.children = e2; else if (1 < g2) { for (var f2 = Array(g2), m2 = 0; m2 < g2; m2++) f2[m2] = arguments[m2 + 2]; c2.children = f2; } if (a2 && a2.defaultProps) for (d2 in g2 = a2.defaultProps, g2) c2[d2] === void 0 && (c2[d2] = g2[d2]); return { $$typeof: l2, type: a2, key: k2, ref: h2, props: c2, _owner: K.current }; } function N2(a2, b2) { return { $$typeof: l2, type: a2.type, key: b2, ref: a2.ref, props: a2.props, _owner: a2._owner }; } function O2(a2) { return typeof a2 === "object" && a2 !== null && a2.$$typeof === l2; } function escape(a2) { var b2 = { "=": "=0", ":": "=2" }; return "$" + a2.replace(/[=:]/g, function(a3) { return b2[a3]; }); } var P2 = /\/+/g; function Q(a2, b2) { return typeof a2 === "object" && a2 !== null && a2.key != null ? escape("" + a2.key) : b2.toString(36); } function R2(a2, b2, e2, d2, c2) { var k2 = typeof a2; if (k2 === "undefined" || k2 === "boolean") a2 = null; var h2 = false; if (a2 === null) h2 = true; else switch (k2) { case "string": case "number": h2 = true; break; case "object": switch (a2.$$typeof) { case l2: case n2: h2 = true; } } if (h2) return h2 = a2, c2 = c2(h2), a2 = d2 === "" ? "." + Q(h2, 0) : d2, I2(c2) ? (e2 = "", a2 != null && (e2 = a2.replace(P2, "$&/") + "/"), R2(c2, b2, e2, "", function(a3) { return a3; })) : c2 != null && (O2(c2) && (c2 = N2(c2, e2 + (!c2.key || h2 && h2.key === c2.key ? "" : ("" + c2.key).replace(P2, "$&/") + "/") + a2)), b2.push(c2)), 1; h2 = 0; d2 = d2 === "" ? "." : d2 + ":"; if (I2(a2)) for (var g2 = 0; g2 < a2.length; g2++) { k2 = a2[g2]; var f2 = d2 + Q(k2, g2); h2 += R2(k2, b2, e2, f2, c2); } else if (f2 = A2(a2), typeof f2 === "function") for (a2 = f2.call(a2), g2 = 0; !(k2 = a2.next()).done; ) k2 = k2.value, f2 = d2 + Q(k2, g2++), h2 += R2(k2, b2, e2, f2, c2); else if (k2 === "object") throw b2 = String(a2), Error("Objects are not valid as a React child (found: " + (b2 === "[object Object]" ? "object with keys {" + Object.keys(a2).join(", ") + "}" : b2) + "). If you meant to render a collection of children, use an array instead."); return h2; } function S2(a2, b2, e2) { if (a2 == null) return a2; var d2 = [], c2 = 0; R2(a2, d2, "", "", function(a3) { return b2.call(e2, a3, c2++); }); return d2; } function T2(a2) { if (a2._status === -1) { var b2 = a2._result; b2 = b2(); b2.then(function(b3) { if (a2._status === 0 || a2._status === -1) a2._status = 1, a2._result = b3; }, function(b3) { if (a2._status === 0 || a2._status === -1) a2._status = 2, a2._result = b3; }); a2._status === -1 && (a2._status = 0, a2._result = b2); } if (a2._status === 1) return a2._result.default; throw a2._result; } var U = { current: null }; var V = { transition: null }; var W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K }; exports.Children = { map: S2, forEach: function(a2, b2, e2) { S2(a2, function() { b2.apply(this, arguments); }, e2); }, count: function(a2) { var b2 = 0; S2(a2, function() { b2++; }); return b2; }, toArray: function(a2) { return S2(a2, function(a3) { return a3; }) || []; }, only: function(a2) { if (!O2(a2)) throw Error("React.Children.only expected to receive a single React element child."); return a2; } }; exports.Component = E2; exports.Fragment = p2; exports.Profiler = r2; exports.PureComponent = G; exports.StrictMode = q; exports.Suspense = w2; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W; exports.cloneElement = function(a2, b2, e2) { if (a2 === null || a2 === void 0) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a2 + "."); var d2 = C2({}, a2.props), c2 = a2.key, k2 = a2.ref, h2 = a2._owner; if (b2 != null) { b2.ref !== void 0 && (k2 = b2.ref, h2 = K.current); b2.key !== void 0 && (c2 = "" + b2.key); if (a2.type && a2.type.defaultProps) var g2 = a2.type.defaultProps; for (f2 in b2) J.call(b2, f2) && !L2.hasOwnProperty(f2) && (d2[f2] = b2[f2] === void 0 && g2 !== void 0 ? g2[f2] : b2[f2]); } var f2 = arguments.length - 2; if (f2 === 1) d2.children = e2; else if (1 < f2) { g2 = Array(f2); for (var m2 = 0; m2 < f2; m2++) g2[m2] = arguments[m2 + 2]; d2.children = g2; } return { $$typeof: l2, type: a2.type, key: c2, ref: k2, props: d2, _owner: h2 }; }; exports.createContext = function(a2) { a2 = { $$typeof: u2, _currentValue: a2, _currentValue2: a2, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }; a2.Provider = { $$typeof: t3, _context: a2 }; return a2.Consumer = a2; }; exports.createElement = M2; exports.createFactory = function(a2) { var b2 = M2.bind(null, a2); b2.type = a2; return b2; }; exports.createRef = function() { return { current: null }; }; exports.forwardRef = function(a2) { return { $$typeof: v2, render: a2 }; }; exports.isValidElement = O2; exports.lazy = function(a2) { return { $$typeof: y2, _payload: { _status: -1, _result: a2 }, _init: T2 }; }; exports.memo = function(a2, b2) { return { $$typeof: x2, type: a2, compare: b2 === void 0 ? null : b2 }; }; exports.startTransition = function(a2) { var b2 = V.transition; V.transition = {}; try { a2(); } finally { V.transition = b2; } }; exports.unstable_act = function() { throw Error("act(...) is not supported in production builds of React."); }; exports.useCallback = function(a2, b2) { return U.current.useCallback(a2, b2); }; exports.useContext = function(a2) { return U.current.useContext(a2); }; exports.useDebugValue = function() { }; exports.useDeferredValue = function(a2) { return U.current.useDeferredValue(a2); }; exports.useEffect = function(a2, b2) { return U.current.useEffect(a2, b2); }; exports.useId = function() { return U.current.useId(); }; exports.useImperativeHandle = function(a2, b2, e2) { return U.current.useImperativeHandle(a2, b2, e2); }; exports.useInsertionEffect = function(a2, b2) { return U.current.useInsertionEffect(a2, b2); }; exports.useLayoutEffect = function(a2, b2) { return U.current.useLayoutEffect(a2, b2); }; exports.useMemo = function(a2, b2) { return U.current.useMemo(a2, b2); }; exports.useReducer = function(a2, b2, e2) { return U.current.useReducer(a2, b2, e2); }; exports.useRef = function(a2) { return U.current.useRef(a2); }; exports.useState = function(a2) { return U.current.useState(a2); }; exports.useSyncExternalStore = function(a2, b2, e2) { return U.current.useSyncExternalStore(a2, b2, e2); }; exports.useTransition = function() { return U.current.useTransition(); }; exports.version = "18.2.0"; } }); // node_modules/react/index.js var require_react = __commonJS({ "node_modules/react/index.js"(exports, module2) { "use strict"; if (true) { module2.exports = require_react_production_min(); } else { module2.exports = null; } } }); // node_modules/jotai/esm/react.mjs function useAtomValue(atom3, options) { const store = useStore(options); const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = (0, import_react.useReducer)((prev) => { const nextValue = store.get(atom3); if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom3) { return prev; } return [nextValue, store, atom3]; }, void 0, () => [store.get(atom3), store, atom3]); let value = valueFromReducer; if (storeFromReducer !== store || atomFromReducer !== atom3) { rerender(); value = store.get(atom3); } const delay = options == null ? void 0 : options.delay; (0, import_react.useEffect)(() => { const unsub = store.sub(atom3, () => { if (typeof delay === "number") { setTimeout(rerender, delay); return; } rerender(); }); rerender(); return unsub; }, [store, atom3, delay]); (0, import_react.useDebugValue)(value); return isPromiseLike2(value) ? use(value) : value; } function useSetAtom(atom3, options) { const store = useStore(options); const setAtom = (0, import_react.useCallback)((...args) => { if ((import_meta2.env ? import_meta2.env.MODE : void 0) !== "production" && !("write" in atom3)) { throw new Error("not writable atom"); } return store.set(atom3, ...args); }, [store, atom3]); return setAtom; } var import_react, import_meta2, StoreContext, useStore, Provider, isPromiseLike2, use; var init_react = __esm({ "node_modules/jotai/esm/react.mjs"() { import_react = __toESM(require_react(), 1); init_vanilla(); import_meta2 = {}; "use client"; StoreContext = (0, import_react.createContext)(void 0); useStore = (options) => { const store = (0, import_react.useContext)(StoreContext); return (options == null ? void 0 : options.store) || store || getDefaultStore(); }; Provider = ({ children, store }) => { const storeRef = (0, import_react.useRef)(); if (!store && !storeRef.current) { storeRef.current = createStore(); } return (0, import_react.createElement)(StoreContext.Provider, { value: store || storeRef.current }, children); }; isPromiseLike2 = (x2) => typeof (x2 == null ? void 0 : x2.then) === "function"; use = import_react.default.use || ((promise) => { if (promise.status === "pending") { throw promise; } else if (promise.status === "fulfilled") { return promise.value; } else if (promise.status === "rejected") { throw promise.reason; } else { promise.status = "pending"; promise.then((v2) => { promise.status = "fulfilled"; promise.value = v2; }, (e2) => { promise.status = "rejected"; promise.reason = e2; }); throw promise; } }); } }); // node_modules/jotai/esm/index.mjs var init_esm = __esm({ "node_modules/jotai/esm/index.mjs"() { init_vanilla(); init_react(); } }); // src/stores/dominant-hand-store.ts function setDominantHand(value) { dominantHandStore.set(dominantHandAtom, value); } function useDominantHand() { return useAtomValue(dominantHandAtom, { store: dominantHandStore }); } var dominantHandAtom, dominantHandStore; var init_dominant_hand_store = __esm({ "src/stores/dominant-hand-store.ts"() { init_esm(); dominantHandAtom = atom("right"); dominantHandStore = getDefaultStore(); } }); // manifest.json var manifest_default; var init_manifest = __esm({ "manifest.json"() { manifest_default = { id: "ink", name: "Ink", author: "Dale de Silva", description: "Hand write or draw directly between paragraphs in your notes using a digital pen, stylus, or Apple pencil. Useful for handwriting, sketches, scribbles, or even math equations and scientific notation. Runs on the tldraw framework and drawing provides an infinite canvas.", version: "0.5.6", minAppVersion: "1.8.7", authorUrl: "https://designdebt.club", fundingUrl: "https://ko-fi.com/daledesilva", isDesktopOnly: false }; } }); // src/constants.ts var PLUGIN_VERSION, TLDRAW_VERSION, INK_CANVAS_FORMAT_VERSION, INK_EMBED_BASE_URL, LOCAL_STORAGE_PREFIX, WRITE_FILE_V1_EXT, DRAW_FILE_V1_EXT, WRITE_EMBED_KEY, DRAW_EMBED_KEY, MENUBAR_HEIGHT_PX, WRITE_SHORT_DELAY_MS, WRITE_LONG_DELAY_MS, DRAW_SHORT_DELAY_MS, DRAW_LONG_DELAY_MS, WRITING_PAGE_WIDTH, WRITING_LINE_HEIGHT, WRITING_MIN_PAGE_HEIGHT, DRAWING_INITIAL_WIDTH, DRAWING_INITIAL_ASPECT_RATIO, DRAWING_INITIAL_HEIGHT; var init_constants = __esm({ "src/constants.ts"() { init_manifest(); PLUGIN_VERSION = manifest_default.version; TLDRAW_VERSION = "2.4.3"; INK_CANVAS_FORMAT_VERSION = "0.5.0"; INK_EMBED_BASE_URL = "https://youtu.be/2arL1jh8ihA"; LOCAL_STORAGE_PREFIX = "au_ink_"; WRITE_FILE_V1_EXT = "writing"; DRAW_FILE_V1_EXT = "drawing"; WRITE_EMBED_KEY = "handwritten-ink"; DRAW_EMBED_KEY = "handdrawn-ink"; MENUBAR_HEIGHT_PX = 100; WRITE_SHORT_DELAY_MS = 500; WRITE_LONG_DELAY_MS = 2e3; DRAW_SHORT_DELAY_MS = 500; DRAW_LONG_DELAY_MS = 2e3; WRITING_PAGE_WIDTH = 2e3; WRITING_LINE_HEIGHT = 150; WRITING_MIN_PAGE_HEIGHT = WRITING_LINE_HEIGHT * 2.5; DRAWING_INITIAL_WIDTH = 500; DRAWING_INITIAL_ASPECT_RATIO = 1; DRAWING_INITIAL_HEIGHT = Math.round(DRAWING_INITIAL_WIDTH * DRAWING_INITIAL_ASPECT_RATIO); } }); // src/stores/global-store.ts function setGlobals(globals) { const store = getDefaultStore(); store.set(globalsAtom, globals); } function getGlobals() { const store = getDefaultStore(); const globals = store.get(globalsAtom); if (!globals) { throw new Error(`Project Browser plugin globals isn't available yet`); } return globals; } var globalsAtom; var init_global_store = __esm({ "src/stores/global-store.ts"() { init_esm(); globalsAtom = atom(); } }); // src/logic/utils/log-to-vault.ts function getTodayDateString() { const now = new Date(); const yyyy = now.getFullYear(); const mm = String(now.getMonth() + 1).padStart(2, "0"); const dd = String(now.getDate()).padStart(2, "0"); return `${yyyy}-${mm}-${dd}`; } function getTimestamp() { const now = new Date(); const hh = String(now.getHours()).padStart(2, "0"); const min4 = String(now.getMinutes()).padStart(2, "0"); const ss = String(now.getSeconds()).padStart(2, "0"); const ms = String(now.getMilliseconds()).padStart(3, "0"); return `${hh}:${min4}:${ss}.${ms}`; } function logToVault(message) { if (!getGlobals().plugin.settings.debugLoggingEnabled) return; const filename = `ink-debug_${getTodayDateString()}.md`; const line = `[${getTimestamp()}] ${message} `; void getGlobals().plugin.app.vault.adapter.append(filename, line); } var init_log_to_vault = __esm({ "src/logic/utils/log-to-vault.ts"() { init_global_store(); } }); // src/components/formats/current/utils/ink-file-storage-engine.ts function getInkFileStorageEngine(fileData) { return fileData.inkCanvas != null ? "ink-canvas" : "tldraw"; } function isInkCanvasFile(fileData) { return getInkFileStorageEngine(fileData) === "ink-canvas"; } var init_ink_file_storage_engine = __esm({ "src/components/formats/current/utils/ink-file-storage-engine.ts"() { } }); // src/defaults/empty-drawing-embed.svg var empty_drawing_embed_default; var init_empty_drawing_embed = __esm({ "src/defaults/empty-drawing-embed.svg"() { empty_drawing_embed_default = '\n \n \n \n \n \n \n \n \n'; } }); // src/components/formats/current/utils/build-file-data.ts var buildInkCanvasDrawingFileData, buildInkCanvasWritingFileData; var init_build_file_data = __esm({ "src/components/formats/current/utils/build-file-data.ts"() { init_constants(); buildInkCanvasDrawingFileData = (props) => { return { meta: { pluginVersion: PLUGIN_VERSION, tldrawVersion: "", fileType: "inkDrawing" }, tldraw: {}, inkCanvas: props.inkCanvasSnapshot, svgString: props.svgString }; }; buildInkCanvasWritingFileData = (props) => { return { meta: { pluginVersion: PLUGIN_VERSION, tldrawVersion: "", fileType: "inkWriting" }, tldraw: {}, inkCanvas: props.inkCanvasSnapshot, svgString: props.svgString }; }; } }); // node_modules/@xmldom/xmldom/lib/conventions.js var require_conventions = __commonJS({ "node_modules/@xmldom/xmldom/lib/conventions.js"(exports) { "use strict"; function find(list, predicate, ac) { if (ac === void 0) { ac = Array.prototype; } if (list && typeof ac.find === "function") { return ac.find.call(list, predicate); } for (var i2 = 0; i2 < list.length; i2++) { if (Object.prototype.hasOwnProperty.call(list, i2)) { var item = list[i2]; if (predicate.call(void 0, item, i2, list)) { return item; } } } } function freeze(object2, oc) { if (oc === void 0) { oc = Object; } return oc && typeof oc.freeze === "function" ? oc.freeze(object2) : object2; } function assign(target, source) { if (target === null || typeof target !== "object") { throw new TypeError("target is not an object"); } for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } return target; } var MIME_TYPE = freeze({ HTML: "text/html", isHTML: function(value) { return value === MIME_TYPE.HTML; }, XML_APPLICATION: "application/xml", XML_TEXT: "text/xml", XML_XHTML_APPLICATION: "application/xhtml+xml", XML_SVG_IMAGE: "image/svg+xml" }); var NAMESPACE = freeze({ HTML: "http://www.w3.org/1999/xhtml", isHTML: function(uri) { return uri === NAMESPACE.HTML; }, SVG: "http://www.w3.org/2000/svg", XML: "http://www.w3.org/XML/1998/namespace", XMLNS: "http://www.w3.org/2000/xmlns/" }); exports.assign = assign; exports.find = find; exports.freeze = freeze; exports.MIME_TYPE = MIME_TYPE; exports.NAMESPACE = NAMESPACE; } }); // node_modules/@xmldom/xmldom/lib/dom.js var require_dom = __commonJS({ "node_modules/@xmldom/xmldom/lib/dom.js"(exports) { var conventions = require_conventions(); var find = conventions.find; var NAMESPACE = conventions.NAMESPACE; function notEmptyString(input) { return input !== ""; } function splitOnASCIIWhitespace(input) { return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : []; } function orderedSetReducer(current, element) { if (!current.hasOwnProperty(element)) { current[element] = true; } return current; } function toOrderedSet(input) { if (!input) return []; var list = splitOnASCIIWhitespace(input); return Object.keys(list.reduce(orderedSetReducer, {})); } function arrayIncludes(list) { return function(element) { return list && list.indexOf(element) !== -1; }; } function copy(src, dest) { for (var p2 in src) { if (Object.prototype.hasOwnProperty.call(src, p2)) { dest[p2] = src[p2]; } } } function _extends(Class, Super) { var pt = Class.prototype; if (!(pt instanceof Super)) { let t4 = function() { }; var t3 = t4; ; t4.prototype = Super.prototype; t4 = new t4(); copy(pt, t4); Class.prototype = pt = t4; } if (pt.constructor != Class) { if (typeof Class != "function") { console.error("unknown Class:" + Class); } pt.constructor = Class; } } var NodeType = {}; var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; var TEXT_NODE = NodeType.TEXT_NODE = 3; var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; var ENTITY_NODE = NodeType.ENTITY_NODE = 6; var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; var COMMENT_NODE = NodeType.COMMENT_NODE = 8; var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; var NOTATION_NODE = NodeType.NOTATION_NODE = 12; var ExceptionCode = {}; var ExceptionMessage = {}; var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = "Index size error", 1); var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = "DOMString size error", 2); var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = "Hierarchy request error", 3); var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = "Wrong document", 4); var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = "Invalid character", 5); var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = "No data allowed", 6); var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = "No modification allowed", 7); var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = "Not found", 8); var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = "Not supported", 9); var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = "Attribute in use", 10); var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = "Invalid state", 11); var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = "Syntax error", 12); var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = "Invalid modification", 13); var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = "Invalid namespace", 14); var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = "Invalid access", 15); function DOMException2(code2, message) { if (message instanceof Error) { var error2 = message; } else { error2 = this; Error.call(this, ExceptionMessage[code2]); this.message = ExceptionMessage[code2]; if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException2); } error2.code = code2; if (message) this.message = this.message + ": " + message; return error2; } DOMException2.prototype = Error.prototype; copy(ExceptionCode, DOMException2); function NodeList() { } NodeList.prototype = { length: 0, item: function(index3) { return index3 >= 0 && index3 < this.length ? this[index3] : null; }, toString: function(isHTML, nodeFilter, options) { var requireWellFormed = !!options && !!options.requireWellFormed; for (var buf = [], i2 = 0; i2 < this.length; i2++) { serializeToString(this[i2], buf, isHTML, nodeFilter, null, requireWellFormed); } return buf.join(""); }, filter: function(predicate) { return Array.prototype.filter.call(this, predicate); }, indexOf: function(item) { return Array.prototype.indexOf.call(this, item); } }; function LiveNodeList(node, refresh) { this._node = node; this._refresh = refresh; _updateLiveList(this); } function _updateLiveList(list) { var inc = list._node._inc || list._node.ownerDocument._inc; if (list._inc !== inc) { var ls = list._refresh(list._node); __set__(list, "length", ls.length); if (!list.$$length || ls.length < list.$$length) { for (var i2 = ls.length; i2 in list; i2++) { if (Object.prototype.hasOwnProperty.call(list, i2)) { delete list[i2]; } } } copy(ls, list); list._inc = inc; } } LiveNodeList.prototype.item = function(i2) { _updateLiveList(this); return this[i2] || null; }; _extends(LiveNodeList, NodeList); function NamedNodeMap() { } function _findNodeIndex(list, node) { var i2 = list.length; while (i2--) { if (list[i2] === node) { return i2; } } } function _addNamedNode(el, list, newAttr, oldAttr) { if (oldAttr) { list[_findNodeIndex(list, oldAttr)] = newAttr; } else { list[list.length++] = newAttr; } if (el) { newAttr.ownerElement = el; var doc = el.ownerDocument; if (doc) { oldAttr && _onRemoveAttribute(doc, el, oldAttr); _onAddAttribute(doc, el, newAttr); } } } function _removeNamedNode(el, list, attr) { var i2 = _findNodeIndex(list, attr); if (i2 >= 0) { var lastIndex = list.length - 1; while (i2 < lastIndex) { list[i2] = list[++i2]; } list.length = lastIndex; if (el) { var doc = el.ownerDocument; if (doc) { _onRemoveAttribute(doc, el, attr); attr.ownerElement = null; } } } else { throw new DOMException2(NOT_FOUND_ERR, new Error(el.tagName + "@" + attr)); } } NamedNodeMap.prototype = { length: 0, item: NodeList.prototype.item, getNamedItem: function(key) { var i2 = this.length; while (i2--) { var attr = this[i2]; if (attr.nodeName == key) { return attr; } } }, setNamedItem: function(attr) { var el = attr.ownerElement; if (el && el != this._ownerElement) { throw new DOMException2(INUSE_ATTRIBUTE_ERR); } var oldAttr = this.getNamedItem(attr.nodeName); _addNamedNode(this._ownerElement, this, attr, oldAttr); return oldAttr; }, setNamedItemNS: function(attr) { var el = attr.ownerElement, oldAttr; if (el && el != this._ownerElement) { throw new DOMException2(INUSE_ATTRIBUTE_ERR); } oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); _addNamedNode(this._ownerElement, this, attr, oldAttr); return oldAttr; }, removeNamedItem: function(key) { var attr = this.getNamedItem(key); _removeNamedNode(this._ownerElement, this, attr); return attr; }, removeNamedItemNS: function(namespaceURI, localName) { var attr = this.getNamedItemNS(namespaceURI, localName); _removeNamedNode(this._ownerElement, this, attr); return attr; }, getNamedItemNS: function(namespaceURI, localName) { var i2 = this.length; while (i2--) { var node = this[i2]; if (node.localName == localName && node.namespaceURI == namespaceURI) { return node; } } return null; } }; function DOMImplementation() { } DOMImplementation.prototype = { hasFeature: function(feature, version2) { return true; }, createDocument: function(namespaceURI, qualifiedName, doctype) { var doc = new Document(); doc.implementation = this; doc.childNodes = new NodeList(); doc.doctype = doctype || null; if (doctype) { doc.appendChild(doctype); } if (qualifiedName) { var root = doc.createElementNS(namespaceURI, qualifiedName); doc.appendChild(root); } return doc; }, createDocumentType: function(qualifiedName, publicId, systemId) { var node = new DocumentType(); node.name = qualifiedName; node.nodeName = qualifiedName; node.publicId = publicId || ""; node.systemId = systemId || ""; return node; } }; function Node2() { } Node2.prototype = { firstChild: null, lastChild: null, previousSibling: null, nextSibling: null, attributes: null, parentNode: null, childNodes: null, ownerDocument: null, nodeValue: null, namespaceURI: null, prefix: null, localName: null, insertBefore: function(newChild, refChild) { return _insertBefore(this, newChild, refChild); }, replaceChild: function(newChild, oldChild) { _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); if (oldChild) { this.removeChild(oldChild); } }, removeChild: function(oldChild) { return _removeChild(this, oldChild); }, appendChild: function(newChild) { return this.insertBefore(newChild, null); }, hasChildNodes: function() { return this.firstChild != null; }, cloneNode: function(deep) { return cloneNode(this.ownerDocument || this, this, deep); }, normalize: function() { walkDOM(this, null, { enter: function(node) { var child = node.firstChild; while (child) { var next = child.nextSibling; if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) { node.removeChild(next); child.appendData(next.data); } else { child = next; } } return true; } }); }, isSupported: function(feature, version2) { return this.ownerDocument.implementation.hasFeature(feature, version2); }, hasAttributes: function() { return this.attributes.length > 0; }, lookupPrefix: function(namespaceURI) { var el = this; while (el) { var map = el._nsMap; if (map) { for (var n2 in map) { if (Object.prototype.hasOwnProperty.call(map, n2) && map[n2] === namespaceURI) { return n2; } } } el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; } return null; }, lookupNamespaceURI: function(prefix) { var el = this; while (el) { var map = el._nsMap; if (map) { if (Object.prototype.hasOwnProperty.call(map, prefix)) { return map[prefix]; } } el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; } return null; }, isDefaultNamespace: function(namespaceURI) { var prefix = this.lookupPrefix(namespaceURI); return prefix == null; } }; function _xmlEncoder(c2) { return c2 == "<" && "<" || c2 == ">" && ">" || c2 == "&" && "&" || c2 == '"' && """ || "&#" + c2.charCodeAt() + ";"; } copy(NodeType, Node2); copy(NodeType, Node2.prototype); function _visitNode(node, callback) { return walkDOM(node, null, { enter: function(n2) { return callback(n2) ? walkDOM.STOP : true; } }) === walkDOM.STOP; } function walkDOM(node, context, callbacks) { var stack2 = [{ node, context, phase: walkDOM.ENTER }]; while (stack2.length > 0) { var frame3 = stack2.pop(); if (frame3.phase === walkDOM.ENTER) { var childContext = callbacks.enter(frame3.node, frame3.context); if (childContext === walkDOM.STOP) { return walkDOM.STOP; } stack2.push({ node: frame3.node, context: childContext, phase: walkDOM.EXIT }); if (childContext === null || childContext === void 0) { continue; } var child = frame3.node.lastChild; while (child) { stack2.push({ node: child, context: childContext, phase: walkDOM.ENTER }); child = child.previousSibling; } } else { if (callbacks.exit) { callbacks.exit(frame3.node, frame3.context); } } } } walkDOM.STOP = Symbol("walkDOM.STOP"); walkDOM.ENTER = 0; walkDOM.EXIT = 1; function Document() { this.ownerDocument = this; } function _onAddAttribute(doc, el, newAttr) { doc && doc._inc++; var ns = newAttr.namespaceURI; if (ns === NAMESPACE.XMLNS) { el._nsMap[newAttr.prefix ? newAttr.localName : ""] = newAttr.value; } } function _onRemoveAttribute(doc, el, newAttr, remove2) { doc && doc._inc++; var ns = newAttr.namespaceURI; if (ns === NAMESPACE.XMLNS) { delete el._nsMap[newAttr.prefix ? newAttr.localName : ""]; } } function _onUpdateChild(doc, el, newChild) { if (doc && doc._inc) { doc._inc++; var cs = el.childNodes; if (newChild) { cs[cs.length++] = newChild; } else { var child = el.firstChild; var i2 = 0; while (child) { cs[i2++] = child; child = child.nextSibling; } cs.length = i2; delete cs[cs.length]; } } } function _removeChild(parentNode, child) { var previous = child.previousSibling; var next = child.nextSibling; if (previous) { previous.nextSibling = next; } else { parentNode.firstChild = next; } if (next) { next.previousSibling = previous; } else { parentNode.lastChild = previous; } child.parentNode = null; child.previousSibling = null; child.nextSibling = null; _onUpdateChild(parentNode.ownerDocument, parentNode); return child; } function hasValidParentNodeType(node) { return node && (node.nodeType === Node2.DOCUMENT_NODE || node.nodeType === Node2.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node2.ELEMENT_NODE); } function hasInsertableNodeType(node) { return node && (isElementNode(node) || isTextNode(node) || isDocTypeNode(node) || node.nodeType === Node2.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node2.COMMENT_NODE || node.nodeType === Node2.PROCESSING_INSTRUCTION_NODE); } function isDocTypeNode(node) { return node && node.nodeType === Node2.DOCUMENT_TYPE_NODE; } function isElementNode(node) { return node && node.nodeType === Node2.ELEMENT_NODE; } function isTextNode(node) { return node && node.nodeType === Node2.TEXT_NODE; } function isElementInsertionPossible(doc, child) { var parentChildNodes = doc.childNodes || []; if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { return false; } var docTypeNode = find(parentChildNodes, isDocTypeNode); return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); } function isElementReplacementPossible(doc, child) { var parentChildNodes = doc.childNodes || []; function hasElementChildThatIsNotChild(node) { return isElementNode(node) && node !== child; } if (find(parentChildNodes, hasElementChildThatIsNotChild)) { return false; } var docTypeNode = find(parentChildNodes, isDocTypeNode); return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); } function assertPreInsertionValidity1to5(parent, node, child) { if (!hasValidParentNodeType(parent)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Unexpected parent node type " + parent.nodeType); } if (child && child.parentNode !== parent) { throw new DOMException2(NOT_FOUND_ERR, "child not in parent"); } if (!hasInsertableNodeType(node) || isDocTypeNode(node) && parent.nodeType !== Node2.DOCUMENT_NODE) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Unexpected node type " + node.nodeType + " for parent node type " + parent.nodeType); } } function assertPreInsertionValidityInDocument(parent, node, child) { var parentChildNodes = parent.childNodes || []; var nodeChildNodes = node.childNodes || []; if (node.nodeType === Node2.DOCUMENT_FRAGMENT_NODE) { var nodeChildElements = nodeChildNodes.filter(isElementNode); if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "More than one element or text in fragment"); } if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype"); } } if (isElementNode(node)) { if (!isElementInsertionPossible(parent, child)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype"); } } if (isDocTypeNode(node)) { if (find(parentChildNodes, isDocTypeNode)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Only one doctype is allowed"); } var parentElementChild = find(parentChildNodes, isElementNode); if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element"); } if (!child && parentElementChild) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Doctype can not be appended since element is present"); } } } function assertPreReplacementValidityInDocument(parent, node, child) { var parentChildNodes = parent.childNodes || []; var nodeChildNodes = node.childNodes || []; if (node.nodeType === Node2.DOCUMENT_FRAGMENT_NODE) { var nodeChildElements = nodeChildNodes.filter(isElementNode); if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "More than one element or text in fragment"); } if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype"); } } if (isElementNode(node)) { if (!isElementReplacementPossible(parent, child)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype"); } } if (isDocTypeNode(node)) { let hasDoctypeChildThatIsNotChild2 = function(node2) { return isDocTypeNode(node2) && node2 !== child; }; var hasDoctypeChildThatIsNotChild = hasDoctypeChildThatIsNotChild2; if (find(parentChildNodes, hasDoctypeChildThatIsNotChild2)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Only one doctype is allowed"); } var parentElementChild = find(parentChildNodes, isElementNode); if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { throw new DOMException2(HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element"); } } } function _insertBefore(parent, node, child, _inDocumentAssertion) { assertPreInsertionValidity1to5(parent, node, child); if (parent.nodeType === Node2.DOCUMENT_NODE) { (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); } var cp = node.parentNode; if (cp) { cp.removeChild(node); } if (node.nodeType === DOCUMENT_FRAGMENT_NODE) { var newFirst = node.firstChild; if (newFirst == null) { return node; } var newLast = node.lastChild; } else { newFirst = newLast = node; } var pre = child ? child.previousSibling : parent.lastChild; newFirst.previousSibling = pre; newLast.nextSibling = child; if (pre) { pre.nextSibling = newFirst; } else { parent.firstChild = newFirst; } if (child == null) { parent.lastChild = newLast; } else { child.previousSibling = newLast; } do { newFirst.parentNode = parent; var targetDoc = parent.ownerDocument || parent; _updateOwnerDocument(newFirst, targetDoc); } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); _onUpdateChild(parent.ownerDocument || parent, parent); if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { node.firstChild = node.lastChild = null; } return node; } function _updateOwnerDocument(node, newOwnerDocument) { if (node.ownerDocument === newOwnerDocument) { return; } node.ownerDocument = newOwnerDocument; if (node.nodeType === ELEMENT_NODE && node.attributes) { for (var i2 = 0; i2 < node.attributes.length; i2++) { var attr = node.attributes.item(i2); if (attr) { attr.ownerDocument = newOwnerDocument; } } } var child = node.firstChild; while (child) { _updateOwnerDocument(child, newOwnerDocument); child = child.nextSibling; } } function _appendSingleChild(parentNode, newChild) { if (newChild.parentNode) { newChild.parentNode.removeChild(newChild); } newChild.parentNode = parentNode; newChild.previousSibling = parentNode.lastChild; newChild.nextSibling = null; if (newChild.previousSibling) { newChild.previousSibling.nextSibling = newChild; } else { parentNode.firstChild = newChild; } parentNode.lastChild = newChild; _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); var targetDoc = parentNode.ownerDocument || parentNode; _updateOwnerDocument(newChild, targetDoc); return newChild; } Document.prototype = { nodeName: "#document", nodeType: DOCUMENT_NODE, doctype: null, documentElement: null, _inc: 1, insertBefore: function(newChild, refChild) { if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { var child = newChild.firstChild; while (child) { var next = child.nextSibling; this.insertBefore(child, refChild); child = next; } return newChild; } _insertBefore(this, newChild, refChild); _updateOwnerDocument(newChild, this); if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { this.documentElement = newChild; } return newChild; }, removeChild: function(oldChild) { if (this.documentElement == oldChild) { this.documentElement = null; } return _removeChild(this, oldChild); }, replaceChild: function(newChild, oldChild) { _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); _updateOwnerDocument(newChild, this); if (oldChild) { this.removeChild(oldChild); } if (isElementNode(newChild)) { this.documentElement = newChild; } }, importNode: function(importedNode, deep) { return importNode(this, importedNode, deep); }, getElementById: function(id) { var rtv = null; _visitNode(this.documentElement, function(node) { if (node.nodeType == ELEMENT_NODE) { if (node.getAttribute("id") == id) { rtv = node; return true; } } }); return rtv; }, getElementsByClassName: function(classNames49) { var classNamesSet = toOrderedSet(classNames49); return new LiveNodeList(this, function(base) { var ls = []; if (classNamesSet.length > 0) { _visitNode(base.documentElement, function(node) { if (node !== base && node.nodeType === ELEMENT_NODE) { var nodeClassNames = node.getAttribute("class"); if (nodeClassNames) { var matches = classNames49 === nodeClassNames; if (!matches) { var nodeClassNamesSet = toOrderedSet(nodeClassNames); matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)); } if (matches) { ls.push(node); } } } }); } return ls; }); }, createElement: function(tagName) { var node = new Element2(); node.ownerDocument = this; node.nodeName = tagName; node.tagName = tagName; node.localName = tagName; node.childNodes = new NodeList(); var attrs = node.attributes = new NamedNodeMap(); attrs._ownerElement = node; return node; }, createDocumentFragment: function() { var node = new DocumentFragment(); node.ownerDocument = this; node.childNodes = new NodeList(); return node; }, createTextNode: function(data) { var node = new Text(); node.ownerDocument = this; node.appendData(data); return node; }, createComment: function(data) { var node = new Comment(); node.ownerDocument = this; node.appendData(data); return node; }, createCDATASection: function(data) { if (data.indexOf("]]>") !== -1) { throw new DOMException2(INVALID_CHARACTER_ERR, 'data contains "]]>"'); } var node = new CDATASection(); node.ownerDocument = this; node.appendData(data); return node; }, createProcessingInstruction: function(target, data) { var node = new ProcessingInstruction(); node.ownerDocument = this; node.tagName = node.nodeName = node.target = target; node.nodeValue = node.data = data; return node; }, createAttribute: function(name) { var node = new Attr(); node.ownerDocument = this; node.name = name; node.nodeName = name; node.localName = name; node.specified = true; return node; }, createEntityReference: function(name) { var node = new EntityReference(); node.ownerDocument = this; node.nodeName = name; return node; }, createElementNS: function(namespaceURI, qualifiedName) { var node = new Element2(); var pl = qualifiedName.split(":"); var attrs = node.attributes = new NamedNodeMap(); node.childNodes = new NodeList(); node.ownerDocument = this; node.nodeName = qualifiedName; node.tagName = qualifiedName; node.namespaceURI = namespaceURI; if (pl.length == 2) { node.prefix = pl[0]; node.localName = pl[1]; } else { node.localName = qualifiedName; } attrs._ownerElement = node; return node; }, createAttributeNS: function(namespaceURI, qualifiedName) { var node = new Attr(); var pl = qualifiedName.split(":"); node.ownerDocument = this; node.nodeName = qualifiedName; node.name = qualifiedName; node.namespaceURI = namespaceURI; node.specified = true; if (pl.length == 2) { node.prefix = pl[0]; node.localName = pl[1]; } else { node.localName = qualifiedName; } return node; } }; _extends(Document, Node2); function Element2() { this._nsMap = {}; } Element2.prototype = { nodeType: ELEMENT_NODE, hasAttribute: function(name) { return this.getAttributeNode(name) != null; }, getAttribute: function(name) { var attr = this.getAttributeNode(name); return attr && attr.value || ""; }, getAttributeNode: function(name) { return this.attributes.getNamedItem(name); }, setAttribute: function(name, value) { var attr = this.ownerDocument.createAttribute(name); attr.value = attr.nodeValue = "" + value; this.setAttributeNode(attr); }, removeAttribute: function(name) { var attr = this.getAttributeNode(name); attr && this.removeAttributeNode(attr); }, appendChild: function(newChild) { if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { return this.insertBefore(newChild, null); } else { return _appendSingleChild(this, newChild); } }, setAttributeNode: function(newAttr) { return this.attributes.setNamedItem(newAttr); }, setAttributeNodeNS: function(newAttr) { return this.attributes.setNamedItemNS(newAttr); }, removeAttributeNode: function(oldAttr) { return this.attributes.removeNamedItem(oldAttr.nodeName); }, removeAttributeNS: function(namespaceURI, localName) { var old = this.getAttributeNodeNS(namespaceURI, localName); old && this.removeAttributeNode(old); }, hasAttributeNS: function(namespaceURI, localName) { return this.getAttributeNodeNS(namespaceURI, localName) != null; }, getAttributeNS: function(namespaceURI, localName) { var attr = this.getAttributeNodeNS(namespaceURI, localName); return attr && attr.value || ""; }, setAttributeNS: function(namespaceURI, qualifiedName, value) { var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); attr.value = attr.nodeValue = "" + value; this.setAttributeNode(attr); }, getAttributeNodeNS: function(namespaceURI, localName) { return this.attributes.getNamedItemNS(namespaceURI, localName); }, getElementsByTagName: function(tagName) { return new LiveNodeList(this, function(base) { var ls = []; _visitNode(base, function(node) { if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === "*" || node.tagName == tagName)) { ls.push(node); } }); return ls; }); }, getElementsByTagNameNS: function(namespaceURI, localName) { return new LiveNodeList(this, function(base) { var ls = []; _visitNode(base, function(node) { if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === "*" || node.namespaceURI === namespaceURI) && (localName === "*" || node.localName == localName)) { ls.push(node); } }); return ls; }); } }; Document.prototype.getElementsByTagName = Element2.prototype.getElementsByTagName; Document.prototype.getElementsByTagNameNS = Element2.prototype.getElementsByTagNameNS; _extends(Element2, Node2); function Attr() { } Attr.prototype.nodeType = ATTRIBUTE_NODE; _extends(Attr, Node2); function CharacterData() { } CharacterData.prototype = { data: "", substringData: function(offset5, count3) { return this.data.substring(offset5, offset5 + count3); }, appendData: function(text) { text = this.data + text; this.nodeValue = this.data = text; this.length = text.length; }, insertData: function(offset5, text) { this.replaceData(offset5, 0, text); }, appendChild: function(newChild) { throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]); }, deleteData: function(offset5, count3) { this.replaceData(offset5, count3, ""); }, replaceData: function(offset5, count3, text) { var start2 = this.data.substring(0, offset5); var end2 = this.data.substring(offset5 + count3); text = start2 + text + end2; this.nodeValue = this.data = text; this.length = text.length; } }; _extends(CharacterData, Node2); function Text() { } Text.prototype = { nodeName: "#text", nodeType: TEXT_NODE, splitText: function(offset5) { var text = this.data; var newText = text.substring(offset5); text = text.substring(0, offset5); this.data = this.nodeValue = text; this.length = text.length; var newNode = this.ownerDocument.createTextNode(newText); if (this.parentNode) { this.parentNode.insertBefore(newNode, this.nextSibling); } return newNode; } }; _extends(Text, CharacterData); function Comment() { } Comment.prototype = { nodeName: "#comment", nodeType: COMMENT_NODE }; _extends(Comment, CharacterData); function CDATASection() { } CDATASection.prototype = { nodeName: "#cdata-section", nodeType: CDATA_SECTION_NODE }; _extends(CDATASection, CharacterData); function DocumentType() { } DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; _extends(DocumentType, Node2); function Notation() { } Notation.prototype.nodeType = NOTATION_NODE; _extends(Notation, Node2); function Entity() { } Entity.prototype.nodeType = ENTITY_NODE; _extends(Entity, Node2); function EntityReference() { } EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; _extends(EntityReference, Node2); function DocumentFragment() { } DocumentFragment.prototype.nodeName = "#document-fragment"; DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; _extends(DocumentFragment, Node2); function ProcessingInstruction() { } ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; _extends(ProcessingInstruction, Node2); function XMLSerializer3() { } XMLSerializer3.prototype.serializeToString = function(node, isHtml, nodeFilter, options) { return nodeSerializeToString.call(node, isHtml, nodeFilter, options); }; Node2.prototype.toString = nodeSerializeToString; function nodeSerializeToString(isHtml, nodeFilter, options) { var requireWellFormed = !!options && !!options.requireWellFormed; var buf = []; var refNode = this.nodeType == 9 && this.documentElement || this; var prefix = refNode.prefix; var uri = refNode.namespaceURI; if (uri && prefix == null) { var prefix = refNode.lookupPrefix(uri); if (prefix == null) { var visibleNamespaces = [ { namespace: uri, prefix: null } ]; } } serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces, requireWellFormed); return buf.join(""); } function needNamespaceDefine(node, isHTML, visibleNamespaces) { var prefix = node.prefix || ""; var uri = node.namespaceURI; if (!uri) { return false; } if (prefix === "xml" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) { return false; } var i2 = visibleNamespaces.length; while (i2--) { var ns = visibleNamespaces[i2]; if (ns.prefix === prefix) { return ns.namespace !== uri; } } return true; } function addSerializedAttribute(buf, qualifiedName, value) { buf.push(" ", qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"'); } function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) { if (!visibleNamespaces) { visibleNamespaces = []; } walkDOM(node, { ns: visibleNamespaces, isHTML }, { enter: function(n2, ctx) { var ns = ctx.ns; var html = ctx.isHTML; if (nodeFilter) { n2 = nodeFilter(n2); if (n2) { if (typeof n2 == "string") { buf.push(n2); return null; } } else { return null; } } switch (n2.nodeType) { case ELEMENT_NODE: var attrs = n2.attributes; var len = attrs.length; var nodeName = n2.tagName; html = NAMESPACE.isHTML(n2.namespaceURI) || html; var prefixedNodeName = nodeName; if (!html && !n2.prefix && n2.namespaceURI) { var defaultNS; for (var ai = 0; ai < attrs.length; ai++) { if (attrs.item(ai).name === "xmlns") { defaultNS = attrs.item(ai).value; break; } } if (!defaultNS) { for (var nsi = ns.length - 1; nsi >= 0; nsi--) { var nsEntry = ns[nsi]; if (nsEntry.prefix === "" && nsEntry.namespace === n2.namespaceURI) { defaultNS = nsEntry.namespace; break; } } } if (defaultNS !== n2.namespaceURI) { for (var nsi = ns.length - 1; nsi >= 0; nsi--) { var nsEntry = ns[nsi]; if (nsEntry.namespace === n2.namespaceURI) { if (nsEntry.prefix) { prefixedNodeName = nsEntry.prefix + ":" + nodeName; } break; } } } } buf.push("<", prefixedNodeName); var childNs = ns.slice(); for (var i2 = 0; i2 < len; i2++) { var attr = attrs.item(i2); if (attr.prefix == "xmlns") { childNs.push({ prefix: attr.localName, namespace: attr.value }); } else if (attr.nodeName == "xmlns") { childNs.push({ prefix: "", namespace: attr.value }); } } for (var i2 = 0; i2 < len; i2++) { var attr = attrs.item(i2); if (needNamespaceDefine(attr, html, childNs)) { var attrPrefix = attr.prefix || ""; var uri = attr.namespaceURI; addSerializedAttribute(buf, attrPrefix ? "xmlns:" + attrPrefix : "xmlns", uri); childNs.push({ prefix: attrPrefix, namespace: uri }); } var filteredAttr = nodeFilter ? nodeFilter(attr) : attr; if (filteredAttr) { if (typeof filteredAttr === "string") { buf.push(filteredAttr); } else { addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value); } } } if (nodeName === prefixedNodeName && needNamespaceDefine(n2, html, childNs)) { var nodePrefix = n2.prefix || ""; var uri = n2.namespaceURI; addSerializedAttribute(buf, nodePrefix ? "xmlns:" + nodePrefix : "xmlns", uri); childNs.push({ prefix: nodePrefix, namespace: uri }); } var child = n2.firstChild; if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) { buf.push(">"); if (html && /^script$/i.test(nodeName)) { while (child) { if (child.data) { buf.push(child.data); } else { serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed); } child = child.nextSibling; } buf.push(""); return null; } return { ns: childNs, isHTML: html, tag: prefixedNodeName }; } else { buf.push("/>"); return null; } case DOCUMENT_NODE: case DOCUMENT_FRAGMENT_NODE: return { ns: ns.slice(), isHTML: html, tag: null }; case ATTRIBUTE_NODE: addSerializedAttribute(buf, n2.name, n2.value); return null; case TEXT_NODE: buf.push(n2.data.replace(/[<&>]/g, _xmlEncoder)); return null; case CDATA_SECTION_NODE: if (requireWellFormed && n2.data.indexOf("]]>") !== -1) { throw new DOMException2(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"'); } buf.push("/g, "]]]]>"), "]]>"); return null; case COMMENT_NODE: if (requireWellFormed && n2.data.indexOf("-->") !== -1) { throw new DOMException2(INVALID_STATE_ERR, 'The comment node data contains "-->"'); } buf.push(""); return null; case DOCUMENT_TYPE_NODE: if (requireWellFormed) { if (n2.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n2.publicId)) { throw new DOMException2(INVALID_STATE_ERR, "DocumentType publicId is not a valid PubidLiteral"); } if (n2.systemId && !/^("[^"]*"|'[^']*')$/.test(n2.systemId)) { throw new DOMException2(INVALID_STATE_ERR, "DocumentType systemId is not a valid SystemLiteral"); } if (n2.internalSubset && n2.internalSubset.indexOf("]>") !== -1) { throw new DOMException2(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"'); } } var pubid = n2.publicId; var sysid = n2.systemId; buf.push(""); } else if (sysid && sysid != ".") { buf.push(" SYSTEM ", sysid, ">"); } else { var sub = n2.internalSubset; if (sub) { buf.push(" [", sub, "]"); } buf.push(">"); } return null; case PROCESSING_INSTRUCTION_NODE: if (requireWellFormed && n2.data.indexOf("?>") !== -1) { throw new DOMException2(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"'); } buf.push(""); return null; case ENTITY_REFERENCE_NODE: buf.push("&", n2.nodeName, ";"); return null; default: buf.push("??", n2.nodeName); return null; } }, exit: function(n2, childCtx) { if (childCtx && childCtx.tag) { buf.push(""); } } }); } function importNode(doc, node, deep) { var destRoot; walkDOM(node, null, { enter: function(srcNode, destParent) { var destNode = srcNode.cloneNode(false); destNode.ownerDocument = doc; destNode.parentNode = null; if (destParent === null) { destRoot = destNode; } else { destParent.appendChild(destNode); } var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep; return shouldDeep ? destNode : null; } }); return destRoot; } function cloneNode(doc, node, deep) { var destRoot; walkDOM(node, null, { enter: function(srcNode, destParent) { var destNode = new srcNode.constructor(); for (var n2 in srcNode) { if (Object.prototype.hasOwnProperty.call(srcNode, n2)) { var v2 = srcNode[n2]; if (typeof v2 != "object") { if (v2 != destNode[n2]) { destNode[n2] = v2; } } } } if (srcNode.childNodes) { destNode.childNodes = new NodeList(); } destNode.ownerDocument = doc; var shouldDeep = deep; switch (destNode.nodeType) { case ELEMENT_NODE: var attrs = srcNode.attributes; var attrs2 = destNode.attributes = new NamedNodeMap(); var len = attrs.length; attrs2._ownerElement = destNode; for (var i2 = 0; i2 < len; i2++) { destNode.setAttributeNode(cloneNode(doc, attrs.item(i2), true)); } break; case ATTRIBUTE_NODE: shouldDeep = true; } if (destParent !== null) { destParent.appendChild(destNode); } else { destRoot = destNode; } return shouldDeep ? destNode : null; } }); return destRoot; } function __set__(object2, key, value) { object2[key] = value; } try { if (Object.defineProperty) { Object.defineProperty(LiveNodeList.prototype, "length", { get: function() { _updateLiveList(this); return this.$$length; } }); Object.defineProperty(Node2.prototype, "textContent", { get: function() { if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) { var buf = []; walkDOM(this, null, { enter: function(n2) { if (n2.nodeType === ELEMENT_NODE || n2.nodeType === DOCUMENT_FRAGMENT_NODE) { return true; } if (n2.nodeType === PROCESSING_INSTRUCTION_NODE || n2.nodeType === COMMENT_NODE) { return null; } buf.push(n2.nodeValue); } }); return buf.join(""); } return this.nodeValue; }, set: function(data) { switch (this.nodeType) { case ELEMENT_NODE: case DOCUMENT_FRAGMENT_NODE: while (this.firstChild) { this.removeChild(this.firstChild); } if (data || String(data)) { this.appendChild(this.ownerDocument.createTextNode(data)); } break; default: this.data = data; this.value = data; this.nodeValue = data; } } }); __set__ = function(object2, key, value) { object2["$$" + key] = value; }; } } catch (e2) { } exports.DocumentType = DocumentType; exports.DOMException = DOMException2; exports.DOMImplementation = DOMImplementation; exports.Element = Element2; exports.Node = Node2; exports.NodeList = NodeList; exports.walkDOM = walkDOM; exports.XMLSerializer = XMLSerializer3; } }); // node_modules/@xmldom/xmldom/lib/entities.js var require_entities = __commonJS({ "node_modules/@xmldom/xmldom/lib/entities.js"(exports) { "use strict"; var freeze = require_conventions().freeze; exports.XML_ENTITIES = freeze({ amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' }); exports.HTML_ENTITIES = freeze({ Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}", Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\u2A3F", AMP: "&", amp: "&", And: "\u2A53", and: "\u2227", andand: "\u2A55", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220", ange: "\u29A4", angle: "\u2220", angmsd: "\u2221", angmsdaa: "\u29A8", angmsdab: "\u29A9", angmsdac: "\u29AA", angmsdad: "\u29AB", angmsdae: "\u29AC", angmsdaf: "\u29AD", angmsdag: "\u29AE", angmsdah: "\u29AF", angrt: "\u221F", angrtvb: "\u22BE", angrtvbd: "\u299D", angsph: "\u2222", angst: "\xC5", angzarr: "\u237C", Aogon: "\u0104", aogon: "\u0105", Aopf: "\u{1D538}", aopf: "\u{1D552}", ap: "\u2248", apacir: "\u2A6F", apE: "\u2A70", ape: "\u224A", apid: "\u224B", apos: "'", ApplyFunction: "\u2061", approx: "\u2248", approxeq: "\u224A", Aring: "\xC5", aring: "\xE5", Ascr: "\u{1D49C}", ascr: "\u{1D4B6}", Assign: "\u2254", ast: "*", asymp: "\u2248", asympeq: "\u224D", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", awconint: "\u2233", awint: "\u2A11", backcong: "\u224C", backepsilon: "\u03F6", backprime: "\u2035", backsim: "\u223D", backsimeq: "\u22CD", Backslash: "\u2216", Barv: "\u2AE7", barvee: "\u22BD", Barwed: "\u2306", barwed: "\u2305", barwedge: "\u2305", bbrk: "\u23B5", bbrktbrk: "\u23B6", bcong: "\u224C", Bcy: "\u0411", bcy: "\u0431", bdquo: "\u201E", becaus: "\u2235", Because: "\u2235", because: "\u2235", bemptyv: "\u29B0", bepsi: "\u03F6", bernou: "\u212C", Bernoullis: "\u212C", Beta: "\u0392", beta: "\u03B2", beth: "\u2136", between: "\u226C", Bfr: "\u{1D505}", bfr: "\u{1D51F}", bigcap: "\u22C2", bigcirc: "\u25EF", bigcup: "\u22C3", bigodot: "\u2A00", bigoplus: "\u2A01", bigotimes: "\u2A02", bigsqcup: "\u2A06", bigstar: "\u2605", bigtriangledown: "\u25BD", bigtriangleup: "\u25B3", biguplus: "\u2A04", bigvee: "\u22C1", bigwedge: "\u22C0", bkarow: "\u290D", blacklozenge: "\u29EB", blacksquare: "\u25AA", blacktriangle: "\u25B4", blacktriangledown: "\u25BE", blacktriangleleft: "\u25C2", blacktriangleright: "\u25B8", blank: "\u2423", blk12: "\u2592", blk14: "\u2591", blk34: "\u2593", block: "\u2588", bne: "=\u20E5", bnequiv: "\u2261\u20E5", bNot: "\u2AED", bnot: "\u2310", Bopf: "\u{1D539}", bopf: "\u{1D553}", bot: "\u22A5", bottom: "\u22A5", bowtie: "\u22C8", boxbox: "\u29C9", boxDL: "\u2557", boxDl: "\u2556", boxdL: "\u2555", boxdl: "\u2510", boxDR: "\u2554", boxDr: "\u2553", boxdR: "\u2552", boxdr: "\u250C", boxH: "\u2550", boxh: "\u2500", boxHD: "\u2566", boxHd: "\u2564", boxhD: "\u2565", boxhd: "\u252C", boxHU: "\u2569", boxHu: "\u2567", boxhU: "\u2568", boxhu: "\u2534", boxminus: "\u229F", boxplus: "\u229E", boxtimes: "\u22A0", boxUL: "\u255D", boxUl: "\u255C", boxuL: "\u255B", boxul: "\u2518", boxUR: "\u255A", boxUr: "\u2559", boxuR: "\u2558", boxur: "\u2514", boxV: "\u2551", boxv: "\u2502", boxVH: "\u256C", boxVh: "\u256B", boxvH: "\u256A", boxvh: "\u253C", boxVL: "\u2563", boxVl: "\u2562", boxvL: "\u2561", boxvl: "\u2524", boxVR: "\u2560", boxVr: "\u255F", boxvR: "\u255E", boxvr: "\u251C", bprime: "\u2035", Breve: "\u02D8", breve: "\u02D8", brvbar: "\xA6", Bscr: "\u212C", bscr: "\u{1D4B7}", bsemi: "\u204F", bsim: "\u223D", bsime: "\u22CD", bsol: "\\", bsolb: "\u29C5", bsolhsub: "\u27C8", bull: "\u2022", bullet: "\u2022", bump: "\u224E", bumpE: "\u2AAE", bumpe: "\u224F", Bumpeq: "\u224E", bumpeq: "\u224F", Cacute: "\u0106", cacute: "\u0107", Cap: "\u22D2", cap: "\u2229", capand: "\u2A44", capbrcup: "\u2A49", capcap: "\u2A4B", capcup: "\u2A47", capdot: "\u2A40", CapitalDifferentialD: "\u2145", caps: "\u2229\uFE00", caret: "\u2041", caron: "\u02C7", Cayleys: "\u212D", ccaps: "\u2A4D", Ccaron: "\u010C", ccaron: "\u010D", Ccedil: "\xC7", ccedil: "\xE7", Ccirc: "\u0108", ccirc: "\u0109", Cconint: "\u2230", ccups: "\u2A4C", ccupssm: "\u2A50", Cdot: "\u010A", cdot: "\u010B", cedil: "\xB8", Cedilla: "\xB8", cemptyv: "\u29B2", cent: "\xA2", CenterDot: "\xB7", centerdot: "\xB7", Cfr: "\u212D", cfr: "\u{1D520}", CHcy: "\u0427", chcy: "\u0447", check: "\u2713", checkmark: "\u2713", Chi: "\u03A7", chi: "\u03C7", cir: "\u25CB", circ: "\u02C6", circeq: "\u2257", circlearrowleft: "\u21BA", circlearrowright: "\u21BB", circledast: "\u229B", circledcirc: "\u229A", circleddash: "\u229D", CircleDot: "\u2299", circledR: "\xAE", circledS: "\u24C8", CircleMinus: "\u2296", CirclePlus: "\u2295", CircleTimes: "\u2297", cirE: "\u29C3", cire: "\u2257", cirfnint: "\u2A10", cirmid: "\u2AEF", cirscir: "\u29C2", ClockwiseContourIntegral: "\u2232", CloseCurlyDoubleQuote: "\u201D", CloseCurlyQuote: "\u2019", clubs: "\u2663", clubsuit: "\u2663", Colon: "\u2237", colon: ":", Colone: "\u2A74", colone: "\u2254", coloneq: "\u2254", comma: ",", commat: "@", comp: "\u2201", compfn: "\u2218", complement: "\u2201", complexes: "\u2102", cong: "\u2245", congdot: "\u2A6D", Congruent: "\u2261", Conint: "\u222F", conint: "\u222E", ContourIntegral: "\u222E", Copf: "\u2102", copf: "\u{1D554}", coprod: "\u2210", Coproduct: "\u2210", COPY: "\xA9", copy: "\xA9", copysr: "\u2117", CounterClockwiseContourIntegral: "\u2233", crarr: "\u21B5", Cross: "\u2A2F", cross: "\u2717", Cscr: "\u{1D49E}", cscr: "\u{1D4B8}", csub: "\u2ACF", csube: "\u2AD1", csup: "\u2AD0", csupe: "\u2AD2", ctdot: "\u22EF", cudarrl: "\u2938", cudarrr: "\u2935", cuepr: "\u22DE", cuesc: "\u22DF", cularr: "\u21B6", cularrp: "\u293D", Cup: "\u22D3", cup: "\u222A", cupbrcap: "\u2A48", CupCap: "\u224D", cupcap: "\u2A46", cupcup: "\u2A4A", cupdot: "\u228D", cupor: "\u2A45", cups: "\u222A\uFE00", curarr: "\u21B7", curarrm: "\u293C", curlyeqprec: "\u22DE", curlyeqsucc: "\u22DF", curlyvee: "\u22CE", curlywedge: "\u22CF", curren: "\xA4", curvearrowleft: "\u21B6", curvearrowright: "\u21B7", cuvee: "\u22CE", cuwed: "\u22CF", cwconint: "\u2232", cwint: "\u2231", cylcty: "\u232D", Dagger: "\u2021", dagger: "\u2020", daleth: "\u2138", Darr: "\u21A1", dArr: "\u21D3", darr: "\u2193", dash: "\u2010", Dashv: "\u2AE4", dashv: "\u22A3", dbkarow: "\u290F", dblac: "\u02DD", Dcaron: "\u010E", dcaron: "\u010F", Dcy: "\u0414", dcy: "\u0434", DD: "\u2145", dd: "\u2146", ddagger: "\u2021", ddarr: "\u21CA", DDotrahd: "\u2911", ddotseq: "\u2A77", deg: "\xB0", Del: "\u2207", Delta: "\u0394", delta: "\u03B4", demptyv: "\u29B1", dfisht: "\u297F", Dfr: "\u{1D507}", dfr: "\u{1D521}", dHar: "\u2965", dharl: "\u21C3", dharr: "\u21C2", DiacriticalAcute: "\xB4", DiacriticalDot: "\u02D9", DiacriticalDoubleAcute: "\u02DD", DiacriticalGrave: "`", DiacriticalTilde: "\u02DC", diam: "\u22C4", Diamond: "\u22C4", diamond: "\u22C4", diamondsuit: "\u2666", diams: "\u2666", die: "\xA8", DifferentialD: "\u2146", digamma: "\u03DD", disin: "\u22F2", div: "\xF7", divide: "\xF7", divideontimes: "\u22C7", divonx: "\u22C7", DJcy: "\u0402", djcy: "\u0452", dlcorn: "\u231E", dlcrop: "\u230D", dollar: "$", Dopf: "\u{1D53B}", dopf: "\u{1D555}", Dot: "\xA8", dot: "\u02D9", DotDot: "\u20DC", doteq: "\u2250", doteqdot: "\u2251", DotEqual: "\u2250", dotminus: "\u2238", dotplus: "\u2214", dotsquare: "\u22A1", doublebarwedge: "\u2306", DoubleContourIntegral: "\u222F", DoubleDot: "\xA8", DoubleDownArrow: "\u21D3", DoubleLeftArrow: "\u21D0", DoubleLeftRightArrow: "\u21D4", DoubleLeftTee: "\u2AE4", DoubleLongLeftArrow: "\u27F8", DoubleLongLeftRightArrow: "\u27FA", DoubleLongRightArrow: "\u27F9", DoubleRightArrow: "\u21D2", DoubleRightTee: "\u22A8", DoubleUpArrow: "\u21D1", DoubleUpDownArrow: "\u21D5", DoubleVerticalBar: "\u2225", DownArrow: "\u2193", Downarrow: "\u21D3", downarrow: "\u2193", DownArrowBar: "\u2913", DownArrowUpArrow: "\u21F5", DownBreve: "\u0311", downdownarrows: "\u21CA", downharpoonleft: "\u21C3", downharpoonright: "\u21C2", DownLeftRightVector: "\u2950", DownLeftTeeVector: "\u295E", DownLeftVector: "\u21BD", DownLeftVectorBar: "\u2956", DownRightTeeVector: "\u295F", DownRightVector: "\u21C1", DownRightVectorBar: "\u2957", DownTee: "\u22A4", DownTeeArrow: "\u21A7", drbkarow: "\u2910", drcorn: "\u231F", drcrop: "\u230C", Dscr: "\u{1D49F}", dscr: "\u{1D4B9}", DScy: "\u0405", dscy: "\u0455", dsol: "\u29F6", Dstrok: "\u0110", dstrok: "\u0111", dtdot: "\u22F1", dtri: "\u25BF", dtrif: "\u25BE", duarr: "\u21F5", duhar: "\u296F", dwangle: "\u29A6", DZcy: "\u040F", dzcy: "\u045F", dzigrarr: "\u27FF", Eacute: "\xC9", eacute: "\xE9", easter: "\u2A6E", Ecaron: "\u011A", ecaron: "\u011B", ecir: "\u2256", Ecirc: "\xCA", ecirc: "\xEA", ecolon: "\u2255", Ecy: "\u042D", ecy: "\u044D", eDDot: "\u2A77", Edot: "\u0116", eDot: "\u2251", edot: "\u0117", ee: "\u2147", efDot: "\u2252", Efr: "\u{1D508}", efr: "\u{1D522}", eg: "\u2A9A", Egrave: "\xC8", egrave: "\xE8", egs: "\u2A96", egsdot: "\u2A98", el: "\u2A99", Element: "\u2208", elinters: "\u23E7", ell: "\u2113", els: "\u2A95", elsdot: "\u2A97", Emacr: "\u0112", emacr: "\u0113", empty: "\u2205", emptyset: "\u2205", EmptySmallSquare: "\u25FB", emptyv: "\u2205", EmptyVerySmallSquare: "\u25AB", emsp: "\u2003", emsp13: "\u2004", emsp14: "\u2005", ENG: "\u014A", eng: "\u014B", ensp: "\u2002", Eogon: "\u0118", eogon: "\u0119", Eopf: "\u{1D53C}", eopf: "\u{1D556}", epar: "\u22D5", eparsl: "\u29E3", eplus: "\u2A71", epsi: "\u03B5", Epsilon: "\u0395", epsilon: "\u03B5", epsiv: "\u03F5", eqcirc: "\u2256", eqcolon: "\u2255", eqsim: "\u2242", eqslantgtr: "\u2A96", eqslantless: "\u2A95", Equal: "\u2A75", equals: "=", EqualTilde: "\u2242", equest: "\u225F", Equilibrium: "\u21CC", equiv: "\u2261", equivDD: "\u2A78", eqvparsl: "\u29E5", erarr: "\u2971", erDot: "\u2253", Escr: "\u2130", escr: "\u212F", esdot: "\u2250", Esim: "\u2A73", esim: "\u2242", Eta: "\u0397", eta: "\u03B7", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", euro: "\u20AC", excl: "!", exist: "\u2203", Exists: "\u2203", expectation: "\u2130", ExponentialE: "\u2147", exponentiale: "\u2147", fallingdotseq: "\u2252", Fcy: "\u0424", fcy: "\u0444", female: "\u2640", ffilig: "\uFB03", fflig: "\uFB00", ffllig: "\uFB04", Ffr: "\u{1D509}", ffr: "\u{1D523}", filig: "\uFB01", FilledSmallSquare: "\u25FC", FilledVerySmallSquare: "\u25AA", fjlig: "fj", flat: "\u266D", fllig: "\uFB02", fltns: "\u25B1", fnof: "\u0192", Fopf: "\u{1D53D}", fopf: "\u{1D557}", ForAll: "\u2200", forall: "\u2200", fork: "\u22D4", forkv: "\u2AD9", Fouriertrf: "\u2131", fpartint: "\u2A0D", frac12: "\xBD", frac13: "\u2153", frac14: "\xBC", frac15: "\u2155", frac16: "\u2159", frac18: "\u215B", frac23: "\u2154", frac25: "\u2156", frac34: "\xBE", frac35: "\u2157", frac38: "\u215C", frac45: "\u2158", frac56: "\u215A", frac58: "\u215D", frac78: "\u215E", frasl: "\u2044", frown: "\u2322", Fscr: "\u2131", fscr: "\u{1D4BB}", gacute: "\u01F5", Gamma: "\u0393", gamma: "\u03B3", Gammad: "\u03DC", gammad: "\u03DD", gap: "\u2A86", Gbreve: "\u011E", gbreve: "\u011F", Gcedil: "\u0122", Gcirc: "\u011C", gcirc: "\u011D", Gcy: "\u0413", gcy: "\u0433", Gdot: "\u0120", gdot: "\u0121", gE: "\u2267", ge: "\u2265", gEl: "\u2A8C", gel: "\u22DB", geq: "\u2265", geqq: "\u2267", geqslant: "\u2A7E", ges: "\u2A7E", gescc: "\u2AA9", gesdot: "\u2A80", gesdoto: "\u2A82", gesdotol: "\u2A84", gesl: "\u22DB\uFE00", gesles: "\u2A94", Gfr: "\u{1D50A}", gfr: "\u{1D524}", Gg: "\u22D9", gg: "\u226B", ggg: "\u22D9", gimel: "\u2137", GJcy: "\u0403", gjcy: "\u0453", gl: "\u2277", gla: "\u2AA5", glE: "\u2A92", glj: "\u2AA4", gnap: "\u2A8A", gnapprox: "\u2A8A", gnE: "\u2269", gne: "\u2A88", gneq: "\u2A88", gneqq: "\u2269", gnsim: "\u22E7", Gopf: "\u{1D53E}", gopf: "\u{1D558}", grave: "`", GreaterEqual: "\u2265", GreaterEqualLess: "\u22DB", GreaterFullEqual: "\u2267", GreaterGreater: "\u2AA2", GreaterLess: "\u2277", GreaterSlantEqual: "\u2A7E", GreaterTilde: "\u2273", Gscr: "\u{1D4A2}", gscr: "\u210A", gsim: "\u2273", gsime: "\u2A8E", gsiml: "\u2A90", Gt: "\u226B", GT: ">", gt: ">", gtcc: "\u2AA7", gtcir: "\u2A7A", gtdot: "\u22D7", gtlPar: "\u2995", gtquest: "\u2A7C", gtrapprox: "\u2A86", gtrarr: "\u2978", gtrdot: "\u22D7", gtreqless: "\u22DB", gtreqqless: "\u2A8C", gtrless: "\u2277", gtrsim: "\u2273", gvertneqq: "\u2269\uFE00", gvnE: "\u2269\uFE00", Hacek: "\u02C7", hairsp: "\u200A", half: "\xBD", hamilt: "\u210B", HARDcy: "\u042A", hardcy: "\u044A", hArr: "\u21D4", harr: "\u2194", harrcir: "\u2948", harrw: "\u21AD", Hat: "^", hbar: "\u210F", Hcirc: "\u0124", hcirc: "\u0125", hearts: "\u2665", heartsuit: "\u2665", hellip: "\u2026", hercon: "\u22B9", Hfr: "\u210C", hfr: "\u{1D525}", HilbertSpace: "\u210B", hksearow: "\u2925", hkswarow: "\u2926", hoarr: "\u21FF", homtht: "\u223B", hookleftarrow: "\u21A9", hookrightarrow: "\u21AA", Hopf: "\u210D", hopf: "\u{1D559}", horbar: "\u2015", HorizontalLine: "\u2500", Hscr: "\u210B", hscr: "\u{1D4BD}", hslash: "\u210F", Hstrok: "\u0126", hstrok: "\u0127", HumpDownHump: "\u224E", HumpEqual: "\u224F", hybull: "\u2043", hyphen: "\u2010", Iacute: "\xCD", iacute: "\xED", ic: "\u2063", Icirc: "\xCE", icirc: "\xEE", Icy: "\u0418", icy: "\u0438", Idot: "\u0130", IEcy: "\u0415", iecy: "\u0435", iexcl: "\xA1", iff: "\u21D4", Ifr: "\u2111", ifr: "\u{1D526}", Igrave: "\xCC", igrave: "\xEC", ii: "\u2148", iiiint: "\u2A0C", iiint: "\u222D", iinfin: "\u29DC", iiota: "\u2129", IJlig: "\u0132", ijlig: "\u0133", Im: "\u2111", Imacr: "\u012A", imacr: "\u012B", image: "\u2111", ImaginaryI: "\u2148", imagline: "\u2110", imagpart: "\u2111", imath: "\u0131", imof: "\u22B7", imped: "\u01B5", Implies: "\u21D2", in: "\u2208", incare: "\u2105", infin: "\u221E", infintie: "\u29DD", inodot: "\u0131", Int: "\u222C", int: "\u222B", intcal: "\u22BA", integers: "\u2124", Integral: "\u222B", intercal: "\u22BA", Intersection: "\u22C2", intlarhk: "\u2A17", intprod: "\u2A3C", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "\u0401", iocy: "\u0451", Iogon: "\u012E", iogon: "\u012F", Iopf: "\u{1D540}", iopf: "\u{1D55A}", Iota: "\u0399", iota: "\u03B9", iprod: "\u2A3C", iquest: "\xBF", Iscr: "\u2110", iscr: "\u{1D4BE}", isin: "\u2208", isindot: "\u22F5", isinE: "\u22F9", isins: "\u22F4", isinsv: "\u22F3", isinv: "\u2208", it: "\u2062", Itilde: "\u0128", itilde: "\u0129", Iukcy: "\u0406", iukcy: "\u0456", Iuml: "\xCF", iuml: "\xEF", Jcirc: "\u0134", jcirc: "\u0135", Jcy: "\u0419", jcy: "\u0439", Jfr: "\u{1D50D}", jfr: "\u{1D527}", jmath: "\u0237", Jopf: "\u{1D541}", jopf: "\u{1D55B}", Jscr: "\u{1D4A5}", jscr: "\u{1D4BF}", Jsercy: "\u0408", jsercy: "\u0458", Jukcy: "\u0404", jukcy: "\u0454", Kappa: "\u039A", kappa: "\u03BA", kappav: "\u03F0", Kcedil: "\u0136", kcedil: "\u0137", Kcy: "\u041A", kcy: "\u043A", Kfr: "\u{1D50E}", kfr: "\u{1D528}", kgreen: "\u0138", KHcy: "\u0425", khcy: "\u0445", KJcy: "\u040C", kjcy: "\u045C", Kopf: "\u{1D542}", kopf: "\u{1D55C}", Kscr: "\u{1D4A6}", kscr: "\u{1D4C0}", lAarr: "\u21DA", Lacute: "\u0139", lacute: "\u013A", laemptyv: "\u29B4", lagran: "\u2112", Lambda: "\u039B", lambda: "\u03BB", Lang: "\u27EA", lang: "\u27E8", langd: "\u2991", langle: "\u27E8", lap: "\u2A85", Laplacetrf: "\u2112", laquo: "\xAB", Larr: "\u219E", lArr: "\u21D0", larr: "\u2190", larrb: "\u21E4", larrbfs: "\u291F", larrfs: "\u291D", larrhk: "\u21A9", larrlp: "\u21AB", larrpl: "\u2939", larrsim: "\u2973", larrtl: "\u21A2", lat: "\u2AAB", lAtail: "\u291B", latail: "\u2919", late: "\u2AAD", lates: "\u2AAD\uFE00", lBarr: "\u290E", lbarr: "\u290C", lbbrk: "\u2772", lbrace: "{", lbrack: "[", lbrke: "\u298B", lbrksld: "\u298F", lbrkslu: "\u298D", Lcaron: "\u013D", lcaron: "\u013E", Lcedil: "\u013B", lcedil: "\u013C", lceil: "\u2308", lcub: "{", Lcy: "\u041B", lcy: "\u043B", ldca: "\u2936", ldquo: "\u201C", ldquor: "\u201E", ldrdhar: "\u2967", ldrushar: "\u294B", ldsh: "\u21B2", lE: "\u2266", le: "\u2264", LeftAngleBracket: "\u27E8", LeftArrow: "\u2190", Leftarrow: "\u21D0", leftarrow: "\u2190", LeftArrowBar: "\u21E4", LeftArrowRightArrow: "\u21C6", leftarrowtail: "\u21A2", LeftCeiling: "\u2308", LeftDoubleBracket: "\u27E6", LeftDownTeeVector: "\u2961", LeftDownVector: "\u21C3", LeftDownVectorBar: "\u2959", LeftFloor: "\u230A", leftharpoondown: "\u21BD", leftharpoonup: "\u21BC", leftleftarrows: "\u21C7", LeftRightArrow: "\u2194", Leftrightarrow: "\u21D4", leftrightarrow: "\u2194", leftrightarrows: "\u21C6", leftrightharpoons: "\u21CB", leftrightsquigarrow: "\u21AD", LeftRightVector: "\u294E", LeftTee: "\u22A3", LeftTeeArrow: "\u21A4", LeftTeeVector: "\u295A", leftthreetimes: "\u22CB", LeftTriangle: "\u22B2", LeftTriangleBar: "\u29CF", LeftTriangleEqual: "\u22B4", LeftUpDownVector: "\u2951", LeftUpTeeVector: "\u2960", LeftUpVector: "\u21BF", LeftUpVectorBar: "\u2958", LeftVector: "\u21BC", LeftVectorBar: "\u2952", lEg: "\u2A8B", leg: "\u22DA", leq: "\u2264", leqq: "\u2266", leqslant: "\u2A7D", les: "\u2A7D", lescc: "\u2AA8", lesdot: "\u2A7F", lesdoto: "\u2A81", lesdotor: "\u2A83", lesg: "\u22DA\uFE00", lesges: "\u2A93", lessapprox: "\u2A85", lessdot: "\u22D6", lesseqgtr: "\u22DA", lesseqqgtr: "\u2A8B", LessEqualGreater: "\u22DA", LessFullEqual: "\u2266", LessGreater: "\u2276", lessgtr: "\u2276", LessLess: "\u2AA1", lesssim: "\u2272", LessSlantEqual: "\u2A7D", LessTilde: "\u2272", lfisht: "\u297C", lfloor: "\u230A", Lfr: "\u{1D50F}", lfr: "\u{1D529}", lg: "\u2276", lgE: "\u2A91", lHar: "\u2962", lhard: "\u21BD", lharu: "\u21BC", lharul: "\u296A", lhblk: "\u2584", LJcy: "\u0409", ljcy: "\u0459", Ll: "\u22D8", ll: "\u226A", llarr: "\u21C7", llcorner: "\u231E", Lleftarrow: "\u21DA", llhard: "\u296B", lltri: "\u25FA", Lmidot: "\u013F", lmidot: "\u0140", lmoust: "\u23B0", lmoustache: "\u23B0", lnap: "\u2A89", lnapprox: "\u2A89", lnE: "\u2268", lne: "\u2A87", lneq: "\u2A87", lneqq: "\u2268", lnsim: "\u22E6", loang: "\u27EC", loarr: "\u21FD", lobrk: "\u27E6", LongLeftArrow: "\u27F5", Longleftarrow: "\u27F8", longleftarrow: "\u27F5", LongLeftRightArrow: "\u27F7", Longleftrightarrow: "\u27FA", longleftrightarrow: "\u27F7", longmapsto: "\u27FC", LongRightArrow: "\u27F6", Longrightarrow: "\u27F9", longrightarrow: "\u27F6", looparrowleft: "\u21AB", looparrowright: "\u21AC", lopar: "\u2985", Lopf: "\u{1D543}", lopf: "\u{1D55D}", loplus: "\u2A2D", lotimes: "\u2A34", lowast: "\u2217", lowbar: "_", LowerLeftArrow: "\u2199", LowerRightArrow: "\u2198", loz: "\u25CA", lozenge: "\u25CA", lozf: "\u29EB", lpar: "(", lparlt: "\u2993", lrarr: "\u21C6", lrcorner: "\u231F", lrhar: "\u21CB", lrhard: "\u296D", lrm: "\u200E", lrtri: "\u22BF", lsaquo: "\u2039", Lscr: "\u2112", lscr: "\u{1D4C1}", Lsh: "\u21B0", lsh: "\u21B0", lsim: "\u2272", lsime: "\u2A8D", lsimg: "\u2A8F", lsqb: "[", lsquo: "\u2018", lsquor: "\u201A", Lstrok: "\u0141", lstrok: "\u0142", Lt: "\u226A", LT: "<", lt: "<", ltcc: "\u2AA6", ltcir: "\u2A79", ltdot: "\u22D6", lthree: "\u22CB", ltimes: "\u22C9", ltlarr: "\u2976", ltquest: "\u2A7B", ltri: "\u25C3", ltrie: "\u22B4", ltrif: "\u25C2", ltrPar: "\u2996", lurdshar: "\u294A", luruhar: "\u2966", lvertneqq: "\u2268\uFE00", lvnE: "\u2268\uFE00", macr: "\xAF", male: "\u2642", malt: "\u2720", maltese: "\u2720", Map: "\u2905", map: "\u21A6", mapsto: "\u21A6", mapstodown: "\u21A7", mapstoleft: "\u21A4", mapstoup: "\u21A5", marker: "\u25AE", mcomma: "\u2A29", Mcy: "\u041C", mcy: "\u043C", mdash: "\u2014", mDDot: "\u223A", measuredangle: "\u2221", MediumSpace: "\u205F", Mellintrf: "\u2133", Mfr: "\u{1D510}", mfr: "\u{1D52A}", mho: "\u2127", micro: "\xB5", mid: "\u2223", midast: "*", midcir: "\u2AF0", middot: "\xB7", minus: "\u2212", minusb: "\u229F", minusd: "\u2238", minusdu: "\u2A2A", MinusPlus: "\u2213", mlcp: "\u2ADB", mldr: "\u2026", mnplus: "\u2213", models: "\u22A7", Mopf: "\u{1D544}", mopf: "\u{1D55E}", mp: "\u2213", Mscr: "\u2133", mscr: "\u{1D4C2}", mstpos: "\u223E", Mu: "\u039C", mu: "\u03BC", multimap: "\u22B8", mumap: "\u22B8", nabla: "\u2207", Nacute: "\u0143", nacute: "\u0144", nang: "\u2220\u20D2", nap: "\u2249", napE: "\u2A70\u0338", napid: "\u224B\u0338", napos: "\u0149", napprox: "\u2249", natur: "\u266E", natural: "\u266E", naturals: "\u2115", nbsp: "\xA0", nbump: "\u224E\u0338", nbumpe: "\u224F\u0338", ncap: "\u2A43", Ncaron: "\u0147", ncaron: "\u0148", Ncedil: "\u0145", ncedil: "\u0146", ncong: "\u2247", ncongdot: "\u2A6D\u0338", ncup: "\u2A42", Ncy: "\u041D", ncy: "\u043D", ndash: "\u2013", ne: "\u2260", nearhk: "\u2924", neArr: "\u21D7", nearr: "\u2197", nearrow: "\u2197", nedot: "\u2250\u0338", NegativeMediumSpace: "\u200B", NegativeThickSpace: "\u200B", NegativeThinSpace: "\u200B", NegativeVeryThinSpace: "\u200B", nequiv: "\u2262", nesear: "\u2928", nesim: "\u2242\u0338", NestedGreaterGreater: "\u226B", NestedLessLess: "\u226A", NewLine: "\n", nexist: "\u2204", nexists: "\u2204", Nfr: "\u{1D511}", nfr: "\u{1D52B}", ngE: "\u2267\u0338", nge: "\u2271", ngeq: "\u2271", ngeqq: "\u2267\u0338", ngeqslant: "\u2A7E\u0338", nges: "\u2A7E\u0338", nGg: "\u22D9\u0338", ngsim: "\u2275", nGt: "\u226B\u20D2", ngt: "\u226F", ngtr: "\u226F", nGtv: "\u226B\u0338", nhArr: "\u21CE", nharr: "\u21AE", nhpar: "\u2AF2", ni: "\u220B", nis: "\u22FC", nisd: "\u22FA", niv: "\u220B", NJcy: "\u040A", njcy: "\u045A", nlArr: "\u21CD", nlarr: "\u219A", nldr: "\u2025", nlE: "\u2266\u0338", nle: "\u2270", nLeftarrow: "\u21CD", nleftarrow: "\u219A", nLeftrightarrow: "\u21CE", nleftrightarrow: "\u21AE", nleq: "\u2270", nleqq: "\u2266\u0338", nleqslant: "\u2A7D\u0338", nles: "\u2A7D\u0338", nless: "\u226E", nLl: "\u22D8\u0338", nlsim: "\u2274", nLt: "\u226A\u20D2", nlt: "\u226E", nltri: "\u22EA", nltrie: "\u22EC", nLtv: "\u226A\u0338", nmid: "\u2224", NoBreak: "\u2060", NonBreakingSpace: "\xA0", Nopf: "\u2115", nopf: "\u{1D55F}", Not: "\u2AEC", not: "\xAC", NotCongruent: "\u2262", NotCupCap: "\u226D", NotDoubleVerticalBar: "\u2226", NotElement: "\u2209", NotEqual: "\u2260", NotEqualTilde: "\u2242\u0338", NotExists: "\u2204", NotGreater: "\u226F", NotGreaterEqual: "\u2271", NotGreaterFullEqual: "\u2267\u0338", NotGreaterGreater: "\u226B\u0338", NotGreaterLess: "\u2279", NotGreaterSlantEqual: "\u2A7E\u0338", NotGreaterTilde: "\u2275", NotHumpDownHump: "\u224E\u0338", NotHumpEqual: "\u224F\u0338", notin: "\u2209", notindot: "\u22F5\u0338", notinE: "\u22F9\u0338", notinva: "\u2209", notinvb: "\u22F7", notinvc: "\u22F6", NotLeftTriangle: "\u22EA", NotLeftTriangleBar: "\u29CF\u0338", NotLeftTriangleEqual: "\u22EC", NotLess: "\u226E", NotLessEqual: "\u2270", NotLessGreater: "\u2278", NotLessLess: "\u226A\u0338", NotLessSlantEqual: "\u2A7D\u0338", NotLessTilde: "\u2274", NotNestedGreaterGreater: "\u2AA2\u0338", NotNestedLessLess: "\u2AA1\u0338", notni: "\u220C", notniva: "\u220C", notnivb: "\u22FE", notnivc: "\u22FD", NotPrecedes: "\u2280", NotPrecedesEqual: "\u2AAF\u0338", NotPrecedesSlantEqual: "\u22E0", NotReverseElement: "\u220C", NotRightTriangle: "\u22EB", NotRightTriangleBar: "\u29D0\u0338", NotRightTriangleEqual: "\u22ED", NotSquareSubset: "\u228F\u0338", NotSquareSubsetEqual: "\u22E2", NotSquareSuperset: "\u2290\u0338", NotSquareSupersetEqual: "\u22E3", NotSubset: "\u2282\u20D2", NotSubsetEqual: "\u2288", NotSucceeds: "\u2281", NotSucceedsEqual: "\u2AB0\u0338", NotSucceedsSlantEqual: "\u22E1", NotSucceedsTilde: "\u227F\u0338", NotSuperset: "\u2283\u20D2", NotSupersetEqual: "\u2289", NotTilde: "\u2241", NotTildeEqual: "\u2244", NotTildeFullEqual: "\u2247", NotTildeTilde: "\u2249", NotVerticalBar: "\u2224", npar: "\u2226", nparallel: "\u2226", nparsl: "\u2AFD\u20E5", npart: "\u2202\u0338", npolint: "\u2A14", npr: "\u2280", nprcue: "\u22E0", npre: "\u2AAF\u0338", nprec: "\u2280", npreceq: "\u2AAF\u0338", nrArr: "\u21CF", nrarr: "\u219B", nrarrc: "\u2933\u0338", nrarrw: "\u219D\u0338", nRightarrow: "\u21CF", nrightarrow: "\u219B", nrtri: "\u22EB", nrtrie: "\u22ED", nsc: "\u2281", nsccue: "\u22E1", nsce: "\u2AB0\u0338", Nscr: "\u{1D4A9}", nscr: "\u{1D4C3}", nshortmid: "\u2224", nshortparallel: "\u2226", nsim: "\u2241", nsime: "\u2244", nsimeq: "\u2244", nsmid: "\u2224", nspar: "\u2226", nsqsube: "\u22E2", nsqsupe: "\u22E3", nsub: "\u2284", nsubE: "\u2AC5\u0338", nsube: "\u2288", nsubset: "\u2282\u20D2", nsubseteq: "\u2288", nsubseteqq: "\u2AC5\u0338", nsucc: "\u2281", nsucceq: "\u2AB0\u0338", nsup: "\u2285", nsupE: "\u2AC6\u0338", nsupe: "\u2289", nsupset: "\u2283\u20D2", nsupseteq: "\u2289", nsupseteqq: "\u2AC6\u0338", ntgl: "\u2279", Ntilde: "\xD1", ntilde: "\xF1", ntlg: "\u2278", ntriangleleft: "\u22EA", ntrianglelefteq: "\u22EC", ntriangleright: "\u22EB", ntrianglerighteq: "\u22ED", Nu: "\u039D", nu: "\u03BD", num: "#", numero: "\u2116", numsp: "\u2007", nvap: "\u224D\u20D2", nVDash: "\u22AF", nVdash: "\u22AE", nvDash: "\u22AD", nvdash: "\u22AC", nvge: "\u2265\u20D2", nvgt: ">\u20D2", nvHarr: "\u2904", nvinfin: "\u29DE", nvlArr: "\u2902", nvle: "\u2264\u20D2", nvlt: "<\u20D2", nvltrie: "\u22B4\u20D2", nvrArr: "\u2903", nvrtrie: "\u22B5\u20D2", nvsim: "\u223C\u20D2", nwarhk: "\u2923", nwArr: "\u21D6", nwarr: "\u2196", nwarrow: "\u2196", nwnear: "\u2927", Oacute: "\xD3", oacute: "\xF3", oast: "\u229B", ocir: "\u229A", Ocirc: "\xD4", ocirc: "\xF4", Ocy: "\u041E", ocy: "\u043E", odash: "\u229D", Odblac: "\u0150", odblac: "\u0151", odiv: "\u2A38", odot: "\u2299", odsold: "\u29BC", OElig: "\u0152", oelig: "\u0153", ofcir: "\u29BF", Ofr: "\u{1D512}", ofr: "\u{1D52C}", ogon: "\u02DB", Ograve: "\xD2", ograve: "\xF2", ogt: "\u29C1", ohbar: "\u29B5", ohm: "\u03A9", oint: "\u222E", olarr: "\u21BA", olcir: "\u29BE", olcross: "\u29BB", oline: "\u203E", olt: "\u29C0", Omacr: "\u014C", omacr: "\u014D", Omega: "\u03A9", omega: "\u03C9", Omicron: "\u039F", omicron: "\u03BF", omid: "\u29B6", ominus: "\u2296", Oopf: "\u{1D546}", oopf: "\u{1D560}", opar: "\u29B7", OpenCurlyDoubleQuote: "\u201C", OpenCurlyQuote: "\u2018", operp: "\u29B9", oplus: "\u2295", Or: "\u2A54", or: "\u2228", orarr: "\u21BB", ord: "\u2A5D", order: "\u2134", orderof: "\u2134", ordf: "\xAA", ordm: "\xBA", origof: "\u22B6", oror: "\u2A56", orslope: "\u2A57", orv: "\u2A5B", oS: "\u24C8", Oscr: "\u{1D4AA}", oscr: "\u2134", Oslash: "\xD8", oslash: "\xF8", osol: "\u2298", Otilde: "\xD5", otilde: "\xF5", Otimes: "\u2A37", otimes: "\u2297", otimesas: "\u2A36", Ouml: "\xD6", ouml: "\xF6", ovbar: "\u233D", OverBar: "\u203E", OverBrace: "\u23DE", OverBracket: "\u23B4", OverParenthesis: "\u23DC", par: "\u2225", para: "\xB6", parallel: "\u2225", parsim: "\u2AF3", parsl: "\u2AFD", part: "\u2202", PartialD: "\u2202", Pcy: "\u041F", pcy: "\u043F", percnt: "%", period: ".", permil: "\u2030", perp: "\u22A5", pertenk: "\u2031", Pfr: "\u{1D513}", pfr: "\u{1D52D}", Phi: "\u03A6", phi: "\u03C6", phiv: "\u03D5", phmmat: "\u2133", phone: "\u260E", Pi: "\u03A0", pi: "\u03C0", pitchfork: "\u22D4", piv: "\u03D6", planck: "\u210F", planckh: "\u210E", plankv: "\u210F", plus: "+", plusacir: "\u2A23", plusb: "\u229E", pluscir: "\u2A22", plusdo: "\u2214", plusdu: "\u2A25", pluse: "\u2A72", PlusMinus: "\xB1", plusmn: "\xB1", plussim: "\u2A26", plustwo: "\u2A27", pm: "\xB1", Poincareplane: "\u210C", pointint: "\u2A15", Popf: "\u2119", popf: "\u{1D561}", pound: "\xA3", Pr: "\u2ABB", pr: "\u227A", prap: "\u2AB7", prcue: "\u227C", prE: "\u2AB3", pre: "\u2AAF", prec: "\u227A", precapprox: "\u2AB7", preccurlyeq: "\u227C", Precedes: "\u227A", PrecedesEqual: "\u2AAF", PrecedesSlantEqual: "\u227C", PrecedesTilde: "\u227E", preceq: "\u2AAF", precnapprox: "\u2AB9", precneqq: "\u2AB5", precnsim: "\u22E8", precsim: "\u227E", Prime: "\u2033", prime: "\u2032", primes: "\u2119", prnap: "\u2AB9", prnE: "\u2AB5", prnsim: "\u22E8", prod: "\u220F", Product: "\u220F", profalar: "\u232E", profline: "\u2312", profsurf: "\u2313", prop: "\u221D", Proportion: "\u2237", Proportional: "\u221D", propto: "\u221D", prsim: "\u227E", prurel: "\u22B0", Pscr: "\u{1D4AB}", pscr: "\u{1D4C5}", Psi: "\u03A8", psi: "\u03C8", puncsp: "\u2008", Qfr: "\u{1D514}", qfr: "\u{1D52E}", qint: "\u2A0C", Qopf: "\u211A", qopf: "\u{1D562}", qprime: "\u2057", Qscr: "\u{1D4AC}", qscr: "\u{1D4C6}", quaternions: "\u210D", quatint: "\u2A16", quest: "?", questeq: "\u225F", QUOT: '"', quot: '"', rAarr: "\u21DB", race: "\u223D\u0331", Racute: "\u0154", racute: "\u0155", radic: "\u221A", raemptyv: "\u29B3", Rang: "\u27EB", rang: "\u27E9", rangd: "\u2992", range: "\u29A5", rangle: "\u27E9", raquo: "\xBB", Rarr: "\u21A0", rArr: "\u21D2", rarr: "\u2192", rarrap: "\u2975", rarrb: "\u21E5", rarrbfs: "\u2920", rarrc: "\u2933", rarrfs: "\u291E", rarrhk: "\u21AA", rarrlp: "\u21AC", rarrpl: "\u2945", rarrsim: "\u2974", Rarrtl: "\u2916", rarrtl: "\u21A3", rarrw: "\u219D", rAtail: "\u291C", ratail: "\u291A", ratio: "\u2236", rationals: "\u211A", RBarr: "\u2910", rBarr: "\u290F", rbarr: "\u290D", rbbrk: "\u2773", rbrace: "}", rbrack: "]", rbrke: "\u298C", rbrksld: "\u298E", rbrkslu: "\u2990", Rcaron: "\u0158", rcaron: "\u0159", Rcedil: "\u0156", rcedil: "\u0157", rceil: "\u2309", rcub: "}", Rcy: "\u0420", rcy: "\u0440", rdca: "\u2937", rdldhar: "\u2969", rdquo: "\u201D", rdquor: "\u201D", rdsh: "\u21B3", Re: "\u211C", real: "\u211C", realine: "\u211B", realpart: "\u211C", reals: "\u211D", rect: "\u25AD", REG: "\xAE", reg: "\xAE", ReverseElement: "\u220B", ReverseEquilibrium: "\u21CB", ReverseUpEquilibrium: "\u296F", rfisht: "\u297D", rfloor: "\u230B", Rfr: "\u211C", rfr: "\u{1D52F}", rHar: "\u2964", rhard: "\u21C1", rharu: "\u21C0", rharul: "\u296C", Rho: "\u03A1", rho: "\u03C1", rhov: "\u03F1", RightAngleBracket: "\u27E9", RightArrow: "\u2192", Rightarrow: "\u21D2", rightarrow: "\u2192", RightArrowBar: "\u21E5", RightArrowLeftArrow: "\u21C4", rightarrowtail: "\u21A3", RightCeiling: "\u2309", RightDoubleBracket: "\u27E7", RightDownTeeVector: "\u295D", RightDownVector: "\u21C2", RightDownVectorBar: "\u2955", RightFloor: "\u230B", rightharpoondown: "\u21C1", rightharpoonup: "\u21C0", rightleftarrows: "\u21C4", rightleftharpoons: "\u21CC", rightrightarrows: "\u21C9", rightsquigarrow: "\u219D", RightTee: "\u22A2", RightTeeArrow: "\u21A6", RightTeeVector: "\u295B", rightthreetimes: "\u22CC", RightTriangle: "\u22B3", RightTriangleBar: "\u29D0", RightTriangleEqual: "\u22B5", RightUpDownVector: "\u294F", RightUpTeeVector: "\u295C", RightUpVector: "\u21BE", RightUpVectorBar: "\u2954", RightVector: "\u21C0", RightVectorBar: "\u2953", ring: "\u02DA", risingdotseq: "\u2253", rlarr: "\u21C4", rlhar: "\u21CC", rlm: "\u200F", rmoust: "\u23B1", rmoustache: "\u23B1", rnmid: "\u2AEE", roang: "\u27ED", roarr: "\u21FE", robrk: "\u27E7", ropar: "\u2986", Ropf: "\u211D", ropf: "\u{1D563}", roplus: "\u2A2E", rotimes: "\u2A35", RoundImplies: "\u2970", rpar: ")", rpargt: "\u2994", rppolint: "\u2A12", rrarr: "\u21C9", Rrightarrow: "\u21DB", rsaquo: "\u203A", Rscr: "\u211B", rscr: "\u{1D4C7}", Rsh: "\u21B1", rsh: "\u21B1", rsqb: "]", rsquo: "\u2019", rsquor: "\u2019", rthree: "\u22CC", rtimes: "\u22CA", rtri: "\u25B9", rtrie: "\u22B5", rtrif: "\u25B8", rtriltri: "\u29CE", RuleDelayed: "\u29F4", ruluhar: "\u2968", rx: "\u211E", Sacute: "\u015A", sacute: "\u015B", sbquo: "\u201A", Sc: "\u2ABC", sc: "\u227B", scap: "\u2AB8", Scaron: "\u0160", scaron: "\u0161", sccue: "\u227D", scE: "\u2AB4", sce: "\u2AB0", Scedil: "\u015E", scedil: "\u015F", Scirc: "\u015C", scirc: "\u015D", scnap: "\u2ABA", scnE: "\u2AB6", scnsim: "\u22E9", scpolint: "\u2A13", scsim: "\u227F", Scy: "\u0421", scy: "\u0441", sdot: "\u22C5", sdotb: "\u22A1", sdote: "\u2A66", searhk: "\u2925", seArr: "\u21D8", searr: "\u2198", searrow: "\u2198", sect: "\xA7", semi: ";", seswar: "\u2929", setminus: "\u2216", setmn: "\u2216", sext: "\u2736", Sfr: "\u{1D516}", sfr: "\u{1D530}", sfrown: "\u2322", sharp: "\u266F", SHCHcy: "\u0429", shchcy: "\u0449", SHcy: "\u0428", shcy: "\u0448", ShortDownArrow: "\u2193", ShortLeftArrow: "\u2190", shortmid: "\u2223", shortparallel: "\u2225", ShortRightArrow: "\u2192", ShortUpArrow: "\u2191", shy: "\xAD", Sigma: "\u03A3", sigma: "\u03C3", sigmaf: "\u03C2", sigmav: "\u03C2", sim: "\u223C", simdot: "\u2A6A", sime: "\u2243", simeq: "\u2243", simg: "\u2A9E", simgE: "\u2AA0", siml: "\u2A9D", simlE: "\u2A9F", simne: "\u2246", simplus: "\u2A24", simrarr: "\u2972", slarr: "\u2190", SmallCircle: "\u2218", smallsetminus: "\u2216", smashp: "\u2A33", smeparsl: "\u29E4", smid: "\u2223", smile: "\u2323", smt: "\u2AAA", smte: "\u2AAC", smtes: "\u2AAC\uFE00", SOFTcy: "\u042C", softcy: "\u044C", sol: "/", solb: "\u29C4", solbar: "\u233F", Sopf: "\u{1D54A}", sopf: "\u{1D564}", spades: "\u2660", spadesuit: "\u2660", spar: "\u2225", sqcap: "\u2293", sqcaps: "\u2293\uFE00", sqcup: "\u2294", sqcups: "\u2294\uFE00", Sqrt: "\u221A", sqsub: "\u228F", sqsube: "\u2291", sqsubset: "\u228F", sqsubseteq: "\u2291", sqsup: "\u2290", sqsupe: "\u2292", sqsupset: "\u2290", sqsupseteq: "\u2292", squ: "\u25A1", Square: "\u25A1", square: "\u25A1", SquareIntersection: "\u2293", SquareSubset: "\u228F", SquareSubsetEqual: "\u2291", SquareSuperset: "\u2290", SquareSupersetEqual: "\u2292", SquareUnion: "\u2294", squarf: "\u25AA", squf: "\u25AA", srarr: "\u2192", Sscr: "\u{1D4AE}", sscr: "\u{1D4C8}", ssetmn: "\u2216", ssmile: "\u2323", sstarf: "\u22C6", Star: "\u22C6", star: "\u2606", starf: "\u2605", straightepsilon: "\u03F5", straightphi: "\u03D5", strns: "\xAF", Sub: "\u22D0", sub: "\u2282", subdot: "\u2ABD", subE: "\u2AC5", sube: "\u2286", subedot: "\u2AC3", submult: "\u2AC1", subnE: "\u2ACB", subne: "\u228A", subplus: "\u2ABF", subrarr: "\u2979", Subset: "\u22D0", subset: "\u2282", subseteq: "\u2286", subseteqq: "\u2AC5", SubsetEqual: "\u2286", subsetneq: "\u228A", subsetneqq: "\u2ACB", subsim: "\u2AC7", subsub: "\u2AD5", subsup: "\u2AD3", succ: "\u227B", succapprox: "\u2AB8", succcurlyeq: "\u227D", Succeeds: "\u227B", SucceedsEqual: "\u2AB0", SucceedsSlantEqual: "\u227D", SucceedsTilde: "\u227F", succeq: "\u2AB0", succnapprox: "\u2ABA", succneqq: "\u2AB6", succnsim: "\u22E9", succsim: "\u227F", SuchThat: "\u220B", Sum: "\u2211", sum: "\u2211", sung: "\u266A", Sup: "\u22D1", sup: "\u2283", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", supdot: "\u2ABE", supdsub: "\u2AD8", supE: "\u2AC6", supe: "\u2287", supedot: "\u2AC4", Superset: "\u2283", SupersetEqual: "\u2287", suphsol: "\u27C9", suphsub: "\u2AD7", suplarr: "\u297B", supmult: "\u2AC2", supnE: "\u2ACC", supne: "\u228B", supplus: "\u2AC0", Supset: "\u22D1", supset: "\u2283", supseteq: "\u2287", supseteqq: "\u2AC6", supsetneq: "\u228B", supsetneqq: "\u2ACC", supsim: "\u2AC8", supsub: "\u2AD4", supsup: "\u2AD6", swarhk: "\u2926", swArr: "\u21D9", swarr: "\u2199", swarrow: "\u2199", swnwar: "\u292A", szlig: "\xDF", Tab: " ", target: "\u2316", Tau: "\u03A4", tau: "\u03C4", tbrk: "\u23B4", Tcaron: "\u0164", tcaron: "\u0165", Tcedil: "\u0162", tcedil: "\u0163", Tcy: "\u0422", tcy: "\u0442", tdot: "\u20DB", telrec: "\u2315", Tfr: "\u{1D517}", tfr: "\u{1D531}", there4: "\u2234", Therefore: "\u2234", therefore: "\u2234", Theta: "\u0398", theta: "\u03B8", thetasym: "\u03D1", thetav: "\u03D1", thickapprox: "\u2248", thicksim: "\u223C", ThickSpace: "\u205F\u200A", thinsp: "\u2009", ThinSpace: "\u2009", thkap: "\u2248", thksim: "\u223C", THORN: "\xDE", thorn: "\xFE", Tilde: "\u223C", tilde: "\u02DC", TildeEqual: "\u2243", TildeFullEqual: "\u2245", TildeTilde: "\u2248", times: "\xD7", timesb: "\u22A0", timesbar: "\u2A31", timesd: "\u2A30", tint: "\u222D", toea: "\u2928", top: "\u22A4", topbot: "\u2336", topcir: "\u2AF1", Topf: "\u{1D54B}", topf: "\u{1D565}", topfork: "\u2ADA", tosa: "\u2929", tprime: "\u2034", TRADE: "\u2122", trade: "\u2122", triangle: "\u25B5", triangledown: "\u25BF", triangleleft: "\u25C3", trianglelefteq: "\u22B4", triangleq: "\u225C", triangleright: "\u25B9", trianglerighteq: "\u22B5", tridot: "\u25EC", trie: "\u225C", triminus: "\u2A3A", TripleDot: "\u20DB", triplus: "\u2A39", trisb: "\u29CD", tritime: "\u2A3B", trpezium: "\u23E2", Tscr: "\u{1D4AF}", tscr: "\u{1D4C9}", TScy: "\u0426", tscy: "\u0446", TSHcy: "\u040B", tshcy: "\u045B", Tstrok: "\u0166", tstrok: "\u0167", twixt: "\u226C", twoheadleftarrow: "\u219E", twoheadrightarrow: "\u21A0", Uacute: "\xDA", uacute: "\xFA", Uarr: "\u219F", uArr: "\u21D1", uarr: "\u2191", Uarrocir: "\u2949", Ubrcy: "\u040E", ubrcy: "\u045E", Ubreve: "\u016C", ubreve: "\u016D", Ucirc: "\xDB", ucirc: "\xFB", Ucy: "\u0423", ucy: "\u0443", udarr: "\u21C5", Udblac: "\u0170", udblac: "\u0171", udhar: "\u296E", ufisht: "\u297E", Ufr: "\u{1D518}", ufr: "\u{1D532}", Ugrave: "\xD9", ugrave: "\xF9", uHar: "\u2963", uharl: "\u21BF", uharr: "\u21BE", uhblk: "\u2580", ulcorn: "\u231C", ulcorner: "\u231C", ulcrop: "\u230F", ultri: "\u25F8", Umacr: "\u016A", umacr: "\u016B", uml: "\xA8", UnderBar: "_", UnderBrace: "\u23DF", UnderBracket: "\u23B5", UnderParenthesis: "\u23DD", Union: "\u22C3", UnionPlus: "\u228E", Uogon: "\u0172", uogon: "\u0173", Uopf: "\u{1D54C}", uopf: "\u{1D566}", UpArrow: "\u2191", Uparrow: "\u21D1", uparrow: "\u2191", UpArrowBar: "\u2912", UpArrowDownArrow: "\u21C5", UpDownArrow: "\u2195", Updownarrow: "\u21D5", updownarrow: "\u2195", UpEquilibrium: "\u296E", upharpoonleft: "\u21BF", upharpoonright: "\u21BE", uplus: "\u228E", UpperLeftArrow: "\u2196", UpperRightArrow: "\u2197", Upsi: "\u03D2", upsi: "\u03C5", upsih: "\u03D2", Upsilon: "\u03A5", upsilon: "\u03C5", UpTee: "\u22A5", UpTeeArrow: "\u21A5", upuparrows: "\u21C8", urcorn: "\u231D", urcorner: "\u231D", urcrop: "\u230E", Uring: "\u016E", uring: "\u016F", urtri: "\u25F9", Uscr: "\u{1D4B0}", uscr: "\u{1D4CA}", utdot: "\u22F0", Utilde: "\u0168", utilde: "\u0169", utri: "\u25B5", utrif: "\u25B4", uuarr: "\u21C8", Uuml: "\xDC", uuml: "\xFC", uwangle: "\u29A7", vangrt: "\u299C", varepsilon: "\u03F5", varkappa: "\u03F0", varnothing: "\u2205", varphi: "\u03D5", varpi: "\u03D6", varpropto: "\u221D", vArr: "\u21D5", varr: "\u2195", varrho: "\u03F1", varsigma: "\u03C2", varsubsetneq: "\u228A\uFE00", varsubsetneqq: "\u2ACB\uFE00", varsupsetneq: "\u228B\uFE00", varsupsetneqq: "\u2ACC\uFE00", vartheta: "\u03D1", vartriangleleft: "\u22B2", vartriangleright: "\u22B3", Vbar: "\u2AEB", vBar: "\u2AE8", vBarv: "\u2AE9", Vcy: "\u0412", vcy: "\u0432", VDash: "\u22AB", Vdash: "\u22A9", vDash: "\u22A8", vdash: "\u22A2", Vdashl: "\u2AE6", Vee: "\u22C1", vee: "\u2228", veebar: "\u22BB", veeeq: "\u225A", vellip: "\u22EE", Verbar: "\u2016", verbar: "|", Vert: "\u2016", vert: "|", VerticalBar: "\u2223", VerticalLine: "|", VerticalSeparator: "\u2758", VerticalTilde: "\u2240", VeryThinSpace: "\u200A", Vfr: "\u{1D519}", vfr: "\u{1D533}", vltri: "\u22B2", vnsub: "\u2282\u20D2", vnsup: "\u2283\u20D2", Vopf: "\u{1D54D}", vopf: "\u{1D567}", vprop: "\u221D", vrtri: "\u22B3", Vscr: "\u{1D4B1}", vscr: "\u{1D4CB}", vsubnE: "\u2ACB\uFE00", vsubne: "\u228A\uFE00", vsupnE: "\u2ACC\uFE00", vsupne: "\u228B\uFE00", Vvdash: "\u22AA", vzigzag: "\u299A", Wcirc: "\u0174", wcirc: "\u0175", wedbar: "\u2A5F", Wedge: "\u22C0", wedge: "\u2227", wedgeq: "\u2259", weierp: "\u2118", Wfr: "\u{1D51A}", wfr: "\u{1D534}", Wopf: "\u{1D54E}", wopf: "\u{1D568}", wp: "\u2118", wr: "\u2240", wreath: "\u2240", Wscr: "\u{1D4B2}", wscr: "\u{1D4CC}", xcap: "\u22C2", xcirc: "\u25EF", xcup: "\u22C3", xdtri: "\u25BD", Xfr: "\u{1D51B}", xfr: "\u{1D535}", xhArr: "\u27FA", xharr: "\u27F7", Xi: "\u039E", xi: "\u03BE", xlArr: "\u27F8", xlarr: "\u27F5", xmap: "\u27FC", xnis: "\u22FB", xodot: "\u2A00", Xopf: "\u{1D54F}", xopf: "\u{1D569}", xoplus: "\u2A01", xotime: "\u2A02", xrArr: "\u27F9", xrarr: "\u27F6", Xscr: "\u{1D4B3}", xscr: "\u{1D4CD}", xsqcup: "\u2A06", xuplus: "\u2A04", xutri: "\u25B3", xvee: "\u22C1", xwedge: "\u22C0", Yacute: "\xDD", yacute: "\xFD", YAcy: "\u042F", yacy: "\u044F", Ycirc: "\u0176", ycirc: "\u0177", Ycy: "\u042B", ycy: "\u044B", yen: "\xA5", Yfr: "\u{1D51C}", yfr: "\u{1D536}", YIcy: "\u0407", yicy: "\u0457", Yopf: "\u{1D550}", yopf: "\u{1D56A}", Yscr: "\u{1D4B4}", yscr: "\u{1D4CE}", YUcy: "\u042E", yucy: "\u044E", Yuml: "\u0178", yuml: "\xFF", Zacute: "\u0179", zacute: "\u017A", Zcaron: "\u017D", zcaron: "\u017E", Zcy: "\u0417", zcy: "\u0437", Zdot: "\u017B", zdot: "\u017C", zeetrf: "\u2128", ZeroWidthSpace: "\u200B", Zeta: "\u0396", zeta: "\u03B6", Zfr: "\u2128", zfr: "\u{1D537}", ZHcy: "\u0416", zhcy: "\u0436", zigrarr: "\u21DD", Zopf: "\u2124", zopf: "\u{1D56B}", Zscr: "\u{1D4B5}", zscr: "\u{1D4CF}", zwj: "\u200D", zwnj: "\u200C" }); exports.entityMap = exports.HTML_ENTITIES; } }); // node_modules/@xmldom/xmldom/lib/sax.js var require_sax = __commonJS({ "node_modules/@xmldom/xmldom/lib/sax.js"(exports) { var NAMESPACE = require_conventions().NAMESPACE; var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$"); var S_TAG = 0; var S_ATTR = 1; var S_ATTR_SPACE = 2; var S_EQ = 3; var S_ATTR_NOQUOT_VALUE = 4; var S_ATTR_END = 5; var S_TAG_SPACE = 6; var S_TAG_CLOSE = 7; function ParseError(message, locator) { this.message = message; this.locator = locator; if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError); } ParseError.prototype = new Error(); ParseError.prototype.name = ParseError.name; function XMLReader() { } XMLReader.prototype = { parse: function(source, defaultNSMap, entityMap) { var domBuilder = this.domBuilder; domBuilder.startDocument(); _copy(defaultNSMap, defaultNSMap = {}); parse2(source, defaultNSMap, entityMap, domBuilder, this.errorHandler); domBuilder.endDocument(); } }; function parse2(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { function fixedFromCharCode(code2) { if (code2 > 65535) { code2 -= 65536; var surrogate1 = 55296 + (code2 >> 10), surrogate2 = 56320 + (code2 & 1023); return String.fromCharCode(surrogate1, surrogate2); } else { return String.fromCharCode(code2); } } function entityReplacer(a3) { var k2 = a3.slice(1, -1); if (Object.hasOwnProperty.call(entityMap, k2)) { return entityMap[k2]; } else if (k2.charAt(0) === "#") { return fixedFromCharCode(parseInt(k2.substr(1).replace("x", "0x"))); } else { errorHandler.error("entity not found:" + a3); return a3; } } function appendText(end3) { if (end3 > start2) { var xt = source.substring(start2, end3).replace(/&#?\w+;/g, entityReplacer); locator && position(start2); domBuilder.characters(xt, 0, end3 - start2); start2 = end3; } } function position(p2, m2) { while (p2 >= lineEnd && (m2 = linePattern.exec(source))) { lineStart = m2.index; lineEnd = lineStart + m2[0].length; locator.lineNumber++; } locator.columnNumber = p2 - lineStart + 1; } var lineStart = 0; var lineEnd = 0; var linePattern = /.*(?:\r\n?|\n)|.*$/g; var locator = domBuilder.locator; var parseStack = [{ currentNSMap: defaultNSMapCopy }]; var closeMap = {}; var start2 = 0; while (true) { try { var tagStart = source.indexOf("<", start2); if (tagStart < 0) { if (!source.substr(start2).match(/^\s*$/)) { var doc = domBuilder.doc; var text = doc.createTextNode(source.substr(start2)); doc.appendChild(text); domBuilder.currentElement = text; } return; } if (tagStart > start2) { appendText(tagStart); } switch (source.charAt(tagStart + 1)) { case "/": var end2 = source.indexOf(">", tagStart + 3); var tagName = source.substring(tagStart + 2, end2).replace(/[ \t\n\r]+$/g, ""); var config = parseStack.pop(); if (end2 < 0) { tagName = source.substring(tagStart + 2).replace(/[\s<].*/, ""); errorHandler.error("end tag name: " + tagName + " is not complete:" + config.tagName); end2 = tagStart + 1 + tagName.length; } else if (tagName.match(/\s start2) { start2 = end2; } else { appendText(Math.max(tagStart, start2) + 1); } } } function copyLocator(f2, t3) { t3.lineNumber = f2.lineNumber; t3.columnNumber = f2.columnNumber; return t3; } function parseElementStartPart(source, start2, el, currentNSMap, entityReplacer, errorHandler) { function addAttribute(qname, value2, startIndex) { if (el.attributeNames.hasOwnProperty(qname)) { errorHandler.fatalError("Attribute " + qname + " redefined"); } el.addValue(qname, value2.replace(/[\t\n\r]/g, " ").replace(/&#?\w+;/g, entityReplacer), startIndex); } var attrName; var value; var p2 = ++start2; var s2 = S_TAG; while (true) { var c2 = source.charAt(p2); switch (c2) { case "=": if (s2 === S_ATTR) { attrName = source.slice(start2, p2); s2 = S_EQ; } else if (s2 === S_ATTR_SPACE) { s2 = S_EQ; } else { throw new Error("attribute equal must after attrName"); } break; case "'": case '"': if (s2 === S_EQ || s2 === S_ATTR) { if (s2 === S_ATTR) { errorHandler.warning('attribute value must after "="'); attrName = source.slice(start2, p2); } start2 = p2 + 1; p2 = source.indexOf(c2, start2); if (p2 > 0) { value = source.slice(start2, p2); addAttribute(attrName, value, start2 - 1); s2 = S_ATTR_END; } else { throw new Error("attribute value no end '" + c2 + "' match"); } } else if (s2 == S_ATTR_NOQUOT_VALUE) { value = source.slice(start2, p2); addAttribute(attrName, value, start2); errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c2 + ")!!"); start2 = p2 + 1; s2 = S_ATTR_END; } else { throw new Error('attribute value must after "="'); } break; case "/": switch (s2) { case S_TAG: el.setTagName(source.slice(start2, p2)); case S_ATTR_END: case S_TAG_SPACE: case S_TAG_CLOSE: s2 = S_TAG_CLOSE; el.closed = true; case S_ATTR_NOQUOT_VALUE: case S_ATTR: break; case S_ATTR_SPACE: el.closed = true; break; default: throw new Error("attribute invalid close char('/')"); } break; case "": errorHandler.error("unexpected end of input"); if (s2 == S_TAG) { el.setTagName(source.slice(start2, p2)); } return p2; case ">": switch (s2) { case S_TAG: el.setTagName(source.slice(start2, p2)); case S_ATTR_END: case S_TAG_SPACE: case S_TAG_CLOSE: break; case S_ATTR_NOQUOT_VALUE: case S_ATTR: value = source.slice(start2, p2); if (value.slice(-1) === "/") { el.closed = true; value = value.slice(0, -1); } case S_ATTR_SPACE: if (s2 === S_ATTR_SPACE) { value = attrName; } if (s2 == S_ATTR_NOQUOT_VALUE) { errorHandler.warning('attribute "' + value + '" missed quot(")!'); addAttribute(attrName, value, start2); } else { if (!NAMESPACE.isHTML(currentNSMap[""]) || !value.match(/^(?:disabled|checked|selected)$/i)) { errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); } addAttribute(value, value, start2); } break; case S_EQ: throw new Error("attribute value missed!!"); } return p2; case "\x80": c2 = " "; default: if (c2 <= " ") { switch (s2) { case S_TAG: el.setTagName(source.slice(start2, p2)); s2 = S_TAG_SPACE; break; case S_ATTR: attrName = source.slice(start2, p2); s2 = S_ATTR_SPACE; break; case S_ATTR_NOQUOT_VALUE: var value = source.slice(start2, p2); errorHandler.warning('attribute "' + value + '" missed quot(")!!'); addAttribute(attrName, value, start2); case S_ATTR_END: s2 = S_TAG_SPACE; break; } } else { switch (s2) { case S_ATTR_SPACE: var tagName = el.tagName; if (!NAMESPACE.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) { errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); } addAttribute(attrName, attrName, start2); start2 = p2; s2 = S_ATTR; break; case S_ATTR_END: errorHandler.warning('attribute space is required"' + attrName + '"!!'); case S_TAG_SPACE: s2 = S_ATTR; start2 = p2; break; case S_EQ: s2 = S_ATTR_NOQUOT_VALUE; start2 = p2; break; case S_TAG_CLOSE: throw new Error("elements closed character '/' and '>' must be connected to"); } } } p2++; } } function appendElement(el, domBuilder, currentNSMap) { var tagName = el.tagName; var localNSMap = null; var i2 = el.length; while (i2--) { var a2 = el[i2]; var qName = a2.qName; var value = a2.value; var nsp = qName.indexOf(":"); if (nsp > 0) { var prefix = a2.prefix = qName.slice(0, nsp); var localName = qName.slice(nsp + 1); var nsPrefix = prefix === "xmlns" && localName; } else { localName = qName; prefix = null; nsPrefix = qName === "xmlns" && ""; } a2.localName = localName; if (nsPrefix !== false) { if (localNSMap == null) { localNSMap = {}; _copy(currentNSMap, currentNSMap = {}); } currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; a2.uri = NAMESPACE.XMLNS; domBuilder.startPrefixMapping(nsPrefix, value); } } var i2 = el.length; while (i2--) { a2 = el[i2]; var prefix = a2.prefix; if (prefix) { if (prefix === "xml") { a2.uri = NAMESPACE.XML; } if (prefix !== "xmlns") { a2.uri = currentNSMap[prefix || ""]; } } } var nsp = tagName.indexOf(":"); if (nsp > 0) { prefix = el.prefix = tagName.slice(0, nsp); localName = el.localName = tagName.slice(nsp + 1); } else { prefix = null; localName = el.localName = tagName; } var ns = el.uri = currentNSMap[prefix || ""]; domBuilder.startElement(ns, localName, tagName, el); if (el.closed) { domBuilder.endElement(ns, localName, tagName); if (localNSMap) { for (prefix in localNSMap) { if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) { domBuilder.endPrefixMapping(prefix); } } } } else { el.currentNSMap = currentNSMap; el.localNSMap = localNSMap; return true; } } function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { if (/^(?:script|textarea)$/i.test(tagName)) { var elEndStart = source.indexOf("", elStartEnd); var text = source.substring(elStartEnd + 1, elEndStart); if (/[&<]/.test(text)) { if (/^script$/i.test(tagName)) { domBuilder.characters(text, 0, text.length); return elEndStart; } text = text.replace(/&#?\w+;/g, entityReplacer); domBuilder.characters(text, 0, text.length); return elEndStart; } } return elStartEnd + 1; } function fixSelfClosed(source, elStartEnd, tagName, closeMap) { var pos = closeMap[tagName]; if (pos == null) { pos = source.lastIndexOf(""); if (pos < elStartEnd) { pos = source.lastIndexOf("", start2 + 4); if (end2 > start2) { domBuilder.comment(source, start2 + 4, end2 - start2 - 4); return end2 + 3; } else { errorHandler.error("Unclosed comment"); return -1; } } else { return -1; } default: if (source.substr(start2 + 3, 6) == "CDATA[") { var end2 = source.indexOf("]]>", start2 + 9); domBuilder.startCDATA(); domBuilder.characters(source, start2 + 9, end2 - start2 - 9); domBuilder.endCDATA(); return end2 + 3; } var matchs = split(source, start2); var len = matchs.length; if (len > 1 && /!doctype/i.test(matchs[0][0])) { var name = matchs[1][0]; var pubid = false; var sysid = false; if (len > 3) { if (/^public$/i.test(matchs[2][0])) { pubid = matchs[3][0]; sysid = len > 4 && matchs[4][0]; } else if (/^system$/i.test(matchs[2][0])) { sysid = matchs[3][0]; } } var lastMatch = matchs[len - 1]; domBuilder.startDTD(name, pubid, sysid); domBuilder.endDTD(); return lastMatch.index + lastMatch[0].length; } } return -1; } function parseInstruction(source, start2, domBuilder) { var end2 = source.indexOf("?>", start2); if (end2) { var match = source.substring(start2, end2).match(/^<\?(\S*)\s*([\s\S]*?)$/); if (match) { var len = match[0].length; domBuilder.processingInstruction(match[1], match[2]); return end2 + 2; } else { return -1; } } return -1; } function ElementAttributes() { this.attributeNames = {}; } ElementAttributes.prototype = { setTagName: function(tagName) { if (!tagNamePattern.test(tagName)) { throw new Error("invalid tagName:" + tagName); } this.tagName = tagName; }, addValue: function(qName, value, offset5) { if (!tagNamePattern.test(qName)) { throw new Error("invalid attribute:" + qName); } this.attributeNames[qName] = this.length; this[this.length++] = { qName, value, offset: offset5 }; }, length: 0, getLocalName: function(i2) { return this[i2].localName; }, getLocator: function(i2) { return this[i2].locator; }, getQName: function(i2) { return this[i2].qName; }, getURI: function(i2) { return this[i2].uri; }, getValue: function(i2) { return this[i2].value; } }; function split(source, start2) { var match; var buf = []; var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; reg.lastIndex = start2; reg.exec(source); while (match = reg.exec(source)) { buf.push(match); if (match[1]) return buf; } } exports.XMLReader = XMLReader; exports.ParseError = ParseError; } }); // node_modules/@xmldom/xmldom/lib/dom-parser.js var require_dom_parser = __commonJS({ "node_modules/@xmldom/xmldom/lib/dom-parser.js"(exports) { var conventions = require_conventions(); var dom = require_dom(); var entities = require_entities(); var sax = require_sax(); var DOMImplementation = dom.DOMImplementation; var NAMESPACE = conventions.NAMESPACE; var ParseError = sax.ParseError; var XMLReader = sax.XMLReader; function normalizeLineEndings(input) { return input.replace(/\r[\n\u0085]/g, "\n").replace(/[\r\u0085\u2028]/g, "\n"); } function DOMParser4(options) { this.options = options || { locator: {} }; } DOMParser4.prototype.parseFromString = function(source, mimeType) { var options = this.options; var sax2 = new XMLReader(); var domBuilder = options.domBuilder || new DOMHandler(); var errorHandler = options.errorHandler; var locator = options.locator; var defaultNSMap = options.xmlns || {}; var isHTML = /\/x?html?$/.test(mimeType); var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES; if (locator) { domBuilder.setDocumentLocator(locator); } sax2.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator); sax2.domBuilder = options.domBuilder || domBuilder; if (isHTML) { defaultNSMap[""] = NAMESPACE.HTML; } defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; var normalize = options.normalizeLineEndings || normalizeLineEndings; if (source && typeof source === "string") { sax2.parse(normalize(source), defaultNSMap, entityMap); } else { sax2.errorHandler.error("invalid doc source"); } return domBuilder.doc; }; function buildErrorHandler(errorImpl, domBuilder, locator) { if (!errorImpl) { if (domBuilder instanceof DOMHandler) { return domBuilder; } errorImpl = domBuilder; } var errorHandler = {}; var isCallback = errorImpl instanceof Function; locator = locator || {}; function build(key) { var fn3 = errorImpl[key]; if (!fn3 && isCallback) { fn3 = errorImpl.length == 2 ? function(msg2) { errorImpl(key, msg2); } : errorImpl; } errorHandler[key] = fn3 && function(msg2) { fn3("[xmldom " + key + "] " + msg2 + _locator(locator)); } || function() { }; } build("warning"); build("error"); build("fatalError"); return errorHandler; } function DOMHandler() { this.cdata = false; } function position(locator, node) { node.lineNumber = locator.lineNumber; node.columnNumber = locator.columnNumber; } DOMHandler.prototype = { startDocument: function() { this.doc = new DOMImplementation().createDocument(null, null, null); if (this.locator) { this.doc.documentURI = this.locator.systemId; } }, startElement: function(namespaceURI, localName, qName, attrs) { var doc = this.doc; var el = doc.createElementNS(namespaceURI, qName || localName); var len = attrs.length; appendElement(this, el); this.currentElement = el; this.locator && position(this.locator, el); for (var i2 = 0; i2 < len; i2++) { var namespaceURI = attrs.getURI(i2); var value = attrs.getValue(i2); var qName = attrs.getQName(i2); var attr = doc.createAttributeNS(namespaceURI, qName); this.locator && position(attrs.getLocator(i2), attr); attr.value = attr.nodeValue = value; el.setAttributeNode(attr); } }, endElement: function(namespaceURI, localName, qName) { var current = this.currentElement; var tagName = current.tagName; this.currentElement = current.parentNode; }, startPrefixMapping: function(prefix, uri) { }, endPrefixMapping: function(prefix) { }, processingInstruction: function(target, data) { var ins = this.doc.createProcessingInstruction(target, data); this.locator && position(this.locator, ins); appendElement(this, ins); }, ignorableWhitespace: function(ch, start2, length) { }, characters: function(chars, start2, length) { chars = _toString.apply(this, arguments); if (chars) { if (this.cdata) { var charNode = this.doc.createCDATASection(chars); } else { var charNode = this.doc.createTextNode(chars); } if (this.currentElement) { this.currentElement.appendChild(charNode); } else if (/^\s*$/.test(chars)) { this.doc.appendChild(charNode); } this.locator && position(this.locator, charNode); } }, skippedEntity: function(name) { }, endDocument: function() { this.doc.normalize(); }, setDocumentLocator: function(locator) { if (this.locator = locator) { locator.lineNumber = 0; } }, comment: function(chars, start2, length) { chars = _toString.apply(this, arguments); var comm = this.doc.createComment(chars); this.locator && position(this.locator, comm); appendElement(this, comm); }, startCDATA: function() { this.cdata = true; }, endCDATA: function() { this.cdata = false; }, startDTD: function(name, publicId, systemId) { var impl = this.doc.implementation; if (impl && impl.createDocumentType) { var dt = impl.createDocumentType(name, publicId, systemId); this.locator && position(this.locator, dt); appendElement(this, dt); this.doc.doctype = dt; } }, warning: function(error2) { console.warn("[xmldom warning] " + error2, _locator(this.locator)); }, error: function(error2) { console.error("[xmldom error] " + error2, _locator(this.locator)); }, fatalError: function(error2) { throw new ParseError(error2, this.locator); } }; function _locator(l2) { if (l2) { return "\n@" + (l2.systemId || "") + "#[line:" + l2.lineNumber + ",col:" + l2.columnNumber + "]"; } } function _toString(chars, start2, length) { if (typeof chars == "string") { return chars.substr(start2, length); } else { if (chars.length >= start2 + length || start2) { return new java.lang.String(chars, start2, length) + ""; } return chars; } } "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(key) { DOMHandler.prototype[key] = function() { return null; }; }); function appendElement(hander, node) { if (!hander.currentElement) { hander.doc.appendChild(node); } else { hander.currentElement.appendChild(node); } } exports.__DOMHandler = DOMHandler; exports.normalizeLineEndings = normalizeLineEndings; exports.DOMParser = DOMParser4; } }); // node_modules/@xmldom/xmldom/lib/index.js var require_lib = __commonJS({ "node_modules/@xmldom/xmldom/lib/index.js"(exports) { var dom = require_dom(); exports.DOMImplementation = dom.DOMImplementation; exports.XMLSerializer = dom.XMLSerializer; exports.DOMParser = require_dom_parser().DOMParser; } }); // node_modules/xml-parser-xo/dist/cjs/index.js var require_cjs = __commonJS({ "node_modules/xml-parser-xo/dist/cjs/index.js"(exports, module2) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ParsingError = void 0; var ParsingError = class extends Error { constructor(message, cause) { super(message); this.cause = cause; } }; exports.ParsingError = ParsingError; var parsingState; function nextChild() { return element(false) || text() || comment() || cdata() || processingInstruction(false); } function nextRootChild() { match(/\s*/); return element(true) || comment() || doctype() || processingInstruction(false); } function parseDocument() { const declaration = processingInstruction(true); const children = []; let documentRootNode; let child = nextRootChild(); while (child) { if (child.node.type === "Element") { if (documentRootNode) { throw new Error("Found multiple root nodes"); } documentRootNode = child.node; } if (!child.excluded) { children.push(child.node); } child = nextRootChild(); } if (!documentRootNode) { throw new ParsingError("Failed to parse XML", "Root Element not found"); } if (parsingState.xml.length !== 0) { throw new ParsingError("Failed to parse XML", "Not Well-Formed XML"); } return { declaration: declaration ? declaration.node : null, root: documentRootNode, children }; } function processingInstruction(matchDeclaration) { const m2 = matchDeclaration ? match(/^<\?(xml(-stylesheet)?)\s*/) : match(/^<\?([\w-:.]+)\s*/); if (!m2) return; const node = { name: m2[1], type: "ProcessingInstruction", attributes: {} }; while (!(eos() || is("?>"))) { const attr = attribute(); if (attr) { node.attributes[attr.name] = attr.value; } else { return; } } match(/\?>/); return { excluded: matchDeclaration ? false : parsingState.options.filter(node) === false, node }; } function element(matchRoot) { const m2 = match(/^<([^?!\s]+)\s*/); if (!m2) return; const node = { type: "Element", name: m2[1], attributes: {}, children: [] }; const excluded = matchRoot ? false : parsingState.options.filter(node) === false; while (!(eos() || is(">") || is("?>") || is("/>"))) { const attr = attribute(); if (attr) { node.attributes[attr.name] = attr.value; } else { return; } } if (match(/^\s*\/>/)) { node.children = null; return { excluded, node }; } match(/\??>/); let child = nextChild(); while (child) { if (!child.excluded) { node.children.push(child.node); } child = nextChild(); } if (parsingState.options.strictMode) { const closingTag = ``; if (parsingState.xml.startsWith(closingTag)) { parsingState.xml = parsingState.xml.slice(closingTag.length); } else { throw new ParsingError("Failed to parse XML", `Closing tag not matching "${closingTag}"`); } } else { match(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/); } return { excluded, node }; } function doctype() { const m2 = match(/^]*>/) || match(/^]*>/) || match(/^/) || match(/^/); if (m2) { const node = { type: "DocumentType", content: m2[0] }; return { excluded: parsingState.options.filter(node) === false, node }; } } function cdata() { if (parsingState.xml.startsWith(""); if (endPositionStart > -1) { const endPositionFinish = endPositionStart + 3; const node = { type: "CDATA", content: parsingState.xml.substring(0, endPositionFinish) }; parsingState.xml = parsingState.xml.slice(endPositionFinish); return { excluded: parsingState.options.filter(node) === false, node }; } } } function comment() { const m2 = match(/^/); if (m2) { const node = { type: "Comment", content: m2[0] }; return { excluded: parsingState.options.filter(node) === false, node }; } } function text() { const m2 = match(/^([^<]+)/); if (m2) { const node = { type: "Text", content: m2[1] }; return { excluded: parsingState.options.filter(node) === false, node }; } } function attribute() { const m2 = match(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/); if (m2) { return { name: m2[1].trim(), value: stripQuotes(m2[2].trim()) }; } } function stripQuotes(val) { return val.replace(/^['"]|['"]$/g, ""); } function match(re2) { const m2 = parsingState.xml.match(re2); if (m2) { parsingState.xml = parsingState.xml.slice(m2[0].length); return m2; } } function eos() { return parsingState.xml.length === 0; } function is(prefix) { return parsingState.xml.indexOf(prefix) === 0; } function parseXml(xml, options = {}) { xml = xml.trim(); const filter2 = options.filter || (() => true); parsingState = { xml, options: Object.assign(Object.assign({}, options), { filter: filter2, strictMode: options.strictMode === true }) }; return parseDocument(); } if (typeof module2 !== "undefined" && typeof exports === "object") { module2.exports = parseXml; } exports.default = parseXml; } }); // node_modules/xml-formatter/dist/cjs/index.js var require_cjs2 = __commonJS({ "node_modules/xml-formatter/dist/cjs/index.js"(exports, module2) { "use strict"; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var xml_parser_xo_1 = __importDefault2(require_cjs()); function newLine(state) { if (!state.options.indentation && !state.options.lineSeparator) return; state.content += state.options.lineSeparator; let i2; for (i2 = 0; i2 < state.level; i2++) { state.content += state.options.indentation; } } function indent(state) { state.content = state.content.replace(/ +$/, ""); let i2; for (i2 = 0; i2 < state.level; i2++) { state.content += state.options.indentation; } } function appendContent(state, content) { state.content += content; } function processNode(node, state, preserveSpace) { if (typeof node.content === "string") { processContent(node.content, state, preserveSpace); } else if (node.type === "Element") { processElementNode(node, state, preserveSpace); } else if (node.type === "ProcessingInstruction") { processProcessingIntruction(node, state); } else { throw new Error("Unknown node type: " + node.type); } } function processContent(content, state, preserveSpace) { if (!preserveSpace) { const trimmedContent = content.trim(); if (state.options.lineSeparator) { content = trimmedContent; } else if (trimmedContent.length === 0) { content = trimmedContent; } } if (content.length > 0) { if (!preserveSpace && state.content.length > 0) { newLine(state); } appendContent(state, content); } } function isPathMatchingIgnoredPaths(path, ignoredPaths) { const fullPath = "/" + path.join("/"); const pathLastPart = path[path.length - 1]; return ignoredPaths.includes(pathLastPart) || ignoredPaths.includes(fullPath); } function processElementNode(node, state, preserveSpace) { state.path.push(node.name); if (!preserveSpace && state.content.length > 0) { newLine(state); } appendContent(state, "<" + node.name); processAttributes(state, node.attributes); if (node.children === null || state.options.forceSelfClosingEmptyTag && node.children.length === 0) { const selfClosingNodeClosingTag = state.options.whiteSpaceAtEndOfSelfclosingTag ? " />" : "/>"; appendContent(state, selfClosingNodeClosingTag); } else if (node.children.length === 0) { appendContent(state, ">"); } else { const nodeChildren = node.children; appendContent(state, ">"); state.level++; let nodePreserveSpace = node.attributes["xml:space"] === "preserve" || preserveSpace; let ignoredPath = false; if (!nodePreserveSpace && state.options.ignoredPaths) { ignoredPath = isPathMatchingIgnoredPaths(state.path, state.options.ignoredPaths); nodePreserveSpace = ignoredPath; } if (!nodePreserveSpace && state.options.collapseContent) { let containsTextNodes = false; let containsTextNodesWithLineBreaks = false; let containsNonTextNodes = false; nodeChildren.forEach(function(child, index3) { if (child.type === "Text") { if (child.content.includes("\n")) { containsTextNodesWithLineBreaks = true; child.content = child.content.trim(); } else if ((index3 === 0 || index3 === nodeChildren.length - 1) && !preserveSpace) { if (child.content.trim().length === 0) { child.content = ""; } } if (child.content.trim().length > 0 || nodeChildren.length === 1) { containsTextNodes = true; } } else if (child.type === "CDATA") { containsTextNodes = true; } else { containsNonTextNodes = true; } }); if (containsTextNodes && (!containsNonTextNodes || !containsTextNodesWithLineBreaks)) { nodePreserveSpace = true; } } nodeChildren.forEach(function(child) { processNode(child, state, preserveSpace || nodePreserveSpace); }); state.level--; if (!preserveSpace && !nodePreserveSpace) { newLine(state); } if (ignoredPath) { indent(state); } appendContent(state, ""); } state.path.pop(); } function processAttributes(state, attributes) { Object.keys(attributes).forEach(function(attr) { const escaped = attributes[attr].replace(/"/g, """); appendContent(state, " " + attr + '="' + escaped + '"'); }); } function processProcessingIntruction(node, state) { if (state.content.length > 0) { newLine(state); } appendContent(state, ""); } function formatXml(xml, options = {}) { options.indentation = "indentation" in options ? options.indentation : " "; options.collapseContent = options.collapseContent === true; options.lineSeparator = "lineSeparator" in options ? options.lineSeparator : "\r\n"; options.whiteSpaceAtEndOfSelfclosingTag = options.whiteSpaceAtEndOfSelfclosingTag === true; options.throwOnFailure = options.throwOnFailure !== false; try { const parsedXml = (0, xml_parser_xo_1.default)(xml, { filter: options.filter, strictMode: options.strictMode }); const state = { content: "", level: 0, options, path: [] }; if (parsedXml.declaration) { processProcessingIntruction(parsedXml.declaration, state); } parsedXml.children.forEach(function(child) { processNode(child, state, false); }); if (!options.lineSeparator) { return state.content; } return state.content.replace(/\r\n/g, "\n").replace(/\n/g, options.lineSeparator); } catch (err) { if (options.throwOnFailure) { throw err; } return xml; } } formatXml.minify = (xml, options = {}) => { return formatXml(xml, Object.assign(Object.assign({}, options), { indentation: "", lineSeparator: "" })); }; if (typeof module2 !== "undefined" && typeof exports === "object") { module2.exports = formatXml; } exports.default = formatXml; } }); // src/components/formats/current/utils/buildFileStr.ts function buildInkCanvasFileStr(pageData) { let fileStr = pageData.svgString || ""; const parser = new import_xmldom.DOMParser(); const doc = parser.parseFromString(fileStr, "image/svg+xml"); const svgElement = doc.documentElement; const existingMetadata = svgElement.getElementsByTagName("metadata"); while (existingMetadata.length > 0) { existingMetadata[0].parentNode?.removeChild(existingMetadata[0]); } const metadataElement = doc.createElement("metadata"); const inkMetaElement = doc.createElement("ink"); inkMetaElement.setAttribute("plugin-version", String(pageData.meta.pluginVersion)); inkMetaElement.setAttribute("file-type", pageData.meta.fileType); metadataElement.appendChild(inkMetaElement); const inkCanvasElement = doc.createElement("ink-canvas"); inkCanvasElement.setAttribute("version", INK_CANVAS_FORMAT_VERSION); inkCanvasElement.textContent = JSON.stringify(pageData.inkCanvas, null, 2); metadataElement.appendChild(inkCanvasElement); svgElement.appendChild(metadataElement); const serializedSvg = new import_xmldom.XMLSerializer().serializeToString(svgElement); return (0, import_xml_formatter.default)(serializedSvg, { indentation: " ", lineSeparator: "\n" }); } function buildTldrawFileStr(pageData) { let fileStr = pageData.svgString || ""; const parser = new import_xmldom.DOMParser(); const doc = parser.parseFromString(fileStr, "image/svg+xml"); const svgElement = doc.documentElement; const tldrawJson = pageData.tldraw; const existingMetadata = svgElement.getElementsByTagName("metadata"); while (existingMetadata.length > 0) { existingMetadata[0].parentNode?.removeChild(existingMetadata[0]); } const metadataElement = doc.createElement("metadata"); const inkMetaElement = doc.createElement("ink"); inkMetaElement.setAttribute("plugin-version", String(pageData.meta.pluginVersion)); inkMetaElement.setAttribute("file-type", pageData.meta.fileType); if (pageData.meta.writingLineHeight !== void 0) { inkMetaElement.setAttribute("writing-line-height", String(pageData.meta.writingLineHeight)); } metadataElement.appendChild(inkMetaElement); const settingsElement = doc.createElement("tldraw"); settingsElement.setAttribute("version", String(TLDRAW_VERSION)); settingsElement.textContent = JSON.stringify(tldrawJson, null, 2); metadataElement.appendChild(settingsElement); svgElement.appendChild(metadataElement); const serializedSvg = new import_xmldom.XMLSerializer().serializeToString(svgElement); return (0, import_xml_formatter.default)(serializedSvg, { indentation: " ", lineSeparator: "\n" }); } var import_xmldom, import_xml_formatter, buildFileStr; var init_buildFileStr = __esm({ "src/components/formats/current/utils/buildFileStr.ts"() { init_constants(); import_xmldom = __toESM(require_lib()); import_xml_formatter = __toESM(require_cjs2()); init_ink_file_storage_engine(); buildFileStr = (pageData) => { if (isInkCanvasFile(pageData)) return buildInkCanvasFileStr(pageData); return buildTldrawFileStr(pageData); }; } }); // src/types/embed-settings.ts function formatEmbedAspectRatio(aspectRatio) { return aspectRatio.toFixed(3); } function buildNewDrawingEmbedSettings() { const aspectRatio = DEFAULT_EMBED_SETTINGS.embedDisplay.aspectRatio; return { ...DEFAULT_EMBED_SETTINGS, embedDisplay: { ...DEFAULT_EMBED_SETTINGS.embedDisplay }, viewBox: { x: 0, y: 0, width: WRITING_PAGE_WIDTH, height: WRITING_PAGE_WIDTH / aspectRatio } }; } function isWritingAlignedDrawingEmbed(settings) { return settings.viewBox.width === WRITING_PAGE_WIDTH; } var DEFAULT_EMBED_SETTINGS; var init_embed_settings = __esm({ "src/types/embed-settings.ts"() { init_constants(); DEFAULT_EMBED_SETTINGS = { embedDisplay: { width: 500, aspectRatio: 16 / 9 }, viewBox: { x: 0, y: 0, width: 500, height: 281 } }; } }); // src/components/formats/current/utils/build-embeds.ts function buildDrawingEmbedLine(filepath, options) { const s2 = options?.embedSettings ?? (options?.writingAlignedViewBox ? buildNewDrawingEmbedSettings() : DEFAULT_EMBED_SETTINGS); const params = new URLSearchParams({ width: String(s2.embedDisplay.width), aspectRatio: formatEmbedAspectRatio(s2.embedDisplay.aspectRatio), viewBoxX: String(s2.viewBox.x), viewBoxY: String(s2.viewBox.y), viewBoxW: String(s2.viewBox.width), viewBoxH: String(s2.viewBox.height) }); if (options?.pendingPaste) params.append("pendingPaste", "true"); const url = `${INK_EMBED_BASE_URL}?type=inkDrawing&${params.toString()}`; return ` ![InkDrawing](<${filepath}>) [Edit Drawing](${url})`; } function buildWritingEmbedLine(filepath, options) { const params = new URLSearchParams(); if (options?.aspectRatio != null && Number.isFinite(options.aspectRatio) && options.aspectRatio > 0) { params.append("aspectRatio", formatEmbedAspectRatio(options.aspectRatio)); } if (options?.pendingPaste) params.append("pendingPaste", "true"); const query = params.toString(); const url = query ? `${INK_EMBED_BASE_URL}?type=inkWriting&${query}` : `${INK_EMBED_BASE_URL}?type=inkWriting`; return ` ![InkWriting](<${filepath}>) [Edit Writing](${url})`; } var buildDrawingEmbed, buildWritingEmbed; var init_build_embeds = __esm({ "src/components/formats/current/utils/build-embeds.ts"() { init_constants(); init_embed_settings(); buildDrawingEmbed = (filepath, options) => { const line = buildDrawingEmbedLine(filepath, options); return ` ${line} `; }; buildWritingEmbed = (filepath, options) => { const line = buildWritingEmbedLine(filepath, options); return ` ${line} `; }; } }); // src/components/formats/current/utils/parse-settings-from-url.ts function parseSettingsFromUrl(urlAndEmbedSettings) { let infoUrl = urlAndEmbedSettings; let embedSettings = structuredClone(DEFAULT_EMBED_SETTINGS); let isPendingPaste = false; const questionMarkIndex = urlAndEmbedSettings.indexOf("?"); if (questionMarkIndex !== -1) { infoUrl = urlAndEmbedSettings.substring(0, questionMarkIndex); const embedSettingsStr = urlAndEmbedSettings.substring(questionMarkIndex + 1); const urlParams = embedSettingsStr.split("&").reduce((acc, pair) => { const [key, value] = pair.split("="); if (key && value) { acc[key] = decodeURIComponent(value); } return acc; }, {}); if (urlParams.width) { embedSettings.embedDisplay.width = parseFloat(urlParams.width); } if (urlParams.aspectRatio) { embedSettings.embedDisplay.aspectRatio = parseFloat(urlParams.aspectRatio); } if (urlParams.viewBoxX) { embedSettings.viewBox.x = parseFloat(urlParams.viewBoxX); } if (urlParams.viewBoxY) { embedSettings.viewBox.y = parseFloat(urlParams.viewBoxY); } if (urlParams.viewBoxW) { embedSettings.viewBox.width = parseFloat(urlParams.viewBoxW); } else if (urlParams.viewBoxWidth) { embedSettings.viewBox.width = parseFloat(urlParams.viewBoxWidth); } if (urlParams.viewBoxH) { embedSettings.viewBox.height = parseFloat(urlParams.viewBoxH); } else if (urlParams.viewBoxHeight) { embedSettings.viewBox.height = parseFloat(urlParams.viewBoxHeight); } if (urlParams.pendingPaste === "true") { isPendingPaste = true; } } return { infoUrl, embedSettings, isPendingPaste }; } var init_parse_settings_from_url = __esm({ "src/components/formats/current/utils/parse-settings-from-url.ts"() { init_embed_settings(); } }); // node_modules/perfect-freehand/dist/esm/index.mjs function i(e2, t3, n2, r2 = (e3) => e3) { return e2 * r2(0.5 - t3 * (0.5 - n2)); } function o(e2, t3, n2) { let r2 = a(1, t3 / n2); return a(1, e2 + (a(1, 1 - r2) - e2) * (r2 * 0.275)); } function s(e2) { return [-e2[0], -e2[1]]; } function c(e2, t3) { return [e2[0] + t3[0], e2[1] + t3[1]]; } function l(e2, t3, n2) { return e2[0] = t3[0] + n2[0], e2[1] = t3[1] + n2[1], e2; } function u(e2, t3) { return [e2[0] - t3[0], e2[1] - t3[1]]; } function d(e2, t3, n2) { return e2[0] = t3[0] - n2[0], e2[1] = t3[1] - n2[1], e2; } function f(e2, t3) { return [e2[0] * t3, e2[1] * t3]; } function p(e2, t3, n2) { return e2[0] = t3[0] * n2, e2[1] = t3[1] * n2, e2; } function m(e2, t3) { return [e2[0] / t3, e2[1] / t3]; } function h(e2) { return [e2[1], -e2[0]]; } function g(e2, t3) { let n2 = t3[0]; return e2[0] = t3[1], e2[1] = -n2, e2; } function ee(e2, t3) { return e2[0] * t3[0] + e2[1] * t3[1]; } function _(e2, t3) { return e2[0] === t3[0] && e2[1] === t3[1]; } function v(e2) { return Math.hypot(e2[0], e2[1]); } function y(e2, t3) { let n2 = e2[0] - t3[0], r2 = e2[1] - t3[1]; return n2 * n2 + r2 * r2; } function b(e2) { return m(e2, v(e2)); } function x(e2, t3) { return Math.hypot(e2[1] - t3[1], e2[0] - t3[0]); } function S(e2, t3, n2) { let r2 = Math.sin(n2), i2 = Math.cos(n2), a2 = e2[0] - t3[0], o2 = e2[1] - t3[1], s2 = a2 * i2 - o2 * r2, c2 = a2 * r2 + o2 * i2; return [s2 + t3[0], c2 + t3[1]]; } function C(e2, t3, n2, r2) { let i2 = Math.sin(r2), a2 = Math.cos(r2), o2 = t3[0] - n2[0], s2 = t3[1] - n2[1], c2 = o2 * a2 - s2 * i2, l2 = o2 * i2 + s2 * a2; return e2[0] = c2 + n2[0], e2[1] = l2 + n2[1], e2; } function w(e2, t3, n2) { return c(e2, f(u(t3, e2), n2)); } function te(e2, t3, n2, r2) { let i2 = n2[0] - t3[0], a2 = n2[1] - t3[1]; return e2[0] = t3[0] + i2 * r2, e2[1] = t3[1] + a2 * r2, e2; } function T(e2, t3, n2) { return c(e2, f(t3, n2)); } function k(e2, n2) { let r2 = T(e2, b(h(u(e2, c(e2, [1, 1])))), -n2), i2 = [], a2 = 1 / 13; for (let n3 = a2; n3 <= 1; n3 += a2) i2.push(S(r2, e2, t * 2 * n3)); return i2; } function A(e2, n2, r2) { let i2 = [], a2 = 1 / r2; for (let r3 = a2; r3 <= 1; r3 += a2) i2.push(S(n2, e2, t * r3)); return i2; } function j(e2, t3, n2) { let r2 = u(t3, n2), i2 = f(r2, 0.5), a2 = f(r2, 0.51); return [u(e2, i2), u(e2, a2), c(e2, a2), c(e2, i2)]; } function M(e2, n2, r2, i2) { let a2 = [], o2 = T(e2, n2, r2), s2 = 1 / i2; for (let n3 = s2; n3 < 1; n3 += s2) a2.push(S(o2, e2, t * 3 * n3)); return a2; } function ne(e2, t3, n2) { return [c(e2, f(t3, n2)), c(e2, f(t3, n2 * 0.99)), u(e2, f(t3, n2 * 0.99)), u(e2, f(t3, n2))]; } function N(e2, t3, n2) { return e2 === false || e2 === void 0 ? 0 : e2 === true ? Math.max(t3, n2) : e2; } function re(e2, t3, n2) { return e2.slice(0, 10).reduce((e3, r2) => { let i2 = r2.pressure; return t3 && (i2 = o(e3, r2.distance, n2)), (e3 + i2) / 2; }, e2[0].pressure); } function P(e2, n2 = {}) { let { size: r2 = 16, smoothing: a2 = 0.5, thinning: f2 = 0.5, simulatePressure: m2 = true, easing: _2 = (e3) => e3, start: v2 = {}, end: b2 = {}, last: x2 = false } = n2, { cap: S2 = true, easing: w2 = (e3) => e3 * (2 - e3) } = v2, { cap: T2 = true, easing: P2 = (e3) => --e3 * e3 * e3 + 1 } = b2; if (e2.length === 0 || r2 <= 0) return []; let F2 = e2[e2.length - 1].runningLength, I2 = N(v2.taper, r2, F2), L2 = N(b2.taper, r2, F2), R2 = (r2 * a2) ** 2, z = [], B = [], V = re(e2, m2, r2), H = i(r2, f2, e2[e2.length - 1].pressure, _2), U, W = e2[0].vector, G = e2[0].point, K = G, q = G, J = K, Y = false; for (let n3 = 0; n3 < e2.length; n3++) { let { pressure: a3 } = e2[n3], { point: s2, vector: h2, distance: v3, runningLength: b3 } = e2[n3], x3 = n3 === e2.length - 1; if (!x3 && F2 - b3 < 3) continue; f2 ? (m2 && (a3 = o(V, v3, r2)), H = i(r2, f2, a3, _2)) : H = r2 / 2, U === void 0 && (U = H); let S3 = b3 < I2 ? w2(b3 / I2) : 1, T3 = F2 - b3 < L2 ? P2((F2 - b3) / L2) : 1; H = Math.max(0.01, H * Math.min(S3, T3)); let k2 = (x3 ? e2[n3] : e2[n3 + 1]).vector, A2 = x3 ? 1 : ee(h2, k2), j2 = ee(h2, W) < 0 && !Y, M2 = A2 !== null && A2 < 0; if (j2 || M2) { g(E, W), p(E, E, H); for (let e3 = 0; e3 <= 1; e3 += 0.07692307692307693) d(D, s2, E), C(D, D, s2, t * e3), q = [D[0], D[1]], z.push(q), l(O, s2, E), C(O, O, s2, t * -e3), J = [O[0], O[1]], B.push(J); G = q, K = J, M2 && (Y = true); continue; } if (Y = false, x3) { g(E, h2), p(E, E, H), z.push(u(s2, E)), B.push(c(s2, E)); continue; } te(E, k2, h2, A2), g(E, E), p(E, E, H), d(D, s2, E), q = [D[0], D[1]], (n3 <= 1 || y(G, q) > R2) && (z.push(q), G = q), l(O, s2, E), J = [O[0], O[1]], (n3 <= 1 || y(K, J) > R2) && (B.push(J), K = J), V = a3, W = h2; } let X = [e2[0].point[0], e2[0].point[1]], Z = e2.length > 1 ? [e2[e2.length - 1].point[0], e2[e2.length - 1].point[1]] : c(e2[0].point, [1, 1]), Q = [], $ = []; if (e2.length === 1) { if (!(I2 || L2) || x2) return k(X, U || H); } else { I2 || L2 && e2.length === 1 || (S2 ? Q.push(...A(X, B[0], 13)) : Q.push(...j(X, z[0], B[0]))); let t3 = h(s(e2[e2.length - 1].vector)); L2 || I2 && e2.length === 1 ? $.push(Z) : T2 ? $.push(...M(Z, t3, H, 29)) : $.push(...ne(Z, t3, H)); } return z.concat($, B.reverse(), Q); } function I(e2) { return e2 != null && e2 >= 0; } function L(e2, t3 = {}) { let { streamline: i2 = 0.5, size: a2 = 16, last: o2 = false } = t3; if (e2.length === 0) return []; let s2 = 0.15 + (1 - i2) * 0.85, l2 = Array.isArray(e2[0]) ? e2 : e2.map(({ x: e3, y: t4, pressure: r2 = n }) => [e3, t4, r2]); if (l2.length === 2) { let e3 = l2[1]; l2 = l2.slice(0, -1); for (let t4 = 1; t4 < 5; t4++) l2.push(w(l2[0], e3, t4 / 4)); } l2.length === 1 && (l2 = [...l2, [...c(l2[0], r), ...l2[0].slice(2)]]); let u2 = [{ point: [l2[0][0], l2[0][1]], pressure: I(l2[0][2]) ? l2[0][2] : 0.25, vector: [...r], distance: 0, runningLength: 0 }], f2 = false, p2 = 0, m2 = u2[0], h2 = l2.length - 1; for (let e3 = 1; e3 < l2.length; e3++) { let t4 = o2 && e3 === h2 ? [l2[e3][0], l2[e3][1]] : w(m2.point, l2[e3], s2); if (_(m2.point, t4)) continue; let r2 = x(t4, m2.point); if (p2 += r2, e3 < h2 && !f2) { if (p2 < a2) continue; f2 = true; } d(F, m2.point, t4), m2 = { point: t4, pressure: I(l2[e3][2]) ? l2[e3][2] : n, vector: b(F), distance: r2, runningLength: p2 }, u2.push(m2); } return u2[0].vector = u2[1]?.vector || [0, 0], u2; } function R(e2, t3 = {}) { return P(L(e2, t3), t3); } var e, t, n, r, a, E, D, O, F; var init_esm2 = __esm({ "node_modules/perfect-freehand/dist/esm/index.mjs"() { ({ PI: e } = Math); t = e + 1e-4; n = 0.5; r = [1, 1]; ({ min: a } = Math); E = [0, 0]; D = [0, 0]; O = [0, 0]; F = [0, 0]; } }); // src/default-content-colours.ts var DEFAULT_CONTENT_COLOUR_PRIMARY_STROKE, DEFAULT_CONTENT_COLOUR_WRITING_LINE, INK_SVG_STROKE_PATH_CLASS, INK_SVG_WRITING_LINE_CLASS; var init_default_content_colours = __esm({ "src/default-content-colours.ts"() { DEFAULT_CONTENT_COLOUR_PRIMARY_STROKE = "#000000"; DEFAULT_CONTENT_COLOUR_WRITING_LINE = "#888888"; INK_SVG_STROKE_PATH_CLASS = "ink-type-stroke ink-color-primary"; INK_SVG_WRITING_LINE_CLASS = "ink-type-writing-line ink-color-writing-line"; } }); // src/ink-canvas/utils/svg-path-from-stroke.ts function getSvgPathFromStroke(points, closed = true) { const len = points.length; if (len < 4) return ""; let a2 = points[0]; let b2 = points[1]; const c2 = points[2]; let result = `M${a2[0].toFixed(2)},${a2[1].toFixed(2)} Q${b2[0].toFixed(2)},${b2[1].toFixed(2)} ${average(b2[0], c2[0]).toFixed(2)},${average(b2[1], c2[1]).toFixed(2)} T`; for (let i2 = 2, max3 = len - 1; i2 < max3; i2++) { a2 = points[i2]; b2 = points[i2 + 1]; result += `${average(a2[0], b2[0]).toFixed(2)},${average(a2[1], b2[1]).toFixed(2)} `; } if (closed) result += "Z"; return result; } function average(a2, b2) { return (a2 + b2) / 2; } var init_svg_path_from_stroke = __esm({ "src/ink-canvas/utils/svg-path-from-stroke.ts"() { } }); // src/ink-canvas/stroke-easing.ts function penStrokePressureEasing(t3) { return t3 * 0.65 + Math.sin(t3 * Math.PI / 2) * 0.35; } function identityStrokePressureEasing(t3) { return t3; } function inkStrokeUsesPenEasing(style) { if (style.inputKind === "pen") return true; if (style.inputKind === "mouse") return false; return !style.simulatePressure; } var init_stroke_easing = __esm({ "src/ink-canvas/stroke-easing.ts"() { } }); // src/ink-canvas/camera.ts function clampZoom(zoom) { return Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, zoom)); } function zoomAtPoint(camera, anchorScreenX, anchorScreenY, direction) { const factor = direction > 0 ? ZOOM_FACTOR : 1 / ZOOM_FACTOR; const newZoom = clampZoom(camera.zoom * factor); const zoomDelta = 1 / newZoom - 1 / camera.zoom; return { x: camera.x + anchorScreenX * zoomDelta, y: camera.y + anchorScreenY * zoomDelta, zoom: newZoom }; } function panByScreenDelta(camera, deltaScreenX, deltaScreenY) { return { x: camera.x + deltaScreenX / camera.zoom, y: camera.y + deltaScreenY / camera.zoom, zoom: camera.zoom }; } function screenToPage(camera, containerRect, screenX, screenY) { return { x: (screenX - containerRect.left) / camera.zoom - camera.x, y: (screenY - containerRect.top) / camera.zoom - camera.y }; } function fitBoundsToViewport(viewportWidth, viewportHeight, bounds, padding = 16) { if (bounds.width <= 0 || bounds.height <= 0) { return { x: 0, y: 0, zoom: 0.3 }; } const zoom = clampZoom(Math.min((viewportWidth - padding * 2) / bounds.width, (viewportHeight - padding * 2) / bounds.height, 1)); const boundsCenterX = bounds.x + bounds.width / 2; const boundsCenterY = bounds.y + bounds.height / 2; return { x: viewportWidth / (2 * zoom) - boundsCenterX, y: viewportHeight / (2 * zoom) - boundsCenterY, zoom }; } function embedViewBoxFromCamera(camera, viewportWidth, viewportHeight) { const zoom = camera.zoom > 0 ? camera.zoom : MIN_ZOOM; return { x: -camera.x, y: -camera.y, width: viewportWidth / zoom, height: viewportHeight / zoom }; } function adjustCameraToPreservePagePointAtScreenTargets(camera, oldContainerRect, anchorScreenX, anchorScreenY, newContainerRect, targetScreenX, targetScreenY) { const pageX = (anchorScreenX - oldContainerRect.left) / camera.zoom - camera.x; const pageY = (anchorScreenY - oldContainerRect.top) / camera.zoom - camera.y; return { x: (targetScreenX - newContainerRect.left) / camera.zoom - pageX, y: (targetScreenY - newContainerRect.top) / camera.zoom - pageY, zoom: camera.zoom }; } function adjustCameraToPreserveViewportCenter(camera, oldContainerRect, newContainerRect) { const anchorScreenX = oldContainerRect.left + oldContainerRect.width / 2; const anchorScreenY = oldContainerRect.top + oldContainerRect.height / 2; const targetScreenX = newContainerRect.left + newContainerRect.width / 2; const targetScreenY = newContainerRect.top + newContainerRect.height / 2; return adjustCameraToPreservePagePointAtScreenTargets(camera, oldContainerRect, anchorScreenX, anchorScreenY, newContainerRect, targetScreenX, targetScreenY); } function getRightDragZoomDelta(startX, startY, clientX, clientY) { const deltaY = startY - clientY; const deltaX = clientX - startX; return deltaX + deltaY; } var MIN_ZOOM, MAX_ZOOM, ZOOM_FACTOR; var init_camera = __esm({ "src/ink-canvas/camera.ts"() { MIN_ZOOM = 0.1; MAX_ZOOM = 5; ZOOM_FACTOR = 1.08; } }); // src/ink-canvas/constants/erase-tool.ts var ERASER_HIT_RADIUS_REFERENCE, ERASER_RING_SAMPLE_COUNT, ERASER_SWEEP_SAMPLE_SPACING_REFERENCE, INK_STROKE_PENDING_ERASE_CLASS, INK_STROKE_PENDING_ERASE_ANIMATION_MS; var init_erase_tool = __esm({ "src/ink-canvas/constants/erase-tool.ts"() { ERASER_HIT_RADIUS_REFERENCE = 15; ERASER_RING_SAMPLE_COUNT = 8; ERASER_SWEEP_SAMPLE_SPACING_REFERENCE = 8; INK_STROKE_PENDING_ERASE_CLASS = "ink-stroke--pending-erase"; INK_STROKE_PENDING_ERASE_ANIMATION_MS = 1e3; } }); // src/ink-canvas/stroke-zoom-scale.ts function clampCaptureZoom(zoom) { return clampZoom(zoom); } function captureZoomLerpT(captureZoom, zoomRef = INK_STROKE_ZOOM_REFERENCE, zoomMin = INK_STROKE_ZOOM_MIN) { const z = clampCaptureZoom(captureZoom); if (z >= zoomRef) return 0; const t3 = (1 / z - 1) / (1 / zoomMin - 1); return Math.min(1, Math.max(0, t3)); } function metricForCaptureZoom(referenceValue, zoomOutTarget, captureZoom, zoomRef = INK_STROKE_ZOOM_REFERENCE) { const z = clampCaptureZoom(captureZoom); if (z < zoomRef) { const t3 = captureZoomLerpT(z, zoomRef, INK_STROKE_ZOOM_MIN); return referenceValue + t3 * (zoomOutTarget - referenceValue); } return referenceValue * (zoomRef / z); } function numericForCaptureZoom(referenceValue, captureZoom, treatAs, zoomRef = INK_STROKE_ZOOM_REFERENCE) { const target = STREAMLINE_SMOOTHING_ZOOM_OUT_TARGET[treatAs]; const value = metricForCaptureZoom(referenceValue, target, captureZoom, zoomRef); return Math.min(1, Math.max(0, value)); } function screenConstantMetricForCameraZoom(referenceValue, cameraZoom, zoomRef = INK_STROKE_ZOOM_REFERENCE) { const z = clampCaptureZoom(cameraZoom); const zoomOutTarget = referenceValue * (zoomRef / INK_STROKE_ZOOM_MIN); return metricForCaptureZoom(referenceValue, zoomOutTarget, z, zoomRef) * z; } function eraserHitRadiusScreenPx(cameraZoom) { return screenConstantMetricForCameraZoom(ERASER_HIT_RADIUS_REFERENCE, cameraZoom); } function eraserSweepSpacingScreenPx(cameraZoom) { return screenConstantMetricForCameraZoom(ERASER_SWEEP_SAMPLE_SPACING_REFERENCE, cameraZoom); } var INK_STROKE_ZOOM_REFERENCE, INK_STROKE_ZOOM_MIN, STREAMLINE_SMOOTHING_ZOOM_OUT_TARGET; var init_stroke_zoom_scale = __esm({ "src/ink-canvas/stroke-zoom-scale.ts"() { init_camera(); init_erase_tool(); INK_STROKE_ZOOM_REFERENCE = 1; INK_STROKE_ZOOM_MIN = 0.1; STREAMLINE_SMOOTHING_ZOOM_OUT_TARGET = { pen: 0.2, mouse: 0.65 }; } }); // src/ink-canvas/types.ts function toStrokeOptions(style) { const easing = inkStrokeUsesPenEasing(style) ? penStrokePressureEasing : identityStrokePressureEasing; return { size: style.size, thinning: style.thinning, smoothing: style.smoothing, streamline: style.streamline, simulatePressure: style.simulatePressure, easing, last: true, start: { cap: true, taper: 0 }, end: { cap: true, taper: 0 }, captureZoom: style.captureZoom ?? INK_STROKE_ZOOM_REFERENCE }; } var DEFAULT_STROKE_STYLE; var init_types = __esm({ "src/ink-canvas/types.ts"() { init_stroke_easing(); init_stroke_zoom_scale(); DEFAULT_STROKE_STYLE = { size: 8, thinning: 0.5, smoothing: 0.5, streamline: 0.5, simulatePressure: true, color: "currentColor" }; } }); // src/ink-canvas/svg-export.ts function renderStrokesToSvg(strokes, snapshotJson, padding = 16) { if (strokes.length === 0) { return buildSvgString("", "0 0 1 1", snapshotJson); } const bounds = computeStrokesBounds(strokes); const viewBox = [ bounds.minX - padding, bounds.minY - padding, bounds.width + padding * 2, bounds.height + padding * 2 ].join(" "); let pathsMarkup = ""; for (const stroke of strokes) { const outlinePoints = R(stroke.points, toStrokeOptions(stroke.style)); const d2 = getSvgPathFromStroke(outlinePoints); pathsMarkup += buildStrokePathMarkup(d2, stroke.offset.x, stroke.offset.y); } return buildSvgString(pathsMarkup, viewBox, snapshotJson); } function renderWritingStrokesToSvg(strokes, snapshot, pageWidth, padding = 0) { const lineHeight = snapshot.writingLineHeight ?? WRITING_LINE_HEIGHT; let height = WRITING_MIN_PAGE_HEIGHT; if (strokes.length > 0) { const bounds = computeStrokesBounds(strokes); const numFilledLines = Math.ceil((bounds.maxY + padding) / lineHeight); height = Math.max((numFilledLines + 0.5) * lineHeight, WRITING_MIN_PAGE_HEIGHT); } const margin = pageWidth * 0.05; let guideMarkup = ""; const lineCount = Math.floor(height / lineHeight); for (let i2 = 1; i2 <= lineCount; i2++) { const y2 = i2 * lineHeight; guideMarkup += ` `; } let pathsMarkup = ""; for (const stroke of strokes) { const outlinePoints = R(stroke.points, toStrokeOptions(stroke.style)); const d2 = getSvgPathFromStroke(outlinePoints); pathsMarkup += buildStrokePathMarkup(d2, stroke.offset.x, stroke.offset.y); } const viewBox = `0 0 ${pageWidth} ${height}`; return buildSvgString(guideMarkup + pathsMarkup, viewBox, snapshot); } function buildStrokePathMarkup(d2, offsetX, offsetY) { const pathAttrs = `d="${d2}" fill="${DEFAULT_CONTENT_COLOUR_PRIMARY_STROKE}" class="${INK_SVG_STROKE_PATH_CLASS}"`; const hasOffset = offsetX !== 0 || offsetY !== 0; if (hasOffset) { return ` `; } return ` `; } function buildSvgString(pathsMarkup, viewBox, snapshotJson) { const metadataJson = JSON.stringify(snapshotJson); return [ ``, ``, `${escapeXml(metadataJson)}`, ``, pathsMarkup, `` ].join("\n"); } function escapeXml(str) { return str.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); } function computeStrokesBounds(strokes) { let minX = Infinity; let minY = Infinity; let maxX = -Infinity; let maxY = -Infinity; for (const stroke of strokes) { const outlinePoints = R(stroke.points, toStrokeOptions(stroke.style)); for (const [px, py] of outlinePoints) { const x2 = px + stroke.offset.x; const y2 = py + stroke.offset.y; if (x2 < minX) minX = x2; if (y2 < minY) minY = y2; if (x2 > maxX) maxX = x2; if (y2 > maxY) maxY = y2; } } return { minX, minY, maxX, maxY, width: maxX - minX, height: maxY - minY }; } var init_svg_export = __esm({ "src/ink-canvas/svg-export.ts"() { init_esm2(); init_default_content_colours(); init_constants(); init_svg_path_from_stroke(); init_types(); } }); // src/logic/utils/extractInkJsonFromSvg.ts function sniffInkSvgFileType(svgString) { const trimmedStart = svgString.trimStart(); if (!trimmedStart.startsWith("<")) return null; const hasInkMarker = /]/i.test(svgString) || /]/i.test(svgString) || /]/i.test(svgString); if (!hasInkMarker) return null; const isWriting = /file-type\s*=\s*["']inkWriting["']/i.test(svgString); const isDrawing = /file-type\s*=\s*["']inkDrawing["']/i.test(svgString); if (isWriting && !isDrawing) return "inkWriting"; if (isDrawing && !isWriting) return "inkDrawing"; if (!isWriting && !isDrawing && /]/i.test(svgString)) { return "inkDrawing"; } return null; } function extractInkJsonFromSvg(svgString) { try { const parser = new import_xmldom2.DOMParser(); const doc = parser.parseFromString(svgString, "image/svg+xml"); const parseError = doc.getElementsByTagName("parsererror"); if (parseError.length > 0) { console.warn("Failed to parse SVG as XML"); return null; } const metadataElements = doc.getElementsByTagName("metadata"); if (metadataElements.length === 0) { console.warn("No metadata element found in SVG"); return null; } const metadataElement = metadataElements[0]; const inkCanvasElements = metadataElement.getElementsByTagName("ink-canvas"); if (inkCanvasElements.length > 0) { return extractInkCanvasFormat(metadataElement, inkCanvasElements[0], svgString); } return extractTldrawFormat(metadataElement, svgString); } catch (error2) { console.error("Error extracting ink metadata JSON:", error2); return null; } } function extractInkCanvasFormat(metadataElement, inkCanvasElement, svgString) { const jsonText = inkCanvasElement.textContent?.trim(); if (!jsonText) { console.warn("No JSON content in element"); return null; } const inkCanvasSnapshot = JSON.parse(jsonText); const inkElements = metadataElement.getElementsByTagName("ink"); let fileTypeText; if (inkElements.length > 0) { fileTypeText = inkElements[0].getAttribute("file-type") || void 0; } if (!fileTypeText) fileTypeText = "inkDrawing"; const pluginVersionAttr = inkElements.length > 0 ? inkElements[0].getAttribute("plugin-version") || "" : ""; return { meta: { pluginVersion: pluginVersionAttr, tldrawVersion: "", fileType: fileTypeText }, tldraw: {}, inkCanvas: inkCanvasSnapshot, svgString }; } function extractTldrawFormat(metadataElement, svgString) { const inkElements = metadataElement.getElementsByTagName("ink"); let fileTypeText; if (inkElements.length > 0) { fileTypeText = inkElements[0].getAttribute("file-type") || void 0; } if (!fileTypeText) { console.warn("No filetype found in metadata"); return null; } if (fileTypeText !== "inkDrawing" && fileTypeText !== "inkWriting") { console.warn("Unsupported or missing filetype in metadata"); return null; } const tldrawElements = metadataElement.getElementsByTagName("tldraw"); if (tldrawElements.length === 0) { console.warn("No tldraw element found in metadata"); return null; } const settingsElement = tldrawElements[0]; const jsonText = settingsElement.textContent?.trim(); if (!jsonText) { console.warn("No JSON content found in metadata settings element"); return null; } const tldrawSnapshot = JSON.parse(jsonText); const pluginVersionAttr = inkElements.length > 0 ? inkElements[0].getAttribute("plugin-version") || void 0 : void 0; const tldrawVersionAttr = settingsElement.getAttribute("version") || void 0; const writingLineHeightAttr = inkElements.length > 0 ? inkElements[0].getAttribute("writing-line-height") : null; const writingLineHeightParsed = writingLineHeightAttr ? parseInt(writingLineHeightAttr, 10) : void 0; const writingLineHeight = writingLineHeightParsed !== void 0 && !isNaN(writingLineHeightParsed) ? writingLineHeightParsed : void 0; return { meta: { pluginVersion: pluginVersionAttr || "", tldrawVersion: tldrawVersionAttr || "", fileType: fileTypeText, writingLineHeight }, tldraw: tldrawSnapshot, svgString }; } var import_xmldom2; var init_extractInkJsonFromSvg = __esm({ "src/logic/utils/extractInkJsonFromSvg.ts"() { import_xmldom2 = __toESM(require_lib()); } }); // src/ink-canvas/migrate-from-tldraw.ts function getTldrawStoreForMigration(tldrawSnapshot) { const topLevel = tldrawSnapshot.store; if (topLevel) return topLevel; const nested = tldrawSnapshot.document?.store; if (nested) return nested; return void 0; } function readGridEnabledFromTldrawSession(tldrawSnapshot) { return tldrawSnapshot.session?.isGridMode !== false; } function migrateFromTldraw(tldrawSnapshot) { const snapshot = { version: 1, strokes: [], gridEnabled: readGridEnabledFromTldrawSession(tldrawSnapshot) }; const store = getTldrawStoreForMigration(tldrawSnapshot); if (!store) return snapshot; const captureZoom = readCameraZoomFromStore(store); for (const key of Object.keys(store)) { const record = store[key]; const isDrawShape = record.typeName === "shape" && record.type === "draw"; if (!isDrawShape) continue; const drawRecord = record; const stroke = convertDrawShape(drawRecord, captureZoom); if (stroke) snapshot.strokes.push(stroke); } return snapshot; } function migrateWritingFromTldraw(tldrawSnapshot, fallbackLineHeight = WRITING_LINE_HEIGHT) { const snapshot = { version: 1, strokes: [], gridEnabled: false, writingLineHeight: fallbackLineHeight }; const store = getTldrawStoreForMigration(tldrawSnapshot); if (!store) return snapshot; let writingLineHeight = fallbackLineHeight; const documentRecord = store["document:document"]; if (documentRecord) { const meta = documentRecord.meta; if (meta && typeof meta.writingLineHeight === "number" && meta.writingLineHeight > 0) { writingLineHeight = meta.writingLineHeight; } } const captureZoom = readCameraZoomFromStore(store); for (const key of Object.keys(store)) { const record = store[key]; const isDrawShape = record.typeName === "shape" && record.type === "draw"; if (!isDrawShape) continue; const drawRecord = record; const stroke = convertDrawShape(drawRecord, captureZoom); if (stroke) snapshot.strokes.push(stroke); } snapshot.writingLineHeight = writingLineHeight; return snapshot; } function readCameraZoomFromStore(store) { for (const key of Object.keys(store)) { const record = store[key]; if (record.typeName !== "camera") continue; const cam = record; return cam.z ?? 1; } return 1; } function convertDrawShape(shape, captureZoom) { const allPoints = []; for (const segment of shape.props.segments) { for (const pt of segment.points) { allPoints.push([pt.x, pt.y, pt.z ?? 0.5]); } } if (allPoints.length === 0) return null; const style = mapTldrawStyle(shape.props, captureZoom); return { id: shape.id, points: allPoints, style, offset: { x: shape.x, y: shape.y } }; } function mapTldrawStyle(props, _captureZoom) { const basePx = TLDRAW_SIZE_TO_PX[props.size] ?? TLDRAW_SIZE_TO_PX["m"]; const effectiveSize = 1 + basePx * 1.5; return buildTldrawMigrationStrokeStyle(props, effectiveSize); } function buildTldrawMigrationStrokeStyle(props, effectiveSize) { return { ...DEFAULT_STROKE_STYLE, size: effectiveSize, color: "currentColor", simulatePressure: !props.isPen, inputKind: props.isPen ? "pen" : "mouse", captureZoom: INK_STROKE_ZOOM_REFERENCE }; } var TLDRAW_SIZE_TO_PX; var init_migrate_from_tldraw = __esm({ "src/ink-canvas/migrate-from-tldraw.ts"() { init_constants(); init_types(); init_stroke_zoom_scale(); TLDRAW_SIZE_TO_PX = { s: 2, m: 3.5, l: 5, xl: 10 }; } }); // src/logic/utils/ink-file-has-strokes.ts function getInkStrokesFromSvg(svgString) { const inkFileData = extractInkJsonFromSvg(svgString); if (!inkFileData) return []; if (isInkCanvasFile(inkFileData) && inkFileData.inkCanvas) { return inkFileData.inkCanvas.strokes ?? []; } const migrated = migrateFromTldraw(inkFileData.tldraw); return migrated.strokes ?? []; } function inkFileHasStrokes(svgString) { return getInkStrokesFromSvg(svgString).length > 0; } function showLockedChrome(settingEnabled, hasStrokes) { return settingEnabled || hasStrokes === false; } var init_ink_file_has_strokes = __esm({ "src/logic/utils/ink-file-has-strokes.ts"() { init_ink_file_storage_engine(); init_extractInkJsonFromSvg(); init_migrate_from_tldraw(); } }); // src/logic/utils/build-drawing-embed-settings-from-file.ts function cloneDefaultEmbedSettings() { return { ...DEFAULT_EMBED_SETTINGS, embedDisplay: { ...DEFAULT_EMBED_SETTINGS.embedDisplay }, viewBox: { ...DEFAULT_EMBED_SETTINGS.viewBox } }; } function buildEmbedSettingsWithFittedViewBox(strokes) { const embedDisplay = { ...DEFAULT_EMBED_SETTINGS.embedDisplay }; const viewportWidth = embedDisplay.width; const viewportHeight = viewportWidth / embedDisplay.aspectRatio; const bounds = computeStrokesBounds(strokes); const camera = fitBoundsToViewport(viewportWidth, viewportHeight, { x: bounds.minX, y: bounds.minY, width: bounds.width, height: bounds.height }, EMBED_FIT_PADDING_PX); return { ...DEFAULT_EMBED_SETTINGS, embedDisplay, viewBox: embedViewBoxFromCamera(camera, viewportWidth, viewportHeight) }; } function buildDrawingEmbedSettingsFromStrokes(strokes) { if (strokes.length === 0) return null; const bounds = computeStrokesBounds(strokes); if (!Number.isFinite(bounds.width) || !Number.isFinite(bounds.height) || bounds.width <= 0 || bounds.height <= 0) { return null; } return buildEmbedSettingsWithFittedViewBox(strokes); } async function buildDrawingEmbedSettingsFromFile(plugin, file) { try { const svgString = await plugin.app.vault.read(file); const strokes = getInkStrokesFromSvg(svgString); return buildDrawingEmbedSettingsFromStrokes(strokes) ?? cloneDefaultEmbedSettings(); } catch { return cloneDefaultEmbedSettings(); } } var EMBED_FIT_PADDING_PX; var init_build_drawing_embed_settings_from_file = __esm({ "src/logic/utils/build-drawing-embed-settings-from-file.ts"() { init_svg_export(); init_camera(); init_ink_file_has_strokes(); init_embed_settings(); EMBED_FIT_PADDING_PX = 16; } }); // src/logic/utils/writing-embed-aspect-ratio.ts function parseSvgViewBoxAspectRatio(svgString) { const viewBoxMatch = svgString.match(/]*\bviewBox\s*=\s*["']([^"']+)["']/i); if (!viewBoxMatch) return null; const parts = viewBoxMatch[1].trim().split(/[\s,]+/).map(Number); if (parts.length < 4) return null; const viewBoxWidth = parts[2]; const viewBoxHeight = parts[3]; if (!Number.isFinite(viewBoxWidth) || !Number.isFinite(viewBoxHeight)) return null; if (viewBoxWidth <= 0 || viewBoxHeight <= 0) return null; return viewBoxWidth / viewBoxHeight; } async function readWritingFileAspectRatio(plugin, file) { try { const svgString = await plugin.app.vault.read(file); return parseSvgViewBoxAspectRatio(svgString); } catch { return null; } } function patchWritingEmbedAspectRatioInEmbedSnippet(embedSnippet, aspectRatio) { const aspectRatioStr = formatEmbedAspectRatio(aspectRatio); if (/aspectRatio=[^&)]+/.test(embedSnippet)) { return embedSnippet.replace(/(aspectRatio=)([^&)]+)/, `$1${aspectRatioStr}`); } return embedSnippet.replace(/(\[Edit Writing\]\([^?]+)(\?[^)]*)?(\))/, (_match, p1, p2, p3) => { if (p2) { return `${p1}${p2}&aspectRatio=${aspectRatioStr}${p3}`; } return `${p1}?aspectRatio=${aspectRatioStr}${p3}`; }); } var init_writing_embed_aspect_ratio = __esm({ "src/logic/utils/writing-embed-aspect-ratio.ts"() { init_embed_settings(); } }); // src/logic/utils/migration-logic.ts function findLegacyEmbedBlocks(markdownContent) { const results = []; const codeBlockRegex = new RegExp("```(?:" + WRITE_EMBED_KEY + "|" + DRAW_EMBED_KEY + ")\\n([\\s\\S]*?)\\n```", "g"); let match; while ((match = codeBlockRegex.exec(markdownContent)) !== null) { const fullMatch = match[0]; const jsonContent = match[1].trim(); const embedType = fullMatch.startsWith("```" + WRITE_EMBED_KEY) ? "writing" : "drawing"; try { const parsed = JSON.parse(jsonContent); if (typeof parsed === "object" && parsed !== null) { const embedRecord = parsed; const filepathValue = embedRecord["filepath"]; if (typeof filepathValue === "string" && filepathValue.length > 0) { results.push({ fullMatch, embedType, filepath: filepathValue }); } } } catch { } } return results; } function replaceLegacyBlockInMarkdown(markdown, block, newEmbed) { const trimmedEmbed = newEmbed.replace(/^\n+|\n+$/g, ""); return markdown.split(block.fullMatch).join(trimmedEmbed); } function convertLegacyToInkCanvasFileData(legacyJson, fileType) { let legacyData; try { legacyData = JSON.parse(legacyJson); } catch { return null; } if (!legacyData.tldraw || !legacyData.meta) return null; const tldrawSnapshot = legacyData.tldraw; if (fileType === "writing") { const inkCanvasSnapshot2 = migrateWritingFromTldraw(tldrawSnapshot, WRITING_LINE_HEIGHT); const svgString2 = renderWritingStrokesToSvg(inkCanvasSnapshot2.strokes, inkCanvasSnapshot2, WRITING_PAGE_WIDTH); const fileData2 = buildInkCanvasWritingFileData({ inkCanvasSnapshot: inkCanvasSnapshot2, svgString: svgString2 }); fileData2.meta.pluginVersion = PLUGIN_VERSION; if (legacyData.meta.transcript) { fileData2.meta.transcript = legacyData.meta.transcript; } if (inkCanvasSnapshot2.writingLineHeight != null) { fileData2.meta.writingLineHeight = inkCanvasSnapshot2.writingLineHeight; } return fileData2; } const inkCanvasSnapshot = migrateFromTldraw(tldrawSnapshot); const svgString = renderStrokesToSvg(inkCanvasSnapshot.strokes, inkCanvasSnapshot); const fileData = buildInkCanvasDrawingFileData({ inkCanvasSnapshot, svgString }); fileData.meta.pluginVersion = PLUGIN_VERSION; if (legacyData.meta.transcript) { fileData.meta.transcript = legacyData.meta.transcript; } return fileData; } function getLegacySvgPath(legacyFilePath) { const dotIndex = legacyFilePath.lastIndexOf("."); if (dotIndex < 0) return legacyFilePath + ".svg"; return legacyFilePath.substring(0, dotIndex) + ".svg"; } function isLegacyInkFilePath(filePath) { return filePath.endsWith(".writing") || filePath.endsWith(".drawing"); } function getLegacyInkFileType(filePath) { if (filePath.endsWith(".writing")) return "writing"; if (filePath.endsWith(".drawing")) return "drawing"; return null; } function vaultHasLegacyInkFiles(vault) { return vault.getFiles().some((file) => file.extension === "writing" || file.extension === "drawing"); } function addLegacyFileToMap(legacyFileMap, legacyFile, fileType) { if (legacyFileMap.has(legacyFile.path)) return; legacyFileMap.set(legacyFile.path, { legacyFile, fileType, newSvgPath: getLegacySvgPath(legacyFile.path), referencingNotes: [] }); } function getTestRunSvgBasename(legacyFilePath) { const slashIndex = legacyFilePath.lastIndexOf("/"); const fileName = slashIndex < 0 ? legacyFilePath : legacyFilePath.substring(slashIndex + 1); const dotIndex = fileName.lastIndexOf("."); const nameWithoutExt = dotIndex < 0 ? fileName : fileName.substring(0, dotIndex); return `${nameWithoutExt}.svg`; } function buildTestRunSvgPathMap(legacyFilePaths) { const usedCountByStem = /* @__PURE__ */ new Map(); const pathMap = /* @__PURE__ */ new Map(); for (const legacyPath of legacyFilePaths) { const basename = getTestRunSvgBasename(legacyPath); const stem = basename.slice(0, -".svg".length); const useCount = usedCountByStem.get(stem) ?? 0; usedCountByStem.set(stem, useCount + 1); const fileName = useCount === 0 ? basename : `${stem}_${useCount}.svg`; pathMap.set(legacyPath, `${INK_TEST_CONVERSIONS_FOLDER}/${fileName}`); } return pathMap; } function getTestRunSvgPath(legacyFilePath) { return buildTestRunSvgPathMap([legacyFilePath]).get(legacyFilePath); } function resolveMigrationOutputSvgPath(legacyFilePath, options, testRunSvgPathByLegacyPath) { if (options?.testRun) { return testRunSvgPathByLegacyPath?.get(legacyFilePath) ?? getTestRunSvgPath(legacyFilePath); } return getLegacySvgPath(legacyFilePath); } async function ensureVaultFolderExists(vault, folderPath) { if (!vault.getAbstractFileByPath(folderPath)) { await vault.createFolder(folderPath); } } async function buildSingleLegacyFileScanResult(vault, legacyFile) { const fileType = getLegacyInkFileType(legacyFile.path); if (!fileType) return null; const referencingNotes = []; for (const note of vault.getMarkdownFiles()) { let content; try { content = await vault.read(note); } catch { continue; } const blocks = findLegacyEmbedBlocks(content); if (blocks.some((block) => block.filepath === legacyFile.path)) { referencingNotes.push(note); } } return { legacyFiles: [{ legacyFile, fileType, newSvgPath: getLegacySvgPath(legacyFile.path), referencingNotes }], affectedNotes: referencingNotes }; } async function scanVaultForLegacyEmbeds(vault, onProgress) { const markdownFiles = vault.getMarkdownFiles(); const total = markdownFiles.length; const legacyFileMap = /* @__PURE__ */ new Map(); const affectedNoteSet = /* @__PURE__ */ new Map(); for (const vaultFile of vault.getFiles()) { const fileType = getLegacyInkFileType(vaultFile.path); if (fileType) { addLegacyFileToMap(legacyFileMap, vaultFile, fileType); } } for (let i2 = 0; i2 < markdownFiles.length; i2++) { const note = markdownFiles[i2]; let content; try { content = await vault.read(note); } catch { onProgress?.(i2 + 1, total, legacyFileMap.size); continue; } const blocks = findLegacyEmbedBlocks(content); if (blocks.length === 0) { onProgress?.(i2 + 1, total, legacyFileMap.size); continue; } affectedNoteSet.set(note.path, note); for (const block of blocks) { const legacyFile = vault.getAbstractFileByPath(block.filepath); if (legacyFile instanceof import_obsidian8.TFile) { addLegacyFileToMap(legacyFileMap, legacyFile, block.embedType); } const entry = legacyFileMap.get(block.filepath); if (entry && !entry.referencingNotes.find((n2) => n2.path === note.path)) { entry.referencingNotes.push(note); } } onProgress?.(i2 + 1, total, legacyFileMap.size); } return { legacyFiles: Array.from(legacyFileMap.values()), affectedNotes: Array.from(affectedNoteSet.values()) }; } async function executeMigration(vault, fileManager, scanResult, onProgress, options) { const isTestRun = options?.testRun === true; const shouldDeleteLegacyFiles = !isTestRun; const result = { convertedFiles: 0, updatedNotes: 0, updatedNotePaths: [], skipped: [], failed: [], ...isTestRun ? { testRunOutputFolder: INK_TEST_CONVERSIONS_FOLDER } : {} }; const notesToUpdate = isTestRun ? [] : scanResult.affectedNotes; const legacyFilesToConvert = options?.singleLegacyFilePath ? scanResult.legacyFiles.filter((entry) => entry.legacyFile.path === options.singleLegacyFilePath) : scanResult.legacyFiles; const total = legacyFilesToConvert.length + notesToUpdate.length; let done = 0; logToVault("Migration started. Files: " + legacyFilesToConvert.length + ", Notes: " + notesToUpdate.length + (isTestRun ? " (test run)" : "")); if (isTestRun) { await ensureVaultFolderExists(vault, INK_TEST_CONVERSIONS_FOLDER); } const testRunSvgPathByLegacyPath = isTestRun ? buildTestRunSvgPathMap(legacyFilesToConvert.map((entry) => entry.legacyFile.path)) : void 0; const drawingEmbedSettingsBySvgPath = /* @__PURE__ */ new Map(); const writingAspectRatioBySvgPath = /* @__PURE__ */ new Map(); const reportProgress = () => { onProgress?.(done, total, { convertedFiles: result.convertedFiles, skippedCount: result.skipped.length, failedCount: result.failed.length }); }; for (const entry of legacyFilesToConvert) { try { const legacyJson = await vault.read(entry.legacyFile); const inkFileData = convertLegacyToInkCanvasFileData(legacyJson, entry.fileType); if (!inkFileData) { result.skipped.push(entry.legacyFile.path + " (could not parse)"); done++; reportProgress(); continue; } const outputSvgPath = resolveMigrationOutputSvgPath(entry.legacyFile.path, options, testRunSvgPathByLegacyPath); const existing = vault.getAbstractFileByPath(outputSvgPath); if (!isTestRun && entry.fileType === "drawing" && inkFileData.inkCanvas) { const embedSettings = buildDrawingEmbedSettingsFromStrokes(inkFileData.inkCanvas.strokes); if (embedSettings) { drawingEmbedSettingsBySvgPath.set(outputSvgPath, embedSettings); } } const svgStr = buildFileStr(inkFileData); if (!isTestRun && entry.fileType === "writing") { const writingAspectRatio = parseSvgViewBoxAspectRatio(svgStr); if (writingAspectRatio != null) { writingAspectRatioBySvgPath.set(outputSvgPath, writingAspectRatio); } } if (existing instanceof import_obsidian8.TFile) { try { await vault.modify(existing, svgStr); } catch (err) { const detail = err instanceof Error ? err.message : String(err); throw new Error("failed to overwrite existing SVG \u2013 " + detail); } } else { try { await vault.create(outputSvgPath, svgStr); } catch (err) { const detail = err instanceof Error ? err.message : String(err); throw new Error("failed to create SVG \u2013 " + detail); } } if (shouldDeleteLegacyFiles) { try { await fileManager.trashFile(entry.legacyFile); } catch (err) { const detail = err instanceof Error ? err.message : String(err); throw new Error("failed to delete legacy file \u2013 " + detail); } } result.convertedFiles++; } catch (err) { const errMessage = err instanceof Error ? err.message : String(err); logToVault("Migration file error: " + entry.legacyFile.path + " \u2013 " + errMessage); result.failed.push(entry.legacyFile.path + ": " + errMessage); } done++; reportProgress(); } for (const note of notesToUpdate) { try { let content = await vault.read(note); const blocks = findLegacyEmbedBlocks(content); for (const block of blocks) { if (options?.singleLegacyFilePath && block.filepath !== options.singleLegacyFilePath) { continue; } const newSvgPath = resolveMigrationOutputSvgPath(block.filepath, options); const newEmbed = block.embedType === "writing" ? (() => { const aspectRatio = writingAspectRatioBySvgPath.get(newSvgPath); return aspectRatio != null ? buildWritingEmbed(newSvgPath, { aspectRatio }) : buildWritingEmbed(newSvgPath); })() : (() => { const embedSettings = drawingEmbedSettingsBySvgPath.get(newSvgPath); return embedSettings ? buildDrawingEmbed(newSvgPath, { embedSettings }) : buildDrawingEmbed(newSvgPath); })(); content = replaceLegacyBlockInMarkdown(content, block, newEmbed); } await vault.modify(note, content); result.updatedNotes++; result.updatedNotePaths.push(note.path); } catch (err) { const errMessage = err instanceof Error ? err.message : String(err); result.failed.push(note.path + ": " + errMessage); } done++; reportProgress(); } logToVault("Migration complete. Converted: " + result.convertedFiles + ", Failed: " + result.failed.length + ", Skipped: " + result.skipped.length); return result; } var import_obsidian8, INK_TEST_CONVERSIONS_FOLDER; var init_migration_logic = __esm({ "src/logic/utils/migration-logic.ts"() { import_obsidian8 = require("obsidian"); init_constants(); init_log_to_vault(); init_build_file_data(); init_buildFileStr(); init_build_embeds(); init_build_drawing_embed_settings_from_file(); init_writing_embed_aspect_ratio(); init_migrate_from_tldraw(); init_svg_export(); INK_TEST_CONVERSIONS_FOLDER = "_ink-test-conversions"; } }); // src/logic/utils/tldraw-svg-migration-logic.ts function findV2InkEmbedRefs(markdownContent) { const results = []; let match; V2_EMBED_PATH_REGEX.lastIndex = 0; while ((match = V2_EMBED_PATH_REGEX.exec(markdownContent)) !== null) { const alt = match[1]; const filepath = match[2].trim(); if (!filepath) continue; results.push({ filepath, embedKind: alt === "InkWriting" ? "writing" : "drawing" }); } return results; } function convertTldrawInkFileDataToInkCanvas(inkFileData) { if (isInkCanvasFile(inkFileData)) return null; if (!inkFileData.tldraw || !inkFileData.meta) return null; const fileType = inkFileData.meta.fileType; if (fileType !== "inkWriting" && fileType !== "inkDrawing") return null; const tldrawSnapshot = inkFileData.tldraw; if (fileType === "inkWriting") { const fallbackLineHeight = inkFileData.meta.writingLineHeight ?? WRITING_LINE_HEIGHT; const inkCanvasSnapshot2 = migrateWritingFromTldraw(tldrawSnapshot, fallbackLineHeight); const svgString2 = renderWritingStrokesToSvg(inkCanvasSnapshot2.strokes, inkCanvasSnapshot2, WRITING_PAGE_WIDTH); const fileData2 = buildInkCanvasWritingFileData({ inkCanvasSnapshot: inkCanvasSnapshot2, svgString: svgString2 }); fileData2.meta.pluginVersion = PLUGIN_VERSION; if (inkFileData.meta.transcript) { fileData2.meta.transcript = inkFileData.meta.transcript; } if (inkCanvasSnapshot2.writingLineHeight != null) { fileData2.meta.writingLineHeight = inkCanvasSnapshot2.writingLineHeight; } return fileData2; } const inkCanvasSnapshot = migrateFromTldraw(tldrawSnapshot); const svgString = renderStrokesToSvg(inkCanvasSnapshot.strokes, inkCanvasSnapshot); const fileData = buildInkCanvasDrawingFileData({ inkCanvasSnapshot, svgString }); fileData.meta.pluginVersion = PLUGIN_VERSION; if (inkFileData.meta.transcript) { fileData.meta.transcript = inkFileData.meta.transcript; } return fileData; } function replaceV2DrawingEmbedLinesInMarkdown(markdown, svgPath, fittedSettings) { const escapedPath = svgPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); const lineRegex = new RegExp(` !\\[InkDrawing\\]\\(<${escapedPath}>\\) \\[Edit Drawing\\]\\(([^)]+)\\)`, "g"); return markdown.replace(lineRegex, (_match, urlPart) => { const { embedSettings: existing } = parseSettingsFromUrl(urlPart); const merged = { embedDisplay: { ...existing.embedDisplay }, viewBox: { ...fittedSettings.viewBox } }; const newLine = buildDrawingEmbed(svgPath, { embedSettings: merged }).trim(); return ` ${newLine}`; }); } async function isMigratableLegacyInkSvgFile(vault, file) { try { const svgString = await vault.read(file); if (sniffInkSvgFileType(svgString) == null) return false; const data = extractInkJsonFromSvg(svgString); return isMigratableLegacyInkFileData(data); } catch { return false; } } function isMigratableLegacyInkFileData(data) { if (!data || isInkCanvasFile(data)) return false; if (!data.tldraw || !data.meta) return false; const fileType = data.meta.fileType; return fileType === "inkWriting" || fileType === "inkDrawing"; } async function resolveTldrawSvgFileKind(vault, file) { try { const svgString = await vault.read(file); const inkFileData = extractInkJsonFromSvg(svgString); if (inkFileData?.meta.fileType === "inkWriting") return "writing"; if (inkFileData?.meta.fileType === "inkDrawing") return "drawing"; } catch { } return null; } function resolveEmbedPath(vault, resolveLinkPath, linkpath, sourceNotePath) { const normalized = (0, import_obsidian9.normalizePath)(linkpath); const resolved = resolveLinkPath(normalized, sourceNotePath); if (resolved) return resolved; const byPath = vault.getAbstractFileByPath(normalized); if (byPath instanceof import_obsidian9.TFile) return byPath.path; return null; } async function scanVaultForTldrawInkSvgFiles(vault, resolveLinkPath, onProgress) { const markdownFiles = vault.getMarkdownFiles(); const svgFiles = vault.getFiles().filter((file) => file.extension === "svg"); const total = markdownFiles.length + svgFiles.length; const fileMap = /* @__PURE__ */ new Map(); const affectedNoteSet = /* @__PURE__ */ new Map(); const pendingChecks = /* @__PURE__ */ new Map(); let scanned = 0; const report = () => onProgress?.(scanned, total, fileMap.size); for (const note of markdownFiles) { let content; try { content = await vault.read(note); } catch { scanned++; report(); continue; } const refs = findV2InkEmbedRefs(content); if (refs.length > 0) { affectedNoteSet.set(note.path, note); } for (const ref of refs) { const canonicalPath = resolveEmbedPath(vault, resolveLinkPath, ref.filepath, note.path); if (!canonicalPath) continue; if (!fileMap.has(canonicalPath)) { const svgFile = vault.getAbstractFileByPath(canonicalPath); if (!(svgFile instanceof import_obsidian9.TFile)) continue; let checkPromise = pendingChecks.get(canonicalPath); if (!checkPromise) { checkPromise = isMigratableLegacyInkSvgFile(vault, svgFile); pendingChecks.set(canonicalPath, checkPromise); } const isTldraw = await checkPromise; if (!isTldraw) continue; fileMap.set(canonicalPath, { svgFile, fileKind: ref.embedKind, newSvgPath: canonicalPath, referencingNotes: [] }); } const entry = fileMap.get(canonicalPath); if (entry && !entry.referencingNotes.some((n2) => n2.path === note.path)) { entry.referencingNotes.push(note); } } scanned++; report(); } for (const svgFile of svgFiles) { if (!fileMap.has(svgFile.path)) { let checkPromise = pendingChecks.get(svgFile.path); if (!checkPromise) { checkPromise = isMigratableLegacyInkSvgFile(vault, svgFile); pendingChecks.set(svgFile.path, checkPromise); } const isTldraw = await checkPromise; if (isTldraw) { const fileKind = await resolveTldrawSvgFileKind(vault, svgFile); if (fileKind) { fileMap.set(svgFile.path, { svgFile, fileKind, newSvgPath: svgFile.path, referencingNotes: [] }); } } } scanned++; report(); } return { tldrawSvgFiles: Array.from(fileMap.values()), affectedNotes: Array.from(affectedNoteSet.values()) }; } async function vaultNeedsInkFormatMigration(vault, resolveLinkPath) { if (vaultHasLegacyInkFiles(vault)) { return true; } const tldrawScan = await scanVaultForTldrawInkSvgFiles(vault, resolveLinkPath); return tldrawScan.tldrawSvgFiles.length > 0; } async function buildSingleTldrawSvgScanResult(vault, svgFile, resolveLinkPath) { const isTldraw = await isMigratableLegacyInkSvgFile(vault, svgFile); if (!isTldraw) return null; const referencingNotes = []; let fileKind = null; for (const note of vault.getMarkdownFiles()) { let content; try { content = await vault.read(note); } catch { continue; } for (const ref of findV2InkEmbedRefs(content)) { const canonicalPath = resolveEmbedPath(vault, resolveLinkPath, ref.filepath, note.path); if (canonicalPath !== svgFile.path) continue; referencingNotes.push(note); fileKind = ref.embedKind; break; } } if (!fileKind) { const svgString = await vault.read(svgFile); const inkFileData = extractInkJsonFromSvg(svgString); if (inkFileData?.meta.fileType === "inkWriting") fileKind = "writing"; else if (inkFileData?.meta.fileType === "inkDrawing") fileKind = "drawing"; } if (!fileKind) return null; return { tldrawSvgFiles: [{ svgFile, fileKind, newSvgPath: svgFile.path, referencingNotes }], affectedNotes: referencingNotes }; } async function executeTldrawSvgMigration(vault, scanResult, onProgress) { const result = { convertedFiles: 0, updatedNotes: 0, updatedNotePaths: [], skipped: [], failed: [] }; const drawingEmbedSettingsBySvgPath = /* @__PURE__ */ new Map(); const convertedPaths = /* @__PURE__ */ new Set(); const total = scanResult.tldrawSvgFiles.length + scanResult.affectedNotes.length; let done = 0; const reportProgress = () => { onProgress?.(done, total, { convertedFiles: result.convertedFiles, skippedCount: result.skipped.length, failedCount: result.failed.length }); }; logToVault("Tldraw SVG migration started. Files: " + scanResult.tldrawSvgFiles.length + ", Notes: " + scanResult.affectedNotes.length); for (const entry of scanResult.tldrawSvgFiles) { try { const svgString = await vault.read(entry.svgFile); const inkFileData = extractInkJsonFromSvg(svgString); if (!inkFileData) { result.skipped.push(entry.svgFile.path + " (no ink JSON)"); done++; reportProgress(); continue; } const converted = convertTldrawInkFileDataToInkCanvas(inkFileData); if (!converted) { result.skipped.push(entry.svgFile.path + " (already ink-canvas or not tldraw)"); done++; reportProgress(); continue; } if (entry.fileKind === "drawing" && converted.inkCanvas) { const embedSettings = buildDrawingEmbedSettingsFromStrokes(converted.inkCanvas.strokes); if (embedSettings) { drawingEmbedSettingsBySvgPath.set(entry.newSvgPath, embedSettings); } } const out = buildFileStr(converted); await vault.modify(entry.svgFile, out); convertedPaths.add(entry.newSvgPath); result.convertedFiles++; } catch (err) { const errMessage = err instanceof Error ? err.message : String(err); logToVault("Tldraw SVG migration file error: " + entry.svgFile.path + " \u2013 " + errMessage); result.failed.push(entry.svgFile.path + ": " + errMessage); } done++; reportProgress(); } for (const note of scanResult.affectedNotes) { try { let content = await vault.read(note); let modified = false; for (const [svgPath, embedSettings] of drawingEmbedSettingsBySvgPath) { if (!convertedPaths.has(svgPath)) continue; const updated = replaceV2DrawingEmbedLinesInMarkdown(content, svgPath, embedSettings); if (updated !== content) { content = updated; modified = true; } } if (modified) { await vault.modify(note, content); result.updatedNotes++; result.updatedNotePaths.push(note.path); } } catch (err) { const errMessage = err instanceof Error ? err.message : String(err); result.failed.push(note.path + ": " + errMessage); } done++; reportProgress(); } logToVault("Tldraw SVG migration complete. Converted: " + result.convertedFiles + ", Notes updated: " + result.updatedNotes); return result; } var import_obsidian9, V2_EMBED_PATH_REGEX; var init_tldraw_svg_migration_logic = __esm({ "src/logic/utils/tldraw-svg-migration-logic.ts"() { import_obsidian9 = require("obsidian"); init_constants(); init_log_to_vault(); init_ink_file_storage_engine(); init_build_file_data(); init_buildFileStr(); init_build_embeds(); init_parse_settings_from_url(); init_build_drawing_embed_settings_from_file(); init_extractInkJsonFromSvg(); init_migrate_from_tldraw(); init_svg_export(); init_migration_logic(); V2_EMBED_PATH_REGEX = /!\[(InkWriting|InkDrawing)\]\(<([^>]+)>\)/g; } }); // src/logic/utils/storage.ts function localStorageKey(storageSuffix) { return `${LOCAL_STORAGE_PREFIX}${storageSuffix}`; } var ACTIVATE_NEXT_EMBED_STORAGE_SUFFIX, RECENT_DRAWING_FILE_PATHS_STORAGE_SUFFIX, RECENT_WRITING_FILE_PATHS_STORAGE_SUFFIX, vaultKeyedStorage, saveLocally, fetchLocally, deleteLocally, activateNextEmbed, embedShouldActivateImmediately, RECENT_PATHS_MAX_LENGTH, fetchRecentFilePaths, recordRecentFileSelection; var init_storage = __esm({ "src/logic/utils/storage.ts"() { init_constants(); ACTIVATE_NEXT_EMBED_STORAGE_SUFFIX = "activateNextEmbed"; RECENT_DRAWING_FILE_PATHS_STORAGE_SUFFIX = "recentDrawingFilePaths"; RECENT_WRITING_FILE_PATHS_STORAGE_SUFFIX = "recentWritingFilePaths"; vaultKeyedStorage = () => window.activeWindow.localStorage; saveLocally = (key, value) => { if (typeof value === "boolean") { value = value.toString(); } vaultKeyedStorage().setItem(localStorageKey(key), value); }; fetchLocally = (key) => { let value = vaultKeyedStorage().getItem(localStorageKey(key)); if (value === null) return null; if (value === "true") value = true; if (value === "false") value = false; return value; }; deleteLocally = (key) => { vaultKeyedStorage().removeItem(localStorageKey(key)); }; activateNextEmbed = () => { saveLocally(ACTIVATE_NEXT_EMBED_STORAGE_SUFFIX, true); }; embedShouldActivateImmediately = () => { const result = fetchLocally(ACTIVATE_NEXT_EMBED_STORAGE_SUFFIX); deleteLocally(ACTIVATE_NEXT_EMBED_STORAGE_SUFFIX); return result; }; RECENT_PATHS_MAX_LENGTH = 10; fetchRecentFilePaths = (fileType) => { const key = fileType === "inkDrawing" ? RECENT_DRAWING_FILE_PATHS_STORAGE_SUFFIX : RECENT_WRITING_FILE_PATHS_STORAGE_SUFFIX; const raw = fetchLocally(key); if (typeof raw !== "string") return []; try { const parsedUnknown = JSON.parse(raw); if (!Array.isArray(parsedUnknown)) return []; return parsedUnknown.filter((item) => typeof item === "string").slice(0, RECENT_PATHS_MAX_LENGTH); } catch { return []; } }; recordRecentFileSelection = (fileType, filepath) => { const key = fileType === "inkDrawing" ? RECENT_DRAWING_FILE_PATHS_STORAGE_SUFFIX : RECENT_WRITING_FILE_PATHS_STORAGE_SUFFIX; const current = fetchRecentFilePaths(fileType); const deduped = [filepath, ...current.filter((path) => path !== filepath)]; const trimmed = deduped.slice(0, RECENT_PATHS_MAX_LENGTH); saveLocally(key, JSON.stringify(trimmed)); }; } }); // src/logic/device-settings/device-settings-defaults.ts var DEVICE_SETTINGS_STORAGE_KEY, DEFAULT_DEVICE_SETTINGS_V1; var init_device_settings_defaults = __esm({ "src/logic/device-settings/device-settings-defaults.ts"() { init_constants(); DEVICE_SETTINGS_STORAGE_KEY = "deviceSettings_v1"; DEFAULT_DEVICE_SETTINGS_V1 = { pluginVersion: PLUGIN_VERSION, booxConnectionEnabled: false, fingerDrawingEnabled: false, strokeInputTreatAs: { inkWriting: "auto", inkDrawing: "auto" }, lastDetectedStrokeInput: null }; } }); // src/logic/device-settings/device-settings.ts function isStrokeInputTreatAs(value) { return value === "auto" || value === "pen" || value === "mouse"; } function isResolvedStrokeInputTreatAs(value) { return value === "pen" || value === "mouse"; } function isLastDetectedStrokeInput(value) { return value === null || isResolvedStrokeInputTreatAs(value); } function isDeviceSettingsV1(value) { if (!value || typeof value !== "object") return false; const o2 = value; if (typeof o2.pluginVersion !== "string") return false; const treat = o2.strokeInputTreatAs; if (!treat || typeof treat !== "object") return false; const t3 = treat; return isStrokeInputTreatAs(t3.inkWriting) && isStrokeInputTreatAs(t3.inkDrawing); } function mergeWithDefaults(partial) { const base = DEFAULT_DEVICE_SETTINGS_V1; if (!isDeviceSettingsV1(partial)) { return { ...base, strokeInputTreatAs: { ...base.strokeInputTreatAs }, lastDetectedStrokeInput: base.lastDetectedStrokeInput }; } const lastDetected = isLastDetectedStrokeInput(partial.lastDetectedStrokeInput) ? partial.lastDetectedStrokeInput : base.lastDetectedStrokeInput; const booxConnectionEnabled = typeof partial.booxConnectionEnabled === "boolean" ? partial.booxConnectionEnabled : base.booxConnectionEnabled; const fingerDrawingEnabled = typeof partial.fingerDrawingEnabled === "boolean" ? partial.fingerDrawingEnabled : base.fingerDrawingEnabled; return { pluginVersion: PLUGIN_VERSION, booxConnectionEnabled, fingerDrawingEnabled, strokeInputTreatAs: { inkWriting: partial.strokeInputTreatAs.inkWriting, inkDrawing: partial.strokeInputTreatAs.inkDrawing }, lastDetectedStrokeInput: lastDetected }; } function shouldPersistPluginVersion(stored) { if (!stored || typeof stored !== "object") return false; return stored.pluginVersion !== PLUGIN_VERSION; } function readDeviceSettings() { const raw = fetchLocally(DEVICE_SETTINGS_STORAGE_KEY); if (typeof raw !== "string") return mergeWithDefaults(null); try { const parsed = JSON.parse(raw); const merged = mergeWithDefaults(parsed); if (shouldPersistPluginVersion(parsed)) { writeDeviceSettings(merged); } return merged; } catch { return mergeWithDefaults(null); } } function writeDeviceSettings(settings) { const toStore = { ...settings, pluginVersion: PLUGIN_VERSION }; saveLocally(DEVICE_SETTINGS_STORAGE_KEY, JSON.stringify(toStore)); notifyDeviceSettingsChanged(); } function notifyDeviceSettingsChanged() { window.dispatchEvent(new CustomEvent(DEVICE_SETTINGS_CHANGED_EVENT)); } function patchDeviceSettings(partial) { const current = readDeviceSettings(); const next = { ...current, ...partial, strokeInputTreatAs: { ...current.strokeInputTreatAs, ...partial.strokeInputTreatAs ?? {} }, lastDetectedStrokeInput: partial.lastDetectedStrokeInput === void 0 ? current.lastDetectedStrokeInput : partial.lastDetectedStrokeInput }; writeDeviceSettings(next); return next; } function getBooxConnectionEnabled() { return readDeviceSettings().booxConnectionEnabled; } function setBooxConnectionEnabled(enabled) { patchDeviceSettings({ booxConnectionEnabled: enabled }); } function resetBooxConnectionToDefault() { setBooxConnectionEnabled(DEFAULT_DEVICE_SETTINGS_V1.booxConnectionEnabled); } function getFingerDrawingEnabled() { return readDeviceSettings().fingerDrawingEnabled; } function setFingerDrawingEnabled(enabled) { patchDeviceSettings({ fingerDrawingEnabled: enabled }); } function resetFingerDrawingToDefault() { setFingerDrawingEnabled(DEFAULT_DEVICE_SETTINGS_V1.fingerDrawingEnabled); } function deviceStorageAlreadyHasBooxField() { const raw = fetchLocally(DEVICE_SETTINGS_STORAGE_KEY); if (typeof raw !== "string") return false; try { const parsed = JSON.parse(raw); return !!parsed && typeof parsed === "object" && "booxConnectionEnabled" in parsed; } catch { return false; } } function migrateBooxConnectionFromVaultToDevice(vaultPluginData) { if (!vaultPluginData || deviceStorageAlreadyHasBooxField()) return false; let vaultValue; if (typeof vaultPluginData.booxConnectionEnabled === "boolean") { vaultValue = vaultPluginData.booxConnectionEnabled; } else if (typeof vaultPluginData.einkBridgeEnabled === "boolean") { vaultValue = vaultPluginData.einkBridgeEnabled; } if (vaultValue === void 0) return false; setBooxConnectionEnabled(vaultValue); return true; } function getStrokeInputTreatAs(editorKind) { return readDeviceSettings().strokeInputTreatAs[editorKind]; } function setStrokeInputTreatAs(editorKind, value) { patchDeviceSettings({ strokeInputTreatAs: { ...readDeviceSettings().strokeInputTreatAs, [editorKind]: value } }); } function getLastDetectedStrokeInput() { return readDeviceSettings().lastDetectedStrokeInput; } function setLastDetectedStrokeInput(value) { patchDeviceSettings({ lastDetectedStrokeInput: value }); } function resolveStrokeInputTreatAs(preference, lastDetected) { if (preference === "pen") return "pen"; if (preference === "mouse") return "mouse"; return lastDetected ?? "mouse"; } function subscribeDeviceSettingsChanged(onChange) { const wrapped = () => { onChange(); }; window.addEventListener(DEVICE_SETTINGS_CHANGED_EVENT, wrapped); window.addEventListener("storage", wrapped); return () => { window.removeEventListener(DEVICE_SETTINGS_CHANGED_EVENT, wrapped); window.removeEventListener("storage", wrapped); }; } var DEVICE_SETTINGS_CHANGED_EVENT; var init_device_settings = __esm({ "src/logic/device-settings/device-settings.ts"() { init_constants(); init_storage(); init_device_settings_defaults(); DEVICE_SETTINGS_CHANGED_EVENT = "ddc-ink-device-settings-changed"; } }); // node_modules/scheduler/cjs/scheduler.production.min.js var require_scheduler_production_min = __commonJS({ "node_modules/scheduler/cjs/scheduler.production.min.js"(exports) { "use strict"; function f2(a2, b2) { var c2 = a2.length; a2.push(b2); a: for (; 0 < c2; ) { var d2 = c2 - 1 >>> 1, e2 = a2[d2]; if (0 < g2(e2, b2)) a2[d2] = b2, a2[c2] = e2, c2 = d2; else break a; } } function h2(a2) { return a2.length === 0 ? null : a2[0]; } function k2(a2) { if (a2.length === 0) return null; var b2 = a2[0], c2 = a2.pop(); if (c2 !== b2) { a2[0] = c2; a: for (var d2 = 0, e2 = a2.length, w2 = e2 >>> 1; d2 < w2; ) { var m2 = 2 * (d2 + 1) - 1, C2 = a2[m2], n2 = m2 + 1, x2 = a2[n2]; if (0 > g2(C2, c2)) n2 < e2 && 0 > g2(x2, C2) ? (a2[d2] = x2, a2[n2] = c2, d2 = n2) : (a2[d2] = C2, a2[m2] = c2, d2 = m2); else if (n2 < e2 && 0 > g2(x2, c2)) a2[d2] = x2, a2[n2] = c2, d2 = n2; else break a; } } return b2; } function g2(a2, b2) { var c2 = a2.sortIndex - b2.sortIndex; return c2 !== 0 ? c2 : a2.id - b2.id; } if (typeof performance === "object" && typeof performance.now === "function") { l2 = performance; exports.unstable_now = function() { return l2.now(); }; } else { p2 = Date, q = p2.now(); exports.unstable_now = function() { return p2.now() - q; }; } var l2; var p2; var q; var r2 = []; var t3 = []; var u2 = 1; var v2 = null; var y2 = 3; var z = false; var A2 = false; var B = false; var D2 = typeof setTimeout === "function" ? setTimeout : null; var E2 = typeof clearTimeout === "function" ? clearTimeout : null; var F2 = typeof setImmediate !== "undefined" ? setImmediate : null; typeof navigator !== "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling); function G(a2) { for (var b2 = h2(t3); b2 !== null; ) { if (b2.callback === null) k2(t3); else if (b2.startTime <= a2) k2(t3), b2.sortIndex = b2.expirationTime, f2(r2, b2); else break; b2 = h2(t3); } } function H(a2) { B = false; G(a2); if (!A2) if (h2(r2) !== null) A2 = true, I2(J); else { var b2 = h2(t3); b2 !== null && K(H, b2.startTime - a2); } } function J(a2, b2) { A2 = false; B && (B = false, E2(L2), L2 = -1); z = true; var c2 = y2; try { G(b2); for (v2 = h2(r2); v2 !== null && (!(v2.expirationTime > b2) || a2 && !M2()); ) { var d2 = v2.callback; if (typeof d2 === "function") { v2.callback = null; y2 = v2.priorityLevel; var e2 = d2(v2.expirationTime <= b2); b2 = exports.unstable_now(); typeof e2 === "function" ? v2.callback = e2 : v2 === h2(r2) && k2(r2); G(b2); } else k2(r2); v2 = h2(r2); } if (v2 !== null) var w2 = true; else { var m2 = h2(t3); m2 !== null && K(H, m2.startTime - b2); w2 = false; } return w2; } finally { v2 = null, y2 = c2, z = false; } } var N2 = false; var O2 = null; var L2 = -1; var P2 = 5; var Q = -1; function M2() { return exports.unstable_now() - Q < P2 ? false : true; } function R2() { if (O2 !== null) { var a2 = exports.unstable_now(); Q = a2; var b2 = true; try { b2 = O2(true, a2); } finally { b2 ? S2() : (N2 = false, O2 = null); } } else N2 = false; } var S2; if (typeof F2 === "function") S2 = function() { F2(R2); }; else if (typeof MessageChannel !== "undefined") { T2 = new MessageChannel(), U = T2.port2; T2.port1.onmessage = R2; S2 = function() { U.postMessage(null); }; } else S2 = function() { D2(R2, 0); }; var T2; var U; function I2(a2) { O2 = a2; N2 || (N2 = true, S2()); } function K(a2, b2) { L2 = D2(function() { a2(exports.unstable_now()); }, b2); } exports.unstable_IdlePriority = 5; exports.unstable_ImmediatePriority = 1; exports.unstable_LowPriority = 4; exports.unstable_NormalPriority = 3; exports.unstable_Profiling = null; exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function(a2) { a2.callback = null; }; exports.unstable_continueExecution = function() { A2 || z || (A2 = true, I2(J)); }; exports.unstable_forceFrameRate = function(a2) { 0 > a2 || 125 < a2 ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P2 = 0 < a2 ? Math.floor(1e3 / a2) : 5; }; exports.unstable_getCurrentPriorityLevel = function() { return y2; }; exports.unstable_getFirstCallbackNode = function() { return h2(r2); }; exports.unstable_next = function(a2) { switch (y2) { case 1: case 2: case 3: var b2 = 3; break; default: b2 = y2; } var c2 = y2; y2 = b2; try { return a2(); } finally { y2 = c2; } }; exports.unstable_pauseExecution = function() { }; exports.unstable_requestPaint = function() { }; exports.unstable_runWithPriority = function(a2, b2) { switch (a2) { case 1: case 2: case 3: case 4: case 5: break; default: a2 = 3; } var c2 = y2; y2 = a2; try { return b2(); } finally { y2 = c2; } }; exports.unstable_scheduleCallback = function(a2, b2, c2) { var d2 = exports.unstable_now(); typeof c2 === "object" && c2 !== null ? (c2 = c2.delay, c2 = typeof c2 === "number" && 0 < c2 ? d2 + c2 : d2) : c2 = d2; switch (a2) { case 1: var e2 = -1; break; case 2: e2 = 250; break; case 5: e2 = 1073741823; break; case 4: e2 = 1e4; break; default: e2 = 5e3; } e2 = c2 + e2; a2 = { id: u2++, callback: b2, priorityLevel: a2, startTime: c2, expirationTime: e2, sortIndex: -1 }; c2 > d2 ? (a2.sortIndex = c2, f2(t3, a2), h2(r2) === null && a2 === h2(t3) && (B ? (E2(L2), L2 = -1) : B = true, K(H, c2 - d2))) : (a2.sortIndex = e2, f2(r2, a2), A2 || z || (A2 = true, I2(J))); return a2; }; exports.unstable_shouldYield = M2; exports.unstable_wrapCallback = function(a2) { var b2 = y2; return function() { var c2 = y2; y2 = b2; try { return a2.apply(this, arguments); } finally { y2 = c2; } }; }; } }); // node_modules/scheduler/index.js var require_scheduler = __commonJS({ "node_modules/scheduler/index.js"(exports, module2) { "use strict"; if (true) { module2.exports = require_scheduler_production_min(); } else { module2.exports = null; } } }); // node_modules/react-dom/cjs/react-dom.production.min.js var require_react_dom_production_min = __commonJS({ "node_modules/react-dom/cjs/react-dom.production.min.js"(exports) { "use strict"; var aa = require_react(); var ca = require_scheduler(); function p2(a2) { for (var b2 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a2, c2 = 1; c2 < arguments.length; c2++) b2 += "&args[]=" + encodeURIComponent(arguments[c2]); return "Minified React error #" + a2 + "; visit " + b2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } var da = /* @__PURE__ */ new Set(); var ea = {}; function fa(a2, b2) { ha(a2, b2); ha(a2 + "Capture", b2); } function ha(a2, b2) { ea[a2] = b2; for (a2 = 0; a2 < b2.length; a2++) da.add(b2[a2]); } var ia = !(typeof window === "undefined" || typeof window.document === "undefined" || typeof window.document.createElement === "undefined"); var ja = Object.prototype.hasOwnProperty; var ka = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/; var la = {}; var ma = {}; function oa(a2) { if (ja.call(ma, a2)) return true; if (ja.call(la, a2)) return false; if (ka.test(a2)) return ma[a2] = true; la[a2] = true; return false; } function pa(a2, b2, c2, d2) { if (c2 !== null && c2.type === 0) return false; switch (typeof b2) { case "function": case "symbol": return true; case "boolean": if (d2) return false; if (c2 !== null) return !c2.acceptsBooleans; a2 = a2.toLowerCase().slice(0, 5); return a2 !== "data-" && a2 !== "aria-"; default: return false; } } function qa(a2, b2, c2, d2) { if (b2 === null || typeof b2 === "undefined" || pa(a2, b2, c2, d2)) return true; if (d2) return false; if (c2 !== null) switch (c2.type) { case 3: return !b2; case 4: return b2 === false; case 5: return isNaN(b2); case 6: return isNaN(b2) || 1 > b2; } return false; } function v2(a2, b2, c2, d2, e2, f2, g2) { this.acceptsBooleans = b2 === 2 || b2 === 3 || b2 === 4; this.attributeName = d2; this.attributeNamespace = e2; this.mustUseProperty = c2; this.propertyName = a2; this.type = b2; this.sanitizeURL = f2; this.removeEmptyString = g2; } var z = {}; "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a2) { z[a2] = new v2(a2, 0, false, a2, null, false, false); }); [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a2) { var b2 = a2[0]; z[b2] = new v2(b2, 1, false, a2[1], null, false, false); }); ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a2) { z[a2] = new v2(a2, 2, false, a2.toLowerCase(), null, false, false); }); ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a2) { z[a2] = new v2(a2, 2, false, a2, null, false, false); }); "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a2) { z[a2] = new v2(a2, 3, false, a2.toLowerCase(), null, false, false); }); ["checked", "multiple", "muted", "selected"].forEach(function(a2) { z[a2] = new v2(a2, 3, true, a2, null, false, false); }); ["capture", "download"].forEach(function(a2) { z[a2] = new v2(a2, 4, false, a2, null, false, false); }); ["cols", "rows", "size", "span"].forEach(function(a2) { z[a2] = new v2(a2, 6, false, a2, null, false, false); }); ["rowSpan", "start"].forEach(function(a2) { z[a2] = new v2(a2, 5, false, a2.toLowerCase(), null, false, false); }); var ra = /[\-:]([a-z])/g; function sa(a2) { return a2[1].toUpperCase(); } "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a2) { var b2 = a2.replace(ra, sa); z[b2] = new v2(b2, 1, false, a2, null, false, false); }); "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a2) { var b2 = a2.replace(ra, sa); z[b2] = new v2(b2, 1, false, a2, "http://www.w3.org/1999/xlink", false, false); }); ["xml:base", "xml:lang", "xml:space"].forEach(function(a2) { var b2 = a2.replace(ra, sa); z[b2] = new v2(b2, 1, false, a2, "http://www.w3.org/XML/1998/namespace", false, false); }); ["tabIndex", "crossOrigin"].forEach(function(a2) { z[a2] = new v2(a2, 1, false, a2.toLowerCase(), null, false, false); }); z.xlinkHref = new v2("xlinkHref", 1, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false); ["src", "href", "action", "formAction"].forEach(function(a2) { z[a2] = new v2(a2, 1, false, a2.toLowerCase(), null, true, true); }); function ta(a2, b2, c2, d2) { var e2 = z.hasOwnProperty(b2) ? z[b2] : null; if (e2 !== null ? e2.type !== 0 : d2 || !(2 < b2.length) || b2[0] !== "o" && b2[0] !== "O" || b2[1] !== "n" && b2[1] !== "N") qa(b2, c2, e2, d2) && (c2 = null), d2 || e2 === null ? oa(b2) && (c2 === null ? a2.removeAttribute(b2) : a2.setAttribute(b2, "" + c2)) : e2.mustUseProperty ? a2[e2.propertyName] = c2 === null ? e2.type === 3 ? false : "" : c2 : (b2 = e2.attributeName, d2 = e2.attributeNamespace, c2 === null ? a2.removeAttribute(b2) : (e2 = e2.type, c2 = e2 === 3 || e2 === 4 && c2 === true ? "" : "" + c2, d2 ? a2.setAttributeNS(d2, b2, c2) : a2.setAttribute(b2, c2))); } var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var va = Symbol.for("react.element"); var wa = Symbol.for("react.portal"); var ya = Symbol.for("react.fragment"); var za = Symbol.for("react.strict_mode"); var Aa = Symbol.for("react.profiler"); var Ba = Symbol.for("react.provider"); var Ca = Symbol.for("react.context"); var Da = Symbol.for("react.forward_ref"); var Ea = Symbol.for("react.suspense"); var Fa = Symbol.for("react.suspense_list"); var Ga = Symbol.for("react.memo"); var Ha = Symbol.for("react.lazy"); Symbol.for("react.scope"); Symbol.for("react.debug_trace_mode"); var Ia = Symbol.for("react.offscreen"); Symbol.for("react.legacy_hidden"); Symbol.for("react.cache"); Symbol.for("react.tracing_marker"); var Ja = Symbol.iterator; function Ka(a2) { if (a2 === null || typeof a2 !== "object") return null; a2 = Ja && a2[Ja] || a2["@@iterator"]; return typeof a2 === "function" ? a2 : null; } var A2 = Object.assign; var La; function Ma(a2) { if (La === void 0) try { throw Error(); } catch (c2) { var b2 = c2.stack.trim().match(/\n( *(at )?)/); La = b2 && b2[1] || ""; } return "\n" + La + a2; } var Na = false; function Oa(a2, b2) { if (!a2 || Na) return ""; Na = true; var c2 = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { if (b2) if (b2 = function() { throw Error(); }, Object.defineProperty(b2.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect === "object" && Reflect.construct) { try { Reflect.construct(b2, []); } catch (l2) { var d2 = l2; } Reflect.construct(a2, [], b2); } else { try { b2.call(); } catch (l2) { d2 = l2; } a2.call(b2.prototype); } else { try { throw Error(); } catch (l2) { d2 = l2; } a2(); } } catch (l2) { if (l2 && d2 && typeof l2.stack === "string") { for (var e2 = l2.stack.split("\n"), f2 = d2.stack.split("\n"), g2 = e2.length - 1, h2 = f2.length - 1; 1 <= g2 && 0 <= h2 && e2[g2] !== f2[h2]; ) h2--; for (; 1 <= g2 && 0 <= h2; g2--, h2--) if (e2[g2] !== f2[h2]) { if (g2 !== 1 || h2 !== 1) { do if (g2--, h2--, 0 > h2 || e2[g2] !== f2[h2]) { var k2 = "\n" + e2[g2].replace(" at new ", " at "); a2.displayName && k2.includes("") && (k2 = k2.replace("", a2.displayName)); return k2; } while (1 <= g2 && 0 <= h2); } break; } } } finally { Na = false, Error.prepareStackTrace = c2; } return (a2 = a2 ? a2.displayName || a2.name : "") ? Ma(a2) : ""; } function Pa(a2) { switch (a2.tag) { case 5: return Ma(a2.type); case 16: return Ma("Lazy"); case 13: return Ma("Suspense"); case 19: return Ma("SuspenseList"); case 0: case 2: case 15: return a2 = Oa(a2.type, false), a2; case 11: return a2 = Oa(a2.type.render, false), a2; case 1: return a2 = Oa(a2.type, true), a2; default: return ""; } } function Qa(a2) { if (a2 == null) return null; if (typeof a2 === "function") return a2.displayName || a2.name || null; if (typeof a2 === "string") return a2; switch (a2) { case ya: return "Fragment"; case wa: return "Portal"; case Aa: return "Profiler"; case za: return "StrictMode"; case Ea: return "Suspense"; case Fa: return "SuspenseList"; } if (typeof a2 === "object") switch (a2.$$typeof) { case Ca: return (a2.displayName || "Context") + ".Consumer"; case Ba: return (a2._context.displayName || "Context") + ".Provider"; case Da: var b2 = a2.render; a2 = a2.displayName; a2 || (a2 = b2.displayName || b2.name || "", a2 = a2 !== "" ? "ForwardRef(" + a2 + ")" : "ForwardRef"); return a2; case Ga: return b2 = a2.displayName || null, b2 !== null ? b2 : Qa(a2.type) || "Memo"; case Ha: b2 = a2._payload; a2 = a2._init; try { return Qa(a2(b2)); } catch (c2) { } } return null; } function Ra(a2) { var b2 = a2.type; switch (a2.tag) { case 24: return "Cache"; case 9: return (b2.displayName || "Context") + ".Consumer"; case 10: return (b2._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: return a2 = b2.render, a2 = a2.displayName || a2.name || "", b2.displayName || (a2 !== "" ? "ForwardRef(" + a2 + ")" : "ForwardRef"); case 7: return "Fragment"; case 5: return b2; case 4: return "Portal"; case 3: return "Root"; case 6: return "Text"; case 16: return Qa(b2); case 8: return b2 === za ? "StrictMode" : "Mode"; case 22: return "Offscreen"; case 12: return "Profiler"; case 21: return "Scope"; case 13: return "Suspense"; case 19: return "SuspenseList"; case 25: return "TracingMarker"; case 1: case 0: case 17: case 2: case 14: case 15: if (typeof b2 === "function") return b2.displayName || b2.name || null; if (typeof b2 === "string") return b2; } return null; } function Sa(a2) { switch (typeof a2) { case "boolean": case "number": case "string": case "undefined": return a2; case "object": return a2; default: return ""; } } function Ta(a2) { var b2 = a2.type; return (a2 = a2.nodeName) && a2.toLowerCase() === "input" && (b2 === "checkbox" || b2 === "radio"); } function Ua(a2) { var b2 = Ta(a2) ? "checked" : "value", c2 = Object.getOwnPropertyDescriptor(a2.constructor.prototype, b2), d2 = "" + a2[b2]; if (!a2.hasOwnProperty(b2) && typeof c2 !== "undefined" && typeof c2.get === "function" && typeof c2.set === "function") { var e2 = c2.get, f2 = c2.set; Object.defineProperty(a2, b2, { configurable: true, get: function() { return e2.call(this); }, set: function(a3) { d2 = "" + a3; f2.call(this, a3); } }); Object.defineProperty(a2, b2, { enumerable: c2.enumerable }); return { getValue: function() { return d2; }, setValue: function(a3) { d2 = "" + a3; }, stopTracking: function() { a2._valueTracker = null; delete a2[b2]; } }; } } function Va(a2) { a2._valueTracker || (a2._valueTracker = Ua(a2)); } function Wa(a2) { if (!a2) return false; var b2 = a2._valueTracker; if (!b2) return true; var c2 = b2.getValue(); var d2 = ""; a2 && (d2 = Ta(a2) ? a2.checked ? "true" : "false" : a2.value); a2 = d2; return a2 !== c2 ? (b2.setValue(a2), true) : false; } function Xa(a2) { a2 = a2 || (typeof document !== "undefined" ? document : void 0); if (typeof a2 === "undefined") return null; try { return a2.activeElement || a2.body; } catch (b2) { return a2.body; } } function Ya(a2, b2) { var c2 = b2.checked; return A2({}, b2, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: c2 != null ? c2 : a2._wrapperState.initialChecked }); } function Za(a2, b2) { var c2 = b2.defaultValue == null ? "" : b2.defaultValue, d2 = b2.checked != null ? b2.checked : b2.defaultChecked; c2 = Sa(b2.value != null ? b2.value : c2); a2._wrapperState = { initialChecked: d2, initialValue: c2, controlled: b2.type === "checkbox" || b2.type === "radio" ? b2.checked != null : b2.value != null }; } function ab(a2, b2) { b2 = b2.checked; b2 != null && ta(a2, "checked", b2, false); } function bb(a2, b2) { ab(a2, b2); var c2 = Sa(b2.value), d2 = b2.type; if (c2 != null) if (d2 === "number") { if (c2 === 0 && a2.value === "" || a2.value != c2) a2.value = "" + c2; } else a2.value !== "" + c2 && (a2.value = "" + c2); else if (d2 === "submit" || d2 === "reset") { a2.removeAttribute("value"); return; } b2.hasOwnProperty("value") ? cb(a2, b2.type, c2) : b2.hasOwnProperty("defaultValue") && cb(a2, b2.type, Sa(b2.defaultValue)); b2.checked == null && b2.defaultChecked != null && (a2.defaultChecked = !!b2.defaultChecked); } function db(a2, b2, c2) { if (b2.hasOwnProperty("value") || b2.hasOwnProperty("defaultValue")) { var d2 = b2.type; if (!(d2 !== "submit" && d2 !== "reset" || b2.value !== void 0 && b2.value !== null)) return; b2 = "" + a2._wrapperState.initialValue; c2 || b2 === a2.value || (a2.value = b2); a2.defaultValue = b2; } c2 = a2.name; c2 !== "" && (a2.name = ""); a2.defaultChecked = !!a2._wrapperState.initialChecked; c2 !== "" && (a2.name = c2); } function cb(a2, b2, c2) { if (b2 !== "number" || Xa(a2.ownerDocument) !== a2) c2 == null ? a2.defaultValue = "" + a2._wrapperState.initialValue : a2.defaultValue !== "" + c2 && (a2.defaultValue = "" + c2); } var eb = Array.isArray; function fb(a2, b2, c2, d2) { a2 = a2.options; if (b2) { b2 = {}; for (var e2 = 0; e2 < c2.length; e2++) b2["$" + c2[e2]] = true; for (c2 = 0; c2 < a2.length; c2++) e2 = b2.hasOwnProperty("$" + a2[c2].value), a2[c2].selected !== e2 && (a2[c2].selected = e2), e2 && d2 && (a2[c2].defaultSelected = true); } else { c2 = "" + Sa(c2); b2 = null; for (e2 = 0; e2 < a2.length; e2++) { if (a2[e2].value === c2) { a2[e2].selected = true; d2 && (a2[e2].defaultSelected = true); return; } b2 !== null || a2[e2].disabled || (b2 = a2[e2]); } b2 !== null && (b2.selected = true); } } function gb(a2, b2) { if (b2.dangerouslySetInnerHTML != null) throw Error(p2(91)); return A2({}, b2, { value: void 0, defaultValue: void 0, children: "" + a2._wrapperState.initialValue }); } function hb(a2, b2) { var c2 = b2.value; if (c2 == null) { c2 = b2.children; b2 = b2.defaultValue; if (c2 != null) { if (b2 != null) throw Error(p2(92)); if (eb(c2)) { if (1 < c2.length) throw Error(p2(93)); c2 = c2[0]; } b2 = c2; } b2 == null && (b2 = ""); c2 = b2; } a2._wrapperState = { initialValue: Sa(c2) }; } function ib(a2, b2) { var c2 = Sa(b2.value), d2 = Sa(b2.defaultValue); c2 != null && (c2 = "" + c2, c2 !== a2.value && (a2.value = c2), b2.defaultValue == null && a2.defaultValue !== c2 && (a2.defaultValue = c2)); d2 != null && (a2.defaultValue = "" + d2); } function jb(a2) { var b2 = a2.textContent; b2 === a2._wrapperState.initialValue && b2 !== "" && b2 !== null && (a2.value = b2); } function kb(a2) { switch (a2) { case "svg": return "http://www.w3.org/2000/svg"; case "math": return "http://www.w3.org/1998/Math/MathML"; default: return "http://www.w3.org/1999/xhtml"; } } function lb(a2, b2) { return a2 == null || a2 === "http://www.w3.org/1999/xhtml" ? kb(b2) : a2 === "http://www.w3.org/2000/svg" && b2 === "foreignObject" ? "http://www.w3.org/1999/xhtml" : a2; } var mb; var nb = function(a2) { return typeof MSApp !== "undefined" && MSApp.execUnsafeLocalFunction ? function(b2, c2, d2, e2) { MSApp.execUnsafeLocalFunction(function() { return a2(b2, c2, d2, e2); }); } : a2; }(function(a2, b2) { if (a2.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in a2) a2.innerHTML = b2; else { mb = mb || document.createElement("div"); mb.innerHTML = "" + b2.valueOf().toString() + ""; for (b2 = mb.firstChild; a2.firstChild; ) a2.removeChild(a2.firstChild); for (; b2.firstChild; ) a2.appendChild(b2.firstChild); } }); function ob(a2, b2) { if (b2) { var c2 = a2.firstChild; if (c2 && c2 === a2.lastChild && c2.nodeType === 3) { c2.nodeValue = b2; return; } } a2.textContent = b2; } var pb = { animationIterationCount: true, aspectRatio: true, borderImageOutset: true, borderImageSlice: true, borderImageWidth: true, boxFlex: true, boxFlexGroup: true, boxOrdinalGroup: true, columnCount: true, columns: true, flex: true, flexGrow: true, flexPositive: true, flexShrink: true, flexNegative: true, flexOrder: true, gridArea: true, gridRow: true, gridRowEnd: true, gridRowSpan: true, gridRowStart: true, gridColumn: true, gridColumnEnd: true, gridColumnSpan: true, gridColumnStart: true, fontWeight: true, lineClamp: true, lineHeight: true, opacity: true, order: true, orphans: true, tabSize: true, widows: true, zIndex: true, zoom: true, fillOpacity: true, floodOpacity: true, stopOpacity: true, strokeDasharray: true, strokeDashoffset: true, strokeMiterlimit: true, strokeOpacity: true, strokeWidth: true }; var qb = ["Webkit", "ms", "Moz", "O"]; Object.keys(pb).forEach(function(a2) { qb.forEach(function(b2) { b2 = b2 + a2.charAt(0).toUpperCase() + a2.substring(1); pb[b2] = pb[a2]; }); }); function rb(a2, b2, c2) { return b2 == null || typeof b2 === "boolean" || b2 === "" ? "" : c2 || typeof b2 !== "number" || b2 === 0 || pb.hasOwnProperty(a2) && pb[a2] ? ("" + b2).trim() : b2 + "px"; } function sb(a2, b2) { a2 = a2.style; for (var c2 in b2) if (b2.hasOwnProperty(c2)) { var d2 = c2.indexOf("--") === 0, e2 = rb(c2, b2[c2], d2); c2 === "float" && (c2 = "cssFloat"); d2 ? a2.setProperty(c2, e2) : a2[c2] = e2; } } var tb = A2({ menuitem: true }, { area: true, base: true, br: true, col: true, embed: true, hr: true, img: true, input: true, keygen: true, link: true, meta: true, param: true, source: true, track: true, wbr: true }); function ub(a2, b2) { if (b2) { if (tb[a2] && (b2.children != null || b2.dangerouslySetInnerHTML != null)) throw Error(p2(137, a2)); if (b2.dangerouslySetInnerHTML != null) { if (b2.children != null) throw Error(p2(60)); if (typeof b2.dangerouslySetInnerHTML !== "object" || !("__html" in b2.dangerouslySetInnerHTML)) throw Error(p2(61)); } if (b2.style != null && typeof b2.style !== "object") throw Error(p2(62)); } } function vb(a2, b2) { if (a2.indexOf("-") === -1) return typeof b2.is === "string"; switch (a2) { case "annotation-xml": case "color-profile": case "font-face": case "font-face-src": case "font-face-uri": case "font-face-format": case "font-face-name": case "missing-glyph": return false; default: return true; } } var wb = null; function xb(a2) { a2 = a2.target || a2.srcElement || window; a2.correspondingUseElement && (a2 = a2.correspondingUseElement); return a2.nodeType === 3 ? a2.parentNode : a2; } var yb = null; var zb = null; var Ab = null; function Bb(a2) { if (a2 = Cb(a2)) { if (typeof yb !== "function") throw Error(p2(280)); var b2 = a2.stateNode; b2 && (b2 = Db(b2), yb(a2.stateNode, a2.type, b2)); } } function Eb(a2) { zb ? Ab ? Ab.push(a2) : Ab = [a2] : zb = a2; } function Fb() { if (zb) { var a2 = zb, b2 = Ab; Ab = zb = null; Bb(a2); if (b2) for (a2 = 0; a2 < b2.length; a2++) Bb(b2[a2]); } } function Gb(a2, b2) { return a2(b2); } function Hb() { } var Ib = false; function Jb(a2, b2, c2) { if (Ib) return a2(b2, c2); Ib = true; try { return Gb(a2, b2, c2); } finally { if (Ib = false, zb !== null || Ab !== null) Hb(), Fb(); } } function Kb(a2, b2) { var c2 = a2.stateNode; if (c2 === null) return null; var d2 = Db(c2); if (d2 === null) return null; c2 = d2[b2]; a: switch (b2) { case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": (d2 = !d2.disabled) || (a2 = a2.type, d2 = !(a2 === "button" || a2 === "input" || a2 === "select" || a2 === "textarea")); a2 = !d2; break a; default: a2 = false; } if (a2) return null; if (c2 && typeof c2 !== "function") throw Error(p2(231, b2, typeof c2)); return c2; } var Lb = false; if (ia) try { Mb = {}; Object.defineProperty(Mb, "passive", { get: function() { Lb = true; } }); window.addEventListener("test", Mb, Mb); window.removeEventListener("test", Mb, Mb); } catch (a2) { Lb = false; } var Mb; function Nb(a2, b2, c2, d2, e2, f2, g2, h2, k2) { var l2 = Array.prototype.slice.call(arguments, 3); try { b2.apply(c2, l2); } catch (m2) { this.onError(m2); } } var Ob = false; var Pb = null; var Qb = false; var Rb = null; var Sb = { onError: function(a2) { Ob = true; Pb = a2; } }; function Tb(a2, b2, c2, d2, e2, f2, g2, h2, k2) { Ob = false; Pb = null; Nb.apply(Sb, arguments); } function Ub(a2, b2, c2, d2, e2, f2, g2, h2, k2) { Tb.apply(this, arguments); if (Ob) { if (Ob) { var l2 = Pb; Ob = false; Pb = null; } else throw Error(p2(198)); Qb || (Qb = true, Rb = l2); } } function Vb(a2) { var b2 = a2, c2 = a2; if (a2.alternate) for (; b2.return; ) b2 = b2.return; else { a2 = b2; do b2 = a2, (b2.flags & 4098) !== 0 && (c2 = b2.return), a2 = b2.return; while (a2); } return b2.tag === 3 ? c2 : null; } function Wb(a2) { if (a2.tag === 13) { var b2 = a2.memoizedState; b2 === null && (a2 = a2.alternate, a2 !== null && (b2 = a2.memoizedState)); if (b2 !== null) return b2.dehydrated; } return null; } function Xb(a2) { if (Vb(a2) !== a2) throw Error(p2(188)); } function Yb(a2) { var b2 = a2.alternate; if (!b2) { b2 = Vb(a2); if (b2 === null) throw Error(p2(188)); return b2 !== a2 ? null : a2; } for (var c2 = a2, d2 = b2; ; ) { var e2 = c2.return; if (e2 === null) break; var f2 = e2.alternate; if (f2 === null) { d2 = e2.return; if (d2 !== null) { c2 = d2; continue; } break; } if (e2.child === f2.child) { for (f2 = e2.child; f2; ) { if (f2 === c2) return Xb(e2), a2; if (f2 === d2) return Xb(e2), b2; f2 = f2.sibling; } throw Error(p2(188)); } if (c2.return !== d2.return) c2 = e2, d2 = f2; else { for (var g2 = false, h2 = e2.child; h2; ) { if (h2 === c2) { g2 = true; c2 = e2; d2 = f2; break; } if (h2 === d2) { g2 = true; d2 = e2; c2 = f2; break; } h2 = h2.sibling; } if (!g2) { for (h2 = f2.child; h2; ) { if (h2 === c2) { g2 = true; c2 = f2; d2 = e2; break; } if (h2 === d2) { g2 = true; d2 = f2; c2 = e2; break; } h2 = h2.sibling; } if (!g2) throw Error(p2(189)); } } if (c2.alternate !== d2) throw Error(p2(190)); } if (c2.tag !== 3) throw Error(p2(188)); return c2.stateNode.current === c2 ? a2 : b2; } function Zb(a2) { a2 = Yb(a2); return a2 !== null ? $b(a2) : null; } function $b(a2) { if (a2.tag === 5 || a2.tag === 6) return a2; for (a2 = a2.child; a2 !== null; ) { var b2 = $b(a2); if (b2 !== null) return b2; a2 = a2.sibling; } return null; } var ac = ca.unstable_scheduleCallback; var bc = ca.unstable_cancelCallback; var cc = ca.unstable_shouldYield; var dc = ca.unstable_requestPaint; var B = ca.unstable_now; var ec = ca.unstable_getCurrentPriorityLevel; var fc = ca.unstable_ImmediatePriority; var gc = ca.unstable_UserBlockingPriority; var hc = ca.unstable_NormalPriority; var ic = ca.unstable_LowPriority; var jc = ca.unstable_IdlePriority; var kc = null; var lc = null; function mc(a2) { if (lc && typeof lc.onCommitFiberRoot === "function") try { lc.onCommitFiberRoot(kc, a2, void 0, (a2.current.flags & 128) === 128); } catch (b2) { } } var oc = Math.clz32 ? Math.clz32 : nc; var pc = Math.log; var qc = Math.LN2; function nc(a2) { a2 >>>= 0; return a2 === 0 ? 32 : 31 - (pc(a2) / qc | 0) | 0; } var rc = 64; var sc = 4194304; function tc(a2) { switch (a2 & -a2) { case 1: return 1; case 2: return 2; case 4: return 4; case 8: return 8; case 16: return 16; case 32: return 32; case 64: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return a2 & 4194240; case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: return a2 & 130023424; case 134217728: return 134217728; case 268435456: return 268435456; case 536870912: return 536870912; case 1073741824: return 1073741824; default: return a2; } } function uc(a2, b2) { var c2 = a2.pendingLanes; if (c2 === 0) return 0; var d2 = 0, e2 = a2.suspendedLanes, f2 = a2.pingedLanes, g2 = c2 & 268435455; if (g2 !== 0) { var h2 = g2 & ~e2; h2 !== 0 ? d2 = tc(h2) : (f2 &= g2, f2 !== 0 && (d2 = tc(f2))); } else g2 = c2 & ~e2, g2 !== 0 ? d2 = tc(g2) : f2 !== 0 && (d2 = tc(f2)); if (d2 === 0) return 0; if (b2 !== 0 && b2 !== d2 && (b2 & e2) === 0 && (e2 = d2 & -d2, f2 = b2 & -b2, e2 >= f2 || e2 === 16 && (f2 & 4194240) !== 0)) return b2; (d2 & 4) !== 0 && (d2 |= c2 & 16); b2 = a2.entangledLanes; if (b2 !== 0) for (a2 = a2.entanglements, b2 &= d2; 0 < b2; ) c2 = 31 - oc(b2), e2 = 1 << c2, d2 |= a2[c2], b2 &= ~e2; return d2; } function vc(a2, b2) { switch (a2) { case 1: case 2: case 4: return b2 + 250; case 8: case 16: case 32: case 64: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return b2 + 5e3; case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: return -1; case 134217728: case 268435456: case 536870912: case 1073741824: return -1; default: return -1; } } function wc(a2, b2) { for (var c2 = a2.suspendedLanes, d2 = a2.pingedLanes, e2 = a2.expirationTimes, f2 = a2.pendingLanes; 0 < f2; ) { var g2 = 31 - oc(f2), h2 = 1 << g2, k2 = e2[g2]; if (k2 === -1) { if ((h2 & c2) === 0 || (h2 & d2) !== 0) e2[g2] = vc(h2, b2); } else k2 <= b2 && (a2.expiredLanes |= h2); f2 &= ~h2; } } function xc(a2) { a2 = a2.pendingLanes & -1073741825; return a2 !== 0 ? a2 : a2 & 1073741824 ? 1073741824 : 0; } function yc() { var a2 = rc; rc <<= 1; (rc & 4194240) === 0 && (rc = 64); return a2; } function zc(a2) { for (var b2 = [], c2 = 0; 31 > c2; c2++) b2.push(a2); return b2; } function Ac(a2, b2, c2) { a2.pendingLanes |= b2; b2 !== 536870912 && (a2.suspendedLanes = 0, a2.pingedLanes = 0); a2 = a2.eventTimes; b2 = 31 - oc(b2); a2[b2] = c2; } function Bc(a2, b2) { var c2 = a2.pendingLanes & ~b2; a2.pendingLanes = b2; a2.suspendedLanes = 0; a2.pingedLanes = 0; a2.expiredLanes &= b2; a2.mutableReadLanes &= b2; a2.entangledLanes &= b2; b2 = a2.entanglements; var d2 = a2.eventTimes; for (a2 = a2.expirationTimes; 0 < c2; ) { var e2 = 31 - oc(c2), f2 = 1 << e2; b2[e2] = 0; d2[e2] = -1; a2[e2] = -1; c2 &= ~f2; } } function Cc(a2, b2) { var c2 = a2.entangledLanes |= b2; for (a2 = a2.entanglements; c2; ) { var d2 = 31 - oc(c2), e2 = 1 << d2; e2 & b2 | a2[d2] & b2 && (a2[d2] |= b2); c2 &= ~e2; } } var C2 = 0; function Dc(a2) { a2 &= -a2; return 1 < a2 ? 4 < a2 ? (a2 & 268435455) !== 0 ? 16 : 536870912 : 4 : 1; } var Ec; var Fc; var Gc; var Hc; var Ic; var Jc = false; var Kc = []; var Lc = null; var Mc = null; var Nc = null; var Oc = /* @__PURE__ */ new Map(); var Pc = /* @__PURE__ */ new Map(); var Qc = []; var Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); function Sc(a2, b2) { switch (a2) { case "focusin": case "focusout": Lc = null; break; case "dragenter": case "dragleave": Mc = null; break; case "mouseover": case "mouseout": Nc = null; break; case "pointerover": case "pointerout": Oc.delete(b2.pointerId); break; case "gotpointercapture": case "lostpointercapture": Pc.delete(b2.pointerId); } } function Tc(a2, b2, c2, d2, e2, f2) { if (a2 === null || a2.nativeEvent !== f2) return a2 = { blockedOn: b2, domEventName: c2, eventSystemFlags: d2, nativeEvent: f2, targetContainers: [e2] }, b2 !== null && (b2 = Cb(b2), b2 !== null && Fc(b2)), a2; a2.eventSystemFlags |= d2; b2 = a2.targetContainers; e2 !== null && b2.indexOf(e2) === -1 && b2.push(e2); return a2; } function Uc(a2, b2, c2, d2, e2) { switch (b2) { case "focusin": return Lc = Tc(Lc, a2, b2, c2, d2, e2), true; case "dragenter": return Mc = Tc(Mc, a2, b2, c2, d2, e2), true; case "mouseover": return Nc = Tc(Nc, a2, b2, c2, d2, e2), true; case "pointerover": var f2 = e2.pointerId; Oc.set(f2, Tc(Oc.get(f2) || null, a2, b2, c2, d2, e2)); return true; case "gotpointercapture": return f2 = e2.pointerId, Pc.set(f2, Tc(Pc.get(f2) || null, a2, b2, c2, d2, e2)), true; } return false; } function Vc(a2) { var b2 = Wc(a2.target); if (b2 !== null) { var c2 = Vb(b2); if (c2 !== null) { if (b2 = c2.tag, b2 === 13) { if (b2 = Wb(c2), b2 !== null) { a2.blockedOn = b2; Ic(a2.priority, function() { Gc(c2); }); return; } } else if (b2 === 3 && c2.stateNode.current.memoizedState.isDehydrated) { a2.blockedOn = c2.tag === 3 ? c2.stateNode.containerInfo : null; return; } } } a2.blockedOn = null; } function Xc(a2) { if (a2.blockedOn !== null) return false; for (var b2 = a2.targetContainers; 0 < b2.length; ) { var c2 = Yc(a2.domEventName, a2.eventSystemFlags, b2[0], a2.nativeEvent); if (c2 === null) { c2 = a2.nativeEvent; var d2 = new c2.constructor(c2.type, c2); wb = d2; c2.target.dispatchEvent(d2); wb = null; } else return b2 = Cb(c2), b2 !== null && Fc(b2), a2.blockedOn = c2, false; b2.shift(); } return true; } function Zc(a2, b2, c2) { Xc(a2) && c2.delete(b2); } function $c() { Jc = false; Lc !== null && Xc(Lc) && (Lc = null); Mc !== null && Xc(Mc) && (Mc = null); Nc !== null && Xc(Nc) && (Nc = null); Oc.forEach(Zc); Pc.forEach(Zc); } function ad(a2, b2) { a2.blockedOn === b2 && (a2.blockedOn = null, Jc || (Jc = true, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c))); } function bd(a2) { function b2(b3) { return ad(b3, a2); } if (0 < Kc.length) { ad(Kc[0], a2); for (var c2 = 1; c2 < Kc.length; c2++) { var d2 = Kc[c2]; d2.blockedOn === a2 && (d2.blockedOn = null); } } Lc !== null && ad(Lc, a2); Mc !== null && ad(Mc, a2); Nc !== null && ad(Nc, a2); Oc.forEach(b2); Pc.forEach(b2); for (c2 = 0; c2 < Qc.length; c2++) d2 = Qc[c2], d2.blockedOn === a2 && (d2.blockedOn = null); for (; 0 < Qc.length && (c2 = Qc[0], c2.blockedOn === null); ) Vc(c2), c2.blockedOn === null && Qc.shift(); } var cd = ua.ReactCurrentBatchConfig; var dd = true; function ed(a2, b2, c2, d2) { var e2 = C2, f2 = cd.transition; cd.transition = null; try { C2 = 1, fd(a2, b2, c2, d2); } finally { C2 = e2, cd.transition = f2; } } function gd(a2, b2, c2, d2) { var e2 = C2, f2 = cd.transition; cd.transition = null; try { C2 = 4, fd(a2, b2, c2, d2); } finally { C2 = e2, cd.transition = f2; } } function fd(a2, b2, c2, d2) { if (dd) { var e2 = Yc(a2, b2, c2, d2); if (e2 === null) hd(a2, b2, d2, id, c2), Sc(a2, d2); else if (Uc(e2, a2, b2, c2, d2)) d2.stopPropagation(); else if (Sc(a2, d2), b2 & 4 && -1 < Rc.indexOf(a2)) { for (; e2 !== null; ) { var f2 = Cb(e2); f2 !== null && Ec(f2); f2 = Yc(a2, b2, c2, d2); f2 === null && hd(a2, b2, d2, id, c2); if (f2 === e2) break; e2 = f2; } e2 !== null && d2.stopPropagation(); } else hd(a2, b2, d2, null, c2); } } var id = null; function Yc(a2, b2, c2, d2) { id = null; a2 = xb(d2); a2 = Wc(a2); if (a2 !== null) if (b2 = Vb(a2), b2 === null) a2 = null; else if (c2 = b2.tag, c2 === 13) { a2 = Wb(b2); if (a2 !== null) return a2; a2 = null; } else if (c2 === 3) { if (b2.stateNode.current.memoizedState.isDehydrated) return b2.tag === 3 ? b2.stateNode.containerInfo : null; a2 = null; } else b2 !== a2 && (a2 = null); id = a2; return null; } function jd(a2) { switch (a2) { case "cancel": case "click": case "close": case "contextmenu": case "copy": case "cut": case "auxclick": case "dblclick": case "dragend": case "dragstart": case "drop": case "focusin": case "focusout": case "input": case "invalid": case "keydown": case "keypress": case "keyup": case "mousedown": case "mouseup": case "paste": case "pause": case "play": case "pointercancel": case "pointerdown": case "pointerup": case "ratechange": case "reset": case "resize": case "seeked": case "submit": case "touchcancel": case "touchend": case "touchstart": case "volumechange": case "change": case "selectionchange": case "textInput": case "compositionstart": case "compositionend": case "compositionupdate": case "beforeblur": case "afterblur": case "beforeinput": case "blur": case "fullscreenchange": case "focus": case "hashchange": case "popstate": case "select": case "selectstart": return 1; case "drag": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "mousemove": case "mouseout": case "mouseover": case "pointermove": case "pointerout": case "pointerover": case "scroll": case "toggle": case "touchmove": case "wheel": case "mouseenter": case "mouseleave": case "pointerenter": case "pointerleave": return 4; case "message": switch (ec()) { case fc: return 1; case gc: return 4; case hc: case ic: return 16; case jc: return 536870912; default: return 16; } default: return 16; } } var kd = null; var ld = null; var md = null; function nd() { if (md) return md; var a2, b2 = ld, c2 = b2.length, d2, e2 = "value" in kd ? kd.value : kd.textContent, f2 = e2.length; for (a2 = 0; a2 < c2 && b2[a2] === e2[a2]; a2++) ; var g2 = c2 - a2; for (d2 = 1; d2 <= g2 && b2[c2 - d2] === e2[f2 - d2]; d2++) ; return md = e2.slice(a2, 1 < d2 ? 1 - d2 : void 0); } function od(a2) { var b2 = a2.keyCode; "charCode" in a2 ? (a2 = a2.charCode, a2 === 0 && b2 === 13 && (a2 = 13)) : a2 = b2; a2 === 10 && (a2 = 13); return 32 <= a2 || a2 === 13 ? a2 : 0; } function pd() { return true; } function qd() { return false; } function rd(a2) { function b2(b3, d2, e2, f2, g2) { this._reactName = b3; this._targetInst = e2; this.type = d2; this.nativeEvent = f2; this.target = g2; this.currentTarget = null; for (var c2 in a2) a2.hasOwnProperty(c2) && (b3 = a2[c2], this[c2] = b3 ? b3(f2) : f2[c2]); this.isDefaultPrevented = (f2.defaultPrevented != null ? f2.defaultPrevented : f2.returnValue === false) ? pd : qd; this.isPropagationStopped = qd; return this; } A2(b2.prototype, { preventDefault: function() { this.defaultPrevented = true; var a3 = this.nativeEvent; a3 && (a3.preventDefault ? a3.preventDefault() : typeof a3.returnValue !== "unknown" && (a3.returnValue = false), this.isDefaultPrevented = pd); }, stopPropagation: function() { var a3 = this.nativeEvent; a3 && (a3.stopPropagation ? a3.stopPropagation() : typeof a3.cancelBubble !== "unknown" && (a3.cancelBubble = true), this.isPropagationStopped = pd); }, persist: function() { }, isPersistent: pd }); return b2; } var sd = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(a2) { return a2.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }; var td = rd(sd); var ud = A2({}, sd, { view: 0, detail: 0 }); var vd = rd(ud); var wd; var xd; var yd; var Ad = A2({}, ud, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: zd, button: 0, buttons: 0, relatedTarget: function(a2) { return a2.relatedTarget === void 0 ? a2.fromElement === a2.srcElement ? a2.toElement : a2.fromElement : a2.relatedTarget; }, movementX: function(a2) { if ("movementX" in a2) return a2.movementX; a2 !== yd && (yd && a2.type === "mousemove" ? (wd = a2.screenX - yd.screenX, xd = a2.screenY - yd.screenY) : xd = wd = 0, yd = a2); return wd; }, movementY: function(a2) { return "movementY" in a2 ? a2.movementY : xd; } }); var Bd = rd(Ad); var Cd = A2({}, Ad, { dataTransfer: 0 }); var Dd = rd(Cd); var Ed = A2({}, ud, { relatedTarget: 0 }); var Fd = rd(Ed); var Gd = A2({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }); var Hd = rd(Gd); var Id = A2({}, sd, { clipboardData: function(a2) { return "clipboardData" in a2 ? a2.clipboardData : window.clipboardData; } }); var Jd = rd(Id); var Kd = A2({}, sd, { data: 0 }); var Ld = rd(Kd); var Md = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }; var Nd = { 8: "Backspace", 9: "Tab", 12: "Clear", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 45: "Insert", 46: "Delete", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NumLock", 145: "ScrollLock", 224: "Meta" }; var Od = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; function Pd(a2) { var b2 = this.nativeEvent; return b2.getModifierState ? b2.getModifierState(a2) : (a2 = Od[a2]) ? !!b2[a2] : false; } function zd() { return Pd; } var Qd = A2({}, ud, { key: function(a2) { if (a2.key) { var b2 = Md[a2.key] || a2.key; if (b2 !== "Unidentified") return b2; } return a2.type === "keypress" ? (a2 = od(a2), a2 === 13 ? "Enter" : String.fromCharCode(a2)) : a2.type === "keydown" || a2.type === "keyup" ? Nd[a2.keyCode] || "Unidentified" : ""; }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: zd, charCode: function(a2) { return a2.type === "keypress" ? od(a2) : 0; }, keyCode: function(a2) { return a2.type === "keydown" || a2.type === "keyup" ? a2.keyCode : 0; }, which: function(a2) { return a2.type === "keypress" ? od(a2) : a2.type === "keydown" || a2.type === "keyup" ? a2.keyCode : 0; } }); var Rd = rd(Qd); var Sd = A2({}, Ad, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }); var Td = rd(Sd); var Ud = A2({}, ud, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: zd }); var Vd = rd(Ud); var Wd = A2({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }); var Xd = rd(Wd); var Yd = A2({}, Ad, { deltaX: function(a2) { return "deltaX" in a2 ? a2.deltaX : "wheelDeltaX" in a2 ? -a2.wheelDeltaX : 0; }, deltaY: function(a2) { return "deltaY" in a2 ? a2.deltaY : "wheelDeltaY" in a2 ? -a2.wheelDeltaY : "wheelDelta" in a2 ? -a2.wheelDelta : 0; }, deltaZ: 0, deltaMode: 0 }); var Zd = rd(Yd); var $d = [9, 13, 27, 32]; var ae = ia && "CompositionEvent" in window; var be = null; ia && "documentMode" in document && (be = document.documentMode); var ce = ia && "TextEvent" in window && !be; var de = ia && (!ae || be && 8 < be && 11 >= be); var ee2 = String.fromCharCode(32); var fe = false; function ge(a2, b2) { switch (a2) { case "keyup": return $d.indexOf(b2.keyCode) !== -1; case "keydown": return b2.keyCode !== 229; case "keypress": case "mousedown": case "focusout": return true; default: return false; } } function he(a2) { a2 = a2.detail; return typeof a2 === "object" && "data" in a2 ? a2.data : null; } var ie = false; function je(a2, b2) { switch (a2) { case "compositionend": return he(b2); case "keypress": if (b2.which !== 32) return null; fe = true; return ee2; case "textInput": return a2 = b2.data, a2 === ee2 && fe ? null : a2; default: return null; } } function ke(a2, b2) { if (ie) return a2 === "compositionend" || !ae && ge(a2, b2) ? (a2 = nd(), md = ld = kd = null, ie = false, a2) : null; switch (a2) { case "paste": return null; case "keypress": if (!(b2.ctrlKey || b2.altKey || b2.metaKey) || b2.ctrlKey && b2.altKey) { if (b2.char && 1 < b2.char.length) return b2.char; if (b2.which) return String.fromCharCode(b2.which); } return null; case "compositionend": return de && b2.locale !== "ko" ? null : b2.data; default: return null; } } var le = { color: true, date: true, datetime: true, "datetime-local": true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true }; function me(a2) { var b2 = a2 && a2.nodeName && a2.nodeName.toLowerCase(); return b2 === "input" ? !!le[a2.type] : b2 === "textarea" ? true : false; } function ne2(a2, b2, c2, d2) { Eb(d2); b2 = oe(b2, "onChange"); 0 < b2.length && (c2 = new td("onChange", "change", null, c2, d2), a2.push({ event: c2, listeners: b2 })); } var pe = null; var qe = null; function re2(a2) { se(a2, 0); } function te2(a2) { var b2 = ue(a2); if (Wa(b2)) return a2; } function ve(a2, b2) { if (a2 === "change") return b2; } var we = false; if (ia) { if (ia) { ye = "oninput" in document; if (!ye) { ze = document.createElement("div"); ze.setAttribute("oninput", "return;"); ye = typeof ze.oninput === "function"; } xe = ye; } else xe = false; we = xe && (!document.documentMode || 9 < document.documentMode); } var xe; var ye; var ze; function Ae() { pe && (pe.detachEvent("onpropertychange", Be), qe = pe = null); } function Be(a2) { if (a2.propertyName === "value" && te2(qe)) { var b2 = []; ne2(b2, qe, a2, xb(a2)); Jb(re2, b2); } } function Ce(a2, b2, c2) { a2 === "focusin" ? (Ae(), pe = b2, qe = c2, pe.attachEvent("onpropertychange", Be)) : a2 === "focusout" && Ae(); } function De(a2) { if (a2 === "selectionchange" || a2 === "keyup" || a2 === "keydown") return te2(qe); } function Ee(a2, b2) { if (a2 === "click") return te2(b2); } function Fe(a2, b2) { if (a2 === "input" || a2 === "change") return te2(b2); } function Ge(a2, b2) { return a2 === b2 && (a2 !== 0 || 1 / a2 === 1 / b2) || a2 !== a2 && b2 !== b2; } var He = typeof Object.is === "function" ? Object.is : Ge; function Ie(a2, b2) { if (He(a2, b2)) return true; if (typeof a2 !== "object" || a2 === null || typeof b2 !== "object" || b2 === null) return false; var c2 = Object.keys(a2), d2 = Object.keys(b2); if (c2.length !== d2.length) return false; for (d2 = 0; d2 < c2.length; d2++) { var e2 = c2[d2]; if (!ja.call(b2, e2) || !He(a2[e2], b2[e2])) return false; } return true; } function Je(a2) { for (; a2 && a2.firstChild; ) a2 = a2.firstChild; return a2; } function Ke(a2, b2) { var c2 = Je(a2); a2 = 0; for (var d2; c2; ) { if (c2.nodeType === 3) { d2 = a2 + c2.textContent.length; if (a2 <= b2 && d2 >= b2) return { node: c2, offset: b2 - a2 }; a2 = d2; } a: { for (; c2; ) { if (c2.nextSibling) { c2 = c2.nextSibling; break a; } c2 = c2.parentNode; } c2 = void 0; } c2 = Je(c2); } } function Le(a2, b2) { return a2 && b2 ? a2 === b2 ? true : a2 && a2.nodeType === 3 ? false : b2 && b2.nodeType === 3 ? Le(a2, b2.parentNode) : "contains" in a2 ? a2.contains(b2) : a2.compareDocumentPosition ? !!(a2.compareDocumentPosition(b2) & 16) : false : false; } function Me() { for (var a2 = window, b2 = Xa(); b2 instanceof a2.HTMLIFrameElement; ) { try { var c2 = typeof b2.contentWindow.location.href === "string"; } catch (d2) { c2 = false; } if (c2) a2 = b2.contentWindow; else break; b2 = Xa(a2.document); } return b2; } function Ne(a2) { var b2 = a2 && a2.nodeName && a2.nodeName.toLowerCase(); return b2 && (b2 === "input" && (a2.type === "text" || a2.type === "search" || a2.type === "tel" || a2.type === "url" || a2.type === "password") || b2 === "textarea" || a2.contentEditable === "true"); } function Oe(a2) { var b2 = Me(), c2 = a2.focusedElem, d2 = a2.selectionRange; if (b2 !== c2 && c2 && c2.ownerDocument && Le(c2.ownerDocument.documentElement, c2)) { if (d2 !== null && Ne(c2)) { if (b2 = d2.start, a2 = d2.end, a2 === void 0 && (a2 = b2), "selectionStart" in c2) c2.selectionStart = b2, c2.selectionEnd = Math.min(a2, c2.value.length); else if (a2 = (b2 = c2.ownerDocument || document) && b2.defaultView || window, a2.getSelection) { a2 = a2.getSelection(); var e2 = c2.textContent.length, f2 = Math.min(d2.start, e2); d2 = d2.end === void 0 ? f2 : Math.min(d2.end, e2); !a2.extend && f2 > d2 && (e2 = d2, d2 = f2, f2 = e2); e2 = Ke(c2, f2); var g2 = Ke(c2, d2); e2 && g2 && (a2.rangeCount !== 1 || a2.anchorNode !== e2.node || a2.anchorOffset !== e2.offset || a2.focusNode !== g2.node || a2.focusOffset !== g2.offset) && (b2 = b2.createRange(), b2.setStart(e2.node, e2.offset), a2.removeAllRanges(), f2 > d2 ? (a2.addRange(b2), a2.extend(g2.node, g2.offset)) : (b2.setEnd(g2.node, g2.offset), a2.addRange(b2))); } } b2 = []; for (a2 = c2; a2 = a2.parentNode; ) a2.nodeType === 1 && b2.push({ element: a2, left: a2.scrollLeft, top: a2.scrollTop }); typeof c2.focus === "function" && c2.focus(); for (c2 = 0; c2 < b2.length; c2++) a2 = b2[c2], a2.element.scrollLeft = a2.left, a2.element.scrollTop = a2.top; } } var Pe = ia && "documentMode" in document && 11 >= document.documentMode; var Qe = null; var Re = null; var Se = null; var Te = false; function Ue(a2, b2, c2) { var d2 = c2.window === c2 ? c2.document : c2.nodeType === 9 ? c2 : c2.ownerDocument; Te || Qe == null || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se && Ie(Se, d2) || (Se = d2, d2 = oe(Re, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c2), a2.push({ event: b2, listeners: d2 }), b2.target = Qe))); } function Ve(a2, b2) { var c2 = {}; c2[a2.toLowerCase()] = b2.toLowerCase(); c2["Webkit" + a2] = "webkit" + b2; c2["Moz" + a2] = "moz" + b2; return c2; } var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }; var Xe = {}; var Ye = {}; ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition); function Ze(a2) { if (Xe[a2]) return Xe[a2]; if (!We[a2]) return a2; var b2 = We[a2], c2; for (c2 in b2) if (b2.hasOwnProperty(c2) && c2 in Ye) return Xe[a2] = b2[c2]; return a2; } var $e = Ze("animationend"); var af = Ze("animationiteration"); var bf = Ze("animationstart"); var cf = Ze("transitionend"); var df = /* @__PURE__ */ new Map(); var ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); function ff(a2, b2) { df.set(a2, b2); fa(b2, [a2]); } for (gf = 0; gf < ef.length; gf++) { hf = ef[gf], jf = hf.toLowerCase(), kf = hf[0].toUpperCase() + hf.slice(1); ff(jf, "on" + kf); } var hf; var jf; var kf; var gf; ff($e, "onAnimationEnd"); ff(af, "onAnimationIteration"); ff(bf, "onAnimationStart"); ff("dblclick", "onDoubleClick"); ff("focusin", "onFocus"); ff("focusout", "onBlur"); ff(cf, "onTransitionEnd"); ha("onMouseEnter", ["mouseout", "mouseover"]); ha("onMouseLeave", ["mouseout", "mouseover"]); ha("onPointerEnter", ["pointerout", "pointerover"]); ha("onPointerLeave", ["pointerout", "pointerover"]); fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")); fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); fa("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]); fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); var lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "); var mf = new Set("cancel close invalid load scroll toggle".split(" ").concat(lf)); function nf(a2, b2, c2) { var d2 = a2.type || "unknown-event"; a2.currentTarget = c2; Ub(d2, b2, void 0, a2); a2.currentTarget = null; } function se(a2, b2) { b2 = (b2 & 4) !== 0; for (var c2 = 0; c2 < a2.length; c2++) { var d2 = a2[c2], e2 = d2.event; d2 = d2.listeners; a: { var f2 = void 0; if (b2) for (var g2 = d2.length - 1; 0 <= g2; g2--) { var h2 = d2[g2], k2 = h2.instance, l2 = h2.currentTarget; h2 = h2.listener; if (k2 !== f2 && e2.isPropagationStopped()) break a; nf(e2, h2, l2); f2 = k2; } else for (g2 = 0; g2 < d2.length; g2++) { h2 = d2[g2]; k2 = h2.instance; l2 = h2.currentTarget; h2 = h2.listener; if (k2 !== f2 && e2.isPropagationStopped()) break a; nf(e2, h2, l2); f2 = k2; } } } if (Qb) throw a2 = Rb, Qb = false, Rb = null, a2; } function D2(a2, b2) { var c2 = b2[of]; c2 === void 0 && (c2 = b2[of] = /* @__PURE__ */ new Set()); var d2 = a2 + "__bubble"; c2.has(d2) || (pf(b2, a2, 2, false), c2.add(d2)); } function qf(a2, b2, c2) { var d2 = 0; b2 && (d2 |= 4); pf(c2, a2, d2, b2); } var rf = "_reactListening" + Math.random().toString(36).slice(2); function sf(a2) { if (!a2[rf]) { a2[rf] = true; da.forEach(function(b3) { b3 !== "selectionchange" && (mf.has(b3) || qf(b3, false, a2), qf(b3, true, a2)); }); var b2 = a2.nodeType === 9 ? a2 : a2.ownerDocument; b2 === null || b2[rf] || (b2[rf] = true, qf("selectionchange", false, b2)); } } function pf(a2, b2, c2, d2) { switch (jd(b2)) { case 1: var e2 = ed; break; case 4: e2 = gd; break; default: e2 = fd; } c2 = e2.bind(null, b2, c2, a2); e2 = void 0; !Lb || b2 !== "touchstart" && b2 !== "touchmove" && b2 !== "wheel" || (e2 = true); d2 ? e2 !== void 0 ? a2.addEventListener(b2, c2, { capture: true, passive: e2 }) : a2.addEventListener(b2, c2, true) : e2 !== void 0 ? a2.addEventListener(b2, c2, { passive: e2 }) : a2.addEventListener(b2, c2, false); } function hd(a2, b2, c2, d2, e2) { var f2 = d2; if ((b2 & 1) === 0 && (b2 & 2) === 0 && d2 !== null) a: for (; ; ) { if (d2 === null) return; var g2 = d2.tag; if (g2 === 3 || g2 === 4) { var h2 = d2.stateNode.containerInfo; if (h2 === e2 || h2.nodeType === 8 && h2.parentNode === e2) break; if (g2 === 4) for (g2 = d2.return; g2 !== null; ) { var k2 = g2.tag; if (k2 === 3 || k2 === 4) { if (k2 = g2.stateNode.containerInfo, k2 === e2 || k2.nodeType === 8 && k2.parentNode === e2) return; } g2 = g2.return; } for (; h2 !== null; ) { g2 = Wc(h2); if (g2 === null) return; k2 = g2.tag; if (k2 === 5 || k2 === 6) { d2 = f2 = g2; continue a; } h2 = h2.parentNode; } } d2 = d2.return; } Jb(function() { var d3 = f2, e3 = xb(c2), g3 = []; a: { var h3 = df.get(a2); if (h3 !== void 0) { var k3 = td, n2 = a2; switch (a2) { case "keypress": if (od(c2) === 0) break a; case "keydown": case "keyup": k3 = Rd; break; case "focusin": n2 = "focus"; k3 = Fd; break; case "focusout": n2 = "blur"; k3 = Fd; break; case "beforeblur": case "afterblur": k3 = Fd; break; case "click": if (c2.button === 2) break a; case "auxclick": case "dblclick": case "mousedown": case "mousemove": case "mouseup": case "mouseout": case "mouseover": case "contextmenu": k3 = Bd; break; case "drag": case "dragend": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "dragstart": case "drop": k3 = Dd; break; case "touchcancel": case "touchend": case "touchmove": case "touchstart": k3 = Vd; break; case $e: case af: case bf: k3 = Hd; break; case cf: k3 = Xd; break; case "scroll": k3 = vd; break; case "wheel": k3 = Zd; break; case "copy": case "cut": case "paste": k3 = Jd; break; case "gotpointercapture": case "lostpointercapture": case "pointercancel": case "pointerdown": case "pointermove": case "pointerout": case "pointerover": case "pointerup": k3 = Td; } var t3 = (b2 & 4) !== 0, J = !t3 && a2 === "scroll", x2 = t3 ? h3 !== null ? h3 + "Capture" : null : h3; t3 = []; for (var w2 = d3, u2; w2 !== null; ) { u2 = w2; var F2 = u2.stateNode; u2.tag === 5 && F2 !== null && (u2 = F2, x2 !== null && (F2 = Kb(w2, x2), F2 != null && t3.push(tf(w2, F2, u2)))); if (J) break; w2 = w2.return; } 0 < t3.length && (h3 = new k3(h3, n2, null, c2, e3), g3.push({ event: h3, listeners: t3 })); } } if ((b2 & 7) === 0) { a: { h3 = a2 === "mouseover" || a2 === "pointerover"; k3 = a2 === "mouseout" || a2 === "pointerout"; if (h3 && c2 !== wb && (n2 = c2.relatedTarget || c2.fromElement) && (Wc(n2) || n2[uf])) break a; if (k3 || h3) { h3 = e3.window === e3 ? e3 : (h3 = e3.ownerDocument) ? h3.defaultView || h3.parentWindow : window; if (k3) { if (n2 = c2.relatedTarget || c2.toElement, k3 = d3, n2 = n2 ? Wc(n2) : null, n2 !== null && (J = Vb(n2), n2 !== J || n2.tag !== 5 && n2.tag !== 6)) n2 = null; } else k3 = null, n2 = d3; if (k3 !== n2) { t3 = Bd; F2 = "onMouseLeave"; x2 = "onMouseEnter"; w2 = "mouse"; if (a2 === "pointerout" || a2 === "pointerover") t3 = Td, F2 = "onPointerLeave", x2 = "onPointerEnter", w2 = "pointer"; J = k3 == null ? h3 : ue(k3); u2 = n2 == null ? h3 : ue(n2); h3 = new t3(F2, w2 + "leave", k3, c2, e3); h3.target = J; h3.relatedTarget = u2; F2 = null; Wc(e3) === d3 && (t3 = new t3(x2, w2 + "enter", n2, c2, e3), t3.target = u2, t3.relatedTarget = J, F2 = t3); J = F2; if (k3 && n2) b: { t3 = k3; x2 = n2; w2 = 0; for (u2 = t3; u2; u2 = vf(u2)) w2++; u2 = 0; for (F2 = x2; F2; F2 = vf(F2)) u2++; for (; 0 < w2 - u2; ) t3 = vf(t3), w2--; for (; 0 < u2 - w2; ) x2 = vf(x2), u2--; for (; w2--; ) { if (t3 === x2 || x2 !== null && t3 === x2.alternate) break b; t3 = vf(t3); x2 = vf(x2); } t3 = null; } else t3 = null; k3 !== null && wf(g3, h3, k3, t3, false); n2 !== null && J !== null && wf(g3, J, n2, t3, true); } } } a: { h3 = d3 ? ue(d3) : window; k3 = h3.nodeName && h3.nodeName.toLowerCase(); if (k3 === "select" || k3 === "input" && h3.type === "file") var na = ve; else if (me(h3)) if (we) na = Fe; else { na = De; var xa = Ce; } else (k3 = h3.nodeName) && k3.toLowerCase() === "input" && (h3.type === "checkbox" || h3.type === "radio") && (na = Ee); if (na && (na = na(a2, d3))) { ne2(g3, na, c2, e3); break a; } xa && xa(a2, h3, d3); a2 === "focusout" && (xa = h3._wrapperState) && xa.controlled && h3.type === "number" && cb(h3, "number", h3.value); } xa = d3 ? ue(d3) : window; switch (a2) { case "focusin": if (me(xa) || xa.contentEditable === "true") Qe = xa, Re = d3, Se = null; break; case "focusout": Se = Re = Qe = null; break; case "mousedown": Te = true; break; case "contextmenu": case "mouseup": case "dragend": Te = false; Ue(g3, c2, e3); break; case "selectionchange": if (Pe) break; case "keydown": case "keyup": Ue(g3, c2, e3); } var $a; if (ae) b: { switch (a2) { case "compositionstart": var ba = "onCompositionStart"; break b; case "compositionend": ba = "onCompositionEnd"; break b; case "compositionupdate": ba = "onCompositionUpdate"; break b; } ba = void 0; } else ie ? ge(a2, c2) && (ba = "onCompositionEnd") : a2 === "keydown" && c2.keyCode === 229 && (ba = "onCompositionStart"); ba && (de && c2.locale !== "ko" && (ie || ba !== "onCompositionStart" ? ba === "onCompositionEnd" && ie && ($a = nd()) : (kd = e3, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d3, ba), 0 < xa.length && (ba = new Ld(ba, a2, null, c2, e3), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c2), $a !== null && (ba.data = $a)))); if ($a = ce ? je(a2, c2) : ke(a2, c2)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e3 = new Ld("onBeforeInput", "beforeinput", null, c2, e3), g3.push({ event: e3, listeners: d3 }), e3.data = $a); } se(g3, b2); }); } function tf(a2, b2, c2) { return { instance: a2, listener: b2, currentTarget: c2 }; } function oe(a2, b2) { for (var c2 = b2 + "Capture", d2 = []; a2 !== null; ) { var e2 = a2, f2 = e2.stateNode; e2.tag === 5 && f2 !== null && (e2 = f2, f2 = Kb(a2, c2), f2 != null && d2.unshift(tf(a2, f2, e2)), f2 = Kb(a2, b2), f2 != null && d2.push(tf(a2, f2, e2))); a2 = a2.return; } return d2; } function vf(a2) { if (a2 === null) return null; do a2 = a2.return; while (a2 && a2.tag !== 5); return a2 ? a2 : null; } function wf(a2, b2, c2, d2, e2) { for (var f2 = b2._reactName, g2 = []; c2 !== null && c2 !== d2; ) { var h2 = c2, k2 = h2.alternate, l2 = h2.stateNode; if (k2 !== null && k2 === d2) break; h2.tag === 5 && l2 !== null && (h2 = l2, e2 ? (k2 = Kb(c2, f2), k2 != null && g2.unshift(tf(c2, k2, h2))) : e2 || (k2 = Kb(c2, f2), k2 != null && g2.push(tf(c2, k2, h2)))); c2 = c2.return; } g2.length !== 0 && a2.push({ event: b2, listeners: g2 }); } var xf = /\r\n?/g; var yf = /\u0000|\uFFFD/g; function zf(a2) { return (typeof a2 === "string" ? a2 : "" + a2).replace(xf, "\n").replace(yf, ""); } function Af(a2, b2, c2) { b2 = zf(b2); if (zf(a2) !== b2 && c2) throw Error(p2(425)); } function Bf() { } var Cf = null; var Df = null; function Ef(a2, b2) { return a2 === "textarea" || a2 === "noscript" || typeof b2.children === "string" || typeof b2.children === "number" || typeof b2.dangerouslySetInnerHTML === "object" && b2.dangerouslySetInnerHTML !== null && b2.dangerouslySetInnerHTML.__html != null; } var Ff = typeof setTimeout === "function" ? setTimeout : void 0; var Gf = typeof clearTimeout === "function" ? clearTimeout : void 0; var Hf = typeof Promise === "function" ? Promise : void 0; var Jf = typeof queueMicrotask === "function" ? queueMicrotask : typeof Hf !== "undefined" ? function(a2) { return Hf.resolve(null).then(a2).catch(If); } : Ff; function If(a2) { setTimeout(function() { throw a2; }); } function Kf(a2, b2) { var c2 = b2, d2 = 0; do { var e2 = c2.nextSibling; a2.removeChild(c2); if (e2 && e2.nodeType === 8) if (c2 = e2.data, c2 === "/$") { if (d2 === 0) { a2.removeChild(e2); bd(b2); return; } d2--; } else c2 !== "$" && c2 !== "$?" && c2 !== "$!" || d2++; c2 = e2; } while (c2); bd(b2); } function Lf(a2) { for (; a2 != null; a2 = a2.nextSibling) { var b2 = a2.nodeType; if (b2 === 1 || b2 === 3) break; if (b2 === 8) { b2 = a2.data; if (b2 === "$" || b2 === "$!" || b2 === "$?") break; if (b2 === "/$") return null; } } return a2; } function Mf(a2) { a2 = a2.previousSibling; for (var b2 = 0; a2; ) { if (a2.nodeType === 8) { var c2 = a2.data; if (c2 === "$" || c2 === "$!" || c2 === "$?") { if (b2 === 0) return a2; b2--; } else c2 === "/$" && b2++; } a2 = a2.previousSibling; } return null; } var Nf = Math.random().toString(36).slice(2); var Of = "__reactFiber$" + Nf; var Pf = "__reactProps$" + Nf; var uf = "__reactContainer$" + Nf; var of = "__reactEvents$" + Nf; var Qf = "__reactListeners$" + Nf; var Rf = "__reactHandles$" + Nf; function Wc(a2) { var b2 = a2[Of]; if (b2) return b2; for (var c2 = a2.parentNode; c2; ) { if (b2 = c2[uf] || c2[Of]) { c2 = b2.alternate; if (b2.child !== null || c2 !== null && c2.child !== null) for (a2 = Mf(a2); a2 !== null; ) { if (c2 = a2[Of]) return c2; a2 = Mf(a2); } return b2; } a2 = c2; c2 = a2.parentNode; } return null; } function Cb(a2) { a2 = a2[Of] || a2[uf]; return !a2 || a2.tag !== 5 && a2.tag !== 6 && a2.tag !== 13 && a2.tag !== 3 ? null : a2; } function ue(a2) { if (a2.tag === 5 || a2.tag === 6) return a2.stateNode; throw Error(p2(33)); } function Db(a2) { return a2[Pf] || null; } var Sf = []; var Tf = -1; function Uf(a2) { return { current: a2 }; } function E2(a2) { 0 > Tf || (a2.current = Sf[Tf], Sf[Tf] = null, Tf--); } function G(a2, b2) { Tf++; Sf[Tf] = a2.current; a2.current = b2; } var Vf = {}; var H = Uf(Vf); var Wf = Uf(false); var Xf = Vf; function Yf(a2, b2) { var c2 = a2.type.contextTypes; if (!c2) return Vf; var d2 = a2.stateNode; if (d2 && d2.__reactInternalMemoizedUnmaskedChildContext === b2) return d2.__reactInternalMemoizedMaskedChildContext; var e2 = {}, f2; for (f2 in c2) e2[f2] = b2[f2]; d2 && (a2 = a2.stateNode, a2.__reactInternalMemoizedUnmaskedChildContext = b2, a2.__reactInternalMemoizedMaskedChildContext = e2); return e2; } function Zf(a2) { a2 = a2.childContextTypes; return a2 !== null && a2 !== void 0; } function $f() { E2(Wf); E2(H); } function ag(a2, b2, c2) { if (H.current !== Vf) throw Error(p2(168)); G(H, b2); G(Wf, c2); } function bg(a2, b2, c2) { var d2 = a2.stateNode; b2 = b2.childContextTypes; if (typeof d2.getChildContext !== "function") return c2; d2 = d2.getChildContext(); for (var e2 in d2) if (!(e2 in b2)) throw Error(p2(108, Ra(a2) || "Unknown", e2)); return A2({}, c2, d2); } function cg(a2) { a2 = (a2 = a2.stateNode) && a2.__reactInternalMemoizedMergedChildContext || Vf; Xf = H.current; G(H, a2); G(Wf, Wf.current); return true; } function dg(a2, b2, c2) { var d2 = a2.stateNode; if (!d2) throw Error(p2(169)); c2 ? (a2 = bg(a2, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a2, E2(Wf), E2(H), G(H, a2)) : E2(Wf); G(Wf, c2); } var eg = null; var fg = false; var gg = false; function hg(a2) { eg === null ? eg = [a2] : eg.push(a2); } function ig(a2) { fg = true; hg(a2); } function jg() { if (!gg && eg !== null) { gg = true; var a2 = 0, b2 = C2; try { var c2 = eg; for (C2 = 1; a2 < c2.length; a2++) { var d2 = c2[a2]; do d2 = d2(true); while (d2 !== null); } eg = null; fg = false; } catch (e2) { throw eg !== null && (eg = eg.slice(a2 + 1)), ac(fc, jg), e2; } finally { C2 = b2, gg = false; } } return null; } var kg = []; var lg = 0; var mg = null; var ng = 0; var og = []; var pg = 0; var qg = null; var rg = 1; var sg = ""; function tg(a2, b2) { kg[lg++] = ng; kg[lg++] = mg; mg = a2; ng = b2; } function ug(a2, b2, c2) { og[pg++] = rg; og[pg++] = sg; og[pg++] = qg; qg = a2; var d2 = rg; a2 = sg; var e2 = 32 - oc(d2) - 1; d2 &= ~(1 << e2); c2 += 1; var f2 = 32 - oc(b2) + e2; if (30 < f2) { var g2 = e2 - e2 % 5; f2 = (d2 & (1 << g2) - 1).toString(32); d2 >>= g2; e2 -= g2; rg = 1 << 32 - oc(b2) + e2 | c2 << e2 | d2; sg = f2 + a2; } else rg = 1 << f2 | c2 << e2 | d2, sg = a2; } function vg(a2) { a2.return !== null && (tg(a2, 1), ug(a2, 1, 0)); } function wg(a2) { for (; a2 === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null; for (; a2 === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null; } var xg = null; var yg = null; var I2 = false; var zg = null; function Ag(a2, b2) { var c2 = Bg(5, null, null, 0); c2.elementType = "DELETED"; c2.stateNode = b2; c2.return = a2; b2 = a2.deletions; b2 === null ? (a2.deletions = [c2], a2.flags |= 16) : b2.push(c2); } function Cg(a2, b2) { switch (a2.tag) { case 5: var c2 = a2.type; b2 = b2.nodeType !== 1 || c2.toLowerCase() !== b2.nodeName.toLowerCase() ? null : b2; return b2 !== null ? (a2.stateNode = b2, xg = a2, yg = Lf(b2.firstChild), true) : false; case 6: return b2 = a2.pendingProps === "" || b2.nodeType !== 3 ? null : b2, b2 !== null ? (a2.stateNode = b2, xg = a2, yg = null, true) : false; case 13: return b2 = b2.nodeType !== 8 ? null : b2, b2 !== null ? (c2 = qg !== null ? { id: rg, overflow: sg } : null, a2.memoizedState = { dehydrated: b2, treeContext: c2, retryLane: 1073741824 }, c2 = Bg(18, null, null, 0), c2.stateNode = b2, c2.return = a2, a2.child = c2, xg = a2, yg = null, true) : false; default: return false; } } function Dg(a2) { return (a2.mode & 1) !== 0 && (a2.flags & 128) === 0; } function Eg(a2) { if (I2) { var b2 = yg; if (b2) { var c2 = b2; if (!Cg(a2, b2)) { if (Dg(a2)) throw Error(p2(418)); b2 = Lf(c2.nextSibling); var d2 = xg; b2 && Cg(a2, b2) ? Ag(d2, c2) : (a2.flags = a2.flags & -4097 | 2, I2 = false, xg = a2); } } else { if (Dg(a2)) throw Error(p2(418)); a2.flags = a2.flags & -4097 | 2; I2 = false; xg = a2; } } } function Fg(a2) { for (a2 = a2.return; a2 !== null && a2.tag !== 5 && a2.tag !== 3 && a2.tag !== 13; ) a2 = a2.return; xg = a2; } function Gg(a2) { if (a2 !== xg) return false; if (!I2) return Fg(a2), I2 = true, false; var b2; (b2 = a2.tag !== 3) && !(b2 = a2.tag !== 5) && (b2 = a2.type, b2 = b2 !== "head" && b2 !== "body" && !Ef(a2.type, a2.memoizedProps)); if (b2 && (b2 = yg)) { if (Dg(a2)) throw Hg(), Error(p2(418)); for (; b2; ) Ag(a2, b2), b2 = Lf(b2.nextSibling); } Fg(a2); if (a2.tag === 13) { a2 = a2.memoizedState; a2 = a2 !== null ? a2.dehydrated : null; if (!a2) throw Error(p2(317)); a: { a2 = a2.nextSibling; for (b2 = 0; a2; ) { if (a2.nodeType === 8) { var c2 = a2.data; if (c2 === "/$") { if (b2 === 0) { yg = Lf(a2.nextSibling); break a; } b2--; } else c2 !== "$" && c2 !== "$!" && c2 !== "$?" || b2++; } a2 = a2.nextSibling; } yg = null; } } else yg = xg ? Lf(a2.stateNode.nextSibling) : null; return true; } function Hg() { for (var a2 = yg; a2; ) a2 = Lf(a2.nextSibling); } function Ig() { yg = xg = null; I2 = false; } function Jg(a2) { zg === null ? zg = [a2] : zg.push(a2); } var Kg = ua.ReactCurrentBatchConfig; function Lg(a2, b2) { if (a2 && a2.defaultProps) { b2 = A2({}, b2); a2 = a2.defaultProps; for (var c2 in a2) b2[c2] === void 0 && (b2[c2] = a2[c2]); return b2; } return b2; } var Mg = Uf(null); var Ng = null; var Og = null; var Pg = null; function Qg() { Pg = Og = Ng = null; } function Rg(a2) { var b2 = Mg.current; E2(Mg); a2._currentValue = b2; } function Sg(a2, b2, c2) { for (; a2 !== null; ) { var d2 = a2.alternate; (a2.childLanes & b2) !== b2 ? (a2.childLanes |= b2, d2 !== null && (d2.childLanes |= b2)) : d2 !== null && (d2.childLanes & b2) !== b2 && (d2.childLanes |= b2); if (a2 === c2) break; a2 = a2.return; } } function Tg(a2, b2) { Ng = a2; Pg = Og = null; a2 = a2.dependencies; a2 !== null && a2.firstContext !== null && ((a2.lanes & b2) !== 0 && (Ug = true), a2.firstContext = null); } function Vg(a2) { var b2 = a2._currentValue; if (Pg !== a2) if (a2 = { context: a2, memoizedValue: b2, next: null }, Og === null) { if (Ng === null) throw Error(p2(308)); Og = a2; Ng.dependencies = { lanes: 0, firstContext: a2 }; } else Og = Og.next = a2; return b2; } var Wg = null; function Xg(a2) { Wg === null ? Wg = [a2] : Wg.push(a2); } function Yg(a2, b2, c2, d2) { var e2 = b2.interleaved; e2 === null ? (c2.next = c2, Xg(b2)) : (c2.next = e2.next, e2.next = c2); b2.interleaved = c2; return Zg(a2, d2); } function Zg(a2, b2) { a2.lanes |= b2; var c2 = a2.alternate; c2 !== null && (c2.lanes |= b2); c2 = a2; for (a2 = a2.return; a2 !== null; ) a2.childLanes |= b2, c2 = a2.alternate, c2 !== null && (c2.childLanes |= b2), c2 = a2, a2 = a2.return; return c2.tag === 3 ? c2.stateNode : null; } var $g = false; function ah(a2) { a2.updateQueue = { baseState: a2.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null }; } function bh(a2, b2) { a2 = a2.updateQueue; b2.updateQueue === a2 && (b2.updateQueue = { baseState: a2.baseState, firstBaseUpdate: a2.firstBaseUpdate, lastBaseUpdate: a2.lastBaseUpdate, shared: a2.shared, effects: a2.effects }); } function ch(a2, b2) { return { eventTime: a2, lane: b2, tag: 0, payload: null, callback: null, next: null }; } function dh(a2, b2, c2) { var d2 = a2.updateQueue; if (d2 === null) return null; d2 = d2.shared; if ((K & 2) !== 0) { var e2 = d2.pending; e2 === null ? b2.next = b2 : (b2.next = e2.next, e2.next = b2); d2.pending = b2; return Zg(a2, c2); } e2 = d2.interleaved; e2 === null ? (b2.next = b2, Xg(d2)) : (b2.next = e2.next, e2.next = b2); d2.interleaved = b2; return Zg(a2, c2); } function eh(a2, b2, c2) { b2 = b2.updateQueue; if (b2 !== null && (b2 = b2.shared, (c2 & 4194240) !== 0)) { var d2 = b2.lanes; d2 &= a2.pendingLanes; c2 |= d2; b2.lanes = c2; Cc(a2, c2); } } function fh(a2, b2) { var c2 = a2.updateQueue, d2 = a2.alternate; if (d2 !== null && (d2 = d2.updateQueue, c2 === d2)) { var e2 = null, f2 = null; c2 = c2.firstBaseUpdate; if (c2 !== null) { do { var g2 = { eventTime: c2.eventTime, lane: c2.lane, tag: c2.tag, payload: c2.payload, callback: c2.callback, next: null }; f2 === null ? e2 = f2 = g2 : f2 = f2.next = g2; c2 = c2.next; } while (c2 !== null); f2 === null ? e2 = f2 = b2 : f2 = f2.next = b2; } else e2 = f2 = b2; c2 = { baseState: d2.baseState, firstBaseUpdate: e2, lastBaseUpdate: f2, shared: d2.shared, effects: d2.effects }; a2.updateQueue = c2; return; } a2 = c2.lastBaseUpdate; a2 === null ? c2.firstBaseUpdate = b2 : a2.next = b2; c2.lastBaseUpdate = b2; } function gh(a2, b2, c2, d2) { var e2 = a2.updateQueue; $g = false; var f2 = e2.firstBaseUpdate, g2 = e2.lastBaseUpdate, h2 = e2.shared.pending; if (h2 !== null) { e2.shared.pending = null; var k2 = h2, l2 = k2.next; k2.next = null; g2 === null ? f2 = l2 : g2.next = l2; g2 = k2; var m2 = a2.alternate; m2 !== null && (m2 = m2.updateQueue, h2 = m2.lastBaseUpdate, h2 !== g2 && (h2 === null ? m2.firstBaseUpdate = l2 : h2.next = l2, m2.lastBaseUpdate = k2)); } if (f2 !== null) { var q = e2.baseState; g2 = 0; m2 = l2 = k2 = null; h2 = f2; do { var r2 = h2.lane, y2 = h2.eventTime; if ((d2 & r2) === r2) { m2 !== null && (m2 = m2.next = { eventTime: y2, lane: 0, tag: h2.tag, payload: h2.payload, callback: h2.callback, next: null }); a: { var n2 = a2, t3 = h2; r2 = b2; y2 = c2; switch (t3.tag) { case 1: n2 = t3.payload; if (typeof n2 === "function") { q = n2.call(y2, q, r2); break a; } q = n2; break a; case 3: n2.flags = n2.flags & -65537 | 128; case 0: n2 = t3.payload; r2 = typeof n2 === "function" ? n2.call(y2, q, r2) : n2; if (r2 === null || r2 === void 0) break a; q = A2({}, q, r2); break a; case 2: $g = true; } } h2.callback !== null && h2.lane !== 0 && (a2.flags |= 64, r2 = e2.effects, r2 === null ? e2.effects = [h2] : r2.push(h2)); } else y2 = { eventTime: y2, lane: r2, tag: h2.tag, payload: h2.payload, callback: h2.callback, next: null }, m2 === null ? (l2 = m2 = y2, k2 = q) : m2 = m2.next = y2, g2 |= r2; h2 = h2.next; if (h2 === null) if (h2 = e2.shared.pending, h2 === null) break; else r2 = h2, h2 = r2.next, r2.next = null, e2.lastBaseUpdate = r2, e2.shared.pending = null; } while (1); m2 === null && (k2 = q); e2.baseState = k2; e2.firstBaseUpdate = l2; e2.lastBaseUpdate = m2; b2 = e2.shared.interleaved; if (b2 !== null) { e2 = b2; do g2 |= e2.lane, e2 = e2.next; while (e2 !== b2); } else f2 === null && (e2.shared.lanes = 0); hh |= g2; a2.lanes = g2; a2.memoizedState = q; } } function ih(a2, b2, c2) { a2 = b2.effects; b2.effects = null; if (a2 !== null) for (b2 = 0; b2 < a2.length; b2++) { var d2 = a2[b2], e2 = d2.callback; if (e2 !== null) { d2.callback = null; d2 = c2; if (typeof e2 !== "function") throw Error(p2(191, e2)); e2.call(d2); } } } var jh = new aa.Component().refs; function kh(a2, b2, c2, d2) { b2 = a2.memoizedState; c2 = c2(d2, b2); c2 = c2 === null || c2 === void 0 ? b2 : A2({}, b2, c2); a2.memoizedState = c2; a2.lanes === 0 && (a2.updateQueue.baseState = c2); } var nh = { isMounted: function(a2) { return (a2 = a2._reactInternals) ? Vb(a2) === a2 : false; }, enqueueSetState: function(a2, b2, c2) { a2 = a2._reactInternals; var d2 = L2(), e2 = lh(a2), f2 = ch(d2, e2); f2.payload = b2; c2 !== void 0 && c2 !== null && (f2.callback = c2); b2 = dh(a2, f2, e2); b2 !== null && (mh(b2, a2, e2, d2), eh(b2, a2, e2)); }, enqueueReplaceState: function(a2, b2, c2) { a2 = a2._reactInternals; var d2 = L2(), e2 = lh(a2), f2 = ch(d2, e2); f2.tag = 1; f2.payload = b2; c2 !== void 0 && c2 !== null && (f2.callback = c2); b2 = dh(a2, f2, e2); b2 !== null && (mh(b2, a2, e2, d2), eh(b2, a2, e2)); }, enqueueForceUpdate: function(a2, b2) { a2 = a2._reactInternals; var c2 = L2(), d2 = lh(a2), e2 = ch(c2, d2); e2.tag = 2; b2 !== void 0 && b2 !== null && (e2.callback = b2); b2 = dh(a2, e2, d2); b2 !== null && (mh(b2, a2, d2, c2), eh(b2, a2, d2)); } }; function oh(a2, b2, c2, d2, e2, f2, g2) { a2 = a2.stateNode; return typeof a2.shouldComponentUpdate === "function" ? a2.shouldComponentUpdate(d2, f2, g2) : b2.prototype && b2.prototype.isPureReactComponent ? !Ie(c2, d2) || !Ie(e2, f2) : true; } function ph(a2, b2, c2) { var d2 = false, e2 = Vf; var f2 = b2.contextType; typeof f2 === "object" && f2 !== null ? f2 = Vg(f2) : (e2 = Zf(b2) ? Xf : H.current, d2 = b2.contextTypes, f2 = (d2 = d2 !== null && d2 !== void 0) ? Yf(a2, e2) : Vf); b2 = new b2(c2, f2); a2.memoizedState = b2.state !== null && b2.state !== void 0 ? b2.state : null; b2.updater = nh; a2.stateNode = b2; b2._reactInternals = a2; d2 && (a2 = a2.stateNode, a2.__reactInternalMemoizedUnmaskedChildContext = e2, a2.__reactInternalMemoizedMaskedChildContext = f2); return b2; } function qh(a2, b2, c2, d2) { a2 = b2.state; typeof b2.componentWillReceiveProps === "function" && b2.componentWillReceiveProps(c2, d2); typeof b2.UNSAFE_componentWillReceiveProps === "function" && b2.UNSAFE_componentWillReceiveProps(c2, d2); b2.state !== a2 && nh.enqueueReplaceState(b2, b2.state, null); } function rh(a2, b2, c2, d2) { var e2 = a2.stateNode; e2.props = c2; e2.state = a2.memoizedState; e2.refs = jh; ah(a2); var f2 = b2.contextType; typeof f2 === "object" && f2 !== null ? e2.context = Vg(f2) : (f2 = Zf(b2) ? Xf : H.current, e2.context = Yf(a2, f2)); e2.state = a2.memoizedState; f2 = b2.getDerivedStateFromProps; typeof f2 === "function" && (kh(a2, b2, f2, c2), e2.state = a2.memoizedState); typeof b2.getDerivedStateFromProps === "function" || typeof e2.getSnapshotBeforeUpdate === "function" || typeof e2.UNSAFE_componentWillMount !== "function" && typeof e2.componentWillMount !== "function" || (b2 = e2.state, typeof e2.componentWillMount === "function" && e2.componentWillMount(), typeof e2.UNSAFE_componentWillMount === "function" && e2.UNSAFE_componentWillMount(), b2 !== e2.state && nh.enqueueReplaceState(e2, e2.state, null), gh(a2, c2, e2, d2), e2.state = a2.memoizedState); typeof e2.componentDidMount === "function" && (a2.flags |= 4194308); } function sh(a2, b2, c2) { a2 = c2.ref; if (a2 !== null && typeof a2 !== "function" && typeof a2 !== "object") { if (c2._owner) { c2 = c2._owner; if (c2) { if (c2.tag !== 1) throw Error(p2(309)); var d2 = c2.stateNode; } if (!d2) throw Error(p2(147, a2)); var e2 = d2, f2 = "" + a2; if (b2 !== null && b2.ref !== null && typeof b2.ref === "function" && b2.ref._stringRef === f2) return b2.ref; b2 = function(a3) { var b3 = e2.refs; b3 === jh && (b3 = e2.refs = {}); a3 === null ? delete b3[f2] : b3[f2] = a3; }; b2._stringRef = f2; return b2; } if (typeof a2 !== "string") throw Error(p2(284)); if (!c2._owner) throw Error(p2(290, a2)); } return a2; } function th(a2, b2) { a2 = Object.prototype.toString.call(b2); throw Error(p2(31, a2 === "[object Object]" ? "object with keys {" + Object.keys(b2).join(", ") + "}" : a2)); } function uh(a2) { var b2 = a2._init; return b2(a2._payload); } function vh(a2) { function b2(b3, c3) { if (a2) { var d3 = b3.deletions; d3 === null ? (b3.deletions = [c3], b3.flags |= 16) : d3.push(c3); } } function c2(c3, d3) { if (!a2) return null; for (; d3 !== null; ) b2(c3, d3), d3 = d3.sibling; return null; } function d2(a3, b3) { for (a3 = /* @__PURE__ */ new Map(); b3 !== null; ) b3.key !== null ? a3.set(b3.key, b3) : a3.set(b3.index, b3), b3 = b3.sibling; return a3; } function e2(a3, b3) { a3 = wh(a3, b3); a3.index = 0; a3.sibling = null; return a3; } function f2(b3, c3, d3) { b3.index = d3; if (!a2) return b3.flags |= 1048576, c3; d3 = b3.alternate; if (d3 !== null) return d3 = d3.index, d3 < c3 ? (b3.flags |= 2, c3) : d3; b3.flags |= 2; return c3; } function g2(b3) { a2 && b3.alternate === null && (b3.flags |= 2); return b3; } function h2(a3, b3, c3, d3) { if (b3 === null || b3.tag !== 6) return b3 = xh(c3, a3.mode, d3), b3.return = a3, b3; b3 = e2(b3, c3); b3.return = a3; return b3; } function k2(a3, b3, c3, d3) { var f3 = c3.type; if (f3 === ya) return m2(a3, b3, c3.props.children, d3, c3.key); if (b3 !== null && (b3.elementType === f3 || typeof f3 === "object" && f3 !== null && f3.$$typeof === Ha && uh(f3) === b3.type)) return d3 = e2(b3, c3.props), d3.ref = sh(a3, b3, c3), d3.return = a3, d3; d3 = yh(c3.type, c3.key, c3.props, null, a3.mode, d3); d3.ref = sh(a3, b3, c3); d3.return = a3; return d3; } function l2(a3, b3, c3, d3) { if (b3 === null || b3.tag !== 4 || b3.stateNode.containerInfo !== c3.containerInfo || b3.stateNode.implementation !== c3.implementation) return b3 = zh(c3, a3.mode, d3), b3.return = a3, b3; b3 = e2(b3, c3.children || []); b3.return = a3; return b3; } function m2(a3, b3, c3, d3, f3) { if (b3 === null || b3.tag !== 7) return b3 = Ah(c3, a3.mode, d3, f3), b3.return = a3, b3; b3 = e2(b3, c3); b3.return = a3; return b3; } function q(a3, b3, c3) { if (typeof b3 === "string" && b3 !== "" || typeof b3 === "number") return b3 = xh("" + b3, a3.mode, c3), b3.return = a3, b3; if (typeof b3 === "object" && b3 !== null) { switch (b3.$$typeof) { case va: return c3 = yh(b3.type, b3.key, b3.props, null, a3.mode, c3), c3.ref = sh(a3, null, b3), c3.return = a3, c3; case wa: return b3 = zh(b3, a3.mode, c3), b3.return = a3, b3; case Ha: var d3 = b3._init; return q(a3, d3(b3._payload), c3); } if (eb(b3) || Ka(b3)) return b3 = Ah(b3, a3.mode, c3, null), b3.return = a3, b3; th(a3, b3); } return null; } function r2(a3, b3, c3, d3) { var e3 = b3 !== null ? b3.key : null; if (typeof c3 === "string" && c3 !== "" || typeof c3 === "number") return e3 !== null ? null : h2(a3, b3, "" + c3, d3); if (typeof c3 === "object" && c3 !== null) { switch (c3.$$typeof) { case va: return c3.key === e3 ? k2(a3, b3, c3, d3) : null; case wa: return c3.key === e3 ? l2(a3, b3, c3, d3) : null; case Ha: return e3 = c3._init, r2(a3, b3, e3(c3._payload), d3); } if (eb(c3) || Ka(c3)) return e3 !== null ? null : m2(a3, b3, c3, d3, null); th(a3, c3); } return null; } function y2(a3, b3, c3, d3, e3) { if (typeof d3 === "string" && d3 !== "" || typeof d3 === "number") return a3 = a3.get(c3) || null, h2(b3, a3, "" + d3, e3); if (typeof d3 === "object" && d3 !== null) { switch (d3.$$typeof) { case va: return a3 = a3.get(d3.key === null ? c3 : d3.key) || null, k2(b3, a3, d3, e3); case wa: return a3 = a3.get(d3.key === null ? c3 : d3.key) || null, l2(b3, a3, d3, e3); case Ha: var f3 = d3._init; return y2(a3, b3, c3, f3(d3._payload), e3); } if (eb(d3) || Ka(d3)) return a3 = a3.get(c3) || null, m2(b3, a3, d3, e3, null); th(b3, d3); } return null; } function n2(e3, g3, h3, k3) { for (var l3 = null, m3 = null, u2 = g3, w2 = g3 = 0, x2 = null; u2 !== null && w2 < h3.length; w2++) { u2.index > w2 ? (x2 = u2, u2 = null) : x2 = u2.sibling; var n3 = r2(e3, u2, h3[w2], k3); if (n3 === null) { u2 === null && (u2 = x2); break; } a2 && u2 && n3.alternate === null && b2(e3, u2); g3 = f2(n3, g3, w2); m3 === null ? l3 = n3 : m3.sibling = n3; m3 = n3; u2 = x2; } if (w2 === h3.length) return c2(e3, u2), I2 && tg(e3, w2), l3; if (u2 === null) { for (; w2 < h3.length; w2++) u2 = q(e3, h3[w2], k3), u2 !== null && (g3 = f2(u2, g3, w2), m3 === null ? l3 = u2 : m3.sibling = u2, m3 = u2); I2 && tg(e3, w2); return l3; } for (u2 = d2(e3, u2); w2 < h3.length; w2++) x2 = y2(u2, e3, w2, h3[w2], k3), x2 !== null && (a2 && x2.alternate !== null && u2.delete(x2.key === null ? w2 : x2.key), g3 = f2(x2, g3, w2), m3 === null ? l3 = x2 : m3.sibling = x2, m3 = x2); a2 && u2.forEach(function(a3) { return b2(e3, a3); }); I2 && tg(e3, w2); return l3; } function t3(e3, g3, h3, k3) { var l3 = Ka(h3); if (typeof l3 !== "function") throw Error(p2(150)); h3 = l3.call(h3); if (h3 == null) throw Error(p2(151)); for (var u2 = l3 = null, m3 = g3, w2 = g3 = 0, x2 = null, n3 = h3.next(); m3 !== null && !n3.done; w2++, n3 = h3.next()) { m3.index > w2 ? (x2 = m3, m3 = null) : x2 = m3.sibling; var t4 = r2(e3, m3, n3.value, k3); if (t4 === null) { m3 === null && (m3 = x2); break; } a2 && m3 && t4.alternate === null && b2(e3, m3); g3 = f2(t4, g3, w2); u2 === null ? l3 = t4 : u2.sibling = t4; u2 = t4; m3 = x2; } if (n3.done) return c2(e3, m3), I2 && tg(e3, w2), l3; if (m3 === null) { for (; !n3.done; w2++, n3 = h3.next()) n3 = q(e3, n3.value, k3), n3 !== null && (g3 = f2(n3, g3, w2), u2 === null ? l3 = n3 : u2.sibling = n3, u2 = n3); I2 && tg(e3, w2); return l3; } for (m3 = d2(e3, m3); !n3.done; w2++, n3 = h3.next()) n3 = y2(m3, e3, w2, n3.value, k3), n3 !== null && (a2 && n3.alternate !== null && m3.delete(n3.key === null ? w2 : n3.key), g3 = f2(n3, g3, w2), u2 === null ? l3 = n3 : u2.sibling = n3, u2 = n3); a2 && m3.forEach(function(a3) { return b2(e3, a3); }); I2 && tg(e3, w2); return l3; } function J(a3, d3, f3, h3) { typeof f3 === "object" && f3 !== null && f3.type === ya && f3.key === null && (f3 = f3.props.children); if (typeof f3 === "object" && f3 !== null) { switch (f3.$$typeof) { case va: a: { for (var k3 = f3.key, l3 = d3; l3 !== null; ) { if (l3.key === k3) { k3 = f3.type; if (k3 === ya) { if (l3.tag === 7) { c2(a3, l3.sibling); d3 = e2(l3, f3.props.children); d3.return = a3; a3 = d3; break a; } } else if (l3.elementType === k3 || typeof k3 === "object" && k3 !== null && k3.$$typeof === Ha && uh(k3) === l3.type) { c2(a3, l3.sibling); d3 = e2(l3, f3.props); d3.ref = sh(a3, l3, f3); d3.return = a3; a3 = d3; break a; } c2(a3, l3); break; } else b2(a3, l3); l3 = l3.sibling; } f3.type === ya ? (d3 = Ah(f3.props.children, a3.mode, h3, f3.key), d3.return = a3, a3 = d3) : (h3 = yh(f3.type, f3.key, f3.props, null, a3.mode, h3), h3.ref = sh(a3, d3, f3), h3.return = a3, a3 = h3); } return g2(a3); case wa: a: { for (l3 = f3.key; d3 !== null; ) { if (d3.key === l3) if (d3.tag === 4 && d3.stateNode.containerInfo === f3.containerInfo && d3.stateNode.implementation === f3.implementation) { c2(a3, d3.sibling); d3 = e2(d3, f3.children || []); d3.return = a3; a3 = d3; break a; } else { c2(a3, d3); break; } else b2(a3, d3); d3 = d3.sibling; } d3 = zh(f3, a3.mode, h3); d3.return = a3; a3 = d3; } return g2(a3); case Ha: return l3 = f3._init, J(a3, d3, l3(f3._payload), h3); } if (eb(f3)) return n2(a3, d3, f3, h3); if (Ka(f3)) return t3(a3, d3, f3, h3); th(a3, f3); } return typeof f3 === "string" && f3 !== "" || typeof f3 === "number" ? (f3 = "" + f3, d3 !== null && d3.tag === 6 ? (c2(a3, d3.sibling), d3 = e2(d3, f3), d3.return = a3, a3 = d3) : (c2(a3, d3), d3 = xh(f3, a3.mode, h3), d3.return = a3, a3 = d3), g2(a3)) : c2(a3, d3); } return J; } var Bh = vh(true); var Ch = vh(false); var Dh = {}; var Eh = Uf(Dh); var Fh = Uf(Dh); var Gh = Uf(Dh); function Hh(a2) { if (a2 === Dh) throw Error(p2(174)); return a2; } function Ih(a2, b2) { G(Gh, b2); G(Fh, a2); G(Eh, Dh); a2 = b2.nodeType; switch (a2) { case 9: case 11: b2 = (b2 = b2.documentElement) ? b2.namespaceURI : lb(null, ""); break; default: a2 = a2 === 8 ? b2.parentNode : b2, b2 = a2.namespaceURI || null, a2 = a2.tagName, b2 = lb(b2, a2); } E2(Eh); G(Eh, b2); } function Jh() { E2(Eh); E2(Fh); E2(Gh); } function Kh(a2) { Hh(Gh.current); var b2 = Hh(Eh.current); var c2 = lb(b2, a2.type); b2 !== c2 && (G(Fh, a2), G(Eh, c2)); } function Lh(a2) { Fh.current === a2 && (E2(Eh), E2(Fh)); } var M2 = Uf(0); function Mh(a2) { for (var b2 = a2; b2 !== null; ) { if (b2.tag === 13) { var c2 = b2.memoizedState; if (c2 !== null && (c2 = c2.dehydrated, c2 === null || c2.data === "$?" || c2.data === "$!")) return b2; } else if (b2.tag === 19 && b2.memoizedProps.revealOrder !== void 0) { if ((b2.flags & 128) !== 0) return b2; } else if (b2.child !== null) { b2.child.return = b2; b2 = b2.child; continue; } if (b2 === a2) break; for (; b2.sibling === null; ) { if (b2.return === null || b2.return === a2) return null; b2 = b2.return; } b2.sibling.return = b2.return; b2 = b2.sibling; } return null; } var Nh = []; function Oh() { for (var a2 = 0; a2 < Nh.length; a2++) Nh[a2]._workInProgressVersionPrimary = null; Nh.length = 0; } var Ph = ua.ReactCurrentDispatcher; var Qh = ua.ReactCurrentBatchConfig; var Rh = 0; var N2 = null; var O2 = null; var P2 = null; var Sh = false; var Th = false; var Uh = 0; var Vh = 0; function Q() { throw Error(p2(321)); } function Wh(a2, b2) { if (b2 === null) return false; for (var c2 = 0; c2 < b2.length && c2 < a2.length; c2++) if (!He(a2[c2], b2[c2])) return false; return true; } function Xh(a2, b2, c2, d2, e2, f2) { Rh = f2; N2 = b2; b2.memoizedState = null; b2.updateQueue = null; b2.lanes = 0; Ph.current = a2 === null || a2.memoizedState === null ? Yh : Zh; a2 = c2(d2, e2); if (Th) { f2 = 0; do { Th = false; Uh = 0; if (25 <= f2) throw Error(p2(301)); f2 += 1; P2 = O2 = null; b2.updateQueue = null; Ph.current = $h; a2 = c2(d2, e2); } while (Th); } Ph.current = ai; b2 = O2 !== null && O2.next !== null; Rh = 0; P2 = O2 = N2 = null; Sh = false; if (b2) throw Error(p2(300)); return a2; } function bi() { var a2 = Uh !== 0; Uh = 0; return a2; } function ci() { var a2 = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; P2 === null ? N2.memoizedState = P2 = a2 : P2 = P2.next = a2; return P2; } function di() { if (O2 === null) { var a2 = N2.alternate; a2 = a2 !== null ? a2.memoizedState : null; } else a2 = O2.next; var b2 = P2 === null ? N2.memoizedState : P2.next; if (b2 !== null) P2 = b2, O2 = a2; else { if (a2 === null) throw Error(p2(310)); O2 = a2; a2 = { memoizedState: O2.memoizedState, baseState: O2.baseState, baseQueue: O2.baseQueue, queue: O2.queue, next: null }; P2 === null ? N2.memoizedState = P2 = a2 : P2 = P2.next = a2; } return P2; } function ei(a2, b2) { return typeof b2 === "function" ? b2(a2) : b2; } function fi(a2) { var b2 = di(), c2 = b2.queue; if (c2 === null) throw Error(p2(311)); c2.lastRenderedReducer = a2; var d2 = O2, e2 = d2.baseQueue, f2 = c2.pending; if (f2 !== null) { if (e2 !== null) { var g2 = e2.next; e2.next = f2.next; f2.next = g2; } d2.baseQueue = e2 = f2; c2.pending = null; } if (e2 !== null) { f2 = e2.next; d2 = d2.baseState; var h2 = g2 = null, k2 = null, l2 = f2; do { var m2 = l2.lane; if ((Rh & m2) === m2) k2 !== null && (k2 = k2.next = { lane: 0, action: l2.action, hasEagerState: l2.hasEagerState, eagerState: l2.eagerState, next: null }), d2 = l2.hasEagerState ? l2.eagerState : a2(d2, l2.action); else { var q = { lane: m2, action: l2.action, hasEagerState: l2.hasEagerState, eagerState: l2.eagerState, next: null }; k2 === null ? (h2 = k2 = q, g2 = d2) : k2 = k2.next = q; N2.lanes |= m2; hh |= m2; } l2 = l2.next; } while (l2 !== null && l2 !== f2); k2 === null ? g2 = d2 : k2.next = h2; He(d2, b2.memoizedState) || (Ug = true); b2.memoizedState = d2; b2.baseState = g2; b2.baseQueue = k2; c2.lastRenderedState = d2; } a2 = c2.interleaved; if (a2 !== null) { e2 = a2; do f2 = e2.lane, N2.lanes |= f2, hh |= f2, e2 = e2.next; while (e2 !== a2); } else e2 === null && (c2.lanes = 0); return [b2.memoizedState, c2.dispatch]; } function gi(a2) { var b2 = di(), c2 = b2.queue; if (c2 === null) throw Error(p2(311)); c2.lastRenderedReducer = a2; var d2 = c2.dispatch, e2 = c2.pending, f2 = b2.memoizedState; if (e2 !== null) { c2.pending = null; var g2 = e2 = e2.next; do f2 = a2(f2, g2.action), g2 = g2.next; while (g2 !== e2); He(f2, b2.memoizedState) || (Ug = true); b2.memoizedState = f2; b2.baseQueue === null && (b2.baseState = f2); c2.lastRenderedState = f2; } return [f2, d2]; } function hi() { } function ii(a2, b2) { var c2 = N2, d2 = di(), e2 = b2(), f2 = !He(d2.memoizedState, e2); f2 && (d2.memoizedState = e2, Ug = true); d2 = d2.queue; ji(ki.bind(null, c2, d2, a2), [a2]); if (d2.getSnapshot !== b2 || f2 || P2 !== null && P2.memoizedState.tag & 1) { c2.flags |= 2048; li(9, mi.bind(null, c2, d2, e2, b2), void 0, null); if (R2 === null) throw Error(p2(349)); (Rh & 30) !== 0 || ni(c2, b2, e2); } return e2; } function ni(a2, b2, c2) { a2.flags |= 16384; a2 = { getSnapshot: b2, value: c2 }; b2 = N2.updateQueue; b2 === null ? (b2 = { lastEffect: null, stores: null }, N2.updateQueue = b2, b2.stores = [a2]) : (c2 = b2.stores, c2 === null ? b2.stores = [a2] : c2.push(a2)); } function mi(a2, b2, c2, d2) { b2.value = c2; b2.getSnapshot = d2; oi(b2) && pi(a2); } function ki(a2, b2, c2) { return c2(function() { oi(b2) && pi(a2); }); } function oi(a2) { var b2 = a2.getSnapshot; a2 = a2.value; try { var c2 = b2(); return !He(a2, c2); } catch (d2) { return true; } } function pi(a2) { var b2 = Zg(a2, 1); b2 !== null && mh(b2, a2, 1, -1); } function qi(a2) { var b2 = ci(); typeof a2 === "function" && (a2 = a2()); b2.memoizedState = b2.baseState = a2; a2 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: ei, lastRenderedState: a2 }; b2.queue = a2; a2 = a2.dispatch = ri.bind(null, N2, a2); return [b2.memoizedState, a2]; } function li(a2, b2, c2, d2) { a2 = { tag: a2, create: b2, destroy: c2, deps: d2, next: null }; b2 = N2.updateQueue; b2 === null ? (b2 = { lastEffect: null, stores: null }, N2.updateQueue = b2, b2.lastEffect = a2.next = a2) : (c2 = b2.lastEffect, c2 === null ? b2.lastEffect = a2.next = a2 : (d2 = c2.next, c2.next = a2, a2.next = d2, b2.lastEffect = a2)); return a2; } function si() { return di().memoizedState; } function ti(a2, b2, c2, d2) { var e2 = ci(); N2.flags |= a2; e2.memoizedState = li(1 | b2, c2, void 0, d2 === void 0 ? null : d2); } function ui(a2, b2, c2, d2) { var e2 = di(); d2 = d2 === void 0 ? null : d2; var f2 = void 0; if (O2 !== null) { var g2 = O2.memoizedState; f2 = g2.destroy; if (d2 !== null && Wh(d2, g2.deps)) { e2.memoizedState = li(b2, c2, f2, d2); return; } } N2.flags |= a2; e2.memoizedState = li(1 | b2, c2, f2, d2); } function vi(a2, b2) { return ti(8390656, 8, a2, b2); } function ji(a2, b2) { return ui(2048, 8, a2, b2); } function wi(a2, b2) { return ui(4, 2, a2, b2); } function xi(a2, b2) { return ui(4, 4, a2, b2); } function yi(a2, b2) { if (typeof b2 === "function") return a2 = a2(), b2(a2), function() { b2(null); }; if (b2 !== null && b2 !== void 0) return a2 = a2(), b2.current = a2, function() { b2.current = null; }; } function zi(a2, b2, c2) { c2 = c2 !== null && c2 !== void 0 ? c2.concat([a2]) : null; return ui(4, 4, yi.bind(null, b2, a2), c2); } function Ai() { } function Bi(a2, b2) { var c2 = di(); b2 = b2 === void 0 ? null : b2; var d2 = c2.memoizedState; if (d2 !== null && b2 !== null && Wh(b2, d2[1])) return d2[0]; c2.memoizedState = [a2, b2]; return a2; } function Ci(a2, b2) { var c2 = di(); b2 = b2 === void 0 ? null : b2; var d2 = c2.memoizedState; if (d2 !== null && b2 !== null && Wh(b2, d2[1])) return d2[0]; a2 = a2(); c2.memoizedState = [a2, b2]; return a2; } function Di(a2, b2, c2) { if ((Rh & 21) === 0) return a2.baseState && (a2.baseState = false, Ug = true), a2.memoizedState = c2; He(c2, b2) || (c2 = yc(), N2.lanes |= c2, hh |= c2, a2.baseState = true); return b2; } function Ei(a2, b2) { var c2 = C2; C2 = c2 !== 0 && 4 > c2 ? c2 : 4; a2(true); var d2 = Qh.transition; Qh.transition = {}; try { a2(false), b2(); } finally { C2 = c2, Qh.transition = d2; } } function Fi() { return di().memoizedState; } function Gi(a2, b2, c2) { var d2 = lh(a2); c2 = { lane: d2, action: c2, hasEagerState: false, eagerState: null, next: null }; if (Hi(a2)) Ii(b2, c2); else if (c2 = Yg(a2, b2, c2, d2), c2 !== null) { var e2 = L2(); mh(c2, a2, d2, e2); Ji(c2, b2, d2); } } function ri(a2, b2, c2) { var d2 = lh(a2), e2 = { lane: d2, action: c2, hasEagerState: false, eagerState: null, next: null }; if (Hi(a2)) Ii(b2, e2); else { var f2 = a2.alternate; if (a2.lanes === 0 && (f2 === null || f2.lanes === 0) && (f2 = b2.lastRenderedReducer, f2 !== null)) try { var g2 = b2.lastRenderedState, h2 = f2(g2, c2); e2.hasEagerState = true; e2.eagerState = h2; if (He(h2, g2)) { var k2 = b2.interleaved; k2 === null ? (e2.next = e2, Xg(b2)) : (e2.next = k2.next, k2.next = e2); b2.interleaved = e2; return; } } catch (l2) { } finally { } c2 = Yg(a2, b2, e2, d2); c2 !== null && (e2 = L2(), mh(c2, a2, d2, e2), Ji(c2, b2, d2)); } } function Hi(a2) { var b2 = a2.alternate; return a2 === N2 || b2 !== null && b2 === N2; } function Ii(a2, b2) { Th = Sh = true; var c2 = a2.pending; c2 === null ? b2.next = b2 : (b2.next = c2.next, c2.next = b2); a2.pending = b2; } function Ji(a2, b2, c2) { if ((c2 & 4194240) !== 0) { var d2 = b2.lanes; d2 &= a2.pendingLanes; c2 |= d2; b2.lanes = c2; Cc(a2, c2); } } var ai = { readContext: Vg, useCallback: Q, useContext: Q, useEffect: Q, useImperativeHandle: Q, useInsertionEffect: Q, useLayoutEffect: Q, useMemo: Q, useReducer: Q, useRef: Q, useState: Q, useDebugValue: Q, useDeferredValue: Q, useTransition: Q, useMutableSource: Q, useSyncExternalStore: Q, useId: Q, unstable_isNewReconciler: false }; var Yh = { readContext: Vg, useCallback: function(a2, b2) { ci().memoizedState = [a2, b2 === void 0 ? null : b2]; return a2; }, useContext: Vg, useEffect: vi, useImperativeHandle: function(a2, b2, c2) { c2 = c2 !== null && c2 !== void 0 ? c2.concat([a2]) : null; return ti(4194308, 4, yi.bind(null, b2, a2), c2); }, useLayoutEffect: function(a2, b2) { return ti(4194308, 4, a2, b2); }, useInsertionEffect: function(a2, b2) { return ti(4, 2, a2, b2); }, useMemo: function(a2, b2) { var c2 = ci(); b2 = b2 === void 0 ? null : b2; a2 = a2(); c2.memoizedState = [a2, b2]; return a2; }, useReducer: function(a2, b2, c2) { var d2 = ci(); b2 = c2 !== void 0 ? c2(b2) : b2; d2.memoizedState = d2.baseState = b2; a2 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a2, lastRenderedState: b2 }; d2.queue = a2; a2 = a2.dispatch = Gi.bind(null, N2, a2); return [d2.memoizedState, a2]; }, useRef: function(a2) { var b2 = ci(); a2 = { current: a2 }; return b2.memoizedState = a2; }, useState: qi, useDebugValue: Ai, useDeferredValue: function(a2) { return ci().memoizedState = a2; }, useTransition: function() { var a2 = qi(false), b2 = a2[0]; a2 = Ei.bind(null, a2[1]); ci().memoizedState = a2; return [b2, a2]; }, useMutableSource: function() { }, useSyncExternalStore: function(a2, b2, c2) { var d2 = N2, e2 = ci(); if (I2) { if (c2 === void 0) throw Error(p2(407)); c2 = c2(); } else { c2 = b2(); if (R2 === null) throw Error(p2(349)); (Rh & 30) !== 0 || ni(d2, b2, c2); } e2.memoizedState = c2; var f2 = { value: c2, getSnapshot: b2 }; e2.queue = f2; vi(ki.bind(null, d2, f2, a2), [a2]); d2.flags |= 2048; li(9, mi.bind(null, d2, f2, c2, b2), void 0, null); return c2; }, useId: function() { var a2 = ci(), b2 = R2.identifierPrefix; if (I2) { var c2 = sg; var d2 = rg; c2 = (d2 & ~(1 << 32 - oc(d2) - 1)).toString(32) + c2; b2 = ":" + b2 + "R" + c2; c2 = Uh++; 0 < c2 && (b2 += "H" + c2.toString(32)); b2 += ":"; } else c2 = Vh++, b2 = ":" + b2 + "r" + c2.toString(32) + ":"; return a2.memoizedState = b2; }, unstable_isNewReconciler: false }; var Zh = { readContext: Vg, useCallback: Bi, useContext: Vg, useEffect: ji, useImperativeHandle: zi, useInsertionEffect: wi, useLayoutEffect: xi, useMemo: Ci, useReducer: fi, useRef: si, useState: function() { return fi(ei); }, useDebugValue: Ai, useDeferredValue: function(a2) { var b2 = di(); return Di(b2, O2.memoizedState, a2); }, useTransition: function() { var a2 = fi(ei)[0], b2 = di().memoizedState; return [a2, b2]; }, useMutableSource: hi, useSyncExternalStore: ii, useId: Fi, unstable_isNewReconciler: false }; var $h = { readContext: Vg, useCallback: Bi, useContext: Vg, useEffect: ji, useImperativeHandle: zi, useInsertionEffect: wi, useLayoutEffect: xi, useMemo: Ci, useReducer: gi, useRef: si, useState: function() { return gi(ei); }, useDebugValue: Ai, useDeferredValue: function(a2) { var b2 = di(); return O2 === null ? b2.memoizedState = a2 : Di(b2, O2.memoizedState, a2); }, useTransition: function() { var a2 = gi(ei)[0], b2 = di().memoizedState; return [a2, b2]; }, useMutableSource: hi, useSyncExternalStore: ii, useId: Fi, unstable_isNewReconciler: false }; function Ki(a2, b2) { try { var c2 = "", d2 = b2; do c2 += Pa(d2), d2 = d2.return; while (d2); var e2 = c2; } catch (f2) { e2 = "\nError generating stack: " + f2.message + "\n" + f2.stack; } return { value: a2, source: b2, stack: e2, digest: null }; } function Li(a2, b2, c2) { return { value: a2, source: null, stack: c2 != null ? c2 : null, digest: b2 != null ? b2 : null }; } function Mi(a2, b2) { try { console.error(b2.value); } catch (c2) { setTimeout(function() { throw c2; }); } } var Ni = typeof WeakMap === "function" ? WeakMap : Map; function Oi(a2, b2, c2) { c2 = ch(-1, c2); c2.tag = 3; c2.payload = { element: null }; var d2 = b2.value; c2.callback = function() { Pi || (Pi = true, Qi = d2); Mi(a2, b2); }; return c2; } function Ri(a2, b2, c2) { c2 = ch(-1, c2); c2.tag = 3; var d2 = a2.type.getDerivedStateFromError; if (typeof d2 === "function") { var e2 = b2.value; c2.payload = function() { return d2(e2); }; c2.callback = function() { Mi(a2, b2); }; } var f2 = a2.stateNode; f2 !== null && typeof f2.componentDidCatch === "function" && (c2.callback = function() { Mi(a2, b2); typeof d2 !== "function" && (Si === null ? Si = /* @__PURE__ */ new Set([this]) : Si.add(this)); var c3 = b2.stack; this.componentDidCatch(b2.value, { componentStack: c3 !== null ? c3 : "" }); }); return c2; } function Ti(a2, b2, c2) { var d2 = a2.pingCache; if (d2 === null) { d2 = a2.pingCache = new Ni(); var e2 = /* @__PURE__ */ new Set(); d2.set(b2, e2); } else e2 = d2.get(b2), e2 === void 0 && (e2 = /* @__PURE__ */ new Set(), d2.set(b2, e2)); e2.has(c2) || (e2.add(c2), a2 = Ui.bind(null, a2, b2, c2), b2.then(a2, a2)); } function Vi(a2) { do { var b2; if (b2 = a2.tag === 13) b2 = a2.memoizedState, b2 = b2 !== null ? b2.dehydrated !== null ? true : false : true; if (b2) return a2; a2 = a2.return; } while (a2 !== null); return null; } function Wi(a2, b2, c2, d2, e2) { if ((a2.mode & 1) === 0) return a2 === b2 ? a2.flags |= 65536 : (a2.flags |= 128, c2.flags |= 131072, c2.flags &= -52805, c2.tag === 1 && (c2.alternate === null ? c2.tag = 17 : (b2 = ch(-1, 1), b2.tag = 2, dh(c2, b2, 1))), c2.lanes |= 1), a2; a2.flags |= 65536; a2.lanes = e2; return a2; } var Xi = ua.ReactCurrentOwner; var Ug = false; function Yi(a2, b2, c2, d2) { b2.child = a2 === null ? Ch(b2, null, c2, d2) : Bh(b2, a2.child, c2, d2); } function Zi(a2, b2, c2, d2, e2) { c2 = c2.render; var f2 = b2.ref; Tg(b2, e2); d2 = Xh(a2, b2, c2, d2, f2, e2); c2 = bi(); if (a2 !== null && !Ug) return b2.updateQueue = a2.updateQueue, b2.flags &= -2053, a2.lanes &= ~e2, $i(a2, b2, e2); I2 && c2 && vg(b2); b2.flags |= 1; Yi(a2, b2, d2, e2); return b2.child; } function aj(a2, b2, c2, d2, e2) { if (a2 === null) { var f2 = c2.type; if (typeof f2 === "function" && !bj(f2) && f2.defaultProps === void 0 && c2.compare === null && c2.defaultProps === void 0) return b2.tag = 15, b2.type = f2, cj(a2, b2, f2, d2, e2); a2 = yh(c2.type, null, d2, b2, b2.mode, e2); a2.ref = b2.ref; a2.return = b2; return b2.child = a2; } f2 = a2.child; if ((a2.lanes & e2) === 0) { var g2 = f2.memoizedProps; c2 = c2.compare; c2 = c2 !== null ? c2 : Ie; if (c2(g2, d2) && a2.ref === b2.ref) return $i(a2, b2, e2); } b2.flags |= 1; a2 = wh(f2, d2); a2.ref = b2.ref; a2.return = b2; return b2.child = a2; } function cj(a2, b2, c2, d2, e2) { if (a2 !== null) { var f2 = a2.memoizedProps; if (Ie(f2, d2) && a2.ref === b2.ref) if (Ug = false, b2.pendingProps = d2 = f2, (a2.lanes & e2) !== 0) (a2.flags & 131072) !== 0 && (Ug = true); else return b2.lanes = a2.lanes, $i(a2, b2, e2); } return dj(a2, b2, c2, d2, e2); } function ej(a2, b2, c2) { var d2 = b2.pendingProps, e2 = d2.children, f2 = a2 !== null ? a2.memoizedState : null; if (d2.mode === "hidden") if ((b2.mode & 1) === 0) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G(fj, gj), gj |= c2; else { if ((c2 & 1073741824) === 0) return a2 = f2 !== null ? f2.baseLanes | c2 : c2, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a2, cachePool: null, transitions: null }, b2.updateQueue = null, G(fj, gj), gj |= a2, null; b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }; d2 = f2 !== null ? f2.baseLanes : c2; G(fj, gj); gj |= d2; } else f2 !== null ? (d2 = f2.baseLanes | c2, b2.memoizedState = null) : d2 = c2, G(fj, gj), gj |= d2; Yi(a2, b2, e2, c2); return b2.child; } function hj(a2, b2) { var c2 = b2.ref; if (a2 === null && c2 !== null || a2 !== null && a2.ref !== c2) b2.flags |= 512, b2.flags |= 2097152; } function dj(a2, b2, c2, d2, e2) { var f2 = Zf(c2) ? Xf : H.current; f2 = Yf(b2, f2); Tg(b2, e2); c2 = Xh(a2, b2, c2, d2, f2, e2); d2 = bi(); if (a2 !== null && !Ug) return b2.updateQueue = a2.updateQueue, b2.flags &= -2053, a2.lanes &= ~e2, $i(a2, b2, e2); I2 && d2 && vg(b2); b2.flags |= 1; Yi(a2, b2, c2, e2); return b2.child; } function ij(a2, b2, c2, d2, e2) { if (Zf(c2)) { var f2 = true; cg(b2); } else f2 = false; Tg(b2, e2); if (b2.stateNode === null) jj(a2, b2), ph(b2, c2, d2), rh(b2, c2, d2, e2), d2 = true; else if (a2 === null) { var g2 = b2.stateNode, h2 = b2.memoizedProps; g2.props = h2; var k2 = g2.context, l2 = c2.contextType; typeof l2 === "object" && l2 !== null ? l2 = Vg(l2) : (l2 = Zf(c2) ? Xf : H.current, l2 = Yf(b2, l2)); var m2 = c2.getDerivedStateFromProps, q = typeof m2 === "function" || typeof g2.getSnapshotBeforeUpdate === "function"; q || typeof g2.UNSAFE_componentWillReceiveProps !== "function" && typeof g2.componentWillReceiveProps !== "function" || (h2 !== d2 || k2 !== l2) && qh(b2, g2, d2, l2); $g = false; var r2 = b2.memoizedState; g2.state = r2; gh(b2, d2, g2, e2); k2 = b2.memoizedState; h2 !== d2 || r2 !== k2 || Wf.current || $g ? (typeof m2 === "function" && (kh(b2, c2, m2, d2), k2 = b2.memoizedState), (h2 = $g || oh(b2, c2, h2, d2, r2, k2, l2)) ? (q || typeof g2.UNSAFE_componentWillMount !== "function" && typeof g2.componentWillMount !== "function" || (typeof g2.componentWillMount === "function" && g2.componentWillMount(), typeof g2.UNSAFE_componentWillMount === "function" && g2.UNSAFE_componentWillMount()), typeof g2.componentDidMount === "function" && (b2.flags |= 4194308)) : (typeof g2.componentDidMount === "function" && (b2.flags |= 4194308), b2.memoizedProps = d2, b2.memoizedState = k2), g2.props = d2, g2.state = k2, g2.context = l2, d2 = h2) : (typeof g2.componentDidMount === "function" && (b2.flags |= 4194308), d2 = false); } else { g2 = b2.stateNode; bh(a2, b2); h2 = b2.memoizedProps; l2 = b2.type === b2.elementType ? h2 : Lg(b2.type, h2); g2.props = l2; q = b2.pendingProps; r2 = g2.context; k2 = c2.contextType; typeof k2 === "object" && k2 !== null ? k2 = Vg(k2) : (k2 = Zf(c2) ? Xf : H.current, k2 = Yf(b2, k2)); var y2 = c2.getDerivedStateFromProps; (m2 = typeof y2 === "function" || typeof g2.getSnapshotBeforeUpdate === "function") || typeof g2.UNSAFE_componentWillReceiveProps !== "function" && typeof g2.componentWillReceiveProps !== "function" || (h2 !== q || r2 !== k2) && qh(b2, g2, d2, k2); $g = false; r2 = b2.memoizedState; g2.state = r2; gh(b2, d2, g2, e2); var n2 = b2.memoizedState; h2 !== q || r2 !== n2 || Wf.current || $g ? (typeof y2 === "function" && (kh(b2, c2, y2, d2), n2 = b2.memoizedState), (l2 = $g || oh(b2, c2, l2, d2, r2, n2, k2) || false) ? (m2 || typeof g2.UNSAFE_componentWillUpdate !== "function" && typeof g2.componentWillUpdate !== "function" || (typeof g2.componentWillUpdate === "function" && g2.componentWillUpdate(d2, n2, k2), typeof g2.UNSAFE_componentWillUpdate === "function" && g2.UNSAFE_componentWillUpdate(d2, n2, k2)), typeof g2.componentDidUpdate === "function" && (b2.flags |= 4), typeof g2.getSnapshotBeforeUpdate === "function" && (b2.flags |= 1024)) : (typeof g2.componentDidUpdate !== "function" || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 4), typeof g2.getSnapshotBeforeUpdate !== "function" || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 1024), b2.memoizedProps = d2, b2.memoizedState = n2), g2.props = d2, g2.state = n2, g2.context = k2, d2 = l2) : (typeof g2.componentDidUpdate !== "function" || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 4), typeof g2.getSnapshotBeforeUpdate !== "function" || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 1024), d2 = false); } return kj(a2, b2, c2, d2, f2, e2); } function kj(a2, b2, c2, d2, e2, f2) { hj(a2, b2); var g2 = (b2.flags & 128) !== 0; if (!d2 && !g2) return e2 && dg(b2, c2, false), $i(a2, b2, f2); d2 = b2.stateNode; Xi.current = b2; var h2 = g2 && typeof c2.getDerivedStateFromError !== "function" ? null : d2.render(); b2.flags |= 1; a2 !== null && g2 ? (b2.child = Bh(b2, a2.child, null, f2), b2.child = Bh(b2, null, h2, f2)) : Yi(a2, b2, h2, f2); b2.memoizedState = d2.state; e2 && dg(b2, c2, true); return b2.child; } function lj(a2) { var b2 = a2.stateNode; b2.pendingContext ? ag(a2, b2.pendingContext, b2.pendingContext !== b2.context) : b2.context && ag(a2, b2.context, false); Ih(a2, b2.containerInfo); } function mj(a2, b2, c2, d2, e2) { Ig(); Jg(e2); b2.flags |= 256; Yi(a2, b2, c2, d2); return b2.child; } var nj = { dehydrated: null, treeContext: null, retryLane: 0 }; function oj(a2) { return { baseLanes: a2, cachePool: null, transitions: null }; } function pj(a2, b2, c2) { var d2 = b2.pendingProps, e2 = M2.current, f2 = false, g2 = (b2.flags & 128) !== 0, h2; (h2 = g2) || (h2 = a2 !== null && a2.memoizedState === null ? false : (e2 & 2) !== 0); if (h2) f2 = true, b2.flags &= -129; else if (a2 === null || a2.memoizedState !== null) e2 |= 1; G(M2, e2 & 1); if (a2 === null) { Eg(b2); a2 = b2.memoizedState; if (a2 !== null && (a2 = a2.dehydrated, a2 !== null)) return (b2.mode & 1) === 0 ? b2.lanes = 1 : a2.data === "$!" ? b2.lanes = 8 : b2.lanes = 1073741824, null; g2 = d2.children; a2 = d2.fallback; return f2 ? (d2 = b2.mode, f2 = b2.child, g2 = { mode: "hidden", children: g2 }, (d2 & 1) === 0 && f2 !== null ? (f2.childLanes = 0, f2.pendingProps = g2) : f2 = qj(g2, d2, 0, null), a2 = Ah(a2, d2, c2, null), f2.return = b2, a2.return = b2, f2.sibling = a2, b2.child = f2, b2.child.memoizedState = oj(c2), b2.memoizedState = nj, a2) : rj(b2, g2); } e2 = a2.memoizedState; if (e2 !== null && (h2 = e2.dehydrated, h2 !== null)) return sj(a2, b2, g2, d2, h2, e2, c2); if (f2) { f2 = d2.fallback; g2 = b2.mode; e2 = a2.child; h2 = e2.sibling; var k2 = { mode: "hidden", children: d2.children }; (g2 & 1) === 0 && b2.child !== e2 ? (d2 = b2.child, d2.childLanes = 0, d2.pendingProps = k2, b2.deletions = null) : (d2 = wh(e2, k2), d2.subtreeFlags = e2.subtreeFlags & 14680064); h2 !== null ? f2 = wh(h2, f2) : (f2 = Ah(f2, g2, c2, null), f2.flags |= 2); f2.return = b2; d2.return = b2; d2.sibling = f2; b2.child = d2; d2 = f2; f2 = b2.child; g2 = a2.child.memoizedState; g2 = g2 === null ? oj(c2) : { baseLanes: g2.baseLanes | c2, cachePool: null, transitions: g2.transitions }; f2.memoizedState = g2; f2.childLanes = a2.childLanes & ~c2; b2.memoizedState = nj; return d2; } f2 = a2.child; a2 = f2.sibling; d2 = wh(f2, { mode: "visible", children: d2.children }); (b2.mode & 1) === 0 && (d2.lanes = c2); d2.return = b2; d2.sibling = null; a2 !== null && (c2 = b2.deletions, c2 === null ? (b2.deletions = [a2], b2.flags |= 16) : c2.push(a2)); b2.child = d2; b2.memoizedState = null; return d2; } function rj(a2, b2) { b2 = qj({ mode: "visible", children: b2 }, a2.mode, 0, null); b2.return = a2; return a2.child = b2; } function tj(a2, b2, c2, d2) { d2 !== null && Jg(d2); Bh(b2, a2.child, null, c2); a2 = rj(b2, b2.pendingProps.children); a2.flags |= 2; b2.memoizedState = null; return a2; } function sj(a2, b2, c2, d2, e2, f2, g2) { if (c2) { if (b2.flags & 256) return b2.flags &= -257, d2 = Li(Error(p2(422))), tj(a2, b2, g2, d2); if (b2.memoizedState !== null) return b2.child = a2.child, b2.flags |= 128, null; f2 = d2.fallback; e2 = b2.mode; d2 = qj({ mode: "visible", children: d2.children }, e2, 0, null); f2 = Ah(f2, e2, g2, null); f2.flags |= 2; d2.return = b2; f2.return = b2; d2.sibling = f2; b2.child = d2; (b2.mode & 1) !== 0 && Bh(b2, a2.child, null, g2); b2.child.memoizedState = oj(g2); b2.memoizedState = nj; return f2; } if ((b2.mode & 1) === 0) return tj(a2, b2, g2, null); if (e2.data === "$!") { d2 = e2.nextSibling && e2.nextSibling.dataset; if (d2) var h2 = d2.dgst; d2 = h2; f2 = Error(p2(419)); d2 = Li(f2, d2, void 0); return tj(a2, b2, g2, d2); } h2 = (g2 & a2.childLanes) !== 0; if (Ug || h2) { d2 = R2; if (d2 !== null) { switch (g2 & -g2) { case 4: e2 = 2; break; case 16: e2 = 8; break; case 64: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: e2 = 32; break; case 536870912: e2 = 268435456; break; default: e2 = 0; } e2 = (e2 & (d2.suspendedLanes | g2)) !== 0 ? 0 : e2; e2 !== 0 && e2 !== f2.retryLane && (f2.retryLane = e2, Zg(a2, e2), mh(d2, a2, e2, -1)); } uj(); d2 = Li(Error(p2(421))); return tj(a2, b2, g2, d2); } if (e2.data === "$?") return b2.flags |= 128, b2.child = a2.child, b2 = vj.bind(null, a2), e2._reactRetry = b2, null; a2 = f2.treeContext; yg = Lf(e2.nextSibling); xg = b2; I2 = true; zg = null; a2 !== null && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a2.id, sg = a2.overflow, qg = b2); b2 = rj(b2, d2.children); b2.flags |= 4096; return b2; } function wj(a2, b2, c2) { a2.lanes |= b2; var d2 = a2.alternate; d2 !== null && (d2.lanes |= b2); Sg(a2.return, b2, c2); } function xj(a2, b2, c2, d2, e2) { var f2 = a2.memoizedState; f2 === null ? a2.memoizedState = { isBackwards: b2, rendering: null, renderingStartTime: 0, last: d2, tail: c2, tailMode: e2 } : (f2.isBackwards = b2, f2.rendering = null, f2.renderingStartTime = 0, f2.last = d2, f2.tail = c2, f2.tailMode = e2); } function yj(a2, b2, c2) { var d2 = b2.pendingProps, e2 = d2.revealOrder, f2 = d2.tail; Yi(a2, b2, d2.children, c2); d2 = M2.current; if ((d2 & 2) !== 0) d2 = d2 & 1 | 2, b2.flags |= 128; else { if (a2 !== null && (a2.flags & 128) !== 0) a: for (a2 = b2.child; a2 !== null; ) { if (a2.tag === 13) a2.memoizedState !== null && wj(a2, c2, b2); else if (a2.tag === 19) wj(a2, c2, b2); else if (a2.child !== null) { a2.child.return = a2; a2 = a2.child; continue; } if (a2 === b2) break a; for (; a2.sibling === null; ) { if (a2.return === null || a2.return === b2) break a; a2 = a2.return; } a2.sibling.return = a2.return; a2 = a2.sibling; } d2 &= 1; } G(M2, d2); if ((b2.mode & 1) === 0) b2.memoizedState = null; else switch (e2) { case "forwards": c2 = b2.child; for (e2 = null; c2 !== null; ) a2 = c2.alternate, a2 !== null && Mh(a2) === null && (e2 = c2), c2 = c2.sibling; c2 = e2; c2 === null ? (e2 = b2.child, b2.child = null) : (e2 = c2.sibling, c2.sibling = null); xj(b2, false, e2, c2, f2); break; case "backwards": c2 = null; e2 = b2.child; for (b2.child = null; e2 !== null; ) { a2 = e2.alternate; if (a2 !== null && Mh(a2) === null) { b2.child = e2; break; } a2 = e2.sibling; e2.sibling = c2; c2 = e2; e2 = a2; } xj(b2, true, c2, null, f2); break; case "together": xj(b2, false, null, null, void 0); break; default: b2.memoizedState = null; } return b2.child; } function jj(a2, b2) { (b2.mode & 1) === 0 && a2 !== null && (a2.alternate = null, b2.alternate = null, b2.flags |= 2); } function $i(a2, b2, c2) { a2 !== null && (b2.dependencies = a2.dependencies); hh |= b2.lanes; if ((c2 & b2.childLanes) === 0) return null; if (a2 !== null && b2.child !== a2.child) throw Error(p2(153)); if (b2.child !== null) { a2 = b2.child; c2 = wh(a2, a2.pendingProps); b2.child = c2; for (c2.return = b2; a2.sibling !== null; ) a2 = a2.sibling, c2 = c2.sibling = wh(a2, a2.pendingProps), c2.return = b2; c2.sibling = null; } return b2.child; } function zj(a2, b2, c2) { switch (b2.tag) { case 3: lj(b2); Ig(); break; case 5: Kh(b2); break; case 1: Zf(b2.type) && cg(b2); break; case 4: Ih(b2, b2.stateNode.containerInfo); break; case 10: var d2 = b2.type._context, e2 = b2.memoizedProps.value; G(Mg, d2._currentValue); d2._currentValue = e2; break; case 13: d2 = b2.memoizedState; if (d2 !== null) { if (d2.dehydrated !== null) return G(M2, M2.current & 1), b2.flags |= 128, null; if ((c2 & b2.child.childLanes) !== 0) return pj(a2, b2, c2); G(M2, M2.current & 1); a2 = $i(a2, b2, c2); return a2 !== null ? a2.sibling : null; } G(M2, M2.current & 1); break; case 19: d2 = (c2 & b2.childLanes) !== 0; if ((a2.flags & 128) !== 0) { if (d2) return yj(a2, b2, c2); b2.flags |= 128; } e2 = b2.memoizedState; e2 !== null && (e2.rendering = null, e2.tail = null, e2.lastEffect = null); G(M2, M2.current); if (d2) break; else return null; case 22: case 23: return b2.lanes = 0, ej(a2, b2, c2); } return $i(a2, b2, c2); } var Aj; var Bj; var Cj; var Dj; Aj = function(a2, b2) { for (var c2 = b2.child; c2 !== null; ) { if (c2.tag === 5 || c2.tag === 6) a2.appendChild(c2.stateNode); else if (c2.tag !== 4 && c2.child !== null) { c2.child.return = c2; c2 = c2.child; continue; } if (c2 === b2) break; for (; c2.sibling === null; ) { if (c2.return === null || c2.return === b2) return; c2 = c2.return; } c2.sibling.return = c2.return; c2 = c2.sibling; } }; Bj = function() { }; Cj = function(a2, b2, c2, d2) { var e2 = a2.memoizedProps; if (e2 !== d2) { a2 = b2.stateNode; Hh(Eh.current); var f2 = null; switch (c2) { case "input": e2 = Ya(a2, e2); d2 = Ya(a2, d2); f2 = []; break; case "select": e2 = A2({}, e2, { value: void 0 }); d2 = A2({}, d2, { value: void 0 }); f2 = []; break; case "textarea": e2 = gb(a2, e2); d2 = gb(a2, d2); f2 = []; break; default: typeof e2.onClick !== "function" && typeof d2.onClick === "function" && (a2.onclick = Bf); } ub(c2, d2); var g2; c2 = null; for (l2 in e2) if (!d2.hasOwnProperty(l2) && e2.hasOwnProperty(l2) && e2[l2] != null) if (l2 === "style") { var h2 = e2[l2]; for (g2 in h2) h2.hasOwnProperty(g2) && (c2 || (c2 = {}), c2[g2] = ""); } else l2 !== "dangerouslySetInnerHTML" && l2 !== "children" && l2 !== "suppressContentEditableWarning" && l2 !== "suppressHydrationWarning" && l2 !== "autoFocus" && (ea.hasOwnProperty(l2) ? f2 || (f2 = []) : (f2 = f2 || []).push(l2, null)); for (l2 in d2) { var k2 = d2[l2]; h2 = e2 != null ? e2[l2] : void 0; if (d2.hasOwnProperty(l2) && k2 !== h2 && (k2 != null || h2 != null)) if (l2 === "style") if (h2) { for (g2 in h2) !h2.hasOwnProperty(g2) || k2 && k2.hasOwnProperty(g2) || (c2 || (c2 = {}), c2[g2] = ""); for (g2 in k2) k2.hasOwnProperty(g2) && h2[g2] !== k2[g2] && (c2 || (c2 = {}), c2[g2] = k2[g2]); } else c2 || (f2 || (f2 = []), f2.push(l2, c2)), c2 = k2; else l2 === "dangerouslySetInnerHTML" ? (k2 = k2 ? k2.__html : void 0, h2 = h2 ? h2.__html : void 0, k2 != null && h2 !== k2 && (f2 = f2 || []).push(l2, k2)) : l2 === "children" ? typeof k2 !== "string" && typeof k2 !== "number" || (f2 = f2 || []).push(l2, "" + k2) : l2 !== "suppressContentEditableWarning" && l2 !== "suppressHydrationWarning" && (ea.hasOwnProperty(l2) ? (k2 != null && l2 === "onScroll" && D2("scroll", a2), f2 || h2 === k2 || (f2 = [])) : (f2 = f2 || []).push(l2, k2)); } c2 && (f2 = f2 || []).push("style", c2); var l2 = f2; if (b2.updateQueue = l2) b2.flags |= 4; } }; Dj = function(a2, b2, c2, d2) { c2 !== d2 && (b2.flags |= 4); }; function Ej(a2, b2) { if (!I2) switch (a2.tailMode) { case "hidden": b2 = a2.tail; for (var c2 = null; b2 !== null; ) b2.alternate !== null && (c2 = b2), b2 = b2.sibling; c2 === null ? a2.tail = null : c2.sibling = null; break; case "collapsed": c2 = a2.tail; for (var d2 = null; c2 !== null; ) c2.alternate !== null && (d2 = c2), c2 = c2.sibling; d2 === null ? b2 || a2.tail === null ? a2.tail = null : a2.tail.sibling = null : d2.sibling = null; } } function S2(a2) { var b2 = a2.alternate !== null && a2.alternate.child === a2.child, c2 = 0, d2 = 0; if (b2) for (var e2 = a2.child; e2 !== null; ) c2 |= e2.lanes | e2.childLanes, d2 |= e2.subtreeFlags & 14680064, d2 |= e2.flags & 14680064, e2.return = a2, e2 = e2.sibling; else for (e2 = a2.child; e2 !== null; ) c2 |= e2.lanes | e2.childLanes, d2 |= e2.subtreeFlags, d2 |= e2.flags, e2.return = a2, e2 = e2.sibling; a2.subtreeFlags |= d2; a2.childLanes = c2; return b2; } function Fj(a2, b2, c2) { var d2 = b2.pendingProps; wg(b2); switch (b2.tag) { case 2: case 16: case 15: case 0: case 11: case 7: case 8: case 12: case 9: case 14: return S2(b2), null; case 1: return Zf(b2.type) && $f(), S2(b2), null; case 3: d2 = b2.stateNode; Jh(); E2(Wf); E2(H); Oh(); d2.pendingContext && (d2.context = d2.pendingContext, d2.pendingContext = null); if (a2 === null || a2.child === null) Gg(b2) ? b2.flags |= 4 : a2 === null || a2.memoizedState.isDehydrated && (b2.flags & 256) === 0 || (b2.flags |= 1024, zg !== null && (Gj(zg), zg = null)); Bj(a2, b2); S2(b2); return null; case 5: Lh(b2); var e2 = Hh(Gh.current); c2 = b2.type; if (a2 !== null && b2.stateNode != null) Cj(a2, b2, c2, d2, e2), a2.ref !== b2.ref && (b2.flags |= 512, b2.flags |= 2097152); else { if (!d2) { if (b2.stateNode === null) throw Error(p2(166)); S2(b2); return null; } a2 = Hh(Eh.current); if (Gg(b2)) { d2 = b2.stateNode; c2 = b2.type; var f2 = b2.memoizedProps; d2[Of] = b2; d2[Pf] = f2; a2 = (b2.mode & 1) !== 0; switch (c2) { case "dialog": D2("cancel", d2); D2("close", d2); break; case "iframe": case "object": case "embed": D2("load", d2); break; case "video": case "audio": for (e2 = 0; e2 < lf.length; e2++) D2(lf[e2], d2); break; case "source": D2("error", d2); break; case "img": case "image": case "link": D2("error", d2); D2("load", d2); break; case "details": D2("toggle", d2); break; case "input": Za(d2, f2); D2("invalid", d2); break; case "select": d2._wrapperState = { wasMultiple: !!f2.multiple }; D2("invalid", d2); break; case "textarea": hb(d2, f2), D2("invalid", d2); } ub(c2, f2); e2 = null; for (var g2 in f2) if (f2.hasOwnProperty(g2)) { var h2 = f2[g2]; g2 === "children" ? typeof h2 === "string" ? d2.textContent !== h2 && (f2.suppressHydrationWarning !== true && Af(d2.textContent, h2, a2), e2 = ["children", h2]) : typeof h2 === "number" && d2.textContent !== "" + h2 && (f2.suppressHydrationWarning !== true && Af(d2.textContent, h2, a2), e2 = ["children", "" + h2]) : ea.hasOwnProperty(g2) && h2 != null && g2 === "onScroll" && D2("scroll", d2); } switch (c2) { case "input": Va(d2); db(d2, f2, true); break; case "textarea": Va(d2); jb(d2); break; case "select": case "option": break; default: typeof f2.onClick === "function" && (d2.onclick = Bf); } d2 = e2; b2.updateQueue = d2; d2 !== null && (b2.flags |= 4); } else { g2 = e2.nodeType === 9 ? e2 : e2.ownerDocument; a2 === "http://www.w3.org/1999/xhtml" && (a2 = kb(c2)); a2 === "http://www.w3.org/1999/xhtml" ? c2 === "script" ? (a2 = g2.createElement("div"), a2.innerHTML = "