diff --git a/assets/js/darkreader.js b/assets/js/darkreader.js index af51d57..ea5c1ed 100644 --- a/assets/js/darkreader.js +++ b/assets/js/darkreader.js @@ -1,5 +1,5 @@ /** - * Dark Reader v4.9.58 + * Dark Reader v4.9.66 * https://darkreader.org/ */ @@ -28,6 +28,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ + /* global Reflect, Promise, SuppressedError, Symbol */ var __assign = function () { __assign = @@ -107,7 +108,7 @@ } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) + while ((g && ((g = 0), op[0] && (_ = 0)), _)) try { if ( ((f = 1), @@ -232,58 +233,95 @@ return to.concat(ar || Array.prototype.slice.call(from)); } - var MessageType; - (function (MessageType) { - MessageType["UI_GET_DATA"] = "ui-get-data"; - MessageType["UI_SUBSCRIBE_TO_CHANGES"] = "ui-subscribe-to-changes"; - MessageType["UI_UNSUBSCRIBE_FROM_CHANGES"] = - "ui-unsubscribe-from-changes"; - MessageType["UI_CHANGE_SETTINGS"] = "ui-change-settings"; - MessageType["UI_SET_THEME"] = "ui-set-theme"; - MessageType["UI_SET_SHORTCUT"] = "ui-set-shortcut"; - MessageType["UI_TOGGLE_ACTIVE_TAB"] = "ui-toggle-active-tab"; - MessageType["UI_MARK_NEWS_AS_READ"] = "ui-mark-news-as-read"; - MessageType["UI_MARK_NEWS_AS_DISPLAYED"] = "ui-mark-news-as-displayed"; - MessageType["UI_LOAD_CONFIG"] = "ui-load-config"; - MessageType["UI_APPLY_DEV_DYNAMIC_THEME_FIXES"] = - "ui-apply-dev-dynamic-theme-fixes"; - MessageType["UI_RESET_DEV_DYNAMIC_THEME_FIXES"] = - "ui-reset-dev-dynamic-theme-fixes"; - MessageType["UI_APPLY_DEV_INVERSION_FIXES"] = - "ui-apply-dev-inversion-fixes"; - MessageType["UI_RESET_DEV_INVERSION_FIXES"] = - "ui-reset-dev-inversion-fixes"; - MessageType["UI_APPLY_DEV_STATIC_THEMES"] = - "ui-apply-dev-static-themes"; - MessageType["UI_RESET_DEV_STATIC_THEMES"] = - "ui-reset-dev-static-themes"; - MessageType["UI_SAVE_FILE"] = "ui-save-file"; - MessageType["UI_REQUEST_EXPORT_CSS"] = "ui-request-export-css"; - MessageType["UI_COLOR_SCHEME_CHANGE"] = "ui-color-scheme-change"; - MessageType["BG_CHANGES"] = "bg-changes"; - MessageType["BG_ADD_CSS_FILTER"] = "bg-add-css-filter"; - MessageType["BG_ADD_STATIC_THEME"] = "bg-add-static-theme"; - MessageType["BG_ADD_SVG_FILTER"] = "bg-add-svg-filter"; - MessageType["BG_ADD_DYNAMIC_THEME"] = "bg-add-dynamic-theme"; - MessageType["BG_EXPORT_CSS"] = "bg-export-css"; - MessageType["BG_UNSUPPORTED_SENDER"] = "bg-unsupported-sender"; - MessageType["BG_CLEAN_UP"] = "bg-clean-up"; - MessageType["BG_RELOAD"] = "bg-reload"; - MessageType["BG_FETCH_RESPONSE"] = "bg-fetch-response"; - MessageType["BG_UI_UPDATE"] = "bg-ui-update"; - MessageType["BG_CSS_UPDATE"] = "bg-css-update"; - MessageType["CS_COLOR_SCHEME_CHANGE"] = "cs-color-scheme-change"; - MessageType["CS_FRAME_CONNECT"] = "cs-frame-connect"; - MessageType["CS_FRAME_FORGET"] = "cs-frame-forget"; - MessageType["CS_FRAME_FREEZE"] = "cs-frame-freeze"; - MessageType["CS_FRAME_RESUME"] = "cs-frame-resume"; - MessageType["CS_EXPORT_CSS_RESPONSE"] = "cs-export-css-response"; - MessageType["CS_FETCH"] = "cs-fetch"; - MessageType["CS_DARK_THEME_DETECTED"] = "cs-dark-theme-detected"; - MessageType["CS_DARK_THEME_NOT_DETECTED"] = - "cs-dark-theme-not-detected"; - MessageType["CS_LOG"] = "cs-log"; - })(MessageType || (MessageType = {})); + typeof SuppressedError === "function" + ? SuppressedError + : function (error, suppressed, message) { + var e = new Error(message); + return ( + (e.name = "SuppressedError"), + (e.error = error), + (e.suppressed = suppressed), + e + ); + }; + + var MessageTypeUItoBG; + (function (MessageTypeUItoBG) { + MessageTypeUItoBG["GET_DATA"] = "ui-bg-get-data"; + MessageTypeUItoBG["GET_DEVTOOLS_DATA"] = "ui-bg-get-devtools-data"; + MessageTypeUItoBG["SUBSCRIBE_TO_CHANGES"] = + "ui-bg-subscribe-to-changes"; + MessageTypeUItoBG["UNSUBSCRIBE_FROM_CHANGES"] = + "ui-bg-unsubscribe-from-changes"; + MessageTypeUItoBG["CHANGE_SETTINGS"] = "ui-bg-change-settings"; + MessageTypeUItoBG["SET_THEME"] = "ui-bg-set-theme"; + MessageTypeUItoBG["TOGGLE_ACTIVE_TAB"] = "ui-bg-toggle-active-tab"; + MessageTypeUItoBG["MARK_NEWS_AS_READ"] = "ui-bg-mark-news-as-read"; + MessageTypeUItoBG["MARK_NEWS_AS_DISPLAYED"] = + "ui-bg-mark-news-as-displayed"; + MessageTypeUItoBG["LOAD_CONFIG"] = "ui-bg-load-config"; + MessageTypeUItoBG["APPLY_DEV_DYNAMIC_THEME_FIXES"] = + "ui-bg-apply-dev-dynamic-theme-fixes"; + MessageTypeUItoBG["RESET_DEV_DYNAMIC_THEME_FIXES"] = + "ui-bg-reset-dev-dynamic-theme-fixes"; + MessageTypeUItoBG["APPLY_DEV_INVERSION_FIXES"] = + "ui-bg-apply-dev-inversion-fixes"; + MessageTypeUItoBG["RESET_DEV_INVERSION_FIXES"] = + "ui-bg-reset-dev-inversion-fixes"; + MessageTypeUItoBG["APPLY_DEV_STATIC_THEMES"] = + "ui-bg-apply-dev-static-themes"; + MessageTypeUItoBG["RESET_DEV_STATIC_THEMES"] = + "ui-bg-reset-dev-static-themes"; + MessageTypeUItoBG["COLOR_SCHEME_CHANGE"] = "ui-bg-color-scheme-change"; + MessageTypeUItoBG["HIDE_HIGHLIGHTS"] = "ui-bg-hide-highlights"; + })(MessageTypeUItoBG || (MessageTypeUItoBG = {})); + var MessageTypeBGtoUI; + (function (MessageTypeBGtoUI) { + MessageTypeBGtoUI["CHANGES"] = "bg-ui-changes"; + })(MessageTypeBGtoUI || (MessageTypeBGtoUI = {})); + var DebugMessageTypeBGtoUI; + (function (DebugMessageTypeBGtoUI) { + DebugMessageTypeBGtoUI["CSS_UPDATE"] = "debug-bg-ui-css-update"; + DebugMessageTypeBGtoUI["UPDATE"] = "debug-bg-ui-update"; + })(DebugMessageTypeBGtoUI || (DebugMessageTypeBGtoUI = {})); + var MessageTypeBGtoCS; + (function (MessageTypeBGtoCS) { + MessageTypeBGtoCS["ADD_CSS_FILTER"] = "bg-cs-add-css-filter"; + MessageTypeBGtoCS["ADD_DYNAMIC_THEME"] = "bg-cs-add-dynamic-theme"; + MessageTypeBGtoCS["ADD_STATIC_THEME"] = "bg-cs-add-static-theme"; + MessageTypeBGtoCS["ADD_SVG_FILTER"] = "bg-cs-add-svg-filter"; + MessageTypeBGtoCS["CLEAN_UP"] = "bg-cs-clean-up"; + MessageTypeBGtoCS["FETCH_RESPONSE"] = "bg-cs-fetch-response"; + MessageTypeBGtoCS["UNSUPPORTED_SENDER"] = "bg-cs-unsupported-sender"; + })(MessageTypeBGtoCS || (MessageTypeBGtoCS = {})); + var DebugMessageTypeBGtoCS; + (function (DebugMessageTypeBGtoCS) { + DebugMessageTypeBGtoCS["RELOAD"] = "debug-bg-cs-reload"; + })(DebugMessageTypeBGtoCS || (DebugMessageTypeBGtoCS = {})); + var MessageTypeCStoBG; + (function (MessageTypeCStoBG) { + MessageTypeCStoBG["COLOR_SCHEME_CHANGE"] = "cs-bg-color-scheme-change"; + MessageTypeCStoBG["DARK_THEME_DETECTED"] = "cs-bg-dark-theme-detected"; + MessageTypeCStoBG["DARK_THEME_NOT_DETECTED"] = + "cs-bg-dark-theme-not-detected"; + MessageTypeCStoBG["FETCH"] = "cs-bg-fetch"; + MessageTypeCStoBG["DOCUMENT_CONNECT"] = "cs-bg-document-connect"; + MessageTypeCStoBG["DOCUMENT_FORGET"] = "cs-bg-document-forget"; + MessageTypeCStoBG["DOCUMENT_FREEZE"] = "cs-bg-document-freeze"; + MessageTypeCStoBG["DOCUMENT_RESUME"] = "cs-bg-document-resume"; + })(MessageTypeCStoBG || (MessageTypeCStoBG = {})); + var DebugMessageTypeCStoBG; + (function (DebugMessageTypeCStoBG) { + DebugMessageTypeCStoBG["LOG"] = "debug-cs-bg-log"; + })(DebugMessageTypeCStoBG || (DebugMessageTypeCStoBG = {})); + var MessageTypeCStoUI; + (function (MessageTypeCStoUI) { + MessageTypeCStoUI["EXPORT_CSS_RESPONSE"] = "cs-ui-export-css-response"; + })(MessageTypeCStoUI || (MessageTypeCStoUI = {})); + var MessageTypeUItoCS; + (function (MessageTypeUItoCS) { + MessageTypeUItoCS["EXPORT_CSS"] = "ui-cs-export-css"; + })(MessageTypeUItoCS || (MessageTypeUItoCS = {})); var isNavigatorDefined = typeof navigator !== "undefined"; var userAgent = isNavigatorDefined @@ -306,15 +344,10 @@ : "some platform"; var isChromium = userAgent.includes("chrome") || userAgent.includes("chromium"); - var isThunderbird = userAgent.includes("thunderbird"); var isFirefox = userAgent.includes("firefox") || - userAgent.includes("librewolf") || - isThunderbird; - userAgent.includes("vivaldi"); - userAgent.includes("yabrowser"); - userAgent.includes("opr") || userAgent.includes("opera"); - userAgent.includes("edg"); + userAgent.includes("thunderbird") || + userAgent.includes("librewolf"); var isSafari = userAgent.includes("safari") && !isChromium; var isWindows = platform.startsWith("win"); var isMacOS = platform.startsWith("mac"); @@ -348,12 +381,22 @@ } })(); var isCSSColorSchemePropSupported = (function () { - if (typeof document === "undefined") { + try { + if (typeof document === "undefined") { + return false; + } + var el = document.createElement("div"); + if (!el || typeof el.style !== "object") { + return false; + } + if (typeof el.style.colorScheme === "string") { + return true; + } + el.setAttribute("style", "color-scheme: dark"); + return el.style.colorScheme === "dark"; + } catch (e) { return false; } - var el = document.createElement("div"); - el.setAttribute("style", "color-scheme: dark"); - return el.style && el.style.colorScheme === "dark"; })(); function getOKResponse(url, mimeType, origin) { @@ -505,7 +548,12 @@ return __generator(this, function (_b) { switch (_b.label) { case 0: - if (!(args[0] && args[0].type === MessageType.CS_FETCH)) + if ( + !( + args[0] && + args[0].type === MessageTypeCStoBG.FETCH + ) + ) return [3, 8]; id_1 = args[0].id; _b.label = 1; @@ -530,7 +578,7 @@ case 6: messageListeners.forEach(function (cb) { return cb({ - type: MessageType.BG_FETCH_RESPONSE, + type: MessageTypeBGtoCS.FETCH_RESPONSE, data: text_1, error: null, id: id_1 @@ -542,7 +590,7 @@ console.error(error_1); messageListeners.forEach(function (cb) { return cb({ - type: MessageType.BG_FETCH_RESPONSE, + type: MessageTypeBGtoCS.FETCH_RESPONSE, data: null, error: error_1, id: id_1 @@ -848,7 +896,7 @@ start = now; attempts = 1; } - if (mode === "parent") { + if (mode === "head") { if (prevSibling && prevSibling.parentNode !== parent) { stop(); return; @@ -863,16 +911,23 @@ updateParent(prevSibling.parentNode); } } + if (mode === "head" && !parent.isConnected) { + parent = document.head; + } parent.insertBefore( node, - prevSibling ? prevSibling.nextSibling : parent.firstChild + prevSibling && prevSibling.isConnected + ? prevSibling.nextSibling + : parent.firstChild ); observer.takeRecords(); onRestore && onRestore(); }); var observer = new MutationObserver(function () { if ( - (mode === "parent" && node.parentNode !== parent) || + (mode === "head" && + (node.parentNode !== parent || + !node.parentNode.isConnected)) || (mode === "prev-sibling" && node.previousSibling !== prevSibling) ) { @@ -1646,7 +1701,7 @@ var c = $color[i]; if ((c >= "0" && c <= "9") || c === "." || c === "+" || c === "-") { isMining = true; - } else if (isMining && (c === " " || c === ",")) { + } else if (isMining && (c === " " || c === "," || c === "/")) { numbers.push($color.substring(prevPos, i)); isMining = false; prevPos = i + 1; @@ -2469,7 +2524,30 @@ return toSVGMatrix(createFilterMatrix(config)); } - var counter = 0; + function hexify(number) { + return (number < 16 ? "0" : "") + number.toString(16); + } + function generateUID() { + if ("randomUUID" in crypto) { + var uuid = crypto.randomUUID(); + return ( + uuid.substring(0, 8) + + uuid.substring(9, 13) + + uuid.substring(14, 18) + + uuid.substring(19, 23) + + uuid.substring(24) + ); + } + if ("getRandomValues" in crypto) { + return Array.from(crypto.getRandomValues(new Uint8Array(16))) + .map(function (x) { + return hexify(x); + }) + .join(""); + } + return Math.floor(Math.random() * Math.pow(2, 55)).toString(36); + } + var resolvers$1 = new Map(); var rejectors = new Map(); function bgFetch(request) { @@ -2478,11 +2556,11 @@ return [ 2, new Promise(function (resolve, reject) { - var id = ++counter; + var id = generateUID(); resolvers$1.set(id, resolve); rejectors.set(id, reject); chrome.runtime.sendMessage({ - type: MessageType.CS_FETCH, + type: MessageTypeCStoBG.FETCH, data: request, id: id }); @@ -2496,7 +2574,7 @@ data = _a.data, error = _a.error, id = _a.id; - if (type === MessageType.BG_FETCH_RESPONSE) { + if (type === MessageTypeBGtoCS.FETCH_RESPONSE) { var resolve = resolvers$1.get(id); var reject = rejectors.get(id); resolvers$1.delete(id); @@ -2658,7 +2736,7 @@ canvas = document.createElement("canvas"); canvas.width = maxWidth; canvas.height = maxHeight; - context = canvas.getContext("2d"); + context = canvas.getContext("2d", {willReadFrequently: true}); context.imageSmoothingEnabled = false; } function removeCanvas() { @@ -2674,7 +2752,13 @@ naturalHeight = image.naturalHeight; if (naturalHeight === 0 || naturalWidth === 0) { logWarn("logWarn(Image is empty ".concat(image.currentSrc, ")")); - return null; + return { + isDark: false, + isLight: false, + isTransparent: false, + isLarge: false, + isTooLarge: false + }; } var size = naturalWidth * naturalHeight * 4; if (size > MAX_IMAGE_SIZE) { @@ -2794,44 +2878,44 @@ var startIndex = conicGradient.length; var _loop_1 = function () { var typeGradient; - [linearGradient, radialGradient, conicGradient].find(function ( - possibleType - ) { - if (index - possibleType.length >= 0) { - var possibleGradient = value.substring( - index - possibleType.length, - index - ); - if (possibleGradient === possibleType) { - if ( - value.slice( - index - possibleType.length - 10, - index - possibleType.length - 1 - ) === "repeating" - ) { - typeGradient = "repeating-".concat( - possibleType, - "gradient" - ); + [linearGradient, radialGradient, conicGradient].find( + function (possibleType) { + if (index - possibleType.length >= 0) { + var possibleGradient = value.substring( + index - possibleType.length, + index + ); + if (possibleGradient === possibleType) { + if ( + value.slice( + index - possibleType.length - 10, + index - possibleType.length - 1 + ) === "repeating" + ) { + typeGradient = "repeating-".concat( + possibleType, + "gradient" + ); + return true; + } + if ( + value.slice( + index - possibleType.length - 8, + index - possibleType.length - 1 + ) === "-webkit" + ) { + typeGradient = "-webkit-".concat( + possibleType, + "gradient" + ); + return true; + } + typeGradient = "".concat(possibleType, "gradient"); return true; } - if ( - value.slice( - index - possibleType.length - 8, - index - possibleType.length - 1 - ) === "-webkit" - ) { - typeGradient = "-webkit-".concat( - possibleType, - "gradient" - ); - return true; - } - typeGradient = "".concat(possibleType, "gradient"); - return true; } } - }); + ); if (!typeGradient) { return "break"; } @@ -3154,6 +3238,7 @@ colorThumb = hslToString(hsl_1); colorThumbHover = hslToString(lighten(0.1)); colorThumbActive = hslToString(lighten(0.2)); + colorCorner = hslToString(darken(0.5)); } lines.push("::-webkit-scrollbar {"); lines.push(" background-color: ".concat(colorTrack, ";")); @@ -3335,48 +3420,54 @@ /([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?([^\(\), ]|( (?!calc)))*),?/g; var colorStopRegex = /^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/; - var parts = getMatches(partsRegex, match, 1).map(function ( - part - ) { - part = part.trim(); - var rgb = parseColorWithCache(part); - if (rgb) { - return function (filter) { - return modifyGradientColor(rgb, filter); - }; - } - var space = part.lastIndexOf(" "); - rgb = parseColorWithCache(part.substring(0, space)); - if (rgb) { - return function (filter) { - return "" - .concat(modifyGradientColor(rgb, filter), " ") - .concat(part.substring(space + 1)); - }; - } - var colorStopMatch = part.match(colorStopRegex); - if (colorStopMatch) { - rgb = parseColorWithCache(colorStopMatch[3]); + var parts = getMatches(partsRegex, match, 1).map( + function (part) { + part = part.trim(); + var rgb = parseColorWithCache(part); + if (rgb) { + return function (filter) { + return modifyGradientColor(rgb, filter); + }; + } + var space = part.lastIndexOf(" "); + rgb = parseColorWithCache(part.substring(0, space)); if (rgb) { return function (filter) { return "" - .concat(colorStopMatch[1], "(") - .concat( - colorStopMatch[2] - ? "".concat(colorStopMatch[2], ", ") - : "" - ) .concat( modifyGradientColor(rgb, filter), - ")" - ); + " " + ) + .concat(part.substring(space + 1)); }; } + var colorStopMatch = part.match(colorStopRegex); + if (colorStopMatch) { + rgb = parseColorWithCache(colorStopMatch[3]); + if (rgb) { + return function (filter) { + return "" + .concat(colorStopMatch[1], "(") + .concat( + colorStopMatch[2] + ? "".concat( + colorStopMatch[2], + ", " + ) + : "" + ) + .concat( + modifyGradientColor(rgb, filter), + ")" + ); + }; + } + } + return function () { + return part; + }; } - return function () { - return part; - }; - }); + ); return function (filter) { return "" .concat(typeGradient, "(") @@ -3492,6 +3583,11 @@ width = imageDetails.width; var result; if (isTooLarge) { + logInfo( + "Not modifying too large image ".concat( + imageDetails.src + ) + ); result = 'url("'.concat(imageDetails.src, '")'); } else if ( isDark && @@ -3510,6 +3606,11 @@ result = 'url("'.concat(inverted, '")'); } else if (isLight && !isTransparent && filter.mode === 1) { if (isLarge) { + logInfo( + "Not modifying light non-transparent large image ".concat( + imageDetails.src + ) + ); result = "none"; } else { logInfo( @@ -3534,6 +3635,11 @@ ); result = 'url("'.concat(filtered, '")'); } else { + logInfo( + "Not modifying too large image ".concat( + imageDetails.src + ) + ); result = null; } return result; @@ -3579,7 +3685,7 @@ match: match, index: index, typeGradient: typeGradient, - hasComma: hasComma, + hasComma: hasComma || false, offset: offset }) ); @@ -4119,8 +4225,9 @@ return; } this.definedVars.add(varName); - var color = parseColorWithCache(value); - if (color) { + var isColor = + rawValueRegex.test(value) || parseColorWithCache(value); + if (isColor) { this.unknownColorVars.add(varName); } else if ( value.includes("url(") || @@ -4361,8 +4468,8 @@ if (range) { return {start: start, end: range.end}; } - return null; } + return null; } function getVariablesMatches(input) { var ranges = []; @@ -4736,9 +4843,15 @@ var cache = []; var timeoutId = null; var handleAttributeMutations = throttle(function (mutations) { + var handledTargets = new Set(); mutations.forEach(function (m) { + var target = m.target; + if (handledTargets.has(target)) { + return; + } if (INLINE_STYLE_ATTRS.includes(m.attributeName)) { - elementStyleDidChange(m.target); + handledTargets.add(target); + elementStyleDidChange(target); } }); }); @@ -5101,6 +5214,9 @@ modRules.push(rulesModCache.get(cssText)); return; } + if (rule.style.all === "revert") { + return; + } var modDecs = []; rule.style && iterateCSSDeclarations( @@ -5250,9 +5366,8 @@ important, sourceValue ) { - var _a = modified, - varDecs = _a.declarations, - onTypeChange = _a.onTypeChange; + var varDecs = modified.declarations, + onTypeChange = modified.onTypeChange; var varKey = ++varDeclarationCounter; var currentRenderId = renderId; var initialIndex = readyDeclarations.length; @@ -5457,9 +5572,9 @@ (element instanceof HTMLStyleElement || element instanceof SVGStyleElement || (element instanceof HTMLLinkElement && - element.rel && + Boolean(element.rel) && element.rel.toLowerCase().includes("stylesheet") && - element.href && + Boolean(element.href) && !element.disabled && (isFirefox ? !element.href.startsWith("moz-extension://") @@ -5502,7 +5617,8 @@ "__darkreader__inlineScriptsAllowed", function () { canOptimizeUsingProxy$1 = true; - } + }, + {once: true, passive: true} ); var loadingLinkCounter = 0; var rejectorsForLoadingLinks = new Map(); @@ -5562,6 +5678,9 @@ if (rule.href) { if (checkCrossOrigin) { if ( + !rule.href.startsWith( + "https://fonts.googleapis.com/" + ) && rule.href.startsWith("http") && !rule.href.startsWith(location.origin) ) { @@ -5653,8 +5772,8 @@ (accessError = _a[1]); if ( !( - (!cssRules && !accessError && !isSafari) || (isSafari && !element.sheet) || + (!isSafari && !cssRules && !accessError) || isStillLoadingError(accessError) ) ) @@ -5763,6 +5882,9 @@ } cancelAsyncOperations = false; function removeCSSRulesFromSheet(sheet) { + if (!sheet) { + return; + } for (var i = sheet.cssRules.length - 1; i >= 0; i--) { sheet.deleteRule(i); } @@ -5894,7 +6016,8 @@ function watchForSheetChangesUsingProxy() { element.addEventListener( "__darkreader__updateSheet", - onSheetChange + onSheetChange, + {passive: true} ); } function stopWatchingForSheetChangesUsingProxy() { @@ -5985,8 +6108,10 @@ cleanUp(); reject(); }); - link.addEventListener("load", onLoad); - link.addEventListener("error", onError); + link.addEventListener("load", onLoad, {passive: true}); + link.addEventListener("error", onError, { + passive: true + }); if (!link.href) { onError(); } @@ -6139,53 +6264,73 @@ var observers = []; var observedRoots; + var definedCustomElements = new Set(); var undefinedGroups = new Map(); var elementsDefinitionCallback; + function isCustomElement(element) { + if (element.tagName.includes("-") || element.getAttribute("is")) { + return true; + } + return false; + } + function recordUndefinedElement(element) { + var tag = element.tagName.toLowerCase(); + if (!tag.includes("-")) { + var extendedTag = element.getAttribute("is"); + if (extendedTag) { + tag = extendedTag; + } else { + return; + } + } + if (!undefinedGroups.has(tag)) { + undefinedGroups.set(tag, new Set()); + customElementsWhenDefined(tag).then(function () { + if (elementsDefinitionCallback) { + var elements = undefinedGroups.get(tag); + undefinedGroups.delete(tag); + elementsDefinitionCallback(Array.from(elements)); + } + }); + } + undefinedGroups.get(tag).add(element); + } function collectUndefinedElements(root) { if (!isDefinedSelectorSupported) { return; } - forEach(root.querySelectorAll(":not(:defined)"), function (el) { - var tag = el.tagName.toLowerCase(); - if (!tag.includes("-")) { - var extendedTag = el.getAttribute("is"); - if (extendedTag) { - tag = extendedTag; - } else { - return; - } - } - if (!undefinedGroups.has(tag)) { - undefinedGroups.set(tag, new Set()); - customElementsWhenDefined(tag).then(function () { - if (elementsDefinitionCallback) { - var elements = undefinedGroups.get(tag); - undefinedGroups.delete(tag); - elementsDefinitionCallback(Array.from(elements)); - } - }); - } - undefinedGroups.get(tag).add(el); - }); + forEach( + root.querySelectorAll(":not(:defined)"), + recordUndefinedElement + ); } var canOptimizeUsingProxy = false; document.addEventListener( "__darkreader__inlineScriptsAllowed", function () { canOptimizeUsingProxy = true; - } + }, + {once: true, passive: true} ); var resolvers = new Map(); function handleIsDefined(e) { canOptimizeUsingProxy = true; - if (resolvers.has(e.detail.tag)) { - var resolve = resolvers.get(e.detail.tag); - resolve(); + var tag = e.detail.tag; + definedCustomElements.add(tag); + if (resolvers.has(tag)) { + var r = resolvers.get(tag); + resolvers.delete(tag); + r.forEach(function (r) { + return r(); + }); } } function customElementsWhenDefined(tag) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + if (definedCustomElements.has(tag)) { + return [2]; + } return [ 2, new Promise(function (resolve) { @@ -6197,7 +6342,11 @@ return resolve(); }); } else if (canOptimizeUsingProxy) { - resolvers.set(tag, resolve); + if (resolvers.has(tag)) { + resolvers.get(tag).push(resolve); + } else { + resolvers.set(tag, [resolve]); + } document.dispatchEvent( new CustomEvent( "__darkreader__addUndefinedResolver", @@ -6317,9 +6466,12 @@ movedStyles: movedStyles }); additions.forEach(function (n) { - iterateShadowHosts(n, subscribeForShadowRootChanges); + extendedIterateShadowHosts(n); collectUndefinedElements(n); }); + additions.forEach(function (node) { + return isCustomElement(node) && recordUndefinedElement(node); + }); } function handleHugeTreeMutations(root) { var styles = new Set(getManageableStyles(root)); @@ -6350,7 +6502,7 @@ removedStyles: removedStyles, movedStyles: movedStyles }); - iterateShadowHosts(root, subscribeForShadowRootChanges); + extendedIterateShadowHosts(root); collectUndefinedElements(root); } function handleAttributeMutations(mutations) { @@ -6379,13 +6531,15 @@ } } function observe(root) { + if (observedRoots.has(root)) { + return; + } var treeObserver = createOptimizedTreeObserver(root, { onMinorMutations: handleMinorTreeMutations, onHugeMutations: handleHugeTreeMutations }); var attrObserver = new MutationObserver(handleAttributeMutations); attrObserver.observe(root, { - attributes: true, attributeFilter: ["rel", "disabled", "media", "href"], subtree: true }); @@ -6400,11 +6554,11 @@ observe(shadowRoot); shadowRootDiscovered(shadowRoot); } + function extendedIterateShadowHosts(node) { + iterateShadowHosts(node, subscribeForShadowRootChanges); + } observe(document); - iterateShadowHosts( - document.documentElement, - subscribeForShadowRootChanges - ); + extendedIterateShadowHosts(document.documentElement); watchWhenCustomElementsDefined(function (hosts) { var newStyles = []; hosts.forEach(function (host) { @@ -6417,11 +6571,13 @@ return; } subscribeForShadowRootChanges(host); - iterateShadowHosts(shadowRoot, subscribeForShadowRootChanges); + extendedIterateShadowHosts(shadowRoot); collectUndefinedElements(shadowRoot); }); }); - document.addEventListener("__darkreader__isDefined", handleIsDefined); + document.addEventListener("__darkreader__isDefined", handleIsDefined, { + passive: true + }); collectUndefinedElements(document); } function resetObservers() { @@ -6436,27 +6592,6 @@ unsubscribeFromDefineCustomElements(); } - function hexify(number) { - return (number < 16 ? "0" : "") + number.toString(16); - } - function generateUID() { - if ("randomUUID" in crypto) { - var uuid = crypto.randomUUID(); - return ( - uuid.substring(0, 8) + - uuid.substring(9, 13) + - uuid.substring(14, 18) + - uuid.substring(19, 23) + - uuid.substring(24) - ); - } - return Array.from(crypto.getRandomValues(new Uint8Array(16))) - .map(function (x) { - return hexify(x); - }) - .join(""); - } - var adoptedStyleOverrides = new WeakMap(); var overrideList = new WeakSet(); function createAdoptedStyleSheetOverride(node) { @@ -6532,7 +6667,10 @@ }; } - function injectProxy(enableStyleSheetsProxy) { + function injectProxy( + enableStyleSheetsProxy, + enableCustomElementRegistryProxy + ) { document.dispatchEvent( new CustomEvent("__darkreader__inlineScriptsAllowed") ); @@ -6555,6 +6693,13 @@ var documentStyleSheetsDescriptor = enableStyleSheetsProxy ? Object.getOwnPropertyDescriptor(Document.prototype, "styleSheets") : null; + var customElementRegistryDefineDescriptor = + enableCustomElementRegistryProxy + ? Object.getOwnPropertyDescriptor( + CustomElementRegistry.prototype, + "define" + ) + : null; var shouldWrapHTMLElement = [ "baidu.com", "baike.baidu.com", @@ -6573,6 +6718,10 @@ "getElementsByTagName" ) : null; + var shouldProxyChildNodes = location.hostname === "www.vy.no"; + var childNodesDescriptor = shouldProxyChildNodes + ? Object.getOwnPropertyDescriptor(Node.prototype, "childNodes") + : null; var cleanUp = function () { Object.defineProperty( CSSStyleSheet.prototype, @@ -6606,6 +6755,13 @@ documentStyleSheetsDescriptor ); } + if (enableCustomElementRegistryProxy) { + Object.defineProperty( + CustomElementRegistry.prototype, + "define", + customElementRegistryDefineDescriptor + ); + } if (shouldWrapHTMLElement) { Object.defineProperty( Element.prototype, @@ -6613,27 +6769,43 @@ getElementsByTagNameDescriptor ); } + if (shouldProxyChildNodes) { + Object.defineProperty( + Node.prototype, + "childNodes", + childNodesDescriptor + ); + } }; - var addUndefinedResolver = function (e) { - customElements.whenDefined(e.detail.tag).then(function () { + var addUndefinedResolverInner = function (tag) { + customElements.whenDefined(tag).then(function () { document.dispatchEvent( new CustomEvent("__darkreader__isDefined", { - detail: {tag: e.detail.tag} + detail: {tag: tag} }) ); }); }; - document.addEventListener("__darkreader__cleanUp", cleanUp); + var addUndefinedResolver = function (e) { + return addUndefinedResolverInner(e.detail.tag); + }; + document.addEventListener("__darkreader__cleanUp", cleanUp, { + passive: true + }); document.addEventListener( "__darkreader__addUndefinedResolver", - addUndefinedResolver + addUndefinedResolver, + {passive: true} ); var updateSheetEvent = new Event("__darkreader__updateSheet"); function proxyAddRule(selector, style, index) { addRuleDescriptor.value.call(this, selector, style, index); if ( this.ownerNode && - !this.ownerNode.classList.contains("darkreader") + !( + this.ownerNode.classList && + this.ownerNode.classList.contains("darkreader") + ) ) { this.ownerNode.dispatchEvent(updateSheetEvent); } @@ -6647,7 +6819,10 @@ ); if ( this.ownerNode && - !this.ownerNode.classList.contains("darkreader") + !( + this.ownerNode.classList && + this.ownerNode.classList.contains("darkreader") + ) ) { this.ownerNode.dispatchEvent(updateSheetEvent); } @@ -6657,7 +6832,10 @@ deleteRuleDescriptor.value.call(this, index); if ( this.ownerNode && - !this.ownerNode.classList.contains("darkreader") + !( + this.ownerNode.classList && + this.ownerNode.classList.contains("darkreader") + ) ) { this.ownerNode.dispatchEvent(updateSheetEvent); } @@ -6666,7 +6844,10 @@ removeRuleDescriptor.value.call(this, index); if ( this.ownerNode && - !this.ownerNode.classList.contains("darkreader") + !( + this.ownerNode.classList && + this.ownerNode.classList.contains("darkreader") + ) ) { this.ownerNode.dispatchEvent(updateSheetEvent); } @@ -6680,8 +6861,14 @@ __read(docSheets), false ).filter(function (styleSheet) { - return !styleSheet.ownerNode.classList.contains( - "darkreader" + return ( + styleSheet.ownerNode && + !( + styleSheet.ownerNode.classList && + styleSheet.ownerNode.classList.contains( + "darkreader" + ) + ) ); }); filteredSheets.item = function (item) { @@ -6701,6 +6888,15 @@ elements = new Proxy(elements, styleSheetListBehavior); return elements; } + function proxyCustomElementRegistryDefine(name, constructor, options) { + addUndefinedResolverInner(name); + customElementRegistryDefineDescriptor.value.call( + this, + name, + constructor, + options + ); + } function proxyGetElementsByTagName(tagName) { var _this = this; if (tagName !== "style") { @@ -6712,11 +6908,17 @@ tagName ); return Object.setPrototypeOf( - __spreadArray([], __read(elements), false).filter(function ( - element - ) { - return !element.classList.contains("darkreader"); - }), + __spreadArray([], __read(elements), false).filter( + function (element) { + return ( + element && + !( + element.classList && + element.classList.contains("darkreader") + ) + ); + } + ), NodeList.prototype ); }; @@ -6731,6 +6933,20 @@ elements = new Proxy(elements, nodeListBehavior); return elements; } + function proxyChildNodes() { + var childNodes = childNodesDescriptor.get.call(this); + return Object.setPrototypeOf( + __spreadArray([], __read(childNodes), false).filter( + function (element) { + return ( + !element.classList || + !element.classList.contains("darkreader") + ); + } + ), + NodeList.prototype + ); + } Object.defineProperty( CSSStyleSheet.prototype, "addRule", @@ -6760,6 +6976,15 @@ }) ); } + if (enableCustomElementRegistryProxy) { + Object.defineProperty( + CustomElementRegistry.prototype, + "define", + Object.assign({}, customElementRegistryDefineDescriptor, { + value: proxyCustomElementRegistryDefine + }) + ); + } if (shouldWrapHTMLElement) { Object.defineProperty( Element.prototype, @@ -6769,6 +6994,74 @@ }) ); } + if (shouldProxyChildNodes) { + Object.defineProperty( + Node.prototype, + "childNodes", + Object.assign({}, childNodesDescriptor, {get: proxyChildNodes}) + ); + } + } + + var documentVisibilityListener = null; + var documentIsVisible_ = !document.hidden; + var listenerOptions = { + capture: true, + passive: true + }; + function watchForDocumentVisibility() { + document.addEventListener( + "visibilitychange", + documentVisibilityListener, + listenerOptions + ); + window.addEventListener( + "pageshow", + documentVisibilityListener, + listenerOptions + ); + window.addEventListener( + "focus", + documentVisibilityListener, + listenerOptions + ); + } + function stopWatchingForDocumentVisibility() { + document.removeEventListener( + "visibilitychange", + documentVisibilityListener, + listenerOptions + ); + window.removeEventListener( + "pageshow", + documentVisibilityListener, + listenerOptions + ); + window.removeEventListener( + "focus", + documentVisibilityListener, + listenerOptions + ); + } + function setDocumentVisibilityListener(callback) { + var alreadyWatching = Boolean(documentVisibilityListener); + documentVisibilityListener = function () { + if (!document.hidden) { + removeDocumentVisibilityListener(); + callback(); + documentIsVisible_ = true; + } + }; + if (!alreadyWatching) { + watchForDocumentVisibility(); + } + } + function removeDocumentVisibilityListener() { + stopWatchingForDocumentVisibility(); + documentVisibilityListener = null; + } + function documentIsVisible() { + return documentIsVisible_; } var INSTANCE_ID = generateUID(); @@ -6777,8 +7070,8 @@ var filter = null; var fixes = null; var isIFrame$1 = null; - var ignoredImageAnalysisSelectors = null; - var ignoredInlineSelectors = null; + var ignoredImageAnalysisSelectors = []; + var ignoredInlineSelectors = []; function createOrUpdateStyle(className, root) { if (root === void 0) { root = document.head || document; @@ -6809,7 +7102,7 @@ function setupNodePositionWatcher(node, alias) { nodePositionWatchers.has(alias) && nodePositionWatchers.get(alias).stop(); - nodePositionWatchers.set(alias, watchForNodePosition(node, "parent")); + nodePositionWatchers.set(alias, watchForNodePosition(node, "head")); } function stopStylePositionWatchers() { forEach(nodePositionWatchers.values(), function (watcher) { @@ -6876,11 +7169,12 @@ setupNodePositionWatcher(overrideStyle, "override"); var variableStyle = createOrUpdateStyle("darkreader--variables"); var selectionColors = getSelectionColor(filter); - var darkSchemeBackgroundColor = filter.darkSchemeBackgroundColor, - darkSchemeTextColor = filter.darkSchemeTextColor, - lightSchemeBackgroundColor = filter.lightSchemeBackgroundColor, - lightSchemeTextColor = filter.lightSchemeTextColor, - mode = filter.mode; + var _a = filter, + darkSchemeBackgroundColor = _a.darkSchemeBackgroundColor, + darkSchemeTextColor = _a.darkSchemeTextColor, + lightSchemeBackgroundColor = _a.lightSchemeBackgroundColor, + lightSchemeTextColor = _a.lightSchemeTextColor, + mode = _a.mode; var schemeBackgroundColor = mode === 0 ? lightSchemeBackgroundColor : darkSchemeBackgroundColor; var schemeTextColor = @@ -6914,18 +7208,24 @@ setupNodePositionWatcher(variableStyle, "variables"); var rootVarsStyle = createOrUpdateStyle("darkreader--root-vars"); document.head.insertBefore(rootVarsStyle, variableStyle.nextSibling); - var injectProxyArg = !(fixes && fixes.disableStyleSheetsProxy); + var enableStyleSheetsProxy = !(fixes && fixes.disableStyleSheetsProxy); + var enableCustomElementRegistryProxy = !( + fixes && fixes.disableCustomElementRegistryProxy + ); { var proxyScript = createOrUpdateScript("darkreader--proxy"); proxyScript.append( - "(".concat(injectProxy, ")(").concat(injectProxyArg, ")") + "(" + .concat(injectProxy, ")(") + .concat(enableStyleSheetsProxy, ", ") + .concat(enableCustomElementRegistryProxy, ")") ); document.head.insertBefore(proxyScript, rootVarsStyle.nextSibling); proxyScript.remove(); } } var shadowRootsWithOverrides = new Set(); - function createShadowStaticStyleOverrides(root) { + function createShadowStaticStyleOverridesInner(root) { var inlineStyle = createOrUpdateStyle("darkreader--inline", root); inlineStyle.textContent = getInlineOverrideStyle(); root.insertBefore(inlineStyle, root.firstChild); @@ -6956,6 +7256,81 @@ root.insertBefore(invertStyle, overrideStyle.nextSibling); shadowRootsWithOverrides.add(root); } + function delayedCreateShadowStaticStyleOverrides(root) { + var observer = new MutationObserver(function (mutations, observer) { + var e_1, _a, e_2, _b; + observer.disconnect(); + try { + for ( + var mutations_1 = __values(mutations), + mutations_1_1 = mutations_1.next(); + !mutations_1_1.done; + mutations_1_1 = mutations_1.next() + ) { + var _c = mutations_1_1.value, + type = _c.type, + removedNodes = _c.removedNodes; + if (type === "childList") { + try { + for ( + var _d = + ((e_2 = void 0), + __values(removedNodes)), + _e = _d.next(); + !_e.done; + _e = _d.next() + ) { + var _f = _e.value, + nodeName = _f.nodeName, + className = _f.className; + if ( + nodeName === "STYLE" && + [ + "darkreader darkreader--inline", + "darkreader darkreader--override", + "darkreader darkreader--invert" + ].includes(className) + ) { + createShadowStaticStyleOverridesInner(root); + return; + } + } + } catch (e_2_1) { + e_2 = {error: e_2_1}; + } finally { + try { + if (_e && !_e.done && (_b = _d.return)) + _b.call(_d); + } finally { + if (e_2) throw e_2.error; + } + } + } + } + } catch (e_1_1) { + e_1 = {error: e_1_1}; + } finally { + try { + if ( + mutations_1_1 && + !mutations_1_1.done && + (_a = mutations_1.return) + ) + _a.call(mutations_1); + } finally { + if (e_1) throw e_1.error; + } + } + }); + observer.observe(root, {childList: true}); + } + function createShadowStaticStyleOverrides(root) { + var uninit = root.firstChild === null; + createShadowStaticStyleOverridesInner(root); + if (uninit) { + delayedCreateShadowStaticStyleOverrides(root); + } + } function replaceCSSTemplates($cssText) { return $cssText.replace(/\${(.+?)}/g, function (_, $color) { var color = parseColorWithCache($color); @@ -6993,15 +7368,11 @@ }); variablesStore.matchVariablesAndDependants(); variablesStore.setOnRootVariableChange(function () { - variablesStore.putRootVars( - document.head.querySelector(".darkreader--root-vars"), - filter - ); + var rootVarsStyle = createOrUpdateStyle("darkreader--root-vars"); + variablesStore.putRootVars(rootVarsStyle, filter); }); - variablesStore.putRootVars( - document.head.querySelector(".darkreader--root-vars"), - filter - ); + var rootVarsStyle = createOrUpdateStyle("darkreader--root-vars"); + variablesStore.putRootVars(rootVarsStyle, filter); styleManagers.forEach(function (manager) { return manager.render(filter, ignoredImageAnalysisSelectors); }); @@ -7038,7 +7409,7 @@ function createManager(element) { var loadingStyleId = ++loadingStylesCounter; function loadingStart() { - if (!isDOMReady() || !didDocumentShowUp) { + if (!isDOMReady() || !documentIsVisible()) { loadingStyles.add(loadingStyleId); logInfo( "Current amount of styles loading: ".concat( @@ -7109,39 +7480,14 @@ return; } } - var documentVisibilityListener = null; - var didDocumentShowUp = !document.hidden; - function watchForDocumentVisibility(callback) { - var alreadyWatching = Boolean(documentVisibilityListener); - documentVisibilityListener = function () { - if (!document.hidden) { - stopWatchingForDocumentVisibility(); - callback(); - didDocumentShowUp = true; - } - }; - if (!alreadyWatching) { - document.addEventListener( - "visibilitychange", - documentVisibilityListener - ); - } - } - function stopWatchingForDocumentVisibility() { - document.removeEventListener( - "visibilitychange", - documentVisibilityListener - ); - documentVisibilityListener = null; + function runDynamicStyle() { + createDynamicStyleOverrides(); + watchForUpdates(); } function createThemeAndWatchForUpdates() { createStaticStyleOverrides(); - function runDynamicStyle() { - createDynamicStyleOverrides(); - watchForUpdates(); - } - if (document.hidden && !filter.immediateModify) { - watchForDocumentVisibility(runDynamicStyle); + if (!documentIsVisible() && !filter.immediateModify) { + setDocumentVisibilityListener(runDynamicStyle); } else { runDynamicStyle(); } @@ -7224,12 +7570,10 @@ var styleAttr = element.getAttribute("style") || ""; if (styleAttr.includes("--")) { variablesStore.matchVariablesAndDependants(); - variablesStore.putRootVars( - document.head.querySelector( - ".darkreader--root-vars" - ), - filter + var rootVarsStyle = createOrUpdateStyle( + "darkreader--root-vars" ); + variablesStore.putRootVars(rootVarsStyle, filter); } } }, @@ -7293,7 +7637,7 @@ addMetaListener(); return false; } - function createOrUpdateDynamicTheme( + function createOrUpdateDynamicThemeInternal( filterConfig, dynamicThemeFixes, iframe @@ -7321,6 +7665,7 @@ isIFrame$1 = iframe; if (document.head) { if (isAnotherDarkReaderInstanceActive()) { + removeDynamicTheme(); return; } document.documentElement.setAttribute( @@ -7394,7 +7739,7 @@ function cleanDynamicThemeCache() { variablesStore.clear(); parsedURLCache.clear(); - stopWatchingForDocumentVisibility(); + removeDocumentVisibilityListener(); cancelRendering(); stopWatchingForUpdates(); cleanModificationCache(); @@ -7504,7 +7849,7 @@ if (theme.engine !== ThemeEngine.dynamicTheme) { throw new Error("Theme engine is not supported."); } - createOrUpdateDynamicTheme(theme, fixes, isIFrame); + createOrUpdateDynamicThemeInternal(theme, fixes, isIFrame); isDarkReaderEnabled = true; } function isEnabled() { diff --git a/assets/js/darkreader.min.js b/assets/js/darkreader.min.js index 621e9eb..06253a7 100644 --- a/assets/js/darkreader.min.js +++ b/assets/js/darkreader.min.js @@ -1,8 +1,8 @@ /** - * Minified by jsDelivr using Terser v5.15.0. - * Original file: /npm/darkreader@4.9.58/darkreader.js + * Minified by jsDelivr using Terser v5.19.2. + * Original file: /npm/darkreader@4.9.66/darkreader.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DarkReader={})}(this,(function(e){"use strict";var t,r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function u(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a Promise))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},x=C;function T(e){return n(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,x(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var R,V,A=new Set;function M(){for(var e=[],r=0;r=10){if(f-c1e3)return!0;for(var t=0,r=0;r1e3)return!0;return!1}(t))!o||H()?n.forEach((function(t){return(0,t.onHugeMutations)(e)})):i||(z(a=function(){return n.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),i=!0),o=!0;else{var r=function(e){var t=new Set,r=new Set,n=new Set;e.forEach((function(e){F(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),F(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?(n.add(e),t.delete(e)):r.add(e))}))}));var a=[],o=[];return t.forEach((function(e){t.has(e.parentElement)&&a.push(e)})),r.forEach((function(e){r.has(e.parentElement)&&o.push(e)})),a.forEach((function(e){return t.delete(e)})),o.forEach((function(e){return r.delete(e)})),{additions:t,moves:n,deletions:r}}(t);n.forEach((function(e){return(0,e.onMinorMutations)(r)}))}})),r.observe(e,{childList:!0,subtree:!0}),ee.set(e,r),n=new Set,te.set(r,n)}return n.add(t),{disconnect:function(){n.delete(t),a&&Q(a),0===n.size&&(r.disconnect(),te.delete(r),ee.delete(e))}}}var ne=new Map;function ae(e){return J||(J=document.createElement("a")),J.href=e,J.href}function oe(e,t){void 0===t&&(t=null);var r="".concat(e).concat(t?";".concat(t):"");if(ne.has(r))return ne.get(r);if(t){var n=new URL(e,ae(t));return ne.set(r,n),n}var a=new URL(ae(e));return ne.set(e,a),a}function ie(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return"".concat(location.protocol).concat(t);var r=oe(e);return oe(t,r.href).href}function ue(e,t,r){F(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{ue(e.styleSheet.cssRules,t,r)}catch(e){r&&r()}else if(e.media){var n=Array.from(e.media),a=n.some((function(e){return e.startsWith("screen")||e.startsWith("all")||e.startsWith("(")})),o=n.some((function(e){return e.startsWith("print")||e.startsWith("speech")}));!a&&o||ue(e.cssRules,t,r)}else e.conditionText&&CSS.supports(e.conditionText)&&ue(e.cssRules,t,r)}))}var ce=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],se=p?ce.map((function(e){return[e,new RegExp("".concat(e,":\\s*(.*?)\\s*;"))]})):null;function le(e,t){F(e,(function(r){var n=e.getPropertyValue(r).trim();n&&t(r,n)}));var r=e.cssText;r.includes("var(")&&(p?se.forEach((function(e){var n=i(e,2),a=n[0],o=n[1],u=r.match(o);if(u&&u[1]){var c=u[1].trim();t(a,c)}})):ce.forEach((function(r){var n=e.getPropertyValue(r);n&&n.includes("var(")&&t(r,n)})))}var de=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,fe=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function he(e){return e.trim().replace(/[\n\r\\]+/g,"").replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function pe(e){var t=oe(e);return"".concat(t.origin).concat(t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1"))}var ve=/\/\*[\s\S]*?\*\//g;var me=/@font-face\s*{[^}]*}/g;function ge(e){for(var t,r=[],n=[],a=0,o=e.length;a>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if(je.has(t))return function(e){var t=je.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if("transparent"===e)return{r:0,g:0,b:0,a:0};return null}(e);return t&&we.set(e,t),t}function Ce(e){if(ke.has(e))return ke.get(e);var t=Ee(e);if(!t)return null;var r=Te(t);return ke.set(e,r),r}function xe(e){var t=e.h,r=e.s,n=e.l,a=e.a,o=void 0===a?1:a;if(0===r){var u=i([n,n,n].map((function(e){return Math.round(255*e)})),3),c=u[0],s=u[1];return{r:c,g:u[2],b:s,a:o}}var l=(1-Math.abs(2*n-1))*r,d=l*(1-Math.abs(t/60%2-1)),f=n-l/2,h=i((t<60?[l,d,0]:t<120?[d,l,0]:t<180?[0,l,d]:t<240?[0,d,l]:t<300?[d,0,l]:[l,0,d]).map((function(e){return Math.round(255*(e+f))})),3);return{r:h[0],g:h[1],b:h[2],a:o}}function Te(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=void 0===a?1:a,i=t/255,u=r/255,c=n/255,s=Math.max(i,u,c),l=Math.min(i,u,c),d=s-l,f=(s+l)/2;if(0===d)return{h:0,s:0,l:f,a:o};var h=60*(s===i?(u-c)/d%6:s===u?(c-i)/d+2:(i-u)/d+4);return h<0&&(h+=360),{h:h,s:d/(1-Math.abs(2*f-1)),l:f,a:o}}function Re(e,t){void 0===t&&(t=0);var r=e.toFixed(t);if(0===t)return r;var n=r.indexOf(".");if(n>=0){var a=r.match(/0+$/);if(a)return a.index===n+1?r.substring(0,n):r.substring(0,a.index)}return r}function Ve(e){var t=e.h,r=e.s,n=e.l,a=e.a;return null!=a&&a<1?"hsla(".concat(Re(t),", ").concat(Re(100*r),"%, ").concat(Re(100*n),"%, ").concat(Re(a,2),")"):"hsl(".concat(Re(t),", ").concat(Re(100*r),"%, ").concat(Re(100*n),"%)")}var Ae=/^rgba?\([^\(\)]+\)$/,Me=/^hsla?\([^\(\)]+\)$/,Le=/^#[0-9a-f]+$/i;function Oe(e,t,r){var n=function(e){var t=[],r=0,n=!1,a=e.indexOf("(");e=e.substring(a+1,e.length-1);for(var o=0;o="0"&&i<="9"||"."===i||"+"===i||"-"===i?n=!0:!n||" "!==i&&","!==i?n||(r=o+1):(t.push(e.substring(r,o)),n=!1,r=o+1)}return n&&t.push(e.substring(r,e.length)),t}(e),a=Object.entries(r);return n.map((function(e){return e.trim()})).map((function(e,r){var n,o=a.find((function(t){var r=i(t,1)[0];return e.endsWith(r)}));return n=o?parseFloat(e.substring(0,e.length-o[0].length))/o[1]*t[r]:parseFloat(e),t[r]>1?Math.round(n):n}))}var De=[255,255,255,1],Pe={"%":100};var Ie=[360,1,1,1],Ne={"%":100,deg:360,rad:2*Math.PI,turn:1};var Fe=new Map(Object.entries({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,grey:8421504,green:32768,greenyellow:11403055,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074})),je=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var t=i(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})));function Be(e,t,r){return(.2126*e+.7152*t+.0722*r)/255}function qe(e,t,r,n,a){return(e-t)*(a-n)/(r-t)+n}function Ue(e,t,r){return Math.min(r,Math.max(t,e))}function We(e,t){for(var r=[],n=0,a=e.length;n.8&&(a>200&&a<280);var s=a,l=i;return n&&(c?(s=t.h,l=t.s):(s=r.h,l=r.s)),{h:s,s:l,l:qe(i,0,1,t.l,r.l),a:u}}function tt(e,t){var r=e.h,n=e.s,a=e.l,o=e.a,i=n<.12||a>.8&&(r>200&&r<280);if(a<.5){var u=qe(a,0,.5,0,.4);return i?{h:t.h,s:t.s,l:u,a:o}:{h:r,s:n,l:u,a:o}}var c=qe(a,.5,1,.4,t.l);if(i)return{h:t.h,s:t.s,l:c,a:o};var s=r;r>60&&r<180&&(s=r>120?qe(r,120,180,135,180):qe(r,60,120,60,105));return s>40&&s<80&&(c*=.75),{h:s,s:n,l:c,a:o}}function rt(e,t){if(0===t.mode)return Je(e,t);var n=$e(t);return Xe(e,r(r({},t),{mode:0}),tt,n)}var nt,at=.55;function ot(e){return qe(e,205,245,205,220)}function it(e,t){var r=e.h,n=e.s,a=e.l,o=e.a,i=a<.2||n<.24,u=!i&&r>205&&r<245;if(a>.5){var c=qe(a,.5,1,at,t.l);if(i)return{h:t.h,s:t.s,l:c,a:o};var s=r;return u&&(s=ot(r)),{h:s,s:n,l:c,a:o}}if(i)return{h:t.h,s:t.s,l:qe(a,0,.5,t.l,at),a:o};var l,d=r;return u?(d=ot(r),l=qe(a,0,.5,t.l,Math.min(1,.6000000000000001))):l=qe(a,0,.5,t.l,at),{h:d,s:n,l:l,a:o}}function ut(e,t){if(0===t.mode)return Je(e,t);var n=ze(t);return Xe(e,r(r({},t),{mode:0}),it,n)}function ct(e,t,r){var n=e.h,a=e.s,o=e.l,i=e.a,u=n,c=a;return(o<.2||a<.24)&&(o<.5?(u=t.h,c=t.s):(u=r.h,c=r.s)),{h:u,s:c,l:qe(o,0,1,.5,.2),a:i}}function st(e,t){if(0===t.mode)return Je(e,t);var n=ze(t),a=$e(t);return Xe(e,r(r({},t),{mode:0}),ct,n,a)}function lt(e,t){return rt(e,t)}function dt(e){var t=[];return e.mode===nt.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness(".concat(e.brightness,"%)")),100!==e.contrast&&t.push("contrast(".concat(e.contrast,"%)")),0!==e.grayscale&&t.push("grayscale(".concat(e.grayscale,"%)")),0!==e.sepia&&t.push("sepia(".concat(e.sepia,"%)")),0===t.length?null:t.join(" ")}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(nt||(nt={}));var ft=0,ht=new Map,pt=new Map;function vt(e){return n(this,void 0,void 0,(function(){return a(this,(function(r){return[2,new Promise((function(r,n){var a=++ft;ht.set(a,r),pt.set(a,n),chrome.runtime.sendMessage({type:t.CS_FETCH,data:e,id:a})}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var r=e.type,n=e.data,a=e.error,o=e.id;if(r===t.BG_FETCH_RESPONSE){var i=ht.get(o),u=pt.get(o);ht.delete(o),pt.delete(o),a?u&&u(a):i&&i(n)}}));var mt=new(function(){function e(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}return e.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},e.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},e.prototype.startQueue=function(){var e=this;this.timerId||(this.timerId=requestAnimationFrame((function(){e.timerId=null;for(var t,r=Date.now();t=e.queue.shift();)if(t(),Date.now()-r>=e.frameDuration){e.startQueue();break}})))},e}());function gt(e){return n(this,void 0,void 0,(function(){var t=this;return a(this,(function(o){return[2,new Promise((function(o,i){return n(t,void 0,void 0,(function(){var t,n,u,c;return a(this,(function(a){switch(a.label){case 0:return e.startsWith("data:")?(t=e,[3,4]):[3,1];case 1:return a.trys.push([1,3,,4]),[4,bt(e)];case 2:return t=a.sent(),[3,4];case 3:return n=a.sent(),i(n),[2];case 4:return a.trys.push([4,6,,7]),[4,yt(t)];case 5:return u=a.sent(),mt.addToQueue((function(){o(r({src:e,dataURL:t,width:u.naturalWidth,height:u.naturalHeight},function(e){St||(t=kt,r=kt,(St=document.createElement("canvas")).width=t,St.height=r,(_t=St.getContext("2d")).imageSmoothingEnabled=!1);var t,r;var n=e.naturalWidth,a=e.naturalHeight;if(0===a||0===n)return"logWarn(Image is empty ".concat(e.currentSrc,")"),null;if(n*a*4>wt)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var o=n*a,i=Math.min(1,Math.sqrt(kt/o)),u=Math.ceil(n*i),c=Math.ceil(a*i);_t.clearRect(0,0,u,c),_t.drawImage(e,0,0,n,a,0,0,u,c);var s,l,d,f,h,p,v,m=_t.getImageData(0,0,u,c).data,g=.05,b=.4,y=.7,S=0,_=0,k=0;for(d=0;dy&&k++);var w=u*c,E=w-S;return{isDark:_/E>=.7,isLight:k/E>=.7,isTransparent:S/w>=.1,isLarge:o>=48e4,isTooLarge:!1}}(u)))})),[3,7];case 6:return c=a.sent(),i(c),[3,7];case 7:return[2]}}))}))}))]}))}))}function bt(e){return n(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return new URL(e).origin!==location.origin?[3,2]:[4,w(e)];case 1:case 3:return[2,t.sent()];case 2:return[4,vt({url:e,responseType:"data-url"})]}}))}))}function yt(e){return n(this,void 0,void 0,(function(){return a(this,(function(t){return[2,new Promise((function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=function(){return r("Unable to load image ".concat(e))},n.src=e}))]}))}))}var St,_t,kt=1024;var wt=5242880;function Et(e,t){var r=e.dataURL,n=e.width,a=e.height,o=Ge(t).slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" "),i=[''),"",'',''),"","",''),""].join("");return"data:image/svg+xml;base64,".concat(btoa(i))}function Ct(){mt&&mt.stopQueue(),St=null,_t=null}var xt="gradient".length,Tt="conic-",Rt=Tt.length,Vt="radial-",At="linear-";function Mt(e,t){return Boolean(e&&e.getPropertyPriority(t))}function Lt(e,t,r,n,a,o){if(e.startsWith("--")){var i=function(e,t,r,n,a,o){return e.getModifierForVariable({varName:t,sourceValue:r,rule:n,ignoredImgSelectors:a,isCancelled:o})}(n,e,t,r,a,o);if(i)return{property:e,value:i,important:Mt(r.style,e),sourceValue:t}}else if(t.includes("var(")){i=function(e,t,r){return e.getModifierForVarDependant(t,r)}(n,e,t);if(i)return{property:e,value:i,important:Mt(r.style,e),sourceValue:t}}else{if("color-scheme"===e)return null;if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){i=function(e,t,r){if(Nt.has(t.toLowerCase()))return t;var n=Ee(t);if(!n)return null;if(e.includes("background"))return r.style.webkitMaskImage&&"none"!==r.style.webkitMaskImage||r.style.webkitMask&&!r.style.webkitMask.startsWith("none")||r.style.mask&&"none"!==r.style.mask||r.style.getPropertyValue("mask-image")&&"none"!==r.style.getPropertyValue("mask-image")?function(e){return ut(n,e)}:function(e){return rt(n,e)};if(e.includes("border")||e.includes("outline"))return function(e){return st(n,e)};return function(e){return ut(n,e)}}(e,t,r);if(i)return{property:e,value:i,important:Mt(r.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(i=Bt(t,r,a,o))return{property:e,value:i,important:Mt(r.style,e),sourceValue:t}}else if(e.includes("shadow")){i=function(e){var t=qt(e);if(!t)return null;return function(e){return t(e).result}}(t);if(i)return{property:e,value:i,important:Mt(r.style,e),sourceValue:t}}}return null}function Ot(){for(var e=[],t=0;t.5,d=function(e){return r(r({},s),{l:Ue(s.l+e,0,1)})},f=function(e){return r(r({},s),{l:Ue(s.l-e,0,1)})};t=Ve(f(.4)),n=Ve(l?f(.4):d(.4)),a=Ve(s),o=Ve(d(.1)),i=Ve(d(.2))}c.push("::-webkit-scrollbar {"),c.push(" background-color: ".concat(t,";")),c.push(" color: ".concat(n,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb {"),c.push(" background-color: ".concat(a,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb:hover {"),c.push(" background-color: ".concat(o,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb:active {"),c.push(" background-color: ".concat(i,";")),c.push("}"),c.push("::-webkit-scrollbar-corner {"),c.push(" background-color: ".concat(u,";")),c.push("}"),h&&(c.push("* {"),c.push(" scrollbar-color: ".concat(a," ").concat(t,";")),c.push("}"));return c.join("\n")}(e)),e.selectionColor&&a.push(function(e){var t=[],r=Pt(e),n=r.backgroundColorSelection,a=r.foregroundColorSelection;return["::selection","::-moz-selection"].forEach((function(e){t.push("".concat(e," {")),t.push(" background-color: ".concat(n," !important;")),t.push(" color: ".concat(a," !important;")),t.push("}")})),t.join("\n")}(e)),a.join("\n")}function Pt(e){var t,n;if("auto"===e.selectionColor)t=rt({r:0,g:96,b:212},r(r({},e),{grayscale:0})),n=ut({r:255,g:255,b:255},r(r({},e),{grayscale:0}));else{var a=Te(Ee(e.selectionColor));t=e.selectionColor,n=a.l<.5?"#FFF":"#000"}return{backgroundColorSelection:t,foregroundColorSelection:n}}function It(e,t){var r=t.strict,n=[],a=["microsoft.com","docs.microsoft.com"].includes(location.hostname);return n.push("html, body, ".concat(r?"body :not(iframe)".concat(a?':not(div[style^="position:absolute;top:0;left:-"]':""):"body > :not(iframe)"," {")),n.push(" background-color: ".concat(rt({r:255,g:255,b:255},e)," !important;")),n.push(" border-color: ".concat(st({r:64,g:64,b:64},e)," !important;")),n.push(" color: ".concat(ut({r:0,g:0,b:0},e)," !important;")),n.push("}"),n.join("\n")}var Nt=new Set(["inherit","transparent","initial","currentcolor","none","unset"]);var Ft=new Map,jt=new Map;function Bt(e,t,o,i){var u,c,s=this;try{var l=function(e){for(var t=[],r=0,n=Tt.length,a=function(){var a;if([At,Vt,Tt].find((function(t){if(r-t.length>=0&&e.substring(r-t.length,r)===t)return"repeating"===e.slice(r-t.length-10,r-t.length-1)?(a="repeating-".concat(t,"gradient"),!0):"-webkit"===e.slice(r-t.length-8,r-t.length-1)?(a="-webkit-".concat(t,"gradient"),!0):(a="".concat(t,"gradient"),!0)})),!a)return"break";var o=_e(e,r+xt),i=o.start,u=o.end,c=e.substring(i+1,u-1);n=u+1+Rt,t.push({typeGradient:a,match:c,offset:a.length+2,index:r-a.length+xt,hasComma:!0})};-1!==(r=e.indexOf("gradient",n))&&"break"!==a(););return t.length&&(t[t.length-1].hasComma=!1),t}(e),d=Se(de,e);if(0===d.length&&0===l.length)return e;var f=l.map((function(e){return r({type:"gradient"},e)})).concat((u=d,c=0,u.map((function(t){var r=e.indexOf(t,c);return c=r+t.length,{match:t,index:r}}))).map((function(e){return r({type:"url",offset:0},e)}))).sort((function(e,t){return e.index>t.index?1:-1})),h=function(e,t){var n,a=e.isDark,o=e.isLight,i=e.isTransparent,u=e.isLarge,c=e.isTooLarge,s=e.width;if(c)n='url("'.concat(e.src,'")');else if(a&&i&&1===t.mode&&!u&&s>2){"Inverting dark image ".concat(e.src);var l=Et(e,r(r({},t),{sepia:Ue(t.sepia+10,0,100)}));n='url("'.concat(l,'")')}else if(o&&!i&&1===t.mode)if(u)n="none";else{"Dimming light image ".concat(e.src);var d=Et(e,t);n='url("'.concat(d,'")')}else if(0===t.mode&&o&&!u){"Applying filter to image ".concat(e.src);var f=Et(e,r(r({},t),{brightness:Ue(t.brightness-10,5,200),sepia:Ue(t.sepia+10,0,100)}));n='url("'.concat(f,'")')}else n=null;return n},p=[],v=0,m=!1;return f.forEach((function(r,u){var c=r.type,l=r.match,d=r.index,g=r.typeGradient,b=r.hasComma,y=r.offset,S=d,_=v,k=S+l.length+y;v=k,_!==S&&(m?p.push((function(){var t=e.substring(_,S);return","===t[0]&&(t=t.substring(1)),t})):p.push((function(){return e.substring(_,S)}))),m=b||!1,"url"===c?p.push(function(e){var r;if(function(e,t){if(!e||0===t.length)return!1;if(t.some((function(e){return"*"===e})))return!0;for(var r=e.split(/,\s*/g),n=function(e){var n=t[e];if(r.some((function(e){return e===n})))return{value:!0}},a=0;a0},e.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},e.prototype.matchVariablesAndDependants=function(){var e=this;this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(this.rulesQueue),this.rulesQueue.splice(0),this.collectRootVarDependants(),this.varRefs.forEach((function(t,r){t.forEach((function(t){e.varTypes.has(r)&&e.resolveVariableType(t,e.varTypes.get(r))}))})),this.unknownColorVars.forEach((function(t){e.unknownBgVars.has(t)?(e.unknownColorVars.delete(t),e.unknownBgVars.delete(t),e.resolveVariableType(t,1)):e.isVarType(t,7)?e.unknownColorVars.delete(t):e.undefinedVars.add(t)})),this.unknownBgVars.forEach((function(t){null!=e.findVarRef(t,(function(t){return e.unknownColorVars.has(t)||e.isVarType(t,6)}))?e.itarateVarRefs(t,(function(t){e.resolveVariableType(t,1)})):e.isVarType(t,9)?e.unknownBgVars.delete(t):e.undefinedVars.add(t)})),this.changedTypeVars.forEach((function(t){e.typeChangeSubscriptions.has(t)&&e.typeChangeSubscriptions.get(t).forEach((function(e){e()}))})),this.changedTypeVars.clear()},e.prototype.getModifierForVariable=function(e){var t=this;return function(r){var n=e.varName,a=e.sourceValue,o=e.rule,i=e.ignoredImgSelectors,u=e.isCancelled,c=function(){var e=[],c=function(o,i,u){if(t.isVarType(n,o)){var c,s=i(n);if(Jt(a))if(er(a)){var l=ur(a,t.unstableVarValues);l||(l=1===o?"#ffffff":"#000000"),c=u(l,r)}else c=zt(a,(function(e){return i(e)}),(function(e){return u(e,r)}));else c=u(a,r);e.push({property:s,value:c})}};if(c(1,Qt,ar),c(2,Kt,or),c(4,Yt,ir),t.isVarType(n,8)){var s=Xt(n),l=a;Jt(a)&&(l=zt(a,(function(e){return Qt(e)}),(function(e){return ar(e,r)})));var d=Bt(l,o,i,u);l="function"==typeof d?d(r):d,e.push({property:s,value:l})}return e},s=new Set;return{declarations:c(),onTypeChange:{addListener:function(e){var r=function(){var t=c();e(t)};s.add(r),t.subscribeForVarTypeChange(n,r)},removeListeners:function(){s.forEach((function(e){t.unsubscribeFromVariableTypeChanges(n,e)}))}}}}},e.prototype.getModifierForVarDependant=function(e,t){var r=this;if(t.match(/^\s*(rgb|hsl)a?\(/)){var n=e.startsWith("background"),a=tr(e);return function(e){var o=ur(t,r.unstableVarValues);return o||(o=n?"#ffffff":"#000000"),(n?ar:a?or:ir)(o,e)}}return"background-color"===e?function(e){return zt(t,(function(e){return Qt(e)}),(function(t){return ar(t,e)}))}:tr(e)?function(e){return zt(t,(function(e){return Kt(e)}),(function(t){return or(t,e)}))}:"background"===e||"background-image"===e||"box-shadow"===e?function(n){var a=new Set,o=function(){var o=zt(t,(function(e){return r.isVarType(e,1)?Qt(e):r.isVarType(e,8)?Xt(e):(a.add(e),e)}),(function(e){return ar(e,n)}));if("box-shadow"===e){var i=qt(o)(n);if(i.unparseableMatchesLength!==i.matchesLength)return i.result}return o},i=o();return a.size>0?new Promise((function(e){var t=a.values().next().value,n=function(){r.unsubscribeFromVariableTypeChanges(t,n);var a=o();e(a)};r.subscribeForVarTypeChange(t,n)})):i}:e.startsWith("border")||e.startsWith("outline")?function(e){return zt(t,(function(e){return Yt(e)}),(function(t){return ir(t,e)}))}:null},e.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);var r=this.typeChangeSubscriptions.get(e);r.has(t)||r.add(t)},e.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},e.prototype.collectVariablesAndVarDep=function(e){var t=this;e.forEach((function(e){ue(e,(function(e){e.style&&le(e.style,(function(e,r){Zt(e)&&t.inspectVariable(e,r),Jt(r)&&t.inspectVarDependant(e,r)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;le(document.documentElement.style,(function(t,r){Zt(t)&&e.inspectVariable(t,r)}))},e.prototype.inspectVariable=function(e,t){(this.unstableVarValues.set(e,t),Jt(t)&&er(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e))||(this.definedVars.add(e),Ee(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,8))},e.prototype.resolveVariableType=function(e,t){var r=this.initialVarTypes.get(e)||0,n=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,n),(n!==r||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},e.prototype.collectRootVarDependants=function(){var e=this;le(document.documentElement.style,(function(t,r){Jt(r)&&e.inspectVarDependant(t,r)}))},e.prototype.inspectVarDependant=function(e,t){var r=this;Zt(e)?this.iterateVarDeps(t,(function(t){r.varRefs.has(e)||r.varRefs.set(e,new Set),r.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,1)})):tr(e)?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,2)})):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,4)})):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(function(e){if(!r.isVarType(e,9)){var t=null!=r.findVarRef(e,(function(e){return r.unknownColorVars.has(e)||r.isVarType(e,6)}));r.itarateVarRefs(e,(function(e){t?r.resolveVariableType(e,1):r.unknownBgVars.add(e)}))}}))},e.prototype.iterateVarDeps=function(e,t){var r=new Set;!function(e,t){zt(e,(function(e){return t(e),e}))}(e,(function(e){return r.add(e)})),r.forEach((function(e){return t(e)}))},e.prototype.findVarRef=function(e,t,r){var n,a;if(void 0===r&&(r=new Set),r.has(e))return null;if(r.add(e),t(e))return e;var i=this.varRefs.get(e);if(!i||0===i.size)return null;try{for(var u=o(i),c=u.next();!c.done;c=u.next()){var s=c.value,l=this.findVarRef(s,t,r);if(l)return l}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}return null},e.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,(function(e){return t(e),!1}))},e.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},e.prototype.putRootVars=function(e,t){var r,n,a=this,u=e.sheet;u.cssRules.length>0&&u.deleteRule(0);var c=new Map;le(document.documentElement.style,(function(e,r){Zt(e)&&(a.isVarType(e,1)&&c.set(Qt(e),ar(r,t)),a.isVarType(e,2)&&c.set(Kt(e),or(r,t)),a.isVarType(e,4)&&c.set(Yt(e),ir(r,t)),a.subscribeForVarTypeChange(e,a.onRootVariableDefined))}));var s=[];s.push(":root {");try{for(var l=o(c),d=l.next();!d.done;d=l.next()){var f=i(d.value,2),h=f[0],p=f[1];s.push(" ".concat(h,": ").concat(p,";"))}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}s.push("}");var v=s.join("\n");u.insertRule(v)},e}());function Gt(e,t){void 0===t&&(t=0);var r=e.indexOf("var(",t);if(r>=0){var n=_e(e,r+3);return n?{start:r,end:n.end}:null}}function Ht(e,t){var r=function(e){for(var t,r=[],n=0;t=Gt(e,n);){var a=t.start,o=t.end;r.push({start:a,end:o,value:e.substring(a,o)}),n=t.end+1}return r}(e),n=r.length;if(0===n)return e;var a=e.length,o=r.map((function(e){return t(e.value)})),i=[];i.push(e.substring(0,r[0].start));for(var u=0;u=0?(t=e.substring(4,n).trim(),r=e.substring(n+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),r=""),{name:t,fallback:r}}function zt(e,t,r){return Ht(e,(function(e){var n,a=$t(e),o=a.name,i=a.fallback,u=t(o);return i?(n=Jt(i)?zt(i,t,r):r?r(i):i,"var(".concat(u,", ").concat(n,")")):"var(".concat(u,")")}))}function Qt(e){return"--darkreader-bg".concat(e)}function Kt(e){return"--darkreader-text".concat(e)}function Yt(e){return"--darkreader-border".concat(e)}function Xt(e){return"--darkreader-bgimg".concat(e)}function Zt(e){return e.startsWith("--")}function Jt(e){return e.includes("var(")}function er(e){return e.match(/^\s*(rgb|hsl)a?\(/)}function tr(e){return"color"===e||"caret-color"===e||"-webkit-text-fill-color"===e}var rr=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function nr(e,t,r){var n=function(e){if(rr.test(e)){var t=e.split(","),r="rgb(";return t.forEach((function(e){r+="".concat(e.trim(),", ")})),r=r.substring(0,r.length-2),{isRaw:!0,color:r+=")"}}return{isRaw:!1,color:e}}(e),a=n.isRaw,o=n.color,i=Ee(o);if(i){var u=r(i,t);if(a){var c=Ee(u);return c?"".concat(c.r,", ").concat(c.g,", ").concat(c.b):u}return u}return o}function ar(e,t){return nr(e,t,rt)}function or(e,t){return nr(e,t,ut)}function ir(e,t){return nr(e,t,st)}function ur(e,t,r){void 0===r&&(r=new Set);var n=!1,a=Ht(e,(function(e){var a=$t(e),o=a.name,i=a.fallback;if(r.has(o))return n=!0,null;r.add(o);var u=t.get(o)||i,c=null;return u&&(c=Jt(u)?ur(u,t,r):u),c||(n=!0,null)}));return n?null:a}var cr={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor"},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage"},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border"},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom"},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left"},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right"},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top"},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow"},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color"},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill"},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke"},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline"},"stop-color":{customProp:"--darkreader-inline-stopcolor",cssProp:"stop-color",dataAttr:"data-darkreader-inline-stopcolor"}},sr=Object.values(cr),lr={};sr.forEach((function(e){var t=e.cssProp,r=e.customProp;return lr[r]=t}));var dr=["style","fill","stop-color","stroke","bgcolor","color"],fr=dr.map((function(e){return"[".concat(e,"]")})).join(", ");function hr(){return sr.map((function(e){var t=e.dataAttr,r=e.customProp,n=e.cssProp;return["[".concat(t,"] {")," ".concat(n,": var(").concat(r,") !important;"),"}"].join("\n")})).join("\n")}var pr=new Map,vr=new Map;function mr(e,t,r){pr.has(e)&&(pr.get(e).disconnect(),vr.get(e).disconnect());var n=new WeakSet;function a(e){(function(e){var t=[];return e instanceof Element&&e.matches(fr)&&t.push(e),(e instanceof Element||b&&e instanceof ShadowRoot||e instanceof Document)&&j(t,e.querySelectorAll(fr)),t})(e).forEach((function(e){n.has(e)||(n.add(e),t(e))})),G(e,(function(a){n.has(e)||(n.add(e),r(a.shadowRoot),mr(a.shadowRoot,t,r))}))}var o=re(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return a(e)}))},onHugeMutations:function(){a(e)}});pr.set(e,o);var c=0,s=null,l=q({seconds:10}),d=q({seconds:2}),f=[],h=null,p=B((function(e){e.forEach((function(e){dr.includes(e.attributeName)&&t(e.target)}))})),v=new MutationObserver((function(e){if(h)f.push.apply(f,u([],i(e),!1));else{c++;var t=Date.now();if(null==s)s=t;else if(c>=50){if(t-s0&&function(e,t){for(var r=0,n=t.length;r32||n>32?"background-color":"color",o)};K()?i():X(i)}}e.hasAttribute("stop-color")&&c("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){var u=e.getAttribute("stroke");c("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",u)}e.style&&le(e.style,(function(t,r){if("background-image"!==t||!r.includes("url"))if(cr.hasOwnProperty(t)||t.startsWith("--")&&!lr[t])c(t,t,r);else{var n=lr[t];if(n&&!e.style.getPropertyValue(n)&&!e.hasAttribute(n)){if("background-color"===n&&e.hasAttribute("bgcolor"))return;e.style.setProperty(t,"")}}})),e.style&&e instanceof SVGTextElement&&e.style.fill&&c("fill","color",e.style.getPropertyValue("fill")),F(a,(function(t){e.removeAttribute(cr[t].dataAttr)})),gr.set(e,yr(e,t))}}function c(r,o,i){var u=r.startsWith("--"),c=u?{}:cr[r],s=c.customProp,l=c.dataAttr,d=Lt(o,i,{style:e.style},Wt,n,null);if(d){var f=d.value;if("function"==typeof f&&(f=f(t)),u&&"object"==typeof f)f.declarations.forEach((function(t){var r=t.property,n=t.value;!(n instanceof Promise)&&e.style.setProperty(r,n)}));else e.style.setProperty(s,f),e.hasAttribute(l)||e.setAttribute(l,""),a.delete(r)}}}var _r="theme-color",kr='meta[name="'.concat(_r,'"]'),wr=null,Er=null;function Cr(e,t){var r=Ee(wr=wr||e.content);r&&(e.content=rt(r,t))}var xr=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];var Tr=function(){var e=[],t=null;function r(){for(var r;r=e.shift();)r();t=null}return{add:function(n){e.push(n),t||(t=requestAnimationFrame(r))},cancel:function(){e.splice(0),cancelAnimationFrame(t),t=null}}}();function Rr(){var e=0,t=new Set,r=new Map,n=new Set,a=null,o=!1,c=!1;return{modifySheet:function(s){var l=s.sourceCSSRules,d=s.theme,f=s.ignoreImageAnalysis,h=s.force,p=s.prepareSheet,v=s.isAsyncCancelled,m=0===r.size,g=new Set(r.keys()),b=function(e){var t="";return xr.forEach((function(r){t+="".concat(r,":").concat(e[r],";")})),t}(d),y=b!==a;o&&(c=!0);var S=[];if(ue(l,(function(e){var n=e.cssText,a=!1;if(g.delete(n),e.parentRule instanceof CSSMediaRule&&(n+=";".concat(e.parentRule.media.mediaText)),t.has(n)||(t.add(n),a=!0),a){m=!0;var o=[];e.style&&le(e.style,(function(t,r){var n=Lt(t,r,e,Wt,f,v);n&&o.push(n)}));var i=null;if(o.length>0){var u=e.parentRule;i={selector:e.selectorText,declarations:o,parentRule:u},S.push(i)}r.set(n,i)}else S.push(r.get(n))}),(function(){o=!0})),g.forEach((function(e){t.delete(e),r.delete(e)})),a=b,h||m||y){e++;var _=new Map,k=new Map,w=0,E=0,C={rule:null,rules:[],isGroup:!0},x=new WeakMap;n.forEach((function(e){return e()})),n.clear(),S.filter((function(e){return e})).forEach((function(t){var r=t.selector,a=t.declarations,o=V(t.parentRule),c={selector:r,declarations:[],isGroup:!1},s=c.declarations;function l(t,r,n,a){var o=++w,i={property:t,value:null,important:n,asyncKey:o,sourceValue:a};s.push(i);var u=e;r.then((function(t){t&&!v()&&u===e&&(i.value=t,Tr.add((function(){v()||u!==e||function(e){var t=_.get(e),r=t.rule,n=t.target,a=t.index;n.deleteRule(a),R(n,a,r),_.delete(e)}(o)})))}))}function f(t,r,a,o){var c=r,d=c.declarations,f=c.onTypeChange,h=++E,p=e,m=s.length,g=[];if(0===d.length){var b={property:t,value:o,important:a,sourceValue:o,varKey:h};s.push(b),g=[b]}d.forEach((function(e){if(e.value instanceof Promise)l(e.property,e.value,a,o);else{var t={property:e.property,value:e.value,important:a,sourceValue:o,varKey:h};s.push(t),g.push(t)}})),f.addListener((function(t){if(!v()&&p===e){var r=t.map((function(e){return{property:e.property,value:e.value,important:a,sourceValue:o,varKey:h}})),n=s.indexOf(g[0],m);s.splice.apply(s,u([n,g.length],i(r),!1)),g=r,function(e){var t=k.get(e),r=t.rule,n=t.target,a=t.index;n.deleteRule(a),R(n,a,r)}(h)}})),n.add((function(){return f.removeListeners()}))}o.rules.push(c),a.forEach((function(e){var t=e.property,r=e.value,n=e.important,a=e.sourceValue;if("function"==typeof r){var o=r(d);o instanceof Promise?l(t,o,n,a):t.startsWith("--")?f(t,o,n,a):s.push({property:t,value:o,important:n,sourceValue:a})}else s.push({property:t,value:r,important:n,sourceValue:a})}))}));var T=p();!function e(t,r,n){t.rules.forEach((function(t){if(t.isGroup){var a=function(e,t){var r=e.rule;if(r instanceof CSSMediaRule){var n=r.media,a=t.cssRules.length;return t.insertRule("@media ".concat(n.mediaText," {}"),a),t.cssRules[a]}return t}(t,r);e(t,a,n)}else n(t,r)}))}(C,T,(function(e,t){var r=t.cssRules.length;e.declarations.forEach((function(n){var a=n.asyncKey,o=n.varKey;null!=a&&_.set(a,{rule:e,target:t,index:r}),null!=o&&k.set(o,{rule:e,target:t,index:r})})),R(t,r,e)}))}function R(e,t,r){var n=r.selector,a=r.declarations,o="";a.forEach((function(e){var t,r,n,a,i;o+="".concat((r=(t=e).property,n=t.value,a=t.important,i=t.sourceValue,"".concat(r,": ").concat(null==n?i:n).concat(a?" !important":"",";"))," ")}));var i="".concat(n," { ").concat(o," }");e.insertRule(i,t)}function V(e){if(null==e)return C;if(x.has(e))return x.get(e);var t={rule:e,rules:[],isGroup:!0};return x.set(e,t),V(e.parentRule).rules.push(t),t}},shouldRebuildStyle:function(){return o&&!c}}}function Vr(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&e.href&&!e.disabled&&(!h||!e.href.startsWith("moz-extension://"))&&!function(e){if(!e.href)return!1;try{return"fonts.googleapis.com"===new URL(e.href).hostname}catch(t){return"Couldn't construct ".concat(e.href," as URL"),!1}}(e))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function Ar(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=!0),Vr(e)?t.push(e):(e instanceof Element||b&&e instanceof ShadowRoot||e===document)&&(F(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(function(e){return Ar(e,t,!1)})),r&&G(e,(function(e){return Ar(e.shadowRoot,t,!1)}))),t}var Mr=new WeakSet,Lr=new WeakSet,Or=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Or=!0}));var Dr=0,Pr=new Map;function Ir(e,t){for(var r=t.update,o=t.loadingStart,u=t.loadingEnd,c=[],s=e;(s=s.nextElementSibling)&&s.matches(".darkreader");)c.push(s);var l=c.find((function(e){return e.matches(".darkreader--cors")&&!Lr.has(e)}))||null,d=c.find((function(e){return e.matches(".darkreader--sync")&&!Mr.has(e)}))||null,f=null,h=null,v=!1,m=!0,g=Rr(),b=new MutationObserver((function(){r()})),y={attributes:!0,childList:!0,subtree:!0,characterData:!0};function S(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(fe)}function _(e,t){var r=!1;if(e){var n=void 0;e:for(var a=0,o=e.length;a=0;t--)e.deleteRule(t)}(d.sheet),h?h.run():h=W(d,"prev-sibling",(function(){R=!0,i()})),d.sheet}function i(){var e=R;R=!1,g.modifySheet({prepareSheet:o,sourceCSSRules:a,theme:t,ignoreImageAnalysis:n,force:e,isAsyncCancelled:function(){return v}}),m=0===d.sheet.cssRules.length,g.shouldRebuildStyle()&&X((function(){return r()}))}a&&(v=!1,i())},pause:j,destroy:function(){if(j(),U(l),U(d),u(),Pr.has(x)){var e=Pr.get(x);Pr.delete(x),e&&e()}},watch:function(){b.observe(e,y),e instanceof HTMLStyleElement&&M()},restore:function(){d&&(++B>10||(w(),f&&f.skip(),h&&h.skip(),m||(R=!0,r())))}}}function Nr(e,t){return n(this,void 0,void 0,(function(){return a(this,(function(r){return[2,new Promise((function(r,n){var a=function(){e.removeEventListener("load",o),e.removeEventListener("error",i),Pr.delete(t)},o=function(){a(),r()},i=function(){a(),n("Linkelement ".concat(t," couldn't be loaded. ").concat(e.href))};Pr.set(t,(function(){a(),n()})),e.addEventListener("load",o),e.addEventListener("error",i),e.href||i()}))]}))}))}function Fr(e){return n(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:case 4:return[2,t.sent()];case 3:return[4,vt({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})]}}))}))}function jr(e,t,r){return void 0===r&&(r=new Map),n(this,void 0,void 0,(function(){var n,i,u,c,s,l,d,f,h,p;return a(this,(function(a){switch(a.label){case 0:e=function(e,t){return e.replace(de,(function(e){var r=he(e);try{return"url('".concat(ie(t,r),"')")}catch(t){return e}}))}(e=function(e){return e.replace(me,"")}(e=e.replace(ve,"")),t),n=Se(fe,e),a.label=1;case 1:a.trys.push([1,10,11,12]),i=o(n),u=i.next(),a.label=2;case 2:return u.done?[3,9]:(c=u.value,s=he(c.substring(7).trim().replace(/;$/,"").replace(/screen$/,"")),l=ie(t,s),d=void 0,r.has(l)?(d=r.get(l),[3,7]):[3,3]);case 3:return a.trys.push([3,6,,7]),[4,Fr(l)];case 4:return d=a.sent(),r.set(l,d),[4,jr(d,pe(l),r)];case 5:return d=a.sent(),[3,7];case 6:return a.sent(),d="",[3,7];case 7:e=e.split(c).join(d),a.label=8;case 8:return u=i.next(),[3,2];case 9:return[3,12];case 10:return f=a.sent(),h={error:f},[3,12];case 11:try{u&&!u.done&&(p=i.return)&&p.call(i)}finally{if(h)throw h.error}return[7];case 12:return[2,e=e.trim()]}}))}))}var Br,qr,Ur=[],Wr=new Map;function Gr(e){S&&F(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var r=e.getAttribute("is");if(!r)return;t=r}Wr.has(t)||(Wr.set(t,new Set),function(e){return n(this,void 0,void 0,(function(){return a(this,(function(t){return[2,new Promise((function(t){if(window.customElements&&"function"==typeof customElements.whenDefined)customElements.whenDefined(e).then((function(){return t()}));else if(Hr)$r.set(e,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var r=function(){var n=Wr.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?t():requestAnimationFrame(r))};requestAnimationFrame(r)}}))]}))}))}(t).then((function(){if(qr){var e=Wr.get(t);Wr.delete(t),qr(Array.from(e))}}))),Wr.get(t).add(e)}))}var Hr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Hr=!0}));var $r=new Map;function zr(e){(Hr=!0,$r.has(e.detail.tag))&&$r.get(e.detail.tag)()}function Qr(e,t,r){Kr();var n=new Set(e),a=new WeakMap,o=new WeakMap;function i(e){a.set(e,e.previousElementSibling),o.set(e,e.nextElementSibling)}function u(e){var r=e.createdStyles,u=e.removedStyles,c=e.movedStyles;r.forEach((function(e){return i(e)})),c.forEach((function(e){return i(e)})),u.forEach((function(e){return t=e,a.delete(t),void o.delete(t);var t})),r.forEach((function(e){return n.add(e)})),u.forEach((function(e){return n.delete(e)})),r.size+u.size+c.size>0&&t({created:Array.from(r),removed:Array.from(u),moved:Array.from(c),updated:[]})}function c(e){var t=e.additions,r=e.moves,n=e.deletions,a=new Set,o=new Set,i=new Set;t.forEach((function(e){return Ar(e).forEach((function(e){return a.add(e)}))})),n.forEach((function(e){return Ar(e).forEach((function(e){return o.add(e)}))})),r.forEach((function(e){return Ar(e).forEach((function(e){return i.add(e)}))})),u({createdStyles:a,removedStyles:o,movedStyles:i}),t.forEach((function(e){G(e,f),Gr(e)}))}function s(e){var t=new Set(Ar(e)),r=new Set,i=new Set,c=new Set;t.forEach((function(e){n.has(e)||r.add(e)})),n.forEach((function(e){t.has(e)||i.add(e)})),t.forEach((function(e){var t;r.has(e)||i.has(e)||(t=e).previousElementSibling===a.get(t)&&t.nextElementSibling===o.get(t)||c.add(e)})),u({createdStyles:r,removedStyles:i,movedStyles:c}),G(e,f),Gr(e)}function l(e){var r=new Set,n=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(Vr(t)?r.add(t):t instanceof HTMLLinkElement&&t.disabled&&n.add(t))})),r.size+n.size>0&&t({updated:Array.from(r),created:[],removed:Array.from(n),moved:[]})}function d(e){var t=re(e,{onMinorMutations:c,onHugeMutations:s}),r=new MutationObserver(l);r.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media","href"],subtree:!0}),Ur.push(t,r),Br.add(e)}function f(e){var t=e.shadowRoot;null==t||Br.has(t)||(d(t),r(t))}e.forEach(i),d(document),G(document.documentElement,f),qr=function(e){var r=[];e.forEach((function(e){return j(r,Ar(e.shadowRoot))})),t({created:r,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(f(e),G(t,f),Gr(t))}))},document.addEventListener("__darkreader__isDefined",zr),Gr(document)}function Kr(){Ur.forEach((function(e){return e.disconnect()})),Ur.splice(0,Ur.length),Br=new WeakSet,qr=null,Wr.clear(),document.removeEventListener("__darkreader__isDefined",zr)}var Yr=new WeakMap,Xr=new WeakSet;function Zr(e){var t=!1;return{render:function(r,n){e.adoptedStyleSheets.forEach((function(a){if(!Xr.has(a)){var o=a.rules,c=new CSSStyleSheet;Rr().modifySheet({prepareSheet:function(){for(var t=c.cssRules.length-1;t>=0;t--)c.deleteRule(t);return function(t,r){var n=u([],i(e.adoptedStyleSheets),!1),a=n.indexOf(t),o=n.indexOf(r);a!==o-1&&(o>=0&&n.splice(o,1),n.splice(a+1,0,r),e.adoptedStyleSheets=n)}(a,c),Yr.set(a,c),Xr.add(c),c},sourceCSSRules:o,theme:r,ignoreImageAnalysis:n,force:!1,isAsyncCancelled:function(){return t}})}}))},destroy:function(){t=!0;var r=u([],i(e.adoptedStyleSheets),!1);e.adoptedStyleSheets.forEach((function(e){if(Xr.has(e)){var t=r.indexOf(e);t>=0&&r.splice(t,1),Yr.delete(e),Xr.delete(e)}})),e.adoptedStyleSheets=r}}}function Jr(e){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));var t=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),n=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),a=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),o=e?Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"):null,c=["baidu.com","baike.baidu.com","ditu.baidu.com","map.baidu.com","maps.baidu.com","haokan.baidu.com","pan.baidu.com","passport.baidu.com","tieba.baidu.com","www.baidu.com"].includes(location.hostname),s=c?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,l=function(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",t),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",r),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",n),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",a),document.removeEventListener("__darkreader__cleanUp",l),document.removeEventListener("__darkreader__addUndefinedResolver",d),e&&Object.defineProperty(Document.prototype,"styleSheets",o),c&&Object.defineProperty(Element.prototype,"getElementsByTagName",s)},d=function(e){customElements.whenDefined(e.detail.tag).then((function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e.detail.tag}}))}))};document.addEventListener("__darkreader__cleanUp",l),document.addEventListener("__darkreader__addUndefinedResolver",d);var f=new Event("__darkreader__updateSheet");Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},t,{value:function(e,r,n){return t.value.call(this,e,r,n),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f),-1}})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},r,{value:function(e,t){var n=r.value.call(this,e,t);return this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f),n}})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},n,{value:function(e){n.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f)}})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},a,{value:function(e){a.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f)}})),e&&Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},o,{get:function(){var e=this,t=function(){var t=u([],i(o.get.call(e)),!1).filter((function(e){return!e.ownerNode.classList.contains("darkreader")}));return t.item=function(e){return t[e]},Object.setPrototypeOf(t,StyleSheetList.prototype)},r=t();return new Proxy(r,{get:function(e,r){return t()[r]}})}})),c&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},s,{value:function(e){var t=this;if("style"!==e)return s.value.call(this,e);var r=function(){var r=s.value.call(t,e);return Object.setPrototypeOf(u([],i(r),!1).filter((function(e){return!e.classList.contains("darkreader")})),NodeList.prototype)},n=r();return new Proxy(n,{get:function(e,t){return r()[Number(t)||t]}})}}))}var en=function(){if("randomUUID"in crypto){var e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return((t=e)<16?"0":"")+t.toString(16);var t})).join("")}(),tn=new Map,rn=[],nn=null,an=null,on=null,un=null,cn=null;function sn(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector(".".concat(e));return r||((r=document.createElement("style")).classList.add("darkreader"),r.classList.add(e),r.media="screen",r.textContent=""),r}var ln=new Map;function dn(e,t){ln.has(t)&&ln.get(t).stop(),ln.set(t,W(e,"parent"))}function fn(){var e=sn("darkreader--fallback",document);e.textContent=It(nn,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),dn(e,"fallback");var t=sn("darkreader--user-agent");t.textContent=Dt(nn,on,nn.styleSystemControls),document.head.insertBefore(t,e.nextSibling),dn(t,"user-agent");var n,a,o=sn("darkreader--text");nn.useFont||nn.textStroke>0?o.textContent=(n=nn,(a=[]).push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),n.useFont&&n.fontFamily&&a.push(" font-family: ".concat(n.fontFamily," !important;")),n.textStroke>0&&(a.push(" -webkit-text-stroke: ".concat(n.textStroke,"px !important;")),a.push(" text-stroke: ".concat(n.textStroke,"px !important;"))),a.push("}"),a.join("\n")):o.textContent="",document.head.insertBefore(o,e.nextSibling),dn(o,"text");var i=sn("darkreader--invert");an&&Array.isArray(an.invert)&&an.invert.length>0?i.textContent=["".concat(an.invert.join(", ")," {")," filter: ".concat(dt(r(r({},nn),{contrast:0===nn.mode?nn.contrast:Ue(nn.contrast-10,0,100)}))," !important;"),"}"].join("\n"):i.textContent="",document.head.insertBefore(i,o.nextSibling),dn(i,"invert");var u=sn("darkreader--inline");u.textContent=hr(),document.head.insertBefore(u,i.nextSibling),dn(u,"inline");var c=sn("darkreader--override");c.textContent=an&&an.css?vn(an.css):"",document.head.appendChild(c),dn(c,"override");var s=sn("darkreader--variables"),l=Pt(nn),d=nn.darkSchemeBackgroundColor,f=nn.darkSchemeTextColor,h=nn.lightSchemeBackgroundColor,p=nn.lightSchemeTextColor,v=nn.mode,m=0===v?h:d,g=0===v?p:f;m=rt(Ee(m),nn),g=ut(Ee(g),nn),s.textContent=[":root {"," --darkreader-neutral-background: ".concat(m,";")," --darkreader-neutral-text: ".concat(g,";")," --darkreader-selection-background: ".concat(l.backgroundColorSelection,";")," --darkreader-selection-text: ".concat(l.foregroundColorSelection,";"),"}"].join("\n"),document.head.insertBefore(s,u.nextSibling),dn(s,"variables");var b=sn("darkreader--root-vars");document.head.insertBefore(b,s.nextSibling);var y=!(an&&an.disableStyleSheetsProxy),S=function(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector(".".concat(e));return r||((r=document.createElement("script")).classList.add("darkreader"),r.classList.add(e)),r}("darkreader--proxy");S.append("(".concat(Jr,")(").concat(y,")")),document.head.insertBefore(S,b.nextSibling),S.remove()}var hn=new Set;function pn(e){var t=sn("darkreader--inline",e);t.textContent=hr(),e.insertBefore(t,e.firstChild);var n=sn("darkreader--override",e);n.textContent=an&&an.css?vn(an.css):"",e.insertBefore(n,t.nextSibling);var a=sn("darkreader--invert",e);an&&Array.isArray(an.invert)&&an.invert.length>0?a.textContent=["".concat(an.invert.join(", ")," {")," filter: ".concat(dt(r(r({},nn),{contrast:0===nn.mode?nn.contrast:Ue(nn.contrast-10,0,100)}))," !important;"),"}"].join("\n"):a.textContent="",e.insertBefore(a,n.nextSibling),hn.add(e)}function vn(e){return e.replace(/\${(.+?)}/g,(function(e,t){var r=Ee(t);return r?Xe(r,nn,Ze):t}))}function mn(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}var gn=0,bn=new Set;function yn(e){var t=++gn;var r=Ir(e,{update:function(){var e=r.details({secondRound:!0});e&&(Wt.addRulesForMatching(e.rules),Wt.matchVariablesAndDependants(),r.render(nn,un))},loadingStart:function(){if(!H()||!xn){bn.add(t),"Current amount of styles loading: ".concat(bn.size);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=It(nn,{strict:!1}))}},loadingEnd:function(){bn.delete(t),"Removed loadingStyle ".concat(t,", now awaiting: ").concat(bn.size),0===bn.size&&H()&&mn()}});return tn.set(e,r),r}function Sn(e){var t=tn.get(e);t&&(t.destroy(),tn.delete(e))}var _n=B((function(e){tn.forEach((function(e){return e.render(nn,un)})),rn.forEach((function(e){return e.render(nn,un)})),e&&e()})),kn=function(){_n.cancel()};function wn(){0!==bn.size||mn()}var En,Cn=null,xn=!document.hidden;function Tn(){document.removeEventListener("visibilitychange",Cn),Cn=null}function Rn(){function e(){var e,t;!function(){kn();var e=Ar(document).filter((function(e){return!tn.has(e)})).map((function(e){return yn(e)}));e.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Wt.addRulesForMatching(e.rules)})),Wt.matchVariablesAndDependants(),Wt.setOnRootVariableChange((function(){Wt.putRootVars(document.head.querySelector(".darkreader--root-vars"),nn)})),Wt.putRootVars(document.head.querySelector(".darkreader--root-vars"),nn),tn.forEach((function(e){return e.render(nn,un)})),0===bn.size&&mn(),e.forEach((function(e){return e.watch()}));var t=function(e){for(var t=[],r=0,n=e.length;r0&&j(t,r)})),t.forEach((function(e){return Sr(e,nn,cn,un)})),Vn(document)}(),Qr(Array.from(tn.keys()),(function(e){var t=e.created,r=e.updated,n=e.removed,a=e.moved,o=n,i=t.concat(r).concat(a).filter((function(e){return!tn.has(e)})),u=a.filter((function(e){return tn.has(e)}));o.forEach((function(e){return Sn(e)}));var c=i.map((function(e){return yn(e)}));c.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Wt.addRulesForMatching(e.rules)})),Wt.matchVariablesAndDependants(),c.forEach((function(e){return e.render(nn,un)})),c.forEach((function(e){return e.watch()})),u.forEach((function(e){return tn.get(e).restore()}))}),(function(e){pn(e),Vn(e)})),e=function(e){Sr(e,nn,cn,un),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")&&(Wt.matchVariablesAndDependants(),Wt.putRootVars(document.head.querySelector(".darkreader--root-vars"),nn))},t=function(e){pn(e);var t=e.querySelectorAll(fr);t.length>0&&F(t,(function(e){return Sr(e,nn,cn,un)}))},mr(document,e,t),G(document.documentElement,(function(r){mr(r.shadowRoot,e,t)})),z(wn)}var t,r,n,a;fn(),document.hidden&&!nn.immediateModify?(t=e,r=Boolean(Cn),Cn=function(){document.hidden||(Tn(),t(),xn=!0)},r||document.addEventListener("visibilitychange",Cn)):e(),n=nn,(a=document.querySelector(kr))?Cr(a,n):(Er&&Er.disconnect(),(Er=new MutationObserver((function(e){e:for(var t=0;t0){var t=Zr(e);rn.push(t),t.render(nn,un)}}catch(e){}}function An(){tn.forEach((function(e){return e.pause()})),F(ln.values(),(function(e){return e.stop()})),ln.clear(),Kr(),pr.forEach((function(e){return e.disconnect()})),vr.forEach((function(e){return e.disconnect()})),pr.clear(),vr.clear(),Q(wn),Y.clear()}function Mn(){if(document.querySelector('meta[name="darkreader-lock"]'))return!0;var e,t=document.querySelector('meta[name="darkreader"]');return t?t.content!==en:((e=document.createElement("meta")).name="darkreader",e.content=en,document.head.appendChild(e),(En=new MutationObserver((function(){document.querySelector('meta[name="darkreader-lock"]')&&(En.disconnect(),On())}))).observe(document.head,{childList:!0,subtree:!0}),!1)}function Ln(e,t,r){if(nn=e,(an=t)?(un=Array.isArray(an.ignoreImageAnalysis)?an.ignoreImageAnalysis:[],cn=Array.isArray(an.ignoreInlineStyle)?an.ignoreInlineStyle:[]):(un=[],cn=[]),nn.immediateModify&&(H=function(){return!0}),on=r,document.head){if(Mn())return;document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",nn.mode?"dark":"dimmed"),Rn()}else{if(!h){var n=sn("darkreader--fallback");document.documentElement.appendChild(n),n.textContent=It(nn,{strict:!0})}var a=new MutationObserver((function(){if(document.head){if(a.disconnect(),Mn())return void On();Rn()}}));a.observe(document,{childList:!0,subtree:!0})}}function On(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),Wt.clear(),ne.clear(),Tn(),kn(),An(),Ut(),ke.clear(),we.clear(),U(document.querySelector(".darkreader--fallback")),document.head&&(!function(){Er&&(Er.disconnect(),Er=null);var e=document.querySelector(kr);e&&wr&&(e.content=wr)}(),U(document.head.querySelector(".darkreader--user-agent")),U(document.head.querySelector(".darkreader--text")),U(document.head.querySelector(".darkreader--invert")),U(document.head.querySelector(".darkreader--inline")),U(document.head.querySelector(".darkreader--override")),U(document.head.querySelector(".darkreader--variables")),U(document.head.querySelector(".darkreader--root-vars")),U(document.head.querySelector('meta[name="darkreader"]')),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),U(document.head.querySelector(".darkreader--proxy"))),hn.forEach((function(e){U(e.querySelector(".darkreader--inline")),U(e.querySelector(".darkreader--override"))})),hn.clear(),F(tn.keys(),(function(e){return Sn(e)})),bn.clear(),Pr.clear(),F(document.querySelectorAll(".darkreader"),U),rn.forEach((function(e){e.destroy()})),rn.splice(0),En&&En.disconnect()}var Dn=/url\(\"(blob\:.*?)\"\)/g;function Pn(e){return n(this,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return t=[],Se(Dn,e,1).forEach((function(e){var r=w(e);t.push(r)})),[4,Promise.all(t)];case 1:return r=n.sent(),[2,e.replace(Dn,(function(){return'url("'.concat(r.shift(),'")')}))]}}))}))}function In(){return n(this,void 0,void 0,(function(){function e(e,r){var n=document.querySelector(e);n&&n.textContent&&(t.push("/* ".concat(r," */")),t.push(n.textContent),t.push(""))}var t,r,n,o,i;return a(this,(function(a){switch(a.label){case 0:return t=['/*\n _______\n / \\\n .==. .==.\n (( ))==(( ))\n / "==" "=="\\\n /____|| || ||___\\\n ________ ____ ________ ___ ___\n | ___ \\ / \\ | ___ \\ | | / /\n | | \\ \\ / /\\ \\ | | \\ \\| |_/ /\n | | ) / /__\\ \\ | |__/ /| ___ \\\n | |__/ / ______ \\| ____ \\| | \\ \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n| ___ \\ | ____/ / \\ | ___ \\ | ____| ___ \\\n| | \\ \\| |___ / /\\ \\ | | \\ \\| |___| | \\ \\\n| |__/ /| ____/ /__\\ \\ | | ) | ____| |__/ /\n| ____ \\| |__/ ______ \\| |__/ /| |___| ____ \\\n|__| \\__\\____/__/ \\__\\_______/ |______|__| \\__\\\n https://darkreader.org\n*/\n\n/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/main/LICENSE */\n'],e(".darkreader--fallback","Fallback Style"),e(".darkreader--user-agent","User-Agent Style"),e(".darkreader--text","Text Style"),e(".darkreader--invert","Invert Style"),e(".darkreader--variables","Variables Style"),r=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){F(e.sheet.cssRules,(function(e){e&&e.cssText&&r.push(e.cssText)}))})),r.length?(n=function(e){function t(e){return e.replace(/^\s+/,"")}function r(e){return 0===e?"":" ".repeat(4*e)}if(e.length<5e4)for(var n=/[^{}]+{\s*}/;n.test(e);)e=e.replace(n,"");for(var a=e.replace(/\s{2,}/g," ").replace(/\{/g,"{\n").replace(/\}/g,"\n}\n").replace(/\;(?![^\(|\"]*(\)|\"))/g,";\n").replace(/\,(?![^\(|\"]*(\)|\"))/g,",\n").replace(/\n\s*\n/g,"\n").split("\n"),o=0,i=[],u=0,c=a.length;u0&&a[a.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function v(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a Promise))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},O=L;function D(e){return d(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return[4,O(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var P,N,j=new Set;function F(){for(var e=[],t=0;t=10){if(f-uie)return!0;for(var t=0,r=0;rie)return!0;return!1}(t))!o||Z()?n.forEach((function(t){return(0,t.onHugeMutations)(e)})):i||(ee(a=function(){return n.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),i=!0),o=!0;else{var r=function(e){var t=new Set,r=new Set,n=new Set;e.forEach((function(e){G(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),G(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?(n.add(e),t.delete(e)):r.add(e))}))}));var a=[],o=[];return t.forEach((function(e){t.has(e.parentElement)&&a.push(e)})),r.forEach((function(e){r.has(e.parentElement)&&o.push(e)})),a.forEach((function(e){return t.delete(e)})),o.forEach((function(e){return r.delete(e)})),{additions:t,moves:n,deletions:r}}(t);n.forEach((function(e){return(0,e.onMinorMutations)(r)}))}})),r.observe(e,{childList:!0,subtree:!0}),ue.set(e,r),n=new Set,se.set(r,n)}return n.add(t),{disconnect:function(){n.delete(t),a&&te(a),0===n.size&&(r.disconnect(),se.delete(r),ue.delete(e))}}}var de=new Map;function fe(e){return ce||(ce=document.createElement("a")),ce.href=e,ce.href}function he(e,t){void 0===t&&(t=null);var r="".concat(e).concat(t?";".concat(t):"");if(de.has(r))return de.get(r);if(t){var n=new URL(e,fe(t));return de.set(r,n),n}var a=new URL(fe(e));return de.set(e,a),a}function pe(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return"".concat(location.protocol).concat(t);var r=he(e);return he(t,r.href).href}function ve(e,t,r){G(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{ve(e.styleSheet.cssRules,t,r)}catch(e){r&&r()}else if(e.media){var n=Array.from(e.media),a=n.some((function(e){return e.startsWith("screen")||e.startsWith("all")||e.startsWith("(")})),o=n.some((function(e){return e.startsWith("print")||e.startsWith("speech")}));!a&&o||ve(e.cssRules,t,r)}else e.conditionText&&CSS.supports(e.conditionText)&&ve(e.cssRules,t,r)}))}var me=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],ge=w?me.map((function(e){return[e,new RegExp("".concat(e,":\\s*(.*?)\\s*;"))]})):null;function be(e,t){G(e,(function(r){var n=e.getPropertyValue(r).trim();n&&t(r,n)}));var r=e.cssText;r.includes("var(")&&(w?ge.forEach((function(e){var n=p(e,2),a=n[0],o=n[1],i=r.match(o);if(i&&i[1]){var c=i[1].trim();t(a,c)}})):me.forEach((function(r){var n=e.getPropertyValue(r);n&&n.includes("var(")&&t(r,n)})))}var ye=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,Se=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function we(e){return e.trim().replace(/[\n\r\\]+/g,"").replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function ke(e){var t=he(e);return"".concat(t.origin).concat(t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1"))}var _e=/\/\*[\s\S]*?\*\//g;var Ee=/@font-face\s*{[^}]*}/g;function Ce(e){for(var t,r=[],n=[],a=0,o=e.length;a>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if(ze.has(t))return function(e){var t=ze.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if("transparent"===e)return{r:0,g:0,b:0,a:0};return null}(e);return t&&Ae.set(e,t),t}function Oe(e){if(Me.has(e))return Me.get(e);var t=Le(e);if(!t)return null;var r=Pe(t);return Me.set(e,r),r}function De(e){var t=e.h,r=e.s,n=e.l,a=e.a,o=void 0===a?1:a;if(0===r){var i=p([n,n,n].map((function(e){return Math.round(255*e)})),3),c=i[0],u=i[1];return{r:c,g:i[2],b:u,a:o}}var s=(1-Math.abs(2*n-1))*r,l=s*(1-Math.abs(t/60%2-1)),d=n-s/2,f=p((t<60?[s,l,0]:t<120?[l,s,0]:t<180?[0,s,l]:t<240?[0,l,s]:t<300?[l,0,s]:[s,0,l]).map((function(e){return Math.round(255*(e+d))})),3);return{r:f[0],g:f[1],b:f[2],a:o}}function Pe(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=void 0===a?1:a,i=t/255,c=r/255,u=n/255,s=Math.max(i,c,u),l=Math.min(i,c,u),d=s-l,f=(s+l)/2;if(0===d)return{h:0,s:0,l:f,a:o};var h=60*(s===i?(c-u)/d%6:s===c?(u-i)/d+2:(i-c)/d+4);return h<0&&(h+=360),{h:h,s:d/(1-Math.abs(2*f-1)),l:f,a:o}}function Ne(e,t){void 0===t&&(t=0);var r=e.toFixed(t);if(0===t)return r;var n=r.indexOf(".");if(n>=0){var a=r.match(/0+$/);if(a)return a.index===n+1?r.substring(0,n):r.substring(0,a.index)}return r}function je(e){var t=e.h,r=e.s,n=e.l,a=e.a;return null!=a&&a<1?"hsla(".concat(Ne(t),", ").concat(Ne(100*r),"%, ").concat(Ne(100*n),"%, ").concat(Ne(a,2),")"):"hsl(".concat(Ne(t),", ").concat(Ne(100*r),"%, ").concat(Ne(100*n),"%)")}var Fe=/^rgba?\([^\(\)]+\)$/,Ie=/^hsla?\([^\(\)]+\)$/,Be=/^#[0-9a-f]+$/i;function qe(e,t,r){var n=function(e){var t=[],r=0,n=!1,a=e.indexOf("(");e=e.substring(a+1,e.length-1);for(var o=0;o="0"&&i<="9"||"."===i||"+"===i||"-"===i?n=!0:!n||" "!==i&&","!==i&&"/"!==i?n||(r=o+1):(t.push(e.substring(r,o)),n=!1,r=o+1)}return n&&t.push(e.substring(r,e.length)),t}(e),a=Object.entries(r);return n.map((function(e){return e.trim()})).map((function(e,r){var n,o=a.find((function(t){var r=p(t,1)[0];return e.endsWith(r)}));return n=o?parseFloat(e.substring(0,e.length-o[0].length))/o[1]*t[r]:parseFloat(e),t[r]>1?Math.round(n):n}))}var We=[255,255,255,1],He={"%":100};var Ue=[360,1,1,1],Ge={"%":100,deg:360,rad:2*Math.PI,turn:1};var $e=new Map(Object.entries({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,grey:8421504,green:32768,greenyellow:11403055,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074})),ze=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var t=p(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})));function Qe(e,t,r){return(.2126*e+.7152*t+.0722*r)/255}function Ke(e,t,r,n,a){return(e-t)*(a-n)/(r-t)+n}function Ye(e,t,r){return Math.min(r,Math.max(t,e))}function Xe(e,t){for(var r=[],n=0,a=e.length;n.8&&(a>200&&a<280);var s=a,l=i;return n&&(u?(s=t.h,l=t.s):(s=r.h,l=r.s)),{h:s,s:l,l:Ke(i,0,1,t.l,r.l),a:c}}var st=.4;function lt(e,t){var r=e.h,n=e.s,a=e.l,o=e.a,i=n<.12||a>.8&&(r>200&&r<280);if(a<.5){var c=Ke(a,0,.5,0,st);return i?{h:t.h,s:t.s,l:c,a:o}:{h:r,s:n,l:c,a:o}}var u=Ke(a,.5,1,st,t.l);if(i)return{h:t.h,s:t.s,l:u,a:o};var s=r;r>60&&r<180&&(s=r>120?Ke(r,120,180,135,180):Ke(r,60,120,60,105));return s>40&&s<80&&(u*=.75),{h:s,s:n,l:u,a:o}}function dt(e,t){if(0===t.mode)return ct(e,t);var r=et(t);return ot(e,l(l({},t),{mode:0}),lt,r)}var ft,ht=.55;function pt(e){return Ke(e,205,245,205,220)}function vt(e,t){var r=e.h,n=e.s,a=e.l,o=e.a,i=a<.2||n<.24,c=!i&&r>205&&r<245;if(a>.5){var u=Ke(a,.5,1,ht,t.l);if(i)return{h:t.h,s:t.s,l:u,a:o};var s=r;return c&&(s=pt(r)),{h:s,s:n,l:u,a:o}}if(i)return{h:t.h,s:t.s,l:Ke(a,0,.5,t.l,ht),a:o};var l,d=r;return c?(d=pt(r),l=Ke(a,0,.5,t.l,Math.min(1,ht+.05))):l=Ke(a,0,.5,t.l,ht),{h:d,s:n,l:l,a:o}}function mt(e,t){if(0===t.mode)return ct(e,t);var r=tt(t);return ot(e,l(l({},t),{mode:0}),vt,r)}function gt(e,t,r){var n=e.h,a=e.s,o=e.l,i=e.a,c=n,u=a;return(o<.2||a<.24)&&(o<.5?(c=t.h,u=t.s):(c=r.h,u=r.s)),{h:c,s:u,l:Ke(o,0,1,.5,.2),a:i}}function bt(e,t){if(0===t.mode)return ct(e,t);var r=tt(t),n=et(t);return ot(e,l(l({},t),{mode:0}),gt,r,n)}function yt(e,t){return dt(e,t)}function St(e){var t=[];return e.mode===ft.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness(".concat(e.brightness,"%)")),100!==e.contrast&&t.push("contrast(".concat(e.contrast,"%)")),0!==e.grayscale&&t.push("grayscale(".concat(e.grayscale,"%)")),0!==e.sepia&&t.push("sepia(".concat(e.sepia,"%)")),0===t.length?null:t.join(" ")}function wt(){if("randomUUID"in crypto){var e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return"getRandomValues"in crypto?Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return((t=e)<16?"0":"")+t.toString(16);var t})).join(""):Math.floor(Math.random()*Math.pow(2,55)).toString(36)}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(ft||(ft={}));var kt=new Map,_t=new Map;function Et(e){return d(this,void 0,void 0,(function(){return f(this,(function(t){return[2,new Promise((function(t,r){var n=wt();kt.set(n,t),_t.set(n,r),chrome.runtime.sendMessage({type:i.FETCH,data:e,id:n})}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var t=e.type,r=e.data,n=e.error,o=e.id;if(t===a.FETCH_RESPONSE){var i=kt.get(o),c=_t.get(o);kt.delete(o),_t.delete(o),n?c&&c(n):i&&i(r)}}));var Ct=new(function(){function e(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}return e.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},e.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},e.prototype.startQueue=function(){var e=this;this.timerId||(this.timerId=requestAnimationFrame((function(){e.timerId=null;for(var t,r=Date.now();t=e.queue.shift();)if(t(),Date.now()-r>=e.frameDuration){e.startQueue();break}})))},e}());function xt(e){return d(this,void 0,void 0,(function(){var t=this;return f(this,(function(r){return[2,new Promise((function(r,n){return d(t,void 0,void 0,(function(){var t,a,o,i;return f(this,(function(c){switch(c.label){case 0:return e.startsWith("data:")?(t=e,[3,4]):[3,1];case 1:return c.trys.push([1,3,,4]),[4,Tt(e)];case 2:return t=c.sent(),[3,4];case 3:return a=c.sent(),n(a),[2];case 4:return c.trys.push([4,6,,7]),[4,Rt(t)];case 5:return o=c.sent(),Ct.addToQueue((function(){r(l({src:e,dataURL:t,width:o.naturalWidth,height:o.naturalHeight},function(e){Vt||(t=At,r=At,(Vt=document.createElement("canvas")).width=t,Vt.height=r,(Mt=Vt.getContext("2d",{willReadFrequently:!0})).imageSmoothingEnabled=!1);var t,r;var n=e.naturalWidth,a=e.naturalHeight;if(0===a||0===n)return"logWarn(Image is empty ".concat(e.currentSrc,")"),{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!1};if(n*a*4>Lt)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var o=n*a,i=Math.min(1,Math.sqrt(At/o)),c=Math.ceil(n*i),u=Math.ceil(a*i);Mt.clearRect(0,0,c,u),Mt.drawImage(e,0,0,n,a,0,0,c,u);var s,l,d,f,h,p,v,m=Mt.getImageData(0,0,c,u).data,g=.05,b=.4,y=.7,S=0,w=0,k=0;for(d=0;dy&&k++);var _=c*u,E=_-S;return{isDark:w/E>=.7,isLight:k/E>=.7,isTransparent:S/_>=.1,isLarge:o>=48e4,isTooLarge:!1}}(o)))})),[3,7];case 6:return i=c.sent(),n(i),[3,7];case 7:return[2]}}))}))}))]}))}))}function Tt(e){return d(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return new URL(e).origin!==location.origin?[3,2]:[4,M(e)];case 1:case 3:return[2,t.sent()];case 2:return[4,Et({url:e,responseType:"data-url"})]}}))}))}function Rt(e){return d(this,void 0,void 0,(function(){return f(this,(function(t){return[2,new Promise((function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=function(){return r("Unable to load image ".concat(e))},n.src=e}))]}))}))}var Vt,Mt,At=1024;var Lt=5242880;function Ot(e,t){var r=e.dataURL,n=e.width,a=e.height,o=Ze(t).slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" "),i=[''),"",'',''),"","",''),""].join("");return"data:image/svg+xml;base64,".concat(btoa(i))}function Dt(){Ct&&Ct.stopQueue(),Vt=null,Mt=null}var Pt=8,Nt="conic-",jt=Nt.length,Ft="radial-",It="linear-";function Bt(e,t){return Boolean(e&&e.getPropertyPriority(t))}function qt(e,t,r,n,a,o){if(e.startsWith("--")){var i=function(e,t,r,n,a,o){return e.getModifierForVariable({varName:t,sourceValue:r,rule:n,ignoredImgSelectors:a,isCancelled:o})}(n,e,t,r,a,o);if(i)return{property:e,value:i,important:Bt(r.style,e),sourceValue:t}}else if(t.includes("var(")){i=function(e,t,r){return e.getModifierForVarDependant(t,r)}(n,e,t);if(i)return{property:e,value:i,important:Bt(r.style,e),sourceValue:t}}else{if("color-scheme"===e)return null;if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){i=function(e,t,r){if($t.has(t.toLowerCase()))return t;var n=Le(t);if(!n)return null;if(e.includes("background"))return r.style.webkitMaskImage&&"none"!==r.style.webkitMaskImage||r.style.webkitMask&&!r.style.webkitMask.startsWith("none")||r.style.mask&&"none"!==r.style.mask||r.style.getPropertyValue("mask-image")&&"none"!==r.style.getPropertyValue("mask-image")?function(e){return mt(n,e)}:function(e){return dt(n,e)};if(e.includes("border")||e.includes("outline"))return function(e){return bt(n,e)};return function(e){return mt(n,e)}}(e,t,r);if(i)return{property:e,value:i,important:Bt(r.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(i=Kt(t,r,a,o))return{property:e,value:i,important:Bt(r.style,e),sourceValue:t}}else if(e.includes("shadow")){i=function(e){var t=Yt(e);if(!t)return null;return function(e){return t(e).result}}(t);if(i)return{property:e,value:i,important:Bt(r.style,e),sourceValue:t}}}return null}function Wt(){for(var e=[],t=0;t.5,d=function(e){return l(l({},u),{l:Ye(u.l+e,0,1)})},f=function(e){return l(l({},u),{l:Ye(u.l-e,0,1)})};t=je(f(.4)),r=je(s?f(.4):d(.4)),n=je(u),a=je(d(.1)),o=je(d(.2)),i=je(f(.5))}c.push("::-webkit-scrollbar {"),c.push(" background-color: ".concat(t,";")),c.push(" color: ".concat(r,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb {"),c.push(" background-color: ".concat(n,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb:hover {"),c.push(" background-color: ".concat(a,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb:active {"),c.push(" background-color: ".concat(o,";")),c.push("}"),c.push("::-webkit-scrollbar-corner {"),c.push(" background-color: ".concat(i,";")),c.push("}"),S&&(c.push("* {"),c.push(" scrollbar-color: ".concat(n," ").concat(t,";")),c.push("}"));return c.join("\n")}(e)),e.selectionColor&&n.push(function(e){var t=[],r=Ut(e),n=r.backgroundColorSelection,a=r.foregroundColorSelection;return["::selection","::-moz-selection"].forEach((function(e){t.push("".concat(e," {")),t.push(" background-color: ".concat(n," !important;")),t.push(" color: ".concat(a," !important;")),t.push("}")})),t.join("\n")}(e)),n.join("\n")}function Ut(e){var t,r;if("auto"===e.selectionColor)t=dt({r:0,g:96,b:212},l(l({},e),{grayscale:0})),r=mt({r:255,g:255,b:255},l(l({},e),{grayscale:0}));else{var n=Pe(Le(e.selectionColor));t=e.selectionColor,r=n.l<.5?"#FFF":"#000"}return{backgroundColorSelection:t,foregroundColorSelection:r}}function Gt(e,t){var r=t.strict,n=[],a=["microsoft.com","docs.microsoft.com"].includes(location.hostname);return n.push("html, body, ".concat(r?"body :not(iframe)".concat(a?':not(div[style^="position:absolute;top:0;left:-"]':""):"body > :not(iframe)"," {")),n.push(" background-color: ".concat(dt({r:255,g:255,b:255},e)," !important;")),n.push(" border-color: ".concat(bt({r:64,g:64,b:64},e)," !important;")),n.push(" color: ".concat(mt({r:0,g:0,b:0},e)," !important;")),n.push("}"),n.join("\n")}var $t=new Set(["inherit","transparent","initial","currentcolor","none","unset"]);var zt=new Map,Qt=new Map;function Kt(e,t,r,n){var a,o,i=this;try{var c=function(e){for(var t=[],r=0,n=Nt.length,a=function(){var a;if([It,Ft,Nt].find((function(t){if(r-t.length>=0&&e.substring(r-t.length,r)===t)return"repeating"===e.slice(r-t.length-10,r-t.length-1)?(a="repeating-".concat(t,"gradient"),!0):"-webkit"===e.slice(r-t.length-8,r-t.length-1)?(a="-webkit-".concat(t,"gradient"),!0):(a="".concat(t,"gradient"),!0)})),!a)return"break";var o=Ve(e,r+Pt),i=o.start,c=o.end,u=e.substring(i+1,c-1);n=c+1+jt,t.push({typeGradient:a,match:u,offset:a.length+2,index:r-a.length+Pt,hasComma:!0})};-1!==(r=e.indexOf("gradient",n))&&"break"!==a(););return t.length&&(t[t.length-1].hasComma=!1),t}(e),u=Re(ye,e);if(0===u.length&&0===c.length)return e;var s=c.map((function(e){return l({type:"gradient"},e)})).concat((a=u,o=0,a.map((function(t){var r=e.indexOf(t,o);return o=r+t.length,{match:t,index:r}}))).map((function(e){return l({type:"url",offset:0},e)}))).sort((function(e,t){return e.index>t.index?1:-1})),h=function(e,t){var r,n=e.isDark,a=e.isLight,o=e.isTransparent,i=e.isLarge,c=e.isTooLarge,u=e.width;if(c)"Not modifying too large image ".concat(e.src),r='url("'.concat(e.src,'")');else if(n&&o&&1===t.mode&&!i&&u>2){"Inverting dark image ".concat(e.src);var s=Ot(e,l(l({},t),{sepia:Ye(t.sepia+10,0,100)}));r='url("'.concat(s,'")')}else if(a&&!o&&1===t.mode)if(i)"Not modifying light non-transparent large image ".concat(e.src),r="none";else{"Dimming light image ".concat(e.src);var d=Ot(e,t);r='url("'.concat(d,'")')}else if(0===t.mode&&a&&!i){"Applying filter to image ".concat(e.src);var f=Ot(e,l(l({},t),{brightness:Ye(t.brightness-10,5,200),sepia:Ye(t.sepia+10,0,100)}));r='url("'.concat(f,'")')}else"Not modifying too large image ".concat(e.src),r=null;return r},p=[],v=0,m=!1;return s.forEach((function(a,o){var c=a.type,u=a.match,l=a.index,g=a.typeGradient,b=a.hasComma,y=a.offset,S=l,w=v,k=S+u.length+y;v=k,w!==S&&(m?p.push((function(){var t=e.substring(w,S);return","===t[0]&&(t=t.substring(1)),t})):p.push((function(){return e.substring(w,S)}))),m=b||!1,"url"===c?p.push(function(e){var a;if(function(e,t){if(!e||0===t.length)return!1;if(t.some((function(e){return"*"===e})))return!0;for(var r=e.split(/,\s*/g),n=function(e){var n=t[e];if(r.some((function(e){return e===n})))return{value:!0}},a=0;a0},e.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},e.prototype.matchVariablesAndDependants=function(){var e=this;this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(this.rulesQueue),this.rulesQueue.splice(0),this.collectRootVarDependants(),this.varRefs.forEach((function(t,r){t.forEach((function(t){e.varTypes.has(r)&&e.resolveVariableType(t,e.varTypes.get(r))}))})),this.unknownColorVars.forEach((function(t){e.unknownBgVars.has(t)?(e.unknownColorVars.delete(t),e.unknownBgVars.delete(t),e.resolveVariableType(t,1)):e.isVarType(t,7)?e.unknownColorVars.delete(t):e.undefinedVars.add(t)})),this.unknownBgVars.forEach((function(t){null!=e.findVarRef(t,(function(t){return e.unknownColorVars.has(t)||e.isVarType(t,6)}))?e.itarateVarRefs(t,(function(t){e.resolveVariableType(t,1)})):e.isVarType(t,9)?e.unknownBgVars.delete(t):e.undefinedVars.add(t)})),this.changedTypeVars.forEach((function(t){e.typeChangeSubscriptions.has(t)&&e.typeChangeSubscriptions.get(t).forEach((function(e){e()}))})),this.changedTypeVars.clear()},e.prototype.getModifierForVariable=function(e){var t=this;return function(r){var n=e.varName,a=e.sourceValue,o=e.rule,i=e.ignoredImgSelectors,c=e.isCancelled,u=function(){var e=[],u=function(o,i,c){if(t.isVarType(n,o)){var u,s=i(n);if(ur(a))if(sr(a)){var l=mr(a,t.unstableVarValues);l||(l=1===o?"#ffffff":"#000000"),u=c(l,r)}else u=rr(a,(function(e){return i(e)}),(function(e){return c(e,r)}));else u=c(a,r);e.push({property:s,value:u})}};if(u(1,nr,hr),u(2,ar,pr),u(4,or,vr),t.isVarType(n,8)){var s=ir(n),l=a;ur(a)&&(l=rr(a,(function(e){return nr(e)}),(function(e){return hr(e,r)})));var d=Kt(l,o,i,c);l="function"==typeof d?d(r):d,e.push({property:s,value:l})}return e},s=new Set;return{declarations:u(),onTypeChange:{addListener:function(e){var r=function(){var t=u();e(t)};s.add(r),t.subscribeForVarTypeChange(n,r)},removeListeners:function(){s.forEach((function(e){t.unsubscribeFromVariableTypeChanges(n,e)}))}}}}},e.prototype.getModifierForVarDependant=function(e,t){var r=this;if(t.match(/^\s*(rgb|hsl)a?\(/)){var n=e.startsWith("background"),a=lr(e);return function(e){var o=mr(t,r.unstableVarValues);return o||(o=n?"#ffffff":"#000000"),(n?hr:a?pr:vr)(o,e)}}return"background-color"===e?function(e){return rr(t,(function(e){return nr(e)}),(function(t){return hr(t,e)}))}:lr(e)?function(e){return rr(t,(function(e){return ar(e)}),(function(t){return pr(t,e)}))}:"background"===e||"background-image"===e||"box-shadow"===e?function(n){var a=new Set,o=function(){var o=rr(t,(function(e){return r.isVarType(e,1)?nr(e):r.isVarType(e,8)?ir(e):(a.add(e),e)}),(function(e){return hr(e,n)}));if("box-shadow"===e){var i=Yt(o)(n);if(i.unparseableMatchesLength!==i.matchesLength)return i.result}return o},i=o();return a.size>0?new Promise((function(e){var t=a.values().next().value,n=function(){r.unsubscribeFromVariableTypeChanges(t,n);var a=o();e(a)};r.subscribeForVarTypeChange(t,n)})):i}:e.startsWith("border")||e.startsWith("outline")?function(e){return rr(t,(function(e){return or(e)}),(function(t){return vr(t,e)}))}:null},e.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);var r=this.typeChangeSubscriptions.get(e);r.has(t)||r.add(t)},e.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},e.prototype.collectVariablesAndVarDep=function(e){var t=this;e.forEach((function(e){ve(e,(function(e){e.style&&be(e.style,(function(e,r){cr(e)&&t.inspectVariable(e,r),ur(r)&&t.inspectVarDependant(e,r)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;be(document.documentElement.style,(function(t,r){cr(t)&&e.inspectVariable(t,r)}))},e.prototype.inspectVariable=function(e,t){(this.unstableVarValues.set(e,t),ur(t)&&sr(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e))||(this.definedVars.add(e),dr.test(t)||Le(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,8))},e.prototype.resolveVariableType=function(e,t){var r=this.initialVarTypes.get(e)||0,n=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,n),(n!==r||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},e.prototype.collectRootVarDependants=function(){var e=this;be(document.documentElement.style,(function(t,r){ur(r)&&e.inspectVarDependant(t,r)}))},e.prototype.inspectVarDependant=function(e,t){var r=this;cr(e)?this.iterateVarDeps(t,(function(t){r.varRefs.has(e)||r.varRefs.set(e,new Set),r.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,1)})):lr(e)?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,2)})):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,4)})):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(function(e){if(!r.isVarType(e,9)){var t=null!=r.findVarRef(e,(function(e){return r.unknownColorVars.has(e)||r.isVarType(e,6)}));r.itarateVarRefs(e,(function(e){t?r.resolveVariableType(e,1):r.unknownBgVars.add(e)}))}}))},e.prototype.iterateVarDeps=function(e,t){var r=new Set;!function(e,t){rr(e,(function(e){return t(e),e}))}(e,(function(e){return r.add(e)})),r.forEach((function(e){return t(e)}))},e.prototype.findVarRef=function(e,t,r){var n,a;if(void 0===r&&(r=new Set),r.has(e))return null;if(r.add(e),t(e))return e;var o=this.varRefs.get(e);if(!o||0===o.size)return null;try{for(var i=h(o),c=i.next();!c.done;c=i.next()){var u=c.value,s=this.findVarRef(u,t,r);if(s)return s}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return null},e.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,(function(e){return t(e),!1}))},e.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},e.prototype.putRootVars=function(e,t){var r,n,a=this,o=e.sheet;o.cssRules.length>0&&o.deleteRule(0);var i=new Map;be(document.documentElement.style,(function(e,r){cr(e)&&(a.isVarType(e,1)&&i.set(nr(e),hr(r,t)),a.isVarType(e,2)&&i.set(ar(e),pr(r,t)),a.isVarType(e,4)&&i.set(or(e),vr(r,t)),a.subscribeForVarTypeChange(e,a.onRootVariableDefined))}));var c=[];c.push(":root {");try{for(var u=h(i),s=u.next();!s.done;s=u.next()){var l=p(s.value,2),d=l[0],f=l[1];c.push(" ".concat(d,": ").concat(f,";"))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}c.push("}");var v=c.join("\n");o.insertRule(v)},e}());function Jt(e,t){void 0===t&&(t=0);var r=e.indexOf("var(",t);if(r>=0){var n=Ve(e,r+3);if(n)return{start:r,end:n.end}}return null}function er(e,t){var r=function(e){for(var t,r=[],n=0;t=Jt(e,n);){var a=t.start,o=t.end;r.push({start:a,end:o,value:e.substring(a,o)}),n=t.end+1}return r}(e),n=r.length;if(0===n)return e;var a=e.length,o=r.map((function(e){return t(e.value)})),i=[];i.push(e.substring(0,r[0].start));for(var c=0;c=0?(t=e.substring(4,n).trim(),r=e.substring(n+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),r=""),{name:t,fallback:r}}function rr(e,t,r){return er(e,(function(e){var n,a=tr(e),o=a.name,i=a.fallback,c=t(o);return i?(n=ur(i)?rr(i,t,r):r?r(i):i,"var(".concat(c,", ").concat(n,")")):"var(".concat(c,")")}))}function nr(e){return"--darkreader-bg".concat(e)}function ar(e){return"--darkreader-text".concat(e)}function or(e){return"--darkreader-border".concat(e)}function ir(e){return"--darkreader-bgimg".concat(e)}function cr(e){return e.startsWith("--")}function ur(e){return e.includes("var(")}function sr(e){return e.match(/^\s*(rgb|hsl)a?\(/)}function lr(e){return"color"===e||"caret-color"===e||"-webkit-text-fill-color"===e}var dr=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function fr(e,t,r){var n=function(e){if(dr.test(e)){var t=e.split(","),r="rgb(";return t.forEach((function(e){r+="".concat(e.trim(),", ")})),r=r.substring(0,r.length-2),{isRaw:!0,color:r+=")"}}return{isRaw:!1,color:e}}(e),a=n.isRaw,o=n.color,i=Le(o);if(i){var c=r(i,t);if(a){var u=Le(c);return u?"".concat(u.r,", ").concat(u.g,", ").concat(u.b):c}return c}return o}function hr(e,t){return fr(e,t,dt)}function pr(e,t){return fr(e,t,mt)}function vr(e,t){return fr(e,t,bt)}function mr(e,t,r){void 0===r&&(r=new Set);var n=!1,a=er(e,(function(e){var a=tr(e),o=a.name,i=a.fallback;if(r.has(o))return n=!0,null;r.add(o);var c=t.get(o)||i,u=null;return c&&(u=ur(c)?mr(c,t,r):c),u||(n=!0,null)}));return n?null:a}var gr={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor"},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage"},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border"},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom"},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left"},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right"},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top"},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow"},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color"},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill"},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke"},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline"},"stop-color":{customProp:"--darkreader-inline-stopcolor",cssProp:"stop-color",dataAttr:"data-darkreader-inline-stopcolor"}},br=Object.values(gr),yr={};br.forEach((function(e){var t=e.cssProp,r=e.customProp;return yr[r]=t}));var Sr=["style","fill","stop-color","stroke","bgcolor","color"],wr=Sr.map((function(e){return"[".concat(e,"]")})).join(", ");function kr(){return br.map((function(e){var t=e.dataAttr,r=e.customProp,n=e.cssProp;return["[".concat(t,"] {")," ".concat(n,": var(").concat(r,") !important;"),"}"].join("\n")})).join("\n")}var _r=new Map,Er=new Map;function Cr(e,t,r){_r.has(e)&&(_r.get(e).disconnect(),Er.get(e).disconnect());var n=new WeakSet;function a(e){(function(e){var t=[];return e instanceof Element&&e.matches(wr)&&t.push(e),(e instanceof Element||C&&e instanceof ShadowRoot||e instanceof Document)&&$(t,e.querySelectorAll(wr)),t})(e).forEach((function(e){n.has(e)||(n.add(e),t(e))})),X(e,(function(a){n.has(e)||(n.add(e),r(a.shadowRoot),Cr(a.shadowRoot,t,r))}))}var o=le(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return a(e)}))},onHugeMutations:function(){a(e)}});_r.set(e,o);var i=0,c=null,u=Q({seconds:10}),s=Q({seconds:2}),l=[],d=null,f=z((function(e){var r=new Set;e.forEach((function(e){var n=e.target;r.has(n)||Sr.includes(e.attributeName)&&(r.add(n),t(n))}))})),h=new MutationObserver((function(e){if(d)l.push.apply(l,v([],p(e),!1));else{i++;var t=Date.now();if(null==c)c=t;else if(i>=50){if(t-c0&&function(e,t){for(var r=0,n=t.length;r32||n>32?"background-color":"color",o)};re()?i():ae(i)}}e.hasAttribute("stop-color")&&u("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){var c=e.getAttribute("stroke");u("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",c)}e.style&&be(e.style,(function(t,r){if("background-image"!==t||!r.includes("url"))if(gr.hasOwnProperty(t)||t.startsWith("--")&&!yr[t])u(t,t,r);else{var n=yr[t];if(n&&!e.style.getPropertyValue(n)&&!e.hasAttribute(n)){if("background-color"===n&&e.hasAttribute("bgcolor"))return;e.style.setProperty(t,"")}}})),e.style&&e instanceof SVGTextElement&&e.style.fill&&u("fill","color",e.style.getPropertyValue("fill")),G(a,(function(t){e.removeAttribute(gr[t].dataAttr)})),xr.set(e,Rr(e,t))}}function u(r,o,i){var c=r.startsWith("--"),u=c?{}:gr[r],s=u.customProp,l=u.dataAttr,d=qt(o,i,{style:e.style},Zt,n,null);if(d){var f=d.value;if("function"==typeof f&&(f=f(t)),c&&"object"==typeof f)f.declarations.forEach((function(t){var r=t.property,n=t.value;!(n instanceof Promise)&&e.style.setProperty(r,n)}));else e.style.setProperty(s,f),e.hasAttribute(l)||e.setAttribute(l,""),a.delete(r)}}}var Mr="theme-color",Ar='meta[name="'.concat(Mr,'"]'),Lr=null,Or=null;function Dr(e,t){var r=Le(Lr=Lr||e.content);r&&(e.content=dt(r,t))}var Pr=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];var Nr=function(){var e=[],t=null;function r(){for(var r;r=e.shift();)r();t=null}return{add:function(n){e.push(n),t||(t=requestAnimationFrame(r))},cancel:function(){e.splice(0),cancelAnimationFrame(t),t=null}}}();function jr(){var e=0,t=new Set,r=new Map,n=new Set,a=null,o=!1,i=!1;return{modifySheet:function(c){var u=c.sourceCSSRules,s=c.theme,l=c.ignoreImageAnalysis,d=c.force,f=c.prepareSheet,h=c.isAsyncCancelled,m=0===r.size,g=new Set(r.keys()),b=function(e){var t="";return Pr.forEach((function(r){t+="".concat(r,":").concat(e[r],";")})),t}(s),y=b!==a;o&&(i=!0);var S=[];if(ve(u,(function(e){var n=e.cssText,a=!1;if(g.delete(n),e.parentRule instanceof CSSMediaRule&&(n+=";".concat(e.parentRule.media.mediaText)),t.has(n)||(t.add(n),a=!0),a){if(m=!0,"revert"!==e.style.all){var o=[];e.style&&be(e.style,(function(t,r){var n=qt(t,r,e,Zt,l,h);n&&o.push(n)}));var i=null;if(o.length>0){var c=e.parentRule;i={selector:e.selectorText,declarations:o,parentRule:c},S.push(i)}r.set(n,i)}}else S.push(r.get(n))}),(function(){o=!0})),g.forEach((function(e){t.delete(e),r.delete(e)})),a=b,d||m||y){e++;var w=new Map,k=new Map,_=0,E=0,C={rule:null,rules:[],isGroup:!0},x=new WeakMap;n.forEach((function(e){return e()})),n.clear(),S.filter((function(e){return e})).forEach((function(t){var r=t.selector,a=t.declarations,o=V(t.parentRule),i={selector:r,declarations:[],isGroup:!1},c=i.declarations;function u(t,r,n,a){var o=++_,i={property:t,value:null,important:n,asyncKey:o,sourceValue:a};c.push(i);var u=e;r.then((function(t){t&&!h()&&u===e&&(i.value=t,Nr.add((function(){h()||u!==e||function(e){var t=w.get(e),r=t.rule,n=t.target,a=t.index;n.deleteRule(a),R(n,a,r),w.delete(e)}(o)})))}))}function l(t,r,a,o){var i=r.declarations,s=r.onTypeChange,l=++E,d=e,f=c.length,m=[];if(0===i.length){var g={property:t,value:o,important:a,sourceValue:o,varKey:l};c.push(g),m=[g]}i.forEach((function(e){if(e.value instanceof Promise)u(e.property,e.value,a,o);else{var t={property:e.property,value:e.value,important:a,sourceValue:o,varKey:l};c.push(t),m.push(t)}})),s.addListener((function(t){if(!h()&&d===e){var r=t.map((function(e){return{property:e.property,value:e.value,important:a,sourceValue:o,varKey:l}})),n=c.indexOf(m[0],f);c.splice.apply(c,v([n,m.length],p(r),!1)),m=r,function(e){var t=k.get(e),r=t.rule,n=t.target,a=t.index;n.deleteRule(a),R(n,a,r)}(l)}})),n.add((function(){return s.removeListeners()}))}o.rules.push(i),a.forEach((function(e){var t=e.property,r=e.value,n=e.important,a=e.sourceValue;if("function"==typeof r){var o=r(s);o instanceof Promise?u(t,o,n,a):t.startsWith("--")?l(t,o,n,a):c.push({property:t,value:o,important:n,sourceValue:a})}else c.push({property:t,value:r,important:n,sourceValue:a})}))}));var T=f();!function e(t,r,n){t.rules.forEach((function(t){if(t.isGroup){var a=function(e,t){var r=e.rule;if(r instanceof CSSMediaRule){var n=r.media,a=t.cssRules.length;return t.insertRule("@media ".concat(n.mediaText," {}"),a),t.cssRules[a]}return t}(t,r);e(t,a,n)}else n(t,r)}))}(C,T,(function(e,t){var r=t.cssRules.length;e.declarations.forEach((function(n){var a=n.asyncKey,o=n.varKey;null!=a&&w.set(a,{rule:e,target:t,index:r}),null!=o&&k.set(o,{rule:e,target:t,index:r})})),R(t,r,e)}))}function R(e,t,r){var n=r.selector,a=r.declarations,o="";a.forEach((function(e){var t,r,n,a,i;o+="".concat((r=(t=e).property,n=t.value,a=t.important,i=t.sourceValue,"".concat(r,": ").concat(null==n?i:n).concat(a?" !important":"",";"))," ")}));var i="".concat(n," { ").concat(o," }");e.insertRule(i,t)}function V(e){if(null==e)return C;if(x.has(e))return x.get(e);var t={rule:e,rules:[],isGroup:!0};return x.set(e,t),V(e.parentRule).rules.push(t),t}},shouldRebuildStyle:function(){return o&&!i}}}var Fr='style, link[rel*="stylesheet" i]:not([disabled])';function Ir(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&Boolean(e.rel)&&e.rel.toLowerCase().includes("stylesheet")&&Boolean(e.href)&&!e.disabled&&(!S||!e.href.startsWith("moz-extension://"))&&!function(e){if(!e.href)return!1;try{return"fonts.googleapis.com"===new URL(e.href).hostname}catch(t){return"Couldn't construct ".concat(e.href," as URL"),!1}}(e))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function Br(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=!0),Ir(e)?t.push(e):(e instanceof Element||C&&e instanceof ShadowRoot||e===document)&&(G(e.querySelectorAll(Fr),(function(e){return Br(e,t,!1)})),r&&X(e,(function(e){return Br(e.shadowRoot,t,!1)}))),t}var qr=new WeakSet,Wr=new WeakSet,Hr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Hr=!0}),{once:!0,passive:!0});var Ur=0,Gr=new Map;function $r(e,t){for(var r=t.update,n=t.loadingStart,a=t.loadingEnd,o=[],i=e;(i=i.nextElementSibling)&&i.matches(".darkreader");)o.push(i);var c=o.find((function(e){return e.matches(".darkreader--cors")&&!Wr.has(e)}))||null,u=o.find((function(e){return e.matches(".darkreader--sync")&&!qr.has(e)}))||null,s=null,l=null,h=!1,v=!0,m=jr(),g=new MutationObserver((function(){r()})),b={attributes:!0,childList:!0,subtree:!0,characterData:!0};function y(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(Se)}function S(e,t){var r=!1;if(e){var n=void 0;e:for(var a=0,o=e.length;a=0;t--)e.deleteRule(t)}(u.sheet),l?l.run():l=Y(u,"prev-sibling",(function(){R=!0,i()})),u.sheet}function i(){var e=R;R=!1,m.modifySheet({prepareSheet:o,sourceCSSRules:a,theme:t,ignoreImageAnalysis:n,force:e,isAsyncCancelled:function(){return h}}),v=0===u.sheet.cssRules.length,m.shouldRebuildStyle()&&ae((function(){return r()}))}a&&(h=!1,i())},pause:I,destroy:function(){if(I(),K(c),K(u),a(),Gr.has(x)){var e=Gr.get(x);Gr.delete(x),e&&e()}},watch:function(){g.observe(e,b),e instanceof HTMLStyleElement&&A()},restore:function(){u&&(++B>10||(_(),s&&s.skip(),l&&l.skip(),v||(R=!0,r())))}}}function zr(e,t){return d(this,void 0,void 0,(function(){return f(this,(function(r){return[2,new Promise((function(r,n){var a=function(){e.removeEventListener("load",o),e.removeEventListener("error",i),Gr.delete(t)},o=function(){a(),r()},i=function(){a(),n("Linkelement ".concat(t," couldn't be loaded. ").concat(e.href))};Gr.set(t,(function(){a(),n()})),e.addEventListener("load",o,{passive:!0}),e.addEventListener("error",i,{passive:!0}),e.href||i()}))]}))}))}function Qr(e){return d(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:case 4:return[2,t.sent()];case 3:return[4,Et({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})]}}))}))}function Kr(e,t,r){return void 0===r&&(r=new Map),d(this,void 0,void 0,(function(){var n,a,o,i,c,u,s,l,d,p;return f(this,(function(f){switch(f.label){case 0:e=function(e,t){return e.replace(ye,(function(e){var r=we(e);try{return"url('".concat(pe(t,r),"')")}catch(t){return e}}))}(e=function(e){return e.replace(Ee,"")}(e=e.replace(_e,"")),t),n=Re(Se,e),f.label=1;case 1:f.trys.push([1,10,11,12]),a=h(n),o=a.next(),f.label=2;case 2:return o.done?[3,9]:(i=o.value,c=we(i.substring(7).trim().replace(/;$/,"").replace(/screen$/,"")),u=pe(t,c),s=void 0,r.has(u)?(s=r.get(u),[3,7]):[3,3]);case 3:return f.trys.push([3,6,,7]),[4,Qr(u)];case 4:return s=f.sent(),r.set(u,s),[4,Kr(s,ke(u),r)];case 5:return s=f.sent(),[3,7];case 6:return f.sent(),s="",[3,7];case 7:e=e.split(i).join(s),f.label=8;case 8:return o=a.next(),[3,2];case 9:return[3,12];case 10:return l=f.sent(),d={error:l},[3,12];case 11:try{o&&!o.done&&(p=a.return)&&p.call(a)}finally{if(d)throw d.error}return[7];case 12:return[2,e=e.trim()]}}))}))}var Yr,Xr,Zr=[],Jr=new Set,en=new Map;function tn(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var r=e.getAttribute("is");if(!r)return;t=r}en.has(t)||(en.set(t,new Set),function(e){return d(this,void 0,void 0,(function(){return f(this,(function(t){return Jr.has(e)?[2]:[2,new Promise((function(t){if(window.customElements&&"function"==typeof customElements.whenDefined)customElements.whenDefined(e).then((function(){return t()}));else if(nn)an.has(e)?an.get(e).push(t):an.set(e,[t]),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var r=function(){var n=en.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?t():requestAnimationFrame(r))};requestAnimationFrame(r)}}))]}))}))}(t).then((function(){if(Xr){var e=en.get(t);en.delete(t),Xr(Array.from(e))}}))),en.get(t).add(e)}function rn(e){T&&G(e.querySelectorAll(":not(:defined)"),tn)}var nn=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){nn=!0}),{once:!0,passive:!0});var an=new Map;function on(e){nn=!0;var t=e.detail.tag;if(Jr.add(t),an.has(t)){var r=an.get(t);an.delete(t),r.forEach((function(e){return e()}))}}function cn(e,t,r){un();var n=new Set(e),a=new WeakMap,o=new WeakMap;function i(e){a.set(e,e.previousElementSibling),o.set(e,e.nextElementSibling)}function c(e){var r=e.createdStyles,c=e.removedStyles,u=e.movedStyles;r.forEach((function(e){return i(e)})),u.forEach((function(e){return i(e)})),c.forEach((function(e){return t=e,a.delete(t),void o.delete(t);var t})),r.forEach((function(e){return n.add(e)})),c.forEach((function(e){return n.delete(e)})),r.size+c.size+u.size>0&&t({created:Array.from(r),removed:Array.from(c),moved:Array.from(u),updated:[]})}function u(e){var t=e.additions,r=e.moves,n=e.deletions,a=new Set,o=new Set,i=new Set;t.forEach((function(e){return Br(e).forEach((function(e){return a.add(e)}))})),n.forEach((function(e){return Br(e).forEach((function(e){return o.add(e)}))})),r.forEach((function(e){return Br(e).forEach((function(e){return i.add(e)}))})),c({createdStyles:a,removedStyles:o,movedStyles:i}),t.forEach((function(e){h(e),rn(e)})),t.forEach((function(e){return!(!(t=e).tagName.includes("-")&&!t.getAttribute("is"))&&tn(e);var t}))}function s(e){var t=new Set(Br(e)),r=new Set,i=new Set,u=new Set;t.forEach((function(e){n.has(e)||r.add(e)})),n.forEach((function(e){t.has(e)||i.add(e)})),t.forEach((function(e){var t;r.has(e)||i.has(e)||(t=e).previousElementSibling===a.get(t)&&t.nextElementSibling===o.get(t)||u.add(e)})),c({createdStyles:r,removedStyles:i,movedStyles:u}),h(e),rn(e)}function l(e){var r=new Set,n=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(Ir(t)?r.add(t):t instanceof HTMLLinkElement&&t.disabled&&n.add(t))})),r.size+n.size>0&&t({updated:Array.from(r),created:[],removed:Array.from(n),moved:[]})}function d(e){if(!Yr.has(e)){var t=le(e,{onMinorMutations:u,onHugeMutations:s}),r=new MutationObserver(l);r.observe(e,{attributeFilter:["rel","disabled","media","href"],subtree:!0}),Zr.push(t,r),Yr.add(e)}}function f(e){var t=e.shadowRoot;null==t||Yr.has(t)||(d(t),r(t))}function h(e){X(e,f)}e.forEach(i),d(document),h(document.documentElement),Xr=function(e){var r=[];e.forEach((function(e){return $(r,Br(e.shadowRoot))})),t({created:r,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(f(e),h(t),rn(t))}))},document.addEventListener("__darkreader__isDefined",on,{passive:!0}),rn(document)}function un(){Zr.forEach((function(e){return e.disconnect()})),Zr.splice(0,Zr.length),Yr=new WeakSet,Xr=null,en.clear(),document.removeEventListener("__darkreader__isDefined",on)}var sn=new WeakMap,ln=new WeakSet;function dn(e){var t=!1;return{render:function(r,n){e.adoptedStyleSheets.forEach((function(a){if(!ln.has(a)){var o=a.rules,i=new CSSStyleSheet;jr().modifySheet({prepareSheet:function(){for(var t=i.cssRules.length-1;t>=0;t--)i.deleteRule(t);return function(t,r){var n=v([],p(e.adoptedStyleSheets),!1),a=n.indexOf(t),o=n.indexOf(r);a!==o-1&&(o>=0&&n.splice(o,1),n.splice(a+1,0,r),e.adoptedStyleSheets=n)}(a,i),sn.set(a,i),ln.add(i),i},sourceCSSRules:o,theme:r,ignoreImageAnalysis:n,force:!1,isAsyncCancelled:function(){return t}})}}))},destroy:function(){t=!0;var r=v([],p(e.adoptedStyleSheets),!1);e.adoptedStyleSheets.forEach((function(e){if(ln.has(e)){var t=r.indexOf(e);t>=0&&r.splice(t,1),sn.delete(e),ln.delete(e)}})),e.adoptedStyleSheets=r}}}function fn(e,t){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));var r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),n=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),a=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),o=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),i=e?Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"):null,c=t?Object.getOwnPropertyDescriptor(CustomElementRegistry.prototype,"define"):null,u=["baidu.com","baike.baidu.com","ditu.baidu.com","map.baidu.com","maps.baidu.com","haokan.baidu.com","pan.baidu.com","passport.baidu.com","tieba.baidu.com","www.baidu.com"].includes(location.hostname),s=u?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,l="www.vy.no"===location.hostname,d=l?Object.getOwnPropertyDescriptor(Node.prototype,"childNodes"):null,f=function(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",r),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",n),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",a),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",o),document.removeEventListener("__darkreader__cleanUp",f),document.removeEventListener("__darkreader__addUndefinedResolver",m),e&&Object.defineProperty(Document.prototype,"styleSheets",i),t&&Object.defineProperty(CustomElementRegistry.prototype,"define",c),u&&Object.defineProperty(Element.prototype,"getElementsByTagName",s),l&&Object.defineProperty(Node.prototype,"childNodes",d)},h=function(e){customElements.whenDefined(e).then((function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e}}))}))},m=function(e){return h(e.detail.tag)};document.addEventListener("__darkreader__cleanUp",f,{passive:!0}),document.addEventListener("__darkreader__addUndefinedResolver",m,{passive:!0});var g=new Event("__darkreader__updateSheet");Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},r,{value:function(e,t,n){return r.value.call(this,e,t,n),!this.ownerNode||this.ownerNode.classList&&this.ownerNode.classList.contains("darkreader")||this.ownerNode.dispatchEvent(g),-1}})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},n,{value:function(e,t){var r=n.value.call(this,e,t);return!this.ownerNode||this.ownerNode.classList&&this.ownerNode.classList.contains("darkreader")||this.ownerNode.dispatchEvent(g),r}})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},a,{value:function(e){a.value.call(this,e),!this.ownerNode||this.ownerNode.classList&&this.ownerNode.classList.contains("darkreader")||this.ownerNode.dispatchEvent(g)}})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},o,{value:function(e){o.value.call(this,e),!this.ownerNode||this.ownerNode.classList&&this.ownerNode.classList.contains("darkreader")||this.ownerNode.dispatchEvent(g)}})),e&&Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},i,{get:function(){var e=this,t=function(){var t=v([],p(i.get.call(e)),!1).filter((function(e){return e.ownerNode&&!(e.ownerNode.classList&&e.ownerNode.classList.contains("darkreader"))}));return t.item=function(e){return t[e]},Object.setPrototypeOf(t,StyleSheetList.prototype)},r=t();return new Proxy(r,{get:function(e,r){return t()[r]}})}})),t&&Object.defineProperty(CustomElementRegistry.prototype,"define",Object.assign({},c,{value:function(e,t,r){h(e),c.value.call(this,e,t,r)}})),u&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},s,{value:function(e){var t=this;if("style"!==e)return s.value.call(this,e);var r=function(){var r=s.value.call(t,e);return Object.setPrototypeOf(v([],p(r),!1).filter((function(e){return e&&!(e.classList&&e.classList.contains("darkreader"))})),NodeList.prototype)},n=r();return new Proxy(n,{get:function(e,t){return r()[Number(t)||t]}})}})),l&&Object.defineProperty(Node.prototype,"childNodes",Object.assign({},d,{get:function(){var e=d.get.call(this);return Object.setPrototypeOf(v([],p(e),!1).filter((function(e){return!e.classList||!e.classList.contains("darkreader")})),NodeList.prototype)}}))}var hn=null,pn=!document.hidden,vn={capture:!0,passive:!0};function mn(e){var t=Boolean(hn);hn=function(){document.hidden||(gn(),e(),pn=!0)},t||(document.addEventListener("visibilitychange",hn,vn),window.addEventListener("pageshow",hn,vn),window.addEventListener("focus",hn,vn))}function gn(){document.removeEventListener("visibilitychange",hn,vn),window.removeEventListener("pageshow",hn,vn),window.removeEventListener("focus",hn,vn),hn=null}function bn(){return pn}var yn=wt(),Sn=new Map,wn=[],kn=null,_n=null,En=null,Cn=[],xn=[];function Tn(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector(".".concat(e));return r||((r=document.createElement("style")).classList.add("darkreader"),r.classList.add(e),r.media="screen",r.textContent=""),r}var Rn=new Map;function Vn(e,t){Rn.has(t)&&Rn.get(t).stop(),Rn.set(t,Y(e,"head"))}function Mn(){var e=Tn("darkreader--fallback",document);e.textContent=Gt(kn,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),Vn(e,"fallback");var t=Tn("darkreader--user-agent");t.textContent=Ht(kn,En,kn.styleSystemControls),document.head.insertBefore(t,e.nextSibling),Vn(t,"user-agent");var r,n,a=Tn("darkreader--text");kn.useFont||kn.textStroke>0?a.textContent=(r=kn,(n=[]).push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),r.useFont&&r.fontFamily&&n.push(" font-family: ".concat(r.fontFamily," !important;")),r.textStroke>0&&(n.push(" -webkit-text-stroke: ".concat(r.textStroke,"px !important;")),n.push(" text-stroke: ".concat(r.textStroke,"px !important;"))),n.push("}"),n.join("\n")):a.textContent="",document.head.insertBefore(a,e.nextSibling),Vn(a,"text");var o=Tn("darkreader--invert");_n&&Array.isArray(_n.invert)&&_n.invert.length>0?o.textContent=["".concat(_n.invert.join(", ")," {")," filter: ".concat(St(l(l({},kn),{contrast:0===kn.mode?kn.contrast:Ye(kn.contrast-10,0,100)}))," !important;"),"}"].join("\n"):o.textContent="",document.head.insertBefore(o,a.nextSibling),Vn(o,"invert");var i=Tn("darkreader--inline");i.textContent=kr(),document.head.insertBefore(i,o.nextSibling),Vn(i,"inline");var c=Tn("darkreader--override");c.textContent=_n&&_n.css?Dn(_n.css):"",document.head.appendChild(c),Vn(c,"override");var u=Tn("darkreader--variables"),s=Ut(kn),d=kn,f=d.darkSchemeBackgroundColor,h=d.darkSchemeTextColor,p=d.lightSchemeBackgroundColor,v=d.lightSchemeTextColor,m=d.mode,g=0===m?p:f,b=0===m?v:h;g=dt(Le(g),kn),b=mt(Le(b),kn),u.textContent=[":root {"," --darkreader-neutral-background: ".concat(g,";")," --darkreader-neutral-text: ".concat(b,";")," --darkreader-selection-background: ".concat(s.backgroundColorSelection,";")," --darkreader-selection-text: ".concat(s.foregroundColorSelection,";"),"}"].join("\n"),document.head.insertBefore(u,i.nextSibling),Vn(u,"variables");var y=Tn("darkreader--root-vars");document.head.insertBefore(y,u.nextSibling);var S=!(_n&&_n.disableStyleSheetsProxy),w=!(_n&&_n.disableCustomElementRegistryProxy),k=function(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector(".".concat(e));return r||((r=document.createElement("script")).classList.add("darkreader"),r.classList.add(e)),r}("darkreader--proxy");k.append("(".concat(fn,")(").concat(S,", ").concat(w,")")),document.head.insertBefore(k,y.nextSibling),k.remove()}var An=new Set;function Ln(e){var t=Tn("darkreader--inline",e);t.textContent=kr(),e.insertBefore(t,e.firstChild);var r=Tn("darkreader--override",e);r.textContent=_n&&_n.css?Dn(_n.css):"",e.insertBefore(r,t.nextSibling);var n=Tn("darkreader--invert",e);_n&&Array.isArray(_n.invert)&&_n.invert.length>0?n.textContent=["".concat(_n.invert.join(", ")," {")," filter: ".concat(St(l(l({},kn),{contrast:0===kn.mode?kn.contrast:Ye(kn.contrast-10,0,100)}))," !important;"),"}"].join("\n"):n.textContent="",e.insertBefore(n,r.nextSibling),An.add(e)}function On(e){var t=null===e.firstChild;Ln(e),t&&function(e){new MutationObserver((function(t,r){var n,a,o,i;r.disconnect();try{for(var c=h(t),u=c.next();!u.done;u=c.next()){var s=u.value,l=s.type,d=s.removedNodes;if("childList"===l)try{for(var f=(o=void 0,h(d)),p=f.next();!p.done;p=f.next()){var v=p.value,m=v.nodeName,g=v.className;if("STYLE"===m&&["darkreader darkreader--inline","darkreader darkreader--override","darkreader darkreader--invert"].includes(g))return void Ln(e)}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}})).observe(e,{childList:!0})}(e)}function Dn(e){return e.replace(/\${(.+?)}/g,(function(e,t){var r=Le(t);return r?ot(r,kn,it):t}))}function Pn(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}var Nn=0,jn=new Set;function Fn(e){var t=++Nn;var r=$r(e,{update:function(){var e=r.details({secondRound:!0});e&&(Zt.addRulesForMatching(e.rules),Zt.matchVariablesAndDependants(),r.render(kn,Cn))},loadingStart:function(){if(!Z()||!bn()){jn.add(t),"Current amount of styles loading: ".concat(jn.size);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=Gt(kn,{strict:!1}))}},loadingEnd:function(){jn.delete(t),"Removed loadingStyle ".concat(t,", now awaiting: ").concat(jn.size),0===jn.size&&Z()&&Pn()}});return Sn.set(e,r),r}function In(e){var t=Sn.get(e);t&&(t.destroy(),Sn.delete(e))}var Bn,qn=z((function(e){Sn.forEach((function(e){return e.render(kn,Cn)})),wn.forEach((function(e){return e.render(kn,Cn)})),e&&e()})),Wn=function(){qn.cancel()};function Hn(){0!==jn.size||Pn()}function Un(){var e,t;!function(){Wn();var e=Br(document).filter((function(e){return!Sn.has(e)})).map((function(e){return Fn(e)}));e.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Zt.addRulesForMatching(e.rules)})),Zt.matchVariablesAndDependants(),Zt.setOnRootVariableChange((function(){var e=Tn("darkreader--root-vars");Zt.putRootVars(e,kn)}));var t=Tn("darkreader--root-vars");Zt.putRootVars(t,kn),Sn.forEach((function(e){return e.render(kn,Cn)})),0===jn.size&&Pn(),e.forEach((function(e){return e.watch()}));var r=function(e){for(var t=[],r=0,n=e.length;r0&&$(r,t)})),r.forEach((function(e){return Vr(e,kn,xn,Cn)})),$n(document)}(),cn(Array.from(Sn.keys()),(function(e){var t=e.created,r=e.updated,n=e.removed,a=e.moved,o=n,i=t.concat(r).concat(a).filter((function(e){return!Sn.has(e)})),c=a.filter((function(e){return Sn.has(e)}));o.forEach((function(e){return In(e)}));var u=i.map((function(e){return Fn(e)}));u.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Zt.addRulesForMatching(e.rules)})),Zt.matchVariablesAndDependants(),u.forEach((function(e){return e.render(kn,Cn)})),u.forEach((function(e){return e.watch()})),c.forEach((function(e){return Sn.get(e).restore()}))}),(function(e){On(e),$n(e)})),e=function(e){if(Vr(e,kn,xn,Cn),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")){Zt.matchVariablesAndDependants();var t=Tn("darkreader--root-vars");Zt.putRootVars(t,kn)}},t=function(e){On(e);var t=e.querySelectorAll(wr);t.length>0&&G(t,(function(e){return Vr(e,kn,xn,Cn)}))},Cr(document,e,t),X(document.documentElement,(function(r){Cr(r.shadowRoot,e,t)})),ee(Hn)}function Gn(){var e,t;Mn(),bn()||kn.immediateModify?Un():mn(Un),e=kn,(t=document.querySelector(Ar))?Dr(t,e):(Or&&Or.disconnect(),(Or=new MutationObserver((function(t){e:for(var r=0;r0){var t=dn(e);wn.push(t),t.render(kn,Cn)}}catch(e){}}function zn(){Sn.forEach((function(e){return e.pause()})),G(Rn.values(),(function(e){return e.stop()})),Rn.clear(),un(),_r.forEach((function(e){return e.disconnect()})),Er.forEach((function(e){return e.disconnect()})),_r.clear(),Er.clear(),te(Hn),ne.clear()}function Qn(){if(document.querySelector('meta[name="darkreader-lock"]'))return!0;var e,t=document.querySelector('meta[name="darkreader"]');return t?t.content!==yn:((e=document.createElement("meta")).name="darkreader",e.content=yn,document.head.appendChild(e),(Bn=new MutationObserver((function(){document.querySelector('meta[name="darkreader-lock"]')&&(Bn.disconnect(),Yn())}))).observe(document.head,{childList:!0,subtree:!0}),!1)}function Kn(e,t,r){if(kn=e,(_n=t)?(Cn=Array.isArray(_n.ignoreImageAnalysis)?_n.ignoreImageAnalysis:[],xn=Array.isArray(_n.ignoreInlineStyle)?_n.ignoreInlineStyle:[]):(Cn=[],xn=[]),kn.immediateModify&&(Z=function(){return!0}),En=r,document.head){if(Qn())return void Yn();document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",kn.mode?"dark":"dimmed"),Gn()}else{if(!S){var n=Tn("darkreader--fallback");document.documentElement.appendChild(n),n.textContent=Gt(kn,{strict:!0})}var a=new MutationObserver((function(){if(document.head){if(a.disconnect(),Qn())return void Yn();Gn()}}));a.observe(document,{childList:!0,subtree:!0})}}function Yn(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),Zt.clear(),de.clear(),gn(),Wn(),zn(),Xt(),Me.clear(),Ae.clear(),K(document.querySelector(".darkreader--fallback")),document.head&&(!function(){Or&&(Or.disconnect(),Or=null);var e=document.querySelector(Ar);e&&Lr&&(e.content=Lr)}(),K(document.head.querySelector(".darkreader--user-agent")),K(document.head.querySelector(".darkreader--text")),K(document.head.querySelector(".darkreader--invert")),K(document.head.querySelector(".darkreader--inline")),K(document.head.querySelector(".darkreader--override")),K(document.head.querySelector(".darkreader--variables")),K(document.head.querySelector(".darkreader--root-vars")),K(document.head.querySelector('meta[name="darkreader"]')),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),K(document.head.querySelector(".darkreader--proxy"))),An.forEach((function(e){K(e.querySelector(".darkreader--inline")),K(e.querySelector(".darkreader--override"))})),An.clear(),G(Sn.keys(),(function(e){return In(e)})),jn.clear(),Gr.clear(),G(document.querySelectorAll(".darkreader"),K),wn.forEach((function(e){e.destroy()})),wn.splice(0),Bn&&Bn.disconnect()}var Xn=/url\(\"(blob\:.*?)\"\)/g;function Zn(e){return d(this,void 0,void 0,(function(){var t,r;return f(this,(function(n){switch(n.label){case 0:return t=[],Re(Xn,e,1).forEach((function(e){var r=M(e);t.push(r)})),[4,Promise.all(t)];case 1:return r=n.sent(),[2,e.replace(Xn,(function(){return'url("'.concat(r.shift(),'")')}))]}}))}))}var Jn='/*\n _______\n / \\\n .==. .==.\n (( ))==(( ))\n / "==" "=="\\\n /____|| || ||___\\\n ________ ____ ________ ___ ___\n | ___ \\ / \\ | ___ \\ | | / /\n | | \\ \\ / /\\ \\ | | \\ \\| |_/ /\n | | ) / /__\\ \\ | |__/ /| ___ \\\n | |__/ / ______ \\| ____ \\| | \\ \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n| ___ \\ | ____/ / \\ | ___ \\ | ____| ___ \\\n| | \\ \\| |___ / /\\ \\ | | \\ \\| |___| | \\ \\\n| |__/ /| ____/ /__\\ \\ | | ) | ____| |__/ /\n| ____ \\| |__/ ______ \\| |__/ /| |___| ____ \\\n|__| \\__\\____/__/ \\__\\_______/ |______|__| \\__\\\n https://darkreader.org\n*/\n\n/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/main/LICENSE */\n';function ea(){return d(this,void 0,void 0,(function(){function e(e,r){var n=document.querySelector(e);n&&n.textContent&&(t.push("/* ".concat(r," */")),t.push(n.textContent),t.push(""))}var t,r,n,a,o;return f(this,(function(i){switch(i.label){case 0:return t=[Jn],e(".darkreader--fallback","Fallback Style"),e(".darkreader--user-agent","User-Agent Style"),e(".darkreader--text","Text Style"),e(".darkreader--invert","Invert Style"),e(".darkreader--variables","Variables Style"),r=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){G(e.sheet.cssRules,(function(e){e&&e.cssText&&r.push(e.cssText)}))})),r.length?(n=function(e){function t(e){return e.replace(/^\s+/,"")}function r(e){return 0===e?"":" ".repeat(4*e)}if(e.length<5e4)for(var n=/[^{}]+{\s*}/;n.test(e);)e=e.replace(n,"");for(var a=e.replace(/\s{2,}/g," ").replace(/\{/g,"{\n").replace(/\}/g,"\n}\n").replace(/\;(?![^\(|\"]*(\)|\"))/g,";\n").replace(/\,(?![^\(|\"]*(\)|\"))/g,",\n").replace(/\n\s*\n/g,"\n").split("\n"),o=0,i=[],c=0,u=a.length;c