MediaWiki:DarkReader.js: Difference between revisions

From Galaxypedia
No edit summary
(finished testing)
Line 9: Line 9:


/* Possibly load the contents of a darkreader override css page and have darkreader abide by it */
/* Possibly load the contents of a darkreader override css page and have darkreader abide by it */
var idk;
/*fetch("https://robloxgalaxy.wiki/wiki/MediaWiki:Dark.css?action=raw&ctype=text/css")
var api = new mw.Api();
fetch("https://robloxgalaxy.wiki/wiki/MediaWiki:Dark.css?action=raw&ctype=text/css")
.then(function(response){return response.text();})
.then(function(response){return response.text();})
.then( function ( data ) {
.then( function ( data ) {
console.log(data)
console.log(data)
} );
} );*/


DarkReader.setFetchMethod(window.fetch);
DarkReader.setFetchMethod(window.fetch);

Revision as of 23:28, 23 June 2023

/** 
 * DarkReader Version 4.9.57
 * Minified by jsDelivr using Terser v5.14.1.
 * Original file: /npm/darkreader@4.9.57/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;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};function n(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function u(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=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<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}!function(e){e.UI_GET_DATA="ui-get-data",e.UI_SUBSCRIBE_TO_CHANGES="ui-subscribe-to-changes",e.UI_UNSUBSCRIBE_FROM_CHANGES="ui-unsubscribe-from-changes",e.UI_CHANGE_SETTINGS="ui-change-settings",e.UI_SET_THEME="ui-set-theme",e.UI_SET_SHORTCUT="ui-set-shortcut",e.UI_TOGGLE_ACTIVE_TAB="ui-toggle-active-tab",e.UI_MARK_NEWS_AS_READ="ui-mark-news-as-read",e.UI_MARK_NEWS_AS_DISPLAYED="ui-mark-news-as-displayed",e.UI_LOAD_CONFIG="ui-load-config",e.UI_APPLY_DEV_DYNAMIC_THEME_FIXES="ui-apply-dev-dynamic-theme-fixes",e.UI_RESET_DEV_DYNAMIC_THEME_FIXES="ui-reset-dev-dynamic-theme-fixes",e.UI_APPLY_DEV_INVERSION_FIXES="ui-apply-dev-inversion-fixes",e.UI_RESET_DEV_INVERSION_FIXES="ui-reset-dev-inversion-fixes",e.UI_APPLY_DEV_STATIC_THEMES="ui-apply-dev-static-themes",e.UI_RESET_DEV_STATIC_THEMES="ui-reset-dev-static-themes",e.UI_SAVE_FILE="ui-save-file",e.UI_REQUEST_EXPORT_CSS="ui-request-export-css",e.UI_COLOR_SCHEME_CHANGE="ui-color-scheme-change",e.BG_CHANGES="bg-changes",e.BG_ADD_CSS_FILTER="bg-add-css-filter",e.BG_ADD_STATIC_THEME="bg-add-static-theme",e.BG_ADD_SVG_FILTER="bg-add-svg-filter",e.BG_ADD_DYNAMIC_THEME="bg-add-dynamic-theme",e.BG_EXPORT_CSS="bg-export-css",e.BG_UNSUPPORTED_SENDER="bg-unsupported-sender",e.BG_CLEAN_UP="bg-clean-up",e.BG_RELOAD="bg-reload",e.BG_FETCH_RESPONSE="bg-fetch-response",e.BG_UI_UPDATE="bg-ui-update",e.BG_CSS_UPDATE="bg-css-update",e.CS_COLOR_SCHEME_CHANGE="cs-color-scheme-change",e.CS_FRAME_CONNECT="cs-frame-connect",e.CS_FRAME_FORGET="cs-frame-forget",e.CS_FRAME_FREEZE="cs-frame-freeze",e.CS_FRAME_RESUME="cs-frame-resume",e.CS_EXPORT_CSS_RESPONSE="cs-export-css-response",e.CS_FETCH="cs-fetch",e.CS_DARK_THEME_DETECTED="cs-dark-theme-detected",e.CS_DARK_THEME_NOT_DETECTED="cs-dark-theme-not-detected",e.CS_LOG="cs-log"}(t||(t={}));var c="undefined"!=typeof navigator,s=c?navigator.userAgentData&&Array.isArray(navigator.userAgentData.brands)?navigator.userAgentData.brands.map((function(e){return"".concat(e.brand.toLowerCase()," ").concat(e.version)})).join(" "):navigator.userAgent.toLowerCase():"some useragent",l=c?navigator.userAgentData&&"string"==typeof navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase():"some platform",d=s.includes("chrome")||s.includes("chromium"),f=s.includes("thunderbird"),h=s.includes("firefox")||s.includes("librewolf")||f;s.includes("vivaldi"),s.includes("yabrowser"),s.includes("opr")||s.includes("opera"),s.includes("edg");var p=s.includes("safari")&&!d,v=l.startsWith("win"),m=l.startsWith("mac");c&&navigator.userAgentData?navigator.userAgentData.mobile:s.includes("mobile");var g,b="function"==typeof ShadowRoot,y="function"==typeof MediaQueryList&&"function"==typeof MediaQueryList.prototype.addEventListener;(g=s.match(/chrom(?:e|ium)(?:\/| )([^ ]+)/))&&g[1]&&g[1],function(){var e=s.match(/(?:firefox|librewolf)(?:\/| )([^ ]+)/);e&&e[1]&&e[1]}();var S=function(){try{return document.querySelector(":defined"),!0}catch(e){return!1}}(),_=function(){if("undefined"==typeof document)return!1;var e=document.createElement("div");return e.setAttribute("style","color-scheme: dark"),e.style&&"dark"===e.style.colorScheme}();function k(e,t,r){return n(this,void 0,void 0,(function(){var n;return a(this,(function(a){switch(a.label){case 0:return[4,fetch(e,{cache:"force-cache",credentials:"omit",referrer:r})];case 1:if(n=a.sent(),h&&"text/css"===t&&e.startsWith("moz-extension://")&&e.endsWith(".css"))return[2,n];if(t&&!n.headers.get("Content-Type").startsWith(t))throw new Error("Mime type mismatch when loading ".concat(e));if(!n.ok)throw new Error("Unable to load ".concat(e," ").concat(n.status," ").concat(n.statusText));return[2,n]}}))}))}function w(e,t){return n(this,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,k(e,t)];case 1:return[4,E(r.sent())];case 2:return[2,r.sent()]}}))}))}function E(e){return n(this,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return[4,e.blob()];case 1:return t=r.sent(),[4,new Promise((function(e){var r=new FileReader;r.onloadend=function(){return e(r.result)},r.readAsDataURL(t)}))];case 2:return[2,r.sent()]}}))}))}var C=function(e){return n(void 0,void 0,void 0,(function(){return a(this,(function(t){return[2,Promise.reject(new Error(["Embedded Dark Reader cannot access a cross-origin resource",e,"Overview your URLs and CORS policies or use","`DarkReader.setFetchMethod(fetch: (url) => Promise<Response>))`.","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=new Set;function V(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n(this,void 0,void 0,(function(){var r,n,o,i,u,c,s;return a(this,(function(a){switch(a.label){case 0:if(!e[0]||e[0].type!==t.CS_FETCH)return[3,8];r=e[0].id,a.label=1;case 1:return a.trys.push([1,7,,8]),n=e[0].data,o=n.url,i=n.responseType,[4,T(o)];case 2:return u=a.sent(),"data-url"!==i?[3,4]:[4,E(u)];case 3:return c=a.sent(),[3,6];case 4:return[4,u.text()];case 5:c=a.sent(),a.label=6;case 6:return R.forEach((function(e){return e({type:t.BG_FETCH_RESPONSE,data:c,error:null,id:r})})),[3,8];case 7:return s=a.sent(),console.error(s),R.forEach((function(e){return e({type:t.BG_FETCH_RESPONSE,data:null,error:s,id:r})})),[3,8];case 8:return[2]}}))}))}function A(e){R.add(e)}if("function"==typeof chrome.runtime.sendMessage){var M=chrome.runtime.sendMessage;chrome.runtime.sendMessage=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];V.apply(void 0,u([],i(e),!1)),M.apply(chrome.runtime,e)}}else chrome.runtime.sendMessage=V;if(chrome.runtime.onMessage||(chrome.runtime.onMessage={}),"function"==typeof chrome.runtime.onMessage.addListener){var L=chrome.runtime.onMessage.addListener;chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];A(e[0]),L.apply(chrome.runtime.onMessage,e)}}else chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A(e[0])};var D="dynamicTheme",O={background:"#181a1b",text:"#e8e6e3"},P={background:"#dcdad7",text:"#181a1b"},I={mode:1,brightness:100,contrast:100,grayscale:0,sepia:0,useFont:!1,fontFamily:m?"Helvetica Neue":v?"Segoe UI":"Open Sans",textStroke:0,engine:D,stylesheet:"",darkSchemeBackgroundColor:O.background,darkSchemeTextColor:O.text,lightSchemeBackgroundColor:P.background,lightSchemeTextColor:P.text,scrollbarColor:m?"":"auto",selectionColor:"auto",styleSystemControls:!_,lightColorScheme:"Default",darkColorScheme:"Default",immediateModify:!1};function N(e,t){var r,n;if(function(e){return null!=e.length}(e))for(var a=0,i=e.length;a<i;a++)t(e[a]);else try{for(var u=o(e),c=u.next();!c.done;c=u.next()){t(c.value)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}function F(e,t){N(t,(function(t){return e.push(t)}))}function j(e){var t,r=!1,n=null;return Object.assign((function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t=a,n?r=!0:(e.apply(void 0,u([],i(t),!1)),n=requestAnimationFrame((function(){n=null,r&&(e.apply(void 0,u([],i(t),!1)),r=!1)})))}),{cancel:function(){cancelAnimationFrame(n),r=!1,n=null}})}function B(e){var t=0;return e.seconds&&(t+=1e3*e.seconds),e.minutes&&(t+=60*e.minutes*1e3),e.hours&&(t+=60*e.hours*60*1e3),e.days&&(t+=24*e.days*60*60*1e3),t}function q(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function U(e,t,r){void 0===r&&(r=Function.prototype);var n=B({seconds:2}),a=B({seconds:10}),o=e.previousSibling,i=e.parentNode;if(!i)throw new Error("Unable to watch for node position: parent element not found");if("prev-sibling"===t&&!o)throw new Error("Unable to watch for node position: there is no previous sibling");var u=0,c=null,s=null,l=j((function(){if(!s){u++;var f=Date.now();if(null==c)c=f;else if(u>=10){if(f-c<a)return void(s=setTimeout((function(){c=null,u=0,s=null,l()}),n));c=f,u=1}if("parent"===t&&o&&o.parentNode!==i)h();else{if("prev-sibling"===t){if(null==o.parentNode)return void h();o.parentNode!==i&&p(o.parentNode)}i.insertBefore(e,o?o.nextSibling:i.firstChild),d.takeRecords(),r&&r()}}})),d=new MutationObserver((function(){("parent"===t&&e.parentNode!==i||"prev-sibling"===t&&e.previousSibling!==o)&&l()})),f=function(){d.observe(i,{childList:!0})},h=function(){clearTimeout(s),d.disconnect(),l.cancel()},p=function(e){i=e,h(),f()};return f(),{run:f,stop:h,skip:function(){d.takeRecords()}}}function W(e,t){if(null!=e)for(var r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return null==e.shadowRoot?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),n=e.shadowRoot?r.currentNode:r.nextNode();null!=n;n=r.nextNode())n.classList.contains("surfingkeys_hints_host")||(t(n),W(n.shadowRoot,t))}var G=function(){return"complete"===document.readyState||"interactive"===document.readyState};var H=new Set;function $(e){G()?e():H.add(e)}function z(e){H.delete(e)}function Q(){return"complete"===document.readyState}var K=new Set;function X(e){Q()?e():K.add(e)}if(!G()){var Y=function(){G()&&(H.forEach((function(e){return e()})),H.clear(),Q()&&(document.removeEventListener("readystatechange",Y),K.forEach((function(e){return e()})),K.clear()))};document.addEventListener("readystatechange",Y)}var Z,J=new Map,ee=new WeakMap;function te(e,t){var r,n,a;if(J.has(e))r=J.get(e),n=ee.get(r);else{var o=!1,i=!1;r=new MutationObserver((function(t){if(function(e){if(e.length>1e3)return!0;for(var t=0,r=0;r<e.length;r++)if((t+=e[r].addedNodes.length)>1e3)return!0;return!1}(t))!o||G()?n.forEach((function(t){return(0,t.onHugeMutations)(e)})):i||($(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){N(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),N(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}),J.set(e,r),n=new Set,ee.set(r,n)}return n.add(t),{disconnect:function(){n.delete(t),a&&z(a),0===n.size&&(r.disconnect(),ee.delete(r),J.delete(e))}}}var re=new Map;function ne(e){return Z||(Z=document.createElement("a")),Z.href=e,Z.href}function ae(e,t){void 0===t&&(t=null);var r="".concat(e).concat(t?";".concat(t):"");if(re.has(r))return re.get(r);if(t){var n=new URL(e,ne(t));return re.set(r,n),n}var a=new URL(ne(e));return re.set(e,a),a}function oe(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return"".concat(location.protocol).concat(t);var r=ae(e);return ae(t,r.href).href}function ie(e,t,r){N(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{ie(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||ie(e.cssRules,t,r)}else e.conditionText&&CSS.supports(e.conditionText)&&ie(e.cssRules,t,r)}))}var ue=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],ce=p?ue.map((function(e){return[e,new RegExp("".concat(e,":\\s*(.*?)\\s*;"))]})):null;function se(e,t){N(e,(function(r){var n=e.getPropertyValue(r).trim();n&&t(r,n)}));var r=e.cssText;r.includes("var(")&&(p?ce.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)}})):ue.forEach((function(r){var n=e.getPropertyValue(r);n&&n.includes("var(")&&t(r,n)})))}var le=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,de=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function fe(e){return e.trim().replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function he(e){var t=ae(e);return"".concat(t.origin).concat(t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1"))}var pe=/\/\*[\s\S]*?\*\//g;var ve=/@font-face\s*{[^}]*}/g;function me(e){for(var t,r=[],n=[],a=0,o=e.length;a<o;a++){var c=e[a];if(c&&" "!==c){if(be.has(c)){for(var s=be.get(c);n.length;){var l=be.get(n[0]);if(!l)break;if(!s.lessOrEqualThan(l))break;r.push(n.shift())}n.unshift(c)}else!t||be.has(t)?r.push(c):r[r.length-1]+=c;t=c}}r.push.apply(r,u([],i(n),!1));var d=[];for(a=0,o=r.length;a<o;a++){if(s=be.get(r[a])){var f=d.splice(0,2);d.push(s.exec(f[1],f[0]))}else d.unshift(parseFloat(r[a]))}return d[0]}var ge=function(){function e(e,t){this.precendce=e,this.execMethod=t}return e.prototype.exec=function(e,t){return this.execMethod(e,t)},e.prototype.lessOrEqualThan=function(e){return this.precendce<=e.precendce},e}(),be=new Map([["+",new ge(1,(function(e,t){return e+t}))],["-",new ge(1,(function(e,t){return e-t}))],["*",new ge(2,(function(e,t){return e*t}))],["/",new ge(2,(function(e,t){return e/t}))]]);function ye(e,t,r){void 0===r&&(r=0);for(var n,a=[];n=e.exec(t);)a.push(n[r]);return a}function Se(e,t){void 0===t&&(t=0);for(var r=e.length,n=0,a=-1,o=t;o<r;o++)if(0===n){if((i=e.indexOf("(",o))<0)break;a=i,n++,o=i}else{var i,u=e.indexOf(")",o);if(u<0)break;if((i=e.indexOf("(",o))<0||u<i){if(0===--n)return{start:a,end:u+1};o=u}else n++,o=i}return null}var _e=new Map,ke=new Map;function we(e){if(e=e.trim(),ke.has(e))return ke.get(e);e.includes("calc(")&&(e=function(e){var t=0,r=function(t,r,n){e=e.substring(0,t)+n+e.substring(r)};for(;-1!==(t=e.indexOf("calc("));){var n=Se(e,t);if(!n)break;var a=e.slice(n.start+1,n.end-1),o=a.includes("%");a=a.split("%").join("");var i=Math.round(me(a));r(n.start-4,n.end,i+(o?"%":""))}return e}(e));var t=function(e){var t=e.trim().toLowerCase();if(t.match(Ve))return r=i(Le(t,De,Oe),4),n=r[0],a=r[1],o=r[2],u=r[3],{r:n,g:a,b:o,a:void 0===u?1:u};var r,n,a,o,u;if(t.match(Ae))return function(e){var t=i(Le(e,Pe,Ie),4),r=t[0],n=t[1],a=t[2],o=t[3];return Ce({h:r,s:n,l:a,a:void 0===o?1:o})}(t);if(t.match(Me))return function(e){var t=e.substring(1);switch(t.length){case 3:case 4:var r=i([0,1,2].map((function(e){return parseInt("".concat(t[e]).concat(t[e]),16)})),3);return{r:r[0],g:r[1],b:r[2],a:3===t.length?1:parseInt("".concat(t[3]).concat(t[3]),16)/255};case 6:case 8:var n=i([0,2,4].map((function(e){return parseInt(t.substring(e,e+2),16)})),3);return{r:n[0],g:n[1],b:n[2],a:6===t.length?1:parseInt(t.substring(6,8),16)/255}}return null}(t);if(Ne.has(t))return function(e){var t=Ne.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(t);if(Fe.has(t))return function(e){var t=Fe.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&&ke.set(e,t),t}function Ee(e){if(_e.has(e))return _e.get(e);var t=we(e);if(!t)return null;var r=xe(t);return _e.set(e,r),r}function Ce(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 xe(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 Te(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 Re(e){var t=e.h,r=e.s,n=e.l,a=e.a;return null!=a&&a<1?"hsla(".concat(Te(t),", ").concat(Te(100*r),"%, ").concat(Te(100*n),"%, ").concat(Te(a,2),")"):"hsl(".concat(Te(t),", ").concat(Te(100*r),"%, ").concat(Te(100*n),"%)")}var Ve=/^rgba?\([^\(\)]+\)$/,Ae=/^hsla?\([^\(\)]+\)$/,Me=/^#[0-9a-f]+$/i;function Le(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<e.length;o++){var i=e[o];i>="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],Oe={"%":100};var Pe=[360,1,1,1],Ie={"%":100,deg:360,rad:2*Math.PI,turn:1};var Ne=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})),Fe=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 je(e,t,r){return(.2126*e+.7152*t+.0722*r)/255}function Be(e,t,r,n,a){return(e-t)*(a-n)/(r-t)+n}function qe(e,t,r){return Math.min(r,Math.max(t,e))}function Ue(e,t){for(var r=[],n=0,a=e.length;n<a;n++){r[n]=[];for(var o=0,i=t[0].length;o<i;o++){for(var u=0,c=0,s=e[0].length;c<s;c++)u+=e[n][c]*t[c][o];r[n][o]=u}}return r}function We(e){var t=Ge.identity();return 0!==e.sepia&&(t=Ue(t,Ge.sepia(e.sepia/100))),0!==e.grayscale&&(t=Ue(t,Ge.grayscale(e.grayscale/100))),100!==e.contrast&&(t=Ue(t,Ge.contrast(e.contrast/100))),100!==e.brightness&&(t=Ue(t,Ge.brightness(e.brightness/100))),1===e.mode&&(t=Ue(t,Ge.invertNHue())),t}var Ge={identity:function(){return[[1,0,0,0,0],[0,1,0,0,0],[0,0,1,0,0],[0,0,0,1,0],[0,0,0,0,1]]},invertNHue:function(){return[[.333,-.667,-.667,0,1],[-.667,.333,-.667,0,1],[-.667,-.667,.333,0,1],[0,0,0,1,0],[0,0,0,0,1]]},brightness:function(e){return[[e,0,0,0,0],[0,e,0,0,0],[0,0,e,0,0],[0,0,0,1,0],[0,0,0,0,1]]},contrast:function(e){var t=(1-e)/2;return[[e,0,0,0,t],[0,e,0,0,t],[0,0,e,0,t],[0,0,0,1,0],[0,0,0,0,1]]},sepia:function(e){return[[.393+.607*(1-e),.769-.769*(1-e),.189-.189*(1-e),0,0],[.349-.349*(1-e),.686+.314*(1-e),.168-.168*(1-e),0,0],[.272-.272*(1-e),.534-.534*(1-e),.131+.869*(1-e),0,0],[0,0,0,1,0],[0,0,0,0,1]]},grayscale:function(e){return[[.2126+.7874*(1-e),.7152-.7152*(1-e),.0722-.0722*(1-e),0,0],[.2126-.2126*(1-e),.7152+.2848*(1-e),.0722-.0722*(1-e),0,0],[.2126-.2126*(1-e),.7152-.7152*(1-e),.0722+.9278*(1-e),0,0],[0,0,0,1,0],[0,0,0,0,1]]}};function He(e){return e[1===e.mode?"darkSchemeBackgroundColor":"lightSchemeBackgroundColor"]}function $e(e){return e[1===e.mode?"darkSchemeTextColor":"lightSchemeTextColor"]}var ze=new Map;var Qe=["r","g","b","a"],Ke=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];function Xe(e,t,r,n,a){var o;ze.has(r)?o=ze.get(r):(o=new Map,ze.set(r,o));var u=function(e,t){var r="";return Qe.forEach((function(t){r+="".concat(e[t],";")})),Ke.forEach((function(e){r+="".concat(t[e],";")})),r}(e,t);if(o.has(u))return o.get(u);var c=Ce(r(xe(e),null==n?null:Ee(n),null==a?null:Ee(a))),s=c.r,l=c.g,d=c.b,f=c.a,h=i(function(e,t){var r=i(e,3),n=Ue(t,[[r[0]/255],[r[1]/255],[r[2]/255],[1],[1]]);return[0,1,2].map((function(e){return qe(Math.round(255*n[e][0]),0,255)}))}([s,l,d],We(t)),3),p=h[0],v=h[1],m=h[2],g=1===f?function(e){var t=e.r,r=e.g,n=e.b,a=e.a;return"#".concat((null!=a&&a<1?[t,r,n,Math.round(255*a)]:[t,r,n]).map((function(e){return"".concat(e<16?"0":"").concat(e.toString(16))})).join(""))}({r:p,g:v,b:m}):function(e){var t=e.r,r=e.g,n=e.b,a=e.a;return null!=a&&a<1?"rgba(".concat(Te(t),", ").concat(Te(r),", ").concat(Te(n),", ").concat(Te(a,2),")"):"rgb(".concat(Te(t),", ").concat(Te(r),", ").concat(Te(n),")")}({r:p,g:v,b:m,a:f});return o.set(u,g),g}function Ye(e){return e}function Ze(e,t){var r=He(t);return Xe(e,t,Je,$e(t),r)}function Je(e,t,r){var n,a=e.h,o=e.s,i=e.l,u=e.a,c=i<.5;c?n=i<.2||o<.12:n=o<.24||i>.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:Be(i,0,1,t.l,r.l),a:u}}function et(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=Be(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=Be(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?Be(r,120,180,135,180):Be(r,60,120,60,105));return s>40&&s<80&&(c*=.75),{h:s,s:n,l:c,a:o}}function tt(e,t){if(0===t.mode)return Ze(e,t);var n=He(t);return Xe(e,r(r({},t),{mode:0}),et,n)}var rt,nt=.55;function at(e){return Be(e,205,245,205,220)}function ot(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=Be(a,.5,1,nt,t.l);if(i)return{h:t.h,s:t.s,l:c,a:o};var s=r;return u&&(s=at(r)),{h:s,s:n,l:c,a:o}}if(i)return{h:t.h,s:t.s,l:Be(a,0,.5,t.l,nt),a:o};var l,d=r;return u?(d=at(r),l=Be(a,0,.5,t.l,Math.min(1,.6000000000000001))):l=Be(a,0,.5,t.l,nt),{h:d,s:n,l:l,a:o}}function it(e,t){if(0===t.mode)return Ze(e,t);var n=$e(t);return Xe(e,r(r({},t),{mode:0}),ot,n)}function ut(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:Be(o,0,1,.5,.2),a:i}}function ct(e,t){if(0===t.mode)return Ze(e,t);var n=$e(t),a=He(t);return Xe(e,r(r({},t),{mode:0}),ut,n,a)}function st(e,t){return tt(e,t)}function lt(e){var t=[];return e.mode===rt.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"}(rt||(rt={}));var dt=0,ft=new Map,ht=new Map;function pt(e){return n(this,void 0,void 0,(function(){return a(this,(function(r){return[2,new Promise((function(r,n){var a=++dt;ft.set(a,r),ht.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=ft.get(o),u=ht.get(o);ft.delete(o),ht.delete(o),a?u&&u(a):i&&i(n)}}));var vt=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 mt(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,gt(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,bt(t)];case 5:return u=a.sent(),vt.addToQueue((function(){o(r({src:e,dataURL:t,width:u.naturalWidth,height:u.naturalHeight},function(e){yt||(t=_t,r=_t,(yt=document.createElement("canvas")).width=t,yt.height=r,(St=yt.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>kt)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var o=n*a,i=Math.min(1,Math.sqrt(_t/o)),u=Math.ceil(n*i),c=Math.ceil(a*i);St.clearRect(0,0,u,c),St.drawImage(e,0,0,n,a,0,0,u,c);var s,l,d,f,h,p,v,m=St.getImageData(0,0,u,c).data,g=.05,b=.4,y=.7,S=0,_=0,k=0;for(d=0;d<c;d++)for(l=0;l<u;l++)f=m[(s=4*(d*u+l))+0],h=m[s+1],p=m[s+2],m[s+3]/255<g?S++:((v=je(f,h,p))<b&&_++,v>y&&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 gt(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,pt({url:e,responseType:"data-url"})]}}))}))}function bt(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 yt,St,_t=1024;var kt=5242880;function wt(e,t){var r=e.dataURL,n=e.width,a=e.height,o=We(t).slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" "),i=['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'.concat(n,'" height="').concat(a,'">'),"<defs>",'<filter id="darkreader-image-filter">','<feColorMatrix type="matrix" values="'.concat(o,'" />'),"</filter>","</defs>",'<image width="'.concat(n,'" height="').concat(a,'" filter="url(#darkreader-image-filter)" xlink:href="').concat(r,'" />'),"</svg>"].join("");return"data:image/svg+xml;base64,".concat(btoa(i))}function Et(){vt&&vt.stopQueue(),yt=null,St=null}var Ct="gradient".length,xt="conic-",Tt=xt.length,Rt="radial-",Vt="linear-";function At(e,t){return Boolean(e&&e.getPropertyPriority(t))}function Mt(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:At(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:At(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(It.has(t.toLowerCase()))return t;var n=we(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 it(n,e)}:function(e){return tt(n,e)};if(e.includes("border")||e.includes("outline"))return function(e){return ct(n,e)};return function(e){return it(n,e)}}(e,t,r);if(i)return{property:e,value:i,important:At(r.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(i=jt(t,r,a,o))return{property:e,value:i,important:At(r.style,e),sourceValue:t}}else if(e.includes("shadow")){i=function(e){var t=Bt(e);if(!t)return null;return function(e){return t(e).result}}(t);if(i)return{property:e,value:i,important:At(r.style,e),sourceValue:t}}}return null}function Lt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(", ")}function Dt(e,t,n){var a=[];t||(a.push("html {"),a.push("    background-color: ".concat(tt({r:255,g:255,b:255},e)," !important;")),a.push("}")),_&&(a.push("html {"),a.push("    color-scheme: ".concat(1===e.mode?"dark":"dark light"," !important;")),a.push("}"));var o=Lt(t?"":"html, body",n?"input, textarea, select, button, dialog":"");return o&&(a.push("".concat(o," {")),a.push("    background-color: ".concat(tt({r:255,g:255,b:255},e),";")),a.push("}")),a.push("".concat(Lt("html, body",n?"input, textarea, select, button":"")," {")),a.push("    border-color: ".concat(ct({r:76,g:76,b:76},e),";")),a.push("    color: ".concat(it({r:0,g:0,b:0},e),";")),a.push("}"),a.push("a {"),a.push("    color: ".concat(it({r:0,g:64,b:255},e),";")),a.push("}"),a.push("table {"),a.push("    border-color: ".concat(ct({r:128,g:128,b:128},e),";")),a.push("}"),a.push("::placeholder {"),a.push("    color: ".concat(it({r:169,g:169,b:169},e),";")),a.push("}"),a.push("input:-webkit-autofill,"),a.push("textarea:-webkit-autofill,"),a.push("select:-webkit-autofill {"),a.push("    background-color: ".concat(tt({r:250,g:255,b:189},e)," !important;")),a.push("    color: ".concat(it({r:0,g:0,b:0},e)," !important;")),a.push("}"),e.scrollbarColor&&a.push(function(e){var t,n,a,o,i,u,c=[];if("auto"===e.scrollbarColor)t=tt({r:241,g:241,b:241},e),n=it({r:96,g:96,b:96},e),a=tt({r:176,g:176,b:176},e),o=tt({r:144,g:144,b:144},e),i=tt({r:96,g:96,b:96},e),u=tt({r:255,g:255,b:255},e);else{var s=xe(we(e.scrollbarColor)),l=s.l>.5,d=function(e){return r(r({},s),{l:qe(s.l+e,0,1)})},f=function(e){return r(r({},s),{l:qe(s.l-e,0,1)})};t=Re(f(.4)),n=Re(l?f(.4):d(.4)),a=Re(s),o=Re(d(.1)),i=Re(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=Ot(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 Ot(e){var t,n;if("auto"===e.selectionColor)t=tt({r:0,g:96,b:212},r(r({},e),{grayscale:0})),n=it({r:255,g:255,b:255},r(r({},e),{grayscale:0}));else{var a=xe(we(e.selectionColor));t=e.selectionColor,n=a.l<.5?"#FFF":"#000"}return{backgroundColorSelection:t,foregroundColorSelection:n}}function Pt(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(tt({r:255,g:255,b:255},e)," !important;")),n.push("    border-color: ".concat(ct({r:64,g:64,b:64},e)," !important;")),n.push("    color: ".concat(it({r:0,g:0,b:0},e)," !important;")),n.push("}"),n.join("\n")}var It=new Set(["inherit","transparent","initial","currentcolor","none","unset"]);var Nt=new Map,Ft=new Map;function jt(e,t,o,i){var u,c,s=this;try{var l=function(e){for(var t=[],r=0,n=xt.length,a=function(){var a;if([Vt,Rt,xt].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=Se(e,r+Ct),i=o.start,u=o.end,c=e.substring(i+1,u-1);n=u+1+Tt,t.push({typeGradient:a,match:c,offset:a.length+2,index:r-a.length+Ct,hasComma:!0})};-1!==(r=e.indexOf("gradient",n))&&"break"!==a(););return t.length&&(t[t.length-1].hasComma=!1),t}(e),d=ye(le,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=wt(e,r(r({},t),{sepia:qe(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=wt(e,t);n='url("'.concat(d,'")')}else if(0===t.mode&&o&&!u){"Applying filter to image ".concat(e.src);var f=wt(e,r(r({},t),{brightness:qe(t.brightness-10,5,200),sepia:qe(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;a<t.length;a++){var o=n(a);if("object"==typeof o)return o.value}return!1}(t.selectorText,o))return null;var u=fe(e),c=0===u.length,l=t.parentStyleSheet,d=l&&l.href?he(l.href):(null===(r=l.ownerNode)||void 0===r?void 0:r.baseURI)||location.origin;u=oe(d,u);var f='url("'.concat(u,'")');return function(e){return n(s,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return c?[2,"url('')"]:Nt.has(u)?(t=Nt.get(u),[3,7]):[3,1];case 1:return n.trys.push([1,6,,7]),Ft.has(u)?(r=Ft.get(u),[4,new Promise((function(e){return r.push(e)}))]):[3,3];case 2:return(t=n.sent())?[3,5]:[2,null];case 3:return Ft.set(u,[]),[4,mt(u)];case 4:t=n.sent(),Nt.set(u,t),Ft.get(u).forEach((function(e){return e(t)})),Ft.delete(u),n.label=5;case 5:return i()?[2,null]:[3,7];case 6:return n.sent(),Ft.has(u)&&(Ft.get(u).forEach((function(e){return e(null)})),Ft.delete(u)),[2,f];case 7:return[2,h(t,e)||f]}}))}))}}(l)):"gradient"===c&&p.push(function(e){var t=e.typeGradient,r=e.match,n=e.hasComma,a=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,o=ye(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?([^\(\), ]|( (?!calc)))*),?/g,r,1).map((function(e){var t=we(e=e.trim());if(t)return function(e){return st(t,e)};var r=e.lastIndexOf(" ");if(t=we(e.substring(0,r)))return function(n){return"".concat(st(t,n)," ").concat(e.substring(r+1))};var n=e.match(a);return n&&(t=we(n[3]))?function(e){return"".concat(n[1],"(").concat(n[2]?"".concat(n[2],", "):"").concat(st(t,e),")")}:function(){return e}}));return function(e){return"".concat(t,"(").concat(o.map((function(t){return t(e)})).join(", "),")").concat(n?", ":"")}}({match:l,index:d,typeGradient:g,hasComma:b,offset:y})),u===f.length-1&&p.push((function(){return e.substring(k)}))})),function(e){var t=p.filter(Boolean).map((function(t){return t(e)}));if(t.some((function(e){return e instanceof Promise})))return Promise.all(t).then((function(e){return e.filter(Boolean).join("")}));var r=t.join("");return r.endsWith(", initial")?r.slice(0,-9):r}}catch(e){return null}}function Bt(e){try{var t=0,r=ye(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,e,2),n=0,a=r.map((function(a,o){var i=t,u=e.indexOf(a,t),c=u+a.length;t=c;var s=we(a);return s?function(t){return"".concat(e.substring(i,u)).concat(function(e,t){return tt(e,t)}(s,t)).concat(o===r.length-1?e.substring(c):"")}:(n++,function(){return e.substring(i,c)})}));return function(e){var t=a.map((function(t){return t(e)})).join("");return{matchesLength:r.length,unparseableMatchesLength:n,result:t}}}catch(e){return null}}function qt(){ze.clear(),Nt.clear(),Et(),Ft.clear()}var Ut=new(function(){function e(){this.varTypes=new Map,this.rulesQueue=[],this.definedVars=new Set,this.varRefs=new Map,this.unknownColorVars=new Set,this.unknownBgVars=new Set,this.undefinedVars=new Set,this.initialVarTypes=new Map,this.changedTypeVars=new Set,this.typeChangeSubscriptions=new Map,this.unstableVarValues=new Map}return e.prototype.clear=function(){this.varTypes.clear(),this.rulesQueue.splice(0),this.definedVars.clear(),this.varRefs.clear(),this.unknownColorVars.clear(),this.unknownBgVars.clear(),this.undefinedVars.clear(),this.initialVarTypes.clear(),this.changedTypeVars.clear(),this.typeChangeSubscriptions.clear(),this.unstableVarValues.clear()},e.prototype.isVarType=function(e,t){return this.varTypes.has(e)&&(this.varTypes.get(e)&t)>0},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(Zt(a))if(Jt(a)){var l=or(a,t.unstableVarValues);l||(l=1===o?"#ffffff":"#000000"),c=u(l,r)}else c=$t(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,zt,rr),c(2,Qt,nr),c(4,Kt,ar),t.isVarType(n,8)){var s=Xt(n),l=a;Zt(a)&&(l=$t(a,(function(e){return zt(e)}),(function(e){return rr(e,r)})));var d=jt(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="color"===e||"caret-color"===e;return function(e){var o=or(t,r.unstableVarValues);return o||(o=n?"#ffffff":"#000000"),(n?rr:a?nr:ar)(o,e)}}return"background-color"===e?function(e){return $t(t,(function(e){return zt(e)}),(function(t){return rr(t,e)}))}:"color"===e||"caret-color"===e?function(e){return $t(t,(function(e){return Qt(e)}),(function(t){return nr(t,e)}))}:"background"===e||"background-image"===e||"box-shadow"===e?function(n){var a=new Set,o=function(){var o=$t(t,(function(e){return r.isVarType(e,1)?zt(e):r.isVarType(e,8)?Xt(e):(a.add(e),e)}),(function(e){return rr(e,n)}));if("box-shadow"===e){var i=Bt(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 $t(t,(function(e){return Kt(e)}),(function(t){return ar(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){ie(e,(function(e){e.style&&se(e.style,(function(e,r){Yt(e)&&t.inspectVariable(e,r),Zt(r)&&t.inspectVarDependant(e,r)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;se(document.documentElement.style,(function(t,r){Yt(t)&&e.inspectVariable(t,r)}))},e.prototype.inspectVariable=function(e,t){(this.unstableVarValues.set(e,t),Zt(t)&&Jt(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e))||(this.definedVars.add(e),we(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;se(document.documentElement.style,(function(t,r){Zt(r)&&e.inspectVarDependant(t,r)}))},e.prototype.inspectVarDependant=function(e,t){var r=this;Yt(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)})):"color"===e||"caret-color"===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){$t(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;se(document.documentElement.style,(function(e,r){Yt(e)&&(a.isVarType(e,1)&&c.set(zt(e),rr(r,t)),a.isVarType(e,2)&&c.set(Qt(e),nr(r,t)),a.isVarType(e,4)&&c.set(Kt(e),ar(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 Wt(e,t){void 0===t&&(t=0);var r=e.indexOf("var(",t);if(r>=0){var n=Se(e,r+3);return n?{start:r,end:n.end}:null}}function Gt(e,t){var r=function(e){for(var t,r=[],n=0;t=Wt(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<n;u++){i.push(o[u]);var c=r[u].end,s=u<n-1?r[u+1].start:a;i.push(e.substring(c,s))}return i.join("")}function Ht(e){var t,r,n=e.indexOf(",");return n>=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 $t(e,t,r){return Gt(e,(function(e){var n,a=Ht(e),o=a.name,i=a.fallback,u=t(o);return i?(n=Zt(i)?$t(i,t,r):r?r(i):i,"var(".concat(u,", ").concat(n,")")):"var(".concat(u,")")}))}function zt(e){return"--darkreader-bg".concat(e)}function Qt(e){return"--darkreader-text".concat(e)}function Kt(e){return"--darkreader-border".concat(e)}function Xt(e){return"--darkreader-bgimg".concat(e)}function Yt(e){return e.startsWith("--")}function Zt(e){return e.includes("var(")}function Jt(e){return e.match(/^\s*(rgb|hsl)a?\(/)}var er=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function tr(e,t,r){var n=function(e){if(er.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=we(o);if(i){var u=r(i,t);if(a){var c=we(u);return c?"".concat(c.r,", ").concat(c.g,", ").concat(c.b):u}return u}return o}function rr(e,t){return tr(e,t,tt)}function nr(e,t){return tr(e,t,it)}function ar(e,t){return tr(e,t,ct)}function or(e,t,r){void 0===r&&(r=new Set);var n=!1,a=Gt(e,(function(e){var a=Ht(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=Zt(u)?or(u,t,r):u),c||(n=!0,null)}));return n?null:a}var ir={"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"}},ur=Object.values(ir),cr={};ur.forEach((function(e){var t=e.cssProp,r=e.customProp;return cr[r]=t}));var sr=["style","fill","stop-color","stroke","bgcolor","color"],lr=sr.map((function(e){return"[".concat(e,"]")})).join(", ");function dr(){return ur.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 fr=new Map,hr=new Map;function pr(e,t,r){fr.has(e)&&(fr.get(e).disconnect(),hr.get(e).disconnect());var n=new WeakSet;function a(e){(function(e){var t=[];return e instanceof Element&&e.matches(lr)&&t.push(e),(e instanceof Element||b&&e instanceof ShadowRoot||e instanceof Document)&&F(t,e.querySelectorAll(lr)),t})(e).forEach((function(e){n.has(e)||(n.add(e),t(e))})),W(e,(function(a){n.has(e)||(n.add(e),r(a.shadowRoot),pr(a.shadowRoot,t,r))}))}var o=te(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return a(e)}))},onHugeMutations:function(){a(e)}});fr.set(e,o);var c=0,s=null,l=B({seconds:10}),d=B({seconds:2}),f=[],h=null,p=j((function(e){e.forEach((function(e){sr.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-s<l)return h=setTimeout((function(){s=null,c=0,h=null;var e=f;f=[],p(e)}),d),void f.push.apply(f,u([],i(e),!1));s=t,c=1}p(e)}}));v.observe(e,{attributes:!0,attributeFilter:sr.concat(ur.map((function(e){return e.dataAttr}))),subtree:!0}),hr.set(e,v)}var vr=new WeakMap,mr=["brightness","contrast","grayscale","sepia","mode"];function gr(e,t){return sr.map((function(t){return"".concat(t,'="').concat(e.getAttribute(t),'"')})).concat(mr.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))).join(" ")}function br(e,t,r,n){if(gr(e,t)!==vr.get(e)){var a=new Set(Object.keys(ir));if(r.length>0&&function(e,t){for(var r=0,n=t.length;r<n;r++){var a=t[r];if(e.matches(a))return!0}return!1}(e,r))a.forEach((function(t){e.removeAttribute(ir[t].dataAttr)}));else{if(e.hasAttribute("bgcolor"))((u=e.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||u.match(/^[0-9a-f]{6}$/i))&&(u="#".concat(u)),c("background-color","background-color",u);if(e.hasAttribute("color")&&"mask-icon"!==e.rel)((u=e.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||u.match(/^[0-9a-f]{6}$/i))&&(u="#".concat(u)),c("color","color",u);if(e instanceof SVGElement){if(e.hasAttribute("fill")){var o=e.getAttribute("fill");if("none"!==o)if(e instanceof SVGTextElement)c("fill","color",o);else{var i=function(){var t=e.getBoundingClientRect(),r=t.width,n=t.height;c("fill",r>32||n>32?"background-color":"color",o)};Q()?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&&se(e.style,(function(t,r){if("background-image"!==t||!r.includes("url"))if(ir.hasOwnProperty(t)||t.startsWith("--")&&!cr[t])c(t,t,r);else{var n=cr[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")),N(a,(function(t){e.removeAttribute(ir[t].dataAttr)})),vr.set(e,gr(e,t))}}function c(r,o,i){var u=r.startsWith("--"),c=u?{}:ir[r],s=c.customProp,l=c.dataAttr,d=Mt(o,i,{style:e.style},Ut,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 yr="theme-color",Sr='meta[name="'.concat(yr,'"]'),_r=null,kr=null;function wr(e,t){var r=we(_r=_r||e.content);r&&(e.content=tt(r,t))}var Er=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];var Cr=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 xr(){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 Er.forEach((function(r){t+="".concat(r,":").concat(e[r],";")})),t}(d),y=b!==a;o&&(c=!0);var S=[];if(ie(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&&se(e.style,(function(t,r){var n=Mt(t,r,e,Ut,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,Cr.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 Tr(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 Rr(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=!0),Tr(e)?t.push(e):(e instanceof Element||b&&e instanceof ShadowRoot||e===document)&&(N(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(function(e){return Rr(e,t,!1)})),r&&W(e,(function(e){return Rr(e.shadowRoot,t,!1)}))),t}var Vr=new WeakSet,Ar=new WeakSet,Mr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Mr=!0}));var Lr=0,Dr=new Map;function Or(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")&&!Ar.has(e)}))||null,d=c.find((function(e){return e.matches(".darkreader--sync")&&!Vr.has(e)}))||null,h=null,v=null,m=!1,g=!0,b=xr(),y=new MutationObserver((function(){r()})),S={attributes:!0,childList:!0,subtree:!0,characterData:!0};function _(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(de)}function k(e,t){var r=!1;if(e){var n=void 0;e:for(var a=0,o=e.length;a<o;a++)if((n=e[a]).href){if(!t){r=!0;break e}if(n.href.startsWith("http")&&!n.href.startsWith(location.origin)){r=!0;break e}}}return r}function w(){if(l)return l.sheet.cssRules;if(_())return null;var t=M();return e instanceof HTMLLinkElement&&!function(e){if(e.startsWith("data:"))return!0;var t=ae(e);return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port&&t.pathname===location.pathname}(e.href)&&k(t,!1)||k(t,!0)?null:t}function E(){l?(e.nextSibling!==l&&e.parentNode.insertBefore(l,e.nextSibling),l.nextSibling!==d&&e.parentNode.insertBefore(d,l.nextSibling)):e.nextSibling!==d&&e.parentNode.insertBefore(d,e.nextSibling)}var C=!1,x=!1,T=++Lr;function R(){return n(this,void 0,void 0,(function(){var t,r,n,o,u,c,s;return a(this,(function(a){switch(a.label){case 0:if(!(e instanceof HTMLLinkElement))return[3,7];if(n=i(A(),2),o=n[0],u=n[1],!(!o&&!u&&!p||p&&!e.sheet||(d=u,d&&d.message&&d.message.includes("loading"))))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,Pr(e,T)];case 2:return a.sent(),[3,4];case 3:return a.sent(),x=!0,[3,4];case 4:if(m)return[2,null];s=i(A(),2),o=s[0],u=s[1],a.label=5;case 5:return o&&!k(o,!1)?[2,o]:[4,Ir(e.href)];case 6:return t=a.sent(),r=he(e.href),m?[2,null]:[3,8];case 7:if(!_())return[2,null];t=e.textContent.trim(),r=he(location.href),a.label=8;case 8:if(!t)return[3,13];a.label=9;case 9:return a.trys.push([9,11,,12]),[4,Nr(t,r)];case 10:return c=a.sent(),l=function(e,t){if(!t)return null;var r=document.createElement("style");return r.classList.add("darkreader"),r.classList.add("darkreader--cors"),r.media="screen",r.textContent=t,e.parentNode.insertBefore(r,e.nextSibling),r.sheet.disabled=!0,Ar.add(r),r}(e,c),[3,12];case 11:return a.sent(),[3,12];case 12:if(l)return h=U(l,"prev-sibling"),[2,l.sheet.cssRules];a.label=13;case 13:return[2,null]}var d}))}))}var V=!1;function A(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(e){return[null,e]}}function M(){var e=i(A(),2),t=e[0];return e[1]?null:t}function L(){e.addEventListener("__darkreader__updateSheet",F),f||Mr&&e.sheet||function(){D=P(),I();var t=function(){P()!==D&&(D=P(),r()),Mr&&e.sheet?I():O=requestAnimationFrame(t)};t()}()}var D=null,O=null;function P(){var e=M();return e?e.length:null}function I(){cancelAnimationFrame(O)}var N=!1;function F(){function e(){N=!1,m||r()}Mr=!0,I(),N||(N=!0,"function"==typeof queueMicrotask?queueMicrotask(e):requestAnimationFrame(e))}function j(){e.removeEventListener("__darkreader__updateSheet",F),I()}function B(){y.disconnect(),m=!0,h&&h.stop(),v&&v.stop(),j()}var W=0;return{details:function(e){var t=w();return t?{rules:t}:(e.secondRound||C||x||(C=!0,o(),R().then((function(e){C=!1,u(),e&&r()})).catch((function(e){C=!1,u()}))),null)},render:function(t,n){var a=w();function o(){return d||((d=e instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style")).classList.add("darkreader"),d.classList.add("darkreader--sync"),d.media="screen",e.title&&(d.title=e.title),Vr.add(d)),v&&v.stop(),E(),null==d.sheet&&(d.textContent=""),function(e){for(var t=e.cssRules.length-1;t>=0;t--)e.deleteRule(t)}(d.sheet),v?v.run():v=U(d,"prev-sibling",(function(){V=!0,i()})),d.sheet}function i(){var e=V;V=!1,b.modifySheet({prepareSheet:o,sourceCSSRules:a,theme:t,ignoreImageAnalysis:n,force:e,isAsyncCancelled:function(){return m}}),g=0===d.sheet.cssRules.length,b.shouldRebuildStyle()&&X((function(){return r()}))}a&&(m=!1,i())},pause:B,destroy:function(){if(B(),q(l),q(d),u(),Dr.has(T)){var e=Dr.get(T);Dr.delete(T),e&&e()}},watch:function(){y.observe(e,S),e instanceof HTMLStyleElement&&L()},restore:function(){d&&(++W>10||(E(),h&&h.skip(),v&&v.skip(),g||(V=!0,r())))}}}function Pr(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),Dr.delete(t)},o=function(){a(),r()},i=function(){a(),n("Linkelement ".concat(t," couldn't be loaded. ").concat(e.href))};Dr.set(t,(function(){a(),n()})),e.addEventListener("load",o),e.addEventListener("error",i),e.href||i()}))]}))}))}function Ir(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,pt({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})]}}))}))}function Nr(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(le,(function(e){var r=fe(e);try{return'url("'.concat(oe(t,r),'")')}catch(t){return e}}))}(e=function(e){return e.replace(ve,"")}(e=e.replace(pe,"")),t),n=ye(de,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=fe(c.substring(7).trim().replace(/;$/,"").replace(/screen$/,"")),l=oe(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,Ir(l)];case 4:return d=a.sent(),r.set(l,d),[4,Nr(d,he(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 Fr,jr,Br=[],qr=new Map;function Ur(e){S&&N(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var r=e.getAttribute("is");if(!r)return;t=r}qr.has(t)||(qr.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(Wr)Gr.set(e,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var r=function(){var n=qr.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?t():requestAnimationFrame(r))};requestAnimationFrame(r)}}))]}))}))}(t).then((function(){if(jr){var e=qr.get(t);qr.delete(t),jr(Array.from(e))}}))),qr.get(t).add(e)}))}var Wr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Wr=!0}));var Gr=new Map;function Hr(e){(Wr=!0,Gr.has(e.detail.tag))&&Gr.get(e.detail.tag)()}function $r(e,t,r){zr();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 Rr(e).forEach((function(e){return a.add(e)}))})),n.forEach((function(e){return Rr(e).forEach((function(e){return o.add(e)}))})),r.forEach((function(e){return Rr(e).forEach((function(e){return i.add(e)}))})),u({createdStyles:a,removedStyles:o,movedStyles:i}),t.forEach((function(e){W(e,f),Ur(e)}))}function s(e){var t=new Set(Rr(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}),W(e,f),Ur(e)}function l(e){var r=new Set,n=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(Tr(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=te(e,{onMinorMutations:c,onHugeMutations:s}),r=new MutationObserver(l);r.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media","href"],subtree:!0}),Br.push(t,r),Fr.add(e)}function f(e){var t=e.shadowRoot;null==t||Fr.has(t)||(d(t),r(t))}e.forEach(i),d(document),W(document.documentElement,f),jr=function(e){var r=[];e.forEach((function(e){return F(r,Rr(e.shadowRoot))})),t({created:r,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(f(e),W(t,f),Ur(t))}))},document.addEventListener("__darkreader__isDefined",Hr),Ur(document)}function zr(){Br.forEach((function(e){return e.disconnect()})),Br.splice(0,Br.length),Fr=new WeakSet,jr=null,qr.clear(),document.removeEventListener("__darkreader__isDefined",Hr)}var Qr=new WeakMap,Kr=new WeakSet;function Xr(e){var t=!1;return{render:function(r,n){e.adoptedStyleSheets.forEach((function(a){if(!Kr.has(a)){var o=a.rules,c=new CSSStyleSheet;xr().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),Qr.set(a,c),Kr.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(Kr.has(e)){var t=r.indexOf(e);t>=0&&r.splice(t,1),Qr.delete(e),Kr.delete(e)}})),e.adoptedStyleSheets=r}}}function Yr(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 Zr=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("")}(),Jr=new Map,en=[],tn=null,rn=null,nn=null,an=null,on=null;function un(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 cn=new Map;function sn(e,t){cn.has(t)&&cn.get(t).stop(),cn.set(t,U(e,"parent"))}function ln(){var e=un("darkreader--fallback",document);e.textContent=Pt(tn,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),sn(e,"fallback");var t=un("darkreader--user-agent");t.textContent=Dt(tn,nn,tn.styleSystemControls),document.head.insertBefore(t,e.nextSibling),sn(t,"user-agent");var n,a,o=un("darkreader--text");tn.useFont||tn.textStroke>0?o.textContent=(n=tn,(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),sn(o,"text");var i=un("darkreader--invert");rn&&Array.isArray(rn.invert)&&rn.invert.length>0?i.textContent=["".concat(rn.invert.join(", ")," {"),"    filter: ".concat(lt(r(r({},tn),{contrast:0===tn.mode?tn.contrast:qe(tn.contrast-10,0,100)}))," !important;"),"}"].join("\n"):i.textContent="",document.head.insertBefore(i,o.nextSibling),sn(i,"invert");var u=un("darkreader--inline");u.textContent=dr(),document.head.insertBefore(u,i.nextSibling),sn(u,"inline");var c=un("darkreader--override");c.textContent=rn&&rn.css?hn(rn.css):"",document.head.appendChild(c),sn(c,"override");var s=un("darkreader--variables"),l=Ot(tn),d=tn.darkSchemeBackgroundColor,f=tn.darkSchemeTextColor,h=tn.lightSchemeBackgroundColor,p=tn.lightSchemeTextColor,v=tn.mode,m=0===v?h:d,g=0===v?p:f;m=tt(we(m),tn),g=it(we(g),tn),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),sn(s,"variables");var b=un("darkreader--root-vars");document.head.insertBefore(b,s.nextSibling);var y=!(rn&&rn.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(Yr,")(").concat(y,")")),document.head.insertBefore(S,b.nextSibling),S.remove()}var dn=new Set;function fn(e){var t=un("darkreader--inline",e);t.textContent=dr(),e.insertBefore(t,e.firstChild);var n=un("darkreader--override",e);n.textContent=rn&&rn.css?hn(rn.css):"",e.insertBefore(n,t.nextSibling);var a=un("darkreader--invert",e);rn&&Array.isArray(rn.invert)&&rn.invert.length>0?a.textContent=["".concat(rn.invert.join(", ")," {"),"    filter: ".concat(lt(r(r({},tn),{contrast:0===tn.mode?tn.contrast:qe(tn.contrast-10,0,100)}))," !important;"),"}"].join("\n"):a.textContent="",e.insertBefore(a,n.nextSibling),dn.add(e)}function hn(e){return e.replace(/\${(.+?)}/g,(function(e,t){var r=we(t);return r?Xe(r,tn,Ye):t}))}function pn(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}var vn=0,mn=new Set;function gn(e){var t=++vn;var r=Or(e,{update:function(){var e=r.details({secondRound:!0});e&&(Ut.addRulesForMatching(e.rules),Ut.matchVariablesAndDependants(),r.render(tn,an))},loadingStart:function(){if(!G()||!En){mn.add(t),"Current amount of styles loading: ".concat(mn.size);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=Pt(tn,{strict:!1}))}},loadingEnd:function(){mn.delete(t),"Removed loadingStyle ".concat(t,", now awaiting: ").concat(mn.size),0===mn.size&&G()&&pn()}});return Jr.set(e,r),r}function bn(e){var t=Jr.get(e);t&&(t.destroy(),Jr.delete(e))}var yn=j((function(e){Jr.forEach((function(e){return e.render(tn,an)})),en.forEach((function(e){return e.render(tn,an)})),e&&e()})),Sn=function(){yn.cancel()};function _n(){0!==mn.size||pn()}var kn,wn=null,En=!document.hidden;function Cn(){document.removeEventListener("visibilitychange",wn),wn=null}function xn(){function e(){var e,t;!function(){Sn();var e=Rr(document).filter((function(e){return!Jr.has(e)})).map((function(e){return gn(e)}));e.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Ut.addRulesForMatching(e.rules)})),Ut.matchVariablesAndDependants(),Ut.setOnRootVariableChange((function(){Ut.putRootVars(document.head.querySelector(".darkreader--root-vars"),tn)})),Ut.putRootVars(document.head.querySelector(".darkreader--root-vars"),tn),Jr.forEach((function(e){return e.render(tn,an)})),0===mn.size&&pn(),e.forEach((function(e){return e.watch()}));var t=function(e){for(var t=[],r=0,n=e.length;r<n;r++)t.push(e[r]);return t}(document.querySelectorAll(lr));W(document.documentElement,(function(e){fn(e.shadowRoot);var r=e.shadowRoot.querySelectorAll(lr);r.length>0&&F(t,r)})),t.forEach((function(e){return br(e,tn,on,an)})),Tn(document)}(),$r(Array.from(Jr.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!Jr.has(e)})),u=a.filter((function(e){return Jr.has(e)}));o.forEach((function(e){return bn(e)}));var c=i.map((function(e){return gn(e)}));c.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Ut.addRulesForMatching(e.rules)})),Ut.matchVariablesAndDependants(),c.forEach((function(e){return e.render(tn,an)})),c.forEach((function(e){return e.watch()})),u.forEach((function(e){return Jr.get(e).restore()}))}),(function(e){fn(e),Tn(e)})),e=function(e){br(e,tn,on,an),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")&&(Ut.matchVariablesAndDependants(),Ut.putRootVars(document.head.querySelector(".darkreader--root-vars"),tn))},t=function(e){fn(e);var t=e.querySelectorAll(lr);t.length>0&&N(t,(function(e){return br(e,tn,on,an)}))},pr(document,e,t),W(document.documentElement,(function(r){pr(r.shadowRoot,e,t)})),$(_n)}var t,r,n,a;ln(),document.hidden&&!tn.immediateModify?(t=e,r=Boolean(wn),wn=function(){document.hidden||(Cn(),t(),En=!0)},r||document.addEventListener("visibilitychange",wn)):e(),n=tn,(a=document.querySelector(Sr))?wr(a,n):(kr&&kr.disconnect(),(kr=new MutationObserver((function(e){e:for(var t=0;t<e.length;t++)for(var r=e[t].addedNodes,a=0;a<r.length;a++){var o=r[a];if(o instanceof HTMLMetaElement&&o.name===yr){kr.disconnect(),kr=null,wr(o,n);break e}}}))).observe(document.head,{childList:!0}))}function Tn(e){try{if(Array.isArray(e.adoptedStyleSheets)&&e.adoptedStyleSheets.length>0){var t=Xr(e);en.push(t),t.render(tn,an)}}catch(e){}}function Rn(){Jr.forEach((function(e){return e.pause()})),N(cn.values(),(function(e){return e.stop()})),cn.clear(),zr(),fr.forEach((function(e){return e.disconnect()})),hr.forEach((function(e){return e.disconnect()})),fr.clear(),hr.clear(),z(_n),K.clear()}function Vn(){if(document.querySelector('meta[name="darkreader-lock"]'))return!0;var e,t=document.querySelector('meta[name="darkreader"]');return t?t.content!==Zr:((e=document.createElement("meta")).name="darkreader",e.content=Zr,document.head.appendChild(e),(kn=new MutationObserver((function(){document.querySelector('meta[name="darkreader-lock"]')&&(kn.disconnect(),Mn())}))).observe(document.head,{childList:!0,subtree:!0}),!1)}function An(e,t,r){if(tn=e,(rn=t)?(an=Array.isArray(rn.ignoreImageAnalysis)?rn.ignoreImageAnalysis:[],on=Array.isArray(rn.ignoreInlineStyle)?rn.ignoreInlineStyle:[]):(an=[],on=[]),tn.immediateModify&&(G=function(){return!0}),nn=r,document.head){if(Vn())return;document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",tn.mode?"dark":"dimmed"),xn()}else{if(!h){var n=un("darkreader--fallback");document.documentElement.appendChild(n),n.textContent=Pt(tn,{strict:!0})}var a=new MutationObserver((function(){if(document.head){if(a.disconnect(),Vn())return void Mn();xn()}}));a.observe(document,{childList:!0,subtree:!0})}}function Mn(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),Ut.clear(),re.clear(),Cn(),Sn(),Rn(),qt(),_e.clear(),ke.clear(),q(document.querySelector(".darkreader--fallback")),document.head&&(!function(){kr&&(kr.disconnect(),kr=null);var e=document.querySelector(Sr);e&&_r&&(e.content=_r)}(),q(document.head.querySelector(".darkreader--user-agent")),q(document.head.querySelector(".darkreader--text")),q(document.head.querySelector(".darkreader--invert")),q(document.head.querySelector(".darkreader--inline")),q(document.head.querySelector(".darkreader--override")),q(document.head.querySelector(".darkreader--variables")),q(document.head.querySelector(".darkreader--root-vars")),q(document.head.querySelector('meta[name="darkreader"]')),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),q(document.head.querySelector(".darkreader--proxy"))),dn.forEach((function(e){q(e.querySelector(".darkreader--inline")),q(e.querySelector(".darkreader--override"))})),dn.clear(),N(Jr.keys(),(function(e){return bn(e)})),mn.clear(),Dr.clear(),N(document.querySelectorAll(".darkreader"),q),en.forEach((function(e){e.destroy()})),en.splice(0),kn&&kn.disconnect()}var Ln=/url\(\"(blob\:.*?)\"\)/g;function Dn(e){return n(this,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return t=[],ye(Ln,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(Ln,(function(){return'url("'.concat(r.shift(),'")')}))]}}))}))}function On(){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){N(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;u<c;u++){var s="".concat(a[u],"\n");s.includes("{")?i.push(r(o++)+t(s)):s.includes("}")?i.push(r(--o)+t(s)):i.push(r(o)+t(s))}return i.join("").trim()}(r.join("\n")),t.push("/* Modified CSS */"),i=(o=t).push,[4,Dn(n)]):[3,2];case 1:i.apply(o,[a.sent()]),t.push(""),a.label=2;case 2:return e(".darkreader--override","Override Style"),[2,t.join("\n")]}}))}))}var Pn=!1,In=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function Nn(e,t){void 0===e&&(e={}),void 0===t&&(t=null);var n=r(r({},I),e);if(n.engine!==D)throw new Error("Theme engine is not supported.");An(n,t,In),Pn=!0}function Fn(){Mn(),Pn=!1}var jn=matchMedia("(prefers-color-scheme: dark)"),Bn={themeOptions:null,fixes:null};function qn(){jn.matches?Nn(Bn.themeOptions,Bn.fixes):Fn()}var Un=function(e){x=e||C};e.auto=function(e,t){void 0===e&&(e={}),void 0===t&&(t=null),e?(Bn={themeOptions:e,fixes:t},qn(),y?jn.addEventListener("change",qn):jn.addListener(qn)):(y?jn.removeEventListener("change",qn):jn.removeListener(qn),Fn())},e.disable=Fn,e.enable=Nn,e.exportGeneratedCSS=function(){return n(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,On()];case 1:return[2,e.sent()]}}))}))},e.isEnabled=function(){return Pn},e.setFetchMethod=Un,Object.defineProperty(e,"__esModule",{value:!0})}));

