!function(){var e,r,t,l="";function a(n){var e;n.querySelector(".country-flagimg")&&(e=n.querySelector(".country-flagimg").getAttribute("src")),Array.from(n.querySelectorAll(".dropdown-menu li")).forEach(function(r){var t=r.querySelector(".options-flagimg").getAttribute("src");r.addEventListener("click",function(){var e=r.querySelector(".countrylist-codeno").innerHTML;n.querySelector("button")&&(n.querySelector("button img").setAttribute("src",t),n.querySelector("button span"))&&(n.querySelector("button span").innerHTML=e)}),e==t&&r.classList.add("active")}),Array.from(document.querySelectorAll("[data-option-flag-img-name]")).forEach(function(n){var e=getComputedStyle(n.querySelector(".flag-input")).backgroundImage,o=e.substring(e.indexOf("/as")+1,e.lastIndexOf('"'));Array.from(n.querySelectorAll(".dropdown-menu li")).forEach(function(r){var t=r.querySelector(".options-flagimg").getAttribute("src");r.addEventListener("click",function(){var e=r.querySelector(".country-name").innerHTML;n.querySelector(".flag-input").style.backgroundImage="url("+t+")",n.querySelector(".flag-input").value=e}),o==t&&(r.classList.add("active"),n.querySelector(".flag-input").value=r.querySelector(".country-name").innerHTML)})}),Array.from(document.querySelectorAll("[data-option-flag-name]")).forEach(function(t){var n=t.querySelector(".flag-input").value;Array.from(t.querySelectorAll(".dropdown-menu li")).forEach(function(e){var r=e.querySelector(".country-name").innerHTML;e.addEventListener("click",function(){t.querySelector(".flag-input").value=r}),n==r&&(e.classList.add("active"),t.querySelector(".flag-input").value=e.querySelector(".country-name").innerHTML)})})}e="country-list.json",r=function(e,r){if(null!==e)console.log("Something went wrong: "+e);else{var e=l=r,t=Array.from(document.querySelectorAll("[data-input-flag]")),n="",o=Array.from(e);for(let e=0;e
country flag
'+o[e].countryName+'
'+o[e].countryCode+"
";for(let e=0;e
country flag
'+e.countryName+'
'+e.countryCode+"
"}),a(n)},350)})})}();