(t=>{_.isUndefined(window.vc)&&(window.vc={}),window.Vc_postSettingsEditor=Backbone.View.extend({$editor:!1,sel:"",mode:"",is_focused:!1,ace_enabled:!1,initialize:function(e){e&&0{var e,t,i=n.getValue();h!==i&&(t=o.id,(e=window.vc.page_settings_editor||{})[t]={editor:d.$editor},s&&(e[t].currentValue=i,e[t].previousValue=h),window.vc.page_settings_editor=e,t=new CustomEvent("wpbAceEditorContentChanged",{detail:e}),s&&document.dispatchEvent(t),h=i)},1e3))}),this.$editor.session.setOption("wrap","free")),this.$editor.setValue(e),this.$editor.clearSelection(),this.is_focused&&this.$editor.focus();var o,n,t,i,h,d,e=this.$editor.getSession().getLength();return this.$editor.gotoLine(e,this.$editor.getSession().getLine(e-1).length),this.$editor},setEditorTextarea:function(e){return this.$editor||(this.$editor=t("").css({width:"100%",height:"100%",minHeight:"300px"}),t("#"+this.sel).empty().append(this.$editor).css({overflowLeft:"hidden",width:"100%",height:"100%"})),this.$editor.val(e),this.is_focused&&this.$editor.focus(),this.$editor.parent().css({overflow:"auto"}),this.$editor},setSize:function(){var e=t(window).height()-380;this.aceEnabled()?t("#"+this.sel).css({height:e,minHeight:e}):(this.$editor.parent().css({height:e,minHeight:e}),this.$editor.css({height:"98%",width:"98%"}))},setSizeResizable:function(){var e=t("#"+this.sel);this.aceEnabled()?e.css({height:"30vh",minHeight:"30vh"}):(this.$editor.parent().css({height:"30vh",minHeight:"30vh"}),this.$editor.css({height:"98%",width:"98%"}))},getEditor:function(){return this.$editor},getValue:function(){return this.aceEnabled()?this.$editor.getValue():this.$editor.val()}})})(window.jQuery);