PageSourceSearch

https://mdxalgo.com/build/assets/Index.4a655fe0.js

js mdxalgo.com collected 2026-10-05 21:33:42 UTC 24,087 bytes, 6 lines download raw bytes

1import{A as _}from"./AppLayout.903b227d.js";import{A as C,a as P}from"./AltcoinPortfolioList.77d36a1e.js";import{n as h}from"./plugin-vue2_normalizer.000ba15c.js";import{C as T}from"./Card.4a3c4823.js";import{P as S}from"./PrimaryButton.4ea37368.js";import{b as F,p as k,a as I}from"./blofin.4e0df782.js";import"./laravel-vite-plugin_inertia-helpers.9c4f003d.js";import"./vuex.9a713e87.js";import"./AnimatedParagraph.898882e0.js";import"./featureSlugs.b4bb1dc1.js";import"./Tooltip.37f2b546.js";import"./btc.38c7b727.js";import"./GhostButton.be455fab.js";import"./Logo.d79c0716.js";import"./mdx.21cb3b8e.js";import"./socketService.5b6e8b75.js";import"./chunk-7TXMVMS6.80c94c5e.js";import"./Modal.55f10e39.js";import"./SignupAndPayModal.865fe969.js";import"./SignupAndPay.846aea00.js";import"./TextInput.accc894b.js";import"./Checkbox.76dac451.js";import"./lodash_flatMap.c1aa4c3b.js";import"./chunk-EQKERSRP.6ba6c6f9.js";import"./2.543b16fc.js";import"./DialogModal.9bec62c6.js";import"./v-img-fallback.e9e5bcc1.js";const L={props:{price:{type:[Number,String],default:null},live:{type:Boolean,default:!0}},data(){return{previousPrice:null,previousFormattedPrice:null,priceDirection:0,priceChangeStartIndex:0,flashActive:!1,flashTimeoutId:null}},computed:{formattedPrice(){return this.formatPrice(this.price)},priceDisplaySegments(){const s=this.formattedPrice;if(!this.live||!s||s==="\u2014")return[{text:s,class:""}];const t=this.priceDirection,e=this.flashActive,r=this.priceChangeStartIndex;return e&&t!==0?[{text:s,class:t>0?"text-green-500":"text-red-500"}]:e&&t===0?[{text:s,class:""}]:!e&&r>0&&t!==0?[{text:s.slice(0,r),class:""},{text:s.slice(r),class:t>0?"text-green-500":"text-red-500"}]:[{text:s,class:""}]}},watch:{live(s){s||this.resetFlash()},price:{immediate:!0,handler(s){if(!this.live){this.previousPrice=s,this.previousFormattedPrice=this.formatPrice(s);return}if(s==null||s==="")return;const t=Number(s);if(!isFinite(t))return;const e=this.formatPrice(t),r=this.previousFormattedPrice!=null&&this.previousFormattedPrice!==e;if(this.previousPrice!==null&&r){const i=Number(this.previousPrice);this.priceDirection=t>i?1:t<i?-1:0,this.priceChangeStartIndex=this.findFirstDiff(this.previousFormattedPrice,e),this.flashActive=!0,this.flashTimeoutId&&clearTimeout(this.flashTimeoutId),this.flashTimeoutId=setTimeout(()=>{this.flashActive=!1,this.flashTimeoutId=null},1200)}this.previousFormattedPrice=e,this.previousPrice=t}}},beforeDestroy(){this.flashTimeoutId&&clearTimeout(this.flashTimeoutId)},methods:{resetFlash(){this.flashTimeoutId&&(clearTimeout(this.flashTimeoutId),this.flashTimeoutId=null),this.previousPrice=null,this.previousFormattedPrice=null,this.priceDirection=0,this.priceChangeStartIndex=0,this.flashActive=!1},findFirstDiff(s,t){const e=Math.min(s.length,t.length);for(let r=0;r<e;r++)if(s[r]!==t[r])return r;return e},formatPrice(s){return s=Number(s),isNaN(s)||s===0?"\u2014":s>=1?"$"+s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):s>=1e-4?"$"+s.toFixed(6):"$"+s.toExponential(2)}}};var D=function(){var t=this,e=t._self._c;return e("span",{staticClass:"tabular-nums"},t._l(t.priceDisplaySegments,function(r,i){return e("span",{key:i,class:r.class},[t._v(t._s(r.text))])}),0)},$=[],A=h(L,D,$,!1,null,null,null,null);const E=A.exports;const B={props:{show:{type:Boolean,default:!1}},watch:{show(s){document.body.style.overflow=s?"hidden":null}},mounted(){document.addEventListener("keydown",this.onEscape)},beforeDestroy(){document.removeEventListener("keydown",this.onEscape),document.body.style.overflow=null},methods:{onEscape(s){s.key==="Escape"&&this.show&&this.$emit("close")}}};var N=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"drawer"}},[t.show?e("div",{staticClass:"fixed inset-0 z-[10001] flex flex-col justify-end"},[e("div",{staticClass:"absolute inset-0 bg-black/60",on:{click:function(r){return t.$emit("close")}}}),e("div",{staticClass:"relative z-10 bg-black rounded-t-2xl max-h-[85vh] flex flex-col animate__animated animate__slideInUp animate__faster"},[e("div",{staticClass:"flex items-center justify-between px-4 pt-4 pb-2 shrink-0"},[t._t("header"),e("button",{staticClass:"p-2",attrs:{type:"button"},on:{click:function(r){return t.$emit("close")}}},[e("svg",{staticClass:"w-5 h-5 text-gray-600",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"}})])])],2),e("div",{staticClass:"flex-1 overflow-y-auto px-4 pb-4"},[t._t("default")],2)])]):t._e()])},U=[],H=h(B,N,U,!1,null,"26ef3923",null,null);const j=H.exports;async function O(){const{data:s}=await window.axios.get("/api/altcoin-portfolio/holdings");return s}async function R(s){const{data:t}=await window.axios.put("/api/altcoin-portfolio/holdings",{holdings:s});return t}const M=typeof import.meta<"u"&&"wss://binance-stream-websocket-production.up.railway.app"||"wss://stream.binance.com:9443";function z(s){const t=M.replace(/\/$/,"");if(s.length===1)return`${t}/ws/${s[0].toLowerCase()}@aggTrade`;const e=s.map(r=>`${r.toLowerCase()}@aggTrade`).join("/");return`${t}/stream?streams=${e}`}function W(s){const t=String(s||"").toUpperCase();return t.endsWith("USDT")?t.slice(0,-4):t}const K=1e3;function V(s,{throttleMs:t=K}={}){let e=null,r="",i=null,o=!1,l=0;const d={};let u=null;function f(){u=null;for(const n of Object.keys(d))s(n,d[n]),delete d[n]}function g(){u||(u=setTimeout(f,t))}function y(n){if(!n||n.e!=="aggTrade")return;const a=W(n.s),c=parseFloat(n.p);!a||!isFinite(c)||c<=0||(d[a]=c,g())}function b(n){var a;try{const c=JSON.parse(n.data);y((a=c.data)!=null?a:c)}catch{}}function m(){if(!!e){e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close(1e3,"KILL")}catch{}e=null}}function v(n){if(m(),!n.length)return;o=!1;const a=z(n);e=new WebSocket(a),e.onmessage=b,e.onopen=()=>{l=0},e.onclose=()=>{if(e=null,o||!r||(l+=1,l>8))return;const c=Math.min(1e3*l,8e3);i=setTimeout(()=>{i=null;const p=r?r.split(","):[];p.length&&v(p)},c)}}function x(n){const a=[...new Set((n||[]).map(p=>
1String(p||"").toUpperCase()).filter(Boolean))].sort(),c=a.join(",");c===r&&(e||!a.length)||(r=c,i&&(clearTimeout(i),i=null),o=!0,m(),o=!1,l=0,a.length&&v(a))}function w(){r="",o=!0,i&&(clearTimeout(i),i=null),u&&(clearTimeout(u),u=null);for(const n of Object.keys(d))delete d[n];m()}return{sync:x,stop:w}}const J=new Set(["USDT","USDC","BUSD","FDUSD","DAI","TUSD","USDD"]),Z={props:["coins"],components:{AppLayout:_,AltcoinPortfolioChart:C,AltcoinPortfolioList:P,AltcoinPortfolioLivePrice:E,BottomDrawer:j,Card:T,PrimaryButton:S},data(){return{amountInputs:{},userPortfolio:{},searchTerm:"",coinsData:[],showDrawer:!1,saveHoldingsTimer:null,livePrices:{},livePriceFeed:null,exchangeLogos:[{label:"Bybit",href:"https://partner.bybit.com/b/2564",icon:F},{label:"Phemex",href:"https://phemex.com/a/MDX",icon:k},{label:"Blofin",href:"https://partner.blofin.com/d/MDX",icon:I}]}},computed:{isLoggedIn(){var s,t;return!!((t=(s=this.$page)==null?void 0:s.props)!=null&&t.user)},hasActiveSearch(){return this.searchTerm.trim().length>0},baseCoins(){return this.coinsData.length?this.coinsData:this.coins||[]},coinsWithLivePrices(){return this.baseCoins.map(s=>this.withLivePrice(s))},filteredCoins(){const s=this.searchTerm.trim().toUpperCase();let t=this.coinsWithLivePrices;return s?(t=t.filter(e=>(e.symbol||"").toUpperCase().startsWith(s)),[...t].sort((e,r)=>{const i=(e.symbol||"").toUpperCase()===s?0:1,o=(r.symbol||"").toUpperCase()===s?0:1;return i!==o?i-o:(e.symbol||"").localeCompare(r.symbol||"")})):[...t].sort((e,r)=>{const i=e.symbol in this.userPortfolio?0:1,o=r.symbol in this.userPortfolio?0:1;return i-o})},portfolioWithPercentages(){const s=Object.keys(this.userPortfolio).map(e=>{const r=parseFloat(this.amountInputs[e]),i=isFinite(r)&&r>0?r:0,o=this.resolvePrice(e),l=i*o;return{symbol:e,value:isFinite(l)&&l>0?l:0}}).filter(e=>e.value>0).sort((e,r)=>r.value-e.value);if(s.length===0)return[];const t=s.reduce((e,r)=>e+r.value,0);return!isFinite(t)||t<=0?[]:s.map(e=>({symbol:e.symbol,percentage:e.value/t*100,amount:e.value}))},portfolioTotal(){const s=Object.keys(this.userPortfolio).reduce((t,e)=>{const r=parseFloat(this.amountInputs[e]),o=(isFinite(r)&&r>0?r:0)*this.resolvePrice(e);return t+(isFinite(o)?o:0)},0);return isFinite(s)?s:0}},watch:{coins:{immediate:!0,handler(s){const t=s||[];t.length&&!this.coinsData.length&&(this.coinsData=[...t]),this.initAmountInputs(t)}},coinsData:{handler(s){this.initAmountInputs(s||[])}},searchTerm(){this.$nextTick(()=>this.resetAssetsScroll())},userPortfolio:{deep:!0,handler(){this.syncLivePriceFeed()}}},mounted(){this.coinsData=[...this.coins||[]],this.livePriceFeed=V((s,t)=>{this.$set(this.livePrices,s,t)}),this.loadPortfolio(),this.syncLivePriceFeed()},beforeDestroy(){this.saveHoldingsTimer&&clearTimeout(this.saveHoldingsTimer),this.livePriceFeed&&(this.livePriceFeed.stop(),this.livePriceFeed=null)},methods:{binancePair(s){const t=String(s||"").toUpperCase();return!t||J.has(t)?null:`${t}USDT`},withLivePrice(s){if(!(s!=null&&s.symbol)||!(s.symbol in this.userPortfolio))return s;const t=Number(this.livePrices[s.symbol]);return!isFinite(t)||t<=0?s:{...s,price:t}},resolvePrice(s){var i;const t=Number(this.livePrices[s]);if(isFinite(t)&&t>0)return t;const e=this.baseCoins.find(o=>o.symbol===s),r=Number((i=e==null?void 0:e.price)!=null?i:0);return isFinite(r)?r:0},syncLivePriceFeed(){if(!this.livePriceFeed)return;const s=Object.keys(this.userPortfolio).map(t=>this.binancePair(t)).filter(Boolean);this.livePriceFeed.sync(s);for(const t of Object.keys(this.livePrices))t in this.userPortfolio||this.$delete(this.livePrices,t)}
1,coinRowKey(s,t){var i,o;if((s==null?void 0:s.id)!=null)return`coin-${s.id}`;const e=(i=s==null?void 0:s.symbol)!=null?i:"",r=(o=s==null?void 0:s.name)!=null?o:"";return`${e}-${r}-${t}`},resetAssetsScroll(){const s=this.$refs.assetsScroll;s&&(s.scrollTop=0)},initAmountInputs(s){s.forEach(t=>{t.symbol&&!(t.symbol in this.amountInputs)&&this.$set(this.amountInputs,t.symbol,"")})},formatPrice(s){return s=Number(s),isNaN(s)||s===0?"\u2014":s>=1?"$"+s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):s>=1e-4?"$"+s.toFixed(6):"$"+s.toExponential(2)},setPortfolio(s){const t=parseFloat(this.amountInputs[s]);if(!isFinite(t)||t<=0)return;const e=this.resolvePrice(s),r=t*e;!isFinite(r)||r<=0||(this.$set(this.userPortfolio,s,r),this.$set(this.amountInputs,s,t),this.persistPortfolio())},pruneZeroPositions(){for(const s of Object.keys({...this.userPortfolio})){const t=parseFloat(this.amountInputs[s]);(!isFinite(t)||t<=0)&&this.$delete(this.userPortfolio,s)}},onAmountBlur(){this.pruneZeroPositions(),this.persistPortfolio()},removeFromPortfolio(s){this.$delete(this.userPortfolio,s),this.$set(this.amountInputs,s,""),this.persistPortfolio()},buildHoldingsPayload(){const s={};for(const t of Object.keys(this.userPortfolio)){const e=parseFloat(this.amountInputs[t]);isFinite(e)&&e>0&&(s[t]=e)}return s},persistPortfolio(){this.pruneZeroPositions();const s=this.buildHoldingsPayload();if(this.isLoggedIn){this.debouncedSaveToServer(s);return}localStorage.setItem("altcoin_portfolio",JSON.stringify(s))},debouncedSaveToServer(s){this.saveHoldingsTimer&&clearTimeout(this.saveHoldingsTimer),this.saveHoldingsTimer=setTimeout(()=>{this.saveHoldingsTimer=null,this.saveToServer(s)},500)},async saveToServer(s){if(!!this.isLoggedIn)try{await R(s)}catch{}},readLocalStorageHoldings(){try{const s=localStorage.getItem("altcoin_portfolio");if(!s)return null;const t=JSON.parse(s);return!t||typeof t!="object"?null:t}catch{return null}},applyHoldings(s){var t;if(!(!s||typeof s!="object"))for(const[e,r]of Object.entries(s)){const i=Number(r);if(!isFinite(i)||i<=0)continue;const o=this.baseCoins.find(f=>(f.symbol||"").toUpperCase()===String(e).toUpperCase()),l=(t=o==null?void 0:o.symbol)!=null?t:String(e).toUpperCase(),d=this.resolvePrice(l),u=i*d;!isFinite(u)||u<0||(this.$set(this.userPortfolio,l,u),this.$set(this.amountInputs,l,i))}},async loadPortfolio(){if(this.isLoggedIn){await this.loadFromServer();return}this.applyHoldings(this.readLocalStorageHoldings())},async loadFromServer(){var s;try{const{holdings:t}=await O(),e=t&&typeof t=="object"?t:{},r=this.readLocalStorageHoldings();if(r&&Object.keys(r).length>0){const i={...e,...r};this.applyHoldings(i),localStorage.removeItem("altcoin_portfolio"),await this.saveToServer(i);return}this.applyHoldings(e)}catch(t){((s=t==null?void 0:t.response)==null?void 0:s.status)===401&&this.applyHoldings(this.readLocalStorageHoldings())}}}};var X=function(){var t=this,e=t._self._c;return e("app-layout",{attrs:{boxed:!1}},[e("div",{staticClass:"flex flex-col h-full min-h-[calc(100vh-140px)] lg:min-h-0 lg:overflow-hidden lg:max-h-[calc(100vh-140px)]"},[e("div",{staticClass:"flex flex-col lg:grid lg:grid-cols-3 h-full flex-1 lg:min-h-0"},[e("div",{staticClass:"hidden lg:flex col-span-1 flex-col lg:pr-2 min-h-0"},[e("card",{staticClass:"mb-4 p-4 h-full flex flex-col",scopedSlots:t._u([{key:"body",fn:function(){return[e("div",{staticClass:"flex flex-col min-h-0 h-full"},[e("div",{staticClass:"flex items-center justify-between gap-2 shrink-0 mb-2"},[e("div",{staticClass:"flex items-center gap-2"},[e("span",{staticClass:"text-gray-800 text-sm uppercase tracking-wide"},[t._v("Assets")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTerm,expression:"searchTerm"}],staticClass:"w-40 rounded border border-gray-600 focus:border-primary-500 active:border-primary-500 focus:ring-0 outline-0 px-3 py-1.5 text-sm bg-[#0F0F0F] text-gray-900 placeholder:text-gray-700",attrs:{type:"text",placeholder:"Search ticker..."},domProps:{value:t.searchTerm},on:{input:function(r){r.target.composing||(t.searchTerm=r.target.value)}}})]),e("div",{staticClass:"flex items-center gap-1.5"},t._l(t.exchangeLogos,function(r){return e("a",{key:r.label,staticClass:"hover:opacity-80 transition-opacity rounded-full border overflow-hidden",attrs:{href:r.href,target:"_blank",rel:"noopener noreferrer",title:r.label}},[e("img",{staticClass:"h-5 object-contain",attrs:{src:r.icon,alt:r.label}})])}),0)]),e("div",{staticClass:"min-h-0 flex-1 max-h-[50vh] lg:max-h-[calc(100dvh-220px)] flex flex-col overflow-hidden rounded"},[e("div",{ref:"assetsScroll",staticClass:"min-h-0 overflow-y-auto flex-1"},[e("table",{staticClass:"w-full overflow-hidden text-gray-900"},[e("colgroup",[e("col",{staticStyle:{width:"25%"}}),e("col",{staticStyle:{width:"25%"}}),e("col",{staticStyle:{width:"50%"}})]),e("thead",{staticClass:"sticky top-0 z-10"},[e("tr",{staticClass:"text-gray-800 text-sm uppercase border-b-gray-700"},[e("th",{staticClass:"text-left p-2 font-normal"},[t._v(" Ticker ")]),e("th",{staticClass:"text-left p-2 font-normal whitespace-nowrap"},[t._v(" Price (USD) ")]),e("th",{staticClass:"text-left p-2 font-normal"},[t._v(" Amount ")])])]),t.filteredCoins.length?e("tbody",t._l(t.filteredCoins,function(r,i){return e("tr",{key:t.coinRowKey(r,i),staticClass:"bg-gray-200 alternate hover:bg-gray-400 transition-colors"},[e("td",{staticClass:"p-2"},[t._v(" "+t._s(r.symbol)+" ")]),e("td",{staticClass:"p-2"},[e("altcoin-portfolio-live-price",{attrs:{price:r.price,live:r.symbol in t.userPortfolio}})],1),e("td",{staticClass:"p-2"},[e("div",{staticClass:"flex gap-1 items-center"},[e("input",{directives:[{name:"model",rawName:"v-model.number",value:t.amountInputs[r.symbol],expression:`
2                                                                amountInputs[
3                                                                    coin
4                                                                        .symbol
5                                                                ]
6                                                            `,modifiers:{number:!0}}
6],staticClass:"w-14 rounded border border-gray-600 bg-transparent focus:border-primary-500 focus:ring-0 outline-0 px-2 py-1 text-sm text-gray-900 placeholder:text-gray-700",attrs:{inputmode:"decimal"},domProps:{value:t.amountInputs[r.symbol]},on:{keypress:function(o){o.key!=="."&&(o.key<"0"||o.key>"9")&&o.preventDefault()},blur:[function(o){return t.onAmountBlur()},function(o){return t.$forceUpdate()}],input:function(o){o.target.composing||t.$set(t.amountInputs,r.symbol,t._n(o.target.value))}}}),e("button",{staticClass:"text-green-500 hover:text-green-400 cursor-pointer p-1 border border-green-500/50 hover:border-green-400 rounded-[8px]",attrs:{type:"button",title:"Add"},on:{click:function(o){return t.setPortfolio(r.symbol)}}},[e("svg",{staticClass:"w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"}})])]),r.symbol in t.userPortfolio?e("button",{staticClass:"text-red-500 hover:text-red-400 cursor-pointer p-1 border border-red-500/50 hover:border-red-400 rounded-[8px]",attrs:{type:"button",title:"Remove"},on:{click:function(o){return t.removeFromPortfolio(r.symbol)}}},[e("svg",{staticClass:"w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"}})])]):t._e()])])])}),0):e("tbody",[e("tr",[e("td",{attrs:{colspan:"3"}},[t._v(" "+t._s(t.hasActiveSearch?"No matching symbols":"No coins yet")+" ")])])])])])])])]},proxy:!0}])})],1),e("div",{staticClass:"col-span-1 lg:col-span-2 flex flex-col flex-1 lg:flex-none px-4 lg:px-0 lg:pl-2 lg:min-h-0"},[e("card",{staticClass:"portfolio-card mb-0 lg:mb-4 p-4 py-4 h-full flex-1 lg:overflow-hidden",scopedSlots:t._u([{key:"body",fn:function(){return[e("div",{staticClass:"flex flex-col gap-4 h-full lg:min-h-0"},[e("div",{staticClass:"flex gap-2 items-center justify-between"},[e("div",{staticClass:"flex gap-2 items-center"},[e("span",{staticClass:"text-gray-800 text-sm uppercase tracking-wide"},[t._v(" Portfolio ")]),t.portfolioWithPercentages.length?[e("span",{staticClass:"text-gray-800 text-sm"},[t._v("-")]),e("altcoin-portfolio-live-price",{attrs:{price:t.portfolioTotal,live:!0}})]:t._e()],2),e("button",{staticClass:"lg:hidden flex items-center gap-1 text-sm text-primary-500 border border-primary-500/50 rounded-lg px-3 py-1",attrs:{type:"button"},on:{click:function(r){t.showDrawer=!0}}},[e("svg",{staticClass:"w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"}})]),t._v(" Add ")])]),t.portfolioWithPercentages.length?e("div",{staticClass:"flex-1 flex flex-col gap-8 lg:min-h-0 lg:overflow-hidden"},[e("div",{staticClass:"shrink-0"},[e("altcoin-portfolio-list",{attrs:{altcoins:t.portfolioWithPercentages}})],1),e("div",{staticClass:"flex justify-center lg:flex-1 lg:min-h-0"},[e("altcoin-portfolio-chart",{staticClass:"w-full max-w-[300px] lg:max-w-[400px] h-[250px] lg:h-full my-auto lg:my-0",attrs:{altcoins:t.portfolioWithPercentages,total:t.portfolioTotal}})],1)]):e("div",{staticClass:"flex-1 flex flex-col items-center justify-center gap-3 text-center"},[e("div",{staticClass:"w-16 h-16 rounded-full border border-primary-500 flex items-center justify-center"},[e("svg",{staticClass:"w-8 h-8 text-primary-500",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"}},[e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"}}),e("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"}})])]),e("div",[e("p",{staticClass:"text-gray-800 text-sm"},[t._v(" Your portfolio is empty ")])])])])]},proxy:!0}])})],1)])]),e("bottom-drawer",{attrs:{show:t.showDrawer},on:{close:function(r){t.showDrawer=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[e("div",{staticClass:"flex items-center gap-2"},[e("span",{staticClass:"text-gray-800 text-sm uppercase tracking-wide"},[t._v("Assets")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTerm,expression:"searchTerm"}],staticClass:"w-40 rounded border border-gray-600 focus:border-primary-500 active:border-primary-500 focus:ring-0 outline-0 px-3 py-1.5 text-sm bg-transparent text-gray-900 placeholder:text-gray-700",attrs:{type:"text",placeholder:"Search ticker..."},domProps:{value:t.searchTerm},on:{input:function(r){r.target.composing||(t.searchTerm=r.target.value)}}})])]},proxy:!0}])},[e("table",{staticClass:"w-full rounded overflow-hidden text-gray-900"},[e("colgroup",[e("col",{staticStyle:{width:"25%"}}),e("col",{staticStyle:{width:"25%"}}),e("col",{staticStyle:{width:"50%"}})]),e("thead",{staticClass:"sticky top-0 z-10"},[e("tr",{staticClass:"bg-black text-gray-800 text-sm uppercase border-b border-b-gray-700"},[e("th",{staticClass:"text-left p-2 font-normal"},[t._v("Ticker")]),e("th",{staticClass:"text-left p-2 font-normal whitespace-nowrap"},[t._v(" Price (USD) ")]),e("th",{staticClass:"text-left p-2 font-normal"},[t._v("Amount")])])]),t.filteredCoins.length?e("tbody",t._l(t.filteredCoins,function(r,i){return e("tr",{key:t.coinRowKey(r,i),staticClass:"bg-gray-200 alternate hover:bg-gray-400 transition-colors"},[e("td",{staticClass:"p-2"},[t._v(" "+t._s(r.symbol)+" ")]),e("td",{staticClass:"p-2"},[e("altcoin-portfolio-live-price",{attrs:{price:r.price,live:r.symbol in t.userPortfolio}})],1),e("td",{staticClass:"p-2"},[e("div",{staticClass:"flex gap-1 items-center"},[e("input",{directives:[{name:"model",rawName:"v-model.number",value:t.amountInputs[r.symbol],expression:"amountInputs[coin.symbol]",modifiers:{number:!0}}
6],staticClass:"w-14 rounded border border-gray-600 focus:border-primary-500 focus:ring-0 outline-0 px-2 py-1 text-sm bg-[#0F0F0F] text-gray-900 placeholder:text-gray-700",attrs:{inputmode:"decimal"},domProps:{value:t.amountInputs[r.symbol]},on:{keypress:function(o){o.key!=="."&&(o.key<"0"||o.key>"9")&&o.preventDefault()},blur:[function(o){return t.onAmountBlur()},function(o){return t.$forceUpdate()}],input:function(o){o.target.composing||t.$set(t.amountInputs,r.symbol,t._n(o.target.value))}}}),e("button",{staticClass:"text-green-500 hover:text-green-400 cursor-pointer p-1 border border-green-500/50 hover:border-green-400 rounded-[8px]",attrs:{type:"button",title:"Add"},on:{click:function(o){return t.setPortfolio(r.symbol)}}},[e("svg",{staticClass:"w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"}})])]),r.symbol in t.userPortfolio?e("button",{staticClass:"text-red-500 hover:text-red-400 cursor-pointer p-1 border border-red-500/50 hover:border-red-400 rounded-[8px]",attrs:{type:"button",title:"Remove"},on:{click:function(o){return t.removeFromPortfolio(r.symbol)}}},[e("svg",{staticClass:"w-4 h-4",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"}})])]):t._e()])])])}),0):e("tbody",[e("tr",[e("td",{attrs:{colspan:"3"}},[t._v(" "+t._s(t.hasActiveSearch?"No matching symbols":"No coins yet")+" ")])])])])])],1)},Y=[],q=h(Z,X,Y,!1,null,"2e0e4d64",null,null);const Tt=q.exports;export{Tt 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.