import{removeBloomQuickPanels as r}from"./panel.js-PlKG13TM.js";import{createTradingPanel as n}from"./panel-new.ts-DTBxtLQQ.js";import"./chains-By83jz87.js";const i="defined";window.platform=i;async function t(){return window.location.pathname.includes("bsc/0x")?56:window.location.pathname.includes("base/0x")?8453:window.location.pathname.includes("eth/0x")?1:window.location.pathname.includes("hyperevm/0x")?999:window.location.pathname.includes("mon/0x")?143:null}window.getChainId=t;async function s(){return window.location.pathname.split("/").pop().split("?")[0]}window.getPoolId=s;async function l(){const e=document.querySelector('div[data-sentry-source-file="TopPairsDropdownCurrent.tsx"] > div[data-sentry-source-file="CopyToClipboard.tsx"]')?.getAttribute("aria-label")?.split("Copy ")?.[1];return e||showToast("Failed to get token mint!","top-center","error")}window.getTokenMint=l;let o;chrome.runtime.onMessage.addListener(async function(e){if(e.tabId,e.shouldWarnAboutUpdate&&showToast("A new version of the Bloom Extension is available! Check out how to install it <a href='https://docs.bloombot.app/extension/setup/download-chrome/.zip-file' target='_blank' style='text-decoration: underline; color: #EEA7ED;'>here</a>","top-center","info"),e.message==="txUpdate")return showSwapToast(e);const a=(await chrome.storage.local.get("bloom.sitePreferences"))?.["bloom.sitePreferences"]||{};r(),a[i]!==!1&&(e.message==="defined-token"?(t(),o=e.message,n()):e.message==="reset"&&o==="defined-token"?(t(),n()):e.message!=="quickBuyAmount"&&(o="other"))});
