text: $(function(){"use strict";var t=function(t){var e=1111..toLocaleString().replace(/1/g,""),r=1.1.toLocaleString().replace(/1/g,"");return parseFloat(t.replace(new RegExp("\\"+e,"g"),"").replace(new RegExp("\\"+r),"."))},e=function(){var e=t($("#withdrawLimit").val());$.isNumeric(e)?($(".input-dollars-form-group").removeClass("has-error"),o(function(t){var r,o;o=$("#currencies").val(),$(".selectedCrypto").text($("#currencies :selected").text()),r=("USDT_BTC"!==o?parseFloat(e)/parseFloat(t.USDT_BTC.last):parseFloat(e))/parseFloat(t[o].last),$("#withdrawOutcome").val(r.toLocaleString()),$("#dateRetrieved").text(new Date),a(t),$("#resultHolder").show()})):($("#withdrawOutcome").val(""),$(".input-dollars-form-group").addClass("has-error"))},r=function(){var e=t($("#withdrawOutcome").first().val());$.isNumeric(e)?($("#resultHolder .form-group").removeClass("has-error"),o(function(t){var r,o;r=$("#currencies").val(),$("#selectedCrypto").text($("#currencies :selected").text()),o=("USDT_BTC"!==r?parseFloat(e)*parseFloat(t.USDT_BTC.last):parseFloat(e))*parseFloat(t[r].last),$("#withdrawLimit").val(o.toLocaleString()),$("#dateRetrieved").text(new Date),a(t)})):($("#withdrawLimit").val(""),$("#resultHolder .form-group").addClass("has-error"))},a=function(t){var e=$("#currencies :selected").text();"USDT_BTC"!==$("#currencies").val()?(e+=" = ",e+=parseFloat(t[$("#currencies").val()].last).toLocaleString(navigator.language||navigator.browserLanguage,{maximumFractionDigits:8}),e+=" BTC = $ ",e+=(t[$("#currencies").val()].last*t.USDT_BTC.last).toLocaleString()):(e+=" = $ ",e+=parseFloat(t.USDT_BTC.last).toLocaleString()),$("#cryptoCalculated").text(e)},o=function(t){$.get("https://poloniex.com/public?command=returnTicker",t)};$("#withdrawLimit").val(25e3.toLocaleString()),$("#span2k").text("$ "+2e3.toLocaleString()),$("#span25k").text("$ "+25e3.toLocaleString()),$("#currencies, #withdrawLimit").change(function(){e()}),$("#withdrawOutcome").change(function(){r()}),$("#refreshCalculationBtn").click(function(){e()}),$("#span2k").click(function(){$("#withdrawLimit").val(2e3.toLocaleString()),e()}),$("#span25k").click(function(){$("#withdrawLimit").val(25e3.toLocaleString()),e()}),o(function(t){for(var r="",a=Object.keys(t).filter(function(t){return t.startsWith("BTC_")}).sort(),o=0;o<a.length;o++)r+="<option value="+a[o]+">"+a[o].substring(4)+"</option>";$("#currencies").first().append(r),e()})});