const u={color:"#00ff95",backgroundColor:"#00563180"},m={...u,quickBuyAmount:.5},c=[".bloom-buy-qt-btn",".bloom-snipe-qt-btn",".bloom-search-qt-btn",".bloom-top-qt-btn",".bloom-limit-buy-qt-btn",".bloom-limit-sell-qt-btn",".bloom-sell-qt-btn",".bloom-toggle-memescope-btn",".bloom-quick-buy-btn",".bloom-quick-panel-btn"];async function r(){const o=(await chrome.storage.local.get("bloom.quickBuyButton"))?.["bloom.quickBuyButton"];return{color:o?.color||u.color,backgroundColor:o?.backgroundColor||u.backgroundColor}}async function i(){return(await chrome.storage.local.get("bloom.quickBuyAmount"))?.["bloom.quickBuyAmount"]||.5}async function b(){const o=await r(),t=await i();return{...o,quickBuyAmount:t}}function y(o){const t=e=>{const n={};if(e["bloom.quickBuyAmount"]&&(n.quickBuyAmount=e["bloom.quickBuyAmount"].newValue||.5),e["bloom.quickBuyButton"]){const l=e["bloom.quickBuyButton"].newValue||{};n.color=l?.color||u.color,n.backgroundColor=l?.backgroundColor||u.backgroundColor}Object.keys(n).length>0&&o(n)};return chrome.storage.onChanged.addListener(t),()=>chrome.storage.onChanged.removeListener(t)}function a(o,t,e,n){o.style.color=t,o.style.backgroundColor=e,o.style.borderColor=`${e}${e.length===7?"80":""}`;const l=o.querySelector("svg");if(l&&l.setAttribute("fill",t),n!==void 0){const s=o.querySelector("span");s&&!isNaN(parseFloat(s.textContent||""))&&(s.textContent=String(n))}o.onmouseover=function(){o.style.backgroundColor=e.slice(0,7)+"CC"},o.onmouseout=function(){o.style.backgroundColor=e}}function g(o,t,e,n=c){document.querySelectorAll(n.join(", ")).forEach(s=>{a(s,o,t,e)})}async function B(o){return((await chrome.storage.local.get("bloom.sitePreferences"))?.["bloom.sitePreferences"]||{})[o]!==!1}function f(o){return/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(o)}async function k(){return(await chrome.storage.local.get("bloom.token"))["bloom.token"]??null}function q(o,t){o.parentNode&&o.parentNode.insertBefore(t,o.nextSibling)}export{m as Q,f as a,k as b,q as c,b as g,B as i,y as s,g as u};