/* Possibly load the contents of a darkreader override css page and have darkreader abide by it */
/*fetch("https://robloxgalaxy.wiki/wiki/MediaWiki:Dark.css?action=raw&ctype=text/css")
.then(function(response){return response.text();})
.then( function ( data ) {
	console.log(data)
} );*/

DarkReader.setFetchMethod(window.fetch);
DarkReader.enable({
}, {
	ignoreInlineStyle: ['.mediaContainer', '.mediaContainer *', '.TemplateRevision', '.TemplateRevision *', '#homeButtonNav', '#homeButtonNav *', '.mw-wiki-logo', 'img', '#siteNotice *', '.sitenoticestyling'],
	css: `
		/*
		.sitenoticestyling {
			border-color: rgb(48, 52, 54) !important;
			border: 2px solid rgb(48, 52, 54) !important;
		}*/
		
		body {
			background-color: rgb(27, 30, 31) !important;
		}
		
		.mw-page-container {
			background-color: rgb(24, 26, 27) !important;
		}
		
		.mw-sidebar {
			background-color: rgb(27, 30, 31) !important;
		}
		
		.sidebar-toc {
			background-color: rgb(24, 26, 27) !important;
		}
		
		.sidebar-toc::after {
			background-image: none !important;
		}
		
		.mw-logo-container {
			-webkit-text-stroke: 0.01em black !important;
		}
	`,
	ignoreImageAnalysis: [".mw-wiki-logo", "img"],
	invert: []
});
console.log("Loaded DarkReader from Comet!\nDarkreader Enabled!");