\n"):e,setAttributes(e,t){for(var n in t)e.setAttribute(n,t[n])},inputToggle(e){if(e.target.classList.contains("input-toggle")){let t=e.target.parentElement.lastElementChild;!0===e.target.checked?(t.style.height=t.scrollHeight+"px",t.classList.remove("hidden")):(t.firstChild.value="",t.style.height=null,t.classList.add("hidden"))}},addInput(e){let t=e.parent,n=e.elm;var l=e.placeholder,r=e.type;e=(e=e.max||6)||6;let i=document.createElement("div");i.setAttribute("class","new-input");let a=document.createElement("input");a.setAttribute("type",r),a.setAttribute("placeholder",l);let d=document.createElement("button");d.setAttribute("class","remove"),d.setAttribute("type","button"),i.appendChild(a),i.appendChild(d),n.appendChild(i),n.childNodes.length>=e&&(n.nextElementSibling.disabled=!0,n.nextElementSibling.style.cssText="opacity:.3;cursor:not-allowed"),t.style.height=t.scrollHeight+"px"},removeInput(e){let t=e.elm,n=e.target;var l=e.max||6;if("remove"===n.className){--l;let r=n.parentElement.parentNode;e=n.parentElement.getBoundingClientRect().height,n.parentElement.remove(),t.style.height=t.getBoundingClientRect().height-e+"px",r.childNodes.length<=l&&(r.nextElementSibling.disabled=!1,r.nextElementSibling.style.cssText="opacity:1;cursor:pointer;")}}};var n;function l(e){return Number(e).toLocaleString("id-ID",{style:"currency",currency:"IDR",maximumFractionDigits:0})}n="#url-gambar-input",(n=e.querySelector(n)).style.height=n.scrollHeight+"px",e.addEventListener("click",t.inputToggle),e.getElementById("addfield").addEventListener("click",function(){t.addInput({parent:this.previousElementSibling,elm:this.previousElementSibling,placeholder:"https://...",type:"url",max:5})}),e.getElementById("url-gambar-input").addEventListener("click",function(e){t.removeInput({elm:this,target:e.target,max:5})}),e.getElementById("submit").addEventListener("click",function(){var n=e.querySelectorAll("#url-gambar-input input"),r=t.getVal("#harga").replace(/\D/g,""),i=t.getVal("#hargapromo").replace(/\D/g,""),a=t.getVal("#statusproduk"),d=t.getVal("#deskripsi");r=""==i?'\t'+l(r)+"":'\t'+l(r)+''+l(i)+"",i='
\n",i+='