${e}
`))},removeNotice(e){e.length&&e.find(".wpforms-alert").length&&e.find(".wpforms-alert").remove()},checkNumberSliderStep:function(e){var e=parseFloat(e.target.value),i=b(this);!isNaN(e)&&0"+wpforms_builder.allow_deny_lists_intersect+'
'+e+"
",b.alert({title:wpforms_builder.heads_up,content:e,icon:"fa fa-exclamation-circle",type:"red",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}}))}))}),v.on("click",function(){k.focusOutEvent()}),v.on("focusout",y.defaultEmailSelector,function(){y.$focusOutTarget=b(this)}),v.on("change",".wpforms-field-option-row-size select",function(e){var i=b(this),o=i.val(),i=i.parent().data("field-id");b("#wpforms-field-"+i).removeClass("size-small size-medium size-large").addClass("size-"+o)}),v.on("input",".wpforms-field-option-row-placeholder input",function(){var e=b(this),i=e.parent().data("field-id"),o=b("#wpforms-field-"+i),t=o.find(".primary-input");let r=wpf.sanitizeHTML(e.val());"payment-single"===o.data("field-type")&&""===r&&(r=b("#wpforms-field-option-"+i+"-price").prop("placeholder")),t.is("select")?k.dropdownField.helpers.isModernSelect(t)?(e=k.dropdownField.helpers.getInstance(t),t.prop("multiple")?b(e.input.element).prop("placeholder",r):(e.setChoiceByValue(""),t.closest(".choices").find(".choices__inner .choices__placeholder").text(r),o=b("#wpforms-field-option-"+i+"-dynamic_choices").val(),k.dropdownField.helpers.update(i,o))):(e=t.find(".placeholder"),!r.length&&e.length?e.remove():(e.length?e.text(r):t.prepend('"),t.find(".placeholder").prop("selected",!t.prop("multiple")))):t.prop("placeholder",r)}),v.on("input",".wpforms-field-option-row-confirmation_placeholder input",function(e){var i=b(this),o=i.val(),i=i.parent().data("field-id");b("#wpforms-field-"+i).find(".secondary-input").attr("placeholder",o)}),v.on("input",".wpforms-field-option .format-selected input.placeholder",function(){var e=b(this),i=e.val(),e=e.closest(".wpforms-field-option-row"),o=e.data("field-id"),e=e.data("subfield");b("#wpforms-field-"+o).find(".wpforms-"+e+" input").attr("placeholder",i)}),v.on("input",".wpforms-field-option-address input.placeholder",function(){var e=b(this),i=e.closest(".wpforms-field-option-row"),o=i.data("field-id"),t=i.data("subfield"),r=b("#wpforms-field-"+o+" .wpforms-"+t).find("input, select"),i=i.find("#wpforms-field-option-"+o+"-"+t+"_default");const n=i.val(),s=i.find("option:selected").text();let l=e.val();r.each(function(){var e,i,o=b(this);o.is("select")?(e=o.find(".placeholder"),i=""===n&&""!==l?l:s,e.text(i)):o.attr("placeholder",l)})}),v.on("input",".wpforms-field-option-row-default_value input",function(){var e=b(this),i=wpf.sanitizeHTML(e.val()),e=e.closest(".wpforms-field-option-row").data("field-id");b("#wpforms-field-"+e+" .primary-input").val(i)}),v.on("input",".wpforms-field-options-column input.default",function(){var e=b(this),i=wpf.sanitizeHTML(e.val()),e=e.closest(".wpforms-field-option-row"),o=e.data("field-id"),e=e.data("subfield");b("#wpforms-field-"+o+" .wpforms-"+e+" input").val(i)}),v.on("change",".wpforms-field-option-address select.default",function(){var e=b(this),i=e.val(),o=e.find("option:selected").text(),e=e.closest(".wpforms-field-option-row"),t=e.data("field-id"),r=e.data("subfield"),n=b("#wpforms-field-option-"+t+"-scheme").val(),e=e.find("#wpforms-field-option-"+t+"-"+r+"_placeholder").val(),t=b("#wpforms-field-"+t+" .wpforms-address-scheme-"+n+" .wpforms-"+r+" .placeholder");""===i&&0'+wpforms_builder.bulk_add_heading+' '+wpforms_builder.bulk_add_presets_show+"
")+"${wpforms_builder.layout_selector_layout}
'+wpforms_builder[f+"_error"]+"
",t=b.confirm({container:v,title:!1,content:e+i+o,icon:"fa fa-info-circle",type:"blue",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){var e=this.$content.find("input#settings-block-name").val().toString().trim(),i=this.$content.find(".error");if(""===e)return i.show(),!1;{var i=l.closest(".wpforms-panel-content-section").find(".wpforms-builder-settings-block").first(),o=(wpf.restoreTooltips(i),i.clone()),t=i.data("block-id");o.attr("data-block-id",a),o.find(".wpforms-builder-settings-block-header span").text(e);o.find("input, textarea, select").each(function(){var e=b(this),i=e.parent();e.hasClass("wpforms-disabled")&&(i.hasClass("from-name")||i.hasClass("from-email"))||(i=e).attr("name")&&(i.val("").attr("name",i.attr("name").replace(/\[(\d+)\]/,"["+a+"]")),i.is("select")?(i.find("option").prop("selected",!1).attr("selected",!1),i.find("option").first().prop("selected",!0).attr("selected","selected")):"checkbox"===i.attr("type")?i.prop("checked",!1).attr("checked",!1).val("1"):i.val("").attr("value",""))});var n="wpforms-panel-field-"+d+"-",s=n+t,r=(o.find('[id^="'+s+'"], [for^="'+s+'"]').each(function(e,i){var o=b(this),t="LABEL"===o.prop("tagName")?"for":"id",r=o.attr(t).replace(new RegExp(s,"g"),n+a);o.attr(t,r)}),t+"-notification-by-status"),t=(o.find('[data-radio-group="'+r+'"]').each(function(e,i){b(this).removeClass("wpforms-radio-group-"+r).addClass("wpforms-radio-group-"+a+"-notification-by-status").attr("data-radio-group",a+"-notification-by-status")}),o.find(".wpforms-builder-settings-block-header input").val(e).attr("value",e),"notification"===f&&(o.find(".email-msg textarea").val("{all_fields}").attr("value","{all_fields}"),o.find(".email-recipient input").val("{admin_email}").attr("value","{admin_email}")),o.removeClass("wpforms-builder-settings-block-default"),"confirmation"===f&&(o.find(".wpforms-panel-field-tinymce").remove(),"undefined"!=typeof WPForms)&&o.find(".wpforms-panel-field-confirmations-type-wrap").after(WPForms.Admin.Builder.Templates.get("wpforms-builder-confirmations-message-field")({id:a})),o.find(".wpforms-conditional-block")),e=(t.length&&"undefined"!=typeof WPForms&&t.html(WPForms.Admin.Builder.Templates.get("wpforms-builder-conditional-logic-toggle-field")({id:a,type:f,actions:JSON.stringify(o.find(".wpforms-panel-field-conditional_logic-checkbox").data("actions")),actionDesc:o.find(".wpforms-panel-field-conditional_logic-checkbox").data("action-desc")})),o.find(".wpforms-field-map-table")),e=(e.length&&e.each(function(e,i){var i=b(i),o=(i.find("tr:not(:first-child)").remove(),i.find(".key input")),i=i.find(".field select"),t=i.data("name");o.attr("value",""),i.attr("name","").attr("data-name",t.replace(/\[(\d+)\]/,"["+a+"]"))}),t=(t=o.wrap(""+e+"
"+wpforms_builder.error_contact_support+"
",icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}})},formExit:function(){k.isBuilderInPopup()&&k.formIsSaved()?k.builderInPopupClose("saved"):k.formIsSaved()?l.location.href=wpforms_builder.exit_url:b.confirm({title:!1,content:wpforms_builder.exit_confirm,icon:"fa fa-exclamation-circle",type:"orange",closeIcon:!0,buttons:{confirm:{text:wpforms_builder.save_exit,btnClass:"btn-confirm",keys:["enter"],action:function(){k.formSave(!0)}},cancel:{text:wpforms_builder.exit,action:function(){i=!1,k.isBuilderInPopup()?k.builderInPopupClose("canceled"):l.location.href=wpforms_builder.exit_url}}}})},setCloseConfirmation:function(e){i=!!e},formIsSaved:function(){return wpf.savedState==wpf.getFormState("#wpforms-builder-form")},isBuilderInPopup:function(){return l.self!==l.parent&&"wpforms-builder-iframe"===l.self.frameElement.id},builderInPopupClose:function(e){var i=l.parent.jQuery(".wpforms-builder-popup"),o=b(".wpforms-center-form-name").text();i.find("#wpforms-builder-iframe").attr("src","about:blank"),i.fadeOut(),i.trigger("wpformsBuilderInPopupClose",[e,m.formID,o])},bindUIActionsGeneral:function(){v.on("click",".toggle-smart-tag-display",k.smartTagToggle),v.on("click",".smart-tags-list-display a",k.smartTagInsert),v.on("click",".wpforms-panel-fields-group.unfoldable .wpforms-panel-fields-group-title",k.toggleUnfoldableGroup),v.on("click",".wpforms-field-helper-hide ",k.hideFieldHelper),v.on("input",".wpforms-field-map-table .key-source",function(){var e=b(this).val(),i=b(this).parent().parent().find(".key-destination"),o=i.data("name");e&&i.attr("name",o.replace("{source}",e.replace(/[^0-9a-zA-Z_-]/gi,"")))}),v.on("click",".wpforms-field-map-table .remove",function(e){e.preventDefault(),k.fieldMapTableDeleteRow(e,b(this))}),v.on("click",".wpforms-field-map-table .add",function(e){e.preventDefault(),k.fieldMapTableAddRow(e,b(this))}),b(r).on("wpformsFieldUpdate",k.fieldMapSelect),v.on("input",".wpforms-money-input",function(e){var i=b(this),o=i.val(),t=i[0].selectionStart,r=i[0].selectionEnd;i.val(o.replace(/[^0-9.,]/g,"")),i[0].setSelectionRange(t,r)}),v.on("focusout",".wpforms-money-input",function(e){var i=b(this),o=i.val();if(!o)return o;o=wpf.amountSanitize(o),o=wpf.amountFormat(o);i.val(o)}),v.on("change",".wpforms-panel-field-toggle",function(){var e=b(this);e.prop("disabled")||(e.prop("disabled",!0),k.toggleOptionsGroup(e))}),v.on("change",k.getPaymentsTogglesSelector(),function(e){var i=b(this),o=i.attr("id").replace(/wpforms-panel-field-|-enable|_one_time|_recurring/gi,""),t=b('.wpforms-panel-content-section-notifications [id*="-'+o+'-wrap"]');i.prop("checked")||b("#wpforms-panel-field-"+o+"-enable_one_time").prop("checked")||b("#wpforms-panel-field-"+o+"-enable_recurring").prop("checked")?b("#wpforms-panel-field-settings-disable_entries").prop("checked")?(b.confirm({title:wpforms_builder.heads_up,content:wpforms_builder.payments_entries_off,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}}),i.prop("checked",!1)):t.removeClass("wpforms-hidden"):(t.addClass("wpforms-hidden"),t.find('input[id*="-'+o+'"]').prop("checked",!1))}),v.on("change","#wpforms-panel-field-settings-disable_entries",function(e){var i=b(this);i.prop("checked")&&(k.isPaymentsEnabled()?(b.confirm({title:wpforms_builder.heads_up,content:wpforms_builder.payments_on_entries_off,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}}),i.prop("checked",!1)):b.alert({title:wpforms_builder.heads_up,content:wpforms_builder.disable_entries,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}}))}),v.on("click",".wpforms-image-upload-add",function(e){e.preventDefault();var i=b(this),o=i.parent(),t=wp.media.frames.wpforms_media_frame=wp.media({className:"media-frame wpforms-media-frame",frame:"select",multiple:!1,title:wpforms_builder.upload_image_title,library:{type:"image"},button:{text:wpforms_builder.upload_image_button}});t.on("select",function(){var e=t.state().get("selection").first().toJSON();o.find(".source").val(e.url),o.find(".preview").empty(),o.find(".preview").prepend(''),"hide"===i.data("after-upload")&&i.hide(),v.trigger("wpformsImageUploadAdd",[i,o])}),t.open()}),v.on("click",".wpforms-image-upload-remove",function(e){e.preventDefault();e=b(this).parent().parent();e.find(".preview").empty(),e.find(".wpforms-image-upload-add").show(),e.find(".source").val(""),v.trigger("wpformsImageUploadRemove",[b(this),e])}),v.on("blur",".wpforms-notification .wpforms-panel-field-text input",function(){k.validateEmailSmartTags(b(this))}),v.on("blur",".wpforms-notification .wpforms-panel-field-textarea textarea",function(){k.validateEmailSmartTags(b(this))}),v.on("focusout",".wpforms-notification .wpforms-panel-field.js-wpforms-from-email-validation input",k.validateFromEmail),v.on("wpformsPanelSectionSwitch",k.notificationsPanelSectionSwitch),v.on("click","#wpforms-builder-mobile-notice .wpforms-fullscreen-notice-button-primary, #wpforms-builder-mobile-notice .close",function(){l.location.href=wpforms_builder.exit_url}),v.on("click","#wpforms-builder-mobile-notice .wpforms-fullscreen-notice-button-secondary",function(){l.location.href=wpf.updateQueryString("force_desktop_view",1,l.location.href)}),b("#wpforms-builder-license-alert .close").on("click",function(){l.location.href=wpforms_builder.exit_url}),b("#wpforms-builder-license-alert .dismiss").on("click",function(e){e.preventDefault(),b("#wpforms-builder-license-alert").remove(),wpCookies.set("wpforms-builder-license-alert","true",3600)}),v.on("change","#wpforms-panel-field-settings-akismet.wpforms-akismet-disabled",function(e){const i=b(this),o=i.data("akismet-status");i.prop("checked")&&b.alert({title:wpforms_builder.heads_up,content:wpforms_builder[o],icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}},onClose:function(){i.prop("checked",!1)}})})},notificationsPanelSectionSwitch:function(e,i){"notifications"===i&&b(".wpforms-notification .wpforms-panel-field.js-wpforms-from-email-validation input").trigger("focusout")},isPaymentsEnabled:function(){var e=!1;return b(k.getPaymentsTogglesSelector()).each(function(){if(b(this).prop("checked"))return!(e=!0)}),e},getPaymentsTogglesSelector:function(){return`.wpforms-panel-content-section-payment-toggle-one-time input, .wpforms-panel-content-section-payment-toggle-recurring input, #wpforms-panel-field-stripe-enable, #wpforms-panel-field-paypal_standard-enable, #wpforms-panel-field-authorize_net-enable, #wpforms-panel-field-square-enable`},toggleOptionsGroup:function(e){function i(){e.prop("disabled",!1)}var o=e.attr("name"),t=e.attr("type"),r="",o=b('.wpforms-panel-field-toggle-body[data-toggle="'+o+'"]');0===o.length?i():(r="checkbox"!==t&&"radio"!==t||e.prop("checked")?e.val():"0",o.each(function(){var e=b(this);e.attr("data-toggle-value").toString()===r.toString()?e.slideDown("",i):e.slideUp("",i)}))},toggleAllOptionGroups:function(e){(e=e||v||b("#wpforms-builder")||b("body"))&&e.find(".wpforms-panel-field-toggle").each(function(){var e=b(this);e.prop("disabled",!0),k.toggleOptionsGroup(e)})},toggleUnfoldableGroup:function(e){e.preventDefault();var i=b(e.target).closest(".wpforms-panel-fields-group"),e=i.find(".wpforms-panel-fields-group-inner"),o="wpforms_fields_group_"+i.data("group");i.hasClass("opened")?(wpCookies.remove(o),e.stop().slideUp(150,function(){i.removeClass("opened")})):(wpCookies.set(o,"true",2592e3),i.addClass("opened"),e.stop().slideDown(150))},hideFieldHelper:function(e){e.preventDefault(),e.stopPropagation();e=b(".wpforms-field-helper");wpCookies.set("wpforms_field_helper_hide","true",2592e3),e.hide()},smartTagToggle:function(e){e.preventDefault(),y.$focusOutTarget=null;var e=b(this),i=e.closest(".wpforms-panel-field,.wpforms-field-option-row");i.hasClass("smart-tags-toggling")||(i.addClass("smart-tags-toggling"),e.hasClass("smart-tag-showing")?k.removeSmartTagsList(e):k.insertSmartTagsList(e))},removeSmartTagsList:function(e){var i=e.closest(".wpforms-panel-field,.wpforms-field-option-row"),o=i.find(".smart-tags-list-display");e.find("span").text(wpforms_builder.smart_tags_show),o.slideUp("",function(){o.remove(),e.removeClass("smart-tag-showing"),i.removeClass("smart-tags-toggling")})},insertSmartTagsList:function(e){var i,o=e.closest(".wpforms-panel-field,.wpforms-field-option-row"),t=e.closest("label"),r=!0;t.length||(t=o.find("label"),r=!1),i=k.getSmartTagsList(e,-1!==t.attr("for").indexOf("wpforms-field-option-")),(r?t:e).after(i),e.find("span").text(wpforms_builder.smart_tags_hide),o.find(".smart-tags-list-display").slideDown("",function(){e.addClass("smart-tag-showing"),o.removeClass("smart-tags-toggling")})},getSmartTagsList:function(e,i){var o=' "},getSmartTagsListFieldsElements:function(e){var i,o=e.data("type"),t=k.getSmartTagsFields(e),r="";if(!["fields","all"].includes(o))return"";if(!t)return'