!function(e){formintorjs.define(["admin/builder/sidebar/settings-factory","text!admin/templates/builder-sidebar.html"],function(i,t){return Backbone.View.extend({tpl:Forminator.Utils.template(e(t).find("#builder-sidebar-settings-tpl").html()),className:"wpmudev-sidebar",events:{"click .wpmudev-sidebar--header .wpmudev-breadcrumb--back":"destroy_settings","click .wpmudev-sidebar--footer .wpmudev-done-field":"destroy_settings","click .wpmudev-sidebar--footer .wpmudev-clone-field":"clone_field","click .wpmudev-sidebar--footer .wpmudev-delete-field":"delete_field"},initialize:function(e){return this.field=e.field,this.field_settings=e.field_settings,this.render()},render:function(){var e={field:this.field,field_settings:this.field_settings};this.$el.html(this.tpl(e)),this.$el.find(".wpmudev-sidebar--section").tabs(),this.render_general_settings(),"true"===this.field_settings.hide_advanced?(this.$el.find(".settings-advanced").remove(),this.$el.find("#wpmudev-settings--advanced").remove()):this.render_advanced_settings()},render_general_settings:function(){var e=new i({model:this.model,field:this.field,field_settings:this.field_settings,tab:"General"});this.$el.find("#wpmudev-settings--general").append(e.$el)},render_advanced_settings:function(){var e=new i({model:this.model,field:this.field,field_settings:this.field_settings,tab:"Advanced"});this.$el.find("#wpmudev-settings--advanced").append(e.$el)},destroy_settings:function(i){i.preventDefault(),e("body").find(".wpmudev-form-field").each(function(){e(this).removeClass("wpmudev-is_active")}),Forminator.Events.trigger("forminator:sidebar:close:settings")},cleanUp:function(){this.$el.off(),this.remove()},clone_field:function(e){e.preventDefault(),Forminator.Events.trigger("sidebar:clone:field",this.field)},delete_field:function(e){e.preventDefault(),Forminator.Events.trigger("sidebar:delete:field",this.field)}})})}(jQuery);