(()=>{"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,e){for(var n=0;nthis.clientWidth+1;e.toggleClass("ff-step-titles--overflowing",i)})}},{key:"isTabsIndicator",value:function(t){return"tabs"===t||"steps_with_nav"===t}},{key:"initFormWithSavedState",value:function(){var t=this;if(this.stepPersistency){var e=this.$,i=this;e(document).ready(function(n){var a,s;e.getJSON(t.fluentFormVars.ajaxUrl,{form_id:t.$theForm.data("form_id"),action:"fluentform_step_form_get_data",nonce:null===(a=t.fluentFormVars)||void 0===a?void 0:a.nonce,hash:null===(s=t.fluentFormVars)||void 0===s?void 0:s.hash}).then(function(t){t&&i.populateFormDataAndSetActiveStep(t)})})}}},{key:"populateFormDataAndSetActiveStep",value:function(t){var e=this,i=t.response,n=t.step_completed,a=this.$,s=[];if(this.$theForm.data("ff_restoring_draft_state",!0),this.$theForm.data("ff_restored_draft_state",!0),a.each(i,function(t,i){if(i){var n=Object.prototype.toString.call(i);if("[object Object]"===n){var r=e.$theForm.find("[data-name=".concat(t,"]"));if(r.length&&"tabular-element"===r.attr("data-type"))jQuery.each(i,function(i,n){var s=e.$theForm.find('[name="'.concat(t,"[").concat(i,']\\[\\]"]'));s.length||(s=e.$theForm.find('[name="'.concat(t,"[").concat(i,']"]'))),a.each(s,function(t,e){var i=a(e).val();-1===a.inArray(i,n)&&i!==n||a(e).prop("checked",!0).change()})});else if("chained-select"===r.attr("data-type")){var o={meta_key:r.find("select:first").attr("data-meta_key"),form_id:r.closest("form").attr("data-form_id"),action:"fluentform_get_chained_select_options",filter_options:"all",keys:i};a.getJSON(e.fluentFormVars.ajaxUrl,o).then(function(t){a.each(t,function(t,e){var n=r.find("select[data-key='".concat(t,"']"));0!=n.attr("data-index")&&a.each(e,function(t,e){n.append(a("