'"()/\\|:;=@%&\s]/gi,"").substr(0,64),a=decodeURI(t.domain).replaceAll(/[<>'"()/\\|:;=@%&+_\s]/gi,"");t=''+r+"@"+a+"",t=wpforms_settings.val_email_suggestion.replace("{suggestion}",t),e.closest(".wpforms-field").find("#"+o+"_suggestion").remove(),e.parent().append('")},empty:function(){l("#"+o+"_suggestion").remove()}})}),l(i).on("click",".wpforms-field-email .mailcheck-suggestion",function(e){var t=l(this),r=t.closest(".wpforms-field"),a=t.data("id");e.preventDefault(),r.find("#"+a).val(t.text()),t.parent().remove()}))},loadChoicesJS:function(){"function"==typeof s.Choices&&(l(".wpforms-field-select-style-modern .choicesjs-select, .wpforms-field-payment-select .choicesjs-select").each(function(e,t){var r,a;l(t).data("choicesjs")||(r=s.wpforms_choicesjs_config||{},a=l(t).data("search-enabled"),r.searchEnabled=void 0===a||a,r.callbackOnInit=function(){var t=this,r=l(t.passedElement.element),a=l(t.input.element),e=r.data("size-class");r.removeAttr("hidden").addClass(t.config.classNames.input+"--hidden"),e&&l(t.containerOuter.element).addClass(e),r.prop("multiple")&&(a.data("placeholder",a.attr("placeholder")),t.getValue(!0).length)&&a.removeAttr("placeholder"),r.on("change",function(){var e;r.prop("multiple")&&(t.getValue(!0).length?a.removeAttr("placeholder"):a.attr("placeholder",a.data("placeholder"))),(e=r.closest("form").data("validator"))&&e.element(r)})},r.callbackOnCreateTemplates=function(){var r=l(this.passedElement.element);return{option:function(e){var t=Choices.defaults.templates.option.call(this,e);return void 0!==e.placeholder&&!0===e.placeholder&&t.classList.add("placeholder"),r.hasClass("wpforms-payment-price")&&void 0!==e.customProperties&&null!==e.customProperties&&(t.dataset.amount=e.customProperties),t}}},l(t).data("choicesjs",new Choices(t,r)))}),l(i).on("click",".choices",function(e){var t=l(this),r=t.find("select").data("choicesjs");r&&t.hasClass("is-open")&&(e.target.classList.contains("choices__inner")||e.target.classList.contains("choices__arrow"))&&r.hideDropdown()}))},bindUIActions:function(){var e=l(i);e.on("click",".wpforms-page-button",function(e){e.preventDefault(),p.pagebreakNav(this)}),e.on("change input",".wpforms-payment-price",function(){p.amountTotal(this,!0)}),e.on("input",".wpforms-payment-user-input",function(){var e=l(this),t=e.val();e.val(t.replace(/[^0-9.,]/g,""))}),e.on("focusout",".wpforms-payment-user-input",function(){var e=l(this),t=e.val();if(!t)return t;t=p.amountSanitize(t),t=p.amountFormat(t);e.val(t)}),e.on("wpformsProcessConditionals",function(e,t){p.amountTotal(t,!0)}),e.on("mouseenter",".wpforms-field-rating-item",function(){l(this).parent().find(".wpforms-field-rating-item").removeClass("selected hover"),l(this).prevAll().addBack().addClass("hover")}).on("mouseleave",".wpforms-field-rating-item",function(){l(this).parent().find(".wpforms-field-rating-item").removeClass("selected hover"),l(this).parent().find("input:checked").parent().prevAll().addBack().addClass("selected")}),l(i).on("change",".wpforms-field-rating-item input",function(){var e=l(this),t=e.closest(".wpforms-field-rating-items").find(".wpforms-field-rating-item");e.focus(),t.removeClass("hover selected"),e.parent().prevAll().addBack().addClass("selected")}),l(function(){l(".wpforms-field-rating-item input:checked").trigger("change")}),e.on("keydown",".wpforms-image-choices-item label",function(e){var t=l(this);if(t.closest(".wpforms-field").hasClass("wpforms-conditional-hide"))return e.preventDefault(),!1;32===e.keyCode&&(t.find("input").trigger("click"),e.preventDefault())}),s.document.documentMode&&e.on("click",".wpforms-image-choices-item img",function(){l(this).closest("label").find("input").trigger("click")}),e.on("change",".wpforms-field-checkbox input, .wpforms-field-radio input, .wpforms-field-payment-multiple input, .wpforms-field-payment-checkbox input, .wpforms-field-gdpr-checkbox input",function(e){var t=l(this);if(t.closest(".wpforms-field").hasClass("wpforms-conditional-hide"))return e.preventDefault(),!1;switch(t.attr("type")){case"radio":t.closest("ul").find("li").removeClass("wpforms-selected").find("input[type=radio]").removeProp("checked"),t.prop("checked",!0).closest("li").addClass("wpforms-selected");break;case"checkbox":t.is(":checked")?(t.closest("li").addClass("wpforms-selected"),t.prop("checked",!0)):(t.closest("li").removeClass("wpforms-selected"),t.prop("checked",!1))}}),e.on("input",".wpforms-field-file-upload",function(){var e=l(this),t=e.closest("form.wpforms-form").find('.wpforms-field-file-upload input:not(".dropzone-input")'),a=0,r=Number(wpforms_settings.post_max_size),o=''+wpforms_settings.val_post_max_size+"
",e=e.closest("form.wpforms-form").find(".wpforms-submit-container"),n=e.find("button.wpforms-submit"),i=e.prev(),s=n.closest("form"),p=s.find(".wpforms-page-next:visible");0!==s.find(".wpforms-page-indicator").length&&0!==p.length&&(n=p),t.each(function(){for(var e=l(this),t=0,r=e[0].files.length;t{errorMsg}