"use strict";functione(e,t){varr;if("undefined"==typeofSymbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeofe.length){r&&(e=r);varo=0,a=function(){};return{s:a,n:function(){returno>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throwe},f:a}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varu,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){vare=r.next();returnc=e.done,e},e:function(e){i=!0,u=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throwu}}}}functiont(e){returna(e)||o(e)||n(e)||r()}functionr(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionn(e,t){if(e){if("string"==typeofe)returnu(e,t);varr=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void0}}functiono(e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e))returnArray.from(e)}functiona(e){if(Array.isArray(e))returnu(e)}functionu(e,t){(null==t||t>e.length)&&(t=e.length);for(varr=0,n=newArray(t);r<t;r++)n[r]=e[r];returnn}functionc(e,t,r,n,o,a,u){try{varc=e[a](u),i=c.value}catch(s){returnvoidr(s)}c.done?t(i):Promise.resolve(i).then(n,o)}functioni(e){returnfunction(){vart=this,r=arguments;returnnewPromise(function(n,o){vara=e.apply(t,r);functionu(e){c(a,n,o,u,i,"next",e)}functioni(e){c(a,n,o,u,i,"throw",e)}u(void0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vars="2.1.3",l=function(e){returne.split(";").map(function(e){returne.trim()}).filter(function(e){returne.startsWith("--")}).map(function(e){returne.split(":")})},f={goosemodHandlers:{onImport:function(){varr=i(regeneratorRuntime.mark(functionr(){varn,o,a,u,c,i,s,f,d,p,b,m,v,h,y;returnregeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case0:n=document.createElement("canvas").getContext("2d"),o=function(e){returnn.fillStyle=e,n.fillStyle},a=function(e){returne.replace(/rgb\(([0-9]+), ([0-9]+), ([0-9]+)\)/g,o)},u=window.document.styleSheets[0],c=l(t(u.cssRules).find(function(e){return".theme-dark"===e.selectorText}).cssText),i=l(t(u.cssRules).find(function(e){return".theme-light"===e.selectorText}).cssText),s=c.concat(i).filter(function(e){return!e[0].includes("scrollbar")&&!e[0].includes("logo")}).map(function(e){returne[1]=o(e[1]),e}),u.insertRule("body {\n --brand-color: #7289da;\n --brand-color-hover: #677bc4;\n }",u.cssRules.length),s.push(["--brand-color","#7289da"]),s.push(["--brand-color-hover","#677bc4"]),f=e(u.cssRules),r.prev=11,f.s();case13:if((d=f.n()).done){r.next=41;break}if(".theme-light"!==(p=d.value).selectorText&&".theme-dark"!==p.selectorText&&"body"!==p.selectorText){r.next=17;break}returnr.abrupt("continue",39);case17:b=a(p.cssText),m=!1,v=e(s),r.prev=20,v.s();case22:if((h=v.n()).done){r.next=30;break}if(y=h.value,!b.includes(y[1])){r.next=28;break}returnb=b.replace(y[1],"var(".concat(y[0],")")),m=!0,r.abrupt("break",30);case28:r.next=22;break;case30:r.next=35;break;case32:r.prev=32,r.t0=r.catch(20),v.e(r.t0);case35:returnr.prev=35,v.f(),r.finish(35);case38:m&&u.insertRule("".concat(b),u.cssRules.length);case39:r.next=13;break;case41:r.next=46;break;case43:r.prev=43,r.t1=r.catch(11),f.e(r.t1);case46:returnr.prev=46,f.f(),r.finish(46);case49:case"end":returnr.stop()}},r,null,[[11,43,46,49],[20,32,35,38]])}));returnfunction(){returnr.apply(this,arguments)}}(),onRemove:function(){vare=i(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),logRegionColor:"darkred"}};exports.default=f;