!function(e,t,n){n(function(){var e=function(e,t){var r=t.find("[group=sandbox_credentials]"),o=t.find("[group=live_credentials]");r.add(o).each(function(){n(this).attr("readonly","readonly")}),t.find("[group = ".concat(e,"]")).each(function(){n(this).removeAttr("readonly")})},r=function(e){return e?"live_credentials":"sandbox_credentials"},o=n("#woocommerce_payoneer-checkout_live_mode"),a=o.closest("form");o.on("change",function(){var t=this.checked,o=n(this).closest("form");e(r(t),o)}),e(r(o.prop("checked")),a);var i=function(){return confirm(PayoneerData.i18n.confirmReset)};t.querySelectorAll("button[data-target]").forEach(function(e){e.addEventListener("click",function(n){t.querySelector(e.dataset.target).dispatchEvent(new CustomEvent("reset",{detail:e.dataset.default})),n.preventDefault()})}),t.querySelectorAll("#mainform input").forEach(function(e){e.addEventListener("reset",function(t){i()&&(e.value=t.detail)})}),t.querySelectorAll("#mainform textarea").forEach(function(e){e.addEventListener("reset",function(t){i()&&(e.innerHTML=t.detail,n(e).next(".CodeMirror")[0].CodeMirror.setValue(e.value),n(e).next(".CodeMirror")[0].CodeMirror.refresh())})})})}(top,document,jQuery);