(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n",{value:e,text:e}))})),a.attr("disabled",!1).val(e[t])}))}))}else jQuery.each(e,(function(e,n){jQuery('[name="'.concat(t,"[").concat(e,']"]')).val(n).change()}))}else if("[object Array]"===a){var o=jQuery("[name=".concat(t,"]"));if("file"==(o=(o=o.length?o:jQuery("[data-name=".concat(t,"]"))).length?o:jQuery("[name=".concat(t,"\\[\\]]"))).attr("type"))y(o,e);else if(o.prop("multiple"))if(n.isFunction(window.Choices)){var l=o.data("choicesjs");r.push({handler:l,values:e})}else o.val(e).change();else if("repeater_field"===o.attr("data-type")){var c=o.find("tbody"),d=o.attr("data-name");jQuery.each(e,(function(t,e){0!=t?c.find("tr:last").clone().appendTo(c).find(".ff-el-form-control").each((function(a,f){var r="ffrpt-"+(new Date).getTime()+a;n(f).val(e[a]),n(f).attr({id:r,name:"".concat(d,"[").concat(t,"][]"),value:e[a]}).change()})):c.find("tr:first .ff-el-form-control").each((function(t,a){n(a).val(e[t]).change()}))}))}else o.each((function(t,a){-1!=jQuery.inArray(n(a).val(),e)&&n(a).prop("checked",!0).change()}))}else{var u=jQuery("[name=".concat(t,"]"));if("radio"===u.prop("type")||"checkbox"===u.prop("type"))jQuery("[name=".concat(t,'][value="').concat(e,'"]')).prop("checked",!0).change();else{var p=u.closest(".ff-el-group").find(".fluentform-signature-pad");if(p.length){var v=p[0].getContext("2d"),m=new Image;m.src=e,m.onload=function(){v.drawImage(m,0,0)}}u.val(e).change()}}}})),r.length>0)for(var i=0;i .step-nav button",(function(t){9==t.which&&"next"==n(this).data("action")&&t.preventDefault()})),n(r).on("click",".fluentform-step .step-nav button, .fluentform-step .step-nav img",(function(e){var f=n(this).data("action"),r="next",s=n(this).closest(".fluentform-step"),o=u();if("next"==f){try{var l=s.find(":input").not(":button").filter((function(t,e){return!n(e).closest(".has-conditions").hasClass("ff_excluded")}));l.length&&o.validate(l),i++}catch(e){if(!(e instanceof window.ffValidationError))throw e;return o.showErrorMessages(e.messages),void o.scrollToFirstError(350)}a.trigger("ff_to_next_page",i),jQuery(document).trigger("ff_to_next_page",{step:i,form:a});var c=a.find(".fluentform-step");a.trigger("ff_render_dynamic_smartcodes",n(c[i]))}else i--,r="prev",a.trigger("ff_to_prev_page",i),jQuery(document).trigger("ff_to_prev_page",{step:i,form:a});var d="yes"!=a.find(".ff-step-container").attr("data-disable_auto_focus");h(i,t,d,r)}))},h=function(t,f){var l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"next";n("div"+r+"_errors").empty(),i=t;var p=a.find(".ff-step-body"),v=a.find(".ff-step-titles li"),_=a.find(".fluentform-step"),h=_.length;a.offset().top,n("#wpadminbar");_.removeClass("active"),n(_[i]).addClass("active"),v.removeClass("ff_active ff_completed"),n.each(e(Array(i).keys()),(function(t){n(n(v[t])).addClass("ff_completed")})),n(v[i]).addClass("ff_active");var y=function(){if(!window.ff_disable_step_scroll){var t=a.find(".ff_step_start");if(window.ff_scroll_top_offset)var e=window.ff_scroll_top_offset;else e=t.offset().top-20;var r,i,s,o,l;(i=(r=t).offset().top,s=i+r.outerHeight(),o=n(window).scrollTop(),l=o+n(window).height(),s>o&&i div").length-1,n=a.find(".fluentform-step.active > .ff_excluded").length;a.find(".fluentform-step.active > .ff-t-container").length&&(e-=a.find(".fluentform-step.active > .ff-t-container").length,e+=a.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > div").length,n+=a.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > .ff_excluded").length,a.find(".fluentform-step.active > .ff-t-container.ff_excluded").length&&(n-=a.find(".fluentform-step.active > .ff-t-container.ff_excluded").length,n-=a.find(".fluentform-step.active > .ff-t-container.ff_excluded > .ff-t-cell > .ff_excluded").length,n+=a.find(".fluentform-step.active > .ff-t-container.ff_excluded > .ff-t-cell > div").length)),e==n&&t.find(".step-nav button[data-action="+u+"], .step-nav img[data-action="+u+"]").click()}),w)}},g=function(t,e){var a=t.find(":input").filter((function(t,e){return!n(e).closest(".has-conditions").hasClass("ff_excluded")}));a.filter((function(t,e){var a=n(e);return a.parents().hasClass("ff_repeater_table")&&"select"==a.attr("type")&&!a.val()})).prepend("