1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e3c1c385-b69b-40dc-ad09-1479ecf9119a",e._sentryDebugIdIdentifier="sentry-dbid-e3c1c385-b69b-40dc-ad09-1479ecf9119a")}catch(e){}}();import{_ as e,m as t,d as s,r as a,c as o,o as r,j as i,X as d,Y as n,a as c,J as l,q as h,fE as m}from"./index-CwgUgIOG.js";import{D as f}from"./DexChartInfo-CUHyRr9J.js";const u={name:"DexGeckoChart",components:{DexChartInfo:f},props:{isChartLoaded:{type:Boolean,default:()=>!1},getTokens:{type:Object,required:!0}},emits:["chart-set-loading","chart-loaded"],data:()=>({iframeKey:0,selectedPool:null,isChartVisible:!0}),computed:{...s(["GET_THEME"]),currentLocale(){const e=this.$i18n.locale;return"ua"===e?"uk":"fa"===e?"en":e},currentTheme(){return"coffee"===this.GET_THEME||"dark"===this.GET_THEME?0:1},iframeSrc(){return`https://www.geckoterminal.com/${this.currentLocale}/ton/pools/${this.selectedPool}?embed=1&info=0&swaps=0&grayscale=0&light_chart=${this.currentTheme}`},iframeTonUsdtSrc(){return`https://www.geckoterminal.com/${this.currentLocale}/eth/pools/0x6a9c4fc2b35ee398e7a0e75d982872466ba93cb8?embed=1&info=0&swaps=0&grayscale=0&light_chart=${this.currentTheme}`},activeIframe(){return"native"!==this.getTokens.first?.address&&"USDT"!==this.getTokens.first?.symbol||this.getTokens.second?.address?this.iframeSrc:this.iframeTonUsdtSrc}},watch:{currentLocale:{handler(){this.iframeKey++,this.$emit("chart-set-loading"),setTimeout(()=>{this.$emit("chart-loaded")},1e3)}},getTokens:{handler(){this.getGeckoPoolForSendToken()},deep:!0,immediate:!0},currentTheme:{handler(){this.iframeKey++,this.$emit("chart-set-loading"),setTimeout(()=>{this.$emit("chart-loaded")},1e3)}}},mounted(){},methods:{...t(["TOGGLE_CHART_VISIBLE"]),getPoolIndex:e=>({tsTON:2,stTON:2,STON:2,KINGY:2,USDT:1}[e]??0),async getGeckoPoolForSendToken(){const e=this.getTokens.first,t=this.getTokens.second;if("native"===e?.address||"USDT"===e?.symbol)if(t&&t.address){const e=this.toSafeAddress(t.address);if(e)try{const s=await m.getGeckoPoolByAddress(e);if(s?.length>0){const e=this.getPoolIndex(t.symbol);this.$emit("chart-set-loading"),this.selectedPool=s[e]?.id.replace(/^ton_/,""),this.iframeKey++,setTimeout(()=>{this.$emit("chart-loaded")},1500)}}catch(s){}}else this.$emit("chart-set-loading"),this.selectedPool=null,this.iframeKey++,setTimeout(()=>{this.$emit("chart-loaded")},1500);else if(e?.address){const t=this.toSafeAddress(e.address);if(t)try{const s=await m.getGeckoPoolByAddress(t);if(s?.length>0){const t=this.getPoolIndex(e.symbol);this.$emit("chart-set-loading"),this.selectedPool=s[t]?.id.replace(/^ton_/,""),this.iframeKey++,setTimeout(()=>{this.$emit("chart-loaded")},1500)}}catch(s){}}},toSafeAddress(e){try{return"native"===e?"TON":h.Address.parseRaw(e).toString({bounceable:!0,urlSafe:!0})}catch(t){return null}}}},g={class:"chart"},T={class:"gecko__wrapper"},y=["src"],b=e(u,[["render",function(e,t,s,h,m,f){const u=a("DexChartInfo");return r(),o(l,null,[i(u,{"get-tokens":s.getTokens},null,8,["get-tokens"]),d(c("div",g,[c("div",T,[(r(),o("iframe",{id:"geckoterminal-embed",key:m.iframeKey,src:f.activeIframe,height:"100%",width:"100%",title:"GeckoTerminal",allow:"clipboard-write",allowfullscreen:"",frameborder:"0"},null,8,y))])],512),[[n,s.isChartLoaded]])],64)}],["__scopeId","data-v-d6e837d5"]]);export{b as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.