let namespace="vp";$(document).ready((function(){const t=$("#calculatorForm"),e=$("#formItems"),a=$("#item"),n=$("#itemcount"),i=$("#items"),r=$("#content"),o=$("#copyButton"),c=$("#downloadButton"),s=$("#minus"),l=$("#plus"),p=$("input[name='quant']"),m=$("#namespace"),u=$("#item");$.each(itemDamages,(function(t,e){const a=t.split("_").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")+" (supports "+e+" models)";u.append($("").attr("value",t).text(a))})),s.click((function(t){const e=parseInt(p.attr("value"));isNaN(e)?p.attr("value","0"):(e>p.attr("min")&&p.attr("value",(e-1).toString()),e-1==p.attr("min")&&$(this).attr("disabled",!0),$("#iteminput"+e).remove())})),l.click((function(t){const e=parseInt(p.attr("value"));if(isNaN(e))p.attr("value","0");else{if(e1?s.prop("disabled",!1):s.prop("disabled",!0),i.append('
'+namespace+':
')}})),m.change((function(){namespace=m.val(),""==namespace&&(namespace="minecraft"),m.val(namespace),$("span[id^='namespace']").text(namespace+":")})),a.change((function(){if(""!==this.value){e.show();const t=itemDamages[this.value];n.prop("max",t),l.prop("disabled",!1)}else e.hide()})),t.on("submit",(function(t){t.preventDefault();const e=a.val(),n=parseInt(p.attr("value")),i=[];for(let t=0;t