/* 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 __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop2 in b || (b = {})) if (__hasOwnProp.call(b, prop2)) __defNormalProp(a, prop2, b[prop2]); if (__getOwnPropSymbols) for (var prop2 of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop2)) __defNormalProp(a, prop2, b[prop2]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __objRest = (source, exclude) => { var target = {}; for (var prop2 in source) if (__hasOwnProp.call(source, prop2) && exclude.indexOf(prop2) < 0) target[prop2] = source[prop2]; if (source != null && __getOwnPropSymbols) for (var prop2 of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop2) < 0 && __propIsEnum.call(source, prop2)) target[prop2] = source[prop2]; } return target; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { __markAsModule(target); for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __reExport = (target, module2, desc) => { if (module2 && typeof module2 === "object" || typeof module2 === "function") { for (let key of __getOwnPropNames(module2)) if (!__hasOwnProp.call(target, key) && key !== "default") __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } return target; }; var __toModule = (module2) => { return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // node_modules/ms/index.js var require_ms = __commonJS({ "node_modules/ms/index.js"(exports, module2) { var s = 1e3; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; module2.exports = function(val2, options) { options = options || {}; var type = typeof val2; if (type === "string" && val2.length > 0) { return parse6(val2); } else if (type === "number" && isFinite(val2)) { return options.long ? fmtLong(val2) : fmtShort(val2); } throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val2)); }; function parse6(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n * y; case "weeks": case "week": case "w": return n * w; case "days": case "day": case "d": return n * d; case "hours": case "hour": case "hrs": case "hr": case "h": return n * h; case "minutes": case "minute": case "mins": case "min": case "m": return n * m; case "seconds": case "second": case "secs": case "sec": case "s": return n * s; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + "d"; } if (msAbs >= h) { return Math.round(ms / h) + "h"; } if (msAbs >= m) { return Math.round(ms / m) + "m"; } if (msAbs >= s) { return Math.round(ms / s) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, "day"); } if (msAbs >= h) { return plural(ms, msAbs, h, "hour"); } if (msAbs >= m) { return plural(ms, msAbs, m, "minute"); } if (msAbs >= s) { return plural(ms, msAbs, s, "second"); } return ms + " ms"; } function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); } } }); // node_modules/debug/src/common.js var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require_ms(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; for (let i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; let namespacesCache; let enabledCache; function debug(...args) { if (!debug.enabled) { return; } const self = debug; const curr = Number(new Date()); const ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index2 = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { if (match === "%%") { return "%"; } index2++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val2 = args[index2]; match = formatter.call(self, val2); args.splice(index2, 1); index2--; } return match; }); createDebug.formatArgs.call(self, args); const logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); debug.extend = extend; debug.destroy = createDebug.destroy; Object.defineProperty(debug, "enabled", { enumerable: true, configurable: false, get: () => { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: (v) => { enableOverride = v; } }); if (typeof createDebug.init === "function") { createDebug.init(debug); } return debug; } function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); for (const ns of split) { if (ns[0] === "-") { createDebug.skips.push(ns.slice(1)); } else { createDebug.names.push(ns); } } } function matchesTemplate(search, template) { let searchIndex = 0; let templateIndex = 0; let starIndex = -1; let matchIndex = 0; while (searchIndex < search.length) { if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { if (template[templateIndex] === "*") { starIndex = templateIndex; matchIndex = searchIndex; templateIndex++; } else { searchIndex++; templateIndex++; } } else if (starIndex !== -1) { templateIndex = starIndex + 1; matchIndex++; searchIndex = matchIndex; } else { return false; } } while (templateIndex < template.length && template[templateIndex] === "*") { templateIndex++; } return templateIndex === template.length; } function disable() { const namespaces = [ ...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } function enabled(name) { for (const skip of createDebug.skips) { if (matchesTemplate(name, skip)) { return false; } } for (const ns of createDebug.names) { if (matchesTemplate(name, ns)) { return true; } } return false; } function coerce(val2) { if (val2 instanceof Error) { return val2.stack || val2.message; } return val2; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } createDebug.enable(createDebug.load()); return createDebug; } module2.exports = setup; } }); // node_modules/debug/src/browser.js var require_browser = __commonJS({ "node_modules/debug/src/browser.js"(exports, module2) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load2; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = (() => { let warned = false; return () => { if (!warned) { warned = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } let m; return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); if (!this.useColors) { return; } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index2 = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index2++; if (match === "%c") { lastC = index2; } }); args.splice(lastC, 0, c); } exports.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports.storage.setItem("debug", namespaces); } else { exports.storage.removeItem("debug"); } } catch (error) { } } function load2() { let r; try { r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { r = process.env.DEBUG; } return r; } function localstorage() { try { return localStorage; } catch (error) { } } module2.exports = require_common()(exports); var { formatters } = module2.exports; formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // node_modules/follow-redirects/debug.js var require_debug = __commonJS({ "node_modules/follow-redirects/debug.js"(exports, module2) { var debug; module2.exports = function() { if (!debug) { try { debug = require_browser()("follow-redirects"); } catch (error) { } if (typeof debug !== "function") { debug = function() { }; } } debug.apply(null, arguments); }; } }); // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports, module2) { var url = require("url"); var URL2 = url.URL; var http2 = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); var debug = require_debug(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; var looksLikeV8 = isFunction(Error.captureStackTrace); if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { console.warn("The follow-redirects package should be excluded from browser builds."); } })(); var useNativeURL = false; try { assert(new URL2("")); } catch (error) { useNativeURL = error.code === "ERR_INVALID_URL"; } var preservedUrlFields = [ "auth", "host", "hostname", "href", "path", "pathname", "port", "protocol", "query", "search", "hash" ]; var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; var eventHandlers = Object.create(null); events.forEach(function(event) { eventHandlers[event] = function(arg1, arg2, arg3) { this._redirectable.emit(event, arg1, arg2, arg3); }; }); var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError); var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed"); var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded", RedirectionError); var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit"); var WriteAfterEndError = createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); this._options = options; this._ended = false; this._ending = false; this._redirectCount = 0; this._redirects = []; this._requestBodyLength = 0; this._requestBodyBuffers = []; if (responseCallback) { this.on("response", responseCallback); } var self = this; this._onNativeResponse = function(response) { try { self._processResponse(response); } catch (cause) { self.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause })); } }; this._performRequest(); } RedirectableRequest.prototype = Object.create(Writable.prototype); RedirectableRequest.prototype.abort = function() { destroyRequest(this._currentRequest); this._currentRequest.abort(); this.emit("abort"); }; RedirectableRequest.prototype.destroy = function(error) { destroyRequest(this._currentRequest, error); destroy.call(this, error); return this; }; RedirectableRequest.prototype.write = function(data2, encoding, callback) { if (this._ending) { throw new WriteAfterEndError(); } if (!isString2(data2) && !isBuffer(data2)) { throw new TypeError("data should be a string, Buffer or Uint8Array"); } if (isFunction(encoding)) { callback = encoding; encoding = null; } if (data2.length === 0) { if (callback) { callback(); } return; } if (this._requestBodyLength + data2.length <= this._options.maxBodyLength) { this._requestBodyLength += data2.length; this._requestBodyBuffers.push({ data: data2, encoding }); this._currentRequest.write(data2, encoding, callback); } else { this.emit("error", new MaxBodyLengthExceededError()); this.abort(); } }; RedirectableRequest.prototype.end = function(data2, encoding, callback) { if (isFunction(data2)) { callback = data2; data2 = encoding = null; } else if (isFunction(encoding)) { callback = encoding; encoding = null; } if (!data2) { this._ended = this._ending = true; this._currentRequest.end(null, null, callback); } else { var self = this; var currentRequest = this._currentRequest; this.write(data2, encoding, function() { self._ended = true; currentRequest.end(null, null, callback); }); this._ending = true; } }; RedirectableRequest.prototype.setHeader = function(name, value) { this._options.headers[name] = value; this._currentRequest.setHeader(name, value); }; RedirectableRequest.prototype.removeHeader = function(name) { delete this._options.headers[name]; this._currentRequest.removeHeader(name); }; RedirectableRequest.prototype.setTimeout = function(msecs, callback) { var self = this; function destroyOnTimeout(socket) { socket.setTimeout(msecs); socket.removeListener("timeout", socket.destroy); socket.addListener("timeout", socket.destroy); } function startTimer(socket) { if (self._timeout) { clearTimeout(self._timeout); } self._timeout = setTimeout(function() { self.emit("timeout"); clearTimer(); }, msecs); destroyOnTimeout(socket); } function clearTimer() { if (self._timeout) { clearTimeout(self._timeout); self._timeout = null; } self.removeListener("abort", clearTimer); self.removeListener("error", clearTimer); self.removeListener("response", clearTimer); self.removeListener("close", clearTimer); if (callback) { self.removeListener("timeout", callback); } if (!self.socket) { self._currentRequest.removeListener("socket", startTimer); } } if (callback) { this.on("timeout", callback); } if (this.socket) { startTimer(this.socket); } else { this._currentRequest.once("socket", startTimer); } this.on("socket", destroyOnTimeout); this.on("abort", clearTimer); this.on("error", clearTimer); this.on("response", clearTimer); this.on("close", clearTimer); return this; }; [ "flushHeaders", "getHeader", "setNoDelay", "setSocketKeepAlive" ].forEach(function(method) { RedirectableRequest.prototype[method] = function(a, b) { return this._currentRequest[method](a, b); }; }); ["aborted", "connection", "socket"].forEach(function(property) { Object.defineProperty(RedirectableRequest.prototype, property, { get: function() { return this._currentRequest[property]; } }); }); RedirectableRequest.prototype._sanitizeOptions = function(options) { if (!options.headers) { options.headers = {}; } if (options.host) { if (!options.hostname) { options.hostname = options.host; } delete options.host; } if (!options.pathname && options.path) { var searchPos = options.path.indexOf("?"); if (searchPos < 0) { options.pathname = options.path; } else { options.pathname = options.path.substring(0, searchPos); options.search = options.path.substring(searchPos); } } }; RedirectableRequest.prototype._performRequest = function() { var protocol = this._options.protocol; var nativeProtocol = this._options.nativeProtocols[protocol]; if (!nativeProtocol) { throw new TypeError("Unsupported protocol " + protocol); } if (this._options.agents) { var scheme = protocol.slice(0, -1); this._options.agent = this._options.agents[scheme]; } var request2 = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse); request2._redirectable = this; for (var event of events) { request2.on(event, eventHandlers[event]); } this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._options.path; if (this._isRedirect) { var i = 0; var self = this; var buffers = this._requestBodyBuffers; (function writeNext(error) { if (request2 === self._currentRequest) { if (error) { self.emit("error", error); } else if (i < buffers.length) { var buffer = buffers[i++]; if (!request2.finished) { request2.write(buffer.data, buffer.encoding, writeNext); } } else if (self._ended) { request2.end(); } } })(); } }; RedirectableRequest.prototype._processResponse = function(response) { var statusCode = response.statusCode; if (this._options.trackRedirects) { this._redirects.push({ url: this._currentUrl, headers: response.headers, statusCode }); } var location = response.headers.location; if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) { response.responseUrl = this._currentUrl; response.redirects = this._redirects; this.emit("response", response); this._requestBodyBuffers = []; return; } destroyRequest(this._currentRequest); response.destroy(); if (++this._redirectCount > this._options.maxRedirects) { throw new TooManyRedirectsError(); } var requestHeaders; var beforeRedirect = this._options.beforeRedirect; if (beforeRedirect) { requestHeaders = Object.assign({ Host: response.req.getHeader("host") }, this._options.headers); } var method = this._options.method; if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { this._options.method = "GET"; this._requestBodyBuffers = []; removeMatchingHeaders(/^content-/i, this._options.headers); } var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug("redirecting to", redirectUrl.href); this._isRedirect = true; spreadUrlObject(redirectUrl, this._options); if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) { removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); } if (isFunction(beforeRedirect)) { var responseDetails = { headers: response.headers, statusCode }; var requestDetails = { url: currentUrl, method, headers: requestHeaders }; beforeRedirect(this._options, responseDetails, requestDetails); this._sanitizeOptions(this._options); } this._performRequest(); }; function wrap2(protocols) { var exports2 = { maxRedirects: 21, maxBodyLength: 10 * 1024 * 1024 }; var nativeProtocols = {}; Object.keys(protocols).forEach(function(scheme) { var protocol = scheme + ":"; var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol); function request2(input, options, callback) { if (isURL(input)) { input = spreadUrlObject(input); } else if (isString2(input)) { input = spreadUrlObject(parseUrl(input)); } else { callback = options; options = validateUrl(input); input = { protocol }; } if (isFunction(options)) { callback = options; options = null; } options = Object.assign({ maxRedirects: exports2.maxRedirects, maxBodyLength: exports2.maxBodyLength }, input, options); options.nativeProtocols = nativeProtocols; if (!isString2(options.host) && !isString2(options.hostname)) { options.hostname = "::1"; } assert.equal(options.protocol, protocol, "protocol mismatch"); debug("options", options); return new RedirectableRequest(options, callback); } function get2(input, options, callback) { var wrappedRequest = wrappedProtocol.request(input, options, callback); wrappedRequest.end(); return wrappedRequest; } Object.defineProperties(wrappedProtocol, { request: { value: request2, configurable: true, enumerable: true, writable: true }, get: { value: get2, configurable: true, enumerable: true, writable: true } }); }); return exports2; } function noop() { } function parseUrl(input) { var parsed; if (useNativeURL) { parsed = new URL2(input); } else { parsed = validateUrl(url.parse(input)); if (!isString2(parsed.protocol)) { throw new InvalidUrlError({ input }); } } return parsed; } function resolveUrl(relative, base) { return useNativeURL ? new URL2(relative, base) : parseUrl(url.resolve(base, relative)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { throw new InvalidUrlError({ input: input.href || input }); } if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { throw new InvalidUrlError({ input: input.href || input }); } return input; } function spreadUrlObject(urlObject, target) { var spread = target || {}; for (var key of preservedUrlFields) { spread[key] = urlObject[key]; } if (spread.hostname.startsWith("[")) { spread.hostname = spread.hostname.slice(1, -1); } if (spread.port !== "") { spread.port = Number(spread.port); } spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; return spread; } function removeMatchingHeaders(regex, headers) { var lastValue; for (var header in headers) { if (regex.test(header)) { lastValue = headers[header]; delete headers[header]; } } return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim(); } function createErrorType(code, message, baseClass) { function CustomError(properties) { if (isFunction(Error.captureStackTrace)) { Error.captureStackTrace(this, this.constructor); } Object.assign(this, properties || {}); this.code = code; this.message = this.cause ? message + ": " + this.cause.message : message; } CustomError.prototype = new (baseClass || Error)(); Object.defineProperties(CustomError.prototype, { constructor: { value: CustomError, enumerable: false }, name: { value: "Error [" + code + "]", enumerable: false } }); return CustomError; } function destroyRequest(request2, error) { for (var event of events) { request2.removeListener(event, eventHandlers[event]); } request2.on("error", noop); request2.destroy(error); } function isSubdomain(subdomain, domain) { assert(isString2(subdomain) && isString2(domain)); var dot = subdomain.length - domain.length - 1; return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); } function isString2(value) { return typeof value === "string" || value instanceof String; } function isFunction(value) { return typeof value === "function"; } function isBuffer(value) { return typeof value === "object" && "length" in value; } function isURL(value) { return URL2 && value instanceof URL2; } module2.exports = wrap2({ http: http2, https: https2 }); module2.exports.wrap = wrap2; } }); // node_modules/boolbase/index.js var require_boolbase = __commonJS({ "node_modules/boolbase/index.js"(exports, module2) { module2.exports = { trueFunc: function trueFunc2() { return true; }, falseFunc: function falseFunc() { return false; } }; } }); // node_modules/mime2ext/dist/consts.js var require_consts = __commonJS({ "node_modules/mime2ext/dist/consts.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MIME_SHORT = exports.MIME_FULL = void 0; var MIME_FULL = { "application/mp4": "mp4s", "application/ogg": "ogx", "audio/mp4": "m4a", "audio/mpeg": "mpga", "audio/ogg": "oga", "audio/webm": "weba", "video/3gpp": "3gp", "video/jpeg": "jpgv", "video/ogg": "ogv" }; exports.MIME_FULL = MIME_FULL; var MIME_SHORT = { "andrew-inset": "ez", "applixware": "aw", "cdmi-capability": "cdmia", "cdmi-container": "cdmic", "cdmi-domain": "cdmid", "cdmi-object": "cdmio", "cdmi-queue": "cdmiq", "cu-seeme": "cu", "dash+xml": "mpd", "docbook+xml": "dbk", "dssc+xml": "xdssc", "ecmascript": "es", "font-tdpfr": "pfr", "geo+json": "geojson", "gzip": "gz", "hyperstudio": "stk", "inkml+xml": "ink", "java-archive": "jar", "java-serialized-object": "ser", "java-vm": "class", "javascript": "js", "ld+json": "jsonld", "lost+xml": "lostxml", "mac-binhex40": "hqx", "mac-compactpro": "cpt", "manifest+json": "webmanifest", "marc": "mrc", "marcxml+xml": "mrcx", "mathematica": "ma", "mediaservercontrol+xml": "mscml", "metalink4+xml": "meta4", "mp21": "m21", "msword": "doc", "n-quads": "nq", "n-triples": "nt", "octet-stream": "bin", "oebps-package+xml": "opf", "onenote": "onetoc", "patch-ops-error+xml": "xer", "pgp-encrypted": "pgp", "pgp-signature": "asc", "pics-rules": "prf", "pkcs10": "p10", "pkcs7-mime": "p7m", "pkcs7-signature": "p7s", "pkcs8": "p8", "pkix-attr-cert": "ac", "pkix-cert": "cer", "pkix-crl": "crl", "pkix-pkipath": "pkipath", "pkixcmp": "pki", "postscript": "ai", "pskc+xml": "pskcxml", "reginfo+xml": "rif", "relax-ng-compact-syntax": "rnc", "resource-lists-diff+xml": "rld", "resource-lists+xml": "rl", "rls-services+xml": "rs", "rpki-ghostbusters": "gbr", "rpki-manifest": "mft", "rpki-roa": "roa", "scvp-cv-request": "scq", "scvp-cv-response": "scs", "scvp-vp-request": "spq", "scvp-vp-response": "spp", "set-payment-initiation": "setpay", "set-registration-initiation": "setreg", "sieve": "siv", "smil+xml": "smi", "sparql-query": "rq", "sparql-results+xml": "srx", "srgs": "gram", "srgs+xml": "grxml", "thraud+xml": "tfi", "timestamped-data": "tsd", "voicexml+xml": "vxml", "widget": "wgt", "winhlp": "hlp", "xcap-diff+xml": "xdf", "xml-dtd": "dtd", "xproc+xml": "xpl", "xslt+xml": "xsl", "xv+xml": "mxml", "adpcm": "adp", "basic": "au", "midi": "mid", "silk": "sil", "wave": "wav", "collection": "ttc", "aces": "exr", "dicom-rle": "drle", "g3fax": "g3", "heic-sequence": "heics", "heif-sequence": "heifs", "tiff-fx": "tfx", "tiff": "tif", "global-delivery-status": "u8dsn", "global-disposition-notification": "u8mdn", "global-headers": "u8hdr", "global": "u8msg", "rfc822": "eml", "gltf-binary": "glb", "iges": "igs", "mesh": "msh", "vrml": "wrl", "x3d-vrml": "x3dv", "x3d+binary": "x3db", "x3d+fastinfoset": "x3db", "x3d+vrml": "x3dv", "cache-manifest": "appcache", "calendar": "ics", "coffeescript": "coffee", "mathml": "mml", "plain": "txt", "richtext": "rtx", "tab-separated-values": "tsv", "troff": "t", "turtle": "ttl", "uri-list": "uri", "3gpp2": "3g2", "mp2t": "ts", "quicktime": "qt" }; exports.MIME_SHORT = MIME_SHORT; } }); // node_modules/mime2ext/dist/index.js var require_dist = __commonJS({ "node_modules/mime2ext/dist/index.js"(exports, module2) { "use strict"; var consts_1 = require_consts(); var re = /^.*\/((.*?)(?:\+.+)?)$/; function mime2ext(mime) { mime = mime.trim().toLowerCase(); var full = consts_1.MIME_FULL[mime]; if (full) return full; var match = re.exec(mime); if (!match) return ""; return consts_1.MIME_SHORT[match[1]] || match[2]; } module2.exports = mime2ext; module2.exports.default = mime2ext; Object.defineProperty(module2.exports, "__esModule", { value: true }); } }); // node_modules/@notable/html2markdown/dist/mime.js var require_mime = __commonJS({ "node_modules/@notable/html2markdown/dist/mime.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var mime2ext_1 = __importDefault(require_dist()); var Mime = { getExtension: (mime) => { const ext = (0, mime2ext_1.default)(mime); return ext ? `.${ext}` : ""; }, isImage: (mime) => { return mime.includes("image"); } }; exports.default = Mime; } }); // node_modules/@notable/html2markdown/dist/turndown.js var require_turndown = __commonJS({ "node_modules/@notable/html2markdown/dist/turndown.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function extend(destination) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (source.hasOwnProperty(key)) destination[key] = source[key]; } } return destination; } function repeat(character, count) { return Array(count + 1).join(character); } var blockElements = [ "address", "article", "aside", "audio", "blockquote", "body", "canvas", "center", "dd", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "isindex", "li", "main", "menu", "nav", "noframes", "noscript", "ol", "output", "p", "pre", "section", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "ul" ]; function isBlock(node) { return blockElements.indexOf(node.nodeName.toLowerCase()) !== -1; } var voidElements2 = [ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]; function isVoid(node) { return voidElements2.indexOf(node.nodeName.toLowerCase()) !== -1; } function hasVoid(node) { return node.getElementsByTagName && voidElements2.some(function(name) { return node.getElementsByTagName(name).length; }); } var rules = {}; rules.paragraph = { filter: "p", replacement: function(content) { return "\n\n" + content + "\n\n"; } }; rules.lineBreak = { filter: "br", replacement: function(content, node, options) { return options.br + "\n"; } }; rules.heading = { filter: ["h1", "h2", "h3", "h4", "h5", "h6"], replacement: function(content, node, options) { var hLevel = Number(node.nodeName.charAt(1)); if (options.headingStyle === "setext" && hLevel < 3) { var underline = repeat(hLevel === 1 ? "=" : "-", content.length); return "\n\n" + content + "\n" + underline + "\n\n"; } else { return "\n\n" + repeat("#", hLevel) + " " + content + "\n\n"; } } }; rules.blockquote = { filter: "blockquote", replacement: function(content) { content = content.replace(/^\n+|\n+$/g, ""); content = content.replace(/^/gm, "> "); return "\n\n" + content + "\n\n"; } }; rules.list = { filter: ["ul", "ol"], replacement: function(content, node) { var parent2 = node.parentNode; var siblingElements = parent2.children; var lastSiblingElement = siblingElements[siblingElements.length - 1]; if (parent2.nodeName === "LI" && node === lastSiblingElement) { return "\n" + content; } else { return "\n\n" + content + "\n\n"; } } }; rules.listItem = { filter: "li", replacement: function(content, node, options) { content = content.replace(/^\n+/, "").replace(/\n+$/, "\n").replace(/\n/gm, "\n "); var prefix = options.bulletListMarker + " "; var parent2 = node.parentNode; if (parent2.nodeName === "OL") { var start = parent2.getAttribute("start"); var index2 = Array.prototype.indexOf.call(parent2.children, node); prefix = (start ? Number(start) + index2 : index2 + 1) + ". "; } return prefix + content + (node.nextSibling && !/\n$/.test(content) ? "\n" : ""); } }; rules.indentedCodeBlock = { filter: function(node, options) { return options.codeBlockStyle === "indented" && node.nodeName === "PRE" && node.firstChild && node.firstChild.nodeName === "CODE"; }, replacement: function(content, node, options) { return "\n\n " + node.firstChild.textContent.replace(/\n/g, "\n ") + "\n\n"; } }; rules.fencedCodeBlock = { filter: function(node, options) { return options.codeBlockStyle === "fenced" && node.nodeName === "PRE" && node.firstChild && node.firstChild.nodeName === "CODE"; }, replacement: function(content, node, options) { var className = node.firstChild.getAttribute("class") || ""; var language = (className.match(/language-(\S+)/) || [null, ""])[1]; return "\n\n" + options.fence + language + "\n" + node.firstChild.textContent + "\n" + options.fence + "\n\n"; } }; rules.horizontalRule = { filter: "hr", replacement: function(content, node, options) { return "\n\n" + options.hr + "\n\n"; } }; rules.inlineLink = { filter: function(node, options) { return options.linkStyle === "inlined" && node.nodeName === "A" && node.getAttribute("href"); }, replacement: function(content, node) { var href = node.getAttribute("href"); var title = node.getAttribute("title") ? ' "' + node.getAttribute("title") + '"' : ""; return "[" + content + "](" + href + title + ")"; } }; rules.referenceLink = { filter: function(node, options) { return options.linkStyle === "referenced" && node.nodeName === "A" && node.getAttribute("href"); }, replacement: function(content, node, options) { var href = node.getAttribute("href"); var title = node.title ? ' "' + node.title + '"' : ""; var replacement; var reference; switch (options.linkReferenceStyle) { case "collapsed": replacement = "[" + content + "][]"; reference = "[" + content + "]: " + href + title; break; case "shortcut": replacement = "[" + content + "]"; reference = "[" + content + "]: " + href + title; break; default: var id = this.references.length + 1; replacement = "[" + content + "][" + id + "]"; reference = "[" + id + "]: " + href + title; } this.references.push(reference); return replacement; }, references: [], append: function(options) { var references = ""; if (this.references.length) { references = "\n\n" + this.references.join("\n") + "\n\n"; this.references = []; } return references; } }; rules.emphasis = { filter: ["em", "i"], replacement: function(content, node, options) { if (!content.trim()) return ""; return options.emDelimiter + content + options.emDelimiter; } }; rules.strong = { filter: ["strong", "b"], replacement: function(content, node, options) { if (!content.trim()) return ""; return options.strongDelimiter + content + options.strongDelimiter; } }; rules.code = { filter: function(node) { var hasSiblings = node.previousSibling || node.nextSibling; var isCodeBlock = node.parentNode.nodeName === "PRE" && !hasSiblings; return node.nodeName === "CODE" && !isCodeBlock; }, replacement: function(content) { if (!content.trim()) return ""; var delimiter = "`"; var leadingSpace = ""; var trailingSpace = ""; var matches = content.match(/`+/gm); if (matches) { if (/^`/.test(content)) leadingSpace = " "; if (/`$/.test(content)) trailingSpace = " "; while (matches.indexOf(delimiter) !== -1) delimiter = delimiter + "`"; } return delimiter + leadingSpace + content + trailingSpace + delimiter; } }; rules.image = { filter: "img", replacement: function(content, node) { var alt = node.getAttribute("alt") || ""; var src = node.getAttribute("src") || ""; var title = node.getAttribute("title") || ""; var titlePart = title ? ' "' + title + '"' : ""; return src ? "![" + alt + "](" + src + titlePart + ")" : ""; } }; function Rules(options) { this.options = options; this._keep = []; this._remove = []; this.blankRule = { replacement: options.blankReplacement }; this.keepReplacement = options.keepReplacement; this.defaultRule = { replacement: options.defaultReplacement }; this.array = []; for (var key in options.rules) this.array.push(options.rules[key]); } Rules.prototype = { add: function(key, rule) { this.array.unshift(rule); }, keep: function(filter4) { this._keep.unshift({ filter: filter4, replacement: this.keepReplacement }); }, remove: function(filter4) { this._remove.unshift({ filter: filter4, replacement: function() { return ""; } }); }, forNode: function(node) { if (node.isBlank) return this.blankRule; var rule; if (rule = findRule(this.array, node, this.options)) return rule; if (rule = findRule(this._keep, node, this.options)) return rule; if (rule = findRule(this._remove, node, this.options)) return rule; return this.defaultRule; }, forEach: function(fn) { for (var i = 0; i < this.array.length; i++) fn(this.array[i], i); } }; function findRule(rules2, node, options) { for (var i = 0; i < rules2.length; i++) { var rule = rules2[i]; if (filterValue(rule, node, options)) return rule; } return void 0; } function filterValue(rule, node, options) { var filter4 = rule.filter; if (typeof filter4 === "string") { if (filter4 === node.nodeName.toLowerCase()) return true; } else if (Array.isArray(filter4)) { if (filter4.indexOf(node.nodeName.toLowerCase()) > -1) return true; } else if (typeof filter4 === "function") { if (filter4.call(rule, node, options)) return true; } else { throw new TypeError("`filter` needs to be a string, array, or function"); } } function collapseWhitespace(options) { var element = options.element; var isBlock2 = options.isBlock; var isVoid2 = options.isVoid; var isPre = options.isPre || function(node2) { return node2.nodeName === "PRE"; }; if (!element.firstChild || isPre(element)) return; var prevText = null; var prevVoid = false; var prev2 = null; var node = next2(prev2, element, isPre); while (node !== element) { if (node.nodeType === 3 || node.nodeType === 4) { var text3 = node.data.replace(/[ \r\n\t]+/g, " "); if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text3[0] === " ") { text3 = text3.substr(1); } if (!text3) { node = remove2(node); continue; } node.data = text3; prevText = node; } else if (node.nodeType === 1) { if (isBlock2(node) || node.nodeName === "BR") { if (prevText) { prevText.data = prevText.data.replace(/ $/, ""); } prevText = null; prevVoid = false; } else if (isVoid2(node)) { prevText = null; prevVoid = true; } } else { node = remove2(node); continue; } var nextNode = next2(prev2, node, isPre); prev2 = node; node = nextNode; } if (prevText) { prevText.data = prevText.data.replace(/ $/, ""); if (!prevText.data) { remove2(prevText); } } } function remove2(node) { var next3 = node.nextSibling || node.parentNode; node.parentNode.removeChild(node); return next3; } function next2(prev2, current, isPre) { if (prev2 && prev2.parentNode === current || isPre(current)) { return current.nextSibling || current.parentNode; } return current.firstChild || current.nextSibling || current.parentNode; } var root2 = typeof window !== "undefined" ? window : {}; function RootNode(input, options) { var root3; if (typeof input === "string") { var doc = htmlParser(options).parseFromString('' + input + "", "text/html"); root3 = doc.getElementsByTagName("x-turndown")[0]; } else { root3 = input.cloneNode(true); } Array.from(doc.querySelectorAll("colgroup")).forEach((ele) => ele.parentNode.removeChild(ele)); collapseWhitespace({ element: root3, isBlock, isVoid }); return root3; } var _htmlParser; function htmlParser(options) { _htmlParser = _htmlParser || new options.parser(); return _htmlParser; } function Node2(node) { node.isBlock = isBlock(node); node.isCode = node.nodeName.toLowerCase() === "code" || node.parentNode.isCode; node.isBlank = isBlank(node); node.flankingWhitespace = flankingWhitespace(node); return node; } function isBlank(node) { return ["A", "TH", "TD", "IFRAME", "SCRIPT", "AUDIO", "VIDEO"].indexOf(node.nodeName) === -1 && /^\s*$/i.test(node.textContent) && !isVoid(node) && !hasVoid(node); } function flankingWhitespace(node) { var leading = ""; var trailing = ""; if (!node.isBlock) { var hasLeading = /^[ \r\n\t]/.test(node.textContent); var hasTrailing = /[ \r\n\t]$/.test(node.textContent); if (hasLeading && !isFlankedByWhitespace("left", node)) { leading = " "; } if (hasTrailing && !isFlankedByWhitespace("right", node)) { trailing = " "; } } return { leading, trailing }; } function isFlankedByWhitespace(side, node) { var sibling; var regExp; var isFlanked; if (side === "left") { sibling = node.previousSibling; regExp = / $/; } else { sibling = node.nextSibling; regExp = /^ /; } if (sibling) { if (sibling.nodeType === 3) { isFlanked = regExp.test(sibling.nodeValue); } else if (sibling.nodeType === 1 && !isBlock(sibling)) { isFlanked = regExp.test(sibling.textContent); } } return isFlanked; } var reduce = Array.prototype.reduce; var leadingNewLinesRegExp = /^\n*/; var trailingNewLinesRegExp = /\n*$/; var escapes = [ [/\\/g, "\\\\"], [/\*/g, "\\*"], [/^-/g, "\\-"], [/^\+ /g, "\\+ "], [/^(=+)/g, "\\$1"], [/^(#{1,6}) /g, "\\$1 "], [/`/g, "\\`"], [/^~~~/g, "\\~~~"], [/\[/g, "\\["], [/\]/g, "\\]"], [/^>/g, "\\>"], [/_/g, "\\_"], [/^(\d+)\. /g, "$1\\. "] ]; function TurndownService(options) { if (!(this instanceof TurndownService)) return new TurndownService(options); var defaults = { rules, headingStyle: "atx", hr: "---", bulletListMarker: "-", codeBlockStyle: "fenced", fence: "```", emDelimiter: "_", strongDelimiter: "**", linkStyle: "inlined", linkReferenceStyle: "full", br: " ", blankReplacement: function(content, node) { return node.isBlock ? "\n\n" : ""; }, keepReplacement: function(content, node) { return node.isBlock ? "\n\n" + node.outerHTML + "\n\n" : node.outerHTML; }, defaultReplacement: function(content, node) { return node.isBlock ? "\n\n" + content + "\n\n" : content; }, parser: root2.DOMParser }; this.options = extend({}, defaults, options); this.rules = new Rules(this.options); } TurndownService.prototype = { turndown: function(input) { if (!canConvert(input)) { throw new TypeError(input + " is not a string, or an element/document/fragment node."); } if (input === "") return ""; var output = process2.call(this, new RootNode(input, this.options)); return postProcess.call(this, output); }, use: function(plugin) { if (Array.isArray(plugin)) { for (var i = 0; i < plugin.length; i++) this.use(plugin[i]); } else if (typeof plugin === "function") { plugin(this); } else { throw new TypeError("plugin must be a Function or an Array of Functions"); } return this; }, addRule: function(key, rule) { this.rules.add(key, rule); return this; }, keep: function(filter4) { this.rules.keep(filter4); return this; }, remove: function(filter4) { this.rules.remove(filter4); return this; }, escape: function(string) { return escapes.reduce(function(accumulator, escape2) { return accumulator.replace(escape2[0], escape2[1]); }, string); } }; function process2(parentNode) { var self = this; return reduce.call(parentNode.childNodes, function(output, node) { node = new Node2(node); var replacement = ""; if (node.nodeType === 3) { replacement = node.isCode ? node.nodeValue : self.escape(node.nodeValue); } else if (node.nodeType === 1) { replacement = replacementForNode.call(self, node); } return join(output, replacement); }, ""); } function postProcess(output) { var self = this; this.rules.forEach(function(rule) { if (typeof rule.append === "function") { output = join(output, rule.append(self.options)); } }); return output.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, ""); } function replacementForNode(node) { var rule = this.rules.forNode(node); var content = process2.call(this, node); var whitespace2 = node.flankingWhitespace; if (whitespace2.leading || whitespace2.trailing) content = content.trim(); return whitespace2.leading + rule.replacement(content, node, this.options) + whitespace2.trailing; } function separatingNewlines(output, replacement) { var newlines = [ output.match(trailingNewLinesRegExp)[0], replacement.match(leadingNewLinesRegExp)[0] ].sort(); var maxNewlines = newlines[newlines.length - 1]; return maxNewlines.length < 2 ? maxNewlines : "\n\n"; } function join(string1, string2) { var separator = separatingNewlines(string1, string2); string1 = string1.replace(trailingNewLinesRegExp, ""); string2 = string2.replace(leadingNewLinesRegExp, ""); return string1 + separator + string2; } function canConvert(input) { return input != null && (typeof input === "string" || input.nodeType && (input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11)); } exports.default = TurndownService; } }); // node_modules/@notable/html2markdown/dist/turndown.plugin.tables.js var require_turndown_plugin_tables = __commonJS({ "node_modules/@notable/html2markdown/dist/turndown.plugin.tables.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var indexOf = Array.prototype.indexOf; var every = Array.prototype.every; var rules = {}; rules.tableCell = { filter: ["th", "td"], replacement: function(content, node) { return cell(content, node); } }; rules.tableRow = { filter: "tr", replacement: function(content, node) { var borderCells = ""; var alignMap = { left: ":--", right: "--:", center: ":-:" }; if (isHeadingRow(node)) { for (var i = 0; i < node.childNodes.length; i++) { var border = "---"; var align = (node.childNodes[i].getAttribute("align") || "").toLowerCase(); if (align) border = alignMap[align] || border; borderCells += cell(border, node.childNodes[i]); } } return "\n" + content + (borderCells ? "\n" + borderCells : ""); } }; rules.table = { filter: function(node) { return node.nodeName === "TABLE" && isHeadingRow(node.rows[0]); }, replacement: function(content) { content = content.replace("\n\n", "\n"); return "\n\n" + content + "\n\n"; } }; rules.tableSection = { filter: ["thead", "tbody", "tfoot"], replacement: function(content) { return content; } }; function isHeadingRow(tr) { var parentNode = tr.parentNode; return parentNode.nodeName === "THEAD" || (parentNode.nodeName === "TABLE" || isFirstTbody(parentNode)) && (tr.previousSibling === null || every.call(tr.childNodes, function(n) { return n.nodeName === "TH"; })); } function isFirstTbody(element) { var previousSibling = element.previousSibling; return element.nodeName === "TBODY" && (!previousSibling || previousSibling.nodeName === "THEAD" && /^\s*$/i.test(previousSibling.textContent)); } function cell(content, node) { var index2 = indexOf.call(node.parentNode.childNodes, node); var prefix = " "; if (index2 === 0) prefix = "| "; return prefix + content.trim() + " |"; } function tables(turndownService) { for (var key in rules) turndownService.addRule(key, rules[key]); } exports.default = tables; } }); // node_modules/@notable/html2markdown/dist/turndown.plugin.tasks.js var require_turndown_plugin_tasks = __commonJS({ "node_modules/@notable/html2markdown/dist/turndown.plugin.tasks.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function taskListItems(turndownService) { turndownService.addRule("taskListItems", { filter: function(node) { return node.type === "checkbox" && node.parentNode.nodeName === "LI"; }, replacement: function(content, node) { return (node.checked ? "[x]" : "[ ]") + " "; } }); } exports.default = taskListItems; } }); // node_modules/@notable/html2markdown/dist/index.js var require_dist2 = __commonJS({ "node_modules/@notable/html2markdown/dist/index.js"(exports) { "use strict"; var __importDefault = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var mime_1 = __importDefault(require_mime()); var turndown_1 = __importDefault(require_turndown()); var turndown_plugin_tables_1 = __importDefault(require_turndown_plugin_tables()); var turndown_plugin_tasks_1 = __importDefault(require_turndown_plugin_tasks()); var html2markdown2 = (html3, options) => { html3 = html3.replace(//g, ""); html3 = html3.replace(/<\?xml(.*?)>/g, ""); html3 = html3.replace(/([^]*?)<\/head>/gi, ""); html3 = html3.replace(/
(\s*)<\/div>/g, ""); html3 = html3.replace(/(
(\s*)
(\s*)<\/div>){2,}/g, "

"); html3 = html3.replace(/]+)><\/en-media>/g, '
placeholder
'); html3 = html3.replace(//g, ''); html3 = html3.replace(//g, ''); html3 = html3.replace(/
  • \s*]*?)checked(.*?)>/g, "
  • [x] "); html3 = html3.replace(/
  • \s*/g, "
  • [ ] "); html3 = html3.replace(/]*?)checked(.*?)>/g, "- [x] "); html3 = html3.replace(//g, "- [ ] "); html3 = html3.replace(/<\/?en-(\w+)(.*?)>/g, ""); const service = (0, turndown_1.default)(options); service.use(turndown_plugin_tables_1.default); service.use(turndown_plugin_tasks_1.default); service.addRule("strikethrough", { filter: ["del", "s"], replacement: (str) => { return `~~${str}~~`; } }); service.addRule("subscript", { filter: ["sub"], replacement: (str) => { return `~${str}~`; } }); service.addRule("superscript", { filter: ["sup"], replacement: (str) => { return `^${str}^`; } }); service.addRule("alignment", { filter: (node) => node.nodeName !== "TABLE" && node.nodeName !== "TR" && node.nodeName !== "TD" && node.nodeName !== "TH" && (node.getAttribute("style") || "").includes("text-align:"), replacement: (str, ele) => { str = str.trim(); if (!str.length) return ""; const style = ele.getAttribute("style"); if (!style) return ""; const alignment = style.match(/text-align:\s*(\S+?);/); if (!alignment) return `${str} `; const nodeName = ele.nodeName; const tag = /^h\d$/i.test(nodeName) ? nodeName.toLowerCase() : "p"; if (str.includes("\n")) str = ` ${str} `; return `<${tag} align="${alignment[1]}">${str} `; } }); service.addRule("code-enex", { filter: (node) => node.nodeName === "DIV" && (node.getAttribute("style") || "").includes("-en-codeblock"), replacement: (str) => { str = str.replace(/^[\r\n]+/, "").replace(/[\r\n]+$/, ""); if (!str.length) return ""; str = str.replace(/<(?:.|\n)*?>/gm, ""); str = str.includes("\n") ? ` \`\`\` ${str} \`\`\` ` : `\`${str}\``; return str; } }); service.addRule("media-enex", { filter: (node) => node.nodeName === "DIV" && node.getAttribute("node") === "EN-MEDIA" && !!node.getAttribute("hash") && !!node.getAttribute("type"), replacement: (str, ele) => { const hash = ele.getAttribute("hash"); const type = ele.getAttribute("type") || ""; const filename = `${hash}${mime_1.default.getExtension(type)}`; const isImage = mime_1.default.isImage(type); if (isImage) { return ``; } else { return `${filename}`; } } }); service.addRule("mixed", { filter: ["font", "span"], replacement: (str, ele) => { if (!str.trim()) return ""; const style = ele.getAttribute("style"); let newStyle = ""; if (style) { if (style.match(/text-decoration: underline/)) { str = `${str}`; } if (style.match(/text-decoration: line-through/)) { str = `~~${str}~~`; } if (style.match(/font-style: italic/)) { str = `_${str}_`; } if (style.match(/font-weight: bold/)) { str = `**${str}**`; } if (str.match(/^[^#]|>#/)) { const match = style.match(/font-size: (\d+)px/i); if (match) { const px = Number(match[1]); if (px >= 48) { str = `# ${str}`; } else if (px >= 36) { str = `## ${str}`; } else if (px >= 24) { str = `### ${str}`; } else if (px >= 14) { } else if (px >= 12) { str = `${str}`; } else { str = `${str}`; } } } const backgroundColor = style.match(/background-color: ([^;]+);/); if (backgroundColor && backgroundColor[1] !== "rgb(255, 255, 255)" && backgroundColor[1] !== "#ffffff") { newStyle += backgroundColor[0]; } } const colorAttr = ele.getAttribute("color"); if (colorAttr && colorAttr !== "#010101") { newStyle += `color: ${colorAttr};`; } if (style) { const colorStyle = style.match(/[^-]color: ([^;]+);/); if (colorStyle && colorStyle[1] !== "#010101") { newStyle += `color: ${colorStyle[1]};`; } } if (newStyle) { str = `${str}`; } return str; } }); service.keep(["kbd", "mark", "small", "u"]); html3 = service.turndown(html3); html3 = html3.replace(/\\((-|\*|\+) )/g, "$1"); html3 = html3.replace(/\\\[([^\]]*?)\\\] /g, "[$1] "); html3 = html3.replace(/\\\_/g, "_"); html3 = html3.replace(/^(-|\*|\+)\s+/gm, "$1 "); html3 = html3.replace(/^((?:-|\*|\+) .*)\n\n(?=(?:-|\*|\+) )/gm, "$1\n"); html3 = html3.replace(/^(\d+\.)\s+/gm, "$1 "); html3 = html3.replace(/(\s*\n\s*){3,}/g, "\n\n"); html3 = html3.replace(/\n\n
    \n\n(-|\*|\+) /g, "\n\n$1 "); html3 = html3.replace(/[^\S\r\n]+$/gm, ""); html3 = html3.trim(); return html3; }; exports.default = html2markdown2; } }); // node_modules/qrcode/lib/can-promise.js var require_can_promise = __commonJS({ "node_modules/qrcode/lib/can-promise.js"(exports, module2) { module2.exports = function() { return typeof Promise === "function" && Promise.prototype && Promise.prototype.then; }; } }); // node_modules/qrcode/lib/core/utils.js var require_utils = __commonJS({ "node_modules/qrcode/lib/core/utils.js"(exports) { var toSJISFunction; var CODEWORDS_COUNT = [ 0, 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706 ]; exports.getSymbolSize = function getSymbolSize(version) { if (!version) throw new Error('"version" cannot be null or undefined'); if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40'); return version * 4 + 17; }; exports.getSymbolTotalCodewords = function getSymbolTotalCodewords(version) { return CODEWORDS_COUNT[version]; }; exports.getBCHDigit = function(data2) { let digit = 0; while (data2 !== 0) { digit++; data2 >>>= 1; } return digit; }; exports.setToSJISFunction = function setToSJISFunction(f) { if (typeof f !== "function") { throw new Error('"toSJISFunc" is not a valid function.'); } toSJISFunction = f; }; exports.isKanjiModeEnabled = function() { return typeof toSJISFunction !== "undefined"; }; exports.toSJIS = function toSJIS(kanji) { return toSJISFunction(kanji); }; } }); // node_modules/qrcode/lib/core/error-correction-level.js var require_error_correction_level = __commonJS({ "node_modules/qrcode/lib/core/error-correction-level.js"(exports) { exports.L = { bit: 1 }; exports.M = { bit: 0 }; exports.Q = { bit: 3 }; exports.H = { bit: 2 }; function fromString(string) { if (typeof string !== "string") { throw new Error("Param is not a string"); } const lcStr = string.toLowerCase(); switch (lcStr) { case "l": case "low": return exports.L; case "m": case "medium": return exports.M; case "q": case "quartile": return exports.Q; case "h": case "high": return exports.H; default: throw new Error("Unknown EC Level: " + string); } } exports.isValid = function isValid(level) { return level && typeof level.bit !== "undefined" && level.bit >= 0 && level.bit < 4; }; exports.from = function from(value, defaultValue) { if (exports.isValid(value)) { return value; } try { return fromString(value); } catch (e) { return defaultValue; } }; } }); // node_modules/qrcode/lib/core/bit-buffer.js var require_bit_buffer = __commonJS({ "node_modules/qrcode/lib/core/bit-buffer.js"(exports, module2) { function BitBuffer() { this.buffer = []; this.length = 0; } BitBuffer.prototype = { get: function(index2) { const bufIndex = Math.floor(index2 / 8); return (this.buffer[bufIndex] >>> 7 - index2 % 8 & 1) === 1; }, put: function(num, length) { for (let i = 0; i < length; i++) { this.putBit((num >>> length - i - 1 & 1) === 1); } }, getLengthInBits: function() { return this.length; }, putBit: function(bit) { const bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); } if (bit) { this.buffer[bufIndex] |= 128 >>> this.length % 8; } this.length++; } }; module2.exports = BitBuffer; } }); // node_modules/qrcode/lib/core/bit-matrix.js var require_bit_matrix = __commonJS({ "node_modules/qrcode/lib/core/bit-matrix.js"(exports, module2) { function BitMatrix(size) { if (!size || size < 1) { throw new Error("BitMatrix size must be defined and greater than 0"); } this.size = size; this.data = new Uint8Array(size * size); this.reservedBit = new Uint8Array(size * size); } BitMatrix.prototype.set = function(row, col, value, reserved) { const index2 = row * this.size + col; this.data[index2] = value; if (reserved) this.reservedBit[index2] = true; }; BitMatrix.prototype.get = function(row, col) { return this.data[row * this.size + col]; }; BitMatrix.prototype.xor = function(row, col, value) { this.data[row * this.size + col] ^= value; }; BitMatrix.prototype.isReserved = function(row, col) { return this.reservedBit[row * this.size + col]; }; module2.exports = BitMatrix; } }); // node_modules/qrcode/lib/core/alignment-pattern.js var require_alignment_pattern = __commonJS({ "node_modules/qrcode/lib/core/alignment-pattern.js"(exports) { var getSymbolSize = require_utils().getSymbolSize; exports.getRowColCoords = function getRowColCoords(version) { if (version === 1) return []; const posCount = Math.floor(version / 7) + 2; const size = getSymbolSize(version); const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2; const positions = [size - 7]; for (let i = 1; i < posCount - 1; i++) { positions[i] = positions[i - 1] - intervals; } positions.push(6); return positions.reverse(); }; exports.getPositions = function getPositions(version) { const coords = []; const pos = exports.getRowColCoords(version); const posLength = pos.length; for (let i = 0; i < posLength; i++) { for (let j = 0; j < posLength; j++) { if (i === 0 && j === 0 || i === 0 && j === posLength - 1 || i === posLength - 1 && j === 0) { continue; } coords.push([pos[i], pos[j]]); } } return coords; }; } }); // node_modules/qrcode/lib/core/finder-pattern.js var require_finder_pattern = __commonJS({ "node_modules/qrcode/lib/core/finder-pattern.js"(exports) { var getSymbolSize = require_utils().getSymbolSize; var FINDER_PATTERN_SIZE = 7; exports.getPositions = function getPositions(version) { const size = getSymbolSize(version); return [ [0, 0], [size - FINDER_PATTERN_SIZE, 0], [0, size - FINDER_PATTERN_SIZE] ]; }; } }); // node_modules/qrcode/lib/core/mask-pattern.js var require_mask_pattern = __commonJS({ "node_modules/qrcode/lib/core/mask-pattern.js"(exports) { exports.Patterns = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 }; var PenaltyScores = { N1: 3, N2: 3, N3: 40, N4: 10 }; exports.isValid = function isValid(mask) { return mask != null && mask !== "" && !isNaN(mask) && mask >= 0 && mask <= 7; }; exports.from = function from(value) { return exports.isValid(value) ? parseInt(value, 10) : void 0; }; exports.getPenaltyN1 = function getPenaltyN1(data2) { const size = data2.size; let points = 0; let sameCountCol = 0; let sameCountRow = 0; let lastCol = null; let lastRow = null; for (let row = 0; row < size; row++) { sameCountCol = sameCountRow = 0; lastCol = lastRow = null; for (let col = 0; col < size; col++) { let module3 = data2.get(row, col); if (module3 === lastCol) { sameCountCol++; } else { if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5); lastCol = module3; sameCountCol = 1; } module3 = data2.get(col, row); if (module3 === lastRow) { sameCountRow++; } else { if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5); lastRow = module3; sameCountRow = 1; } } if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5); if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5); } return points; }; exports.getPenaltyN2 = function getPenaltyN2(data2) { const size = data2.size; let points = 0; for (let row = 0; row < size - 1; row++) { for (let col = 0; col < size - 1; col++) { const last2 = data2.get(row, col) + data2.get(row, col + 1) + data2.get(row + 1, col) + data2.get(row + 1, col + 1); if (last2 === 4 || last2 === 0) points++; } } return points * PenaltyScores.N2; }; exports.getPenaltyN3 = function getPenaltyN3(data2) { const size = data2.size; let points = 0; let bitsCol = 0; let bitsRow = 0; for (let row = 0; row < size; row++) { bitsCol = bitsRow = 0; for (let col = 0; col < size; col++) { bitsCol = bitsCol << 1 & 2047 | data2.get(row, col); if (col >= 10 && (bitsCol === 1488 || bitsCol === 93)) points++; bitsRow = bitsRow << 1 & 2047 | data2.get(col, row); if (col >= 10 && (bitsRow === 1488 || bitsRow === 93)) points++; } } return points * PenaltyScores.N3; }; exports.getPenaltyN4 = function getPenaltyN4(data2) { let darkCount = 0; const modulesCount = data2.data.length; for (let i = 0; i < modulesCount; i++) darkCount += data2.data[i]; const k = Math.abs(Math.ceil(darkCount * 100 / modulesCount / 5) - 10); return k * PenaltyScores.N4; }; function getMaskAt(maskPattern, i, j) { switch (maskPattern) { case exports.Patterns.PATTERN000: return (i + j) % 2 === 0; case exports.Patterns.PATTERN001: return i % 2 === 0; case exports.Patterns.PATTERN010: return j % 3 === 0; case exports.Patterns.PATTERN011: return (i + j) % 3 === 0; case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0; case exports.Patterns.PATTERN101: return i * j % 2 + i * j % 3 === 0; case exports.Patterns.PATTERN110: return (i * j % 2 + i * j % 3) % 2 === 0; case exports.Patterns.PATTERN111: return (i * j % 3 + (i + j) % 2) % 2 === 0; default: throw new Error("bad maskPattern:" + maskPattern); } } exports.applyMask = function applyMask(pattern, data2) { const size = data2.size; for (let col = 0; col < size; col++) { for (let row = 0; row < size; row++) { if (data2.isReserved(row, col)) continue; data2.xor(row, col, getMaskAt(pattern, row, col)); } } }; exports.getBestMask = function getBestMask(data2, setupFormatFunc) { const numPatterns = Object.keys(exports.Patterns).length; let bestPattern = 0; let lowerPenalty = Infinity; for (let p = 0; p < numPatterns; p++) { setupFormatFunc(p); exports.applyMask(p, data2); const penalty = exports.getPenaltyN1(data2) + exports.getPenaltyN2(data2) + exports.getPenaltyN3(data2) + exports.getPenaltyN4(data2); exports.applyMask(p, data2); if (penalty < lowerPenalty) { lowerPenalty = penalty; bestPattern = p; } } return bestPattern; }; } }); // node_modules/qrcode/lib/core/error-correction-code.js var require_error_correction_code = __commonJS({ "node_modules/qrcode/lib/core/error-correction-code.js"(exports) { var ECLevel = require_error_correction_level(); var EC_BLOCKS_TABLE = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 4, 1, 2, 4, 4, 2, 4, 4, 4, 2, 4, 6, 5, 2, 4, 6, 6, 2, 5, 8, 8, 4, 5, 8, 8, 4, 5, 8, 11, 4, 8, 10, 11, 4, 9, 12, 16, 4, 9, 16, 16, 6, 10, 12, 18, 6, 10, 17, 16, 6, 11, 16, 19, 6, 13, 18, 21, 7, 14, 21, 25, 8, 16, 20, 25, 8, 17, 23, 25, 9, 17, 23, 34, 9, 18, 25, 30, 10, 20, 27, 32, 12, 21, 29, 35, 12, 23, 34, 37, 12, 25, 34, 40, 13, 26, 35, 42, 14, 28, 38, 45, 15, 29, 40, 48, 16, 31, 43, 51, 17, 33, 45, 54, 18, 35, 48, 57, 19, 37, 51, 60, 19, 38, 53, 63, 20, 40, 56, 66, 21, 43, 59, 70, 22, 45, 62, 74, 24, 47, 65, 77, 25, 49, 68, 81 ]; var EC_CODEWORDS_TABLE = [ 7, 10, 13, 17, 10, 16, 22, 28, 15, 26, 36, 44, 20, 36, 52, 64, 26, 48, 72, 88, 36, 64, 96, 112, 40, 72, 108, 130, 48, 88, 132, 156, 60, 110, 160, 192, 72, 130, 192, 224, 80, 150, 224, 264, 96, 176, 260, 308, 104, 198, 288, 352, 120, 216, 320, 384, 132, 240, 360, 432, 144, 280, 408, 480, 168, 308, 448, 532, 180, 338, 504, 588, 196, 364, 546, 650, 224, 416, 600, 700, 224, 442, 644, 750, 252, 476, 690, 816, 270, 504, 750, 900, 300, 560, 810, 960, 312, 588, 870, 1050, 336, 644, 952, 1110, 360, 700, 1020, 1200, 390, 728, 1050, 1260, 420, 784, 1140, 1350, 450, 812, 1200, 1440, 480, 868, 1290, 1530, 510, 924, 1350, 1620, 540, 980, 1440, 1710, 570, 1036, 1530, 1800, 570, 1064, 1590, 1890, 600, 1120, 1680, 1980, 630, 1204, 1770, 2100, 660, 1260, 1860, 2220, 720, 1316, 1950, 2310, 750, 1372, 2040, 2430 ]; exports.getBlocksCount = function getBlocksCount(version, errorCorrectionLevel) { switch (errorCorrectionLevel) { case ECLevel.L: return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]; case ECLevel.M: return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]; case ECLevel.Q: return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]; case ECLevel.H: return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]; default: return void 0; } }; exports.getTotalCodewordsCount = function getTotalCodewordsCount(version, errorCorrectionLevel) { switch (errorCorrectionLevel) { case ECLevel.L: return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]; case ECLevel.M: return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]; case ECLevel.Q: return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]; case ECLevel.H: return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]; default: return void 0; } }; } }); // node_modules/qrcode/lib/core/galois-field.js var require_galois_field = __commonJS({ "node_modules/qrcode/lib/core/galois-field.js"(exports) { var EXP_TABLE = new Uint8Array(512); var LOG_TABLE = new Uint8Array(256); (function initTables() { let x = 1; for (let i = 0; i < 255; i++) { EXP_TABLE[i] = x; LOG_TABLE[x] = i; x <<= 1; if (x & 256) { x ^= 285; } } for (let i = 255; i < 512; i++) { EXP_TABLE[i] = EXP_TABLE[i - 255]; } })(); exports.log = function log2(n) { if (n < 1) throw new Error("log(" + n + ")"); return LOG_TABLE[n]; }; exports.exp = function exp(n) { return EXP_TABLE[n]; }; exports.mul = function mul(x, y) { if (x === 0 || y === 0) return 0; return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]; }; } }); // node_modules/qrcode/lib/core/polynomial.js var require_polynomial = __commonJS({ "node_modules/qrcode/lib/core/polynomial.js"(exports) { var GF = require_galois_field(); exports.mul = function mul(p1, p2) { const coeff = new Uint8Array(p1.length + p2.length - 1); for (let i = 0; i < p1.length; i++) { for (let j = 0; j < p2.length; j++) { coeff[i + j] ^= GF.mul(p1[i], p2[j]); } } return coeff; }; exports.mod = function mod(divident, divisor) { let result = new Uint8Array(divident); while (result.length - divisor.length >= 0) { const coeff = result[0]; for (let i = 0; i < divisor.length; i++) { result[i] ^= GF.mul(divisor[i], coeff); } let offset = 0; while (offset < result.length && result[offset] === 0) offset++; result = result.slice(offset); } return result; }; exports.generateECPolynomial = function generateECPolynomial(degree) { let poly = new Uint8Array([1]); for (let i = 0; i < degree; i++) { poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)])); } return poly; }; } }); // node_modules/qrcode/lib/core/reed-solomon-encoder.js var require_reed_solomon_encoder = __commonJS({ "node_modules/qrcode/lib/core/reed-solomon-encoder.js"(exports, module2) { var Polynomial = require_polynomial(); function ReedSolomonEncoder(degree) { this.genPoly = void 0; this.degree = degree; if (this.degree) this.initialize(this.degree); } ReedSolomonEncoder.prototype.initialize = function initialize(degree) { this.degree = degree; this.genPoly = Polynomial.generateECPolynomial(this.degree); }; ReedSolomonEncoder.prototype.encode = function encode(data2) { if (!this.genPoly) { throw new Error("Encoder not initialized"); } const paddedData = new Uint8Array(data2.length + this.degree); paddedData.set(data2); const remainder = Polynomial.mod(paddedData, this.genPoly); const start = this.degree - remainder.length; if (start > 0) { const buff = new Uint8Array(this.degree); buff.set(remainder, start); return buff; } return remainder; }; module2.exports = ReedSolomonEncoder; } }); // node_modules/qrcode/lib/core/version-check.js var require_version_check = __commonJS({ "node_modules/qrcode/lib/core/version-check.js"(exports) { exports.isValid = function isValid(version) { return !isNaN(version) && version >= 1 && version <= 40; }; } }); // node_modules/qrcode/lib/core/regex.js var require_regex = __commonJS({ "node_modules/qrcode/lib/core/regex.js"(exports) { var numeric = "[0-9]+"; var alphanumeric = "[A-Z $%*+\\-./:]+"; var kanji = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+"; kanji = kanji.replace(/u/g, "\\u"); var byte = "(?:(?![A-Z0-9 $%*+\\-./:]|" + kanji + ")(?:.|[\r\n]))+"; exports.KANJI = new RegExp(kanji, "g"); exports.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"); exports.BYTE = new RegExp(byte, "g"); exports.NUMERIC = new RegExp(numeric, "g"); exports.ALPHANUMERIC = new RegExp(alphanumeric, "g"); var TEST_KANJI = new RegExp("^" + kanji + "$"); var TEST_NUMERIC = new RegExp("^" + numeric + "$"); var TEST_ALPHANUMERIC = new RegExp("^[A-Z0-9 $%*+\\-./:]+$"); exports.testKanji = function testKanji(str) { return TEST_KANJI.test(str); }; exports.testNumeric = function testNumeric(str) { return TEST_NUMERIC.test(str); }; exports.testAlphanumeric = function testAlphanumeric(str) { return TEST_ALPHANUMERIC.test(str); }; } }); // node_modules/qrcode/lib/core/mode.js var require_mode = __commonJS({ "node_modules/qrcode/lib/core/mode.js"(exports) { var VersionCheck = require_version_check(); var Regex = require_regex(); exports.NUMERIC = { id: "Numeric", bit: 1 << 0, ccBits: [10, 12, 14] }; exports.ALPHANUMERIC = { id: "Alphanumeric", bit: 1 << 1, ccBits: [9, 11, 13] }; exports.BYTE = { id: "Byte", bit: 1 << 2, ccBits: [8, 16, 16] }; exports.KANJI = { id: "Kanji", bit: 1 << 3, ccBits: [8, 10, 12] }; exports.MIXED = { bit: -1 }; exports.getCharCountIndicator = function getCharCountIndicator(mode, version) { if (!mode.ccBits) throw new Error("Invalid mode: " + mode); if (!VersionCheck.isValid(version)) { throw new Error("Invalid version: " + version); } if (version >= 1 && version < 10) return mode.ccBits[0]; else if (version < 27) return mode.ccBits[1]; return mode.ccBits[2]; }; exports.getBestModeForData = function getBestModeForData(dataStr) { if (Regex.testNumeric(dataStr)) return exports.NUMERIC; else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC; else if (Regex.testKanji(dataStr)) return exports.KANJI; else return exports.BYTE; }; exports.toString = function toString2(mode) { if (mode && mode.id) return mode.id; throw new Error("Invalid mode"); }; exports.isValid = function isValid(mode) { return mode && mode.bit && mode.ccBits; }; function fromString(string) { if (typeof string !== "string") { throw new Error("Param is not a string"); } const lcStr = string.toLowerCase(); switch (lcStr) { case "numeric": return exports.NUMERIC; case "alphanumeric": return exports.ALPHANUMERIC; case "kanji": return exports.KANJI; case "byte": return exports.BYTE; default: throw new Error("Unknown mode: " + string); } } exports.from = function from(value, defaultValue) { if (exports.isValid(value)) { return value; } try { return fromString(value); } catch (e) { return defaultValue; } }; } }); // node_modules/qrcode/lib/core/version.js var require_version = __commonJS({ "node_modules/qrcode/lib/core/version.js"(exports) { var Utils = require_utils(); var ECCode = require_error_correction_code(); var ECLevel = require_error_correction_level(); var Mode = require_mode(); var VersionCheck = require_version_check(); var G18 = 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0; var G18_BCH = Utils.getBCHDigit(G18); function getBestVersionForDataLength(mode, length, errorCorrectionLevel) { for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) { return currentVersion; } } return void 0; } function getReservedBitsCount(mode, version) { return Mode.getCharCountIndicator(mode, version) + 4; } function getTotalBitsFromDataArray(segments, version) { let totalBits = 0; segments.forEach(function(data2) { const reservedBits = getReservedBitsCount(data2.mode, version); totalBits += reservedBits + data2.getBitsLength(); }); return totalBits; } function getBestVersionForMixedData(segments, errorCorrectionLevel) { for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { const length = getTotalBitsFromDataArray(segments, currentVersion); if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) { return currentVersion; } } return void 0; } exports.from = function from(value, defaultValue) { if (VersionCheck.isValid(value)) { return parseInt(value, 10); } return defaultValue; }; exports.getCapacity = function getCapacity(version, errorCorrectionLevel, mode) { if (!VersionCheck.isValid(version)) { throw new Error("Invalid QR Code version"); } if (typeof mode === "undefined") mode = Mode.BYTE; const totalCodewords = Utils.getSymbolTotalCodewords(version); const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8; if (mode === Mode.MIXED) return dataTotalCodewordsBits; const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version); switch (mode) { case Mode.NUMERIC: return Math.floor(usableBits / 10 * 3); case Mode.ALPHANUMERIC: return Math.floor(usableBits / 11 * 2); case Mode.KANJI: return Math.floor(usableBits / 13); case Mode.BYTE: default: return Math.floor(usableBits / 8); } }; exports.getBestVersionForData = function getBestVersionForData(data2, errorCorrectionLevel) { let seg; const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M); if (Array.isArray(data2)) { if (data2.length > 1) { return getBestVersionForMixedData(data2, ecl); } if (data2.length === 0) { return 1; } seg = data2[0]; } else { seg = data2; } return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl); }; exports.getEncodedBits = function getEncodedBits(version) { if (!VersionCheck.isValid(version) || version < 7) { throw new Error("Invalid QR Code version"); } let d = version << 12; while (Utils.getBCHDigit(d) - G18_BCH >= 0) { d ^= G18 << Utils.getBCHDigit(d) - G18_BCH; } return version << 12 | d; }; } }); // node_modules/qrcode/lib/core/format-info.js var require_format_info = __commonJS({ "node_modules/qrcode/lib/core/format-info.js"(exports) { var Utils = require_utils(); var G15 = 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0; var G15_MASK = 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1; var G15_BCH = Utils.getBCHDigit(G15); exports.getEncodedBits = function getEncodedBits(errorCorrectionLevel, mask) { const data2 = errorCorrectionLevel.bit << 3 | mask; let d = data2 << 10; while (Utils.getBCHDigit(d) - G15_BCH >= 0) { d ^= G15 << Utils.getBCHDigit(d) - G15_BCH; } return (data2 << 10 | d) ^ G15_MASK; }; } }); // node_modules/qrcode/lib/core/numeric-data.js var require_numeric_data = __commonJS({ "node_modules/qrcode/lib/core/numeric-data.js"(exports, module2) { var Mode = require_mode(); function NumericData(data2) { this.mode = Mode.NUMERIC; this.data = data2.toString(); } NumericData.getBitsLength = function getBitsLength(length) { return 10 * Math.floor(length / 3) + (length % 3 ? length % 3 * 3 + 1 : 0); }; NumericData.prototype.getLength = function getLength() { return this.data.length; }; NumericData.prototype.getBitsLength = function getBitsLength() { return NumericData.getBitsLength(this.data.length); }; NumericData.prototype.write = function write(bitBuffer) { let i, group, value; for (i = 0; i + 3 <= this.data.length; i += 3) { group = this.data.substr(i, 3); value = parseInt(group, 10); bitBuffer.put(value, 10); } const remainingNum = this.data.length - i; if (remainingNum > 0) { group = this.data.substr(i); value = parseInt(group, 10); bitBuffer.put(value, remainingNum * 3 + 1); } }; module2.exports = NumericData; } }); // node_modules/qrcode/lib/core/alphanumeric-data.js var require_alphanumeric_data = __commonJS({ "node_modules/qrcode/lib/core/alphanumeric-data.js"(exports, module2) { var Mode = require_mode(); var ALPHA_NUM_CHARS = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":" ]; function AlphanumericData(data2) { this.mode = Mode.ALPHANUMERIC; this.data = data2; } AlphanumericData.getBitsLength = function getBitsLength(length) { return 11 * Math.floor(length / 2) + 6 * (length % 2); }; AlphanumericData.prototype.getLength = function getLength() { return this.data.length; }; AlphanumericData.prototype.getBitsLength = function getBitsLength() { return AlphanumericData.getBitsLength(this.data.length); }; AlphanumericData.prototype.write = function write(bitBuffer) { let i; for (i = 0; i + 2 <= this.data.length; i += 2) { let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45; value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]); bitBuffer.put(value, 11); } if (this.data.length % 2) { bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6); } }; module2.exports = AlphanumericData; } }); // node_modules/qrcode/lib/core/byte-data.js var require_byte_data = __commonJS({ "node_modules/qrcode/lib/core/byte-data.js"(exports, module2) { var Mode = require_mode(); function ByteData(data2) { this.mode = Mode.BYTE; if (typeof data2 === "string") { this.data = new TextEncoder().encode(data2); } else { this.data = new Uint8Array(data2); } } ByteData.getBitsLength = function getBitsLength(length) { return length * 8; }; ByteData.prototype.getLength = function getLength() { return this.data.length; }; ByteData.prototype.getBitsLength = function getBitsLength() { return ByteData.getBitsLength(this.data.length); }; ByteData.prototype.write = function(bitBuffer) { for (let i = 0, l = this.data.length; i < l; i++) { bitBuffer.put(this.data[i], 8); } }; module2.exports = ByteData; } }); // node_modules/qrcode/lib/core/kanji-data.js var require_kanji_data = __commonJS({ "node_modules/qrcode/lib/core/kanji-data.js"(exports, module2) { var Mode = require_mode(); var Utils = require_utils(); function KanjiData(data2) { this.mode = Mode.KANJI; this.data = data2; } KanjiData.getBitsLength = function getBitsLength(length) { return length * 13; }; KanjiData.prototype.getLength = function getLength() { return this.data.length; }; KanjiData.prototype.getBitsLength = function getBitsLength() { return KanjiData.getBitsLength(this.data.length); }; KanjiData.prototype.write = function(bitBuffer) { let i; for (i = 0; i < this.data.length; i++) { let value = Utils.toSJIS(this.data[i]); if (value >= 33088 && value <= 40956) { value -= 33088; } else if (value >= 57408 && value <= 60351) { value -= 49472; } else { throw new Error("Invalid SJIS character: " + this.data[i] + "\nMake sure your charset is UTF-8"); } value = (value >>> 8 & 255) * 192 + (value & 255); bitBuffer.put(value, 13); } }; module2.exports = KanjiData; } }); // node_modules/dijkstrajs/dijkstra.js var require_dijkstra = __commonJS({ "node_modules/dijkstrajs/dijkstra.js"(exports, module2) { "use strict"; var dijkstra = { single_source_shortest_paths: function(graph, s, d) { var predecessors = {}; var costs = {}; costs[s] = 0; var open = dijkstra.PriorityQueue.make(); open.push(s, 0); var closest2, u, v, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit; while (!open.empty()) { closest2 = open.pop(); u = closest2.value; cost_of_s_to_u = closest2.cost; adjacent_nodes = graph[u] || {}; for (v in adjacent_nodes) { if (adjacent_nodes.hasOwnProperty(v)) { cost_of_e = adjacent_nodes[v]; cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e; cost_of_s_to_v = costs[v]; first_visit = typeof costs[v] === "undefined"; if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) { costs[v] = cost_of_s_to_u_plus_cost_of_e; open.push(v, cost_of_s_to_u_plus_cost_of_e); predecessors[v] = u; } } } } if (typeof d !== "undefined" && typeof costs[d] === "undefined") { var msg = ["Could not find a path from ", s, " to ", d, "."].join(""); throw new Error(msg); } return predecessors; }, extract_shortest_path_from_predecessor_list: function(predecessors, d) { var nodes = []; var u = d; var predecessor; while (u) { nodes.push(u); predecessor = predecessors[u]; u = predecessors[u]; } nodes.reverse(); return nodes; }, find_path: function(graph, s, d) { var predecessors = dijkstra.single_source_shortest_paths(graph, s, d); return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d); }, PriorityQueue: { make: function(opts) { var T = dijkstra.PriorityQueue, t = {}, key; opts = opts || {}; for (key in T) { if (T.hasOwnProperty(key)) { t[key] = T[key]; } } t.queue = []; t.sorter = opts.sorter || T.default_sorter; return t; }, default_sorter: function(a, b) { return a.cost - b.cost; }, push: function(value, cost) { var item = { value, cost }; this.queue.push(item); this.queue.sort(this.sorter); }, pop: function() { return this.queue.shift(); }, empty: function() { return this.queue.length === 0; } } }; if (typeof module2 !== "undefined") { module2.exports = dijkstra; } } }); // node_modules/qrcode/lib/core/segments.js var require_segments = __commonJS({ "node_modules/qrcode/lib/core/segments.js"(exports) { var Mode = require_mode(); var NumericData = require_numeric_data(); var AlphanumericData = require_alphanumeric_data(); var ByteData = require_byte_data(); var KanjiData = require_kanji_data(); var Regex = require_regex(); var Utils = require_utils(); var dijkstra = require_dijkstra(); function getStringByteLength(str) { return unescape(encodeURIComponent(str)).length; } function getSegments(regex, mode, str) { const segments = []; let result; while ((result = regex.exec(str)) !== null) { segments.push({ data: result[0], index: result.index, mode, length: result[0].length }); } return segments; } function getSegmentsFromString(dataStr) { const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr); const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr); let byteSegs; let kanjiSegs; if (Utils.isKanjiModeEnabled()) { byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr); kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr); } else { byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr); kanjiSegs = []; } const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs); return segs.sort(function(s1, s2) { return s1.index - s2.index; }).map(function(obj) { return { data: obj.data, mode: obj.mode, length: obj.length }; }); } function getSegmentBitsLength(length, mode) { switch (mode) { case Mode.NUMERIC: return NumericData.getBitsLength(length); case Mode.ALPHANUMERIC: return AlphanumericData.getBitsLength(length); case Mode.KANJI: return KanjiData.getBitsLength(length); case Mode.BYTE: return ByteData.getBitsLength(length); } } function mergeSegments(segs) { return segs.reduce(function(acc, curr) { const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null; if (prevSeg && prevSeg.mode === curr.mode) { acc[acc.length - 1].data += curr.data; return acc; } acc.push(curr); return acc; }, []); } function buildNodes(segs) { const nodes = []; for (let i = 0; i < segs.length; i++) { const seg = segs[i]; switch (seg.mode) { case Mode.NUMERIC: nodes.push([ seg, { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length }, { data: seg.data, mode: Mode.BYTE, length: seg.length } ]); break; case Mode.ALPHANUMERIC: nodes.push([ seg, { data: seg.data, mode: Mode.BYTE, length: seg.length } ]); break; case Mode.KANJI: nodes.push([ seg, { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) } ]); break; case Mode.BYTE: nodes.push([ { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) } ]); } } return nodes; } function buildGraph(nodes, version) { const table = {}; const graph = { start: {} }; let prevNodeIds = ["start"]; for (let i = 0; i < nodes.length; i++) { const nodeGroup = nodes[i]; const currentNodeIds = []; for (let j = 0; j < nodeGroup.length; j++) { const node = nodeGroup[j]; const key = "" + i + j; currentNodeIds.push(key); table[key] = { node, lastCount: 0 }; graph[key] = {}; for (let n = 0; n < prevNodeIds.length; n++) { const prevNodeId = prevNodeIds[n]; if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) { graph[prevNodeId][key] = getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) - getSegmentBitsLength(table[prevNodeId].lastCount, node.mode); table[prevNodeId].lastCount += node.length; } else { if (table[prevNodeId]) table[prevNodeId].lastCount = node.length; graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) + 4 + Mode.getCharCountIndicator(node.mode, version); } } } prevNodeIds = currentNodeIds; } for (let n = 0; n < prevNodeIds.length; n++) { graph[prevNodeIds[n]].end = 0; } return { map: graph, table }; } function buildSingleSegment(data2, modesHint) { let mode; const bestMode = Mode.getBestModeForData(data2); mode = Mode.from(modesHint, bestMode); if (mode !== Mode.BYTE && mode.bit < bestMode.bit) { throw new Error('"' + data2 + '" cannot be encoded with mode ' + Mode.toString(mode) + ".\n Suggested mode is: " + Mode.toString(bestMode)); } if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) { mode = Mode.BYTE; } switch (mode) { case Mode.NUMERIC: return new NumericData(data2); case Mode.ALPHANUMERIC: return new AlphanumericData(data2); case Mode.KANJI: return new KanjiData(data2); case Mode.BYTE: return new ByteData(data2); } } exports.fromArray = function fromArray(array) { return array.reduce(function(acc, seg) { if (typeof seg === "string") { acc.push(buildSingleSegment(seg, null)); } else if (seg.data) { acc.push(buildSingleSegment(seg.data, seg.mode)); } return acc; }, []); }; exports.fromString = function fromString(data2, version) { const segs = getSegmentsFromString(data2, Utils.isKanjiModeEnabled()); const nodes = buildNodes(segs); const graph = buildGraph(nodes, version); const path = dijkstra.find_path(graph.map, "start", "end"); const optimizedSegs = []; for (let i = 1; i < path.length - 1; i++) { optimizedSegs.push(graph.table[path[i]].node); } return exports.fromArray(mergeSegments(optimizedSegs)); }; exports.rawSplit = function rawSplit(data2) { return exports.fromArray(getSegmentsFromString(data2, Utils.isKanjiModeEnabled())); }; } }); // node_modules/qrcode/lib/core/qrcode.js var require_qrcode = __commonJS({ "node_modules/qrcode/lib/core/qrcode.js"(exports) { var Utils = require_utils(); var ECLevel = require_error_correction_level(); var BitBuffer = require_bit_buffer(); var BitMatrix = require_bit_matrix(); var AlignmentPattern = require_alignment_pattern(); var FinderPattern = require_finder_pattern(); var MaskPattern = require_mask_pattern(); var ECCode = require_error_correction_code(); var ReedSolomonEncoder = require_reed_solomon_encoder(); var Version = require_version(); var FormatInfo = require_format_info(); var Mode = require_mode(); var Segments = require_segments(); function setupFinderPattern(matrix, version) { const size = matrix.size; const pos = FinderPattern.getPositions(version); for (let i = 0; i < pos.length; i++) { const row = pos[i][0]; const col = pos[i][1]; for (let r = -1; r <= 7; r++) { if (row + r <= -1 || size <= row + r) continue; for (let c = -1; c <= 7; c++) { if (col + c <= -1 || size <= col + c) continue; if (r >= 0 && r <= 6 && (c === 0 || c === 6) || c >= 0 && c <= 6 && (r === 0 || r === 6) || r >= 2 && r <= 4 && c >= 2 && c <= 4) { matrix.set(row + r, col + c, true, true); } else { matrix.set(row + r, col + c, false, true); } } } } } function setupTimingPattern(matrix) { const size = matrix.size; for (let r = 8; r < size - 8; r++) { const value = r % 2 === 0; matrix.set(r, 6, value, true); matrix.set(6, r, value, true); } } function setupAlignmentPattern(matrix, version) { const pos = AlignmentPattern.getPositions(version); for (let i = 0; i < pos.length; i++) { const row = pos[i][0]; const col = pos[i][1]; for (let r = -2; r <= 2; r++) { for (let c = -2; c <= 2; c++) { if (r === -2 || r === 2 || c === -2 || c === 2 || r === 0 && c === 0) { matrix.set(row + r, col + c, true, true); } else { matrix.set(row + r, col + c, false, true); } } } } } function setupVersionInfo(matrix, version) { const size = matrix.size; const bits = Version.getEncodedBits(version); let row, col, mod; for (let i = 0; i < 18; i++) { row = Math.floor(i / 3); col = i % 3 + size - 8 - 3; mod = (bits >> i & 1) === 1; matrix.set(row, col, mod, true); matrix.set(col, row, mod, true); } } function setupFormatInfo(matrix, errorCorrectionLevel, maskPattern) { const size = matrix.size; const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern); let i, mod; for (i = 0; i < 15; i++) { mod = (bits >> i & 1) === 1; if (i < 6) { matrix.set(i, 8, mod, true); } else if (i < 8) { matrix.set(i + 1, 8, mod, true); } else { matrix.set(size - 15 + i, 8, mod, true); } if (i < 8) { matrix.set(8, size - i - 1, mod, true); } else if (i < 9) { matrix.set(8, 15 - i - 1 + 1, mod, true); } else { matrix.set(8, 15 - i - 1, mod, true); } } matrix.set(size - 8, 8, 1, true); } function setupData(matrix, data2) { const size = matrix.size; let inc = -1; let row = size - 1; let bitIndex = 7; let byteIndex = 0; for (let col = size - 1; col > 0; col -= 2) { if (col === 6) col--; while (true) { for (let c = 0; c < 2; c++) { if (!matrix.isReserved(row, col - c)) { let dark = false; if (byteIndex < data2.length) { dark = (data2[byteIndex] >>> bitIndex & 1) === 1; } matrix.set(row, col - c, dark); bitIndex--; if (bitIndex === -1) { byteIndex++; bitIndex = 7; } } } row += inc; if (row < 0 || size <= row) { row -= inc; inc = -inc; break; } } } } function createData(version, errorCorrectionLevel, segments) { const buffer = new BitBuffer(); segments.forEach(function(data2) { buffer.put(data2.mode.bit, 4); buffer.put(data2.getLength(), Mode.getCharCountIndicator(data2.mode, version)); data2.write(buffer); }); const totalCodewords = Utils.getSymbolTotalCodewords(version); const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8; if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) { buffer.put(0, 4); } while (buffer.getLengthInBits() % 8 !== 0) { buffer.putBit(0); } const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8; for (let i = 0; i < remainingByte; i++) { buffer.put(i % 2 ? 17 : 236, 8); } return createCodewords(buffer, version, errorCorrectionLevel); } function createCodewords(bitBuffer, version, errorCorrectionLevel) { const totalCodewords = Utils.getSymbolTotalCodewords(version); const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel); const dataTotalCodewords = totalCodewords - ecTotalCodewords; const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel); const blocksInGroup2 = totalCodewords % ecTotalBlocks; const blocksInGroup1 = ecTotalBlocks - blocksInGroup2; const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks); const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks); const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1; const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1; const rs = new ReedSolomonEncoder(ecCount); let offset = 0; const dcData = new Array(ecTotalBlocks); const ecData = new Array(ecTotalBlocks); let maxDataSize = 0; const buffer = new Uint8Array(bitBuffer.buffer); for (let b = 0; b < ecTotalBlocks; b++) { const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2; dcData[b] = buffer.slice(offset, offset + dataSize); ecData[b] = rs.encode(dcData[b]); offset += dataSize; maxDataSize = Math.max(maxDataSize, dataSize); } const data2 = new Uint8Array(totalCodewords); let index2 = 0; let i, r; for (i = 0; i < maxDataSize; i++) { for (r = 0; r < ecTotalBlocks; r++) { if (i < dcData[r].length) { data2[index2++] = dcData[r][i]; } } } for (i = 0; i < ecCount; i++) { for (r = 0; r < ecTotalBlocks; r++) { data2[index2++] = ecData[r][i]; } } return data2; } function createSymbol(data2, version, errorCorrectionLevel, maskPattern) { let segments; if (Array.isArray(data2)) { segments = Segments.fromArray(data2); } else if (typeof data2 === "string") { let estimatedVersion = version; if (!estimatedVersion) { const rawSegments = Segments.rawSplit(data2); estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel); } segments = Segments.fromString(data2, estimatedVersion || 40); } else { throw new Error("Invalid data"); } const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel); if (!bestVersion) { throw new Error("The amount of data is too big to be stored in a QR Code"); } if (!version) { version = bestVersion; } else if (version < bestVersion) { throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + bestVersion + ".\n"); } const dataBits = createData(version, errorCorrectionLevel, segments); const moduleCount = Utils.getSymbolSize(version); const modules = new BitMatrix(moduleCount); setupFinderPattern(modules, version); setupTimingPattern(modules); setupAlignmentPattern(modules, version); setupFormatInfo(modules, errorCorrectionLevel, 0); if (version >= 7) { setupVersionInfo(modules, version); } setupData(modules, dataBits); if (isNaN(maskPattern)) { maskPattern = MaskPattern.getBestMask(modules, setupFormatInfo.bind(null, modules, errorCorrectionLevel)); } MaskPattern.applyMask(maskPattern, modules); setupFormatInfo(modules, errorCorrectionLevel, maskPattern); return { modules, version, errorCorrectionLevel, maskPattern, segments }; } exports.create = function create(data2, options) { if (typeof data2 === "undefined" || data2 === "") { throw new Error("No input text"); } let errorCorrectionLevel = ECLevel.M; let version; let mask; if (typeof options !== "undefined") { errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M); version = Version.from(options.version); mask = MaskPattern.from(options.maskPattern); if (options.toSJISFunc) { Utils.setToSJISFunction(options.toSJISFunc); } } return createSymbol(data2, version, errorCorrectionLevel, mask); }; } }); // node_modules/qrcode/lib/renderer/utils.js var require_utils2 = __commonJS({ "node_modules/qrcode/lib/renderer/utils.js"(exports) { function hex2rgba(hex) { if (typeof hex === "number") { hex = hex.toString(); } if (typeof hex !== "string") { throw new Error("Color should be defined as hex string"); } let hexCode = hex.slice().replace("#", "").split(""); if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) { throw new Error("Invalid hex color: " + hex); } if (hexCode.length === 3 || hexCode.length === 4) { hexCode = Array.prototype.concat.apply([], hexCode.map(function(c) { return [c, c]; })); } if (hexCode.length === 6) hexCode.push("F", "F"); const hexValue = parseInt(hexCode.join(""), 16); return { r: hexValue >> 24 & 255, g: hexValue >> 16 & 255, b: hexValue >> 8 & 255, a: hexValue & 255, hex: "#" + hexCode.slice(0, 6).join("") }; } exports.getOptions = function getOptions(options) { if (!options) options = {}; if (!options.color) options.color = {}; const margin = typeof options.margin === "undefined" || options.margin === null || options.margin < 0 ? 4 : options.margin; const width = options.width && options.width >= 21 ? options.width : void 0; const scale = options.scale || 4; return { width, scale: width ? 4 : scale, margin, color: { dark: hex2rgba(options.color.dark || "#000000ff"), light: hex2rgba(options.color.light || "#ffffffff") }, type: options.type, rendererOpts: options.rendererOpts || {} }; }; exports.getScale = function getScale(qrSize, opts) { return opts.width && opts.width >= qrSize + opts.margin * 2 ? opts.width / (qrSize + opts.margin * 2) : opts.scale; }; exports.getImageWidth = function getImageWidth(qrSize, opts) { const scale = exports.getScale(qrSize, opts); return Math.floor((qrSize + opts.margin * 2) * scale); }; exports.qrToImageData = function qrToImageData(imgData, qr, opts) { const size = qr.modules.size; const data2 = qr.modules.data; const scale = exports.getScale(size, opts); const symbolSize = Math.floor((size + opts.margin * 2) * scale); const scaledMargin = opts.margin * scale; const palette = [opts.color.light, opts.color.dark]; for (let i = 0; i < symbolSize; i++) { for (let j = 0; j < symbolSize; j++) { let posDst = (i * symbolSize + j) * 4; let pxColor = opts.color.light; if (i >= scaledMargin && j >= scaledMargin && i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) { const iSrc = Math.floor((i - scaledMargin) / scale); const jSrc = Math.floor((j - scaledMargin) / scale); pxColor = palette[data2[iSrc * size + jSrc] ? 1 : 0]; } imgData[posDst++] = pxColor.r; imgData[posDst++] = pxColor.g; imgData[posDst++] = pxColor.b; imgData[posDst] = pxColor.a; } } }; } }); // node_modules/qrcode/lib/renderer/canvas.js var require_canvas = __commonJS({ "node_modules/qrcode/lib/renderer/canvas.js"(exports) { var Utils = require_utils2(); function clearCanvas(ctx, canvas, size) { ctx.clearRect(0, 0, canvas.width, canvas.height); if (!canvas.style) canvas.style = {}; canvas.height = size; canvas.width = size; canvas.style.height = size + "px"; canvas.style.width = size + "px"; } function getCanvasElement() { try { return document.createElement("canvas"); } catch (e) { throw new Error("You need to specify a canvas element"); } } exports.render = function render3(qrData, canvas, options) { let opts = options; let canvasEl = canvas; if (typeof opts === "undefined" && (!canvas || !canvas.getContext)) { opts = canvas; canvas = void 0; } if (!canvas) { canvasEl = getCanvasElement(); } opts = Utils.getOptions(opts); const size = Utils.getImageWidth(qrData.modules.size, opts); const ctx = canvasEl.getContext("2d"); const image = ctx.createImageData(size, size); Utils.qrToImageData(image.data, qrData, opts); clearCanvas(ctx, canvasEl, size); ctx.putImageData(image, 0, 0); return canvasEl; }; exports.renderToDataURL = function renderToDataURL(qrData, canvas, options) { let opts = options; if (typeof opts === "undefined" && (!canvas || !canvas.getContext)) { opts = canvas; canvas = void 0; } if (!opts) opts = {}; const canvasEl = exports.render(qrData, canvas, opts); const type = opts.type || "image/png"; const rendererOpts = opts.rendererOpts || {}; return canvasEl.toDataURL(type, rendererOpts.quality); }; } }); // node_modules/qrcode/lib/renderer/svg-tag.js var require_svg_tag = __commonJS({ "node_modules/qrcode/lib/renderer/svg-tag.js"(exports) { var Utils = require_utils2(); function getColorAttrib(color, attrib) { const alpha = color.a / 255; const str = attrib + '="' + color.hex + '"'; return alpha < 1 ? str + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str; } function svgCmd(cmd, x, y) { let str = cmd + x; if (typeof y !== "undefined") str += " " + y; return str; } function qrToPath(data2, size, margin) { let path = ""; let moveBy = 0; let newRow = false; let lineLength = 0; for (let i = 0; i < data2.length; i++) { const col = Math.floor(i % size); const row = Math.floor(i / size); if (!col && !newRow) newRow = true; if (data2[i]) { lineLength++; if (!(i > 0 && col > 0 && data2[i - 1])) { path += newRow ? svgCmd("M", col + margin, 0.5 + row + margin) : svgCmd("m", moveBy, 0); moveBy = 0; newRow = false; } if (!(col + 1 < size && data2[i + 1])) { path += svgCmd("h", lineLength); lineLength = 0; } } else { moveBy++; } } return path; } exports.render = function render3(qrData, options, cb) { const opts = Utils.getOptions(options); const size = qrData.modules.size; const data2 = qrData.modules.data; const qrcodesize = size + opts.margin * 2; const bg = !opts.color.light.a ? "" : "'; const path = "'; const viewBox = 'viewBox="0 0 ' + qrcodesize + " " + qrcodesize + '"'; const width = !opts.width ? "" : 'width="' + opts.width + '" height="' + opts.width + '" '; const svgTag = '' + bg + path + "\n"; if (typeof cb === "function") { cb(null, svgTag); } return svgTag; }; } }); // node_modules/qrcode/lib/browser.js var require_browser2 = __commonJS({ "node_modules/qrcode/lib/browser.js"(exports) { var canPromise = require_can_promise(); var QRCode2 = require_qrcode(); var CanvasRenderer = require_canvas(); var SvgRenderer = require_svg_tag(); function renderCanvas(renderFunc, canvas, text3, opts, cb) { const args = [].slice.call(arguments, 1); const argsNum = args.length; const isLastArgCb = typeof args[argsNum - 1] === "function"; if (!isLastArgCb && !canPromise()) { throw new Error("Callback required as last argument"); } if (isLastArgCb) { if (argsNum < 2) { throw new Error("Too few arguments provided"); } if (argsNum === 2) { cb = text3; text3 = canvas; canvas = opts = void 0; } else if (argsNum === 3) { if (canvas.getContext && typeof cb === "undefined") { cb = opts; opts = void 0; } else { cb = opts; opts = text3; text3 = canvas; canvas = void 0; } } } else { if (argsNum < 1) { throw new Error("Too few arguments provided"); } if (argsNum === 1) { text3 = canvas; canvas = opts = void 0; } else if (argsNum === 2 && !canvas.getContext) { opts = text3; text3 = canvas; canvas = void 0; } return new Promise(function(resolve, reject) { try { const data2 = QRCode2.create(text3, opts); resolve(renderFunc(data2, canvas, opts)); } catch (e) { reject(e); } }); } try { const data2 = QRCode2.create(text3, opts); cb(null, renderFunc(data2, canvas, opts)); } catch (e) { cb(e); } } exports.create = QRCode2.create; exports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render); exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL); exports.toString = renderCanvas.bind(null, function(data2, _, opts) { return SvgRenderer.render(data2, opts); }); } }); // src/org/wanxp/main.ts __export(exports, { default: () => DoubanPlugin }); // src/org/wanxp/lang/locale/en.ts var en_default = { "110001": "search by current file name", "110002": "search and import to current file", "110003": `Enter Search Term:`, "110004": `Search`, "110005": `Cancel`, "110006": `sync personal book-movie-music to Obsidian`, "110101": "search and create file", "110102": "search movie or tv and create ", "110104": "search book and create", "110105": "search music and create ", "110106": "search game and create ", "110201": `{0} already exists`, "110202": `{0} template can not read`, "110103": "sync personal data from douban", "110007": `Start Sync`, "110009": `Stop Sync`, "110010": `Background`, "110008": `Exists Sync: {0}-{1}`, "110030": `Type:`, "110031": `CoverExists:`, "110032": `Scope:`, "110033": `Progress:`, "110034": `OutputFolder:`, "110035": `FileName: (Tip:Support Variables And Path)`, "110036": `Complete`, "110037": ` ### Condition {0} ### Summary {1} ### Details {2} --- PS: This file could be delete if you want to. `, "110038": `DoubanSyncResult`, "110039": `Incremental Sync:`, "110040": `Only sync that haven't been synced yet. if not enabled, will sync all the subject'`, "110041": `IncrementalSync`, "110042": `EstimateTime`, "110043": `Loading Menu`, "110044": `Custom Count Input End Must Bigger Than Start`, "110045": `Custom Time Input End Must Bigger Than Start`, "110050": `Type`, "110051": `Number`, "110052": `Description`, "110152": `Confirm`, "110055": `Enable`, "110056": `Disable`, "110070": `Sync Scope:`, "110071": `All`, "110072": `Recent Changes`, "110075": `Last 30 Items`, "110074": `Custom Time`, "110076": `Custom Count`, "110077": `From`, "110078": `No.`, "110079": `To`, "110073": `Items`, "110080": `Number`, "112080": `Custom Count Input not a number`, "110081": `Custom Time must input both start and end or only one`, "110082": `Custom Time must input format: YYYY-MM-DD`, "110083": `Not Support`, "110090": `The total number of {0} for status {1} is {2}, and the number that needs to be synchronized is {3}`, "110091": `Error`, "110095": `The smaller the number, the closer to now. For example, the latest update on Douban is the first one, and the earliest update is the last one.`, "110096": `This is the update time of our entry on Douban`, "exists": `[exists]`, "unHandle": `[unHandle]`, "replace": `[replace]`, "create": `[create]`, "fail": `[fail]`, "failByDiffType": `[fail by diff type]`, "syncall": `[summary]`, "notsync": `[notsync]`, "unHandle_desc": `unHandle`, "exists_desc": `exists`, "replace_desc": `replace`, "create_desc": `create`, "fail_desc": `fail`, "failByDiffType_desc": `fail because of different type`, "notsync_desc": `notsync`, "syncall_desc": `syncall`, "110053": `|{0}|{1}|{2}|`, "1201": `Obsidian Douban`, "120001": `Douban Search Url`, "120002": `Douban search page request address. `, "120003": `First go to:`, "120004": `Don't enter anything in the search input box, just click Search,`, "120005": `The redirected web page address is the search address,`, "120006": `Just copy the web address to the current input box.`, "100101": `Login Douban`, "100111": `Douban login info Expired, please login again`, "100113": `Could not replace user info, please login again`, "100120": `Login Success`, "100121": `Please login`, "100122": `Nickname`, "100123": `DoubanID`, "100124": `Nickname`, "100125": `You can use your rating and reading status after logging in, see the last for specific variables.`, "100102": `Douban Human`, "100103": `Douban: Please search and import again `, "100126": `User Info`, "100128": `Logout`, "100129": `QR code login is recommended on mobile. If you only have one device, follow the`, "100130": `Login`, "100131": `Login Douban`, "100133": `For Login Error `, "100135": `LoginByCookie`, "100136": `Cookie Input`, "100137": `Cookie Login Failed, Can not get User Info By Cookie, Please Check Your Cookie Text`, "100134": `If you login failed, please click this button and follow`, "100139": ` tutorial`, "100138": ` to get your Cookie, paste it into the text area below, and click \u2714\uFE0F.`, "100132": `Load Douban Login Page Failed`, "100140": `QR code login`, "100141": `Douban QR code login`, "100142": `Open the Douban app on another device, scan the QR code below, and confirm the login.`, "100143": `Loading QR code...`, "100144": `Waiting to be scanned...`, "100145": `QR code scanned. Confirm the login in the Douban app.`, "100146": `Douban login successful`, "100147": `The QR code has expired. Refresh it to try again.`, "100148": `Login was cancelled. Refresh the QR code to try again.`, "100149": `QR code login temporarily failed and will retry. You can also refresh the QR code.`, "100150": `Refresh QR code`, "100151": `Web login`, "100152": `QR login confirmed. Saving your login...`, "100153": `The scan was confirmed, but no Douban login credential was received. Refresh the QR code and try again.`, "1210": `Basic`, "1203": `Template`, "1220": `Output`, "1230": `Description`, "1260": `Login`, "1270": `Array Length Control`, "1271": `Limit the maximum number of items for array fields (such as actor, director, author, translator, aliases, ...) in subjects (movie / teleplay / book / music / game / ...). Items beyond the limit will not be written to the note.`, "1272": `Tip: When the "Apply Type" is "all", the limit applies to matching fields across all subject types. Type-specific limits take precedence when both exist for the same field.`, "1273": `Add a limit, e.g. keep only the first 5 actors of a movie.`, "127401": `Add a new array length limit`, "127402": `Apply Type:`, "127403": `Field:`, "127404": `e.g. actor / director / author`, "127405": `Max Count:`, "127406": `e.g. 5`, "127407": `Delete this limit`, "1204": `Set template file path. The template file will be used when creating new notes . If keep empty, it will use the default template file to create file. All the usable variables at tab "Description" and "Custom Variables"`, "1205": `\u{1F9E1}Tip: You can click the 'Copy' button to copy default template content, then create and paste to your own template file. After that, back to select the file. `, "1250": `Advanced`, "1252": `Some Debug or Other Settings`, "1251": `\u2622The Advanced Setting only could be changed after you know what you are doing`, "1240": `Custom Variable`, "1241": `To use the custom variables, you need to wrap them in double curly brackets. For example, {{myType}} will be replaced with the your custom type value. `, "1242": `Add custom variable, so that you can use it in the template file or file name. `, "124101": `Add`, "124108": `Add a new variable`, "124102": `Name:`, "124103": `Input custom variable name`, "124104": `Value:`, "124105": `Input custom variable value`, "124106": `Active type`, "124107": `Delete custom variable`, "124109": `ArrayBegin:`, "124110": `ElementBegin:`, "124111": `Spilt:`, "124112": `ElementEnd:`, "124113": `ArrayEnd:`, "1243": `Score Display`, "124120": `FullValue:`, "124121": `EmptyValue:`, "124122": `DisplayEmpty:`, "124310": `The setting will effect variables {{scoreStar}} and {{myRatingStar}}. When the score is {0}/{1}, template is \`score: {{scoreStar}}\``, "124311": `MaxStar:`, "124312": `Integer:`, "121101": `Template File`, "121102": `This template will be used when creating new notes. If keep empty, it will use default template`, "120101": `Movie`, "120102": `This template will be used when creating new notes for Movie from Obsidian-Douban.`, "120103": `Available template variables are :`, "120104": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "120105": `{{url}}, {{desc}}, {{datePublished}}, {{genre}}, `, "120106": `{{originalTitle}},{{director}}, {{author}},`, "120107": ` {{actor}}`, "120110": `Movie`, "120201": `Book`, "120202": `This template will be used when creating new notes for Movie from Obsidian-Douban. `, "120203": `Available Book template variables are :`, "120204": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "120205": `{{url}}, {{desc}}, {{datePublished}}, {{publisher}}`, "120206": `{{originalTitle}}, {{subTitle}}, {{author}},`, "120207": `{{translator}}, {{isbn}}, {{price}}, {{totalPage}}`, "120208": `{{series}}, {{binding}}, {{menu}}`, "120301": `Music`, "120302": `This template will be used when creating new notes for Music from Obsidian-Douban.`, "120303": `Available Music template variables are :`, "120304": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "120305": `{{url}}, {{desc}}, {{datePublished}}, {{genre}},`, "120306": `{{actor}}, {{medium}}, {{albumType}},`, "120307": `{{barcode}}, {{records}}`, "120401": `Article`, "120402": `This template will be used when creating new notes for Article from Obsidian-Douban.`, "120403": `Available Article template variables are :`, "120404": `{{id}}, {{title}}, {{type}}, {{image}},`, "120405": `{{url}}, {{desc}}, {{datePublished}}`, "120406": `{{author}}, {{authorUrl}}, {{content}}`, "120407": `{{timePublished}}`, "121301": `Game`, "121302": `This template will be used when creating new notes for Game from Obsidian-Douban.`, "121303": `Available Game template variables are :`, "121304": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "121305": `{{url}}, {{desc}}, {{publisher}}, {{datePublished}}`, "121306": `{{genre}}, {{aliases}}, {{developer}}, {{platform}}`, "121801": `Teleplay`, "121802": `This template will be used when creating new notes for Teleplay from Obsidian-Douban.`, "120501": `Date Format`, "120502": `Time Format`, "120503": `This format will be used when available template variables contain date.`, "120504": `This format will be used when available template variables contain time.`, "120506": `For more syntax, refer to`, "120507": `Your current syntax looks like this`, "120508": `format reference`, "120601": `Array`, "120602": `string to join between array type, start\u3001end string for array, such as authors, actors. support (enter)`, "120701": `Douban Request Headers`, "120801": `This type of import is not supported temporarily, please go to github to submit issues for help`, "120901": `Douban`, "121201": `Person Name Language Mode`, "121202": `options:`, "121203": `Chinese Name mode, person name only show Chinese name`, "121204": `English Name mode, person name only show English name`, "121205": `Chinese English Name mode, show Chinese and English name both`, "121206": `Chinese Name`, "121207": `English Name`, "121208": `Chinese And English Name`, "121401": `Status Bar`, "121402": `Display status bar when import data ?`, "121410": `Search Default Type`, "121411": `Search defuault type when open command palette 'search douban and create file'`, "121430": `Save Attachment(Picture) File`, "121431": `Save attachment file to local disk, such as image ? If you do not enable this feature, it will not show cover image in note`, "121432": `Attachment(Picture) folder`, "121433": `Attachment file created from Obsidian-Douban will be placed in this folder, If blank, they will be created by default name. support all basic template variables. example: {{type}}/assets`, "121434": `assets`, "121452": `Attachment(Picture) File Name`, "121453": `Attachment file name, If blank, they will be created by default name '{{title}}'. support all basic template variables. example: {{type}}-{{title}}`, "121454": `{{title}}`, "121435": `Save High Definition Cover`, "121436": `High Definition Cover looks better but it will take more space, and you must login douban in this plugin`, "121437": `Please login first, Then this function could be enable`, "121438": `High Definition Cover looks better but it will take more space`, "121440": `Use Picture Bed`, "121441": `Save attachment file to picture bed`, "121450": `Picture Bed Type`, "121451": `Select picture bed type`, "121461": `PicGo Upload Url`, "121501": `Note folder`, "121502": `Nodes created from Obsidian-Douban will be placed in this folder, If blank, they will be placed in the default location for this vault. `, "121503": `Default Folder`, "121601": `Note Name`, "121602": `Nodes created from Obsidian-Douban will use this fileName as template(also support filePath), and support If blank, they will be created by default name. support all basic template variables. example: {{type}}/{{title}}`, "121604": `Note Path Previous`, "120603": `Display Preview`, "120604": `ArrayTypeName:`, "120605": `Template use example\uFF1A propertyName:{{actor`, "120606": `Delete Array Display Type`, "120607": `Add Array Display Type`, "120608": `Display/Hidden Array Setting`, "121603": `assets`, "121701": `Search Template File`, "121703": `Default`, "121901": `Copy default template content to clipboard`, "121902": `Reset to default value`, "121905": `Reset Advanced Settings to default value`, "121903": `Copy default template content (that your state in object) to clipboard`, "125001": `Debug Mode`, "125002": `Open Debug Mode, so that this plugin will log some message in console`, "125011": `Reset Setting`, "125012": `Reset Setting to default value, but not include \`Custom Variables\``, "125013": `Reset Setting to default value`, "125021": `Clear Login Cache`, "125022": `Clear Login Info, so that you can login again`, "125031": `Clear Sync Cache`, "125032": `Clear Sync Cache, It will clear all the sync data, so that you can sync again`, "125033": `Are you sure you want to perform this operation?`, "125034": `Export Settings`, "125035": `Export current plugin all settings to a local file, including all settings, sync records cache, and login status`, "125047": `Choose Folder..`, "125036": `Import Settings`, "125037": `Import a previously backed up settings file, which will cover all current settings, sync records cache, and login status. For safety, it is recommended to backup the current settings before attempting to import`, "125038": `Import Settings File`, "125039": `Select File..`, "125040": `Import`, "125041": `Settings Import Successful`, "125042": `Settings Import Failed`, "125043": `Settings File Import Failed, please check if the file is correct`, "125044": `Settings File Import Successful`, "125045": `Settings File Import Successful, please reload the page`, "125046": `Are you sure you import the settings file? Please make sure you have export settings before import config file. Note: Importing the settings file will **cover** all current settings, sync records cache, and login status`, "130101": `Fetch Data Error, {0}`, "140101": `Not support for current type. You can add Issues at Github:Wanxp/obsidian-douban`, "140102": `subject type is different, will not sync this, chosen sync type is {0} but this {1} subject type is {2}`, "130105": `Can not use Douban this time, Please try again after 12 hour or 24 hour. Or you can reset your connection `, "130106": `Can not use Douban this time, Please try Login In Douban Plugin. If not working please again after 12 hour or 24 hour. Or you can reset your connection `, "130404": `404 Url Not Found`, "130109": `Downloaded image is empty`, "130110": `Clipboard write failed`, "130107": `Can not find array setting for {1} in {0} , Please add it in array settings`, "130108": `Redirect times too much, please check your network or proxy`, "130120": `An error occurred during Sync, but Sync will continue. Error item is {}`, "130121": `An error occurred during Sync, Begin number is bigger than total number {0}, will not sync this item`, "140201": `[OB-Douban]: searching '{0}'...`, "140202": `[OB-Douban]: result {0} rows`, "140203": `[OB-Douban]: request '{0}'`, "140204": `[OB-Douban]: replace '{0}'`, "140205": `[OB-Douban]: complete '{0}'`, "140206": `[OB-Douban]: occur error, please try login'{0}'`, "140207": `[OB-Douban]: [{0}/{1}] {2}`, "140208": `[OB-Douban]: [{0}/{1}] {2}`, "140301": `Douban: Syncing[{0}]...`, "140303": `Douban: User Info Expire, Please login again`, "140302": `Douban: Sync complete`, "140304": `Douban: Need Login, Please login in Obsidian-Douban plugin`, "150101": `Choose an item...`, "150106": `[Previous Page (Item Result)]...`, "150102": `[Previous Page]...`, "150103": `[Next Page]...`, "150105": `[Next Page (Group Post)]...`, "150104": `[Next Page (Please Login First)]...`, "150107": `Result is empty. Please choose type before search`, "150108": `If you can't find what you want, try changing the keyword or search type`, "200101": `. `, "210101": `Default`, "210201": `Search...`, "122001": `Basic Variables`, "122002": `Extra Variables`, "122003": `Basic Variables must has value, Extra Variables can be empty`, "122004": `Wrap template variables in double curly brackets, for example {{title}}. Click a variable-name cell to copy the complete template variable.`, "122005": `Extra variables vary by content type. Highlighted text is the variable name; click its cell to copy the complete template variable.`, "122010": `My State Variables`, "122011": `Click to copy`, "122012": `Copied`, "122013": `Copy failed. Please try again.`, "410101": `Unknown`, "410200": `\u8BC4\u5206\u2B50`, "300101": `\u53C2\u6570`, "300102": `\u4E66\u7C4D`, "300103": `\u7535\u5F71`, "300104": `\u7535\u89C6\u5267`, "300105": `\u97F3\u4E50`, "300106": `\u65E5\u8BB0`, "300107": `\u6E38\u620F`, "300108": `\u5E7F\u64AD`, "310101": `\u8C46\u74E3ID`, "310102": `\u4E66\u540D`, "310103": `\u7C7B\u578B`, "310104": `\u8BC4\u5206`, "310105": `\u5C01\u9762\u8DEF\u5F84`, "310106": `\u8C46\u74E3\u7F51\u5740`, "310107": `\u5185\u5BB9\u7B80\u4ECB`, "310108": `\u51FA\u7248\u793E`, "310109": `\u51FA\u7248\u65F6\u95F4`, "310110": ``, "310111": `author:\u539F\u4F5C\u8005`, "310112": `translator:\u8BD1\u8005`, "310113": `isbn:isbn`, "310114": `originalTitle:\u539F\u4F5C\u540D`, "310115": `subTitle:\u526F\u6807\u9898`, "310116": `totalPage:\u9875\u6570`, "310117": `binding:\u88C5\u5E27`, "310118": `producer:\u51FA\u54C1\u65B9`, "310119": `-`, "310120": `-`, "310130": `\u51FA\u7248\u5E74\u4EFD`, "310121": `\u5C01\u9762URL`, "310201": `\u8C46\u74E3ID`, "310202": `\u7535\u5F71\u540D\u79F0`, "310203": `\u7C7B\u578B`, "310204": `\u8BC4\u5206`, "310205": `\u5C01\u9762\u8DEF\u5F84`, "310206": `\u8C46\u74E3\u7F51\u5740`, "310207": `\u7B80\u4ECB`, "310208": ``, "310209": `\u4E0A\u6620\u65E5\u671F`, "310210": `\u7C7B\u578B`, "310211": `director:\u5BFC\u6F14`, "310212": `author:\u7F16\u5267`, "310213": `actor:\u4E3B\u6F14`, "310214": `originalTitle:\u539F\u4F5C\u540D`, "310215": `country:\u56FD\u5BB6`, "310216": `language:\u8BED\u8A00`, "310217": `time:\u7247\u957F`, "310218": `aliases:\u53C8\u540D`, "310219": `IMDb`, "310220": `-`, "310230": `\u4E0A\u6620\u5E74\u4EFD`, "310221": `\u5C01\u9762URL`, "310301": `\u8C46\u74E3ID`, "310302": `\u7535\u89C6\u5267\u540D\u79F0`, "310303": `\u7C7B\u578B`, "310304": `\u8BC4\u5206`, "310305": `\u5C01\u9762\u8DEF\u5F84`, "310306": `\u8C46\u74E3\u7F51\u5740`, "310307": `\u7B80\u4ECB`, "310308": ``, "310309": `\u4E0A\u6620\u65E5\u671F`, "310310": `\u7C7B\u578B`, "310311": `director:\u5BFC\u6F14`, "310312": `author:\u7F16\u5267`, "310313": `actor:\u4E3B\u6F14`, "310314": `originalTitle:\u539F\u4F5C\u540D`, "310315": `country:\u56FD\u5BB6`, "310316": `language:\u8BED\u8A00`, "310317": `time:\u7247\u957F`, "310318": `aliases:\u53C8\u540D`, "310319": `IMDb`, "310320": `episode:\u96C6\u6570`, "310330": `\u4E0A\u6620\u5E74\u4EFD`, "310321": `\u5C01\u9762URL`, "310401": `\u8C46\u74E3ID`, "310402": `\u97F3\u4E50\u540D`, "310403": `\u7C7B\u578B`, "310404": `\u8BC4\u5206`, "310405": `\u5C01\u9762\u8DEF\u5F84`, "310406": `\u8C46\u74E3\u7F51\u5740`, "310407": `\u7B80\u4ECB`, "310408": `\u51FA\u7248\u8005`, "310409": `\u53D1\u884C\u65F6\u95F4`, "310410": `\u6D41\u6D3E`, "310411": `actor: \u8868\u6F14\u8005`, "310412": `albumType:\u4E13\u8F91\u7C7B\u578B`, "310413": `medium:\u4ECB\u8D28`, "310414": `records:\u5531\u7247\u6570`, "310415": `barcode:\u6761\u5F62\u7801`, "310416": `-`, "310417": `-`, "310418": `-`, "310419": `-`, "310420": `-`, "310430": `\u53D1\u884C\u5E74\u4EFD`, "310421": `\u5C01\u9762URL`, "310501": `\u8C46\u74E3ID`, "310502": `\u65E5\u8BB0\u6807\u9898`, "310503": `\u7C7B\u578B`, "310504": `\u8BC4\u5206`, "310505": `\u5C01\u9762\u8DEF\u5F84`, "310506": `\u8C46\u74E3\u7F51\u5740`, "310507": `\u7B80\u4ECB`, "310508": `\u53D1\u5E03\u8005`, "310509": `\u53D1\u5E03\u65F6\u95F4`, "310510": ``, "310511": `author:\u4F5C\u8005`, "310512": ``, "310513": `authorUrl:\u4F5C\u8005\u7F51\u5740`, "310514": `content:\u65E5\u8BB0\u5185\u5BB9`, "310515": `-`, "310516": `-`, "310517": `-`, "310518": `-`, "310519": `-`, "310520": `-`, "310530": `\u53D1\u5E03\u5E74\u4EFD`, "310521": `\u5C01\u9762URL`, "310601": `\u8C46\u74E3ID`, "310602": `\u6E38\u620F\u540D\u79F0`, "310603": `\u7C7B\u578B`, "310604": `\u8BC4\u5206`, "310605": `\u5C01\u9762\u8DEF\u5F84`, "310606": `\u8C46\u74E3\u7F51\u5740`, "310607": `\u7B80\u4ECB`, "310608": `\u53D1\u884C\u5546`, "310609": `\u53D1\u884C\u65E5\u671F`, "310610": `\u7C7B\u578B`, "310611": `aliases:\u522B\u540D`, "310612": `developer:\u5F00\u53D1\u5546`, "310613": `platform:\u5E73\u53F0`, "310614": `-`, "310615": `-`, "310616": `-`, "310617": `-`, "310618": `-`, "310619": `-`, "310620": `-`, "310630": `\u53D1\u884C\u5E74\u4EFD`, "310621": `\u5C01\u9762URL`, "310701": `\u5F85\u5F00\u53D1`, "310702": `\u5F85\u5F00\u53D1`, "310703": `\u5F85\u5F00\u53D1`, "310704": `\u5F85\u5F00\u53D1`, "310705": `\u5F85\u5F00\u53D1`, "310706": `\u5F85\u5F00\u53D1`, "310707": `\u5F85\u5F00\u53D1`, "310708": `\u5F85\u5F00\u53D1`, "310709": `\u5F85\u5F00\u53D1`, "310710": `\u5F85\u5F00\u53D1`, "310711": `-`, "310712": `-`, "310713": `-`, "310714": `-`, "310715": `-`, "310716": `-`, "310717": `-`, "310718": `-`, "310719": `-`, "310720": `-`, "310730": `-`, "310721": `\u5C01\u9762URL`, "320101": `\u6269\u5C551`, "320102": `\u6269\u5C552`, "320103": `\u6269\u5C553`, "320104": `\u6269\u5C554`, "320105": `\u6269\u5C555`, "320106": `\u6269\u5C556`, "320107": `\u6269\u5C557`, "320108": `\u6269\u5C558`, "320109": `\u6269\u5C559`, "320110": `\u6269\u5C5510`, "320111": `\u6269\u5C5511`, "320112": `\u6269\u5C5512`, "320113": `\u6269\u5C5513`, "330101": `\u4ECA\u65E5\u65E5\u671F`, "330102": `\u5F53\u524D\u65F6\u95F4`, "500000": `UNKNOWN`, "500101": `not`, "500102": `wish`, "500103": `do`, "500104": `collect`, "500201": `not`, "500202": `wish`, "500203": `do`, "500204": `collect`, "500301": `not`, "500302": `wish`, "500303": `do`, "500304": `collect`, "500401": `not`, "500402": `wish`, "500403": `do`, "500404": `collect`, "500501": `not`, "500502": `wish`, "500503": `do`, "500504": `collect`, "500601": `not`, "500602": `wish`, "500603": `do`, "500604": `collect`, "500701": `not`, "500702": `wish`, "500703": `do`, "500704": `collect`, "500004": `ALL`, "160225": `You can use those variables in your template after login. `, "160226": `The tags that I tag for subject`, "160227": `The rate that I rate to subject. (1-5)`, "160228": `My state at book-reading/video-watching.`, "160229": `Comment`, "160230": `Rate Date`, "160231": `The rate that I rate to subject.(1\u2B50-5\u2B50)`, "500001": `Sync Config`, "504102": `My Book`, "504103": `My Movie`, "504107": `My Teleplay`, "504104": `My Broadcast`, "504105": `My Note`, "504106": `My Music`, "504108": `My Game`, "500002": `Sync Status`, "500110": `Replace exists or not`, "ALL": `all`, "MOVIE": `movie`, "BOOK": `book`, "MUSIC": `music`, "NOTE": `note`, "GAME": `game`, "TELEPLAY": `teleplay`, "THEATER": `theater`, "MOVIE_AND_TELEPLAY": `movie&tv`, "all": `all`, "movie": `movie`, "book": `book`, "music": `music`, "note": `note`, "game": `game`, "teleplay": `teleplay`, "theater": `theater`, "movie_and_teleplay": `movie&tv`, "DAY": `D`, "HOUR": `H`, "MINUTE": `m`, "SECOND": `S`, "theaterTemplateName": `Theater template`, "theaterTemplateDesc": `Template used for theater notes`, "showAfterCreateName": `Open note after creation`, "showAfterCreateDesc": `Open a newly created note automatically. Disable this for background-style imports.`, "imageNameDesc": `Local image file name including its extension`, "popularCommentsDesc": `Up to five popular book comments (array)`, "batchImportCommand": `Import notes from Douban URLs`, "batchImportTitle": `Batch import Douban URLs`, "batchImportDesc": `Enter one Douban subject URL per line. Invalid or failed lines are skipped.`, "batchImportProgress": `Importing {0}/{1}`, "batchImportSummary": `Batch import finished: {0} succeeded, {1} failed. {2}` }; // src/org/wanxp/lang/locale/zh-cn.ts var zh_cn_default = { "110001": "\u641C\u7D22\u5F53\u524D\u6587\u6863\u540D\u5E76\u5199\u5165", "110002": "\u641C\u7D22\u5E76\u5199\u5165\u5F53\u524D\u6587\u6863", "110003": `\u8F93\u5165\u641C\u7D22\u5185\u5BB9:`, "110004": `\u641C\u7D22`, "110005": `\u53D6\u6D88`, "110006": `\u540C\u6B65\u5E7F\u64AD\u81F3Obsidian`, "110101": "\u641C\u7D22\u5E76\u521B\u5EFA\u6587\u6863", "110103": "\u540C\u6B65\u4E2A\u4EBA\u4E66\u5F71\u97F3\u5E7F\u64AD\u8BB0\u5F55", "110102": "\u641C\u7D22\u7535\u5F71\u6216\u7535\u89C6\u5267\u5E76\u521B\u5EFA", "110104": "\u641C\u7D22\u4E66\u7C4D\u5E76\u521B\u5EFA", "110105": "\u641C\u7D22\u97F3\u4E50\u5E76\u521B\u5EFA", "110106": "\u641C\u7D22\u6E38\u620F\u5E76\u521B\u5EFA", "110007": `\u5F00\u59CB\u540C\u6B65`, "110009": `\u505C\u6B62\u540C\u6B65`, "110010": `\u540E\u53F0\u8FD0\u884C`, "110008": `\u5DF2\u7ECF\u5B58\u5728\u540C\u6B65\u4EFB\u52A1: {0}-{1}\uFF0C \u7ED3\u675F\u4E4B\u540E\u518D\u91CD\u8BD5`, "500002": `\u540C\u6B65\u72B6\u6001`, "110030": `\u9009\u62E9\u7C7B\u578B:`, "110031": `\u66FF\u6362\u540C\u540D\u6587\u6863:`, "110032": `\u9009\u62E9\u72B6\u6001:`, "110033": `\u8FDB\u5EA6:`, "110034": `\u8F93\u51FA\u6587\u4EF6\u5939:`, "110035": `\u6587\u6863\u540D: (\u63D0\u793A:\u652F\u6301\u53C2\u6570\u5316\u4EE5\u53CA\u591A\u7EA7\u8DEF\u5F84, \u53EF\u7528\u53C2\u6570\u89C1\u914D\u7F6E\u754C\u9762)`, "110036": `\u5B8C\u6210`, "110152": `\u786E\u8BA4`, "110070": `\u540C\u6B65\u8303\u56F4:`, "110071": `\u5168\u90E8`, "110072": `\u6700\u65B0\u53D8\u52A8`, "110075": `\u6700\u8FD130\u6761`, "110074": `\u81EA\u5B9A\u4E49\u65F6\u95F4`, "110076": `\u81EA\u5B9A\u4E49\u6761\u6570`, "110077": `\u4ECE`, "110078": `\u7B2C`, "110079": `\u5230`, "110073": `\u6761`, "110095": `\u6570\u5B57\u8D8A\u5C0F\u4EE3\u8868\u8D8A\u63A5\u8FD1\u73B0\u5728\uFF0C\u6BD4\u5982\u5728\u8C46\u74E3\u4E0A\u6211\u4EEC\u6700\u65B0\u66F4\u65B0\u4E00\u6761\u5185\u5BB9\u4E3A\u7B2C\u4E00\u6761\uFF0C\u53CD\u4E4B\u6700\u65E9\u66F4\u65B0\u7684\u5C31\u662F\u6700\u540E\u4E00\u6761\u4E86`, "110096": `\u8FD9\u662F\u6211\u4EEC\u5728\u8C46\u74E3\u4E0A\u6761\u76EE\u7684\u66F4\u65B0\u65F6\u95F4`, "110080": `\u6570\u5B57`, "112080": `\u81EA\u5B9A\u4E49\u7684\u6570\u91CF\u8F93\u5165\u4E0D\u662F\u4E2A\u6570\u5B57`, "110081": `\u5F00\u59CB\u65F6\u95F4\u548C\u7ED3\u675F\u65F6\u95F4\u5FC5\u987B\u586B\u5199\u4E00\u4E2A\u6216\u90FD\u586B\u5199`, "110082": `\u65F6\u95F4\u5F55\u5165\u683C\u5F0F\u5FC5\u987B\u662FYYYY-MM-DD`, "110083": `\u4E0D\u652F\u6301\u5F53\u524D\u540C\u6B65\u6761\u4EF6`, "110090": `[{0:\u672A\u77E5}]\u72B6\u6001\u4E3A[{1:\u672A\u77E5}]\u7684\u603B\u6570\u4E3A{2:\u672A\u77E5},\u5F53\u524D\u9700\u8981\u540C\u6B65\u6570\u4E3A{3::\u672A\u77E5}`, "110091": `\u5F02\u5E38:`, "110092": `\u60C5\u51B5:`, "110037": ` ### \u540C\u6B65\u6761\u4EF6 {0} ### \u540C\u6B65\u7ED3\u679C\u6C47\u603B {1} ### \u540C\u6B65\u7ED3\u679C\u660E\u7EC6 {2} --- \u6CE8:\u6B64\u6587\u6863\u53EF\u5220\u9664 `, "110038": `\u8C46\u74E3\u540C\u6B65\u7ED3\u679C`, "110039": `\u589E\u91CF\u540C\u6B65:`, "110040": `\u4EC5\u540C\u6B65\u6700\u8FD1\u65B0\u589E/\u540C\u6B65\u5931\u8D25/\u672A\u540C\u6B65\u7684\u90E8\u5206,\u589E\u91CF\u9002\u5408\u4E4B\u524D\u540C\u6B65\u4E2D\u9014\u5931\u8D25\u505C\u6B62\u6216\u6700\u8FD1\u6709\u8C46\u74E3\u65B0\u589E\u4E86\u5185\u5BB9,\u5168\u91CF\u540C\u6B65\u9002\u5408\u4FEE\u6539\u4E86\u6A21\u677F\u6216\u4FEE\u6539\u4E86\u5B58\u653E\u8DEF\u5F84\u60C5\u51B5\u4E0B\u8FDB\u884C.`, "110041": `\u4F7F\u7528\u589E\u91CF`, "110042": `\u9884\u8BA1\u5904\u7406\u65F6\u95F4`, "110043": `\u6B63\u5728\u83B7\u53D6\u9700\u8981\u540C\u6B65\u7684\u5217\u8868, \u8BF7\u7A0D\u540E`, "110044": `\u81EA\u5B9A\u4E49\u6761\u6570\u7684\u5F55\u5165\u7ED3\u675F\u6570\u91CF\u4E0D\u80FD\u6BD4\u5F00\u59CB\u6570\u91CF\u5C0F`, "110045": `\u81EA\u5B9A\u4E49\u65F6\u95F4\u7684\u5F55\u5165\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u6BD4\u5F00\u59CB\u65F6\u95F4\u5C0F`, "110050": `\u7C7B\u578B`, "110051": `\u6570\u91CF`, "110052": `\u8BF4\u660E`, "110055": `\u5F00\u542F`, "110056": `\u5173\u95ED`, "unHandle": `[\u5DF2\u5FFD\u7565]`, "exists": `[\u672A\u66FF\u6362]`, "replace": `[\u5DF2\u66FF\u6362]`, "create": `[\u5DF2\u521B\u5EFA]`, "fail": `[\u5DF2\u5931\u8D25]`, "failByDiffType": `[\u7C7B\u578B\u4E0D\u5339\u914D]`, "syncall": `[\u603B\u6570]`, "notsync": `[\u672A\u8FDB\u884C]`, "unHandle_desc": `\u589E\u91CF\u540C\u6B65\u4E0A\u6B21\u5DF2\u8FDB\u884C,\u8FD9\u6B21\u65E0\u9700\u5904\u7406`, "exists_desc": `\u5DF2\u7ECF\u5B58\u5728\u7684\u540C\u540D\u6587\u6863,\u8FD9\u6B21\u65E0\u9700\u540C\u6B65`, "replace_desc": `\u5DF2\u7ECF\u5B58\u5728\u7684\u540C\u540D\u6587\u6863,\u8FD9\u6B21\u5DF2\u88AB\u66FF\u6362`, "create_desc": `\u4E4B\u524D\u4E0D\u5B58\u5728\u7684\u6587\u6863,\u8FD9\u6B21\u76F4\u63A5\u65B0\u589E`, "fail_desc": `\u5904\u7406\u8FC7\u7A0B\u949F\u51FA\u73B0\u9519\u8BEF,\u672A\u80FD\u6210\u529F`, "failByDiffType_desc": `\u5931\u8D25,\u7C7B\u578B\u4E0D\u5339\u914D,\u6BD4\u5982\u60F3\u8981\u540C\u6B65\u7684\u662F\u7535\u5F71,\u4F46\u662F\u5B9E\u9645\u83B7\u53D6\u5230\u7684\u662F\u7535\u89C6\u5267`, "notsync_desc": `\u56E0\u5F02\u5E38\u4E2D\u65AD\u6216\u63D0\u524D\u7EC8\u6B62\u5BFC\u81F4\u8FD8\u672A\u5904\u7406`, "syncall_desc": `\u60A8\u6B64\u6B21\u540C\u6B65\u6761\u4EF6\u5728\u8C46\u74E3\u4E2D\u7684\u6761\u76EE\u603B\u6570`, "110201": `{0} \u6587\u4EF6\u5DF2\u7ECF\u5B58\u5728.`, "110202": `{0} \u6A21\u677F\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6`, "100101": `\u767B\u5F55\u8C46\u74E3`, "100102": `\u8C46\u74E3\u4EBA\u673A\u9A8C\u8BC1`, "100103": `\u4EBA\u673A\u8BA4\u8BC1\u901A\u8FC7\uFF0C\u8BF7\u91CD\u65B0\u641C\u7D22\u6216\u5BFC\u5165`, "100111": `\u8C46\u74E3\u767B\u5F55\u4FE1\u606F\u8FC7\u671F,\u8BF7\u81F3Douban\u63D2\u4EF6\u91CD\u65B0\u767B\u5F55`, "100113": `\u65E0\u6CD5\u66FF\u6362\u7528\u6237\u4FE1\u606F\u53D8\u91CF, \u767B\u5F55\u4FE1\u606F\u8FC7\u671F, \u8BF7\u91CD\u65B0\u767B\u5F55Douban`, "100120": `\u5DF2\u767B\u5F55`, "100121": `\u8BF7\u767B\u5F55`, "100122": `\u6635\u79F0`, "100123": `\u8C46\u74E3ID`, "100124": `\u6635\u79F0`, "100125": `\u767B\u5F55\u540E, \u53EF\u4F7F\u7528\u4F60\u7684\u8BC4\u5206/\u9605\u8BFB\u72B6\u6001\u7B49\u4F5C\u4E3A\u5BFC\u5165\u53C2\u6570,\u5177\u4F53\u53EF\u7528\u53C2\u6570\u89C1\u6700\u540E.`, "100126": `\u8C46\u74E3\u7528\u6237\u4FE1\u606F`, "100128": `\u767B\u51FA`, "100129": `\u79FB\u52A8\u7AEF\u63A8\u8350\u4F7F\u7528\u4E8C\u7EF4\u7801\u767B\u5F55\uFF1B\u5982\u53EA\u6709\u4E00\u53F0\u8BBE\u5907\uFF0C\u8BF7\u6309\u7167`, "100130": `\u767B\u5F55`, "100131": `\u767B\u5F55\u8C46\u74E3`, "100133": `\u767B\u5F55\u51FA\u9519\u5904\u7406`, "100135": `Cookie\u767B\u5F55`, "100136": `Cookie\u8F93\u5165`, "100137": `\u4F7F\u7528Cookie\u767B\u5F55\u5931\u8D25,\u8BF7\u786E\u8BA4Cookie\u586B\u5199\u662F\u5426\u6B63\u786E`, "100134": `\u5982\u679C\u4E0A\u9762\u767B\u5F55\u6309\u94AE\u70B9\u51FB\u540E\u5728\u5F39\u7A97\u4E2D\u767B\u5F55\u8FD8\u662F\u6CA1\u6210\u529F,\u8BF7\u70B9\u51FB\u6B64[Cookie\u767B\u5F55]\u6309\u94AE,\u7136\u540E\u6309\u7167`, "100139": `[\u6559\u7A0B]`, "100138": `\u83B7\u53D6Cookie,\u5E76\u5C06Cookie\u590D\u5236\u5230\u4E0B\u9762\u8F93\u5165\u6846\u4E2D,\u6700\u540E\u70B9\u51FB\u2714\uFE0F`, "100132": `\u52A0\u8F7D\u8C46\u74E3\u767B\u5F55\u9875\u9762\u5931\u8D25`, "100140": `\u4E8C\u7EF4\u7801\u767B\u5F55`, "100141": `\u8C46\u74E3\u4E8C\u7EF4\u7801\u767B\u5F55`, "100142": `\u8BF7\u4F7F\u7528\u53E6\u4E00\u53F0\u8BBE\u5907\u6253\u5F00\u8C46\u74E3App\uFF0C\u626B\u63CF\u4E0B\u65B9\u4E8C\u7EF4\u7801\u5E76\u786E\u8BA4\u767B\u5F55\u3002`, "100143": `\u6B63\u5728\u83B7\u53D6\u4E8C\u7EF4\u7801...`, "100144": `\u7B49\u5F85\u626B\u7801...`, "100145": `\u5DF2\u626B\u7801\uFF0C\u8BF7\u5728\u8C46\u74E3App\u4E2D\u786E\u8BA4\u767B\u5F55\u3002`, "100146": `\u8C46\u74E3\u767B\u5F55\u6210\u529F`, "100147": `\u4E8C\u7EF4\u7801\u5DF2\u5931\u6548\uFF0C\u8BF7\u70B9\u51FB\u5237\u65B0\u4E8C\u7EF4\u7801\u3002`, "100148": `\u5DF2\u53D6\u6D88\u767B\u5F55\uFF0C\u8BF7\u70B9\u51FB\u5237\u65B0\u4E8C\u7EF4\u7801\u91CD\u8BD5\u3002`, "100149": `\u4E8C\u7EF4\u7801\u767B\u5F55\u6682\u65F6\u5931\u8D25\uFF0C\u6B63\u5728\u91CD\u8BD5\uFF1B\u4E5F\u53EF\u4EE5\u5237\u65B0\u4E8C\u7EF4\u7801\u3002`, "100150": `\u5237\u65B0\u4E8C\u7EF4\u7801`, "100151": `\u7F51\u9875\u767B\u5F55`, "100152": `\u626B\u7801\u786E\u8BA4\u6210\u529F\uFF0C\u6B63\u5728\u4FDD\u5B58\u767B\u5F55\u4FE1\u606F...`, "100153": `\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u63D2\u4EF6\u6CA1\u6709\u6536\u5230\u8C46\u74E3\u767B\u5F55\u51ED\u8BC1\uFF0C\u8BF7\u5237\u65B0\u4E8C\u7EF4\u7801\u91CD\u8BD5\u3002`, "1201": `Obsidian-\u8C46\u74E3`, "120001": `\u8C46\u74E3\u641C\u7D22\u5730\u5740`, "120002": `\u8C46\u74E3\u641C\u7D22\u9875\u9762\u8BF7\u6C42\u5730\u5740, \u901A\u5E38\u662F\u7F51\u9875\u641C\u7D22\u7684\u5730\u5740. `, "120003": `\u5148\u8BBF\u95EE:`, "120004": `\u7136\u540E\u5728\u641C\u7D22\u8F93\u5165\u6846\u4E0D\u8F93\u5165\u4EFB\u4F55\u5185\u5BB9,\u76F4\u63A5\u70B9\u51FB\u641C\u7D22,`, "120005": `\u6240\u8DF3\u8F6C\u7684\u7F51\u9875\u5730\u5740\u5373\u662F\u641C\u7D22\u5730\u5740,`, "120006": `\u5C06\u7F51\u9875\u5730\u5740\u590D\u5236\u5230\u5F53\u524D\u8F93\u5165\u6846\u5373\u53EF,`, "1210": `\u57FA\u7840`, "1203": `\u6A21\u677F`, "1220": `\u8F93\u51FA`, "1230": `\u5B57\u6BB5`, "1260": `\u767B\u5F55`, "1270": `\u6570\u7EC4\u957F\u5EA6\u63A7\u5236`, "1271": `\u9488\u5BF9\u5185\u5BB9\u7C7B\u578B(\u7535\u5F71/\u7535\u89C6\u5267/\u4E66\u7C4D/\u97F3\u4E50/\u6E38\u620F\u7B49)\u4E2D\u7684\u6570\u7EC4\u5B57\u6BB5(\u5982 actor\u3001director\u3001author\u3001translator\u3001aliases \u7B49)\u8BBE\u7F6E\u6700\u5927\u4FDD\u7559\u6570\u91CF, \u8D85\u51FA\u90E8\u5206\u5C06\u4E0D\u4F1A\u5199\u5165\u7B14\u8BB0\u3002`, "1272": `\u63D0\u793A: "\u9002\u7528\u7C7B\u578B"\u9009\u62E9"\u5168\u90E8\u7C7B\u578B"\u65F6, \u9650\u5236\u5C06\u4F5C\u7528\u4E8E\u6240\u6709\u7C7B\u578B\u4E2D\u5339\u914D\u5B57\u6BB5\u540D\u7684\u5B57\u6BB5; \u9009\u62E9\u5177\u4F53\u7C7B\u578B\u65F6\u4EC5\u4F5C\u7528\u4E8E\u8BE5\u7C7B\u578B, \u540C\u5B57\u6BB5\u540C\u65F6\u5B58\u5728\u4E24\u79CD\u9650\u5236\u65F6\u53D6\u8F83\u5C0F\u503C\u3002`, "1273": `\u6DFB\u52A0\u4E00\u6761\u9650\u5236\u914D\u7F6E, \u4F8B\u5982\u6307\u5B9A movie \u7684 actor \u53EA\u4FDD\u7559\u524D 5 \u4F4D\u3002`, "127401": `\u6DFB\u52A0\u6570\u7EC4\u957F\u5EA6\u9650\u5236`, "127402": `\u9002\u7528\u7C7B\u578B:`, "127403": `\u5B57\u6BB5\u540D:`, "127404": `\u5982 actor / director / author \u7B49`, "127405": `\u6700\u5927\u6570\u91CF:`, "127406": `\u5982 5`, "127407": `\u5220\u9664\u8BE5\u9650\u5236`, "1204": `\u914D\u7F6E\u5BF9\u5E94\u7C7B\u578B\u7684\u6A21\u677F\u6587\u4EF6, \u5982\u679C\u4E3A\u7A7A\u5219\u4F7F\u7528\u9ED8\u8BA4\u6A21\u677F. \u6A21\u677F\u53EF\u4F7F\u7528\u7684\u53C2\u6570\u5728\u9875\u7B7E'\u5B57\u6BB5'\u548C'\u81EA\u5B9A\u4E49\u5B57\u6BB5'\u4E2D\u67E5\u770B`, "1205": `\u{1F9E1}\u63D0\u793A: \u5EFA\u8BAE\u70B9\u51FB\u53F3\u4FA7'\u590D\u5236'\u9ED8\u8BA4\u6A21\u677F\u6309\u94AE, \u7136\u540E\u5728\u65B0\u5EFA\u7684\u6587\u4EF6\u4E2D\u7C98\u8D34\u4FEE\u6539\u6A21\u677F, \u6700\u540E\u56DE\u5230\u6B64\u5904\u9009\u62E9\u5BF9\u5E94\u6A21\u677F. `, "1240": `\u81EA\u5B9A\u4E49\u5B57\u6BB5`, "1241": `\u81EA\u5B9A\u4E49\u53C2\u6570\uFF0C\u503C\u672C\u8EAB\u4E5F\u652F\u6301\u4F7F\u7528\u53C2\u6570\uFF0C\u5982myTitle:\u300A{{title}}\u300B\u3002\u5728\u6A21\u677F\u4E2D\u4F7F\u7528\u53C2\u6570\u65F6\u8BF7\u7528'{{}}'\u5305\u88F9, \u4E3E\u4F8B: \u53C2\u6570myType, \u5219\u4F7F\u7528\u65F6\u4E3A{{myType}}. `, "1242": `\u6DFB\u52A0\u81EA\u5B9A\u4E49\u53C2\u6570, \u53C2\u6570\u53EF\u7528\u4E8E\u6A21\u677F\u4E2D\u6216\u8005\u6587\u4EF6\u540D\u4E2D. `, "1250": `\u9AD8\u7EA7`, "1252": `\u4E00\u4E9B\u8FD0\u884C\u65F6\u7684\u9AD8\u7EA7\u914D\u7F6E\uFF0C\u5982\u5F00\u542Fdebug\u6A21\u5F0F`, "1251": `\u2622\u9AD8\u7EA7\u8BBE\u7F6E\u53EA\u6709\u5F53\u4F60\u77E5\u9053\u4FEE\u6539\u6B64\u8BBE\u7F6E\u4E4B\u540E\u7684\u5F71\u54CD\u624D\u5141\u8BB8\u4FEE\u6539, \u6B63\u5E38\u60C5\u51B5\u4E0B\u8BF7\u4FDD\u6301\u9ED8\u8BA4`, "125001": `\u8C03\u8BD5\u6A21\u5F0F`, "125002": `\u8C03\u8BD5\u6A21\u5F0F\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u63A7\u5236\u53F0\u6253\u5370\u6B64\u63D2\u4EF6\u7684\u65E5\u5FD7\u4FE1\u606F`, "125011": `\u91CD\u7F6E\u8BBE\u7F6E\u4E3A\u9ED8\u8BA4`, "125012": `\u5C06\u8BBE\u7F6E\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C\uFF0C\u4F46\u4E0D\u4F1A\u6E05\u9664\u767B\u5F55\u4FE1\u606F\uFF0C\u4E5F\u4E0D\u4F1A\u6E05\u9664\u81EA\u5B9A\u4E49\u53C2\u6570`, "125021": `\u6E05\u9664\u767B\u5F55\u7F13\u5B58`, "125022": `\u6E05\u9664\u767B\u5F55\u4FE1\u606F\uFF0C\u5982\u679C\u4F60\u9047\u5230\u767B\u5F55\u95EE\u9898\uFF0C\u53EF\u4EE5\u5C1D\u8BD5\u6E05\u9664\u767B\u5F55\u7F13\u5B58\uFF0C\u70B9\u51FB\u6309\u94AE\u5C06\u6E05\u9664\u6240\u6709\u767B\u5F55\u7F13\u5B58\u6570\u636E`, "125031": `\u6E05\u9664\u540C\u6B65\u7F13\u5B58`, "125032": `\u6E05\u9664\u540C\u6B65\u7F13\u5B58\uFF0C\u70B9\u51FB\u6309\u94AE\u5C06\u6E05\u9664\u6240\u6709\u540C\u6B65\u7F13\u5B58\u6570\u636E\uFF08\u4F46\u4E0D\u4F1A\u6E05\u9664\u5DF2\u540C\u6B65\u7684\u6587\u6863\uFF09`, "125033": `\u786E\u8BA4\u8981\u6267\u884C\u6B64\u64CD\u4F5C\u5417\uFF1F`, "125034": `\u5BFC\u51FA\u914D\u7F6E`, "125035": `\u5BFC\u51FA\u5F53\u524D\u63D2\u4EF6\u7684\u6240\u6709\u914D\u7F6E\u5230\u4E00\u4E2A\u672C\u5730\u6587\u4EF6\u4E2D\uFF0C\u5305\u62EC\u6240\u6709\u8BBE\u7F6E\u3001\u540C\u6B65\u8BB0\u5F55\u7684\u7F13\u5B58\u3001\u767B\u5F55\u72B6\u6001`, "125047": `\u9009\u62E9\u8DEF\u5F84..`, "125036": `\u5BFC\u5165\u914D\u7F6E`, "125037": `\u5BFC\u5165\u4E00\u4E2A\u4E4B\u524D\u5BFC\u51FA\u7684\u914D\u7F6E\u6587\u4EF6\uFF0C\u5C06\u4F1A\u8986\u76D6\u5F53\u524D\u6240\u6709\u8BBE\u7F6E\u3001\u540C\u6B65\u8BB0\u5F55\u7684\u7F13\u5B58\u3001\u767B\u5F55\u72B6\u6001\u3002\u4E3A\u4E86\u5B89\u5168\u8D77\u89C1\uFF0C\u5EFA\u8BAE\u5148\u5BFC\u51FA\u5F53\u524D\u914D\u7F6E\u518D\u5C1D\u8BD5\u5BFC\u5165`, "125038": `\u5BFC\u5165\u914D\u7F6E\u6587\u4EF6`, "125039": `\u9009\u62E9\u6587\u4EF6..`, "125040": `\u5BFC\u5165`, "125041": `\u5BFC\u5165\u914D\u7F6E\u6210\u529F`, "125042": `\u5BFC\u5165\u914D\u7F6E\u5931\u8D25`, "125043": `\u5BFC\u5165\u914D\u7F6E\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6\u662F\u5426\u6B63\u786E`, "125044": `\u5BFC\u5165\u914D\u7F6E\u6587\u4EF6\u6210\u529F`, "125045": `\u5BFC\u5165\u914D\u7F6E\u6587\u4EF6\u6210\u529F\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762`, "125046": `\u5BFC\u5165\u914D\u7F6E\u6587\u4EF6\uFF0C\u6CE8\u610F\u5148\u5BFC\u51FA\u914D\u7F6E\u5907\u4EFD\uFF0C\u7136\u540E\u624D\u5BFC\u5165\u914D\u7F6E\u6587\u4EF6`, "124101": `\u65B0\u589E`, "124108": `\u65B0\u589E\u4E00\u4E2A\u81EA\u5B9A\u4E49\u53C2\u6570`, "124102": `\u53C2\u6570\u540D\u79F0:`, "124103": `\u81EA\u5B9A\u4E49\u53C2\u6570\u540D\u79F0`, "124104": `\u53C2\u6570\u503C:`, "124105": `\u81EA\u5B9A\u4E49\u53C2\u503C`, "124106": `\u751F\u6548\u7C7B\u578B`, "124107": `\u5220\u9664\u81EA\u5B9A\u4E49\u53C2\u6570`, "121101": `\u6A21\u677F\u6587\u4EF6`, "121102": `\u5982\u679C\u4E3A\u7A7A, \u7B14\u8BB0\u5C06\u4F1A\u4F1A\u4F7F\u7528\u9ED8\u8BA4\u6A21\u677F`, "120101": `\u7535\u5F71`, "120102": `\u5BFC\u5165\u7535\u5F71\u6240\u4F7F\u7528\u7684\u6A21\u677F, \u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5BF9\u5E94\u7684\u6587\u4EF6\u8DEF\u5F84`, "120103": `\u652F\u6301\u4EE5\u4E0B\u53C2\u6570\u540D\u79F0 :`, "120104": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "120105": `{{url}}, {{desc}}, {{datePublished}}, {{genre}}, `, "120106": `{{originalTitle}},{{director}}, {{author}},`, "120107": ` {{actor}}`, "120201": `\u4E66\u7C4D`, "120202": `\u5BFC\u5165\u4E66\u7C4D\u6240\u4F7F\u7528\u7684\u6A21\u677F, \u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5BF9\u5E94\u7684\u6587\u4EF6\u8DEF\u5F84`, "120203": `\u652F\u6301\u4EE5\u4E0B\u53C2\u6570\u540D\u79F0 :`, "120204": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "120205": `{{url}}, {{desc}}, {{datePublished}}, {{publisher}}`, "120206": `{{originalTitle}}, {{subTitle}}, {{author}},`, "120207": `{{translator}}, {{isbn}}, {{price}}, {{totalPage}}`, "120208": `{{series}}, {{binding}}, {{menu}}`, "120301": `\u97F3\u4E50`, "120302": `\u5BFC\u5165\u97F3\u4E50\u6240\u4F7F\u7528\u7684\u6A21\u677F, \u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5BF9\u5E94\u7684\u6587\u4EF6\u8DEF\u5F84`, "120303": `\u652F\u6301\u4EE5\u4E0B\u53C2\u6570\u540D\u79F0 :`, "120304": `{{id}}, {{title}}, {{type}}, {{image}},`, "120305": `{{url}}, {{desc}}, {{datePublished}}`, "120306": `{{genre}}, {{actor}}, {{medium}}, {{albumType}},`, "120307": `{{barcode}}, {{records}}`, "120401": `\u65E5\u8BB0`, "120402": `\u5BFC\u5165\u65E5\u8BB0\u6240\u4F7F\u7528\u7684\u6A21\u677F, \u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5BF9\u5E94\u7684\u6587\u4EF6\u8DEF\u5F84`, "120403": `\u652F\u6301\u4EE5\u4E0B\u53C2\u6570\u540D\u79F0 :`, "120404": `{{id}}, {{title}}, {{type}}, {{image}},`, "120405": `{{url}}, {{desc}}, {{datePublished}}`, "120406": `{{author}}, {{authorUrl}}, {{content}}`, "120407": `{{timePublished}}`, "121301": `\u6E38\u620F`, "121302": `\u5BFC\u5165\u6E38\u620F\u6240\u4F7F\u7528\u7684\u6A21\u677F, \u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5BF9\u5E94\u7684\u6587\u4EF6\u8DEF\u5F84`, "121303": `\u652F\u6301\u4EE5\u4E0B\u53C2\u6570\u540D\u79F0 :`, "121304": `{{id}}, {{title}}, {{type}}, {{score}}, {{image}},`, "121305": `{{url}}, {{desc}}, {{publisher}}, {{datePublished}}`, "121306": `{{genre}}, {{aliases}}, {{developer}}, {{platform}}`, "121801": `\u7535\u89C6\u5267`, "121802": `\u5BFC\u5165\u7535\u89C6\u5267\u6240\u4F7F\u7528\u7684\u6A21\u677F, \u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5BF9\u5E94\u7684\u6587\u4EF6\u8DEF\u5F84`, "120501": `\u65E5\u671F\u683C\u5F0F`, "120503": `\u8FD9\u4E2A\u683C\u5F0F\u662F\u7ED9\u4E0B\u9762\u83B7\u53D6\u5230\u7684\u53C2\u6570\u8FDB\u884C\u683C\u5F0F\u5316\u65E5\u671F\u65F6\u663E\u793A\u7684\u5185\u5BB9 .`, "120502": `\u65F6\u95F4\u683C\u5F0F`, "120504": `\u8FD9\u4E2A\u683C\u5F0F\u662F\u7ED9\u4E0B\u9762\u83B7\u53D6\u5230\u7684\u53C2\u6570\u8FDB\u884C\u683C\u5F0F\u5316\u65F6\u95F4\u65F6\u663E\u793A\u7684\u5185\u5BB9 .`, "120506": `\u8BE6\u7EC6\u4ECB\u7ECD\u8BF7\u53C2\u8003`, "120507": `\u65F6\u95F4\u53C2\u6570\u65F6\u95F4\u683C\u5F0F\u9884\u89C8`, "120508": `\u683C\u5F0F\u53C2\u8003`, "120601": `\u6570\u7EC4\u663E\u793A`, "120602": `\u5F53\u6A21\u677F\u4E2D\u7684\u53D8\u91CF\u5B58\u5728\u6570\u7EC4, \u5219\u9700\u8981\u8BBE\u5B9A\u6570\u7EC4\u5143\u7D20\u4E2D\u7684\u5206\u5272\u7B26\u53F7\u4EE5\u53CA\u8D77\u59CB\u4E0E\u7ED3\u675F\u7B26\u53F7, \u6BD4\u5982\u6F14\u5458\u5217\u8868, \u652F\u6301\u8F6C\u4E49\u5B57\u7B26\\n(\u56DE\u8F66)\u3002\u5E76\u4E14\u540C\u65F6\u652F\u6301\u591A\u79CD\u65B9\u5F0F\u8F93\u51FA\u5185\u5BB9\uFF0C\u70B9\u51FB[+]\u65B0\u589E\u4E0D\u540C\u8F93\u51FA\u5F62\u5F0F\uFF0C\u9884\u89C8\u6548\u679C\u5728\u4E0B\u65B9`, "124109": `\u9996:`, "124110": `\u5143\u7D20\u9996:`, "124111": `\u5206\u9694\u7B26:`, "124112": `\u5143\u7D20\u5C3E:`, "124113": `\u5C3E:`, "1243": `\u8BC4\u5206scoreStar/myRateStar\u663E\u793A`, "124120": `\u5F97\u5206\u7B26\u53F7:`, "124121": `\u672A\u5F97\u5206\u7B26\u53F7:`, "124122": `\u663E\u793A\u672A\u5F97\u5206:`, "124310": `\u8BC4\u5206\uFF08\u661F\uFF09\u53C2\u6570{{scoreStar}} and {{myRatingStar}}\u8F93\u51FA\u683C\u5F0F\u3002\u5F53\u5206\u6570\u662F{0}/{1}\u65F6\uFF0C\u6A21\u677F\u6848\u4F8B\`score: {{scoreStar}}\``, "124311": `\u6700\u5927\u7B26\u53F7\u6570:`, "124312": `\u9ED8\u8BA4\u6574\u6570:`, "120701": `\u8C46\u74E3HTTP\u8BF7\u6C42\u5934`, "120702": `\u5982\u679C\u8C46\u74E3\u641C\u7D22\u6216\u8005\u83B7\u53D6\u6570\u636E\u5931\u8D25,\u8BF7\u5C1D\u8BD5\u4FEE\u6539\u8FD9\u4E2A\u53C2\u6570, \u53C2\u6570\u83B7\u53D6\u65B9\u5F0F\u4E3A: 1. \u8BBF\u95EEhttp://www.douban.com 2. \u590D\u5236\u8BF7\u6C42\u5934,\u4EC5\u590D\u5236\u4EE5\u4E0B\u8BF7\u6C42\u5934 `, "120801": `\u6682\u65F6\u4E0D\u652F\u6301\u8BE5\u7C7B\u578B\u5BFC\u5165,\u8BF7\u81F3Github\u63D0\u4EA4issuess\u83B7\u53D6\u5E2E\u52A9`, "120901": `\u8C46\u74E3\u7F51`, "121201": `\u4EBA\u540D\u663E\u793A\u6A21\u5F0F`, "121202": `\u53EF\u9009\u9879:`, "121203": `\u4E2D\u6587\u540D\u79F0\u6A21\u5F0F, \u4EBA\u540D\u53EA\u663E\u793A\u4E2D\u6587\u540D`, "121204": `\u82F1\u6587\u540D\u79F0\u6A21\u5F0F, \u4EBA\u540D\u53EA\u663E\u793A\u82F1\u6587\u540D`, "121205": `\u4E2D\u6587\u548C\u82F1\u6587\u540D\u79F0\u6A21\u5F0F, \u4EBA\u540D\u540C\u65F6\u663E\u793A\u4E2D\u6587\u548C\u82F1\u6587\u540D`, "121206": `\u4E2D\u6587\u540D`, "121207": `\u82F1\u6587\u540D`, "121208": `\u4E2D\u6587\u540D\u548C\u82F1\u6587\u540D`, "121401": `\u72B6\u6001\u680F`, "121402": `\u5F53\u5728\u5BFC\u5165\u6570\u636E\u65F6, \u662F\u5426\u9700\u8981\u5728\u72B6\u6001\u680F\u663E\u793A\u5904\u7406\u72B6\u6001? `, "121410": `\u9ED8\u8BA4\u641C\u7D22\u7C7B\u578B`, "121411": `\u5728\u6253\u5F00"\u641C\u7D22\u8C46\u74E3\u5E76\u521B\u5EFA\u6587\u4EF6"\u65F6\u9ED8\u8BA4\u641C\u7D22\u7684\u7C7B\u578B`, "121430": `\u4FDD\u5B58\u56FE\u7247\u9644\u4EF6`, "121431": `\u5BFC\u5165\u6570\u636E\u4F1A\u540C\u6B65\u4FDD\u5B58\u56FE\u7247\u9644\u4EF6\u5230\u672C\u5730\u6587\u4EF6\u5939, \u5982\u7535\u5F71\u5C01\u9762,\u4E66\u7C4D\u5C01\u9762\u3002\u5982\u679C\u9700\u8981\u663E\u793A\u5C01\u9762\uFF0C\u8BF7\u4FDD\u6301\u5F00\u542F\u8BE5\u529F\u80FD\u3002`, "121432": `\u9644\u4EF6(\u56FE\u7247)\u5B58\u653E\u4F4D\u7F6E`, "121433": `\u4FDD\u5B58\u7684\u9644\u4EF6\u5C06\u4F1A\u5B58\u653E\u81F3\u8BE5\u6587\u4EF6\u5939\u4E2D. \u5982\u679C\u4E3A\u7A7A, \u7B14\u8BB0\u5C06\u4F1A\u5B58\u653E\u5230\u9ED8\u8BA4\u4F4D\u7F6E(assets), \u4E14\u652F\u6301\u6240\u6709'\u901A\u7528'\u7684\u53C2\u6570\u3002\u5982\uFF1A{{myType}}/attachments`, "121452": `\u9644\u4EF6(\u56FE\u7247)\u6587\u4EF6\u540D`, "121453": `\u9644\u4EF6\u7684\u6587\u4EF6\u540D\u6A21\u677F, \u652F\u6301\u6240\u6709'\u901A\u7528'\u7684\u53C2\u6570\u4F5C\u4E3A\u540D\u79F0(\u5982:{{type}}-{{title}})\uFF0C\u4E14\u652F\u6301\u8DEF\u5F84, \u6BD4\u5982: '{{myType}}/\u9644\u4EF6-{{title}}'\u3002\u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u540D\u79F0{{title}}`, "121434": `assets`, "121454": `{{title}}`, "121435": `\u4FDD\u5B58\u9AD8\u6E05\u5C01\u9762`, "121436": `\u9AD8\u6E05\u5C01\u9762\u56FE\u7247\u8D28\u91CF\u66F4\u9AD8\u6E05\u6670\u5EA6\u66F4\u597D, \u9700\u8981\u60A8\u5728\u6B64\u63D2\u4EF6 \u767B\u5F55\u8C46\u74E3 \u624D\u80FD\u751F\u6548, \u82E5\u672A\u767B\u5F55\u5219\u9ED8\u8BA4\u4F7F\u7528\u4F4E\u7CBE\u5EA6\u7248\u672C\u5C01\u9762`, "121437": `\u767B\u5F55\u540E\u6B64\u529F\u80FD\u624D\u4F1A\u751F\u6548`, "121438": `\u9AD8\u6E05\u5C01\u9762\u56FE\u7247\u8D28\u91CF\u66F4\u9AD8, \u6E05\u6670\u5EA6\u66F4\u597D, \u4F46\u5360\u7528\u7A7A\u95F4\u4F1A\u6BD4\u666E\u901A\u6E05\u6670\u5EA6\u5C01\u9762\u66F4\u591A`, "121440": `\u4F7F\u7528\u9644\u4EF6\u56FE\u5E8A`, "121441": `\u5F00\u542F\u6B64\u9009\u9879\u5C06\u4F1A\u628A\u5BFC\u5165\u7684\u5C01\u9762\u6587\u4EF6\u4E0A\u4F20\u56FE\u5E8A\uFF0C\u800C\u4E0D\u662F\u4FDD\u5B58\u5728\u672C\u5730`, "121450": `\u56FE\u5E8A\u7C7B\u578B`, "121451": `\u9009\u62E9\u56FE\u5E8A\u7C7B\u578B`, "121461": `PicGo\u4E0A\u4F20Url`, "121501": `\u7B14\u8BB0\u5B58\u653E\u4F4D\u7F6E`, "121502": `\u521B\u5EFA\u7684\u7B14\u8BB0\u5C06\u4F1A\u5B58\u653E\u81F3\u8BE5\u6587\u4EF6\u5939\u4E2D. \u5982\u679C\u4E3A\u7A7A, \u7B14\u8BB0\u5C06\u4F1A\u5B58\u653E\u5230Obsidian\u7684\u9ED8\u8BA4\u4F4D\u7F6E`, "121601": `\u7B14\u8BB0\u540D\u79F0`, "121602": `\u521B\u5EFA\u7684\u7B14\u8BB0\u5C06\u4F1A\u4F7F\u7528\u6B64\u540D\u79F0\u4F5C\u4E3A\u6A21\u677F, \u652F\u6301\u6240\u6709'\u901A\u7528'\u7684\u53C2\u6570\u4F5C\u4E3A\u540D\u79F0(\u5982:{{type}}/{{title}}), \u4E14\u652F\u6301\u8DEF\u5F84, \u6BD4\u5982: 'MyData/{{title}}'. \u5982\u679C\u4E3A\u7A7A, \u7B14\u8BB0\u5C06\u4F1A\u4F7F\u7528\u9ED8\u8BA4\u540D\u79F0. `, "121604": `\u6587\u4EF6\u8DEF\u5F84\u9884\u89C8`, "120603": `\u8F93\u51FA\u6548\u679C\u9884\u89C8`, "120604": `\u6570\u7EC4\u7C7B\u578B\u540D\u79F0:`, "120605": `\u6A21\u677F\u4E2D\u4F7F\u7528\u4E3E\u4F8B\uFF1A propertyName:{{actor`, "120606": `\u5220\u9664\u5217\u8868\u7C7B\u578B\u5B57\u6BB5\u663E\u793A\u65B9\u5F0F`, "120607": `\u65B0\u589E\u5217\u8868\u7C7B\u578B\u5B57\u6BB5\u663E\u793A\u65B9\u5F0F:`, "120608": `\u663E\u793A\u6216\u9690\u85CF\u5217\u8868\u8F93\u51FA\u8BBE\u7F6E`, "121701": `\u9009\u62E9\u6A21\u677F\u6587\u4EF6`, "121901": `\u590D\u5236\u57FA\u7840\u6A21\u677F\u5185\u5BB9`, "121903": `\u590D\u5236\u542B\u6709\u6211\u7684\u8BC4\u5206\u7684\u6A21\u677F\u5185\u5BB9. \u6A21\u677F\u4E2D\u6709\u767B\u5F55\u540E\u53EF\u4EE5\u7528\u7684\u53C2\u6570,\u5982\u6211\u7684\u8BC4\u5206, \u6211\u7684\u9605\u8BFB\u72B6\u6001\u7B49`, "130101": `\u83B7\u53D6\u6570\u636E\u5931\u8D25,{0}`, "130102": `Obsidian Douban\u63D2\u4EF6\u9519\u8BEF\u63D0\u793A:`, "130103": `Obsidian Douban\u63D2\u4EF6\u5F02\u5E38\u63D0\u793A:`, "140101": `\u5F53\u524D\u7248\u672C\u6682\u4E0D\u652F\u6301\u8BE5\u7C7B\u578B\u5BFC\u5165,\u8BF7\u5347\u7EA7Obsidian Douban\u6216\u81F3github\u63D0\u4EA4issuess\u83B7\u53D6\u5E2E\u52A9`, "140102": `\u540C\u6B65\u7684\u5BF9\u8C61\u548C\u9009\u62E9\u5BF9\u8C61\u4E0D\u4E00\u81F4\uFF0C\u5C06\u4E0D\u4F1A\u540C\u6B65, \u73B0\u5728\u9009\u62E9\u540C\u6B65\u7684\u7C7B\u578B\uFF1A{0}\uFF0C\u4F46\u662F\u83B7\u53D6[{1}]\u7684\u7C7B\u578B\uFF1A{2}`, "130105": `\u7531\u4E8E\u591A\u6B21\u9891\u7E41\u8BF7\u6C42\u6570\u636E\uFF0C\u8C46\u74E3\u5F53\u524D\u6682\u65F6\u4E0D\u53EF\u7528. \u8BF7\u4E8E12\u5C0F\u65F6\u621624\u5C0F\u65F6\u540E\u518D\u91CD\u8BD5\uFF0C\u6216\u91CD\u7F6E\u4F60\u7684\u7F51\u7EDC(\u5982\u91CD\u65B0\u62E8\u53F7\u6216\u66F4\u6362\u7F51\u7EDC) `, "130106": `\u8BF7\u5C1D\u8BD5\u5728Douban\u63D2\u4EF6\u4E2D\u767B\u5F55\u540E\u64CD\u4F5C. \u82E5\u8FD8\u662F\u65E0\u6548\u679C\u5219\u5C1D\u8BD5\u4E8E12\u5C0F\u65F6\u621624\u5C0F\u65F6\u540E\u518D\u91CD\u8BD5\uFF0C\u6216\u91CD\u7F6E\u4F60\u7684\u7F51\u7EDC(\u5982\u91CD\u65B0\u62E8\u53F7\u6216\u66F4\u6362\u7F51\u7EDC) `, "130107": `\u53C2\u6570{0}\u4E2D\u6307\u5B9A\u7684\u6570\u7EC4\u8F93\u51FA\u7C7B\u578B{1}\u4E0D\u5B58\u5728\uFF0C\u8BF7\u524D\u5F80\u914D\u7F6E\u8FDB\u884C\u8BBE\u7F6E`, "130109": `\u4E0B\u8F7D\u56FE\u7247\u5185\u5BB9\u4E3A\u7A7A`, "130110": `\u5199\u5165\u526A\u8D34\u677F\u5931\u8D25`, "130120": `\u540C\u6B65\u65F6\u53D1\u751F\u9519\u8BEF\uFF0C\u4F46\u540C\u6B65\u5C06\u4F1A\u7EE7\u7EED\u3002\u9519\u8BEF\u9879\u76EE\u662F {}\u3002`, "130121": `\u603B\u6570\u53EA\u6709{0}, \u9009\u62E9\u7684\u5F00\u59CB\u6BD4\u603B\u6570\u8FD8\u8981\u5927\uFF0C\u5C06\u4E0D\u4F1A\u540C\u6B65\u3002`, "140201": `[OB-Douban]: \u5F00\u59CB\u641C\u7D22'{0}'...`, "140202": `[OB-Douban]: \u641C\u7D22\u6761\u6570{0}\u6761`, "140203": `[OB-Douban]: \u8BF7\u6C42\u8C46\u74E3'{0}'...`, "140204": `[OB-Douban]: \u66FF\u6362\u6587\u672C'{0}'...`, "140205": `[OB-Douban]: \u5904\u7406\u5B8C\u6210'{0}'`, "140206": `[OB-Douban]: \u51FA\u73B0\u9519\u8BEF,\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u767B\u5F55.\u9519\u8BEF\u539F\u56E0:'{0}'`, "140207": `[OB-Douban]: [{0}/{1}] {2}`, "140208": `[OB-Douban]: [{0}/{1}] {2}`, "140301": `Douban: \u5F00\u59CB\u540C\u6B65[{0}]...`, "140302": `Douban: \u540C\u6B65\u5B8C\u6210`, "140303": `Douban: \u7528\u6237\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u81F3\u63D2\u4EF6\u4E2D\u91CD\u65B0\u767B\u5F55`, "140304": `Douban: \u6B64\u529F\u80FD\u9700\u8981\u767B\u5F55, \u8BF7\u5148\u81F3\u63D2\u4EF6\u4E2D\u767B\u5F55\u8C46\u74E3`, "150101": `\u9009\u62E9\u4E00\u9879\u5185\u5BB9...`, "121902": `\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C`, "150106": `[\u4E0A\u4E00\u9875]...(\u9ED8\u8BA4\u67E5\u8BE2\u7ED3\u679C)`, "150102": `[\u4E0A\u4E00\u9875]...`, "150103": `[\u4E0B\u4E00\u9875]...`, "150105": `[\u4E0B\u4E00\u9875]...(\u5C0F\u7EC4\u5E16\u5B50\u7ED3\u679C)`, "150104": `[\u4E0B\u4E00\u9875]...(\u8BF7\u5148\u5728\u63D2\u4EF6\u4E2D\u767B\u5F55\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD)`, "150107": `\u7ED3\u679C\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u9009\u62E9\u7C7B\u578B\u518D\u641C\u7D22`, "150108": `\u5982\u679C\u6CA1\u6709\u627E\u5230\u4F60\u60F3\u8981\u7684\u5185\u5BB9, \u8BF7\u5C1D\u8BD5\u66F4\u6362\u5173\u952E\u5B57\u6216\u8005\u66F4\u6362\u641C\u7D22\u7C7B\u578B`, "200101": `\u3002`, "122001": `\u901A\u7528\u53C2\u6570`, "122002": `\u6269\u5C55\u53C2\u6570`, "122003": `\u901A\u7528\u53C2\u6570\u4E00\u5B9A\u6709\u503C\u4E0D\u4E3A\u7A7A, \u6269\u5C55\u53C2\u6570\u53EF\u80FD\u4E3A\u7A7A`, "122004": `\u4EE5\u4E0B\u53C2\u6570\u4F7F\u7528\u65F6\u8BF7\u7528'{{}}'\u5305\u88F9\uFF0C\u4F8B\u5982\u53C2\u6570 title \u4F7F\u7528\u65F6\u4E3A {{title}}\u3002\u70B9\u51FB\u53C2\u6570\u540D\u5355\u5143\u683C\u53EF\u590D\u5236\u5B8C\u6574\u6A21\u677F\u53D8\u91CF\u3002`, "122005": `\u6269\u5C55\u53C2\u6570\u6309\u5185\u5BB9\u7C7B\u578B\u63D0\u4F9B\u3002\u9AD8\u4EAE\u6587\u5B57\u4E3A\u5B9E\u9645\u53C2\u6570\u540D\uFF0C\u70B9\u51FB\u5BF9\u5E94\u5355\u5143\u683C\u53EF\u590D\u5236\u5B8C\u6574\u6A21\u677F\u53D8\u91CF\u3002`, "122010": `\u6211\u7684\u72B6\u6001\u53C2\u6570`, "122011": `\u70B9\u51FB\u590D\u5236`, "122012": `\u5DF2\u590D\u5236`, "122013": `\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5`, "410101": ``, "410102": `\u672A\u77E5`, "410200": `\u8BC4\u5206\u2B50`, "300101": `\u53C2\u6570`, "300102": `\u4E66\u7C4D`, "300103": `\u7535\u5F71`, "300104": `\u7535\u89C6\u5267`, "300105": `\u97F3\u4E50`, "300106": `\u65E5\u8BB0`, "300107": `\u6E38\u620F`, "300108": `\u5E7F\u64AD`, "310101": `\u8C46\u74E3ID`, "310102": `\u4E66\u540D`, "310103": `\u7C7B\u578B`, "310104": `\u8BC4\u5206`, "310105": `\u5C01\u9762\u8DEF\u5F84`, "310106": `\u8C46\u74E3\u7F51\u5740`, "310107": `\u5185\u5BB9\u7B80\u4ECB`, "310108": `\u51FA\u7248\u793E`, "310109": `\u51FA\u7248\u65F6\u95F4`, "310110": ``, "310111": `author:\u539F\u4F5C\u8005`, "310112": `translator:\u8BD1\u8005`, "310113": `isbn:isbn`, "310114": `originalTitle:\u539F\u4F5C\u540D`, "310115": `subTitle:\u526F\u6807\u9898`, "310116": `totalPage:\u9875\u6570`, "310117": `binding:\u88C5\u5E27`, "310118": `producer:\u51FA\u54C1\u65B9`, "310130": `\u51FA\u7248\u5E74\u4EFD`, "310121": `\u5C01\u9762URL`, "310122": `menu:\u76EE\u5F55`, "310201": `\u8C46\u74E3ID`, "310202": `\u7535\u5F71\u540D\u79F0`, "310203": `\u7C7B\u578B`, "310204": `\u8BC4\u5206`, "310205": `\u5C01\u9762\u8DEF\u5F84`, "310206": `\u8C46\u74E3\u7F51\u5740`, "310207": `\u7B80\u4ECB`, "310208": ``, "310209": `\u4E0A\u6620\u65E5\u671F`, "310210": `\u7C7B\u578B`, "310211": `director:\u5BFC\u6F14`, "310212": `author:\u7F16\u5267`, "310213": `actor:\u4E3B\u6F14`, "310214": `originalTitle:\u539F\u4F5C\u540D`, "310215": `country:\u56FD\u5BB6`, "310216": `language:\u8BED\u8A00`, "310217": `time:\u7247\u957F`, "310218": `aliases:\u53C8\u540D`, "310219": `IMDb`, "310220": `-`, "310230": `\u4E0A\u6620\u5E74\u4EFD`, "310221": `\u5C01\u9762URL`, "310222": `-`, "310301": `\u8C46\u74E3ID`, "310302": `\u7535\u89C6\u5267\u540D\u79F0`, "310303": `\u7C7B\u578B`, "310304": `\u8BC4\u5206`, "310305": `\u5C01\u9762\u8DEF\u5F84`, "310306": `\u8C46\u74E3\u7F51\u5740`, "310307": `\u7B80\u4ECB`, "310308": `(\u56FA\u5B9A\u503C:\u672A\u77E5)`, "310309": `\u4E0A\u6620\u65E5\u671F`, "310310": `\u7C7B\u578B`, "310311": `director:\u5BFC\u6F14`, "310312": `author:\u7F16\u5267`, "310313": `actor:\u4E3B\u6F14`, "310314": `originalTitle:\u539F\u4F5C\u540D`, "310315": `country:\u56FD\u5BB6`, "310316": `language:\u8BED\u8A00`, "310317": `time:\u7247\u957F`, "310318": `aliases:\u53C8\u540D`, "310319": `IMDb`, "310320": `episode:\u96C6\u6570`, "310330": `\u4E0A\u6620\u5E74\u4EFD`, "310321": `\u5C01\u9762URL`, "310322": `-`, "310401": `\u8C46\u74E3ID`, "310402": `\u97F3\u4E50\u540D`, "310403": `\u7C7B\u578B`, "310404": `\u8BC4\u5206`, "310405": `\u5C01\u9762\u8DEF\u5F84`, "310406": `\u8C46\u74E3\u7F51\u5740`, "310407": `\u7B80\u4ECB`, "310408": `\u51FA\u7248\u8005`, "310409": `\u53D1\u884C\u65F6\u95F4`, "310410": `\u6D41\u6D3E`, "310411": `actor: \u8868\u6F14\u8005`, "310412": `albumType:\u4E13\u8F91\u7C7B\u578B`, "310413": `medium:\u4ECB\u8D28`, "310414": `records:\u5531\u7247\u6570`, "310415": `barcode:\u6761\u5F62\u7801`, "310416": `-`, "310417": `-`, "310418": `-`, "310430": `\u53D1\u884C\u5E74\u4EFD`, "310421": `\u5C01\u9762URL`, "310422": `menu:\u76EE\u5F55`, "310501": `\u8C46\u74E3ID`, "310502": `\u65E5\u8BB0\u6807\u9898`, "310503": `\u7C7B\u578B`, "310504": `\u8BC4\u5206`, "310505": `\u5C01\u9762\u8DEF\u5F84`, "310506": `\u8C46\u74E3\u7F51\u5740`, "310507": `\u7B80\u4ECB`, "310508": `\u53D1\u5E03\u8005`, "310509": `\u53D1\u5E03\u65F6\u95F4`, "310510": ``, "310511": `author:\u4F5C\u8005`, "310512": `authorUrl:\u4F5C\u8005\u7F51\u5740`, "310513": `content:\u65E5\u8BB0\u5185\u5BB9`, "310514": `-`, "310515": `-`, "310516": `-`, "310517": `-`, "310518": `-`, "310530": `\u53D1\u5E03\u5E74\u4EFD`, "310521": `\u5C01\u9762URL`, "310522": `-`, "310601": `\u8C46\u74E3ID`, "310602": `\u6E38\u620F\u540D\u79F0`, "310603": `\u7C7B\u578B`, "310604": `\u8BC4\u5206`, "310605": `\u5C01\u9762\u8DEF\u5F84`, "310606": `\u8C46\u74E3\u7F51\u5740`, "310607": `\u7B80\u4ECB`, "310608": `\u53D1\u884C\u5546`, "310609": `\u53D1\u884C\u65E5\u671F`, "310610": `\u7C7B\u578B`, "310611": `aliases:\u522B\u540D`, "310612": `developer:\u5F00\u53D1\u5546`, "310613": `platform:\u5E73\u53F0`, "310614": `-`, "310615": `-`, "310616": `-`, "310617": `-`, "310618": `-`, "310630": `\u53D1\u884C\u5E74\u4EFD`, "310621": `\u5C01\u9762URL`, "310622": `-`, "310701": `\u5F85\u5F00\u53D1`, "310702": `\u5F85\u5F00\u53D1`, "310703": `\u5F85\u5F00\u53D1`, "310704": `\u5F85\u5F00\u53D1`, "310705": `\u5F85\u5F00\u53D1`, "310706": `\u5F85\u5F00\u53D1`, "310707": `\u5F85\u5F00\u53D1`, "310708": `\u5F85\u5F00\u53D1`, "310709": `\u5F85\u5F00\u53D1`, "310710": `\u5F85\u5F00\u53D1`, "310711": `-`, "310712": `-`, "310713": `-`, "310714": `-`, "310715": `-`, "310716": `-`, "310717": `-`, "310718": `-`, "310730": `-`, "310721": `-`, "310722": `-`, "320101": `\u6269\u5C551`, "320102": `\u6269\u5C552`, "320103": `\u6269\u5C553`, "320104": `\u6269\u5C554`, "320105": `\u6269\u5C555`, "320106": `\u6269\u5C556`, "320107": `\u6269\u5C557`, "320108": `\u6269\u5C558`, "320109": `\u6269\u5C559`, "320110": `\u6269\u5C5510`, "320111": `\u6269\u5C5511`, "330101": `\u4ECA\u65E5\u65E5\u671F`, "330102": `\u5F53\u524D\u65F6\u95F4`, "500000": `\u672A\u77E5`, "500101": `\u672A\u505A`, "500102": `\u60F3\u505A`, "500103": `\u6B63\u5728\u505A`, "500104": `\u505A\u5B8C`, "500201": `\u672A\u770B`, "500202": `\u60F3\u770B`, "500203": `\u5728\u770B`, "500204": `\u770B\u8FC7`, "500301": `\u672A\u8BFB`, "500302": `\u60F3\u8BFB`, "500303": `\u5728\u8BFB`, "500304": `\u8BFB\u8FC7`, "500401": `\u672A\u542C`, "500402": `\u60F3\u542C`, "500403": `\u5728\u542C`, "500404": `\u542C\u8FC7`, "500501": `\u672A\u770B`, "500502": `\u60F3\u770B`, "500503": `\u5728\u770B`, "500504": `\u770B\u8FC7`, "500601": `\u672A\u73A9`, "500602": `\u60F3\u73A9`, "500603": `\u5728\u73A9`, "500604": `\u73A9\u8FC7`, "500701": `\u672A\u770B`, "500702": `\u60F3\u770B`, "500703": `\u5728\u770B`, "500704": `\u770B\u8FC7`, "500004": `\u6240\u6709`, "500110": `\u5F00\u542F\u540E\uFF0C\u540C\u6B65\u65F6\u82E5\u9047\u5230\u540C\u8DEF\u5F84\u4E0B\u7684\u540C\u540D\u6587\u6863\u5219\u4F1A\u8986\u76D6`, "160225": `\u4EE5\u4E0B\u53C2\u6570\u767B\u5F55\u540E\u65B9\u53EF\u5728\u6A21\u677F\u4E2D\u4F7F\u7528, \u4F7F\u7528\u65F6\u8BF7\u7528'{{}}'\u5305\u88F9, \u4E3E\u4F8B: \u53C2\u6570myTags, \u5219\u4F7F\u7528\u65F6\u4E3A{{myTags}}`, "160226": `\u6211\u6807\u8BB0\u7684\u6807\u7B7E`, "160227": `\u6211\u7684\u8BC4\u5206(1-5)`, "160231": `\u6211\u7684\u8BC4\u5206(\u2B50)`, "160228": `\u6211\u7684\u9605\u8BFB/\u6B23\u8D4F/\u542C/\u73A9\u7684\u72B6\u6001`, "160229": `\u6211\u7684\u8BC4\u8BBA`, "160230": `\u6211\u7684\u8BC4\u8BBA/\u6807\u8BB0\u7684\u65E5\u671F`, "500001": `\u540C\u6B65\u8BBE\u7F6E`, "504102": `\u6211\u7684\u4E66\u7C4D`, "504103": `\u6211\u7684\u7535\u5F71`, "504107": `\u6211\u7684\u7535\u89C6\u5267`, "504104": `\u6211\u7684\u5E7F\u64AD`, "504105": `\u6211\u7684\u65E5\u8BB0`, "504106": `\u6211\u7684\u97F3\u4E50`, "504108": `\u6211\u7684\u6E38\u620F`, "ALL": `\u5168\u90E8\u7C7B\u578B`, "MOVIE": `\u7535\u5F71`, "BOOK": `\u4E66\u7C4D`, "MUSIC": `\u97F3\u4E50`, "NOTE": `\u7B14\u8BB0`, "GAME": `\u6E38\u620F`, "TELEPLAY": `\u7535\u89C6\u5267`, "THEATER": `\u620F\u5267`, "MOVIE_AND_TELEPLAY": `\u5F71\u89C6\u5267`, "all": `\u5168\u90E8\u7C7B\u578B`, "movie": `\u7535\u5F71`, "book": `\u4E66\u7C4D`, "music": `\u97F3\u4E50`, "note": `\u7B14\u8BB0`, "game": `\u6E38\u620F`, "teleplay": `\u7535\u89C6\u5267`, "theater": `\u620F\u5267`, "movie_and_teleplay": `\u5F71\u89C6\u5267`, "DAY": `\u5929`, "HOUR": `\u65F6`, "MINUTE": `\u5206`, "SECOND": `\u79D2`, "theaterTemplateName": `\u821E\u53F0\u5267\u6A21\u677F`, "theaterTemplateDesc": `\u521B\u5EFA\u821E\u53F0\u5267\u7B14\u8BB0\u65F6\u4F7F\u7528\u7684\u6A21\u677F`, "showAfterCreateName": `\u521B\u5EFA\u540E\u6253\u5F00\u7B14\u8BB0`, "showAfterCreateDesc": `\u81EA\u52A8\u6253\u5F00\u65B0\u521B\u5EFA\u7684\u7B14\u8BB0\uFF1B\u5173\u95ED\u540E\u53EF\u5728\u540E\u53F0\u8FDE\u7EED\u5BFC\u5165\u3002`, "imageNameDesc": `\u5E26\u6269\u5C55\u540D\u3001\u4E0D\u542B\u76EE\u5F55\u7684\u672C\u5730\u56FE\u7247\u6587\u4EF6\u540D`, "popularCommentsDesc": `\u56FE\u4E66\u70ED\u95E8\u77ED\u8BC4\uFF0C\u6700\u591A\u4E94\u6761\uFF08\u6570\u7EC4\uFF09`, "batchImportCommand": `\u6309\u8C46\u74E3 URL \u6279\u91CF\u5BFC\u5165`, "batchImportTitle": `\u6279\u91CF\u5BFC\u5165\u8C46\u74E3\u6761\u76EE`, "batchImportDesc": `\u6BCF\u884C\u8F93\u5165\u4E00\u4E2A\u8C46\u74E3\u6761\u76EE URL\uFF1B\u65E0\u6548\u6216\u5931\u8D25\u7684\u6761\u76EE\u4F1A\u8DF3\u8FC7\u5E76\u7EE7\u7EED\u3002`, "batchImportProgress": `\u6B63\u5728\u5BFC\u5165 {0}/{1}`, "batchImportSummary": `\u6279\u91CF\u5BFC\u5165\u5B8C\u6210\uFF1A\u6210\u529F {0} \u6761\uFF0C\u5931\u8D25 {1} \u6761\u3002 {2}` }; // src/org/wanxp/lang/helper.ts var import_obsidian = __toModule(require("obsidian")); var localeMap = { en: en_default, zh: zh_cn_default }; var I18nHelper = class { getMessage(str, ...params) { const lang = this.getCurrentLanguage(); const locale = localeMap[lang]; if (!locale) { console.error("Error: obsidian douban locale not found", lang); } let val2 = locale && locale[str] || en_default[str]; if (params) { for (let i = 0; i < params.length; i++) { val2 = this.replaceAll(i, val2, params[i]); } } return val2; } getCurrentLanguage() { var _a5; let language = ""; try { language = typeof import_obsidian.getLanguage === "function" ? (0, import_obsidian.getLanguage)() : ""; } catch (_error) { } if (!language && typeof window !== "undefined") { language = ((_a5 = window.localStorage) == null ? void 0 : _a5.getItem("language")) || ""; } language = language.toLowerCase(); return language === "zh-cn" || language === "zh-hans" || language.startsWith("zh") ? "zh" : "en"; } replaceAll(index2, message, replace) { const placeholderRegex = new RegExp(`\\{${index2}:([^}]+)\\}`); const match = message.match(placeholderRegex); if (!match) { return message.replaceAll(`{${index2}}`, replace); } const defaultValue = match ? match[1] : ""; const replacement = replace === void 0 || replace === null ? defaultValue : replace; return message.replace(placeholderRegex, replacement); } }; var i18nHelper = new I18nHelper(); // src/org/wanxp/utils/StringUtil.ts var StringUtil = class { static isBlank(str) { return str == null || str.trim().length == 0; } static defaultIfBlank(str, defaultStr) { return StringUtil.isBlank(str) ? defaultStr : str; } static analyzeIdByUrl(url) { let idPattern = /(\d){5,10}/g; let idE = idPattern.exec(url); let id = idE ? idE[0] : ""; return id; } static parseHeaders(text3) { let headers = {}; if (text3) { if (text3.indexOf("GET") == 0 || text3.indexOf("POST") == 0) { text3 = text3.substring(text3.indexOf("\n") + 1); } let lines = text3.split("\n"); for (let line of lines) { let index2 = line.indexOf(":"); if (index2 > 0) { let key = line.substring(0, index2); let value = line.substring(index2 + 1).trim(); headers[key] = value; } } } return headers; } static confuse(text3) { if (!text3) { return; } let texts = Array.from(text3); const length = texts.length; const newTexts = []; for (let i = 0; i < length; i++) { let val2 = text3[i]; if (i >= length / 3 && i <= length * 2 / 3) { val2 = "*"; } newTexts[i] = val2; } return newTexts.join(""); } static escape(text3) { if (!text3) { return text3; } let newText = text3; EscapeMap.forEach((value, key) => { newText = newText.replace(key, value); }); return newText; } static handleArray(arr, arraySetting) { let content = ""; const elementStart = StringUtil.escape(arraySetting.arrayElementStart); const elementEnd = StringUtil.escape(arraySetting.arrayElementEnd); const spilt = StringUtil.escape(arraySetting.arraySpiltV2); const start = StringUtil.escape(arraySetting.arrayStart); const end2 = StringUtil.escape(arraySetting.arrayEnd); for (let i = 0; i < arr.length; i++) { let el = arr[i]; if (!el) { continue; } if (i == arr.length - 1) { content += elementStart + el + elementEnd; } else { content += elementStart + el + elementEnd + spilt; } } content = start + content + end2; return content; } static notJsonString(str) { try { JSON.parse(str); return false; } catch (error) { return true; } } }; var EscapeMap = new Map([ [/\\n/g, "\n"], [/\\t/g, " "], [/\\r/g, "\r"], [/\\f/g, "\f"], [/\\b/g, "\b"], [/\\'/g, "'"], [/\\"/g, '"'], [/\\\\/g, "\\"] ]); // src/org/wanxp/utils/model/DataField.ts var DataField = class { constructor(name, type, origin, value) { this._name = name; this._type = type; this._origin = origin; this._value = value; } get name() { return this._name; } get type() { return this._type; } get origin() { return this._origin; } get value() { return this._value; } }; // src/org/wanxp/constant/Constsant.ts var BasicConst = { YAML_FRONT_MATTER_SYMBOL: "---", CLEAN_STATUS_BAR_DELAY: 5e3, CALL_DOUBAN_DELAY: 4e3, CALL_DOUBAN_DELAY_RANGE: 4e3, SLOW_SIZE: 200, CALL_DOUBAN_DELAY_SLOW: 1e4, CALL_DOUBAN_DELAY_RANGE_SLOW: 5e3 }; var ESTIMATE_TIME_PER = 2e3; var ESTIMATE_TIME_PER_WITH_REQUEST_SLOW = ESTIMATE_TIME_PER + BasicConst.CALL_DOUBAN_DELAY_SLOW + BasicConst.CALL_DOUBAN_DELAY_RANGE_SLOW / 2; var ESTIMATE_TIME_PER_WITH_REQUEST = ESTIMATE_TIME_PER + BasicConst.CALL_DOUBAN_DELAY + BasicConst.CALL_DOUBAN_DELAY_RANGE / 2; var TemplateTextMode; (function(TemplateTextMode4) { TemplateTextMode4[TemplateTextMode4["NORMAL"] = 0] = "NORMAL"; TemplateTextMode4[TemplateTextMode4["YAML"] = 1] = "YAML"; })(TemplateTextMode || (TemplateTextMode = {})); var SearchHandleMode; (function(SearchHandleMode2) { SearchHandleMode2[SearchHandleMode2["FOR_REPLACE"] = 0] = "FOR_REPLACE"; SearchHandleMode2[SearchHandleMode2["FOR_CREATE"] = 1] = "FOR_CREATE"; })(SearchHandleMode || (SearchHandleMode = {})); var PersonNameMode; (function(PersonNameMode2) { PersonNameMode2["CH_NAME"] = "CH"; PersonNameMode2["EN_NAME"] = "EN"; PersonNameMode2["CH_EN_NAME"] = "CH_EN"; })(PersonNameMode || (PersonNameMode = {})); var TemplateKey; (function(TemplateKey5) { TemplateKey5["movieTemplateFile"] = "movieTemplateFile"; TemplateKey5["bookTemplateFile"] = "bookTemplateFile"; TemplateKey5["musicTemplateFile"] = "musicTemplateFile"; TemplateKey5["noteTemplateFile"] = "noteTemplateFile"; TemplateKey5["gameTemplateFile"] = "gameTemplateFile"; TemplateKey5["teleplayTemplateFile"] = "teleplayTemplateFile"; TemplateKey5["theaterTemplateFile"] = "theaterTemplateFile"; })(TemplateKey || (TemplateKey = {})); var SupportType; (function(SupportType5) { SupportType5["all"] = "all"; SupportType5["movie"] = "movie"; SupportType5["book"] = "book"; SupportType5["music"] = "music"; SupportType5["note"] = "note"; SupportType5["game"] = "game"; SupportType5["teleplay"] = "teleplay"; SupportType5["theater"] = "theater"; })(SupportType || (SupportType = {})); var SupportTypeMap = { "all": SupportType.all, "movie": SupportType.movie, "book": SupportType.book, "music": SupportType.music, "note": SupportType.note, "game": SupportType.game, "teleplay": SupportType.teleplay, "theater": SupportType.theater, "ALL": SupportType.all, "MOVIE": SupportType.movie, "BOOK": SupportType.book, "MUSIC": SupportType.music, "NOTE": SupportType.note, "GAME": SupportType.game, "TELEPLAY": SupportType.teleplay, "THEATER": SupportType.theater }; var PropertyName; (function(PropertyName4) { PropertyName4["id"] = "id"; PropertyName4["title"] = "title"; PropertyName4["type"] = "type"; PropertyName4["score"] = "score"; PropertyName4["image"] = "image"; PropertyName4["imageUrl"] = "imageUrl"; PropertyName4["url"] = "url"; PropertyName4["desc"] = "desc"; PropertyName4["publisher"] = "publisher"; PropertyName4["datePublished"] = "datePublished"; PropertyName4["genre"] = "genre"; PropertyName4["tags"] = "tags"; PropertyName4["rate"] = "rate"; PropertyName4["state"] = "state"; PropertyName4["collectionDate"] = "collectionDate"; PropertyName4["comment"] = "comment"; PropertyName4["author"] = "author"; PropertyName4["translator"] = "translator"; PropertyName4["isbn"] = "isbn"; PropertyName4["originalTitle"] = "originalTitle"; PropertyName4["subTitle"] = "subTitle"; PropertyName4["totalPage"] = "totalPage"; PropertyName4["series"] = "series"; PropertyName4["menu"] = "menu"; PropertyName4["price"] = "price"; PropertyName4["binding"] = "binding"; PropertyName4["producer"] = "producer"; PropertyName4["director"] = "director"; PropertyName4["actor"] = "actor"; PropertyName4["aggregateRating"] = "aggregateRating"; PropertyName4["aliases"] = "aliases"; PropertyName4["country"] = "country"; PropertyName4["language"] = "language"; PropertyName4["time"] = "time"; PropertyName4["IMDb"] = "IMDb"; PropertyName4["albumType"] = "albumType"; PropertyName4["medium"] = "medium"; PropertyName4["records"] = "records"; PropertyName4["barcode"] = "barcode"; PropertyName4["platform"] = "platform"; PropertyName4["developer"] = "developer"; PropertyName4["episode"] = "episode"; PropertyName4["authorUrl"] = "authorUrl"; PropertyName4["content"] = "content"; })(PropertyName || (PropertyName = {})); function dynamicI18nRecord(entries) { const result = {}; Object.entries(entries).forEach(([key, messageKey]) => { Object.defineProperty(result, key, { enumerable: true, get: () => i18nHelper.getMessage(messageKey) }); }); return result; } function dynamicSubjectTitle(subject, messageKey) { Object.defineProperty(subject, "title", { enumerable: true, get: () => i18nHelper.getMessage(messageKey) }); return subject; } var SearchTypeRecords = dynamicI18nRecord({ [SupportType.all]: "ALL", [SupportType.movie]: "MOVIE_AND_TELEPLAY", [SupportType.book]: "BOOK", [SupportType.music]: "MUSIC", [SupportType.note]: "NOTE", [SupportType.game]: "GAME", [SupportType.theater]: "THEATER" }); var PersonNameModeRecords = dynamicI18nRecord({ [PersonNameMode.CH_NAME]: "121206", [PersonNameMode.EN_NAME]: "121207", [PersonNameMode.CH_EN_NAME]: "121208" }); var SyncType; (function(SyncType4) { SyncType4["movie"] = "movie"; SyncType4["book"] = "book"; SyncType4["game"] = "game"; SyncType4["broadcast"] = "broadcast"; SyncType4["note"] = "note"; SyncType4["music"] = "music"; SyncType4["teleplay"] = "teleplay"; })(SyncType || (SyncType = {})); var SyncTypeUrlDomain = new Map([ [SyncType.movie, "movie"], [SyncType.book, "book"], [SyncType.broadcast, "broadcast"], [SyncType.note, "note"], [SyncType.music, "music"], [SyncType.teleplay, "movie"], [SyncType.game, "games"] ]); var SyncTypeRecords = dynamicI18nRecord({ [SyncType.movie]: "504103", [SyncType.teleplay]: "504107", [SyncType.book]: "504102", [SyncType.music]: "504106", [SyncType.game]: "504108" }); var PAGE_SIZE = 30; var Action; (function(Action2) { Action2["SearchAndReplace"] = "SearchAndReplace"; Action2["SearchAndCrate"] = "SearchAndCrate"; Action2["Sync"] = "Sync"; Action2["SearchEditorAndReplace"] = "SearchEditorAndReplace"; })(Action || (Action = {})); var SyncItemStatus; (function(SyncItemStatus2) { SyncItemStatus2["exists"] = "exists"; SyncItemStatus2["replace"] = "replace"; SyncItemStatus2["create"] = "create"; SyncItemStatus2["fail"] = "fail"; SyncItemStatus2["failByDiffType"] = "failByDiffType"; SyncItemStatus2["unHandle"] = "unHandle"; })(SyncItemStatus || (SyncItemStatus = {})); var NavigateType; (function(NavigateType2) { NavigateType2["previous"] = "previous"; NavigateType2["next"] = "next"; NavigateType2["nextNeedLogin"] = "nextNeedLogin"; })(NavigateType || (NavigateType = {})); var DoubanSearchResultSubjectPreviousPage = dynamicSubjectTitle({ cast: "", datePublished: void 0, desc: "", genre: [], id: "", image: "", imageUrl: "", publisher: "", score: 0, title: "", type: "navigate", url: NavigateType.previous }, "150102"); var DoubanSearchGroupPublishResultSubjectPreviousPage = dynamicSubjectTitle({ cast: "", datePublished: void 0, desc: "", genre: [], id: "", image: "", imageUrl: "", publisher: "", score: 0, title: "", type: "navigate", url: NavigateType.previous }, "150106"); var DoubanSearchGroupPublishResultSubjectNextPage = dynamicSubjectTitle({ cast: "", datePublished: void 0, desc: "", genre: [], id: "", image: "", imageUrl: "", publisher: "", score: 0, title: "", type: "navigate", url: NavigateType.next }, "150105"); var DoubanSearchResultSubjectNextPage = dynamicSubjectTitle({ cast: "", datePublished: void 0, desc: "", genre: [], id: "", image: "", imageUrl: "", publisher: "", score: 0, title: "", type: "navigate", url: NavigateType.next }, "150103"); var DoubanSearchResultSubjectNextPageNeedLogin = dynamicSubjectTitle({ cast: "", datePublished: void 0, desc: "", genre: [], id: "", image: "", imageUrl: "", publisher: "", score: 0, title: "", type: "navigate", url: NavigateType.nextNeedLogin }, "150104"); var SEARCH_ITEM_PAGE_SIZE = 20; var DEFAULT_DOUBAN_HEADERS = StringUtil.parseHeaders(` Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Language: zh-CN,zh;q=0.9 Cache-Control: max-age=0 Connection: keep-alive Host: www.douban.com Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: none Sec-Fetch-User: ?1 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 sec-ch-ua: "Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115" sec-ch-ua-mobile: ?0 sec-ch-ua-platform: "Windows" `); var ONLINE_SETTING_DEFAULT = { properties: [ { type: SupportType.book, name: PropertyName.comment, selectors: [ "#interest_sect_level > div > span:nth-child(7)" ] }, { type: SupportType.movie, name: PropertyName.comment, selectors: [ "#interest_sect_level > div > span:nth-child(8)", "#interest_sect_level > div > span:nth-child(7)", "#interest_sect_level > div > span:nth-child(9)" ] } ] }; var SubjectHandledStatus; (function(SubjectHandledStatus3) { SubjectHandledStatus3["init"] = "init"; SubjectHandledStatus3["saved"] = "saved"; SubjectHandledStatus3["syncTypeDiffAbort"] = "syncTypeDiffAbort"; })(SubjectHandledStatus || (SubjectHandledStatus = {})); var DEFAULT_SETTINGS_ARRAY_INPUT_SIZE = 2; var DataValueType; (function(DataValueType2) { DataValueType2[DataValueType2["date"] = 0] = "date"; DataValueType2[DataValueType2["number"] = 1] = "number"; DataValueType2[DataValueType2["string"] = 2] = "string"; DataValueType2[DataValueType2["person"] = 3] = "person"; DataValueType2[DataValueType2["array"] = 4] = "array"; DataValueType2[DataValueType2["url"] = 5] = "url"; DataValueType2[DataValueType2["path"] = 6] = "path"; })(DataValueType || (DataValueType = {})); var DataTargetType; (function(DataTargetType2) { DataTargetType2[DataTargetType2["fileName"] = 0] = "fileName"; DataTargetType2[DataTargetType2["yaml"] = 1] = "yaml"; DataTargetType2[DataTargetType2["content"] = 2] = "content"; })(DataTargetType || (DataTargetType = {})); var EXAMPLE_RATE = 8.5; var EXAMPLE_RATE_MAX = 10; var EXAMPLE_SUBJECT_MAP = new Map([ ["id", new DataField("id", 2, 2, "2253379")], ["title", new DataField("title", 2, 2, "\u7B80\u7231")], ["type", new DataField("type", 2, 2, "book")], ["score", new DataField("score", 1, 1, EXAMPLE_RATE)], ["image", new DataField("image", 5, 5, "https://img9.doubanio.com/view/subject/s/public/s1070959.jpg")], ["imageUrl", new DataField("imageUrl", 5, 5, "https://img9.doubanio.com/view/subject/s/public/s1070959.jpg")], ["url", new DataField("url", 5, 5, "https://book.douban.com/subject/2253379/")], ["desc", new DataField("desc", 2, 2, "\u7B80\u7231\u662F\u4E00\u90E8\u5173\u4E8E\u7231\u3001\u5173\u4E8E\u6210\u957F\u3001\u5173\u4E8E\u8FFD\u6C42\u81EA\u7531\u4E0E\u5C0A\u4E25\u7684\u4F1F\u5927\u5C0F\u8BF4\u3002")], ["publisher", new DataField("publisher", 2, 2, "\u4EBA\u6C11\u6587\u5B66\u51FA\u7248\u793E")], ["datePublished", new DataField("datePublished", 0, 0, "2020-1-1")], ["genre", new DataField("genre", 4, 4, "\u5C0F\u8BF4")], ["tags", new DataField("tags", 4, 4, "\u5C0F\u8BF4")], ["rate", new DataField("rate", 1, 1, 9)], ["state", new DataField("state", 2, 2, "wish")], ["collectionDate", new DataField("collectionDate", 0, 0, "2020-1-1")], ["comment", new DataField("comment", 2, 2, "\u7B80\u7231\u662F\u4E00\u90E8\u5173\u4E8E\u7231\u3001\u5173\u4E8E\u6210\u957F\u3001\u5173\u4E8E\u8FFD\u6C42\u81EA\u7531\u4E0E\u5C0A\u4E25\u7684\u4F1F\u5927\u5C0F\u8BF4\u3002")], ["author", new DataField("author", 3, 3, "\u590F\u6D1B\u8482\xB7\u52C3\u6717\u7279")], ["translator", new DataField("translator", 3, 3, "\u674E\u7EE7\u5B8F")] ]); var MAX_STAR_NUMBER = 100; var PictureBedType; (function(PictureBedType2) { PictureBedType2["PicGo"] = "PicGo"; })(PictureBedType || (PictureBedType = {})); var PictureBedSetting_PicGo = { url: "http://127.0.0.1:36677/upload" }; var PictureBedTypeRecords = { [PictureBedType.PicGo]: PictureBedType.PicGo }; var SyncConditionType; (function(SyncConditionType2) { SyncConditionType2["ALL"] = "all"; SyncConditionType2["LAST_THIRTY"] = "lastThirty"; SyncConditionType2["CUSTOM_TIME"] = "customTime"; SyncConditionType2["CUSTOM_ITEM"] = "customItem"; })(SyncConditionType || (SyncConditionType = {})); var SyncConditionTypeRecords = dynamicI18nRecord({ [SyncConditionType.ALL]: "110071", [SyncConditionType.LAST_THIRTY]: "110075", [SyncConditionType.CUSTOM_ITEM]: "110076", [SyncConditionType.CUSTOM_TIME]: "110074" }); var DoubanSearchResultSubject_EMPTY = dynamicSubjectTitle({ id: "", title: "", score: null, cast: "", type: "navigate", desc: "-", url: "https://www.douban.com", image: "", imageUrl: "", publisher: "", datePublished: void 0, genre: [] }, "150107"); var DoubanSearchResultSubject_TIP_EMPTY = dynamicSubjectTitle({ id: "", title: "", score: null, cast: "", type: "navigate", desc: "-", url: "https://www.douban.com", image: "", imageUrl: "", publisher: "", datePublished: void 0, genre: [] }, "150108"); // src/org/wanxp/main.ts var import_obsidian39 = __toModule(require("obsidian")); // src/org/wanxp/constant/DefaultSettings.ts var DEFAULT_SETTINGS = { pictureBedFlag: false, pictureBedSetting: PictureBedSetting_PicGo, pictureBedType: PictureBedType.PicGo, arraySettings: [ { "arrayName": "ArrayType1", "arrayStart": "", "arrayElementStart": "[[", "arraySpiltV2": ",", "arrayElementEnd": "]]", "arrayEnd": "", "index": 1 } ], onlineSettingsFileName: "obsidian_douban_plugin_online_settings.json", onlineSettingsGistId: "35693f9ece9bd6abba98f94e81afde19", movieTemplateFile: ``, bookTemplateFile: ``, musicTemplateFile: ``, noteTemplateFile: ``, gameTemplateFile: ``, teleplayTemplateFile: ``, theaterTemplateFile: ``, searchUrl: "https://www.douban.com/search?q=", dateFormat: "yyyy-MM-DD", timeFormat: "HH:mm:ss", arrayStart: "", arrayElementStart: "\\n - ", arraySpiltV2: "", arrayElementEnd: "", arrayEnd: "", personNameMode: PersonNameMode.CH_NAME, dataFilePath: "", dataFileNamePath: "/{{type}}/{{title}}", statusBar: true, debugMode: false, customProperties: [ { name: "myType", value: "movie", field: SupportType.movie }, { name: "myType", value: "book", field: SupportType.book }, { name: "myType", value: "music", field: SupportType.music }, { name: "myType", value: "note", field: SupportType.note }, { name: "myType", value: "game", field: SupportType.game }, { name: "myType", value: "teleplay", field: SupportType.teleplay }, { name: "myType", value: "theater", field: SupportType.theater } ], loginCookiesContent: "", loginHeadersContent: "", cacheImage: true, cacheHighQuantityImage: true, showAfterCreate: true, attachmentPath: "assets", attachmentFileName: "{{title}}", syncHandledDataArray: [], scoreSetting: { starFull: "\u2B50", starEmpty: "\u2606", displayStarEmpty: false, maxStar: 5 }, searchDefaultType: SupportType.all, arrayLengthLimits: [] }; // src/org/wanxp/douban/data/search/DoubanSearchFuzzySuggestModal.ts var import_obsidian7 = __toModule(require("obsidian")); // src/org/wanxp/utils/Logutil.ts var import_obsidian2 = __toModule(require("obsidian")); var Logger = class { error(msg, e) { new import_obsidian2.Notice(msg); console.log(`OB-Douban: ${msg}`); console.error(e); return e; } notice(e) { new import_obsidian2.Notice(e); console.error(`OB-Douban: ${e}`); return e; } warn(e) { new import_obsidian2.Notice(e); console.warn(`OB-Douban: ${e}`); return e; } info(e) { console.log(`OB-Douban:${typeof e == "string" ? e : JSON.stringify(e)}`); return e; } debug(e) { if (!e) { return e; } if (e instanceof Error) { console.error(e); } else { try { let showMessage = typeof e == "string" ? e : e.toString(); console.log(`OB-Douban:${(0, import_obsidian2.moment)(new Date()).format("YYYY-MM-DD HH:mm:SS")}: ${showMessage}`); } catch (e2) { console.log(`OB-Douban:${(0, import_obsidian2.moment)(new Date()).format("YYYY-MM-DD HH:mm:SS")}:` + e2.toString()); } } return e; } trace(e) { console.log(`OB-Douban:${typeof e == "string" ? e : JSON.stringify(e)}`); return e; } traceN(notion, e) { console.log(`${notion} ${typeof e == "string" ? e : JSON.stringify(e)}`); return e; } }; var log = new Logger(); // src/org/wanxp/utils/HttpUtil.ts var import_obsidian5 = __toModule(require("obsidian")); // src/org/wanxp/utils/model/HttpResponse.ts var import_obsidian3 = __toModule(require("obsidian")); var HttpResponse = class { constructor(status, headers, text3) { this._status = status; this._headers = headers; this._text = text3; } get status() { return this._status; } get headers() { return this._headers; } get text() { return this._text; } get textString() { if (this.text instanceof ArrayBuffer) { return new TextDecoder().decode(this.text); } if (typeof this.text === "string") { return this.text; } return ""; } get textArrayBuffer() { if (import_obsidian3.Platform.isDesktopApp) { if (this.text instanceof Buffer) { return this.text; } } if (this.text instanceof ArrayBuffer) { return this.text; } if (typeof this.text === "string") { return new TextEncoder().encode(this.text); } return new ArrayBuffer(0); } get textBlob() { return new Blob([this.textArrayBuffer]); } get textJson() { return JSON.parse(this.textString); } }; // src/org/wanxp/utils/desktop/DesktopHttpUtil.ts var https = null; var http = null; var DesktopHttpUtil = class { static request(_0, _1, _2) { return __async(this, arguments, function* (url, headers, settingsManager, options = {}) { return this.requestWithRetry(url, headers, settingsManager, options, false); }); } static requestBuffer(_0, _1, _2) { return __async(this, arguments, function* (url, headers, settingsManager, options = {}) { return this.requestWithRetry(url, headers, settingsManager, options, true); }); } static requestWithRetry(url, headers, settingsManager, options, asBuffer) { return __async(this, null, function* () { const headersInner = {}; Object.entries(headers || {}).forEach(([key, value]) => { const lowerKey = key.toLowerCase(); if (value != null && value !== "" && lowerKey !== "accept-encoding" && lowerKey !== "host" && lowerKey !== "content-length") { headersInner[key] = String(value); } }); const _a5 = options || {}, { timeoutMs = this.DEFAULT_TIMEOUT_MS, retryCount } = _a5, nativeOptions = __objRest(_a5, [ "timeoutMs", "retryCount" ]); const method = String(nativeOptions.method || "GET").toUpperCase(); const retries = retryCount == null ? method === "GET" || method === "HEAD" ? this.DEFAULT_RETRY_COUNT : 0 : Math.max(0, retryCount); const requestOptions = __spreadValues({ headers: headersInner }, nativeOptions); let lastError; for (let attempt = 0; attempt <= retries; attempt++) { try { return yield this.requestOnce(url, requestOptions, timeoutMs, settingsManager, attempt, asBuffer); } catch (error) { lastError = error instanceof Error ? error : new Error(String(error)); settingsManager == null ? void 0 : settingsManager.debug(`Obsidian-Douban:\u8BF7\u6C42\u5931\u8D25 ${attempt + 1}/${retries + 1}: ${lastError.message}`); } } throw lastError; }); } static requestOnce(url, options, timeoutMs, settingsManager, attempt, asBuffer) { settingsManager == null ? void 0 : settingsManager.debug(`Obsidian-Douban:\u4ECE\u7F51\u7EDC\u83B7\u53D6\u5F00\u59CB: url:${url} headers:${JSON.stringify(options)}`); return new Promise((resolve, reject) => { const _a5 = options, { body } = _a5, requestOptions = __objRest(_a5, ["body"]); requestOptions.method = requestOptions.method || "GET"; requestOptions.headers = __spreadValues({}, requestOptions.headers || {}); let redirectCookie = requestOptions.headers.Cookie || requestOptions.headers.cookie || ""; requestOptions.beforeRedirect = (redirectOptions, response) => { const setCookie = response.headers && response.headers["set-cookie"]; if (setCookie) { redirectCookie = this.mergeCookies(redirectCookie, Array.isArray(setCookie) ? setCookie : [setCookie]); } if (redirectCookie) { redirectOptions.headers.Cookie = redirectCookie; delete redirectOptions.headers.cookie; } }; if (body && !requestOptions.headers["Content-Length"] && !requestOptions.headers["content-length"]) { requestOptions.headers["Content-Length"] = Buffer.byteLength(body); } let settled = false; const finishReject = (error) => { if (!settled) { settled = true; reject(error); } }; try { const request2 = this.getHttpClient(url).request(url, requestOptions, (response) => { const chunks = []; let size = 0; settingsManager == null ? void 0 : settingsManager.debug(`Obsidian-Douban:\u4ECE\u7F51\u7EDC\u83B7\u53D6\u54CD\u5E94${attempt}:url: ${url}`); response.on("data", (chunk) => { chunks.push(Buffer.from(chunk)); size += chunk.length; }); response.on("aborted", () => finishReject(new Error(`Response aborted for ${url}`))); response.on("error", finishReject); response.on("end", () => { if (settled) { return; } settled = true; const data2 = Buffer.concat(chunks, size); resolve(new HttpResponse(response.statusCode, response.headers, asBuffer ? data2 : data2.toString())); }); }); request2.on("error", finishReject); request2.setTimeout(Math.max(1, timeoutMs), () => { request2.destroy(new Error(`Request timed out after ${timeoutMs}ms: ${url}`)); }); if (body) { request2.write(body); } request2.end(); } catch (error) { finishReject(error instanceof Error ? error : new Error(String(error))); } }); } static mergeCookies(existingCookie, setCookies) { const cookies = new Map(); const addCookie = (cookie) => { const pair = cookie.split(";", 1)[0].trim(); const separator = pair.indexOf("="); if (separator > 0) { cookies.set(pair.substring(0, separator).trim(), pair.substring(separator + 1).trim()); } }; existingCookie.split(";").forEach(addCookie); setCookies.forEach(addCookie); return Array.from(cookies.entries()).map(([name, value]) => `${name}=${value}`).join("; "); } static getHttpClient(url) { if (url && url.startsWith("https")) { if (!https) { https = require_follow_redirects().https; } return https; } if (!http) { http = require_follow_redirects().http; } return http; } }; DesktopHttpUtil.DEFAULT_TIMEOUT_MS = 3e4; DesktopHttpUtil.DEFAULT_RETRY_COUNT = 2; // src/org/wanxp/utils/mobile/MobileHttpUtil.ts var import_obsidian4 = __toModule(require("obsidian")); var MobileHttpUtil = class { static httpRequestGet(url, headers, settingsManager) { return this.request(url, headers, settingsManager, { method: "GET" }); } static request(url, headers, settingsManager, options = {}) { return this.requestInner(url, headers, options, 0, settingsManager); } static requestInner(url, headers, options, times, settingsManager) { return __async(this, null, function* () { const requestHeaders = {}; Object.entries(headers || {}).forEach(([key, value]) => { const lowerKey = key.toLowerCase(); if (value != null && value !== "" && lowerKey !== "host" && lowerKey !== "content-length") { requestHeaders[key] = String(value); } }); const requestUrlParam = { url, method: options.method || "GET", headers: requestHeaders, body: options.body, throw: false }; return yield (0, import_obsidian4.requestUrl)(requestUrlParam).then((response) => { if (response && response.text.indexOf("https://sec.douban.com/a") > 0) { log.notice(i18nHelper.getMessage("130105")); settingsManager == null ? void 0 : settingsManager.debug(`Obsidian-Douban:\u83B7\u53D6\u5F02\u5E38\u7F51\u9875\u5982\u4E0B: ${response}`); } if ([301, 302, 303, 307, 308].includes(response.status)) { if (times >= 5) { throw new Error("\u91CD\u5B9A\u5411\u6B21\u6570\u8FC7\u591A"); } const location = response.headers["location"]; settingsManager == null ? void 0 : settingsManager.debug(`Obsidian-Douban:\u83B7\u53D6\u91CD\u5B9A\u5411\u5730\u5740\u5982\u4E0B: ${location}`); if (!location) { throw new Error("\u91CD\u5B9A\u5730\u5740\u9519\u8BEF"); } const redirectUrl = new URL(location, url).toString(); const redirectHeaders = this.mergeResponseCookies(headers, response.headers); const redirectOptions = __spreadValues({}, options); if ([301, 302, 303].includes(response.status)) { redirectOptions.method = "GET"; delete redirectOptions.body; } return this.requestInner(redirectUrl, redirectHeaders, redirectOptions, times + 1, settingsManager); } settingsManager == null ? void 0 : settingsManager.debug(`Obsidian-Douban:\u83B7\u53D6\u7F51\u9875\u5982\u4E0B: ${response}`); return response; }).catch((e) => { if (e.toString().indexOf("403") > 0) { throw log.error(i18nHelper.getMessage("130105"), e); } throw log.error(i18nHelper.getMessage("130101").replace("{0}", e.toString()), e); }); }); } static mergeResponseCookies(headers, responseHeaders) { const result = __spreadValues({}, headers || {}); const currentCookieKey = Object.keys(result).find((key) => key.toLowerCase() === "cookie"); const currentCookie = currentCookieKey ? result[currentCookieKey] : ""; const setCookieKey = Object.keys(responseHeaders || {}).find((key) => key.toLowerCase() === "set-cookie"); const setCookie = setCookieKey ? responseHeaders[setCookieKey] : ""; if (!setCookie) { return result; } const cookies = new Map(); const addCookie = (cookie) => { const pair = cookie.split(";", 1)[0].trim(); const separator = pair.indexOf("="); if (separator > 0) { cookies.set(pair.substring(0, separator).trim(), pair.substring(separator + 1).trim()); } }; String(currentCookie).split(";").forEach(addCookie); addCookie(setCookie); if (currentCookieKey && currentCookieKey !== "Cookie") { delete result[currentCookieKey]; } result.Cookie = Array.from(cookies.entries()).map(([name, value]) => `${name}=${value}`).join("; "); return result; } }; // src/org/wanxp/utils/HttpUtil.ts var HttpUtil = class { static httpRequest(url, headers, settingsManager, options) { return __async(this, null, function* () { const _a5 = headers, { ["Accept-Encoding"]: acceptEncoding } = _a5, headersInner = __objRest(_a5, ["Accept-Encoding"]); settingsManager.debug(`Obsidian-Douban:\u4ECE\u7F51\u7EDC\u83B7\u53D6json\u5F00\u59CB: url:${url} headers:${JSON.stringify(headers)}`); if (import_obsidian5.Platform.isDesktopApp) { return DesktopHttpUtil.request(url, headers, settingsManager, options); } else { const response = yield MobileHttpUtil.request(url, headers, settingsManager, options); return new HttpResponse(response.status, response.headers, response.text); } }); } static getText(url, headers, settingsManager) { return __async(this, null, function* () { const _a5 = headers, { ["Accept-Encoding"]: acceptEncoding } = _a5, headersInner = __objRest(_a5, ["Accept-Encoding"]); settingsManager.debug(`Obsidian-Douban:\u4ECE\u7F51\u7EDC\u83B7\u53D6json\u5F00\u59CB: url:${url} headers:${JSON.stringify(headers)}`); if (import_obsidian5.Platform.isDesktopApp) { return DesktopHttpUtil.request(url, headers, settingsManager, { method: "GET" }); } else { const response = yield MobileHttpUtil.httpRequestGet(url, headers, settingsManager); return new HttpResponse(response.status, response.headers, response.text); } }); } static httpRequestBuffer(url, headers, settingsManager) { if (import_obsidian5.Platform.isDesktopApp) { return DesktopHttpUtil.requestBuffer(url, headers, settingsManager); } else { return MobileHttpUtil.httpRequestGet(url, headers, settingsManager).then((response) => { return new HttpResponse(response.status, response.headers, response.arrayBuffer); }); } } static buildImageRequestHeaders(headers = {}, referer) { const nextHeaders = {}; Object.entries(headers || {}).forEach(([key, value]) => { if (value == null || value === "") { return; } const lowerKey = key.toLowerCase(); if (lowerKey === "referer") { return; } if (this.IMAGE_REQUEST_HEADERS_TO_DROP.has(lowerKey) || lowerKey.startsWith("sec-ch-ua")) { return; } nextHeaders[key] = String(value); }); if (referer) { nextHeaders.Referer = referer; } return nextHeaders; } static parse(url) { const regex = /^(.*?):\/\/([^\/:]+)(?::(\d+))?([^?]*)$/; const matches = url.match(regex); if (matches) { const protocol = matches[1]; const host = matches[2]; const port = matches[3] || ""; const path = matches[4]; return { protocol, host, port, path }; } throw new Error("Invalid URL"); } static replaceUrlPath(url, newPath) { const regex = /^(https?:\/\/[^\/]+)(:\d+)?(\/.*)$/; const matches = url.match(regex); if (matches && matches.length === 4) { return matches[1] + (matches[2] || "") + newPath; } return url; } static extractURLFromString(str) { const urlRegex = /(?:!\[.*?\]\()?(https?:\/\/[^\s)]+)/g; const matches = str.match(urlRegex); if (matches && matches.length > 0) { return matches[0]; } return str; } static encodeUrl(keyword) { if (!keyword) { return ""; } return encodeURIComponent(keyword); } }; HttpUtil.IMAGE_REQUEST_HEADERS_TO_DROP = new Set([ "authority", "content-length", "content-type", "host", "origin", "referer", "sec-fetch-dest", "sec-fetch-mode", "sec-fetch-site", "sec-fetch-user" ]); // src/org/wanxp/douban/component/DoubanHumanCheckModel.ts var import_obsidian6 = __toModule(require("obsidian")); var DoubanHumanCheckModel = class { constructor(url) { this.url = url; const { remote } = require("electron"); const { BrowserWindow: RemoteBrowserWindow } = remote; this.modal = new RemoteBrowserWindow({ parent: remote.getCurrentWindow(), width: 960, height: 540, show: false }); this.modal.once("ready-to-show", () => { this.modal.setTitle(i18nHelper.getMessage("100102")); this.modal.show(); }); const session = this.modal.webContents.session; const filter4 = { urls: [this.url] }; session.webRequest.onSendHeaders(filter4, (details) => __async(this, null, function* () { const cookies = details.requestHeaders["Cookie"]; const cookieArr = this.parseCookies(cookies); if (cookieArr) { this.onClose(); } else { this.onReload(); } })); } parseCookies(cookies) { return cookies; } load() { return __async(this, null, function* () { try { yield this.modal.loadURL(this.url); } catch (error) { log.error(i18nHelper.getMessage("100101"), error); } }); } loadUrl(url) { return __async(this, null, function* () { try { yield this.modal.loadURL(url); } catch (error) { log.error(i18nHelper.getMessage("100101"), error); } }); } loadHtml(html3) { return __async(this, null, function* () { try { yield this.modal.loadURL(`data:text/html;charset=utf-8,${html3}`); } catch (error) { log.error(i18nHelper.getMessage("100101"), error); } }); } onClose() { this.modal.close(); new import_obsidian6.Notice(i18nHelper.getMessage("100103")); } onReload() { this.modal.reload(); } }; // node_modules/cheerio/dist/browser/static.js var static_exports = {}; __export(static_exports, { contains: () => contains, extract: () => extract, html: () => html, merge: () => merge, parseHTML: () => parseHTML, root: () => root, text: () => text, xml: () => xml }); // node_modules/domutils/lib/esm/index.js var esm_exports2 = {}; __export(esm_exports2, { DocumentPosition: () => DocumentPosition, append: () => append, appendChild: () => appendChild, compareDocumentPosition: () => compareDocumentPosition, existsOne: () => existsOne, filter: () => filter, find: () => find, findAll: () => findAll, findOne: () => findOne, findOneChild: () => findOneChild, getAttributeValue: () => getAttributeValue, getChildren: () => getChildren, getElementById: () => getElementById, getElements: () => getElements, getElementsByClassName: () => getElementsByClassName, getElementsByTagName: () => getElementsByTagName, getElementsByTagType: () => getElementsByTagType, getFeed: () => getFeed, getInnerHTML: () => getInnerHTML, getName: () => getName, getOuterHTML: () => getOuterHTML, getParent: () => getParent, getSiblings: () => getSiblings, getText: () => getText, hasAttrib: () => hasAttrib, hasChildren: () => hasChildren, innerText: () => innerText, isCDATA: () => isCDATA, isComment: () => isComment, isDocument: () => isDocument, isTag: () => isTag2, isText: () => isText, nextElementSibling: () => nextElementSibling, prepend: () => prepend, prependChild: () => prependChild, prevElementSibling: () => prevElementSibling, removeElement: () => removeElement, removeSubsets: () => removeSubsets, replaceElement: () => replaceElement, testElement: () => testElement, textContent: () => textContent, uniqueSort: () => uniqueSort }); // node_modules/domelementtype/lib/esm/index.js var esm_exports = {}; __export(esm_exports, { CDATA: () => CDATA, Comment: () => Comment, Directive: () => Directive, Doctype: () => Doctype, ElementType: () => ElementType, Root: () => Root, Script: () => Script, Style: () => Style, Tag: () => Tag, Text: () => Text, isTag: () => isTag }); var ElementType; (function(ElementType3) { ElementType3["Root"] = "root"; ElementType3["Text"] = "text"; ElementType3["Directive"] = "directive"; ElementType3["Comment"] = "comment"; ElementType3["Script"] = "script"; ElementType3["Style"] = "style"; ElementType3["Tag"] = "tag"; ElementType3["CDATA"] = "cdata"; ElementType3["Doctype"] = "doctype"; })(ElementType || (ElementType = {})); function isTag(elem) { return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style; } var Root = ElementType.Root; var Text = ElementType.Text; var Directive = ElementType.Directive; var Comment = ElementType.Comment; var Script = ElementType.Script; var Style = ElementType.Style; var Tag = ElementType.Tag; var CDATA = ElementType.CDATA; var Doctype = ElementType.Doctype; // node_modules/domhandler/lib/esm/node.js var Node = class { constructor() { this.parent = null; this.prev = null; this.next = null; this.startIndex = null; this.endIndex = null; } get parentNode() { return this.parent; } set parentNode(parent2) { this.parent = parent2; } get previousSibling() { return this.prev; } set previousSibling(prev2) { this.prev = prev2; } get nextSibling() { return this.next; } set nextSibling(next2) { this.next = next2; } cloneNode(recursive = false) { return cloneNode(this, recursive); } }; var DataNode = class extends Node { constructor(data2) { super(); this.data = data2; } get nodeValue() { return this.data; } set nodeValue(data2) { this.data = data2; } }; var Text2 = class extends DataNode { constructor() { super(...arguments); this.type = ElementType.Text; } get nodeType() { return 3; } }; var Comment2 = class extends DataNode { constructor() { super(...arguments); this.type = ElementType.Comment; } get nodeType() { return 8; } }; var ProcessingInstruction = class extends DataNode { constructor(name, data2) { super(data2); this.name = name; this.type = ElementType.Directive; } get nodeType() { return 1; } }; var NodeWithChildren = class extends Node { constructor(children2) { super(); this.children = children2; } get firstChild() { var _a5; return (_a5 = this.children[0]) !== null && _a5 !== void 0 ? _a5 : null; } get lastChild() { return this.children.length > 0 ? this.children[this.children.length - 1] : null; } get childNodes() { return this.children; } set childNodes(children2) { this.children = children2; } }; var CDATA2 = class extends NodeWithChildren { constructor() { super(...arguments); this.type = ElementType.CDATA; } get nodeType() { return 4; } }; var Document = class extends NodeWithChildren { constructor() { super(...arguments); this.type = ElementType.Root; } get nodeType() { return 9; } }; var Element = class extends NodeWithChildren { constructor(name, attribs, children2 = [], type = name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag) { super(children2); this.name = name; this.attribs = attribs; this.type = type; } get nodeType() { return 1; } get tagName() { return this.name; } set tagName(name) { this.name = name; } get attributes() { return Object.keys(this.attribs).map((name) => { var _a5, _b; return { name, value: this.attribs[name], namespace: (_a5 = this["x-attribsNamespace"]) === null || _a5 === void 0 ? void 0 : _a5[name], prefix: (_b = this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name] }; }); } }; function isTag2(node) { return isTag(node); } function isCDATA(node) { return node.type === ElementType.CDATA; } function isText(node) { return node.type === ElementType.Text; } function isComment(node) { return node.type === ElementType.Comment; } function isDirective(node) { return node.type === ElementType.Directive; } function isDocument(node) { return node.type === ElementType.Root; } function hasChildren(node) { return Object.prototype.hasOwnProperty.call(node, "children"); } function cloneNode(node, recursive = false) { let result; if (isText(node)) { result = new Text2(node.data); } else if (isComment(node)) { result = new Comment2(node.data); } else if (isTag2(node)) { const children2 = recursive ? cloneChildren(node.children) : []; const clone2 = new Element(node.name, __spreadValues({}, node.attribs), children2); children2.forEach((child) => child.parent = clone2); if (node.namespace != null) { clone2.namespace = node.namespace; } if (node["x-attribsNamespace"]) { clone2["x-attribsNamespace"] = __spreadValues({}, node["x-attribsNamespace"]); } if (node["x-attribsPrefix"]) { clone2["x-attribsPrefix"] = __spreadValues({}, node["x-attribsPrefix"]); } result = clone2; } else if (isCDATA(node)) { const children2 = recursive ? cloneChildren(node.children) : []; const clone2 = new CDATA2(children2); children2.forEach((child) => child.parent = clone2); result = clone2; } else if (isDocument(node)) { const children2 = recursive ? cloneChildren(node.children) : []; const clone2 = new Document(children2); children2.forEach((child) => child.parent = clone2); if (node["x-mode"]) { clone2["x-mode"] = node["x-mode"]; } result = clone2; } else if (isDirective(node)) { const instruction = new ProcessingInstruction(node.name, node.data); if (node["x-name"] != null) { instruction["x-name"] = node["x-name"]; instruction["x-publicId"] = node["x-publicId"]; instruction["x-systemId"] = node["x-systemId"]; } result = instruction; } else { throw new Error(`Not implemented yet: ${node.type}`); } result.startIndex = node.startIndex; result.endIndex = node.endIndex; if (node.sourceCodeLocation != null) { result.sourceCodeLocation = node.sourceCodeLocation; } return result; } function cloneChildren(childs) { const children2 = childs.map((child) => cloneNode(child, true)); for (let i = 1; i < children2.length; i++) { children2[i].prev = children2[i - 1]; children2[i - 1].next = children2[i]; } return children2; } // node_modules/domhandler/lib/esm/index.js var defaultOpts = { withStartIndices: false, withEndIndices: false, xmlMode: false }; var DomHandler = class { constructor(callback, options, elementCB) { this.dom = []; this.root = new Document(this.dom); this.done = false; this.tagStack = [this.root]; this.lastNode = null; this.parser = null; if (typeof options === "function") { elementCB = options; options = defaultOpts; } if (typeof callback === "object") { options = callback; callback = void 0; } this.callback = callback !== null && callback !== void 0 ? callback : null; this.options = options !== null && options !== void 0 ? options : defaultOpts; this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; } onparserinit(parser) { this.parser = parser; } onreset() { this.dom = []; this.root = new Document(this.dom); this.done = false; this.tagStack = [this.root]; this.lastNode = null; this.parser = null; } onend() { if (this.done) return; this.done = true; this.parser = null; this.handleCallback(null); } onerror(error) { this.handleCallback(error); } onclosetag() { this.lastNode = null; const elem = this.tagStack.pop(); if (this.options.withEndIndices) { elem.endIndex = this.parser.endIndex; } if (this.elementCB) this.elementCB(elem); } onopentag(name, attribs) { const type = this.options.xmlMode ? ElementType.Tag : void 0; const element = new Element(name, attribs, void 0, type); this.addNode(element); this.tagStack.push(element); } ontext(data2) { const { lastNode } = this; if (lastNode && lastNode.type === ElementType.Text) { lastNode.data += data2; if (this.options.withEndIndices) { lastNode.endIndex = this.parser.endIndex; } } else { const node = new Text2(data2); this.addNode(node); this.lastNode = node; } } oncomment(data2) { if (this.lastNode && this.lastNode.type === ElementType.Comment) { this.lastNode.data += data2; return; } const node = new Comment2(data2); this.addNode(node); this.lastNode = node; } oncommentend() { this.lastNode = null; } oncdatastart() { const text3 = new Text2(""); const node = new CDATA2([text3]); this.addNode(node); text3.parent = node; this.lastNode = text3; } oncdataend() { this.lastNode = null; } onprocessinginstruction(name, data2) { const node = new ProcessingInstruction(name, data2); this.addNode(node); } handleCallback(error) { if (typeof this.callback === "function") { this.callback(error, this.dom); } else if (error) { throw error; } } addNode(node) { const parent2 = this.tagStack[this.tagStack.length - 1]; const previousSibling = parent2.children[parent2.children.length - 1]; if (this.options.withStartIndices) { node.startIndex = this.parser.startIndex; } if (this.options.withEndIndices) { node.endIndex = this.parser.endIndex; } parent2.children.push(node); if (previousSibling) { node.prev = previousSibling; previousSibling.next = node; } node.parent = parent2; this.lastNode = null; } }; // node_modules/entities/lib/esm/generated/decode-data-html.js var decode_data_html_default = new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map((c) => c.charCodeAt(0))); // node_modules/entities/lib/esm/generated/decode-data-xml.js var decode_data_xml_default = new Uint16Array("\u0200aglq \u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((c) => c.charCodeAt(0))); // node_modules/entities/lib/esm/decode_codepoint.js var _a; var decodeMap = new Map([ [0, 65533], [128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376] ]); var fromCodePoint = (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function(codePoint) { let output = ""; if (codePoint > 65535) { codePoint -= 65536; output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296); codePoint = 56320 | codePoint & 1023; } output += String.fromCharCode(codePoint); return output; }; function replaceCodePoint(codePoint) { var _a5; if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { return 65533; } return (_a5 = decodeMap.get(codePoint)) !== null && _a5 !== void 0 ? _a5 : codePoint; } // node_modules/entities/lib/esm/decode.js var CharCodes; (function(CharCodes5) { CharCodes5[CharCodes5["NUM"] = 35] = "NUM"; CharCodes5[CharCodes5["SEMI"] = 59] = "SEMI"; CharCodes5[CharCodes5["EQUALS"] = 61] = "EQUALS"; CharCodes5[CharCodes5["ZERO"] = 48] = "ZERO"; CharCodes5[CharCodes5["NINE"] = 57] = "NINE"; CharCodes5[CharCodes5["LOWER_A"] = 97] = "LOWER_A"; CharCodes5[CharCodes5["LOWER_F"] = 102] = "LOWER_F"; CharCodes5[CharCodes5["LOWER_X"] = 120] = "LOWER_X"; CharCodes5[CharCodes5["LOWER_Z"] = 122] = "LOWER_Z"; CharCodes5[CharCodes5["UPPER_A"] = 65] = "UPPER_A"; CharCodes5[CharCodes5["UPPER_F"] = 70] = "UPPER_F"; CharCodes5[CharCodes5["UPPER_Z"] = 90] = "UPPER_Z"; })(CharCodes || (CharCodes = {})); var TO_LOWER_BIT = 32; var BinTrieFlags; (function(BinTrieFlags4) { BinTrieFlags4[BinTrieFlags4["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; BinTrieFlags4[BinTrieFlags4["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; BinTrieFlags4[BinTrieFlags4["JUMP_TABLE"] = 127] = "JUMP_TABLE"; })(BinTrieFlags || (BinTrieFlags = {})); function isNumber(code) { return code >= CharCodes.ZERO && code <= CharCodes.NINE; } function isHexadecimalCharacter(code) { return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F; } function isAsciiAlphaNumeric(code) { return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code); } function isEntityInAttributeInvalidEnd(code) { return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); } var EntityDecoderState; (function(EntityDecoderState4) { EntityDecoderState4[EntityDecoderState4["EntityStart"] = 0] = "EntityStart"; EntityDecoderState4[EntityDecoderState4["NumericStart"] = 1] = "NumericStart"; EntityDecoderState4[EntityDecoderState4["NumericDecimal"] = 2] = "NumericDecimal"; EntityDecoderState4[EntityDecoderState4["NumericHex"] = 3] = "NumericHex"; EntityDecoderState4[EntityDecoderState4["NamedEntity"] = 4] = "NamedEntity"; })(EntityDecoderState || (EntityDecoderState = {})); var DecodingMode; (function(DecodingMode4) { DecodingMode4[DecodingMode4["Legacy"] = 0] = "Legacy"; DecodingMode4[DecodingMode4["Strict"] = 1] = "Strict"; DecodingMode4[DecodingMode4["Attribute"] = 2] = "Attribute"; })(DecodingMode || (DecodingMode = {})); var EntityDecoder = class { constructor(decodeTree, emitCodePoint, errors) { this.decodeTree = decodeTree; this.emitCodePoint = emitCodePoint; this.errors = errors; this.state = EntityDecoderState.EntityStart; this.consumed = 1; this.result = 0; this.treeIndex = 0; this.excess = 1; this.decodeMode = DecodingMode.Strict; } startEntity(decodeMode) { this.decodeMode = decodeMode; this.state = EntityDecoderState.EntityStart; this.result = 0; this.treeIndex = 0; this.excess = 1; this.consumed = 1; } write(str, offset) { switch (this.state) { case EntityDecoderState.EntityStart: { if (str.charCodeAt(offset) === CharCodes.NUM) { this.state = EntityDecoderState.NumericStart; this.consumed += 1; return this.stateNumericStart(str, offset + 1); } this.state = EntityDecoderState.NamedEntity; return this.stateNamedEntity(str, offset); } case EntityDecoderState.NumericStart: { return this.stateNumericStart(str, offset); } case EntityDecoderState.NumericDecimal: { return this.stateNumericDecimal(str, offset); } case EntityDecoderState.NumericHex: { return this.stateNumericHex(str, offset); } case EntityDecoderState.NamedEntity: { return this.stateNamedEntity(str, offset); } } } stateNumericStart(str, offset) { if (offset >= str.length) { return -1; } if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { this.state = EntityDecoderState.NumericHex; this.consumed += 1; return this.stateNumericHex(str, offset + 1); } this.state = EntityDecoderState.NumericDecimal; return this.stateNumericDecimal(str, offset); } addToNumericResult(str, start, end2, base) { if (start !== end2) { const digitCount = end2 - start; this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base); this.consumed += digitCount; } } stateNumericHex(str, offset) { const startIdx = offset; while (offset < str.length) { const char = str.charCodeAt(offset); if (isNumber(char) || isHexadecimalCharacter(char)) { offset += 1; } else { this.addToNumericResult(str, startIdx, offset, 16); return this.emitNumericEntity(char, 3); } } this.addToNumericResult(str, startIdx, offset, 16); return -1; } stateNumericDecimal(str, offset) { const startIdx = offset; while (offset < str.length) { const char = str.charCodeAt(offset); if (isNumber(char)) { offset += 1; } else { this.addToNumericResult(str, startIdx, offset, 10); return this.emitNumericEntity(char, 2); } } this.addToNumericResult(str, startIdx, offset, 10); return -1; } emitNumericEntity(lastCp, expectedLength) { var _a5; if (this.consumed <= expectedLength) { (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } if (lastCp === CharCodes.SEMI) { this.consumed += 1; } else if (this.decodeMode === DecodingMode.Strict) { return 0; } this.emitCodePoint(replaceCodePoint(this.result), this.consumed); if (this.errors) { if (lastCp !== CharCodes.SEMI) { this.errors.missingSemicolonAfterCharacterReference(); } this.errors.validateNumericCharacterReference(this.result); } return this.consumed; } stateNamedEntity(str, offset) { const { decodeTree } = this; let current = decodeTree[this.treeIndex]; let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; for (; offset < str.length; offset++, this.excess++) { const char = str.charCodeAt(offset); this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); if (this.treeIndex < 0) { return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity(); } current = decodeTree[this.treeIndex]; valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; if (valueLength !== 0) { if (char === CharCodes.SEMI) { return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); } if (this.decodeMode !== DecodingMode.Strict) { this.result = this.treeIndex; this.consumed += this.excess; this.excess = 0; } } } return -1; } emitNotTerminatedNamedEntity() { var _a5; const { result, decodeTree } = this; const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; this.emitNamedEntityData(result, valueLength, this.consumed); (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.missingSemicolonAfterCharacterReference(); return this.consumed; } emitNamedEntityData(result, valueLength, consumed) { const { decodeTree } = this; this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed); if (valueLength === 3) { this.emitCodePoint(decodeTree[result + 2], consumed); } return consumed; } end() { var _a5; switch (this.state) { case EntityDecoderState.NamedEntity: { return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; } case EntityDecoderState.NumericDecimal: { return this.emitNumericEntity(0, 2); } case EntityDecoderState.NumericHex: { return this.emitNumericEntity(0, 3); } case EntityDecoderState.NumericStart: { (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } case EntityDecoderState.EntityStart: { return 0; } } } }; function getDecoder(decodeTree) { let ret = ""; const decoder = new EntityDecoder(decodeTree, (str) => ret += fromCodePoint(str)); return function decodeWithTrie(str, decodeMode) { let lastIndex = 0; let offset = 0; while ((offset = str.indexOf("&", offset)) >= 0) { ret += str.slice(lastIndex, offset); decoder.startEntity(decodeMode); const len = decoder.write(str, offset + 1); if (len < 0) { lastIndex = offset + decoder.end(); break; } lastIndex = offset + len; offset = len === 0 ? lastIndex + 1 : lastIndex; } const result = ret + str.slice(lastIndex); ret = ""; return result; }; } function determineBranch(decodeTree, current, nodeIdx, char) { const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; const jumpOffset = current & BinTrieFlags.JUMP_TABLE; if (branchCount === 0) { return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; } if (jumpOffset) { const value = char - jumpOffset; return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1; } let lo = nodeIdx; let hi = lo + branchCount - 1; while (lo <= hi) { const mid = lo + hi >>> 1; const midVal = decodeTree[mid]; if (midVal < char) { lo = mid + 1; } else if (midVal > char) { hi = mid - 1; } else { return decodeTree[mid + branchCount]; } } return -1; } var htmlDecoder = getDecoder(decode_data_html_default); var xmlDecoder = getDecoder(decode_data_xml_default); // node_modules/entities/lib/esm/generated/encode-html.js function restoreDiff(arr) { for (let i = 1; i < arr.length; i++) { arr[i][0] += arr[i - 1][0] + 1; } return arr; } var encode_html_default = new Map(/* @__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* @__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* @__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* @__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); // node_modules/entities/lib/esm/escape.js var xmlReplacer = /["&'<>$\x80-\uFFFF]/g; var xmlCodeMap = new Map([ [34, """], [38, "&"], [39, "'"], [60, "<"], [62, ">"] ]); var getCodePoint = String.prototype.codePointAt != null ? (str, index2) => str.codePointAt(index2) : (c, index2) => (c.charCodeAt(index2) & 64512) === 55296 ? (c.charCodeAt(index2) - 55296) * 1024 + c.charCodeAt(index2 + 1) - 56320 + 65536 : c.charCodeAt(index2); function encodeXML(str) { let ret = ""; let lastIdx = 0; let match; while ((match = xmlReplacer.exec(str)) !== null) { const i = match.index; const char = str.charCodeAt(i); const next2 = xmlCodeMap.get(char); if (next2 !== void 0) { ret += str.substring(lastIdx, i) + next2; lastIdx = i + 1; } else { ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`; lastIdx = xmlReplacer.lastIndex += Number((char & 64512) === 55296); } } return ret + str.substr(lastIdx); } function getEscaper(regex, map2) { return function escape2(data2) { let match; let lastIdx = 0; let result = ""; while (match = regex.exec(data2)) { if (lastIdx !== match.index) { result += data2.substring(lastIdx, match.index); } result += map2.get(match[0].charCodeAt(0)); lastIdx = match.index + 1; } return result + data2.substring(lastIdx); }; } var escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); var escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ [34, """], [38, "&"], [160, " "] ])); var escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ [38, "&"], [60, "<"], [62, ">"], [160, " "] ])); // node_modules/entities/lib/esm/index.js var EntityLevel; (function(EntityLevel2) { EntityLevel2[EntityLevel2["XML"] = 0] = "XML"; EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML"; })(EntityLevel || (EntityLevel = {})); var EncodingMode; (function(EncodingMode2) { EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8"; EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII"; EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive"; EncodingMode2[EncodingMode2["Attribute"] = 3] = "Attribute"; EncodingMode2[EncodingMode2["Text"] = 4] = "Text"; })(EncodingMode || (EncodingMode = {})); // node_modules/dom-serializer/lib/esm/foreignNames.js var elementNames = new Map([ "altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath" ].map((val2) => [val2.toLowerCase(), val2])); var attributeNames = new Map([ "definitionURL", "attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan" ].map((val2) => [val2.toLowerCase(), val2])); // node_modules/dom-serializer/lib/esm/index.js var unencodedElements = new Set([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]); function replaceQuotes(value) { return value.replace(/"/g, """); } function formatAttributes(attributes2, opts) { var _a5; if (!attributes2) return; const encode = ((_a5 = opts.encodeEntities) !== null && _a5 !== void 0 ? _a5 : opts.decodeEntities) === false ? replaceQuotes : opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML : escapeAttribute; return Object.keys(attributes2).map((key) => { var _a6, _b; const value = (_a6 = attributes2[key]) !== null && _a6 !== void 0 ? _a6 : ""; if (opts.xmlMode === "foreign") { key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; } if (!opts.emptyAttrs && !opts.xmlMode && value === "") { return key; } return `${key}="${encode(value)}"`; }).join(" "); } var singleTag = new Set([ "area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr" ]); function render(node, options = {}) { const nodes = "length" in node ? node : [node]; let output = ""; for (let i = 0; i < nodes.length; i++) { output += renderNode(nodes[i], options); } return output; } var esm_default = render; function renderNode(node, options) { switch (node.type) { case Root: return render(node.children, options); case Doctype: case Directive: return renderDirective(node); case Comment: return renderComment(node); case CDATA: return renderCdata(node); case Script: case Style: case Tag: return renderTag(node, options); case Text: return renderText(node, options); } } var foreignModeIntegrationPoints = new Set([ "mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title" ]); var foreignElements = new Set(["svg", "math"]); function renderTag(elem, opts) { var _a5; if (opts.xmlMode === "foreign") { elem.name = (_a5 = elementNames.get(elem.name)) !== null && _a5 !== void 0 ? _a5 : elem.name; if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) { opts = __spreadProps(__spreadValues({}, opts), { xmlMode: false }); } } if (!opts.xmlMode && foreignElements.has(elem.name)) { opts = __spreadProps(__spreadValues({}, opts), { xmlMode: "foreign" }); } let tag = `<${elem.name}`; const attribs = formatAttributes(elem.attribs, opts); if (attribs) { tag += ` ${attribs}`; } if (elem.children.length === 0 && (opts.xmlMode ? opts.selfClosingTags !== false : opts.selfClosingTags && singleTag.has(elem.name))) { if (!opts.xmlMode) tag += " "; tag += "/>"; } else { tag += ">"; if (elem.children.length > 0) { tag += render(elem.children, opts); } if (opts.xmlMode || !singleTag.has(elem.name)) { tag += ``; } } return tag; } function renderDirective(elem) { return `<${elem.data}>`; } function renderText(elem, opts) { var _a5; let data2 = elem.data || ""; if (((_a5 = opts.encodeEntities) !== null && _a5 !== void 0 ? _a5 : opts.decodeEntities) !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) { data2 = opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML(data2) : escapeText(data2); } return data2; } function renderCdata(elem) { return ``; } function renderComment(elem) { return ``; } // node_modules/domutils/lib/esm/stringify.js function getOuterHTML(node, options) { return esm_default(node, options); } function getInnerHTML(node, options) { return hasChildren(node) ? node.children.map((node2) => getOuterHTML(node2, options)).join("") : ""; } function getText(node) { if (Array.isArray(node)) return node.map(getText).join(""); if (isTag2(node)) return node.name === "br" ? "\n" : getText(node.children); if (isCDATA(node)) return getText(node.children); if (isText(node)) return node.data; return ""; } function textContent(node) { if (Array.isArray(node)) return node.map(textContent).join(""); if (hasChildren(node) && !isComment(node)) { return textContent(node.children); } if (isText(node)) return node.data; return ""; } function innerText(node) { if (Array.isArray(node)) return node.map(innerText).join(""); if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) { return innerText(node.children); } if (isText(node)) return node.data; return ""; } // node_modules/domutils/lib/esm/traversal.js function getChildren(elem) { return hasChildren(elem) ? elem.children : []; } function getParent(elem) { return elem.parent || null; } function getSiblings(elem) { const parent2 = getParent(elem); if (parent2 != null) return getChildren(parent2); const siblings2 = [elem]; let { prev: prev2, next: next2 } = elem; while (prev2 != null) { siblings2.unshift(prev2); ({ prev: prev2 } = prev2); } while (next2 != null) { siblings2.push(next2); ({ next: next2 } = next2); } return siblings2; } function getAttributeValue(elem, name) { var _a5; return (_a5 = elem.attribs) === null || _a5 === void 0 ? void 0 : _a5[name]; } function hasAttrib(elem, name) { return elem.attribs != null && Object.prototype.hasOwnProperty.call(elem.attribs, name) && elem.attribs[name] != null; } function getName(elem) { return elem.name; } function nextElementSibling(elem) { let { next: next2 } = elem; while (next2 !== null && !isTag2(next2)) ({ next: next2 } = next2); return next2; } function prevElementSibling(elem) { let { prev: prev2 } = elem; while (prev2 !== null && !isTag2(prev2)) ({ prev: prev2 } = prev2); return prev2; } // node_modules/domutils/lib/esm/manipulation.js function removeElement(elem) { if (elem.prev) elem.prev.next = elem.next; if (elem.next) elem.next.prev = elem.prev; if (elem.parent) { const childs = elem.parent.children; const childsIndex = childs.lastIndexOf(elem); if (childsIndex >= 0) { childs.splice(childsIndex, 1); } } elem.next = null; elem.prev = null; elem.parent = null; } function replaceElement(elem, replacement) { const prev2 = replacement.prev = elem.prev; if (prev2) { prev2.next = replacement; } const next2 = replacement.next = elem.next; if (next2) { next2.prev = replacement; } const parent2 = replacement.parent = elem.parent; if (parent2) { const childs = parent2.children; childs[childs.lastIndexOf(elem)] = replacement; elem.parent = null; } } function appendChild(parent2, child) { removeElement(child); child.next = null; child.parent = parent2; if (parent2.children.push(child) > 1) { const sibling = parent2.children[parent2.children.length - 2]; sibling.next = child; child.prev = sibling; } else { child.prev = null; } } function append(elem, next2) { removeElement(next2); const { parent: parent2 } = elem; const currNext = elem.next; next2.next = currNext; next2.prev = elem; elem.next = next2; next2.parent = parent2; if (currNext) { currNext.prev = next2; if (parent2) { const childs = parent2.children; childs.splice(childs.lastIndexOf(currNext), 0, next2); } } else if (parent2) { parent2.children.push(next2); } } function prependChild(parent2, child) { removeElement(child); child.parent = parent2; child.prev = null; if (parent2.children.unshift(child) !== 1) { const sibling = parent2.children[1]; sibling.prev = child; child.next = sibling; } else { child.next = null; } } function prepend(elem, prev2) { removeElement(prev2); const { parent: parent2 } = elem; if (parent2) { const childs = parent2.children; childs.splice(childs.indexOf(elem), 0, prev2); } if (elem.prev) { elem.prev.next = prev2; } prev2.parent = parent2; prev2.prev = elem.prev; prev2.next = elem; elem.prev = prev2; } // node_modules/domutils/lib/esm/querying.js function filter(test, node, recurse = true, limit = Infinity) { return find(test, Array.isArray(node) ? node : [node], recurse, limit); } function find(test, nodes, recurse, limit) { const result = []; const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; const indexStack = [0]; for (; ; ) { if (indexStack[0] >= nodeStack[0].length) { if (indexStack.length === 1) { return result; } nodeStack.shift(); indexStack.shift(); continue; } const elem = nodeStack[0][indexStack[0]++]; if (test(elem)) { result.push(elem); if (--limit <= 0) return result; } if (recurse && hasChildren(elem) && elem.children.length > 0) { indexStack.unshift(0); nodeStack.unshift(elem.children); } } } function findOneChild(test, nodes) { return nodes.find(test); } function findOne(test, nodes, recurse = true) { const searchedNodes = Array.isArray(nodes) ? nodes : [nodes]; for (let i = 0; i < searchedNodes.length; i++) { const node = searchedNodes[i]; if (isTag2(node) && test(node)) { return node; } if (recurse && hasChildren(node) && node.children.length > 0) { const found = findOne(test, node.children, true); if (found) return found; } } return null; } function existsOne(test, nodes) { return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => isTag2(node) && test(node) || hasChildren(node) && existsOne(test, node.children)); } function findAll(test, nodes) { const result = []; const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; const indexStack = [0]; for (; ; ) { if (indexStack[0] >= nodeStack[0].length) { if (nodeStack.length === 1) { return result; } nodeStack.shift(); indexStack.shift(); continue; } const elem = nodeStack[0][indexStack[0]++]; if (isTag2(elem) && test(elem)) result.push(elem); if (hasChildren(elem) && elem.children.length > 0) { indexStack.unshift(0); nodeStack.unshift(elem.children); } } } // node_modules/domutils/lib/esm/legacy.js var Checks = { tag_name(name) { if (typeof name === "function") { return (elem) => isTag2(elem) && name(elem.name); } else if (name === "*") { return isTag2; } return (elem) => isTag2(elem) && elem.name === name; }, tag_type(type) { if (typeof type === "function") { return (elem) => type(elem.type); } return (elem) => elem.type === type; }, tag_contains(data2) { if (typeof data2 === "function") { return (elem) => isText(elem) && data2(elem.data); } return (elem) => isText(elem) && elem.data === data2; } }; function getAttribCheck(attrib, value) { if (typeof value === "function") { return (elem) => isTag2(elem) && value(elem.attribs[attrib]); } return (elem) => isTag2(elem) && elem.attribs[attrib] === value; } function combineFuncs(a, b) { return (elem) => a(elem) || b(elem); } function compileTest(options) { const funcs = Object.keys(options).map((key) => { const value = options[key]; return Object.prototype.hasOwnProperty.call(Checks, key) ? Checks[key](value) : getAttribCheck(key, value); }); return funcs.length === 0 ? null : funcs.reduce(combineFuncs); } function testElement(options, node) { const test = compileTest(options); return test ? test(node) : true; } function getElements(options, nodes, recurse, limit = Infinity) { const test = compileTest(options); return test ? filter(test, nodes, recurse, limit) : []; } function getElementById(id, nodes, recurse = true) { if (!Array.isArray(nodes)) nodes = [nodes]; return findOne(getAttribCheck("id", id), nodes, recurse); } function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) { return filter(Checks["tag_name"](tagName), nodes, recurse, limit); } function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) { return filter(getAttribCheck("class", className), nodes, recurse, limit); } function getElementsByTagType(type, nodes, recurse = true, limit = Infinity) { return filter(Checks["tag_type"](type), nodes, recurse, limit); } // node_modules/domutils/lib/esm/helpers.js function removeSubsets(nodes) { let idx = nodes.length; while (--idx >= 0) { const node = nodes[idx]; if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) { nodes.splice(idx, 1); continue; } for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) { if (nodes.includes(ancestor)) { nodes.splice(idx, 1); break; } } } return nodes; } var DocumentPosition; (function(DocumentPosition2) { DocumentPosition2[DocumentPosition2["DISCONNECTED"] = 1] = "DISCONNECTED"; DocumentPosition2[DocumentPosition2["PRECEDING"] = 2] = "PRECEDING"; DocumentPosition2[DocumentPosition2["FOLLOWING"] = 4] = "FOLLOWING"; DocumentPosition2[DocumentPosition2["CONTAINS"] = 8] = "CONTAINS"; DocumentPosition2[DocumentPosition2["CONTAINED_BY"] = 16] = "CONTAINED_BY"; })(DocumentPosition || (DocumentPosition = {})); function compareDocumentPosition(nodeA, nodeB) { const aParents = []; const bParents = []; if (nodeA === nodeB) { return 0; } let current = hasChildren(nodeA) ? nodeA : nodeA.parent; while (current) { aParents.unshift(current); current = current.parent; } current = hasChildren(nodeB) ? nodeB : nodeB.parent; while (current) { bParents.unshift(current); current = current.parent; } const maxIdx = Math.min(aParents.length, bParents.length); let idx = 0; while (idx < maxIdx && aParents[idx] === bParents[idx]) { idx++; } if (idx === 0) { return DocumentPosition.DISCONNECTED; } const sharedParent = aParents[idx - 1]; const siblings2 = sharedParent.children; const aSibling = aParents[idx]; const bSibling = bParents[idx]; if (siblings2.indexOf(aSibling) > siblings2.indexOf(bSibling)) { if (sharedParent === nodeB) { return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY; } return DocumentPosition.FOLLOWING; } if (sharedParent === nodeA) { return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS; } return DocumentPosition.PRECEDING; } function uniqueSort(nodes) { nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1)); nodes.sort((a, b) => { const relative = compareDocumentPosition(a, b); if (relative & DocumentPosition.PRECEDING) { return -1; } else if (relative & DocumentPosition.FOLLOWING) { return 1; } return 0; }); return nodes; } // node_modules/domutils/lib/esm/feeds.js function getFeed(doc) { const feedRoot = getOneElement(isValidFeed, doc); return !feedRoot ? null : feedRoot.name === "feed" ? getAtomFeed(feedRoot) : getRssFeed(feedRoot); } function getAtomFeed(feedRoot) { var _a5; const childs = feedRoot.children; const feed = { type: "atom", items: getElementsByTagName("entry", childs).map((item) => { var _a6; const { children: children2 } = item; const entry = { media: getMediaElements(children2) }; addConditionally(entry, "id", "id", children2); addConditionally(entry, "title", "title", children2); const href2 = (_a6 = getOneElement("link", children2)) === null || _a6 === void 0 ? void 0 : _a6.attribs["href"]; if (href2) { entry.link = href2; } const description = fetch("summary", children2) || fetch("content", children2); if (description) { entry.description = description; } const pubDate = fetch("updated", children2); if (pubDate) { entry.pubDate = new Date(pubDate); } return entry; }) }; addConditionally(feed, "id", "id", childs); addConditionally(feed, "title", "title", childs); const href = (_a5 = getOneElement("link", childs)) === null || _a5 === void 0 ? void 0 : _a5.attribs["href"]; if (href) { feed.link = href; } addConditionally(feed, "description", "subtitle", childs); const updated = fetch("updated", childs); if (updated) { feed.updated = new Date(updated); } addConditionally(feed, "author", "email", childs, true); return feed; } function getRssFeed(feedRoot) { var _a5, _b; const childs = (_b = (_a5 = getOneElement("channel", feedRoot.children)) === null || _a5 === void 0 ? void 0 : _a5.children) !== null && _b !== void 0 ? _b : []; const feed = { type: feedRoot.name.substr(0, 3), id: "", items: getElementsByTagName("item", feedRoot.children).map((item) => { const { children: children2 } = item; const entry = { media: getMediaElements(children2) }; addConditionally(entry, "id", "guid", children2); addConditionally(entry, "title", "title", children2); addConditionally(entry, "link", "link", children2); addConditionally(entry, "description", "description", children2); const pubDate = fetch("pubDate", children2) || fetch("dc:date", children2); if (pubDate) entry.pubDate = new Date(pubDate); return entry; }) }; addConditionally(feed, "title", "title", childs); addConditionally(feed, "link", "link", childs); addConditionally(feed, "description", "description", childs); const updated = fetch("lastBuildDate", childs); if (updated) { feed.updated = new Date(updated); } addConditionally(feed, "author", "managingEditor", childs, true); return feed; } var MEDIA_KEYS_STRING = ["url", "type", "lang"]; var MEDIA_KEYS_INT = [ "fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width" ]; function getMediaElements(where) { return getElementsByTagName("media:content", where).map((elem) => { const { attribs } = elem; const media = { medium: attribs["medium"], isDefault: !!attribs["isDefault"] }; for (const attrib of MEDIA_KEYS_STRING) { if (attribs[attrib]) { media[attrib] = attribs[attrib]; } } for (const attrib of MEDIA_KEYS_INT) { if (attribs[attrib]) { media[attrib] = parseInt(attribs[attrib], 10); } } if (attribs["expression"]) { media.expression = attribs["expression"]; } return media; }); } function getOneElement(tagName, node) { return getElementsByTagName(tagName, node, true, 1)[0]; } function fetch(tagName, where, recurse = false) { return textContent(getElementsByTagName(tagName, where, recurse, 1)).trim(); } function addConditionally(obj, prop2, tagName, where, recurse = false) { const val2 = fetch(tagName, where, recurse); if (val2) obj[prop2] = val2; } function isValidFeed(value) { return value === "rss" || value === "feed" || value === "rdf:RDF"; } // node_modules/cheerio/dist/browser/options.js var defaultOpts2 = { _useHtmlParser2: false }; function flattenOptions(options, baseOptions) { if (!options) { return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts2; } const opts = __spreadValues(__spreadValues({ _useHtmlParser2: !!options.xmlMode }, baseOptions), options); if (options.xml) { opts._useHtmlParser2 = true; opts.xmlMode = true; if (options.xml !== true) { Object.assign(opts, options.xml); } } else if (options.xmlMode) { opts._useHtmlParser2 = true; } return opts; } // node_modules/cheerio/dist/browser/static.js function render2(that, dom, options) { if (!that) return ""; return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, void 0, options).toString(); } function isOptions(dom, options) { return !options && typeof dom === "object" && dom != null && !("length" in dom) && !("type" in dom); } function html(dom, options) { const toRender = isOptions(dom) ? (options = dom, void 0) : dom; const opts = __spreadValues(__spreadValues({}, this === null || this === void 0 ? void 0 : this._options), flattenOptions(options)); return render2(this, toRender, opts); } function xml(dom) { const options = __spreadProps(__spreadValues({}, this._options), { xmlMode: true }); return render2(this, dom, options); } function text(elements) { const elems = elements !== null && elements !== void 0 ? elements : this ? this.root() : []; let ret = ""; for (let i = 0; i < elems.length; i++) { ret += textContent(elems[i]); } return ret; } function parseHTML(data2, context, keepScripts = typeof context === "boolean" ? context : false) { if (!data2 || typeof data2 !== "string") { return null; } if (typeof context === "boolean") { keepScripts = context; } const parsed = this.load(data2, this._options, false); if (!keepScripts) { parsed("script").remove(); } return [...parsed.root()[0].children]; } function root() { return this(this._root); } function contains(container, contained) { if (contained === container) { return false; } let next2 = contained; while (next2 && next2 !== next2.parent) { next2 = next2.parent; if (next2 === container) { return true; } } return false; } function extract(map2) { return this.root().extract(map2); } function merge(arr1, arr2) { if (!isArrayLike(arr1) || !isArrayLike(arr2)) { return; } let newLength = arr1.length; const len = +arr2.length; for (let i = 0; i < len; i++) { arr1[newLength++] = arr2[i]; } arr1.length = newLength; return arr1; } function isArrayLike(item) { if (Array.isArray(item)) { return true; } if (typeof item !== "object" || item === null || !("length" in item) || typeof item.length !== "number" || item.length < 0) { return false; } for (let i = 0; i < item.length; i++) { if (!(i in item)) { return false; } } return true; } // node_modules/cheerio/dist/browser/api/attributes.js var attributes_exports = {}; __export(attributes_exports, { addClass: () => addClass, attr: () => attr, data: () => data, hasClass: () => hasClass, prop: () => prop, removeAttr: () => removeAttr, removeClass: () => removeClass, toggleClass: () => toggleClass, val: () => val }); // node_modules/cheerio/dist/browser/utils.js function isCheerio(maybeCheerio) { return maybeCheerio.cheerio != null; } function camelCase(str) { return str.replace(/[._-](\w|$)/g, (_, x) => x.toUpperCase()); } function cssCase(str) { return str.replace(/[A-Z]/g, "-$&").toLowerCase(); } function domEach(array, fn) { const len = array.length; for (let i = 0; i < len; i++) fn(array[i], i); return array; } var CharacterCode; (function(CharacterCode2) { CharacterCode2[CharacterCode2["LowerA"] = 97] = "LowerA"; CharacterCode2[CharacterCode2["LowerZ"] = 122] = "LowerZ"; CharacterCode2[CharacterCode2["UpperA"] = 65] = "UpperA"; CharacterCode2[CharacterCode2["UpperZ"] = 90] = "UpperZ"; CharacterCode2[CharacterCode2["Exclamation"] = 33] = "Exclamation"; })(CharacterCode || (CharacterCode = {})); function isHtml(str) { const tagStart = str.indexOf("<"); if (tagStart === -1 || tagStart > str.length - 3) return false; const tagChar = str.charCodeAt(tagStart + 1); return (tagChar >= CharacterCode.LowerA && tagChar <= CharacterCode.LowerZ || tagChar >= CharacterCode.UpperA && tagChar <= CharacterCode.UpperZ || tagChar === CharacterCode.Exclamation) && str.includes(">", tagStart + 2); } // node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js var htmlDecodeTree = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ '\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map((c) => c.charCodeAt(0))); // node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js var xmlDecodeTree = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ "\u0200aglq \u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((c) => c.charCodeAt(0))); // node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js var _a2; var decodeMap2 = new Map([ [0, 65533], [128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376] ]); var fromCodePoint2 = (_a2 = String.fromCodePoint) !== null && _a2 !== void 0 ? _a2 : function(codePoint) { let output = ""; if (codePoint > 65535) { codePoint -= 65536; output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296); codePoint = 56320 | codePoint & 1023; } output += String.fromCharCode(codePoint); return output; }; function replaceCodePoint2(codePoint) { var _a5; if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { return 65533; } return (_a5 = decodeMap2.get(codePoint)) !== null && _a5 !== void 0 ? _a5 : codePoint; } // node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js var CharCodes2; (function(CharCodes5) { CharCodes5[CharCodes5["NUM"] = 35] = "NUM"; CharCodes5[CharCodes5["SEMI"] = 59] = "SEMI"; CharCodes5[CharCodes5["EQUALS"] = 61] = "EQUALS"; CharCodes5[CharCodes5["ZERO"] = 48] = "ZERO"; CharCodes5[CharCodes5["NINE"] = 57] = "NINE"; CharCodes5[CharCodes5["LOWER_A"] = 97] = "LOWER_A"; CharCodes5[CharCodes5["LOWER_F"] = 102] = "LOWER_F"; CharCodes5[CharCodes5["LOWER_X"] = 120] = "LOWER_X"; CharCodes5[CharCodes5["LOWER_Z"] = 122] = "LOWER_Z"; CharCodes5[CharCodes5["UPPER_A"] = 65] = "UPPER_A"; CharCodes5[CharCodes5["UPPER_F"] = 70] = "UPPER_F"; CharCodes5[CharCodes5["UPPER_Z"] = 90] = "UPPER_Z"; })(CharCodes2 || (CharCodes2 = {})); var TO_LOWER_BIT2 = 32; var BinTrieFlags2; (function(BinTrieFlags4) { BinTrieFlags4[BinTrieFlags4["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; BinTrieFlags4[BinTrieFlags4["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; BinTrieFlags4[BinTrieFlags4["JUMP_TABLE"] = 127] = "JUMP_TABLE"; })(BinTrieFlags2 || (BinTrieFlags2 = {})); function isNumber2(code) { return code >= CharCodes2.ZERO && code <= CharCodes2.NINE; } function isHexadecimalCharacter2(code) { return code >= CharCodes2.UPPER_A && code <= CharCodes2.UPPER_F || code >= CharCodes2.LOWER_A && code <= CharCodes2.LOWER_F; } function isAsciiAlphaNumeric2(code) { return code >= CharCodes2.UPPER_A && code <= CharCodes2.UPPER_Z || code >= CharCodes2.LOWER_A && code <= CharCodes2.LOWER_Z || isNumber2(code); } function isEntityInAttributeInvalidEnd2(code) { return code === CharCodes2.EQUALS || isAsciiAlphaNumeric2(code); } var EntityDecoderState2; (function(EntityDecoderState4) { EntityDecoderState4[EntityDecoderState4["EntityStart"] = 0] = "EntityStart"; EntityDecoderState4[EntityDecoderState4["NumericStart"] = 1] = "NumericStart"; EntityDecoderState4[EntityDecoderState4["NumericDecimal"] = 2] = "NumericDecimal"; EntityDecoderState4[EntityDecoderState4["NumericHex"] = 3] = "NumericHex"; EntityDecoderState4[EntityDecoderState4["NamedEntity"] = 4] = "NamedEntity"; })(EntityDecoderState2 || (EntityDecoderState2 = {})); var DecodingMode2; (function(DecodingMode4) { DecodingMode4[DecodingMode4["Legacy"] = 0] = "Legacy"; DecodingMode4[DecodingMode4["Strict"] = 1] = "Strict"; DecodingMode4[DecodingMode4["Attribute"] = 2] = "Attribute"; })(DecodingMode2 || (DecodingMode2 = {})); var EntityDecoder2 = class { constructor(decodeTree, emitCodePoint, errors) { this.decodeTree = decodeTree; this.emitCodePoint = emitCodePoint; this.errors = errors; this.state = EntityDecoderState2.EntityStart; this.consumed = 1; this.result = 0; this.treeIndex = 0; this.excess = 1; this.decodeMode = DecodingMode2.Strict; } startEntity(decodeMode) { this.decodeMode = decodeMode; this.state = EntityDecoderState2.EntityStart; this.result = 0; this.treeIndex = 0; this.excess = 1; this.consumed = 1; } write(input, offset) { switch (this.state) { case EntityDecoderState2.EntityStart: { if (input.charCodeAt(offset) === CharCodes2.NUM) { this.state = EntityDecoderState2.NumericStart; this.consumed += 1; return this.stateNumericStart(input, offset + 1); } this.state = EntityDecoderState2.NamedEntity; return this.stateNamedEntity(input, offset); } case EntityDecoderState2.NumericStart: { return this.stateNumericStart(input, offset); } case EntityDecoderState2.NumericDecimal: { return this.stateNumericDecimal(input, offset); } case EntityDecoderState2.NumericHex: { return this.stateNumericHex(input, offset); } case EntityDecoderState2.NamedEntity: { return this.stateNamedEntity(input, offset); } } } stateNumericStart(input, offset) { if (offset >= input.length) { return -1; } if ((input.charCodeAt(offset) | TO_LOWER_BIT2) === CharCodes2.LOWER_X) { this.state = EntityDecoderState2.NumericHex; this.consumed += 1; return this.stateNumericHex(input, offset + 1); } this.state = EntityDecoderState2.NumericDecimal; return this.stateNumericDecimal(input, offset); } addToNumericResult(input, start, end2, base) { if (start !== end2) { const digitCount = end2 - start; this.result = this.result * Math.pow(base, digitCount) + Number.parseInt(input.substr(start, digitCount), base); this.consumed += digitCount; } } stateNumericHex(input, offset) { const startIndex = offset; while (offset < input.length) { const char = input.charCodeAt(offset); if (isNumber2(char) || isHexadecimalCharacter2(char)) { offset += 1; } else { this.addToNumericResult(input, startIndex, offset, 16); return this.emitNumericEntity(char, 3); } } this.addToNumericResult(input, startIndex, offset, 16); return -1; } stateNumericDecimal(input, offset) { const startIndex = offset; while (offset < input.length) { const char = input.charCodeAt(offset); if (isNumber2(char)) { offset += 1; } else { this.addToNumericResult(input, startIndex, offset, 10); return this.emitNumericEntity(char, 2); } } this.addToNumericResult(input, startIndex, offset, 10); return -1; } emitNumericEntity(lastCp, expectedLength) { var _a5; if (this.consumed <= expectedLength) { (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } if (lastCp === CharCodes2.SEMI) { this.consumed += 1; } else if (this.decodeMode === DecodingMode2.Strict) { return 0; } this.emitCodePoint(replaceCodePoint2(this.result), this.consumed); if (this.errors) { if (lastCp !== CharCodes2.SEMI) { this.errors.missingSemicolonAfterCharacterReference(); } this.errors.validateNumericCharacterReference(this.result); } return this.consumed; } stateNamedEntity(input, offset) { const { decodeTree } = this; let current = decodeTree[this.treeIndex]; let valueLength = (current & BinTrieFlags2.VALUE_LENGTH) >> 14; for (; offset < input.length; offset++, this.excess++) { const char = input.charCodeAt(offset); this.treeIndex = determineBranch2(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); if (this.treeIndex < 0) { return this.result === 0 || this.decodeMode === DecodingMode2.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd2(char)) ? 0 : this.emitNotTerminatedNamedEntity(); } current = decodeTree[this.treeIndex]; valueLength = (current & BinTrieFlags2.VALUE_LENGTH) >> 14; if (valueLength !== 0) { if (char === CharCodes2.SEMI) { return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); } if (this.decodeMode !== DecodingMode2.Strict) { this.result = this.treeIndex; this.consumed += this.excess; this.excess = 0; } } } return -1; } emitNotTerminatedNamedEntity() { var _a5; const { result, decodeTree } = this; const valueLength = (decodeTree[result] & BinTrieFlags2.VALUE_LENGTH) >> 14; this.emitNamedEntityData(result, valueLength, this.consumed); (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.missingSemicolonAfterCharacterReference(); return this.consumed; } emitNamedEntityData(result, valueLength, consumed) { const { decodeTree } = this; this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags2.VALUE_LENGTH : decodeTree[result + 1], consumed); if (valueLength === 3) { this.emitCodePoint(decodeTree[result + 2], consumed); } return consumed; } end() { var _a5; switch (this.state) { case EntityDecoderState2.NamedEntity: { return this.result !== 0 && (this.decodeMode !== DecodingMode2.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; } case EntityDecoderState2.NumericDecimal: { return this.emitNumericEntity(0, 2); } case EntityDecoderState2.NumericHex: { return this.emitNumericEntity(0, 3); } case EntityDecoderState2.NumericStart: { (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } case EntityDecoderState2.EntityStart: { return 0; } } } }; function determineBranch2(decodeTree, current, nodeIndex, char) { const branchCount = (current & BinTrieFlags2.BRANCH_LENGTH) >> 7; const jumpOffset = current & BinTrieFlags2.JUMP_TABLE; if (branchCount === 0) { return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; } if (jumpOffset) { const value = char - jumpOffset; return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1; } let lo = nodeIndex; let hi = lo + branchCount - 1; while (lo <= hi) { const mid = lo + hi >>> 1; const midValue = decodeTree[mid]; if (midValue < char) { lo = mid + 1; } else if (midValue > char) { hi = mid - 1; } else { return decodeTree[mid + branchCount]; } } return -1; } // node_modules/htmlparser2/dist/esm/Tokenizer.js var CharCodes3; (function(CharCodes5) { CharCodes5[CharCodes5["Tab"] = 9] = "Tab"; CharCodes5[CharCodes5["NewLine"] = 10] = "NewLine"; CharCodes5[CharCodes5["FormFeed"] = 12] = "FormFeed"; CharCodes5[CharCodes5["CarriageReturn"] = 13] = "CarriageReturn"; CharCodes5[CharCodes5["Space"] = 32] = "Space"; CharCodes5[CharCodes5["ExclamationMark"] = 33] = "ExclamationMark"; CharCodes5[CharCodes5["Number"] = 35] = "Number"; CharCodes5[CharCodes5["Amp"] = 38] = "Amp"; CharCodes5[CharCodes5["SingleQuote"] = 39] = "SingleQuote"; CharCodes5[CharCodes5["DoubleQuote"] = 34] = "DoubleQuote"; CharCodes5[CharCodes5["Dash"] = 45] = "Dash"; CharCodes5[CharCodes5["Slash"] = 47] = "Slash"; CharCodes5[CharCodes5["Zero"] = 48] = "Zero"; CharCodes5[CharCodes5["Nine"] = 57] = "Nine"; CharCodes5[CharCodes5["Semi"] = 59] = "Semi"; CharCodes5[CharCodes5["Lt"] = 60] = "Lt"; CharCodes5[CharCodes5["Eq"] = 61] = "Eq"; CharCodes5[CharCodes5["Gt"] = 62] = "Gt"; CharCodes5[CharCodes5["Questionmark"] = 63] = "Questionmark"; CharCodes5[CharCodes5["UpperA"] = 65] = "UpperA"; CharCodes5[CharCodes5["LowerA"] = 97] = "LowerA"; CharCodes5[CharCodes5["UpperF"] = 70] = "UpperF"; CharCodes5[CharCodes5["LowerF"] = 102] = "LowerF"; CharCodes5[CharCodes5["UpperZ"] = 90] = "UpperZ"; CharCodes5[CharCodes5["LowerZ"] = 122] = "LowerZ"; CharCodes5[CharCodes5["LowerX"] = 120] = "LowerX"; CharCodes5[CharCodes5["OpeningSquareBracket"] = 91] = "OpeningSquareBracket"; })(CharCodes3 || (CharCodes3 = {})); var State; (function(State3) { State3[State3["Text"] = 1] = "Text"; State3[State3["BeforeTagName"] = 2] = "BeforeTagName"; State3[State3["InTagName"] = 3] = "InTagName"; State3[State3["InSelfClosingTag"] = 4] = "InSelfClosingTag"; State3[State3["BeforeClosingTagName"] = 5] = "BeforeClosingTagName"; State3[State3["InClosingTagName"] = 6] = "InClosingTagName"; State3[State3["AfterClosingTagName"] = 7] = "AfterClosingTagName"; State3[State3["BeforeAttributeName"] = 8] = "BeforeAttributeName"; State3[State3["InAttributeName"] = 9] = "InAttributeName"; State3[State3["AfterAttributeName"] = 10] = "AfterAttributeName"; State3[State3["BeforeAttributeValue"] = 11] = "BeforeAttributeValue"; State3[State3["InAttributeValueDq"] = 12] = "InAttributeValueDq"; State3[State3["InAttributeValueSq"] = 13] = "InAttributeValueSq"; State3[State3["InAttributeValueNq"] = 14] = "InAttributeValueNq"; State3[State3["BeforeDeclaration"] = 15] = "BeforeDeclaration"; State3[State3["InDeclaration"] = 16] = "InDeclaration"; State3[State3["InProcessingInstruction"] = 17] = "InProcessingInstruction"; State3[State3["BeforeComment"] = 18] = "BeforeComment"; State3[State3["CDATASequence"] = 19] = "CDATASequence"; State3[State3["InSpecialComment"] = 20] = "InSpecialComment"; State3[State3["InCommentLike"] = 21] = "InCommentLike"; State3[State3["BeforeSpecialS"] = 22] = "BeforeSpecialS"; State3[State3["BeforeSpecialT"] = 23] = "BeforeSpecialT"; State3[State3["SpecialStartSequence"] = 24] = "SpecialStartSequence"; State3[State3["InSpecialTag"] = 25] = "InSpecialTag"; State3[State3["InEntity"] = 26] = "InEntity"; })(State || (State = {})); function isWhitespace(c) { return c === CharCodes3.Space || c === CharCodes3.NewLine || c === CharCodes3.Tab || c === CharCodes3.FormFeed || c === CharCodes3.CarriageReturn; } function isEndOfTagSection(c) { return c === CharCodes3.Slash || c === CharCodes3.Gt || isWhitespace(c); } function isASCIIAlpha(c) { return c >= CharCodes3.LowerA && c <= CharCodes3.LowerZ || c >= CharCodes3.UpperA && c <= CharCodes3.UpperZ; } var QuoteType; (function(QuoteType2) { QuoteType2[QuoteType2["NoValue"] = 0] = "NoValue"; QuoteType2[QuoteType2["Unquoted"] = 1] = "Unquoted"; QuoteType2[QuoteType2["Single"] = 2] = "Single"; QuoteType2[QuoteType2["Double"] = 3] = "Double"; })(QuoteType || (QuoteType = {})); var Sequences = { Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), CdataEnd: new Uint8Array([93, 93, 62]), CommentEnd: new Uint8Array([45, 45, 62]), ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), TextareaEnd: new Uint8Array([ 60, 47, 116, 101, 120, 116, 97, 114, 101, 97 ]), XmpEnd: new Uint8Array([60, 47, 120, 109, 112]) }; var Tokenizer = class { constructor({ xmlMode = false, decodeEntities = true }, cbs) { this.cbs = cbs; this.state = State.Text; this.buffer = ""; this.sectionStart = 0; this.index = 0; this.entityStart = 0; this.baseState = State.Text; this.isSpecial = false; this.running = true; this.offset = 0; this.currentSequence = void 0; this.sequenceIndex = 0; this.xmlMode = xmlMode; this.decodeEntities = decodeEntities; this.entityDecoder = new EntityDecoder2(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed)); } reset() { this.state = State.Text; this.buffer = ""; this.sectionStart = 0; this.index = 0; this.baseState = State.Text; this.currentSequence = void 0; this.running = true; this.offset = 0; } write(chunk) { this.offset += this.buffer.length; this.buffer = chunk; this.parse(); } end() { if (this.running) this.finish(); } pause() { this.running = false; } resume() { this.running = true; if (this.index < this.buffer.length + this.offset) { this.parse(); } } stateText(c) { if (c === CharCodes3.Lt || !this.decodeEntities && this.fastForwardTo(CharCodes3.Lt)) { if (this.index > this.sectionStart) { this.cbs.ontext(this.sectionStart, this.index); } this.state = State.BeforeTagName; this.sectionStart = this.index; } else if (this.decodeEntities && c === CharCodes3.Amp) { this.startEntity(); } } stateSpecialStartSequence(c) { const isEnd = this.sequenceIndex === this.currentSequence.length; const isMatch = isEnd ? isEndOfTagSection(c) : (c | 32) === this.currentSequence[this.sequenceIndex]; if (!isMatch) { this.isSpecial = false; } else if (!isEnd) { this.sequenceIndex++; return; } this.sequenceIndex = 0; this.state = State.InTagName; this.stateInTagName(c); } stateInSpecialTag(c) { if (this.sequenceIndex === this.currentSequence.length) { if (c === CharCodes3.Gt || isWhitespace(c)) { const endOfText = this.index - this.currentSequence.length; if (this.sectionStart < endOfText) { const actualIndex = this.index; this.index = endOfText; this.cbs.ontext(this.sectionStart, endOfText); this.index = actualIndex; } this.isSpecial = false; this.sectionStart = endOfText + 2; this.stateInClosingTagName(c); return; } this.sequenceIndex = 0; } if ((c | 32) === this.currentSequence[this.sequenceIndex]) { this.sequenceIndex += 1; } else if (this.sequenceIndex === 0) { if (this.currentSequence === Sequences.TitleEnd) { if (this.decodeEntities && c === CharCodes3.Amp) { this.startEntity(); } } else if (this.fastForwardTo(CharCodes3.Lt)) { this.sequenceIndex = 1; } } else { this.sequenceIndex = Number(c === CharCodes3.Lt); } } stateCDATASequence(c) { if (c === Sequences.Cdata[this.sequenceIndex]) { if (++this.sequenceIndex === Sequences.Cdata.length) { this.state = State.InCommentLike; this.currentSequence = Sequences.CdataEnd; this.sequenceIndex = 0; this.sectionStart = this.index + 1; } } else { this.sequenceIndex = 0; this.state = State.InDeclaration; this.stateInDeclaration(c); } } fastForwardTo(c) { while (++this.index < this.buffer.length + this.offset) { if (this.buffer.charCodeAt(this.index - this.offset) === c) { return true; } } this.index = this.buffer.length + this.offset - 1; return false; } stateInCommentLike(c) { if (c === this.currentSequence[this.sequenceIndex]) { if (++this.sequenceIndex === this.currentSequence.length) { if (this.currentSequence === Sequences.CdataEnd) { this.cbs.oncdata(this.sectionStart, this.index, 2); } else { this.cbs.oncomment(this.sectionStart, this.index, 2); } this.sequenceIndex = 0; this.sectionStart = this.index + 1; this.state = State.Text; } } else if (this.sequenceIndex === 0) { if (this.fastForwardTo(this.currentSequence[0])) { this.sequenceIndex = 1; } } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { this.sequenceIndex = 0; } } isTagStartChar(c) { return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c); } startSpecial(sequence, offset) { this.isSpecial = true; this.currentSequence = sequence; this.sequenceIndex = offset; this.state = State.SpecialStartSequence; } stateBeforeTagName(c) { if (c === CharCodes3.ExclamationMark) { this.state = State.BeforeDeclaration; this.sectionStart = this.index + 1; } else if (c === CharCodes3.Questionmark) { this.state = State.InProcessingInstruction; this.sectionStart = this.index + 1; } else if (this.isTagStartChar(c)) { const lower = c | 32; this.sectionStart = this.index; if (this.xmlMode) { this.state = State.InTagName; } else if (lower === Sequences.ScriptEnd[2]) { this.state = State.BeforeSpecialS; } else if (lower === Sequences.TitleEnd[2] || lower === Sequences.XmpEnd[2]) { this.state = State.BeforeSpecialT; } else { this.state = State.InTagName; } } else if (c === CharCodes3.Slash) { this.state = State.BeforeClosingTagName; } else { this.state = State.Text; this.stateText(c); } } stateInTagName(c) { if (isEndOfTagSection(c)) { this.cbs.onopentagname(this.sectionStart, this.index); this.sectionStart = -1; this.state = State.BeforeAttributeName; this.stateBeforeAttributeName(c); } } stateBeforeClosingTagName(c) { if (isWhitespace(c)) { } else if (c === CharCodes3.Gt) { this.state = State.Text; } else { this.state = this.isTagStartChar(c) ? State.InClosingTagName : State.InSpecialComment; this.sectionStart = this.index; } } stateInClosingTagName(c) { if (c === CharCodes3.Gt || isWhitespace(c)) { this.cbs.onclosetag(this.sectionStart, this.index); this.sectionStart = -1; this.state = State.AfterClosingTagName; this.stateAfterClosingTagName(c); } } stateAfterClosingTagName(c) { if (c === CharCodes3.Gt || this.fastForwardTo(CharCodes3.Gt)) { this.state = State.Text; this.sectionStart = this.index + 1; } } stateBeforeAttributeName(c) { if (c === CharCodes3.Gt) { this.cbs.onopentagend(this.index); if (this.isSpecial) { this.state = State.InSpecialTag; this.sequenceIndex = 0; } else { this.state = State.Text; } this.sectionStart = this.index + 1; } else if (c === CharCodes3.Slash) { this.state = State.InSelfClosingTag; } else if (!isWhitespace(c)) { this.state = State.InAttributeName; this.sectionStart = this.index; } } stateInSelfClosingTag(c) { if (c === CharCodes3.Gt) { this.cbs.onselfclosingtag(this.index); this.state = State.Text; this.sectionStart = this.index + 1; this.isSpecial = false; } else if (!isWhitespace(c)) { this.state = State.BeforeAttributeName; this.stateBeforeAttributeName(c); } } stateInAttributeName(c) { if (c === CharCodes3.Eq || isEndOfTagSection(c)) { this.cbs.onattribname(this.sectionStart, this.index); this.sectionStart = this.index; this.state = State.AfterAttributeName; this.stateAfterAttributeName(c); } } stateAfterAttributeName(c) { if (c === CharCodes3.Eq) { this.state = State.BeforeAttributeValue; } else if (c === CharCodes3.Slash || c === CharCodes3.Gt) { this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); this.sectionStart = -1; this.state = State.BeforeAttributeName; this.stateBeforeAttributeName(c); } else if (!isWhitespace(c)) { this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); this.state = State.InAttributeName; this.sectionStart = this.index; } } stateBeforeAttributeValue(c) { if (c === CharCodes3.DoubleQuote) { this.state = State.InAttributeValueDq; this.sectionStart = this.index + 1; } else if (c === CharCodes3.SingleQuote) { this.state = State.InAttributeValueSq; this.sectionStart = this.index + 1; } else if (!isWhitespace(c)) { this.sectionStart = this.index; this.state = State.InAttributeValueNq; this.stateInAttributeValueNoQuotes(c); } } handleInAttributeValue(c, quote) { if (c === quote || !this.decodeEntities && this.fastForwardTo(quote)) { this.cbs.onattribdata(this.sectionStart, this.index); this.sectionStart = -1; this.cbs.onattribend(quote === CharCodes3.DoubleQuote ? QuoteType.Double : QuoteType.Single, this.index + 1); this.state = State.BeforeAttributeName; } else if (this.decodeEntities && c === CharCodes3.Amp) { this.startEntity(); } } stateInAttributeValueDoubleQuotes(c) { this.handleInAttributeValue(c, CharCodes3.DoubleQuote); } stateInAttributeValueSingleQuotes(c) { this.handleInAttributeValue(c, CharCodes3.SingleQuote); } stateInAttributeValueNoQuotes(c) { if (isWhitespace(c) || c === CharCodes3.Gt) { this.cbs.onattribdata(this.sectionStart, this.index); this.sectionStart = -1; this.cbs.onattribend(QuoteType.Unquoted, this.index); this.state = State.BeforeAttributeName; this.stateBeforeAttributeName(c); } else if (this.decodeEntities && c === CharCodes3.Amp) { this.startEntity(); } } stateBeforeDeclaration(c) { if (c === CharCodes3.OpeningSquareBracket) { this.state = State.CDATASequence; this.sequenceIndex = 0; } else { this.state = c === CharCodes3.Dash ? State.BeforeComment : State.InDeclaration; } } stateInDeclaration(c) { if (c === CharCodes3.Gt || this.fastForwardTo(CharCodes3.Gt)) { this.cbs.ondeclaration(this.sectionStart, this.index); this.state = State.Text; this.sectionStart = this.index + 1; } } stateInProcessingInstruction(c) { if (c === CharCodes3.Gt || this.fastForwardTo(CharCodes3.Gt)) { this.cbs.onprocessinginstruction(this.sectionStart, this.index); this.state = State.Text; this.sectionStart = this.index + 1; } } stateBeforeComment(c) { if (c === CharCodes3.Dash) { this.state = State.InCommentLike; this.currentSequence = Sequences.CommentEnd; this.sequenceIndex = 2; this.sectionStart = this.index + 1; } else { this.state = State.InDeclaration; } } stateInSpecialComment(c) { if (c === CharCodes3.Gt || this.fastForwardTo(CharCodes3.Gt)) { this.cbs.oncomment(this.sectionStart, this.index, 0); this.state = State.Text; this.sectionStart = this.index + 1; } } stateBeforeSpecialS(c) { const lower = c | 32; if (lower === Sequences.ScriptEnd[3]) { this.startSpecial(Sequences.ScriptEnd, 4); } else if (lower === Sequences.StyleEnd[3]) { this.startSpecial(Sequences.StyleEnd, 4); } else { this.state = State.InTagName; this.stateInTagName(c); } } stateBeforeSpecialT(c) { const lower = c | 32; switch (lower) { case Sequences.TitleEnd[3]: { this.startSpecial(Sequences.TitleEnd, 4); break; } case Sequences.TextareaEnd[3]: { this.startSpecial(Sequences.TextareaEnd, 4); break; } case Sequences.XmpEnd[3]: { this.startSpecial(Sequences.XmpEnd, 4); break; } default: { this.state = State.InTagName; this.stateInTagName(c); } } } startEntity() { this.baseState = this.state; this.state = State.InEntity; this.entityStart = this.index; this.entityDecoder.startEntity(this.xmlMode ? DecodingMode2.Strict : this.baseState === State.Text || this.baseState === State.InSpecialTag ? DecodingMode2.Legacy : DecodingMode2.Attribute); } stateInEntity() { const length = this.entityDecoder.write(this.buffer, this.index - this.offset); if (length >= 0) { this.state = this.baseState; if (length === 0) { this.index = this.entityStart; } } else { this.index = this.offset + this.buffer.length - 1; } } cleanup() { if (this.running && this.sectionStart !== this.index) { if (this.state === State.Text || this.state === State.InSpecialTag && this.sequenceIndex === 0) { this.cbs.ontext(this.sectionStart, this.index); this.sectionStart = this.index; } else if (this.state === State.InAttributeValueDq || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueNq) { this.cbs.onattribdata(this.sectionStart, this.index); this.sectionStart = this.index; } } } shouldContinue() { return this.index < this.buffer.length + this.offset && this.running; } parse() { while (this.shouldContinue()) { const c = this.buffer.charCodeAt(this.index - this.offset); switch (this.state) { case State.Text: { this.stateText(c); break; } case State.SpecialStartSequence: { this.stateSpecialStartSequence(c); break; } case State.InSpecialTag: { this.stateInSpecialTag(c); break; } case State.CDATASequence: { this.stateCDATASequence(c); break; } case State.InAttributeValueDq: { this.stateInAttributeValueDoubleQuotes(c); break; } case State.InAttributeName: { this.stateInAttributeName(c); break; } case State.InCommentLike: { this.stateInCommentLike(c); break; } case State.InSpecialComment: { this.stateInSpecialComment(c); break; } case State.BeforeAttributeName: { this.stateBeforeAttributeName(c); break; } case State.InTagName: { this.stateInTagName(c); break; } case State.InClosingTagName: { this.stateInClosingTagName(c); break; } case State.BeforeTagName: { this.stateBeforeTagName(c); break; } case State.AfterAttributeName: { this.stateAfterAttributeName(c); break; } case State.InAttributeValueSq: { this.stateInAttributeValueSingleQuotes(c); break; } case State.BeforeAttributeValue: { this.stateBeforeAttributeValue(c); break; } case State.BeforeClosingTagName: { this.stateBeforeClosingTagName(c); break; } case State.AfterClosingTagName: { this.stateAfterClosingTagName(c); break; } case State.BeforeSpecialS: { this.stateBeforeSpecialS(c); break; } case State.BeforeSpecialT: { this.stateBeforeSpecialT(c); break; } case State.InAttributeValueNq: { this.stateInAttributeValueNoQuotes(c); break; } case State.InSelfClosingTag: { this.stateInSelfClosingTag(c); break; } case State.InDeclaration: { this.stateInDeclaration(c); break; } case State.BeforeDeclaration: { this.stateBeforeDeclaration(c); break; } case State.BeforeComment: { this.stateBeforeComment(c); break; } case State.InProcessingInstruction: { this.stateInProcessingInstruction(c); break; } case State.InEntity: { this.stateInEntity(); break; } } this.index++; } this.cleanup(); } finish() { if (this.state === State.InEntity) { this.entityDecoder.end(); this.state = this.baseState; } this.handleTrailingData(); this.cbs.onend(); } handleTrailingData() { const endIndex = this.buffer.length + this.offset; if (this.sectionStart >= endIndex) { return; } if (this.state === State.InCommentLike) { if (this.currentSequence === Sequences.CdataEnd) { this.cbs.oncdata(this.sectionStart, endIndex, 0); } else { this.cbs.oncomment(this.sectionStart, endIndex, 0); } } else if (this.state === State.InTagName || this.state === State.BeforeAttributeName || this.state === State.BeforeAttributeValue || this.state === State.AfterAttributeName || this.state === State.InAttributeName || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueDq || this.state === State.InAttributeValueNq || this.state === State.InClosingTagName) { } else { this.cbs.ontext(this.sectionStart, endIndex); } } emitCodePoint(cp, consumed) { if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) { if (this.sectionStart < this.entityStart) { this.cbs.onattribdata(this.sectionStart, this.entityStart); } this.sectionStart = this.entityStart + consumed; this.index = this.sectionStart - 1; this.cbs.onattribentity(cp); } else { if (this.sectionStart < this.entityStart) { this.cbs.ontext(this.sectionStart, this.entityStart); } this.sectionStart = this.entityStart + consumed; this.index = this.sectionStart - 1; this.cbs.ontextentity(cp, this.sectionStart); } } }; // node_modules/htmlparser2/dist/esm/Parser.js var formTags = new Set([ "input", "option", "optgroup", "select", "button", "datalist", "textarea" ]); var pTag = new Set(["p"]); var tableSectionTags = new Set(["thead", "tbody"]); var ddtTags = new Set(["dd", "dt"]); var rtpTags = new Set(["rt", "rp"]); var openImpliesClose = new Map([ ["tr", new Set(["tr", "th", "td"])], ["th", new Set(["th"])], ["td", new Set(["thead", "th", "td"])], ["body", new Set(["head", "link", "script"])], ["li", new Set(["li"])], ["p", pTag], ["h1", pTag], ["h2", pTag], ["h3", pTag], ["h4", pTag], ["h5", pTag], ["h6", pTag], ["select", formTags], ["input", formTags], ["output", formTags], ["button", formTags], ["datalist", formTags], ["textarea", formTags], ["option", new Set(["option"])], ["optgroup", new Set(["optgroup", "option"])], ["dd", ddtTags], ["dt", ddtTags], ["address", pTag], ["article", pTag], ["aside", pTag], ["blockquote", pTag], ["details", pTag], ["div", pTag], ["dl", pTag], ["fieldset", pTag], ["figcaption", pTag], ["figure", pTag], ["footer", pTag], ["form", pTag], ["header", pTag], ["hr", pTag], ["main", pTag], ["nav", pTag], ["ol", pTag], ["pre", pTag], ["section", pTag], ["table", pTag], ["ul", pTag], ["rt", rtpTags], ["rp", rtpTags], ["tbody", tableSectionTags], ["tfoot", tableSectionTags] ]); var voidElements = new Set([ "area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr" ]); var foreignContextElements = new Set(["math", "svg"]); var htmlIntegrationElements = new Set([ "mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignobject", "desc", "title" ]); var reNameEnd = /\s|\//; var Parser = class { constructor(cbs, options = {}) { var _a5, _b, _c, _d, _e, _f; this.options = options; this.startIndex = 0; this.endIndex = 0; this.openTagStart = 0; this.tagname = ""; this.attribname = ""; this.attribvalue = ""; this.attribs = null; this.stack = []; this.buffers = []; this.bufferOffset = 0; this.writeIndex = 0; this.ended = false; this.cbs = cbs !== null && cbs !== void 0 ? cbs : {}; this.htmlMode = !this.options.xmlMode; this.lowerCaseTagNames = (_a5 = options.lowerCaseTags) !== null && _a5 !== void 0 ? _a5 : this.htmlMode; this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode; this.recognizeSelfClosing = (_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode; this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer)(this.options, this); this.foreignContext = [!this.htmlMode]; (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this); } ontext(start, endIndex) { var _a5, _b; const data2 = this.getSlice(start, endIndex); this.endIndex = endIndex - 1; (_b = (_a5 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a5, data2); this.startIndex = endIndex; } ontextentity(cp, endIndex) { var _a5, _b; this.endIndex = endIndex - 1; (_b = (_a5 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a5, fromCodePoint2(cp)); this.startIndex = endIndex; } isVoidElement(name) { return this.htmlMode && voidElements.has(name); } onopentagname(start, endIndex) { this.endIndex = endIndex; let name = this.getSlice(start, endIndex); if (this.lowerCaseTagNames) { name = name.toLowerCase(); } this.emitOpenTag(name); } emitOpenTag(name) { var _a5, _b, _c, _d; this.openTagStart = this.startIndex; this.tagname = name; const impliesClose = this.htmlMode && openImpliesClose.get(name); if (impliesClose) { while (this.stack.length > 0 && impliesClose.has(this.stack[0])) { const element = this.stack.shift(); (_b = (_a5 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a5, element, true); } } if (!this.isVoidElement(name)) { this.stack.unshift(name); if (this.htmlMode) { if (foreignContextElements.has(name)) { this.foreignContext.unshift(true); } else if (htmlIntegrationElements.has(name)) { this.foreignContext.unshift(false); } } } (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name); if (this.cbs.onopentag) this.attribs = {}; } endOpenTag(isImplied) { var _a5, _b; this.startIndex = this.openTagStart; if (this.attribs) { (_b = (_a5 = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a5, this.tagname, this.attribs, isImplied); this.attribs = null; } if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) { this.cbs.onclosetag(this.tagname, true); } this.tagname = ""; } onopentagend(endIndex) { this.endIndex = endIndex; this.endOpenTag(false); this.startIndex = endIndex + 1; } onclosetag(start, endIndex) { var _a5, _b, _c, _d, _e, _f, _g, _h; this.endIndex = endIndex; let name = this.getSlice(start, endIndex); if (this.lowerCaseTagNames) { name = name.toLowerCase(); } if (this.htmlMode && (foreignContextElements.has(name) || htmlIntegrationElements.has(name))) { this.foreignContext.shift(); } if (!this.isVoidElement(name)) { const pos = this.stack.indexOf(name); if (pos !== -1) { for (let index2 = 0; index2 <= pos; index2++) { const element = this.stack.shift(); (_b = (_a5 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a5, element, index2 !== pos); } } else if (this.htmlMode && name === "p") { this.emitOpenTag("p"); this.closeCurrentTag(true); } } else if (this.htmlMode && name === "br") { (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, "br"); (_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, "br", {}, true); (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, "br", false); } this.startIndex = endIndex + 1; } onselfclosingtag(endIndex) { this.endIndex = endIndex; if (this.recognizeSelfClosing || this.foreignContext[0]) { this.closeCurrentTag(false); this.startIndex = endIndex + 1; } else { this.onopentagend(endIndex); } } closeCurrentTag(isOpenImplied) { var _a5, _b; const name = this.tagname; this.endOpenTag(isOpenImplied); if (this.stack[0] === name) { (_b = (_a5 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a5, name, !isOpenImplied); this.stack.shift(); } } onattribname(start, endIndex) { this.startIndex = start; const name = this.getSlice(start, endIndex); this.attribname = this.lowerCaseAttributeNames ? name.toLowerCase() : name; } onattribdata(start, endIndex) { this.attribvalue += this.getSlice(start, endIndex); } onattribentity(cp) { this.attribvalue += fromCodePoint2(cp); } onattribend(quote, endIndex) { var _a5, _b; this.endIndex = endIndex; (_b = (_a5 = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a5, this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null); if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) { this.attribs[this.attribname] = this.attribvalue; } this.attribvalue = ""; } getInstructionName(value) { const index2 = value.search(reNameEnd); let name = index2 < 0 ? value : value.substr(0, index2); if (this.lowerCaseTagNames) { name = name.toLowerCase(); } return name; } ondeclaration(start, endIndex) { this.endIndex = endIndex; const value = this.getSlice(start, endIndex); if (this.cbs.onprocessinginstruction) { const name = this.getInstructionName(value); this.cbs.onprocessinginstruction(`!${name}`, `!${value}`); } this.startIndex = endIndex + 1; } onprocessinginstruction(start, endIndex) { this.endIndex = endIndex; const value = this.getSlice(start, endIndex); if (this.cbs.onprocessinginstruction) { const name = this.getInstructionName(value); this.cbs.onprocessinginstruction(`?${name}`, `?${value}`); } this.startIndex = endIndex + 1; } oncomment(start, endIndex, offset) { var _a5, _b, _c, _d; this.endIndex = endIndex; (_b = (_a5 = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a5, this.getSlice(start, endIndex - offset)); (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c); this.startIndex = endIndex + 1; } oncdata(start, endIndex, offset) { var _a5, _b, _c, _d, _e, _f, _g, _h, _j, _k; this.endIndex = endIndex; const value = this.getSlice(start, endIndex - offset); if (!this.htmlMode || this.options.recognizeCDATA) { (_b = (_a5 = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a5); (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value); (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e); } else { (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`); (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j); } this.startIndex = endIndex + 1; } onend() { var _a5, _b; if (this.cbs.onclosetag) { this.endIndex = this.startIndex; for (let index2 = 0; index2 < this.stack.length; index2++) { this.cbs.onclosetag(this.stack[index2], true); } } (_b = (_a5 = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a5); } reset() { var _a5, _b, _c, _d; (_b = (_a5 = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a5); this.tokenizer.reset(); this.tagname = ""; this.attribname = ""; this.attribs = null; this.stack.length = 0; this.startIndex = 0; this.endIndex = 0; (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this); this.buffers.length = 0; this.foreignContext.length = 0; this.foreignContext.unshift(!this.htmlMode); this.bufferOffset = 0; this.writeIndex = 0; this.ended = false; } parseComplete(data2) { this.reset(); this.end(data2); } getSlice(start, end2) { while (start - this.bufferOffset >= this.buffers[0].length) { this.shiftBuffer(); } let slice2 = this.buffers[0].slice(start - this.bufferOffset, end2 - this.bufferOffset); while (end2 - this.bufferOffset > this.buffers[0].length) { this.shiftBuffer(); slice2 += this.buffers[0].slice(0, end2 - this.bufferOffset); } return slice2; } shiftBuffer() { this.bufferOffset += this.buffers[0].length; this.writeIndex--; this.buffers.shift(); } write(chunk) { var _a5, _b; if (this.ended) { (_b = (_a5 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a5, new Error(".write() after done!")); return; } this.buffers.push(chunk); if (this.tokenizer.running) { this.tokenizer.write(chunk); this.writeIndex++; } } end(chunk) { var _a5, _b; if (this.ended) { (_b = (_a5 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a5, new Error(".end() after done!")); return; } if (chunk) this.write(chunk); this.ended = true; this.tokenizer.end(); } pause() { this.tokenizer.pause(); } resume() { this.tokenizer.resume(); while (this.tokenizer.running && this.writeIndex < this.buffers.length) { this.tokenizer.write(this.buffers[this.writeIndex++]); } if (this.ended) this.tokenizer.end(); } parseChunk(chunk) { this.write(chunk); } done(chunk) { this.end(chunk); } }; // node_modules/htmlparser2/dist/esm/index.js function parseDocument(data2, options) { const handler = new DomHandler(void 0, options); new Parser(handler, options).end(data2); return handler.root; } // node_modules/cheerio/dist/browser/api/attributes.js var _a3; var hasOwn = (_a3 = Object.hasOwn) !== null && _a3 !== void 0 ? _a3 : (object, prop2) => Object.prototype.hasOwnProperty.call(object, prop2); var rspace = /\s+/; var dataAttrPrefix = "data-"; var rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i; var rbrace = /^{[^]*}$|^\[[^]*]$/; function getAttr(elem, name, xmlMode) { var _a5; if (!elem || !isTag2(elem)) return void 0; (_a5 = elem.attribs) !== null && _a5 !== void 0 ? _a5 : elem.attribs = {}; if (!name) { return elem.attribs; } if (hasOwn(elem.attribs, name)) { return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; } if (elem.name === "option" && name === "value") { return text(elem.children); } if (elem.name === "input" && (elem.attribs["type"] === "radio" || elem.attribs["type"] === "checkbox") && name === "value") { return "on"; } return void 0; } function setAttr(el, name, value) { if (value === null) { removeAttribute(el, name); } else { el.attribs[name] = `${value}`; } } function attr(name, value) { if (typeof name === "object" || value !== void 0) { if (typeof value === "function") { if (typeof name !== "string") { { throw new Error("Bad combination of arguments."); } } return domEach(this, (el, i) => { if (isTag2(el)) setAttr(el, name, value.call(el, i, el.attribs[name])); }); } return domEach(this, (el) => { if (!isTag2(el)) return; if (typeof name === "object") { for (const objName of Object.keys(name)) { const objValue = name[objName]; setAttr(el, objName, objValue); } } else { setAttr(el, name, value); } }); } return arguments.length > 1 ? this : getAttr(this[0], name, this.options.xmlMode); } function getProp(el, name, xmlMode) { return name in el ? el[name] : !xmlMode && rboolean.test(name) ? getAttr(el, name, false) !== void 0 : getAttr(el, name, xmlMode); } function setProp(el, name, value, xmlMode) { if (name in el) { el[name] = value; } else { setAttr(el, name, !xmlMode && rboolean.test(name) ? value ? "" : null : `${value}`); } } function prop(name, value) { var _a5; if (typeof name === "string" && value === void 0) { const el = this[0]; if (!el) return void 0; switch (name) { case "style": { const property = this.css(); const keys = Object.keys(property); for (let i = 0; i < keys.length; i++) { property[i] = keys[i]; } property.length = keys.length; return property; } case "tagName": case "nodeName": { if (!isTag2(el)) return void 0; return el.name.toUpperCase(); } case "href": case "src": { if (!isTag2(el)) return void 0; const prop2 = (_a5 = el.attribs) === null || _a5 === void 0 ? void 0 : _a5[name]; if (typeof URL !== "undefined" && (name === "href" && (el.tagName === "a" || el.tagName === "link") || name === "src" && (el.tagName === "img" || el.tagName === "iframe" || el.tagName === "audio" || el.tagName === "video" || el.tagName === "source")) && prop2 !== void 0 && this.options.baseURI) { return new URL(prop2, this.options.baseURI).href; } return prop2; } case "innerText": { return innerText(el); } case "textContent": { return textContent(el); } case "outerHTML": { if (el.type === esm_exports.Root) return this.html(); return this.clone().wrap("").parent().html(); } case "innerHTML": { return this.html(); } default: { if (!isTag2(el)) return void 0; return getProp(el, name, this.options.xmlMode); } } } if (typeof name === "object" || value !== void 0) { if (typeof value === "function") { if (typeof name === "object") { throw new TypeError("Bad combination of arguments."); } return domEach(this, (el, i) => { if (isTag2(el)) { setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode); } }); } return domEach(this, (el) => { if (!isTag2(el)) return; if (typeof name === "object") { for (const key of Object.keys(name)) { const val2 = name[key]; setProp(el, key, val2, this.options.xmlMode); } } else { setProp(el, name, value, this.options.xmlMode); } }); } return void 0; } function setData(elem, name, value) { var _a5; (_a5 = elem.data) !== null && _a5 !== void 0 ? _a5 : elem.data = {}; if (typeof name === "object") Object.assign(elem.data, name); else if (typeof name === "string" && value !== void 0) { elem.data[name] = value; } } function readAllData(el) { for (const domName of Object.keys(el.attribs)) { if (!domName.startsWith(dataAttrPrefix)) { continue; } const jsName = camelCase(domName.slice(dataAttrPrefix.length)); if (!hasOwn(el.data, jsName)) { el.data[jsName] = parseDataValue(el.attribs[domName]); } } return el.data; } function readData(el, name) { const domName = dataAttrPrefix + cssCase(name); const data2 = el.data; if (hasOwn(data2, name)) { return data2[name]; } if (hasOwn(el.attribs, domName)) { return data2[name] = parseDataValue(el.attribs[domName]); } return void 0; } function parseDataValue(value) { if (value === "null") return null; if (value === "true") return true; if (value === "false") return false; const num = Number(value); if (value === String(num)) return num; if (rbrace.test(value)) { try { return JSON.parse(value); } catch (e) { } } return value; } function data(name, value) { var _a5; const elem = this[0]; if (!elem || !isTag2(elem)) return; const dataEl = elem; (_a5 = dataEl.data) !== null && _a5 !== void 0 ? _a5 : dataEl.data = {}; if (name == null) { return readAllData(dataEl); } if (typeof name === "object" || value !== void 0) { domEach(this, (el) => { if (isTag2(el)) { if (typeof name === "object") setData(el, name); else setData(el, name, value); } }); return this; } return readData(dataEl, name); } function val(value) { const querying = arguments.length === 0; const element = this[0]; if (!element || !isTag2(element)) return querying ? void 0 : this; switch (element.name) { case "textarea": { return this.text(value); } case "select": { const option = this.find("option:selected"); if (!querying) { if (this.attr("multiple") == null && typeof value === "object") { return this; } this.find("option").removeAttr("selected"); const values = typeof value === "object" ? value : [value]; for (const val2 of values) { this.find(`option[value="${val2}"]`).attr("selected", ""); } return this; } return this.attr("multiple") ? option.toArray().map((el) => text(el.children)) : option.attr("value"); } case "input": case "option": { return querying ? this.attr("value") : this.attr("value", value); } } return void 0; } function removeAttribute(elem, name) { if (!elem.attribs || !hasOwn(elem.attribs, name)) return; delete elem.attribs[name]; } function splitNames(names) { return names ? names.trim().split(rspace) : []; } function removeAttr(name) { const attrNames = splitNames(name); for (const attrName of attrNames) { domEach(this, (elem) => { if (isTag2(elem)) removeAttribute(elem, attrName); }); } return this; } function hasClass(className) { return this.toArray().some((elem) => { const clazz = isTag2(elem) && elem.attribs["class"]; let idx = -1; if (clazz && className.length > 0) { while ((idx = clazz.indexOf(className, idx + 1)) > -1) { const end2 = idx + className.length; if ((idx === 0 || rspace.test(clazz[idx - 1])) && (end2 === clazz.length || rspace.test(clazz[end2]))) { return true; } } } return false; }); } function addClass(value) { if (typeof value === "function") { return domEach(this, (el, i) => { if (isTag2(el)) { const className = el.attribs["class"] || ""; addClass.call([el], value.call(el, i, className)); } }); } if (!value || typeof value !== "string") return this; const classNames = value.split(rspace); const numElements = this.length; for (let i = 0; i < numElements; i++) { const el = this[i]; if (!isTag2(el)) continue; const className = getAttr(el, "class", false); if (className) { let setClass = ` ${className} `; for (const cn of classNames) { const appendClass = `${cn} `; if (!setClass.includes(` ${appendClass}`)) setClass += appendClass; } setAttr(el, "class", setClass.trim()); } else { setAttr(el, "class", classNames.join(" ").trim()); } } return this; } function removeClass(name) { if (typeof name === "function") { return domEach(this, (el, i) => { if (isTag2(el)) { removeClass.call([el], name.call(el, i, el.attribs["class"] || "")); } }); } const classes = splitNames(name); const numClasses = classes.length; const removeAll = arguments.length === 0; return domEach(this, (el) => { if (!isTag2(el)) return; if (removeAll) { el.attribs["class"] = ""; } else { const elClasses = splitNames(el.attribs["class"]); let changed = false; for (let j = 0; j < numClasses; j++) { const index2 = elClasses.indexOf(classes[j]); if (index2 !== -1) { elClasses.splice(index2, 1); changed = true; j--; } } if (changed) { el.attribs["class"] = elClasses.join(" "); } } }); } function toggleClass(value, stateVal) { if (typeof value === "function") { return domEach(this, (el, i) => { if (isTag2(el)) { toggleClass.call([el], value.call(el, i, el.attribs["class"] || "", stateVal), stateVal); } }); } if (!value || typeof value !== "string") return this; const classNames = value.split(rspace); const numClasses = classNames.length; const state = typeof stateVal === "boolean" ? stateVal ? 1 : -1 : 0; const numElements = this.length; for (let i = 0; i < numElements; i++) { const el = this[i]; if (!isTag2(el)) continue; const elementClasses = splitNames(el.attribs["class"]); for (let j = 0; j < numClasses; j++) { const index2 = elementClasses.indexOf(classNames[j]); if (state >= 0 && index2 === -1) { elementClasses.push(classNames[j]); } else if (state <= 0 && index2 !== -1) { elementClasses.splice(index2, 1); } } el.attribs["class"] = elementClasses.join(" "); } return this; } // node_modules/cheerio/dist/browser/api/traversing.js var traversing_exports = {}; __export(traversing_exports, { _findBySelector: () => _findBySelector, add: () => add, addBack: () => addBack, children: () => children, closest: () => closest, contents: () => contents, each: () => each, end: () => end, eq: () => eq, filter: () => filter3, filterArray: () => filterArray, find: () => find3, first: () => first, get: () => get, has: () => has, index: () => index, is: () => is3, last: () => last, map: () => map, next: () => next, nextAll: () => nextAll, nextUntil: () => nextUntil, not: () => not, parent: () => parent, parents: () => parents, parentsUntil: () => parentsUntil, prev: () => prev, prevAll: () => prevAll, prevUntil: () => prevUntil, siblings: () => siblings, slice: () => slice, toArray: () => toArray }); // node_modules/css-what/lib/es/types.js var SelectorType; (function(SelectorType2) { SelectorType2["Attribute"] = "attribute"; SelectorType2["Pseudo"] = "pseudo"; SelectorType2["PseudoElement"] = "pseudo-element"; SelectorType2["Tag"] = "tag"; SelectorType2["Universal"] = "universal"; SelectorType2["Adjacent"] = "adjacent"; SelectorType2["Child"] = "child"; SelectorType2["Descendant"] = "descendant"; SelectorType2["Parent"] = "parent"; SelectorType2["Sibling"] = "sibling"; SelectorType2["ColumnCombinator"] = "column-combinator"; })(SelectorType || (SelectorType = {})); var AttributeAction; (function(AttributeAction2) { AttributeAction2["Any"] = "any"; AttributeAction2["Element"] = "element"; AttributeAction2["End"] = "end"; AttributeAction2["Equals"] = "equals"; AttributeAction2["Exists"] = "exists"; AttributeAction2["Hyphen"] = "hyphen"; AttributeAction2["Not"] = "not"; AttributeAction2["Start"] = "start"; })(AttributeAction || (AttributeAction = {})); // node_modules/css-what/lib/es/parse.js var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/; var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi; var actionTypes = new Map([ [126, AttributeAction.Element], [94, AttributeAction.Start], [36, AttributeAction.End], [42, AttributeAction.Any], [33, AttributeAction.Not], [124, AttributeAction.Hyphen] ]); var unpackPseudos = new Set([ "has", "not", "matches", "is", "where", "host", "host-context" ]); function isTraversal(selector) { switch (selector.type) { case SelectorType.Adjacent: case SelectorType.Child: case SelectorType.Descendant: case SelectorType.Parent: case SelectorType.Sibling: case SelectorType.ColumnCombinator: return true; default: return false; } } var stripQuotesFromPseudos = new Set(["contains", "icontains"]); function funescape(_, escaped, escapedWhitespace) { const high = parseInt(escaped, 16) - 65536; return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); } function unescapeCSS(str) { return str.replace(reEscape, funescape); } function isQuote(c) { return c === 39 || c === 34; } function isWhitespace2(c) { return c === 32 || c === 9 || c === 10 || c === 12 || c === 13; } function parse(selector) { const subselects2 = []; const endIndex = parseSelector(subselects2, `${selector}`, 0); if (endIndex < selector.length) { throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`); } return subselects2; } function parseSelector(subselects2, selector, selectorIndex) { let tokens = []; function getName2(offset) { const match = selector.slice(selectorIndex + offset).match(reName); if (!match) { throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`); } const [name] = match; selectorIndex += offset + name.length; return unescapeCSS(name); } function stripWhitespace(offset) { selectorIndex += offset; while (selectorIndex < selector.length && isWhitespace2(selector.charCodeAt(selectorIndex))) { selectorIndex++; } } function readValueWithParenthesis() { selectorIndex += 1; const start = selectorIndex; let counter = 1; for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) { if (selector.charCodeAt(selectorIndex) === 40 && !isEscaped(selectorIndex)) { counter++; } else if (selector.charCodeAt(selectorIndex) === 41 && !isEscaped(selectorIndex)) { counter--; } } if (counter) { throw new Error("Parenthesis not matched"); } return unescapeCSS(selector.slice(start, selectorIndex - 1)); } function isEscaped(pos) { let slashCount = 0; while (selector.charCodeAt(--pos) === 92) slashCount++; return (slashCount & 1) === 1; } function ensureNotTraversal() { if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) { throw new Error("Did not expect successive traversals."); } } function addTraversal(type) { if (tokens.length > 0 && tokens[tokens.length - 1].type === SelectorType.Descendant) { tokens[tokens.length - 1].type = type; return; } ensureNotTraversal(); tokens.push({ type }); } function addSpecialAttribute(name, action) { tokens.push({ type: SelectorType.Attribute, name, action, value: getName2(1), namespace: null, ignoreCase: "quirks" }); } function finalizeSubselector() { if (tokens.length && tokens[tokens.length - 1].type === SelectorType.Descendant) { tokens.pop(); } if (tokens.length === 0) { throw new Error("Empty sub-selector"); } subselects2.push(tokens); } stripWhitespace(0); if (selector.length === selectorIndex) { return selectorIndex; } loop: while (selectorIndex < selector.length) { const firstChar = selector.charCodeAt(selectorIndex); switch (firstChar) { case 32: case 9: case 10: case 12: case 13: { if (tokens.length === 0 || tokens[0].type !== SelectorType.Descendant) { ensureNotTraversal(); tokens.push({ type: SelectorType.Descendant }); } stripWhitespace(1); break; } case 62: { addTraversal(SelectorType.Child); stripWhitespace(1); break; } case 60: { addTraversal(SelectorType.Parent); stripWhitespace(1); break; } case 126: { addTraversal(SelectorType.Sibling); stripWhitespace(1); break; } case 43: { addTraversal(SelectorType.Adjacent); stripWhitespace(1); break; } case 46: { addSpecialAttribute("class", AttributeAction.Element); break; } case 35: { addSpecialAttribute("id", AttributeAction.Equals); break; } case 91: { stripWhitespace(1); let name; let namespace = null; if (selector.charCodeAt(selectorIndex) === 124) { name = getName2(1); } else if (selector.startsWith("*|", selectorIndex)) { namespace = "*"; name = getName2(2); } else { name = getName2(0); if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 61) { namespace = name; name = getName2(1); } } stripWhitespace(0); let action = AttributeAction.Exists; const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex)); if (possibleAction) { action = possibleAction; if (selector.charCodeAt(selectorIndex + 1) !== 61) { throw new Error("Expected `=`"); } stripWhitespace(2); } else if (selector.charCodeAt(selectorIndex) === 61) { action = AttributeAction.Equals; stripWhitespace(1); } let value = ""; let ignoreCase = null; if (action !== "exists") { if (isQuote(selector.charCodeAt(selectorIndex))) { const quote = selector.charCodeAt(selectorIndex); let sectionEnd = selectorIndex + 1; while (sectionEnd < selector.length && (selector.charCodeAt(sectionEnd) !== quote || isEscaped(sectionEnd))) { sectionEnd += 1; } if (selector.charCodeAt(sectionEnd) !== quote) { throw new Error("Attribute value didn't end"); } value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd)); selectorIndex = sectionEnd + 1; } else { const valueStart = selectorIndex; while (selectorIndex < selector.length && (!isWhitespace2(selector.charCodeAt(selectorIndex)) && selector.charCodeAt(selectorIndex) !== 93 || isEscaped(selectorIndex))) { selectorIndex += 1; } value = unescapeCSS(selector.slice(valueStart, selectorIndex)); } stripWhitespace(0); const forceIgnore = selector.charCodeAt(selectorIndex) | 32; if (forceIgnore === 115) { ignoreCase = false; stripWhitespace(1); } else if (forceIgnore === 105) { ignoreCase = true; stripWhitespace(1); } } if (selector.charCodeAt(selectorIndex) !== 93) { throw new Error("Attribute selector didn't terminate"); } selectorIndex += 1; const attributeSelector = { type: SelectorType.Attribute, name, action, value, namespace, ignoreCase }; tokens.push(attributeSelector); break; } case 58: { if (selector.charCodeAt(selectorIndex + 1) === 58) { tokens.push({ type: SelectorType.PseudoElement, name: getName2(2).toLowerCase(), data: selector.charCodeAt(selectorIndex) === 40 ? readValueWithParenthesis() : null }); continue; } const name = getName2(1).toLowerCase(); let data2 = null; if (selector.charCodeAt(selectorIndex) === 40) { if (unpackPseudos.has(name)) { if (isQuote(selector.charCodeAt(selectorIndex + 1))) { throw new Error(`Pseudo-selector ${name} cannot be quoted`); } data2 = []; selectorIndex = parseSelector(data2, selector, selectorIndex + 1); if (selector.charCodeAt(selectorIndex) !== 41) { throw new Error(`Missing closing parenthesis in :${name} (${selector})`); } selectorIndex += 1; } else { data2 = readValueWithParenthesis(); if (stripQuotesFromPseudos.has(name)) { const quot = data2.charCodeAt(0); if (quot === data2.charCodeAt(data2.length - 1) && isQuote(quot)) { data2 = data2.slice(1, -1); } } data2 = unescapeCSS(data2); } } tokens.push({ type: SelectorType.Pseudo, name, data: data2 }); break; } case 44: { finalizeSubselector(); tokens = []; stripWhitespace(1); break; } default: { if (selector.startsWith("/*", selectorIndex)) { const endIndex = selector.indexOf("*/", selectorIndex + 2); if (endIndex < 0) { throw new Error("Comment was not terminated"); } selectorIndex = endIndex + 2; if (tokens.length === 0) { stripWhitespace(0); } break; } let namespace = null; let name; if (firstChar === 42) { selectorIndex += 1; name = "*"; } else if (firstChar === 124) { name = ""; if (selector.charCodeAt(selectorIndex + 1) === 124) { addTraversal(SelectorType.ColumnCombinator); stripWhitespace(2); break; } } else if (reName.test(selector.slice(selectorIndex))) { name = getName2(0); } else { break loop; } if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 124) { namespace = name; if (selector.charCodeAt(selectorIndex + 1) === 42) { name = "*"; selectorIndex += 2; } else { name = getName2(1); } } tokens.push(name === "*" ? { type: SelectorType.Universal, namespace } : { type: SelectorType.Tag, name, namespace }); } } } finalizeSubselector(); return selectorIndex; } // node_modules/css-select/lib/esm/index.js var import_boolbase6 = __toModule(require_boolbase()); // node_modules/css-select/lib/esm/compile.js var import_boolbase5 = __toModule(require_boolbase()); // node_modules/css-select/lib/esm/sort.js var procedure = new Map([ [SelectorType.Universal, 50], [SelectorType.Tag, 30], [SelectorType.Attribute, 1], [SelectorType.Pseudo, 0] ]); function isTraversal2(token) { return !procedure.has(token.type); } var attributes = new Map([ [AttributeAction.Exists, 10], [AttributeAction.Equals, 8], [AttributeAction.Not, 7], [AttributeAction.Start, 6], [AttributeAction.End, 6], [AttributeAction.Any, 5] ]); function sortByProcedure(arr) { const procs = arr.map(getProcedure); for (let i = 1; i < arr.length; i++) { const procNew = procs[i]; if (procNew < 0) continue; for (let j = i - 1; j >= 0 && procNew < procs[j]; j--) { const token = arr[j + 1]; arr[j + 1] = arr[j]; arr[j] = token; procs[j + 1] = procs[j]; procs[j] = procNew; } } } function getProcedure(token) { var _a5, _b; let proc = (_a5 = procedure.get(token.type)) !== null && _a5 !== void 0 ? _a5 : -1; if (token.type === SelectorType.Attribute) { proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4; if (token.action === AttributeAction.Equals && token.name === "id") { proc = 9; } if (token.ignoreCase) { proc >>= 1; } } else if (token.type === SelectorType.Pseudo) { if (!token.data) { proc = 3; } else if (token.name === "has" || token.name === "contains") { proc = 0; } else if (Array.isArray(token.data)) { proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure)))); if (proc < 0) { proc = 0; } } else { proc = 2; } } return proc; } // node_modules/css-select/lib/esm/attributes.js var import_boolbase = __toModule(require_boolbase()); var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; function escapeRegex(value) { return value.replace(reChars, "\\$&"); } var caseInsensitiveAttributes = new Set([ "accept", "accept-charset", "align", "alink", "axis", "bgcolor", "charset", "checked", "clear", "codetype", "color", "compact", "declare", "defer", "dir", "direction", "disabled", "enctype", "face", "frame", "hreflang", "http-equiv", "lang", "language", "link", "media", "method", "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly", "rel", "rev", "rules", "scope", "scrolling", "selected", "shape", "target", "text", "type", "valign", "valuetype", "vlink" ]); function shouldIgnoreCase(selector, options) { return typeof selector.ignoreCase === "boolean" ? selector.ignoreCase : selector.ignoreCase === "quirks" ? !!options.quirksMode : !options.xmlMode && caseInsensitiveAttributes.has(selector.name); } var attributeRules = { equals(next2, data2, options) { const { adapter: adapter2 } = options; const { name } = data2; let { value } = data2; if (shouldIgnoreCase(data2, options)) { value = value.toLowerCase(); return (elem) => { const attr2 = adapter2.getAttributeValue(elem, name); return attr2 != null && attr2.length === value.length && attr2.toLowerCase() === value && next2(elem); }; } return (elem) => adapter2.getAttributeValue(elem, name) === value && next2(elem); }, hyphen(next2, data2, options) { const { adapter: adapter2 } = options; const { name } = data2; let { value } = data2; const len = value.length; if (shouldIgnoreCase(data2, options)) { value = value.toLowerCase(); return function hyphenIC(elem) { const attr2 = adapter2.getAttributeValue(elem, name); return attr2 != null && (attr2.length === len || attr2.charAt(len) === "-") && attr2.substr(0, len).toLowerCase() === value && next2(elem); }; } return function hyphen(elem) { const attr2 = adapter2.getAttributeValue(elem, name); return attr2 != null && (attr2.length === len || attr2.charAt(len) === "-") && attr2.substr(0, len) === value && next2(elem); }; }, element(next2, data2, options) { const { adapter: adapter2 } = options; const { name, value } = data2; if (/\s/.test(value)) { return import_boolbase.default.falseFunc; } const regex = new RegExp(`(?:^|\\s)${escapeRegex(value)}(?:$|\\s)`, shouldIgnoreCase(data2, options) ? "i" : ""); return function element(elem) { const attr2 = adapter2.getAttributeValue(elem, name); return attr2 != null && attr2.length >= value.length && regex.test(attr2) && next2(elem); }; }, exists(next2, { name }, { adapter: adapter2 }) { return (elem) => adapter2.hasAttrib(elem, name) && next2(elem); }, start(next2, data2, options) { const { adapter: adapter2 } = options; const { name } = data2; let { value } = data2; const len = value.length; if (len === 0) { return import_boolbase.default.falseFunc; } if (shouldIgnoreCase(data2, options)) { value = value.toLowerCase(); return (elem) => { const attr2 = adapter2.getAttributeValue(elem, name); return attr2 != null && attr2.length >= len && attr2.substr(0, len).toLowerCase() === value && next2(elem); }; } return (elem) => { var _a5; return !!((_a5 = adapter2.getAttributeValue(elem, name)) === null || _a5 === void 0 ? void 0 : _a5.startsWith(value)) && next2(elem); }; }, end(next2, data2, options) { const { adapter: adapter2 } = options; const { name } = data2; let { value } = data2; const len = -value.length; if (len === 0) { return import_boolbase.default.falseFunc; } if (shouldIgnoreCase(data2, options)) { value = value.toLowerCase(); return (elem) => { var _a5; return ((_a5 = adapter2.getAttributeValue(elem, name)) === null || _a5 === void 0 ? void 0 : _a5.substr(len).toLowerCase()) === value && next2(elem); }; } return (elem) => { var _a5; return !!((_a5 = adapter2.getAttributeValue(elem, name)) === null || _a5 === void 0 ? void 0 : _a5.endsWith(value)) && next2(elem); }; }, any(next2, data2, options) { const { adapter: adapter2 } = options; const { name, value } = data2; if (value === "") { return import_boolbase.default.falseFunc; } if (shouldIgnoreCase(data2, options)) { const regex = new RegExp(escapeRegex(value), "i"); return function anyIC(elem) { const attr2 = adapter2.getAttributeValue(elem, name); return attr2 != null && attr2.length >= value.length && regex.test(attr2) && next2(elem); }; } return (elem) => { var _a5; return !!((_a5 = adapter2.getAttributeValue(elem, name)) === null || _a5 === void 0 ? void 0 : _a5.includes(value)) && next2(elem); }; }, not(next2, data2, options) { const { adapter: adapter2 } = options; const { name } = data2; let { value } = data2; if (value === "") { return (elem) => !!adapter2.getAttributeValue(elem, name) && next2(elem); } else if (shouldIgnoreCase(data2, options)) { value = value.toLowerCase(); return (elem) => { const attr2 = adapter2.getAttributeValue(elem, name); return (attr2 == null || attr2.length !== value.length || attr2.toLowerCase() !== value) && next2(elem); }; } return (elem) => adapter2.getAttributeValue(elem, name) !== value && next2(elem); } }; // node_modules/nth-check/lib/esm/parse.js var whitespace = new Set([9, 10, 12, 13, 32]); var ZERO = "0".charCodeAt(0); var NINE = "9".charCodeAt(0); function parse2(formula) { formula = formula.trim().toLowerCase(); if (formula === "even") { return [2, 0]; } else if (formula === "odd") { return [2, 1]; } let idx = 0; let a = 0; let sign = readSign(); let number = readNumber(); if (idx < formula.length && formula.charAt(idx) === "n") { idx++; a = sign * (number !== null && number !== void 0 ? number : 1); skipWhitespace(); if (idx < formula.length) { sign = readSign(); skipWhitespace(); number = readNumber(); } else { sign = number = 0; } } if (number === null || idx < formula.length) { throw new Error(`n-th rule couldn't be parsed ('${formula}')`); } return [a, sign * number]; function readSign() { if (formula.charAt(idx) === "-") { idx++; return -1; } if (formula.charAt(idx) === "+") { idx++; } return 1; } function readNumber() { const start = idx; let value = 0; while (idx < formula.length && formula.charCodeAt(idx) >= ZERO && formula.charCodeAt(idx) <= NINE) { value = value * 10 + (formula.charCodeAt(idx) - ZERO); idx++; } return idx === start ? null : value; } function skipWhitespace() { while (idx < formula.length && whitespace.has(formula.charCodeAt(idx))) { idx++; } } } // node_modules/nth-check/lib/esm/compile.js var import_boolbase2 = __toModule(require_boolbase()); function compile(parsed) { const a = parsed[0]; const b = parsed[1] - 1; if (b < 0 && a <= 0) return import_boolbase2.default.falseFunc; if (a === -1) return (index2) => index2 <= b; if (a === 0) return (index2) => index2 === b; if (a === 1) return b < 0 ? import_boolbase2.default.trueFunc : (index2) => index2 >= b; const absA = Math.abs(a); const bMod = (b % absA + absA) % absA; return a > 1 ? (index2) => index2 >= b && index2 % absA === bMod : (index2) => index2 <= b && index2 % absA === bMod; } // node_modules/nth-check/lib/esm/index.js function nthCheck(formula) { return compile(parse2(formula)); } // node_modules/css-select/lib/esm/pseudo-selectors/filters.js var import_boolbase3 = __toModule(require_boolbase()); function getChildFunc(next2, adapter2) { return (elem) => { const parent2 = adapter2.getParent(elem); return parent2 != null && adapter2.isTag(parent2) && next2(elem); }; } var filters = { contains(next2, text3, { adapter: adapter2 }) { return function contains2(elem) { return next2(elem) && adapter2.getText(elem).includes(text3); }; }, icontains(next2, text3, { adapter: adapter2 }) { const itext = text3.toLowerCase(); return function icontains(elem) { return next2(elem) && adapter2.getText(elem).toLowerCase().includes(itext); }; }, "nth-child"(next2, rule, { adapter: adapter2, equals }) { const func = nthCheck(rule); if (func === import_boolbase3.default.falseFunc) return import_boolbase3.default.falseFunc; if (func === import_boolbase3.default.trueFunc) return getChildFunc(next2, adapter2); return function nthChild(elem) { const siblings2 = adapter2.getSiblings(elem); let pos = 0; for (let i = 0; i < siblings2.length; i++) { if (equals(elem, siblings2[i])) break; if (adapter2.isTag(siblings2[i])) { pos++; } } return func(pos) && next2(elem); }; }, "nth-last-child"(next2, rule, { adapter: adapter2, equals }) { const func = nthCheck(rule); if (func === import_boolbase3.default.falseFunc) return import_boolbase3.default.falseFunc; if (func === import_boolbase3.default.trueFunc) return getChildFunc(next2, adapter2); return function nthLastChild(elem) { const siblings2 = adapter2.getSiblings(elem); let pos = 0; for (let i = siblings2.length - 1; i >= 0; i--) { if (equals(elem, siblings2[i])) break; if (adapter2.isTag(siblings2[i])) { pos++; } } return func(pos) && next2(elem); }; }, "nth-of-type"(next2, rule, { adapter: adapter2, equals }) { const func = nthCheck(rule); if (func === import_boolbase3.default.falseFunc) return import_boolbase3.default.falseFunc; if (func === import_boolbase3.default.trueFunc) return getChildFunc(next2, adapter2); return function nthOfType(elem) { const siblings2 = adapter2.getSiblings(elem); let pos = 0; for (let i = 0; i < siblings2.length; i++) { const currentSibling = siblings2[i]; if (equals(elem, currentSibling)) break; if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === adapter2.getName(elem)) { pos++; } } return func(pos) && next2(elem); }; }, "nth-last-of-type"(next2, rule, { adapter: adapter2, equals }) { const func = nthCheck(rule); if (func === import_boolbase3.default.falseFunc) return import_boolbase3.default.falseFunc; if (func === import_boolbase3.default.trueFunc) return getChildFunc(next2, adapter2); return function nthLastOfType(elem) { const siblings2 = adapter2.getSiblings(elem); let pos = 0; for (let i = siblings2.length - 1; i >= 0; i--) { const currentSibling = siblings2[i]; if (equals(elem, currentSibling)) break; if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === adapter2.getName(elem)) { pos++; } } return func(pos) && next2(elem); }; }, root(next2, _rule, { adapter: adapter2 }) { return (elem) => { const parent2 = adapter2.getParent(elem); return (parent2 == null || !adapter2.isTag(parent2)) && next2(elem); }; }, scope(next2, rule, options, context) { const { equals } = options; if (!context || context.length === 0) { return filters["root"](next2, rule, options); } if (context.length === 1) { return (elem) => equals(context[0], elem) && next2(elem); } return (elem) => context.includes(elem) && next2(elem); }, hover: dynamicStatePseudo("isHovered"), visited: dynamicStatePseudo("isVisited"), active: dynamicStatePseudo("isActive") }; function dynamicStatePseudo(name) { return function dynamicPseudo(next2, _rule, { adapter: adapter2 }) { const func = adapter2[name]; if (typeof func !== "function") { return import_boolbase3.default.falseFunc; } return function active(elem) { return func(elem) && next2(elem); }; }; } // node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js var pseudos = { empty(elem, { adapter: adapter2 }) { return !adapter2.getChildren(elem).some((elem2) => adapter2.isTag(elem2) || adapter2.getText(elem2) !== ""); }, "first-child"(elem, { adapter: adapter2, equals }) { if (adapter2.prevElementSibling) { return adapter2.prevElementSibling(elem) == null; } const firstChild = adapter2.getSiblings(elem).find((elem2) => adapter2.isTag(elem2)); return firstChild != null && equals(elem, firstChild); }, "last-child"(elem, { adapter: adapter2, equals }) { const siblings2 = adapter2.getSiblings(elem); for (let i = siblings2.length - 1; i >= 0; i--) { if (equals(elem, siblings2[i])) return true; if (adapter2.isTag(siblings2[i])) break; } return false; }, "first-of-type"(elem, { adapter: adapter2, equals }) { const siblings2 = adapter2.getSiblings(elem); const elemName = adapter2.getName(elem); for (let i = 0; i < siblings2.length; i++) { const currentSibling = siblings2[i]; if (equals(elem, currentSibling)) return true; if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === elemName) { break; } } return false; }, "last-of-type"(elem, { adapter: adapter2, equals }) { const siblings2 = adapter2.getSiblings(elem); const elemName = adapter2.getName(elem); for (let i = siblings2.length - 1; i >= 0; i--) { const currentSibling = siblings2[i]; if (equals(elem, currentSibling)) return true; if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === elemName) { break; } } return false; }, "only-of-type"(elem, { adapter: adapter2, equals }) { const elemName = adapter2.getName(elem); return adapter2.getSiblings(elem).every((sibling) => equals(elem, sibling) || !adapter2.isTag(sibling) || adapter2.getName(sibling) !== elemName); }, "only-child"(elem, { adapter: adapter2, equals }) { return adapter2.getSiblings(elem).every((sibling) => equals(elem, sibling) || !adapter2.isTag(sibling)); } }; function verifyPseudoArgs(func, name, subselect, argIndex) { if (subselect === null) { if (func.length > argIndex) { throw new Error(`Pseudo-class :${name} requires an argument`); } } else if (func.length === argIndex) { throw new Error(`Pseudo-class :${name} doesn't have any arguments`); } } // node_modules/css-select/lib/esm/pseudo-selectors/aliases.js var aliases = { "any-link": ":is(a, area, link)[href]", link: ":any-link:not(:visited)", disabled: `:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) )`, enabled: ":not(:disabled)", checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)", required: ":is(input, select, textarea)[required]", optional: ":is(input, select, textarea):not([required])", selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)", checkbox: "[type=checkbox]", file: "[type=file]", password: "[type=password]", radio: "[type=radio]", reset: "[type=reset]", image: "[type=image]", submit: "[type=submit]", parent: ":not(:empty)", header: ":is(h1, h2, h3, h4, h5, h6)", button: ":is(button, input[type=button])", input: ":is(input, textarea, select, button)", text: "input:is(:not([type!='']), [type=text])" }; // node_modules/css-select/lib/esm/pseudo-selectors/subselects.js var import_boolbase4 = __toModule(require_boolbase()); var PLACEHOLDER_ELEMENT = {}; function ensureIsTag(next2, adapter2) { if (next2 === import_boolbase4.default.falseFunc) return import_boolbase4.default.falseFunc; return (elem) => adapter2.isTag(elem) && next2(elem); } function getNextSiblings(elem, adapter2) { const siblings2 = adapter2.getSiblings(elem); if (siblings2.length <= 1) return []; const elemIndex = siblings2.indexOf(elem); if (elemIndex < 0 || elemIndex === siblings2.length - 1) return []; return siblings2.slice(elemIndex + 1).filter(adapter2.isTag); } function copyOptions(options) { return { xmlMode: !!options.xmlMode, lowerCaseAttributeNames: !!options.lowerCaseAttributeNames, lowerCaseTags: !!options.lowerCaseTags, quirksMode: !!options.quirksMode, cacheResults: !!options.cacheResults, pseudos: options.pseudos, adapter: options.adapter, equals: options.equals }; } var is = (next2, token, options, context, compileToken2) => { const func = compileToken2(token, copyOptions(options), context); return func === import_boolbase4.default.trueFunc ? next2 : func === import_boolbase4.default.falseFunc ? import_boolbase4.default.falseFunc : (elem) => func(elem) && next2(elem); }; var subselects = { is, matches: is, where: is, not(next2, token, options, context, compileToken2) { const func = compileToken2(token, copyOptions(options), context); return func === import_boolbase4.default.falseFunc ? next2 : func === import_boolbase4.default.trueFunc ? import_boolbase4.default.falseFunc : (elem) => !func(elem) && next2(elem); }, has(next2, subselect, options, _context, compileToken2) { const { adapter: adapter2 } = options; const opts = copyOptions(options); opts.relativeSelector = true; const context = subselect.some((s) => s.some(isTraversal2)) ? [PLACEHOLDER_ELEMENT] : void 0; const compiled = compileToken2(subselect, opts, context); if (compiled === import_boolbase4.default.falseFunc) return import_boolbase4.default.falseFunc; const hasElement = ensureIsTag(compiled, adapter2); if (context && compiled !== import_boolbase4.default.trueFunc) { const { shouldTestNextSiblings = false } = compiled; return (elem) => { if (!next2(elem)) return false; context[0] = elem; const childs = adapter2.getChildren(elem); const nextElements = shouldTestNextSiblings ? [...childs, ...getNextSiblings(elem, adapter2)] : childs; return adapter2.existsOne(hasElement, nextElements); }; } return (elem) => next2(elem) && adapter2.existsOne(hasElement, adapter2.getChildren(elem)); } }; // node_modules/css-select/lib/esm/pseudo-selectors/index.js function compilePseudoSelector(next2, selector, options, context, compileToken2) { var _a5; const { name, data: data2 } = selector; if (Array.isArray(data2)) { if (!(name in subselects)) { throw new Error(`Unknown pseudo-class :${name}(${data2})`); } return subselects[name](next2, data2, options, context, compileToken2); } const userPseudo = (_a5 = options.pseudos) === null || _a5 === void 0 ? void 0 : _a5[name]; const stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases[name]; if (typeof stringPseudo === "string") { if (data2 != null) { throw new Error(`Pseudo ${name} doesn't have any arguments`); } const alias = parse(stringPseudo); return subselects["is"](next2, alias, options, context, compileToken2); } if (typeof userPseudo === "function") { verifyPseudoArgs(userPseudo, name, data2, 1); return (elem) => userPseudo(elem, data2) && next2(elem); } if (name in filters) { return filters[name](next2, data2, options, context); } if (name in pseudos) { const pseudo = pseudos[name]; verifyPseudoArgs(pseudo, name, data2, 2); return (elem) => pseudo(elem, options, data2) && next2(elem); } throw new Error(`Unknown pseudo-class :${name}`); } // node_modules/css-select/lib/esm/general.js function getElementParent(node, adapter2) { const parent2 = adapter2.getParent(node); if (parent2 && adapter2.isTag(parent2)) { return parent2; } return null; } function compileGeneralSelector(next2, selector, options, context, compileToken2) { const { adapter: adapter2, equals } = options; switch (selector.type) { case SelectorType.PseudoElement: { throw new Error("Pseudo-elements are not supported by css-select"); } case SelectorType.ColumnCombinator: { throw new Error("Column combinators are not yet supported by css-select"); } case SelectorType.Attribute: { if (selector.namespace != null) { throw new Error("Namespaced attributes are not yet supported by css-select"); } if (!options.xmlMode || options.lowerCaseAttributeNames) { selector.name = selector.name.toLowerCase(); } return attributeRules[selector.action](next2, selector, options); } case SelectorType.Pseudo: { return compilePseudoSelector(next2, selector, options, context, compileToken2); } case SelectorType.Tag: { if (selector.namespace != null) { throw new Error("Namespaced tag names are not yet supported by css-select"); } let { name } = selector; if (!options.xmlMode || options.lowerCaseTags) { name = name.toLowerCase(); } return function tag(elem) { return adapter2.getName(elem) === name && next2(elem); }; } case SelectorType.Descendant: { if (options.cacheResults === false || typeof WeakSet === "undefined") { return function descendant(elem) { let current = elem; while (current = getElementParent(current, adapter2)) { if (next2(current)) { return true; } } return false; }; } const isFalseCache = new WeakSet(); return function cachedDescendant(elem) { let current = elem; while (current = getElementParent(current, adapter2)) { if (!isFalseCache.has(current)) { if (adapter2.isTag(current) && next2(current)) { return true; } isFalseCache.add(current); } } return false; }; } case "_flexibleDescendant": { return function flexibleDescendant(elem) { let current = elem; do { if (next2(current)) return true; } while (current = getElementParent(current, adapter2)); return false; }; } case SelectorType.Parent: { return function parent2(elem) { return adapter2.getChildren(elem).some((elem2) => adapter2.isTag(elem2) && next2(elem2)); }; } case SelectorType.Child: { return function child(elem) { const parent2 = adapter2.getParent(elem); return parent2 != null && adapter2.isTag(parent2) && next2(parent2); }; } case SelectorType.Sibling: { return function sibling(elem) { const siblings2 = adapter2.getSiblings(elem); for (let i = 0; i < siblings2.length; i++) { const currentSibling = siblings2[i]; if (equals(elem, currentSibling)) break; if (adapter2.isTag(currentSibling) && next2(currentSibling)) { return true; } } return false; }; } case SelectorType.Adjacent: { if (adapter2.prevElementSibling) { return function adjacent(elem) { const previous = adapter2.prevElementSibling(elem); return previous != null && next2(previous); }; } return function adjacent(elem) { const siblings2 = adapter2.getSiblings(elem); let lastElement; for (let i = 0; i < siblings2.length; i++) { const currentSibling = siblings2[i]; if (equals(elem, currentSibling)) break; if (adapter2.isTag(currentSibling)) { lastElement = currentSibling; } } return !!lastElement && next2(lastElement); }; } case SelectorType.Universal: { if (selector.namespace != null && selector.namespace !== "*") { throw new Error("Namespaced universal selectors are not yet supported by css-select"); } return next2; } } } // node_modules/css-select/lib/esm/compile.js function compile2(selector, options, context) { const next2 = compileUnsafe(selector, options, context); return ensureIsTag(next2, options.adapter); } function compileUnsafe(selector, options, context) { const token = typeof selector === "string" ? parse(selector) : selector; return compileToken(token, options, context); } function includesScopePseudo(t) { return t.type === SelectorType.Pseudo && (t.name === "scope" || Array.isArray(t.data) && t.data.some((data2) => data2.some(includesScopePseudo))); } var DESCENDANT_TOKEN = { type: SelectorType.Descendant }; var FLEXIBLE_DESCENDANT_TOKEN = { type: "_flexibleDescendant" }; var SCOPE_TOKEN = { type: SelectorType.Pseudo, name: "scope", data: null }; function absolutize(token, { adapter: adapter2 }, context) { const hasContext = !!(context === null || context === void 0 ? void 0 : context.every((e) => { const parent2 = adapter2.isTag(e) && adapter2.getParent(e); return e === PLACEHOLDER_ELEMENT || parent2 && adapter2.isTag(parent2); })); for (const t of token) { if (t.length > 0 && isTraversal2(t[0]) && t[0].type !== SelectorType.Descendant) { } else if (hasContext && !t.some(includesScopePseudo)) { t.unshift(DESCENDANT_TOKEN); } else { continue; } t.unshift(SCOPE_TOKEN); } } function compileToken(token, options, context) { var _a5; token.forEach(sortByProcedure); context = (_a5 = options.context) !== null && _a5 !== void 0 ? _a5 : context; const isArrayContext = Array.isArray(context); const finalContext = context && (Array.isArray(context) ? context : [context]); if (options.relativeSelector !== false) { absolutize(token, options, finalContext); } else if (token.some((t) => t.length > 0 && isTraversal2(t[0]))) { throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); } let shouldTestNextSiblings = false; const query = token.map((rules) => { if (rules.length >= 2) { const [first2, second] = rules; if (first2.type !== SelectorType.Pseudo || first2.name !== "scope") { } else if (isArrayContext && second.type === SelectorType.Descendant) { rules[1] = FLEXIBLE_DESCENDANT_TOKEN; } else if (second.type === SelectorType.Adjacent || second.type === SelectorType.Sibling) { shouldTestNextSiblings = true; } } return compileRules(rules, options, finalContext); }).reduce(reduceRules, import_boolbase5.default.falseFunc); query.shouldTestNextSiblings = shouldTestNextSiblings; return query; } function compileRules(rules, options, context) { var _a5; return rules.reduce((previous, rule) => previous === import_boolbase5.default.falseFunc ? import_boolbase5.default.falseFunc : compileGeneralSelector(previous, rule, options, context, compileToken), (_a5 = options.rootFunc) !== null && _a5 !== void 0 ? _a5 : import_boolbase5.default.trueFunc); } function reduceRules(a, b) { if (b === import_boolbase5.default.falseFunc || a === import_boolbase5.default.trueFunc) { return a; } if (a === import_boolbase5.default.falseFunc || b === import_boolbase5.default.trueFunc) { return b; } return function combine(elem) { return a(elem) || b(elem); }; } // node_modules/css-select/lib/esm/index.js var defaultEquals = (a, b) => a === b; var defaultOptions = { adapter: esm_exports2, equals: defaultEquals }; function convertOptionFormats(options) { var _a5, _b, _c, _d; const opts = options !== null && options !== void 0 ? options : defaultOptions; (_a5 = opts.adapter) !== null && _a5 !== void 0 ? _a5 : opts.adapter = esm_exports2; (_b = opts.equals) !== null && _b !== void 0 ? _b : opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals; return opts; } function wrapCompile(func) { return function addAdapter(selector, options, context) { const opts = convertOptionFormats(options); return func(selector, opts, context); }; } var compile3 = wrapCompile(compile2); var _compileUnsafe = wrapCompile(compileUnsafe); var _compileToken = wrapCompile(compileToken); function getSelectorFunc(searchFunc) { return function select3(query, elements, options) { const opts = convertOptionFormats(options); if (typeof query !== "function") { query = compileUnsafe(query, opts, elements); } const filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings); return searchFunc(query, filteredElements, opts); }; } function prepareContext(elems, adapter2, shouldTestNextSiblings = false) { if (shouldTestNextSiblings) { elems = appendNextSiblings(elems, adapter2); } return Array.isArray(elems) ? adapter2.removeSubsets(elems) : adapter2.getChildren(elems); } function appendNextSiblings(elem, adapter2) { const elems = Array.isArray(elem) ? elem.slice(0) : [elem]; const elemsLength = elems.length; for (let i = 0; i < elemsLength; i++) { const nextSiblings = getNextSiblings(elems[i], adapter2); elems.push(...nextSiblings); } return elems; } var selectAll = getSelectorFunc((query, elems, options) => query === import_boolbase6.default.falseFunc || !elems || elems.length === 0 ? [] : options.adapter.findAll(query, elems)); var selectOne = getSelectorFunc((query, elems, options) => query === import_boolbase6.default.falseFunc || !elems || elems.length === 0 ? null : options.adapter.findOne(query, elems)); // node_modules/cheerio-select/lib/esm/index.js var boolbase7 = __toModule(require_boolbase()); // node_modules/cheerio-select/lib/esm/positionals.js var filterNames = new Set([ "first", "last", "eq", "gt", "nth", "lt", "even", "odd" ]); function isFilter(s) { if (s.type !== "pseudo") return false; if (filterNames.has(s.name)) return true; if (s.name === "not" && Array.isArray(s.data)) { return s.data.some((s2) => s2.some(isFilter)); } return false; } function getLimit(filter4, data2, partLimit) { const num = data2 != null ? parseInt(data2, 10) : NaN; switch (filter4) { case "first": return 1; case "nth": case "eq": return isFinite(num) ? num >= 0 ? num + 1 : Infinity : 0; case "lt": return isFinite(num) ? num >= 0 ? Math.min(num, partLimit) : Infinity : 0; case "gt": return isFinite(num) ? Infinity : 0; case "odd": return 2 * partLimit; case "even": return 2 * partLimit - 1; case "last": case "not": return Infinity; } } // node_modules/cheerio-select/lib/esm/helpers.js function getDocumentRoot(node) { while (node.parent) node = node.parent; return node; } function groupSelectors(selectors) { const filteredSelectors = []; const plainSelectors = []; for (const selector of selectors) { if (selector.some(isFilter)) { filteredSelectors.push(selector); } else { plainSelectors.push(selector); } } return [plainSelectors, filteredSelectors]; } // node_modules/cheerio-select/lib/esm/index.js var UNIVERSAL_SELECTOR = { type: SelectorType.Universal, namespace: null }; var SCOPE_PSEUDO = { type: SelectorType.Pseudo, name: "scope", data: null }; function is2(element, selector, options = {}) { return some([element], selector, options); } function some(elements, selector, options = {}) { if (typeof selector === "function") return elements.some(selector); const [plain, filtered] = groupSelectors(parse(selector)); return plain.length > 0 && elements.some(_compileToken(plain, options)) || filtered.some((sel) => filterBySelector(sel, elements, options).length > 0); } function filterByPosition(filter4, elems, data2, options) { const num = typeof data2 === "string" ? parseInt(data2, 10) : NaN; switch (filter4) { case "first": case "lt": return elems; case "last": return elems.length > 0 ? [elems[elems.length - 1]] : elems; case "nth": case "eq": return isFinite(num) && Math.abs(num) < elems.length ? [num < 0 ? elems[elems.length + num] : elems[num]] : []; case "gt": return isFinite(num) ? elems.slice(num + 1) : []; case "even": return elems.filter((_, i) => i % 2 === 0); case "odd": return elems.filter((_, i) => i % 2 === 1); case "not": { const filtered = new Set(filterParsed(data2, elems, options)); return elems.filter((e) => !filtered.has(e)); } } } function filter2(selector, elements, options = {}) { return filterParsed(parse(selector), elements, options); } function filterParsed(selector, elements, options) { if (elements.length === 0) return []; const [plainSelectors, filteredSelectors] = groupSelectors(selector); let found; if (plainSelectors.length) { const filtered = filterElements(elements, plainSelectors, options); if (filteredSelectors.length === 0) { return filtered; } if (filtered.length) { found = new Set(filtered); } } for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { const filteredSelector = filteredSelectors[i]; const missing = found ? elements.filter((e) => isTag2(e) && !found.has(e)) : elements; if (missing.length === 0) break; const filtered = filterBySelector(filteredSelector, elements, options); if (filtered.length) { if (!found) { if (i === filteredSelectors.length - 1) { return filtered; } found = new Set(filtered); } else { filtered.forEach((el) => found.add(el)); } } } return typeof found !== "undefined" ? found.size === elements.length ? elements : elements.filter((el) => found.has(el)) : []; } function filterBySelector(selector, elements, options) { var _a5; if (selector.some(isTraversal)) { const root2 = (_a5 = options.root) !== null && _a5 !== void 0 ? _a5 : getDocumentRoot(elements[0]); const opts = __spreadProps(__spreadValues({}, options), { context: elements, relativeSelector: false }); selector.push(SCOPE_PSEUDO); return findFilterElements(root2, selector, opts, true, elements.length); } return findFilterElements(elements, selector, options, false, elements.length); } function select(selector, root2, options = {}, limit = Infinity) { if (typeof selector === "function") { return find2(root2, selector); } const [plain, filtered] = groupSelectors(parse(selector)); const results = filtered.map((sel) => findFilterElements(root2, sel, options, true, limit)); if (plain.length) { results.push(findElements(root2, plain, options, limit)); } if (results.length === 0) { return []; } if (results.length === 1) { return results[0]; } return uniqueSort(results.reduce((a, b) => [...a, ...b])); } function findFilterElements(root2, selector, options, queryForSelector, totalLimit) { const filterIndex = selector.findIndex(isFilter); const sub = selector.slice(0, filterIndex); const filter4 = selector[filterIndex]; const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; const limit = getLimit(filter4.name, filter4.data, partLimit); if (limit === 0) return []; const elemsNoLimit = sub.length === 0 && !Array.isArray(root2) ? getChildren(root2).filter(isTag2) : sub.length === 0 ? (Array.isArray(root2) ? root2 : [root2]).filter(isTag2) : queryForSelector || sub.some(isTraversal) ? findElements(root2, [sub], options, limit) : filterElements(root2, [sub], options); const elems = elemsNoLimit.slice(0, limit); let result = filterByPosition(filter4.name, elems, filter4.data, options); if (result.length === 0 || selector.length === filterIndex + 1) { return result; } const remainingSelector = selector.slice(filterIndex + 1); const remainingHasTraversal = remainingSelector.some(isTraversal); if (remainingHasTraversal) { if (isTraversal(remainingSelector[0])) { const { type } = remainingSelector[0]; if (type === SelectorType.Sibling || type === SelectorType.Adjacent) { result = prepareContext(result, esm_exports2, true); } remainingSelector.unshift(UNIVERSAL_SELECTOR); } options = __spreadProps(__spreadValues({}, options), { relativeSelector: false, rootFunc: (el) => result.includes(el) }); } else if (options.rootFunc && options.rootFunc !== boolbase7.trueFunc) { options = __spreadProps(__spreadValues({}, options), { rootFunc: boolbase7.trueFunc }); } return remainingSelector.some(isFilter) ? findFilterElements(result, remainingSelector, options, false, totalLimit) : remainingHasTraversal ? findElements(result, [remainingSelector], options, totalLimit) : filterElements(result, [remainingSelector], options); } function findElements(root2, sel, options, limit) { const query = _compileToken(sel, options, root2); return find2(root2, query, limit); } function find2(root2, query, limit = Infinity) { const elems = prepareContext(root2, esm_exports2, query.shouldTestNextSiblings); return find((node) => isTag2(node) && query(node), elems, true, limit); } function filterElements(elements, sel, options) { const els = (Array.isArray(elements) ? elements : [elements]).filter(isTag2); if (els.length === 0) return els; const query = _compileToken(sel, options); return query === boolbase7.trueFunc ? els : els.filter(query); } // node_modules/cheerio/dist/browser/api/traversing.js var reSiblingSelector = /^\s*[+~]/; function find3(selectorOrHaystack) { if (!selectorOrHaystack) { return this._make([]); } if (typeof selectorOrHaystack !== "string") { const haystack = isCheerio(selectorOrHaystack) ? selectorOrHaystack.toArray() : [selectorOrHaystack]; const context = this.toArray(); return this._make(haystack.filter((elem) => context.some((node) => contains(node, elem)))); } return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY); } function _findBySelector(selector, limit) { var _a5; const context = this.toArray(); const elems = reSiblingSelector.test(selector) ? context : this.children().toArray(); const options = { context, root: (_a5 = this._root) === null || _a5 === void 0 ? void 0 : _a5[0], xmlMode: this.options.xmlMode, lowerCaseTags: this.options.lowerCaseTags, lowerCaseAttributeNames: this.options.lowerCaseAttributeNames, pseudos: this.options.pseudos, quirksMode: this.options.quirksMode }; return this._make(select(selector, elems, options, limit)); } function _getMatcher(matchMap) { return function(fn, ...postFns) { return function(selector) { var _a5; let matched = matchMap(fn, this); if (selector) { matched = filterArray(matched, selector, this.options.xmlMode, (_a5 = this._root) === null || _a5 === void 0 ? void 0 : _a5[0]); } return this._make(this.length > 1 && matched.length > 1 ? postFns.reduce((elems, fn2) => fn2(elems), matched) : matched); }; }; } var _matcher = _getMatcher((fn, elems) => { let ret = []; for (let i = 0; i < elems.length; i++) { const value = fn(elems[i]); if (value.length > 0) ret = ret.concat(value); } return ret; }); var _singleMatcher = _getMatcher((fn, elems) => { const ret = []; for (let i = 0; i < elems.length; i++) { const value = fn(elems[i]); if (value !== null) { ret.push(value); } } return ret; }); function _matchUntil(nextElem, ...postFns) { let matches = null; const innerMatcher = _getMatcher((nextElem2, elems) => { const matched = []; domEach(elems, (elem) => { for (let next2; next2 = nextElem2(elem); elem = next2) { if (matches === null || matches === void 0 ? void 0 : matches(next2, matched.length)) break; matched.push(next2); } }); return matched; })(nextElem, ...postFns); return function(selector, filterSelector) { matches = typeof selector === "string" ? (elem) => is2(elem, selector, this.options) : selector ? getFilterFn(selector) : null; const ret = innerMatcher.call(this, filterSelector); matches = null; return ret; }; } function _removeDuplicates(elems) { return elems.length > 1 ? Array.from(new Set(elems)) : elems; } var parent = _singleMatcher(({ parent: parent2 }) => parent2 && !isDocument(parent2) ? parent2 : null, _removeDuplicates); var parents = _matcher((elem) => { const matched = []; while (elem.parent && !isDocument(elem.parent)) { matched.push(elem.parent); elem = elem.parent; } return matched; }, uniqueSort, (elems) => elems.reverse()); var parentsUntil = _matchUntil(({ parent: parent2 }) => parent2 && !isDocument(parent2) ? parent2 : null, uniqueSort, (elems) => elems.reverse()); function closest(selector) { var _a5; const set = []; if (!selector) { return this._make(set); } const selectOpts = { xmlMode: this.options.xmlMode, root: (_a5 = this._root) === null || _a5 === void 0 ? void 0 : _a5[0] }; const selectFn = typeof selector === "string" ? (elem) => is2(elem, selector, selectOpts) : getFilterFn(selector); domEach(this, (elem) => { if (elem && !isDocument(elem) && !isTag2(elem)) { elem = elem.parent; } while (elem && isTag2(elem)) { if (selectFn(elem, 0)) { if (!set.includes(elem)) { set.push(elem); } break; } elem = elem.parent; } }); return this._make(set); } var next = _singleMatcher((elem) => nextElementSibling(elem)); var nextAll = _matcher((elem) => { const matched = []; while (elem.next) { elem = elem.next; if (isTag2(elem)) matched.push(elem); } return matched; }, _removeDuplicates); var nextUntil = _matchUntil((el) => nextElementSibling(el), _removeDuplicates); var prev = _singleMatcher((elem) => prevElementSibling(elem)); var prevAll = _matcher((elem) => { const matched = []; while (elem.prev) { elem = elem.prev; if (isTag2(elem)) matched.push(elem); } return matched; }, _removeDuplicates); var prevUntil = _matchUntil((el) => prevElementSibling(el), _removeDuplicates); var siblings = _matcher((elem) => getSiblings(elem).filter((el) => isTag2(el) && el !== elem), uniqueSort); var children = _matcher((elem) => getChildren(elem).filter(isTag2), _removeDuplicates); function contents() { const elems = this.toArray().reduce((newElems, elem) => hasChildren(elem) ? newElems.concat(elem.children) : newElems, []); return this._make(elems); } function each(fn) { let i = 0; const len = this.length; while (i < len && fn.call(this[i], i, this[i]) !== false) ++i; return this; } function map(fn) { let elems = []; for (let i = 0; i < this.length; i++) { const el = this[i]; const val2 = fn.call(el, i, el); if (val2 != null) { elems = elems.concat(val2); } } return this._make(elems); } function getFilterFn(match) { if (typeof match === "function") { return (el, i) => match.call(el, i, el); } if (isCheerio(match)) { return (el) => Array.prototype.includes.call(match, el); } return function(el) { return match === el; }; } function filter3(match) { var _a5; return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a5 = this._root) === null || _a5 === void 0 ? void 0 : _a5[0])); } function filterArray(nodes, match, xmlMode, root2) { return typeof match === "string" ? filter2(match, nodes, { xmlMode, root: root2 }) : nodes.filter(getFilterFn(match)); } function is3(selector) { const nodes = this.toArray(); return typeof selector === "string" ? some(nodes.filter(isTag2), selector, this.options) : selector ? nodes.some(getFilterFn(selector)) : false; } function not(match) { let nodes = this.toArray(); if (typeof match === "string") { const matches = new Set(filter2(match, nodes, this.options)); nodes = nodes.filter((el) => !matches.has(el)); } else { const filterFn = getFilterFn(match); nodes = nodes.filter((el, i) => !filterFn(el, i)); } return this._make(nodes); } function has(selectorOrHaystack) { return this.filter(typeof selectorOrHaystack === "string" ? `:has(${selectorOrHaystack})` : (_, el) => this._make(el).find(selectorOrHaystack).length > 0); } function first() { return this.length > 1 ? this._make(this[0]) : this; } function last() { return this.length > 0 ? this._make(this[this.length - 1]) : this; } function eq(i) { var _a5; i = +i; if (i === 0 && this.length <= 1) return this; if (i < 0) i = this.length + i; return this._make((_a5 = this[i]) !== null && _a5 !== void 0 ? _a5 : []); } function get(i) { if (i == null) { return this.toArray(); } return this[i < 0 ? this.length + i : i]; } function toArray() { return Array.prototype.slice.call(this); } function index(selectorOrNeedle) { let $haystack; let needle; if (selectorOrNeedle == null) { $haystack = this.parent().children(); needle = this[0]; } else if (typeof selectorOrNeedle === "string") { $haystack = this._make(selectorOrNeedle); needle = this[0]; } else { $haystack = this; needle = isCheerio(selectorOrNeedle) ? selectorOrNeedle[0] : selectorOrNeedle; } return Array.prototype.indexOf.call($haystack, needle); } function slice(start, end2) { return this._make(Array.prototype.slice.call(this, start, end2)); } function end() { var _a5; return (_a5 = this.prevObject) !== null && _a5 !== void 0 ? _a5 : this._make([]); } function add(other, context) { const selection = this._make(other, context); const contents2 = uniqueSort([...this.get(), ...selection.get()]); return this._make(contents2); } function addBack(selector) { return this.prevObject ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject) : this; } // node_modules/cheerio/dist/browser/api/manipulation.js var manipulation_exports = {}; __export(manipulation_exports, { _makeDomArray: () => _makeDomArray, after: () => after, append: () => append2, appendTo: () => appendTo, before: () => before, clone: () => clone, empty: () => empty, html: () => html2, insertAfter: () => insertAfter, insertBefore: () => insertBefore, prepend: () => prepend2, prependTo: () => prependTo, remove: () => remove, replaceWith: () => replaceWith, text: () => text2, toString: () => toString, unwrap: () => unwrap, wrap: () => wrap, wrapAll: () => wrapAll, wrapInner: () => wrapInner }); // node_modules/cheerio/dist/browser/parse.js function getParse(parser) { return function parse6(content, options, isDocument2, context) { if (typeof Buffer !== "undefined" && Buffer.isBuffer(content)) { content = content.toString(); } if (typeof content === "string") { return parser(content, options, isDocument2, context); } const doc = content; if (!Array.isArray(doc) && isDocument(doc)) { return doc; } const root2 = new Document([]); update(doc, root2); return root2; }; } function update(newChilds, parent2) { const arr = Array.isArray(newChilds) ? newChilds : [newChilds]; if (parent2) { parent2.children = arr; } else { parent2 = null; } for (let i = 0; i < arr.length; i++) { const node = arr[i]; if (node.parent && node.parent.children !== arr) { removeElement(node); } if (parent2) { node.prev = arr[i - 1] || null; node.next = arr[i + 1] || null; } else { node.prev = node.next = null; } node.parent = parent2; } return parent2; } // node_modules/cheerio/dist/browser/api/manipulation.js function _makeDomArray(elem, clone2) { if (elem == null) { return []; } if (typeof elem === "string") { return this._parse(elem, this.options, false, null).children.slice(0); } if ("length" in elem) { if (elem.length === 1) { return this._makeDomArray(elem[0], clone2); } const result = []; for (let i = 0; i < elem.length; i++) { const el = elem[i]; if (typeof el === "object") { if (el == null) { continue; } if (!("length" in el)) { result.push(clone2 ? cloneNode(el, true) : el); continue; } } result.push(...this._makeDomArray(el, clone2)); } return result; } return [clone2 ? cloneNode(elem, true) : elem]; } function _insert(concatenator) { return function(...elems) { const lastIdx = this.length - 1; return domEach(this, (el, i) => { if (!hasChildren(el)) return; const domSrc = typeof elems[0] === "function" ? elems[0].call(el, i, this._render(el.children)) : elems; const dom = this._makeDomArray(domSrc, i < lastIdx); concatenator(dom, el.children, el); }); }; } function uniqueSplice(array, spliceIdx, spliceCount, newElems, parent2) { var _a5, _b; const spliceArgs = [ spliceIdx, spliceCount, ...newElems ]; const prev2 = spliceIdx === 0 ? null : array[spliceIdx - 1]; const next2 = spliceIdx + spliceCount >= array.length ? null : array[spliceIdx + spliceCount]; for (let idx = 0; idx < newElems.length; ++idx) { const node = newElems[idx]; const oldParent = node.parent; if (oldParent) { const oldSiblings = oldParent.children; const prevIdx = oldSiblings.indexOf(node); if (prevIdx !== -1) { oldParent.children.splice(prevIdx, 1); if (parent2 === oldParent && spliceIdx > prevIdx) { spliceArgs[0]--; } } } node.parent = parent2; if (node.prev) { node.prev.next = (_a5 = node.next) !== null && _a5 !== void 0 ? _a5 : null; } if (node.next) { node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null; } node.prev = idx === 0 ? prev2 : newElems[idx - 1]; node.next = idx === newElems.length - 1 ? next2 : newElems[idx + 1]; } if (prev2) { prev2.next = newElems[0]; } if (next2) { next2.prev = newElems[newElems.length - 1]; } return array.splice(...spliceArgs); } function appendTo(target) { const appendTarget = isCheerio(target) ? target : this._make(target); appendTarget.append(this); return this; } function prependTo(target) { const prependTarget = isCheerio(target) ? target : this._make(target); prependTarget.prepend(this); return this; } var append2 = _insert((dom, children2, parent2) => { uniqueSplice(children2, children2.length, 0, dom, parent2); }); var prepend2 = _insert((dom, children2, parent2) => { uniqueSplice(children2, 0, 0, dom, parent2); }); function _wrap(insert) { return function(wrapper) { const lastIdx = this.length - 1; const lastParent = this.parents().last(); for (let i = 0; i < this.length; i++) { const el = this[i]; const wrap2 = typeof wrapper === "function" ? wrapper.call(el, i, el) : typeof wrapper === "string" && !isHtml(wrapper) ? lastParent.find(wrapper).clone() : wrapper; const [wrapperDom] = this._makeDomArray(wrap2, i < lastIdx); if (!wrapperDom || !hasChildren(wrapperDom)) continue; let elInsertLocation = wrapperDom; let j = 0; while (j < elInsertLocation.children.length) { const child = elInsertLocation.children[j]; if (isTag2(child)) { elInsertLocation = child; j = 0; } else { j++; } } insert(el, elInsertLocation, [wrapperDom]); } return this; }; } var wrap = _wrap((el, elInsertLocation, wrapperDom) => { const { parent: parent2 } = el; if (!parent2) return; const siblings2 = parent2.children; const index2 = siblings2.indexOf(el); update([el], elInsertLocation); uniqueSplice(siblings2, index2, 0, wrapperDom, parent2); }); var wrapInner = _wrap((el, elInsertLocation, wrapperDom) => { if (!hasChildren(el)) return; update(el.children, elInsertLocation); update(wrapperDom, el); }); function unwrap(selector) { this.parent(selector).not("body").each((_, el) => { this._make(el).replaceWith(el.children); }); return this; } function wrapAll(wrapper) { const el = this[0]; if (el) { const wrap2 = this._make(typeof wrapper === "function" ? wrapper.call(el, 0, el) : wrapper).insertBefore(el); let elInsertLocation; for (let i = 0; i < wrap2.length; i++) { if (wrap2[i].type === esm_exports.Tag) { elInsertLocation = wrap2[i]; } } let j = 0; while (elInsertLocation && j < elInsertLocation.children.length) { const child = elInsertLocation.children[j]; if (child.type === esm_exports.Tag) { elInsertLocation = child; j = 0; } else { j++; } } if (elInsertLocation) this._make(elInsertLocation).append(this); } return this; } function after(...elems) { const lastIdx = this.length - 1; return domEach(this, (el, i) => { if (!hasChildren(el) || !el.parent) { return; } const siblings2 = el.parent.children; const index2 = siblings2.indexOf(el); if (index2 === -1) return; const domSrc = typeof elems[0] === "function" ? elems[0].call(el, i, this._render(el.children)) : elems; const dom = this._makeDomArray(domSrc, i < lastIdx); uniqueSplice(siblings2, index2 + 1, 0, dom, el.parent); }); } function insertAfter(target) { if (typeof target === "string") { target = this._make(target); } this.remove(); const clones = []; for (const el of this._makeDomArray(target)) { const clonedSelf = this.clone().toArray(); const { parent: parent2 } = el; if (!parent2) { continue; } const siblings2 = parent2.children; const index2 = siblings2.indexOf(el); if (index2 === -1) continue; uniqueSplice(siblings2, index2 + 1, 0, clonedSelf, parent2); clones.push(...clonedSelf); } return this._make(clones); } function before(...elems) { const lastIdx = this.length - 1; return domEach(this, (el, i) => { if (!hasChildren(el) || !el.parent) { return; } const siblings2 = el.parent.children; const index2 = siblings2.indexOf(el); if (index2 === -1) return; const domSrc = typeof elems[0] === "function" ? elems[0].call(el, i, this._render(el.children)) : elems; const dom = this._makeDomArray(domSrc, i < lastIdx); uniqueSplice(siblings2, index2, 0, dom, el.parent); }); } function insertBefore(target) { const targetArr = this._make(target); this.remove(); const clones = []; domEach(targetArr, (el) => { const clonedSelf = this.clone().toArray(); const { parent: parent2 } = el; if (!parent2) { return; } const siblings2 = parent2.children; const index2 = siblings2.indexOf(el); if (index2 === -1) return; uniqueSplice(siblings2, index2, 0, clonedSelf, parent2); clones.push(...clonedSelf); }); return this._make(clones); } function remove(selector) { const elems = selector ? this.filter(selector) : this; domEach(elems, (el) => { removeElement(el); el.prev = el.next = el.parent = null; }); return this; } function replaceWith(content) { return domEach(this, (el, i) => { const { parent: parent2 } = el; if (!parent2) { return; } const siblings2 = parent2.children; const cont = typeof content === "function" ? content.call(el, i, el) : content; const dom = this._makeDomArray(cont); update(dom, null); const index2 = siblings2.indexOf(el); uniqueSplice(siblings2, index2, 1, dom, parent2); if (!dom.includes(el)) { el.parent = el.prev = el.next = null; } }); } function empty() { return domEach(this, (el) => { if (!hasChildren(el)) return; for (const child of el.children) { child.next = child.prev = child.parent = null; } el.children.length = 0; }); } function html2(str) { if (str === void 0) { const el = this[0]; if (!el || !hasChildren(el)) return null; return this._render(el.children); } return domEach(this, (el) => { if (!hasChildren(el)) return; for (const child of el.children) { child.next = child.prev = child.parent = null; } const content = isCheerio(str) ? str.toArray() : this._parse(`${str}`, this.options, false, el).children; update(content, el); }); } function toString() { return this._render(this); } function text2(str) { if (str === void 0) { return text(this); } if (typeof str === "function") { return domEach(this, (el, i) => this._make(el).text(str.call(el, i, text([el])))); } return domEach(this, (el) => { if (!hasChildren(el)) return; for (const child of el.children) { child.next = child.prev = child.parent = null; } const textNode = new Text2(`${str}`); update(textNode, el); }); } function clone() { const clone2 = Array.prototype.map.call(this.get(), (el) => cloneNode(el, true)); const root2 = new Document(clone2); for (const node of clone2) { node.parent = root2; } return this._make(clone2); } // node_modules/cheerio/dist/browser/api/css.js var css_exports = {}; __export(css_exports, { css: () => css }); function css(prop2, val2) { if (prop2 != null && val2 != null || typeof prop2 === "object" && !Array.isArray(prop2)) { return domEach(this, (el, i) => { if (isTag2(el)) { setCss(el, prop2, val2, i); } }); } if (this.length === 0) { return void 0; } return getCss(this[0], prop2); } function setCss(el, prop2, value, idx) { if (typeof prop2 === "string") { const styles = getCss(el); const val2 = typeof value === "function" ? value.call(el, idx, styles[prop2]) : value; if (val2 === "") { delete styles[prop2]; } else if (val2 != null) { styles[prop2] = val2; } el.attribs["style"] = stringify(styles); } else if (typeof prop2 === "object") { const keys = Object.keys(prop2); for (let i = 0; i < keys.length; i++) { const k = keys[i]; setCss(el, k, prop2[k], i); } } } function getCss(el, prop2) { if (!el || !isTag2(el)) return; const styles = parse3(el.attribs["style"]); if (typeof prop2 === "string") { return styles[prop2]; } if (Array.isArray(prop2)) { const newStyles = {}; for (const item of prop2) { if (styles[item] != null) { newStyles[item] = styles[item]; } } return newStyles; } return styles; } function stringify(obj) { return Object.keys(obj).reduce((str, prop2) => `${str}${str ? " " : ""}${prop2}: ${obj[prop2]};`, ""); } function parse3(styles) { styles = (styles || "").trim(); if (!styles) return {}; const obj = {}; let key; for (const str of styles.split(";")) { const n = str.indexOf(":"); if (n < 1 || n === str.length - 1) { const trimmed = str.trimEnd(); if (trimmed.length > 0 && key !== void 0) { obj[key] += `;${trimmed}`; } } else { key = str.slice(0, n).trim(); obj[key] = str.slice(n + 1).trim(); } } return obj; } // node_modules/cheerio/dist/browser/api/forms.js var forms_exports = {}; __export(forms_exports, { serialize: () => serialize, serializeArray: () => serializeArray }); var submittableSelector = "input,select,textarea,keygen"; var r20 = /%20/g; var rCRLF = /\r?\n/g; function serialize() { const arr = this.serializeArray(); const retArr = arr.map((data2) => `${encodeURIComponent(data2.name)}=${encodeURIComponent(data2.value)}`); return retArr.join("&").replace(r20, "+"); } function serializeArray() { return this.map((_, elem) => { const $elem = this._make(elem); if (isTag2(elem) && elem.name === "form") { return $elem.find(submittableSelector).toArray(); } return $elem.filter(submittableSelector).toArray(); }).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((_, elem) => { var _a5; const $elem = this._make(elem); const name = $elem.attr("name"); const value = (_a5 = $elem.val()) !== null && _a5 !== void 0 ? _a5 : ""; if (Array.isArray(value)) { return value.map((val2) => ({ name, value: val2.replace(rCRLF, "\r\n") })); } return { name, value: value.replace(rCRLF, "\r\n") }; }).toArray(); } // node_modules/cheerio/dist/browser/api/extract.js var extract_exports = {}; __export(extract_exports, { extract: () => extract2 }); function getExtractDescr(descr) { var _a5; if (typeof descr === "string") { return { selector: descr, value: "textContent" }; } return { selector: descr.selector, value: (_a5 = descr.value) !== null && _a5 !== void 0 ? _a5 : "textContent" }; } function extract2(map2) { const ret = {}; for (const key in map2) { const descr = map2[key]; const isArray = Array.isArray(descr); const { selector, value } = getExtractDescr(isArray ? descr[0] : descr); const fn = typeof value === "function" ? value : typeof value === "string" ? (el) => this._make(el).prop(value) : (el) => this._make(el).extract(value); if (isArray) { ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY).map((_, el) => fn(el, key, ret)).get(); } else { const $2 = this._findBySelector(selector, 1); ret[key] = $2.length > 0 ? fn($2[0], key, ret) : void 0; } } return ret; } // node_modules/cheerio/dist/browser/cheerio.js var Cheerio = class { constructor(elements, root2, options) { this.length = 0; this.options = options; this._root = root2; if (elements) { for (let idx = 0; idx < elements.length; idx++) { this[idx] = elements[idx]; } this.length = elements.length; } } }; Cheerio.prototype.cheerio = "[cheerio object]"; Cheerio.prototype.splice = Array.prototype.splice; Cheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; Object.assign(Cheerio.prototype, attributes_exports, traversing_exports, manipulation_exports, css_exports, forms_exports, extract_exports); // node_modules/cheerio/dist/browser/load.js function getLoad(parse6, render3) { return function load2(content, options, isDocument2 = true) { if (content == null) { throw new Error("cheerio.load() expects a string"); } const internalOpts = flattenOptions(options); const initialRoot = parse6(content, internalOpts, isDocument2, null); class LoadedCheerio extends Cheerio { _make(selector, context) { const cheerio = initialize(selector, context); cheerio.prevObject = this; return cheerio; } _parse(content2, options2, isDocument3, context) { return parse6(content2, options2, isDocument3, context); } _render(dom) { return render3(dom, this.options); } } function initialize(selector, context, root2 = initialRoot, opts) { if (selector && isCheerio(selector)) return selector; const options2 = flattenOptions(opts, internalOpts); const r = typeof root2 === "string" ? [parse6(root2, options2, false, null)] : "length" in root2 ? root2 : [root2]; const rootInstance = isCheerio(r) ? r : new LoadedCheerio(r, null, options2); rootInstance._root = rootInstance; if (!selector) { return new LoadedCheerio(void 0, rootInstance, options2); } const elements = typeof selector === "string" && isHtml(selector) ? parse6(selector, options2, false, null).children : isNode(selector) ? [selector] : Array.isArray(selector) ? selector : void 0; const instance = new LoadedCheerio(elements, rootInstance, options2); if (elements) { return instance; } if (typeof selector !== "string") { throw new TypeError("Unexpected type of selector"); } let search = selector; const searchContext = context ? typeof context === "string" ? isHtml(context) ? new LoadedCheerio([parse6(context, options2, false, null)], rootInstance, options2) : (search = `${context} ${search}`, rootInstance) : isCheerio(context) ? context : new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options2) : rootInstance; if (!searchContext) return instance; return searchContext.find(search); } Object.assign(initialize, static_exports, { load: load2, _root: initialRoot, _options: internalOpts, fn: LoadedCheerio.prototype, prototype: LoadedCheerio.prototype }); return initialize; }; } function isNode(obj) { return !!obj.name || obj.type === esm_exports.Root || obj.type === esm_exports.Text || obj.type === esm_exports.Comment; } // node_modules/parse5/dist/common/unicode.js var UNDEFINED_CODE_POINTS = new Set([ 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111 ]); var REPLACEMENT_CHARACTER = "\uFFFD"; var CODE_POINTS; (function(CODE_POINTS2) { CODE_POINTS2[CODE_POINTS2["EOF"] = -1] = "EOF"; CODE_POINTS2[CODE_POINTS2["NULL"] = 0] = "NULL"; CODE_POINTS2[CODE_POINTS2["TABULATION"] = 9] = "TABULATION"; CODE_POINTS2[CODE_POINTS2["CARRIAGE_RETURN"] = 13] = "CARRIAGE_RETURN"; CODE_POINTS2[CODE_POINTS2["LINE_FEED"] = 10] = "LINE_FEED"; CODE_POINTS2[CODE_POINTS2["FORM_FEED"] = 12] = "FORM_FEED"; CODE_POINTS2[CODE_POINTS2["SPACE"] = 32] = "SPACE"; CODE_POINTS2[CODE_POINTS2["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK"; CODE_POINTS2[CODE_POINTS2["QUOTATION_MARK"] = 34] = "QUOTATION_MARK"; CODE_POINTS2[CODE_POINTS2["AMPERSAND"] = 38] = "AMPERSAND"; CODE_POINTS2[CODE_POINTS2["APOSTROPHE"] = 39] = "APOSTROPHE"; CODE_POINTS2[CODE_POINTS2["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS"; CODE_POINTS2[CODE_POINTS2["SOLIDUS"] = 47] = "SOLIDUS"; CODE_POINTS2[CODE_POINTS2["DIGIT_0"] = 48] = "DIGIT_0"; CODE_POINTS2[CODE_POINTS2["DIGIT_9"] = 57] = "DIGIT_9"; CODE_POINTS2[CODE_POINTS2["SEMICOLON"] = 59] = "SEMICOLON"; CODE_POINTS2[CODE_POINTS2["LESS_THAN_SIGN"] = 60] = "LESS_THAN_SIGN"; CODE_POINTS2[CODE_POINTS2["EQUALS_SIGN"] = 61] = "EQUALS_SIGN"; CODE_POINTS2[CODE_POINTS2["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN"; CODE_POINTS2[CODE_POINTS2["QUESTION_MARK"] = 63] = "QUESTION_MARK"; CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A"; CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z"; CODE_POINTS2[CODE_POINTS2["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET"; CODE_POINTS2[CODE_POINTS2["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT"; CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A"; CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z"; })(CODE_POINTS || (CODE_POINTS = {})); var SEQUENCES = { DASH_DASH: "--", CDATA_START: "[CDATA[", DOCTYPE: "doctype", SCRIPT: "script", PUBLIC: "public", SYSTEM: "system" }; function isSurrogate(cp) { return cp >= 55296 && cp <= 57343; } function isSurrogatePair(cp) { return cp >= 56320 && cp <= 57343; } function getSurrogatePairCodePoint(cp1, cp2) { return (cp1 - 55296) * 1024 + 9216 + cp2; } function isControlCodePoint(cp) { return cp !== 32 && cp !== 10 && cp !== 13 && cp !== 9 && cp !== 12 && cp >= 1 && cp <= 31 || cp >= 127 && cp <= 159; } function isUndefinedCodePoint(cp) { return cp >= 64976 && cp <= 65007 || UNDEFINED_CODE_POINTS.has(cp); } // node_modules/parse5/dist/common/error-codes.js var ERR; (function(ERR2) { ERR2["controlCharacterInInputStream"] = "control-character-in-input-stream"; ERR2["noncharacterInInputStream"] = "noncharacter-in-input-stream"; ERR2["surrogateInInputStream"] = "surrogate-in-input-stream"; ERR2["nonVoidHtmlElementStartTagWithTrailingSolidus"] = "non-void-html-element-start-tag-with-trailing-solidus"; ERR2["endTagWithAttributes"] = "end-tag-with-attributes"; ERR2["endTagWithTrailingSolidus"] = "end-tag-with-trailing-solidus"; ERR2["unexpectedSolidusInTag"] = "unexpected-solidus-in-tag"; ERR2["unexpectedNullCharacter"] = "unexpected-null-character"; ERR2["unexpectedQuestionMarkInsteadOfTagName"] = "unexpected-question-mark-instead-of-tag-name"; ERR2["invalidFirstCharacterOfTagName"] = "invalid-first-character-of-tag-name"; ERR2["unexpectedEqualsSignBeforeAttributeName"] = "unexpected-equals-sign-before-attribute-name"; ERR2["missingEndTagName"] = "missing-end-tag-name"; ERR2["unexpectedCharacterInAttributeName"] = "unexpected-character-in-attribute-name"; ERR2["unknownNamedCharacterReference"] = "unknown-named-character-reference"; ERR2["missingSemicolonAfterCharacterReference"] = "missing-semicolon-after-character-reference"; ERR2["unexpectedCharacterAfterDoctypeSystemIdentifier"] = "unexpected-character-after-doctype-system-identifier"; ERR2["unexpectedCharacterInUnquotedAttributeValue"] = "unexpected-character-in-unquoted-attribute-value"; ERR2["eofBeforeTagName"] = "eof-before-tag-name"; ERR2["eofInTag"] = "eof-in-tag"; ERR2["missingAttributeValue"] = "missing-attribute-value"; ERR2["missingWhitespaceBetweenAttributes"] = "missing-whitespace-between-attributes"; ERR2["missingWhitespaceAfterDoctypePublicKeyword"] = "missing-whitespace-after-doctype-public-keyword"; ERR2["missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers"] = "missing-whitespace-between-doctype-public-and-system-identifiers"; ERR2["missingWhitespaceAfterDoctypeSystemKeyword"] = "missing-whitespace-after-doctype-system-keyword"; ERR2["missingQuoteBeforeDoctypePublicIdentifier"] = "missing-quote-before-doctype-public-identifier"; ERR2["missingQuoteBeforeDoctypeSystemIdentifier"] = "missing-quote-before-doctype-system-identifier"; ERR2["missingDoctypePublicIdentifier"] = "missing-doctype-public-identifier"; ERR2["missingDoctypeSystemIdentifier"] = "missing-doctype-system-identifier"; ERR2["abruptDoctypePublicIdentifier"] = "abrupt-doctype-public-identifier"; ERR2["abruptDoctypeSystemIdentifier"] = "abrupt-doctype-system-identifier"; ERR2["cdataInHtmlContent"] = "cdata-in-html-content"; ERR2["incorrectlyOpenedComment"] = "incorrectly-opened-comment"; ERR2["eofInScriptHtmlCommentLikeText"] = "eof-in-script-html-comment-like-text"; ERR2["eofInDoctype"] = "eof-in-doctype"; ERR2["nestedComment"] = "nested-comment"; ERR2["abruptClosingOfEmptyComment"] = "abrupt-closing-of-empty-comment"; ERR2["eofInComment"] = "eof-in-comment"; ERR2["incorrectlyClosedComment"] = "incorrectly-closed-comment"; ERR2["eofInCdata"] = "eof-in-cdata"; ERR2["absenceOfDigitsInNumericCharacterReference"] = "absence-of-digits-in-numeric-character-reference"; ERR2["nullCharacterReference"] = "null-character-reference"; ERR2["surrogateCharacterReference"] = "surrogate-character-reference"; ERR2["characterReferenceOutsideUnicodeRange"] = "character-reference-outside-unicode-range"; ERR2["controlCharacterReference"] = "control-character-reference"; ERR2["noncharacterCharacterReference"] = "noncharacter-character-reference"; ERR2["missingWhitespaceBeforeDoctypeName"] = "missing-whitespace-before-doctype-name"; ERR2["missingDoctypeName"] = "missing-doctype-name"; ERR2["invalidCharacterSequenceAfterDoctypeName"] = "invalid-character-sequence-after-doctype-name"; ERR2["duplicateAttribute"] = "duplicate-attribute"; ERR2["nonConformingDoctype"] = "non-conforming-doctype"; ERR2["missingDoctype"] = "missing-doctype"; ERR2["misplacedDoctype"] = "misplaced-doctype"; ERR2["endTagWithoutMatchingOpenElement"] = "end-tag-without-matching-open-element"; ERR2["closingOfElementWithOpenChildElements"] = "closing-of-element-with-open-child-elements"; ERR2["disallowedContentInNoscriptInHead"] = "disallowed-content-in-noscript-in-head"; ERR2["openElementsLeftAfterEof"] = "open-elements-left-after-eof"; ERR2["abandonedHeadElementChild"] = "abandoned-head-element-child"; ERR2["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element"; ERR2["nestedNoscriptInHead"] = "nested-noscript-in-head"; ERR2["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text"; })(ERR || (ERR = {})); // node_modules/parse5/dist/tokenizer/preprocessor.js var DEFAULT_BUFFER_WATERLINE = 1 << 16; var Preprocessor = class { constructor(handler) { this.handler = handler; this.html = ""; this.pos = -1; this.lastGapPos = -2; this.gapStack = []; this.skipNextNewLine = false; this.lastChunkWritten = false; this.endOfChunkHit = false; this.bufferWaterline = DEFAULT_BUFFER_WATERLINE; this.isEol = false; this.lineStartPos = 0; this.droppedBufferSize = 0; this.line = 1; this.lastErrOffset = -1; } get col() { return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos); } get offset() { return this.droppedBufferSize + this.pos; } getError(code, cpOffset) { const { line, col, offset } = this; const startCol = col + cpOffset; const startOffset = offset + cpOffset; return { code, startLine: line, endLine: line, startCol, endCol: startCol, startOffset, endOffset: startOffset }; } _err(code) { if (this.handler.onParseError && this.lastErrOffset !== this.offset) { this.lastErrOffset = this.offset; this.handler.onParseError(this.getError(code, 0)); } } _addGap() { this.gapStack.push(this.lastGapPos); this.lastGapPos = this.pos; } _processSurrogate(cp) { if (this.pos !== this.html.length - 1) { const nextCp = this.html.charCodeAt(this.pos + 1); if (isSurrogatePair(nextCp)) { this.pos++; this._addGap(); return getSurrogatePairCodePoint(cp, nextCp); } } else if (!this.lastChunkWritten) { this.endOfChunkHit = true; return CODE_POINTS.EOF; } this._err(ERR.surrogateInInputStream); return cp; } willDropParsedChunk() { return this.pos > this.bufferWaterline; } dropParsedChunk() { if (this.willDropParsedChunk()) { this.html = this.html.substring(this.pos); this.lineStartPos -= this.pos; this.droppedBufferSize += this.pos; this.pos = 0; this.lastGapPos = -2; this.gapStack.length = 0; } } write(chunk, isLastChunk) { if (this.html.length > 0) { this.html += chunk; } else { this.html = chunk; } this.endOfChunkHit = false; this.lastChunkWritten = isLastChunk; } insertHtmlAtCurrentPos(chunk) { this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1); this.endOfChunkHit = false; } startsWith(pattern, caseSensitive) { if (this.pos + pattern.length > this.html.length) { this.endOfChunkHit = !this.lastChunkWritten; return false; } if (caseSensitive) { return this.html.startsWith(pattern, this.pos); } for (let i = 0; i < pattern.length; i++) { const cp = this.html.charCodeAt(this.pos + i) | 32; if (cp !== pattern.charCodeAt(i)) { return false; } } return true; } peek(offset) { const pos = this.pos + offset; if (pos >= this.html.length) { this.endOfChunkHit = !this.lastChunkWritten; return CODE_POINTS.EOF; } const code = this.html.charCodeAt(pos); return code === CODE_POINTS.CARRIAGE_RETURN ? CODE_POINTS.LINE_FEED : code; } advance() { this.pos++; if (this.isEol) { this.isEol = false; this.line++; this.lineStartPos = this.pos; } if (this.pos >= this.html.length) { this.endOfChunkHit = !this.lastChunkWritten; return CODE_POINTS.EOF; } let cp = this.html.charCodeAt(this.pos); if (cp === CODE_POINTS.CARRIAGE_RETURN) { this.isEol = true; this.skipNextNewLine = true; return CODE_POINTS.LINE_FEED; } if (cp === CODE_POINTS.LINE_FEED) { this.isEol = true; if (this.skipNextNewLine) { this.line--; this.skipNextNewLine = false; this._addGap(); return this.advance(); } } this.skipNextNewLine = false; if (isSurrogate(cp)) { cp = this._processSurrogate(cp); } const isCommonValidRange = this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976; if (!isCommonValidRange) { this._checkForProblematicCharacters(cp); } return cp; } _checkForProblematicCharacters(cp) { if (isControlCodePoint(cp)) { this._err(ERR.controlCharacterInInputStream); } else if (isUndefinedCodePoint(cp)) { this._err(ERR.noncharacterInInputStream); } } retreat(count) { this.pos -= count; while (this.pos < this.lastGapPos) { this.lastGapPos = this.gapStack.pop(); this.pos--; } this.isEol = false; } }; // node_modules/parse5/dist/common/token.js var token_exports = {}; __export(token_exports, { TokenType: () => TokenType, getTokenAttr: () => getTokenAttr }); var TokenType; (function(TokenType2) { TokenType2[TokenType2["CHARACTER"] = 0] = "CHARACTER"; TokenType2[TokenType2["NULL_CHARACTER"] = 1] = "NULL_CHARACTER"; TokenType2[TokenType2["WHITESPACE_CHARACTER"] = 2] = "WHITESPACE_CHARACTER"; TokenType2[TokenType2["START_TAG"] = 3] = "START_TAG"; TokenType2[TokenType2["END_TAG"] = 4] = "END_TAG"; TokenType2[TokenType2["COMMENT"] = 5] = "COMMENT"; TokenType2[TokenType2["DOCTYPE"] = 6] = "DOCTYPE"; TokenType2[TokenType2["EOF"] = 7] = "EOF"; TokenType2[TokenType2["HIBERNATION"] = 8] = "HIBERNATION"; })(TokenType || (TokenType = {})); function getTokenAttr(token, attrName) { for (let i = token.attrs.length - 1; i >= 0; i--) { if (token.attrs[i].name === attrName) { return token.attrs[i].value; } } return null; } // node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js var htmlDecodeTree2 = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ '\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map((c) => c.charCodeAt(0))); // node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js var _a4; var decodeMap3 = new Map([ [0, 65533], [128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376] ]); var fromCodePoint3 = (_a4 = String.fromCodePoint) !== null && _a4 !== void 0 ? _a4 : function(codePoint) { let output = ""; if (codePoint > 65535) { codePoint -= 65536; output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296); codePoint = 56320 | codePoint & 1023; } output += String.fromCharCode(codePoint); return output; }; function replaceCodePoint3(codePoint) { var _a5; if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { return 65533; } return (_a5 = decodeMap3.get(codePoint)) !== null && _a5 !== void 0 ? _a5 : codePoint; } // node_modules/parse5/node_modules/entities/dist/esm/decode.js var CharCodes4; (function(CharCodes5) { CharCodes5[CharCodes5["NUM"] = 35] = "NUM"; CharCodes5[CharCodes5["SEMI"] = 59] = "SEMI"; CharCodes5[CharCodes5["EQUALS"] = 61] = "EQUALS"; CharCodes5[CharCodes5["ZERO"] = 48] = "ZERO"; CharCodes5[CharCodes5["NINE"] = 57] = "NINE"; CharCodes5[CharCodes5["LOWER_A"] = 97] = "LOWER_A"; CharCodes5[CharCodes5["LOWER_F"] = 102] = "LOWER_F"; CharCodes5[CharCodes5["LOWER_X"] = 120] = "LOWER_X"; CharCodes5[CharCodes5["LOWER_Z"] = 122] = "LOWER_Z"; CharCodes5[CharCodes5["UPPER_A"] = 65] = "UPPER_A"; CharCodes5[CharCodes5["UPPER_F"] = 70] = "UPPER_F"; CharCodes5[CharCodes5["UPPER_Z"] = 90] = "UPPER_Z"; })(CharCodes4 || (CharCodes4 = {})); var TO_LOWER_BIT3 = 32; var BinTrieFlags3; (function(BinTrieFlags4) { BinTrieFlags4[BinTrieFlags4["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; BinTrieFlags4[BinTrieFlags4["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; BinTrieFlags4[BinTrieFlags4["JUMP_TABLE"] = 127] = "JUMP_TABLE"; })(BinTrieFlags3 || (BinTrieFlags3 = {})); function isNumber3(code) { return code >= CharCodes4.ZERO && code <= CharCodes4.NINE; } function isHexadecimalCharacter3(code) { return code >= CharCodes4.UPPER_A && code <= CharCodes4.UPPER_F || code >= CharCodes4.LOWER_A && code <= CharCodes4.LOWER_F; } function isAsciiAlphaNumeric3(code) { return code >= CharCodes4.UPPER_A && code <= CharCodes4.UPPER_Z || code >= CharCodes4.LOWER_A && code <= CharCodes4.LOWER_Z || isNumber3(code); } function isEntityInAttributeInvalidEnd3(code) { return code === CharCodes4.EQUALS || isAsciiAlphaNumeric3(code); } var EntityDecoderState3; (function(EntityDecoderState4) { EntityDecoderState4[EntityDecoderState4["EntityStart"] = 0] = "EntityStart"; EntityDecoderState4[EntityDecoderState4["NumericStart"] = 1] = "NumericStart"; EntityDecoderState4[EntityDecoderState4["NumericDecimal"] = 2] = "NumericDecimal"; EntityDecoderState4[EntityDecoderState4["NumericHex"] = 3] = "NumericHex"; EntityDecoderState4[EntityDecoderState4["NamedEntity"] = 4] = "NamedEntity"; })(EntityDecoderState3 || (EntityDecoderState3 = {})); var DecodingMode3; (function(DecodingMode4) { DecodingMode4[DecodingMode4["Legacy"] = 0] = "Legacy"; DecodingMode4[DecodingMode4["Strict"] = 1] = "Strict"; DecodingMode4[DecodingMode4["Attribute"] = 2] = "Attribute"; })(DecodingMode3 || (DecodingMode3 = {})); var EntityDecoder3 = class { constructor(decodeTree, emitCodePoint, errors) { this.decodeTree = decodeTree; this.emitCodePoint = emitCodePoint; this.errors = errors; this.state = EntityDecoderState3.EntityStart; this.consumed = 1; this.result = 0; this.treeIndex = 0; this.excess = 1; this.decodeMode = DecodingMode3.Strict; } startEntity(decodeMode) { this.decodeMode = decodeMode; this.state = EntityDecoderState3.EntityStart; this.result = 0; this.treeIndex = 0; this.excess = 1; this.consumed = 1; } write(input, offset) { switch (this.state) { case EntityDecoderState3.EntityStart: { if (input.charCodeAt(offset) === CharCodes4.NUM) { this.state = EntityDecoderState3.NumericStart; this.consumed += 1; return this.stateNumericStart(input, offset + 1); } this.state = EntityDecoderState3.NamedEntity; return this.stateNamedEntity(input, offset); } case EntityDecoderState3.NumericStart: { return this.stateNumericStart(input, offset); } case EntityDecoderState3.NumericDecimal: { return this.stateNumericDecimal(input, offset); } case EntityDecoderState3.NumericHex: { return this.stateNumericHex(input, offset); } case EntityDecoderState3.NamedEntity: { return this.stateNamedEntity(input, offset); } } } stateNumericStart(input, offset) { if (offset >= input.length) { return -1; } if ((input.charCodeAt(offset) | TO_LOWER_BIT3) === CharCodes4.LOWER_X) { this.state = EntityDecoderState3.NumericHex; this.consumed += 1; return this.stateNumericHex(input, offset + 1); } this.state = EntityDecoderState3.NumericDecimal; return this.stateNumericDecimal(input, offset); } addToNumericResult(input, start, end2, base) { if (start !== end2) { const digitCount = end2 - start; this.result = this.result * Math.pow(base, digitCount) + Number.parseInt(input.substr(start, digitCount), base); this.consumed += digitCount; } } stateNumericHex(input, offset) { const startIndex = offset; while (offset < input.length) { const char = input.charCodeAt(offset); if (isNumber3(char) || isHexadecimalCharacter3(char)) { offset += 1; } else { this.addToNumericResult(input, startIndex, offset, 16); return this.emitNumericEntity(char, 3); } } this.addToNumericResult(input, startIndex, offset, 16); return -1; } stateNumericDecimal(input, offset) { const startIndex = offset; while (offset < input.length) { const char = input.charCodeAt(offset); if (isNumber3(char)) { offset += 1; } else { this.addToNumericResult(input, startIndex, offset, 10); return this.emitNumericEntity(char, 2); } } this.addToNumericResult(input, startIndex, offset, 10); return -1; } emitNumericEntity(lastCp, expectedLength) { var _a5; if (this.consumed <= expectedLength) { (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } if (lastCp === CharCodes4.SEMI) { this.consumed += 1; } else if (this.decodeMode === DecodingMode3.Strict) { return 0; } this.emitCodePoint(replaceCodePoint3(this.result), this.consumed); if (this.errors) { if (lastCp !== CharCodes4.SEMI) { this.errors.missingSemicolonAfterCharacterReference(); } this.errors.validateNumericCharacterReference(this.result); } return this.consumed; } stateNamedEntity(input, offset) { const { decodeTree } = this; let current = decodeTree[this.treeIndex]; let valueLength = (current & BinTrieFlags3.VALUE_LENGTH) >> 14; for (; offset < input.length; offset++, this.excess++) { const char = input.charCodeAt(offset); this.treeIndex = determineBranch3(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); if (this.treeIndex < 0) { return this.result === 0 || this.decodeMode === DecodingMode3.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd3(char)) ? 0 : this.emitNotTerminatedNamedEntity(); } current = decodeTree[this.treeIndex]; valueLength = (current & BinTrieFlags3.VALUE_LENGTH) >> 14; if (valueLength !== 0) { if (char === CharCodes4.SEMI) { return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); } if (this.decodeMode !== DecodingMode3.Strict) { this.result = this.treeIndex; this.consumed += this.excess; this.excess = 0; } } } return -1; } emitNotTerminatedNamedEntity() { var _a5; const { result, decodeTree } = this; const valueLength = (decodeTree[result] & BinTrieFlags3.VALUE_LENGTH) >> 14; this.emitNamedEntityData(result, valueLength, this.consumed); (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.missingSemicolonAfterCharacterReference(); return this.consumed; } emitNamedEntityData(result, valueLength, consumed) { const { decodeTree } = this; this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags3.VALUE_LENGTH : decodeTree[result + 1], consumed); if (valueLength === 3) { this.emitCodePoint(decodeTree[result + 2], consumed); } return consumed; } end() { var _a5; switch (this.state) { case EntityDecoderState3.NamedEntity: { return this.result !== 0 && (this.decodeMode !== DecodingMode3.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; } case EntityDecoderState3.NumericDecimal: { return this.emitNumericEntity(0, 2); } case EntityDecoderState3.NumericHex: { return this.emitNumericEntity(0, 3); } case EntityDecoderState3.NumericStart: { (_a5 = this.errors) === null || _a5 === void 0 ? void 0 : _a5.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } case EntityDecoderState3.EntityStart: { return 0; } } } }; function determineBranch3(decodeTree, current, nodeIndex, char) { const branchCount = (current & BinTrieFlags3.BRANCH_LENGTH) >> 7; const jumpOffset = current & BinTrieFlags3.JUMP_TABLE; if (branchCount === 0) { return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; } if (jumpOffset) { const value = char - jumpOffset; return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1; } let lo = nodeIndex; let hi = lo + branchCount - 1; while (lo <= hi) { const mid = lo + hi >>> 1; const midValue = decodeTree[mid]; if (midValue < char) { lo = mid + 1; } else if (midValue > char) { hi = mid - 1; } else { return decodeTree[mid + branchCount]; } } return -1; } // node_modules/parse5/dist/common/html.js var html_exports = {}; __export(html_exports, { ATTRS: () => ATTRS, DOCUMENT_MODE: () => DOCUMENT_MODE, NS: () => NS, NUMBERED_HEADERS: () => NUMBERED_HEADERS, SPECIAL_ELEMENTS: () => SPECIAL_ELEMENTS, TAG_ID: () => TAG_ID, TAG_NAMES: () => TAG_NAMES, getTagID: () => getTagID, hasUnescapedText: () => hasUnescapedText }); var NS; (function(NS2) { NS2["HTML"] = "http://www.w3.org/1999/xhtml"; NS2["MATHML"] = "http://www.w3.org/1998/Math/MathML"; NS2["SVG"] = "http://www.w3.org/2000/svg"; NS2["XLINK"] = "http://www.w3.org/1999/xlink"; NS2["XML"] = "http://www.w3.org/XML/1998/namespace"; NS2["XMLNS"] = "http://www.w3.org/2000/xmlns/"; })(NS || (NS = {})); var ATTRS; (function(ATTRS2) { ATTRS2["TYPE"] = "type"; ATTRS2["ACTION"] = "action"; ATTRS2["ENCODING"] = "encoding"; ATTRS2["PROMPT"] = "prompt"; ATTRS2["NAME"] = "name"; ATTRS2["COLOR"] = "color"; ATTRS2["FACE"] = "face"; ATTRS2["SIZE"] = "size"; })(ATTRS || (ATTRS = {})); var DOCUMENT_MODE; (function(DOCUMENT_MODE2) { DOCUMENT_MODE2["NO_QUIRKS"] = "no-quirks"; DOCUMENT_MODE2["QUIRKS"] = "quirks"; DOCUMENT_MODE2["LIMITED_QUIRKS"] = "limited-quirks"; })(DOCUMENT_MODE || (DOCUMENT_MODE = {})); var TAG_NAMES; (function(TAG_NAMES2) { TAG_NAMES2["A"] = "a"; TAG_NAMES2["ADDRESS"] = "address"; TAG_NAMES2["ANNOTATION_XML"] = "annotation-xml"; TAG_NAMES2["APPLET"] = "applet"; TAG_NAMES2["AREA"] = "area"; TAG_NAMES2["ARTICLE"] = "article"; TAG_NAMES2["ASIDE"] = "aside"; TAG_NAMES2["B"] = "b"; TAG_NAMES2["BASE"] = "base"; TAG_NAMES2["BASEFONT"] = "basefont"; TAG_NAMES2["BGSOUND"] = "bgsound"; TAG_NAMES2["BIG"] = "big"; TAG_NAMES2["BLOCKQUOTE"] = "blockquote"; TAG_NAMES2["BODY"] = "body"; TAG_NAMES2["BR"] = "br"; TAG_NAMES2["BUTTON"] = "button"; TAG_NAMES2["CAPTION"] = "caption"; TAG_NAMES2["CENTER"] = "center"; TAG_NAMES2["CODE"] = "code"; TAG_NAMES2["COL"] = "col"; TAG_NAMES2["COLGROUP"] = "colgroup"; TAG_NAMES2["DD"] = "dd"; TAG_NAMES2["DESC"] = "desc"; TAG_NAMES2["DETAILS"] = "details"; TAG_NAMES2["DIALOG"] = "dialog"; TAG_NAMES2["DIR"] = "dir"; TAG_NAMES2["DIV"] = "div"; TAG_NAMES2["DL"] = "dl"; TAG_NAMES2["DT"] = "dt"; TAG_NAMES2["EM"] = "em"; TAG_NAMES2["EMBED"] = "embed"; TAG_NAMES2["FIELDSET"] = "fieldset"; TAG_NAMES2["FIGCAPTION"] = "figcaption"; TAG_NAMES2["FIGURE"] = "figure"; TAG_NAMES2["FONT"] = "font"; TAG_NAMES2["FOOTER"] = "footer"; TAG_NAMES2["FOREIGN_OBJECT"] = "foreignObject"; TAG_NAMES2["FORM"] = "form"; TAG_NAMES2["FRAME"] = "frame"; TAG_NAMES2["FRAMESET"] = "frameset"; TAG_NAMES2["H1"] = "h1"; TAG_NAMES2["H2"] = "h2"; TAG_NAMES2["H3"] = "h3"; TAG_NAMES2["H4"] = "h4"; TAG_NAMES2["H5"] = "h5"; TAG_NAMES2["H6"] = "h6"; TAG_NAMES2["HEAD"] = "head"; TAG_NAMES2["HEADER"] = "header"; TAG_NAMES2["HGROUP"] = "hgroup"; TAG_NAMES2["HR"] = "hr"; TAG_NAMES2["HTML"] = "html"; TAG_NAMES2["I"] = "i"; TAG_NAMES2["IMG"] = "img"; TAG_NAMES2["IMAGE"] = "image"; TAG_NAMES2["INPUT"] = "input"; TAG_NAMES2["IFRAME"] = "iframe"; TAG_NAMES2["KEYGEN"] = "keygen"; TAG_NAMES2["LABEL"] = "label"; TAG_NAMES2["LI"] = "li"; TAG_NAMES2["LINK"] = "link"; TAG_NAMES2["LISTING"] = "listing"; TAG_NAMES2["MAIN"] = "main"; TAG_NAMES2["MALIGNMARK"] = "malignmark"; TAG_NAMES2["MARQUEE"] = "marquee"; TAG_NAMES2["MATH"] = "math"; TAG_NAMES2["MENU"] = "menu"; TAG_NAMES2["META"] = "meta"; TAG_NAMES2["MGLYPH"] = "mglyph"; TAG_NAMES2["MI"] = "mi"; TAG_NAMES2["MO"] = "mo"; TAG_NAMES2["MN"] = "mn"; TAG_NAMES2["MS"] = "ms"; TAG_NAMES2["MTEXT"] = "mtext"; TAG_NAMES2["NAV"] = "nav"; TAG_NAMES2["NOBR"] = "nobr"; TAG_NAMES2["NOFRAMES"] = "noframes"; TAG_NAMES2["NOEMBED"] = "noembed"; TAG_NAMES2["NOSCRIPT"] = "noscript"; TAG_NAMES2["OBJECT"] = "object"; TAG_NAMES2["OL"] = "ol"; TAG_NAMES2["OPTGROUP"] = "optgroup"; TAG_NAMES2["OPTION"] = "option"; TAG_NAMES2["P"] = "p"; TAG_NAMES2["PARAM"] = "param"; TAG_NAMES2["PLAINTEXT"] = "plaintext"; TAG_NAMES2["PRE"] = "pre"; TAG_NAMES2["RB"] = "rb"; TAG_NAMES2["RP"] = "rp"; TAG_NAMES2["RT"] = "rt"; TAG_NAMES2["RTC"] = "rtc"; TAG_NAMES2["RUBY"] = "ruby"; TAG_NAMES2["S"] = "s"; TAG_NAMES2["SCRIPT"] = "script"; TAG_NAMES2["SEARCH"] = "search"; TAG_NAMES2["SECTION"] = "section"; TAG_NAMES2["SELECT"] = "select"; TAG_NAMES2["SOURCE"] = "source"; TAG_NAMES2["SMALL"] = "small"; TAG_NAMES2["SPAN"] = "span"; TAG_NAMES2["STRIKE"] = "strike"; TAG_NAMES2["STRONG"] = "strong"; TAG_NAMES2["STYLE"] = "style"; TAG_NAMES2["SUB"] = "sub"; TAG_NAMES2["SUMMARY"] = "summary"; TAG_NAMES2["SUP"] = "sup"; TAG_NAMES2["TABLE"] = "table"; TAG_NAMES2["TBODY"] = "tbody"; TAG_NAMES2["TEMPLATE"] = "template"; TAG_NAMES2["TEXTAREA"] = "textarea"; TAG_NAMES2["TFOOT"] = "tfoot"; TAG_NAMES2["TD"] = "td"; TAG_NAMES2["TH"] = "th"; TAG_NAMES2["THEAD"] = "thead"; TAG_NAMES2["TITLE"] = "title"; TAG_NAMES2["TR"] = "tr"; TAG_NAMES2["TRACK"] = "track"; TAG_NAMES2["TT"] = "tt"; TAG_NAMES2["U"] = "u"; TAG_NAMES2["UL"] = "ul"; TAG_NAMES2["SVG"] = "svg"; TAG_NAMES2["VAR"] = "var"; TAG_NAMES2["WBR"] = "wbr"; TAG_NAMES2["XMP"] = "xmp"; })(TAG_NAMES || (TAG_NAMES = {})); var TAG_ID; (function(TAG_ID2) { TAG_ID2[TAG_ID2["UNKNOWN"] = 0] = "UNKNOWN"; TAG_ID2[TAG_ID2["A"] = 1] = "A"; TAG_ID2[TAG_ID2["ADDRESS"] = 2] = "ADDRESS"; TAG_ID2[TAG_ID2["ANNOTATION_XML"] = 3] = "ANNOTATION_XML"; TAG_ID2[TAG_ID2["APPLET"] = 4] = "APPLET"; TAG_ID2[TAG_ID2["AREA"] = 5] = "AREA"; TAG_ID2[TAG_ID2["ARTICLE"] = 6] = "ARTICLE"; TAG_ID2[TAG_ID2["ASIDE"] = 7] = "ASIDE"; TAG_ID2[TAG_ID2["B"] = 8] = "B"; TAG_ID2[TAG_ID2["BASE"] = 9] = "BASE"; TAG_ID2[TAG_ID2["BASEFONT"] = 10] = "BASEFONT"; TAG_ID2[TAG_ID2["BGSOUND"] = 11] = "BGSOUND"; TAG_ID2[TAG_ID2["BIG"] = 12] = "BIG"; TAG_ID2[TAG_ID2["BLOCKQUOTE"] = 13] = "BLOCKQUOTE"; TAG_ID2[TAG_ID2["BODY"] = 14] = "BODY"; TAG_ID2[TAG_ID2["BR"] = 15] = "BR"; TAG_ID2[TAG_ID2["BUTTON"] = 16] = "BUTTON"; TAG_ID2[TAG_ID2["CAPTION"] = 17] = "CAPTION"; TAG_ID2[TAG_ID2["CENTER"] = 18] = "CENTER"; TAG_ID2[TAG_ID2["CODE"] = 19] = "CODE"; TAG_ID2[TAG_ID2["COL"] = 20] = "COL"; TAG_ID2[TAG_ID2["COLGROUP"] = 21] = "COLGROUP"; TAG_ID2[TAG_ID2["DD"] = 22] = "DD"; TAG_ID2[TAG_ID2["DESC"] = 23] = "DESC"; TAG_ID2[TAG_ID2["DETAILS"] = 24] = "DETAILS"; TAG_ID2[TAG_ID2["DIALOG"] = 25] = "DIALOG"; TAG_ID2[TAG_ID2["DIR"] = 26] = "DIR"; TAG_ID2[TAG_ID2["DIV"] = 27] = "DIV"; TAG_ID2[TAG_ID2["DL"] = 28] = "DL"; TAG_ID2[TAG_ID2["DT"] = 29] = "DT"; TAG_ID2[TAG_ID2["EM"] = 30] = "EM"; TAG_ID2[TAG_ID2["EMBED"] = 31] = "EMBED"; TAG_ID2[TAG_ID2["FIELDSET"] = 32] = "FIELDSET"; TAG_ID2[TAG_ID2["FIGCAPTION"] = 33] = "FIGCAPTION"; TAG_ID2[TAG_ID2["FIGURE"] = 34] = "FIGURE"; TAG_ID2[TAG_ID2["FONT"] = 35] = "FONT"; TAG_ID2[TAG_ID2["FOOTER"] = 36] = "FOOTER"; TAG_ID2[TAG_ID2["FOREIGN_OBJECT"] = 37] = "FOREIGN_OBJECT"; TAG_ID2[TAG_ID2["FORM"] = 38] = "FORM"; TAG_ID2[TAG_ID2["FRAME"] = 39] = "FRAME"; TAG_ID2[TAG_ID2["FRAMESET"] = 40] = "FRAMESET"; TAG_ID2[TAG_ID2["H1"] = 41] = "H1"; TAG_ID2[TAG_ID2["H2"] = 42] = "H2"; TAG_ID2[TAG_ID2["H3"] = 43] = "H3"; TAG_ID2[TAG_ID2["H4"] = 44] = "H4"; TAG_ID2[TAG_ID2["H5"] = 45] = "H5"; TAG_ID2[TAG_ID2["H6"] = 46] = "H6"; TAG_ID2[TAG_ID2["HEAD"] = 47] = "HEAD"; TAG_ID2[TAG_ID2["HEADER"] = 48] = "HEADER"; TAG_ID2[TAG_ID2["HGROUP"] = 49] = "HGROUP"; TAG_ID2[TAG_ID2["HR"] = 50] = "HR"; TAG_ID2[TAG_ID2["HTML"] = 51] = "HTML"; TAG_ID2[TAG_ID2["I"] = 52] = "I"; TAG_ID2[TAG_ID2["IMG"] = 53] = "IMG"; TAG_ID2[TAG_ID2["IMAGE"] = 54] = "IMAGE"; TAG_ID2[TAG_ID2["INPUT"] = 55] = "INPUT"; TAG_ID2[TAG_ID2["IFRAME"] = 56] = "IFRAME"; TAG_ID2[TAG_ID2["KEYGEN"] = 57] = "KEYGEN"; TAG_ID2[TAG_ID2["LABEL"] = 58] = "LABEL"; TAG_ID2[TAG_ID2["LI"] = 59] = "LI"; TAG_ID2[TAG_ID2["LINK"] = 60] = "LINK"; TAG_ID2[TAG_ID2["LISTING"] = 61] = "LISTING"; TAG_ID2[TAG_ID2["MAIN"] = 62] = "MAIN"; TAG_ID2[TAG_ID2["MALIGNMARK"] = 63] = "MALIGNMARK"; TAG_ID2[TAG_ID2["MARQUEE"] = 64] = "MARQUEE"; TAG_ID2[TAG_ID2["MATH"] = 65] = "MATH"; TAG_ID2[TAG_ID2["MENU"] = 66] = "MENU"; TAG_ID2[TAG_ID2["META"] = 67] = "META"; TAG_ID2[TAG_ID2["MGLYPH"] = 68] = "MGLYPH"; TAG_ID2[TAG_ID2["MI"] = 69] = "MI"; TAG_ID2[TAG_ID2["MO"] = 70] = "MO"; TAG_ID2[TAG_ID2["MN"] = 71] = "MN"; TAG_ID2[TAG_ID2["MS"] = 72] = "MS"; TAG_ID2[TAG_ID2["MTEXT"] = 73] = "MTEXT"; TAG_ID2[TAG_ID2["NAV"] = 74] = "NAV"; TAG_ID2[TAG_ID2["NOBR"] = 75] = "NOBR"; TAG_ID2[TAG_ID2["NOFRAMES"] = 76] = "NOFRAMES"; TAG_ID2[TAG_ID2["NOEMBED"] = 77] = "NOEMBED"; TAG_ID2[TAG_ID2["NOSCRIPT"] = 78] = "NOSCRIPT"; TAG_ID2[TAG_ID2["OBJECT"] = 79] = "OBJECT"; TAG_ID2[TAG_ID2["OL"] = 80] = "OL"; TAG_ID2[TAG_ID2["OPTGROUP"] = 81] = "OPTGROUP"; TAG_ID2[TAG_ID2["OPTION"] = 82] = "OPTION"; TAG_ID2[TAG_ID2["P"] = 83] = "P"; TAG_ID2[TAG_ID2["PARAM"] = 84] = "PARAM"; TAG_ID2[TAG_ID2["PLAINTEXT"] = 85] = "PLAINTEXT"; TAG_ID2[TAG_ID2["PRE"] = 86] = "PRE"; TAG_ID2[TAG_ID2["RB"] = 87] = "RB"; TAG_ID2[TAG_ID2["RP"] = 88] = "RP"; TAG_ID2[TAG_ID2["RT"] = 89] = "RT"; TAG_ID2[TAG_ID2["RTC"] = 90] = "RTC"; TAG_ID2[TAG_ID2["RUBY"] = 91] = "RUBY"; TAG_ID2[TAG_ID2["S"] = 92] = "S"; TAG_ID2[TAG_ID2["SCRIPT"] = 93] = "SCRIPT"; TAG_ID2[TAG_ID2["SEARCH"] = 94] = "SEARCH"; TAG_ID2[TAG_ID2["SECTION"] = 95] = "SECTION"; TAG_ID2[TAG_ID2["SELECT"] = 96] = "SELECT"; TAG_ID2[TAG_ID2["SOURCE"] = 97] = "SOURCE"; TAG_ID2[TAG_ID2["SMALL"] = 98] = "SMALL"; TAG_ID2[TAG_ID2["SPAN"] = 99] = "SPAN"; TAG_ID2[TAG_ID2["STRIKE"] = 100] = "STRIKE"; TAG_ID2[TAG_ID2["STRONG"] = 101] = "STRONG"; TAG_ID2[TAG_ID2["STYLE"] = 102] = "STYLE"; TAG_ID2[TAG_ID2["SUB"] = 103] = "SUB"; TAG_ID2[TAG_ID2["SUMMARY"] = 104] = "SUMMARY"; TAG_ID2[TAG_ID2["SUP"] = 105] = "SUP"; TAG_ID2[TAG_ID2["TABLE"] = 106] = "TABLE"; TAG_ID2[TAG_ID2["TBODY"] = 107] = "TBODY"; TAG_ID2[TAG_ID2["TEMPLATE"] = 108] = "TEMPLATE"; TAG_ID2[TAG_ID2["TEXTAREA"] = 109] = "TEXTAREA"; TAG_ID2[TAG_ID2["TFOOT"] = 110] = "TFOOT"; TAG_ID2[TAG_ID2["TD"] = 111] = "TD"; TAG_ID2[TAG_ID2["TH"] = 112] = "TH"; TAG_ID2[TAG_ID2["THEAD"] = 113] = "THEAD"; TAG_ID2[TAG_ID2["TITLE"] = 114] = "TITLE"; TAG_ID2[TAG_ID2["TR"] = 115] = "TR"; TAG_ID2[TAG_ID2["TRACK"] = 116] = "TRACK"; TAG_ID2[TAG_ID2["TT"] = 117] = "TT"; TAG_ID2[TAG_ID2["U"] = 118] = "U"; TAG_ID2[TAG_ID2["UL"] = 119] = "UL"; TAG_ID2[TAG_ID2["SVG"] = 120] = "SVG"; TAG_ID2[TAG_ID2["VAR"] = 121] = "VAR"; TAG_ID2[TAG_ID2["WBR"] = 122] = "WBR"; TAG_ID2[TAG_ID2["XMP"] = 123] = "XMP"; })(TAG_ID || (TAG_ID = {})); var TAG_NAME_TO_ID = new Map([ [TAG_NAMES.A, TAG_ID.A], [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS], [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML], [TAG_NAMES.APPLET, TAG_ID.APPLET], [TAG_NAMES.AREA, TAG_ID.AREA], [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE], [TAG_NAMES.ASIDE, TAG_ID.ASIDE], [TAG_NAMES.B, TAG_ID.B], [TAG_NAMES.BASE, TAG_ID.BASE], [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT], [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND], [TAG_NAMES.BIG, TAG_ID.BIG], [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE], [TAG_NAMES.BODY, TAG_ID.BODY], [TAG_NAMES.BR, TAG_ID.BR], [TAG_NAMES.BUTTON, TAG_ID.BUTTON], [TAG_NAMES.CAPTION, TAG_ID.CAPTION], [TAG_NAMES.CENTER, TAG_ID.CENTER], [TAG_NAMES.CODE, TAG_ID.CODE], [TAG_NAMES.COL, TAG_ID.COL], [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP], [TAG_NAMES.DD, TAG_ID.DD], [TAG_NAMES.DESC, TAG_ID.DESC], [TAG_NAMES.DETAILS, TAG_ID.DETAILS], [TAG_NAMES.DIALOG, TAG_ID.DIALOG], [TAG_NAMES.DIR, TAG_ID.DIR], [TAG_NAMES.DIV, TAG_ID.DIV], [TAG_NAMES.DL, TAG_ID.DL], [TAG_NAMES.DT, TAG_ID.DT], [TAG_NAMES.EM, TAG_ID.EM], [TAG_NAMES.EMBED, TAG_ID.EMBED], [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET], [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION], [TAG_NAMES.FIGURE, TAG_ID.FIGURE], [TAG_NAMES.FONT, TAG_ID.FONT], [TAG_NAMES.FOOTER, TAG_ID.FOOTER], [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT], [TAG_NAMES.FORM, TAG_ID.FORM], [TAG_NAMES.FRAME, TAG_ID.FRAME], [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET], [TAG_NAMES.H1, TAG_ID.H1], [TAG_NAMES.H2, TAG_ID.H2], [TAG_NAMES.H3, TAG_ID.H3], [TAG_NAMES.H4, TAG_ID.H4], [TAG_NAMES.H5, TAG_ID.H5], [TAG_NAMES.H6, TAG_ID.H6], [TAG_NAMES.HEAD, TAG_ID.HEAD], [TAG_NAMES.HEADER, TAG_ID.HEADER], [TAG_NAMES.HGROUP, TAG_ID.HGROUP], [TAG_NAMES.HR, TAG_ID.HR], [TAG_NAMES.HTML, TAG_ID.HTML], [TAG_NAMES.I, TAG_ID.I], [TAG_NAMES.IMG, TAG_ID.IMG], [TAG_NAMES.IMAGE, TAG_ID.IMAGE], [TAG_NAMES.INPUT, TAG_ID.INPUT], [TAG_NAMES.IFRAME, TAG_ID.IFRAME], [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN], [TAG_NAMES.LABEL, TAG_ID.LABEL], [TAG_NAMES.LI, TAG_ID.LI], [TAG_NAMES.LINK, TAG_ID.LINK], [TAG_NAMES.LISTING, TAG_ID.LISTING], [TAG_NAMES.MAIN, TAG_ID.MAIN], [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK], [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE], [TAG_NAMES.MATH, TAG_ID.MATH], [TAG_NAMES.MENU, TAG_ID.MENU], [TAG_NAMES.META, TAG_ID.META], [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH], [TAG_NAMES.MI, TAG_ID.MI], [TAG_NAMES.MO, TAG_ID.MO], [TAG_NAMES.MN, TAG_ID.MN], [TAG_NAMES.MS, TAG_ID.MS], [TAG_NAMES.MTEXT, TAG_ID.MTEXT], [TAG_NAMES.NAV, TAG_ID.NAV], [TAG_NAMES.NOBR, TAG_ID.NOBR], [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES], [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED], [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT], [TAG_NAMES.OBJECT, TAG_ID.OBJECT], [TAG_NAMES.OL, TAG_ID.OL], [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP], [TAG_NAMES.OPTION, TAG_ID.OPTION], [TAG_NAMES.P, TAG_ID.P], [TAG_NAMES.PARAM, TAG_ID.PARAM], [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT], [TAG_NAMES.PRE, TAG_ID.PRE], [TAG_NAMES.RB, TAG_ID.RB], [TAG_NAMES.RP, TAG_ID.RP], [TAG_NAMES.RT, TAG_ID.RT], [TAG_NAMES.RTC, TAG_ID.RTC], [TAG_NAMES.RUBY, TAG_ID.RUBY], [TAG_NAMES.S, TAG_ID.S], [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT], [TAG_NAMES.SEARCH, TAG_ID.SEARCH], [TAG_NAMES.SECTION, TAG_ID.SECTION], [TAG_NAMES.SELECT, TAG_ID.SELECT], [TAG_NAMES.SOURCE, TAG_ID.SOURCE], [TAG_NAMES.SMALL, TAG_ID.SMALL], [TAG_NAMES.SPAN, TAG_ID.SPAN], [TAG_NAMES.STRIKE, TAG_ID.STRIKE], [TAG_NAMES.STRONG, TAG_ID.STRONG], [TAG_NAMES.STYLE, TAG_ID.STYLE], [TAG_NAMES.SUB, TAG_ID.SUB], [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY], [TAG_NAMES.SUP, TAG_ID.SUP], [TAG_NAMES.TABLE, TAG_ID.TABLE], [TAG_NAMES.TBODY, TAG_ID.TBODY], [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE], [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA], [TAG_NAMES.TFOOT, TAG_ID.TFOOT], [TAG_NAMES.TD, TAG_ID.TD], [TAG_NAMES.TH, TAG_ID.TH], [TAG_NAMES.THEAD, TAG_ID.THEAD], [TAG_NAMES.TITLE, TAG_ID.TITLE], [TAG_NAMES.TR, TAG_ID.TR], [TAG_NAMES.TRACK, TAG_ID.TRACK], [TAG_NAMES.TT, TAG_ID.TT], [TAG_NAMES.U, TAG_ID.U], [TAG_NAMES.UL, TAG_ID.UL], [TAG_NAMES.SVG, TAG_ID.SVG], [TAG_NAMES.VAR, TAG_ID.VAR], [TAG_NAMES.WBR, TAG_ID.WBR], [TAG_NAMES.XMP, TAG_ID.XMP] ]); function getTagID(tagName) { var _a5; return (_a5 = TAG_NAME_TO_ID.get(tagName)) !== null && _a5 !== void 0 ? _a5 : TAG_ID.UNKNOWN; } var $ = TAG_ID; var SPECIAL_ELEMENTS = { [NS.HTML]: new Set([ $.ADDRESS, $.APPLET, $.AREA, $.ARTICLE, $.ASIDE, $.BASE, $.BASEFONT, $.BGSOUND, $.BLOCKQUOTE, $.BODY, $.BR, $.BUTTON, $.CAPTION, $.CENTER, $.COL, $.COLGROUP, $.DD, $.DETAILS, $.DIR, $.DIV, $.DL, $.DT, $.EMBED, $.FIELDSET, $.FIGCAPTION, $.FIGURE, $.FOOTER, $.FORM, $.FRAME, $.FRAMESET, $.H1, $.H2, $.H3, $.H4, $.H5, $.H6, $.HEAD, $.HEADER, $.HGROUP, $.HR, $.HTML, $.IFRAME, $.IMG, $.INPUT, $.LI, $.LINK, $.LISTING, $.MAIN, $.MARQUEE, $.MENU, $.META, $.NAV, $.NOEMBED, $.NOFRAMES, $.NOSCRIPT, $.OBJECT, $.OL, $.P, $.PARAM, $.PLAINTEXT, $.PRE, $.SCRIPT, $.SECTION, $.SELECT, $.SOURCE, $.STYLE, $.SUMMARY, $.TABLE, $.TBODY, $.TD, $.TEMPLATE, $.TEXTAREA, $.TFOOT, $.TH, $.THEAD, $.TITLE, $.TR, $.TRACK, $.UL, $.WBR, $.XMP ]), [NS.MATHML]: new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]), [NS.SVG]: new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]), [NS.XLINK]: new Set(), [NS.XML]: new Set(), [NS.XMLNS]: new Set() }; var NUMBERED_HEADERS = new Set([$.H1, $.H2, $.H3, $.H4, $.H5, $.H6]); var UNESCAPED_TEXT = new Set([ TAG_NAMES.STYLE, TAG_NAMES.SCRIPT, TAG_NAMES.XMP, TAG_NAMES.IFRAME, TAG_NAMES.NOEMBED, TAG_NAMES.NOFRAMES, TAG_NAMES.PLAINTEXT ]); function hasUnescapedText(tn, scriptingEnabled) { return UNESCAPED_TEXT.has(tn) || scriptingEnabled && tn === TAG_NAMES.NOSCRIPT; } // node_modules/parse5/dist/tokenizer/index.js var State2; (function(State3) { State3[State3["DATA"] = 0] = "DATA"; State3[State3["RCDATA"] = 1] = "RCDATA"; State3[State3["RAWTEXT"] = 2] = "RAWTEXT"; State3[State3["SCRIPT_DATA"] = 3] = "SCRIPT_DATA"; State3[State3["PLAINTEXT"] = 4] = "PLAINTEXT"; State3[State3["TAG_OPEN"] = 5] = "TAG_OPEN"; State3[State3["END_TAG_OPEN"] = 6] = "END_TAG_OPEN"; State3[State3["TAG_NAME"] = 7] = "TAG_NAME"; State3[State3["RCDATA_LESS_THAN_SIGN"] = 8] = "RCDATA_LESS_THAN_SIGN"; State3[State3["RCDATA_END_TAG_OPEN"] = 9] = "RCDATA_END_TAG_OPEN"; State3[State3["RCDATA_END_TAG_NAME"] = 10] = "RCDATA_END_TAG_NAME"; State3[State3["RAWTEXT_LESS_THAN_SIGN"] = 11] = "RAWTEXT_LESS_THAN_SIGN"; State3[State3["RAWTEXT_END_TAG_OPEN"] = 12] = "RAWTEXT_END_TAG_OPEN"; State3[State3["RAWTEXT_END_TAG_NAME"] = 13] = "RAWTEXT_END_TAG_NAME"; State3[State3["SCRIPT_DATA_LESS_THAN_SIGN"] = 14] = "SCRIPT_DATA_LESS_THAN_SIGN"; State3[State3["SCRIPT_DATA_END_TAG_OPEN"] = 15] = "SCRIPT_DATA_END_TAG_OPEN"; State3[State3["SCRIPT_DATA_END_TAG_NAME"] = 16] = "SCRIPT_DATA_END_TAG_NAME"; State3[State3["SCRIPT_DATA_ESCAPE_START"] = 17] = "SCRIPT_DATA_ESCAPE_START"; State3[State3["SCRIPT_DATA_ESCAPE_START_DASH"] = 18] = "SCRIPT_DATA_ESCAPE_START_DASH"; State3[State3["SCRIPT_DATA_ESCAPED"] = 19] = "SCRIPT_DATA_ESCAPED"; State3[State3["SCRIPT_DATA_ESCAPED_DASH"] = 20] = "SCRIPT_DATA_ESCAPED_DASH"; State3[State3["SCRIPT_DATA_ESCAPED_DASH_DASH"] = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH"; State3[State3["SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"] = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"; State3[State3["SCRIPT_DATA_ESCAPED_END_TAG_OPEN"] = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN"; State3[State3["SCRIPT_DATA_ESCAPED_END_TAG_NAME"] = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME"; State3[State3["SCRIPT_DATA_DOUBLE_ESCAPE_START"] = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START"; State3[State3["SCRIPT_DATA_DOUBLE_ESCAPED"] = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED"; State3[State3["SCRIPT_DATA_DOUBLE_ESCAPED_DASH"] = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH"; State3[State3["SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"] = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"; State3[State3["SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"] = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"; State3[State3["SCRIPT_DATA_DOUBLE_ESCAPE_END"] = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END"; State3[State3["BEFORE_ATTRIBUTE_NAME"] = 31] = "BEFORE_ATTRIBUTE_NAME"; State3[State3["ATTRIBUTE_NAME"] = 32] = "ATTRIBUTE_NAME"; State3[State3["AFTER_ATTRIBUTE_NAME"] = 33] = "AFTER_ATTRIBUTE_NAME"; State3[State3["BEFORE_ATTRIBUTE_VALUE"] = 34] = "BEFORE_ATTRIBUTE_VALUE"; State3[State3["ATTRIBUTE_VALUE_DOUBLE_QUOTED"] = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED"; State3[State3["ATTRIBUTE_VALUE_SINGLE_QUOTED"] = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED"; State3[State3["ATTRIBUTE_VALUE_UNQUOTED"] = 37] = "ATTRIBUTE_VALUE_UNQUOTED"; State3[State3["AFTER_ATTRIBUTE_VALUE_QUOTED"] = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED"; State3[State3["SELF_CLOSING_START_TAG"] = 39] = "SELF_CLOSING_START_TAG"; State3[State3["BOGUS_COMMENT"] = 40] = "BOGUS_COMMENT"; State3[State3["MARKUP_DECLARATION_OPEN"] = 41] = "MARKUP_DECLARATION_OPEN"; State3[State3["COMMENT_START"] = 42] = "COMMENT_START"; State3[State3["COMMENT_START_DASH"] = 43] = "COMMENT_START_DASH"; State3[State3["COMMENT"] = 44] = "COMMENT"; State3[State3["COMMENT_LESS_THAN_SIGN"] = 45] = "COMMENT_LESS_THAN_SIGN"; State3[State3["COMMENT_LESS_THAN_SIGN_BANG"] = 46] = "COMMENT_LESS_THAN_SIGN_BANG"; State3[State3["COMMENT_LESS_THAN_SIGN_BANG_DASH"] = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH"; State3[State3["COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"] = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"; State3[State3["COMMENT_END_DASH"] = 49] = "COMMENT_END_DASH"; State3[State3["COMMENT_END"] = 50] = "COMMENT_END"; State3[State3["COMMENT_END_BANG"] = 51] = "COMMENT_END_BANG"; State3[State3["DOCTYPE"] = 52] = "DOCTYPE"; State3[State3["BEFORE_DOCTYPE_NAME"] = 53] = "BEFORE_DOCTYPE_NAME"; State3[State3["DOCTYPE_NAME"] = 54] = "DOCTYPE_NAME"; State3[State3["AFTER_DOCTYPE_NAME"] = 55] = "AFTER_DOCTYPE_NAME"; State3[State3["AFTER_DOCTYPE_PUBLIC_KEYWORD"] = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD"; State3[State3["BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"] = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"; State3[State3["DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"] = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"; State3[State3["DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"] = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"; State3[State3["AFTER_DOCTYPE_PUBLIC_IDENTIFIER"] = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER"; State3[State3["BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"] = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"; State3[State3["AFTER_DOCTYPE_SYSTEM_KEYWORD"] = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD"; State3[State3["BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"] = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"; State3[State3["DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"] = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"; State3[State3["DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"] = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"; State3[State3["AFTER_DOCTYPE_SYSTEM_IDENTIFIER"] = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER"; State3[State3["BOGUS_DOCTYPE"] = 67] = "BOGUS_DOCTYPE"; State3[State3["CDATA_SECTION"] = 68] = "CDATA_SECTION"; State3[State3["CDATA_SECTION_BRACKET"] = 69] = "CDATA_SECTION_BRACKET"; State3[State3["CDATA_SECTION_END"] = 70] = "CDATA_SECTION_END"; State3[State3["CHARACTER_REFERENCE"] = 71] = "CHARACTER_REFERENCE"; State3[State3["AMBIGUOUS_AMPERSAND"] = 72] = "AMBIGUOUS_AMPERSAND"; })(State2 || (State2 = {})); var TokenizerMode = { DATA: State2.DATA, RCDATA: State2.RCDATA, RAWTEXT: State2.RAWTEXT, SCRIPT_DATA: State2.SCRIPT_DATA, PLAINTEXT: State2.PLAINTEXT, CDATA_SECTION: State2.CDATA_SECTION }; function isAsciiDigit(cp) { return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9; } function isAsciiUpper(cp) { return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_Z; } function isAsciiLower(cp) { return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_Z; } function isAsciiLetter(cp) { return isAsciiLower(cp) || isAsciiUpper(cp); } function isAsciiAlphaNumeric4(cp) { return isAsciiLetter(cp) || isAsciiDigit(cp); } function toAsciiLower(cp) { return cp + 32; } function isWhitespace3(cp) { return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED; } function isScriptDataDoubleEscapeSequenceEnd(cp) { return isWhitespace3(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN; } function getErrorForNumericCharacterReference(code) { if (code === CODE_POINTS.NULL) { return ERR.nullCharacterReference; } else if (code > 1114111) { return ERR.characterReferenceOutsideUnicodeRange; } else if (isSurrogate(code)) { return ERR.surrogateCharacterReference; } else if (isUndefinedCodePoint(code)) { return ERR.noncharacterCharacterReference; } else if (isControlCodePoint(code) || code === CODE_POINTS.CARRIAGE_RETURN) { return ERR.controlCharacterReference; } return null; } var Tokenizer2 = class { constructor(options, handler) { this.options = options; this.handler = handler; this.paused = false; this.inLoop = false; this.inForeignNode = false; this.lastStartTagName = ""; this.active = false; this.state = State2.DATA; this.returnState = State2.DATA; this.entityStartPos = 0; this.consumedAfterSnapshot = -1; this.currentCharacterToken = null; this.currentToken = null; this.currentAttr = { name: "", value: "" }; this.preprocessor = new Preprocessor(handler); this.currentLocation = this.getCurrentLocation(-1); this.entityDecoder = new EntityDecoder3(htmlDecodeTree2, (cp, consumed) => { this.preprocessor.pos = this.entityStartPos + consumed - 1; this._flushCodePointConsumedAsCharacterReference(cp); }, handler.onParseError ? { missingSemicolonAfterCharacterReference: () => { this._err(ERR.missingSemicolonAfterCharacterReference, 1); }, absenceOfDigitsInNumericCharacterReference: (consumed) => { this._err(ERR.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + consumed); }, validateNumericCharacterReference: (code) => { const error = getErrorForNumericCharacterReference(code); if (error) this._err(error, 1); } } : void 0); } _err(code, cpOffset = 0) { var _a5, _b; (_b = (_a5 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a5, this.preprocessor.getError(code, cpOffset)); } getCurrentLocation(offset) { if (!this.options.sourceCodeLocationInfo) { return null; } return { startLine: this.preprocessor.line, startCol: this.preprocessor.col - offset, startOffset: this.preprocessor.offset - offset, endLine: -1, endCol: -1, endOffset: -1 }; } _runParsingLoop() { if (this.inLoop) return; this.inLoop = true; while (this.active && !this.paused) { this.consumedAfterSnapshot = 0; const cp = this._consume(); if (!this._ensureHibernation()) { this._callState(cp); } } this.inLoop = false; } pause() { this.paused = true; } resume(writeCallback) { if (!this.paused) { throw new Error("Parser was already resumed"); } this.paused = false; if (this.inLoop) return; this._runParsingLoop(); if (!this.paused) { writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); } } write(chunk, isLastChunk, writeCallback) { this.active = true; this.preprocessor.write(chunk, isLastChunk); this._runParsingLoop(); if (!this.paused) { writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); } } insertHtmlAtCurrentPos(chunk) { this.active = true; this.preprocessor.insertHtmlAtCurrentPos(chunk); this._runParsingLoop(); } _ensureHibernation() { if (this.preprocessor.endOfChunkHit) { this.preprocessor.retreat(this.consumedAfterSnapshot); this.consumedAfterSnapshot = 0; this.active = false; return true; } return false; } _consume() { this.consumedAfterSnapshot++; return this.preprocessor.advance(); } _advanceBy(count) { this.consumedAfterSnapshot += count; for (let i = 0; i < count; i++) { this.preprocessor.advance(); } } _consumeSequenceIfMatch(pattern, caseSensitive) { if (this.preprocessor.startsWith(pattern, caseSensitive)) { this._advanceBy(pattern.length - 1); return true; } return false; } _createStartTagToken() { this.currentToken = { type: TokenType.START_TAG, tagName: "", tagID: TAG_ID.UNKNOWN, selfClosing: false, ackSelfClosing: false, attrs: [], location: this.getCurrentLocation(1) }; } _createEndTagToken() { this.currentToken = { type: TokenType.END_TAG, tagName: "", tagID: TAG_ID.UNKNOWN, selfClosing: false, ackSelfClosing: false, attrs: [], location: this.getCurrentLocation(2) }; } _createCommentToken(offset) { this.currentToken = { type: TokenType.COMMENT, data: "", location: this.getCurrentLocation(offset) }; } _createDoctypeToken(initialName) { this.currentToken = { type: TokenType.DOCTYPE, name: initialName, forceQuirks: false, publicId: null, systemId: null, location: this.currentLocation }; } _createCharacterToken(type, chars) { this.currentCharacterToken = { type, chars, location: this.currentLocation }; } _createAttr(attrNameFirstCh) { this.currentAttr = { name: attrNameFirstCh, value: "" }; this.currentLocation = this.getCurrentLocation(0); } _leaveAttrName() { var _a5; var _b; const token = this.currentToken; if (getTokenAttr(token, this.currentAttr.name) === null) { token.attrs.push(this.currentAttr); if (token.location && this.currentLocation) { const attrLocations = (_a5 = (_b = token.location).attrs) !== null && _a5 !== void 0 ? _a5 : _b.attrs = Object.create(null); attrLocations[this.currentAttr.name] = this.currentLocation; this._leaveAttrValue(); } } else { this._err(ERR.duplicateAttribute); } } _leaveAttrValue() { if (this.currentLocation) { this.currentLocation.endLine = this.preprocessor.line; this.currentLocation.endCol = this.preprocessor.col; this.currentLocation.endOffset = this.preprocessor.offset; } } prepareToken(ct) { this._emitCurrentCharacterToken(ct.location); this.currentToken = null; if (ct.location) { ct.location.endLine = this.preprocessor.line; ct.location.endCol = this.preprocessor.col + 1; ct.location.endOffset = this.preprocessor.offset + 1; } this.currentLocation = this.getCurrentLocation(-1); } emitCurrentTagToken() { const ct = this.currentToken; this.prepareToken(ct); ct.tagID = getTagID(ct.tagName); if (ct.type === TokenType.START_TAG) { this.lastStartTagName = ct.tagName; this.handler.onStartTag(ct); } else { if (ct.attrs.length > 0) { this._err(ERR.endTagWithAttributes); } if (ct.selfClosing) { this._err(ERR.endTagWithTrailingSolidus); } this.handler.onEndTag(ct); } this.preprocessor.dropParsedChunk(); } emitCurrentComment(ct) { this.prepareToken(ct); this.handler.onComment(ct); this.preprocessor.dropParsedChunk(); } emitCurrentDoctype(ct) { this.prepareToken(ct); this.handler.onDoctype(ct); this.preprocessor.dropParsedChunk(); } _emitCurrentCharacterToken(nextLocation) { if (this.currentCharacterToken) { if (nextLocation && this.currentCharacterToken.location) { this.currentCharacterToken.location.endLine = nextLocation.startLine; this.currentCharacterToken.location.endCol = nextLocation.startCol; this.currentCharacterToken.location.endOffset = nextLocation.startOffset; } switch (this.currentCharacterToken.type) { case TokenType.CHARACTER: { this.handler.onCharacter(this.currentCharacterToken); break; } case TokenType.NULL_CHARACTER: { this.handler.onNullCharacter(this.currentCharacterToken); break; } case TokenType.WHITESPACE_CHARACTER: { this.handler.onWhitespaceCharacter(this.currentCharacterToken); break; } } this.currentCharacterToken = null; } } _emitEOFToken() { const location = this.getCurrentLocation(0); if (location) { location.endLine = location.startLine; location.endCol = location.startCol; location.endOffset = location.startOffset; } this._emitCurrentCharacterToken(location); this.handler.onEof({ type: TokenType.EOF, location }); this.active = false; } _appendCharToCurrentCharacterToken(type, ch) { if (this.currentCharacterToken) { if (this.currentCharacterToken.type === type) { this.currentCharacterToken.chars += ch; return; } else { this.currentLocation = this.getCurrentLocation(0); this._emitCurrentCharacterToken(this.currentLocation); this.preprocessor.dropParsedChunk(); } } this._createCharacterToken(type, ch); } _emitCodePoint(cp) { const type = isWhitespace3(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER; this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp)); } _emitChars(ch) { this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch); } _startCharacterReference() { this.returnState = this.state; this.state = State2.CHARACTER_REFERENCE; this.entityStartPos = this.preprocessor.pos; this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute() ? DecodingMode3.Attribute : DecodingMode3.Legacy); } _isCharacterReferenceInAttribute() { return this.returnState === State2.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State2.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State2.ATTRIBUTE_VALUE_UNQUOTED; } _flushCodePointConsumedAsCharacterReference(cp) { if (this._isCharacterReferenceInAttribute()) { this.currentAttr.value += String.fromCodePoint(cp); } else { this._emitCodePoint(cp); } } _callState(cp) { switch (this.state) { case State2.DATA: { this._stateData(cp); break; } case State2.RCDATA: { this._stateRcdata(cp); break; } case State2.RAWTEXT: { this._stateRawtext(cp); break; } case State2.SCRIPT_DATA: { this._stateScriptData(cp); break; } case State2.PLAINTEXT: { this._statePlaintext(cp); break; } case State2.TAG_OPEN: { this._stateTagOpen(cp); break; } case State2.END_TAG_OPEN: { this._stateEndTagOpen(cp); break; } case State2.TAG_NAME: { this._stateTagName(cp); break; } case State2.RCDATA_LESS_THAN_SIGN: { this._stateRcdataLessThanSign(cp); break; } case State2.RCDATA_END_TAG_OPEN: { this._stateRcdataEndTagOpen(cp); break; } case State2.RCDATA_END_TAG_NAME: { this._stateRcdataEndTagName(cp); break; } case State2.RAWTEXT_LESS_THAN_SIGN: { this._stateRawtextLessThanSign(cp); break; } case State2.RAWTEXT_END_TAG_OPEN: { this._stateRawtextEndTagOpen(cp); break; } case State2.RAWTEXT_END_TAG_NAME: { this._stateRawtextEndTagName(cp); break; } case State2.SCRIPT_DATA_LESS_THAN_SIGN: { this._stateScriptDataLessThanSign(cp); break; } case State2.SCRIPT_DATA_END_TAG_OPEN: { this._stateScriptDataEndTagOpen(cp); break; } case State2.SCRIPT_DATA_END_TAG_NAME: { this._stateScriptDataEndTagName(cp); break; } case State2.SCRIPT_DATA_ESCAPE_START: { this._stateScriptDataEscapeStart(cp); break; } case State2.SCRIPT_DATA_ESCAPE_START_DASH: { this._stateScriptDataEscapeStartDash(cp); break; } case State2.SCRIPT_DATA_ESCAPED: { this._stateScriptDataEscaped(cp); break; } case State2.SCRIPT_DATA_ESCAPED_DASH: { this._stateScriptDataEscapedDash(cp); break; } case State2.SCRIPT_DATA_ESCAPED_DASH_DASH: { this._stateScriptDataEscapedDashDash(cp); break; } case State2.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: { this._stateScriptDataEscapedLessThanSign(cp); break; } case State2.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: { this._stateScriptDataEscapedEndTagOpen(cp); break; } case State2.SCRIPT_DATA_ESCAPED_END_TAG_NAME: { this._stateScriptDataEscapedEndTagName(cp); break; } case State2.SCRIPT_DATA_DOUBLE_ESCAPE_START: { this._stateScriptDataDoubleEscapeStart(cp); break; } case State2.SCRIPT_DATA_DOUBLE_ESCAPED: { this._stateScriptDataDoubleEscaped(cp); break; } case State2.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: { this._stateScriptDataDoubleEscapedDash(cp); break; } case State2.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: { this._stateScriptDataDoubleEscapedDashDash(cp); break; } case State2.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: { this._stateScriptDataDoubleEscapedLessThanSign(cp); break; } case State2.SCRIPT_DATA_DOUBLE_ESCAPE_END: { this._stateScriptDataDoubleEscapeEnd(cp); break; } case State2.BEFORE_ATTRIBUTE_NAME: { this._stateBeforeAttributeName(cp); break; } case State2.ATTRIBUTE_NAME: { this._stateAttributeName(cp); break; } case State2.AFTER_ATTRIBUTE_NAME: { this._stateAfterAttributeName(cp); break; } case State2.BEFORE_ATTRIBUTE_VALUE: { this._stateBeforeAttributeValue(cp); break; } case State2.ATTRIBUTE_VALUE_DOUBLE_QUOTED: { this._stateAttributeValueDoubleQuoted(cp); break; } case State2.ATTRIBUTE_VALUE_SINGLE_QUOTED: { this._stateAttributeValueSingleQuoted(cp); break; } case State2.ATTRIBUTE_VALUE_UNQUOTED: { this._stateAttributeValueUnquoted(cp); break; } case State2.AFTER_ATTRIBUTE_VALUE_QUOTED: { this._stateAfterAttributeValueQuoted(cp); break; } case State2.SELF_CLOSING_START_TAG: { this._stateSelfClosingStartTag(cp); break; } case State2.BOGUS_COMMENT: { this._stateBogusComment(cp); break; } case State2.MARKUP_DECLARATION_OPEN: { this._stateMarkupDeclarationOpen(cp); break; } case State2.COMMENT_START: { this._stateCommentStart(cp); break; } case State2.COMMENT_START_DASH: { this._stateCommentStartDash(cp); break; } case State2.COMMENT: { this._stateComment(cp); break; } case State2.COMMENT_LESS_THAN_SIGN: { this._stateCommentLessThanSign(cp); break; } case State2.COMMENT_LESS_THAN_SIGN_BANG: { this._stateCommentLessThanSignBang(cp); break; } case State2.COMMENT_LESS_THAN_SIGN_BANG_DASH: { this._stateCommentLessThanSignBangDash(cp); break; } case State2.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: { this._stateCommentLessThanSignBangDashDash(cp); break; } case State2.COMMENT_END_DASH: { this._stateCommentEndDash(cp); break; } case State2.COMMENT_END: { this._stateCommentEnd(cp); break; } case State2.COMMENT_END_BANG: { this._stateCommentEndBang(cp); break; } case State2.DOCTYPE: { this._stateDoctype(cp); break; } case State2.BEFORE_DOCTYPE_NAME: { this._stateBeforeDoctypeName(cp); break; } case State2.DOCTYPE_NAME: { this._stateDoctypeName(cp); break; } case State2.AFTER_DOCTYPE_NAME: { this._stateAfterDoctypeName(cp); break; } case State2.AFTER_DOCTYPE_PUBLIC_KEYWORD: { this._stateAfterDoctypePublicKeyword(cp); break; } case State2.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: { this._stateBeforeDoctypePublicIdentifier(cp); break; } case State2.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: { this._stateDoctypePublicIdentifierDoubleQuoted(cp); break; } case State2.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: { this._stateDoctypePublicIdentifierSingleQuoted(cp); break; } case State2.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: { this._stateAfterDoctypePublicIdentifier(cp); break; } case State2.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: { this._stateBetweenDoctypePublicAndSystemIdentifiers(cp); break; } case State2.AFTER_DOCTYPE_SYSTEM_KEYWORD: { this._stateAfterDoctypeSystemKeyword(cp); break; } case State2.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: { this._stateBeforeDoctypeSystemIdentifier(cp); break; } case State2.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: { this._stateDoctypeSystemIdentifierDoubleQuoted(cp); break; } case State2.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: { this._stateDoctypeSystemIdentifierSingleQuoted(cp); break; } case State2.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: { this._stateAfterDoctypeSystemIdentifier(cp); break; } case State2.BOGUS_DOCTYPE: { this._stateBogusDoctype(cp); break; } case State2.CDATA_SECTION: { this._stateCdataSection(cp); break; } case State2.CDATA_SECTION_BRACKET: { this._stateCdataSectionBracket(cp); break; } case State2.CDATA_SECTION_END: { this._stateCdataSectionEnd(cp); break; } case State2.CHARACTER_REFERENCE: { this._stateCharacterReference(); break; } case State2.AMBIGUOUS_AMPERSAND: { this._stateAmbiguousAmpersand(cp); break; } default: { throw new Error("Unknown state"); } } } _stateData(cp) { switch (cp) { case CODE_POINTS.LESS_THAN_SIGN: { this.state = State2.TAG_OPEN; break; } case CODE_POINTS.AMPERSAND: { this._startCharacterReference(); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this._emitCodePoint(cp); break; } case CODE_POINTS.EOF: { this._emitEOFToken(); break; } default: { this._emitCodePoint(cp); } } } _stateRcdata(cp) { switch (cp) { case CODE_POINTS.AMPERSAND: { this._startCharacterReference(); break; } case CODE_POINTS.LESS_THAN_SIGN: { this.state = State2.RCDATA_LESS_THAN_SIGN; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this._emitChars(REPLACEMENT_CHARACTER); break; } case CODE_POINTS.EOF: { this._emitEOFToken(); break; } default: { this._emitCodePoint(cp); } } } _stateRawtext(cp) { switch (cp) { case CODE_POINTS.LESS_THAN_SIGN: { this.state = State2.RAWTEXT_LESS_THAN_SIGN; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this._emitChars(REPLACEMENT_CHARACTER); break; } case CODE_POINTS.EOF: { this._emitEOFToken(); break; } default: { this._emitCodePoint(cp); } } } _stateScriptData(cp) { switch (cp) { case CODE_POINTS.LESS_THAN_SIGN: { this.state = State2.SCRIPT_DATA_LESS_THAN_SIGN; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this._emitChars(REPLACEMENT_CHARACTER); break; } case CODE_POINTS.EOF: { this._emitEOFToken(); break; } default: { this._emitCodePoint(cp); } } } _statePlaintext(cp) { switch (cp) { case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this._emitChars(REPLACEMENT_CHARACTER); break; } case CODE_POINTS.EOF: { this._emitEOFToken(); break; } default: { this._emitCodePoint(cp); } } } _stateTagOpen(cp) { if (isAsciiLetter(cp)) { this._createStartTagToken(); this.state = State2.TAG_NAME; this._stateTagName(cp); } else switch (cp) { case CODE_POINTS.EXCLAMATION_MARK: { this.state = State2.MARKUP_DECLARATION_OPEN; break; } case CODE_POINTS.SOLIDUS: { this.state = State2.END_TAG_OPEN; break; } case CODE_POINTS.QUESTION_MARK: { this._err(ERR.unexpectedQuestionMarkInsteadOfTagName); this._createCommentToken(1); this.state = State2.BOGUS_COMMENT; this._stateBogusComment(cp); break; } case CODE_POINTS.EOF: { this._err(ERR.eofBeforeTagName); this._emitChars("<"); this._emitEOFToken(); break; } default: { this._err(ERR.invalidFirstCharacterOfTagName); this._emitChars("<"); this.state = State2.DATA; this._stateData(cp); } } } _stateEndTagOpen(cp) { if (isAsciiLetter(cp)) { this._createEndTagToken(); this.state = State2.TAG_NAME; this._stateTagName(cp); } else switch (cp) { case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingEndTagName); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofBeforeTagName); this._emitChars(""); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this.state = State2.SCRIPT_DATA_ESCAPED; this._emitChars(REPLACEMENT_CHARACTER); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInScriptHtmlCommentLikeText); this._emitEOFToken(); break; } default: { this.state = State2.SCRIPT_DATA_ESCAPED; this._emitCodePoint(cp); } } } _stateScriptDataEscapedLessThanSign(cp) { if (cp === CODE_POINTS.SOLIDUS) { this.state = State2.SCRIPT_DATA_ESCAPED_END_TAG_OPEN; } else if (isAsciiLetter(cp)) { this._emitChars("<"); this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPE_START; this._stateScriptDataDoubleEscapeStart(cp); } else { this._emitChars("<"); this.state = State2.SCRIPT_DATA_ESCAPED; this._stateScriptDataEscaped(cp); } } _stateScriptDataEscapedEndTagOpen(cp) { if (isAsciiLetter(cp)) { this.state = State2.SCRIPT_DATA_ESCAPED_END_TAG_NAME; this._stateScriptDataEscapedEndTagName(cp); } else { this._emitChars(""); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED; this._emitChars(REPLACEMENT_CHARACTER); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInScriptHtmlCommentLikeText); this._emitEOFToken(); break; } default: { this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED; this._emitCodePoint(cp); } } } _stateScriptDataDoubleEscapedLessThanSign(cp) { if (cp === CODE_POINTS.SOLIDUS) { this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPE_END; this._emitChars("/"); } else { this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED; this._stateScriptDataDoubleEscaped(cp); } } _stateScriptDataDoubleEscapeEnd(cp) { if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) { this._emitCodePoint(cp); for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) { this._emitCodePoint(this._consume()); } this.state = State2.SCRIPT_DATA_ESCAPED; } else if (!this._ensureHibernation()) { this.state = State2.SCRIPT_DATA_DOUBLE_ESCAPED; this._stateScriptDataDoubleEscaped(cp); } } _stateBeforeAttributeName(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.SOLIDUS: case CODE_POINTS.GREATER_THAN_SIGN: case CODE_POINTS.EOF: { this.state = State2.AFTER_ATTRIBUTE_NAME; this._stateAfterAttributeName(cp); break; } case CODE_POINTS.EQUALS_SIGN: { this._err(ERR.unexpectedEqualsSignBeforeAttributeName); this._createAttr("="); this.state = State2.ATTRIBUTE_NAME; break; } default: { this._createAttr(""); this.state = State2.ATTRIBUTE_NAME; this._stateAttributeName(cp); } } } _stateAttributeName(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: case CODE_POINTS.SOLIDUS: case CODE_POINTS.GREATER_THAN_SIGN: case CODE_POINTS.EOF: { this._leaveAttrName(); this.state = State2.AFTER_ATTRIBUTE_NAME; this._stateAfterAttributeName(cp); break; } case CODE_POINTS.EQUALS_SIGN: { this._leaveAttrName(); this.state = State2.BEFORE_ATTRIBUTE_VALUE; break; } case CODE_POINTS.QUOTATION_MARK: case CODE_POINTS.APOSTROPHE: case CODE_POINTS.LESS_THAN_SIGN: { this._err(ERR.unexpectedCharacterInAttributeName); this.currentAttr.name += String.fromCodePoint(cp); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this.currentAttr.name += REPLACEMENT_CHARACTER; break; } default: { this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); } } } _stateAfterAttributeName(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.SOLIDUS: { this.state = State2.SELF_CLOSING_START_TAG; break; } case CODE_POINTS.EQUALS_SIGN: { this.state = State2.BEFORE_ATTRIBUTE_VALUE; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; this.emitCurrentTagToken(); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInTag); this._emitEOFToken(); break; } default: { this._createAttr(""); this.state = State2.ATTRIBUTE_NAME; this._stateAttributeName(cp); } } } _stateBeforeAttributeValue(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.QUOTATION_MARK: { this.state = State2.ATTRIBUTE_VALUE_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { this.state = State2.ATTRIBUTE_VALUE_SINGLE_QUOTED; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingAttributeValue); this.state = State2.DATA; this.emitCurrentTagToken(); break; } default: { this.state = State2.ATTRIBUTE_VALUE_UNQUOTED; this._stateAttributeValueUnquoted(cp); } } } _stateAttributeValueDoubleQuoted(cp) { switch (cp) { case CODE_POINTS.QUOTATION_MARK: { this.state = State2.AFTER_ATTRIBUTE_VALUE_QUOTED; break; } case CODE_POINTS.AMPERSAND: { this._startCharacterReference(); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this.currentAttr.value += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInTag); this._emitEOFToken(); break; } default: { this.currentAttr.value += String.fromCodePoint(cp); } } } _stateAttributeValueSingleQuoted(cp) { switch (cp) { case CODE_POINTS.APOSTROPHE: { this.state = State2.AFTER_ATTRIBUTE_VALUE_QUOTED; break; } case CODE_POINTS.AMPERSAND: { this._startCharacterReference(); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this.currentAttr.value += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInTag); this._emitEOFToken(); break; } default: { this.currentAttr.value += String.fromCodePoint(cp); } } } _stateAttributeValueUnquoted(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this._leaveAttrValue(); this.state = State2.BEFORE_ATTRIBUTE_NAME; break; } case CODE_POINTS.AMPERSAND: { this._startCharacterReference(); break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._leaveAttrValue(); this.state = State2.DATA; this.emitCurrentTagToken(); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this.currentAttr.value += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.QUOTATION_MARK: case CODE_POINTS.APOSTROPHE: case CODE_POINTS.LESS_THAN_SIGN: case CODE_POINTS.EQUALS_SIGN: case CODE_POINTS.GRAVE_ACCENT: { this._err(ERR.unexpectedCharacterInUnquotedAttributeValue); this.currentAttr.value += String.fromCodePoint(cp); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInTag); this._emitEOFToken(); break; } default: { this.currentAttr.value += String.fromCodePoint(cp); } } } _stateAfterAttributeValueQuoted(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this._leaveAttrValue(); this.state = State2.BEFORE_ATTRIBUTE_NAME; break; } case CODE_POINTS.SOLIDUS: { this._leaveAttrValue(); this.state = State2.SELF_CLOSING_START_TAG; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._leaveAttrValue(); this.state = State2.DATA; this.emitCurrentTagToken(); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInTag); this._emitEOFToken(); break; } default: { this._err(ERR.missingWhitespaceBetweenAttributes); this.state = State2.BEFORE_ATTRIBUTE_NAME; this._stateBeforeAttributeName(cp); } } } _stateSelfClosingStartTag(cp) { switch (cp) { case CODE_POINTS.GREATER_THAN_SIGN: { const token = this.currentToken; token.selfClosing = true; this.state = State2.DATA; this.emitCurrentTagToken(); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInTag); this._emitEOFToken(); break; } default: { this._err(ERR.unexpectedSolidusInTag); this.state = State2.BEFORE_ATTRIBUTE_NAME; this._stateBeforeAttributeName(cp); } } } _stateBogusComment(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; this.emitCurrentComment(token); break; } case CODE_POINTS.EOF: { this.emitCurrentComment(token); this._emitEOFToken(); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.data += REPLACEMENT_CHARACTER; break; } default: { token.data += String.fromCodePoint(cp); } } } _stateMarkupDeclarationOpen(cp) { if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) { this._createCommentToken(SEQUENCES.DASH_DASH.length + 1); this.state = State2.COMMENT_START; } else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) { this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1); this.state = State2.DOCTYPE; } else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) { if (this.inForeignNode) { this.state = State2.CDATA_SECTION; } else { this._err(ERR.cdataInHtmlContent); this._createCommentToken(SEQUENCES.CDATA_START.length + 1); this.currentToken.data = "[CDATA["; this.state = State2.BOGUS_COMMENT; } } else if (!this._ensureHibernation()) { this._err(ERR.incorrectlyOpenedComment); this._createCommentToken(2); this.state = State2.BOGUS_COMMENT; this._stateBogusComment(cp); } } _stateCommentStart(cp) { switch (cp) { case CODE_POINTS.HYPHEN_MINUS: { this.state = State2.COMMENT_START_DASH; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptClosingOfEmptyComment); this.state = State2.DATA; const token = this.currentToken; this.emitCurrentComment(token); break; } default: { this.state = State2.COMMENT; this._stateComment(cp); } } } _stateCommentStartDash(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.HYPHEN_MINUS: { this.state = State2.COMMENT_END; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptClosingOfEmptyComment); this.state = State2.DATA; this.emitCurrentComment(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; } default: { token.data += "-"; this.state = State2.COMMENT; this._stateComment(cp); } } } _stateComment(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.HYPHEN_MINUS: { this.state = State2.COMMENT_END_DASH; break; } case CODE_POINTS.LESS_THAN_SIGN: { token.data += "<"; this.state = State2.COMMENT_LESS_THAN_SIGN; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.data += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; } default: { token.data += String.fromCodePoint(cp); } } } _stateCommentLessThanSign(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.EXCLAMATION_MARK: { token.data += "!"; this.state = State2.COMMENT_LESS_THAN_SIGN_BANG; break; } case CODE_POINTS.LESS_THAN_SIGN: { token.data += "<"; break; } default: { this.state = State2.COMMENT; this._stateComment(cp); } } } _stateCommentLessThanSignBang(cp) { if (cp === CODE_POINTS.HYPHEN_MINUS) { this.state = State2.COMMENT_LESS_THAN_SIGN_BANG_DASH; } else { this.state = State2.COMMENT; this._stateComment(cp); } } _stateCommentLessThanSignBangDash(cp) { if (cp === CODE_POINTS.HYPHEN_MINUS) { this.state = State2.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH; } else { this.state = State2.COMMENT_END_DASH; this._stateCommentEndDash(cp); } } _stateCommentLessThanSignBangDashDash(cp) { if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) { this._err(ERR.nestedComment); } this.state = State2.COMMENT_END; this._stateCommentEnd(cp); } _stateCommentEndDash(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.HYPHEN_MINUS: { this.state = State2.COMMENT_END; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; } default: { token.data += "-"; this.state = State2.COMMENT; this._stateComment(cp); } } } _stateCommentEnd(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; this.emitCurrentComment(token); break; } case CODE_POINTS.EXCLAMATION_MARK: { this.state = State2.COMMENT_END_BANG; break; } case CODE_POINTS.HYPHEN_MINUS: { token.data += "-"; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; } default: { token.data += "--"; this.state = State2.COMMENT; this._stateComment(cp); } } } _stateCommentEndBang(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.HYPHEN_MINUS: { token.data += "--!"; this.state = State2.COMMENT_END_DASH; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.incorrectlyClosedComment); this.state = State2.DATA; this.emitCurrentComment(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; } default: { token.data += "--!"; this.state = State2.COMMENT; this._stateComment(cp); } } } _stateDoctype(cp) { switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this.state = State2.BEFORE_DOCTYPE_NAME; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.BEFORE_DOCTYPE_NAME; this._stateBeforeDoctypeName(cp); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); this._createDoctypeToken(null); const token = this.currentToken; token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingWhitespaceBeforeDoctypeName); this.state = State2.BEFORE_DOCTYPE_NAME; this._stateBeforeDoctypeName(cp); } } } _stateBeforeDoctypeName(cp) { if (isAsciiUpper(cp)) { this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp))); this.state = State2.DOCTYPE_NAME; } else switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); this._createDoctypeToken(REPLACEMENT_CHARACTER); this.state = State2.DOCTYPE_NAME; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingDoctypeName); this._createDoctypeToken(null); const token = this.currentToken; token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); this._createDoctypeToken(null); const token = this.currentToken; token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._createDoctypeToken(String.fromCodePoint(cp)); this.state = State2.DOCTYPE_NAME; } } } _stateDoctypeName(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this.state = State2.AFTER_DOCTYPE_NAME; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.name += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); } } } _stateAfterDoctypeName(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) { this.state = State2.AFTER_DOCTYPE_PUBLIC_KEYWORD; } else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) { this.state = State2.AFTER_DOCTYPE_SYSTEM_KEYWORD; } else if (!this._ensureHibernation()) { this._err(ERR.invalidCharacterSequenceAfterDoctypeName); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } } _stateAfterDoctypePublicKeyword(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this.state = State2.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER; break; } case CODE_POINTS.QUOTATION_MARK: { this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword); token.publicId = ""; this.state = State2.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword); token.publicId = ""; this.state = State2.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingDoctypePublicIdentifier); token.forceQuirks = true; this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateBeforeDoctypePublicIdentifier(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.QUOTATION_MARK: { token.publicId = ""; this.state = State2.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { token.publicId = ""; this.state = State2.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingDoctypePublicIdentifier); token.forceQuirks = true; this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateDoctypePublicIdentifierDoubleQuoted(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.QUOTATION_MARK: { this.state = State2.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.publicId += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptDoctypePublicIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { token.publicId += String.fromCodePoint(cp); } } } _stateDoctypePublicIdentifierSingleQuoted(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.APOSTROPHE: { this.state = State2.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.publicId += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptDoctypePublicIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { token.publicId += String.fromCodePoint(cp); } } } _stateAfterDoctypePublicIdentifier(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this.state = State2.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.QUOTATION_MARK: { this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateBetweenDoctypePublicAndSystemIdentifiers(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.QUOTATION_MARK: { token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateAfterDoctypeSystemKeyword(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { this.state = State2.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER; break; } case CODE_POINTS.QUOTATION_MARK: { this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword); token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword); token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateBeforeDoctypeSystemIdentifier(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.QUOTATION_MARK: { token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; } case CODE_POINTS.APOSTROPHE: { token.systemId = ""; this.state = State2.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State2.DATA; this.emitCurrentDoctype(token); break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateDoctypeSystemIdentifierDoubleQuoted(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.QUOTATION_MARK: { this.state = State2.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.systemId += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptDoctypeSystemIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { token.systemId += String.fromCodePoint(cp); } } } _stateDoctypeSystemIdentifierSingleQuoted(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.APOSTROPHE: { this.state = State2.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); token.systemId += REPLACEMENT_CHARACTER; break; } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptDoctypeSystemIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { token.systemId += String.fromCodePoint(cp); } } } _stateAfterDoctypeSystemIdentifier(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: case CODE_POINTS.FORM_FEED: { break; } case CODE_POINTS.GREATER_THAN_SIGN: { this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: { this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier); this.state = State2.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); } } } _stateBogusDoctype(cp) { const token = this.currentToken; switch (cp) { case CODE_POINTS.GREATER_THAN_SIGN: { this.emitCurrentDoctype(token); this.state = State2.DATA; break; } case CODE_POINTS.NULL: { this._err(ERR.unexpectedNullCharacter); break; } case CODE_POINTS.EOF: { this.emitCurrentDoctype(token); this._emitEOFToken(); break; } default: } } _stateCdataSection(cp) { switch (cp) { case CODE_POINTS.RIGHT_SQUARE_BRACKET: { this.state = State2.CDATA_SECTION_BRACKET; break; } case CODE_POINTS.EOF: { this._err(ERR.eofInCdata); this._emitEOFToken(); break; } default: { this._emitCodePoint(cp); } } } _stateCdataSectionBracket(cp) { if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) { this.state = State2.CDATA_SECTION_END; } else { this._emitChars("]"); this.state = State2.CDATA_SECTION; this._stateCdataSection(cp); } } _stateCdataSectionEnd(cp) { switch (cp) { case CODE_POINTS.GREATER_THAN_SIGN: { this.state = State2.DATA; break; } case CODE_POINTS.RIGHT_SQUARE_BRACKET: { this._emitChars("]"); break; } default: { this._emitChars("]]"); this.state = State2.CDATA_SECTION; this._stateCdataSection(cp); } } } _stateCharacterReference() { let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos); if (length < 0) { if (this.preprocessor.lastChunkWritten) { length = this.entityDecoder.end(); } else { this.active = false; this.preprocessor.pos = this.preprocessor.html.length - 1; this.consumedAfterSnapshot = 0; this.preprocessor.endOfChunkHit = true; return; } } if (length === 0) { this.preprocessor.pos = this.entityStartPos; this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND); this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric4(this.preprocessor.peek(1)) ? State2.AMBIGUOUS_AMPERSAND : this.returnState; } else { this.state = this.returnState; } } _stateAmbiguousAmpersand(cp) { if (isAsciiAlphaNumeric4(cp)) { this._flushCodePointConsumedAsCharacterReference(cp); } else { if (cp === CODE_POINTS.SEMICOLON) { this._err(ERR.unknownNamedCharacterReference); } this.state = this.returnState; this._callState(cp); } } }; // node_modules/parse5/dist/parser/open-element-stack.js var IMPLICIT_END_TAG_REQUIRED = new Set([TAG_ID.DD, TAG_ID.DT, TAG_ID.LI, TAG_ID.OPTGROUP, TAG_ID.OPTION, TAG_ID.P, TAG_ID.RB, TAG_ID.RP, TAG_ID.RT, TAG_ID.RTC]); var IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([ ...IMPLICIT_END_TAG_REQUIRED, TAG_ID.CAPTION, TAG_ID.COLGROUP, TAG_ID.TBODY, TAG_ID.TD, TAG_ID.TFOOT, TAG_ID.TH, TAG_ID.THEAD, TAG_ID.TR ]); var SCOPING_ELEMENTS_HTML = new Set([ TAG_ID.APPLET, TAG_ID.CAPTION, TAG_ID.HTML, TAG_ID.MARQUEE, TAG_ID.OBJECT, TAG_ID.TABLE, TAG_ID.TD, TAG_ID.TEMPLATE, TAG_ID.TH ]); var SCOPING_ELEMENTS_HTML_LIST = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.OL, TAG_ID.UL]); var SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.BUTTON]); var SCOPING_ELEMENTS_MATHML = new Set([TAG_ID.ANNOTATION_XML, TAG_ID.MI, TAG_ID.MN, TAG_ID.MO, TAG_ID.MS, TAG_ID.MTEXT]); var SCOPING_ELEMENTS_SVG = new Set([TAG_ID.DESC, TAG_ID.FOREIGN_OBJECT, TAG_ID.TITLE]); var TABLE_ROW_CONTEXT = new Set([TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML]); var TABLE_BODY_CONTEXT = new Set([TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML]); var TABLE_CONTEXT = new Set([TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML]); var TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]); var OpenElementStack = class { get currentTmplContentOrNode() { return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current; } constructor(document2, treeAdapter, handler) { this.treeAdapter = treeAdapter; this.handler = handler; this.items = []; this.tagIDs = []; this.stackTop = -1; this.tmplCount = 0; this.currentTagId = TAG_ID.UNKNOWN; this.current = document2; } _indexOf(element) { return this.items.lastIndexOf(element, this.stackTop); } _isInTemplate() { return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML; } _updateCurrentElement() { this.current = this.items[this.stackTop]; this.currentTagId = this.tagIDs[this.stackTop]; } push(element, tagID) { this.stackTop++; this.items[this.stackTop] = element; this.current = element; this.tagIDs[this.stackTop] = tagID; this.currentTagId = tagID; if (this._isInTemplate()) { this.tmplCount++; } this.handler.onItemPush(element, tagID, true); } pop() { const popped = this.current; if (this.tmplCount > 0 && this._isInTemplate()) { this.tmplCount--; } this.stackTop--; this._updateCurrentElement(); this.handler.onItemPop(popped, true); } replace(oldElement, newElement) { const idx = this._indexOf(oldElement); this.items[idx] = newElement; if (idx === this.stackTop) { this.current = newElement; } } insertAfter(referenceElement, newElement, newElementID) { const insertionIdx = this._indexOf(referenceElement) + 1; this.items.splice(insertionIdx, 0, newElement); this.tagIDs.splice(insertionIdx, 0, newElementID); this.stackTop++; if (insertionIdx === this.stackTop) { this._updateCurrentElement(); } if (this.current && this.currentTagId !== void 0) { this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop); } } popUntilTagNamePopped(tagName) { let targetIdx = this.stackTop + 1; do { targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1); } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML); this.shortenToLength(Math.max(targetIdx, 0)); } shortenToLength(idx) { while (this.stackTop >= idx) { const popped = this.current; if (this.tmplCount > 0 && this._isInTemplate()) { this.tmplCount -= 1; } this.stackTop--; this._updateCurrentElement(); this.handler.onItemPop(popped, this.stackTop < idx); } } popUntilElementPopped(element) { const idx = this._indexOf(element); this.shortenToLength(Math.max(idx, 0)); } popUntilPopped(tagNames, targetNS) { const idx = this._indexOfTagNames(tagNames, targetNS); this.shortenToLength(Math.max(idx, 0)); } popUntilNumberedHeaderPopped() { this.popUntilPopped(NUMBERED_HEADERS, NS.HTML); } popUntilTableCellPopped() { this.popUntilPopped(TABLE_CELLS, NS.HTML); } popAllUpToHtmlElement() { this.tmplCount = 0; this.shortenToLength(1); } _indexOfTagNames(tagNames, namespace) { for (let i = this.stackTop; i >= 0; i--) { if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) { return i; } } return -1; } clearBackTo(tagNames, targetNS) { const idx = this._indexOfTagNames(tagNames, targetNS); this.shortenToLength(idx + 1); } clearBackToTableContext() { this.clearBackTo(TABLE_CONTEXT, NS.HTML); } clearBackToTableBodyContext() { this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML); } clearBackToTableRowContext() { this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML); } remove(element) { const idx = this._indexOf(element); if (idx >= 0) { if (idx === this.stackTop) { this.pop(); } else { this.items.splice(idx, 1); this.tagIDs.splice(idx, 1); this.stackTop--; this._updateCurrentElement(); this.handler.onItemPop(element, false); } } } tryPeekProperlyNestedBodyElement() { return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null; } contains(element) { return this._indexOf(element) > -1; } getCommonAncestor(element) { const elementIdx = this._indexOf(element) - 1; return elementIdx >= 0 ? this.items[elementIdx] : null; } isRootHtmlElementCurrent() { return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML; } hasInDynamicScope(tagName, htmlScope) { for (let i = this.stackTop; i >= 0; i--) { const tn = this.tagIDs[i]; switch (this.treeAdapter.getNamespaceURI(this.items[i])) { case NS.HTML: { if (tn === tagName) return true; if (htmlScope.has(tn)) return false; break; } case NS.SVG: { if (SCOPING_ELEMENTS_SVG.has(tn)) return false; break; } case NS.MATHML: { if (SCOPING_ELEMENTS_MATHML.has(tn)) return false; break; } } } return true; } hasInScope(tagName) { return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML); } hasInListItemScope(tagName) { return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST); } hasInButtonScope(tagName) { return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON); } hasNumberedHeaderInScope() { for (let i = this.stackTop; i >= 0; i--) { const tn = this.tagIDs[i]; switch (this.treeAdapter.getNamespaceURI(this.items[i])) { case NS.HTML: { if (NUMBERED_HEADERS.has(tn)) return true; if (SCOPING_ELEMENTS_HTML.has(tn)) return false; break; } case NS.SVG: { if (SCOPING_ELEMENTS_SVG.has(tn)) return false; break; } case NS.MATHML: { if (SCOPING_ELEMENTS_MATHML.has(tn)) return false; break; } } } return true; } hasInTableScope(tagName) { for (let i = this.stackTop; i >= 0; i--) { if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { continue; } switch (this.tagIDs[i]) { case tagName: { return true; } case TAG_ID.TABLE: case TAG_ID.HTML: { return false; } } } return true; } hasTableBodyContextInTableScope() { for (let i = this.stackTop; i >= 0; i--) { if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { continue; } switch (this.tagIDs[i]) { case TAG_ID.TBODY: case TAG_ID.THEAD: case TAG_ID.TFOOT: { return true; } case TAG_ID.TABLE: case TAG_ID.HTML: { return false; } } } return true; } hasInSelectScope(tagName) { for (let i = this.stackTop; i >= 0; i--) { if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { continue; } switch (this.tagIDs[i]) { case tagName: { return true; } case TAG_ID.OPTION: case TAG_ID.OPTGROUP: { break; } default: { return false; } } } return true; } generateImpliedEndTags() { while (this.currentTagId !== void 0 && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) { this.pop(); } } generateImpliedEndTagsThoroughly() { while (this.currentTagId !== void 0 && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { this.pop(); } } generateImpliedEndTagsWithExclusion(exclusionId) { while (this.currentTagId !== void 0 && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { this.pop(); } } }; // node_modules/parse5/dist/parser/formatting-element-list.js var NOAH_ARK_CAPACITY = 3; var EntryType; (function(EntryType2) { EntryType2[EntryType2["Marker"] = 0] = "Marker"; EntryType2[EntryType2["Element"] = 1] = "Element"; })(EntryType || (EntryType = {})); var MARKER = { type: EntryType.Marker }; var FormattingElementList = class { constructor(treeAdapter) { this.treeAdapter = treeAdapter; this.entries = []; this.bookmark = null; } _getNoahArkConditionCandidates(newElement, neAttrs) { const candidates = []; const neAttrsLength = neAttrs.length; const neTagName = this.treeAdapter.getTagName(newElement); const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); for (let i = 0; i < this.entries.length; i++) { const entry = this.entries[i]; if (entry.type === EntryType.Marker) { break; } const { element } = entry; if (this.treeAdapter.getTagName(element) === neTagName && this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) { const elementAttrs = this.treeAdapter.getAttrList(element); if (elementAttrs.length === neAttrsLength) { candidates.push({ idx: i, attrs: elementAttrs }); } } } return candidates; } _ensureNoahArkCondition(newElement) { if (this.entries.length < NOAH_ARK_CAPACITY) return; const neAttrs = this.treeAdapter.getAttrList(newElement); const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs); if (candidates.length < NOAH_ARK_CAPACITY) return; const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value])); let validCandidates = 0; for (let i = 0; i < candidates.length; i++) { const candidate = candidates[i]; if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) { validCandidates += 1; if (validCandidates >= NOAH_ARK_CAPACITY) { this.entries.splice(candidate.idx, 1); } } } } insertMarker() { this.entries.unshift(MARKER); } pushElement(element, token) { this._ensureNoahArkCondition(element); this.entries.unshift({ type: EntryType.Element, element, token }); } insertElementAfterBookmark(element, token) { const bookmarkIdx = this.entries.indexOf(this.bookmark); this.entries.splice(bookmarkIdx, 0, { type: EntryType.Element, element, token }); } removeEntry(entry) { const entryIndex = this.entries.indexOf(entry); if (entryIndex !== -1) { this.entries.splice(entryIndex, 1); } } clearToLastMarker() { const markerIdx = this.entries.indexOf(MARKER); if (markerIdx === -1) { this.entries.length = 0; } else { this.entries.splice(0, markerIdx + 1); } } getElementEntryInScopeWithTagName(tagName) { const entry = this.entries.find((entry2) => entry2.type === EntryType.Marker || this.treeAdapter.getTagName(entry2.element) === tagName); return entry && entry.type === EntryType.Element ? entry : null; } getElementEntry(element) { return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element); } }; // node_modules/parse5/dist/tree-adapters/default.js var defaultTreeAdapter = { createDocument() { return { nodeName: "#document", mode: DOCUMENT_MODE.NO_QUIRKS, childNodes: [] }; }, createDocumentFragment() { return { nodeName: "#document-fragment", childNodes: [] }; }, createElement(tagName, namespaceURI, attrs) { return { nodeName: tagName, tagName, attrs, namespaceURI, childNodes: [], parentNode: null }; }, createCommentNode(data2) { return { nodeName: "#comment", data: data2, parentNode: null }; }, createTextNode(value) { return { nodeName: "#text", value, parentNode: null }; }, appendChild(parentNode, newNode) { parentNode.childNodes.push(newNode); newNode.parentNode = parentNode; }, insertBefore(parentNode, newNode, referenceNode) { const insertionIdx = parentNode.childNodes.indexOf(referenceNode); parentNode.childNodes.splice(insertionIdx, 0, newNode); newNode.parentNode = parentNode; }, setTemplateContent(templateElement, contentElement) { templateElement.content = contentElement; }, getTemplateContent(templateElement) { return templateElement.content; }, setDocumentType(document2, name, publicId, systemId) { const doctypeNode = document2.childNodes.find((node) => node.nodeName === "#documentType"); if (doctypeNode) { doctypeNode.name = name; doctypeNode.publicId = publicId; doctypeNode.systemId = systemId; } else { const node = { nodeName: "#documentType", name, publicId, systemId, parentNode: null }; defaultTreeAdapter.appendChild(document2, node); } }, setDocumentMode(document2, mode) { document2.mode = mode; }, getDocumentMode(document2) { return document2.mode; }, detachNode(node) { if (node.parentNode) { const idx = node.parentNode.childNodes.indexOf(node); node.parentNode.childNodes.splice(idx, 1); node.parentNode = null; } }, insertText(parentNode, text3) { if (parentNode.childNodes.length > 0) { const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1]; if (defaultTreeAdapter.isTextNode(prevNode)) { prevNode.value += text3; return; } } defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text3)); }, insertTextBefore(parentNode, text3, referenceNode) { const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1]; if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) { prevNode.value += text3; } else { defaultTreeAdapter.insertBefore(parentNode, defaultTreeAdapter.createTextNode(text3), referenceNode); } }, adoptAttributes(recipient, attrs) { const recipientAttrsMap = new Set(recipient.attrs.map((attr2) => attr2.name)); for (let j = 0; j < attrs.length; j++) { if (!recipientAttrsMap.has(attrs[j].name)) { recipient.attrs.push(attrs[j]); } } }, getFirstChild(node) { return node.childNodes[0]; }, getChildNodes(node) { return node.childNodes; }, getParentNode(node) { return node.parentNode; }, getAttrList(element) { return element.attrs; }, getTagName(element) { return element.tagName; }, getNamespaceURI(element) { return element.namespaceURI; }, getTextNodeContent(textNode) { return textNode.value; }, getCommentNodeContent(commentNode) { return commentNode.data; }, getDocumentTypeNodeName(doctypeNode) { return doctypeNode.name; }, getDocumentTypeNodePublicId(doctypeNode) { return doctypeNode.publicId; }, getDocumentTypeNodeSystemId(doctypeNode) { return doctypeNode.systemId; }, isTextNode(node) { return node.nodeName === "#text"; }, isCommentNode(node) { return node.nodeName === "#comment"; }, isDocumentTypeNode(node) { return node.nodeName === "#documentType"; }, isElementNode(node) { return Object.prototype.hasOwnProperty.call(node, "tagName"); }, setNodeSourceCodeLocation(node, location) { node.sourceCodeLocation = location; }, getNodeSourceCodeLocation(node) { return node.sourceCodeLocation; }, updateNodeSourceCodeLocation(node, endLocation) { node.sourceCodeLocation = __spreadValues(__spreadValues({}, node.sourceCodeLocation), endLocation); } }; // node_modules/parse5/dist/common/doctype.js var VALID_DOCTYPE_NAME = "html"; var VALID_SYSTEM_ID = "about:legacy-compat"; var QUIRKS_MODE_SYSTEM_ID = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"; var QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ "+//silmaril//dtd html pro v0r11 19970101//", "-//as//dtd html 3.0 aswedit + extensions//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", "-//spyglass//dtd html 2.0 extended//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//" ]; var QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ ...QUIRKS_MODE_PUBLIC_ID_PREFIXES, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//" ]; var QUIRKS_MODE_PUBLIC_IDS = new Set([ "-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html" ]); var LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"]; var LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [ ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//" ]; function hasPrefix(publicId, prefixes) { return prefixes.some((prefix) => publicId.startsWith(prefix)); } function isConforming(token) { return token.name === VALID_DOCTYPE_NAME && token.publicId === null && (token.systemId === null || token.systemId === VALID_SYSTEM_ID); } function getDocumentMode(token) { if (token.name !== VALID_DOCTYPE_NAME) { return DOCUMENT_MODE.QUIRKS; } const { systemId } = token; if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) { return DOCUMENT_MODE.QUIRKS; } let { publicId } = token; if (publicId !== null) { publicId = publicId.toLowerCase(); if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) { return DOCUMENT_MODE.QUIRKS; } let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; if (hasPrefix(publicId, prefixes)) { return DOCUMENT_MODE.QUIRKS; } prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; if (hasPrefix(publicId, prefixes)) { return DOCUMENT_MODE.LIMITED_QUIRKS; } } return DOCUMENT_MODE.NO_QUIRKS; } // node_modules/parse5/dist/common/foreign-content.js var foreign_content_exports = {}; __export(foreign_content_exports, { SVG_TAG_NAMES_ADJUSTMENT_MAP: () => SVG_TAG_NAMES_ADJUSTMENT_MAP, adjustTokenMathMLAttrs: () => adjustTokenMathMLAttrs, adjustTokenSVGAttrs: () => adjustTokenSVGAttrs, adjustTokenSVGTagName: () => adjustTokenSVGTagName, adjustTokenXMLAttrs: () => adjustTokenXMLAttrs, causesExit: () => causesExit, isIntegrationPoint: () => isIntegrationPoint }); var MIME_TYPES = { TEXT_HTML: "text/html", APPLICATION_XML: "application/xhtml+xml" }; var DEFINITION_URL_ATTR = "definitionurl"; var ADJUSTED_DEFINITION_URL_ATTR = "definitionURL"; var SVG_ATTRS_ADJUSTMENT_MAP = new Map([ "attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan" ].map((attr2) => [attr2.toLowerCase(), attr2])); var XML_ATTRS_ADJUSTMENT_MAP = new Map([ ["xlink:actuate", { prefix: "xlink", name: "actuate", namespace: NS.XLINK }], ["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace: NS.XLINK }], ["xlink:href", { prefix: "xlink", name: "href", namespace: NS.XLINK }], ["xlink:role", { prefix: "xlink", name: "role", namespace: NS.XLINK }], ["xlink:show", { prefix: "xlink", name: "show", namespace: NS.XLINK }], ["xlink:title", { prefix: "xlink", name: "title", namespace: NS.XLINK }], ["xlink:type", { prefix: "xlink", name: "type", namespace: NS.XLINK }], ["xml:lang", { prefix: "xml", name: "lang", namespace: NS.XML }], ["xml:space", { prefix: "xml", name: "space", namespace: NS.XML }], ["xmlns", { prefix: "", name: "xmlns", namespace: NS.XMLNS }], ["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace: NS.XMLNS }] ]); var SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([ "altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath" ].map((tn) => [tn.toLowerCase(), tn])); var EXITS_FOREIGN_CONTENT = new Set([ TAG_ID.B, TAG_ID.BIG, TAG_ID.BLOCKQUOTE, TAG_ID.BODY, TAG_ID.BR, TAG_ID.CENTER, TAG_ID.CODE, TAG_ID.DD, TAG_ID.DIV, TAG_ID.DL, TAG_ID.DT, TAG_ID.EM, TAG_ID.EMBED, TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6, TAG_ID.HEAD, TAG_ID.HR, TAG_ID.I, TAG_ID.IMG, TAG_ID.LI, TAG_ID.LISTING, TAG_ID.MENU, TAG_ID.META, TAG_ID.NOBR, TAG_ID.OL, TAG_ID.P, TAG_ID.PRE, TAG_ID.RUBY, TAG_ID.S, TAG_ID.SMALL, TAG_ID.SPAN, TAG_ID.STRONG, TAG_ID.STRIKE, TAG_ID.SUB, TAG_ID.SUP, TAG_ID.TABLE, TAG_ID.TT, TAG_ID.U, TAG_ID.UL, TAG_ID.VAR ]); function causesExit(startTagToken) { const tn = startTagToken.tagID; const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE); return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn); } function adjustTokenMathMLAttrs(token) { for (let i = 0; i < token.attrs.length; i++) { if (token.attrs[i].name === DEFINITION_URL_ATTR) { token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; break; } } } function adjustTokenSVGAttrs(token) { for (let i = 0; i < token.attrs.length; i++) { const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); if (adjustedAttrName != null) { token.attrs[i].name = adjustedAttrName; } } } function adjustTokenXMLAttrs(token) { for (let i = 0; i < token.attrs.length; i++) { const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); if (adjustedAttrEntry) { token.attrs[i].prefix = adjustedAttrEntry.prefix; token.attrs[i].name = adjustedAttrEntry.name; token.attrs[i].namespace = adjustedAttrEntry.namespace; } } } function adjustTokenSVGTagName(token) { const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName); if (adjustedTagName != null) { token.tagName = adjustedTagName; token.tagID = getTagID(token.tagName); } } function isMathMLTextIntegrationPoint(tn, ns) { return ns === NS.MATHML && (tn === TAG_ID.MI || tn === TAG_ID.MO || tn === TAG_ID.MN || tn === TAG_ID.MS || tn === TAG_ID.MTEXT); } function isHtmlIntegrationPoint(tn, ns, attrs) { if (ns === NS.MATHML && tn === TAG_ID.ANNOTATION_XML) { for (let i = 0; i < attrs.length; i++) { if (attrs[i].name === ATTRS.ENCODING) { const value = attrs[i].value.toLowerCase(); return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; } } } return ns === NS.SVG && (tn === TAG_ID.FOREIGN_OBJECT || tn === TAG_ID.DESC || tn === TAG_ID.TITLE); } function isIntegrationPoint(tn, ns, attrs, foreignNS) { return (!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs) || (!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns); } // node_modules/parse5/dist/parser/index.js var HIDDEN_INPUT_TYPE = "hidden"; var AA_OUTER_LOOP_ITER = 8; var AA_INNER_LOOP_ITER = 3; var InsertionMode; (function(InsertionMode2) { InsertionMode2[InsertionMode2["INITIAL"] = 0] = "INITIAL"; InsertionMode2[InsertionMode2["BEFORE_HTML"] = 1] = "BEFORE_HTML"; InsertionMode2[InsertionMode2["BEFORE_HEAD"] = 2] = "BEFORE_HEAD"; InsertionMode2[InsertionMode2["IN_HEAD"] = 3] = "IN_HEAD"; InsertionMode2[InsertionMode2["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT"; InsertionMode2[InsertionMode2["AFTER_HEAD"] = 5] = "AFTER_HEAD"; InsertionMode2[InsertionMode2["IN_BODY"] = 6] = "IN_BODY"; InsertionMode2[InsertionMode2["TEXT"] = 7] = "TEXT"; InsertionMode2[InsertionMode2["IN_TABLE"] = 8] = "IN_TABLE"; InsertionMode2[InsertionMode2["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT"; InsertionMode2[InsertionMode2["IN_CAPTION"] = 10] = "IN_CAPTION"; InsertionMode2[InsertionMode2["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP"; InsertionMode2[InsertionMode2["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY"; InsertionMode2[InsertionMode2["IN_ROW"] = 13] = "IN_ROW"; InsertionMode2[InsertionMode2["IN_CELL"] = 14] = "IN_CELL"; InsertionMode2[InsertionMode2["IN_SELECT"] = 15] = "IN_SELECT"; InsertionMode2[InsertionMode2["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE"; InsertionMode2[InsertionMode2["IN_TEMPLATE"] = 17] = "IN_TEMPLATE"; InsertionMode2[InsertionMode2["AFTER_BODY"] = 18] = "AFTER_BODY"; InsertionMode2[InsertionMode2["IN_FRAMESET"] = 19] = "IN_FRAMESET"; InsertionMode2[InsertionMode2["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET"; InsertionMode2[InsertionMode2["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY"; InsertionMode2[InsertionMode2["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET"; })(InsertionMode || (InsertionMode = {})); var BASE_LOC = { startLine: -1, startCol: -1, startOffset: -1, endLine: -1, endCol: -1, endOffset: -1 }; var TABLE_STRUCTURE_TAGS = new Set([TAG_ID.TABLE, TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TR]); var defaultParserOptions = { scriptingEnabled: true, sourceCodeLocationInfo: false, treeAdapter: defaultTreeAdapter, onParseError: null }; var Parser2 = class { constructor(options, document2, fragmentContext = null, scriptHandler = null) { this.fragmentContext = fragmentContext; this.scriptHandler = scriptHandler; this.currentToken = null; this.stopped = false; this.insertionMode = InsertionMode.INITIAL; this.originalInsertionMode = InsertionMode.INITIAL; this.headElement = null; this.formElement = null; this.currentNotInHTML = false; this.tmplInsertionModeStack = []; this.pendingCharacterTokens = []; this.hasNonWhitespacePendingCharacterToken = false; this.framesetOk = true; this.skipNextNewLine = false; this.fosterParentingEnabled = false; this.options = __spreadValues(__spreadValues({}, defaultParserOptions), options); this.treeAdapter = this.options.treeAdapter; this.onParseError = this.options.onParseError; if (this.onParseError) { this.options.sourceCodeLocationInfo = true; } this.document = document2 !== null && document2 !== void 0 ? document2 : this.treeAdapter.createDocument(); this.tokenizer = new Tokenizer2(this.options, this); this.activeFormattingElements = new FormattingElementList(this.treeAdapter); this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN; this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID); this.openElements = new OpenElementStack(this.document, this.treeAdapter, this); } static parse(html3, options) { const parser = new this(options); parser.tokenizer.write(html3, true); return parser.document; } static getFragmentParser(fragmentContext, options) { const opts = __spreadValues(__spreadValues({}, defaultParserOptions), options); fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, []); const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []); const parser = new this(opts, documentMock, fragmentContext); if (parser.fragmentContextID === TAG_ID.TEMPLATE) { parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); } parser._initTokenizerForFragmentParsing(); parser._insertFakeRootElement(); parser._resetInsertionMode(); parser._findFormInFragmentContext(); return parser; } getFragment() { const rootElement = this.treeAdapter.getFirstChild(this.document); const fragment = this.treeAdapter.createDocumentFragment(); this._adoptNodes(rootElement, fragment); return fragment; } _err(token, code, beforeToken) { var _a5; if (!this.onParseError) return; const loc = (_a5 = token.location) !== null && _a5 !== void 0 ? _a5 : BASE_LOC; const err = { code, startLine: loc.startLine, startCol: loc.startCol, startOffset: loc.startOffset, endLine: beforeToken ? loc.startLine : loc.endLine, endCol: beforeToken ? loc.startCol : loc.endCol, endOffset: beforeToken ? loc.startOffset : loc.endOffset }; this.onParseError(err); } onItemPush(node, tid, isTop) { var _a5, _b; (_b = (_a5 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a5, node); if (isTop && this.openElements.stackTop > 0) this._setContextModes(node, tid); } onItemPop(node, isTop) { var _a5, _b; if (this.options.sourceCodeLocationInfo) { this._setEndLocation(node, this.currentToken); } (_b = (_a5 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a5, node, this.openElements.current); if (isTop) { let current; let currentTagId; if (this.openElements.stackTop === 0 && this.fragmentContext) { current = this.fragmentContext; currentTagId = this.fragmentContextID; } else { ({ current, currentTagId } = this.openElements); } this._setContextModes(current, currentTagId); } } _setContextModes(current, tid) { const isHTML = current === this.document || current && this.treeAdapter.getNamespaceURI(current) === NS.HTML; this.currentNotInHTML = !isHTML; this.tokenizer.inForeignNode = !isHTML && current !== void 0 && tid !== void 0 && !this._isIntegrationPoint(tid, current); } _switchToTextParsing(currentToken, nextTokenizerState) { this._insertElement(currentToken, NS.HTML); this.tokenizer.state = nextTokenizerState; this.originalInsertionMode = this.insertionMode; this.insertionMode = InsertionMode.TEXT; } switchToPlaintextParsing() { this.insertionMode = InsertionMode.TEXT; this.originalInsertionMode = InsertionMode.IN_BODY; this.tokenizer.state = TokenizerMode.PLAINTEXT; } _getAdjustedCurrentElement() { return this.openElements.stackTop === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.current; } _findFormInFragmentContext() { let node = this.fragmentContext; while (node) { if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) { this.formElement = node; break; } node = this.treeAdapter.getParentNode(node); } } _initTokenizerForFragmentParsing() { if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) { return; } switch (this.fragmentContextID) { case TAG_ID.TITLE: case TAG_ID.TEXTAREA: { this.tokenizer.state = TokenizerMode.RCDATA; break; } case TAG_ID.STYLE: case TAG_ID.XMP: case TAG_ID.IFRAME: case TAG_ID.NOEMBED: case TAG_ID.NOFRAMES: case TAG_ID.NOSCRIPT: { this.tokenizer.state = TokenizerMode.RAWTEXT; break; } case TAG_ID.SCRIPT: { this.tokenizer.state = TokenizerMode.SCRIPT_DATA; break; } case TAG_ID.PLAINTEXT: { this.tokenizer.state = TokenizerMode.PLAINTEXT; break; } default: } } _setDocumentType(token) { const name = token.name || ""; const publicId = token.publicId || ""; const systemId = token.systemId || ""; this.treeAdapter.setDocumentType(this.document, name, publicId, systemId); if (token.location) { const documentChildren = this.treeAdapter.getChildNodes(this.document); const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node)); if (docTypeNode) { this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location); } } } _attachElementToTree(element, location) { if (this.options.sourceCodeLocationInfo) { const loc = location && __spreadProps(__spreadValues({}, location), { startTag: location }); this.treeAdapter.setNodeSourceCodeLocation(element, loc); } if (this._shouldFosterParentOnInsertion()) { this._fosterParentElement(element); } else { const parent2 = this.openElements.currentTmplContentOrNode; this.treeAdapter.appendChild(parent2 !== null && parent2 !== void 0 ? parent2 : this.document, element); } } _appendElement(token, namespaceURI) { const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs); this._attachElementToTree(element, token.location); } _insertElement(token, namespaceURI) { const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs); this._attachElementToTree(element, token.location); this.openElements.push(element, token.tagID); } _insertFakeElement(tagName, tagID) { const element = this.treeAdapter.createElement(tagName, NS.HTML, []); this._attachElementToTree(element, null); this.openElements.push(element, tagID); } _insertTemplate(token) { const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs); const content = this.treeAdapter.createDocumentFragment(); this.treeAdapter.setTemplateContent(tmpl, content); this._attachElementToTree(tmpl, token.location); this.openElements.push(tmpl, token.tagID); if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(content, null); } _insertFakeRootElement() { const element = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []); if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(element, null); this.treeAdapter.appendChild(this.openElements.current, element); this.openElements.push(element, TAG_ID.HTML); } _appendCommentNode(token, parent2) { const commentNode = this.treeAdapter.createCommentNode(token.data); this.treeAdapter.appendChild(parent2, commentNode); if (this.options.sourceCodeLocationInfo) { this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location); } } _insertCharacters(token) { let parent2; let beforeElement; if (this._shouldFosterParentOnInsertion()) { ({ parent: parent2, beforeElement } = this._findFosterParentingLocation()); if (beforeElement) { this.treeAdapter.insertTextBefore(parent2, token.chars, beforeElement); } else { this.treeAdapter.insertText(parent2, token.chars); } } else { parent2 = this.openElements.currentTmplContentOrNode; this.treeAdapter.insertText(parent2, token.chars); } if (!token.location) return; const siblings2 = this.treeAdapter.getChildNodes(parent2); const textNodeIdx = beforeElement ? siblings2.lastIndexOf(beforeElement) : siblings2.length; const textNode = siblings2[textNodeIdx - 1]; const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode); if (tnLoc) { const { endLine, endCol, endOffset } = token.location; this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset }); } else if (this.options.sourceCodeLocationInfo) { this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location); } } _adoptNodes(donor, recipient) { for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) { this.treeAdapter.detachNode(child); this.treeAdapter.appendChild(recipient, child); } } _setEndLocation(element, closingToken) { if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) { const ctLoc = closingToken.location; const tn = this.treeAdapter.getTagName(element); const endLoc = closingToken.type === TokenType.END_TAG && tn === closingToken.tagName ? { endTag: __spreadValues({}, ctLoc), endLine: ctLoc.endLine, endCol: ctLoc.endCol, endOffset: ctLoc.endOffset } : { endLine: ctLoc.startLine, endCol: ctLoc.startCol, endOffset: ctLoc.startOffset }; this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc); } } shouldProcessStartTagTokenInForeignContent(token) { if (!this.currentNotInHTML) return false; let current; let currentTagId; if (this.openElements.stackTop === 0 && this.fragmentContext) { current = this.fragmentContext; currentTagId = this.fragmentContextID; } else { ({ current, currentTagId } = this.openElements); } if (token.tagID === TAG_ID.SVG && this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(current) === NS.MATHML) { return false; } return this.tokenizer.inForeignNode || (token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) && currentTagId !== void 0 && !this._isIntegrationPoint(currentTagId, current, NS.HTML); } _processToken(token) { switch (token.type) { case TokenType.CHARACTER: { this.onCharacter(token); break; } case TokenType.NULL_CHARACTER: { this.onNullCharacter(token); break; } case TokenType.COMMENT: { this.onComment(token); break; } case TokenType.DOCTYPE: { this.onDoctype(token); break; } case TokenType.START_TAG: { this._processStartTag(token); break; } case TokenType.END_TAG: { this.onEndTag(token); break; } case TokenType.EOF: { this.onEof(token); break; } case TokenType.WHITESPACE_CHARACTER: { this.onWhitespaceCharacter(token); break; } } } _isIntegrationPoint(tid, element, foreignNS) { const ns = this.treeAdapter.getNamespaceURI(element); const attrs = this.treeAdapter.getAttrList(element); return isIntegrationPoint(tid, ns, attrs, foreignNS); } _reconstructActiveFormattingElements() { const listLength = this.activeFormattingElements.entries.length; if (listLength) { const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element)); const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1; for (let i = unopenIdx; i >= 0; i--) { const entry = this.activeFormattingElements.entries[i]; this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element)); entry.element = this.openElements.current; } } } _closeTableCell() { this.openElements.generateImpliedEndTags(); this.openElements.popUntilTableCellPopped(); this.activeFormattingElements.clearToLastMarker(); this.insertionMode = InsertionMode.IN_ROW; } _closePElement() { this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P); this.openElements.popUntilTagNamePopped(TAG_ID.P); } _resetInsertionMode() { for (let i = this.openElements.stackTop; i >= 0; i--) { switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) { case TAG_ID.TR: { this.insertionMode = InsertionMode.IN_ROW; return; } case TAG_ID.TBODY: case TAG_ID.THEAD: case TAG_ID.TFOOT: { this.insertionMode = InsertionMode.IN_TABLE_BODY; return; } case TAG_ID.CAPTION: { this.insertionMode = InsertionMode.IN_CAPTION; return; } case TAG_ID.COLGROUP: { this.insertionMode = InsertionMode.IN_COLUMN_GROUP; return; } case TAG_ID.TABLE: { this.insertionMode = InsertionMode.IN_TABLE; return; } case TAG_ID.BODY: { this.insertionMode = InsertionMode.IN_BODY; return; } case TAG_ID.FRAMESET: { this.insertionMode = InsertionMode.IN_FRAMESET; return; } case TAG_ID.SELECT: { this._resetInsertionModeForSelect(i); return; } case TAG_ID.TEMPLATE: { this.insertionMode = this.tmplInsertionModeStack[0]; return; } case TAG_ID.HTML: { this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD; return; } case TAG_ID.TD: case TAG_ID.TH: { if (i > 0) { this.insertionMode = InsertionMode.IN_CELL; return; } break; } case TAG_ID.HEAD: { if (i > 0) { this.insertionMode = InsertionMode.IN_HEAD; return; } break; } } } this.insertionMode = InsertionMode.IN_BODY; } _resetInsertionModeForSelect(selectIdx) { if (selectIdx > 0) { for (let i = selectIdx - 1; i > 0; i--) { const tn = this.openElements.tagIDs[i]; if (tn === TAG_ID.TEMPLATE) { break; } else if (tn === TAG_ID.TABLE) { this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE; return; } } } this.insertionMode = InsertionMode.IN_SELECT; } _isElementCausesFosterParenting(tn) { return TABLE_STRUCTURE_TAGS.has(tn); } _shouldFosterParentOnInsertion() { return this.fosterParentingEnabled && this.openElements.currentTagId !== void 0 && this._isElementCausesFosterParenting(this.openElements.currentTagId); } _findFosterParentingLocation() { for (let i = this.openElements.stackTop; i >= 0; i--) { const openElement = this.openElements.items[i]; switch (this.openElements.tagIDs[i]) { case TAG_ID.TEMPLATE: { if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) { return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null }; } break; } case TAG_ID.TABLE: { const parent2 = this.treeAdapter.getParentNode(openElement); if (parent2) { return { parent: parent2, beforeElement: openElement }; } return { parent: this.openElements.items[i - 1], beforeElement: null }; } default: } } return { parent: this.openElements.items[0], beforeElement: null }; } _fosterParentElement(element) { const location = this._findFosterParentingLocation(); if (location.beforeElement) { this.treeAdapter.insertBefore(location.parent, element, location.beforeElement); } else { this.treeAdapter.appendChild(location.parent, element); } } _isSpecialElement(element, id) { const ns = this.treeAdapter.getNamespaceURI(element); return SPECIAL_ELEMENTS[ns].has(id); } onCharacter(token) { this.skipNextNewLine = false; if (this.tokenizer.inForeignNode) { characterInForeignContent(this, token); return; } switch (this.insertionMode) { case InsertionMode.INITIAL: { tokenInInitialMode(this, token); break; } case InsertionMode.BEFORE_HTML: { tokenBeforeHtml(this, token); break; } case InsertionMode.BEFORE_HEAD: { tokenBeforeHead(this, token); break; } case InsertionMode.IN_HEAD: { tokenInHead(this, token); break; } case InsertionMode.IN_HEAD_NO_SCRIPT: { tokenInHeadNoScript(this, token); break; } case InsertionMode.AFTER_HEAD: { tokenAfterHead(this, token); break; } case InsertionMode.IN_BODY: case InsertionMode.IN_CAPTION: case InsertionMode.IN_CELL: case InsertionMode.IN_TEMPLATE: { characterInBody(this, token); break; } case InsertionMode.TEXT: case InsertionMode.IN_SELECT: case InsertionMode.IN_SELECT_IN_TABLE: { this._insertCharacters(token); break; } case InsertionMode.IN_TABLE: case InsertionMode.IN_TABLE_BODY: case InsertionMode.IN_ROW: { characterInTable(this, token); break; } case InsertionMode.IN_TABLE_TEXT: { characterInTableText(this, token); break; } case InsertionMode.IN_COLUMN_GROUP: { tokenInColumnGroup(this, token); break; } case InsertionMode.AFTER_BODY: { tokenAfterBody(this, token); break; } case InsertionMode.AFTER_AFTER_BODY: { tokenAfterAfterBody(this, token); break; } default: } } onNullCharacter(token) { this.skipNextNewLine = false; if (this.tokenizer.inForeignNode) { nullCharacterInForeignContent(this, token); return; } switch (this.insertionMode) { case InsertionMode.INITIAL: { tokenInInitialMode(this, token); break; } case InsertionMode.BEFORE_HTML: { tokenBeforeHtml(this, token); break; } case InsertionMode.BEFORE_HEAD: { tokenBeforeHead(this, token); break; } case InsertionMode.IN_HEAD: { tokenInHead(this, token); break; } case InsertionMode.IN_HEAD_NO_SCRIPT: { tokenInHeadNoScript(this, token); break; } case InsertionMode.AFTER_HEAD: { tokenAfterHead(this, token); break; } case InsertionMode.TEXT: { this._insertCharacters(token); break; } case InsertionMode.IN_TABLE: case InsertionMode.IN_TABLE_BODY: case InsertionMode.IN_ROW: { characterInTable(this, token); break; } case InsertionMode.IN_COLUMN_GROUP: { tokenInColumnGroup(this, token); break; } case InsertionMode.AFTER_BODY: { tokenAfterBody(this, token); break; } case InsertionMode.AFTER_AFTER_BODY: { tokenAfterAfterBody(this, token); break; } default: } } onComment(token) { this.skipNextNewLine = false; if (this.currentNotInHTML) { appendComment(this, token); return; } switch (this.insertionMode) { case InsertionMode.INITIAL: case InsertionMode.BEFORE_HTML: case InsertionMode.BEFORE_HEAD: case InsertionMode.IN_HEAD: case InsertionMode.IN_HEAD_NO_SCRIPT: case InsertionMode.AFTER_HEAD: case InsertionMode.IN_BODY: case InsertionMode.IN_TABLE: case InsertionMode.IN_CAPTION: case InsertionMode.IN_COLUMN_GROUP: case InsertionMode.IN_TABLE_BODY: case InsertionMode.IN_ROW: case InsertionMode.IN_CELL: case InsertionMode.IN_SELECT: case InsertionMode.IN_SELECT_IN_TABLE: case InsertionMode.IN_TEMPLATE: case InsertionMode.IN_FRAMESET: case InsertionMode.AFTER_FRAMESET: { appendComment(this, token); break; } case InsertionMode.IN_TABLE_TEXT: { tokenInTableText(this, token); break; } case InsertionMode.AFTER_BODY: { appendCommentToRootHtmlElement(this, token); break; } case InsertionMode.AFTER_AFTER_BODY: case InsertionMode.AFTER_AFTER_FRAMESET: { appendCommentToDocument(this, token); break; } default: } } onDoctype(token) { this.skipNextNewLine = false; switch (this.insertionMode) { case InsertionMode.INITIAL: { doctypeInInitialMode(this, token); break; } case InsertionMode.BEFORE_HEAD: case InsertionMode.IN_HEAD: case InsertionMode.IN_HEAD_NO_SCRIPT: case InsertionMode.AFTER_HEAD: { this._err(token, ERR.misplacedDoctype); break; } case InsertionMode.IN_TABLE_TEXT: { tokenInTableText(this, token); break; } default: } } onStartTag(token) { this.skipNextNewLine = false; this.currentToken = token; this._processStartTag(token); if (token.selfClosing && !token.ackSelfClosing) { this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus); } } _processStartTag(token) { if (this.shouldProcessStartTagTokenInForeignContent(token)) { startTagInForeignContent(this, token); } else { this._startTagOutsideForeignContent(token); } } _startTagOutsideForeignContent(token) { switch (this.insertionMode) { case InsertionMode.INITIAL: { tokenInInitialMode(this, token); break; } case InsertionMode.BEFORE_HTML: { startTagBeforeHtml(this, token); break; } case InsertionMode.BEFORE_HEAD: { startTagBeforeHead(this, token); break; } case InsertionMode.IN_HEAD: { startTagInHead(this, token); break; } case InsertionMode.IN_HEAD_NO_SCRIPT: { startTagInHeadNoScript(this, token); break; } case InsertionMode.AFTER_HEAD: { startTagAfterHead(this, token); break; } case InsertionMode.IN_BODY: { startTagInBody(this, token); break; } case InsertionMode.IN_TABLE: { startTagInTable(this, token); break; } case InsertionMode.IN_TABLE_TEXT: { tokenInTableText(this, token); break; } case InsertionMode.IN_CAPTION: { startTagInCaption(this, token); break; } case InsertionMode.IN_COLUMN_GROUP: { startTagInColumnGroup(this, token); break; } case InsertionMode.IN_TABLE_BODY: { startTagInTableBody(this, token); break; } case InsertionMode.IN_ROW: { startTagInRow(this, token); break; } case InsertionMode.IN_CELL: { startTagInCell(this, token); break; } case InsertionMode.IN_SELECT: { startTagInSelect(this, token); break; } case InsertionMode.IN_SELECT_IN_TABLE: { startTagInSelectInTable(this, token); break; } case InsertionMode.IN_TEMPLATE: { startTagInTemplate(this, token); break; } case InsertionMode.AFTER_BODY: { startTagAfterBody(this, token); break; } case InsertionMode.IN_FRAMESET: { startTagInFrameset(this, token); break; } case InsertionMode.AFTER_FRAMESET: { startTagAfterFrameset(this, token); break; } case InsertionMode.AFTER_AFTER_BODY: { startTagAfterAfterBody(this, token); break; } case InsertionMode.AFTER_AFTER_FRAMESET: { startTagAfterAfterFrameset(this, token); break; } default: } } onEndTag(token) { this.skipNextNewLine = false; this.currentToken = token; if (this.currentNotInHTML) { endTagInForeignContent(this, token); } else { this._endTagOutsideForeignContent(token); } } _endTagOutsideForeignContent(token) { switch (this.insertionMode) { case InsertionMode.INITIAL: { tokenInInitialMode(this, token); break; } case InsertionMode.BEFORE_HTML: { endTagBeforeHtml(this, token); break; } case InsertionMode.BEFORE_HEAD: { endTagBeforeHead(this, token); break; } case InsertionMode.IN_HEAD: { endTagInHead(this, token); break; } case InsertionMode.IN_HEAD_NO_SCRIPT: { endTagInHeadNoScript(this, token); break; } case InsertionMode.AFTER_HEAD: { endTagAfterHead(this, token); break; } case InsertionMode.IN_BODY: { endTagInBody(this, token); break; } case InsertionMode.TEXT: { endTagInText(this, token); break; } case InsertionMode.IN_TABLE: { endTagInTable(this, token); break; } case InsertionMode.IN_TABLE_TEXT: { tokenInTableText(this, token); break; } case InsertionMode.IN_CAPTION: { endTagInCaption(this, token); break; } case InsertionMode.IN_COLUMN_GROUP: { endTagInColumnGroup(this, token); break; } case InsertionMode.IN_TABLE_BODY: { endTagInTableBody(this, token); break; } case InsertionMode.IN_ROW: { endTagInRow(this, token); break; } case InsertionMode.IN_CELL: { endTagInCell(this, token); break; } case InsertionMode.IN_SELECT: { endTagInSelect(this, token); break; } case InsertionMode.IN_SELECT_IN_TABLE: { endTagInSelectInTable(this, token); break; } case InsertionMode.IN_TEMPLATE: { endTagInTemplate(this, token); break; } case InsertionMode.AFTER_BODY: { endTagAfterBody(this, token); break; } case InsertionMode.IN_FRAMESET: { endTagInFrameset(this, token); break; } case InsertionMode.AFTER_FRAMESET: { endTagAfterFrameset(this, token); break; } case InsertionMode.AFTER_AFTER_BODY: { tokenAfterAfterBody(this, token); break; } default: } } onEof(token) { switch (this.insertionMode) { case InsertionMode.INITIAL: { tokenInInitialMode(this, token); break; } case InsertionMode.BEFORE_HTML: { tokenBeforeHtml(this, token); break; } case InsertionMode.BEFORE_HEAD: { tokenBeforeHead(this, token); break; } case InsertionMode.IN_HEAD: { tokenInHead(this, token); break; } case InsertionMode.IN_HEAD_NO_SCRIPT: { tokenInHeadNoScript(this, token); break; } case InsertionMode.AFTER_HEAD: { tokenAfterHead(this, token); break; } case InsertionMode.IN_BODY: case InsertionMode.IN_TABLE: case InsertionMode.IN_CAPTION: case InsertionMode.IN_COLUMN_GROUP: case InsertionMode.IN_TABLE_BODY: case InsertionMode.IN_ROW: case InsertionMode.IN_CELL: case InsertionMode.IN_SELECT: case InsertionMode.IN_SELECT_IN_TABLE: { eofInBody(this, token); break; } case InsertionMode.TEXT: { eofInText(this, token); break; } case InsertionMode.IN_TABLE_TEXT: { tokenInTableText(this, token); break; } case InsertionMode.IN_TEMPLATE: { eofInTemplate(this, token); break; } case InsertionMode.AFTER_BODY: case InsertionMode.IN_FRAMESET: case InsertionMode.AFTER_FRAMESET: case InsertionMode.AFTER_AFTER_BODY: case InsertionMode.AFTER_AFTER_FRAMESET: { stopParsing(this, token); break; } default: } } onWhitespaceCharacter(token) { if (this.skipNextNewLine) { this.skipNextNewLine = false; if (token.chars.charCodeAt(0) === CODE_POINTS.LINE_FEED) { if (token.chars.length === 1) { return; } token.chars = token.chars.substr(1); } } if (this.tokenizer.inForeignNode) { this._insertCharacters(token); return; } switch (this.insertionMode) { case InsertionMode.IN_HEAD: case InsertionMode.IN_HEAD_NO_SCRIPT: case InsertionMode.AFTER_HEAD: case InsertionMode.TEXT: case InsertionMode.IN_COLUMN_GROUP: case InsertionMode.IN_SELECT: case InsertionMode.IN_SELECT_IN_TABLE: case InsertionMode.IN_FRAMESET: case InsertionMode.AFTER_FRAMESET: { this._insertCharacters(token); break; } case InsertionMode.IN_BODY: case InsertionMode.IN_CAPTION: case InsertionMode.IN_CELL: case InsertionMode.IN_TEMPLATE: case InsertionMode.AFTER_BODY: case InsertionMode.AFTER_AFTER_BODY: case InsertionMode.AFTER_AFTER_FRAMESET: { whitespaceCharacterInBody(this, token); break; } case InsertionMode.IN_TABLE: case InsertionMode.IN_TABLE_BODY: case InsertionMode.IN_ROW: { characterInTable(this, token); break; } case InsertionMode.IN_TABLE_TEXT: { whitespaceCharacterInTableText(this, token); break; } default: } } }; function aaObtainFormattingElementEntry(p, token) { let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName); if (formattingElementEntry) { if (!p.openElements.contains(formattingElementEntry.element)) { p.activeFormattingElements.removeEntry(formattingElementEntry); formattingElementEntry = null; } else if (!p.openElements.hasInScope(token.tagID)) { formattingElementEntry = null; } } else { genericEndTagInBody(p, token); } return formattingElementEntry; } function aaObtainFurthestBlock(p, formattingElementEntry) { let furthestBlock = null; let idx = p.openElements.stackTop; for (; idx >= 0; idx--) { const element = p.openElements.items[idx]; if (element === formattingElementEntry.element) { break; } if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) { furthestBlock = element; } } if (!furthestBlock) { p.openElements.shortenToLength(Math.max(idx, 0)); p.activeFormattingElements.removeEntry(formattingElementEntry); } return furthestBlock; } function aaInnerLoop(p, furthestBlock, formattingElement) { let lastElement = furthestBlock; let nextElement = p.openElements.getCommonAncestor(furthestBlock); for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) { nextElement = p.openElements.getCommonAncestor(element); const elementEntry = p.activeFormattingElements.getElementEntry(element); const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER; const shouldRemoveFromOpenElements = !elementEntry || counterOverflow; if (shouldRemoveFromOpenElements) { if (counterOverflow) { p.activeFormattingElements.removeEntry(elementEntry); } p.openElements.remove(element); } else { element = aaRecreateElementFromEntry(p, elementEntry); if (lastElement === furthestBlock) { p.activeFormattingElements.bookmark = elementEntry; } p.treeAdapter.detachNode(lastElement); p.treeAdapter.appendChild(element, lastElement); lastElement = element; } } return lastElement; } function aaRecreateElementFromEntry(p, elementEntry) { const ns = p.treeAdapter.getNamespaceURI(elementEntry.element); const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs); p.openElements.replace(elementEntry.element, newElement); elementEntry.element = newElement; return newElement; } function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) { const tn = p.treeAdapter.getTagName(commonAncestor); const tid = getTagID(tn); if (p._isElementCausesFosterParenting(tid)) { p._fosterParentElement(lastElement); } else { const ns = p.treeAdapter.getNamespaceURI(commonAncestor); if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) { commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor); } p.treeAdapter.appendChild(commonAncestor, lastElement); } } function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) { const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element); const { token } = formattingElementEntry; const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs); p._adoptNodes(furthestBlock, newElement); p.treeAdapter.appendChild(furthestBlock, newElement); p.activeFormattingElements.insertElementAfterBookmark(newElement, token); p.activeFormattingElements.removeEntry(formattingElementEntry); p.openElements.remove(formattingElementEntry.element); p.openElements.insertAfter(furthestBlock, newElement, token.tagID); } function callAdoptionAgency(p, token) { for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) { const formattingElementEntry = aaObtainFormattingElementEntry(p, token); if (!formattingElementEntry) { break; } const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry); if (!furthestBlock) { break; } p.activeFormattingElements.bookmark = formattingElementEntry; const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element); const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element); p.treeAdapter.detachNode(lastElement); if (commonAncestor) aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement); aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry); } } function appendComment(p, token) { p._appendCommentNode(token, p.openElements.currentTmplContentOrNode); } function appendCommentToRootHtmlElement(p, token) { p._appendCommentNode(token, p.openElements.items[0]); } function appendCommentToDocument(p, token) { p._appendCommentNode(token, p.document); } function stopParsing(p, token) { p.stopped = true; if (token.location) { const target = p.fragmentContext ? 0 : 2; for (let i = p.openElements.stackTop; i >= target; i--) { p._setEndLocation(p.openElements.items[i], token); } if (!p.fragmentContext && p.openElements.stackTop >= 0) { const htmlElement = p.openElements.items[0]; const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement); if (htmlLocation && !htmlLocation.endTag) { p._setEndLocation(htmlElement, token); if (p.openElements.stackTop >= 1) { const bodyElement = p.openElements.items[1]; const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement); if (bodyLocation && !bodyLocation.endTag) { p._setEndLocation(bodyElement, token); } } } } } } function doctypeInInitialMode(p, token) { p._setDocumentType(token); const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : getDocumentMode(token); if (!isConforming(token)) { p._err(token, ERR.nonConformingDoctype); } p.treeAdapter.setDocumentMode(p.document, mode); p.insertionMode = InsertionMode.BEFORE_HTML; } function tokenInInitialMode(p, token) { p._err(token, ERR.missingDoctype, true); p.treeAdapter.setDocumentMode(p.document, DOCUMENT_MODE.QUIRKS); p.insertionMode = InsertionMode.BEFORE_HTML; p._processToken(token); } function startTagBeforeHtml(p, token) { if (token.tagID === TAG_ID.HTML) { p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.BEFORE_HEAD; } else { tokenBeforeHtml(p, token); } } function endTagBeforeHtml(p, token) { const tn = token.tagID; if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) { tokenBeforeHtml(p, token); } } function tokenBeforeHtml(p, token) { p._insertFakeRootElement(); p.insertionMode = InsertionMode.BEFORE_HEAD; p._processToken(token); } function startTagBeforeHead(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.HEAD: { p._insertElement(token, NS.HTML); p.headElement = p.openElements.current; p.insertionMode = InsertionMode.IN_HEAD; break; } default: { tokenBeforeHead(p, token); } } } function endTagBeforeHead(p, token) { const tn = token.tagID; if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) { tokenBeforeHead(p, token); } else { p._err(token, ERR.endTagWithoutMatchingOpenElement); } } function tokenBeforeHead(p, token) { p._insertFakeElement(TAG_NAMES.HEAD, TAG_ID.HEAD); p.headElement = p.openElements.current; p.insertionMode = InsertionMode.IN_HEAD; p._processToken(token); } function startTagInHead(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.BASE: case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: case TAG_ID.LINK: case TAG_ID.META: { p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; } case TAG_ID.TITLE: { p._switchToTextParsing(token, TokenizerMode.RCDATA); break; } case TAG_ID.NOSCRIPT: { if (p.options.scriptingEnabled) { p._switchToTextParsing(token, TokenizerMode.RAWTEXT); } else { p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT; } break; } case TAG_ID.NOFRAMES: case TAG_ID.STYLE: { p._switchToTextParsing(token, TokenizerMode.RAWTEXT); break; } case TAG_ID.SCRIPT: { p._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA); break; } case TAG_ID.TEMPLATE: { p._insertTemplate(token); p.activeFormattingElements.insertMarker(); p.framesetOk = false; p.insertionMode = InsertionMode.IN_TEMPLATE; p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); break; } case TAG_ID.HEAD: { p._err(token, ERR.misplacedStartTagForHeadElement); break; } default: { tokenInHead(p, token); } } } function endTagInHead(p, token) { switch (token.tagID) { case TAG_ID.HEAD: { p.openElements.pop(); p.insertionMode = InsertionMode.AFTER_HEAD; break; } case TAG_ID.BODY: case TAG_ID.BR: case TAG_ID.HTML: { tokenInHead(p, token); break; } case TAG_ID.TEMPLATE: { templateEndTagInHead(p, token); break; } default: { p._err(token, ERR.endTagWithoutMatchingOpenElement); } } } function templateEndTagInHead(p, token) { if (p.openElements.tmplCount > 0) { p.openElements.generateImpliedEndTagsThoroughly(); if (p.openElements.currentTagId !== TAG_ID.TEMPLATE) { p._err(token, ERR.closingOfElementWithOpenChildElements); } p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE); p.activeFormattingElements.clearToLastMarker(); p.tmplInsertionModeStack.shift(); p._resetInsertionMode(); } else { p._err(token, ERR.endTagWithoutMatchingOpenElement); } } function tokenInHead(p, token) { p.openElements.pop(); p.insertionMode = InsertionMode.AFTER_HEAD; p._processToken(token); } function startTagInHeadNoScript(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: case TAG_ID.HEAD: case TAG_ID.LINK: case TAG_ID.META: case TAG_ID.NOFRAMES: case TAG_ID.STYLE: { startTagInHead(p, token); break; } case TAG_ID.NOSCRIPT: { p._err(token, ERR.nestedNoscriptInHead); break; } default: { tokenInHeadNoScript(p, token); } } } function endTagInHeadNoScript(p, token) { switch (token.tagID) { case TAG_ID.NOSCRIPT: { p.openElements.pop(); p.insertionMode = InsertionMode.IN_HEAD; break; } case TAG_ID.BR: { tokenInHeadNoScript(p, token); break; } default: { p._err(token, ERR.endTagWithoutMatchingOpenElement); } } } function tokenInHeadNoScript(p, token) { const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead; p._err(token, errCode); p.openElements.pop(); p.insertionMode = InsertionMode.IN_HEAD; p._processToken(token); } function startTagAfterHead(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.BODY: { p._insertElement(token, NS.HTML); p.framesetOk = false; p.insertionMode = InsertionMode.IN_BODY; break; } case TAG_ID.FRAMESET: { p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_FRAMESET; break; } case TAG_ID.BASE: case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: case TAG_ID.LINK: case TAG_ID.META: case TAG_ID.NOFRAMES: case TAG_ID.SCRIPT: case TAG_ID.STYLE: case TAG_ID.TEMPLATE: case TAG_ID.TITLE: { p._err(token, ERR.abandonedHeadElementChild); p.openElements.push(p.headElement, TAG_ID.HEAD); startTagInHead(p, token); p.openElements.remove(p.headElement); break; } case TAG_ID.HEAD: { p._err(token, ERR.misplacedStartTagForHeadElement); break; } default: { tokenAfterHead(p, token); } } } function endTagAfterHead(p, token) { switch (token.tagID) { case TAG_ID.BODY: case TAG_ID.HTML: case TAG_ID.BR: { tokenAfterHead(p, token); break; } case TAG_ID.TEMPLATE: { templateEndTagInHead(p, token); break; } default: { p._err(token, ERR.endTagWithoutMatchingOpenElement); } } } function tokenAfterHead(p, token) { p._insertFakeElement(TAG_NAMES.BODY, TAG_ID.BODY); p.insertionMode = InsertionMode.IN_BODY; modeInBody(p, token); } function modeInBody(p, token) { switch (token.type) { case TokenType.CHARACTER: { characterInBody(p, token); break; } case TokenType.WHITESPACE_CHARACTER: { whitespaceCharacterInBody(p, token); break; } case TokenType.COMMENT: { appendComment(p, token); break; } case TokenType.START_TAG: { startTagInBody(p, token); break; } case TokenType.END_TAG: { endTagInBody(p, token); break; } case TokenType.EOF: { eofInBody(p, token); break; } default: } } function whitespaceCharacterInBody(p, token) { p._reconstructActiveFormattingElements(); p._insertCharacters(token); } function characterInBody(p, token) { p._reconstructActiveFormattingElements(); p._insertCharacters(token); p.framesetOk = false; } function htmlStartTagInBody(p, token) { if (p.openElements.tmplCount === 0) { p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs); } } function bodyStartTagInBody(p, token) { const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); if (bodyElement && p.openElements.tmplCount === 0) { p.framesetOk = false; p.treeAdapter.adoptAttributes(bodyElement, token.attrs); } } function framesetStartTagInBody(p, token) { const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); if (p.framesetOk && bodyElement) { p.treeAdapter.detachNode(bodyElement); p.openElements.popAllUpToHtmlElement(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_FRAMESET; } } function addressStartTagInBody(p, token) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._insertElement(token, NS.HTML); } function numberedHeaderStartTagInBody(p, token) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } if (p.openElements.currentTagId !== void 0 && NUMBERED_HEADERS.has(p.openElements.currentTagId)) { p.openElements.pop(); } p._insertElement(token, NS.HTML); } function preStartTagInBody(p, token) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._insertElement(token, NS.HTML); p.skipNextNewLine = true; p.framesetOk = false; } function formStartTagInBody(p, token) { const inTemplate = p.openElements.tmplCount > 0; if (!p.formElement || inTemplate) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._insertElement(token, NS.HTML); if (!inTemplate) { p.formElement = p.openElements.current; } } } function listItemStartTagInBody(p, token) { p.framesetOk = false; const tn = token.tagID; for (let i = p.openElements.stackTop; i >= 0; i--) { const elementId = p.openElements.tagIDs[i]; if (tn === TAG_ID.LI && elementId === TAG_ID.LI || (tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT)) { p.openElements.generateImpliedEndTagsWithExclusion(elementId); p.openElements.popUntilTagNamePopped(elementId); break; } if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) { break; } } if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._insertElement(token, NS.HTML); } function plaintextStartTagInBody(p, token) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._insertElement(token, NS.HTML); p.tokenizer.state = TokenizerMode.PLAINTEXT; } function buttonStartTagInBody(p, token) { if (p.openElements.hasInScope(TAG_ID.BUTTON)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(TAG_ID.BUTTON); } p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); p.framesetOk = false; } function aStartTagInBody(p, token) { const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A); if (activeElementEntry) { callAdoptionAgency(p, token); p.openElements.remove(activeElementEntry.element); p.activeFormattingElements.removeEntry(activeElementEntry); } p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); p.activeFormattingElements.pushElement(p.openElements.current, token); } function bStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); p.activeFormattingElements.pushElement(p.openElements.current, token); } function nobrStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); if (p.openElements.hasInScope(TAG_ID.NOBR)) { callAdoptionAgency(p, token); p._reconstructActiveFormattingElements(); } p._insertElement(token, NS.HTML); p.activeFormattingElements.pushElement(p.openElements.current, token); } function appletStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); p.activeFormattingElements.insertMarker(); p.framesetOk = false; } function tableStartTagInBody(p, token) { if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._insertElement(token, NS.HTML); p.framesetOk = false; p.insertionMode = InsertionMode.IN_TABLE; } function areaStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._appendElement(token, NS.HTML); p.framesetOk = false; token.ackSelfClosing = true; } function isHiddenInput(token) { const inputType = getTokenAttr(token, ATTRS.TYPE); return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE; } function inputStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._appendElement(token, NS.HTML); if (!isHiddenInput(token)) { p.framesetOk = false; } token.ackSelfClosing = true; } function paramStartTagInBody(p, token) { p._appendElement(token, NS.HTML); token.ackSelfClosing = true; } function hrStartTagInBody(p, token) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._appendElement(token, NS.HTML); p.framesetOk = false; token.ackSelfClosing = true; } function imageStartTagInBody(p, token) { token.tagName = TAG_NAMES.IMG; token.tagID = TAG_ID.IMG; areaStartTagInBody(p, token); } function textareaStartTagInBody(p, token) { p._insertElement(token, NS.HTML); p.skipNextNewLine = true; p.tokenizer.state = TokenizerMode.RCDATA; p.originalInsertionMode = p.insertionMode; p.framesetOk = false; p.insertionMode = InsertionMode.TEXT; } function xmpStartTagInBody(p, token) { if (p.openElements.hasInButtonScope(TAG_ID.P)) { p._closePElement(); } p._reconstructActiveFormattingElements(); p.framesetOk = false; p._switchToTextParsing(token, TokenizerMode.RAWTEXT); } function iframeStartTagInBody(p, token) { p.framesetOk = false; p._switchToTextParsing(token, TokenizerMode.RAWTEXT); } function rawTextStartTagInBody(p, token) { p._switchToTextParsing(token, TokenizerMode.RAWTEXT); } function selectStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); p.framesetOk = false; p.insertionMode = p.insertionMode === InsertionMode.IN_TABLE || p.insertionMode === InsertionMode.IN_CAPTION || p.insertionMode === InsertionMode.IN_TABLE_BODY || p.insertionMode === InsertionMode.IN_ROW || p.insertionMode === InsertionMode.IN_CELL ? InsertionMode.IN_SELECT_IN_TABLE : InsertionMode.IN_SELECT; } function optgroupStartTagInBody(p, token) { if (p.openElements.currentTagId === TAG_ID.OPTION) { p.openElements.pop(); } p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); } function rbStartTagInBody(p, token) { if (p.openElements.hasInScope(TAG_ID.RUBY)) { p.openElements.generateImpliedEndTags(); } p._insertElement(token, NS.HTML); } function rtStartTagInBody(p, token) { if (p.openElements.hasInScope(TAG_ID.RUBY)) { p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC); } p._insertElement(token, NS.HTML); } function mathStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); adjustTokenMathMLAttrs(token); adjustTokenXMLAttrs(token); if (token.selfClosing) { p._appendElement(token, NS.MATHML); } else { p._insertElement(token, NS.MATHML); } token.ackSelfClosing = true; } function svgStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); adjustTokenSVGAttrs(token); adjustTokenXMLAttrs(token); if (token.selfClosing) { p._appendElement(token, NS.SVG); } else { p._insertElement(token, NS.SVG); } token.ackSelfClosing = true; } function genericStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); } function startTagInBody(p, token) { switch (token.tagID) { case TAG_ID.I: case TAG_ID.S: case TAG_ID.B: case TAG_ID.U: case TAG_ID.EM: case TAG_ID.TT: case TAG_ID.BIG: case TAG_ID.CODE: case TAG_ID.FONT: case TAG_ID.SMALL: case TAG_ID.STRIKE: case TAG_ID.STRONG: { bStartTagInBody(p, token); break; } case TAG_ID.A: { aStartTagInBody(p, token); break; } case TAG_ID.H1: case TAG_ID.H2: case TAG_ID.H3: case TAG_ID.H4: case TAG_ID.H5: case TAG_ID.H6: { numberedHeaderStartTagInBody(p, token); break; } case TAG_ID.P: case TAG_ID.DL: case TAG_ID.OL: case TAG_ID.UL: case TAG_ID.DIV: case TAG_ID.DIR: case TAG_ID.NAV: case TAG_ID.MAIN: case TAG_ID.MENU: case TAG_ID.ASIDE: case TAG_ID.CENTER: case TAG_ID.FIGURE: case TAG_ID.FOOTER: case TAG_ID.HEADER: case TAG_ID.HGROUP: case TAG_ID.DIALOG: case TAG_ID.DETAILS: case TAG_ID.ADDRESS: case TAG_ID.ARTICLE: case TAG_ID.SEARCH: case TAG_ID.SECTION: case TAG_ID.SUMMARY: case TAG_ID.FIELDSET: case TAG_ID.BLOCKQUOTE: case TAG_ID.FIGCAPTION: { addressStartTagInBody(p, token); break; } case TAG_ID.LI: case TAG_ID.DD: case TAG_ID.DT: { listItemStartTagInBody(p, token); break; } case TAG_ID.BR: case TAG_ID.IMG: case TAG_ID.WBR: case TAG_ID.AREA: case TAG_ID.EMBED: case TAG_ID.KEYGEN: { areaStartTagInBody(p, token); break; } case TAG_ID.HR: { hrStartTagInBody(p, token); break; } case TAG_ID.RB: case TAG_ID.RTC: { rbStartTagInBody(p, token); break; } case TAG_ID.RT: case TAG_ID.RP: { rtStartTagInBody(p, token); break; } case TAG_ID.PRE: case TAG_ID.LISTING: { preStartTagInBody(p, token); break; } case TAG_ID.XMP: { xmpStartTagInBody(p, token); break; } case TAG_ID.SVG: { svgStartTagInBody(p, token); break; } case TAG_ID.HTML: { htmlStartTagInBody(p, token); break; } case TAG_ID.BASE: case TAG_ID.LINK: case TAG_ID.META: case TAG_ID.STYLE: case TAG_ID.TITLE: case TAG_ID.SCRIPT: case TAG_ID.BGSOUND: case TAG_ID.BASEFONT: case TAG_ID.TEMPLATE: { startTagInHead(p, token); break; } case TAG_ID.BODY: { bodyStartTagInBody(p, token); break; } case TAG_ID.FORM: { formStartTagInBody(p, token); break; } case TAG_ID.NOBR: { nobrStartTagInBody(p, token); break; } case TAG_ID.MATH: { mathStartTagInBody(p, token); break; } case TAG_ID.TABLE: { tableStartTagInBody(p, token); break; } case TAG_ID.INPUT: { inputStartTagInBody(p, token); break; } case TAG_ID.PARAM: case TAG_ID.TRACK: case TAG_ID.SOURCE: { paramStartTagInBody(p, token); break; } case TAG_ID.IMAGE: { imageStartTagInBody(p, token); break; } case TAG_ID.BUTTON: { buttonStartTagInBody(p, token); break; } case TAG_ID.APPLET: case TAG_ID.OBJECT: case TAG_ID.MARQUEE: { appletStartTagInBody(p, token); break; } case TAG_ID.IFRAME: { iframeStartTagInBody(p, token); break; } case TAG_ID.SELECT: { selectStartTagInBody(p, token); break; } case TAG_ID.OPTION: case TAG_ID.OPTGROUP: { optgroupStartTagInBody(p, token); break; } case TAG_ID.NOEMBED: case TAG_ID.NOFRAMES: { rawTextStartTagInBody(p, token); break; } case TAG_ID.FRAMESET: { framesetStartTagInBody(p, token); break; } case TAG_ID.TEXTAREA: { textareaStartTagInBody(p, token); break; } case TAG_ID.NOSCRIPT: { if (p.options.scriptingEnabled) { rawTextStartTagInBody(p, token); } else { genericStartTagInBody(p, token); } break; } case TAG_ID.PLAINTEXT: { plaintextStartTagInBody(p, token); break; } case TAG_ID.COL: case TAG_ID.TH: case TAG_ID.TD: case TAG_ID.TR: case TAG_ID.HEAD: case TAG_ID.FRAME: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: case TAG_ID.CAPTION: case TAG_ID.COLGROUP: { break; } default: { genericStartTagInBody(p, token); } } } function bodyEndTagInBody(p, token) { if (p.openElements.hasInScope(TAG_ID.BODY)) { p.insertionMode = InsertionMode.AFTER_BODY; if (p.options.sourceCodeLocationInfo) { const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); if (bodyElement) { p._setEndLocation(bodyElement, token); } } } } function htmlEndTagInBody(p, token) { if (p.openElements.hasInScope(TAG_ID.BODY)) { p.insertionMode = InsertionMode.AFTER_BODY; endTagAfterBody(p, token); } } function addressEndTagInBody(p, token) { const tn = token.tagID; if (p.openElements.hasInScope(tn)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(tn); } } function formEndTagInBody(p) { const inTemplate = p.openElements.tmplCount > 0; const { formElement } = p; if (!inTemplate) { p.formElement = null; } if ((formElement || inTemplate) && p.openElements.hasInScope(TAG_ID.FORM)) { p.openElements.generateImpliedEndTags(); if (inTemplate) { p.openElements.popUntilTagNamePopped(TAG_ID.FORM); } else if (formElement) { p.openElements.remove(formElement); } } } function pEndTagInBody(p) { if (!p.openElements.hasInButtonScope(TAG_ID.P)) { p._insertFakeElement(TAG_NAMES.P, TAG_ID.P); } p._closePElement(); } function liEndTagInBody(p) { if (p.openElements.hasInListItemScope(TAG_ID.LI)) { p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI); p.openElements.popUntilTagNamePopped(TAG_ID.LI); } } function ddEndTagInBody(p, token) { const tn = token.tagID; if (p.openElements.hasInScope(tn)) { p.openElements.generateImpliedEndTagsWithExclusion(tn); p.openElements.popUntilTagNamePopped(tn); } } function numberedHeaderEndTagInBody(p) { if (p.openElements.hasNumberedHeaderInScope()) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilNumberedHeaderPopped(); } } function appletEndTagInBody(p, token) { const tn = token.tagID; if (p.openElements.hasInScope(tn)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(tn); p.activeFormattingElements.clearToLastMarker(); } } function brEndTagInBody(p) { p._reconstructActiveFormattingElements(); p._insertFakeElement(TAG_NAMES.BR, TAG_ID.BR); p.openElements.pop(); p.framesetOk = false; } function genericEndTagInBody(p, token) { const tn = token.tagName; const tid = token.tagID; for (let i = p.openElements.stackTop; i > 0; i--) { const element = p.openElements.items[i]; const elementId = p.openElements.tagIDs[i]; if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) { p.openElements.generateImpliedEndTagsWithExclusion(tid); if (p.openElements.stackTop >= i) p.openElements.shortenToLength(i); break; } if (p._isSpecialElement(element, elementId)) { break; } } } function endTagInBody(p, token) { switch (token.tagID) { case TAG_ID.A: case TAG_ID.B: case TAG_ID.I: case TAG_ID.S: case TAG_ID.U: case TAG_ID.EM: case TAG_ID.TT: case TAG_ID.BIG: case TAG_ID.CODE: case TAG_ID.FONT: case TAG_ID.NOBR: case TAG_ID.SMALL: case TAG_ID.STRIKE: case TAG_ID.STRONG: { callAdoptionAgency(p, token); break; } case TAG_ID.P: { pEndTagInBody(p); break; } case TAG_ID.DL: case TAG_ID.UL: case TAG_ID.OL: case TAG_ID.DIR: case TAG_ID.DIV: case TAG_ID.NAV: case TAG_ID.PRE: case TAG_ID.MAIN: case TAG_ID.MENU: case TAG_ID.ASIDE: case TAG_ID.BUTTON: case TAG_ID.CENTER: case TAG_ID.FIGURE: case TAG_ID.FOOTER: case TAG_ID.HEADER: case TAG_ID.HGROUP: case TAG_ID.DIALOG: case TAG_ID.ADDRESS: case TAG_ID.ARTICLE: case TAG_ID.DETAILS: case TAG_ID.SEARCH: case TAG_ID.SECTION: case TAG_ID.SUMMARY: case TAG_ID.LISTING: case TAG_ID.FIELDSET: case TAG_ID.BLOCKQUOTE: case TAG_ID.FIGCAPTION: { addressEndTagInBody(p, token); break; } case TAG_ID.LI: { liEndTagInBody(p); break; } case TAG_ID.DD: case TAG_ID.DT: { ddEndTagInBody(p, token); break; } case TAG_ID.H1: case TAG_ID.H2: case TAG_ID.H3: case TAG_ID.H4: case TAG_ID.H5: case TAG_ID.H6: { numberedHeaderEndTagInBody(p); break; } case TAG_ID.BR: { brEndTagInBody(p); break; } case TAG_ID.BODY: { bodyEndTagInBody(p, token); break; } case TAG_ID.HTML: { htmlEndTagInBody(p, token); break; } case TAG_ID.FORM: { formEndTagInBody(p); break; } case TAG_ID.APPLET: case TAG_ID.OBJECT: case TAG_ID.MARQUEE: { appletEndTagInBody(p, token); break; } case TAG_ID.TEMPLATE: { templateEndTagInHead(p, token); break; } default: { genericEndTagInBody(p, token); } } } function eofInBody(p, token) { if (p.tmplInsertionModeStack.length > 0) { eofInTemplate(p, token); } else { stopParsing(p, token); } } function endTagInText(p, token) { var _a5; if (token.tagID === TAG_ID.SCRIPT) { (_a5 = p.scriptHandler) === null || _a5 === void 0 ? void 0 : _a5.call(p, p.openElements.current); } p.openElements.pop(); p.insertionMode = p.originalInsertionMode; } function eofInText(p, token) { p._err(token, ERR.eofInElementThatCanContainOnlyText); p.openElements.pop(); p.insertionMode = p.originalInsertionMode; p.onEof(token); } function characterInTable(p, token) { if (p.openElements.currentTagId !== void 0 && TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) { p.pendingCharacterTokens.length = 0; p.hasNonWhitespacePendingCharacterToken = false; p.originalInsertionMode = p.insertionMode; p.insertionMode = InsertionMode.IN_TABLE_TEXT; switch (token.type) { case TokenType.CHARACTER: { characterInTableText(p, token); break; } case TokenType.WHITESPACE_CHARACTER: { whitespaceCharacterInTableText(p, token); break; } } } else { tokenInTable(p, token); } } function captionStartTagInTable(p, token) { p.openElements.clearBackToTableContext(); p.activeFormattingElements.insertMarker(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_CAPTION; } function colgroupStartTagInTable(p, token) { p.openElements.clearBackToTableContext(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_COLUMN_GROUP; } function colStartTagInTable(p, token) { p.openElements.clearBackToTableContext(); p._insertFakeElement(TAG_NAMES.COLGROUP, TAG_ID.COLGROUP); p.insertionMode = InsertionMode.IN_COLUMN_GROUP; startTagInColumnGroup(p, token); } function tbodyStartTagInTable(p, token) { p.openElements.clearBackToTableContext(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_TABLE_BODY; } function tdStartTagInTable(p, token) { p.openElements.clearBackToTableContext(); p._insertFakeElement(TAG_NAMES.TBODY, TAG_ID.TBODY); p.insertionMode = InsertionMode.IN_TABLE_BODY; startTagInTableBody(p, token); } function tableStartTagInTable(p, token) { if (p.openElements.hasInTableScope(TAG_ID.TABLE)) { p.openElements.popUntilTagNamePopped(TAG_ID.TABLE); p._resetInsertionMode(); p._processStartTag(token); } } function inputStartTagInTable(p, token) { if (isHiddenInput(token)) { p._appendElement(token, NS.HTML); } else { tokenInTable(p, token); } token.ackSelfClosing = true; } function formStartTagInTable(p, token) { if (!p.formElement && p.openElements.tmplCount === 0) { p._insertElement(token, NS.HTML); p.formElement = p.openElements.current; p.openElements.pop(); } } function startTagInTable(p, token) { switch (token.tagID) { case TAG_ID.TD: case TAG_ID.TH: case TAG_ID.TR: { tdStartTagInTable(p, token); break; } case TAG_ID.STYLE: case TAG_ID.SCRIPT: case TAG_ID.TEMPLATE: { startTagInHead(p, token); break; } case TAG_ID.COL: { colStartTagInTable(p, token); break; } case TAG_ID.FORM: { formStartTagInTable(p, token); break; } case TAG_ID.TABLE: { tableStartTagInTable(p, token); break; } case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: { tbodyStartTagInTable(p, token); break; } case TAG_ID.INPUT: { inputStartTagInTable(p, token); break; } case TAG_ID.CAPTION: { captionStartTagInTable(p, token); break; } case TAG_ID.COLGROUP: { colgroupStartTagInTable(p, token); break; } default: { tokenInTable(p, token); } } } function endTagInTable(p, token) { switch (token.tagID) { case TAG_ID.TABLE: { if (p.openElements.hasInTableScope(TAG_ID.TABLE)) { p.openElements.popUntilTagNamePopped(TAG_ID.TABLE); p._resetInsertionMode(); } break; } case TAG_ID.TEMPLATE: { templateEndTagInHead(p, token); break; } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.HTML: case TAG_ID.TBODY: case TAG_ID.TD: case TAG_ID.TFOOT: case TAG_ID.TH: case TAG_ID.THEAD: case TAG_ID.TR: { break; } default: { tokenInTable(p, token); } } } function tokenInTable(p, token) { const savedFosterParentingState = p.fosterParentingEnabled; p.fosterParentingEnabled = true; modeInBody(p, token); p.fosterParentingEnabled = savedFosterParentingState; } function whitespaceCharacterInTableText(p, token) { p.pendingCharacterTokens.push(token); } function characterInTableText(p, token) { p.pendingCharacterTokens.push(token); p.hasNonWhitespacePendingCharacterToken = true; } function tokenInTableText(p, token) { let i = 0; if (p.hasNonWhitespacePendingCharacterToken) { for (; i < p.pendingCharacterTokens.length; i++) { tokenInTable(p, p.pendingCharacterTokens[i]); } } else { for (; i < p.pendingCharacterTokens.length; i++) { p._insertCharacters(p.pendingCharacterTokens[i]); } } p.insertionMode = p.originalInsertionMode; p._processToken(token); } var TABLE_VOID_ELEMENTS = new Set([TAG_ID.CAPTION, TAG_ID.COL, TAG_ID.COLGROUP, TAG_ID.TBODY, TAG_ID.TD, TAG_ID.TFOOT, TAG_ID.TH, TAG_ID.THEAD, TAG_ID.TR]); function startTagInCaption(p, token) { const tn = token.tagID; if (TABLE_VOID_ELEMENTS.has(tn)) { if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION); p.activeFormattingElements.clearToLastMarker(); p.insertionMode = InsertionMode.IN_TABLE; startTagInTable(p, token); } } else { startTagInBody(p, token); } } function endTagInCaption(p, token) { const tn = token.tagID; switch (tn) { case TAG_ID.CAPTION: case TAG_ID.TABLE: { if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION); p.activeFormattingElements.clearToLastMarker(); p.insertionMode = InsertionMode.IN_TABLE; if (tn === TAG_ID.TABLE) { endTagInTable(p, token); } } break; } case TAG_ID.BODY: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.HTML: case TAG_ID.TBODY: case TAG_ID.TD: case TAG_ID.TFOOT: case TAG_ID.TH: case TAG_ID.THEAD: case TAG_ID.TR: { break; } default: { endTagInBody(p, token); } } } function startTagInColumnGroup(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.COL: { p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; } case TAG_ID.TEMPLATE: { startTagInHead(p, token); break; } default: { tokenInColumnGroup(p, token); } } } function endTagInColumnGroup(p, token) { switch (token.tagID) { case TAG_ID.COLGROUP: { if (p.openElements.currentTagId === TAG_ID.COLGROUP) { p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; } break; } case TAG_ID.TEMPLATE: { templateEndTagInHead(p, token); break; } case TAG_ID.COL: { break; } default: { tokenInColumnGroup(p, token); } } } function tokenInColumnGroup(p, token) { if (p.openElements.currentTagId === TAG_ID.COLGROUP) { p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; p._processToken(token); } } function startTagInTableBody(p, token) { switch (token.tagID) { case TAG_ID.TR: { p.openElements.clearBackToTableBodyContext(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_ROW; break; } case TAG_ID.TH: case TAG_ID.TD: { p.openElements.clearBackToTableBodyContext(); p._insertFakeElement(TAG_NAMES.TR, TAG_ID.TR); p.insertionMode = InsertionMode.IN_ROW; startTagInRow(p, token); break; } case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: { if (p.openElements.hasTableBodyContextInTableScope()) { p.openElements.clearBackToTableBodyContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; startTagInTable(p, token); } break; } default: { startTagInTable(p, token); } } } function endTagInTableBody(p, token) { const tn = token.tagID; switch (token.tagID) { case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: { if (p.openElements.hasInTableScope(tn)) { p.openElements.clearBackToTableBodyContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; } break; } case TAG_ID.TABLE: { if (p.openElements.hasTableBodyContextInTableScope()) { p.openElements.clearBackToTableBodyContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; endTagInTable(p, token); } break; } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.HTML: case TAG_ID.TD: case TAG_ID.TH: case TAG_ID.TR: { break; } default: { endTagInTable(p, token); } } } function startTagInRow(p, token) { switch (token.tagID) { case TAG_ID.TH: case TAG_ID.TD: { p.openElements.clearBackToTableRowContext(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_CELL; p.activeFormattingElements.insertMarker(); break; } case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: case TAG_ID.TR: { if (p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE_BODY; startTagInTableBody(p, token); } break; } default: { startTagInTable(p, token); } } } function endTagInRow(p, token) { switch (token.tagID) { case TAG_ID.TR: { if (p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE_BODY; } break; } case TAG_ID.TABLE: { if (p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE_BODY; endTagInTableBody(p, token); } break; } case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: { if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE_BODY; endTagInTableBody(p, token); } break; } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.HTML: case TAG_ID.TD: case TAG_ID.TH: { break; } default: { endTagInTable(p, token); } } } function startTagInCell(p, token) { const tn = token.tagID; if (TABLE_VOID_ELEMENTS.has(tn)) { if (p.openElements.hasInTableScope(TAG_ID.TD) || p.openElements.hasInTableScope(TAG_ID.TH)) { p._closeTableCell(); startTagInRow(p, token); } } else { startTagInBody(p, token); } } function endTagInCell(p, token) { const tn = token.tagID; switch (tn) { case TAG_ID.TD: case TAG_ID.TH: { if (p.openElements.hasInTableScope(tn)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(tn); p.activeFormattingElements.clearToLastMarker(); p.insertionMode = InsertionMode.IN_ROW; } break; } case TAG_ID.TABLE: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: case TAG_ID.TR: { if (p.openElements.hasInTableScope(tn)) { p._closeTableCell(); endTagInRow(p, token); } break; } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.HTML: { break; } default: { endTagInBody(p, token); } } } function startTagInSelect(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.OPTION: { if (p.openElements.currentTagId === TAG_ID.OPTION) { p.openElements.pop(); } p._insertElement(token, NS.HTML); break; } case TAG_ID.OPTGROUP: { if (p.openElements.currentTagId === TAG_ID.OPTION) { p.openElements.pop(); } if (p.openElements.currentTagId === TAG_ID.OPTGROUP) { p.openElements.pop(); } p._insertElement(token, NS.HTML); break; } case TAG_ID.HR: { if (p.openElements.currentTagId === TAG_ID.OPTION) { p.openElements.pop(); } if (p.openElements.currentTagId === TAG_ID.OPTGROUP) { p.openElements.pop(); } p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; } case TAG_ID.INPUT: case TAG_ID.KEYGEN: case TAG_ID.TEXTAREA: case TAG_ID.SELECT: { if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); if (token.tagID !== TAG_ID.SELECT) { p._processStartTag(token); } } break; } case TAG_ID.SCRIPT: case TAG_ID.TEMPLATE: { startTagInHead(p, token); break; } default: } } function endTagInSelect(p, token) { switch (token.tagID) { case TAG_ID.OPTGROUP: { if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) { p.openElements.pop(); } if (p.openElements.currentTagId === TAG_ID.OPTGROUP) { p.openElements.pop(); } break; } case TAG_ID.OPTION: { if (p.openElements.currentTagId === TAG_ID.OPTION) { p.openElements.pop(); } break; } case TAG_ID.SELECT: { if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); } break; } case TAG_ID.TEMPLATE: { templateEndTagInHead(p, token); break; } default: } } function startTagInSelectInTable(p, token) { const tn = token.tagID; if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); p._processStartTag(token); } else { startTagInSelect(p, token); } } function endTagInSelectInTable(p, token) { const tn = token.tagID; if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) { if (p.openElements.hasInTableScope(tn)) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); p.onEndTag(token); } } else { endTagInSelect(p, token); } } function startTagInTemplate(p, token) { switch (token.tagID) { case TAG_ID.BASE: case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: case TAG_ID.LINK: case TAG_ID.META: case TAG_ID.NOFRAMES: case TAG_ID.SCRIPT: case TAG_ID.STYLE: case TAG_ID.TEMPLATE: case TAG_ID.TITLE: { startTagInHead(p, token); break; } case TAG_ID.CAPTION: case TAG_ID.COLGROUP: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: { p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE; p.insertionMode = InsertionMode.IN_TABLE; startTagInTable(p, token); break; } case TAG_ID.COL: { p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP; p.insertionMode = InsertionMode.IN_COLUMN_GROUP; startTagInColumnGroup(p, token); break; } case TAG_ID.TR: { p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY; p.insertionMode = InsertionMode.IN_TABLE_BODY; startTagInTableBody(p, token); break; } case TAG_ID.TD: case TAG_ID.TH: { p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW; p.insertionMode = InsertionMode.IN_ROW; startTagInRow(p, token); break; } default: { p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY; p.insertionMode = InsertionMode.IN_BODY; startTagInBody(p, token); } } } function endTagInTemplate(p, token) { if (token.tagID === TAG_ID.TEMPLATE) { templateEndTagInHead(p, token); } } function eofInTemplate(p, token) { if (p.openElements.tmplCount > 0) { p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE); p.activeFormattingElements.clearToLastMarker(); p.tmplInsertionModeStack.shift(); p._resetInsertionMode(); p.onEof(token); } else { stopParsing(p, token); } } function startTagAfterBody(p, token) { if (token.tagID === TAG_ID.HTML) { startTagInBody(p, token); } else { tokenAfterBody(p, token); } } function endTagAfterBody(p, token) { var _a5; if (token.tagID === TAG_ID.HTML) { if (!p.fragmentContext) { p.insertionMode = InsertionMode.AFTER_AFTER_BODY; } if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === TAG_ID.HTML) { p._setEndLocation(p.openElements.items[0], token); const bodyElement = p.openElements.items[1]; if (bodyElement && !((_a5 = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a5 === void 0 ? void 0 : _a5.endTag)) { p._setEndLocation(bodyElement, token); } } } else { tokenAfterBody(p, token); } } function tokenAfterBody(p, token) { p.insertionMode = InsertionMode.IN_BODY; modeInBody(p, token); } function startTagInFrameset(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.FRAMESET: { p._insertElement(token, NS.HTML); break; } case TAG_ID.FRAME: { p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; } case TAG_ID.NOFRAMES: { startTagInHead(p, token); break; } default: } } function endTagInFrameset(p, token) { if (token.tagID === TAG_ID.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) { p.openElements.pop(); if (!p.fragmentContext && p.openElements.currentTagId !== TAG_ID.FRAMESET) { p.insertionMode = InsertionMode.AFTER_FRAMESET; } } } function startTagAfterFrameset(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.NOFRAMES: { startTagInHead(p, token); break; } default: } } function endTagAfterFrameset(p, token) { if (token.tagID === TAG_ID.HTML) { p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET; } } function startTagAfterAfterBody(p, token) { if (token.tagID === TAG_ID.HTML) { startTagInBody(p, token); } else { tokenAfterAfterBody(p, token); } } function tokenAfterAfterBody(p, token) { p.insertionMode = InsertionMode.IN_BODY; modeInBody(p, token); } function startTagAfterAfterFrameset(p, token) { switch (token.tagID) { case TAG_ID.HTML: { startTagInBody(p, token); break; } case TAG_ID.NOFRAMES: { startTagInHead(p, token); break; } default: } } function nullCharacterInForeignContent(p, token) { token.chars = REPLACEMENT_CHARACTER; p._insertCharacters(token); } function characterInForeignContent(p, token) { p._insertCharacters(token); p.framesetOk = false; } function popUntilHtmlOrIntegrationPoint(p) { while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML && p.openElements.currentTagId !== void 0 && !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) { p.openElements.pop(); } } function startTagInForeignContent(p, token) { if (causesExit(token)) { popUntilHtmlOrIntegrationPoint(p); p._startTagOutsideForeignContent(token); } else { const current = p._getAdjustedCurrentElement(); const currentNs = p.treeAdapter.getNamespaceURI(current); if (currentNs === NS.MATHML) { adjustTokenMathMLAttrs(token); } else if (currentNs === NS.SVG) { adjustTokenSVGTagName(token); adjustTokenSVGAttrs(token); } adjustTokenXMLAttrs(token); if (token.selfClosing) { p._appendElement(token, currentNs); } else { p._insertElement(token, currentNs); } token.ackSelfClosing = true; } } function endTagInForeignContent(p, token) { if (token.tagID === TAG_ID.P || token.tagID === TAG_ID.BR) { popUntilHtmlOrIntegrationPoint(p); p._endTagOutsideForeignContent(token); return; } for (let i = p.openElements.stackTop; i > 0; i--) { const element = p.openElements.items[i]; if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) { p._endTagOutsideForeignContent(token); break; } const tagName = p.treeAdapter.getTagName(element); if (tagName.toLowerCase() === token.tagName) { token.tagName = tagName; p.openElements.shortenToLength(i); break; } } } // node_modules/parse5/node_modules/entities/dist/esm/escape.js var xmlCodeMap2 = new Map([ [34, """], [38, "&"], [39, "'"], [60, "<"], [62, ">"] ]); var getCodePoint2 = String.prototype.codePointAt == null ? (c, index2) => (c.charCodeAt(index2) & 64512) === 55296 ? (c.charCodeAt(index2) - 55296) * 1024 + c.charCodeAt(index2 + 1) - 56320 + 65536 : c.charCodeAt(index2) : (input, index2) => input.codePointAt(index2); function getEscaper2(regex, map2) { return function escape2(data2) { let match; let lastIndex = 0; let result = ""; while (match = regex.exec(data2)) { if (lastIndex !== match.index) { result += data2.substring(lastIndex, match.index); } result += map2.get(match[0].charCodeAt(0)); lastIndex = match.index + 1; } return result + data2.substring(lastIndex); }; } var escapeAttribute2 = /* @__PURE__ */ getEscaper2(/["&\u00A0]/g, new Map([ [34, """], [38, "&"], [160, " "] ])); var escapeText2 = /* @__PURE__ */ getEscaper2(/[&<>\u00A0]/g, new Map([ [38, "&"], [60, "<"], [62, ">"], [160, " "] ])); // node_modules/parse5/dist/serializer/index.js var VOID_ELEMENTS = new Set([ TAG_NAMES.AREA, TAG_NAMES.BASE, TAG_NAMES.BASEFONT, TAG_NAMES.BGSOUND, TAG_NAMES.BR, TAG_NAMES.COL, TAG_NAMES.EMBED, TAG_NAMES.FRAME, TAG_NAMES.HR, TAG_NAMES.IMG, TAG_NAMES.INPUT, TAG_NAMES.KEYGEN, TAG_NAMES.LINK, TAG_NAMES.META, TAG_NAMES.PARAM, TAG_NAMES.SOURCE, TAG_NAMES.TRACK, TAG_NAMES.WBR ]); function isVoidElement(node, options) { return options.treeAdapter.isElementNode(node) && options.treeAdapter.getNamespaceURI(node) === NS.HTML && VOID_ELEMENTS.has(options.treeAdapter.getTagName(node)); } var defaultOpts3 = { treeAdapter: defaultTreeAdapter, scriptingEnabled: true }; function serializeOuter(node, options) { const opts = __spreadValues(__spreadValues({}, defaultOpts3), options); return serializeNode(node, opts); } function serializeChildNodes(parentNode, options) { let html3 = ""; const container = options.treeAdapter.isElementNode(parentNode) && options.treeAdapter.getTagName(parentNode) === TAG_NAMES.TEMPLATE && options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML ? options.treeAdapter.getTemplateContent(parentNode) : parentNode; const childNodes = options.treeAdapter.getChildNodes(container); if (childNodes) { for (const currentNode of childNodes) { html3 += serializeNode(currentNode, options); } } return html3; } function serializeNode(node, options) { if (options.treeAdapter.isElementNode(node)) { return serializeElement(node, options); } if (options.treeAdapter.isTextNode(node)) { return serializeTextNode(node, options); } if (options.treeAdapter.isCommentNode(node)) { return serializeCommentNode(node, options); } if (options.treeAdapter.isDocumentTypeNode(node)) { return serializeDocumentTypeNode(node, options); } return ""; } function serializeElement(node, options) { const tn = options.treeAdapter.getTagName(node); return `<${tn}${serializeAttributes(node, options)}>${isVoidElement(node, options) ? "" : `${serializeChildNodes(node, options)}`}`; } function serializeAttributes(node, { treeAdapter }) { let html3 = ""; for (const attr2 of treeAdapter.getAttrList(node)) { html3 += " "; if (attr2.namespace) { switch (attr2.namespace) { case NS.XML: { html3 += `xml:${attr2.name}`; break; } case NS.XMLNS: { if (attr2.name !== "xmlns") { html3 += "xmlns:"; } html3 += attr2.name; break; } case NS.XLINK: { html3 += `xlink:${attr2.name}`; break; } default: { html3 += `${attr2.prefix}:${attr2.name}`; } } } else { html3 += attr2.name; } html3 += `="${escapeAttribute2(attr2.value)}"`; } return html3; } function serializeTextNode(node, options) { const { treeAdapter } = options; const content = treeAdapter.getTextNodeContent(node); const parent2 = treeAdapter.getParentNode(node); const parentTn = parent2 && treeAdapter.isElementNode(parent2) && treeAdapter.getTagName(parent2); return parentTn && treeAdapter.getNamespaceURI(parent2) === NS.HTML && hasUnescapedText(parentTn, options.scriptingEnabled) ? content : escapeText2(content); } function serializeCommentNode(node, { treeAdapter }) { return ``; } function serializeDocumentTypeNode(node, { treeAdapter }) { return ``; } // node_modules/parse5/dist/index.js function parse4(html3, options) { return Parser2.parse(html3, options); } function parseFragment(fragmentContext, html3, options) { if (typeof fragmentContext === "string") { options = html3; html3 = fragmentContext; fragmentContext = null; } const parser = Parser2.getFragmentParser(fragmentContext, options); parser.tokenizer.write(html3, true); return parser.getFragment(); } // node_modules/parse5-htmlparser2-tree-adapter/dist/index.js function enquoteDoctypeId(id) { const quote = id.includes('"') ? "'" : '"'; return quote + id + quote; } function serializeDoctypeContent(name, publicId, systemId) { let str = "!DOCTYPE "; if (name) { str += name; } if (publicId) { str += ` PUBLIC ${enquoteDoctypeId(publicId)}`; } else if (systemId) { str += " SYSTEM"; } if (systemId) { str += ` ${enquoteDoctypeId(systemId)}`; } return str; } var adapter = { isCommentNode: isComment, isElementNode: isTag2, isTextNode: isText, createDocument() { const node = new Document([]); node["x-mode"] = html_exports.DOCUMENT_MODE.NO_QUIRKS; return node; }, createDocumentFragment() { return new Document([]); }, createElement(tagName, namespaceURI, attrs) { const attribs = Object.create(null); const attribsNamespace = Object.create(null); const attribsPrefix = Object.create(null); for (let i = 0; i < attrs.length; i++) { const attrName = attrs[i].name; attribs[attrName] = attrs[i].value; attribsNamespace[attrName] = attrs[i].namespace; attribsPrefix[attrName] = attrs[i].prefix; } const node = new Element(tagName, attribs, []); node.namespace = namespaceURI; node["x-attribsNamespace"] = attribsNamespace; node["x-attribsPrefix"] = attribsPrefix; return node; }, createCommentNode(data2) { return new Comment2(data2); }, createTextNode(value) { return new Text2(value); }, appendChild(parentNode, newNode) { const prev2 = parentNode.children[parentNode.children.length - 1]; if (prev2) { prev2.next = newNode; newNode.prev = prev2; } parentNode.children.push(newNode); newNode.parent = parentNode; }, insertBefore(parentNode, newNode, referenceNode) { const insertionIdx = parentNode.children.indexOf(referenceNode); const { prev: prev2 } = referenceNode; if (prev2) { prev2.next = newNode; newNode.prev = prev2; } referenceNode.prev = newNode; newNode.next = referenceNode; parentNode.children.splice(insertionIdx, 0, newNode); newNode.parent = parentNode; }, setTemplateContent(templateElement, contentElement) { adapter.appendChild(templateElement, contentElement); }, getTemplateContent(templateElement) { return templateElement.children[0]; }, setDocumentType(document2, name, publicId, systemId) { const data2 = serializeDoctypeContent(name, publicId, systemId); let doctypeNode = document2.children.find((node) => isDirective(node) && node.name === "!doctype"); if (doctypeNode) { doctypeNode.data = data2 !== null && data2 !== void 0 ? data2 : null; } else { doctypeNode = new ProcessingInstruction("!doctype", data2); adapter.appendChild(document2, doctypeNode); } doctypeNode["x-name"] = name; doctypeNode["x-publicId"] = publicId; doctypeNode["x-systemId"] = systemId; }, setDocumentMode(document2, mode) { document2["x-mode"] = mode; }, getDocumentMode(document2) { return document2["x-mode"]; }, detachNode(node) { if (node.parent) { const idx = node.parent.children.indexOf(node); const { prev: prev2, next: next2 } = node; node.prev = null; node.next = null; if (prev2) { prev2.next = next2; } if (next2) { next2.prev = prev2; } node.parent.children.splice(idx, 1); node.parent = null; } }, insertText(parentNode, text3) { const lastChild = parentNode.children[parentNode.children.length - 1]; if (lastChild && isText(lastChild)) { lastChild.data += text3; } else { adapter.appendChild(parentNode, adapter.createTextNode(text3)); } }, insertTextBefore(parentNode, text3, referenceNode) { const prevNode = parentNode.children[parentNode.children.indexOf(referenceNode) - 1]; if (prevNode && isText(prevNode)) { prevNode.data += text3; } else { adapter.insertBefore(parentNode, adapter.createTextNode(text3), referenceNode); } }, adoptAttributes(recipient, attrs) { for (let i = 0; i < attrs.length; i++) { const attrName = attrs[i].name; if (recipient.attribs[attrName] === void 0) { recipient.attribs[attrName] = attrs[i].value; recipient["x-attribsNamespace"][attrName] = attrs[i].namespace; recipient["x-attribsPrefix"][attrName] = attrs[i].prefix; } } }, getFirstChild(node) { return node.children[0]; }, getChildNodes(node) { return node.children; }, getParentNode(node) { return node.parent; }, getAttrList(element) { return element.attributes; }, getTagName(element) { return element.name; }, getNamespaceURI(element) { return element.namespace; }, getTextNodeContent(textNode) { return textNode.data; }, getCommentNodeContent(commentNode) { return commentNode.data; }, getDocumentTypeNodeName(doctypeNode) { var _a5; return (_a5 = doctypeNode["x-name"]) !== null && _a5 !== void 0 ? _a5 : ""; }, getDocumentTypeNodePublicId(doctypeNode) { var _a5; return (_a5 = doctypeNode["x-publicId"]) !== null && _a5 !== void 0 ? _a5 : ""; }, getDocumentTypeNodeSystemId(doctypeNode) { var _a5; return (_a5 = doctypeNode["x-systemId"]) !== null && _a5 !== void 0 ? _a5 : ""; }, isDocumentTypeNode(node) { return isDirective(node) && node.name === "!doctype"; }, setNodeSourceCodeLocation(node, location) { if (location) { node.startIndex = location.startOffset; node.endIndex = location.endOffset; } node.sourceCodeLocation = location; }, getNodeSourceCodeLocation(node) { return node.sourceCodeLocation; }, updateNodeSourceCodeLocation(node, endLocation) { if (endLocation.endOffset != null) node.endIndex = endLocation.endOffset; node.sourceCodeLocation = __spreadValues(__spreadValues({}, node.sourceCodeLocation), endLocation); } }; // node_modules/cheerio/dist/browser/parsers/parse5-adapter.js function parseWithParse5(content, options, isDocument2, context) { var _a5; (_a5 = options.treeAdapter) !== null && _a5 !== void 0 ? _a5 : options.treeAdapter = adapter; if (options.scriptingEnabled !== false) { options.scriptingEnabled = true; } return isDocument2 ? parse4(content, options) : parseFragment(context, content, options); } var renderOpts = { treeAdapter: adapter }; function renderWithParse5(dom) { const nodes = "length" in dom ? dom : [dom]; for (let index2 = 0; index2 < nodes.length; index2 += 1) { const node = nodes[index2]; if (isDocument(node)) { Array.prototype.splice.call(nodes, index2, 1, ...node.children); } } let result = ""; for (let index2 = 0; index2 < nodes.length; index2 += 1) { const node = nodes[index2]; result += serializeOuter(node, renderOpts); } return result; } // node_modules/cheerio/dist/browser/load-parse.js var parse5 = getParse((content, options, isDocument2, context) => options._useHtmlParser2 ? parseDocument(content, options) : parseWithParse5(content, options, isDocument2, context)); var load = getLoad(parse5, (dom, options) => options._useHtmlParser2 ? esm_default(dom, options) : renderWithParse5(dom)); // src/org/wanxp/utils/DoubanChallengeUtil.ts var DoubanChallengeUtil = class { static parse(html3) { if (!html3 || html3.indexOf('name="cha"') < 0 || html3.indexOf('name="sol"') < 0) { return null; } const $2 = load(html3); const form = $2('form#sec[action="/c"]'); if (form.length === 0) { return null; } const token = form.find('input[name="tok"]').attr("value") || ""; const challenge = form.find('input[name="cha"]').attr("value") || ""; const redirectUrl = form.find('input[name="red"]').attr("value") || ""; if (!token || !challenge || !redirectUrl) { return null; } const difficultyMatch = html3.match(/difficulty\s*=\s*(\d+)/); const parsedDifficulty = difficultyMatch ? Number(difficultyMatch[1]) : this.DEFAULT_DIFFICULTY; const difficulty = Number.isInteger(parsedDifficulty) && parsedDifficulty > 0 && parsedDifficulty <= 6 ? parsedDifficulty : this.DEFAULT_DIFFICULTY; return { token, challenge, redirectUrl, difficulty }; } static solve(challenge) { return __async(this, null, function* () { const targetPrefix = "0".repeat(challenge.difficulty); for (let nonce = 1; nonce <= this.MAX_NONCE; nonce++) { const hash = yield this.sha512(challenge.challenge + nonce); if (hash.startsWith(targetPrefix)) { return nonce; } } throw new Error("Douban proof-of-work challenge exceeded the maximum nonce"); }); } static buildRequestBody(challenge, solution) { return new URLSearchParams({ tok: challenge.token, cha: challenge.challenge, sol: String(solution), red: challenge.redirectUrl }).toString(); } static sha512(value) { return __async(this, null, function* () { try { const nodeCrypto = require("crypto"); return nodeCrypto.createHash("sha512").update(value).digest("hex"); } catch (_) { if (typeof crypto === "undefined" || !crypto.subtle) { throw new Error("SHA-512 is unavailable in this environment"); } const bytes = new TextEncoder().encode(value); const digest = yield crypto.subtle.digest("SHA-512", bytes); return Array.from(new Uint8Array(digest)).map((byte) => byte.toString(16).padStart(2, "0")).join(""); } }); } }; DoubanChallengeUtil.VERIFY_URL = "https://sec.douban.com/c"; DoubanChallengeUtil.DEFAULT_DIFFICULTY = 4; DoubanChallengeUtil.MAX_NONCE = 5e6; // src/org/wanxp/utils/DoubanHttpUtil.ts var DoubanHttpUtil = class { static httpRequestGet(url, headers, settingsManager) { return __async(this, null, function* () { settingsManager.debug(`\u8BF7\u6C42\u5730\u5740:${url}`); settingsManager.debug(`Obsidian-Douban:\u4ECE\u7F51\u7EDC\u83B7\u53D6\u7F51\u9875\u5F00\u59CB: url:${url} headers:${JSON.stringify(headers)}`); let response = yield HttpUtil.getText(url, headers, settingsManager); if (response.status == 403) { throw new Error(i18nHelper.getMessage("130106")); } let html3 = response.textString; const challenge = DoubanChallengeUtil.parse(html3); if (challenge) { settingsManager.debug(`Obsidian-Douban:\u68C0\u6D4B\u5230\u8C46\u74E3\u5B89\u5168\u9A8C\u8BC1\uFF0C\u5F00\u59CB\u81EA\u52A8\u9A8C\u8BC1`); const solution = yield DoubanChallengeUtil.solve(challenge); const body = DoubanChallengeUtil.buildRequestBody(challenge, solution); const challengeHeaders = this.buildChallengeHeaders(headers); response = yield HttpUtil.httpRequest(DoubanChallengeUtil.VERIFY_URL, challengeHeaders, settingsManager, { method: "POST", body }); html3 = response.textString; if (response.status >= 400 || DoubanChallengeUtil.parse(html3)) { throw new Error(`Douban proof-of-work verification failed with status ${response.status}`); } } return yield this.humanCheck(html3, url, settingsManager); }); } static buildChallengeHeaders(headers = {}) { const result = {}; Object.entries(headers).forEach(([key, value]) => { const lowerKey = key.toLowerCase(); if (value == null || value === "" || lowerKey === "host" || lowerKey === "content-length" || lowerKey === "content-type") { return; } result[key] = String(value); }); result["Content-Type"] = "application/x-www-form-urlencoded"; result["Origin"] = "https://sec.douban.com"; result["Referer"] = "https://sec.douban.com/"; return result; } constructor(fileHandler) { this.fileHandler = fileHandler; } static humanCheck(html3, url, settingsManager) { return __async(this, null, function* () { if (!html3) { return html3; } if (settingsManager) { settingsManager.debug(html3); } if (html3 && html3.toString().indexOf("\u7981\u6B62\u8BBF\u95EE") != -1) { const loginModel = new DoubanHumanCheckModel(url); yield loginModel.load(); return ""; } else { return html3; } }); } }; // src/org/wanxp/douban/data/search/searcher/AbstractSearchPageFetcher.ts var AbstractSearchPageFetcher = class { constructor(settingsManager) { this.settingsManager = settingsManager; } support(type, pageNum) { throw new Error("Method not implemented."); } fetch(keyword, pageNum, pageSize) { const start = Math.floor((pageNum - 1) * pageSize); const url = this.getSearchUrl(keyword, start, pageSize); if (!url) { return Promise.resolve(""); } return DoubanHttpUtil.httpRequestGet(url, this.settingsManager.getHeaders(), this.settingsManager).catch((e) => { throw log.error(i18nHelper.getMessage("130101").replace("{0}", e.toString()), e); }); } getSearchUrl(keyword, start, pageSize) { keyword = keyword.trim(); if (keyword.length == 0) { return ""; } keyword = HttpUtil.encodeUrl(keyword); return this.getUrl(keyword, start, pageSize); } }; // src/org/wanxp/douban/data/search/searcher/AllPageSearchPageFetcher.ts var AllPageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}`; } support(type) { return type == SupportType.all; } }; // src/org/wanxp/douban/data/search/searcher/MoviePageSearchPageFetcher.ts var MoviePageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}&cat=1002`; } support(type) { return type == SupportType.movie; } }; // src/org/wanxp/douban/data/search/searcher/BookPageSearchPageFetcher.ts var BookPageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}&cat=1001`; } support(type) { return type == SupportType.book; } }; // src/org/wanxp/douban/data/search/searcher/GamePageSearchPageFetcher.ts var GamePageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}&cat=3114`; } support(type) { return type == SupportType.game; } }; // src/org/wanxp/douban/data/search/searcher/MusicPageSearchPageFetcher.ts var MusicPageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}&cat=1003`; } support(type) { return type == SupportType.music; } }; // src/org/wanxp/douban/data/search/searcher/TheaterPageSearchPageFetcher.ts var TheaterPageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}&cat=3069`; } support(type) { return type == SupportType.theater; } }; // src/org/wanxp/douban/data/search/searcher/NotePageSearchPageFetcher.ts var NotePageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/j/search?q=${keyword}&start=${start}&cat=1015`; } support(type, pageNum) { return type == SupportType.note && pageNum > 1; } }; // src/org/wanxp/douban/data/search/searcher/NoteFirstPageSearchPageFetcher.ts var NoteFirstPageSearchPageFetcher = class extends AbstractSearchPageFetcher { getUrl(keyword, start, pageSize) { return `https://www.douban.com/search?cat=1015&q=${keyword}`; } support(type, pageNum) { return type == SupportType.note && pageNum == 1; } }; // src/org/wanxp/douban/data/search/searcher/SearchPageFetcher.ts var SearchPageFetcher = class { constructor(settingsManager) { this.fetchers = []; this.fetchers.push(new AllPageSearchPageFetcher(settingsManager)); this.fetchers.push(new MoviePageSearchPageFetcher(settingsManager)); this.fetchers.push(new BookPageSearchPageFetcher(settingsManager)); this.fetchers.push(new GamePageSearchPageFetcher(settingsManager)); this.fetchers.push(new MusicPageSearchPageFetcher(settingsManager)); this.fetchers.push(new TheaterPageSearchPageFetcher(settingsManager)); this.fetchers.push(new NotePageSearchPageFetcher(settingsManager)); this.fetchers.push(new NoteFirstPageSearchPageFetcher(settingsManager)); } fetch(keyword, type, pageNum, pageSize) { for (const fetcher of this.fetchers) { if (fetcher.support(type, pageNum)) { return fetcher.fetch(keyword, pageNum, pageSize); } } throw new Error(`not support type:${type} pageNum:${pageNum}`); } }; // src/org/wanxp/douban/data/model/SearchPageInfo.ts var SearchPageInfo = class { constructor(total, pageNum, pageSize, type) { this._total = total; this._pageNum = pageNum; this._pageSize = pageSize; this._hasNext = pageNum * pageSize < total; this._type = type; } nextPage() { if (!this._hasNext) { return this; } return new SearchPageInfo(this.total, this._pageNum + 1, this._pageSize, this._type); } previousPage() { if (this._pageNum == 0) { return this; } return new SearchPageInfo(this.total, this._pageNum - 1, this._pageSize, this._type); } typePage(type) { return new SearchPageInfo(this.total, 0, this._pageSize, this._type); } get hasNext() { return this._hasNext; } get hasPrevious() { return this._pageNum > 1; } get start() { return (this._pageNum - 1) * this._pageSize + 1; } get total() { return this._total; } set total(total) { this._total = total; } get pageSize() { return this._pageSize; } get pageNum() { return this._pageNum; } get type() { return this._type; } allPage() { if (this._pageNum == 0) { return this; } return new SearchPageInfo(this.total, this._pageNum - 1, this._pageSize, SupportType.all); } }; // src/org/wanxp/douban/data/model/SearchPageTypeOf.ts var SearchPageTypeOf = class extends SearchPageInfo { constructor(total, pageNum, pageSize, type, list) { super(total, pageNum, pageSize, type); this._list = list; } get list() { return this._list; } static empty(type) { return new SearchPageTypeOf(0, 1, 0, type, []); } static emptyWithNoType() { return new SearchPageTypeOf(0, 1, 0, null, []); } }; // src/org/wanxp/douban/data/model/SearchPage.ts var SearchPage = class extends SearchPageTypeOf { static empty(type) { return new SearchPage(0, 1, 0, type, []); } static emptyWithNoType() { return new SearchPage(0, 1, 0, null, []); } }; // src/org/wanxp/douban/data/search/SearchParser.ts var SearchParserHandler = class { static parseSearch(dataHtml) { return dataHtml(".result").get().map((i) => { const item = dataHtml(i); let idPattern = /(\d){5,10}/g; let urlPattern = /(https%3A%2F%2F)\S+(\d){5,10}(%2F)/g; let linkValue = item.find("div.content > div > h3 > a").attr("href"); let ececResult = idPattern.exec(linkValue); let urlResult = urlPattern.exec(linkValue); let cast = item.find(".subject-cast").text(); let score = item.find(".rating_nums").text(); let title = item.find("div.content > div > h3 > a").text(); let type = item.find("div.content > div > h3 > span").text(); let desc = item.find("div.content > p").text(); const result = { id: ececResult ? ececResult[0] : "", title: title ? title : "-", score: score ? Number(score) : null, cast, type: type ? type : "-", desc: desc ? desc : "-", url: urlResult ? decodeURIComponent(urlResult[0]) : "https://www.douban.com", image: "", imageUrl: "", publisher: "", datePublished: void 0, genre: [] }; return result; }); } static parseSearchJson(result, type, pageNum) { log.debug("\u89E3\u6790\u7ED9\u591A\u9875\u9762\u7ED3\u679C"); const data2 = JSON.parse(result); const list = data2.items; const resultList = list.map((e) => load(e)).map((e) => this.parseSearch(e)).map((e) => e ? e[0] : null); return new SearchPage(data2.total, pageNum, data2.limit, type, resultList); } }; // src/org/wanxp/douban/data/search/parser/AllFirstPageSearchResultPageParser.ts var AllFirstPageSearchResultPageParser = class { support(type, pageNum) { return pageNum == 1 && type == SupportType.all; } parse(source, type, pageNum, pageSize) { log.debug("\u89E3\u6790\u7ED9\u591A\u9875\u9762\u7ED3\u679C"); if (!source) { return new SearchPage(0, 0, 0, type, []); } return SearchParserHandler.parseSearchJson(source, type, pageNum); } }; // src/org/wanxp/douban/data/search/parser/OtherAllPageSearchResultPageParser.ts var OtherAllPageSearchResultPageParser = class { support(type, pageNum) { return pageNum > 1 && type == SupportType.all; } parse(source, type, pageNum, pageSize) { log.debug("\u89E3\u6790\u7ED9\u591A\u9875\u9762\u7ED3\u679C"); if (!source) { return new SearchPage(0, 0, 0, type, []); } return SearchParserHandler.parseSearchJson(source, type, pageNum); } }; // src/org/wanxp/douban/data/search/parser/NotAllPageSearchResultPageParser.ts var NotAllPageSearchResultPageParser = class { support(type, pageNum) { return type != SupportType.all && !(pageNum == 1 && type == SupportType.note); } parse(source, type, pageNum, pageSize) { log.debug("\u89E3\u6790\u7ED9\u591A\u9875\u9762\u7ED3\u679C"); if (!source) { return new SearchPage(0, 0, 0, type, []); } return SearchParserHandler.parseSearchJson(source, type, pageNum); } }; // src/org/wanxp/douban/data/search/parser/NoteFirstPageSearchResultPageParser.ts var NoteFirstPageSearchResultPageParser = class { support(type, pageNum) { return pageNum == 1 && type == SupportType.note; } parse(source, type, pageNum, pageSize) { const pageData = load(source); if (!pageData) { return SearchPage.empty(type); } const doubanSearchResultSubjects = pageData(".result").get().map((item) => { const title = pageData(item).find("h3 a").text(); const url = pageData(item).find("h3 a").attr("href"); const id = url.match(/(\d){5,10}/g)[0]; const author = pageData(item).find(".info").text(); const content = pageData(item).find("p").text(); const data2 = { id: id != null ? id : "", title: title ? title.replaceAll("\n", "").replaceAll(/\s+/g, "") : "-", score: null, cast: author ? author.replaceAll("\n", "").replaceAll(/\s+/g, "") : "", type: "\u65E5\u8BB0", desc: content ? content.replaceAll("\n", "").replaceAll(/\s+/g, "") : "-", url: url != null ? url : "https://www.douban.com", image: "", imageUrl: "", publisher: "", datePublished: void 0, genre: [] }; return data2; }); return new SearchPage(2e3, pageNum, pageSize, type, doubanSearchResultSubjects); } }; // src/org/wanxp/douban/data/search/parser/SearchResultPageParser.ts var SearchResultPageParser = class { constructor() { this.parsers = []; this.parsers.push(new AllFirstPageSearchResultPageParser()); this.parsers.push(new OtherAllPageSearchResultPageParser()); this.parsers.push(new NotAllPageSearchResultPageParser()); this.parsers.push(new NoteFirstPageSearchResultPageParser()); } parse(source, type, pageNum, pageSize) { for (const parser of this.parsers) { if (parser.support(type, pageNum)) { return parser.parse(source, type, pageNum, pageSize); } } throw new Error(`not support type:${type} pageNum:${pageNum}`); } }; // src/org/wanxp/douban/data/search/SearchV2.ts var SearcherV2 = class { static search(searchItem, searchType, pageNum, pageSize, doubanSettings, settingsManager) { return new SearchPageFetcher(settingsManager).fetch(searchItem, searchType, pageNum, pageSize).then((e) => new SearchResultPageParser().parse(e, searchType, pageNum, pageSize)); } }; // src/org/wanxp/douban/data/search/DoubanSearchFuzzySuggestModal.ts var DoubanFuzzySuggester = class extends import_obsidian7.FuzzySuggestModal { constructor(plugin, context, searchItem) { super(plugin.app); this.plugin = plugin; this.context = context; this.searchItem = searchItem; this.setPlaceholder(i18nHelper.getMessage("150101")); } getItems() { return this.doubanSearchResultExtract; } getItemText(item) { if (this.isNavigate(item)) { return item.title; } let text3 = item.type + "/" + (item.score ? item.score : "-") + "/" + item.title + "/" + item.cast; return text3; } isNavigate(item) { return item.type == "navigate"; } onChooseItem(item, evt) { return __async(this, null, function* () { evt.preventDefault(); evt.stopImmediatePropagation(); if (this.isNavigate(item)) { if (yield this.handleNavigate(item)) { this.start(); } return; } this.plugin.showStatus(i18nHelper.getMessage("140204", item.title)); this.context.listItem = item; if (item) { this.plugin.settingsManager.debug(`\u9009\u62E9\u4E86:${item.type}:${item.id}:${item.title}`); } this.plugin.doubanExtractHandler.handle(item, this.context); }); } handleNavigate(item) { return __async(this, null, function* () { const { searchPage } = this.context; let currentPage = searchPage; let result = false; switch (item.url) { case NavigateType.previous: currentPage = searchPage.previousPage(); result = true; break; case NavigateType.next: currentPage = searchPage.nextPage(); result = true; break; case NavigateType.nextNeedLogin: log.warn(i18nHelper.getMessage("140304")); break; } if (result) { const searchPageResult = yield SearcherV2.search(this.searchItem, currentPage.type, currentPage.pageNum, SEARCH_ITEM_PAGE_SIZE, this.plugin.settings, this.plugin.settingsManager); this.context.searchPage = searchPageResult; this.updatePageResult(searchPageResult); } return result; }); } updatePageResult(searchPageResult) { this.initItems(searchPageResult); } showSearchPage(searchPage) { this.initItems(searchPage); this.start(); } initItems(searchPage) { const doubanList = searchPage.list; if (searchPage.type == SupportType.all && searchPage.pageNum == 1) { if (doubanList.length == 0) { doubanList.push(DoubanSearchResultSubject_EMPTY); } else if (searchPage.list.length < SEARCH_ITEM_PAGE_SIZE) { doubanList.push(DoubanSearchResultSubject_TIP_EMPTY); } } if (searchPage.hasNext) { if (this.plugin.userComponent.isLogin()) { if (searchPage.type == SupportType.all && searchPage.pageNum == 1) { doubanList.push(DoubanSearchGroupPublishResultSubjectNextPage); } else { doubanList.push(DoubanSearchResultSubjectNextPage); } } else { doubanList.push(DoubanSearchResultSubjectNextPageNeedLogin); } } if (searchPage.hasPrevious) { if (searchPage.type == SupportType.all && searchPage.pageNum == 2) { doubanList.unshift(DoubanSearchGroupPublishResultSubjectPreviousPage); } else { doubanList.unshift(DoubanSearchResultSubjectPreviousPage); } } this.doubanSearchResultExtract = doubanList; } start() { try { this.open(); } catch (e) { log.error(e.toString(), e); } } }; // src/org/wanxp/douban/data/model/DoubanSubject.ts var ParameterMap = new Map([ ["id", ""] ]); var DoubanParameterName = { ID: "id", TITLE: "title", TYPE: "type", SCORE: "score", SCORE_STAR: "scoreStar", IMAGE: "image", IMAGE_URL: "imageData.url", IMAGE_NAME: "imageName", URL: "url", DESC: "desc", PUBLISHER: "publisher", DATE_PUBLISHED: "datePublished", TIME_PUBLISHED: "timePublished", YEAR_PUBLISHED: "yearPublished", GENRE: "genre", CURRENT_DATE: "currentDate", CURRENT_TIME: "currentTime" }; // src/org/wanxp/douban/data/handler/DoubanAbstractLoadHandler.ts var import_obsidian9 = __toModule(require("obsidian")); // src/org/wanxp/constant/DefaultTemplateContent.ts var DEFAULT_TEMPLATE_CONTENT = { movieTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} originalTitle: {{originalTitle}} genre: {{genre}} datePublished: {{datePublished}} director: {{director}} actor: {{actor}} author: {{author}} tags: - {{type}} url: {{url}} aliases: {{aliases}} country: {{country}} language: {{language}} IMDb: {{IMDb}} time: {{time}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- ![image]({{image}}) `, bookTemplateFileContent: `--- doubanId: {{id}} title: {{title}} subTitle: {{subTitle}} originalTitle: {{originalTitle}} series: {{series}} type: {{type}} author: {{author}} score: {{score}} scoreStar: {{scoreStar}} datePublished: {{datePublished}} translator: {{translator}} publisher: {{publisher}} producer: {{producer}} isbn: {{isbn}} url: {{url}} totalPage: {{totalPage}} price: {{price}} tags: - {{type}} binding: {{binding}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- ![image]({{image}}) {{menu}} `, musicTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} actor: {{actor}} score: {{score}} scoreStar: {{scoreStar}} genre: {{genre}} medium: {{medium}} albumType: {{albumType}} datePublished: {{datePublished}} publisher: {{publisher}} barcode: {{barcode}} url: {{url}} records: {{records}} tags: - {{type}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- ![image]({{image}}) --- Menu: {{menu}} `, noteTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} author: {{author}} authorUrl: {{authorUrl}} dateTimePublished: {{datePublished}} {{timePublished}} url: {{url}} tags: - {{type}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- {{content}} `, gameTemplateFileContent: `--- doubanId: {{id}} title: {{title}} aliases: {{aliases}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} dateTimePublished: {{datePublished}} publisher: {{publisher}} genre: {{genre}} developer: {{developer}} platform: {{platform}} url: {{url}} tags: - {{type}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- ![image]({{image}}) `, theaterTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} genre: {{genre}} datePublished: {{datePublished}} director: {{director}} actor: {{actor}} author: {{author}} publisher: {{publisher}} url: {{url}} aliases: {{aliases}} language: {{language}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- ![image]({{image}}) `, teleplayTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} originalTitle: {{originalTitle}} genre: {{genre}} datePublished: {{datePublished}} director: {{director}} actor: {{actor}} author: {{author}} tags: - {{type}} url: {{url}} aliases: {{aliases}} country: {{country}} language: {{language}} IMDb: {{IMDb}} time: {{time}} episode: {{episode}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- ![image]({{image}}) ` }; var DEFAULT_TEMPLATE_CONTENT_WITH_STATE = { movieTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} myRating: {{myRating}} myRatingStar: {{myRatingStar}} originalTitle: {{originalTitle}} genre: {{genre}} datePublished: {{datePublished}} director: {{director}} actor: {{actor}} author: {{author}} tags: {{myTags}} state: {{myState}} url: {{url}} aliases: {{aliases}} country: {{country}} language: {{language}} IMDb: {{IMDb}} time: {{time}} createTime: {{currentDate}} {{currentTime}} collectionDate: {{myCollectionDate}} desc: {{desc}} --- ![image]({{image}}) Comment: --- {{myComment}} `, bookTemplateFileContent: `--- doubanId: {{id}} title: {{title}} subTitle: {{subTitle}} originalTitle: {{originalTitle}} series: {{series}} type: {{type}} author: {{author}} score: {{score}} scoreStar: {{scoreStar}} myRating: {{myRating}} myRatingStar: {{myRatingStar}} datePublished: {{datePublished}} translator: {{translator}} publisher: {{publisher}} producer: {{producer}} isbn: {{isbn}} url: {{url}} totalPage: {{totalPage}} price: {{price}} tags: {{myTags}} state: {{myState}} binding: {{binding}} createTime: {{currentDate}} {{currentTime}} collectionDate: {{myCollectionDate}} desc: {{desc}} --- ![image]({{image}}) Comment: --- {{myComment}} {{menu}} `, musicTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} actor: {{actor}} score: {{score}} scoreStar: {{scoreStar}} myRating: {{myRating}} myRatingStar: {{myRatingStar}} genre: {{genre}} medium: {{medium}} albumType: {{albumType}} datePublished: {{datePublished}} publisher: {{publisher}} barcode: {{barcode}} url: {{url}} records: {{records}} tags: {{myTags}} state: {{myState}} createTime: {{currentDate}} {{currentTime}} collectionDate: {{myCollectionDate}} desc: {{desc}} --- ![image]({{image}}) --- Menu: {{menu}} --- Comment: {{myComment}} `, noteTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} author: {{author}} authorUrl: {{authorUrl}} dateTimePublished: {{datePublished}} {{timePublished}} url: {{url}} tags: - {{type}} createTime: {{currentDate}} {{currentTime}} desc: {{desc}} --- {{content}} `, gameTemplateFileContent: `--- doubanId: {{id}} title: {{title}} aliases: {{aliases}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} myRating: {{myRating}} myRatingStar: {{myRatingStar}} dateTimePublished: {{datePublished}} publisher: {{publisher}} genre: {{genre}} developer: {{developer}} platform: {{platform}} url: {{url}} tags: {{myTags}} state: {{myState}} createTime: {{currentDate}} {{currentTime}} collectionDate: {{myCollectionDate}} desc: {{desc}} --- ![image]({{image}}) Comment: --- {{myComment}} `, theaterTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} myRating: {{myRating}} myRatingStar: {{myRatingStar}} genre: {{genre}} datePublished: {{datePublished}} director: {{director}} actor: {{actor}} author: {{author}} publisher: {{publisher}} tags: {{myTags}} state: {{myState}} url: {{url}} aliases: {{aliases}} language: {{language}} createTime: {{currentDate}} {{currentTime}} collectionDate: {{myCollectionDate}} desc: {{desc}} --- ![image]({{image}}) Comment: {{myComment}} `, teleplayTemplateFileContent: `--- doubanId: {{id}} title: {{title}} type: {{type}} score: {{score}} scoreStar: {{scoreStar}} myRating: {{myRating}} myRatingStar: {{myRatingStar}} originalTitle: {{originalTitle}} genre: {{genre}} datePublished: {{datePublished}} director: {{director}} actor: {{actor}} author: {{author}} tags: {{myTags}} state: {{myState}} url: {{url}} aliases: {{aliases}} country: {{country}} language: {{language}} IMDb: {{IMDb}} time: {{time}} episode: {{episode}} createTime: {{currentDate}} {{currentTime}} collectionDate: {{myCollectionDate}} desc: {{desc}} --- ![image]({{image}}) Comment: --- {{myComment}} ` }; function getDefaultTemplateContent(key, useStateTemplate = true) { return useStateTemplate ? DEFAULT_TEMPLATE_CONTENT_WITH_STATE[key + "Content"] : DEFAULT_TEMPLATE_CONTENT[key + "Content"]; } // src/org/wanxp/douban/data/model/UserStateSubject.ts var DoubanUserParameter = { MY_TAGS: "{{myTags}}", MY_RATING: "{{myRating}}", MY_STATE: "{{myState}}", MY_COMMENT: "{{myComment}}", MY_COLLECTION_DATE: "{{myCollectionDate}}" }; var DoubanUserParameterName = { MY_TAGS: "myTags", MY_RATING: "myRating", MY_RATING_STAR: "myRatingStar", MY_STATE: "myState", MY_COMMENT: "myComment", MY_COLLECTION_DATE: "myCollectionDate" }; // src/org/wanxp/constant/DoubanUserState.ts var DoubanSubjectState; (function(DoubanSubjectState3) { DoubanSubjectState3["not"] = "not"; DoubanSubjectState3["wish"] = "wish"; DoubanSubjectState3["do"] = "do"; DoubanSubjectState3["collect"] = "collect"; })(DoubanSubjectState || (DoubanSubjectState = {})); function dynamicStateRecord(entries) { const result = {}; Object.entries(entries).forEach(([key, messageKey]) => { Object.defineProperty(result, key, { enumerable: true, get: () => i18nHelper.getMessage(messageKey) }); }); return result; } var DoubanSubjectStateRecords_ALL = dynamicStateRecord({ [DoubanSubjectState.not]: "500101", [DoubanSubjectState.wish]: "500102", [DoubanSubjectState.do]: "500103", [DoubanSubjectState.collect]: "500104" }); var DoubanSubjectStateRecords_MOVIE = dynamicStateRecord({ [DoubanSubjectState.not]: "500201", [DoubanSubjectState.wish]: "500202", [DoubanSubjectState.do]: "500203", [DoubanSubjectState.collect]: "500204" }); var DoubanSubjectStateRecords_BOOK = dynamicStateRecord({ [DoubanSubjectState.not]: "500301", [DoubanSubjectState.wish]: "500302", [DoubanSubjectState.do]: "500303", [DoubanSubjectState.collect]: "500304" }); var DoubanSubjectStateRecords_MUSIC = dynamicStateRecord({ [DoubanSubjectState.not]: "500401", [DoubanSubjectState.wish]: "500402", [DoubanSubjectState.do]: "500403", [DoubanSubjectState.collect]: "500404" }); var DoubanSubjectStateRecords_NOTE = dynamicStateRecord({ [DoubanSubjectState.not]: "500501", [DoubanSubjectState.wish]: "500502", [DoubanSubjectState.do]: "500503", [DoubanSubjectState.collect]: "500504" }); var DoubanSubjectStateRecords_GAME = dynamicStateRecord({ [DoubanSubjectState.not]: "500601", [DoubanSubjectState.wish]: "500602", [DoubanSubjectState.do]: "500603", [DoubanSubjectState.collect]: "500604" }); var DoubanSubjectStateRecords_TELEPLAY = dynamicStateRecord({ [DoubanSubjectState.not]: "500701", [DoubanSubjectState.wish]: "500702", [DoubanSubjectState.do]: "500703", [DoubanSubjectState.collect]: "500704" }); var DoubanSubjectStateRecords_THEATER = dynamicStateRecord({ [DoubanSubjectState.not]: "500701", [DoubanSubjectState.wish]: "500702", [DoubanSubjectState.do]: "500703", [DoubanSubjectState.collect]: "500704" }); var DoubanSubjectStateRecords = { [SupportType.all]: DoubanSubjectStateRecords_ALL, [SupportType.movie]: DoubanSubjectStateRecords_MOVIE, [SupportType.book]: DoubanSubjectStateRecords_BOOK, [SupportType.music]: DoubanSubjectStateRecords_MUSIC, [SupportType.note]: DoubanSubjectStateRecords_NOTE, [SupportType.game]: DoubanSubjectStateRecords_GAME, [SupportType.teleplay]: DoubanSubjectStateRecords_TELEPLAY, [SupportType.theater]: DoubanSubjectStateRecords_THEATER }; var ALL = "ALL"; var DoubanSubjectStateRecords_MOVIE_SYNC = dynamicStateRecord({ [ALL]: "500004", [DoubanSubjectState.wish]: "500202", [DoubanSubjectState.do]: "500203", [DoubanSubjectState.collect]: "500204" }); var DoubanSubjectStateRecords_TELEPLAY_SYNC = dynamicStateRecord({ [ALL]: "500004", [DoubanSubjectState.wish]: "500202", [DoubanSubjectState.do]: "500203", [DoubanSubjectState.collect]: "500204" }); var DoubanSubjectStateRecords_BOOK_SYNC = dynamicStateRecord({ [ALL]: "500004", [DoubanSubjectState.wish]: "500302", [DoubanSubjectState.do]: "500303", [DoubanSubjectState.collect]: "500304" }); var DoubanSubjectStateRecords_GAME_SYNC = dynamicStateRecord({ [DoubanSubjectState.wish]: "500602", [DoubanSubjectState.do]: "500603", [DoubanSubjectState.collect]: "500604" }); var DoubanSubjectStateRecords_BROADCAST_SYNC = dynamicStateRecord({ [ALL]: "500004" }); var DoubanSubjectStateRecords_NOTE_SYNC = dynamicStateRecord({ [ALL]: "500004" }); var DoubanSubjectStateRecords_MUSIC_SYNC = dynamicStateRecord({ [ALL]: "500004", [DoubanSubjectState.wish]: "500402", [DoubanSubjectState.do]: "500403", [DoubanSubjectState.collect]: "500404" }); var DoubanSubjectStateRecords_SYNC = { [SyncType.movie]: DoubanSubjectStateRecords_MOVIE_SYNC, [SyncType.book]: DoubanSubjectStateRecords_BOOK_SYNC, [SyncType.music]: DoubanSubjectStateRecords_MUSIC_SYNC, [SyncType.game]: DoubanSubjectStateRecords_GAME_SYNC, [SyncType.teleplay]: DoubanSubjectStateRecords_TELEPLAY_SYNC }; var DoubanSubjectStateRecords_KEY_WORD_TYPE = new Map([ ["\u6211\u770B\u8FC7\u8FD9\u90E8\u7535\u89C6\u5267", SupportType.teleplay], ["\u6211\u6700\u8FD1\u770B\u8FC7\u8FD9\u90E8\u7535\u89C6\u5267", SupportType.teleplay], ["\u6211\u60F3\u770B\u8FD9\u90E8\u7535\u89C6\u5267", SupportType.teleplay], ["\u6211\u5728\u770B\u8FD9\u90E8\u7535\u89C6\u5267", SupportType.teleplay], ["\u6211\u6700\u8FD1\u5728\u770B\u8FD9\u90E8\u7535\u89C6\u5267", SupportType.teleplay], ["\u6211\u6700\u8FD1\u770B\u8FC7\u8FD9\u90E8\u7535\u5F71", SupportType.movie], ["\u6211\u770B\u8FC7\u8FD9\u90E8\u7535\u5F71", SupportType.movie], ["\u6211\u60F3\u770B\u8FD9\u90E8\u7535\u5F71", SupportType.movie], ["\u6211\u8BFB\u8FC7\u8FD9\u672C\u4E66", SupportType.book], ["\u6211\u60F3\u8BFB\u8FD9\u672C\u4E66", SupportType.book], ["\u6211\u5728\u8BFB\u8FD9\u672C\u4E66", SupportType.book], ["\u6211\u6700\u8FD1\u5728\u8BFB\u8FD9\u672C\u4E66", SupportType.book], ["\u6211\u6700\u8FD1\u542C\u8FC7\u8FD9\u5F20\u5531\u7247", SupportType.music], ["\u6211\u542C\u8FC7\u8FD9\u5F20\u5531\u7247", SupportType.music], ["\u6211\u60F3\u542C\u8FD9\u5F20\u5531\u7247", SupportType.music], ["\u6211\u5728\u542C\u8FD9\u5F20\u5531\u7247", SupportType.music], ["\u6211\u6700\u8FD1\u5728\u542C\u8FD9\u5F20\u5531\u7247", SupportType.music], ["\u6211\u6700\u8FD1\u73A9\u8FC7\u8FD9\u4E2A\u6E38\u620F", SupportType.game], ["\u6211\u73A9\u8FC7\u8FD9\u4E2A\u6E38\u620F", SupportType.game], ["\u6211\u60F3\u73A9\u8FD9\u4E2A\u6E38\u620F", SupportType.game], ["\u6211\u5728\u73A9\u8FD9\u4E2A\u6E38\u620F", SupportType.game], ["\u6211\u6700\u8FD1\u5728\u73A9\u8FD9\u4E2A\u6E38\u620F", SupportType.game], ["\u6211\u6700\u8FD1\u770B\u8FC7\u8FD9\u90E8\u7535\u5F71", SupportType.movie], ["\u6211\u770B\u8FC7\u8FD9\u90E8\u7535\u5F71", SupportType.movie], ["\u6211\u60F3\u770B\u8FD9\u90E8\u7535\u5F71", SupportType.movie] ]); // src/org/wanxp/utils/HtmlUtil.ts var HtmlUtil = class { static getHtmlText(html3, selector) { if (!selector) { return null; } if (typeof selector == "string") { return html3(selector).text().trim(); } else { let s = "", text3 = ""; for (s of selector) { text3 = this.getHtmlText(html3, s); if (text3) { return text3; } } } } static strToHtml(str) { let result = str.replace(/\n/g, "
    "); result.replace(/\s/g, " "); return result; } }; // src/org/wanxp/douban/setting/model/ArraySetting.ts var ArraySettingFieldName; (function(ArraySettingFieldName3) { ArraySettingFieldName3["index"] = "index"; ArraySettingFieldName3["arrayName"] = "arrayName"; ArraySettingFieldName3["arrayStart"] = "arrayStart"; ArraySettingFieldName3["arrayElementStart"] = "arrayElementStart"; ArraySettingFieldName3["arraySpiltV2"] = "arraySpiltV2"; ArraySettingFieldName3["arrayElementEnd"] = "arrayElementEnd"; ArraySettingFieldName3["arrayEnd"] = "arrayEnd"; })(ArraySettingFieldName || (ArraySettingFieldName = {})); var DEFAULT_SETTINGS_ARRAY_NAME = "default"; var ARRAY_NAME_PREFIX_NAME = "ArrayType"; // src/org/wanxp/utils/YamlUtil.ts var YamlUtil = class { static hasSpecialChar(str) { return SPECIAL_CHAR_REG.test(str); } static handleSpecialChar(text3) { return '"' + text3 + '"'; } static handleText(text3, dataField = null) { if (YamlUtil.hasSpecialChar(text3)) { text3 = text3.replaceAll('"', '\\"').replaceAll(/\s+/g, " ").replaceAll("\n", "\u3002").replaceAll("\u3002\u3002", "\u3002").replace(/^" /, '"').replace(/ "$/, '"'); if (dataField && dataField.type === DataValueType.date) { return text3; } text3 = YamlUtil.handleSpecialChar(text3); } return text3; } }; var SPECIAL_CHAR_REG = /[{}\[\]&*#?|\-<>=!%@:"`,\n]/; var TITLE_ALIASES_SPECIAL_CHAR_REG_G = /[{}\[\]&*#?|\-<>=!%@:"`,,\n]/g; var SPECIAL_CHAR_REG_REPLACE = new Map([ ["{", "\\{"] ]); // src/org/wanxp/utils/model/FieldVariable.ts var FieldVariable = class { constructor(key, variable, outTypeName) { this._key = key; this._variable = variable; this._outTypeName = outTypeName; } get key() { return this._key; } get variable() { return this._variable; } get outTypeName() { return this._outTypeName; } }; // src/org/wanxp/utils/FileUtil.ts var import_obsidian8 = __toModule(require("obsidian")); var FileUtil = { parse(pathString) { const regex = /(?([^/\\]+[/\\])*)(?[^/\\]*$)/; const match = String(pathString).match(regex); const { dir, name } = match && match.groups; const nameWithoutSpChar = this.replaceSpecialCharactersForFileName(name); return { dir, name: nameWithoutSpChar || "Untitled_" + new Date().getTime(), extension: "md" }; }, join(...strings) { const parts = strings.map((s) => String(s).trim()).filter((s) => s != null); return (0, import_obsidian8.normalizePath)(parts.join("/")); }, replaceSpecialCharactersForFileName(fileNameInput) { let fileName = fileNameInput.replaceAll(/[\\/:*?"<>|]/g, "_"); fileName = fileName.replaceAll(/[\n\r\t]/g, "_"); fileName = fileName.replaceAll(/^\.+/g, "_"); fileName = fileName.replaceAll(/\.+$/g, "_"); fileName = fileName.replaceAll(/_+/g, "_"); return fileName; } }; // src/org/wanxp/utils/VariableUtil.ts var VariableUtil = class { static replaceSubject(obj, content, subjectType, settingManager, targetType) { if (!content || !obj) { return content; } const allVariables = this.getAllVariables(content, settingManager); if (!allVariables || allVariables.length == 0) { return content; } if (obj instanceof Map) { this.applyArrayLengthLimits(subjectType, obj, settingManager); this.handleCustomVariable(subjectType, obj, settingManager, "text"); content = this.replaceMap(obj, allVariables, content, settingManager, targetType); } else { const map2 = this.objToMap(obj); this.applyArrayLengthLimits(subjectType, map2, settingManager); this.handleCustomVariable(subjectType, map2, settingManager, "text"); content = this.replaceMap(map2, allVariables, content, settingManager, targetType); } return content; } static replace(obj, content, settingManager, targetType) { if (!content || !obj) { return content; } const allVariables = this.getAllVariables(content, settingManager); if (!allVariables || allVariables.length == 0) { return content; } if (obj instanceof Map) { content = this.replaceMap(obj, allVariables, content, settingManager, targetType); } else { const map2 = this.objToMap(obj); content = this.replaceMap(map2, allVariables, content, settingManager, targetType); } return content; } static replaceVariable(variable, value, content, settingManager, targetType) { if (!content) { return content; } if (value instanceof Array) { content = this.replaceArray(variable, value, content, settingManager, targetType); } else if (value instanceof DataField) { content = this.replaceDataField(variable, value, content, settingManager, targetType); } else { content = this.replaceString(variable, value, value, content, settingManager, targetType); } return content; } static replaceArray(variable, value, content, settingManager, targetType) { if (!content) { return content; } const variableStr = variable.variable; const outTypeName = variable.outTypeName; if (!value) { return content.replaceAll(variableStr, ""); } const arraySettings = this.getArraySetting(outTypeName, settingManager); if (!arraySettings) { log.warn(i18nHelper.getMessage(`130107`, variable.variable, outTypeName)); return content; } const strValues = value.map((v) => { if (typeof v === "string") { return v; } else { return v ? v.toString() : null; } }).filter((v) => v).map((v) => this.handleText(v, targetType)); const arrayValue = StringUtil.handleArray(strValues, arraySettings); content = content.replaceAll(variableStr, arrayValue); return content; } static keyToVariable(key) { return `{{${key}}}`; } static replaceString(variable, valueField, value, content, settingManager, targetType) { if (!content) { return content; } let strValue = value ? value.toString() : ""; return content.replaceAll(variable.variable, this.handleText(strValue, targetType, valueField)); } static getAllVariables(content, settingManager) { const reg = /\{\{[a-zA-Z-0-9_.]+([(a-zA-Z-0-9)]+)?}}/g; const result = content.match(reg); if (!result) { return []; } return result.map((v) => { const reg2 = new RegExp(`[a-zA-Z-0-9_.]+`, "g"); const result2 = v.match(reg2); if (!result2) { return null; } if (result2.length == 1) { return new FieldVariable(result2[0], v, null); } return new FieldVariable(result2[0], v, result2[1]); }).filter((v) => v); } static getArraySetting(outTypeName, settingManager) { if (!outTypeName) { return settingManager.getArraySetting(DEFAULT_SETTINGS_ARRAY_NAME); } else { return settingManager.getArraySetting(outTypeName); } } static replaceMap(obj, allVariables, content, settingManager, targetType) { allVariables.forEach((variable) => { const value = obj.get(variable.key); content = this.replaceVariable(variable, value, content, settingManager, targetType); }); return content; } static getType(value) { if (typeof value === "number") { return DataValueType.number; } else if (typeof value === "string") { if (value.startsWith("http://") || value.startsWith("https://")) { return DataValueType.url; } else if (/^(\/|\.\/|\.\.\/|~\/|.*\.[a-zA-Z0-9]+$)/.test(value)) { return DataValueType.path; } return DataValueType.string; } else if (value instanceof Date) { return DataValueType.date; } else if (value instanceof Array) { return DataValueType.array; } else { return DataValueType.string; } } static replaceDataField(variable, value, content, settingManager, targetType) { if (!content) { return content; } const variableStr = variable.variable; if (!value) { return content.replaceAll(variableStr, ""); } switch (value.type) { case DataValueType.string: content = this.replaceString(variable, value, value.value, content, settingManager, targetType); break; case DataValueType.number: content = content.replaceAll(variableStr, this.handleText(value.value.toString(), targetType, value)); break; case DataValueType.date: content = content.replaceAll(variableStr, this.handleText(value.value, targetType, value)); break; case DataValueType.array: content = this.replaceArray(variable, value.value, content, settingManager, targetType); break; default: content = content.replaceAll(variableStr, this.handleText(value.value, targetType, value)); break; } return content; } static handleCustomVariable(subjectType, variableMap, settingMananger, targetType) { const customProperties = settingMananger.getSetting("customProperties"); if (!customProperties) { return; } const customPropertiesMap = new Map(); customProperties.filter((customProperty) => customProperty.name && customProperty.field && (customProperty.field.toLowerCase() == SupportType.all || customProperty.field.toLowerCase() == subjectType)).forEach((customProperty) => { customPropertiesMap.set(customProperty.name, customProperty.value); }); customPropertiesMap.forEach((value, key) => { variableMap.set(key, new DataField(key, DataValueType.string, value, VariableUtil.replace(variableMap, value, settingMananger, targetType))); }); } static objToMap(obj) { const map2 = new Map(); Object.keys(obj).forEach((key) => { map2.set(key, obj[key]); }); return map2; } static applyArrayLengthLimits(subjectType, variableMap, settingManager) { if (!variableMap || variableMap.size == 0) { return; } const limits = settingManager.getSetting("arrayLengthLimits"); if (!limits || limits.length == 0) { return; } const effectiveLimits = new Map(); limits.filter((l) => l && l.field && l.limit && l.limit > 0).filter((l) => { if (!l.type) { return false; } const t = String(l.type).toLowerCase(); return t === SupportType.all || t === subjectType; }).forEach((l) => { const existing = effectiveLimits.get(l.field); if (existing == null || l.limit < existing) { effectiveLimits.set(l.field, l.limit); } }); if (effectiveLimits.size == 0) { return; } effectiveLimits.forEach((limit, fieldName) => { const dataField = variableMap.get(fieldName); if (!dataField) { return; } const value = dataField.value; if (Array.isArray(value) && value.length > limit) { const truncated = value.slice(0, limit); variableMap.set(fieldName, new DataField(dataField.name, dataField.type, dataField.origin, truncated)); } }); } static handleText(v, targetType, dataField = null) { if (targetType === "yml_text") { return YamlUtil.handleText(v, dataField); } if (targetType === "text") { return v; } if (targetType === "path") { return FileUtil.replaceSpecialCharactersForFileName(v); } } }; // src/org/wanxp/utils/NumberUtil.ts var NumberUtil = class { static getRandomNum(min, max) { const range = max - min; const rand = Math.random(); return min + Math.round(rand * range); } static getRateStar(rate, rateMax, options) { if (rate > rateMax) { this.getRateStarMaxRate(1, options); } return this.getRateStarMaxRate(rate / rateMax, options); } static getRateStarMaxRate(star, options) { let result = ""; const scoreSetting = options && options.scoreSetting ? options.scoreSetting : DEFAULT_SETTINGS.scoreSetting; const starFull = scoreSetting && scoreSetting.starFull ? scoreSetting.starFull : "\u2605"; const starEmpty = scoreSetting && scoreSetting.starEmpty ? scoreSetting.starEmpty : "\u2606"; const displayStarEmpty = scoreSetting && scoreSetting.displayStarEmpty != null ? scoreSetting.displayStarEmpty : true; const rateStarMax = scoreSetting && scoreSetting.maxStar ? scoreSetting.maxStar : 5; star = Math.floor(star * rateStarMax); for (let i = 0; i < rateStarMax; i++) { if (i < star) { result += starFull; } else if (displayStarEmpty) { result += starEmpty; } } return result; } static isNumber(value) { return !isNaN(Number(value)); } static isInt(value) { return Number.isInteger(Number(value)); } static value(value) { return Number(value); } }; // src/org/wanxp/utils/DoubanPageParser.ts var DoubanPageParser = class { static normalizeText(value) { if (!value) { return ""; } return value.replace(/\r\n?/g, "\n").split("\n").map((line) => line.replace(/[\t\f\v ]+/g, " ").trim()).join("\n").replace(/\n{3,}/g, "\n\n").trim(); } static extractText(html3, selectors) { for (const selector of selectors) { const elements = html3(selector).get(); if (elements.length === 0) { continue; } const paragraphs = elements.map((element) => { const fragment = html3(element).html(); const value = fragment == null ? html3(element).text() : load(`
    ${fragment.replace(//gi, "\n")}
    `)("div").text(); return this.normalizeText(value); }).filter(Boolean); if (paragraphs.length > 0) { return paragraphs.join("\n\n"); } } return ""; } static parseUserTags(html3) { const labeled = this.findLabeledElement(html3, /^标签\s*[::]/); if (!labeled) { return null; } let text3 = this.normalizeText(html3(labeled).text()).replace(/^标签\s*[::]\s*/, ""); if (!text3 && labeled.parent) { text3 = this.normalizeText(html3(labeled.parent).text()).replace(/^标签\s*[::]\s*/, ""); } const tags = text3.split(/\s+/).map((tag) => tag.trim()).filter(Boolean); return tags.length > 0 ? tags : null; } static parseUserComment(html3, fallbackSelectors = []) { const explicit = this.extractText(html3, [ ...fallbackSelectors, ...this.USER_SCOPES.flatMap((scope) => [ `${scope} textarea[name='comment']`, `${scope} [data-field='comment']`, `${scope} .comment-text`, `${scope} .comment-content` ]) ]); if (explicit && this.isCommentCandidate(explicit)) { return explicit; } const tagElement = this.findLabeledElement(html3, /^标签\s*[::]/); if (tagElement) { let sibling = tagElement.nextSibling; while (sibling) { const candidate = this.normalizeText(html3(sibling).text()); if (this.isCommentCandidate(candidate)) { return candidate; } sibling = sibling.nextSibling; } } const candidates = []; for (const scope of this.USER_SCOPES) { html3(`${scope} span, ${scope} p, ${scope} div`).each((_index, element) => { if (html3(element).children().length > 0) { return; } const candidate = this.normalizeText(html3(element).text()); if (this.isCommentCandidate(candidate)) { candidates.push(candidate); } }); if (candidates.length > 0) { break; } } return candidates.length > 0 ? candidates[candidates.length - 1] : null; } static collectFollowingFieldText(html3, labelElement) { const values = []; let sibling = labelElement.nextSibling; while (sibling) { if (sibling.type === "tag" && sibling.name === "br") { break; } const value = this.normalizeText(html3(sibling).text()); if (value && !/^[\/、,,;;]+$/.test(value)) { values.push(value); } sibling = sibling.nextSibling; } return Array.from(new Set(values)).join(" / "); } static findLabeledElement(html3, label) { for (const scope of this.USER_SCOPES) { const elements = html3(`${scope} span, ${scope} div, ${scope} p`).get(); const matching = elements.map((element) => ({ element, text: this.normalizeText(html3(element).text()) })).filter((item) => label.test(item.text)).sort((a, b) => a.text.length - b.text.length); if (matching.length > 0) { return matching[0].element; } } return null; } static isCommentCandidate(text3) { if (!text3 || text3.length < 2) { return false; } if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(text3) || /^\d+(?:\.\d+)?$/.test(text3)) { return false; } if (/^标签\s*[::]/.test(text3) || /^(我的)?评价\s*[::]?$/.test(text3)) { return false; } if (/^(想看|看过|在看|想读|读过|在读|想听|听过|在听|想玩|玩过|在玩)/.test(text3)) { return false; } if (/^(修改|删除|评分|暂无评价)$/.test(text3)) { return false; } if (/^[一二三四五1-5]星$/.test(text3) || /^(很差|较差|还行|推荐|力荐)$/.test(text3)) { return false; } return true; } }; DoubanPageParser.USER_SCOPES = [ "#interest_sect_level", ".collection-section", "#interest_section" ]; // src/org/wanxp/douban/data/handler/DoubanAbstractLoadHandler.ts var DoubanAbstractLoadHandler = class { constructor(doubanPlugin) { this.doubanPlugin = doubanPlugin; } parse(extract3, context) { return __async(this, null, function* () { const template = yield this.getTemplate(extract3, context); const variableMap = this.buildVariableMap(extract3, context); this.parseUserInfo(template, variableMap, extract3, context); this.parseVariable(template, variableMap, extract3, context); yield this.saveImage(extract3, context, variableMap); const frontMatterStart = template.indexOf(BasicConst.YAML_FRONT_MATTER_SYMBOL, 0); const frontMatterEnd = template.indexOf(BasicConst.YAML_FRONT_MATTER_SYMBOL, frontMatterStart + 1); let frontMatter = ""; let frontMatterBefore = ""; let frontMatterAfter = ""; let result = ""; if (frontMatterStart > -1 && frontMatterEnd > -1) { frontMatterBefore = template.substring(0, frontMatterStart); frontMatter = template.substring(frontMatterStart, frontMatterEnd + 3); frontMatterAfter = template.substring(frontMatterEnd + 3); if (frontMatterBefore.length > 0) { frontMatterBefore = this.parsePartText(frontMatterBefore, extract3, context, variableMap); } if (frontMatterAfter.length > 0) { frontMatterAfter = this.parsePartText(frontMatterAfter, extract3, context, variableMap); } if (frontMatter.length > 0) { frontMatter = this.parsePartYml(frontMatter, extract3, context, variableMap); } result = frontMatterBefore + frontMatter + frontMatterAfter; } else { result = this.parsePartText(template, extract3, context, variableMap); } let filePath = ""; if (SearchHandleMode.FOR_CREATE == context.mode) { filePath = this.parsePartPath(this.getFilePath(context), extract3, context, variableMap); } let fileName = ""; if (SearchHandleMode.FOR_CREATE == context.mode) { fileName = this.parsePartPath(this.getFileName(context), extract3, context, variableMap); } return { content: result, filePath, fileName, subject: extract3 }; }); } getFileName(context) { const { syncConfig } = context; if (syncConfig) { return syncConfig.dataFileNamePath; } const { dataFileNamePath } = context.settings; return dataFileNamePath ? dataFileNamePath : DEFAULT_SETTINGS.dataFileNamePath; } getFilePath(context) { const { syncConfig } = context; if (syncConfig) { return syncConfig.dataFilePath; } const { dataFilePath } = context.settings; return dataFilePath ? dataFilePath : DEFAULT_SETTINGS.dataFilePath; } handle(id, context) { return __async(this, null, function* () { const url = this.getSubjectUrl(id); context.plugin.settingsManager.debug(`\u5F00\u59CB\u8BF7\u6C42\u5730\u5740:${url}`); context.plugin.settingsManager.debug(`(\u6CE8\u610F:\u8BF7\u52FF\u5411\u4EFB\u4F55\u4EBA\u900F\u9732\u4F60\u7684Cookie,\u6B64\u5904\u82E5\u9700\u8981\u622A\u56FE\u8BF7**\u6253\u7801**)\u8BF7\u6C42header:${context.settings.loginHeadersContent}`); return yield DoubanHttpUtil.httpRequestGet(url, context.plugin.settingsManager.getHeaders(), context.plugin.settingsManager).then(load).then((data2) => this.analysisUserState(data2, context)).then(({ data: data2, userState }) => { let guessType = this.getSupportType(); if (context.syncActive) { guessType = this.getGuessType(data2); } const sub = this.parseSubjectFromHtml(data2, context); sub.userState = userState; sub.guessType = guessType; return sub; }).then((content) => this.toEditor(context, content)).catch((e) => { log.error(i18nHelper.getMessage("130101", e.toString()), e); if (url) { const id2 = StringUtil.analyzeIdByUrl(url); context.syncStatusHolder ? context.syncStatusHolder.syncStatus.fail(id2, "") : null; } else { context.syncStatusHolder ? context.syncStatusHolder.syncStatus.handled(1) : null; } return void 0; }); }); } getGuessType(data2) { if (data2) { const text3 = data2.html(); if (text3) { for (const [key, value] of DoubanSubjectStateRecords_KEY_WORD_TYPE) { if (text3.indexOf(key) >= 0) { return value; } } } } return null; } toEditor(context, extract3) { return __async(this, null, function* () { yield this.doubanPlugin.putToObsidian(context, extract3); return extract3; }); } getPersonName(name, context) { return this.getPersonNameByMode(name, context.settings.personNameMode); } getPersonName2(originalName, chineseName, context) { return this.getPersonNameByMode2(originalName, chineseName, context.settings.personNameMode); } getPersonNameByMode2(originalName, chineseName, personNameMode) { if (!originalName || !personNameMode) { return ""; } let resultName; switch (personNameMode) { case PersonNameMode.CH_NAME: resultName = chineseName; break; case PersonNameMode.EN_NAME: resultName = originalName.trim().replace(chineseName, "").trim(); if (!resultName) { resultName = originalName; } break; default: resultName = originalName; } return resultName; } getPersonNameByMode(name, personNameMode) { if (!name || !personNameMode) { return ""; } let resultName; let regValue; switch (personNameMode) { case PersonNameMode.CH_NAME: regValue = /[\u4e00-\u9fa50-9. ·:\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3008|\u3009|\u3010|\u3011|\u300e|\u300f|\u300c|\u300d|\ufe43|\ufe44|\u3014|\u3015|\u2026|\u2014|\uff5e|\ufe4f|\uffe5()]{2,}/g.exec(name); resultName = regValue ? regValue[0] : name; break; case PersonNameMode.EN_NAME: regValue = /[0-9a-zA-Z.\s-:]{2,}/g.exec(name); resultName = regValue ? regValue[0] : name; break; default: resultName = name; } return resultName.trim(); } getTitleNameByMode(name, personNameMode, context) { if (!name || !personNameMode) { return ""; } if (context.listItem) { const listedName = context.listItem.title.trim(); switch (personNameMode) { case PersonNameMode.CH_NAME: return listedName; case PersonNameMode.EN_NAME: const originalName = name.trim(); if (this.removeWhitespace(originalName) === this.removeWhitespace(listedName)) { return originalName; } const withoutListedName = this.removeTextIgnoringWhitespace(originalName, listedName).trim(); return withoutListedName || originalName; } } return this.getPersonNameByMode(name, personNameMode); } removeWhitespace(value) { return (value || "").replace(/\s+/g, ""); } removeTextIgnoringWhitespace(value, textToRemove) { const compactNeedle = this.removeWhitespace(textToRemove); if (!compactNeedle) { return value; } const compactValue = this.removeWhitespace(value); const compactIndex = compactValue.indexOf(compactNeedle); if (compactIndex < 0) { return value; } let compactPosition = 0; let start = -1; let end2 = value.length; for (let index2 = 0; index2 < value.length; index2++) { if (/\s/.test(value[index2])) { continue; } if (compactPosition === compactIndex) { start = index2; } compactPosition++; if (compactPosition === compactIndex + compactNeedle.length) { end2 = index2 + 1; break; } } return start >= 0 ? value.substring(0, start) + value.substring(end2) : value; } html_decode(str) { let s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, "&"); s = s.replace(/</g, "<"); s = s.replace(/>/g, ">"); s = s.replace(/ /g, " "); s = s.replace(/'/g, "'"); s = s.replace(/"/g, '"'); s = s.replace(//g, "\n"); return s; } parsePartYml(template, extract3, context, variableMap) { return VariableUtil.replaceSubject(variableMap, template, this.getSupportType(), this.doubanPlugin.settingsManager, "yml_text"); } parsePartText(template, extract3, context, variableMap) { return VariableUtil.replaceSubject(variableMap, template, this.getSupportType(), this.doubanPlugin.settingsManager, "text"); } parsePartPath(template, extract3, context, variableMap) { return VariableUtil.replaceSubject(variableMap, template, this.getSupportType(), this.doubanPlugin.settingsManager, "path"); } buildVariableMap(extract3, context) { extract3.desc = DoubanPageParser.normalizeText(extract3.desc); const variableMap = new Map(); for (const [key, value] of Object.entries(extract3)) { if (!value) { continue; } const type = VariableUtil.getType(value); if (key == "score") { variableMap.set(DoubanParameterName.SCORE_STAR, new DataField(DoubanParameterName.SCORE_STAR, DataValueType.string, value, NumberUtil.getRateStar(value, 10, { scoreSetting: context.settings.scoreSetting }))); } variableMap.set(key, new DataField(key, type, value, value)); } variableMap.set(DoubanParameterName.IMAGE_URL, new DataField(DoubanParameterName.IMAGE_URL, DataValueType.url, extract3.imageUrl, extract3.imageUrl)); const imageName = this.getImageBasename(extract3.image); variableMap.set(DoubanParameterName.IMAGE_NAME, new DataField(DoubanParameterName.IMAGE_NAME, DataValueType.string, imageName, imageName)); variableMap.set(DoubanParameterName.YEAR_PUBLISHED, new DataField(DoubanParameterName.YEAR_PUBLISHED, DataValueType.date, extract3.datePublished, extract3.datePublished ? (0, import_obsidian9.moment)(extract3.datePublished).format("yyyy") : "")); variableMap.set(DoubanParameterName.DATE_PUBLISHED, new DataField(DoubanParameterName.DATE_PUBLISHED, DataValueType.date, extract3.datePublished, extract3.datePublished ? (0, import_obsidian9.moment)(extract3.datePublished).format(context.settings.dateFormat) : "")); variableMap.set(DoubanParameterName.TIME_PUBLISHED, new DataField(DoubanParameterName.TIME_PUBLISHED, DataValueType.date, extract3.datePublished, extract3.datePublished ? (0, import_obsidian9.moment)(extract3.datePublished).format(context.settings.timeFormat) : "")); const currentDate = new Date(); variableMap.set(DoubanParameterName.CURRENT_DATE, new DataField(DoubanParameterName.CURRENT_DATE, DataValueType.date, currentDate, (0, import_obsidian9.moment)(currentDate).format(context.settings.dateFormat))); variableMap.set(DoubanParameterName.CURRENT_TIME, new DataField(DoubanParameterName.CURRENT_TIME, DataValueType.date, currentDate, (0, import_obsidian9.moment)(currentDate).format(context.settings.timeFormat))); return variableMap; } parseUserInfo(resultContent, variableMap, extract3, context) { const userState = extract3.userState; if ((resultContent.indexOf(DoubanUserParameter.MY_TAGS) >= 0 || resultContent.indexOf(DoubanUserParameter.MY_RATING) >= 0 || resultContent.indexOf(DoubanUserParameter.MY_STATE) >= 0 || resultContent.indexOf(DoubanUserParameter.MY_COMMENT) >= 0 || resultContent.indexOf(DoubanUserParameter.MY_COLLECTION_DATE) >= 0) && !this.doubanPlugin.userComponent.isLogin()) { log.warn(i18nHelper.getMessage("100113")); return resultContent; } if (!userState) { return resultContent; } let tags = []; if (userState.tags && userState.tags.length > 0) { tags = [extract3.type, ...userState.tags.map((tag) => tag.trim())]; } else { tags = [extract3.type]; } Object.entries(userState).forEach(([key, value]) => { if (!value) { return; } variableMap.set(key, new DataField(key, VariableUtil.getType(value), value, value)); }); if (userState.tags && userState.tags.length > 0) { variableMap.set(DoubanUserParameterName.MY_TAGS, new DataField(DoubanUserParameterName.MY_TAGS, DataValueType.array, tags, tags)); } if (userState.comment) { variableMap.set(DoubanUserParameterName.MY_COMMENT, new DataField(DoubanUserParameterName.MY_COMMENT, DataValueType.string, userState.comment, userState.comment)); } if (userState.state) { variableMap.set(DoubanUserParameterName.MY_STATE, new DataField(DoubanUserParameterName.MY_STATE, DataValueType.string, userState.state, userState.stateName || this.getUserStateName(userState.state))); } if (userState.rate) { variableMap.set(DoubanUserParameterName.MY_RATING, new DataField(DoubanUserParameterName.MY_RATING, DataValueType.number, userState.rate, userState.rate)); variableMap.set(DoubanUserParameterName.MY_RATING_STAR, new DataField(DoubanUserParameterName.MY_RATING_STAR, DataValueType.string, userState.rate, NumberUtil.getRateStar(userState.rate, 5, { scoreSetting: context.settings.scoreSetting }))); } if (userState.collectionDate) { variableMap.set(DoubanUserParameterName.MY_COLLECTION_DATE, new DataField(DoubanUserParameterName.MY_COLLECTION_DATE, DataValueType.date, userState.collectionDate, userState.collectionDate ? (0, import_obsidian9.moment)(userState.collectionDate).format(context.settings.dateFormat) : "")); } } getTemplateKey() { let templateKey; switch (this.getSupportType()) { case SupportType.movie: templateKey = TemplateKey.movieTemplateFile; break; case SupportType.book: templateKey = TemplateKey.bookTemplateFile; break; case SupportType.music: templateKey = TemplateKey.musicTemplateFile; break; case SupportType.teleplay: templateKey = TemplateKey.teleplayTemplateFile; break; case SupportType.game: templateKey = TemplateKey.gameTemplateFile; break; case SupportType.note: templateKey = TemplateKey.noteTemplateFile; break; case SupportType.theater: templateKey = TemplateKey.theaterTemplateFile; break; default: templateKey = null; } return templateKey; } getTemplate(extract3, context) { return __async(this, null, function* () { const { syncConfig } = context; if (syncConfig) { if (syncConfig.templateFile) { const val2 = yield this.doubanPlugin.fileHandler.getFileContent(syncConfig.templateFile); if (val2) { return val2; } } } const tempKey = this.getTemplateKey(); const templatePath = context.settings[tempKey]; let useUserState = context.userComponent.isLogin() && extract3.userState && extract3.userState.collectionDate != null && extract3.userState.collectionDate != void 0; useUserState = useUserState ? useUserState : false; if (!templatePath || StringUtil.isBlank(templatePath)) { return getDefaultTemplateContent(tempKey, useUserState); } const defaultContent = getDefaultTemplateContent(tempKey, useUserState); const firstLinkpathDest = this.doubanPlugin.app.metadataCache.getFirstLinkpathDest(templatePath, ""); if (!firstLinkpathDest) { return defaultContent; } else { const val2 = yield this.doubanPlugin.fileHandler.getFileContent(firstLinkpathDest.path); return val2 ? val2 : defaultContent; } }); } analysisUserState(html3, context) { if (!context.userComponent.isLogin()) { return { data: html3, userState: null }; } if (!html3(".nav-user-account")) { return { data: html3, userState: null }; } return this.analysisUser(html3, context); } static getUserState(stateWord) { let state; if (!stateWord) { return null; } if (stateWord.indexOf("\u60F3") >= 0) { state = DoubanSubjectState.wish; } else if (stateWord.indexOf("\u5728") >= 0) { state = DoubanSubjectState.do; } else if (stateWord.indexOf("\u8FC7") >= 0) { state = DoubanSubjectState.collect; } else { state = DoubanSubjectState.not; } return state; } getUserStateName(state) { if (!state) { return ""; } const v = DoubanSubjectStateRecords[this.getSupportType()]; switch (state) { case DoubanSubjectState.wish: return v.wish; case DoubanSubjectState.do: return v.do; case DoubanSubjectState.collect: return v.collect; case DoubanSubjectState.not: return v.not; default: return ""; } } saveImage(extract3, context, variableMap) { return __async(this, null, function* () { const { syncConfig } = context; if (!extract3.image || syncConfig && !syncConfig.cacheImage || !context.settings.cacheImage) { return; } const image = extract3.image; let folder = syncConfig ? syncConfig.attachmentPath : context.settings.attachmentPath; if (!folder) { folder = DEFAULT_SETTINGS.attachmentPath; } folder = this.parsePartPath(folder, extract3, context, variableMap); let fileName = syncConfig ? syncConfig.attachmentFileName : context.settings.attachmentFileName; if (!fileName) { fileName = DEFAULT_SETTINGS.attachmentFileName; } let fileNameSuffix = image ? image.substring(image.lastIndexOf(".")) : ".jpg"; if (fileNameSuffix && fileNameSuffix.length > 10) { fileNameSuffix = ".jpg"; } fileName = this.parsePartPath(fileName, extract3, context, variableMap); fileName = fileName + fileNameSuffix; const imageReferer = (extract3.id ? this.getSubjectUrl(extract3.id) : "") || extract3.url; const referHeaders = HttpUtil.buildImageRequestHeaders(context.plugin.settingsManager.getHeaders(), imageReferer); if ((syncConfig ? syncConfig.cacheHighQuantityImage : context.settings.cacheHighQuantityImage) && context.userComponent.isLogin()) { try { const highImageFilename = this.getImageFilename(image); const highImage = this.getHighQuantityImageUrl(highImageFilename); const highImageHeaders = HttpUtil.buildImageRequestHeaders(context.plugin.settingsManager.getHeaders(), imageReferer); const resultValue2 = yield this.handleImage(highImage, folder, fileName, context, false, highImageHeaders); if (resultValue2 && resultValue2.success) { extract3.image = resultValue2.filepath; this.initImageVariableMap(extract3, context, variableMap); return; } } catch (e) { console.error(e); console.error("\u4E0B\u8F7D\u9AD8\u6E05\u5C01\u9762\u5931\u8D25\uFF0C\u5C06\u4F1A\u4F7F\u7528\u666E\u901A\u5C01\u9762"); } } const resultValue = yield this.handleImage(image, folder, fileName, context, true, referHeaders); if (resultValue && resultValue.success) { extract3.image = resultValue.filepath; this.initImageVariableMap(extract3, context, variableMap); } }); } getImageFilename(image) { if (!image) { return ""; } const imageUrl = image.split("?").first() || image; return imageUrl.substring(imageUrl.lastIndexOf("/") + 1); } initImageVariableMap(extract3, context, variableMap) { variableMap.set(DoubanParameterName.IMAGE_URL, new DataField(DoubanParameterName.IMAGE_URL, DataValueType.url, extract3.imageUrl, extract3.imageUrl)); variableMap.set(DoubanParameterName.IMAGE, new DataField(DoubanParameterName.IMAGE, DataValueType.path, extract3.image, extract3.image)); const imageName = this.getImageBasename(extract3.image); variableMap.set(DoubanParameterName.IMAGE_NAME, new DataField(DoubanParameterName.IMAGE_NAME, DataValueType.string, imageName, imageName)); } getImageBasename(image) { if (!image) { return ""; } const cleanPath = image.split(/[?#]/, 1)[0].replace(/\\/g, "/"); return cleanPath.substring(cleanPath.lastIndexOf("/") + 1); } handleImage(image, folder, filename, context, showError, headers) { return __async(this, null, function* () { if (context.settings.pictureBedFlag && import_obsidian9.Platform.isDesktopApp) { const checked = yield context.netFileHandler.downloadDBUploadPicGoByClipboardBefore(context); if (!checked) { log.notice("\u8FDE\u63A5PicGo\u8F6F\u4EF6\u5931\u8D25, \u8BF7\u68C0\u67E5\u662F\u5426\u5DF2\u5F00\u542FPicGo\u7684Server\u670D\u52A1 \u6216 \u68C0\u67E5\u63D2\u4EF6\u4E2D\u914D\u7F6E\u5730\u5740\u662F\u5426\u6B63\u786E\uFF0C\u73B0\u4F7F\u7528\u9ED8\u8BA4\u7684\u4E0B\u8F7D\u5230\u672C\u5730\u7684\u65B9\u5F0F"); return yield context.netFileHandler.downloadDBFile(image, folder, filename, context, false, headers); } return yield context.netFileHandler.downloadDBUploadPicGoByClipboard(image, filename, context, showError, headers); } else { return yield context.netFileHandler.downloadDBFile(image, folder, filename, context, false, headers); } }); } handlePersonNameByMeta(html3, movie, context, metaProperty, objectProperty) { if (!movie) { return; } const metaProperties = html3(`head > meta[property='${metaProperty}']`).get().map((e) => { return html3(e).attr("content"); }); const currentArray = movie[objectProperty]; if (!Array.isArray(currentArray)) { return; } currentArray.filter((p) => p.name).map((p) => { const persons = metaProperties.filter((a) => p.name.indexOf(a) >= 0); if (persons) { p.name = this.getPersonName2(p.name, persons[0], context); } }); } getPropertyValue(html3, name) { return HtmlUtil.getHtmlText(html3, this.doubanPlugin.settingsManager.getSelector(this.getSupportType(), name)); } }; // src/org/wanxp/douban/data/model/DoubanBookSubject.ts var DoubanBookParameter = { author: "author", translator: "translator", isbn: "isbn", originalTitle: "originalTitle", subTitle: "subTitle", totalPage: "totalPage", series: "series", menu: "menu", price: "price", binding: "binding", producer: "producer", popularComments: "popularComments" }; // src/org/wanxp/douban/data/handler/DoubanBookLoadHandler.ts var import_obsidian10 = __toModule(require("obsidian")); var DoubanBookLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.book; } getHighQuantityImageUrl(fileName) { return `https://img9.doubanio.com/view/subject/l/public/${fileName}`; } getSubjectUrl(id) { return `https://book.douban.com/subject/${id}/`; } parseVariable(beforeContent, variableMap, extract3, context) { variableMap.set(DoubanBookParameter.author, new DataField(DoubanBookParameter.author, DataValueType.array, extract3.author, (extract3.author || []).map(this.handleSpecialAuthorName))); variableMap.set(DoubanBookParameter.translator, new DataField(DoubanBookParameter.translator, DataValueType.array, extract3.translator, (extract3.translator || []).map(this.handleSpecialAuthorName))); } support(extract3) { return extract3 && extract3.type && (extract3.type.contains("\u56FE\u4E66") || extract3.type.contains("\u4E66\u7C4D") || extract3.type.contains("Book") || extract3.type.contains("book")); } handleSpecialAuthorName(authorName) { return authorName.replace(/\[/g, "").replace("]", "/"); } analysisUser(html3, context) { const rate = html3("input#n_rating").val(); const tags = DoubanPageParser.parseUserTags(html3); const stateWord = html3("div#interest_sect_level > div.a_stars > span.mr10").text().trim(); const collectionDateStr = html3("div#interest_sect_level > div.a_stars > span.mr10").next().text().trim(); const userState1 = DoubanAbstractLoadHandler.getUserState(stateWord); const stateName = this.getBookStateName(stateWord); const comment = this.getComment(html3); const userState = { tags, rate: rate ? Number(rate) : null, state: userState1, stateName, collectionDate: collectionDateStr ? (0, import_obsidian10.moment)(collectionDateStr, "YYYY-MM-DD").toDate() : null, comment }; return { data: html3, userState }; } getBookStateName(stateWord) { if (!stateWord) { return ""; } if (stateWord.indexOf("\u60F3\u8BFB") >= 0) { return "\u60F3\u8BFB"; } if (stateWord.indexOf("\u5728\u8BFB") >= 0) { return "\u5728\u8BFB"; } if (stateWord.indexOf("\u8BFB\u8FC7") >= 0) { return "\u8BFB\u8FC7"; } return ""; } parseSubjectFromHtml(html3, context) { let desc = DoubanPageParser.extractText(html3, [ "#link-report .all.hidden .intro p", ".related_info .all.hidden .intro p", ".intro p" ]); if (!desc) { desc = DoubanPageParser.normalizeText(html3("head > meta[property='og:description']").attr("content")); } const image = html3(html3("head > meta[property= 'og:image']").get(0)).attr("content"); let item = html3(html3("head > script[type='application/ld+json']").get(0)).text(); item = super.html_decode(item); const obj = JSON.parse(item); const title = obj.name; const url = obj.url; const author = obj.author.map((a) => a.name); const isbn = obj.isbn; const score = html3(html3("#interest_sectl > div > div.rating_self.clearfix > strong[property= 'v:average']").get(0)).text(); const detailDom = html3(html3("#info").get(0)); const publish = detailDom.find("span.pl"); const valueMap = new Map(); publish.map((index2, info) => { let key = html3(info).text().trim(); let value; if (key.indexOf("\u8BD1\u8005") >= 0) { value = []; html3(info.parent).find("a").map((index3, a) => { value.push(html3(a).text().trim()); }); } else if (key.indexOf("\u51FA\u7248\u793E") >= 0 || key.indexOf("\u51FA\u54C1\u65B9") >= 0) { value = DoubanPageParser.collectFollowingFieldText(html3, info); } else if (key.indexOf("\u4F5C\u8005") >= 0 || key.indexOf("\u4E1B\u4E66") >= 0) { value = html3(info.next.next).text().trim(); } else { value = html3(info.next).text().trim(); } valueMap.set(BookKeyValueMap.get(key), value); }); let id = StringUtil.analyzeIdByUrl(url); let menuIdDom = html3("#dir_" + id + "_full") ? html3("#dir_" + id + "_full") : html3("#dir_" + id + "_short"); let menu = menuIdDom ? html3(menuIdDom.get(0)).text().trim().split("\n").map((row) => row.trim()) : []; menu.length > 0 ? menu.pop() : menu; const result = { author, translator: valueMap.has("translator") ? valueMap.get("translator") : [], image, imageUrl: image, datePublished: valueMap.has("datePublished") ? new Date(valueMap.get("datePublished")) : void 0, isbn, publisher: valueMap.has("publisher") ? valueMap.get("publisher") : "", score: Number(score), originalTitle: valueMap.has("originalTitle") ? valueMap.get("originalTitle") : "", subTitle: valueMap.has("subTitle") ? valueMap.get("subTitle") : "", totalPage: valueMap.has("totalPage") ? Number(valueMap.get("totalPage")) : null, series: valueMap.has("series") ? valueMap.get("series") : "", menu, price: valueMap.has("price") ? Number(valueMap.get("price").replace("\u5143", "")) : null, id, type: this.getSupportType(), title, desc, url, genre: [], binding: valueMap.has("binding") ? valueMap.get("binding") : "", producer: valueMap.has("producer") ? valueMap.get("producer") : "", popularComments: Array.from(new Set(html3("#hot-comments .comment-item .short, #comments .comment-item .short, .comment-item .short").get().map((element) => DoubanPageParser.normalizeText(html3(element).text())).filter(Boolean))).slice(0, 5) }; return result; } getComment(html3) { return DoubanPageParser.parseUserComment(html3, this.doubanPlugin.settingsManager.getSelector(this.getSupportType(), PropertyName.comment)); } }; var BookKeyValueMap = new Map([ ["\u4F5C\u8005", "author"], ["\u51FA\u7248\u793E:", "publisher"], ["\u539F\u4F5C\u540D:", "originalTitle"], ["\u51FA\u7248\u5E74:", "datePublished"], ["\u9875\u6570:", "totalPage"], ["\u5B9A\u4EF7:", "price"], ["\u88C5\u5E27:", "binding"], ["\u4E1B\u4E66:", "series"], ["ISBN:", "isbn"], ["\u8BD1\u8005", "translator"], ["\u526F\u6807\u9898:", "subTitle"], ["\u51FA\u54C1\u65B9:", "producer"] ]); // src/org/wanxp/utils/SchemaOrg.ts var SchemaOrg = class { static getPersonName(p) { if (isString(p)) { return p; } else { let name = getProperty(p, "name"); return name + ""; } } }; function isString(s) { return typeof s === "string"; } function getProperty(o, name) { return o[name]; } // src/org/wanxp/douban/data/handler/DoubanMovieLoadHandler.ts var import_obsidian11 = __toModule(require("obsidian")); var DoubanMovieLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.movie; } getHighQuantityImageUrl(fileName) { return `https://img9.doubanio.com/view/photo/l/public/${fileName}`; } getSubjectUrl(id) { return `https://movie.douban.com/subject/${id}/`; } parseVariable(beforeContent, variableMap, extract3, context) { variableMap.set("director", new DataField("director", DataValueType.array, extract3.director, (extract3.director || []).map(SchemaOrg.getPersonName).filter((c) => c))); variableMap.set("actor", new DataField("actor", DataValueType.array, extract3.actor, (extract3.actor || []).map(SchemaOrg.getPersonName).filter((c) => c))); variableMap.set("author", new DataField("author", DataValueType.array, extract3.author, (extract3.author || []).map(SchemaOrg.getPersonName).map((name) => super.getPersonName(name, context)).filter((c) => c))); variableMap.set("aliases", new DataField("aliases", DataValueType.array, extract3.aliases, (extract3.aliases || []).map((a) => a.trim().replace(/:\s+/g, ":")))); } support(extract3) { return extract3 && extract3.type && (extract3.type.contains("\u7535\u5F71") || extract3.type.contains("Movie") || extract3.type.contains("movie")); } analysisUser(html3, context) { let rate = html3("input#n_rating").val(); let tags = DoubanPageParser.parseUserTags(html3); let stateWord = html3("div#interest_sect_level > div.a_stars > span.mr10").text().trim(); let collectionDateStr = html3("div#interest_sect_level > div.a_stars > span.mr10 > span.collection_date").text().trim(); let userState1 = DoubanAbstractLoadHandler.getUserState(stateWord); let component = this.getComment(html3, context); const userState = { tags, rate: rate ? Number(rate) : null, state: userState1, collectionDate: collectionDateStr ? (0, import_obsidian11.moment)(collectionDateStr, "YYYY-MM-DD").toDate() : null, comment: component }; return { data: html3, userState }; } getComment(html3, context) { return DoubanPageParser.parseUserComment(html3, this.doubanPlugin.settingsManager.getSelector(this.getSupportType(), PropertyName.comment)); } parseSubjectFromHtml(html3, context) { let movie = html3("script").get().filter((scd) => html3(scd).attr("type") == "application/ld+json").map((i) => { var _a5, _b; let item = html3(i).text(); item = super.html_decode(item); const obj = JSON.parse(item.replace(/[\r\n\t]+/g, "")); const idPattern = /(\d){5,10}/g; const id = idPattern.exec(obj.url); const name = obj.name; const title = (_a5 = super.getTitleNameByMode(name, PersonNameMode.CH_NAME, context)) != null ? _a5 : name; const originalTitle = (_b = super.getTitleNameByMode(name, PersonNameMode.EN_NAME, context)) != null ? _b : name; const result = { id: id ? id[0] : "", title, type: obj["@type"] === "TVSeries" ? SupportType.teleplay : this.getSupportType(), score: obj.aggregateRating ? obj.aggregateRating.ratingValue : void 0, originalTitle, desc: obj.description, url: "https://movie.douban.com" + obj.url, director: obj.director || [], author: obj.author || [], actor: obj.actor || [], aggregateRating: obj.aggregateRating, datePublished: obj.datePublished ? new Date(obj.datePublished) : void 0, image: obj.image, imageUrl: obj.image, genre: obj.genre || [], publisher: "", aliases: [""], language: [""], country: [], time: null, IMDb: null }; return result; })[0]; if (!movie) { const title = html3(html3("head > meta[property='og:title']").get(0)).attr("content") || ""; const image = html3(html3("head > meta[property='og:image']").get(0)).attr("content") || ""; const urlMeta = html3(html3("head > meta[property='og:url']").get(0)).attr("content") || ""; const desc2 = html3(html3("head > meta[property='og:description']").get(0)).attr("content") || ""; const idPattern = /(\d){5,10}/g; const idMatch = idPattern.exec(urlMeta); const id = idMatch ? idMatch[0] : ""; const scoreText = html3("#interest_sectl strong[property='v:average']").text(); const score = scoreText ? parseFloat(scoreText) : void 0; const isTeleplay = html3("#info span.pl").get().some((element) => /集数|单集片长/.test(html3(element).text())); movie = { id, title, type: isTeleplay ? SupportType.teleplay : this.getSupportType(), score, originalTitle: title, desc: desc2, url: urlMeta || (id ? `https://movie.douban.com/subject/${id}/` : ""), director: [], author: [], actor: [], aggregateRating: void 0, datePublished: void 0, image, imageUrl: image, genre: [], publisher: "", aliases: [], language: [], country: [], time: null, IMDb: null }; } this.handlePersonNameByMeta(html3, movie, context, "video:actor", "actor"); this.handlePersonNameByMeta(html3, movie, context, "video:director", "director"); const desc = DoubanPageParser.extractText(html3, [ "[id^='link-report'] > span.all.hidden", "#link-report .all.hidden p", "#link-report span.all.hidden", "span[property='v:summary']" ]); if (desc) { movie.desc = desc; } const detailDom = html3(html3("#info").get(0)); const publish = detailDom.find("span.pl"); const valueMap = new Map(); publish.map((index2, info) => { const key = html3(info).text().trim(); let value; if (key.indexOf("\u53C8\u540D") >= 0 || key.indexOf("\u8BED\u8A00") >= 0 || key.indexOf("\u5236\u7247\u56FD\u5BB6") >= 0) { const vas = html3(info.next).text().trim(); value = vas.split("/").map((v) => v.trim()); } else if (key.indexOf("\u7247\u957F") >= 0) { value = html3(info.next.next).text().trim(); } else { value = html3(info.next).text().trim(); } valueMap.set(MovieKeyValueMap.get(key), value); }); movie.country = valueMap.has("country") ? valueMap.get("country") : []; movie.language = valueMap.has("language") ? valueMap.get("language") : []; movie.time = valueMap.has("time") ? valueMap.get("time") : ""; if (movie.type === SupportType.teleplay) { movie.episode = valueMap.has("episode") ? valueMap.get("episode") : ""; } movie.aliases = valueMap.has("aliases") ? valueMap.get("aliases") : []; movie.IMDb = valueMap.has("IMDb") ? valueMap.get("IMDb") : ""; return movie; } }; var MovieKeyValueMap = new Map([ ["\u5236\u7247\u56FD\u5BB6/\u5730\u533A:", "country"], ["\u8BED\u8A00:", "language"], ["\u7247\u957F:", "time"], ["\u96C6\u6570:", "episode"], ["\u5355\u96C6\u7247\u957F:", "time"], ["\u53C8\u540D:", "aliases"], ["IMDb:", "IMDb"] ]); // src/org/wanxp/douban/data/handler/DoubanMusicLoadHandler.ts var import_obsidian12 = __toModule(require("obsidian")); var DoubanMusicLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.music; } getHighQuantityImageUrl(fileName) { return `https://img1.doubanio.com/view/subject/m/public/${fileName}`; } getSubjectUrl(id) { return `https://music.douban.com/subject/${id}/`; } parseVariable(beforeContent, variableMap, extract3, context) { } support(extract3) { return extract3 && extract3.type && (extract3.type.contains("\u97F3\u4E50") || extract3.type.contains("Music") || extract3.type.contains("music")); } analysisUser(html3, context) { const rate = html3("input#n_rating").val(); const tags = DoubanPageParser.parseUserTags(html3); const stateWord = html3("div#interest_sect_level > div.a_stars > span.mr10").text().trim(); const collectionDateStr = html3("div#interest_sect_level > div.a_stars > span.mr10").next().text().trim(); const userState1 = DoubanAbstractLoadHandler.getUserState(stateWord); const component = DoubanPageParser.parseUserComment(html3); const userState = { tags, rate: rate ? Number(rate) : null, state: userState1, collectionDate: collectionDateStr ? (0, import_obsidian12.moment)(collectionDateStr, "YYYY-MM-DD").toDate() : null, comment: component }; return { data: html3, userState }; } parseSubjectFromHtml(html3, context) { const title = html3(html3("head > meta[property= 'og:title']").get(0)).attr("content"); let desc = DoubanPageParser.extractText(html3, [ "#link-report span.all.hidden p", "#link-report span.all.hidden", "span[property='v:summary']" ]); if (!desc) { desc = DoubanPageParser.normalizeText(html3("head > meta[property='og:description']").attr("content")); } const url = html3(html3("head > meta[property= 'og:url']").get(0)).attr("content"); const image = html3(html3("head > meta[property= 'og:image']").get(0)).attr("content"); const score = html3(html3("#interest_sectl > div > div.rating_self.clearfix > strong[property= 'v:average']").get(0)).text(); const detailDom = html3(html3("#info").get(0)); const publish = detailDom.find("span.pl"); const valueMap = new Map(); publish.map((index2, info) => { let key = html3(info).text().trim(); let value = ""; if (key.indexOf("\u8868\u6F14\u8005") >= 0) { const vas = key.split("\n \n "); value = vas && vas.length > 1 ? vas[1] : ""; key = vas && vas.length > 0 ? vas[0] : ""; } else { value = html3(info.next).text().trim(); } valueMap.set(MusicKeyValueMap.get(key), value); }); const idPattern = /(\d){5,10}/g; const id = idPattern.exec(url); const trackItems = html3(".track-list .track-items li"); const tracks = Array.from(trackItems).map((item) => html3(item).text().trim()); const result = { image, imageUrl: image, datePublished: valueMap.has("datePublished") ? new Date(valueMap.get("datePublished")) : void 0, publisher: valueMap.has("publisher") ? valueMap.get("publisher") : "", score: Number(score), records: valueMap.has("records") ? Number(valueMap.get("records")) : null, id: id ? id[0] : "", type: this.getSupportType(), title, desc, url, actor: [valueMap.has("actor") ? valueMap.get("actor") : null], genre: valueMap.has("genre") ? [valueMap.get("genre")] : [""], albumType: valueMap.has("albumType") ? valueMap.get("albumType") : "", medium: valueMap.has("medium") ? valueMap.get("medium") : "", barcode: valueMap.has("barcode") ? valueMap.get("barcode") : "", menu: tracks }; return result; } }; var MusicKeyValueMap = new Map([ ["\u8868\u6F14\u8005:", "actor"], ["\u6D41\u6D3E:", "genre"], ["\u53D1\u884C\u65F6\u95F4:", "datePublished"], ["\u4E13\u8F91\u7C7B\u578B:", "albumType"], ["\u4ECB\u8D28:", "medium"], ["\u51FA\u7248\u8005:", "publisher"], ["\u5531\u7247\u6570:", "records"], ["\u6761\u5F62\u7801:", "barcode"] ]); // src/org/wanxp/douban/data/handler/DoubanNoteLoadHandler.ts var import_html2markdown = __toModule(require_dist2()); var DoubanNoteLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.note; } getHighQuantityImageUrl(fileName) { return ``; } getSubjectUrl(id) { return `https://www.douban.com/note/${id}/`; } parseVariable(beforeContent, variableMap, extract3, context) { } support(extract3) { return extract3 && extract3.type && (extract3.type.contains("\u65E5\u8BB0") || extract3.type.contains("Note") || extract3.type.contains("Article") || extract3.type.contains("note") || extract3.type.contains("article")); } analysisUser(html3, context) { return { data: html3, userState: null }; } parseSubjectFromHtml(html3, context) { const title = html3(html3("head > meta[property= 'og:title']").get(0)).attr("content"); const desc = html3(html3("head > meta[property= 'og:description']").get(0)).attr("content"); const url = html3(html3("head > meta[property= 'og:url']").get(0)).attr("content"); const image = html3(html3("head > meta[property= 'og:image']").get(0)).attr("content"); const type = html3(html3("head > meta[property= 'og:type']").get(0)).attr("content"); const authorA = html3(html3("a.note-author").get(0)); const timePublished = html3(html3(".pub-date").get(0)).text(); const content = html3(html3(".note").get(1)); const idPattern = /(\d){5,10}/g; const id = idPattern.exec(url); const result = { image, imageUrl: image, datePublished: timePublished ? new Date(timePublished) : void 0, content: content ? (0, import_html2markdown.default)(content.toString()) : "", id: id ? id[0] : "", type: this.getSupportType(), title, desc, url, author: authorA ? authorA.text() : null, authorUrl: authorA ? authorA.attr("href") : null, score: 0, publisher: "", genre: [] }; return result; } }; // src/org/wanxp/douban/data/handler/DoubanOtherLoadHandler.ts var DoubanOtherLoadHandler = class extends DoubanAbstractLoadHandler { getSupportType() { return SupportType.all; } parseVariable(beforeContent, variableMap, extract3, context) { log.warn(i18nHelper.getMessage("140101")); } support(extract3) { return false; } getHighQuantityImageUrl(fileName) { return `https://img9.doubanio.com/view/photo/l/public/${fileName}`; } getSubjectUrl(id) { return `https://book.douban.com/subject/${id}/`; } parseSubjectFromHtml(data2, context) { log.notice(i18nHelper.getMessage("140101")); return void 0; } analysisUser(html3, context) { log.notice(i18nHelper.getMessage("140101")); return { data: void 0, userState: void 0 }; } }; // src/org/wanxp/douban/data/handler/DoubanTeleplayLoadHandler.ts var import_obsidian13 = __toModule(require("obsidian")); var DoubanTeleplayLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.teleplay; } parseVariable(beforeContent, variableMap, extract3, context) { variableMap.set("director", new DataField("director", DataValueType.array, extract3.director, (extract3.director || []).map(SchemaOrg.getPersonName).filter((c) => c))); variableMap.set("actor", new DataField("actor", DataValueType.array, extract3.actor, (extract3.actor || []).map(SchemaOrg.getPersonName).filter((c) => c))); variableMap.set("author", new DataField("author", DataValueType.array, extract3.author, (extract3.author || []).map(SchemaOrg.getPersonName).map((name) => super.getPersonName(name, context)).filter((c) => c))); variableMap.set("aliases", new DataField("aliases", DataValueType.array, extract3.aliases, (extract3.aliases || []).map((a) => a.trim().replace(/:\s+/g, ":")))); } support(extract3) { return extract3 && extract3.type && (extract3.type.contains("\u7535\u89C6\u5267") || extract3.type.contains("Teleplay") || extract3.type.contains("teleplay")); } getHighQuantityImageUrl(fileName) { return `https://img9.doubanio.com/view/photo/l/public/${fileName}`; } getSubjectUrl(id) { return `https://movie.douban.com/subject/${id}/`; } analysisUser(html3, context) { const rate = html3("input#n_rating").val(); const tags = DoubanPageParser.parseUserTags(html3); const stateWord = html3("div#interest_sect_level > div.a_stars > span.mr10").text().trim(); const collectionDateStr = html3("div#interest_sect_level > div.a_stars > span.mr10 > span.collection_date").text().trim(); const userState1 = DoubanAbstractLoadHandler.getUserState(stateWord); const component = DoubanPageParser.parseUserComment(html3); const userState = { tags, rate: rate ? Number(rate) : null, state: userState1, collectionDate: collectionDateStr ? (0, import_obsidian13.moment)(collectionDateStr, "YYYY-MM-DD").toDate() : null, comment: component }; return { data: html3, userState }; } parseSubjectFromHtml(html3, context) { let teleplay = html3("script").get().filter((scd) => html3(scd).attr("type") == "application/ld+json").map((i) => { var _a5, _b; let item = html3(i).text(); item = super.html_decode(item); const obj = JSON.parse(item.replace(/[\r\n\t]+/g, "")); const idPattern = /(\d){5,10}/g; const id = idPattern.exec(obj.url); const name = obj.name; const title = (_a5 = super.getTitleNameByMode(name, PersonNameMode.CH_NAME, context)) != null ? _a5 : name; const originalTitle = (_b = super.getTitleNameByMode(name, PersonNameMode.EN_NAME, context)) != null ? _b : name; const result = { id: id ? id[0] : "", type: this.getSupportType(), title, originalTitle, desc: obj.description, url: "https://movie.douban.com" + obj.url, director: obj.director || [], author: obj.author || [], actor: obj.actor || [], aggregateRating: obj.aggregateRating, datePublished: obj.datePublished ? new Date(obj.datePublished) : void 0, image: obj.image, imageUrl: obj.image, genre: obj.genre || [], score: obj.aggregateRating ? obj.aggregateRating.ratingValue : void 0, publisher: "", aliases: [""], language: [""], country: [], episode: null, time: null, IMDb: null }; return result; })[0]; if (!teleplay) { const title = html3(html3("head > meta[property='og:title']").get(0)).attr("content") || ""; const image = html3(html3("head > meta[property='og:image']").get(0)).attr("content") || ""; const urlMeta = html3(html3("head > meta[property='og:url']").get(0)).attr("content") || ""; const desc2 = html3(html3("head > meta[property='og:description']").get(0)).attr("content") || ""; const idPattern = /(\d){5,10}/g; const idMatch = idPattern.exec(urlMeta); const id = idMatch ? idMatch[0] : ""; const scoreText = html3("#interest_sectl strong[property='v:average']").text(); const score = scoreText ? parseFloat(scoreText) : void 0; teleplay = { id, title, type: this.getSupportType(), score, originalTitle: title, desc: desc2, url: urlMeta || (id ? `https://movie.douban.com/subject/${id}/` : ""), director: [], author: [], actor: [], aggregateRating: void 0, datePublished: void 0, image, imageUrl: image, genre: [], publisher: "", aliases: [], language: [], country: [], episode: null, time: null, IMDb: null }; } this.handlePersonNameByMeta(html3, teleplay, context, "video:actor", "actor"); this.handlePersonNameByMeta(html3, teleplay, context, "video:director", "director"); const desc = DoubanPageParser.extractText(html3, [ "[id^='link-report'] > span.all.hidden", "#link-report .all.hidden p", "#link-report span.all.hidden", "span[property='v:summary']" ]); if (desc) { teleplay.desc = desc; } const detailDom = html3(html3("#info").get(0)); const publish = detailDom.find("span.pl"); const valueMap = new Map(); publish.map((index2, info) => { const key = html3(info).text().trim(); let value; if (key.indexOf("\u53C8\u540D") >= 0 || key.indexOf("\u8BED\u8A00") >= 0 || key.indexOf("\u5236\u7247\u56FD\u5BB6") >= 0) { const vas = html3(info.next).text().trim(); value = vas.split("/").map((v) => v.trim()); } else { value = html3(info.next).text().trim(); } valueMap.set(TeleplayKeyValueMap.get(key), value); }); teleplay.country = valueMap.has("country") ? valueMap.get("country") : []; teleplay.language = valueMap.has("language") ? valueMap.get("language") : []; teleplay.episode = valueMap.has("episode") ? valueMap.get("episode") : ""; teleplay.time = valueMap.has("time") ? valueMap.get("time") : ""; teleplay.aliases = valueMap.has("aliases") ? valueMap.get("aliases") : []; teleplay.IMDb = valueMap.has("IMDb") ? valueMap.get("IMDb") : ""; return teleplay; } }; var TeleplayKeyValueMap = new Map([ ["\u5236\u7247\u56FD\u5BB6/\u5730\u533A:", "country"], ["\u8BED\u8A00:", "language"], ["\u96C6\u6570:", "episode"], ["\u5355\u96C6\u7247\u957F:", "time"], ["\u53C8\u540D:", "aliases"], ["IMDb:", "IMDb"] ]); // src/org/wanxp/douban/data/handler/DoubanGameLoadHandler.ts var import_obsidian14 = __toModule(require("obsidian")); var DoubanGameLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.game; } getHighQuantityImageUrl(fileName) { return `https://img9.doubanio.com/lpic/${fileName}`; } getSubjectUrl(id) { return `https://www.douban.com/game/${id}/`; } parseVariable(beforeContent, variableMap, extract3, context) { variableMap.set("aliases", new DataField("aliases", DataValueType.array, extract3.aliases, (extract3.aliases || []).map((a) => a.trim().replace(/:\s+/g, ":")))); } support(extract3) { return extract3 && extract3.type && (extract3.type.contains("\u6E38\u620F") || extract3.type.contains("Game") || extract3.type.contains("game")); } analysisUser(html3, context) { let rate = html3("input#n_rating").val(); const tags = DoubanPageParser.parseUserTags(html3); const collected = html3("div.collection-section > div.collection-rating-stars > div.collection-collected"); const stateWord = collected.find("span.collection-result").text().trim(); const collectionDateStr = collected.find("span.color_gray").text().trim(); const userState1 = DoubanAbstractLoadHandler.getUserState(stateWord); const component = DoubanPageParser.parseUserComment(html3); const userState = { tags, rate: rate ? Number(rate) : null, state: userState1, collectionDate: collectionDateStr ? (0, import_obsidian14.moment)(collectionDateStr, "YYYY-MM-DD").toDate() : null, comment: component }; return { data: html3, userState }; } parseSubjectFromHtml(html3, context) { let title = html3(html3("#content > h1").get(0)).text(); title = this.getPersonNameByMode(title, PersonNameMode.CH_NAME); let idContent = html3(html3("head > meta[name= 'mobile-agent']").get(0)).attr("content"); let idPattern = /(\d){5,10}/g; let idP = idPattern.exec(idContent); let id = idP ? idP[0] : ""; let score = html3(html3("#interest_sectl > div > div.rating_self.clearfix > strong[property= 'v:average']").get(0)).text(); let detailDom = html3(html3("dl.thing-attr").get(0)); let dt = detailDom.find("dt"); let image = html3(html3("#content > div > div.article > div.mod.item-subject > div.item-subject-info > div > a > img").get(0)).attr("src"); let desc = DoubanPageParser.extractText(html3, [ "#link-report .all.hidden p", "#link-report p" ]); let url = `https://www.douban.com/game/${id}/`; let valueMap = new Map(); let value; dt.map((index2, info) => { let key = html3(info).text().trim(); if (key.indexOf("\u5E73\u53F0") >= 0 || key.indexOf("\u7C7B\u578B") >= 0) { value = []; html3(info.next.next).find("a").map((index3, a) => { value.push(html3(a).text().trim()); }); } else if (key.indexOf("\u522B\u540D") >= 0) { let cc = html3(info.next.next).text().trim(); value = cc.split("/"); } else { value = html3(info.next.next).text().trim(); } valueMap.set(GameKeyValueMap.get(key), value); }); const result = { id, type: this.getSupportType(), title, desc, url, genre: valueMap.has("genre") ? valueMap.get("genre") : [], image, imageUrl: image, datePublished: valueMap.has("datePublished") ? new Date(valueMap.get("datePublished")) : void 0, publisher: valueMap.has("publisher") ? valueMap.get("publisher") : "", score: Number(score), aliases: valueMap.has("aliases") ? valueMap.get("aliases") : [], developer: valueMap.has("developer") ? valueMap.get("developer") : "", platform: valueMap.has("platform") ? valueMap.get("platform") : [] }; return result; } }; var GameKeyValueMap = new Map([ ["\u7C7B\u578B:", "genre"], ["\u5E73\u53F0:", "platform"], ["\u522B\u540D:", "aliases"], ["\u5F00\u53D1\u5546:", "developer"], ["\u53D1\u884C\u5546:", "publisher"], ["\u53D1\u884C\u65E5\u671F:", "datePublished"] ]); // src/org/wanxp/douban/data/handler/DoubanTheaterLoadHandler.ts var import_obsidian15 = __toModule(require("obsidian")); var DoubanTheaterLoadHandler = class extends DoubanAbstractLoadHandler { constructor(doubanPlugin) { super(doubanPlugin); } getSupportType() { return SupportType.theater; } getHighQuantityImageUrl(fileName) { return `https://img9.doubanio.com/pview/drama_subject_poster/large/public/${fileName}`; } getSubjectUrl(id) { return `https://www.douban.com/location/drama/${id}/`; } parseVariable(beforeContent, variableMap, extract3, context) { variableMap.set("director", new DataField("director", DataValueType.array, extract3.director, (extract3.director || []).map(SchemaOrg.getPersonName).filter((c) => c))); variableMap.set("actor", new DataField("actor", DataValueType.array, extract3.actor, (extract3.actor || []).map(SchemaOrg.getPersonName).filter((c) => c))); variableMap.set("author", new DataField("author", DataValueType.array, extract3.author, (extract3.author || []).map(SchemaOrg.getPersonName).map((name) => super.getPersonName(name, context)).filter((c) => c))); variableMap.set("aliases", new DataField("aliases", DataValueType.array, extract3.aliases, (extract3.aliases || []).map((a) => a.trim().replace(TITLE_ALIASES_SPECIAL_CHAR_REG_G, "_").replace(/_+/g, "_").replace(/^_/, "").replace(/_$/, "")))); } support(extract3) { var _a5; return !!extract3 && (((_a5 = extract3.url) == null ? void 0 : _a5.indexOf("/location/drama/")) >= 0 || extract3.type === SupportType.theater || /舞台剧|音乐剧|话剧|舞剧|歌剧|戏曲|脱口秀|Theater/i.test(extract3.type || "")); } analysisUser(html3, context) { const rate = html3("input#n_rating").val(); const tags = DoubanPageParser.parseUserTags(html3); const stateWord = html3("#interest_sect_level .mr10").first().text().trim() || html3("#interest_sect_level > h2").text().trim(); const collectionDateStr = html3("div#interest_sect_level > div.a_stars > span.mr10 > span.collection_date").text().trim(); const userState1 = DoubanAbstractLoadHandler.getUserState(stateWord); const component = DoubanPageParser.parseUserComment(html3); const userState = { tags, rate: rate ? Number(rate) : null, state: userState1, collectionDate: collectionDateStr ? (0, import_obsidian15.moment)(collectionDateStr, "YYYY-MM-DD").toDate() : null, comment: component }; return { data: html3, userState }; } parseSubjectFromHtml(html3, context) { var _a5, _b; const pageId = html3("[data-object_id]").first().attr("data-object_id") || html3("[share-id]").first().attr("share-id") || html3("script").get().map((element) => { var _a6; return (_a6 = html3(element).text().match(/_subject_\s*=\s*\{[^}]*\bid\s*:\s*["'](\d+)["']/)) == null ? void 0 : _a6[1]; }).find(Boolean) || ""; const url = html3("link[rel='canonical']").attr("href") || html3("meta[property='og:url']").attr("content") || html3("[data-url*='/location/drama/']").first().attr("data-url") || ""; const values = new Map(); html3(".drama-info .meta dl dt").each((_index, labelElement) => { const label = DoubanPageParser.normalizeText(html3(labelElement).text()).replace(/[::]$/, ""); const valueElement = html3(labelElement).next("dd"); const linkedValues = valueElement.find("[itemprop='name'], a").get().map((element) => DoubanPageParser.normalizeText(html3(element).text())).filter(Boolean); const rawValue = DoubanPageParser.normalizeText(valueElement.text()); values.set(label, linkedValues.length > 0 ? Array.from(new Set(linkedValues)) : rawValue.split(/\s*\/\s*/).filter(Boolean)); }); const title = DoubanPageParser.normalizeText(html3(".drama-info [itemprop='name']").first().text() || html3(".drama-info h1").text()); const image = html3(".drama-info [itemprop='image']").attr("src") || ""; const dateText = (values.get("\u6F14\u51FA\u65E5\u671F") || [])[0] || ""; const dateMatch = dateText.match(/\d{4}-\d{1,2}-\d{1,2}/); return { id: StringUtil.analyzeIdByUrl(url) || pageId || StringUtil.analyzeIdByUrl(((_a5 = context.listItem) == null ? void 0 : _a5.url) || ""), title, type: this.getSupportType(), score: Number(html3(".drama-info [itemprop='ratingValue']").first().text()) || null, image, imageUrl: image, url: url || (((_b = context.listItem) == null ? void 0 : _b.url) || ""), desc: DoubanPageParser.extractText(html3, [".article .mod .pure-text", ".pure-text"]), publisher: (values.get("\u6F14\u51FA\u56E2\u4F53") || []).join(" / "), datePublished: dateMatch ? new Date(dateMatch[0]) : void 0, genre: values.get("\u7C7B\u578B") || [], director: values.get("\u5BFC\u6F14") || [], author: values.get("\u7F16\u5267") || [], actor: values.get("\u4E3B\u6F14") || [], aggregateRating: void 0, originalTitle: (values.get("\u539F\u540D") || [])[0] || "", aliases: values.get("\u53C8\u540D") || [], language: values.get("\u8BED\u8A00") || [] }; } }; // src/org/wanxp/douban/data/handler/DoubanSearchChooseItemHandler.ts var DoubanSearchChooseItemHandler = class { constructor(app, doubanPlugin) { this._app = app; this._doubanPlugin = doubanPlugin; this._doubanSubjectHandlerDefault = new DoubanOtherLoadHandler(doubanPlugin); this._doubanSubjectHandlers = [ new DoubanTheaterLoadHandler(doubanPlugin), new DoubanMovieLoadHandler(doubanPlugin), new DoubanBookLoadHandler(doubanPlugin), new DoubanTeleplayLoadHandler(doubanPlugin), new DoubanMusicLoadHandler(doubanPlugin), new DoubanNoteLoadHandler(doubanPlugin), new DoubanGameLoadHandler(doubanPlugin), this._doubanSubjectHandlerDefault ]; } handle(searchExtract, context) { return __async(this, null, function* () { if (!searchExtract) { return; } let doubanSubjectHandlers = this._doubanSubjectHandlers.filter((h) => h.support(searchExtract)); if (doubanSubjectHandlers && doubanSubjectHandlers.length > 0) { return yield doubanSubjectHandlers[0].handle(searchExtract.id, context); } else { return yield this._doubanSubjectHandlerDefault.handle(searchExtract.id, context); } }); } parseText(extract3, context) { return __async(this, null, function* () { const doubanSubjectHandlers = this._doubanSubjectHandlers.filter((h) => h.support(extract3)); if (doubanSubjectHandlers && doubanSubjectHandlers.length > 0) { const result = yield doubanSubjectHandlers.map((h) => h.parse(extract3, context)); if (result && result.length > 0) { return result[0]; } else { return { content: "" }; } } else { return this._doubanSubjectHandlerDefault.parse(extract3, context); } }); } }; // src/org/wanxp/douban/data/search/DoubanSearchModal.ts var import_obsidian16 = __toModule(require("obsidian")); var DoubanSearchModal = class extends import_obsidian16.Modal { constructor(app, plugin, context, type) { super(app); this.searchType = SupportType.all; this.submitted = false; this.plugin = plugin; this.context = context; this.searchType = type != null ? type : SupportType.all; } onOpen() { let { contentEl } = this; contentEl.createEl("h3", { text: i18nHelper.getMessage("110003") }); const content = contentEl.createDiv("content"); content.addClass("obsidian_douban_search_fields"); const inputs = content.createDiv("inputs"); const searchInput = new import_obsidian16.TextComponent(inputs).onChange((searchTerm) => { this.searchTerm = searchTerm; }); inputs.addClass("obsidian_douban_search_input_content"); searchInput.inputEl.size = 40; searchInput.inputEl.addEventListener("keydown", (event) => { if (event.key === "Enter") { event.preventDefault(); event.stopImmediatePropagation(); this.submitted = true; this.close(); } }); inputs.addClass("obsidian_douban_search_input"); const typeSelect = content.createDiv("type-select"); const typeSelectInput = new import_obsidian16.DropdownComponent(typeSelect).addOptions(SearchTypeRecords).setValue(this.searchType).onChange((value) => { this.searchType = value; }); typeSelect.addClass("obsidian_douban_search_input_type"); const controls = contentEl.createDiv("controls"); controls.addClass("obsidian_douban_search_controls"); new import_obsidian16.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110004")).setCta().onClick(() => { this.submitted = true; this.close(); }).setClass("obsidian_douban_search_button"); new import_obsidian16.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110005")).onClick(() => { this.close(); }).setClass("obsidian_douban_cancel_button"); } onClose() { return __async(this, null, function* () { let { contentEl } = this; contentEl.empty(); if (this.submitted && this.searchTerm) { yield this.plugin.search(this.searchTerm, this.searchType, this.context); } }); } }; // src/org/wanxp/douban/setting/DoubanSettingTab.ts var import_obsidian31 = __toModule(require("obsidian")); // src/org/wanxp/douban/setting/OutputSettingsHelper.ts var import_obsidian21 = __toModule(require("obsidian")); // src/org/wanxp/douban/setting/TemplateSettingHelper.ts var import_obsidian20 = __toModule(require("obsidian")); // src/org/wanxp/douban/setting/model/FileTreeSelectSuggest.ts var import_obsidian18 = __toModule(require("obsidian")); // src/org/wanxp/douban/setting/model/TextInputSuggest.ts var import_obsidian17 = __toModule(require("obsidian")); var TextInputSuggest = class extends import_obsidian17.AbstractInputSuggest { constructor(app, inputEl) { super(app, inputEl); this.inputEl = inputEl; } }; // src/org/wanxp/douban/setting/model/FileTreeSelectSuggest.ts var FileTreeSelectSuggest = class extends TextInputSuggest { constructor(app, inputEl, manager, settingKey) { super(app, inputEl); this.parentPath = "/"; this.settingKey = ""; this.manager = manager; this.settingKey = settingKey; } getSuggestions(inputStr) { const files = []; if (inputStr.length == 0 || inputStr.trim().length == 0 || inputStr.trim() == "/") { this.searchFiles(this.app.vault.getRoot(), "", files); return files; } let parentSearchPath = null; let currentName = null; try { const testFile = this.app.vault.getAbstractFileByPath(inputStr.trim()); if (testFile) { if (testFile instanceof import_obsidian18.TFile && testFile.name.endsWith(".md")) { files.push(testFile); return files; } if (testFile instanceof import_obsidian18.TFolder) { parentSearchPath = inputStr.trim(); currentName = ""; } } } catch (e) { } if (parentSearchPath == null) { parentSearchPath = inputStr.lastIndexOf("/") > 0 ? inputStr.substring(0, inputStr.lastIndexOf("/")) : "/"; currentName = inputStr.lastIndexOf("/") > 0 ? inputStr.substring(inputStr.lastIndexOf("/") + 1) : inputStr; currentName = currentName.trim(); } if (currentName == null) { currentName = ""; } const root2 = parentSearchPath === "/" ? this.app.vault.getRoot() : this.app.vault.getAbstractFileByPath(parentSearchPath); if (!root2) { return []; } const name = currentName.toLowerCase(); if (root2) { this.searchFiles(root2, name, files); } return files; } searchFiles(folder, name, files) { folder.children.forEach((file) => { if (file.name.toLowerCase().contains(name)) { files.push(file); } }); } renderSuggestion(file, el) { el.setText(file.path); } selectSuggestion(file) { this.inputEl.value = file.path; this.parentPath = file.path; if (file instanceof import_obsidian18.TFolder) { this.inputEl.value += "/"; this.inputEl.trigger("input"); } else { this.manager.updateSetting(this.settingKey, file.path); this.close(); } } }; // src/org/wanxp/douban/setting/model/FolderTreeSelectSuggest.ts var import_obsidian19 = __toModule(require("obsidian")); var FolderTreeSelectSuggest = class extends TextInputSuggest { constructor() { super(...arguments); this.parentPath = "/"; } getSuggestions(inputStr) { const files = []; if (inputStr.length == 0 || inputStr.trim().length == 0 || inputStr.trim() == "/") { this.searchFiles(this.app.vault.getRoot(), "", files); return files; } let parentSearchPath = null; let currentName = null; try { const testFile = this.app.vault.getAbstractFileByPath(inputStr.trim()); if (testFile) { if (testFile instanceof import_obsidian19.TFile) { return files; } if (testFile instanceof import_obsidian19.TFolder) { parentSearchPath = inputStr.trim(); currentName = ""; } } } catch (e) { } if (parentSearchPath == null) { parentSearchPath = inputStr.lastIndexOf("/") > 0 ? inputStr.substring(0, inputStr.lastIndexOf("/")) : "/"; currentName = inputStr.lastIndexOf("/") > 0 ? inputStr.substring(inputStr.lastIndexOf("/") + 1) : inputStr; currentName = currentName.trim(); } if (currentName == null) { currentName = ""; } const root2 = parentSearchPath === "/" ? this.app.vault.getRoot() : this.app.vault.getAbstractFileByPath(parentSearchPath); if (!root2) { return []; } const name = currentName.toLowerCase(); if (root2) { this.searchFiles(root2, name, files); } return files; } searchFiles(folder, name, files) { folder.children.filter((f) => f instanceof import_obsidian19.TFolder).forEach((file) => { if (file.name.toLowerCase().contains(name)) { files.push(file); } }); } renderSuggestion(file, el) { el.setText(file.path); } selectSuggestion(file) { this.inputEl.value = file.path; this.parentPath = file.path; if (file instanceof import_obsidian19.TFolder) { this.inputEl.value += "/"; this.inputEl.trigger("input"); } else { this.close(); } } }; // src/org/wanxp/douban/setting/TemplateSettingHelper.ts function constructTemplateUI(containerEl, manager) { const overview = containerEl.createDiv("obsidian_douban_section_card obsidian_douban_section_overview"); overview.createEl("p", { text: i18nHelper.getMessage("1204") }); new import_obsidian20.Setting(overview).setClass("obsidian_douban_embedded_setting").setDesc(i18nHelper.getMessage("1205")); const templateList = containerEl.createDiv("obsidian_douban_card_list obsidian_douban_template_list"); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "120101", desc: "120102", placeholder: "121701", key: "movieTemplateFile", manager })); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "120201", desc: "120202", placeholder: "121701", key: "bookTemplateFile", manager })); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "120301", desc: "120302", placeholder: "121701", key: "musicTemplateFile", manager })); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "120401", desc: "120402", placeholder: "121701", key: "noteTemplateFile", manager })); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "121301", desc: "121302", placeholder: "121701", key: "gameTemplateFile", manager })); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "121801", desc: "121802", placeholder: "121701", key: "teleplayTemplateFile", manager })); new import_obsidian20.Setting(templateList).setClass("obsidian_douban_section_card").then(createFileSelectionSetting({ containerEl: templateList, name: "theaterTemplateName", desc: "theaterTemplateDesc", placeholder: "121701", key: "theaterTemplateFile", manager })); } function createFileSelectionSetting({ containerEl, name, desc, placeholder, key, manager }) { return (setting) => { setting.controlEl.addClass("obsidian_douban_template_file_select"); setting.setName(i18nHelper.getMessage(name)); setting.addSearch((search) => __async(this, null, function* () { const [oldValue, defaultVal] = manager.getSettingWithDefault(key); let v = defaultVal; if (oldValue) { v = oldValue; } const fileTreeSelectSuggest = new FileTreeSelectSuggest(manager.app, search.inputEl, manager, key); search.setValue(v); search.setPlaceholder(i18nHelper.getMessage(placeholder)); search.inputEl.addClass("obsidian_douban_template_file_select_input"); search.inputEl.style.width = "100%"; search.onChange((value) => __async(this, null, function* () { manager.updateSetting(key, value); })); })); setting.addExtraButton((button) => { button.setIcon("copy").setTooltip(i18nHelper.getMessage("121903")).onClick(() => __async(this, null, function* () { navigator.clipboard.writeText(getDefaultTemplateContent(key)); })); }); setting.addExtraButton((button) => { button.setIcon("document").setTooltip(i18nHelper.getMessage("121901")).onClick(() => __async(this, null, function* () { navigator.clipboard.writeText(getDefaultTemplateContent(key, false)); })); }); }; } function createFolderSelectionSetting({ name, desc, placeholder, key, manager }, filePathDisplayExample) { return (setting) => { setting.setName(i18nHelper.getMessage(name)); setting.setDesc(i18nHelper.getMessage(desc)); }; } function createFolderSelectionSettingInput({ name, desc, placeholder, key, manager }, filePathDisplayExample) { return (setting) => { setting.controlEl.addClass("obsidian_douban_template_file_select"); setting.addSearch((search) => __async(this, null, function* () { const [oldValue, defaultVal] = manager.getSettingWithDefault(key); let v = defaultVal; if (oldValue) { v = oldValue; } new FolderTreeSelectSuggest(manager.app, search.inputEl); search.inputEl.addClass("obsidian_douban_template_file_select_input"); search.inputEl.style.width = "100%"; search.setValue(v).setPlaceholder(i18nHelper.getMessage(placeholder)).onChange((value) => __async(this, null, function* () { manager.updateSetting(key, value); if (filePathDisplayExample) { showFileExample(filePathDisplayExample, manager); } })); })); }; } // src/org/wanxp/douban/setting/OutputSettingsHelper.ts function showStarExample(containerEl, manager) { containerEl.empty(); const document2 = new DocumentFragment(); document2.createDiv("score-show-title").innerHTML = `score: ${NumberUtil.getRateStar(EXAMPLE_RATE, EXAMPLE_RATE_MAX, { scoreSetting: manager.plugin.settings.scoreSetting })}`; new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("120603")).setDesc(document2); } function showFileExample(containerEl, manager) { containerEl.empty(); const document2 = new DocumentFragment(); document2.createDiv("file-path-example").innerHTML = `${i18nHelper.getMessage("121604")}\u300A\u7B80\u7231\u300B: ${VariableUtil.replaceSubject(EXAMPLE_SUBJECT_MAP, FileUtil.join(manager.plugin.settings.dataFilePath, manager.plugin.settings.dataFileNamePath + ".md"), SupportType.book, manager, "path")}`; new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("120603")).setDesc(document2); } function scoreSettingDisplay(containerEl, manager) { new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("1243")).setDesc(i18nHelper.getMessage("124310", EXAMPLE_RATE, EXAMPLE_RATE_MAX)); const scoreSettingsUI = containerEl.createDiv("score-settings"); const scoreShowUI = containerEl.createDiv("score-show"); const scoreSetting = manager.getSetting("scoreSetting"); scoreSettingsUI.createEl("span", { text: i18nHelper.getMessage("124120") }); const starFullUI = new import_obsidian21.TextComponent(scoreSettingsUI); starFullUI.setPlaceholder(DEFAULT_SETTINGS.scoreSetting.starFull).setValue(scoreSetting.starFull).onChange((value) => __async(this, null, function* () { scoreSetting.starFull = value; yield manager.plugin.saveSettings(); showStarExample(scoreShowUI, manager); })); const starFullEl = starFullUI.inputEl; starFullEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; starFullEl.addClass("obsidian_douban_settings_input"); scoreSettingsUI.appendChild(starFullEl).appendText(" "); scoreSettingsUI.createEl("span", { text: i18nHelper.getMessage("124121") }); const starEmptyUI = new import_obsidian21.TextComponent(scoreSettingsUI); starEmptyUI.setPlaceholder(DEFAULT_SETTINGS.scoreSetting.starEmpty).setValue(scoreSetting.starEmpty).onChange((value) => __async(this, null, function* () { scoreSetting.starEmpty = value; yield manager.plugin.saveSettings(); showStarExample(scoreShowUI, manager); })); const starEmptyEl = starEmptyUI.inputEl; starEmptyEl.addClass("obsidian_douban_settings_input"); starEmptyEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; scoreSettingsUI.appendChild(starEmptyEl).appendText(" "); scoreSettingsUI.createEl("span", { text: i18nHelper.getMessage("124311") }); const maxStarUI = new import_obsidian21.TextComponent(scoreSettingsUI); maxStarUI.setPlaceholder(i18nHelper.getMessage("124312") + DEFAULT_SETTINGS.scoreSetting.maxStar).setValue(scoreSetting.maxStar + "").onChange((value) => __async(this, null, function* () { if (!NumberUtil.isInt(value) && NumberUtil.value(value) > MAX_STAR_NUMBER && NumberUtil.value(value) < 1) { return; } scoreSetting.maxStar = NumberUtil.value(value); yield manager.plugin.saveSettings(); showStarExample(scoreShowUI, manager); })); const maxStarEl = maxStarUI.inputEl; maxStarEl.addClass("obsidian_douban_settings_input"); maxStarEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; scoreSettingsUI.appendChild(maxStarEl).appendText(" "); scoreSettingsUI.createEl("span", { text: i18nHelper.getMessage("124122") }); const displayEmptyStarUI = new import_obsidian21.ToggleComponent(scoreSettingsUI); displayEmptyStarUI.setValue(scoreSetting.displayStarEmpty).onChange((value) => __async(this, null, function* () { scoreSetting.displayStarEmpty = value; yield manager.plugin.saveSettings(); showStarExample(scoreShowUI, manager); })); const displayEmptyStarEl = displayEmptyStarUI.toggleEl; displayEmptyStarEl.addClass("obsidian_douban_settings_input"); scoreSettingsUI.appendChild(displayEmptyStarEl).appendText(" "); showStarExample(scoreShowUI, manager); } function constructOutUI(containerEl, manager) { const attachmentFileSetting = containerEl.createDiv({ cls: "settings-item-attachment" }); constructAttachmentFileSettingsUI(attachmentFileSetting, manager); const folder = new import_obsidian21.Setting(containerEl); const folderInput = new import_obsidian21.Setting(containerEl); const outFolder = containerEl.createDiv({ cls: "settings-item" }); const filePathDisplayExample = containerEl.createDiv("filePath-display-example"); folder.then(createFolderSelectionSetting({ containerEl, name: "121501", desc: "121502", placeholder: null, key: null, manager }, filePathDisplayExample)); folderInput.then(createFolderSelectionSettingInput({ containerEl, name: null, desc: null, placeholder: "121503", key: "dataFilePath", manager }, filePathDisplayExample)); constructOutputFileNameUI(outFolder, filePathDisplayExample, manager); new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("showAfterCreateName")).setDesc(i18nHelper.getMessage("showAfterCreateDesc")).addToggle((toggle) => toggle.setValue(manager.plugin.settings.showAfterCreate).onChange((value) => __async(this, null, function* () { manager.plugin.settings.showAfterCreate = value; yield manager.plugin.saveSettings(); }))); new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("121201")).then((setting) => { setting.addDropdown((dropdwon) => { setting.descEl.appendChild(createFragment((frag) => { frag.appendText(i18nHelper.getMessage("121202")); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("121203")); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("121204")); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("121205")); frag.createEl("br"); })); dropdwon.addOption(PersonNameMode.CH_NAME, PersonNameModeRecords.CH); dropdwon.addOption(PersonNameMode.EN_NAME, PersonNameModeRecords.EN); dropdwon.addOption(PersonNameMode.CH_EN_NAME, PersonNameModeRecords.CH_EN); dropdwon.setValue(manager.plugin.settings.personNameMode).onChange((value) => __async(this, null, function* () { manager.plugin.settings.personNameMode = value; yield manager.plugin.saveSettings(); })); }); }); scoreSettingDisplay(containerEl, manager); } function constructOutputFileNameUI(containerEl, filePathDisplayExample, manager) { containerEl.empty(); const dataFilePathSetting = new import_obsidian21.Setting(containerEl); dataFilePathSetting.setName(i18nHelper.getMessage("121601")).setDesc(i18nHelper.getMessage("121602")).addText((textField) => { textField.setPlaceholder(DEFAULT_SETTINGS.dataFileNamePath).setValue(manager.plugin.settings.dataFileNamePath).onChange((value) => __async(this, null, function* () { manager.plugin.settings.dataFileNamePath = value; yield manager.plugin.saveSettings(); showFileExample(filePathDisplayExample, manager); })); }); dataFilePathSetting.addExtraButton((button) => { button.setIcon("reset").setTooltip(i18nHelper.getMessage("121902")).onClick(() => __async(this, null, function* () { manager.plugin.settings.dataFileNamePath = DEFAULT_SETTINGS.dataFileNamePath; yield manager.plugin.saveSettings(); constructOutputFileNameUI(containerEl, filePathDisplayExample, manager); })); }); showFileExample(filePathDisplayExample, manager); } function constructAttachmentFileSettingsUI(containerEl, manager) { containerEl.empty(); new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("121430")).setDesc(i18nHelper.getMessage("121431")).addToggle((toggleComponent) => { toggleComponent.setValue(manager.plugin.settings.cacheImage).onChange((value) => __async(this, null, function* () { manager.plugin.settings.cacheImage = value; yield manager.plugin.saveSettings(); constructAttachmentFileSettingsUI(containerEl, manager); })); }); if (manager.plugin.settings.cacheImage) { new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("121440")).setDesc(i18nHelper.getMessage("121441")).addToggle((toggleComponent) => { toggleComponent.setValue(manager.plugin.settings.pictureBedFlag).onChange((value) => __async(this, null, function* () { manager.plugin.settings.pictureBedFlag = value; yield manager.plugin.saveSettings(); constructAttachmentFileSettingsUI(containerEl, manager); })); }); if (manager.plugin.settings.pictureBedFlag) { constructAttachmentFilePictureBedSettingsUI(containerEl, manager); } else { new import_obsidian21.Setting(containerEl).then(createFolderSelectionSetting({ containerEl, name: "121432", desc: "121433", placeholder: null, key: null, manager })); new import_obsidian21.Setting(containerEl).then(createFolderSelectionSettingInput({ containerEl, name: null, desc: null, placeholder: "121434", key: "attachmentPath", manager })); new import_obsidian21.Setting(containerEl).then(createFolderSelectionSetting({ containerEl, name: "121452", desc: "121453", placeholder: null, key: null, manager })); new import_obsidian21.Setting(containerEl).then(createFolderSelectionSettingInput({ containerEl, name: null, desc: null, placeholder: "121454", key: "attachmentFileName", manager })); ; } new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("121435")).setDesc(i18nHelper.getMessage("121436")).addToggle((toggleComponent) => { toggleComponent.setTooltip(i18nHelper.getMessage("121437")).setValue(manager.plugin.settings.cacheHighQuantityImage).onChange((value) => __async(this, null, function* () { manager.plugin.settings.cacheHighQuantityImage = value; yield manager.plugin.saveSettings(); constructAttachmentFileSettingsUI(containerEl, manager); })); }); } } function constructAttachmentFilePictureBedSettingsUI(containerEl, manager) { var pictureBedSetting = manager.plugin.settings.pictureBedSetting; var pictureBedType = manager.plugin.settings.pictureBedType; if (manager.plugin.settings.pictureBedFlag && !pictureBedType) { pictureBedType = PictureBedType.PicGo; if (pictureBedSetting == null) { pictureBedSetting = PictureBedSetting_PicGo; } } var pictureBedTypeSettingsUI = new import_obsidian21.Setting(containerEl); var pictureBedPropertySettingsUI = new import_obsidian21.Setting(containerEl).settingEl; pictureBedTypeSettingsUI.setName(i18nHelper.getMessage("121451")).then((setting) => { setting.addDropdown((dropdwon) => { dropdwon.addOptions(PictureBedTypeRecords); dropdwon.setValue(manager.plugin.settings.pictureBedType).onChange((value) => __async(this, null, function* () { manager.plugin.settings.pictureBedType = value; constructAttachmentFilePictureBedPropertySettingsUI(pictureBedPropertySettingsUI, manager); yield manager.plugin.saveSettings(); })); }); }); constructAttachmentFilePictureBedPropertySettingsUI(pictureBedPropertySettingsUI, manager); } function constructAttachmentFilePictureBedPropertySettingsUI(containerEl, manager) { containerEl.empty(); const pictureBedSetting = manager.plugin.settings.pictureBedSetting; const pictureBedType = manager.plugin.settings.pictureBedType; if (pictureBedType == PictureBedType.PicGo) { new import_obsidian21.Setting(containerEl).setName(i18nHelper.getMessage("121461")).addText((textField) => { textField.setPlaceholder(PictureBedSetting_PicGo.url).setValue(pictureBedSetting.url).onChange((value) => __async(this, null, function* () { pictureBedSetting.url = value; yield manager.plugin.saveSettings(); constructAttachmentFilePictureBedPropertySettingsUI(containerEl, manager); })); }); } } // src/org/wanxp/douban/setting/BasicSettingsHelper.ts var import_obsidian22 = __toModule(require("obsidian")); function constructBasicUI(containerEl, manager) { new import_obsidian22.Setting(containerEl).setName(i18nHelper.getMessage("120501")).then((setting) => { setting.addMomentFormat((mf) => { setting.descEl.appendChild(createFragment((frag) => { frag.appendText(i18nHelper.getMessage("120503")); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("120506") + " "); frag.createEl("a", { text: i18nHelper.getMessage("120508"), href: "https://momentjs.com/docs/#/displaying/format/" }, (a) => { a.setAttr("target", "_blank"); }); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("120507") + ": "); mf.setSampleEl(frag.createEl("b", { cls: "u-pop" })); frag.createEl("br"); })); mf.setPlaceholder(DEFAULT_SETTINGS.dateFormat); mf.setValue(manager.plugin.settings.dateFormat); mf.onChange((value) => __async(this, null, function* () { manager.plugin.settings.dateFormat = value; yield manager.plugin.saveSettings(); })); }); }); new import_obsidian22.Setting(containerEl).setName(i18nHelper.getMessage("120502")).then((setting) => { setting.addMomentFormat((mf) => { setting.descEl.appendChild(createFragment((frag) => { frag.appendText(i18nHelper.getMessage("120504")); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("120506") + " "); frag.createEl("a", { text: i18nHelper.getMessage("120508"), href: "https://momentjs.com/docs/#/displaying/format/" }, (a) => { a.setAttr("target", "_blank"); }); frag.createEl("br"); frag.appendText(i18nHelper.getMessage("120507") + ": "); mf.setSampleEl(frag.createEl("b", { cls: "u-pop" })); frag.createEl("br"); })); mf.setPlaceholder(DEFAULT_SETTINGS.timeFormat); mf.setValue(manager.plugin.settings.timeFormat); mf.onChange((value) => __async(this, null, function* () { manager.plugin.settings.timeFormat = value; yield manager.plugin.saveSettings(); })); }); }); new import_obsidian22.Setting(containerEl).setName(i18nHelper.getMessage("121401")).setDesc(i18nHelper.getMessage("121402")).addToggle((toggleComponent) => { toggleComponent.setValue(manager.plugin.settings.statusBar).onChange((value) => __async(this, null, function* () { manager.plugin.settings.statusBar = value; yield manager.plugin.saveSettings(); })); }); new import_obsidian22.Setting(containerEl).setName(i18nHelper.getMessage("121410")).setDesc(i18nHelper.getMessage("121411")).addDropdown((dropdown) => { dropdown.addOptions(SearchTypeRecords).setValue(manager.plugin.settings.searchDefaultType).onChange((value) => __async(this, null, function* () { manager.plugin.settings.searchDefaultType = SupportTypeMap[value]; yield manager.plugin.saveSettings(); })); }); } // src/org/wanxp/douban/setting/TemplateVariableSettingsHelper.ts var import_obsidian23 = __toModule(require("obsidian")); var BASIC_VARIABLES = [ { name: "id", descriptionKeySuffix: "01" }, { name: "title", descriptionKeySuffix: "02" }, { name: "type", descriptionKeySuffix: "03" }, { name: "score", descriptionKeySuffix: "04" }, { name: "scoreStar", sharedDescriptionKey: "410200" }, { name: "image", descriptionKeySuffix: "05" }, { name: "imageData.url", descriptionKeySuffix: "21" }, { name: "url", descriptionKeySuffix: "06" }, { name: "desc", descriptionKeySuffix: "07" }, { name: "publisher", descriptionKeySuffix: "08" }, { name: "datePublished", descriptionKeySuffix: "09" }, { name: "yearPublished", descriptionKeySuffix: "30" }, { name: "genre", descriptionKeySuffix: "10" }, { name: "currentDate", sharedDescriptionKey: "330101" }, { name: "currentTime", sharedDescriptionKey: "330102" } ]; var EXTRA_VARIABLE_SUFFIXES = ["11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "22"]; var USER_VARIABLES = [ { name: "myTags", descriptionKey: "160226" }, { name: "myRating", descriptionKey: "160227" }, { name: "myRatingStar", descriptionKey: "160231" }, { name: "myState", descriptionKey: "160228" }, { name: "myComment", descriptionKey: "160229" }, { name: "myCollectionDate", descriptionKey: "160230" }, { name: "imageName", descriptionKey: "imageNameDesc" }, { name: "popularComments", descriptionKey: "popularCommentsDesc" } ]; function constructTemplateVariablesUI(containerEl, _manager) { createVariableSection(containerEl, i18nHelper.getMessage("122001"), BASIC_VARIABLES, "name", i18nHelper.getMessage("122003"), i18nHelper.getMessage("122004")); const extraVariables = EXTRA_VARIABLE_SUFFIXES.map((suffix, index2) => ({ name: i18nHelper.getMessage(`3201${String(index2 + 1).padStart(2, "0")}`), descriptionKeySuffix: suffix })); createVariableSection(containerEl, i18nHelper.getMessage("122002"), extraVariables, "description", void 0, i18nHelper.getMessage("122005")); createUserVariableSection(containerEl); } function createVariableSection(containerEl, title, variables, copyMode, summary, help) { const section = containerEl.createDiv("obsidian_douban_variable_card"); section.createEl("h3", { cls: "obsidian_douban_variable_title", text: title }); if (summary) { section.createEl("p", { cls: "obsidian_douban_variable_summary", text: summary }); } if (help) { section.createEl("p", { cls: "obsidian_douban_variable_help", text: help }); } createVariableTable(section, variables, copyMode); } function createVariableTable(containerEl, variables, copyMode) { const scrollContainer = containerEl.createDiv("obsidian_douban_variable_table_scroll"); const table = scrollContainer.createEl("table", { cls: "obsidian_douban_variable_table" }); const header = table.createEl("thead").createEl("tr"); for (let index2 = 1; index2 <= 7; index2++) { header.createEl("th", { attr: { scope: "col" }, text: i18nHelper.getMessage(`30010${index2}`) }); } const body = table.createEl("tbody"); for (const variable of variables) { const row = body.createEl("tr"); const nameCell = row.createEl("th", { attr: { scope: "row" } }); if (copyMode === "name") { nameCell.createSpan({ cls: "obsidian_douban_variable_name", text: variable.name }); makeVariableCopyable(nameCell, variable.name); } else { nameCell.setText(variable.name); } for (const description of getVariableDescriptions(variable)) { if (copyMode === "description") { createExtraVariableCell(row, description); } else { row.createEl("td", { text: description }); } } } } function createExtraVariableCell(row, description) { const cell = row.createEl("td"); const match = description.match(/^([A-Za-z][A-Za-z0-9_.]*)([::])(.*)$/); if (!match) { cell.setText(description); return; } const [, variableName, separator, label] = match; cell.createSpan({ cls: "obsidian_douban_variable_name", text: variableName }); cell.appendText(`${separator}${label}`); makeVariableCopyable(cell, variableName); } function getVariableDescriptions(variable) { if (variable.sharedDescriptionKey) { return Array(6).fill(i18nHelper.getMessage(variable.sharedDescriptionKey)); } return Array.from({ length: 6 }, (_, index2) => i18nHelper.getMessage(`310${index2 + 1}${variable.descriptionKeySuffix}`)); } function createUserVariableSection(containerEl) { const section = containerEl.createDiv("obsidian_douban_variable_card"); section.createEl("h3", { cls: "obsidian_douban_variable_title", text: i18nHelper.getMessage("122010") }); section.createEl("p", { cls: "obsidian_douban_variable_help", text: i18nHelper.getMessage("160225") }); const list = section.createDiv("obsidian_douban_user_variable_list"); for (const variable of USER_VARIABLES) { const item = list.createDiv("obsidian_douban_user_variable_item"); item.createSpan({ cls: "obsidian_douban_variable_name", text: variable.name }); item.createEl("span", { text: i18nHelper.getMessage(variable.descriptionKey) }); makeVariableCopyable(item, variable.name); } } function makeVariableCopyable(containerEl, variableName) { const templateVariable = `{{${variableName}}}`; containerEl.addClass("obsidian_douban_variable_copy_target"); containerEl.setAttrs({ tabindex: "0", role: "button", title: `${i18nHelper.getMessage("122011")} ${templateVariable}`, "aria-label": `${i18nHelper.getMessage("122011")} ${templateVariable}` }); const copyVariable = () => __async(this, null, function* () { try { yield navigator.clipboard.writeText(templateVariable); new import_obsidian23.Notice(`${i18nHelper.getMessage("122012")} ${templateVariable}`); } catch (error) { new import_obsidian23.Notice(i18nHelper.getMessage("122013")); } }); containerEl.addEventListener("click", copyVariable); containerEl.addEventListener("keydown", (event) => __async(this, null, function* () { if (event.key === "Enter" || event.key === " ") { event.preventDefault(); yield copyVariable(); } })); } // src/org/wanxp/douban/setting/CustomPropertySettingsHelper.ts var import_obsidian24 = __toModule(require("obsidian")); function constructCustomPropertySettingsUI(containerEl, manager) { const overview = containerEl.createDiv("obsidian_douban_section_card"); overview.createEl("p", { cls: "obsidian_douban_custom_property_intro", text: i18nHelper.getMessage("1242") }); const customProperties = manager.plugin.settings.customProperties; new import_obsidian24.Setting(overview).setClass("obsidian_douban_custom_property_header").setDesc(i18nHelper.getMessage("1241")).addButton((button) => { button.setButtonText(i18nHelper.getMessage("124101")); button.setTooltip(i18nHelper.getMessage("124101")); button.setIcon("plus"); button.onClick(() => __async(this, null, function* () { customProperties.push({ name: "", value: "", field: SupportType.all }); constructCustomPropertyUI(list, customProperties, manager); })); }); const list = containerEl.createDiv("custom-property-list"); constructCustomPropertyUI(list, customProperties, manager); } function constructCustomPropertyUI(containerEl, customProperties, manager) { containerEl.empty(); for (let i = 0; i < customProperties.length; i++) { addFilterInput(customProperties[i], containerEl, customProperties, manager, i); } } function addFilterInput(data2, el, customProperties, manager, idx) { const item = el.createDiv("obsidian_douban_custom_property_item"); const nameControl = item.createDiv("obsidian_douban_custom_property_field"); nameControl.createEl("label", { text: i18nHelper.getMessage("124102") }); const nameField = new import_obsidian24.TextComponent(nameControl); nameField.setPlaceholder(i18nHelper.getMessage("124103")).setValue(data2.name).onChange((value) => __async(this, null, function* () { if (!value) { return; } customProperties[idx].name = value; yield manager.plugin.saveSettings(); })); const nameEl = nameField.inputEl; nameEl.addClass("obsidian_douban_settings_input"); const valueControl = item.createDiv("obsidian_douban_custom_property_field"); valueControl.createEl("label", { text: i18nHelper.getMessage("124104") }); const valueField = new import_obsidian24.TextComponent(valueControl); valueField.setPlaceholder(i18nHelper.getMessage("124105")).setValue(data2.value).onChange((value) => __async(this, null, function* () { if (!value) { return; } customProperties[idx].value = value; yield manager.plugin.saveSettings(); })); const valueEl = valueField.inputEl; valueEl.addClass("obsidian_douban_settings_input"); const typeControl = item.createDiv("obsidian_douban_custom_property_field"); typeControl.createEl("label", { text: i18nHelper.getMessage("124106") }); const fieldsDropdown = new import_obsidian24.DropdownComponent(typeControl); for (const fieldSelect in SupportType) { fieldsDropdown.addOption(fieldSelect, i18nHelper.getMessage(fieldSelect)); } let dataFieldValue = data2.field; if (typeof dataFieldValue === "string") { dataFieldValue = SupportTypeMap[dataFieldValue]; } fieldsDropdown.setValue(dataFieldValue).onChange((value) => __async(this, null, function* () { customProperties[idx].field = value; yield manager.plugin.saveSettings(); })); const fieldSelectEl = fieldsDropdown.selectEl; fieldSelectEl.addClass("obsidian_douban_settings_input"); const removeControl = item.createDiv("obsidian_douban_custom_property_remove"); const extractButton = new import_obsidian24.ButtonComponent(removeControl); extractButton.setIcon("minus-with-circle"); extractButton.setTooltip(i18nHelper.getMessage("124107")); extractButton.onClick(() => __async(this, null, function* () { customProperties.splice(idx, 1); constructCustomPropertyUI(el, customProperties, manager); yield manager.plugin.saveSettings(); })); const extractButtonEl = extractButton.buttonEl; extractButtonEl.addClass("obsidian_douban_settings_button"); } // src/org/wanxp/douban/setting/AdvancedSettingsHelper.ts var import_obsidian26 = __toModule(require("obsidian")); // src/org/wanxp/douban/component/ConfirmDialogModal.ts var import_obsidian25 = __toModule(require("obsidian")); var ConfirmDialogModal = class extends import_obsidian25.Modal { constructor(doubanPlugin, message, promise) { super(doubanPlugin.app); this.doubanPlugin = doubanPlugin; this.message = message; this.promise = promise; } onOpen() { const { contentEl } = this; contentEl.createEl("h3", { text: i18nHelper.getMessage("110152") }); contentEl.createEl("p", { text: `${this.message}` }); contentEl.createEl("p", { text: i18nHelper.getMessage("125033") }); const controls = contentEl.createDiv("controls"); controls.addClass("obsidian_douban_search_controls"); new import_obsidian25.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110152")).setCta().onClick(() => __async(this, null, function* () { if (this.message == i18nHelper.getMessage("125046")) { createFileSelectModal(this.doubanPlugin); } else { yield this.promise; } this.close(); })).setClass("obsidian_douban_search_button"); new import_obsidian25.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110005")).onClick(() => { this.close(); }).setClass("obsidian_douban_cancel_button"); } }; function createFileSelectModal(doubanPlugin) { const input = document.createElement("input"); input.type = "file"; input.accept = ".json"; input.multiple = false; input.onchange = () => __async(this, null, function* () { const file = input.files[0]; const reader = new FileReader(); reader.onload = () => __async(this, null, function* () { const settings = JSON.parse(reader.result); try { yield doubanPlugin.settingsManager.loadAndSaveSettings(settings); } catch (e) { log.error(i18nHelper.getMessage("125043"), e); } log.notice(i18nHelper.getMessage("125044")); }); reader.readAsText(file); }); input.click(); } // src/org/wanxp/utils/TimeUtil.ts var TimeUtil = class { static estimateTime(needHandled, overSlowSize) { if (needHandled <= 0) { return 0; } let times = 0; if (overSlowSize) { if (needHandled <= BasicConst.SLOW_SIZE) { times = ESTIMATE_TIME_PER_WITH_REQUEST * needHandled; } else { times = ESTIMATE_TIME_PER_WITH_REQUEST * BasicConst.SLOW_SIZE + ESTIMATE_TIME_PER_WITH_REQUEST_SLOW * Math.max(needHandled - BasicConst.SLOW_SIZE, 0); } } else { times = ESTIMATE_TIME_PER_WITH_REQUEST * needHandled; } return times; } static estimateTimeMsg(needHandled, overSlowSize) { const times = this.estimateTime(needHandled, overSlowSize); if (times <= 0) { return 0 + i18nHelper.getMessage("SECOND"); } return this.formatDuring(times); } static formatDuring(mss) { let show = false; let message = ""; const days = Math.floor(mss / (1e3 * 60 * 60 * 24)); const hours = Math.floor(mss % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)); const minutes = Math.floor(mss % (1e3 * 60 * 60) / (1e3 * 60)); const seconds = Math.floor(mss % (1e3 * 60) / 1e3); if (days > 0) { show = true; message += days + i18nHelper.getMessage("DAY"); } if (hours > 0 || show) { show = true; message += hours + i18nHelper.getMessage("HOUR"); } if (minutes > 0 || show) { show = true; message += minutes + i18nHelper.getMessage("MINUTE"); } if (seconds > 0 || show) { message += seconds + i18nHelper.getMessage("SECOND"); } return message; } static formatDate(date, format = "yyyy-MM-dd HH:mm:ss") { const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); const hour = date.getHours(); const minute = date.getMinutes(); const second = date.getSeconds(); const formatMap = { yyyy: year.toString(), MM: month.toString().padStart(2, "0"), dd: day.toString().padStart(2, "0"), HH: hour.toString().padStart(2, "0"), mm: minute.toString().padStart(2, "0"), ss: second.toString().padStart(2, "0") }; return format.replace(/yyyy|MM|dd|HH|mm|ss/g, (match) => formatMap[match]); } static getLastMonth() { const date = new Date(); date.setMonth(date.getMonth() - 1); return date; } }; var sleepRange = (msMin, msMax) => { const msTime = NumberUtil.getRandomNum(msMin, msMax); return new Promise((resolve) => setTimeout(resolve, msTime)); }; // src/org/wanxp/douban/setting/AdvancedSettingsHelper.ts function constructAdvancedUI(containerEl, manager) { const overview = containerEl.createDiv("obsidian_douban_section_card obsidian_douban_section_overview"); overview.createEl("p", { text: i18nHelper.getMessage("1252") }); const advancedSettings = containerEl.createDiv("advanced-settings obsidian_douban_card_list"); showAdvancedSettings(advancedSettings, manager); } function showAdvancedSettings(containerEl, manager) { containerEl.empty(); const promise = new Promise((resolve, reject) => { resolve(null); }); new import_obsidian26.Setting(containerEl).setName(i18nHelper.getMessage("125034")).setDesc(i18nHelper.getMessage("125035")).addButton((buttonComponent) => { buttonComponent.setIcon("folder").setButtonText(i18nHelper.getMessage("125047")).onClick((value) => __async(this, null, function* () { const settings = manager.getSettings(); const settingsString = JSON.stringify(settings, null, 2); const blob = new Blob([settingsString], { type: "application/json" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = `obsidian_douban_plugin_settings_${TimeUtil.formatDate(new Date(), "yyyy-MM-dd_HH-mm-ss")}.json`; a.click(); URL.revokeObjectURL(url); })); }); new import_obsidian26.Setting(containerEl).setName(i18nHelper.getMessage("125036")).setDesc(i18nHelper.getMessage("125037")).addButton((buttonComponent) => { buttonComponent.setIcon("document").setButtonText(i18nHelper.getMessage("125039")).onClick((value) => __async(this, null, function* () { showConfirmDialog(i18nHelper.getMessage("125046"), promise.then(() => { }), manager); })); }); new import_obsidian26.Setting(containerEl).setName(i18nHelper.getMessage("125001")).setDesc(i18nHelper.getMessage("125002")).addToggle((toggleComponent) => { toggleComponent.setValue(manager.plugin.settings.debugMode).onChange((value) => __async(this, null, function* () { manager.plugin.settings.debugMode = value; if (value) { log.info("\u8C03\u8BD5\u6A21\u5F0F\u5F00\u542F"); } else { log.info("\u8C03\u8BD5\u6A21\u5F0F\u5173\u95ED"); } yield manager.plugin.saveSettings(); })); }); new import_obsidian26.Setting(containerEl).setName(i18nHelper.getMessage("125011")).setDesc(i18nHelper.getMessage("125012")).addButton((buttonComponent) => { buttonComponent.setIcon("reset").setTooltip(i18nHelper.getMessage("125013")).onClick((value) => __async(this, null, function* () { showConfirmDialog(i18nHelper.getMessage("125012"), promise.then(() => { manager.resetSetting(); }), manager); })); }); new import_obsidian26.Setting(containerEl).setName(i18nHelper.getMessage("125021")).setDesc(i18nHelper.getMessage("125022")).addButton((buttonComponent) => { buttonComponent.setIcon("reset").setTooltip(i18nHelper.getMessage("125022")).onClick((value) => __async(this, null, function* () { showConfirmDialog(i18nHelper.getMessage("125022"), promise.then(() => { manager.clearLoginInfo(); manager.plugin.userComponent.logout(); }), manager); })); }); new import_obsidian26.Setting(containerEl).setName(i18nHelper.getMessage("125031")).setDesc(i18nHelper.getMessage("125032")).addButton((buttonComponent) => { buttonComponent.setIcon("reset").setTooltip(i18nHelper.getMessage("125032")).onClick((value) => __async(this, null, function* () { showConfirmDialog(i18nHelper.getMessage("125032"), promise.then(() => { manager.clearSyncCache(); }), manager); })); }); } function showConfirmDialog(message, promise, manager) { new ConfirmDialogModal(manager.plugin, message, promise.then(() => { manager.plugin.saveSettings(); }).then(() => { manager.plugin.settingTab.display(); })).open(); } // src/org/wanxp/douban/setting/ArrayDisplayTypeSettingsHelper.ts var import_obsidian28 = __toModule(require("obsidian")); // src/org/wanxp/douban/setting/ArrayLengthLimitSettingsHelper.ts var import_obsidian27 = __toModule(require("obsidian")); function constructArrayLengthLimitSettingsUI(containerEl, manager) { const overview = containerEl.createDiv("obsidian_douban_section_card"); overview.createEl("h3", { cls: "obsidian_douban_array_section_title", text: i18nHelper.getMessage("1270") }); overview.createEl("p", { cls: "obsidian_douban_array_help", text: i18nHelper.getMessage("1271") }); overview.createEl("p", { cls: "obsidian_douban_array_help obsidian_douban_array_hint", text: i18nHelper.getMessage("1272") }); if (!manager.plugin.settings.arrayLengthLimits) { manager.plugin.settings.arrayLengthLimits = []; } const limits = manager.plugin.settings.arrayLengthLimits; new import_obsidian27.Setting(overview).setClass("obsidian_douban_array_section_header").setDesc(i18nHelper.getMessage("1273")).addButton((button) => { button.setButtonText(i18nHelper.getMessage("124101")); button.setTooltip(i18nHelper.getMessage("127401")); button.setIcon("plus"); button.onClick(() => __async(this, null, function* () { yield manager.addArrayLengthLimit(); renderItems(list, manager); })); }); const list = containerEl.createDiv("array-length-limit-list"); renderItems(list, manager); } function renderItems(containerEl, manager) { containerEl.empty(); const limits = manager.plugin.settings.arrayLengthLimits || []; for (let i = 0; i < limits.length; i++) { buildItem(containerEl, manager, limits, i); } } function buildItem(containerEl, manager, limits, idx) { const data2 = limits[idx]; const item = containerEl.createDiv("obsidian_douban_array_limit_item"); const typeField = item.createDiv("obsidian_douban_array_limit_field"); typeField.createEl("label", { text: i18nHelper.getMessage("127402") }); const typeDropdown = new import_obsidian27.DropdownComponent(typeField); for (const fieldSelect in SupportType) { typeDropdown.addOption(fieldSelect, i18nHelper.getMessage(fieldSelect)); } let dataTypeValue = data2.type; if (typeof dataTypeValue === "string") { dataTypeValue = SupportTypeMap[dataTypeValue] || SupportType.all; } typeDropdown.setValue(dataTypeValue || SupportType.all).onChange((value) => __async(this, null, function* () { limits[idx].type = value; yield manager.plugin.saveSettings(); })); const typeEl = typeDropdown.selectEl; typeEl.addClass("obsidian_douban_settings_input"); const nameField = item.createDiv("obsidian_douban_array_limit_field"); nameField.createEl("label", { text: i18nHelper.getMessage("127403") }); const fieldField = new import_obsidian27.TextComponent(nameField); fieldField.setPlaceholder(i18nHelper.getMessage("127404")).setValue(data2.field || "").onChange((value) => __async(this, null, function* () { limits[idx].field = (value || "").trim(); yield manager.plugin.saveSettings(); })); const fieldEl = fieldField.inputEl; fieldEl.addClass("obsidian_douban_settings_input"); const maxField = item.createDiv("obsidian_douban_array_limit_field"); maxField.createEl("label", { text: i18nHelper.getMessage("127405") }); const limitField = new import_obsidian27.TextComponent(maxField); limitField.setPlaceholder(i18nHelper.getMessage("127406")).setValue(data2.limit != null ? String(data2.limit) : "").onChange((value) => __async(this, null, function* () { const parsed = parseInt(value, 10); if (Number.isNaN(parsed) || parsed < 0) { return; } limits[idx].limit = parsed; yield manager.plugin.saveSettings(); })); const limitEl = limitField.inputEl; limitEl.type = "number"; limitEl.min = "0"; limitEl.addClass("obsidian_douban_settings_input"); const removeControl = item.createDiv("obsidian_douban_array_limit_remove"); const removeBtn = new import_obsidian27.ButtonComponent(removeControl); removeBtn.setIcon("minus-with-circle"); removeBtn.setTooltip(i18nHelper.getMessage("127407")); removeBtn.onClick(() => __async(this, null, function* () { yield manager.removeArrayLengthLimit(idx); renderItems(containerEl, manager); })); const removeBtnEl = removeBtn.buttonEl; removeBtnEl.addClass("obsidian_douban_settings_button"); } // src/org/wanxp/douban/setting/ArrayDisplayTypeSettingsHelper.ts function arraySettingDisplayUI(containerEl, manager) { const lengthLimitSection = containerEl.createDiv("obsidian_douban_array_section"); constructArrayLengthLimitSettingsUI(lengthLimitSection, manager); const displaySection = containerEl.createDiv("obsidian_douban_array_section"); arraySettingDisplay(displaySection, manager, true); } function arraySettingDisplay(containerEl, manager, displayExtraListTypeFlag = true) { containerEl.empty(); const overview = containerEl.createDiv("obsidian_douban_section_card"); new import_obsidian28.Setting(overview).setClass("obsidian_douban_array_section_header").setName(i18nHelper.getMessage("120601")).setDesc(i18nHelper.getMessage("120602")).addButton((button) => { button.setIcon("plus").setTooltip(i18nHelper.getMessage("120607")).onClick(() => __async(this, null, function* () { yield manager.addArraySetting(); arraySettingDisplay(containerEl, manager, true); })); }); arraySettingDisplayItem(containerEl, manager, manager.getArraySetting(DEFAULT_SETTINGS_ARRAY_NAME)); displayExtraListType(manager, containerEl); } function arraySettingDisplayItem(containerEl, manager, arraySetting) { const card = containerEl.createDiv("obsidian_douban_array_display_card"); const fields = card.createDiv("obsidian_douban_array_fields"); const typeName = arraySetting.arrayName; const arraySettingItems = new import_obsidian28.Setting(card).setClass("obsidian_douban_array_card_header").setName(i18nHelper.getMessage("120604") + typeName).setDesc(i18nHelper.getMessage(`120605`) + (typeName == DEFAULT_SETTINGS_ARRAY_NAME ? "" : `(${typeName})`) + `}}`); if (typeName != DEFAULT_SETTINGS_ARRAY_NAME) { arraySettingItems.addButton((button) => { button.setIcon("minus-with-circle").setTooltip(i18nHelper.getMessage("120606")).onClick(() => __async(this, null, function* () { yield manager.removeArraySetting(arraySetting.arrayName); arraySettingDisplay(containerEl, manager, true); })); }); } const arrayStartField = fields.createDiv("obsidian_douban_array_field"); arrayStartField.createEl("label", { text: i18nHelper.getMessage("124109") }); const arrayStart = new import_obsidian28.TextComponent(arrayStartField); arrayStart.setPlaceholder(DEFAULT_SETTINGS.arrayStart).setValue(arraySetting.arrayStart).onChange((value) => __async(this, null, function* () { arraySetting.arrayStart = value; yield manager.updateArraySetting(arraySetting); showArrayExample(preview, manager, arraySetting); })); const arrayStartEl = arrayStart.inputEl; arrayStartEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; arrayStartEl.addClass("obsidian_douban_settings_input"); const elementStartField = fields.createDiv("obsidian_douban_array_field"); elementStartField.createEl("label", { text: i18nHelper.getMessage("124110") }); const arrayElementStart = new import_obsidian28.TextComponent(elementStartField); arrayElementStart.setPlaceholder(DEFAULT_SETTINGS.arrayElementStart).setValue(arraySetting.arrayElementStart).onChange((value) => __async(this, null, function* () { arraySetting.arrayElementStart = value; yield manager.updateArraySetting(arraySetting); showArrayExample(preview, manager, arraySetting); })); const arrayElementStartEl = arrayElementStart.inputEl; arrayElementStartEl.addClass("obsidian_douban_settings_input"); arrayElementStartEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; const separatorField = fields.createDiv("obsidian_douban_array_field"); separatorField.createEl("label", { text: i18nHelper.getMessage("124111") }); const arraySpiltV2 = new import_obsidian28.TextComponent(separatorField); arraySpiltV2.setPlaceholder(DEFAULT_SETTINGS.arraySpiltV2).setValue(arraySetting.arraySpiltV2).onChange((value) => __async(this, null, function* () { arraySetting.arraySpiltV2 = value; yield manager.updateArraySetting(arraySetting); showArrayExample(preview, manager, arraySetting); })); const arraySpiltV2El = arraySpiltV2.inputEl; arraySpiltV2El.addClass("obsidian_douban_settings_input"); arraySpiltV2El.size = 2; const elementEndField = fields.createDiv("obsidian_douban_array_field"); elementEndField.createEl("label", { text: i18nHelper.getMessage("124112") }); const arrayElementEnd = new import_obsidian28.TextComponent(elementEndField); arrayElementEnd.setPlaceholder(DEFAULT_SETTINGS.arrayElementEnd).setValue(arraySetting.arrayElementEnd).onChange((value) => __async(this, null, function* () { arraySetting.arrayElementEnd = value; yield manager.updateArraySetting(arraySetting); showArrayExample(preview, manager, arraySetting); })); const arrayElementEndEl = arrayElementEnd.inputEl; arrayElementEndEl.addClass("obsidian_douban_settings_input"); arrayElementEndEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; const arrayEndField = fields.createDiv("obsidian_douban_array_field"); arrayEndField.createEl("label", { text: i18nHelper.getMessage("124113") }); const arrayEnd = new import_obsidian28.TextComponent(arrayEndField); arrayEnd.setPlaceholder(DEFAULT_SETTINGS.arrayEnd).setValue(arraySetting.arrayEnd).onChange((value) => __async(this, null, function* () { arraySetting.arrayEnd = value; yield manager.updateArraySetting(arraySetting); showArrayExample(preview, manager, arraySetting); })); const arrayEndEl = arrayEnd.inputEl; arrayEndEl.addClass("obsidian_douban_settings_input"); arrayEndEl.size = DEFAULT_SETTINGS_ARRAY_INPUT_SIZE; const preview = card.createDiv("array-show"); showArrayExample(preview, manager, arraySetting); } function displayExtraListType(manager, containerEl) { manager.settings.arraySettings.forEach((arraySetting) => { arraySettingDisplayItem(containerEl, manager, arraySetting); }); } function showArrayExample(arrShow, manager, arraySetting) { arrShow.empty(); const document2 = new DocumentFragment(); document2.createDiv("array-show-title").innerHTML = `propertyName:${manager.handleArray(["value1", "value2", "value3"], arraySetting)}`; new import_obsidian28.Setting(arrShow).setName(i18nHelper.getMessage("120603")).setDesc(document2); } // src/org/wanxp/douban/setting/LoginSettingsHelper.ts var import_obsidian30 = __toModule(require("obsidian")); // src/org/wanxp/douban/component/DoubanLoginModel.ts var DoubanLoginModel = class { constructor(containerEl, settingsManager) { this.loginCheckInProgress = false; this.loginCompleted = false; this.containerEl = containerEl; this.settingsManager = settingsManager; this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u521D\u59CB\u5316\u767B\u5F55\u754C\u9762`); const { remote } = require("electron"); const { BrowserWindow: RemoteBrowserWindow } = remote; this.modal = new RemoteBrowserWindow({ parent: remote.getCurrentWindow(), width: 960, height: 540, show: false, webPreferences: { partition: `obsidian-douban-login-${Date.now()}` } }); this.modal.once("ready-to-show", () => { this.modal.setTitle(i18nHelper.getMessage("100101")); this.modal.show(); }); const session = this.modal.webContents.session; const cookieChangedHandler = (_event, cookie, _cause, removed) => { if (!removed && cookie && cookie.name === "dbcl2" && this.isDoubanHost(cookie.domain)) { void this.tryCompleteLogin(session); } }; session.cookies.on("changed", cookieChangedHandler); this.modal.on("closed", () => { session.cookies.removeListener("changed", cookieChangedHandler); this.showCloseMessage(); constructDoubanTokenSettingsUI(this.containerEl, this.settingsManager); }); this.modal.webContents.setWindowOpenHandler(({ url }) => { if (this.isDoubanUrl(url)) { void this.modal.loadURL(url).catch((error) => { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u8DF3\u8F6C\u5931\u8D25:${error.message}`); }); } return { action: "deny" }; }); this.modal.webContents.on("did-fail-load", (_event, errorCode, errorDescription) => { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u52A0\u8F7D\u5931\u8D25:${errorCode},${errorDescription}`); }); this.modal.webContents.on("did-navigate", (_event, _url, httpResponseCode) => __async(this, null, function* () { if (httpResponseCode == 403) { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762,\u52A0\u8F7D\u9875\u9762\u5931\u8D25,HttpStatus:${httpResponseCode},URL:${_url}`); yield this.modal.loadURL("data:text/html;charset=utf-8;base64,55Sx5LqO5aSa5qyh6aKR57mB6K+35rGC5pWw5o2u77yM6LGG55Oj5b2T5YmN5pqC5pe25LiN5Y+v55SoLiDor7fkuo4xMuWwj+aXtuaIljI05bCP5pe25ZCO5YaN6YeN6K+V77yM5oiW6YeN572u5L2g55qE572R57ucKOWmgumHjeaWsOaLqOWPt+aIluabtOaNoue9kee7nCk="); } else { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762,\u52A0\u8F7D\u9875\u9762\u6210\u529F,HttpStatus:${httpResponseCode},URL:${_url}`); } })); this.modal.webContents.on("did-finish-load", () => { void this.tryCompleteLogin(session); }); } isDoubanHost(host) { const normalizedHost = (host || "").replace(/^\./, "").toLowerCase(); return normalizedHost === "douban.com" || normalizedHost.endsWith(".douban.com"); } isDoubanUrl(url) { try { const parsedUrl = new URL(url); return ["http:", "https:"].includes(parsedUrl.protocol) && this.isDoubanHost(parsedUrl.hostname); } catch (_) { return false; } } tryCompleteLogin(session) { return __async(this, null, function* () { if (this.loginCompleted || this.loginCheckInProgress || !this.modal || this.modal.isDestroyed()) { return; } this.loginCheckInProgress = true; try { const cookies = yield session.cookies.get({ url: "https://www.douban.com/" }); if (!cookies.some((cookie) => cookie.name === "dbcl2")) { return; } const cookieHeader = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join("; "); const user = yield this.settingsManager.plugin.userComponent.loginCookie(cookieHeader); if (user && user.login) { this.loginCompleted = true; this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u8C46\u74E3\u767B\u5F55\u6210\u529F, \u4FE1\u606F:id:${StringUtil.confuse(user.id)}:, \u7528\u6237\u540D:${StringUtil.confuse(user.name)}`); try { yield session.clearStorageData({ origin: "https://www.douban.com", storages: ["cookies"] }); } catch (error) { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u6210\u529F\u540E\u6E05\u7406\u8C46\u74E3Cookie\u5931\u8D25:${error}`); } this.onClose(); } else { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u8C46\u74E3\u767B\u5F55\u5931\u8D25, Cookie\u672A\u80FD\u6210\u529F\u83B7\u53D6\u7528\u6237\u4FE1\u606F`); } } catch (error) { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u9A8C\u8BC1\u5931\u8D25:${error}`); } finally { this.loginCheckInProgress = false; } }); } doLogin() { return __async(this, null, function* () { try { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u52A0\u8F7D\u767B\u5F55\u9875\u9762`); yield this.modal.loadURL("https://accounts.douban.com/passport/login"); } catch (error) { log.error(i18nHelper.getMessage("100101"), error); } }); } onClose() { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u5173\u95ED, \u81EA\u52A8\u9000\u51FA\u767B\u5F55\u754C\u9762`); if (this.modal && !this.modal.isDestroyed()) { this.modal.close(); } } onReload() { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u91CD\u65B0\u52A0\u8F7D`); this.modal.reload(); } showCloseMessage() { if (this.settingsManager.plugin.userComponent.isLogin()) { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u5173\u95ED, \u767B\u5F55\u6210\u529F`); } else { this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u754C\u9762\u5173\u95ED, \u767B\u5F55\u5931\u8D25`); } } }; // src/org/wanxp/douban/component/DoubanQrLoginModal.ts var import_obsidian29 = __toModule(require("obsidian")); var QRCode = __toModule(require_browser2()); var DOUBAN_LOGIN_PAGE = "https://accounts.douban.com/passport/login"; var DOUBAN_QR_CODE_URL = "https://accounts.douban.com/j/mobile/login/qrlogin_code"; var DOUBAN_QR_STATUS_URL = "https://accounts.douban.com/j/mobile/login/qrlogin_status"; var QR_POLL_INTERVAL = 3e3; var QR_MAX_POLL_COUNT = 120; var DoubanQrLoginModal = class extends import_obsidian29.Modal { constructor(app, settingsManager, onLoginSuccess) { super(app); this.cookies = new Map(); this.qrCode = null; this.pollTimer = null; this.pollCount = 0; this.consecutivePollErrors = 0; this.polling = false; this.closed = false; this.sessionId = 0; this.debugWriteQueue = Promise.resolve(); this.settingsManager = settingsManager; this.onLoginSuccess = onLoginSuccess; } onOpen() { this.closed = false; void this.writeDebug("modal opened", true); const { contentEl } = this; contentEl.empty(); contentEl.addClass("obsidian_douban_qr_login"); contentEl.createEl("h2", { text: i18nHelper.getMessage("100141") }); contentEl.createEl("p", { text: i18nHelper.getMessage("100142") }); const imageContainer = contentEl.createDiv("obsidian_douban_qr_image_container"); this.qrImageEl = imageContainer.createEl("img", { attr: { alt: i18nHelper.getMessage("100141") } }); this.qrImageEl.style.display = "none"; this.statusEl = contentEl.createDiv("obsidian_douban_qr_status"); const controls = contentEl.createDiv("obsidian_douban_qr_controls"); this.refreshButton = new import_obsidian29.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("100150")).onClick(() => void this.loadQrCode()); new import_obsidian29.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110005")).onClick(() => this.close()); void this.loadQrCode(); } onClose() { this.closed = true; this.sessionId++; this.stopPolling(); this.contentEl.empty(); } loadQrCode() { return __async(this, null, function* () { this.stopPolling(); const sessionId = ++this.sessionId; this.cookies.clear(); this.qrCode = null; this.pollCount = 0; this.consecutivePollErrors = 0; this.polling = false; this.qrImageEl.style.display = "none"; this.refreshButton.setDisabled(true); this.setStatus(i18nHelper.getMessage("100143")); try { const response = yield this.request(DOUBAN_QR_CODE_URL, "POST", sessionId); const payload = response.json && response.json.payload; if (!payload || !payload.code) { throw new Error("Douban QR response is missing code"); } void this.writeDebug("QR code metadata received"); this.qrCode = payload.code; yield this.renderQrImage(payload.code, payload.img, sessionId); if (this.closed || sessionId !== this.sessionId) { return; } this.qrImageEl.style.display = ""; this.setStatus(i18nHelper.getMessage("100144")); this.schedulePolling(sessionId); } catch (error) { if (sessionId !== this.sessionId || this.closed) { return; } this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u79FB\u52A8\u7AEF\u4E8C\u7EF4\u7801\u52A0\u8F7D\u5931\u8D25:${error}`); void this.writeDebug(`QR loading failed: ${this.safeError(error)}`); this.setStatus(i18nHelper.getMessage("100149"), true); } finally { if (sessionId === this.sessionId && !this.closed) { this.refreshButton.setDisabled(false); } } }); } renderQrImage(code, imageUrl, sessionId) { return __async(this, null, function* () { const qrContent = this.getQrContent(code, imageUrl); this.qrImageEl.src = yield QRCode.toDataURL(qrContent, { errorCorrectionLevel: "M", margin: 2, width: 280, color: { dark: "#000000", light: "#ffffff" } }); if (sessionId !== this.sessionId || this.closed) { throw new Error("Douban QR login session changed"); } void this.writeDebug("QR image rendered locally"); }); } getQrContent(code, imageUrl) { if (imageUrl) { try { const pathname = new URL(imageUrl).pathname; const prefix = "/dae/qrgen/v2/"; if (pathname.startsWith(prefix) && pathname.endsWith(".png")) { return decodeURIComponent(pathname.substring(prefix.length, pathname.length - 4)); } } catch (_) { } } return `https://accounts.douban.com/passport/qrlogin?code=${encodeURIComponent(code)}`; } schedulePolling(sessionId) { if (this.closed || !this.qrCode || sessionId !== this.sessionId) { return; } this.pollTimer = setTimeout(() => void this.pollLoginStatus(sessionId), QR_POLL_INTERVAL); } pollLoginStatus(sessionId) { return __async(this, null, function* () { if (this.closed || !this.qrCode || this.polling || sessionId !== this.sessionId) { return; } if (++this.pollCount > QR_MAX_POLL_COUNT) { this.setStatus(i18nHelper.getMessage("100147"), true); return; } this.polling = true; let continuePolling = false; try { const response = yield this.request(`${DOUBAN_QR_STATUS_URL}?code=${encodeURIComponent(this.qrCode)}`, "GET", sessionId); const responseJson = response.json; if (!responseJson || responseJson.status !== "success") { throw new Error(`Douban QR status response failed: ${(responseJson == null ? void 0 : responseJson.message) || "unknown response"}`); } this.consecutivePollErrors = 0; const loginStatus = responseJson.payload && responseJson.payload.login_status; void this.writeDebug(`poll #${this.pollCount}: login_status=${loginStatus || "missing"}`); switch (loginStatus) { case "pending": this.setStatus(i18nHelper.getMessage("100144")); continuePolling = true; break; case "scan": this.setStatus(i18nHelper.getMessage("100145")); continuePolling = true; break; case "login": this.setStatus(i18nHelper.getMessage("100152")); if (!(yield this.completeLogin(sessionId))) { this.setStatus(i18nHelper.getMessage("100153"), true); } break; case "invalid": this.setStatus(i18nHelper.getMessage("100147"), true); break; case "cancel": this.setStatus(i18nHelper.getMessage("100148"), true); break; default: continuePolling = true; } } catch (error) { if (sessionId !== this.sessionId || this.closed) { return; } this.consecutivePollErrors++; console.error("OB-Douban:\u4E8C\u7EF4\u7801\u767B\u5F55\u72B6\u6001\u67E5\u8BE2\u5931\u8D25", error); this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:\u4E8C\u7EF4\u7801\u72B6\u6001\u67E5\u8BE2\u5931\u8D25:${error}`); void this.writeDebug(`poll #${this.pollCount} failed: ${this.safeError(error)}`); if (this.consecutivePollErrors >= 3) { this.setStatus(i18nHelper.getMessage("100149"), true); } continuePolling = true; } finally { this.polling = false; if (continuePolling && sessionId === this.sessionId) { this.schedulePolling(sessionId); } } }); } completeLogin(sessionId) { return __async(this, null, function* () { if (sessionId !== this.sessionId || this.closed) { return false; } const cookie = this.getCookieHeader(); void this.writeDebug(`completing login; cookie names=${Array.from(this.cookies.keys()).join(",") || "none"}`); if (!this.cookies.has("dbcl2") || !cookie) { console.error("OB-Douban:\u626B\u7801\u5DF2\u786E\u8BA4\uFF0C\u4F46\u72B6\u6001\u54CD\u5E94\u672A\u8FD4\u56DE dbcl2 Cookie"); return false; } let user; try { user = yield this.settingsManager.plugin.userComponent.loginCookie(cookie); } catch (error) { console.warn("OB-Douban:\u4E8C\u7EF4\u7801\u51ED\u8BC1\u5DF2\u83B7\u53D6\uFF0C\u7528\u6237\u8D44\u6599\u9A8C\u8BC1\u6682\u65F6\u5931\u8D25", error); void this.writeDebug(`profile verification failed; QR credential retained: ${this.safeError(error)}`); } if (sessionId !== this.sessionId || this.closed) { return false; } if (!user || !user.id || !user.login) { void this.writeDebug("profile was not verified; accepting confirmed QR credential"); user = yield this.settingsManager.plugin.userComponent.acceptQrLoginCookie(cookie); } if (!user || !user.id || !user.login) { return false; } this.setStatus(i18nHelper.getMessage("100146")); void this.writeDebug(`login completed; profileVerified=${this.settingsManager.plugin.userComponent.isVerified()}`); log.notice(i18nHelper.getMessage("100146")); this.close(); this.onLoginSuccess(); return true; }); } request(_0) { return __async(this, arguments, function* (url, method = "GET", sessionId = this.sessionId) { const requestKind = this.getRequestKind(url); void this.writeDebug(`${requestKind} request started; method=${method}`); const headers = { Accept: "application/json, text/plain, */*", "Cache-Control": "no-cache", Referer: DOUBAN_LOGIN_PAGE, "X-Requested-With": "XMLHttpRequest" }; const response = yield (0, import_obsidian29.requestUrl)({ url, method, headers, body: method === "POST" ? "" : void 0, contentType: method === "POST" ? "application/x-www-form-urlencoded" : void 0, throw: false }); if (sessionId !== this.sessionId || this.closed) { throw new Error("Douban QR login session changed"); } if (this.isDoubanUrl(url)) { this.updateCookies(response.headers); } void this.writeDebug(`${requestKind} response; HTTP=${response.status}; headers=${Object.keys(response.headers || {}).sort().join(",")}`); if (response.status < 200 || response.status >= 300) { throw new Error(`Douban request failed with HTTP ${response.status}`); } return response; }); } updateCookies(headers) { const newBid = this.getHeaderValues(headers, "x-douban-newbid")[0]; if (newBid) { this.cookies.set("bid", newBid); } const setCookieHeaders = this.getHeaderValues(headers, "set-cookie"); if (setCookieHeaders.length === 0) { return; } setCookieHeaders.flatMap((header) => header.split(/\n|,(?=\s*[^;,=\s]+=)/)).forEach((cookieValue) => { const match = cookieValue.match(/^\s*([^=;\s]+)=([^;]*)/); if (match) { this.cookies.set(match[1], match[2]); } }); } getHeaderValues(headers, name) { const key = Object.keys(headers || {}).find((header) => header.toLowerCase() === name.toLowerCase()); if (!key) { return []; } const value = headers[key]; if (Array.isArray(value)) { return value.filter((item) => item != null).map((item) => String(item)); } return value == null ? [] : [String(value)]; } getCookieHeader() { return Array.from(this.cookies.entries()).map(([name, value]) => `${name}=${value}`).join("; "); } isDoubanUrl(url) { try { const hostname = new URL(url).hostname.replace(/^\./, "").toLowerCase(); return hostname === "douban.com" || hostname.endsWith(".douban.com"); } catch (_) { return false; } } getRequestKind(url) { if (url.startsWith(DOUBAN_QR_CODE_URL)) { return "qr-code"; } if (url.startsWith(DOUBAN_QR_STATUS_URL)) { return "qr-status"; } return "qr-image"; } safeError(error) { const message = error instanceof Error ? `${error.name}: ${error.message}` : String(error); return message.replace(/([?&]code=)[^&\s]+/gi, "$1").replace(/(dbcl2=)[^;\s]+/gi, "$1"); } writeDebug(message, reset = false) { const debugPath = (0, import_obsidian29.normalizePath)(`${this.app.vault.configDir}/plugins/obsidian-douban/qr-login-debug.log`); const line = `${new Date().toISOString()} ${message} `; this.debugWriteQueue = this.debugWriteQueue.then(() => reset ? this.app.vault.adapter.write(debugPath, line) : this.app.vault.adapter.append(debugPath, line)).catch((error) => { console.error("OB-Douban:\u5199\u5165\u4E8C\u7EF4\u7801\u8BCA\u65AD\u65E5\u5FD7\u5931\u8D25", error); }); return this.debugWriteQueue; } stopPolling() { if (this.pollTimer != null) { clearTimeout(this.pollTimer); this.pollTimer = null; } } setStatus(message, error = false) { if (!this.statusEl || this.closed) { return; } this.statusEl.setText(message); this.statusEl.toggleClass("has_error", error); } }; // src/org/wanxp/douban/setting/LoginSettingsHelper.ts function constructLoginUI(containerEl, manager) { const userComponent = manager.plugin.userComponent; if (userComponent.isLogin() && !userComponent.isVerified()) { userComponent.login().then(() => constructDoubanLoginSettingsUI(containerEl, manager)).catch(() => constructDoubanLoginSettingsUI(containerEl, manager)); } else if (userComponent.needLogin()) { userComponent.login().then(() => constructDoubanLoginSettingsUI(containerEl, manager)).catch(() => constructDoubanLoginSettingsUI(containerEl, manager)); } else { constructDoubanLoginSettingsUI(containerEl, manager); } } function constructDoubanLoginSettingsUI(containerEl, manager) { containerEl.createDiv("login-setting", (loginSettingEl) => __async(this, null, function* () { constructDoubanTokenSettingsUI(loginSettingEl, manager); })); } function constructDoubanTokenSettingsUI(containerEl, manager) { containerEl.empty(); let login = manager.plugin.userComponent.isLogin(); manager.debug(`\u914D\u7F6E\u754C\u9762:\u5C55\u793A\u8C46\u74E3\u72B6\u6001:${login ? "\u5DF2\u767B\u5F55" : "\u672A\u767B\u5F55"}`); if (import_obsidian30.Platform.isDesktopApp) { if (login) { constructHasLoginSettingsUI(containerEl, manager); } else { constructLoginSettingsUI(containerEl, manager); } } else { if (login) { showMobileLogout(containerEl, manager); } else { showMobileLogin(containerEl, manager); } } } function constructLoginSettingsUI(containerEl, manager) { manager.debug(`\u914D\u7F6E\u754C\u9762:\u672A\u767B\u5F55-\u5C55\u793A\u767B\u5F55\u6309\u94AE`); let loginSetting = containerEl.createDiv("login-button"); let loginCookie = containerEl.createDiv("login-button-cookie"); new import_obsidian30.Setting(loginSetting).setName(i18nHelper.getMessage("100131")).addButton((button) => button.setButtonText(i18nHelper.getMessage("100140")).setCta().onClick(() => { new DoubanQrLoginModal(manager.app, manager, () => { constructDoubanTokenSettingsUI(containerEl, manager); }).open(); })).addButton((button) => button.setButtonText(i18nHelper.getMessage("100151")).onClick(() => __async(this, null, function* () { button.setDisabled(true); manager.debug(`\u914D\u7F6E\u754C\u9762:\u70B9\u51FB\u7F51\u9875\u767B\u5F55\u6309\u94AE`); const loginModel = new DoubanLoginModel(containerEl, manager); yield loginModel.doLogin(); }))); const loginCookieSetting = new import_obsidian30.Setting(loginSetting).setName(i18nHelper.getMessage("100133")); loginCookieSetting.addButton((button) => { loginCookieSetting.descEl.appendChild(createFragment((frag) => { frag.appendText(i18nHelper.getMessage("100134")); frag.createEl("a", { text: i18nHelper.getMessage("100139"), href: "https://wanxp.github.io/obsidian-douban/20_howtouse_25_setting_login_douban_cookie.html" }, (a) => { a.setAttr("target", "_blank"); }); frag.appendText(i18nHelper.getMessage("100138")); })); return button.setButtonText(i18nHelper.getMessage("100135")).onClick(() => __async(this, null, function* () { button.setDisabled(true); manager.debug(`\u914D\u7F6E\u754C\u9762:\u70B9\u51FB\u767B\u5F55\u5F02\u5E38\u5904\u7406\u6309\u94AE`); constructLoginCookieSettingsUI(loginCookie, containerEl, manager); })); }); } function constructLoginCookieSettingsUI(containerEl, parentContainerEl, manager) { manager.debug(`\u914D\u7F6E\u754C\u9762:\u767B\u5F55\u5F02\u5E38\u5904\u7406\u6309\u94AE-\u5C55\u793ACookie\u8F93\u5165\u6846`); new import_obsidian30.Setting(containerEl).setName(i18nHelper.getMessage("100136")).setClass("obsidian_douban_settings_cookie_login").addTextArea((text3) => { text3.onChange((value) => manager.updateCookieTemp(value)); return text3; }).addExtraButton((button) => { return button.setIcon("check").onClick(() => __async(this, null, function* () { manager.debug(`\u914D\u7F6E\u754C\u9762:\u786E\u8BA4\u8F93\u5165Cookie`); const cookie = (manager.getCookieTemp() || "").trim(); if (!cookie) { log.notice(i18nHelper.getMessage("100137")); return; } try { const user = yield manager.plugin.userComponent.loginCookie(cookie); if (!user || !user.id) { log.notice(i18nHelper.getMessage("100137")); return; } constructDoubanTokenSettingsUI(parentContainerEl, manager); } catch (e) { manager.debug(`\u914D\u7F6E\u754C\u9762:Cookie\u767B\u5F55\u5931\u8D25:${e}`); log.notice(i18nHelper.getMessage("100137")); } })); }).addExtraButton((button) => { return button.setIcon("x").onClick(() => __async(this, null, function* () { button.setDisabled(true); manager.debug(`\u914D\u7F6E\u754C\u9762:\u53D6\u6D88\u8F93\u5165Cookie`); constructDoubanTokenSettingsUI(parentContainerEl, manager); })); }); } function constructHasLoginSettingsUI(containerEl, manager) { const user = manager.plugin.userComponent.getUser(); const userDom = createLoggedInUserDescription(user); manager.debug(`\u914D\u7F6E\u754C\u9762:\u5C55\u793A\u8C46\u74E3\u767B\u5F55\u4FE1\u606F:id:${StringUtil.confuse(user.id)}, \u7528\u6237\u540D:${StringUtil.confuse(user.name)}`); new import_obsidian30.Setting(containerEl).setName(i18nHelper.getMessage("100126")).setDesc(userDom).addButton((button) => { return button.setButtonText(i18nHelper.getMessage("100128")).setCta().onClick(() => __async(this, null, function* () { button.setDisabled(true); manager.debug(`\u914D\u7F6E\u754C\u9762:\u70B9\u51FB\u9000\u51FA\u767B\u5F55\u6309\u94AE\uFF0C\u51C6\u5907\u9000\u51FA\u767B\u5F55`); yield manager.plugin.userComponent.logout(); manager.debug(`\u914D\u7F6E\u754C\u9762:\u9000\u51FA\u767B\u5F55\u6210\u529F`); constructDoubanTokenSettingsUI(containerEl, manager); })); }); } function showMobileLogin(containerEl, manager) { manager.debug(`\u914D\u7F6E\u754C\u9762:\u79FB\u52A8\u7AEF\u672A\u767B\u5F55-\u5C55\u793A\u4E8C\u7EF4\u7801\u548CCookie\u767B\u5F55\u6309\u94AE`); const loginSetting = containerEl.createDiv("login-button"); const loginCookie = containerEl.createDiv("login-button-cookie"); const mobileLoginSetting = new import_obsidian30.Setting(loginSetting).setName(i18nHelper.getMessage("100131")).addButton((button) => button.setButtonText(i18nHelper.getMessage("100140")).setCta().onClick(() => { new DoubanQrLoginModal(manager.app, manager, () => { constructDoubanTokenSettingsUI(containerEl, manager); }).open(); })).addButton((button) => button.setButtonText(i18nHelper.getMessage("100135")).onClick(() => { button.setDisabled(true); constructLoginCookieSettingsUI(loginCookie, containerEl, manager); })); mobileLoginSetting.descEl.appendChild(createFragment((frag) => { frag.appendText(i18nHelper.getMessage("100129")); frag.createEl("a", { text: i18nHelper.getMessage("100139"), href: "https://wanxp.github.io/obsidian-douban/20_howtouse_25_setting_login_douban_cookie.html" }, (a) => a.setAttr("target", "_blank")); frag.appendText(i18nHelper.getMessage("100138")); })); } function showMobileLogout(containerEl, manager) { const user = manager.plugin.userComponent.getUser(); const userDom = createLoggedInUserDescription(user); new import_obsidian30.Setting(containerEl).setName(i18nHelper.getMessage("100126")).setDesc(userDom).addButton((button) => { return button.setButtonText(i18nHelper.getMessage("100128")).setCta().onClick(() => __async(this, null, function* () { button.setDisabled(true); yield manager.plugin.userComponent.logout(); constructDoubanTokenSettingsUI(containerEl, manager); })); }); } function createLoggedInUserDescription(user) { const fragment = new DocumentFragment(); const userInfo = fragment.createDiv("obsidian_douban_login_user_info"); userInfo.createDiv({ cls: "obsidian_douban_login_status", text: i18nHelper.getMessage("100120") }); const idRow = userInfo.createDiv("obsidian_douban_login_detail"); idRow.createSpan({ cls: "obsidian_douban_login_label", text: `${i18nHelper.getMessage("100123")}:` }); idRow.createEl("a", { cls: "obsidian_douban_login_value", text: String(user.id || ""), href: `https://www.douban.com/people/${encodeURIComponent(String(user.id || ""))}/`, attr: { target: "_blank", rel: "noopener noreferrer" } }); const nameRow = userInfo.createDiv("obsidian_douban_login_detail"); nameRow.createSpan({ cls: "obsidian_douban_login_label", text: `${i18nHelper.getMessage("100124")}:` }); nameRow.createSpan({ cls: "obsidian_douban_login_value", text: String(user.name || "") }); userInfo.createDiv({ cls: "obsidian_douban_login_note", text: i18nHelper.getMessage("100125") }); return fragment; } // src/org/wanxp/douban/setting/DoubanSettingTab.ts var DoubanSettingTab = class extends import_obsidian31.PluginSettingTab { constructor(app, plugin) { super(app, plugin); this.plugin = plugin; this.settingsManager = plugin.settingsManager; } display() { const { containerEl } = this; containerEl.empty(); containerEl.createEl("h2", { text: "Obsidian Douban" }); const tabContainer = containerEl.createEl("div", { cls: "obsidian_douban_settings_tab_container" }); const tabHeaders = containerEl.createEl("div", { cls: "obsidian_douban_settings_tab_headers" }); const tabContents = containerEl.createEl("div", { cls: "obsidian_douban_settings_tab_contents" }); const tabs = [ { name: i18nHelper.getMessage("1210"), construct: constructBasicUI }, { name: i18nHelper.getMessage("1203"), construct: constructTemplateUI }, { name: i18nHelper.getMessage("1260"), construct: constructLoginUI }, { name: i18nHelper.getMessage("1220"), construct: constructOutUI }, { name: i18nHelper.getMessage("120601"), construct: arraySettingDisplayUI }, { name: i18nHelper.getMessage("1240"), construct: constructCustomPropertySettingsUI }, { name: i18nHelper.getMessage("1230"), construct: constructTemplateVariablesUI }, { name: i18nHelper.getMessage("1250"), construct: constructAdvancedUI } ]; tabs.forEach((tab, index2) => { const tabHeader = tabHeaders.createEl("div", { cls: "obsidian_douban_settings_tab_header", text: tab.name }); const tabContent = tabContents.createEl("div", { cls: "obsidian_douban_settings_tab_content" }); tab.construct(tabContent, this.settingsManager); if (index2 === 0) { tabHeader.addClass("active"); tabContent.addClass("active"); } tabHeader.addEventListener("click", () => { tabHeaders.querySelectorAll(".obsidian_douban_settings_tab_header").forEach((header) => header.removeClass("active")); tabContents.querySelectorAll(".obsidian_douban_settings_tab_content").forEach((content) => content.removeClass("active")); tabHeader.addClass("active"); tabContent.addClass("active"); }); }); tabContainer.appendChild(tabHeaders); tabContainer.appendChild(tabContents); } hide() { } }; // src/org/wanxp/douban/component/DoubanSyncModal.ts var import_obsidian34 = __toModule(require("obsidian")); var import_timers = __toModule(require("timers")); // src/org/wanxp/douban/setting/model/FolderSuggest.ts var import_obsidian32 = __toModule(require("obsidian")); var FolderSuggest = class extends TextInputSuggest { getSuggestions(inputStr) { const abstractFiles = this.app.vault.getAllLoadedFiles(); const folders = []; const lowerCaseInputStr = inputStr.toLowerCase(); abstractFiles.forEach((folder) => { if (folder instanceof import_obsidian32.TFolder && folder.path.toLowerCase().contains(lowerCaseInputStr)) { folders.push(folder); } }); return folders; } renderSuggestion(file, el) { el.setText(file.path); } selectSuggestion(file) { this.inputEl.value = file.path; this.inputEl.trigger("input"); this.close(); } }; // src/org/wanxp/douban/setting/model/FileSuggest.ts var import_obsidian33 = __toModule(require("obsidian")); var FileSuggest = class extends TextInputSuggest { getSuggestions(inputStr) { const abstractFiles = this.app.vault.getAllLoadedFiles(); const files = []; const lowerCaseInputStr = inputStr.toLowerCase(); abstractFiles.forEach((file) => { if (file instanceof import_obsidian33.TFile && file.extension === "md" && file.path.toLowerCase().contains(lowerCaseInputStr)) { files.push(file); } }); return files; } renderSuggestion(file, el) { el.setText(file.path); } selectSuggestion(file) { this.inputEl.value = file.path; this.inputEl.trigger("input"); this.close(); } }; // src/org/wanxp/douban/component/DoubanSyncModal.ts var DoubanSyncModal = class extends import_obsidian34.Modal { constructor(app, plugin, context) { super(app); this.plugin = plugin; this.context = context; } onOpen() { let { contentEl } = this; this.show(contentEl); } show(contentEl) { contentEl.empty(); if (this.plugin.statusHolder.syncing()) { this.showSyncStatus(contentEl); } else { this.showSyncConfig(contentEl); } } showSyncStatus(contentEl) { const { syncStatus } = this.plugin.statusHolder; const { syncConfig } = syncStatus; contentEl.createEl("h3", { text: i18nHelper.getMessage("500002") }); this.showConfigPan(contentEl.createDiv("config"), syncConfig, true); const sliderDiv = contentEl.createEl("div"); sliderDiv.addClass("obsidian_douban_sync_slider"); const controls = contentEl.createDiv("controls"); const stopButton = new import_obsidian34.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110009")).onClick(() => __async(this, null, function* () { this.close(); yield this.plugin.statusHolder.stopSync(); })); const backgroundButton = new import_obsidian34.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110010")).onClick(() => { this.close(); }); this.showProgress(sliderDiv, backgroundButton, stopButton); this.timer = setInterval(() => { this.showProgress(sliderDiv, backgroundButton, stopButton); }, 1e3); backgroundButton.setClass("obsidian_douban_status_button"); stopButton.setClass("obsidian_douban_status_button"); } showProgress(sliderDiv, backgroundButton, stopButton) { sliderDiv.empty(); new import_obsidian34.Setting(sliderDiv); let progress = sliderDiv.createDiv("progress"); const { syncStatus } = this.plugin.statusHolder; if (!this.plugin.statusHolder.syncStarted) { progress.innerHTML = `

    ${syncStatus.getHasHandle()}/${syncStatus.getTotal()}:${i18nHelper.getMessage("110036")}

    ${i18nHelper.getMessage("110090", syncStatus.getTypeName(), syncStatus.getScopeName(), syncStatus.getAllTotal(), syncStatus.getTotal())}

    ${syncStatus.getMessage()}

    `; backgroundButton.setDisabled(true); stopButton.setButtonText(i18nHelper.getMessage("110036")); return; } progress.innerHTML = `

    ${syncStatus.getTotal() == 0 ? i18nHelper.getMessage("110043") : syncStatus.getHasHandle() + "/" + syncStatus.getTotal()} ${syncStatus.getHandle() == 0 ? "..." : i18nHelper.getMessage("110042") + ":" + TimeUtil.estimateTimeMsg(syncStatus.getNeedHandled() - syncStatus.getHandle(), syncStatus.getOverSize())}

    ${i18nHelper.getMessage("110090", syncStatus.getTypeName(), syncStatus.getScopeName(), syncStatus.getAllTotal(), syncStatus.getTotal())}

    ${syncStatus.getMessage()}

    `; } showSyncConfig(contentEl) { if (this.timer != null) { (0, import_timers.clearInterval)(this.timer); } contentEl.createEl("h3", { text: i18nHelper.getMessage("500001") }); const { settings } = this.plugin; let syncConfig = { syncType: SyncType.movie, scope: ALL, force: false, dataFilePath: settings.dataFilePath == "" || settings.dataFilePath == null ? DEFAULT_SETTINGS.dataFilePath : settings.dataFilePath, dataFileNamePath: settings.dataFileNamePath == "" || settings.dataFileNamePath == null ? DEFAULT_SETTINGS.dataFileNamePath : settings.dataFileNamePath, cacheImage: settings.cacheImage == null ? DEFAULT_SETTINGS.cacheImage : settings.cacheImage, cacheHighQuantityImage: settings.cacheHighQuantityImage == null ? DEFAULT_SETTINGS.cacheHighQuantityImage : settings.cacheHighQuantityImage, attachmentPath: settings.attachmentPath == "" || settings.attachmentPath == null ? DEFAULT_SETTINGS.attachmentPath : settings.attachmentPath, attachmentFileName: settings.attachmentFileName == "" || settings.attachmentFileName == null ? DEFAULT_SETTINGS.attachmentFileName : settings.attachmentFileName, templateFile: settings.movieTemplateFile == "" || settings.movieTemplateFile == null ? DEFAULT_SETTINGS.movieTemplateFile : settings.movieTemplateFile, incrementalUpdate: true, syncConditionType: SyncConditionType.ALL, syncConditionDateFromValue: TimeUtil.getLastMonth(), syncConditionDateToValue: new Date(), syncConditionCountFromValue: 1, syncConditionCountToValue: 30 }; this.showConfigPan(contentEl.createDiv("config"), syncConfig, false); const controls = contentEl.createDiv("controls"); const cancelButton = new import_obsidian34.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110005")).onClick(() => { this.close(); }); const syncButton = new import_obsidian34.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110007")).onClick(() => __async(this, null, function* () { if (!(yield this.plugin.checkLogin(this.context))) { return; } syncButton.setDisabled(true); if (!this.plugin.statusHolder.startSync(syncConfig)) { return; } this.updateContextByConfig(syncConfig); this.show(contentEl); yield this.plugin.sync(this.context); })); syncButton.setClass("obsidian_douban_search_button"); cancelButton.setClass("obsidian_douban_search_button"); } updateContextByConfig(syncConfig) { const { context } = this; context.syncConfig = syncConfig; context.syncActive = true; } showConfigPan(contentEl, config, disable) { new import_obsidian34.Setting(contentEl); this.showTypeDropdown(contentEl, config, disable); this.showCondition(contentEl, config, disable); this.showUpdateAllConfig(contentEl, config, disable); this.showForceUpdateConfig(contentEl, config, disable); } onClose() { return __async(this, null, function* () { let { contentEl } = this; contentEl.empty(); if (this.timer != null) { (0, import_timers.clearInterval)(this.timer); } }); } openScopeDropdown(contentEl, config, disable) { switch (config.syncType) { case SyncType.movie: this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_MOVIE_SYNC, config, disable); break; case SyncType.book: this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_BOOK_SYNC, config, disable); break; case SyncType.broadcast: this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_BROADCAST_SYNC, config, disable); break; case SyncType.note: this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_NOTE_SYNC, config, disable); break; case SyncType.music: this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_MUSIC_SYNC, config, disable); break; case SyncType.teleplay: this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_TELEPLAY_SYNC, config, disable); break; case SyncType.game: config.scope = DoubanSubjectState.collect; this.showScopeDropdown(contentEl, DoubanSubjectStateRecords_GAME_SYNC, config, disable); break; } } showTypeDropdown(containerEl, config, disable) { const settings = new import_obsidian34.Setting(containerEl); const scopeSelections = containerEl.createDiv("scope-selection"); settings.setName(i18nHelper.getMessage("110030")).addDropdown((dropdown) => { dropdown.addOptions(SyncTypeRecords).setValue(config.syncType).onChange((value) => { config.syncType = value; config.templateFile = this.getDefaultTemplatePath(value); this.openScopeDropdown(scopeSelections, config, disable); }); }).setDisabled(disable); this.openScopeDropdown(scopeSelections, config, disable); } getDefaultTemplatePath(value) { let result = ""; const { settings } = this.plugin; switch (value) { case SyncType.movie: result = settings.movieTemplateFile == "" || settings.movieTemplateFile == null ? DEFAULT_SETTINGS.movieTemplateFile : settings.movieTemplateFile; break; case SyncType.book: result = settings.bookTemplateFile == "" || settings.bookTemplateFile == null ? DEFAULT_SETTINGS.bookTemplateFile : settings.bookTemplateFile; break; case SyncType.music: result = settings.musicTemplateFile == "" || settings.musicTemplateFile == null ? DEFAULT_SETTINGS.musicTemplateFile : settings.musicTemplateFile; break; case SyncType.teleplay: result = settings.teleplayTemplateFile == "" || settings.teleplayTemplateFile == null ? DEFAULT_SETTINGS.teleplayTemplateFile : settings.teleplayTemplateFile; break; case SyncType.game: result = settings.gameTemplateFile == "" || settings.gameTemplateFile == null ? DEFAULT_SETTINGS.gameTemplateFile : settings.gameTemplateFile; break; } return result; } showScopeDropdown(containerEl, scopeSelections, config, disable) { containerEl.empty(); new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("110032")).addDropdown((dropdown) => { dropdown.addOptions(scopeSelections); dropdown.setValue(config.scope).onChange((value) => __async(this, null, function* () { config.scope = value; })); }).setDisabled(disable); } showOutiFleName(containerEl, config, disable) { const dataFilePathSetting = new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("121601")).setDesc(i18nHelper.getMessage("121602")).addText((textField) => { textField.setPlaceholder(i18nHelper.getMessage("121602")).setValue(config.dataFileNamePath).onChange((value) => __async(this, null, function* () { config.dataFileNamePath = value; })); }).setDisabled(disable); } showOutputFolderSelections(containerEl, config, disable) { new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("121501")).setDesc(i18nHelper.getMessage("121502")).addSearch((search) => __async(this, null, function* () { new FolderSuggest(this.app, search.inputEl); search.setValue(config.dataFilePath).setPlaceholder(i18nHelper.getMessage("121503")).onChange((value) => __async(this, null, function* () { config.dataFilePath = value; })); })).setDisabled(disable); } showTemplateFileSelectionSetting(containerEl, config, disable) { containerEl.empty(); const key = this.getKey(config.syncType); let setting = new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("121101")).setDesc(i18nHelper.getMessage("121102")).addSearch((search) => __async(this, null, function* () { new FileSuggest(this.app, search.inputEl); search.setValue(config.templateFile).onChange((value) => __async(this, null, function* () { config.templateFile = value; })); })).setDisabled(disable); setting.addExtraButton((button) => { button.setIcon("copy").setTooltip(i18nHelper.getMessage("121903")).onClick(() => __async(this, null, function* () { navigator.clipboard.writeText(getDefaultTemplateContent(key)); })); }); setting.addExtraButton((button) => { button.setIcon("document").setTooltip(i18nHelper.getMessage("121901")).onClick(() => __async(this, null, function* () { navigator.clipboard.writeText(getDefaultTemplateContent(key, false)); })); }); } getKey(supportType) { return supportType + "TemplateFile"; } showForceUpdateConfig(containerEl, config, disable) { new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("110031")).setDesc(i18nHelper.getMessage("500110")).addToggle((toggleComponent) => { toggleComponent.setValue(config.force).onChange((value) => __async(this, null, function* () { config.force = value; })); }).setDisabled(disable); } showAttachmentsFileConfig(containerEl, config, disable) { const settings = new import_obsidian34.Setting(containerEl); let attachmentFileEl = containerEl.createDiv("attachment-file-path-selection"); settings.setName(i18nHelper.getMessage("121430")).setDesc(i18nHelper.getMessage("121431")).addToggle((toggleComponent) => { toggleComponent.setValue(config.cacheImage).onChange((value) => __async(this, null, function* () { config.cacheImage = value; this.showAttachmentPathSelections(value, attachmentFileEl, config, disable); })); }).setDisabled(disable); this.showAttachmentPathSelections(config.cacheImage, attachmentFileEl, config, disable); } showAttachmentPathSelections(show, containerEl, config, disable) { containerEl.empty(); if (!show) { return; } new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("121432")).setDesc(i18nHelper.getMessage("121433")).addSearch((search) => __async(this, null, function* () { new FolderSuggest(this.plugin.app, search.inputEl); search.setValue(config.attachmentPath).setPlaceholder(i18nHelper.getMessage("121434")).onChange((value) => __async(this, null, function* () { config.attachmentPath = value; })); })).setDisabled(disable); new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("121452")).setDesc(i18nHelper.getMessage("121453")).addSearch((search) => __async(this, null, function* () { new FolderSuggest(this.plugin.app, search.inputEl); search.setValue(config.attachmentFileName).setPlaceholder(i18nHelper.getMessage("121454")).onChange((value) => __async(this, null, function* () { config.attachmentFileName = value; })); })).setDisabled(disable); new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("121435")).setDesc(i18nHelper.getMessage("121438")).addToggle((toggleComponent) => { toggleComponent.setValue(config.cacheHighQuantityImage).onChange((value) => __async(this, null, function* () { config.cacheHighQuantityImage = value; })); }).setDisabled(disable); } showUpdateAllConfig(containerEl, config, disable) { new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("110039")).setDesc(i18nHelper.getMessage("110040")).addToggle((toggleComponent) => { toggleComponent.setTooltip(i18nHelper.getMessage("110040")).setValue(config.incrementalUpdate).onChange((value) => __async(this, null, function* () { config.incrementalUpdate = value; })); }).setDisabled(disable); } showCondition(contentEl, config, disable) { showConditionItem(contentEl.createDiv("sync-douban-condition"), this.plugin.settingsManager, config, disable); } }; function showConditionItem(containerEl, manager, config, disable) { containerEl.empty(); const condition = new import_obsidian34.Setting(containerEl).setName(i18nHelper.getMessage("110070")); const conditionDesc = condition.descEl.createDiv("sync-douban-condition-desc"); new import_obsidian34.DropdownComponent(conditionDesc).addOptions(SyncConditionTypeRecords).setValue(config.syncConditionType).onChange((value) => { config.syncConditionType = value; showConditionItem(containerEl, manager, config, disable); }).setDisabled(disable); showConditionItemInput(conditionDesc, config, disable); } function showConditionItemInput(containerEl, config, disable) { if (config.syncConditionType == SyncConditionType.CUSTOM_ITEM) { showCustomInputCount(containerEl, config, disable); } else if (config.syncConditionType == SyncConditionType.CUSTOM_TIME) { showCustomInputTime(containerEl, config, disable); } } function showCustomInputCount(containerEl, config, disable) { containerEl.createEl("span", { text: " " }); containerEl.createEl("span", { text: i18nHelper.getMessage("110077") }); containerEl.createEl("span", { text: i18nHelper.getMessage("110078") }); const fromField = new import_obsidian34.TextComponent(containerEl); fromField.setPlaceholder(i18nHelper.getMessage("110080")).setValue(config.syncConditionCountFromValue + "").onChange((value) => __async(this, null, function* () { if (!value) { config.syncConditionCountFromValue = 1; return; } try { config.syncConditionCountFromValue = parseInt(value); } catch (e) { log.notice(i18nHelper.getMessage("112080")); } })).setDisabled(disable); let fromEl = fromField.inputEl; fromEl.addClass("obsidian_douban_settings_input"); fromEl.style.width = "20%"; containerEl.appendChild(fromEl); const lang = window.localStorage.getItem("language"); if (lang == "zh") { containerEl.createEl("span", { text: i18nHelper.getMessage("110073") }); } containerEl.createEl("span", { text: i18nHelper.getMessage("110079") }); containerEl.createEl("span", { text: i18nHelper.getMessage("110078") }); const toField = new import_obsidian34.TextComponent(containerEl); toField.setPlaceholder(i18nHelper.getMessage("110080")).setValue(config.syncConditionCountToValue + "").onChange((value) => __async(this, null, function* () { if (!value) { config.syncConditionCountToValue = 30; return; } try { config.syncConditionCountToValue = parseInt(value); } catch (e) { log.notice(i18nHelper.getMessage("112080")); } })).setDisabled(disable); let toEl = toField.inputEl; toEl.addClass("obsidian_douban_settings_input"); toEl.style.width = "20%"; containerEl.appendChild(toEl); if (lang == "zh") { containerEl.createEl("span", { text: i18nHelper.getMessage("110073") }); } containerEl.createEl("span", { text: " " }); const buttopn = new import_obsidian34.ButtonComponent(containerEl).setIcon("help").setTooltip(i18nHelper.getMessage("110095")); containerEl.appendChild(buttopn.buttonEl); } function showCustomInputTime(containerEl, config, disable) { containerEl.createEl("span", { text: i18nHelper.getMessage("110077") }); const fromDateField = new import_obsidian34.TextComponent(containerEl); const fromDateEl = fromDateField.inputEl; fromDateEl.type = "date"; fromDateEl.value = config.syncConditionDateFromValue ? config.syncConditionDateFromValue.toISOString().substring(0, 10) : TimeUtil.getLastMonth().toISOString().substring(0, 10); fromDateField.setPlaceholder(i18nHelper.getMessage("110075")).setValue(config.syncConditionDateFromValue ? config.syncConditionDateFromValue.toISOString().substring(0, 10) : TimeUtil.getLastMonth().toISOString().substring(0, 10)).onChange((value) => __async(this, null, function* () { if (!value) { return; } try { config.syncConditionDateFromValue = new Date(value); } catch (e) { log.notice(i18nHelper.getMessage("110082")); } })).setDisabled(disable); fromDateEl.addClass("obsidian_douban_settings_input"); containerEl.appendChild(fromDateEl); containerEl.createEl("span", { text: i18nHelper.getMessage("110079") }); const toDateField = new import_obsidian34.TextComponent(containerEl); let toDateEl = toDateField.inputEl; toDateEl.type = "date"; toDateEl.value = config.syncConditionDateToValue ? config.syncConditionDateToValue.toISOString().substring(0, 10) : new Date().toISOString().substring(0, 10); toDateField.setPlaceholder(i18nHelper.getMessage("110075")).setValue(config.syncConditionDateToValue ? config.syncConditionDateToValue.toISOString().substring(0, 10) : new Date().toISOString().substring(0, 10)).onChange((value) => __async(this, null, function* () { if (!value) { return; } try { config.syncConditionDateToValue = new Date(value); } catch (e) { log.notice(i18nHelper.getMessage("110082")); } })).setDisabled(disable); toDateEl.addClass("obsidian_douban_settings_input"); containerEl.appendChild(toDateEl); new import_obsidian34.ButtonComponent(containerEl).setIcon("help").setTooltip(i18nHelper.getMessage("110095")); } // src/org/wanxp/file/FileHandler.ts var import_obsidian35 = __toModule(require("obsidian")); var FileHandler = class { constructor(app) { this._app = app; } createDirectory(dir) { return __async(this, null, function* () { const { vault } = this._app; const { adapter: adapter2 } = vault; const root2 = vault.getRoot().path; const directoryPath = FileUtil.join(dir); const directoryExists = yield adapter2.exists(directoryPath); if (!import_obsidian35.Platform.isIosApp) { if (!directoryExists) { return adapter2.mkdir((0, import_obsidian35.normalizePath)(directoryPath)); } } const subPaths = (0, import_obsidian35.normalizePath)(directoryPath).split("/").filter((part) => part.trim() !== "").map((_, index2, arr) => arr.slice(0, index2 + 1).join("/")); for (const subPath of subPaths) { const directoryExists2 = yield adapter2.exists(FileUtil.join(root2, subPath)); if (!directoryExists2) { yield adapter2.mkdir(FileUtil.join(root2, subPath)); } } }); } creatAttachmentWithData(originalFilePath, data2) { return __async(this, null, function* () { const { vault } = this._app; const { adapter: adapter2 } = vault; const prependDirInput = FileUtil.join("", originalFilePath); const { dir, name } = FileUtil.parse(prependDirInput); const filePath = FileUtil.join(dir, `${name}`); try { const fileExists = yield adapter2.exists(filePath); if (fileExists) { return; } if (dir !== "") { yield this.createDirectory(dir); } yield vault.createBinary(filePath, data2); } catch (error) { log.error(error.toString(), error); } }); } createNewNote(originalFilePath) { return __async(this, null, function* () { this.createNewNoteWithData(originalFilePath, ""); }); } createNewNoteWithData(originalFilePath, data2, showAfterCreate = false, showExistsError = true) { return __async(this, null, function* () { const { vault } = this._app; const { adapter: adapter2 } = vault; const prependDirInput = FileUtil.join("", originalFilePath); const { dir, name } = FileUtil.parse(prependDirInput); const filePath = FileUtil.join(dir, `${name}.md`); const fileExists = yield adapter2.exists(filePath); if (fileExists) { if (!showExistsError) { return false; } throw new Error(i18nHelper.getMessage("110201").replace("{0}", filePath != null ? filePath : "")); } if (dir !== "") { yield this.createDirectory(dir); } const File = yield vault.create(filePath, data2); if (showAfterCreate) { const leaf = this._app.workspace.getLeaf(true); yield leaf.openFile(File); } return true; }); } createOrReplaceNewNoteWithData(originalFilePath, data2, showAfterSuccess = false) { return __async(this, null, function* () { const { vault } = this._app; const { adapter: adapter2 } = vault; const prependDirInput = FileUtil.join("", originalFilePath); const { dir, name } = FileUtil.parse(prependDirInput); const filePath = FileUtil.join(dir, `${name}.md`); const fileExists = yield adapter2.exists(filePath); let File = null; if (fileExists) { File = vault.getMarkdownFiles().find((f) => f.path == filePath); yield vault.modify(File, data2); } else { if (dir !== "") { yield this.createDirectory(dir); } File = yield vault.create(filePath, data2); } if (showAfterSuccess) { const leaf = this._app.workspace.getRightLeaf(true); yield leaf.openFile(File); } return fileExists; }); } getFileContent(filePath) { return __async(this, null, function* () { const { metadataCache, vault } = this._app; const normalizedTemplatePath = (0, import_obsidian35.normalizePath)(filePath != null ? filePath : ""); if (filePath === "/") { return Promise.resolve(""); } try { const file = metadataCache.getFirstLinkpathDest(normalizedTemplatePath, ""); return file ? vault.cachedRead(file) : ""; } catch (err) { console.error(`Failed to read the daily note template '${normalizedTemplatePath}'`, err); log.error(i18nHelper.getMessage("110202").replace("{0}", normalizedTemplatePath != null ? normalizedTemplatePath : ""), err); return ""; } }); } deleteFile(filePath) { return __async(this, null, function* () { const { vault } = this._app; const { adapter: adapter2 } = vault; const fileExists = yield adapter2.exists(filePath); if (fileExists) { yield adapter2.remove(filePath); } }); } getRootPath() { const { vault } = this._app; return vault.getRoot().path; } getTmpPath() { return FileUtil.join(".tmp", "obsidian-douban"); } }; // src/org/wanxp/douban/model/GlobalStatusHolder.ts var import_obsidian36 = __toModule(require("obsidian")); // src/org/wanxp/douban/sync/model/SyncStatusHolder.ts var SyncStatusHolder = class { constructor(syncConfig) { this.syncResultMap = new Map(); this.statusHandleMap = new Map([ [SyncItemStatus.exists, 0], [SyncItemStatus.replace, 0], [SyncItemStatus.create, 0], [SyncItemStatus.fail, 0], [SyncItemStatus.failByDiffType, 0], [SyncItemStatus.unHandle, 0] ]); this.message = ""; this.syncConfig = syncConfig; this.total = 0; this.handle = 0; this.needHandled = 0; this.key = this.getKey(syncConfig); } handled(num) { this.handle = this.handle + num; } totalNum(num) { this.total = num; } getTotal() { return this.total; } getHandle() { return this.handle; } getAllTotal() { return this.allTotal; } setAllTotal(allTotal) { this.allTotal = allTotal; } getHasHandle() { return this.handle; } setNeedHandled(needHandled) { this.needHandled = needHandled; } getNeedHandled() { return this.needHandled; } replace(id, title) { this.putToHandled(id, title); this.updateResult(id, title, SyncItemStatus.replace); } exists(id, title) { this.putToHandled(id, title); this.updateResult(id, title, SyncItemStatus.exists); } unHandle(id, title) { this.updateResult(id, title, SyncItemStatus.unHandle); } create(id, title) { this.putToHandled(id, title); this.updateResult(id, title, SyncItemStatus.create); } fail(id, title) { this.updateResult(id, title, SyncItemStatus.fail); } failByDiffType(id, title) { this.updateResult(id, title, SyncItemStatus.failByDiffType); } updateResult(id, title, status) { this.syncResultMap.set(id, { id, title, status }); this.statusHandleMap.set(status, this.statusHandleMap.get(status) + 1); this.handled(1); } setTotal(total) { this.totalNum(total); } putToHandled(id, title) { if (!this.handledData) { this.handledData = new Map(); } const { key } = this; if (!this.handledData.has(key)) { this.handledData.set(key, new Set()); } this.handledData.get(key).add(id); } shouldSync(id) { return this.handledData.get(this.key) ? !this.handledData.get(this.key).has(id) : true; } getKey(syncConfig) { const type = syncConfig.syncType ? syncConfig.syncType : ""; const scope = syncConfig.scope ? syncConfig.scope : ""; const path = syncConfig.dataFilePath ? syncConfig.dataFilePath : ""; return `${path}+${type}+${scope}`; } getOverSize() { return this.getNeedHandled() > BasicConst.SLOW_SIZE; } initSyncHandledData(data2) { this.handledData = new Map(); const { handledData } = this; data2.forEach((d) => { handledData.set(d.key, new Set(d.value)); }); if (!this.syncConfig.incrementalUpdate) { this.resetSyncHandledData(); } this.resetTypeOtherSyncHandledData(); } resetSyncHandledData() { return this.handledData.set(this.key, new Set()); } resetTypeOtherSyncHandledData() { this.handledData.forEach((value, key) => { if (this.needClearByKey(this.key, key)) { value.clear(); } }); } needClearByKey(handleKey, savedKey) { if (handleKey == savedKey) { return false; } let handledKeys = handleKey.split("+"); let savedKeys = savedKey.split("+"); handledKeys = handledKeys != null ? handledKeys : [""]; savedKeys = savedKeys != null ? savedKeys : [""]; if (handledKeys[0] == savedKeys[0]) { return true; } return false; } setMessage(s) { this.message = s; } getMessage() { return this.message; } getScopeName() { return DoubanSubjectStateRecords_SYNC[this.syncConfig.syncType][this.syncConfig.scope]; } getTypeName() { return SyncTypeRecords[this.syncConfig.syncType]; } getSyncConditionName() { return SyncConditionTypeRecords[this.syncConfig.syncConditionType]; } }; // src/org/wanxp/douban/model/GlobalStatusHolder.ts var GlobalStatusHolder = class { constructor(app, plugin) { this._app = app; this._plugin = plugin; } completeSync() { return __async(this, null, function* () { this.syncStarted = false; yield this.saveHandledData(); }); } startSync(syncConfigOut) { if (this.syncStarted) { const { syncConfig } = this.syncStatus; new import_obsidian36.Notice(i18nHelper.getMessage("110008"), SyncTypeRecords[syncConfig.syncType], DoubanSubjectState[syncConfig.scope]); return false; } this.syncStatus = new SyncStatusHolder(syncConfigOut); this.syncStarted = true; this.syncStartTime = new Date().getTime(); return true; } stopSync() { this.syncStarted = false; } syncing() { return this.syncStarted; } initHandledData() { return __async(this, null, function* () { this.syncStatus.initSyncHandledData(this._plugin.settings.syncHandledDataArray); }); } saveHandledData() { return __async(this, null, function* () { if (!this.syncStatus || !this.syncStatus.handledData) { return; } const data2 = []; this.syncStatus.handledData.forEach((value, key) => { data2.push({ key, value: Array.from(value) }); }); this._plugin.settings.syncHandledDataArray = data2; yield this._plugin.saveSettings(); }); } onunload() { return __async(this, null, function* () { yield this.saveHandledData(); }); } }; // src/org/wanxp/utils/ClipboardUtil.ts var ClipboardUtil = class { static writeImage(_0) { return __async(this, arguments, function* (data2, options = defaultClipboardOptions) { if (!data2 || data2.byteLength == 0) { throw new Error(i18nHelper.getMessage("130110")); } const { clipboard, nativeImage } = require("electron"); const isWebp = this.isWebp(data2); let image = nativeImage.createFromBuffer(Buffer.from(data2)); if ((!image || image.isEmpty()) && isWebp) { image = yield this.createNativeImageFromWebp(data2); } if (!image || image.isEmpty()) { throw new Error(i18nHelper.getMessage("130110")); } clipboard.clear(); clipboard.writeImage(image); yield new Promise((resolve) => setTimeout(resolve, 100)); const clipboardImage = clipboard.readImage(); if (!clipboardImage || clipboardImage.isEmpty()) { throw new Error(i18nHelper.getMessage("130110")); } console.log(`Copied to clipboard as HTML`); }); } static isWebp(data2) { const bytes = new Uint8Array(data2); if (bytes.length < 12) { return false; } return bytes[0] === 82 && bytes[1] === 73 && bytes[2] === 70 && bytes[3] === 70 && bytes[8] === 87 && bytes[9] === 69 && bytes[10] === 66 && bytes[11] === 80; } static createNativeImageFromWebp(data2) { return __async(this, null, function* () { const { nativeImage } = require("electron"); const imageElement = yield this.loadImage(URL.createObjectURL(new Blob([data2], { type: "image/webp" }))); try { const canvas = document.createElement("canvas"); canvas.width = imageElement.naturalWidth || imageElement.width; canvas.height = imageElement.naturalHeight || imageElement.height; const context = canvas.getContext("2d"); if (!context) { throw new Error(i18nHelper.getMessage("130110")); } context.drawImage(imageElement, 0, 0); return nativeImage.createFromDataURL(canvas.toDataURL("image/png")); } finally { imageElement.src = ""; } }); } static loadImage(url) { return new Promise((resolve, reject) => { const image = new Image(); image.onload = () => { URL.revokeObjectURL(url); resolve(image); }; image.onerror = () => { URL.revokeObjectURL(url); reject(new Error(i18nHelper.getMessage("130110"))); }; image.src = url; }); } }; var defaultClipboardOptions = { contentType: "text/plain" }; // src/org/wanxp/net/NetFileHandler.ts var NetFileHandler = class { constructor(fileHandler) { this.fileHandler = fileHandler; } downloadDBFile(url, folder, filename, context, showError, headers) { return __async(this, null, function* () { const filePath = FileUtil.join(folder, filename); return HttpUtil.httpRequestBuffer(url, headers, context.plugin.settingsManager).then((response) => { if (response.status == 404) { throw new Error(i18nHelper.getMessage("130404")); } if (response.status == 403) { throw new Error(i18nHelper.getMessage("130106")); } if (response.status == 418) { throw new Error(i18nHelper.getMessage("130105")); } return response.textArrayBuffer; }).then((buffer) => { if (!buffer || buffer.byteLength == 0) { return 0; } this.fileHandler.creatAttachmentWithData(filePath, buffer); return buffer.byteLength; }).then((size) => { if (size == 0) { return { success: false, size, error: "\u6587\u4EF6\u552F\u6050", filepath: null }; } return { success: true, size, error: "", filepath: filePath }; }).catch((e) => { if (showError) { return log.error(i18nHelper.getMessage("130101").replace("{0}", e.toString()), e); } else { console.error(e); } }); ; }); } downloadDBUploadPicGoByClipboard(url, filename, context, showError, headers) { return __async(this, null, function* () { return HttpUtil.httpRequestBuffer(url, headers, context.plugin.settingsManager).then((response) => { if (response.status == 404) { throw new Error(i18nHelper.getMessage("130404")); } if (response.status == 403) { throw new Error(i18nHelper.getMessage("130106")); } if (response.status == 418) { throw new Error(i18nHelper.getMessage("130105")); } return response.textArrayBuffer; }).then((buffer) => __async(this, null, function* () { if (!buffer || buffer.byteLength == 0) { throw new Error(i18nHelper.getMessage("130109")); } yield ClipboardUtil.writeImage(buffer); return yield this.uploadClipboardFile(context); })).then((data2) => { if (data2.success) { return { success: true, error: "", filepath: HttpUtil.extractURLFromString(data2.result[0]) }; } else { throw new Error("\u56FE\u7247\u4E0A\u4F20\u56FE\u5E8A\u5931\u8D25,\u4F7F\u7528\u539F\u59CB\u56FE\u7247\u5730\u5740\uFF0C\u9519\u8BEF\u6D88\u606F:" + data2.message); } }).catch((e) => { if (showError) { return log.error(i18nHelper.getMessage("130101").replace("{0}", e.toString()), e); } else { console.error(e); } }); ; }); } uploadClipboardFile(context) { return __async(this, null, function* () { const response = yield HttpUtil.httpRequest(context.settings.pictureBedSetting.url, {}, context.plugin.settingsManager, { method: "post" }); const data2 = response.textJson; return data2; }); } downloadDBUploadPicGoByClipboardBefore(context) { return __async(this, null, function* () { try { const response = yield HttpUtil.httpRequest(HttpUtil.replaceUrlPath(context.settings.pictureBedSetting.url, "/heartbeat"), {}, context.plugin.settingsManager, { method: "post" }); const data2 = response.textJson; return data2 ? data2.success : false; } catch (e) { return false; } }); } }; // src/org/wanxp/douban/setting/SettingsManager.ts var SettingsManager = class { constructor(app, plugin) { this.cleanupFns = []; this.innerLogger = new Logger(); this.app = app; this.plugin = plugin; this.settings = plugin.settings; } getSettingWithDefault(key) { return [this.settings[key], DEFAULT_SETTINGS[key]]; } getSetting(key) { return this.settings[key]; } getHeaders() { if (this.settings.loginHeadersContent) { return JSON.parse(this.settings.loginHeadersContent); } else if (this.settings.loginCookiesContent) { return __spreadValues({ Cookie: this.settings.loginCookiesContent }, DEFAULT_DOUBAN_HEADERS); } else { return DEFAULT_DOUBAN_HEADERS; } } getHeadersByCookie(cookie) { if (cookie) { return __spreadProps(__spreadValues({}, DEFAULT_DOUBAN_HEADERS), { Cookie: cookie }); } else { return DEFAULT_DOUBAN_HEADERS; } } updateSetting(key, value) { return __async(this, null, function* () { this.settings[key] = value; yield this.plugin.saveSettings(); }); } debug(message) { if (this.settings.debugMode) { return this.innerLogger.debug(message); } else { return message; } } updateCookieTemp(cookie) { this.cookieTemp = cookie; } getCookieTemp() { return this.cookieTemp; } getSelector(itemType, propertyName) { if (this.onlineSettings && this.onlineSettings.properties) { const doubanPluginSubjectProperty2 = this.onlineSettings.properties.find((subjectProperty) => subjectProperty.type === itemType && subjectProperty.name === propertyName); if (doubanPluginSubjectProperty2) { return doubanPluginSubjectProperty2.selectors; } } const doubanPluginSubjectProperty = ONLINE_SETTING_DEFAULT.properties.find((subjectProperty) => subjectProperty.type === itemType && subjectProperty.name === propertyName); if (doubanPluginSubjectProperty) { return doubanPluginSubjectProperty.selectors; } return []; } handleArray(arr, arraySetting) { let result = StringUtil.handleArray(arr, arraySetting); return HtmlUtil.strToHtml(result); } updateArraySetting(arraySetting) { return __async(this, null, function* () { if (arraySetting.arrayName == DEFAULT_SETTINGS_ARRAY_NAME) { this.settings.arrayStart = arraySetting.arrayStart; this.settings.arrayElementStart = arraySetting.arrayElementStart; this.settings.arraySpiltV2 = arraySetting.arraySpiltV2; this.settings.arrayElementEnd = arraySetting.arrayElementEnd; this.settings.arrayEnd = arraySetting.arrayEnd; } else { const index2 = this.settings.arraySettings.findIndex((as) => as.arrayName == arraySetting.arrayName); if (index2 == -1) { this.settings.arraySettings.push(arraySetting); } else { this.settings.arraySettings[index2] = arraySetting; } } yield this.plugin.saveSettings(); }); } removeArraySetting(arrayName) { return __async(this, null, function* () { if (arrayName == DEFAULT_SETTINGS_ARRAY_NAME) { return; } else { this.settings.arraySettings = this.settings.arraySettings.filter((arraySetting) => arraySetting.arrayName !== arrayName); } yield this.plugin.saveSettings(); }); } getArraySetting(arrayName) { if (!this.settings.arraySettings) { this.settings.arraySettings = []; } if (arrayName == DEFAULT_SETTINGS_ARRAY_NAME) { return this.getDefaultArraySetting(DEFAULT_SETTINGS_ARRAY_NAME, 0); } else { const arraySetting = this.settings.arraySettings.find((arraySetting2) => arraySetting2.arrayName == arrayName); if (arraySetting) { return arraySetting; } } return null; } getDefaultArraySetting(arrayName, index2) { return { arrayName, arrayStart: this.settings.arrayStart, arrayElementStart: this.settings.arrayElementStart, arraySpiltV2: this.settings.arraySpiltV2, arrayElementEnd: this.settings.arrayElementEnd, arrayEnd: this.settings.arrayEnd, index: index2 }; } addArraySetting() { return __async(this, null, function* () { const index2 = this.settings.arraySettings.length + 1; const arraySetting = this.getDefaultArraySetting(ARRAY_NAME_PREFIX_NAME + index2, index2); this.settings.arraySettings.push(arraySetting); yield this.plugin.saveSettings(); return arraySetting; }); } getSettingStr(field) { const setting = this.getSetting(field); if (setting) { if (typeof setting == "string") { return setting; } else { return setting.toString(); } } return ""; } getSettingBoolean(field) { const setting = this.getSetting(field); if (setting) { if (typeof setting == "boolean") { return setting; } else { return !!setting; } } return false; } resetSetting() { this.settings.scoreSetting = DEFAULT_SETTINGS.scoreSetting; this.settings.arraySettings = DEFAULT_SETTINGS.arraySettings; this.settings.arrayLengthLimits = [...DEFAULT_SETTINGS.arrayLengthLimits]; this.settings.arrayStart = DEFAULT_SETTINGS.arrayStart; this.settings.arrayElementStart = DEFAULT_SETTINGS.arrayElementStart; this.settings.arraySpiltV2 = DEFAULT_SETTINGS.arraySpiltV2; this.settings.arrayElementEnd = DEFAULT_SETTINGS.arrayElementEnd; this.settings.arrayEnd = DEFAULT_SETTINGS.arrayEnd; this.settings.attachmentPath = DEFAULT_SETTINGS.attachmentPath; this.settings.bookTemplateFile = DEFAULT_SETTINGS.bookTemplateFile; this.settings.movieTemplateFile = DEFAULT_SETTINGS.movieTemplateFile; this.settings.musicTemplateFile = DEFAULT_SETTINGS.musicTemplateFile; this.settings.noteTemplateFile = DEFAULT_SETTINGS.noteTemplateFile; this.settings.gameTemplateFile = DEFAULT_SETTINGS.gameTemplateFile; this.settings.teleplayTemplateFile = DEFAULT_SETTINGS.teleplayTemplateFile; this.settings.theaterTemplateFile = DEFAULT_SETTINGS.theaterTemplateFile; this.settings.dateFormat = DEFAULT_SETTINGS.dateFormat; this.settings.timeFormat = DEFAULT_SETTINGS.timeFormat; this.settings.searchUrl = DEFAULT_SETTINGS.searchUrl; this.settings.personNameMode = DEFAULT_SETTINGS.personNameMode; this.settings.dataFilePath = DEFAULT_SETTINGS.dataFilePath; this.settings.dataFileNamePath = DEFAULT_SETTINGS.dataFileNamePath; this.settings.statusBar = DEFAULT_SETTINGS.statusBar; this.settings.debugMode = DEFAULT_SETTINGS.debugMode; this.settings.cacheImage = DEFAULT_SETTINGS.cacheImage; this.settings.cacheHighQuantityImage = DEFAULT_SETTINGS.cacheHighQuantityImage; this.settings.showAfterCreate = DEFAULT_SETTINGS.showAfterCreate; } clearLoginInfo() { this.settings.loginCookiesContent = DEFAULT_SETTINGS.loginHeadersContent; this.settings.loginHeadersContent = DEFAULT_SETTINGS.loginHeadersContent; } clearSyncCache() { this.settings.syncHandledDataArray = []; } loadAndSaveSettings(config) { return __async(this, null, function* () { this.validateSettings(config); this.settings = Object.assign({}, config); yield this.plugin.saveSettings(); }); } validateSettings(config) { if (!config) { this.innerLogger.warn(i18nHelper.getMessage("125040")); } } getSettings() { return this.settings; } addArrayLengthLimit() { return __async(this, null, function* () { if (!this.settings.arrayLengthLimits) { this.settings.arrayLengthLimits = []; } const limit = { type: SupportType.all, field: "", limit: 5 }; this.settings.arrayLengthLimits.push(limit); yield this.plugin.saveSettings(); return limit; }); } removeArrayLengthLimit(index2) { return __async(this, null, function* () { if (!this.settings.arrayLengthLimits) { return; } if (index2 < 0 || index2 >= this.settings.arrayLengthLimits.length) { return; } this.settings.arrayLengthLimits.splice(index2, 1); yield this.plugin.saveSettings(); }); } }; // src/org/wanxp/douban/sync/handler/SyncHandler.ts var import_obsidian37 = __toModule(require("obsidian")); // src/org/wanxp/douban/sync/handler/DoubanAbstractSyncHandler.ts function toDateList(dataList) { const dateList = dataList.map((item) => item.updateDate).sort((a, b) => { try { return a.getTime() - b.getTime(); } catch (e) { } return 0; }); return dateList; } var DoubanAbstractSyncHandler = class { constructor(plugin, doubanSubjectLoadHandler, doubanListHandlers) { this.plugin = plugin; this.doubanSubjectLoadHandler = doubanSubjectLoadHandler; this.doubanListHandlers = doubanListHandlers; } support(t) { return this.getSyncType() == t; } sync(syncConfig, context) { return __async(this, null, function* () { if (syncConfig.syncConditionType == SyncConditionType.CUSTOM_TIME) { yield this.syncByTimeLimit(syncConfig, context); } else if (syncConfig.syncConditionType == SyncConditionType.CUSTOM_ITEM) { yield this.syncByCountLimit(syncConfig, context); } else if (syncConfig.syncConditionType == SyncConditionType.ALL) { yield this.syncAll(syncConfig, context); } else if (syncConfig.syncConditionType == SyncConditionType.LAST_THIRTY) { yield this.syncLastThirty(syncConfig, context); } else { log.warn(i18nHelper.getMessage("110083")); } }); } getByTimeLimit(syncConfig, context) { return __async(this, null, function* () { let startDate = syncConfig.syncConditionDateFromValue ? new Date(syncConfig.syncConditionDateFromValue) : null; let endDate = syncConfig.syncConditionDateToValue ? new Date(syncConfig.syncConditionDateToValue) : null; if (!startDate && !endDate) { log.warn(i18nHelper.getMessage("110081")); return; } const cacheList = new Map(); let searchPage = yield this.getItems(syncConfig, context); if (!searchPage) { return; } const total = searchPage.total; const lastPage = total / PAGE_SIZE + 1; if (lastPage == 1) { return searchPage.list; } let leftPage = 1; let startPage = 1; let rightPage = lastPage; let endPage = lastPage; let currentPage = 1; cacheList.set(currentPage, searchPage); if (startDate != null) { do { if (!context.plugin.statusHolder.syncing()) { break; } let page = cacheList.get(currentPage); if (!page) { page = yield this.getItems(syncConfig, context); if (!page) { break; } cacheList.set(currentPage, page); } const pageItems = page.list; const pageDateList = toDateList(pageItems); if (pageDateList[pageDateList.length - 1] >= startDate) { leftPage = currentPage; endPage = currentPage; currentPage = Math.ceil((leftPage + rightPage) / 2); } else { rightPage = currentPage; endPage = currentPage; currentPage = Math.floor((leftPage + rightPage) / 2); } if (currentPage == leftPage || currentPage == rightPage) { break; } } while (currentPage < lastPage); } leftPage = 1; rightPage = lastPage; currentPage = 1; if (endDate != null) { do { if (!context.plugin.statusHolder.syncing()) { break; } let page = cacheList.get(currentPage); if (!page) { page = yield this.getItems(syncConfig, context); if (!page) { break; } cacheList.set(currentPage, page); } const pageItems = page.list; const pageDateList = toDateList(pageItems); if (pageDateList[0] <= endDate) { rightPage = currentPage; startPage = currentPage; currentPage = Math.ceil((leftPage + rightPage) / 2); } else { leftPage = currentPage; startPage = currentPage; currentPage = Math.floor((leftPage + rightPage) / 2); } if (currentPage == leftPage || currentPage == rightPage) { break; } } while (currentPage < lastPage); } let needHandleItems = []; for (let pageNum = startPage; pageNum <= endPage; pageNum++) { if (!context.plugin.statusHolder.syncing()) { break; } let page = cacheList.get(pageNum); if (!page) { page = yield this.getItems(syncConfig, context); if (!page) { break; } cacheList.set(pageNum, page); } const pageItems = page.list; needHandleItems = needHandleItems.concat(pageItems.filter((item) => { const itemDate = item.updateDate; return (!startDate || itemDate >= startDate) && (!endDate || itemDate <= endDate); })); } return needHandleItems; }); } syncByTimeLimit(syncConfig, context) { return __async(this, null, function* () { const items = yield this.getByTimeLimit(syncConfig, context); if (!items || items.length == 0) { return; } let subjectListItems = yield this.removeExists(items, syncConfig, context); const searchPage = new SearchPageTypeOf(subjectListItems.length, 1, subjectListItems.length, null, subjectListItems); yield this.handleItems(searchPage, subjectListItems, context); }); } getItems(syncConfig, context) { return __async(this, null, function* () { const supportHandlers = this.doubanListHandlers.filter((h) => h.support(syncConfig)); const handler = supportHandlers[0]; if (!context.plugin.statusHolder.syncing()) { return SearchPage.emptyWithNoType(); } const item = yield handler.getPageData(context); if (!context.plugin.statusHolder.syncing()) { return SearchPage.emptyWithNoType(); } return item; }); } removeExists(items, syncConfig, context) { return __async(this, null, function* () { if (!context.plugin.statusHolder.syncing()) { return []; } return items; }); } handleItems(searchPage, items, context) { return __async(this, null, function* () { if (!items || items.length == 0) { return; } const { syncStatus } = context.syncStatusHolder; syncStatus.totalNum(searchPage.total); const needHandled = syncStatus.getTotal() - syncStatus.getHasHandle(); syncStatus.setNeedHandled(needHandled); for (const item of items) { if (!context.plugin.statusHolder.syncing()) { return; } try { if (syncStatus.shouldSync(item.id)) { let subject = yield this.doubanSubjectLoadHandler.handle(item.id, context); yield sleepRange(BasicConst.CALL_DOUBAN_DELAY, BasicConst.CALL_DOUBAN_DELAY + BasicConst.CALL_DOUBAN_DELAY_RANGE); } else { syncStatus.unHandle(item.id, item.title); } } catch (e) { log.notice(i18nHelper.getMessage("130120")); } } }); } syncByCountLimit(syncConfig, context) { return __async(this, null, function* () { const { syncConditionCountFromValue, syncConditionCountToValue } = syncConfig; const startOffset = Math.floor((syncConditionCountFromValue - 1) / PAGE_SIZE) * PAGE_SIZE; context.syncOffset = startOffset; let endOffsetNumberForCustom = 0; let needHandleTotalCustomItem = 0; let isFirstStep = true; let handleCount = 0; do { let searchPage = yield this.getItems(syncConfig, context); if (!context.plugin.statusHolder.syncing()) { break; } const { list, total } = searchPage; if (!searchPage || !list || list.length == 0) { break; } if (syncConditionCountFromValue > total) { context.syncStatusHolder.syncStatus.setMessage(i18nHelper.getMessage("130121", total)); break; } if (endOffsetNumberForCustom == 0) { endOffsetNumberForCustom = Math.min(syncConditionCountToValue ? syncConditionCountToValue : searchPage.total, searchPage.total); needHandleTotalCustomItem = endOffsetNumberForCustom - syncConditionCountFromValue + 1; } let subjectListItems = []; if (Math.floor((syncConditionCountFromValue - 1) / PAGE_SIZE) == Math.floor((endOffsetNumberForCustom - 1) / PAGE_SIZE)) { const startIndex = Math.floor((syncConditionCountFromValue - 1) % PAGE_SIZE); const endIndex = Math.floor((endOffsetNumberForCustom - 1) % PAGE_SIZE); subjectListItems = yield this.removeExists(list.slice(startIndex, endIndex + 1), syncConfig, context); handleCount += endIndex - startIndex + 1; } else if (isFirstStep) { const startIndex = (syncConditionCountFromValue - 1) % PAGE_SIZE; handleCount += list.length - startIndex; subjectListItems = yield this.removeExists(list.slice(startIndex), syncConfig, context); isFirstStep = false; } else if (needHandleTotalCustomItem - handleCount <= PAGE_SIZE) { const endIndex = needHandleTotalCustomItem - handleCount; subjectListItems = yield this.removeExists(list.slice(0, endIndex), syncConfig, context); handleCount += endIndex; } else { subjectListItems = yield this.removeExists(list, syncConfig, context); handleCount += PAGE_SIZE; } if (!subjectListItems || subjectListItems.length == 0) { yield sleepRange(BasicConst.CALL_DOUBAN_DELAY, BasicConst.CALL_DOUBAN_DELAY + BasicConst.CALL_DOUBAN_DELAY_RANGE); continue; } searchPage.total = needHandleTotalCustomItem; yield this.handleItems(searchPage, subjectListItems, context); context.syncOffset = context.syncOffset + PAGE_SIZE; yield sleepRange(BasicConst.CALL_DOUBAN_DELAY, BasicConst.CALL_DOUBAN_DELAY + BasicConst.CALL_DOUBAN_DELAY_RANGE); } while (handleCount < needHandleTotalCustomItem); }); } syncAll(syncConfig, context) { return __async(this, null, function* () { context.syncOffset = 0; let handleCount = 0; let totalForHandle = 0; let isFirstStep = true; do { let searchPage = yield this.getItems(syncConfig, context); if (!context.plugin.statusHolder.syncing()) { break; } const { list, total } = searchPage; if (!searchPage || !list || list.length == 0) { break; } if (isFirstStep) { totalForHandle = total; isFirstStep = false; } handleCount += list.length; let subjectListItems = yield this.removeExists(list, syncConfig, context); if (!subjectListItems || subjectListItems.length == 0) { yield sleepRange(BasicConst.CALL_DOUBAN_DELAY, BasicConst.CALL_DOUBAN_DELAY + BasicConst.CALL_DOUBAN_DELAY_RANGE); continue; } yield this.handleItems(searchPage, subjectListItems, context); context.syncOffset = context.syncOffset + PAGE_SIZE; yield sleepRange(BasicConst.CALL_DOUBAN_DELAY, BasicConst.CALL_DOUBAN_DELAY + BasicConst.CALL_DOUBAN_DELAY_RANGE); } while (handleCount <= totalForHandle); }); } syncLastThirty(syncConfig, context) { return __async(this, null, function* () { context.syncOffset = 0; let searchPage = yield this.getItems(syncConfig, context); if (!context.plugin.statusHolder.syncing()) { return; } const { list, total } = searchPage; if (!searchPage || !list || list.length == 0) { return; } let subjectListItems = yield this.removeExists(list, syncConfig, context); if (!subjectListItems || subjectListItems.length == 0) { return; } searchPage.total = Math.min(list.length, total); yield this.handleItems(searchPage, subjectListItems, context); }); } }; // src/org/wanxp/douban/sync/handler/DoubanOtherSyncHandler.ts var DoubanOtherSyncHandler = class extends DoubanAbstractSyncHandler { constructor(plugin) { super(plugin, new DoubanOtherLoadHandler(plugin), []); } getSyncType() { throw new Error("\u6682\u4E0D\u652F\u6301\u540C\u6B65\u8FD9\u7C7B\u578B\u7684\u6570\u636E"); } support(t) { throw new Error("Method not implemented."); } sync(syncConfig, context) { return __async(this, null, function* () { return Promise.resolve(); }); } }; // src/org/wanxp/constant/Douban.ts var doubanSubjectSyncListUrl = function(subjectType, userId, doType, start) { return `https://${subjectType}.douban.com/people/${userId}/${doType}?start=${start}&sort=time&rating=all&filter=all&mode=list`; }; var doubanGameSubjectSyncListUrl = function(subjectType, userId, doType, start) { return `https://douban.com/people/${userId}/games?start=${start}&sort=time&rating=all&filter=all&mode=list${doType != "all" ? "&action=" + doType : ""}`; }; // src/org/wanxp/douban/sync/handler/list/DoubanAbstractListHandler.ts var DoubanAbstractListHandler = class { getPageData(context) { return __async(this, null, function* () { let all = []; let pages = SearchPage.emptyWithNoType(); const url = this.getUrl(context, context.syncOffset); if (!context.plugin.statusHolder.syncing()) { return SearchPage.emptyWithNoType(); } let subjectListItemSearchPageTypeOf = yield this.getPageList(url, context); if (subjectListItemSearchPageTypeOf) { context.plugin.statusHolder.syncStatus.setAllTotal(subjectListItemSearchPageTypeOf.total); } return subjectListItemSearchPageTypeOf; }); } delay(ms) { return __async(this, null, function* () { }); } getUrl(context, start) { return doubanSubjectSyncListUrl(this.getSyncTypeDomain(), context.userComponent.getUserId(), this.getDoType(), start); } getSyncTypeDomain() { return SyncTypeUrlDomain.get(this.getSyncType()); } getPageList(url, context) { return __async(this, null, function* () { return DoubanHttpUtil.httpRequestGet(url, context.plugin.settingsManager.getHeaders(), context.plugin.settingsManager).then(load).then((data2) => this.parseSubjectFromHtml(data2, context)).catch((e) => log.error(i18nHelper.getMessage("130101").replace("{0}", e.toString()), e)); }); } parseSubjectFromHtml(dataHtml, context) { const items = dataHtml(".item-show").get().map((i) => { const item = dataHtml(i); const linkValue = item.find("div.title > a").attr("href"); const titleValue = item.find("div.title > a").text().trim(); const updateDateStr = item.find("div.date").text().trim(); let updateDate = null; try { updateDate = new Date(updateDateStr); } catch (e) { console.error(e); log.info("parse date error:" + titleValue); } let idPattern = /(\d){5,10}/g; let ececResult = idPattern.exec(linkValue); return !ececResult ? null : { id: ececResult[0], url: linkValue, title: titleValue, updateDate }; }); const subjectNumText = dataHtml(".subject-num").text().trim(); const totalNumMatch = subjectNumText.match(/\/\s*(\d+)/); const totalNum = totalNumMatch ? parseInt(totalNumMatch[1], 10) : 0; return new SearchPage(totalNum, Math.floor(context.syncOffset / PAGE_SIZE) + 1, PAGE_SIZE, null, items); } support(config) { return this.getDoType() == config.scope || ALL == config.scope; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMovieListHandler.ts var DoubanMovieListHandler = class extends DoubanAbstractListHandler { getSyncType() { return SyncType.movie; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMovieCollectListHandler.ts var DoubanMovieCollectListHandler = class extends DoubanMovieListHandler { getDoType() { return DoubanSubjectState.collect; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMovieWishListHandler.ts var DoubanMovieWishListHandler = class extends DoubanMovieListHandler { getDoType() { return DoubanSubjectState.wish; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMovieDoListHandler.ts var DoubanMovieDoListHandler = class extends DoubanMovieListHandler { getDoType() { return DoubanSubjectState.do; } }; // src/org/wanxp/douban/sync/handler/DoubanMovieSyncHandler.ts var DoubanMovieSyncHandler = class extends DoubanAbstractSyncHandler { constructor(plugin) { super(plugin, new DoubanMovieLoadHandler(plugin), [ new DoubanMovieCollectListHandler(), new DoubanMovieWishListHandler(), new DoubanMovieDoListHandler() ]); } getSyncType() { return SyncType.movie; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMusicListHandler.ts var DoubanMusicListHandler = class extends DoubanAbstractListHandler { getSyncType() { return SyncType.music; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMusicCollectListHandler.ts var DoubanMusicCollectListHandler = class extends DoubanMusicListHandler { getDoType() { return DoubanSubjectState.collect; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMusicWishListHandler.ts var DoubanMusicWishListHandler = class extends DoubanMusicListHandler { getDoType() { return DoubanSubjectState.wish; } }; // src/org/wanxp/douban/sync/handler/list/DoubanMusicDoListHandler.ts var DoubanMusicDoListHandler = class extends DoubanMusicListHandler { getDoType() { return DoubanSubjectState.do; } }; // src/org/wanxp/douban/sync/handler/DoubanMusicSyncHandler.ts var DoubanMusicSyncHandler = class extends DoubanAbstractSyncHandler { getSyncType() { return SyncType.music; } constructor(plugin) { super(plugin, new DoubanMusicLoadHandler(plugin), [ new DoubanMusicCollectListHandler(), new DoubanMusicWishListHandler(), new DoubanMusicDoListHandler() ]); } }; // src/org/wanxp/douban/sync/handler/list/DoubanBookListHandler.ts var DoubanBookListHandler = class extends DoubanAbstractListHandler { getSyncType() { return SyncType.book; } }; // src/org/wanxp/douban/sync/handler/list/DoubanBookWishListHandler.ts var DoubanBookWishListHandler = class extends DoubanBookListHandler { getDoType() { return DoubanSubjectState.wish; } }; // src/org/wanxp/douban/sync/handler/list/DoubanBookCollectListHandler.ts var DoubanBookCollectListHandler = class extends DoubanBookListHandler { getDoType() { return DoubanSubjectState.collect; } }; // src/org/wanxp/douban/sync/handler/list/DoubanBookDoListHandler.ts var DoubanBookDoListHandler = class extends DoubanBookListHandler { getDoType() { return DoubanSubjectState.do; } }; // src/org/wanxp/douban/sync/handler/DoubanBookSyncHandler.ts var DoubanBookSyncHandler = class extends DoubanAbstractSyncHandler { constructor(plugin) { super(plugin, new DoubanBookLoadHandler(plugin), [ new DoubanBookCollectListHandler(), new DoubanBookWishListHandler(), new DoubanBookDoListHandler() ]); } getSyncType() { return SyncType.book; } }; // src/org/wanxp/douban/sync/handler/list/DoubanTeleplayListHandler.ts var DoubanTeleplayListHandler = class extends DoubanAbstractListHandler { getSyncType() { return SyncType.teleplay; } }; // src/org/wanxp/douban/sync/handler/list/DoubanTeleplayCollectListHandler.ts var DoubanTeleplayCollectListHandler = class extends DoubanTeleplayListHandler { getDoType() { return DoubanSubjectState.collect; } }; // src/org/wanxp/douban/sync/handler/list/DoubanTeleplayWishListHandler.ts var DoubanTeleplayWishListHandler = class extends DoubanTeleplayListHandler { getDoType() { return DoubanSubjectState.wish; } }; // src/org/wanxp/douban/sync/handler/list/DoubanTeleplayDoListHandler.ts var DoubanTeleplayDoListHandler = class extends DoubanTeleplayListHandler { getDoType() { return DoubanSubjectState.do; } }; // src/org/wanxp/douban/sync/handler/DoubanTeleplaySyncHandler.ts var DoubanTeleplaySyncHandler = class extends DoubanAbstractSyncHandler { constructor(plugin) { super(plugin, new DoubanTeleplayLoadHandler(plugin), [ new DoubanTeleplayCollectListHandler(), new DoubanTeleplayWishListHandler(), new DoubanTeleplayDoListHandler() ]); } getSyncType() { return SyncType.teleplay; } }; // src/org/wanxp/douban/sync/handler/list/DoubanGameListHandler.ts var DoubanGameListHandler = class extends DoubanAbstractListHandler { getSyncType() { return SyncType.game; } getUrl(context, start) { return doubanGameSubjectSyncListUrl(this.getSyncTypeDomain(), context.userComponent.getUserId(), this.getDoType(), start); } parseSubjectFromHtml(dataHtml, context) { const items = dataHtml(".common-item").get().map((i) => { const item = dataHtml(i); const linkValue = item.find("div.title > a").attr("href"); const titleValue = item.find("div.title > a").text().trim(); const updateDateStr = item.find("span.date").text().trim(); let updateDate = null; try { updateDate = new Date(updateDateStr); } catch (e) { console.error(e); log.info("parse date error:" + titleValue); } let idPattern = /(\d){5,10}/g; let ececResult = idPattern.exec(linkValue); return !ececResult ? null : { id: ececResult[0], url: linkValue, title: titleValue, updateDate }; }); const total = this.getTotal(dataHtml, context); return new SearchPage(total, Math.floor(context.syncOffset / PAGE_SIZE) + 1, PAGE_SIZE, null, items); } getTotal(dataHtml, context) { const countDescs = dataHtml("div.tabs > a").get().map((i) => { const item = dataHtml(i); return item.text().trim(); }); const { syncConfig } = context; const { scope } = syncConfig; const wishCount = this.getCount(countDescs, "\u60F3\u73A9"); const collectCount = this.getCount(countDescs, "\u73A9\u8FC7"); const doCount = this.getCount(countDescs, "\u5728\u73A9"); switch (scope) { case DoubanSubjectState.wish: return wishCount; case DoubanSubjectState.collect: return collectCount; case DoubanSubjectState.do: return doCount; case ALL: return wishCount + collectCount + doCount; } } getCount(countDescs, keyword) { return countDescs.filter((desc) => desc.includes(keyword)).map((desc) => { const pattern = /(\d+)/g; const result = pattern.exec(desc); return result ? parseInt(result[0], 10) : 0; })[0]; } }; // src/org/wanxp/douban/sync/handler/list/DoubanGameCollectListHandler.ts var DoubanGameCollectListHandler = class extends DoubanGameListHandler { getDoType() { return DoubanSubjectState.collect; } }; // src/org/wanxp/douban/sync/handler/list/DoubanGameWishListHandler.ts var DoubanGameWishListHandler = class extends DoubanGameListHandler { getDoType() { return DoubanSubjectState.wish; } }; // src/org/wanxp/douban/sync/handler/list/DoubanGameDoListHandler.ts var DoubanGameDoListHandler = class extends DoubanGameListHandler { getDoType() { return DoubanSubjectState.do; } }; // src/org/wanxp/douban/sync/handler/DoubanGameSyncHandler.ts var DoubanGameSyncHandler = class extends DoubanAbstractSyncHandler { constructor(plugin) { super(plugin, new DoubanGameLoadHandler(plugin), [ new DoubanGameCollectListHandler(), new DoubanGameWishListHandler(), new DoubanGameDoListHandler() ]); } getSyncType() { return SyncType.game; } }; // src/org/wanxp/douban/sync/handler/SyncHandler.ts var SyncHandler = class { constructor(app, plugin, syncConfig, context) { this.app = app; this.plugin = plugin; this.syncConfig = syncConfig; this.context = context; this.defaultSyncHandler = new DoubanOtherSyncHandler(plugin); this.syncHandlers = [ new DoubanMovieSyncHandler(plugin), new DoubanBookSyncHandler(plugin), new DoubanMusicSyncHandler(plugin), new DoubanTeleplaySyncHandler(plugin), new DoubanGameSyncHandler(plugin), this.defaultSyncHandler ]; } sync() { return __async(this, null, function* () { if (this.syncConfig && this.syncConfig.syncType && this.syncConfig.scope) { if (this.checkSyncConfig()) { this.context.syncStatusHolder.syncStatus.setMessage(this.checkSyncConfig()); return; } let syncHandler = this.syncHandlers.find((handler) => handler.support(this.syncConfig.syncType)); if (syncHandler) { yield syncHandler.sync(this.syncConfig, this.context); } else { yield this.defaultSyncHandler.sync(this.syncConfig, this.context); } } yield this.showResult(); }); } showResult() { return __async(this, null, function* () { const { syncStatusHolder } = this.context; const { syncStatus } = syncStatusHolder; const { statusHandleMap } = syncStatus; const { syncResultMap } = syncStatus; const { syncConfig } = this; let extendCondition = ""; if (syncConfig.syncConditionType == SyncConditionType.CUSTOM_ITEM) { extendCondition = `${syncConfig.syncConditionCountFromValue} - ${syncConfig.syncConditionCountToValue}`; } else if (syncConfig.syncConditionType == SyncConditionType.CUSTOM_TIME) { extendCondition = `${syncConfig.syncConditionDateFromValue.toISOString().substring(0, 10)} - ${syncConfig.syncConditionDateToValue.toISOString().substring(0, 10)}`; } const condition = ` 1. ${i18nHelper.getMessage("110030")} \`${syncStatus.getTypeName()}\` 2. ${i18nHelper.getMessage("110032")} \`${syncStatus.getScopeName()}\` 3. ${i18nHelper.getMessage("110070")} \`${syncStatus.getSyncConditionName()}\`${extendCondition ? " => " + extendCondition : ""} 4. ${i18nHelper.getMessage("110039")} \`${syncConfig.incrementalUpdate ? i18nHelper.getMessage("110055") : i18nHelper.getMessage("110056")}\` 5. ${i18nHelper.getMessage("110031")} \`${syncConfig.force ? i18nHelper.getMessage("110055") : i18nHelper.getMessage("110056")}\` `; let summary = `${i18nHelper.getMessage("110053", i18nHelper.getMessage("110050"), i18nHelper.getMessage("110051"), i18nHelper.getMessage("110052"))} |-----|----|----------------------------------| `; summary += `${i18nHelper.getMessage("110053", i18nHelper.getMessage("syncall"), syncStatus.getTotal(), i18nHelper.getMessage("syncall_desc"))} `; for (const [key, value] of statusHandleMap) { summary += `${i18nHelper.getMessage("110053", i18nHelper.getMessage(key), value, i18nHelper.getMessage(key + "_desc"))} `; } summary += `${i18nHelper.getMessage("110053", i18nHelper.getMessage("notsync"), syncStatus.getTotal() - syncStatus.getHasHandle(), i18nHelper.getMessage("notsync_desc"))} `; let details = ""; for (const [key, value] of syncResultMap) { if (value.status == "unHandle") { details += `${value.id}- ${value.title} : ${i18nHelper.getMessage(value.status)} `; } else { details += `${value.id}-[[${FileUtil.replaceSpecialCharactersForFileName(value.title)}]]: ${i18nHelper.getMessage(value.status)} `; } } const result = i18nHelper.getMessage("110037", condition, summary, details); const resultFileName = `${i18nHelper.getMessage("110038")}_${(0, import_obsidian37.moment)(new Date()).format("YYYYMMDDHHmmss")}`; yield this.plugin.fileHandler.createNewNoteWithData(`${this.syncConfig.dataFilePath}/${resultFileName}`, result, true); }); } checkSyncConfig() { const { syncConfig } = this; switch (syncConfig.syncConditionType) { case SyncConditionType.CUSTOM_ITEM: if (syncConfig.syncConditionCountFromValue && syncConfig.syncConditionCountToValue) { if (syncConfig.syncConditionCountFromValue > syncConfig.syncConditionCountToValue) { return i18nHelper.getMessage("110044"); } } break; case SyncConditionType.CUSTOM_TIME: if (syncConfig.syncConditionDateToValue && syncConfig.syncConditionDateFromValue) { if (syncConfig.syncConditionDateFromValue > syncConfig.syncConditionDateToValue) { return i18nHelper.getMessage("110045"); } } } } }; // src/org/wanxp/douban/user/User.ts var User = class { }; // src/org/wanxp/douban/user/UserComponent.ts var UserComponent = class { constructor(settingsManager) { this.verified = false; this.settingsManager = settingsManager; } getUser() { return this.user; } getUserId() { return this.user ? this.user.id : null; } isLogin() { return this.user && this.user.login; } logout() { return __async(this, null, function* () { if (this.user) { this.user.login = false; } this.user = null; this.verified = false; yield this.settingsManager.updateSetting("loginCookiesContent", ""); yield this.settingsManager.updateSetting("loginHeadersContent", ""); }); } assumeLoggedIn() { const headers = this.settingsManager.getSetting("loginHeadersContent"); const cookies = this.settingsManager.getSetting("loginCookiesContent"); if (headers || cookies) { this.user = new User(); this.user.login = true; this.verified = false; } } isVerified() { return this.verified; } needLogin() { const headers = this.settingsManager.getSetting("loginHeadersContent"); const cookies = this.settingsManager.getSetting("loginCookiesContent"); if (!headers && !cookies) { return false; } return !this.isLogin(); } loginHeaders(headers) { return __async(this, null, function* () { if (!headers) { return new User(); } this.settingsManager.debug("\u914D\u7F6E\u754C\u9762:loginCookie:\u8C46\u74E3headers\u4FE1\u606F\u6B63\u5E38\uFF0C\u5C1D\u8BD5\u83B7\u53D6\u7528\u6237\u4FE1\u606F,headers:" + headers); yield this.loadUserInfoByHeaders(headers).then((user) => { this.user = user; this.settingsManager.debug(`\u914D\u7F6E\u754C\u9762:loginCookie:\u8C46\u74E3headers\u4FE1\u606F\u6B63\u5E38\uFF0C${user && user.id ? "\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u6210\u529Fid:" + StringUtil.confuse(user.id) + ",\u7528\u6237\u540D:" + StringUtil.confuse(user.name) : "\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u5931\u8D25"}`); }); if (this.user && this.user.id && this.user.login) { this.verified = true; yield this.settingsManager.updateSetting("loginHeadersContent", JSON.stringify(headers)); } else { this.verified = false; } return this.user; }); } loadUserInfoByHeaders(headers) { return __async(this, null, function* () { return DoubanHttpUtil.httpRequestGet("https://www.douban.com/mine/", headers, this.settingsManager).then(load).then(this.getUserInfo); }); } loginCookie(cookie) { return __async(this, null, function* () { const headers = this.settingsManager.getHeadersByCookie(cookie); const user = yield this.loginHeaders(headers); if (user && user.id && user.login) { yield this.settingsManager.updateSetting("loginCookiesContent", cookie); } return user; }); } acceptQrLoginCookie(cookie) { return __async(this, null, function* () { const match = String(cookie || "").match(/(?:^|;\s*)dbcl2=(?:"([^"]+)"|([^;]+))/i); const credential = ((match == null ? void 0 : match[1]) || (match == null ? void 0 : match[2]) || "").trim(); const id = credential.split(":", 1)[0]; if (!id) { return new User(); } this.user = { id, name: id, url: `https://www.douban.com/people/${id}/`, login: true }; this.verified = false; yield this.settingsManager.updateSetting("loginHeadersContent", ""); yield this.settingsManager.updateSetting("loginCookiesContent", cookie); return this.user; }); } loadUserInfo(cookie) { return __async(this, null, function* () { const headers1 = __spreadProps(__spreadValues({}, DEFAULT_DOUBAN_HEADERS), { Cookie: cookie }); return DoubanHttpUtil.httpRequestGet("https://www.douban.com/mine/", headers1, this.settingsManager).then(load).then(this.getUserInfo); }); } getUserInfo(dataHtml) { let elements = dataHtml("#db-usr-profile > div.pic > a"); if (!elements) { return new User(); } let name = dataHtml(dataHtml("head > title").get(0)).text().trim(); let userUrl = dataHtml(elements.get(0)).attr("href"); if (!name && !userUrl) { return new User(); } let id = ""; if (userUrl && userUrl.indexOf("people/") > 0) { id = userUrl.substring(userUrl.lastIndexOf("people/") + 7, userUrl.lastIndexOf("/")); } if (!id) { return new User(); } return { id, name, url: userUrl, login: true }; } login() { return __async(this, null, function* () { let headers = this.settingsManager.getHeaders(); if (!headers) { this.settingsManager.debug("\u4E3B\u754C\u9762:login:\u65E0\u8C46\u74E3\u4FE1\u606F\uFF0C\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u5931\u8D25"); return new User(); } this.settingsManager.debug("\u4E3B\u754C\u9762:login:\u8C46\u74E3headers\u4FE1\u606F\u6B63\u5E38\uFF0C\u5C1D\u8BD5\u83B7\u53D6\u7528\u6237\u4FE1\u606F"); yield this.loadUserInfoByHeaders(headers).then((user) => { this.user = user; this.settingsManager.debug(`\u4E3B\u754C\u9762:loginByCookie:\u8C46\u74E3cookies\u4FE1\u606F\u6B63\u5E38\uFF0C${user && user.id ? "\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u6210\u529Fid:" + StringUtil.confuse(user.id) + ",\u7528\u6237\u540D:" + StringUtil.confuse(user.name) : "\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u5931\u8D25"}`); }); if (this.user && this.user.id) { this.verified = true; } else { this.verified = false; } return this.user; }); } }; // src/org/wanxp/douban/component/DoubanBatchImportModal.ts var import_obsidian38 = __toModule(require("obsidian")); var DoubanBatchImportModal = class extends import_obsidian38.Modal { constructor(app, plugin, context) { super(app); this.plugin = plugin; this.context = context; this.value = ""; this.running = false; } onOpen() { this.contentEl.createEl("h3", { text: i18nHelper.getMessage("batchImportTitle") }); this.contentEl.createEl("p", { text: i18nHelper.getMessage("batchImportDesc") }); const textarea = new import_obsidian38.TextAreaComponent(this.contentEl).setPlaceholder("https://movie.douban.com/subject/3742360/\nhttps://book.douban.com/subject/2567698/").onChange((value) => this.value = value); textarea.inputEl.rows = 12; textarea.inputEl.addClass("obsidian_douban_batch_urls"); const controls = this.contentEl.createDiv({ cls: "obsidian_douban_search_controls" }); new import_obsidian38.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110004")).setCta().onClick(() => __async(this, null, function* () { if (this.running) { return; } this.running = true; const urls = this.value.split(/\r?\n/).map((line) => line.trim()).filter(Boolean); yield this.plugin.batchImportUrls(urls, this.context); this.close(); })); new import_obsidian38.ButtonComponent(controls).setButtonText(i18nHelper.getMessage("110005")).onClick(() => this.close()); } onClose() { this.contentEl.empty(); } }; // src/org/wanxp/utils/DoubanUrlUtil.ts var DoubanUrlUtil = class { static parse(value) { var _a5; let url; try { url = new URL((value || "").trim()); } catch (_error) { return null; } if (url.protocol !== "https:" && url.protocol !== "http:") { return null; } const host = url.hostname.toLowerCase(); const id = (_a5 = url.pathname.match(/\/(?:subject|game|drama)\/(\d{5,10})(?:\/|$)/)) == null ? void 0 : _a5[1]; if (!id || !host.endsWith("douban.com")) { return null; } let type; if (host === "book.douban.com") { type = SupportType.book; } else if (host === "music.douban.com") { type = SupportType.music; } else if (host === "movie.douban.com") { type = SupportType.movie; } else if (/\/location\/drama\//.test(url.pathname)) { type = SupportType.theater; } else if (/\/game\//.test(url.pathname)) { type = SupportType.game; } else { return null; } return { id, type, url: url.toString() }; } }; // src/org/wanxp/main.ts var DoubanPlugin = class extends import_obsidian39.Plugin { putToObsidian(context, extract3) { return __async(this, null, function* () { const syncStatus = context.syncStatusHolder && context.syncStatusHolder.syncStatus ? context.syncStatusHolder.syncStatus : null; try { if (!extract3) { log.warn(i18nHelper.getMessage("140101")); return; } if (context.syncActive && extract3.guessType && extract3.guessType != extract3.type) { extract3.handledStatus = SubjectHandledStatus.syncTypeDiffAbort; if (Action.Sync == context.action) { this.showStatus(i18nHelper.getMessage("140207", syncStatus.getHasHandle(), syncStatus.getTotal(), extract3.title)); syncStatus.failByDiffType(extract3.id, extract3.title); } else { console.log(i18nHelper.getMessage("140102", extract3.type, extract3.title, extract3.guessType)); } return; } if (Action.Sync == context.action) { this.showStatus(i18nHelper.getMessage("140207", syncStatus.getHasHandle(), syncStatus.getTotal(), extract3.title)); } else { this.showStatus(i18nHelper.getMessage("140204", extract3.title)); } const result = yield this.doubanExtractHandler.parseText(extract3, context); if (result) { yield this.putContentToObsidian(context, result); extract3.handledStatus = SubjectHandledStatus.saved; } if (Action.Sync == context.action) { this.showStatus(i18nHelper.getMessage("140208", syncStatus.getHasHandle(), syncStatus.getTotal(), extract3.title)); } else { this.showStatus(i18nHelper.getMessage("140205", extract3.title)); } } catch (e) { log.error(i18nHelper.getMessage("140206", e.message), e); syncStatus != null ? syncStatus.fail(extract3.id, extract3.title) : null; } finally { this.clearStatusBarDelay(); } }); } putContentToObsidian(context, result) { return __async(this, null, function* () { const { mode } = context; switch (mode) { case SearchHandleMode.FOR_CREATE: yield this.createFile(context, result); break; case SearchHandleMode.FOR_REPLACE: yield this.putToEditor(context.editor, result.content); break; } }); } putToEditor(editor, content) { return __async(this, null, function* () { editor.replaceSelection(content); }); } createFile(context, result) { return __async(this, null, function* () { let filePath = result.filePath ? result.filePath : DEFAULT_SETTINGS.dataFilePath; filePath = FileUtil.join(filePath, result.fileName); const syncStatus = context.syncStatusHolder && context.syncStatusHolder.syncStatus ? context.syncStatusHolder.syncStatus : null; const { subject } = result; const { content } = result; if (Action.Sync == context.action) { if (context.syncStatusHolder.syncStatus.syncConfig.force) { const exists = yield this.fileHandler.createOrReplaceNewNoteWithData(filePath, content, context.showAfterCreate); if (exists) { syncStatus != null ? syncStatus.replace(subject.id, subject.title) : null; } else { syncStatus != null ? syncStatus.create(subject.id, subject.title) : null; } } else { const created = yield this.fileHandler.createNewNoteWithData(filePath, content, context.showAfterCreate, false); created ? syncStatus.create(subject.id, subject.title) : syncStatus.exists(subject.id, subject.title); } } else { yield this.fileHandler.createNewNoteWithData(filePath, content, context.showAfterCreate); } }); } search(searchTerm, searchType, context) { return __async(this, null, function* () { try { this.showStatus(i18nHelper.getMessage("140201", searchTerm)); const result = yield SearcherV2.search(searchTerm, searchType, 1, SEARCH_ITEM_PAGE_SIZE, this.settings, context.plugin.settingsManager); this.showStatus(i18nHelper.getMessage("140202", result.list.toString())); context.searchPage = result; new DoubanFuzzySuggester(this, context, searchTerm).showSearchPage(result); } catch (e) { log.error(i18nHelper.getMessage("140206").replace("{0}", e.message), e); } finally { this.clearStatusBarDelay(); } }); } getDoubanTextForActiveFile(context) { return __async(this, null, function* () { const activeFile = yield this.app.workspace.getActiveFile(); if (activeFile) { const searchTerm = activeFile.basename; if (searchTerm) { yield this.search(searchTerm, SupportType.all, context); } } }); } getDoubanTextForCreateNewNote(context) { return __async(this, null, function* () { new DoubanSearchModal(this.app, this, context, null).open(); }); } getDoubanTextForCreateNewNoteForType(context, type) { return __async(this, null, function* () { new DoubanSearchModal(this.app, this, context, type).open(); }); } getDoubanTextForSearchTerm(context) { return __async(this, null, function* () { new DoubanSearchModal(this.app, this, context, null).open(); }); } showSyncModal(context) { return __async(this, null, function* () { new DoubanSyncModal(this.app, this, context).open(); }); } batchImportUrls(urls, context) { return __async(this, null, function* () { let success = 0; const failures = []; for (let index2 = 0; index2 < urls.length; index2++) { const parsed = DoubanUrlUtil.parse(urls[index2]); this.showStatus(i18nHelper.getMessage("batchImportProgress", index2 + 1, urls.length)); if (!parsed) { failures.push(urls[index2]); continue; } const item = { id: parsed.id, type: parsed.type, title: parsed.id, url: parsed.url }; try { const result = yield this.doubanExtractHandler.handle(item, __spreadProps(__spreadValues({}, context), { listItem: parsed.type === SupportType.theater ? item : void 0, showAfterCreate: false })); if (result && result.handledStatus === SubjectHandledStatus.saved) { success++; } else { failures.push(parsed.url); } } catch (_error) { failures.push(parsed.url); } if (index2 < urls.length - 1) { yield new Promise((resolve) => setTimeout(resolve, BasicConst.CALL_DOUBAN_DELAY)); } } new import_obsidian39.Notice(i18nHelper.getMessage("batchImportSummary", success, failures.length, failures.join("\n"))); this.clearStatusBarDelay(); }); } onload() { return __async(this, null, function* () { console.log("----douban-plugins-load------"); yield this.loadSettings(); if (this.settings.statusBar) { this.doubanStatusBar = this.addStatusBarItem(); } this.addCommand({ id: "searcher-douban-import-and-create-file", name: i18nHelper.getMessage("110101"), callback: () => this.getDoubanTextForCreateNewNoteForType({ plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, showAfterCreate: this.settings.showAfterCreate, action: Action.SearchAndCrate }, this.settings.searchDefaultType) }); this.addCommand({ id: "batch-import-douban-urls", name: i18nHelper.getMessage("batchImportCommand"), callback: () => new DoubanBatchImportModal(this.app, this, { plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, showAfterCreate: false, action: Action.SearchAndCrate }).open() }); this.addCommand({ id: "searcher-douban-and-input-current-file", name: i18nHelper.getMessage("110002"), editorCallback: (editor) => this.getDoubanTextForSearchTerm({ plugin: this, mode: SearchHandleMode.FOR_REPLACE, settings: this.settings, editor, userComponent: this.userComponent, netFileHandler: this.netFileHandler, action: Action.SearchAndReplace }) }); this.addCommand({ id: "searcher-douban-by-current-file-name", name: i18nHelper.getMessage("110001"), editorCallback: (editor) => this.getDoubanTextForActiveFile({ plugin: this, mode: SearchHandleMode.FOR_REPLACE, settings: this.settings, editor, userComponent: this.userComponent, netFileHandler: this.netFileHandler, action: Action.SearchEditorAndReplace }) }); this.addCommand({ id: "sync-douban-import-and-create-file", name: i18nHelper.getMessage("110103"), callback: () => this.showSyncModal({ plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, action: Action.Sync, syncStatusHolder: this.statusHolder }) }); this.addCommand({ id: "searcher-douban-import-and-create-file-movie-tv", name: i18nHelper.getMessage("110102"), callback: () => this.getDoubanTextForCreateNewNoteForType({ plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, showAfterCreate: this.settings.showAfterCreate, action: Action.SearchAndCrate }, SupportType.movie) }); this.addCommand({ id: "searcher-douban-import-and-create-file-book", name: i18nHelper.getMessage("110104"), callback: () => this.getDoubanTextForCreateNewNoteForType({ plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, showAfterCreate: this.settings.showAfterCreate, action: Action.SearchAndCrate }, SupportType.book) }); this.addCommand({ id: "searcher-douban-import-and-create-file-music", name: i18nHelper.getMessage("110105"), callback: () => this.getDoubanTextForCreateNewNoteForType({ plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, showAfterCreate: this.settings.showAfterCreate, action: Action.SearchAndCrate }, SupportType.music) }); this.addCommand({ id: "searcher-douban-import-and-create-file-game", name: i18nHelper.getMessage("110106"), callback: () => this.getDoubanTextForCreateNewNoteForType({ plugin: this, mode: SearchHandleMode.FOR_CREATE, settings: this.settings, userComponent: this.userComponent, netFileHandler: this.netFileHandler, showAfterCreate: this.settings.showAfterCreate, action: Action.SearchAndCrate }, SupportType.game) }); this.settingsManager = new SettingsManager(this.app, this); this.userComponent = new UserComponent(this.settingsManager); this.netFileHandler = new NetFileHandler(this.fileHandler); this.userComponent.assumeLoggedIn(); this.settingTab = new DoubanSettingTab(this.app, this); this.addSettingTab(this.settingTab); this.statusHolder = new GlobalStatusHolder(this.app, this); }); } loadSettings() { return __async(this, null, function* () { this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); this.doubanExtractHandler = new DoubanSearchChooseItemHandler(this.app, this); this.fileHandler = new FileHandler(this.app); }); } saveSettings() { return __async(this, null, function* () { yield this.saveData(this.settings); }); } onunload() { return __async(this, null, function* () { if (this.statusHolder.syncStatus) { yield this.statusHolder.onunload(); } }); } showStatus(origin) { if (!this.settings.statusBar || !this.doubanStatusBar) { return; } this.doubanStatusBar.empty(); this.doubanStatusBar.setText(origin); } clearStatusBarDelay() { if (!this.settings.statusBar || !this.doubanStatusBar) { return; } setTimeout(() => this.doubanStatusBar.empty(), BasicConst.CLEAN_STATUS_BAR_DELAY); } sync(context) { return __async(this, null, function* () { const { syncConfig } = context; try { const result = yield this.checkLogin(context); if (!result) { return; } new import_obsidian39.Notice(i18nHelper.getMessage("140301", SyncTypeRecords[syncConfig.syncType])); this.initSyncDefaultSettings(syncConfig); context.syncStatusHolder.initHandledData(); this.showStatus(i18nHelper.getMessage("140203", SyncTypeRecords[syncConfig.syncType])); const syncHandler = new SyncHandler(this.app, this, syncConfig, context); yield syncHandler.sync(); new import_obsidian39.Notice(i18nHelper.getMessage("140302")); } catch (e) { log.error(i18nHelper.getMessage("140206", e.message), e); } finally { yield context.plugin.statusHolder.completeSync(); this.clearStatusBarDelay(); context.syncActive = false; } }); } checkLogin(context) { return __async(this, null, function* () { this.settingsManager.debug("\u4E3B\u754C\u9762:\u540C\u6B65\u65F6\u7684\u767B\u5F55\u72B6\u6001\u68C0\u6D4B"); const uc = context.userComponent; if (uc.isLogin() && !uc.isVerified()) { yield uc.login(); } if (uc.needLogin()) { yield uc.login(); } if (!uc.isLogin()) { this.settingsManager.debug("\u4E3B\u754C\u9762:\u540C\u6B65\u65F6\u7684\u767B\u5F55\u72B6\u6001\u68C0\u6D4B\u5B8C\u6210: \u5C1D\u8BD5\u83B7\u53D6\u7528\u6237\u4FE1\u606F\u5931\u8D25"); new import_obsidian39.Notice(i18nHelper.getMessage("140303")); return false; } return true; }); } initSyncDefaultSettings(syncConfig) { syncConfig.dataFilePath = syncConfig.dataFilePath ? syncConfig.dataFilePath : DEFAULT_SETTINGS.dataFilePath; syncConfig.templateFile = syncConfig.templateFile ? syncConfig.templateFile : ""; syncConfig.attachmentPath = syncConfig.attachmentPath ? syncConfig.attachmentPath : DEFAULT_SETTINGS.attachmentPath; syncConfig.dataFileNamePath = syncConfig.dataFileNamePath ? syncConfig.dataFileNamePath : DEFAULT_SETTINGS.dataFileNamePath; } }; /* nosourcemap */