'+wpforms_builder.bulk_add_heading+' '+wpforms_builder.bulk_add_presets_show+"
",r+="'+wpforms_builder.layout_selector_layout+"
",n+=''+wpforms_builder[f+"_error"]+"
",o=w.confirm({container:g,title:!1,content:e+t+i,icon:"fa fa-info-circle",type:"blue",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){var e=w.trim(this.$content.find("input#settings-block-name").val()),t=this.$content.find(".error");if(""===e)return t.show(),!1;var i=s.closest(".wpforms-panel-content-section").find(".wpforms-builder-settings-block").first();wpf.restoreTooltips(i);var o=i.clone(),t=i.data("block-id");o.attr("data-block-id",l),o.find(".wpforms-builder-settings-block-header span").text(e),o.find("input, textarea, select").not(".from-name input").not(".from-email input").each(function(e,t){var i=w(this);i.attr("name")&&(i.val("").attr("name",i.attr("name").replace(/\[(\d+)\]/,"["+l+"]")),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+"-",a=n+t;o.find('[id^="'+a+'"], [for^="'+a+'"]').each(function(e,t){var i=w(this),o="LABEL"===i.prop("tagName")?"for":"id",r=i.attr(o).replace(new RegExp(a,"g"),n+l);i.attr(o,r)});var r=t+"-notification-by-status";o.find('[data-radio-group="'+r+'"]').each(function(e,t){w(this).removeClass("wpforms-radio-group-"+r).addClass("wpforms-radio-group-"+l+"-notification-by-status").attr("data-radio-group",l+"-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:l})));e=o.find(".wpforms-conditional-block");e.length&&"undefined"!=typeof WPForms&&e.html(WPForms.Admin.Builder.Templates.get("wpforms-builder-conditional-logic-toggle-field")({id:l,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")}));e=o.find(".wpforms-field-map-table");e.length&&e.each(function(e,t){var i=w(t);i.find("tr:not(:first-child)").remove();var o=i.find(".key input"),t=i.find(".field select"),i=t.data("name");o.attr("value",""),t.attr("name","").attr("data-name",i.replace(/\[(\d+)\]/,"["+l+"]"))}),o=(o=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(){m.isBuilderInPopup()&&m.formIsSaved()?m.builderInPopupClose("saved"):m.formIsSaved()?a.location.href=wpforms_builder.exit_url:w.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(){m.formSave(!0)}},cancel:{text:wpforms_builder.exit,action:function(){t=!1,m.isBuilderInPopup()?m.builderInPopupClose("canceled"):a.location.href=wpforms_builder.exit_url}}}})},setCloseConfirmation:function(e){t=!!e},formIsSaved:function(){return wpf.savedState==wpf.getFormState("#wpforms-builder-form")},isBuilderInPopup:function(){return a.self!==a.parent&&"wpforms-builder-iframe"===a.self.frameElement.id},builderInPopupClose:function(e){var t=a.parent.jQuery("#wpforms-builder-elementor-popup");t.find("#wpforms-builder-iframe").attr("src","about:blank"),t.fadeOut(),t.trigger("wpformsBuilderInPopupClose",[e,h.formID])},bindUIActionsGeneral:function(){g.on("click",".toggle-smart-tag-display",m.smartTagToggle),g.on("click",".smart-tags-list-display a",m.smartTagInsert),g.on("click",".wpforms-panel-fields-group.unfoldable .wpforms-panel-fields-group-title",m.toggleUnfoldableGroup),g.on("input",".wpforms-field-map-table .key-source",function(){var e=w(this).val(),t=w(this).parent().parent().find(".key-destination"),i=t.data("name");e&&t.attr("name",i.replace("{source}",e.replace(/[^0-9a-zA-Z_-]/gi,"")))}),g.on("click",".wpforms-field-map-table .remove",function(e){e.preventDefault(),m.fieldMapTableDeleteRow(e,w(this))}),g.on("click",".wpforms-field-map-table .add",function(e){e.preventDefault(),m.fieldMapTableAddRow(e,w(this))}),w(r).on("wpformsFieldUpdate",m.fieldMapSelect),g.on("input",".wpforms-money-input",function(e){var t=w(this),i=t.val(),o=t[0].selectionStart,r=t[0].selectionEnd;t.val(i.replace(/[^0-9.,]/g,"")),t[0].setSelectionRange(o,r)}),g.on("focusout",".wpforms-money-input",function(e){var t=w(this),i=t.val();if(!i)return i;i=wpf.amountSanitize(i),i=wpf.amountFormat(i);t.val(i)}),g.on("change",".wpforms-panel-field-toggle",function(){var e=w(this);e.prop("disabled")||(e.prop("disabled",!0),m.toggleOptionsGroup(e))}),g.on("change","#wpforms-panel-field-stripe-enable, #wpforms-panel-field-paypal_standard-enable, #wpforms-panel-field-authorize_net-enable, #wpforms-panel-field-square-enable",function(e){var t=w(this),i=t.attr("id").replace("wpforms-panel-field-","").replace("-enable",""),o=w('.wpforms-panel-content-section-notifications [id*="-'+i+'-wrap"]');t.prop("checked")?w("#wpforms-panel-field-settings-disable_entries").prop("checked")?(w.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"]}}}),t.prop("checked",!1)):o.removeClass("wpforms-hidden"):(o.addClass("wpforms-hidden"),o.find('input[id*="-'+i+'"]').prop("checked",!1))}),g.on("change","#wpforms-panel-field-settings-disable_entries",function(e){var t=w(this);t.prop("checked")&&(w("#wpforms-panel-field-stripe-enable").prop("checked")||w("#wpforms-panel-field-paypal_standard-enable").prop("checked")||w("#wpforms-panel-field-authorize_net-enable").prop("checked")||w("#wpforms-panel-field-square-enable").prop("checked")?(w.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"]}}}),t.prop("checked",!1)):w.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"]}}}))}),g.on("click",".wpforms-image-upload-add",function(e){e.preventDefault();var t=w(this),i=t.parent(),o=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}});o.on("select",function(){var e=o.state().get("selection").first().toJSON();i.find(".source").val(e.url),i.find(".preview").empty(),i.find(".preview").prepend(''),"hide"===t.data("after-upload")&&t.hide(),g.trigger("wpformsImageUploadAdd",[t,i])}),o.open()}),g.on("click",".wpforms-image-upload-remove",function(e){e.preventDefault();e=w(this).parent().parent();e.find(".preview").empty(),e.find(".wpforms-image-upload-add").show(),e.find(".source").val(""),g.trigger("wpformsImageUploadRemove",[w(this),e])}),g.on("blur",".wpforms-notification .wpforms-panel-field-text input",function(){m.validateEmailSmartTags(w(this))}),g.on("blur",".wpforms-notification .wpforms-panel-field-textarea textarea",function(){m.validateEmailSmartTags(w(this))}),g.on("click",".wpforms-fullscreen-notice-go-back",m.exitBack),w("#wpforms-builder-license-alert .close").on("click",m.exitBack)},toggleOptionsGroup:function(e){function t(){e.prop("disabled",!1)}var i=e.attr("name"),o=e.attr("type"),r="",i=w('.wpforms-panel-field-toggle-body[data-toggle="'+i+'"]');0!==i.length?(r="checkbox"!==o&&"radio"!==o||e.prop("checked")?e.val():"0",i.each(function(){var e=w(this);e.attr("data-toggle-value").toString()===r.toString()?e.slideDown("",t):e.slideUp("",t)})):t()},toggleAllOptionGroups:function(e){(e=e||g||w("#wpforms-builder")||w("body"))&&e.find(".wpforms-panel-field-toggle").each(function(){var e=w(this);e.prop("disabled",!0),m.toggleOptionsGroup(e)})},toggleUnfoldableGroup:function(e){e.preventDefault();var t=w(e.target).closest(".wpforms-panel-fields-group"),i=t.find(".wpforms-panel-fields-group-inner"),e="wpforms_fields_group_"+t.data("group");t.hasClass("opened")?(wpCookies.remove(e),t.removeClass("opened"),i.stop().slideUp()):(wpCookies.set(e,"true",2592e3),t.addClass("opened"),i.stop().slideDown())},smartTagToggle:function(e){e.preventDefault();var t=w(this),e=t.closest(".wpforms-panel-field,.wpforms-field-option-row");e.hasClass("smart-tags-toggling")||(e.addClass("smart-tags-toggling"),t.hasClass("smart-tag-showing")?m.removeSmartTagsList(t):m.insertSmartTagsList(t))},removeSmartTagsList:function(e){var t=e.closest(".wpforms-panel-field,.wpforms-field-option-row"),i=t.find(".smart-tags-list-display");e.find("span").text(wpforms_builder.smart_tags_show),i.slideUp("",function(){i.remove(),e.removeClass("smart-tag-showing"),t.removeClass("smart-tags-toggling")})},insertSmartTagsList:function(e){var t,i=e.closest(".wpforms-panel-field,.wpforms-field-option-row"),o=e.closest("label"),r=!0;o.length||(o=i.find("label"),r=!1),t=m.getSmartTagsList(e,-1!==o.attr("for").indexOf("wpforms-field-option-")),(r?o:e).after(t),e.find("span").text(wpforms_builder.smart_tags_hide),i.find(".smart-tags-list-display").slideDown("",function(){e.addClass("smart-tag-showing"),i.removeClass("smart-tags-toggling")})},getSmartTagsList:function(e,t=!1){var i=' "},getSmartTagsListFieldsElements:function(e){var t,i=e.data("type"),o=m.getSmartTagsFields(e),r="";if(!["fields","all"].includes(i))return"";if(!o)return'