document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll('[data-plugin="choices"]');for(i=0;i<e.length;++i){var t=e[i];new Choices(t,{placeholderValue:"This is a placeholder set in the config",searchPlaceholderValue:"Search results here"})}}),document.querySelectorAll(".checkout-tab").forEach(function(o){o.querySelectorAll(".nexttab").forEach(function(t){o.querySelectorAll('button[data-bs-toggle="pill"]').forEach(function(e){e.addEventListener("show.bs.tab",function(e){e.target.classList.add("done")})}),t.addEventListener("click",function(){var e=t.getAttribute("data-nexttab");document.getElementById(e).click()})}),o.querySelectorAll(".previestab").forEach(function(c){c.addEventListener("click",function(){for(var e=c.getAttribute("data-previous"),t=c.closest("form").querySelectorAll(".custom-nav .done").length,o=t-1;o<t;o++)c.closest("form").querySelectorAll(".custom-nav .done")[o]&&c.closest("form").querySelectorAll(".custom-nav .done")[o].classList.remove("done");document.getElementById(e).click()})});var c=o.querySelectorAll('button[data-bs-toggle="pill"]');c.forEach(function(e,t){e.setAttribute("data-position",t),e.addEventListener("click",function(){0<o.querySelectorAll(".custom-nav .done").length&&o.querySelectorAll(".custom-nav .done").forEach(function(e){e.classList.remove("done")});for(var e=0;e<=t;e++)c[e].classList.contains("active")?c[e].classList.remove("done"):c[e].classList.add("done")})})});