OwlCyberSecurity - MANAGER
Edit File: backend.min.js
(o=>{o.vc||(o.vc={}),o.vc.utils={fixUnclosedTags:function(o){return o.replace(/<([^>]+)$/g,"<")},fallbackCopyTextToClipboard:function(o){var e=document.createElement("textarea");e.value=o,e.style.top="0",e.style.left="0",e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")}catch(o){console.error("Unable to copy",o)}document.body.removeChild(e)},copyTextToClipboard:function(o){navigator.clipboard?navigator.clipboard.writeText(o):this.fallbackCopyTextToClipboard(o)}}})(window); window.vc||(window.vc={}),(()=>{function l(e){return"\\"+n[e]}vc.templateOptions={default:{evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},custom:{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g}};var a=/(.)^/,n={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},i=/\\|'|\r|\n|\u2028|\u2029/g;vc.template=function(u,e){e=_.defaults({},e,vc.templateOptions.default);var n,t=RegExp([(e.escape||a).source,(e.interpolate||a).source,(e.evaluate||a).source].join("|")+"|$","g"),c=0,o="__p+='";u.replace(t,function(e,n,t,r,a){return o+=u.slice(c,a).replace(i,l),c=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":t?o+="'+\n((__t=("+t+"))==null?'':__t)+\n'":r&&(o+="';\n"+r+"\n__p+='"),e}),o+="';\n",o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+(o=e.variable?o:"with(obj||{}){\n"+o+"}\n")+"return __p;\n";try{n=new Function(e.variable||"obj","_",o)}catch(e){throw e.source=o,e}function r(e){return n.call(this,e,_)}t=e.variable||"obj";return r.source="function("+t+"){\n"+o+"}",r}})(); window.Backbone.View.vcExtendUI=function(t){var e=this.extend(t);return e.prototype._vcUIEventsHooks||(e.prototype._vcUIEventsHooks=[]),t.uiEvents&&e.prototype._vcUIEventsHooks.push(t.uiEvents),e},window.vc.View=Backbone.View.extend({delegateEvents:function(){vc.View.__super__.delegateEvents.call(this),this._vcUIEventsHooks&&this._vcUIEventsHooks.length&&_.each(this._vcUIEventsHooks,function(t){_.isObject(t)&&_.each(t,function(t,e){_.isString(t)&&_.each(t.split(/\s+/),function(t){this.on(e,this[t],this)},this)},this)},this)}}); (l=>{_.isUndefined(window.vc)&&(window.vc={}),l.ajaxSetup({beforeSend:function(e,t){"script"===t.dataType&&!0===t.cache&&(t.cache=!1),"script"===t.dataType&&!1===t.async&&(t.async=!0)}}),vc.showSpinner=function(){l("#vc_logo").addClass("vc_ui-wp-spinner")},vc.hideSpinner=function(){l("#vc_logo").removeClass("vc_ui-wp-spinner")},l(document).ajaxSend(function(e,t,i){i&&i.data&&"string"==typeof i.data&&i.data.match(/vc_inline=true/)&&vc.showSpinner()}).ajaxStop(function(){vc.hideSpinner()}),vc.active_panel=!1,vc.closeActivePanel=function(e){if(!this.active_panel)return!1;(e&&vc.active_panel.model&&vc.active_panel.model.get("id")===e.get("id")||!e)&&(vc.active_panel.model=null,this.active_panel.hide())},vc.activePanelName=function(){return this.active_panel&&this.active_panel.panelName?this.active_panel.panelName:null},vc.updateSettingsBadge=function(){l("a.vc_post-settings > .vc_post-settings-icon span.vc_badge").each(function(){var e=l(this);vc.isShowBadge()?e.show():e.hide()})},vc.isShowBadge=function(){var t=!1;return["css","js_header","js_footer"].forEach(function(e){var e="$custom_"+e;vc[e]&&(e=vc[e].val())&&""!==e.trim()&&(t=!0)}),t},vc.ModalView=Backbone.View.extend({message_box_timeout:!1,events:{"hidden.bs.modal":"hide","shown.bs.modal":"shown"},initialize:function(){_.bindAll(this,"setSize","hide")},setSize:function(){var e=l(window).height()-150;this.$content.css("maxHeight",e),this.trigger("setSize")},render:function(){return l(window).on("resize.ModalView",this.setSize),this.setSize(),vc.closeActivePanel(),this.$el.modal("show"),this},showMessage:function(e,t){this.message_box_timeout&&this.$el.find(".vc_message").remove()&&window.clearTimeout(this.message_box_timeout),this.message_box_timeout=!1;var i=l('<div class="vc_message type-'+t+'"></div>');this.$el.find(".vc_modal-body").prepend(i),i.text(e).fadeIn(),this.message_box_timeout=window.setTimeout(function(){i.remove()},6e3)},hide:function(){l(window).off("resize.ModalView")},shown:function(){}}),vc.element_start_index=0,vc.AddElementBlockView=vc.ModalView.extend({el:l("#vc_add-element-dialog"),prepend:!1,builder:"",events:{"click .vc_shortcode-link":"createElement","keyup #vc_elements_name_filter":"filterElements","hidden.bs.modal":"hide","show.bs.modal":"buildFiltering","click .wpb-content-layouts-container [data-filter]":"filterElements","shown.bs.modal":"shown"},buildFiltering:function(){this.do_render=!1,e='[data-vc-ui-element="add-element-button"]',t=this.model?this.model.get("shortcode"):"vc_column",i=this._getNotIn(t),l("#vc_elements_name_filter").val(""),this.$content.addClass("vc_filter-all"),this.$content.attr("data-vc-ui-filter","*");var e,t,i,a,n=vc.getMapped(t),s=!(!t||_.isUndefined(n.as_parent))&&n.as_parent;_.isObject(s)?(a=[],_.isString(s.only)&&a.push(_.reduce(s.only.replace(/\s/,"").split(","),function(e,t){return e+(_.isEmpty(e)?"":",")+'[data-element="'+t.trim()+'"]'},"")),_.isString(s.except)&&a.push(_.reduce(s.except.replace(/\s/,"").split(","),function(e,t){return e+':not([data-element="'+t.trim()+'"])'},"")),e+=a.join(",")):i&&(e=i),t&&!_.isUndefined(n.allowed_container_element)&&(n.allowed_container_element?_.isString(n.allowed_container_element)&&(e+=":not([data-is-container=true]), [data-element="+n.allowed_container_element+"]"):e+=":not([data-is-container=true])"),this.$buttons.removeClass("vc_visible").addClass("vc_inappropriate"),l(e,this.$content).removeClass("vc_inappropriate").addClass("vc_visible"),this.hideEmptyFilters()},hideEmptyFilters:function(){this.$el.find(".vc_filter-content-elements .active").removeClass("active"),this.$el.find(".vc_filter-content-elements > :first").addClass("active");var e=this;this.$el.find("[data-filter]").each(function(){l(l(this).data("filter")+".vc_visible:not(.vc_inappropriate)",e.$content).length?l(this).parent().show():l(this).parent().hide()})},render:function(e,t){return this.builder=new vc.ShortcodesBuilder,this.prepend=!!_.isBoolean(t)&&t,this.place_after_id=!!_.isString(t)&&t,this.model=!!_.isObject(e)&&e,this.$content=this.$el.find('[data-vc-ui-element="panel-add-element-list"]'),this.$buttons=l('[data-vc-ui-element="add-element-button"]',this.$content),this.preventDoubleExecution=!1,vc.AddElementBlockView.__super__.render.call(this)},hide:function(){this.do_render&&(this.show_settings&&this.showEditForm(),this.exit())},showEditForm:function(){vc.edit_element_block_view.render(this.builder.last())},exit:function(){this.builder.render()},createElement:function(e){var t,i,a;if(!this.preventDoubleExecution){this.preventDoubleExecution=!0,this.do_render=!0,e.preventDefault(),e=l(e.currentTarget).data("tag"),n={},!(t={width:"1/1"})===this.model&&"vc_row"!==e?(this.builder.create({shortcode:"vc_row",params:{}}).create({shortcode:"vc_column",parent_id:this.builder.lastID(),params:t}),this.model=this.builder.last()):!1!==this.model&&"vc_row"===e&&(e+="_inner");var n={shortcode:e,parent_id:!!this.model&&this.model.get("id"),params:"vc_row_inner"===e?n:{}};for(this.prepend?(n.order=0,(s=vc.shortcodes.findWhere({parent_id:this.model.get("id")}))&&(n.order=s.get("order")-1),vc.activity="prepend"):this.place_after_id&&(n.place_after_id=this.place_after_id),this.builder.create(n),a=this.builder.models.length-1;0<=a;a--)this.builder.models[a].get("shortcode");"vc_row"===e?this.builder.create({shortcode:"vc_column",parent_id:this.builder.lastID(),params:t}):"vc_row_inner"===e&&(t={width:"1/1"},this.builder.create({shortcode:"vc_column_inner",parent_id:this.builder.lastID(),params:t}));var s=vc.getMapped(e);_.isString(s.default_content)&&s.default_content.length&&(n=this.builder.parse({},s.default_content,this.builder.last().toJSON()),_.each(n,function(e){e.default_content=!0,this.builder.create(e)},this)),this.show_settings=!(_.isBoolean(s.show_settings_on_create)&&!1===s.show_settings_on_create),(i=this).$el.one("hidden.bs.modal",function(){i.preventDoubleExecution=!1}).modal("hide")}},_getNotIn:_.memoize(function(a){return'[data-vc-ui-element="add-element-button"]:not('+_.reduce(vc.map,function(e,t){var i=_.isEmpty(e)?"":",";return _.isObject(t.as_child)?(_.isString(t.as_child.only)&&!_.contains(t.as_child.only.replace(/\s/,"").split(","),a)&&(e+=i+"[data-element="+t.base+"]"),_.isString(t.as_child.except)&&_.contains(t.as_child.except.replace(/\s/,"").split(","),a)&&(e+=i+"[data-element="+t.base+"]")):!1===t.as_child&&(e+=i+"[data-element="+t.base+"]"),e},"")+")"}),filterElements:function(e){e.stopPropagation(),e.preventDefault();var e=l(e.currentTarget),t='[data-vc-ui-element="add-element-button"]',i=l("#vc_elements_name_filter").val();this.$content.removeClass("vc_filter-all"),e.is("[data-filter]")?(l(".wpb-content-layouts-container .isotope-filter .active",this.$content).removeClass("active"),e.parent().addClass("active"),t+=e=e.data("filter"),"*"===e?this.$content.addClass("vc_filter-all"):this.$content.removeClass("vc_filter-all"),this.$content.attr("data-vc-ui-filter",e.replace(".js-category-","")),l("#vc_elements_name_filter").val("")):0<i.length?(t+=":containsi('"+i+"'):not('.vc_element-deprecated')",l(".wpb-content-layouts-container .isotope-filter .active",this.$content).removeClass("active"),this.$content.attr("data-vc-ui-filter","name:"+i)):i.length||(l('.wpb-content-layouts-container .isotope-filter [data-filter="*"]').parent().addClass("active"),this.$content.attr("data-vc-ui-filter","*"),this.$content.addClass("vc_filter-all")),l(".vc_visible",this.$content).removeClass("vc_visible"),l(t,this.$content).addClass("vc_visible")},shown:function(){vc.is_mobile||l("#vc_elements_name_filter").trigger("focus")}}),vc.AddElementBlockViewBackendEditor=vc.AddElementBlockView.extend({render:function(e,t){return this.prepend=!!_.isBoolean(t)&&t,this.place_after_id=!!_.isString(t)&&t,this.model=!!_.isObject(e)&&e,this.$content=this.$el.find('[data-vc-ui-element="panel-add-element-list"]'),this.$buttons=l('[data-vc-ui-element="add-element-button"]',this.$content),vc.AddElementBlockView.__super__.render.call(this)},createElement:function(e){var t,i,a;this.preventDoubleExecution||(this.preventDoubleExecution=!0,e&&e.preventDefault&&e.preventDefault(),this.do_render=!0,e=l(e.currentTarget).data("tag"),a=!(a={width:"1/1"})===this.model?(i=vc.shortcodes.create({shortcode:"vc_row",params:{}}),a=vc.shortcodes.create({shortcode:"vc_column",params:a,parent_id:i.id,root_id:i.id}),"vc_row"!==e?vc.shortcodes.create({shortcode:e,parent_id:a.id,root_id:i.id}):i):"vc_row"===e?(a={width:"1/1"},i=vc.shortcodes.create({shortcode:"vc_row_inner",params:{},parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.getNextOrder()}),vc.shortcodes.create({shortcode:"vc_column_inner",params:a,parent_id:i.id,root_id:i.id})):vc.shortcodes.create({shortcode:e,parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.getNextOrder(),root_id:this.model.get("root_id")}),this.show_settings=!(_.isBoolean(vc.getMapped(e).show_settings_on_create)&&!1===vc.getMapped(e).show_settings_on_create),this.model=a,this.model.get("shortcode"),(t=this).$el.one("hidden.bs.modal",function(){t.preventDoubleExecution=!1}).modal("hide"))},showEditForm:function(){vc.edit_element_block_view.render(this.model)},exit:function(){},getFirstPositionIndex:function(){return--vc.element_start_index,vc.element_start_index}}),vc.PanelView=vc.View.extend({mediaSizeClassPrefix:"vc_media-",customMediaQuery:!0,panelName:"panel",draggable:!1,$body:!1,$tabs:!1,$content:!1,events:{"click [data-dismiss=panel]":"hide","mouseover [data-transparent=panel]":"addOpacity","click [data-transparent=panel]":"toggleOpacity","mouseout [data-transparent=panel]":"removeOpacity","click .vc_panel-tabs-link":"changeTab"},_vcUIEventsHooks:[{resize:"setResize"}],options:{startTab:0},clicked:!1,showMessageDisabled:!0,initialize:function(){this.clicked=!1,this.$el.removeClass("vc_panel-opacity"),this.$body=l("body"),this.$content=this.$el.find(".vc_panel-body"),_.bindAll(this,"setSize","fixElContainment","changeTab","setTabsSize"),this.on("show",this.setSize,this),this.on("setSize",this.setResize,this),this.on("render",this.resetMinimize,this)},toggleOpacity:function(){this.clicked=!this.clicked},addOpacity:function(){this.clicked||this.$el.addClass("vc_panel-opacity")},removeOpacity:function(){this.clicked||this.$el.removeClass("vc_panel-opacity")},message_box_timeout:!1,init:function(){},render:function(){return this.trigger("render"),this.trigger("afterRender"),this},show:function(){var e;this.$el.hasClass("vc_active")||(vc.closeActivePanel(),this.init(),(vc.active_panel=this).clicked=!1,this.$el.removeClass("vc_panel-opacity"),(e=this.$el.find(".vc_panel-tabs")).length&&(this.$tabs=e,this.setTabs()),this.$el.addClass("vc_active"),this.draggable?this.initDraggable():l(window).trigger("resize"),this.fixElContainment(),this.trigger("show"))},hide:function(e){e&&e.preventDefault&&e.preventDefault(),this.model&&(this.model=null),vc.active_panel=!1,this.$el.removeClass("vc_active")},content:function(){return this.$el.find(".panel-body")},setResize:function(){this.customMediaQuery&&this.setMediaSizeClass()},setMediaSizeClass:function(){var e=this.$el.width(),t={xs:!0,sm:!1,md:!1,lg:!1};525<=e&&(t.sm=!0),745<=e&&(t.md=!0),945<=e&&(t.lg=!0),_.each(t,function(e,t){e?this.$el.addClass(this.mediaSizeClassPrefix+t):this.$el.removeClass(this.mediaSizeClassPrefix+t)},this)},fixElContainment:function(){this.$body||(this.$body=l("body"));var e=[20-this.$el.width(),0,this.$body.width()-20,this.$body.height()-30],t=this.$el.position(),i={};t.left<e[0]&&(i.left=e[0]),t.top<0&&(i.top=0),e[2]<t.left&&(i.left=e[2]),e[3]<t.top&&(i.top=e[3]),this.$el.css(i),this.trigger("fixElContainment"),this.setSize()},initDraggable:function(){this.$el.draggable({iframeFix:!0,handle:".vc_panel-heading",start:this.fixElContainment,stop:this.fixElContainment}),this.draggable=!0},setSize:function(){this.trigger("setSize")},setTabs:function(){this.$tabs.length&&(this.$tabs.find(".vc_panel-tabs-control").removeClass("vc_active").eq(this.options.startTab).addClass("vc_active"),this.$tabs.find(".vc_panel-tab").removeClass("vc_active").eq(this.options.startTab).addClass("vc_active"),window.setTimeout(this.setTabsSize,100))},setTabsSize:function(){this.$tabs&&this.$tabs.parents(".vc_with-tabs.vc_panel-body").css("margin-top",this.$tabs.find(".vc_panel-tabs-menu").outerHeight())},changeTab:function(e){e&&e.preventDefault&&e.preventDefault(),e.target&&this.$tabs&&(e=l(e.target),this.$tabs.find(".vc_active").removeClass("vc_active"),e.parent().addClass("vc_active"),this.$el.find(e.data("target")).addClass("vc_active"),window.setTimeout(this.setTabsSize,100))},showMessage:function(e,t){if(this.showMessageDisabled)return!1;this.message_box_timeout&&(this.$el.find(".vc_panel-message").remove(),window.clearTimeout(this.message_box_timeout)),this.message_box_timeout=!1;var i=l('<div class="vc_panel-message type-'+t+'"></div>').appendTo(this.$el.find(".vc_ui-panel-content-container"));i.text(e).fadeIn(),this.message_box_timeout=window.setTimeout(function(){i.remove()},6e3)},isVisible:function(){return this.$el.is(":visible")},resetMinimize:function(){this.$el.removeClass("vc_panel-opacity")}}),vc.PostSettingsPanelView=vc.PanelView.extend({events:{"click [data-save=true]":"save","click [data-dismiss=panel]":"hide","click [data-transparent=panel]":"toggleOpacity","mouseover [data-transparent=panel]":"addOpacity","mouseout [data-transparent=panel]":"removeOpacity"},saved_css_data:"",saved_js_header_data:"",saved_js_footer_data:"",saved_title:"",$title:!1,editor_css:!1,editor_js_header:!1,editor_js_footer:!1,post_settings_editor:!1,initialize:function(){var e=l("#vc_ui-panel-post-settings .vc_ui-panel-content .vc_row .vc_column");0<l("#vc_inline-frame").length||1!==e.length||l(".vc_post-settings").hide(),vc.$custom_css=l("#vc_post-custom-css"),vc.$custom_js_header=l("#vc_post-custom-js-header"),vc.$custom_js_footer=l("#vc_post-custom-js-footer"),this.saved_css_data=vc.$custom_css.val(),this.saved_js_header_data=vc.$custom_js_header.val(),this.saved_js_footer_data=vc.$custom_js_footer.val(),this.saved_title=vc.title,window.Vc_postSettingsEditor&&this.initEditor(),this.$body=l("body"),_.bindAll(this,"setSize","fixElContainment"),this.on("show",this.setSize,this),this.on("setSize",this.setResize,this),this.on("render",this.resetMinimize,this),this.on("afterRender",function(){l(".edit-form-info").initializeTooltips(".vc_column")},this)},initEditor:function(){this.editor_css=new Vc_postSettingsEditor,this.editor_css.sel="wpb_css_editor",this.is_css=l("#"+this.editor_css.sel).length,this.editor_css.mode="css",this.editor_css.is_focused=!0,this.editor_js_header=new Vc_postSettingsEditor,this.editor_js_header.sel="wpb_js_header_editor",this.is_js_header=l("#"+this.editor_js_header.sel).length,this.editor_js_header.mode="javascript",this.editor_js_footer=new Vc_postSettingsEditor,this.editor_js_footer.sel="wpb_js_footer_editor",this.is_js_footer=l("#"+this.editor_js_footer.sel).length,this.editor_js_footer.mode="javascript"},render:function(){return this.trigger("render"),this.$title=this.$el.find("#vc_page-title-field"),this.$title.val(vc.title),this.setEditor(),this.trigger("afterRender"),this},setEditor:function(){this.is_css&&this.editor_css.setEditor(vc.$custom_css.val()),this.is_js_header&&this.editor_js_header.setEditor(vc.$custom_js_header.val()),this.is_js_footer&&this.editor_js_footer.setEditor(vc.$custom_js_footer.val())},setSize:function(){window.Vc_postSettingsEditor&&(this.is_css&&this.editor_css.setSize(),this.is_js_header&&this.editor_js_header.setSize(),this.is_js_footer&&this.editor_js_footer.setSize(),this.trigger("setSize"))},save:function(){var e;this.$title&&(e=this.$title.val())!==vc.title&&vc.frame.setTitle(e),this.setAlertOnDataChange(),this.is_css&&vc.$custom_css.val(this.editor_css.getValue()),this.is_js_header&&vc.$custom_js_header.val(this.editor_js_header.getValue()),this.is_js_footer&&vc.$custom_js_footer.val(this.editor_js_footer.getValue()),vc.frame_window&&(this.is_css&&vc.frame_window.vc_iframe.loadCustomCss(vc.$custom_css.val()),this.is_js_header&&vc.frame_window.vc_iframe.loadCustomJsHeader(vc.$custom_js_header.val()),this.is_js_footer)&&vc.frame_window.vc_iframe.loadCustomJsFooter(vc.$custom_js_footer.val()),vc.updateSettingsBadge(),this.showMessage(window.i18nLocale.page_settings_updated,"success"),this.trigger("save")},setAlertOnDataChange:function(){0<=[this.editor_css&&this.saved_css_data!==this.editor_css.getValue(),this.editor_js_header&&this.saved_js_header_data!==this.editor_js_header.getValue(),this.editor_js_footer&&this.saved_js_footer_data!==this.editor_js_footer.getValue(),this.$title&&this.saved_title!==this.$title.val()].indexOf(!0)&&vc.setDataChanged()}}),vc.PostSettingsSeoUIPanelView=vc.PanelView.extend({save:function(){for(var e=l("#vc_setting-seo-form").serializeArray(),t={},i=0;i<e.length;i++)t[e[i].name]=e[i].value;l("#vc_post-custom-seo-settings").val(JSON.stringify(t)),this.trigger("save"),this.hide()}}),vc.PostSettingsPanelViewBackendEditor=vc.PostSettingsPanelView.extend({render:function(){return this.trigger("render"),this.setEditor(),this.trigger("afterRender"),this},setAlertOnDataChange:function(){this.editor_css&&vc.saved_custom_css!==this.editor_css.getValue()&&window.tinymce&&(window.switchEditors.go("content","tmce"),window.setTimeout(function(){window.tinymce.get("content").isNotDirty=!1},1e3))},save:function(){vc.PostSettingsPanelViewBackendEditor.__super__.save.call(this),vc.storage.isChanged=!0,this.hide()}}),vc.TemplatesEditorPanelView=vc.PanelView.extend({events:{"click [data-dismiss=panel]":"hide","click [data-transparent=panel]":"toggleOpacity","mouseover [data-transparent=panel]":"addOpacity","mouseout [data-transparent=panel]":"removeOpacity","click .wpb_remove_template":"removeTemplate","click [data-template_id]":"loadTemplate","click [data-template_name]":"loadDefaultTemplate","click #vc_template-save":"saveTemplate"},render:function(){this.trigger("render"),this.$name=l("#vc_template-name"),this.$list=l("#vc_template-list");var t=l("#vc_tabs-templates");return t.find(".vc_edit-form-tab-control").removeClass("vc_active").eq(0).addClass("vc_active"),t.find('[data-vc-ui-element="panel-edit-element-tab"]').removeClass("vc_active").eq(0).addClass("vc_active"),t.find(".vc_edit-form-link").on("click",function(e){e.preventDefault();e=l(this);t.find(".vc_active").removeClass("vc_active"),e.parent().addClass("vc_active"),l(e.attr("href")).addClass("vc_active")}),this.trigger("afterRender"),this},removeTemplate:function(e){e&&e.preventDefault&&e.preventDefault();var e=l(e.currentTarget),t=e.closest('[data-vc-ui-element="template-title"]').text();confirm(window.i18nLocale.confirm_deleting_template.replace("{template_name}",t))&&(e.closest('[data-vc-ui-element="template"]').remove(),this.$list.html(window.i18nLocale.loading),l.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_delete_template",template_id:e.attr("rel"),vc_inline:!0,_vcnonce:window.vcAdminNonce},context:this}).done(function(e){this.$list.html(e)}))},loadTemplate:function(e){e&&e.preventDefault&&e.preventDefault();e=l(e.currentTarget);l.ajax({type:"POST",url:vc.frame_window.location.href,data:{action:"vc_frontend_template",template_id:e.data("template_id"),vc_inline:!0,_vcnonce:window.vcAdminNonce},context:this}).done(function(e){var t,i;_.each(l(e),function(e){if("vc_template-data"===e.id)try{i=JSON.parse(e.innerHTML)}catch(e){window.console&&window.console.warn&&window.console.warn("loadTemplate json error",e)}"vc_template-html"===e.id&&(t=e.innerHTML)}),t&&i&&vc.builder.buildFromTemplate(t,i),this.showMessage(window.i18nLocale.template_added,"success"),vc.closeActivePanel()})},ajaxData:function(e){return{action:"vc_frontend_default_template",template_name:e.data("template_name"),vc_inline:!0,_vcnonce:window.vcAdminNonce}},loadDefaultTemplate:function(e){e&&e.preventDefault&&e.preventDefault();e=l(e.currentTarget);l.ajax({type:"POST",url:vc.frame_window.location.href,data:this.ajaxData(e),context:this}).done(function(e){var t,i;_.each(l(e),function(e){if("vc_template-data"===e.id)try{i=JSON.parse(e.innerHTML)}catch(e){window.console&&window.console.warn&&window.console.warn("loadDefaultTemplate json error",e)}"vc_template-html"===e.id&&(t=e.innerHTML)}),t&&i&&vc.builder.buildFromTemplate(t,i),this.showMessage(window.i18nLocale.template_added,"success")})},saveTemplate:function(e){e&&e.preventDefault&&e.preventDefault();var t,e=this.$name.val();if(_.isString(e)&&e.length){if(!(t=this.getPostContent()).trim().length)return this.showMessage(window.i18nLocale.template_is_empty,"error"),!1;t={action:"wpb_save_template",template:t,template_name:e,frontend:!0,vc_inline:!0,_vcnonce:window.vcAdminNonce},this.$name.val(""),this.showMessage(window.i18nLocale.template_save,"success"),this.reloadTemplateList(t)}else this.showMessage(window.i18nLocale.please_enter_templates_name,"error")},reloadTemplateList:function(e){this.$list.html(window.i18nLocale.loading).load(window.ajaxurl,e)},getPostContent:function(){return vc.builder.getContent()}}),vc.TemplatesEditorPanelViewBackendEditor=vc.TemplatesEditorPanelView.extend({ajaxData:function(e){return{action:"vc_backend_template",template_id:e.attr("data-template_id"),vc_inline:!0,_vcnonce:window.vcAdminNonce}},loadTemplate:function(e){e&&e.preventDefault&&e.preventDefault();e=l(e.currentTarget);l.ajax({type:"POST",url:window.ajaxurl,data:this.ajaxData(e),context:this}).done(function(t){_.each(vc.filters.templates,function(e){t=e(t)}),vc.storage.append(t),vc.shortcodes.fetch({reset:!0}),vc.closeActivePanel()})},loadDefaultTemplate:function(e){e&&e.preventDefault&&e.preventDefault();e=l(e.currentTarget);l.ajax({type:"POST",url:window.ajaxurl,data:{action:"vc_backend_default_template",template_name:e.attr("data-template_name"),vc_inline:!0,_vcnonce:window.vcAdminNonce},context:this}).done(function(t){_.each(vc.filters.templates,function(e){t=e(t)}),vc.storage.append(t),vc.shortcodes.fetch({reset:!0})})},getPostContent:function(){return vc.storage.getContent()}}),vc.TemplatesPanelViewBackend=vc.PanelView.extend({$name:!1,$list:!1,template_load_action:"vc_backend_load_template",templateLoadPreviewAction:"vc_load_template_preview",save_template_action:"vc_save_template",delete_template_action:"vc_delete_template",appendedTemplateType:"my_templates",appendedTemplateCategory:"my_templates",appendedCategory:"my_templates",appendedClass:"my_templates",loadUrl:window.ajaxurl,events:l.extend(vc.PanelView.prototype.events,{"click .vc_template-save-btn":"saveTemplate","click [data-template_id] [data-template-handler]":"loadTemplate","click .vc_template-delete-icon":"removeTemplate"}),initialize:function(){_.bindAll(this,"checkInput","saveTemplate"),vc.TemplatesPanelViewBackend.__super__.initialize.call(this)},render:function(){return this.$el.css("left",(l(window).width()-this.$el.width())/2),this.$name=this.$el.find('[data-js-element="vc-templates-input"]'),this.$name.off("keypress").on("keypress",this.checkInput),this.$list=this.$el.find(".vc_templates-list-my_templates"),vc.TemplatesPanelViewBackend.__super__.render.call(this)},saveTemplate:function(e){var t,i;return e&&e.preventDefault&&e.preventDefault(),e=this.$name.val(),i=this,_.isString(e)&&e.length?(t=this.getPostContent()).trim().length?(t={action:this.save_template_action,template:t,template_name:e,vc_inline:!0,_vcnonce:window.vcAdminNonce},void this.setButtonMessage(void 0,void 0,!0).reloadTemplateList(t,function(){i.$name.val("").trigger("change")},function(){i.showMessage(window.i18nLocale.template_save_error,"error"),i.clearButtonMessage()})):(this.showMessage(window.i18nLocale.template_is_empty,"error"),!1):(this.showMessage(window.i18nLocale.please_enter_templates_name,"error"),!1)},checkInput:function(e){if(13===e.which)return this.saveTemplate(),!1},removeTemplate:function(e){e&&e.preventDefault&&e.preventDefault(),e&&e.stopPropagation&&e.stopPropagation();var t,i,e=l(e.target).closest("[data-template_id]"),a=e.find('[data-vc-ui-element="template-title"]').text();confirm(window.i18nLocale.confirm_deleting_template.replace("{template_name}",a))&&(t=e.data("template_id"),i=e.data("template_type"),a=e.data("template_action"),e.remove(),l.ajax({type:"POST",url:window.ajaxurl,data:{action:a||this.delete_template_action,template_id:t,template_type:i,vc_inline:!0,_vcnonce:window.vcAdminNonce},context:this}).done(function(){this.showMessage(window.i18nLocale.template_removed,"success"),vc.events.trigger("templates:delete",{id:t,type:i})}))},reloadTemplateList:function(e,t,i){var a=this;l.ajax({type:"POST",url:window.ajaxurl,data:e,context:this}).done(function(e){a.filter=!1,a.$list||(a.$list=a.$el.find(".vc_templates-list-my_templates")),a.$list.prepend(l(e)),"function"==typeof t&&t(e)}).fail("function"==typeof i?i:function(){})},getPostContent:function(){return vc.shortcodes.stringify("template")},loadTemplate:function(e){e&&e.preventDefault&&e.preventDefault(),e&&e.stopPropagation&&e.stopPropagation();e=l(e.target).closest("[data-template_id][data-template_type]");l.ajax({type:"POST",url:this.loadUrl,data:{action:this.template_load_action,template_unique_id:e.data("template_id"),template_type:e.data("template_type"),vc_inline:!0,_vcnonce:window.vcAdminNonce},context:this}).done(this.renderTemplate)},renderTemplate:function(t){var e;_.each(vc.filters.templates,function(e){t=e(t)}),e=vc.storage.parseContent({},t),_.each(e,function(e){vc.shortcodes.create(e)}),vc.closeActivePanel()},buildTemplatePreview:function(e){e&&e.preventDefault&&e.preventDefault();try{var a,n=l(e.currentTarget),s=n.closest("[data-template_id]");if(s.hasClass("vc_active")||s.hasClass("vc_loading"))n.vcAccordion("collapseTemplate");else{var t=s.find("[data-js-content]"),o=0<t.children().length;if(this.$content=t,this.$content.find("iframe").length)return n.vcAccordion("collapseTemplate"),!0;var c=this;n.vcAccordion("collapseTemplate",function(){var e,t=s.data("template_id"),i=s.data("template_type");t&&!o&&(e="?",-1<window.ajaxurl.indexOf("?")&&(e="&"),a=window.ajaxurl+e+l.param({action:c.templateLoadPreviewAction,template_unique_id:t,template_type:i,vc_inline:!0,post_id:vc_post_id,_vcnonce:window.vcAdminNonce}),n.find("i").addClass("vc_ui-wp-spinner"),c.$content.html('<iframe style="width: 100%;" data-vc-template-preview-frame="'+t+'"></iframe>'),(e=c.$content.find("[data-vc-template-preview-frame]")).attr("src",a),s.addClass("vc_loading"),e.on("load",function(){s.removeClass("vc_loading"),n.find("i").removeClass("vc_ui-wp-spinner")}))})}}catch(e){window.console&&window.console.warn&&window.console.warn("buildTemplatePreview error",e),this.showMessage("Failed to build preview","error")}},setTemplatePreviewSize:function(e){var t=this.$content.find("iframe");0<t.length&&(t=t[0],void 0===e&&(t.height=t.contentWindow.document.body.offsetHeight,e=t.contentWindow.document.body.scrollHeight),t.height=e+"px")}}),vc.TemplatesPanelViewFrontend=vc.TemplatesPanelViewBackend.extend({template_load_action:"vc_frontend_load_template",loadUrl:!1,initialize:function(){this.loadUrl=vc.$frame.attr("src"),vc.TemplatesPanelViewFrontend.__super__.initialize.call(this)},render:function(){return vc.TemplatesPanelViewFrontend.__super__.render.call(this)},renderTemplate:function(e){var t,i;_.each(l(e),function(e){if("vc_template-data"===e.id)try{i=JSON.parse(e.innerHTML)}catch(e){window.console&&window.console.warn&&window.console.warn("renderTemplate error",e)}"vc_template-html"===e.id&&(t=e.innerHTML)}),t&&i&&vc.builder.buildFromTemplate(t,i)?this.showMessage(window.i18nLocale.template_added_with_id,"error"):this.showMessage(window.i18nLocale.template_added,"success"),vc.closeActivePanel()}}),vc.RowLayoutEditorPanelView=vc.PanelView.extend({events:{"click [data-dismiss=panel]":"hide","click [data-transparent=panel]":"toggleOpacity","mouseover [data-transparent=panel]":"addOpacity","mouseout [data-transparent=panel]":"removeOpacity","click .vc_layout-btn":"setLayout","click #vc_row-layout-update":"updateFromInput"},_builder:!1,render:function(e){return this.$input=l("#vc_row-layout"),e&&(this.model=e),this.addCurrentLayout(),this.resetMinimize(),vc.column_trig_changes=!0,l(".edit-form-info").initializeTooltips(".vc_ui-panel-content"),this},builder:function(){return this._builder||(this._builder=new vc.ShortcodesBuilder),this._builder},addCurrentLayout:function(){vc.shortcodes.sort();var e=_.map(vc.shortcodes.where({parent_id:this.model.get("id")}),function(e){e=e.getParam("width");return e||"1/1"},"",this).join(" + ");this.$input.val(e)},isBuildComplete:function(){return this.builder().isBuildComplete()},setLayout:function(e){if(e&&e.preventDefault&&e.preventDefault(),!this.isBuildComplete())return!1;e=l(e.currentTarget).attr("data-cells"),e=this.model.view.convertRowColumns(e,this.builder());this.$input.val(e.join(" + "))},updateFromInput:function(e){if(e&&e.preventDefault&&e.preventDefault(),!this.isBuildComplete())return!1;var e=this.$input.val();!1!==(e=this.validateCellsList(e))?this.model.view.convertRowColumns(e,this.builder()):window.alert(window.i18nLocale.wrong_cells_layout)},validateCellsList:function(e){var i,a,n,s=[],e=e.replace(/\s/g,"").split("+");return!(1e3<=_.reduce(_.map(e,function(e){var t;return e.match(/^[vc\_]{0,1}span\d{1,2}$/)?!1===(t=vc_convert_column_span_size(e))?1e3:(i=t.split(/\//),s.push(i[0]+""+i[1]),12*parseInt(i[0],10)/parseInt(i[1],10)):!e.match(/^[1-9]|1[0-2]\/[1-9]|1[0-2]$/)||(i=e.split(/\//),a=parseInt(i[0],10),5!==(n=parseInt(i[1],10))&&0!=12%n)||n<a?1e3:(s.push(a+""+n),5===n?a:12*a/n)}),function(e,t){return t+=e},0))&&s.join("_")}}),vc.RowLayoutEditorPanelViewBackend=vc.RowLayoutEditorPanelView.extend({builder:function(){return this.builder||(this.builder=vc.storage),this.builder},isBuildComplete:function(){return!0},setLayout:function(e){e&&e.preventDefault&&e.preventDefault();e=l(e.currentTarget).attr("data-cells"),e=this.model.view.convertRowColumns(e);this.$input.val(e.join(" + "))}}),l(window).on("orientationchange",function(){vc.active_panel&&vc.active_panel.$el.css({top:"",left:"auto",height:"auto",width:"auto"})}),l(window).on("resize.fixElContainment",function(){vc.active_panel&&vc.active_panel.fixElContainment&&vc.active_panel.fixElContainment()}),l("body").on("keyup change input","[data-vc-disable-empty]",function(){var e=l(this),t=l(e.data("vcDisableEmpty"));e.val().length?t.prop("disabled",!1):t.prop("disabled",!0)})})(window.jQuery); (s=>{var o,t,a=function(t,o){var i=this;this.options=o,this.$element=s(t),this.$dropdownContainer=this.$element.find(this.options.dropdownContainerSelector),this.$dropdown=this.$dropdownContainer.find(this.options.dropdownSelector),this.options.delayInit?(i.$element.addClass(this.options.initializingClass),setTimeout(function(){i.options.autoRefresh||i.refresh(),i.moveTabs(),i.$element.removeClass(i.options.initializingClass)},i.options.delayInitTime)):(this.options.autoRefresh||this.refresh(),this.moveTabs()),s(window).on("resize",s.proxy(this.moveTabs,this)),this.$dropdownContainer.on("click.vc.tabsLine",s.proxy(this.checkDropdownContainerActive,this))};a.DEFAULTS={initializingClass:"vc_initializing",delayInit:!1,delayInitTime:1e3,activeClass:"vc_active",visibleClass:"vc_visible",dropdownContainerSelector:'[data-vc-ui-element="panel-tabs-line-toggle"]',dropdownSelector:'[data-vc-ui-element="panel-tabs-line-dropdown"]',tabSelector:'>li:not([data-vc-ui-element="panel-tabs-line-toggle"])',dropdownTabSelector:"li",freeSpaceOffset:5,autoRefresh:!1,showDevInfo:!1},a.prototype.refresh=function(){var t,o=this;return o.tabs=[],o.dropdownTabs=[],o.$element.find(o.options.tabSelector).each(function(){o.tabs.push({$tab:s(this),width:s(this).outerWidth()})}),o.$dropdown.find(o.options.dropdownTabSelector).each(function(){var t=s(this).clone().css({visibility:"hidden",position:"fixed"});t.appendTo(o.$element),o.dropdownTabs.push({$tab:s(this),width:t.outerWidth()}),t.remove(),s(this).on("click",o.options.onTabClick)}),"function"==typeof this.options.onTabClick&&(o.tabs.map(t=function(t){void 0===t.$tab.data("tabClickSet")&&(t.$tab.on("click",s.proxy(o.options.onTabClick,t.$tab)),t.$tab.data("tabClickSet",!0))}),o.dropdownTabs.map(t)),this},a.prototype.moveLastToDropdown=function(){var t;return this.tabs.length&&((t=this.tabs.pop()).$tab.prependTo(this.$dropdown),this.dropdownTabs.unshift(t)),this.checkDropdownContainer(),this},a.prototype.moveFirstToContainer=function(){var t;return this.dropdownTabs.length&&((t=this.dropdownTabs.shift()).$tab.appendTo(this.$element),this.tabs.push(t)),this.checkDropdownContainer(),this},a.prototype.getTabsWidth=function(){var o=0;return this.tabs.forEach(function(t){o+=t.width}),o},a.prototype.isDropdownContainerVisible=function(){return this.$dropdownContainer.hasClass(this.options.visibleClass)},a.prototype.getFreeSpace=function(){var t=this.$element.width()-this.getTabsWidth()-this.options.freeSpaceOffset;return this.isDropdownContainerVisible()&&(t-=this.$dropdownContainer.outerWidth(),1===this.dropdownTabs.length)&&0<=t-this.dropdownTabs[0].width+this.$dropdownContainer.outerWidth()&&(t+=this.$dropdownContainer.outerWidth()),t},a.prototype.moveTabsToDropdown=function(){for(var t=this.tabs.length-1;0<=t;t--){if(!(this.getFreeSpace()<0))return this;this.moveLastToDropdown()}return this},a.prototype.moveDropdownToTabs=function(){for(var t=this.dropdownTabs.length,o=0;o<t;o++){if(!(0<=this.getFreeSpace()-this.dropdownTabs[0].width))return this;this.moveFirstToContainer()}return this},a.prototype.showDropdownContainer=function(){return this.$dropdownContainer.addClass(this.options.visibleClass),this},a.prototype.hideDropdownContainer=function(){return this.$dropdownContainer.removeClass(this.options.visibleClass),this},a.prototype.activateDropdownContainer=function(){return this.$dropdownContainer.addClass(this.options.activeClass),this},a.prototype.deactivateDropdownContainer=function(){return this.$dropdownContainer.removeClass(this.options.activeClass),this},a.prototype.checkDropdownContainerActive=function(){return this.$dropdown.find("."+this.options.activeClass+":first").length?this.activateDropdownContainer():this.deactivateDropdownContainer(),this},a.prototype.checkDropdownContainer=function(){return this.dropdownTabs.length?this.showDropdownContainer():this.hideDropdownContainer(),this.checkDropdownContainerActive(),this},a.prototype.moveTabs=function(){return this.options.autoRefresh&&this.refresh(),this.checkDropdownContainer(),this.moveTabsToDropdown(),this.moveDropdownToTabs(),this.options.showDevInfo&&this.showDevInfo(),this},a.prototype.showDevInfo=function(){var t=s("#vc-ui-tabs-line-dev-info");t.length&&(this.$devBlock=t),void 0===this.$devBlock&&(this.$devBlock=s('<div id="vc-ui-tabs-line-dev-info" />').css({position:"fixed",right:"40px",top:"40px",padding:"7px 12px",border:"1px solid rgba(0, 0, 0, 0.2)",background:"rgba(0, 0, 0, 0.7)",color:"#0a0","border-radius":"5px","font-family":"tahoma","font-size":"12px","z-index":1100}),this.$devBlock.appendTo("body")),void 0===this.$devInfo&&(this.$devInfo=s("<div />").css({"margin-bottom":"7px","padding-bottom":"7px","border-bottom":"1px dashed rgba(0, 200, 0, .35)"}),this.$devInfo.appendTo(this.$devBlock)),this.$devInfo.empty(),this.$devInfo.append(s("<div />").text("Tabs count: "+this.tabs.length)),this.$devInfo.append(s("<div />").text("Dropdown count: "+this.dropdownTabs.length)),this.$devInfo.append(s("<div />").text("El width: "+this.$element.width())),this.$devInfo.append(s("<div />").text("Tabs width: "+this.getTabsWidth())),this.$devInfo.append(s("<div />").text("Tabs width with dots: "+(this.getTabsWidth()+this.$dropdownContainer.outerWidth()))),this.$devInfo.append(s("<div />").text("Free space: "+this.getFreeSpace())),this.tabs.length&&this.$devInfo.append(s("<div />").text("Last tab width: "+this.tabs[this.tabs.length-1].width)),this.dropdownTabs.length&&this.$devInfo.append(s("<div />").text("First dropdown tab width: "+this.dropdownTabs[0].width))},t=s.fn.vcTabsLine,s.fn.vcTabsLine=o=function(e){return this.each(function(){var t=s(this),o=t.data("vcUiTabsLine"),i=t.data("vc.tabsLine"),o=s.extend(!0,{},a.DEFAULTS,t.data(),o,"object"==typeof e&&e),n="string"==typeof e?e:o.action;i||t.data("vc.tabsLine",i=new a(this,o)),n&&i[n]()})},s.fn.vcTabsLine.Constructor=a,s.fn.vcTabsLine.noConflict=function(){return s.fn.vcTabsLine=t,this},s(window).on("load",function(){s("[data-vc-ui-tabs-line]").each(function(){var t=s(this);o.call(t,t.data())})})})(window.jQuery); window.vc.HelperAjax={ajax:!1,checkAjax:function(){this.ajax&&this.ajax.abort()},resetAjax:function(){this.ajax=!1}}; window.vc.HelperPrompts={uiEvents:{render:"removeAllPrompts"},removeAllPrompts:function(){this.$el.find(".vc_ui-panel-content-container").removeClass("vc_ui-content-hidden"),this.$el.find(".vc_ui-prompt").remove()}}; window.vc.HelperPanelViewDraggable={draggable:!0,draggableOptions:{iframeFix:!0,handle:'[data-vc-ui-element="panel-heading"]'},uiEvents:{show:"initDraggable"},initDraggable:function(){this.$el.draggable(_.extend({},this.draggableOptions,{start:this.fixElContainment,stop:this.fixElContainment}))}}; (s=>{window.vc.HelperPanelViewResizable={sizeInitialized:!1,uiEvents:{show:"setSavedSize initResize",tabChange:"setDefaultHeightSettings",afterMinimize:"setupOnMinimize",afterUnminimize:"initResize",fixElContainment:"saveUIPanelSizes"},setDefaultHeightSettings:function(){this.$el.css("height","auto"),this.$el.css("maxHeight","75vh")},initResize:function(){var i=this;this.$el.data("uiResizable")&&this.$el.resizable("destroy"),this.$el.resizable({minHeight:240,minWidth:380,resize:function(){i.trigger("resize")},handles:"n, e, s, w, ne, se, sw, nw",start:function(e,t){i.trigger("beforeResizeStart"),i.$el.css("maxHeight","none"),i.$el.css("height",t.size.height),s("iframe").css("pointerEvents","none"),i.trigger("afterResizeStart")},stop:function(){i.trigger("beforeResizeStop"),s("iframe").css("pointerEvents",""),i.saveUIPanelSizes(),i.trigger("afterResizeStop")}}),this.content().addClass("vc_properties-list-init"),this.trigger("resize")},setSavedSize:function(){if(this.setDefaultHeightSettings(),vc.is_mobile)return!1;var e={width:getUserSetting(this.panelName+"_vcUIPanelWidth"),left:getUserSetting(this.panelName+"_vcUIPanelLeft").replace("minus","-"),top:getUserSetting(this.panelName+"_vcUIPanelTop").replace("minus","-")};_.isEmpty(e.width)||this.$el.width(e.width),_.isEmpty(e.left)||this.$el.css("left",e.left),_.isEmpty(e.top)||this.$el.css("top",e.top),this.sizeInitialized=!0},saveUIPanelSizes:function(){if(!1===this.sizeInitialized)return!1;var e={width:this.$el.width(),left:parseInt(this.$el.css("left"),10),top:parseInt(this.$el.css("top"),10)};setUserSetting(this.panelName+"_vcUIPanelWidth",e.width),setUserSetting(this.panelName+"_vcUIPanelLeft",e.left.toString().replace("-","minus")+"px"),setUserSetting(this.panelName+"_vcUIPanelTop",e.top.toString().replace("-","minus")+"px")},setupOnMinimize:function(){this.$el.data("uiResizable")&&this.$el.resizable("destroy"),this.$el.resizable({minWidth:380,handles:"w, e",start:function(e){s("iframe").css("pointerEvents","none")},stop:function(){s("iframe").css("pointerEvents","")}})}}})(window.jQuery); (a=>{window.vc.HelperTemplatesPanelViewSearch={searchSelector:"[data-vc-templates-name-filter]",events:{"keyup [data-vc-templates-name-filter]":"searchTemplate","search [data-vc-templates-name-filter]":"searchTemplate"},uiEvents:{show:"focusToSearch"},focusToSearch:function(){vc.is_mobile||a(this.searchSelector,this.$el).trigger("focus")},searchTemplate:function(e){e=a(e.currentTarget);e.val().length?this.searchByName(e.val()):this.clearSearch()},clearSearch:function(){this.$el.find("[data-vc-templates-name-filter]").val(""),this.$el.find("[data-template_name]").css("display","block"),this.$el.removeAttr("data-vc-template-search"),this.$el.find(".vc-search-result-empty").removeClass("vc-search-result-empty");var e=new jQuery.Event("click");e.isClearSearch=!0,this.$el.find('.vc_panel-tabs-control:first [data-vc-ui-element="panel-tab-control"]').trigger(e)},searchByName:function(e){this.$el.find(".vc_panel-tabs-control.vc_active").removeClass("vc_active"),this.$el.attr("data-vc-template-search","true"),this.$el.find("[data-template_name]").css("display","none"),this.$el.find('[data-template_name*="'+vc_slugify(e)+'"]').css("display","block"),this.$el.find('[data-vc-ui-element="panel-edit-element-tab"]').each(function(){var e=a(this);e.removeClass("vc-search-result-empty"),e.find("[data-template_name]:visible").length||e.addClass("vc-search-result-empty")})}}})(window.jQuery); (d=>{window.vc.HelperPanelViewHeaderFooter={buttonMessageTimeout:!1,events:{'click [data-vc-ui-element="button-save"]':"save",'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="button-minimize"]':"toggleOpacity"},uiEvents:{save:"setButtonMessage",render:"clearButtonMessage"},resetMinimize:function(){this.$el.removeClass("vc_panel-opacity"),this.$el.removeClass("vc_minimized")},toggleOpacity:function(t){t.preventDefault();var e,i="vc_animating",a="vc_minimized",s=this,n=this.$el,o=n.find(n.data("vcPanel")),u=o.closest(o.data("vcPanelContainer")),c=d(t.currentTarget);void 0===n.data("vcHasHeight")&&n.data("vcHasHeight",(t=n.attr("style"),e=!1,t&&t.split(";").forEach(function(t){t=t.split(":");"height"===d.trim(t[0])&&(e=!0)}),e)),n.hasClass(a)?(void 0===n.data("vcMinimizeHeight")&&n.data("vcMinimizeHeight",d(window).height()-.2*d(window).height()),n.animate({height:n.data("vcMinimizeHeight")},{duration:400,start:function(){c.prop("disabled",!0),n.addClass(i),s.tabsMenu&&s.tabsMenu()&&s.tabsMenu().vcTabsLine("moveTabs")},complete:function(){n.removeClass(a),n.removeClass(i),n.data("vcHasHeight")||n.css({height:""}),s.trigger("afterUnminimize"),c.prop("disabled",!1)}})):(n.data("vcMinimizeHeight",n.height()),n.animate({height:o.outerHeight()+u.outerHeight()-u.height()},{duration:400,start:function(){c.prop("disabled",!0),n.addClass(i)},complete:function(){n.addClass(a),n.removeClass(i),n.css({height:""}),s.trigger("afterMinimize"),c.prop("disabled",!1)}}))},setButtonMessage:function(t,e,i){var a;return void 0===i&&(i=!1),this.clearButtonMessage=_.bind(this.clearButtonMessage,this),!i&&!vc.frame_window||this.buttonMessageTimeout||(void 0===t&&(t=window.i18nLocale.ui_saved),void 0===e&&(e="success"),a=(i=this.$el.find('[data-vc-ui-element="button-save"]')).html(),i.addClass("vc_ui-button-"+e+" vc_ui-button-undisabled").removeClass("vc_ui-button-action").data("vcCurrentTextHtml",a).data("vcCurrentTextType",e).html(t),_.delay(this.clearButtonMessage,5e3),this.buttonMessageTimeout=!0),this},clearButtonMessage:function(){var t,e,i;this.buttonMessageTimeout&&(window.clearTimeout(this.buttonMessageTimeout),e=(i=this.$el.find('[data-vc-ui-element="button-save"]')).data("vcCurrentTextHtml")||"Save",t=i.data("vcCurrentTextType"),i.html(e).removeClass("vc_ui-button-"+t+" vc_ui-button-undisabled").addClass("vc_ui-button-action"),this.buttonMessageTimeout=!1)}}})(window.jQuery); (l=>{window.vc.TemplateWindowUIPanelBackendEditor=vc.TemplatesPanelViewBackend.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperTemplatesPanelViewSearch).extend({panelName:"template_window",showMessageDisabled:!1,initialize:function(){window.vc.TemplateWindowUIPanelBackendEditor.__super__.initialize.call(this),this.trigger("show",this.initTemplatesTabs,this)},show:function(){this.clearSearch(),window.vc.TemplateWindowUIPanelBackendEditor.__super__.show.call(this)},initTemplatesTabs:function(){this.$el.find('[data-vc-ui-element="panel-tabs-controls"]').vcTabsLine("moveTabs")},showMessage:function(e,a){var t;if(this.showMessageDisabled)return!1;t="vc_col-xs-12 wpb_element_wrapper",this.message_box_timeout&&(this.$el.find("[data-vc-panel-message]").remove(),window.clearTimeout(this.message_box_timeout)),this.message_box_timeout=!1;var i,c=vc.template('<div class="vc_message_box vc_message_box-standard vc_message_box-rounded vc_color-<%- color %>"><div class="vc_message_box-icon"><i class="fa fa fa-<%- icon %>"></i></div><p><%- text %></p></div>');switch(a){case"error":i=l('<div class="'+t+'" data-vc-panel-message>').html(c({color:"danger",icon:"times",text:e}));break;case"warning":i=l('<div class="'+t+'" data-vc-panel-message>').html(c({color:"warning",icon:"exclamation-triangle",text:e}));break;case"success":i=l('<div class="'+t+'" data-vc-panel-message>').html(c({color:"success",icon:"check",text:e}))}i.prependTo(this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_row.vc_active')),i.fadeIn(),this.message_box_timeout=window.setTimeout(function(){i.remove()},6e3)},changeTab:function(e){e&&e.preventDefault&&e.preventDefault(),e&&!e.isClearSearch&&this.clearSearch();e=l(e.currentTarget);e.parent().hasClass("vc_active")||(this.$el.find('[data-vc-ui-element="panel-tabs-controls"] .vc_active:not([data-vc-ui-element="panel-tabs-line-dropdown"])').removeClass("vc_active"),e.parent().addClass("vc_active"),this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_active').removeClass("vc_active"),this.$el.find(e.data("vcUiElementTarget")).addClass("vc_active"),this.$tabsMenu&&this.$tabsMenu.vcTabsLine("checkDropdownContainerActive"))},setPreviewFrameHeight:function(e,a){parseInt(a,10)<100&&(a=100),l('data-vc-template-preview-frame="'+e+'"').height(a)}}),window.vc.TemplateWindowUIPanelBackendEditor.prototype.events=l.extend(!0,window.vc.TemplateWindowUIPanelBackendEditor.prototype.events,{'click [data-vc-ui-element="button-save"]':"save",'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="button-minimize"]':"toggleOpacity","keyup [data-vc-templates-name-filter]":"searchTemplate","search [data-vc-templates-name-filter]":"searchTemplate","click .vc_template-save-btn":"saveTemplate","click [data-template_id] [data-template-handler]":"loadTemplate",'click [data-vc-container=".vc_ui-list-bar"][data-vc-preview-handler]':"buildTemplatePreview",'click [data-vc-ui-delete="template-title"]':"removeTemplate",'click [data-vc-ui-element="panel-tab-control"]':"changeTab"}),window.vc.TemplateWindowUIPanelFrontendEditor=vc.TemplatesPanelViewFrontend.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperTemplatesPanelViewSearch).extend({panelName:"template_window",showMessageDisabled:!1,show:function(){this.clearSearch(),window.vc.TemplateWindowUIPanelFrontendEditor.__super__.show.call(this)},showMessage:function(e,a){if(this.showMessageDisabled)return!1;this.message_box_timeout&&(this.$el.find("[data-vc-panel-message]").remove(),window.clearTimeout(this.message_box_timeout)),this.message_box_timeout=!1;var t,i=vc.template('<div class="vc_message_box vc_message_box-standard vc_message_box-rounded vc_color-<%- color %>"><div class="vc_message_box-icon"><i class="fa fa fa-<%- icon %>"></i></div><p><%- text %></p></div>'),c="vc_col-xs-12 wpb_element_wrapper";switch(a){case"error":t=l('<div class="'+c+'" data-vc-panel-message>').html(i({color:"danger",icon:"times",text:e}));break;case"warning":t=l('<div class="'+c+'" data-vc-panel-message>').html(i({color:"warning",icon:"exclamation-triangle",text:e}));break;case"success":t=l('<div class="'+c+'" data-vc-panel-message>').html(i({color:"success",icon:"check",text:e}))}t.prependTo(this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_row.vc_active')),t.fadeIn(),this.message_box_timeout=window.setTimeout(function(){t.remove()},6e3)},changeTab:function(e){e&&e.preventDefault&&e.preventDefault(),e&&!e.isClearSearch&&this.clearSearch();e=l(e.currentTarget);e.parent().hasClass("vc_active")||(this.$el.find('[data-vc-ui-element="panel-tabs-controls"] .vc_active:not([data-vc-ui-element="panel-tabs-line-dropdown"])').removeClass("vc_active"),e.parent().addClass("vc_active"),this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_active').removeClass("vc_active"),this.$el.find(e.data("vcUiElementTarget")).addClass("vc_active"),this.$tabsMenu&&this.$tabsMenu.vcTabsLine("checkDropdownContainerActive"))}}),l.fn.vcAccordion.Constructor.prototype.collapseTemplate=function(a){var t,i,c,e=this.$element,s=0,n=this.getContainer().find("[data-vc-preview-handler]").each(function(){var e=l(this),a=e.data("vc.accordion");void 0===a&&(e.vcAccordion(),a=e.data("vc.accordion")),a&&a.setIndex&&a.setIndex(s++)}).filter(function(){var e=l(this).data("vc.accordion");return e.getTarget().hasClass(e.activeClass)}).filter(function(){return e[0]!==this});n.length&&l.fn.vcAccordion.call(n,"hide"),this.isActive()?l.fn.vcAccordion.call(e,"hide"):(l.fn.vcAccordion.call(e,"show"),t=e.closest(".vc_ui-list-bar-item"),i=e.closest("[data-template_id]"),c=i.closest("[data-vc-ui-element=panel-content]").parent(),setTimeout(function(){var e;Math.round(i.offset().top-c.offset().top)<0&&(e=Math.round(i.offset().top-c.offset().top+c.scrollTop()-t.height()),c.animate({scrollTop:e},400)),"function"==typeof a&&a(i,c)},400))}})(window.jQuery); (o=>{window.vc.element_start_index=0,window.vc.AddElementUIPanelBackendEditor=vc.PanelView.vcExtendUI(vc.HelperPanelViewHeaderFooter).extend({el:"#vc_ui-panel-add-element",searchSelector:"#vc_elements_name_filter",prepend:!1,builder:"",events:{'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="panel-tab-control"]':"handleFiltering","click .vc_shortcode-link":"createElement","keyup #vc_elements_name_filter":"handleFiltering","search #vc_elements_name_filter":"handleFiltering","cut #vc_elements_name_filter":"handleFiltering","paste #vc_elements_name_filter":"handleFiltering","click [data-vc-manage-elements]":"openPresetWindow"},initialize:function(){window.vc.AddElementUIPanelBackendEditor.__super__.initialize.call(this),window.vc.events.on("vc:savePreset",this.updateAddElementPopUp.bind(this)),window.vc.events.on("vc:deletePreset",this.removePresetFromAddElementPopUp.bind(this))},render:function(e,t){return _.isUndefined(vc.ShortcodesBuilder)||(this.builder=new vc.ShortcodesBuilder),this.$el.is(":hidden")&&window.vc.closeActivePanel(),(window.vc.active_panel=this).prepend=!!_.isBoolean(t)&&t,this.place_after_id=!!_.isString(t)&&t,this.model=!!_.isObject(e)&&e,this.$content=this.$el.find('[data-vc-ui-element="panel-add-element-list"]'),this.$buttons=o('[data-vc-ui-element="add-element-button"]',this.$content),this.buildFiltering(),this.$el.find('[data-vc-ui-element="panel-tab-control"]').eq(0).click(),this.show(),this.$el.find('[data-vc-ui-element="panel-tabs-controls"]').vcTabsLine("moveTabs"),vc.is_mobile||o(this.searchSelector).trigger("focus"),vc.AddElementUIPanelBackendEditor.__super__.render.call(this)},buildFiltering:function(){var e,t,i,n='[data-vc-ui-element="add-element-button"]',a=this._getNotIn(this.model?this.model.get("shortcode"):"");o(this.searchSelector).val(""),this.$content.addClass("vc_filter-all"),this.$content.attr("data-vc-ui-filter","*"),t=!(!(e=this.model?this.model.get("shortcode"):"vc_column")||_.isUndefined(vc.getMapped(e).as_parent))&&vc.getMapped(e).as_parent,_.isObject(t)?(i=[],_.isString(t.only)&&i.push(_.reduce(t.only.replace(/\s/,"").split(","),function(e,t){return e+(_.isEmpty(e)?"":",")+'[data-element="'+t.trim()+'"]'},"")),_.isString(t.except)&&i.push(_.reduce(t.except.replace(/\s/,"").split(","),function(e,t){return e+':not([data-element="'+t.trim()+'"])'},"")),n+=i.join(",")):a&&(n=a),!1===e||_.isUndefined(vc.getMapped(e).allowed_container_element)||(!1===vc.getMapped(e).allowed_container_element?n+=":not([data-is-container=true])":_.isString(vc.getMapped(e).allowed_container_element)&&(n+=":not([data-is-container=true]), [data-element="+vc.getMapped(e).allowed_container_element+"]")),this.$buttons.removeClass("vc_visible").addClass("vc_inappropriate"),o(n,this.$content).removeClass("vc_inappropriate").addClass("vc_visible"),this.hideEmptyFilters()},hideEmptyFilters:function(){var e=this;this.$el.find('[data-vc-ui-element="panel-add-element-tab"].vc_active').removeClass("vc_active"),this.$el.find('[data-vc-ui-element="panel-add-element-tab"]:first').addClass("vc_active"),this.$el.find("[data-filter]").each(function(){o(o(this).data("filter")+".vc_visible:not(.vc_inappropriate)",e.$content).length?o(this).parent().show():o(this).parent().hide()})},_getNotIn:_.memoize(function(n){return'[data-vc-ui-element="add-element-button"]:not('+_.reduce(vc.map,function(e,t){var i=_.isEmpty(e)?"":",";return _.isObject(t.as_child)?(_.isString(t.as_child.only)&&!_.contains(t.as_child.only.replace(/\s/,"").split(","),n)&&(e+=i+"[data-element="+t.base+"]"),_.isString(t.as_child.except)&&_.contains(t.as_child.except.replace(/\s/,"").split(","),n)&&(e+=i+"[data-element="+t.base+"]")):!1===t.as_child&&(e+=i+"[data-element="+t.base+"]"),e},"")+")"}),handleFiltering:function(e){"cut"==e.type||"paste"===e.type?setTimeout(function(){this.filterElements(e)}.bind(this),0):(e?(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()):e=window.event,this.filterElements(e))},filterElements:function(e){var t=o(e.currentTarget),i='[data-vc-ui-element="add-element-button"]',n=o(this.searchSelector).val(),a=(this.$content.removeClass("vc_filter-all"),o('[data-vc-ui-element="panel-add-element-tab"].vc_active').removeClass("vc_active"),t.is("[data-filter]")?(t.parent().addClass("vc_active"),i+=t=t.data("filter"),"*"===t?this.$content.addClass("vc_filter-all"):this.$content.removeClass("vc_filter-all"),this.$content.attr("data-vc-ui-filter",t.replace(".js-category-","")),o(this.searchSelector).val("")):n.length?(i+=":containsi('"+n+"'):not('.vc_element-deprecated')",this.$content.attr("data-vc-ui-filter","name:"+n)):(n.length,o('[data-vc-ui-element="panel-tab-control"][data-filter="*"]').parent().addClass("vc_active"),this.$content.attr("data-vc-ui-filter","*").addClass("vc_filter-all")),o(".vc_visible",this.$content).removeClass("vc_visible"),o(i,this.$content).addClass("vc_visible"),n.length&&13===(e.keyCode||e.which)&&1===(t=o(".vc_visible:not(.vc_inappropriate)",this.$content)).length&&t.find("[data-vc-clickable]").click(),!1),i=o(".vc-panel-no-results-message");this.$content.find(".wpb-content-layouts").each(function(){var e=o(this);0<e.find(".vc_visible").length?(e.closest(".vc_clearfix").show(),a=!0):e.closest(".vc_clearfix").hide()}),a?i.hide():i.show()},createElement:function(e){var t,i,n,a,s,r,d,c,l;e&&e.preventDefault&&e.preventDefault(),d=(e=o(e.currentTarget)).data("tag"),r={},s={width:"1/1"},(e=e.closest("[data-preset]"))&&(c=e.data("preset"),l=e.data("element")),!1===this.model?(window.vc.storage.lock(),"vc_section"===d?(e={shortcode:d},c&&"vc_section"===l&&(e.preset=c),i=vc.shortcodes.create(e)):(e={shortcode:"vc_row",params:r},c&&l===d&&(e.preset=c),e={shortcode:"vc_column",params:s,parent_id:(a=vc.shortcodes.create(e)).id,root_id:a.id},c&&"vc_column"===l&&(e.preset=c),n=vc.shortcodes.create(e),i=a,"vc_row"!==d&&(t={shortcode:d,parent_id:n.id,root_id:a.id},c&&l===d&&(t.preset=c),i=vc.shortcodes.create(t)))):i="vc_row"===d?(n="vc_section"===this.model.get("shortcode")?(window.vc.storage.lock(),a=vc.shortcodes.create({shortcode:"vc_row",params:r,parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.getNextOrder()}),vc.shortcodes.create({shortcode:"vc_column",params:s,parent_id:a.id,root_id:a.id})):(e={},r={width:"1/1"},window.vc.storage.lock(),a=vc.shortcodes.create({shortcode:"vc_row_inner",params:e,parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.getNextOrder()}),vc.shortcodes.create({shortcode:"vc_column_inner",params:r,parent_id:a.id,root_id:a.id})),a):(t={shortcode:d,parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.getNextOrder(),root_id:this.model.get("root_id")},c&&l===d&&(t.preset=c),vc.shortcodes.create(t)),this.model=i,window.vc.latestAddedElement=i,s=!(_.isBoolean(vc.getMapped(d).show_settings_on_create)&&!1===vc.getMapped(d).show_settings_on_create),this.model.get("shortcode"),this.hide(),s&&this.showEditForm()},getFirstPositionIndex:function(){return--window.vc.element_start_index,vc.element_start_index},show:function(){this.$el.addClass("vc_active"),this.trigger("show")},hide:function(){this.$el.removeClass("vc_active"),window.vc.active_panel=!1,this.trigger("hide")},showEditForm:function(){window.vc.edit_element_block_view.render(this.model,!1,!0)},updateAddElementPopUp:function(e,t,i,n){var a=this.$el.find('[data-element="'+t+'"]:first').clone(!0);vc_all_presets[e]=n,a.find("[data-vc-shortcode-name]").text(i),a.find(".vc_element-description").text(""),a.attr("data-preset",e),a.addClass("js-category-_my_elements_"),a.insertAfter(this.$el.find('[data-element="'+t+'"]:last')),this.$el.find('[data-filter="js-category-_my_elements_"]').show();n=this.$body.find('[data-vc-ui-element="panel-preset"] [data-vc-presets-list-content] .vc_ui-template:first').clone(!0);n.find('[data-vc-ui-element="template-title"]').attr("title",i).text(i),n.find('[data-vc-ui-delete="preset-title"]').attr("data-preset",e).attr("data-preset-parent",t),n.find("[data-vc-ui-add-preset]").attr("data-preset",e).attr("id",t).attr("data-tag",t),n.show(),n.insertAfter(this.$body.find('[data-vc-ui-element="panel-preset"] [data-vc-presets-list-content] .vc_ui-template:last'))},removePresetFromAddElementPopUp:function(e){this.$el.find('[data-preset="'+e+'"]').remove()},openPresetWindow:function(e){e&&e.preventDefault&&e.preventDefault(),window.vc.preset_panel_view.render().show()}}),window.vc.AddElementUIPanelFrontendEditor=vc.AddElementUIPanelBackendEditor.vcExtendUI(vc.HelperPanelViewHeaderFooter).extend({events:{'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="panel-tab-control"]':"handleFiltering","keyup #vc_elements_name_filter":"handleFiltering","search #vc_elements_name_filter":"handleFiltering","cut #vc_elements_name_filter":"handleFiltering","paste #vc_elements_name_filter":"handleFiltering","click .vc_shortcode-link":"createElement"},createElement:function(e){var t,i,n,a,s,r,d;for(e&&e.preventDefault&&e.preventDefault(),s=(e=o(e.currentTarget)).data("tag"),a={},n={width:"1/1"},(e=e.closest("[data-preset]"))&&(r=e.data("preset"),d=e.data("element")),this.prepend&&(window.vc.activity="prepend"),0==this.model?"vc_section"===s?(e={shortcode:s},r&&"vc_section"===d&&(e.preset=r),this.builder.create(e)):(e={shortcode:"vc_row",params:a},r&&"vc_row"===d&&(e.preset=r),this.builder.create(e),e={shortcode:"vc_column",parent_id:this.builder.lastID(),params:n},r&&"vc_column"===d&&(e.preset=r),this.builder.create(e),"vc_row"!==s&&(t={shortcode:s,parent_id:this.builder.lastID()},r&&d===s&&(t.preset=r),this.builder.create(t))):"vc_row"===s?"vc_section"===this.model.get("shortcode")?this.builder.create({shortcode:"vc_row",params:a,parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.nextOrder()}).create({shortcode:"vc_column",params:n,parent_id:this.builder.lastID()}):(e={width:"1/1"},this.builder.create({shortcode:"vc_row_inner",params:{},parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.nextOrder()}).create({shortcode:"vc_column_inner",params:e,parent_id:this.builder.lastID()})):(t={shortcode:s,parent_id:this.model.id,order:this.prepend?this.getFirstPositionIndex():vc.shortcodes.nextOrder()},r&&d===s&&(t.preset=r),this.builder.create(t)),this.model=this.builder.last(),i=this.builder.models.length-1;0<=i;i--)this.builder.models[i].get("shortcode");_.isString(vc.getMapped(s).default_content)&&vc.getMapped(s).default_content.length&&(a=this.builder.parse({},window.vc.getMapped(s).default_content,this.builder.last().toJSON()),_.each(a,function(e){e.default_content=!0,this.builder.create(e)},this)),this.model=this.builder.last(),window.vc.latestAddedElement=this.model,n=!(_.isBoolean(vc.getMapped(s).show_settings_on_create)&&!1===vc.getMapped(s).show_settings_on_create),this.hide(),n&&this.showEditForm(),this.builder.render(null,this.model)}})})(window.jQuery); (r=>{window.vc.ExtendPresets={settingsMenuSelector:'[data-vc-ui-element="settings-dropdown-list"]',settingsButtonSelector:'[data-vc-ui-element="settings-dropdown-button"]',settingsDropdownSelector:'[data-vc-ui-element="settings-dropdown"]',settingsPresetId:null,uiEvents:{init:"addEvents",render:"hideDropdown",afterRender:"afterRenderActions"},afterRenderActions:function(){this.untaintSettingsPresetData(),this.showDropdown()},hideDropdown:function(){this.$el.find('[data-vc-ui-element="settings-dropdown"]').hide()},showDropdown:function(){var t=this.model.get("shortcode");window.vc_settings_show&&"vc_column"!==t&&this.$el.find('[data-vc-ui-element="settings-dropdown"]').show()},showDropdownMenu:function(){var t=this.model.get("shortcode"),e=r(this);e.data("vcSettingsMenuLoaded")&&t===e.data("vcShortcodeName")||this.reloadSettingsMenuContent()},addEvents:function(){var t=this.$el.find(".vc_edit-form-tab.vc_active"),e=this.model.get("shortcode"),i=this;r(document).off("beforeMinimize.vc.paramWindow",this.minimizeButtonSelector).on("beforeMinimize.vc.paramWindow",this.minimizeButtonSelector,function(){t.find(".vc_ui-prompt-presets .vc_ui-prompt-close").trigger("click")}),r(document).off("close.vc.paramWindow",this.closeButtonSelector).on("beforeClose.vc.paramWindow",this.closeButtonSelector,function(){t.find(".vc_ui-prompt-presets .vc_ui-prompt-close").trigger("click")}),r(document).off("show.vc.accordion",this.settingsButtonSelector).on("show.vc.accordion",this.settingsButtonSelector,function(){var t=r(this);t.data("vcSettingsMenuLoaded")&&e===t.data("vcShortcodeName")||i.reloadSettingsMenuContent()})},saveSettingsAjaxData:function(t,e,i,s){return{action:"vc_action_save_settings_preset",shortcode_name:t,is_default:i?1:0,vc_inline:!0,title:e,data:s,_vcnonce:window.vcAdminNonce}},saveSettings:function(t,e){var i=this.model.get("shortcode"),s=JSON.stringify(this.getParamsForSettingsPreset());if(void 0!==t&&t.length)return void 0===e&&(e=!1),this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.saveSettingsAjaxData(i,t,e,s),context:this}).done(function(t){t.success&&(this.setSettingsMenuContent(t.html),this.settingsPresetId=t.id,this.untaintSettingsPresetData())}).always(this.resetAjax),this.ajax},fetchSaveSettingsDialogAjaxData:function(){return{action:"vc_action_render_settings_preset_title_prompt",vc_inline:!0,_vcnonce:window.vcAdminNonce}},fetchSaveSettingsDialog:function(e){var i=this.$el.find(".vc_ui-panel-content-container");i.find(".vc_ui-prompt-presets").length?void 0!==e&&e(!1):(this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.fetchSaveSettingsDialogAjaxData()}).done(function(t){t.success&&(i.prepend(t.html),void 0!==e)&&e(!0)}).fail(function(){void 0!==e&&e(!1)}).always(this.resetAjax))},showSaveSettingsDialog:function(t){var d=this;this.isSettingsPresetDefault=!!t,this.fetchSaveSettingsDialog(function(t){var s,n,a=d.$el.find(".vc_ui-panel-content-container"),o=a.find(".vc_ui-prompt-presets"),c=o.find(".textfield"),e=(a.find(".vc_ui-prompt.vc_visible").removeClass("vc_visible"),o.find("[data-vc-view-settings-preset]"));"undefined"!==window.vc_vendor_settings_presets[d.model.get("shortcode")]?e.removeAttr("disabled"):e.attr("disabled","disabled"),o.addClass("vc_visible"),c.trigger("focus"),a.addClass("vc_ui-content-hidden"),t&&(s=o.find("#vc_ui-save-preset-btn"),n=0,o.on("submit",function(){var i=c.val();return i.length&&d.saveSettings(i,d.isSettingsPresetDefault).done(function(t){var e=this.getParamsForSettingsPreset();c.val(""),d.setCustomButtonMessage(s,void 0,void 0,!0),vc.events.trigger("vc:savePreset",t.id,d.model.get("shortcode"),i,e),n=_.delay(function(){o.removeClass("vc_visible"),a.removeClass("vc_ui-content-hidden")},5e3)}).fail(function(){d.setCustomButtonMessage(s,window.i18nLocale.ui_danger,"danger",!0)}),!1}),o.on("click",".vc_ui-prompt-close",function(){return d.checkAjax(),o.removeClass("vc_visible"),a.removeClass("vc_ui-content-hidden"),d.clearCustomButtonMessage.call(this,s),n&&(window.clearTimeout(n),n=0),!1}),r(".edit-form-info").initializeTooltips())})},loadSettingsAjaxData:function(t){return{action:"vc_action_get_settings_preset",vc_inline:!0,id:t,_vcnonce:window.vcAdminNonce}},loadSettings:function(e){return this.panelInit=!1,this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.loadSettingsAjaxData(e),context:this}).done(function(t){t.success&&(this.settingsPresetId=e,this.applySettingsPreset(t.data))}).always(this.resetAjax),this.ajax},saveAsDefaultSettingsAjaxData:function(t,e){return{action:"vc_action_set_as_default_settings_preset",shortcode_name:t,id:e,vc_inline:!0,_vcnonce:window.vcAdminNonce}},saveAsDefaultSettings:function(t,e){var i=this.model.get("shortcode"),t=t||this.settingsPresetId;t?(this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.saveAsDefaultSettingsAjaxData(i,t),context:this}).done(function(t){t.success&&(this.setSettingsMenuContent(t.html),this.untaintSettingsPresetData(),e)&&e()}).always(this.resetAjax)):this.showSaveSettingsDialog(!0)},restoreDefaultSettingsAjaxData:function(t){return{action:"vc_action_restore_default_settings_preset",shortcode_name:t,vc_inline:!0,_vcnonce:window.vcAdminNonce}},restoreDefaultSettings:function(){var t=this.model.get("shortcode");this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.restoreDefaultSettingsAjaxData(t),context:this}).done(function(t){t.success&&this.setSettingsMenuContent(t.html)}).always(this.resetAjax)},setSettingsMenuContent:function(t){var e=this.$el.find(this.settingsButtonSelector),i=this.$el.find(this.settingsMenuSelector),s=this.model.get("shortcode"),n=this;e.data("vcShortcodeName",s),i.html(t),window.vc_presets_data&&0<window.vc_presets_data.presetsCount?i.find("[data-vc-view-settings-preset]").removeAttr("disabled"):i.find("[data-vc-view-settings-preset]").attr("disabled","disabled"),i.find("[data-vc-view-settings-preset]").on("click",function(){n.showViewSettingsList(),n.closeSettings()}),i.find("[data-vc-save-settings-preset]").on("click",function(){n.showSaveSettingsDialog(),n.closeSettings()}),i.find("[data-vc-save-template]").on("click",function(){n.showSaveTemplateDialog(),n.closeSettings()}),i.find("[data-vc-save-default-settings-preset]").on("click",function(){n.saveAsDefaultSettings(),n.closeSettings()}),i.find("[data-vc-restore-default-settings-preset]").on("click",function(){n.restoreDefaultSettings(),n.closeSettings()})},reloadSettingsMenuContentAjaxData:function(t){return{action:"vc_action_render_settings_preset_popup",shortcode_name:t,vc_inline:!0,_vcnonce:window.vcAdminNonce}},showViewSettingsList:function(){var e,t,i,s=this.$el.find(".vc_ui-panel-content-container");s.find(".vc_ui-prompt-view-presets:not(.vc_visible)").remove(),s.find(".vc_ui-prompt-view-presets").length||(s.find(".vc_ui-prompt.vc_visible").removeClass("vc_visible"),e=this,t=jQuery('<form class="vc_ui-prompt vc_ui-prompt-view-presets"><div class="vc_ui-prompt-controls"><button type="button" class="vc_general vc_ui-control-button vc_ui-prompt-close"><i class="vc-composer-icon vc-c-icon-close"></i></button></div><div class="vc_ui-prompt-title"><label for="prompt_title" class="wpb_element_label">Elements</label></div><div class="vc_ui-prompt-content"><div class="vc_ui-prompt-column"><div class="vc_ui-template-list vc_ui-list-bar" data-vc-action="collapseAll" style="margin-top: 20px;" data-vc-presets-list-content></div></div></div>'),this.buildsettingsListContent(t),t.appendTo(s),t.addClass("vc_visible"),s.addClass("vc_ui-content-hidden"),i=function(){return t.remove(),s.removeClass("vc_ui-content-hidden"),!1},t.off("click.vc1").on("click.vc1","[data-vc-load-settings-preset]",function(t){e.loadSettings(r(t.currentTarget).data("vcLoadSettingsPreset")),i()}),t.off("click.vc4").on("click.vc4","[data-vc-set-default-settings-preset]",function(){e.saveAsDefaultSettings(r(this).data("vcSetDefaultSettingsPreset"),function(){e.buildsettingsListContent(t)})}),t.off("click.vc3").on("click.vc3",".vc_ui-prompt-close",function(){i(),e.checkAjax()}))},buildsettingsListContent:function(t){var s=vc.template('<div class="vc_ui-template"><div class="vc_ui-list-bar-item"><button class="vc_ui-list-bar-item-trigger" title="Apply Element" type="button" data-vc-load-settings-preset="<%- id %>"><%- title %></button><div class="vc_ui-list-bar-item-actions"><button class="vc_general vc_ui-control-button" title="Apply Element" type="button" data-vc-load-settings-preset="<%- id %>"><i class="vc-composer-icon vc-c-icon-add"></i></button><button class="vc_general vc_ui-control-button" title="Delete Element" type="button" data-vc-delete-settings-preset="<%- id %>"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></button></div></div></div>'),n=t.find("[data-vc-presets-list-content]");n.empty(),_.each(window.vc_presets_data.presets[0],function(t,e){var i=t;0<window.vc_presets_data.defaultId&&parseInt(e,10)===window.vc_presets_data.defaultId&&(i=t+" (default)"),n.append(s({title:i,id:e}))}),_.each(window.vc_presets_data.presets[1],function(t,e){var i=t;0<window.vc_presets_data.defaultId&&parseInt(e,10)===window.vc_presets_data.defaultId&&(i=t+" (default)"),n.append(s({title:i,id:e}))})},reloadSettingsMenuContent:function(){var t=this.model.get("shortcode"),e=this.$el.find(this.settingsButtonSelector),i=!1;return this.setSettingsMenuContent(""),this.checkAjax(),this.ajax=r.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.reloadSettingsMenuContentAjaxData(t),context:this}).done(function(t){t.success&&(i=!0,this.setSettingsMenuContent(t.html),e.data("vcSettingsMenuLoaded",!0))}).always(function(){i||this.closeSettings(),this.resetAjax()}),this.ajax},closeSettings:function(t){void 0===t&&(t=!1);var e=this.$el.find(this.settingsMenuSelector),i=this.$el.find(this.settingsButtonSelector);t&&(i.data("vcSettingsMenuLoaded",!1),e.html("")),i.vcAccordion("hide")},isSettingsPresetDataTainted:function(){var t=(t=JSON.stringify(this.getParamsForSettingsPreset())).replace(/vc_custom_\d+/,"");return this.$el.data("vcSettingsPresetHash")!==vc_globalHashCode(t)},untaintSettingsPresetData:function(){var t=(t=JSON.stringify(this.getParamsForSettingsPreset())).replace(/vc_custom_\d+/,"");this.$el.data("vcSettingsPresetHash",vc_globalHashCode(t))},applySettingsPresetAjaxData:function(t){var e=this.model.get("parent_id");return{action:"vc_edit_form",tag:this.model.get("shortcode"),parent_tag:e?vc.shortcodes.get(e).get("shortcode"):null,post_id:vc_post_id,params:t,_vcnonce:window.vcAdminNonce}},applySettingsPreset:function(t){return this.currentModelParams=t,vc.events.trigger("presets:apply",this.model,t),this._killEditor(),this.trigger("render"),this.show(),this.checkAjax(),this.ajax=r.ajax({type:"POST",url:window.ajaxurl,data:this.applySettingsPresetAjaxData(t),context:this}).done(this.buildParamsContent).always(this.resetAjax),this},getParamsForSettingsPreset:function(){var t=this.model.get("shortcode"),e=this.getParams();return"vc_column"!==t&&"vc_column_inner"!==t||(delete e.width,delete e.offset),e}},vc.events.on("presets.apply",function(t,e){return"vc_tta_section"===t.get("shortcode")&&void 0!==e.tab_id&&(e.tab_id=vc_guid()+"-cl"),e})})(window.jQuery); (e=>{window.vc.ExtendTemplates={fetchSaveTemplateDialogAjaxData:function(){return{action:"vc_action_render_settings_templates_prompt",vc_inline:!0,_vcnonce:window.vcAdminNonce}},fetchSaveTemplateDialog:function(t){var n=this.$el.find(".vc_ui-panel-content-container");if(!n.find(".vc_ui-prompt-templates").length)return this.checkAjax(),this.ajax=e.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.fetchSaveTemplateDialogAjaxData()}).done(function(e){e.success&&(n.prepend(e.html),void 0!==t)&&t(!0)}).always(this.resetAjax),this.ajax;void 0!==t&&t(!1)},showSaveTemplateDialog:function(){var c=this;this.fetchSaveTemplateDialog(function(e){var t,n,i=c.$el.find(".vc_ui-panel-content-container"),a=i.find(".vc_ui-prompt-templates"),o=a.find(".textfield");i.find(".vc_ui-prompt.vc_visible").removeClass("vc_visible"),a.addClass("vc_visible"),o.trigger("focus"),i.addClass("vc_ui-content-hidden"),e&&(t=0,n=a.find("#vc_ui-save-templates-btn"),a.on("submit",function(){var e=o.val();c.$el.find(c.settingsButtonSelector);return e.length&&(e={action:vc.templates_panel_view.save_template_action,template:vc.shortcodes.singleStringify(c.model.get("id"),"template"),template_name:e,vc_inline:!0,_vcnonce:window.vcAdminNonce},vc.templates_panel_view.reloadTemplateList(e,function(){o.val(""),c.setCustomButtonMessage(n,void 0,void 0,!0),t=_.delay(function(){a.removeClass("vc_visible"),i.removeClass("vc_ui-content-hidden")},5e3)},function(){c.setCustomButtonMessage(n,window.i18nLocale.ui_danger,"danger")})),!1}),a.on("click",".vc_ui-prompt-close",function(){return c.checkAjax(),a.removeClass("vc_visible"),i.removeClass("vc_ui-content-hidden"),c.clearCustomButtonMessage.call(this,n),t&&(window.clearTimeout(t),t=0),!1}))})}}})(window.jQuery); (l=>{window.vc.EditElementPanelView=vc.PanelView.vcExtendUI(vc.HelperAjax).vcExtendUI(vc.ExtendPresets).vcExtendUI(vc.ExtendTemplates).vcExtendUI(vc.HelperPrompts).extend({panelName:"edit_element",el:"#vc_properties-panel",contentSelector:".vc_ui-panel-content.vc_properties-list",minimizeButtonSelector:'[data-vc-ui-element="button-minimize"]',closeButtonSelector:'[data-vc-ui-element="button-close"]',titleSelector:".vc_panel-title",tabsInit:!1,doCheckTabs:!0,$tabsMenu:!1,dependent_elements:{},mapped_params:{},draggable:!1,panelInit:!1,$spinner:!1,active_tab_index:0,buttonMessageTimeout:!1,notRequestTemplate:!1,requiredParamsInitialized:!1,currentModelParams:!1,customButtonMessageTimeout:!1,events:{"click [data-save=true]":"save","click [data-dismiss=panel]":"hide","mouseover [data-transparent=panel]":"addOpacity","click [data-transparent=panel]":"toggleOpacity","mouseout [data-transparent=panel]":"removeOpacity"},formRender:function(){var t=this,n=null;this.$el.find(".vc_edit-form-tab").on("input change",function(e){clearTimeout(n),vc.saveInProcess=!0,n=setTimeout(function(){t.save(e)},500)})},initialize:function(){_.bindAll(this,"setSize","setTabsSize","fixElContainment","hookDependent","resetAjax","removeAllPrompts"),this.on("setSize",this.setResize,this),this.on("render",this.resetMinimize,this),this.on("render",this.setTitle,this),this.on("render",this.prepareContentBlock,this),window.vc_auto_save&&this.on("afterRender",this.formRender,this),this.on("afterRender",function(){l(".edit-form-info").initializeTooltips(),this.reInitJsFunctions()},this)},reInitJsFunctions:function(){try{window.vc.frame_window&&window.vc.frame_window.vc_js&&vc.events.on("shortcodeView:updated",window.vc.frame_window.vc_js)}catch(e){console.error("Failed to execute window.vc.frame_window.vc_js function in reInitJsFunctions(): ",e)}},setCustomButtonMessage:function(e,t,n,i){return void 0===e&&(e=this.$el.find('[data-vc-ui-element="button-save"]')),void 0===i&&(i=!1),this.clearCustomButtonMessage=_.bind(this.clearCustomButtonMessage,this),!i&&!vc.frame_window||this.customButtonMessageTimeout||(void 0===t&&(t=window.i18nLocale.ui_saved),void 0===n&&(n="success"),i=e.html(),e.addClass("vc_ui-button-"+n+" vc_ui-button-undisabled").removeClass("vc_ui-button-action").data("vcCurrentTextHtml",i).data("vcCurrentTextType",n).html(t),_.delay(this.clearCustomButtonMessage.bind(this,e),5e3),this.customButtonMessageTimeout=!0),this},clearCustomButtonMessage:function(e){var t,n;this.customButtonMessageTimeout&&(window.clearTimeout(this.customButtonMessageTimeout),n=e.data("vcCurrentTextHtml")||"Save",t=e.data("vcCurrentTextType"),e.html(n).removeClass("vc_ui-button-"+t+" vc_ui-button-undisabled").addClass("vc_ui-button-action"),this.customButtonMessageTimeout=!1)},render:function(e,t,n){this.$el.is(":hidden")&&vc.closeActivePanel(),t&&(this.notRequestTemplate=!0),this.model=e,this.currentModelParams=this.model.get("params"),(vc.active_panel=this).resetMinimize(),this.clicked=!1,this.$el.css("height","auto"),this.$el.css("maxHeight","75vh"),t=this.model.setting("params")||[],this.$el.attr("data-vc-shortcode",this.model.get("shortcode")),this.tabsInit=!1,this.panelInit=!1,this.active_tab_index=0,this.requiredParamsInitialized=!1,this.mapped_params={},this.dependent_elements={},_.each(t,function(e){this.mapped_params[e.param_name]=e},this),this.trigger("render"),this.show(),this.checkAjax();e=this.model.get("id");return this.isEditElementPanelCache(e)?this.buildParamsContent(window.vc.EditElementPanelCache[e]):this.ajax=l.ajax({type:"POST",url:window.ajaxurl,data:this.ajaxData(n),context:this}).done(this.buildParamsContent).always(this.resetAjax),this},prepareContentBlock:function(){this.$content=this.notRequestTemplate?this.$el:this.$el.find(this.contentSelector).removeClass("vc_with-tabs"),this.$content.empty(),this.$spinner=l('<span class="vc_ui-wp-spinner vc_ui-wp-spinner-lg vc_ui-wp-spinner-dark"></span>'),this.$content.prepend(this.$spinner)},buildParamsContent:function(e){var t,n,i,a=this.model.get("id"),a=(this.setEditElementPanelCache(a,e),this.getExternalScriptsFromDataHtml(e)),s=(e=this.removeExternalScriptsFromDataHtml(e),(t=(e=l(e)).find('[data-vc-ui-element="panel-tabs-controls"]')).find(".vc_edit-form-tab-control:first-child").addClass("vc_active"),n=this.$el.find('[data-vc-ui-element="panel-header-content"]'),(i=e.find('[data-vc-ui-element="panel-edit-element-tab"]'))&&i.addClass("visually-hidden"),n&&n.addClass("visually-hidden"),this.$content.html(e)),c=(this.loadScriptsSequentially(a,function(){s.append("<script async>window.setTimeout(function(){window.wpb_edit_form_loaded=true;},100);<\/script>")}),this.$content.prepend(this.$spinner),t.prependTo(n),this),o=0,d=function(){!window.wpb_edit_form_loaded&&o<1e3?(o++,setTimeout(d,100)):(c.$content.removeAttr("data-vc-param-initialized"),c.active_tab_index=0,c.tabsInit=!1,c.panelInit=!1,c.dependent_elements={},c.requiredParamsInitialized=!1,c.$content.find("[data-vc-param-initialized]").removeAttr("data-vc-param-initialized"),i.removeClass("visually-hidden"),c.$content.find(".vc_ui-wp-spinner").remove(),c.init(),c.$content.parent().scrollTop(1).scrollTop(0),c.$content.removeClass("vc_properties-list-init"),c.$el.trigger("vcPanel.shown"),c.trigger("afterRender"),vc.events.trigger("editElementPanel:ready"))};window.setTimeout(d,10)},getExternalScriptsFromDataHtml:function(e){for(var t,n=[],i=this.getExternalScriptRegex();t=i.exec(e);)n.push(t[1]);return n},removeExternalScriptsFromDataHtml:function(e){return e.replace(this.getExternalScriptRegex(),"")},getExternalScriptRegex:function(){return/<script\s+src="([^"]+)"><\/script>/g},loadScriptsSequentially:function(e,t){var n,i;0===e.length?t():(n=e.shift(),(i=document.createElement("script")).src=n,i.onload=function(){this.loadScriptsSequentially(e,t)}.bind(this),document.head.appendChild(i))},setEditElementPanelCache:function(e,t){window.vc.EditElementPanelCache||(window.vc.EditElementPanelCache={}),window.vc.EditElementPanelCache[e]=t},removeElementEditElementPanelCache:function(e){window.vc.EditElementPanelCache&&window.vc.EditElementPanelCache[e]&&delete window.vc.EditElementPanelCache[e]},isEditElementPanelCache:function(e){return window.vc.EditElementPanelCache&&window.vc.EditElementPanelCache[e]},resetMinimize:function(){this.$el.removeClass("vc_panel-opacity")},ajaxData:function(e){var t=this.model.get("parent_id"),t=t?this.model.collection.get(t).get("shortcode"):null,n=this.model.get("params"),n=_.extend({},vc.getDefaults(this.model.get("shortcode")),n);return{action:"vc_edit_form",tag:this.model.get("shortcode"),parent_tag:t,post_id:vc_post_id,params:n,usage_count:e,_vcnonce:window.vcAdminNonce}},init:function(){vc.EditElementPanelView.__super__.init.call(this),this.$el.find('[data-vc-ui-element="panel-header-content"]').removeClass("visually-hidden"),this.initParams(),this.initDependency(),l(".wpb_edit_form_elements .textarea_html").each(function(){window.init_textarea_html(l(this))}),this.trigger("init"),this.panelInit=!0},initParams:function(){var n=this,e=this.content().find('#vc_edit-form-tabs [data-vc-ui-element="panel-edit-element-tab"]:eq('+this.active_tab_index+")");(e=e.length?e:this.content()).attr("data-vc-param-initialized")||(l('[data-vc-ui-element="panel-shortcode-param"]',e).each(function(){var e,t=l(this);t.data("vcInitParam")||(e=t.data("param_settings"),vc.atts.init.call(n,e,t),t.data("vcInitParam",!0))}),e.attr("data-vc-param-initialized",!0)),this.requiredParamsInitialized||_.isUndefined(vc.required_params_to_init)||(l('[data-vc-ui-element="panel-shortcode-param"]',this.content()).each(function(){var e,t=l(this);!t.data("vcInitParam")&&-1<_.indexOf(vc.required_params_to_init,t.data("param_type"))&&(e=t.data("param_settings"),vc.atts.init.call(n,e,t),t.data("vcInitParam",!0))}),this.requiredParamsInitialized=!0)},initDependency:function(){var a={};_.each(this.mapped_params,function(e){var t,n,i;_.isObject(e)&&_.isObject(e.dependency)&&(t=e.dependency,_.isString(e.dependency.element)&&(n=l("[name="+e.dependency.element+"].wpb_vc_param_value",this.$content),i=l("[name= "+e.param_name+"].wpb_vc_param_value",this.$content),_.each(n,function(e){var e=l(e),t=e.attr("name");_.isArray(this.dependent_elements[e.attr("name")])||(this.dependent_elements[e.attr("name")]=[]),this.dependent_elements[e.attr("name")].push(i),e.data("dependentSet")||(e.attr("data-dependent-set","true"),e.off("keyup change",this.hookDependent).on("keyup change",this.hookDependent)),a[t]||(a[t]=e)},this)),_.isString(t.callback))&&window[t.callback].call(this)},this),this.doCheckTabs=!1,_.each(a,function(e){this.hookDependent({currentTarget:e})},this),this.doCheckTabs=!0,this.checkTabs(),a=null},hookDependent:function(e){var i,t=l(e.currentTarget),n=t.closest(".vc_column"),a=this.dependent_elements[t.attr("name")],s=t.is(":checkbox")?_.map(this.$content.find("[name="+l(e.currentTarget).attr("name")+"].wpb_vc_param_value:checked"),function(e){return l(e).val()}):t.val(),e=this.doCheckTabs;return this.doCheckTabs=!1,i=t.is(":checkbox")?!this.$content.find("[name="+t.attr("name")+"].wpb_vc_param_value:checked").length:!s.length,n.hasClass("vc_dependent-hidden")?_.each(a,function(e){var t=jQuery.Event("change");t.extra_type="vcHookDepended",e.closest(".vc_column").addClass("vc_dependent-hidden"),e.trigger(t)}):_.each(a,function(e){var t=e.attr("name"),t=_.isObject(this.mapped_params[t])&&_.isObject(this.mapped_params[t].dependency)?this.mapped_params[t].dependency:{},n=e.closest(".vc_column"),t=(_.isBoolean(t.not_empty)&&!0===t.not_empty&&!i||_.isBoolean(t.is_empty)&&!0===t.is_empty&&i||t.value&&_.intersection(_.isArray(t.value)?t.value:[t.value],_.isArray(s)?s:[s]).length||t.value_not_equal_to&&!_.intersection(_.isArray(t.value_not_equal_to)?t.value_not_equal_to:[t.value_not_equal_to],_.isArray(s)?s:[s]).length?n.removeClass("vc_dependent-hidden"):n.addClass("vc_dependent-hidden"),jQuery.Event("change"));t.extra_type="vcHookDepended",e.trigger(t)},this),e&&(this.checkTabs(),this.doCheckTabs=!0),this},checkTabs:function(){var n=this;!1===this.tabsInit&&(this.tabsInit=!0,this.$content.hasClass("vc_with-tabs"))&&(this.$tabsMenu=this.$content.find(".vc_edit-form-tabs-menu")),this.$tabsMenu&&(this.$content.find('[data-vc-ui-element="panel-edit-element-tab"]').each(function(e){var t=n.$tabsMenu.find('> [data-tab-index="'+e+'"]');l(this).find('[data-vc-ui-element="panel-shortcode-param"]:not(".vc_dependent-hidden")').length?t.hasClass("vc_dependent-hidden")&&(t.removeClass("vc_dependent-hidden").removeClass("vc_tab-color-animated").addClass("vc_tab-color-animated"),window.setTimeout(function(){t.removeClass("vc_tab-color-animated")},200)):t.addClass("vc_dependent-hidden")}),window.setTimeout(this.setTabsSize,100))},setTabsSize:function(){this.$tabsMenu.parents(".vc_with-tabs.vc_panel-body").css("margin-top",this.$tabsMenu.outerHeight())},setActive:function(){this.$el.prev().addClass("active")},window:function(){return window},getParams:function(){var e=this.mapped_params;return this.params=_.extend({},this.model.get("params")),_.each(e,function(e){var t=vc.atts.parseFrame.call(this,e);this.params[e.param_name]=t},this),_.each(vc.edit_form_callbacks,function(e){e.call(this)},this),this.params},content:function(){return this.$content},save:function(e){var t=this.model.get("id"),t=(this.removeElementEditElementPanelCache(t),vc.saveInProcess=!0,e&&e.target&&e.target.classList.contains("textarea_html"));if(this.panelInit&&this.model){var e=this,n=e.model.get("shortcode"),i=e.getParams(),a=_.extend({},vc.getDefaults(n),vc.getMergedParams(n,i));if(!_.isUndefined(i.content)){if(t)try{i.content=window.vc.utils.fixUnclosedTags(i.content)}catch(e){console.error("Failed to execute window.vc.utils.fixUnclosedTags function: ",e)}a.content=i.content}e.model.save({params:a}),e.showMessage(window.sprintf(window.i18nLocale.inline_element_saved,vc.getMapped(n).name),"success"),window.vc_auto_save||window.vc.frame_window||this.hide(),e.trigger("save"),vc.saveInProcess=!1}},show:function(){this.$el.hasClass("vc_active")||(this.$el.addClass("vc_active"),this.draggable||this.initDraggable(),this.fixElContainment(),this.trigger("show"))},hide:function(e){e&&e.preventDefault&&e.preventDefault(),vc.saveInProcess?(this.$el.addClass("visually-hidden"),setTimeout(function(){this.handleHide()}.bind(this),500)):this.handleHide()},handleHide:function(){this.checkAjax(),this.ajax=!1,this.model=null,vc.active_panel=!1,this.currentModelParams=!1,this._killEditor(),this.$el.removeClass("vc_active visually-hidden"),this.$el.find(".vc_properties-list").removeClass("vc_with-tabs").css("margin-top","auto"),this.$content.empty(),this.trigger("hide")},setTitle:function(){return this.$el.find(this.titleSelector).html(vc.getMapped(this.model.get("shortcode")).name+" "+window.i18nLocale.settings),this},_killEditor:function(){_.isUndefined(window.tinyMCE)||l("textarea.textarea_html",this.$el).each(function(){var e=l(this).attr("id");"4"===tinymce.majorVersion?window.tinyMCE.execCommand("mceRemoveEditor",!0,e):window.tinyMCE.execCommand("mceRemoveControl",!0,e)}),jQuery("body").off("click.wpcolorpicker")}}),window.vc.EditElementUIPanel=vc.EditElementPanelView.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperPanelViewResizable).vcExtendUI(vc.HelperPanelViewDraggable).extend({el:"#vc_ui-panel-edit-element",events:{'click [data-vc-ui-element="button-save"]':"save",'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="button-minimize"]':"toggleOpacity",'click [data-vc-ui-element="panel-tab-control"]':"changeTab"},titleSelector:'[data-vc-ui-element="panel-title"]',initialize:function(){vc.EditElementUIPanel.__super__.initialize.call(this),this.on("afterResizeStart",function(){this.$el.css("maxHeight","none")})},show:function(){vc.EditElementUIPanel.__super__.show.call(this),l('[data-vc-ui-element="panel-tabs-controls"]',this.$el).remove(),this.$el.css("maxHeight","75vh")},tabsMenu:function(){var e;return!1===this.tabsInit&&(this.tabsInit=!0,(e=this.$el.find('[data-vc-ui-element="panel-tabs-controls"]')).length)&&(this.$tabsMenu=e),this.$tabsMenu},buildTabs:function(){this.content().find('[data-vc-ui-element="panel-tabs-controls"]').prependTo('[data-vc-ui-element="panel-header-content"]')},changeTab:function(e){e&&e.preventDefault&&e.preventDefault();e=l(e.currentTarget);e.parent().hasClass("vc_active")||(this.$el.find('[data-vc-ui-element="panel-tabs-controls"] .vc_active:not([data-vc-ui-element="panel-tabs-line-dropdown"])').removeClass("vc_active"),e.parent().addClass("vc_active"),this.$el.find('[data-vc-ui-element="panel-edit-element-tab"].vc_active').removeClass("vc_active"),this.active_tab_index=this.$el.find(e.data("vcUiElementTarget")).addClass("vc_active").index(),this.initParams(),this.$tabsMenu&&this.$tabsMenu.vcTabsLine("checkDropdownContainerActive"),this.$content.parent().scrollTop(1).scrollTop(0),this.trigger("tabChange"))},checkTabs:function(){var n=this;!1===this.tabsInit&&(this.tabsInit=!0,this.$tabsMenu=this.$el.find('[data-vc-ui-element="panel-tabs-controls"]')),this.tabsMenu()&&(this.content().find('[data-vc-ui-element="panel-edit-element-tab"]').each(function(e){var t=n.$tabsMenu.find('> [data-tab-index="'+e+'"]');l(this).find('[data-vc-ui-element="panel-shortcode-param"]:not(".vc_dependent-hidden")').length?t.hasClass("vc_dependent-hidden")&&(t.removeClass("vc_dependent-hidden"),window.setTimeout(function(){t.removeClass("vc_tab-color-animated")},200)):window.setTimeout(function(){t.addClass("vc_dependent-hidden")},0)}),this.$tabsMenu.vcTabsLine("refresh"),this.$tabsMenu.vcTabsLine("moveTabs"))}})})(window.jQuery); (l=>{window.vc.TemplateLibraryView=vc.PanelView.vcExtendUI(vc.HelperAjax).extend({myTemplates:[],$mainPopup:!1,$loadingPage:!1,$gridContainer:!1,$errorMessageContainer:!1,$myTemplateContainer:!1,$popupItems:!1,$previewImage:!1,$previewTitle:!1,$previewUpdate:!1,$previewDownload:!1,$previewUpdateBtn:!1,$previewDownloadBtn:!1,$templatePreview:!1,$templatePage:!1,$downloadPage:!1,$updatePage:!1,$content:!1,$filter:!1,compiledGridTemplate:!1,compiledTemplate:!1,loaded:!1,data:!1,events:{"click [data-dismiss=panel]":"hide","click .vc_ui-panel-close-button":"closePopupButton","click .vc_ui-access-library-btn":"accessLibrary","click #vc_template-library-template-grid .vc_ui-panel-template-preview-button":"previewButton","click .vc_ui-panel-back-button":"backToTemplates","click .vc_ui-panel-template-download-button, #vc_template-library-download-btn":"downloadButton","click .vc_ui-panel-template-update-button, #vc_template-library-update-btn":"updateButton","keyup #vc_template_lib_name_filter":"filterTemplates","search #vc_template_lib_name_filter":"filterTemplates"},initialize:function(){_.bindAll(this,"loadLibrary","addTemplateStatus","loadMyTemplates","deleteTemplate"),this.$mainPopup=this.$el.find(".vc_ui-panel-popup"),this.$loadingPage=this.$el.find(".vc_ui-panel-loading"),this.$gridContainer=this.$el.find("#vc_template-library-template-grid"),this.$errorMessageContainer=this.$el.find("#vc_template-library-panel-error-message"),this.$myTemplateContainer=this.$el.find("#vc_template-library-shared_templates"),this.$popupItems=this.$el.find(".vc_ui-panel-popup-item"),this.$previewImage=this.$el.find(".vc_ui-panel-preview-image"),this.$previewTitle=this.$el.find(".vc_ui-panel-template-preview .vc_ui-panel-title"),this.$previewUpdate=this.$el.find("#vc_template-library-update"),this.$previewDownload=this.$el.find("#vc_template-library-download"),this.$previewUpdateBtn=this.$previewUpdate.find("#vc_template-library-update-btn"),this.$previewDownloadBtn=this.$previewUpdate.find("#vc_template-library-download-btn"),this.$templatePreview=this.$el.find(".vc_ui-panel-template-preview"),this.$templatePage=this.$el.find(".vc_ui-panel-template-content"),this.$downloadPage=this.$el.find(".vc_ui-panel-download"),this.$updatePage=this.$el.find(".vc_ui-panel-update"),this.$filter=this.$el.find("#vc_template_lib_name_filter"),this.$content=this.$el.find(".vc_ui-templates-content");var e=l("#vc_template-grid-item").html(),e=(this.compiledGridTemplate=vc.template(e),l("#vc_template-item").html());this.compiledTemplate=vc.template(e),window.vc.events.on("templates:delete",this.deleteTemplate)},getLibrary:function(){var e,t;this.loaded?this.showLibrary():(this.checkAjax(),e=this.getStorage("templates"),t=this,e&&"object"==typeof e&&!_.isEmpty(e)?(this.loaded=!0,this.loadLibrary(e),this.showLibrary()):this.ajax=l.getJSON("https://vc-cc-templates.wpbakery.com/templates.json").done(function(e){t.setStorage("templates",e),t.loaded=!0,t.loadLibrary(e),t.showLibrary()}).always(this.resetAjax))},removeStorage:function(e){try{localStorage.removeItem("vc4-"+e),localStorage.removeItem("vc4-"+e+"_expiresIn")}catch(e){return!1}return!0},getStorage:function(e){var t=Date.now(),a=localStorage.getItem("vc4-"+e+"_expiresIn");if((a=null==a?0:a)<t)return this.removeStorage(e),null;try{return JSON.parse(localStorage.getItem("vc4-"+e))}catch(e){return null}},setStorage:function(e,t,a){a=null==a?86400:Math.abs(a);a=Date.now()+1e3*a;try{localStorage.setItem("vc4-"+e,JSON.stringify(t)),localStorage.setItem("vc4-"+e+"_expiresIn",a)}catch(e){return window.console&&window.console.warn&&window.console.warn("template setStorage error",e),!1}return!0},loadLibrary:function(e){var t,a;e&&(t="",(a=this).loaded=!0,this.data=e,this.$filter.val(""),e.forEach(function(e){e=a.addTemplateStatus(e),t+=a.compiledGridTemplate({id:e.id,title:e.title,thumbnailUrl:e.thumbnailUrl,previewUrl:e.previewUrl,status:e.status,downloaded:_.find(a.myTemplates,{id:e.id}),version:e.version})}),this.$gridContainer.html(t))},showLibrary:function(){this.$loadingPage.addClass("vc_ui-hidden"),this.$mainPopup.removeClass("vc_ui-hidden"),this.$templatePage.removeClass("vc_ui-hidden")},addTemplateStatus:function(e){var t,a="",i=_.find(this.myTemplates,{id:e.id});return i&&(t=window.i18nLocale.ui_template_downloaded,a='<span class="vc_ui-panel-template-item-info"><span>'+(t=e.version>i.version?window.i18nLocale.ui_template_fupdate:t)+"</span></span>"),e.status=a,e},loadMyTemplates:function(){var t="",a=this;this.myTemplates.forEach(function(e){t+=a.compiledTemplate({post_id:e.post_id,title:e.title})}),this.$myTemplateContainer.html(t)},closePopupButton:function(e){e&&e.preventDefault&&e.preventDefault(),this.$mainPopup.toggleClass("vc_ui-hidden"),this.$popupItems.addClass("vc_ui-hidden"),this.$content.removeClass("vc_ui-hidden")},accessLibrary:function(){this.$loadingPage.removeClass("vc_ui-hidden"),this.$content.addClass("vc_ui-hidden"),this.getLibrary()},previewButton:function(e){var e=l(e.currentTarget),t=e.data("preview-url"),a=e.data("title"),i=e.data("template-id"),e=e.data("template-version"),t=(this.$previewImage.attr("src",t),this.$previewTitle.text(a),_.find(this.myTemplates,{id:i}));this.$previewUpdate.toggleClass("vc_ui-hidden",!(t&&t.version<e)),this.$previewDownload.toggleClass("vc_ui-hidden",!!t),this.$previewUpdateBtn.data("template-id",i),this.$previewDownloadBtn.data("template-id",i),this.$popupItems.addClass("vc_ui-hidden"),this.$templatePreview.removeClass("vc_ui-hidden"),this.$templatePreview.attr("data-template-id",i)},backToTemplates:function(){this.$popupItems.addClass("vc_ui-hidden"),this.$templatePage.removeClass("vc_ui-hidden")},deleteTemplate:function(e){"shared_templates"===e.type&&-1!==(e=_.findIndex(this.myTemplates,{post_id:e.id}))&&(this.myTemplates.splice(e,1),this.loaded)&&this.loadLibrary(this.data)},downloadButton:function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(e.currentTarget).closest("[data-template-id]").data("templateId");e&&(this.showDownloadOverlay(),this.downloadTemplate(e))},updateButton:function(e){e&&e.preventDefault&&e.preventDefault(),jQuery(e.currentTarget).closest("[data-template-id]").data("templateId")&&this.showUpdateOverlay()},showDownloadOverlay:function(){this.$popupItems.addClass("vc_ui-hidden"),this.$downloadPage.removeClass("vc_ui-hidden")},hideDownloadOverlay:function(e){e?(this.$errorMessageContainer.html(e),this.$errorMessageContainer.removeClass("vc_ui-hidden")):this.$errorMessageContainer.addClass("vc_ui-hidden"),this.$downloadPage.addClass("vc_ui-hidden"),this.$templatePage.removeClass("vc_ui-hidden")},showUpdateOverlay:function(){this.$popupItems.addClass("vc_ui-hidden"),this.$updatePage.removeClass("vc_ui-hidden")},hideUpdateOverlay:function(e){this.$updatePage.addClass("vc_ui-hidden"),this.$templatePage.removeClass("vc_ui-hidden")},downloadTemplate:function(a){this.checkAjax();var i=!0;this.ajax=l.ajax({type:"POST",url:window.ajaxurl,data:{action:"vc_shared_templates_download",id:a,_vcnonce:window.vcAdminNonce},dataType:"json",context:this}).done(function(e){var t;e&&e.success&&(t=_.find(this.data,{id:a}))&&(i=!1,t.post_id=e.data.post_id,this.myTemplates.unshift(t),this.loadMyTemplates(),this.loadLibrary(this.data),this.showLibrary())}).always(function(e,t){var a="";"success"===t&&!i||(a=e&&e.data&&e.data.message?e.data.message:window.i18nLocale.ui_templates_failed_to_download),this.hideDownloadOverlay(a),this.resetAjax()})},filterTemplates:function(){var e=".vc_ui-panel-template-item .vc_ui-panel-template-item-name:containsi('"+this.$filter.val()+"')";l(".vc_ui-panel-template-item.vc_ui-visible",this.$gridContainer).removeClass("vc_ui-visible"),l(e,this.$gridContainer).closest(".vc_ui-panel-template-item").addClass("vc_ui-visible")}}),l(function(){window.vcTemplatesLibraryData&&(window.vc.templatesLibrary=new vc.TemplateLibraryView({el:'[data-vc-ui-element="panel-edit-element-tab"][data-tab="shared_templates"]'}),window.vc.templatesLibrary.myTemplates=window.vcTemplatesLibraryData.templates||[],window.vc.templatesLibrary.loadMyTemplates())})})(window.jQuery); (e=>{vc.PostSettingsUIPanelFrontendEditor=vc.PostSettingsPanelView.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperPanelViewResizable).vcExtendUI(vc.HelperPanelViewDraggable).vcExtendUI({panelName:"post_settings",uiEvents:{setSize:"setEditorSize",show:"setEditorSize"},setSize:function(){this.trigger("setSize")},setDefaultHeightSettings:function(){this.$el.css("height","75vh")},setEditorSize:function(){window.Vc_postSettingsEditor&&(this.editor_css.setSizeResizable(),this.editor_js_header.setSizeResizable(),this.editor_js_footer.setSizeResizable())}}),vc.PostSettingsUIPanelBackendEditor=vc.PostSettingsPanelViewBackendEditor.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperPanelViewResizable).vcExtendUI(vc.HelperPanelViewDraggable).vcExtendUI({uiEvents:{setSize:"setEditorSize",show:"setEditorSize",render:"removeChangeTitleField"},setSize:function(){this.trigger("setSize")},setEditorSize:function(){window.Vc_postSettingsEditor&&(this.editor_css.setSizeResizable(),this.editor_js_header.setSizeResizable(),this.editor_js_footer.setSizeResizable())},setDefaultHeightSettings:function(){this.$el.css("height","75vh")},removeChangeTitleField:function(){e("#vc_settings-title-container").remove()}})})(window.jQuery); (()=>{var e={'click [data-vc-ui-element="button-save"]':"save",'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="button-minimize"]':"toggleOpacity",'click [data-vc-ui-element="button-layout"]':"setLayout",'click [data-vc-ui-element="button-update-layout"]':"updateFromInput"};vc.RowLayoutUIPanelFrontendEditor=vc.RowLayoutEditorPanelView.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperPanelViewDraggable).extend({panelName:"rowLayouts",events:e}),vc.RowLayoutUIPanelBackendEditor=vc.RowLayoutEditorPanelViewBackend.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperPanelViewDraggable).extend({panelName:"rowLayouts",events:e})})(window.jQuery); (o=>{window.vc.PresetSettingsUIPanelFrontendEditor=vc.PanelView.vcExtendUI(vc.HelperPanelViewHeaderFooter).vcExtendUI(vc.HelperAjax).vcExtendUI({panelName:"preset_settings",showMessageDisabled:!1,events:{'click [data-vc-ui-delete="preset-title"]':"removePreset",'click [data-vc-ui-element="button-close"]':"hide",'click [data-vc-ui-element="button-minimize"]':"toggleOpacity","click [data-vc-ui-add-preset]":"createPreset"},initialize:function(e){this.frontEnd=e&&e.frontEnd},createPreset:function(e){var t,s,i,a,c;_.isUndefined(vc.ShortcodesBuilder)||(this.builder=new vc.ShortcodesBuilder),i=(e=o(e.currentTarget)).data("preset"),e=e.data("tag"),a={width:"1/1"},c={shortcode:"vc_row",params:{}},this.frontEnd?(this.builder.create(c),s={shortcode:"vc_column",params:a,parent_id:this.builder.lastID()},this.builder.create(s),t={shortcode:e,parent_id:this.builder.lastID()},i&&(t.preset=i),window.vc.closeActivePanel(),this.builder.create(t),this.model=this.builder.last(),this.builder.render()):(s={shortcode:"vc_column",params:a,parent_id:(a=vc.shortcodes.create(c)).id,root_id:a.id},t={shortcode:e,parent_id:vc.shortcodes.create(s).id,root_id:a.id},i&&(t.preset=i),c=vc.shortcodes.create(t),window.vc.closeActivePanel(),this.model=c),_.isBoolean(vc.getMapped(e).show_settings_on_create)&&!1===vc.getMapped(e).show_settings_on_create||this.showEditForm()},showEditForm:function(){window.vc.edit_element_block_view.render(this.model)},render:function(){return this.$el.css("left",(o(window).width()-this.$el.width())/2),this},removePreset:function(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(e.currentTarget).closest('[data-vc-ui-delete="preset-title"]'),s=t.data("preset"),t=t.data("preset-parent");this.deleteSettings(s,t,e)},deleteSettings:function(t,e){var s=this;return!!confirm(window.i18nLocale.delete_preset_confirmation)&&(this.checkAjax(),this.ajax=o.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:this.deleteSettingsAjaxData(e,t),context:this}).done(function(e){e&&e.success&&(this.showMessage(window.i18nLocale.preset_removed,"success"),s.$el.find('[data-preset="'+t+'"]').closest(".vc_ui-template").remove(),window.vc.events.trigger("vc:deletePreset",t))}).always(this.resetAjax),this.ajax)},deleteSettingsAjaxData:function(e,t){return{action:"vc_action_delete_settings_preset",shortcode_name:e,vc_inline:!0,id:t,_vcnonce:window.vcAdminNonce}},showMessage:function(e,t){var s;if(this.showMessageDisabled)return!1;s="vc_col-xs-12 wpb_element_wrapper",this.message_box_timeout&&(this.$el.find("[data-vc-panel-message]").remove(),window.clearTimeout(this.message_box_timeout)),this.message_box_timeout=!1;var i,a=vc.template('<div class="vc_message_box vc_message_box-standard vc_message_box-rounded vc_color-<%- color %>"><div class="vc_message_box-icon"><i class="fa fa fa-<%- icon %>"></i></div><p><%- text %></p></div>');switch(t){case"error":i=o('<div class="'+s+'" data-vc-panel-message>').html(a({color:"danger",icon:"times",text:e}));break;case"warning":i=o('<div class="'+s+'" data-vc-panel-message>').html(a({color:"warning",icon:"exclamation-triangle",text:e}));break;case"success":i=o('<div class="'+s+'" data-vc-panel-message>').html(a({color:"success",icon:"check",text:e}))}i.prependTo(this.$el.find(".vc_properties-list")),i.fadeIn(),this.message_box_timeout=window.setTimeout(function(){i.remove()},6e3)}})})(window.jQuery); ((o,r)=>{var e,a=[],d=wp.media,i=d.featuredImage.set,n=d.editor.send.attachment,l=i18nLocale,c={};function t(r,l){var e=r.models?r.pluck("id"):r;o.ajax({dataType:"json",type:"POST",url:window.ajaxurl,data:{action:"vc_media_editor_add_image",filters:window.vc_selectedFilters,ids:e,vc_inline:!0,_vcnonce:window.vcAdminNonce}}).done(function(e){var t,i,a;if("function"==typeof l){for(t=[],a=0;a<e.data.ids.length;a++)i=(i="function"==typeof i?r.get(e.data.ids[a]):r[e.data.ids[a]])||d.model.Attachment.get(e.data.ids[a]),t.push(i);var n=(e=>{for(var t=[],i=0;i<e.length;i++)e[i].get("url")||t.push(e[i].fetch());return t})(t);o.when.apply(o,n).done(function(){l(t)})}}).fail(function(e){o(".media-modal-close").click(),a=[],window.vc&&window.vc.active_panel&&window.i18nLocale&&window.i18nLocale.error_while_saving_image_filtered&&window.vc.active_panel.showMessage(window.i18nLocale.error_while_saving_image_filtered,"error"),window.console&&window.console.warn&&window.console.warn("processImages failed",e)}).always(function(){o(".media-modal").removeClass("processing-media")})}function s(e){var t,i,a=o(".media-frame:visible [data-vc-preview-image-filter="+e+"]");a.length&&(t=o(".media-frame:visible .attachment-info .thumbnail-image").eq(-1),i=t.find("img"),t.addClass("loading"),i.data("original-src")||i.data("original-src",i.attr("src")),a.val().length?o.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:{action:"vc_media_editor_preview_image",filter:a.val(),attachment_id:e,preferred_size:window.getUserSetting("imgsize","medium"),_vcnonce:window.vcAdminNonce}}).done(function(e){e.success&&e.data.src.length&&i.attr("src",e.data.src)}).fail(function(e,t,i){window.console.warn("Filter preview failed:",t,i)}).always(function(){t.removeClass("loading")}):(i.attr("src",i.data("original-src")),t.removeClass("loading")))}e=r.extend(d.view.AttachmentCompat.prototype.render),d.view.AttachmentCompat.prototype.render=function(){var a=this,n=this.model.get("id");return e.call(this),r.defer(function(){var e,t=a.controller.$el.find(".attachment-info"),i=a.controller.$el.find("[data-vc-preview-image-filter]");t.length&&i.length&&(e='<div class="vc-filter-wrapper"><label class="setting vc-image-filter-setting">',e=(e+='<span class="name">'+i.parent().find(".vc-filter-label").text()+"</span>")+i[0].outerHTML+"</label></div>",o(".vc-filter-wrapper").length||t.before(e),i.parents("tr").remove()),void 0!==window.vc_selectedFilters&&void 0!==window.vc_selectedFilters[n]&&(t=o(".media-frame:visible [data-vc-preview-image-filter="+n+"]")).length&&t.val(window.vc_selectedFilters[n]).trigger("change"),s(n)}),this},d.editor.send.attachment=function(i,e){a.push(e.id),t([e.id],function(e){var t=e.slice(0).pop().attributes;n(i,t).done(function(e){!function e(t,i){a&&a[0]!==i?setTimeout(function(){e(t,i)},50):(a.shift(),d.editor.insert(t))}(e,t.id)})})},d.featuredImage.set=function(t){-1!==t?o.ajax({type:"POST",url:window.ajaxurl,data:{action:"vc_media_editor_add_image",filters:window.vc_selectedFilters,ids:[t],_vcnonce:window.vcAdminNonce}}).done(function(e){!0===e.success&&e.data.ids.length?(e=e.data.ids.pop(),i(e)):i(t)}).fail(function(){i(t)}):i(t)},d.controller.VcSingleImage=d.controller.FeaturedImage.extend({defaults:r.defaults({id:"vc_single-image",filterable:"uploaded",multiple:!1,toolbar:"vc_single-image",title:l.set_image,priority:60,syncSelection:!1},d.controller.Library.prototype.defaults),updateSelection:function(){var e,t=this.get("selection"),i=d.vc_editor.getData();void 0!==i&&""!==i&&-1!==i&&(e=r.map(i.toString().split(/,/),function(e){e=d.model.Attachment.get(e);return e.get("url")&&e.get("url").length||e.fetch(),e})),t.reset(e)}}),d.controller.VcGallery=d.controller.VcSingleImage.extend({defaults:r.defaults({id:"vc_gallery",title:l.add_images,toolbar:"main-insert",filterable:"uploaded",library:d.query({type:"image"}),multiple:"add",editable:!0,priority:60,syncSelection:!1},d.controller.Library.prototype.defaults)}),d.VcSingleImage={getData:function(){return this.$hidden_ids.val()},set:function(e){var t=vc.template(o("#vc_settings-image-block").html(),vc.templateOptions.custom);return this.$img_ul.html(t(e)),this.$clear_button.show(),this.$hidden_ids.val(e.id).trigger("change"),!1},frame:function(e){return window.vc_selectedFilters={},this.element=e,this.$button=o(this.element),this.$block=this.$button.closest(".edit_form_line"),this.$hidden_ids=this.$block.find(".gallery_widget_attached_images_ids"),this.$img_ul=this.$block.find(".gallery_widget_attached_images_list"),this.$clear_button=this.$img_ul.next(),this._frame||(this._frame=d({state:"vc_single-image",states:[new d.controller.VcSingleImage]}),this._frame.on("toolbar:create:vc_single-image",function(e){this.createSelectToolbar(e,{text:l.set_image,close:!1})},this._frame),this._frame.state("vc_single-image").on("select",this.select)),this._frame},select:function(){var e=this.get("selection");vc.events.trigger("click:media_editor:add_image",e,"single")}},d.view.MediaFrame.VcGallery=d.view.MediaFrame.Post.extend({createStates:function(){this.states.add([new d.controller.VcGallery])},bindHandlers:function(){d.view.MediaFrame.Select.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:create:main-insert",this.createToolbar,this);r.each({content:{embed:"embedContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar"}},function(e,i){r.each(e,function(e,t){this.on(i+":render:"+t,this[e],this)},this)},this)},mainInsertToolbar:function(e){var i=this;this.selectionStatusToolbar(e),e.set("insert",{style:"primary",priority:80,text:l.add_images,requires:{selection:!0},click:function(){var e=i.state(),t=e.get("selection");vc.events.trigger("click:media_editor:add_image",t,"gallery"),e.trigger("insert",t)}})}}),d.vc_editor=r.clone(d.editor),r.extend(d.vc_editor,{$vc_editor_element:null,getData:function(){return d.vc_editor.$vc_editor_element.closest(".edit_form_line").find(".gallery_widget_attached_images_ids").val()},insert:function(e){var t=d.vc_editor.$vc_editor_element.closest(".edit_form_line"),i=t.find(".gallery_widget_attached_images_ids"),t=t.find(".gallery_widget_attached_images_list"),a="",n=vc.template(o("#vc_settings-image-block").html(),vc.templateOptions.custom);r.each(e,function(e){a+=n(e)}),i.val(r.map(e,function(e){return e.id}).join(",")).trigger("change"),t.html(a)},open:function(e){var t;return e=this.id(e),t=(t=this.get(e))||this.add(e),window.vc_selectedFilters={},window.setTimeout(function(){t.state().get("library").more()},50),t.open()},add:function(e,t){var i=this.get(e);if(!i){if(c[e])return c[e];i=c[e]=new d.view.MediaFrame.VcGallery(r.defaults(t||{},{state:"vc_gallery",title:l.add_images,library:{type:"image"},multiple:!0}))}return i},init:function(){o("body").off("click.vcGalleryWidget").on("click.vcGalleryWidget",".gallery_widget_add_images",function(e){e.preventDefault();e=o(this);d.vc_editor.$vc_editor_element=o(this),"true"===e.attr("use-single")?d.VcSingleImage.frame(this).open("vc_editor"):(e.blur(),d.vc_editor.open("wpbakery"))})}}),r.bindAll(d.vc_editor,"open"),o(document).ready(function(){d.vc_editor.init()}),vc.events.on("click:media_editor:add_image",function(i,a){o(".media-modal").addClass("processing-media"),t(i,function(e){var t,e=r.map(e,function(e){return e.attributes});switch(i.reset(e),t=r.map(i.models,function(e){return e.attributes}),a=void 0===a?"":a){case"gallery":d.vc_editor.insert(t);break;case"single":d.VcSingleImage.set(t[0])}o(".media-modal").removeClass("processing-media"),o(".media-modal-close").click()})}),o("body").on("change","[data-vc-preview-image-filter]",function(){var e=o(this).data("vcPreviewImageFilter");void 0===window.vc_selectedFilters&&(window.vc_selectedFilters={}),window.vc_selectedFilters[e]=o(this).val(),s(e)})})(window.jQuery,window._); window._.isUndefined(window.vc)&&(window.vc={}),((r,c,a)=>{window.vc_toTitleCase=function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},window.vc_convert_column_size=function(e){var n="vc_col-sm-",e=e?e.split("/"):[1,1],t=c.range(1,13),r=!c.isUndefined(e[0])&&0<=c.indexOf(t,parseInt(e[0],10))&&parseInt(e[0],10),t=!c.isUndefined(e[1])&&0<=c.indexOf(t,parseInt(e[1],10))&&parseInt(e[1],10);return!1!==r&&!1!==t?n+12*r/t:n+"12"},window.vc_convert_column_span_size=function(e){return"span12"===(e=e.replace(/^vc_/,""))?"1/1":"span11"===e?"11/12":"span10"===e?"5/6":"span9"===e?"3/4":"span8"===e?"2/3":"span7"===e?"7/12":"span6"===e?"1/2":"span5"===e?"5/12":"span4"===e?"1/3":"span3"===e?"1/4":"span2"===e?"1/6":"span1"===e&&"1/12"},window.vc_get_column_mask=function(e){var n,t,r,a=e.split("_"),e=a.length;for(n in r=0,a)!isNaN(parseFloat(a[n]))&&isFinite(a[n])&&(t=a[n].match(/(\d{1,2})(\d{1,2})/),r=c.reduce(t.slice(1),function(e,n){return e+parseInt(n,10)},r));return e+""+r},window.VCS4=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)},window.vc_guid=function(){return window.VCS4()+window.VCS4()+"-"+window.VCS4()},window.vc_button_param_target_callback=function(){var n=this.$content.find("[name=target]").parents('[data-vc-ui-element="panel-shortcode-param"]:first'),e=a(".wpb-edit-form [name=href]"),t=c.debounce(function(){var e=a(this).val();0<e.length&&"http://"!==e&&"https://"!==e?n.show():n.hide()},300);e.on("keyup",t).trigger("keyup")},window.vc_cta_button_param_target_callback=function(){var n=this.$content.find("[name=target]").parents('[data-vc-ui-element="panel-shortcode-param"]:first'),e=a(".wpb-edit-form [name=href]"),t=c.debounce(function(){var e=a(this).val();0<e.length&&"http://"!==e&&"https://"!==e?n.show():n.hide()},300);e.on("keyup",t).trigger("keyup")},window.vc_grid_exclude_dependency_callback=function(){var e=a(".wpb_vc_param_value[name=exclude]",this.$content).data("vc-param-object");if(!e)return!1;var n=a('select.wpb_vc_param_value[name="post_type"]',this.$content),t=n.val();e.source_data=function(e,n){return{query:{query:t,term:e.term}}},e.source_data_val=t,n.on("change",function(){t=a(this).val(),e.source_data_val!=t&&(e.source_data=function(e,n){return{query:{query:t,term:e.term}}},e.$el.data("uiAutocomplete").destroy(),e.$sortable_wrapper.find(".vc_data").remove(),e.render(),e.source_data_val=t)})},window.vcGridFilterExcludeCallBack=function(){var e=a(".wpb_vc_param_value[name=filter_source]",this.$content),n=e.val(),t=a(".wpb_vc_param_value[name=exclude_filter]",this.$content).data("vc-param-object");if(void 0===t)return!1;e.on("change",function(){var e=a(this);n!==e.val()&&t.clearValue(),t.source_data=function(){return{vc_filter_by:e.val()}}}).trigger("change")},window.vcGridTaxonomiesCallBack=function(){var n=a(".wpb_vc_param_value[name=post_type]",this.$content),t=n.val(),r=a(".wpb_vc_param_value[name=taxonomies]",this.$content).data("vc-param-object");if(void 0===r)return!1;n.on("change",function(){var e=a(this);t!==e.val()&&r.clearValue(),r.source_data=function(){return{vc_filter_post_type:n.val()}}}).trigger("change")},window.vcChartCustomColorDependency=function(){var e=a(".wpb_vc_param_value[name=style]",this.$content),n=this.$content;e.on("change",function(){var e=a(this).val();n.toggleClass("vc_chart-edit-form-custom-color","custom"===e)}),e.trigger("change")},window.vc_wpnop=function(e){var n,t,r,a,c;return e=void 0!==e?e+"":"",window.switchEditors&&void 0!==window.switchEditors.pre_wpautop?(e=window.switchEditors.pre_wpautop(e)).replace(/<p>(<!--(?:.*)-->)<\/p>/g,"$1"):e?(n=(t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure")+"|div|p",t=t+"|pre",a=r=!1,c=[],-1!==(e=-1===e.indexOf("<script")&&-1===e.indexOf("<style")?e:e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(e){return c.push(e),"<wp-preserve>"})).indexOf("<pre")&&(r=!0,e=e.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,function(e){return(e=(e=e.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/\r?\n/g,"<wp-line-break>")})),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(e){return e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")})),e=(e=(e=(e=(e=-1!==(e=-1!==(e=-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*</("+n+")>\\s*","g"),"</$1>\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(<p [^>]+>.*?)<\/p>/g,"$1</p#>")).replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n")).replace(/\s*<p>/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)<br ?\/?>\s*/gi,function(e,n){return n&&-1!==n.indexOf("\n")?"\n\n":"\n"})).replace(/\s*<div/g,"\n<div")).replace(/<\/div>\s*/g,"</div>\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+t+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*</("+t+")>\\s*","g"),"</$1>\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("<option")?(e=e.replace(/\s*<option/g,"\n<option")).replace(/\s*<\/select>/g,"\n</select>"):e).indexOf("<hr")?e.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n"):e).indexOf("<object")?e.replace(/<object[\s\S]+?<\/object>/g,function(e){return e.replace(/[\r\n]+/g,"")}):e).replace(/<\/p#>/g,"</p>\n")).replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),r&&(e=e.replace(/<wp-line-break>/g,"\n")),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),c.length?e.replace(/<wp-preserve>/g,function(){return c.shift()}):e):""},window.vc_wpautop=function(e){var n,t,r;return e=void 0!==e?e+"":"",(e=window.switchEditors&&void 0!==window.switchEditors.wpautop?window.switchEditors.wpautop(e):(t=n=!1,r="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary",-1===(e=(e=-1!==(e=e.replace(/\r\n|\r/g,"\n")).indexOf("<object")?e.replace(/<object[\s\S]+?<\/object>/g,function(e){return e.replace(/\n+/g,"")}):e).replace(/<[^<>]+>/g,function(e){return e.replace(/[\n\t ]+/g," ")})).indexOf("<pre")&&-1===e.indexOf("<script")||(n=!0,e=e.replace(/<(pre|script)[^>]*>[\s\S]*?<\/\1>/g,function(e){return e.replace(/\n/g,"<wp-line-break>")})),-1!==(e=-1!==e.indexOf("<figcaption")?(e=e.replace(/\s*(<figcaption[^>]*>)/g,"$1")).replace(/<\/figcaption>\s*/g,"</figcaption>"):e).indexOf("[caption")&&(t=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(e){return(e=(e=e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>")).replace(/<[^<>]+>/g,function(e){return e.replace(/[\n\t ]+/," ")})).replace(/\s*\n\s*/g,"<wp-temp-br />")})),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e+="\n\n").replace(/<br \/>\s*<br \/>/gi,"\n\n")).replace(new RegExp("(<(?:"+r+")(?: [^>]*)?>)","gi"),"\n\n$1")).replace(new RegExp("(</(?:"+r+")>)","gi"),"$1\n\n")).replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n")).replace(/\s*<option/gi,"<option")).replace(/<\/option>\s*/gi,"</option>")).replace(/\n\s*\n+/g,"\n\n")).replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n")).replace(/<p>\s*?<\/p>/gi,"")).replace(new RegExp("<p>\\s*(</?(?:"+r+")(?: [^>]*)?>)\\s*</p>","gi"),"$1")).replace(/<p>(<li.+?)<\/p>/gi,"$1")).replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?(?:"+r+")(?: [^>]*)?>)","gi"),"$1")).replace(new RegExp("(</?(?:"+r+")(?: [^>]*)?>)\\s*</p>","gi"),"$1")).replace(/(<br[^>]*>)\s*\n/gi,"$1")).replace(/\s*\n/g,"<br />\n")).replace(new RegExp("(</?(?:"+r+")[^>]*>)\\s*<br />","gi"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1")).replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]")).replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(e,n,t){return t.match(/<p( [^>]*)?>/)?e:n+"<p>"+t+"</p>"}),n&&(e=e.replace(/<wp-line-break>/g,"\n")),t?e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>"):e)).replace(/<p>(<!--(?:.*)-->)<\/p>/g,"$1")},window.vc_regexp_shortcode=c.memoize(function(){return RegExp("\\[(\\[?)([\\w|-]+\\b)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)")}),window.vcAddShortcodeDefaultParams=function(e){var n=e.get("params"),t=e.get("preset"),n=c.extend({},r.getDefaults(e.get("shortcode")),n);t&&window.vc_all_presets[t]&&(n=window.vc_all_presets[t],void 0!==r.frame_window)&&window.vc_all_presets[t].css&&r.frame_window.vc_iframe.setCustomShortcodeCss(window.vc_all_presets[t].css),e.set({params:n},{silent:!0})},window.vc_globalHashCode=function(e){return(e="string"!=typeof e?JSON.stringify(e):e).length?e.split("").reduce(function(e,n){return(e=(e<<5)-e+n.charCodeAt(0))&e},0):0},r.memoizeWrapper=function(n,t){var r={};return function(){var e=t?t.apply(this,arguments):arguments[0];return c.hasOwnProperty.call(r,e)||(r[e]=n.apply(this,arguments)),c.isObject(r[e])?window.jQuery.fn.extend(!0,{},r[e]):r[e]}},window.vcChartParamAfterAddCallback=function(e,n){if("new"!==n&&"clone"!==n||e.find(".vc_control.column_toggle").click(),"new"===n){for(var t,r=["white","black"],a=e.find("[name=values_color]"),c=a.find("option"),i=0;;){if(100<i++)break;if(t=Math.floor(Math.random()*c.length),-1===window.jQuery.inArray(c.eq(t).val(),r)){c.eq(t).prop("selected",!0),a.trigger("change");break}}n=["#5472d2","#00c1cf","#fe6c61","#8d6dc4","#4cadc9","#cec2ab","#50485b","#75d69c","#f7be68","#5aa1e3","#6dab3c","#f4524d","#f79468","#b97ebb","#ebebeb","#f7f7f7","#0088cc","#58b9da","#6ab165","#ff9900","#ff675b","#555555"],t=Math.floor(Math.random()*n.length),e.find("[name=values_custom_color]").val(n[t]).trigger("change")}},r.events.on("shortcodes:vc_row:add:param:name:parallax shortcodes:vc_row:update:param:name:parallax",function(e,n){n&&(n=e.get("params"))&&n.css&&(n.css=n.css.replace(/(background(\-position)?\s*\:\s*[\S]+(\s*[^\!\s]+)?)[\s*\!important]*/g,"$1"),e.set("params",n,{silent:!0}))}),r.events.on("shortcodes:vc_single_image:sync shortcodes:vc_single_image:add",function(e){var n=e.get("params");n.link&&!n.onclick&&(n.onclick="custom_link",e.save({params:n}))}),window.vcEscapeHtml=function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'"};return null==e?"":e.replace(/[&<>"']/g,function(e){return n[e]})},window.vc_slugify=function(e){return e.toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-")}})(window.vc,window._,window.jQuery),window.jQuery.expr.pseudos.containsi=function(e,n,t){return 0<=window.jQuery(e).text().toUpperCase().indexOf(t[3].toUpperCase())}; _.isUndefined(window.vc)&&(window.vc={}),window.vc.filters={templates:[]},window.vc.addTemplateFilter=function(t){_.isFunction(t)&&this.filters.templates.push(t)},(d=>{function a(t){return encodeURIComponent(t).replace(/[!'()*]/g,escape)}function i(t,e){this.el=t,this.$el=d(this.el),this.$el_wrap="",this.$block="",this.suggester="",this.selected_items=[],this.options=_.isObject(e)?e:{},_.defaults(this.options,{css_class:"vc_suggester",limit:!1,source:{},predefined:[],locked:!1,select_callback:function(t,e){},remove_callback:function(t,e){},update_callback:function(t,e){},check_locked_callback:function(t,e){return!1}}),this.init()}window.init_textarea_html=function(e){var a,t,n,i=d("#wp-link");i.parent().hasClass("wp-dialog")&&i.wpdialog("destroy"),a=e.attr("id"),t=(i=e.closest(".edit_form_line")).find(".vc_textarea_html_content");try{_.isUndefined(tinyMCEPreInit.qtInit[a])&&(window.tinyMCEPreInit.qtInit[a]=_.extend({},window.tinyMCEPreInit.qtInit[window.wpActiveEditor],{id:a})),window.tinyMCEPreInit&&window.tinyMCEPreInit.mceInit[window.wpActiveEditor]&&(n=!1,window.tinyMCEPreInit.mceInit[a]=_.extend({},window.tinyMCEPreInit.mceInit[window.wpActiveEditor],{resize:"vertical",height:200,id:a,setup:function(t){var e;void 0!==t.onLoadContent&&t.onLoadContent.add(function(t,e){var n=setTimeout(function(){1===d("#"+a).size()&&(d(".vc_edit-form-tab *:input[type!=hidden]:first").focus(),clearTimeout(n))},100)}),void 0!==t.on?(t.on("init",function(t){window.wpActiveEditor=a}),window.vc_auto_save&&(e=_.debounce(function(){vc.edit_element_block_view.save(),n=!1},500),t.on("keyup",function(){n=!0,vc.saveInProcess=!0,e()}),t.on("blur",function(){n&&!vc.saveInProcess&&(vc.saveInProcess=!0,vc.edit_element_block_view.save(),n=!1)}),t.on("ExecCommand",e),d("#wpb_tinymce_content").on("change",function(t){n=!0,vc.saveInProcess=!0,e()}))):t.onInit.add(function(){window.wpActiveEditor=a})}}),window.tinyMCEPreInit.mceInit[a].plugins=window.tinyMCEPreInit.mceInit[a].plugins.replace(/,?wpfullscreen/,""),window.tinyMCEPreInit.mceInit[a].wp_autoresize_on=!1),vc.edit_element_block_view&&vc.edit_element_block_view.currentModelParams?e.val(vc_wpautop(vc.edit_element_block_view.currentModelParams[t.attr("name")]||"")):e.val(t.val()),quicktags(window.tinyMCEPreInit.qtInit[a]),QTags._buttonsInit(),window.tinymce&&(window.switchEditors&&window.switchEditors.go(a,"tmce"),"4"===tinymce.majorVersion)&&tinymce.execCommand("mceAddEditor",!0,a),window.wpActiveEditor=a}catch(t){e.data("vcTinyMceDisabled",!0).appendTo(i),d("#wp-"+a+"-wrap").remove(),console&&console.error&&(console.error("VC: Tinymce error! Compatibility problem with other plugins."),console.error(t))}},Color.prototype.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var e=6-t.length-1;0<=e;e--)t="0"+t;return"#"+t},vc.loop_partial=function(t,e,n,a){n=_.isObject(n)&&!_.isUndefined(n[e])?n[e]:"";return vc.template(d("#_vcl-"+t).html(),vc.templateOptions.custom)({name:e,data:n,settings:a})},vc.loop_field_not_hidden=function(t,e){return!(_.isObject(e[t])&&_.isBoolean(e[t].hidden)&&!0===e[t].hidden)},vc.is_locked=function(t){return _.isObject(t)&&_.isBoolean(t.locked)&&!0===t.locked},i.prototype={constructor:i,init:function(){_.bindAll(this,"buildSource","itemSelected","labelClick","setFocus","resize"),this.$el.wrap('<ul class="'+this.options.css_class+'"><li class="input"/></ul>'),this.$el_wrap=this.$el.parent(),this.$block=this.$el_wrap.closest("ul").append(d('<li class="clear"/>')),this.$el.on("focus",this.resize).on("blur",function(){d(this).parent().width(170),d(this).val("")}),this.$block.on("click",this.setFocus),this.suggester=this.$el.data("suggest"),this.$el.autocomplete({source:this.buildSource,select:this.itemSelected,minLength:2,focus:function(t,e){return!1}}).data("ui-autocomplete")._renderItem=function(t,e){return d('<li data-value="'+e.value+'">').append("<a>"+e.name+"</a>").appendTo(t)},this.$el.autocomplete("widget").addClass("vc_ui-front"),_.isArray(this.options.predefined)&&_.each(this.options.predefined,function(t){this.create(t)},this)},resize:function(){var t=this.$el_wrap.position(),e=this.$block.position();this.$el_wrap.width(parseFloat(this.$block.width())-(parseFloat(t.left)-parseFloat(e.left)+4))},setFocus:function(t){t.preventDefault(),d(t.target).hasClass(this.options.css_class)&&this.$el.trigger("focus")},itemSelected:function(t,e){return this.$el.blur(),this.create(e.item),this.$el.trigger("focus"),!1},create:function(t){var e,n=this.selected_items.push(t)-1,a=!0===this.options.check_locked_callback(this.$el,t)?"":' <a class="remove">×</a>';_.isUndefined(this.selected_items[n].action)&&(this.selected_items[n].action="+"),e="-"===this.selected_items[n].action?" exclude":" include",(e=d('<li class="vc_suggest-label'+e+'" data-index="'+n+'" data-value="'+t.value+'"><span class="label">'+t.name+"</span>"+a+"</li>")).insertBefore(this.$el_wrap),_.isEmpty(a)||e.on("click",this.labelClick),this.options.select_callback(e,this.selected_items)},labelClick:function(t){t.preventDefault();var e=d(t.currentTarget),n=parseInt(e.data("index"),10);if(d(t.target).is(".remove"))return this.selected_items.splice(n,1),this.options.remove_callback(e,this.selected_items),e.remove(),!1;this.selected_items[n].action="+"===this.selected_items[n].action?"-":"+","+"===this.selected_items[n].action?e.removeClass("exclude").addClass("include"):e.removeClass("include").addClass("exclude"),this.options.update_callback(e,this.selected_items)},buildSource:function(t,e){this.ajax&&(this.ajax.abort(),e([]),this.ajax=!1);var n=_.filter(_.map(this.selected_items,function(t){return t?t.value:void 0})).join(",");this.ajax=d.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:{action:"wpb_get_loop_suggestion",field:this.suggester,exclude:n,query:t.term,_vcnonce:window.vcAdminNonce}}).done(function(t){e(t)})}},d.fn.suggester=function(n){return this.each(function(){var t=d(this),e=t.data("suggester");e||t.data("suggester",e=new i(this,n)),"string"==typeof n&&e[n]()})};var e=Backbone.View.extend({className:"loop_params_holder",events:{"click input, select":"save","change input, select":"save","change :checkbox[data-input]":"updateCheckbox"},query_options:{},return_array:{},controller:"",initialize:function(){_.bindAll(this,"save","updateSuggestion","suggestionLocked")},render:function(t){var e=vc.template(d("#vcl-loop-frame").html(),_.extend({},vc.templateOptions.custom,{variable:"loop"}));return this.controller=t,this.$el.html(e(this.model)),this.controller.$el.append(this.$el),_.each(d("[data-suggest]"),function(t){var t=d(t),e=window.decodeURIComponent(d("[data-suggest-prefill="+t.data("suggest")+"]").val());t.suggester({predefined:d.parseJSON(e),select_callback:this.updateSuggestion,update_callback:this.updateSuggestion,remove_callback:this.updateSuggestion,check_locked_callback:this.suggestionLocked})},this),this.save(),this},show:function(){this.$el.slideDown()},save:function(t){this.return_array={},_.each(this.model,function(t,e){t=this.getValue(e,t);_.isString(t)&&!_.isEmpty(t)&&(this.return_array[e]=t)},this),this.controller.setInputValue(this.return_array)},getValue:function(t){return d("[name="+t+"]",this.$el).val()},hide:function(){this.$el.slideUp()},toggle:function(){this.$el.is(":animated")||this.$el.slideToggle()},updateCheckbox:function(t){var t=d(t.currentTarget).data("input"),e=d("[data-name="+t+"]",this.$el),n=[];d("[data-input="+t+"]:checked").each(function(){n.push(d(this).val())}),e.val(n),this.save()},updateSuggestion:function(t,e){t=t.closest("[data-block=suggestion]"),e=_.reduce(e,function(t,e){return _.isEmpty(e)?"":t+(_.isEmpty(t)?"":",")+("-"===e.action?"-":"")+e.value},"").trim();t.find("[data-suggest-value]").val(e).trigger("change")},suggestionLocked:function(t,e){e=e.value,t=t.closest("[data-block=suggestion]").find("[data-suggest-value]").data("suggest-value");return this.controller.settings&&this.controller.settings[t]&&_.isBoolean(this.controller.settings[t].locked)&&1==this.controller.settings[t].locked&&_.isString(this.controller.settings[t].value)&&0<=_.indexOf(this.controller.settings[t].value.replace("-","").split(/\,/),""+e)}}),n=Backbone.View.extend({events:{"click .vc_loop-build":"showEditor"},initialize:function(){_.bindAll(this,"createEditor"),this.$input=d(".wpb_vc_param_value",this.$el),this.$button=this.$el.find(".vc_loop-build"),this.data=this.$input.val(),this.settings=d.parseJSON(window.decodeURIComponent(this.$button.data("settings")))},render:function(){return this},showEditor:function(t){if(t.preventDefault(),_.isObject(this.loop_editor_view))return this.loop_editor_view.toggle(),!1;d.ajax({type:"POST",dataType:"json",url:window.ajaxurl,data:{action:"wpb_get_loop_settings",value:this.data,settings:this.settings,post_id:vc_post_id,_vcnonce:window.vcAdminNonce}}).done(this.createEditor)},createEditor:function(t){this.loop_editor_view=new e({model:_.isEmpty(t)?{}:t}),this.loop_editor_view.render(this).show()},setInputValue:function(t){this.$input.val(_.map(t,function(t,e){return e+":"+t}).join("|"))}}),o=Backbone.View.extend({events:{"click .vc_options-edit":"showEditor","click .vc_close-button":"showEditor","click input, select":"save","change input, select":"save","keyup input":"save"},data:{},fields:{},initialize:function(){this.$button=this.$el.find(".vc_options-edit"),this.$form=this.$el.find(".vc_options-fields"),this.$input=this.$el.find(".wpb_vc_param_value"),this.settings=this.$form.data("settings"),this.parseData(),this.render()},render:function(){var n="";return _.each(this.settings,function(t){_.isUndefined(this.data[t.name])?_.isUndefined(t.value)||(t.value=t.value.toString().split(","),this.data[t.name]=t.value):t.value=this.data[t.name],this.fields[t.name]=t;var e=d("#vcl-options-field-"+t.type);e.is("script")&&(e=vc.template(e.html(),vc.templateOptions.custom),n+=e(_.extend({},{name:"",label:"",value:[],options:"",description:""},t)))},this),this.$form.html(n+this.$form.html()),this},parseData:function(){_.each(this.$input.val().split("|"),function(t){var e;t.match(/\:/)&&(e=(t=t.split(":"))[0],this.data[e]=_.map(t[1].split(","),function(t){return window.decodeURIComponent(t)}))},this)},saveData:function(){var t=_.map(this.data,function(t,e){return e+":"+_.map(t,function(t){return window.encodeURIComponent(t)}).join(",")}).join("|");this.$input.val(t)},showEditor:function(){this.$form.slideToggle()},save:function(t){var e,t=d(t.currentTarget);t.is(":checkbox")?(e=[],this.$el.find("input[name="+t.attr("name")+"]").each(function(){this.checked&&e.push(d(this).val())}),this.data[t.attr("name")]=e):this.data[t.attr("name")]=[t.val()],this.saveData()}});function s(t,e){this.el=t,this.$el=d(this.el),this.$data_field=this.$el.find(".wpb_vc_param_value"),this.$toolbar=this.$el.find(".vc_sorted-list-toolbar"),this.$current_control=this.$el.find(".vc_sorted-list-container"),_.defaults(this.options,{}),this.init()}s.prototype={constructor:s,init:function(){_.bindAll(this,"controlEvent","save"),this.$toolbar.on("change","input",this.controlEvent);function t(t){return window.decodeURIComponent(t)}var e,n=this.$data_field.val().split(",");for(e in n){var a=n[e].split("|"),i=!(!a.length||!a[0].length)&&this.$toolbar.find("[data-element="+decodeURIComponent(a[0])+"]");!1!==i&&i.is("input")&&(i.prop("checked",!0),this.createControl({value:i.val(),label:i.parent().text(),sub:i.data("subcontrol"),sub_value:_.map(a.slice(1),t)}))}this.$current_control.sortable({stop:this.save}).on("change","select",this.save)},createControl:function(t){var n="",a=_.isUndefined(t.sub_value)?[]:t.sub_value;_.isArray(t.sub)&&_.each(t.sub,function(t,e){n+=" <select>",_.each(t,function(t){n+='<option value="'+t[0]+'"'+(_.isString(a[e])&&a[e]===t[0]?' selected="true"':"")+">"+t[1]+"</option>"}),n+="</select>"},this),this.$current_control.append('<li class="vc_control-'+t.value+'" data-name="'+t.value+'">'+t.label+n+"</li>")},controlEvent:function(t){t=d(t.currentTarget);t[0].checked?this.createControl({value:t.val(),label:t.parent().text(),sub:t.data("subcontrol")}):this.$current_control.find(".vc_control-"+t.val()).remove(),this.save()},save:function(){var t=_.map(this.$current_control.find("[data-name]"),function(t){var e=encodeURIComponent(d(t).data("name"));return d(t).find("select").each(function(){var t=d(this);t.is("select")&&""!==t.val()&&(e+="|"+encodeURIComponent(t.val()))}),e}).join(",");this.$data_field.val(t)}},d.fn.VcSortedList=function(n){return this.each(function(){var t=d(this),e=t.data("vc_sorted_list");_.isObject(n);e||t.data("vc_sorted_list",e=new s(this)),"string"==typeof n&&e[n]()})};var r=Backbone.View.extend({preview_el:".vc_google_fonts_form_field-preview-container > span",font_family_dropdown_el:".vc_google_fonts_form_field-font_family-container > select",font_style_dropdown_el:".vc_google_fonts_form_field-font_style-container > select",font_style_dropdown_el_container:".vc_google_fonts_form_field-font_style-container",status_el:".vc_google_fonts_form_field-status-container > span",events:{"change .vc_google_fonts_form_field-font_family-container > select":"fontFamilyDropdownChange","change .vc_google_fonts_form_field-font_style-container > select":"fontStyleDropdownChange"},initialize:function(t){_.bindAll(this,"previewElementInactive","previewElementActive","previewElementLoading"),this.$preview_el=d(this.preview_el,this.$el),this.$font_family_dropdown_el=d(this.font_family_dropdown_el,this.$el),this.$font_style_dropdown_el=d(this.font_style_dropdown_el,this.$el),this.$font_style_dropdown_el_container=d(this.font_style_dropdown_el_container,this.$el),this.$status_el=d(this.status_el,this.$el),this.fontFamilyDropdownRender()},render:function(){return this},previewElementRender:function(){return this.$preview_el.css({"font-family":this.font_family,"font-style":this.font_style,"font-weight":this.font_weight}),this},previewElementInactive:function(){this.$status_el.text(window.i18nLocale.gfonts_loading_google_font_failed||"Loading font failed.").css("color","#FF0000")},previewElementActive:function(){this.$preview_el.text("Grumpy wizards make toxic brew for the evil Queen and Jack.").css("color","inherit"),this.fontStyleDropdownRender()},previewElementLoading:function(){this.$preview_el.text(window.i18nLocale.gfonts_loading_google_font||"Loading Font...")},fontFamilyDropdownRender:function(){return this.fontFamilyDropdownChange(),this},fontFamilyDropdownChange:function(){this.$status_el.text("");var t=this.$font_family_dropdown_el.find(":selected");return this.font_family_format=t.val(),this.font_family=t.attr("data[font_family]"),this.font_types=t.attr("data[font_types]"),this.font_vendor=t.attr("data[font_vendor]"),this.font_url=t.attr("data[font_url]"),this.$font_style_dropdown_el_container.parent().hide(),this.font_family_format&&0<this.font_family_format.length&&(this.font_vendor?WebFont.load({custom:{families:[this.font_family],urls:[this.font_url]},inactive:this.previewElementInactive,active:this.previewElementActive,loading:this.previewElementLoading}):WebFont.load({google:{families:[this.font_family_format]},inactive:this.previewElementInactive,active:this.previewElementActive,loading:this.previewElementLoading})),this},fontStyleDropdownRender:function(){var t,e=this.font_types.split(","),n="",a=this.$font_family_dropdown_el.attr("default[font_style]");for(t in e)var i=e[t].split(":"),o="",n=n+"<option "+(o=_.isString(a)&&0<a.length&&e[t]==a?"selected":o)+' value="'+e[t]+'" data[font_weight]="'+i[1]+'" data[font_style]="'+i[2]+'" class="'+i[2]+"_"+i[1]+'" >'+i[0]+"</option>";return this.$font_style_dropdown_el.html(n),this.$font_style_dropdown_el_container.parent().show(),this.fontStyleDropdownChange(),this},fontStyleDropdownChange:function(){var t=this.$font_style_dropdown_el.find(":selected");return this.font_weight=t.attr("data[font_weight]"),this.font_style=t.attr("data[font_style]"),this.previewElementRender(),this}}),l=Backbone.View.extend({min_length:2,delay:500,auto_focus:!0,ajax_url:window.ajaxurl,source_data:function(){return{}},replace_values_on_select:!1,initialize:function(t){_.bindAll(this,"sortableChange","resize","labelRemoveHook","updateItems","sortableCreate","sortableUpdate","source","select","labelRemoveClick","createBox","focus","response","change","close","open","create","search","_renderItem","_renderMenu","_renderItemData","_resizeMenu"),t=d.extend({min_length:this.min_length,delay:this.delay,auto_focus:this.auto_focus,replace_values_on_select:this.replace_values_on_select},t),this.options=t,this.param_name=this.options.param_name,this.$el=this.options.$el,this.$el_wrap=this.$el.parent(),this.$sortable_wrapper=this.$el_wrap.parent(),this.$input_param=this.options.$param_input,this.selected_items=[],this.isMultiple=!1,this.render()},resize:function(){var t=this.$el_wrap.position(),e=this.$block.position();this.$el.autocomplete("widget").width(parseFloat(this.$block.width())-(parseFloat(t.left)-parseFloat(e.left)+4)+11)},enableMultiple:function(){this.isMultiple=!0,this.$el.show(),this.$el.trigger("focus")},enableSortable:function(){this.sortable=this.$sortable_wrapper.sortable({items:".vc_data",axis:"y",change:this.sortableChange,create:this.sortableCreate,update:this.sortableUpdate})},updateItems:function(){this.selected_items.length?this.$input_param.val(this.getSelectedItems().join(", ")):this.$input_param.val("")},sortableChange:function(t,e){},itemsCreate:function(){var n=[];this.$block.find(".vc_data").each(function(t,e){n.push({label:e.dataset.label,value:e.dataset.value})}),this.selected_items=n},sortableCreate:function(t,e){},sortableUpdate:function(t,e){var n=this.$sortable_wrapper.sortable("toArray",{attribute:"data-index"}),a=[],i=(_.each(n,function(t){a.push(this.selected_items[t])},this),0);d("li.vc_data",this.$sortable_wrapper).each(function(){d(this).attr("data-index",i++)}),this.selected_items=a,this.updateItems()},getWidget:function(){return this.$el.autocomplete("widget")},render:function(){var t;return this.$el.on("focus",this.resize),this.data=this.$el.autocomplete({source:this.source,minLength:this.options.min_length,delay:this.options.delay,autoFocus:this.options.auto_focus,select:this.select,focus:this.focus,response:this.response,change:this.change,close:this.close,open:this.open,create:this.create,search:this.search}),this.data.data("ui-autocomplete")._renderItem=this._renderItem,this.data.data("ui-autocomplete")._renderMenu=this._renderMenu,this.data.data("ui-autocomplete")._resizeMenu=this._resizeMenu,0<this.$input_param.val().length&&(this.isMultiple?this.$el.trigger("focus"):this.$el.hide(),d(".vc_autocomplete-label.vc_data",(t=this).$sortable_wrapper).each(function(){t.labelRemoveHook(d(this))})),this.getWidget().addClass("vc_ui-front").addClass("vc_ui-auotocomplete"),this.$block=this.$el_wrap.closest("ul").append(d('<li class="clear"/>')),this.itemsCreate(),this},close:function(t,e){this.selected&&this.options.no_hide&&(this.getWidget().show(),this.selected++,2<this.selected)&&(this.selected=void 0)},open:function(t,e){var n=this.getWidget().menu(),a=n.position();n.css("left",a.left-6),n.css("top",a.top+2)},focus:function(t,e){if(!this.options.replace_values_on_select)return t.preventDefault(),!1},create:function(t,e){},change:function(t,e){},response:function(t,e){},search:function(t,e){},select:function(t,e){var n,a,i;return this.selected=1,e.item&&(this.options.unique_values&&(n=this.getWidget().data("uiMenu").active,this.options.groups&&(a=n.prev(),i=n.next(),a.hasClass("vc_autocomplete-group"))&&!i.hasClass("vc_autocomplete-item")&&a.remove(),n.remove(),d("li.ui-menu-item",this.getWidget()).length||(this.selected=void 0)),this.createBox(e.item),this.isMultiple?this.$el.trigger("focus"):this.$el.hide()),!1},createBox:function(t){var e=this.selected_items.push(t)-1;this.updateItems(),(e=d('<li class="vc_autocomplete-label vc_data" data-index="'+e+'" data-value="'+t.value+'" data-label="'+t.label+'"><span class="vc_autocomplete-label"><a>'+t.label+'</a></span><a class="vc_autocomplete-remove">×</a></li>')).insertBefore(this.$el_wrap),this.labelRemoveHook(e)},labelRemoveHook:function(t){this.$el.blur(),this.$el.val(""),t.on("click",this.labelRemoveClick)},labelRemoveClick:function(t,e){t.preventDefault();var n=d(t.currentTarget);if(d(t.target).is(".vc_autocomplete-remove"))return this.selected_items.splice(n.index(),1),n.remove(),this.updateItems(),this.$el.show(),!1},getSelectedItems:function(){var e;return!!this.selected_items.length&&(e=[],_.each(this.selected_items,function(t){e.push(t.value)}),e)},_renderMenu:function(n,t){var a=this,i=null;this.options.groups&&t.sort(function(t,e){return t.group>e.group}),d.each(t,function(t,e){a.options.groups&&e.group!=i&&(i=e.group,n.append("<li class='ui-autocomplete-group vc_autocomplete-group' aria-label='"+i+"'>"+i+"</li>")),a._renderItemData(n,e)})},_renderItem:function(t,e){return d('<li data-value="'+e.value+'" class="vc_autocomplete-item">').append("<a>"+e.label+"</a>").appendTo(t)},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_resizeMenu:function(){},clearValue:function(){this.selected_items=[],this.updateItems(),d(".vc_autocomplete-label.vc_data",this.$sortable_wrapper).remove()},source:function(t,e){var n=this;this.options.values&&0<this.options.values.length?this.options.unique_values?e(d.ui.autocomplete.filter(_.difference(this.options.values,this.selected_items),t.term)):e(d.ui.autocomplete.filter(this.options.values,t.term)):d.ajax({type:"POST",dataType:"json",url:this.ajax_url,data:d.extend({action:"vc_get_autocomplete_suggestion",shortcode:vc.active_panel.model.get("shortcode"),param:this.param_name,query:t.term,_vcnonce:window.vcAdminNonce},this.source_data(t,e))}).done(function(t){n.options.unique_values?e(_.filter(t,function(t){return!_.findWhere(n.selected_items,t)})):e(t)})}}),c=Backbone.View.extend({$content:{},initialize:function(){_.bindAll(this,"content"),this.$content=this.$el,this.model=vc.active_panel.model},setContent:function(t){this.$content=t},content:function(){return this.$content},render:function(){var n=this;return d('[data-vc-ui-element="panel-shortcode-param"]',this.content()).each(function(){var t=d(this),e=t.data("param_settings");vc.atts.init.call(n,e,t),t.data("vcInitParam",!0)}),this}}),p=Backbone.View.extend({options:{max_items:0,sortable:!0,deletable:!0,collapsible:!0},items:0,$ul:!1,initializer:{},mappedParams:{},adminLabelParams:[],groupParamName:"",events:{"click > .edit_form_line > .vc_param_group-list > .vc_param_group-add_content":"addNew"},initialize:function(t){var e,n,a;this.$ul=this.$el.find("> .edit_form_line > .vc_param_group-list"),e=d("> .wpb_vc_row",this.$ul),this.initializer=new c({el:this.$el}),this.model=vc.active_panel.model,n=this.$ul.data("settings"),this.mappedParams={},this.adminLabelParams=[],this.options=_.defaults({},_.isObject(t.settings)?t.settings:{},n,this.options),this.groupParamName=this.options.param.param_name,_.isObject(this.options.param)&&_.isArray(this.options.param.params)&&_.each(this.options.param.params,function(t){var e=this.groupParamName+"_"+t.param_name;this.mappedParams[e]=t,_.isObject(t)&&!0===t.admin_label&&this.adminLabelParams.push(e)},this),this.items=0,a=this,e.length&&e.each(function(){e.data("vc-param-group-param",new u({el:d(this),parent:a})),a.items++,a.afterAdd(d(this),"init")}),this.options.sortable&&this.$ul.sortable({handle:".vc_control.column_move",items:"> .wpb_vc_row:not(vc_param_group-add_content-wrapper)",placeholder:"vc_placeholder",stop:function(){d(this).closest(".vc_edit-form-tab").trigger("change")}})},addNew:function(t){var e;t.preventDefault(),this.addAllowed()&&(void 0===this.options.param.callbacks||void 0===this.options.param.callbacks.before_add||"function"!=typeof(e=window[this.options.param.callbacks.before_add])||e())&&((e=d(JSON.parse(this.$ul.next(".vc_param_group-template").html()))).removeClass("vc_param_group-add_content-wrapper"),e.insertBefore(t.currentTarget),e.show(),this.initializer.setContent(e.find("> .wpb_element_wrapper")),this.initializer.render(),this.items++,e.data("vc-param-group-param",new u({el:e,parent:this})),this.afterAdd(e,"new"),vc.events.trigger("vc-param-group-add-new",t,e,this))},addAllowed:function(){return 0<this.options.max_items&&this.items+1<=this.options.max_items||this.options.max_items<=0},afterAdd:function(t,e){var n;this.addAllowed()||(this.$ul.find("> .wpb_vc_row > .vc_param_group-controls > .vc_row_edit_clone_delete > .vc_control.column_clone").hide(),this.$ul.find("> .vc_param_group-add_content").hide()),this.options.sortable||this.$ul.find("> .wpb_vc_row > .vc_param_group-controls > .vc_control.column_move").hide(),this.options.deletable||this.$ul.find("> .wpb_vc_row > .vc_param_group-controls > .vc_row_edit_clone_delete > .vc_control.column_delete").hide(),this.options.collapsible||this.$ul.find("> .wpb_vc_row > .vc_param_group-controls > .vc_row_edit_clone_delete > .vc_control.column_toggle").hide(),void 0!==this.options.param.callbacks&&void 0!==this.options.param.callbacks.after_add&&"function"==typeof(n=window[this.options.param.callbacks.after_add])&&n(t,e)},afterDelete:function(){var t;this.addAllowed()&&(this.$ul.find("> .wpb_vc_row > .vc_param_group-controls > .vc_row_edit_clone_delete > .vc_control.column_clone").show(),this.$ul.find("> .vc_param_group-add_content").show()),void 0!==this.options.param.callbacks&&void 0!==this.options.param.callbacks.after_delete&&"function"==typeof(t=window[this.options.param.callbacks.after_delete])&&t()}}),u=Backbone.View.extend({dependentElements:!1,mappedParams:!1,groupParamName:"",adminLabelParams:[],events:{"click > .vc_controls > .vc_row_edit_clone_delete > .vc_control.column_toggle":"toggle","click > .vc_controls > .vc_row_edit_clone_delete > .vc_control.column_delete":"deleteParam","click > .vc_controls > .vc_row_edit_clone_delete > .vc_control.column_clone":"clone"},initialize:function(t){this.options=t,this.$content=this.options.parent.$ul,this.model=vc.active_panel.model,this.mappedParams=this.options.parent.mappedParams,this.groupParamName=this.options.parent.groupParamName,this.adminLabelParams=this.options.parent.adminLabelParams,this.dependentElements={},_.bindAll(this,"hookDependent"),this.initializeDependency(),_.bindAll(this,"hookAdminLabel"),this.initializeAdminLabels()},initializeAdminLabels:function(){for(var e=this.hookAdminLabel,t=function(){var t=d(this);t.data("vc_admin_labels")||(t.data("vc_admin_labels",!0),t.on("keyup change",e),e({currentTarget:this}))},n=0;n<this.adminLabelParams.length;n++)d("[name="+this.adminLabelParams[n]+"].wpb_vc_param_value",this.$el).each(t)},hookAdminLabel:function(t){for(var e="",n="",a=[],i=(s=d(t.currentTarget)).closest(".vc_param_group-wrapper"),t=s.closest(".vc_param").find(".vc_param-group-admin-labels"),o=0;o<this.adminLabelParams.length;o++){var s,r=this.adminLabelParams[o],l=(s=i.find("[name="+r+"]")).closest('[data-vc-ui-element="panel-shortcode-param"]');void 0!==this.mappedParams[r]&&(e=this.mappedParams[r].heading),n=s.is("select")?s.find("option:selected").text():!s.is("input:checkbox")||s[0].checked?s.val():"",r={type:l.data("param_type"),param_name:l.data("param_name")},""!==(n=_.isObject(vc.atts[r.type])&&_.isFunction(vc.atts[r.type].render)?vc.atts[r.type].render.call(this,r,n):n)&&a.push("<label>"+_.escape(e)+"</label>: "+_.escape(n))}t.html(a.join(", ")).toggleClass("vc_hidden-label",!a.length)},initializeDependency:function(){var o={};_.each(this.mappedParams,function(a,t){var e,i;_.isObject(a)&&_.isObject(a.dependency)&&_.isString(a.dependency.element)&&(e=d("[name="+this.groupParamName+"_"+a.dependency.element+"].wpb_vc_param_value",this.$el),(i=d("[name="+t+"].wpb_vc_param_value",this.$el)).length)&&_.each(e,function(t){var t=d(t),e=t.attr("name"),n=a.dependency;_.isArray(this.dependentElements[e])||(this.dependentElements[e]=[]),this.dependentElements[e].push(i),t.data("dependentSet")||(t.attr("data-dependent-set","true"),t.on("keyup change",this.hookDependent)),o[e]||(o[e]=t),_.isString(n.callback)&&window[n.callback].call(this)},this)},this),_.each(o,function(t){this.hookDependent({currentTarget:t})},this)},hookDependent:function(t){var t=d(t.currentTarget),e=t.closest(".vc_column"),n=this.dependentElements[t.attr("name")],a=t.is(":checkbox")?_.map(this.$el.find("[name="+t.attr("name")+"].wpb_vc_param_value:checked"),function(t){return d(t).val()}):t.val(),i=t.is(":checkbox")?!this.$el.find("[name="+t.attr("name")+"].wpb_vc_param_value:checked").length:!a.length;return e.hasClass("vc_dependent-hidden")?_.each(n,function(t){var e=d.Event("change");e.extra_type="vcHookDependedParamGroup",t.closest(".vc_column").addClass("vc_dependent-hidden"),t.trigger(e)}):_.each(n,function(t){var e=t.attr("name"),e=_.isObject(this.mappedParams[e])&&_.isObject(this.mappedParams[e].dependency)?this.mappedParams[e].dependency:{},n=t.closest(".vc_column");_.isBoolean(e.not_empty)&&!0===e.not_empty&&!i||_.isBoolean(e.is_empty)&&!0===e.is_empty&&i||e.value&&_.intersection(_.isArray(e.value)?e.value:[e.value],_.isArray(a)?a:[a]).length||e.value_not_equal_to&&!_.intersection(_.isArray(e.value_not_equal_to)?e.value_not_equal_to:[e.value_not_equal_to],_.isArray(a)?a:[a]).length?n.removeClass("vc_dependent-hidden"):n.addClass("vc_dependent-hidden"),(e=d.Event("change")).extra_type="vcHookDependedParamGroup",t.trigger(e)},this),this},deleteParam:function(t){t&&t.preventDefault&&t.preventDefault(),!0===confirm(window.i18nLocale.press_ok_to_delete_section)&&(this.options.parent.items--,this.options.parent.afterDelete(),this.$el.remove(),this.unbind(),this.remove())},content:function(){return this.$content},clone:function(t){var e,n;t.preventDefault(),this.options.parent.addAllowed()&&(t=this.options.parent.$ul.data("settings"),e=this.$content,this.$content=this.$el,n=vc.atts.param_group.parseOne.call(this,t),d.ajax({type:"POST",url:window.ajaxurl,data:{action:"vc_param_group_clone",param:a(JSON.stringify(t)),shortcode:vc.active_panel.model.get("shortcode"),value:n,vc_inline:!0,_vcnonce:window.vcAdminNonce},dataType:"json",context:this}).done(function(t){t=t.data||"",t=d(t);t.insertAfter(this.$el),this.$content=e,this.options.parent.initializer.$content=d("> .wpb_element_wrapper",t),this.options.parent.initializer.render(),t.data("vc-param-group-param",new u({el:t,parent:this.options.parent})),this.options.parent.items++,this.options.parent.afterAdd(t,"clone")}))},toggle:function(t){t.preventDefault();t=this.$el;t.find("> .wpb_element_wrapper").slideToggle(),t.toggleClass("vc_param_group-collapsed").siblings(":not(.vc_param_group-collapsed)").addClass("vc_param_group-collapsed").find("> .wpb_element_wrapper").slideUp()}}),h=(window.i18nLocale,vc.edit_form_callbacks=[],vc.atts={parse:function(t){var e=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]"),n=e.closest('[data-vc-ui-element="panel-shortcode-param"]'),n=_.isUndefined(vc.atts[t.type])||_.isUndefined(vc.atts[t.type].parse)?e.length?e.val():null:n.data("vcInitParam")?vc.atts[t.type].parse.call(this,t):(n=this.model.get("params"),_.isUndefined(n[t.param_name])?e.length?e.val():null:n[t.param_name]);return void 0!==e.data("js-function")&&void 0!==window[e.data("js-function")]&&(0,window[e.data("js-function")])(this.$el,this,t),n},parseFrame:function(t){return vc.atts.parse.call(this,t)},init:function(t,e){_.isUndefined(vc.atts[t.type])||_.isUndefined(vc.atts[t.type].init)||vc.atts[t.type].init.call(this,t,e)}},vc.atts.textarea_html={parse:function(t){var e=this.window(),t=this.content().find(".textarea_html."+t.param_name);try{e.tinyMCE&&_.isArray(e.tinyMCE.editors)&&_.each(e.tinyMCE.editors,function(t){"wpb_tinymce_content"===t.id&&t.save()})}catch(t){window.console&&window.console.warn&&window.console.warn("textarea_html atts parse error",t)}return t.val()},render:function(t,e){return _.isUndefined(e)?e:vc_wpautop(e)}},vc.atts.textarea_safe={parse:function(t){t=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]").val();return t.match(/"|(http)/)?"#E-8_"+base64_encode(rawurlencode(t)):t},render:function(t,e){return e&&e.match(/^#E\-8_/)?d("<div/>").text(rawurldecode(base64_decode(e.replace(/^#E\-8_/,"")))).html():e}},vc.atts.checkbox={parse:function(t){var e=[],n="";return d("input[name="+t.param_name+"]",this.content()).each(function(){var t=d(this);this.checked&&e.push(t.attr("value"))}),n=0<e.length?e.join(","):n},defaults:function(t){return""}},vc.atts.el_id={clone:function(t,e,n){var a=t.get("params");_.isUndefined(n)||_.isUndefined(n.settings)||_.isUndefined(n.settings.auto_generate)||!0!==n.settings.auto_generate?a[n.param_name]="":a[n.param_name]=Date.now()+"-"+vc_guid(),t.set({params:a},{silent:!0})},create:function(t,e,n){if(t.get("cloned"))return vc.atts.el_id.clone(t,e,n);!_.isEmpty(e)||_.isUndefined(n)||_.isUndefined(n.settings)||_.isUndefined(n.settings.auto_generate)||1!=n.settings.auto_generate||((e=t.get("params"))[n.param_name]=Date.now()+"-"+vc_guid(),t.set({params:e},{silent:!0}))}},vc.events.on("shortcodes:add:param:type:el_id",vc.atts.el_id.create),vc.atts.posttypes={parse:function(t){var e=[],n="";return d("input[name="+t.param_name+"]",this.content()).each(function(){var t=d(this);this.checked&&e.push(t.attr("value"))}),n=0<e.length?e.join(","):n}},vc.atts.taxonomies={parse:function(t){var e=[],n="";return d("input[name="+t.param_name+"]",this.content()).each(function(){var t=d(this);this.checked&&e.push(t.attr("value"))}),n=0<e.length?e.join(","):n}},vc.atts.exploded_textarea={parse:function(t){return this.content().find(".wpb_vc_param_value[name="+t.param_name+"]").val().replace(/\n/g,",")}},vc.atts.exploded_textarea_safe={parse:function(t){t=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]").val();return(t=t.replace(/\n/g,",")).match(/"|(http)/)?"#E-8_"+base64_encode(rawurlencode(t)):t},render:function(t,e){return e&&e.match(/^#E\-8_/)?d("<div/>").text(rawurldecode(base64_decode(e.replace(/^#E\-8_/,"")))).html():e}},vc.atts.textarea_raw_html={parse:function(e){var n,e=this.content().find(".wpb_vc_param_value[name="+e.param_name+"]");try{n=window.vc.utils.fixUnclosedTags(e.val())}catch(t){n=e.val(),console.error("Failed to execute window.vc.utils.fixUnclosedTags function: ",t)}return base64_encode(rawurlencode(n))},render:function(t,e){return e?d("<div/>").text(rawurldecode(base64_decode(e.trim()))).html():""}},vc.atts.dropdown={render:function(t,e){return e},init:function(t,e){d(".wpb_vc_param_value.dropdown",e).on("change",function(){var t=d(this),e=t.find(":selected"),n=t.data("option"),e=e.length?e.attr("class").replace(/\s/g,"_"):"";e=e.replace("#","hash-"),void 0!==n&&t.removeClass(n),void 0!==e&&(t.data("option",e),t.addClass(e))})},defaults:function(t){var e;return _.isArray(t.value)||_.isString(t.value)?_.isArray(t.value)?(e=t.value[0],_.isArray(e)&&e.length?e[0]:e):"":(e=_.values(t.value)[0]).label?e.value:e}},vc.atts.attach_images={parse:function(t){var e=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]"),n="";return e.parent().find("li.added").each(function(){n+='<li><img src="'+d(this).find("img").attr("src")+'" alt=""></li>'}),d("[data-model-id="+this.model.id+"]").data("field-"+t.param_name+"-attach-images",n),e.length?e.val():null},render:function(t,e){var n=this.$el.find(".attachment-thumbnails[data-name="+t.param_name+"]");return"external_link"===this.model.getParam("source")&&(e=this.model.getParam("custom_srcs")),_.isEmpty(e)?(this.$el.removeData("field-"+t.param_name+"-attach-images"),vc.atts.attach_images.updateImages(n,"")):d.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_gallery_html",content:e,_vcnonce:window.vcAdminNonce},dataType:"json",context:this}).done(function(t){t=t.data;vc.atts.attach_images.updateImages(n,t)}),e},updateImages:function(t,e){t.html(e),e.length?t.removeClass("image-exists").next().addClass("image-exists"):t.addClass("image-exists").next().removeClass("image-exists")}},vc.atts.href={parse:function(t){var t=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]"),e="";return e=t.length&&"http://"!==t.val()?t.val():e}},vc.atts.attach_image={parse:function(t){var e=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]"),n="";return e.parent().find("li.added").length&&(n=e.parent().find("li.added img").attr("src")),d("[data-model-id="+this.model.id+"]").data("field-"+t.param_name+"-attach-image",n),e.length?e.val():null},render:function(t,e){var n=d("[data-model-id="+this.model.id+"]"),a=n.data("field-"+t.param_name+"-attach-image"),i=this.$el.find(".attachment-thumbnail[data-name="+t.param_name+"]"),o={image_src:"",image_alt:""};return"image"===t.param_name&&("external_link"===this.model.getParam("source")?(o.image_src=this.model.getParam("custom_src"),vc.atts.attach_image.updateImage(i,o)):_.isEmpty(e)&&"featured_image"!==this.model.getParam("source")?_.isUndefined(a)||(n.removeData("field-"+t.param_name+"-attach-image"),o.image_src=a,vc.atts.attach_image.updateImage(i,o)):d.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_single_image_data",content:e,params:this.model.get("params"),post_id:vc_post_id,_vcnonce:window.vcAdminNonce},dataType:"json",context:this}).done(function(t){var e;t.success&&(e=t.data.image_src.length||"featured_image"===this.model.getParam("source"),vc.atts.attach_image.updateImage(i,t.data,e))})),e},updateImage:function(t,e,n){var a=e.image_src,e=e.image_alt;t.length&&((n=void 0===n?!1:n)||!_.isEmpty(a)?(t.attr("src",a),t.attr("alt",e),(_.isEmpty(a)?(t.hide(),t.next().removeClass("image-exists")):(t.show(),t.next().addClass("image-exists"))).next().addClass("image-exists")):t.attr("src","").hide().next().removeClass("image-exists").next().removeClass("image-exists"))}},vc.atts.google_fonts={parse:function(t){var t=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]").parent(),e={};return e.font_family=t.find(".vc_google_fonts_form_field-font_family-select > option:selected").val(),e.font_style=t.find(".vc_google_fonts_form_field-font_style-select > option:selected").val(),e.font_vendor=t.find(".vc_google_fonts_form_field-font_family-select > option:selected").attr("data[font_vendor]"),t=_.map(e,function(t,e){if(_.isString(t)&&0<t.length)return e+":"+encodeURIComponent(t)}),d.grep(t,function(t){return _.isString(t)&&0<t.length}).join("|")},init:function(t,e){var n=e;n.length&&("undefined"!=typeof WebFont?e.data("vc-param-object",new r({el:n})):n.find("> .edit_form_line").html(window.i18nLocale.gfonts_unable_to_load_google_fonts||"Unable to load Google Fonts"))}},vc.atts.font_container={parse:function(t){var t=this.content().find(".wpb_vc_param_value[name="+t.param_name+"]").parent(),e={};return e.tag=t.find(".vc_font_container_form_field-tag-select > option:selected").val(),e.font_size=t.find(".vc_font_container_form_field-font_size-input").val(),e.text_align=t.find(".vc_font_container_form_field-text_align-select > option:selected").val(),e.font_family=t.find(".vc_font_container_form_field-font_family-select > option:selected").val(),e.color=t.find(".vc_font_container_form_field-color-input").val(),e.line_height=t.find(".vc_font_container_form_field-line_height-input").val(),e.font_style_italic=t.find(".vc_font_container_form_field-font_style-checkbox.italic").prop("checked")?"1":"",e.font_style_bold=t.find(".vc_font_container_form_field-font_style-checkbox.bold").prop("checked")?"1":"",t=_.map(e,function(t,e){if(_.isString(t)&&0<t.length)return e+":"+encodeURIComponent(t)}),d.grep(t,function(t){return _.isString(t)&&0<t.length}).join("|")},init:function(t,e){vc.atts.colorpicker.init.call(this,t,e)}},vc.atts.param_group={parse:function(t){var e=this.content(),n=e.find('.wpb_el_type_param_group[data-vc-ui-element="panel-shortcode-param"][data-vc-shortcode-param-name="'+t.param_name+'"]').find("> .edit_form_line > .vc_param_group-list"),t=vc.atts.param_group.extractValues.call(this,t,d('>.wpb_vc_row:not(".vc_param_group-add_content-wrapper")',n));return this.$content=e,encodeURIComponent(JSON.stringify(t))},extractValues:function(i,t){var e=[],o=this;return t.each(function(){var a={};o.$content=d(this),_.each(i.params,function(t){var e,t=d.extend({},t),n=t.param_name;t.param_name=i.param_name+"_"+n,((e=vc.atts.parse.call(o,t)).length||t.save_always)&&(a[n]=e)}),e.push(a)}),e},parseOne:function(t){var e=this.content(),t=vc.atts.param_group.extractValues.call(this,t,e);return this.$content=e,a(JSON.stringify(t))},init:function(t,e){e.data("vc-param-object",new p({el:e,settings:{param:t}}))}},vc.atts.colorpicker={init:function(t,e){e=e[0];vc.initColorPicker(e,null,{change:function(t){d(t).trigger("change")},cancel:function(t){d(t).trigger("change")}})}},vc.atts.autocomplete={init:function(t,e){e.length&&e.each(function(){var t=d(".wpb_vc_param_value",this),e=t.attr("name"),n=d(".vc_auto_complete_param",this),e=d.extend({$param_input:t,param_name:e,$el:n},t.data("settings")),n=new l(e);e.multiple&&n.enableMultiple(),e.sortable&&n.enableSortable(),t.data("vc-param-object",n)})}},vc.atts.loop={init:function(t,e){e.data("vc-param-object",new n({el:e}))}},vc.atts.vc_link={init:function(t,e){d(".vc_link-build",e).on("click",function(t){t&&t.preventDefault&&t.preventDefault(),t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),t=d(this).closest(".vc_link"),i=t.find(".wpb_vc_param_value"),o=t.find(".url-label"),s=t.find(".title-label"),t=i.data("json"),r=d("#wp-link-submit"),l=d('<input type="submit" name="vc_link-submit" id="vc_link-submit" class="button-primary" value="Set Link">'),r.hide(),d("#vc_link-submit").remove(),l.insertBefore(r),e=d('<div class="link-target vc-link-nofollow"><label><span></span> <input type="checkbox" id="vc-link-nofollow"> Add nofollow option to link</label></div>'),d("#link-options .vc-link-nofollow").remove(),e.insertAfter(d("#link-options .link-target")),setTimeout(function(){var t=d("#most-recent-results").css("top");d("#most-recent-results").css("top",parseInt(t,10)+e.height())},200),c=!window.wpLink&&d.fn.wpdialog&&d("#wp-link").length?{$link:!1,open:function(){this.$link=d("#wp-link").wpdialog({title:wpLinkL10n.title,width:480,height:"auto",modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),this.$link.addClass("vc-link-wrapper")},close:function(){this.$link&&(this.$link.wpdialog("close"),this.$link.removeClass("vc-link-wrapper"))}}:window.wpLink;var i,o,s,r,l,e,c,n=function(t,e){jQuery(e).addClass("vc-link-wrapper");var a=d("#wp-link-cancel button");l.off("click.vcLink").on("click.vcLink",function(t){t&&t.preventDefault&&t.preventDefault(),t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),(t={}).url=(d("#wp-link-url").length?d("#wp-link-url"):d("#url-field")).val(),t.title=(d("#wp-link-text").length?d("#wp-link-text"):d("#link-title-field")).val();var e,n=d("#wp-link-target").length?d("#wp-link-target"):d("#link-target-checkbox");return t.target=n[0].checked?"_blank":"",t.rel=d("#vc-link-nofollow")[0].checked?"nofollow":"",e=_.map(t,function(t,e){if(_.isString(t)&&0<t.length)return e+":"+encodeURIComponent(t).trim()}).filter(function(t){return t}).join("|"),i.val(e).trigger("change"),i.data("json",t),o.html(t.url+t.target),s.html(t.title),c.close("noReset"),r.show(),l.off("click.vcLink"),l.remove(),a.off("click.vcLinkCancel"),window.wpLink.textarea="",n.attr("checked",!1),d("#most-recent-results").css("top",""),d("#vc-link-nofollow").attr("checked",!1),!1}),a.off("click").on("click.vcLinkCancel",function(t){t&&t.preventDefault&&t.preventDefault(),t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),c.close("noReset"),l.off("click.vcLink"),l.remove(),a.off("click.vcLinkCancel"),window.wpLink.textarea=""})},a=function(t,e){jQuery(e).removeClass("vc-link-wrapper"),jQuery(document).off("wplink-open",n),jQuery(document).off("wplink-close",a)};jQuery(document).off("wplink-open",n).on("wplink-open",n),jQuery(document).off("wplink-close",a).on("wplink-close",a),"admin_frontend_editor"===vc_mode?c.open("vc-hidden-editor"):c.open("content"),_.isString(t.url)&&(d("#wp-link-url").length?d("#wp-link-url"):d("#url-field")).val(t.url),_.isString(t.title)&&(d("#wp-link-text").length?d("#wp-link-text"):d("#link-title-field")).val(t.title),(d("#wp-link-target").length?d("#wp-link-target"):d("#link-target-checkbox")).prop("checked",!_.isEmpty(t.target)),d("#vc-link-nofollow").length&&d("#vc-link-nofollow").prop("checked",!_.isEmpty(t.rel))})}},vc.atts.sorted_list={init:function(t,e){d(".vc_sorted-list",e).VcSortedList()}},vc.atts.options={init:function(t,e){e.data("vc-param-object",new o({el:e}))}},vc.atts.iconpicker={change:function(t,e){e=e.find(".vc-iconpicker");e.val(this.value),e.data("vc-no-check",!0),e.find('[value="'+this.value+'"]').attr("selected","selected"),e.data("vcFontIconPicker").loadIcons()},parse:function(t){return this.content().find(".wpb_vc_param_value[name="+t.param_name+"]").parent().find(".vc-iconpicker").val()},init:function(e,n){var a=n.find(".wpb_vc_param_value"),t=d.extend({iconsPerPage:100,iconDownClass:"fip-fa fa fa-arrow-down",iconUpClass:"fip-fa fa fa-arrow-up",iconLeftClass:"fip-fa fa fa-arrow-left",iconRightClass:"fip-fa fa fa-arrow-right",iconSearchClass:"fip-fa fa fa-search",iconCancelClass:"fip-fa fa fa-remove",iconBlockClass:"fip-fa"},a.data("settings"));n.find(".vc-iconpicker").vcFontIconPicker(t).on("change",function(t){var e=d(this);e.data("vc-no-check")||a.data("vc-no-check",!0).val(this.value).trigger("change"),e.data("vc-no-check",!1)}),a.on("change",function(t){a.data("vc-no-check")||vc.atts.iconpicker.change.call(this,e,n),a.data("vc-no-check",!1)})}},vc.atts.animation_style={init:function(t,e){var n=e,a=d(".wpb_vc_param_value[name="+t.param_name+"]",n);function i(t,e){d(t).removeClass().addClass(e+" animated").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){d(this).removeClass().addClass("vc_param-animation-style-preview")})}d('option[value="'+a.val()+'"]',n).attr("selected",!0),d(".vc_param-animation-style-trigger",n).on("click",function(t){t.preventDefault();t=d(".vc_param-animation-style",n).val();"none"!==t&&i(this.parentNode,"vc_param-animation-style-preview "+t)}),d(".vc_param-animation-style",n).on("change",function(){var t=d(this).val();a.val(t),"none"!==t&&i(d(".vc_param-animation-style-preview",n),"vc_param-animation-style-preview "+t)})}},vc.atts.gutenberg={content:null,gutenbergParamObj:null,$frame:null,closeEditor:function(t){t&&t.preventDefault&&t.preventDefault();var e=this;_.delay(function(){e.content.find(".vc_gutenberg-modal-wrapper").html(""),e.$frame=null,e.gutenbergParamObj=null},100)},updateEditor:function(t){t&&t.preventDefault&&t.preventDefault(),this.gutenbergParamObj&&this.gutenbergParamObj.updateValueFromIframe(),this.closeEditor()},init:function(t,e){var n=vc.atts.gutenberg,a=(n.content=e,d(".wpb_vc_param_value[name="+t.param_name+"]",n.content));d('[data-vc-action="open"]',n.content).on("click",function(t){t.preventDefault();var t=a.val(),e=window.wpbGutenbergEditorUrl||"/wp-admin/post-new.php?post_type=wpb_gutenberg_param";n.gutenbergParamObj=new v({onSetValue:function(t){a.val(t),a.trigger("change")},onError:n.closeEditor,value:t}),vc.createOverlaySpinner(),n.content.find(".vc_gutenberg-modal-wrapper").html('<div class="wpb-gutenberg-modal"><div class="wpb-gutenberg-modal-inner"><iframe style="width: 100%;" data-vc-gutenberg-param-iframe></iframe></div></div>'),n.$frame=n.content.find("iframe[data-vc-gutenberg-param-iframe]"),n.$frame.attr("src",e),n.$frame.on("load",function(){vc.removeOverlaySpinner(),n.gutenbergParamObj&&(n.gutenbergParamObj.iframe=n.$frame.get(0),n.gutenbergParamObj.iframeLoaded())})})}},function(){return'<style>.wpb-gutenberg-controls-container {display: flex;justify-content: center;align-items: center;}.vc_gutenberg-modal-update-button {padding-top: 8px;padding-bottom: 8px;min-height: 10px;padding: 5px 10px;font-size: 12px;line-height: 1.5;border-radius: 3px;color: #fff;background-color: #00aef0;border-color: transparent;cursor: pointer;display: inline-block;text-decoration: none !important;}.vc_gutenberg-modal-update-button:hover {background-color: #0089bd;}.wpb-gutenberg-modal-close-button {display: inline-flex;justify-content: center;align-items: center;margin: 0 0 0 10px;background: transparent;border: 0;box-shadow: none;padding: 5px;cursor: pointer;outline: none;}.wpb-gutenberg-modal-close-button:hover .vc-c-icon-close {opacity: 1;}.vc-c-icon-close {position: relative;display: inline-flex;width: 13px;height: 13px;justify-content: center;align-items: center;transform: rotate(45deg);opacity: .65;transition: opacity .2s ease-in-out;}.vc-c-icon-close::before,.vc-c-icon-close::after {content: "";position: absolute;background: #353535;}.vc-c-icon-close::before {width: 1px;height: 100%;}.vc-c-icon-close::after {width: 100%;height: 1px;}.interface-interface-skeleton__sidebar {z-index: -1;}</style>'}),m=function(){var t=window.i18nLocale.gutenbergEditorUpdateButton||"Update";return'<div class="wpb-gutenberg-controls-container">'+h()+'<button class="vc_gutenberg-modal-update-button">'+t+'</button><button class="wpb-gutenberg-modal-close-button"><i class="vc-composer-icon vc-c-icon-close"></i></button></div>'},v=function(t){return this.iframe=null,this.options=t||{},this.value=this.options&&this.options.value?this.options.value:"",this.iframeLoaded=function(){var e=!!this.iframe.contentWindow.wp&&this.iframe.contentWindow.wp.data,n=(e||(t=(t=window.i18nLocale||!1)&&t.gutenbergDoesntWorkProperly?t.gutenbergDoesntWorkProperly:"Gutenberg plugin doesn't work properly. Please check Gutenberg plugin.",window.alert(t),this.options&&this.options.onError&&this.options.onError()),parseInt(this.iframe.contentWindow.document.getElementById("post_ID").value)),a={id:n,guid:{raw:"/?",rendered:"/?"},title:{raw:""},content:{raw:this.value,rendered:this.value},type:"wpb_gutenberg_param",slug:"",status:"auto-draft",link:"/?",format:"standard",categories:[]},i=e.dispatch("core/editor"),t=e.select("core/edit-post"),o=this.iframe.contentWindow.document.querySelector(".editor-post-title"),s=this.iframe.contentWindow.document.querySelector(".components-notice-list"),r=(o&&o.classList.add("hidden"),s&&s.classList.add("hidden"),t.isPublishSidebarOpened=function(){return!0},"function"==typeof i.autosave&&(i.autosave=function(){}),this.value),l=!1,c=(e.subscribe(function(){var t=e.select("core/editor").getCurrentPost();!l&&t&&t.id===n&&(l=!0,i.setupEditor(a,{content:r}))}),this.iframe);setTimeout(function(){var t,e,n;t=d(t=c).contents(),e=t.find(".edit-post-header-toolbar"),n=m(),d(n).insertAfter(e),t.find(".vc_gutenberg-modal-update-button, .wpb-gutenberg-modal-close-button").on("click",function(){setTimeout(function(){window.sessionStorage.removeItem("wp-autosave-block-editor-post-auto-draft")},"3000")}),n=vc.atts.gutenberg,t.find(".wpb-gutenberg-modal-close-button").on("click",n.closeEditor.bind(n)),t.find(".vc_gutenberg-modal-update-button").on("click",n.updateEditor.bind(n))},"3000")},this.updateValueFromIframe=function(){var t;this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.wp&&this.iframe.contentWindow.wp.data&&(t=this.iframe.contentWindow.wp.data)&&(t=t.select("core/editor").getEditedPostContent(),this.setValue(t))},this.setValue=function(t){this.value=t,this.options.onSetValue&&this.options.onSetValue(t)},this};vc.atts.vc_grid_id={parse:function(){return"vc_gid:"+Date.now()+"-"+this.model.get("id")+"-"+Math.floor(11*Math.random())}},vc.atts.addShortcodeIdParam=function(e){var n=!1,a=e.get("params"),t=vc.map[e.get("shortcode")];_.isArray(t.params)&&_.each(t.params,function(t){t&&!_.isUndefined(t.type)&&("tab_id"===t.type&&_.isEmpty(a[t.param_name])?(n=!0,a[t.param_name]=vc_guid()+"-"+Math.floor(11*Math.random())):"vc_grid_id"===t.type&&(n=!0,a[t.param_name]=vc.atts.vc_grid_id.parse.call({model:e})))}),n&&e.save("params",a,{silent:!0})},vc.getMapped=vc.memoizeWrapper(function(t){return vc.map[t]||{}})})(window.jQuery); (n=>{vc.debug=!1,vc.map=_.isUndefined(window.vc_mapper)?{}:window.vc_mapper,vc.roles=_.isUndefined(window.vc_roles)?{}:window.vc_roles,vc.Storage=function(){this.data={}},vc.Storage.prototype={url:window.ajaxurl,checksum:!1,locked:!1,isChanged:!1,create:function(t){return t.id||(t.id=t.attributes.id=vc_guid()),this.data[t.id]=t.toJSON(),this.setModelRoot(t.id),this.save(),t},lock:function(){this.locked=!0},unlock:function(){this.locked=!1},setModelRoot:function(t){t=this.data[t];_.isString(t.parent_id)&&_.isObject(this.data[t.parent_id])&&(t.root_id=this.data[t.parent_id].root_id),_.isObject(this.data[t.root_id])&&(this.data[t.root_id].html=!1)},update:function(t){return this.data[t.id]=t.toJSON(),this.setModelRoot(t.id),this.save(),t},destroy:function(t){return _.isUndefined(this.data[t.id])||_.isUndefined(this.data[t.id].root_id)||!_.isObject(this.data[this.data[t.id].root_id])||(this.data[this.data[t.id].root_id].html=!1),_.isUndefined(this.data[t.id])||delete this.data[t.id],this.save(),t},find:function(t){return this.data[t]},findAll:function(){return this.fetch(),_.values(this.data)},findAllRootSorted:function(){var t=_.filter(_.values(this.data),function(t){return!1===t.parent_id});return _.sortBy(t,function(t){return t.order})},escapeParam:function(t){return _.isUndefined(t)||_.isNull(t)||!t.toString?"":t.toString().replace(/"/g,"``").replace(/\[/g,"`{`").replace(/\]/g,"`}`")},unescapeParam:function(t){return t=t.replace(/\`{\`/g,"[").replace(/\`}\`/g,"]").replace(/(\`{2})/g,'"'),t=vc_wpnop(t)},storageCreateShortcodeString:function(t){var e,n=t.get("shortcode"),i=_.extend({},t.get("params")),o={},i=vc.getMergedParams(n,i);return _.each(i,function(t,e){o[e]=this.escapeParam(t)},this),i=vc.getMapped(n),i=_.isObject(i)&&(_.isBoolean(i.is_container)&&!0===i.is_container||!_.isEmpty(i.as_parent)),e=this._storageGetShortcodeContent(t),e={tag:n,attrs:o,content:e,type:_.isUndefined(vc.getParamSettings(n,"content"))&&!i?"single":""},t.trigger("stringify",t,e),wp.shortcode.string(e)},save:function(){var t;return this.locked?this.locked=!1:(t=_.reduce(this.findAllRootSorted(),function(t,e){e=vc.shortcodes.get(e);return t+this.storageCreateShortcodeString(e)},"",this),this.setContent(t),this.checksum=vc_globalHashCode(t),this)},_storageGetShortcodeContent:function(e){var t=_.sortBy(_.filter(this.data,function(t){return t.parent_id===e.get("id")}),function(t){return t.order});return t.length?_.reduce(t,function(t,e){e=vc.shortcodes.get(e);return t+this.storageCreateShortcodeString(e)},"",this):(t=_.extend({},e.get("params")),_.isUndefined(t.content)?"":t.content)},getContent:function(){return _.isObject(window.tinymce)&&tinymce.editors.content&&tinymce.editors.content.save(),window.vc_wpnop(n("#content").val()||"")},addUndo:_.debounce(function(t){vc.undoRedoApi&&vc.undoRedoApi.add(t)},100),setContent:function(t){this.addUndo(t);var e=window.tinyMCE&&window.tinyMCE.get&&window.tinyMCE.get("content");t=vc_wpautop(t),this.isChanged||window.jQuery(window).on("beforeunload.vcSave",function(){return window.i18nLocale.confirm_to_leave}),this.isChanged=!0,n("#content").val(t),e&&e.setContent&&(e.setContent(t),e.fire("change"))},parseContent:function(a,t,d){var h=_.keys(vc.map).join("|"),e=window.wp.shortcode.regexp(h),t=t.trim().match(e);return _.isNull(t)||_.each(t,function(t){var e,n=t.match(this.regexp(h)),i=n[5],o=new RegExp("^[\\s]*\\[\\[?("+_.keys(vc.map).join("|")+")(?![\\w-])"),r=window.vc_guid(),c=window.wp.shortcode.attrs(n[3]),s={};_.each(c.named,function(t,e){s[e]=this.unescapeParam(t)},this),c={id:r,shortcode:n[2],order:this.order,params:_.extend({},s),parent_id:!!_.isObject(d)&&d.id,root_id:_.isObject(d)?d.root_id:r},e=vc.map[c.shortcode],this.order+=1,_.isArray(a)?(a.push(c),r=a.length-1):a[r]=c,r==c.root_id&&(a[r].html=t),_.isString(i)&&i.match(o)&&(_.isBoolean(e.is_container)&&!0===e.is_container||!_.isEmpty(e.as_parent)&&!1!==e.as_parent)?a=this.parseContent(a,i,a[r]):_.isString(i)&&i.length&&"vc_row"===n[2]?a=this.parseContent(a,'[vc_column width="1/1"][vc_column_text]'+i+"[/vc_column_text][/vc_column]",a[r]):_.isString(i)&&i.length&&"vc_column"===n[2]?a=this.parseContent(a,"[vc_column_text]"+i+"[/vc_column_text]",a[r]):_.isString(i)&&(a[r].params.content=i)},this),a},isContentChanged:function(){return!1===this.checksum||this.checksum!==vc_globalHashCode(this.getContent())},wrapData:function(t){var e=_.keys(vc.map).join("|"),n=this.regexp_split("vc_row"),i=new RegExp("^\\[(\\[?)("+e+")","g"),o=this,r={},c=0,e=(t=wp.shortcode.replace("vc_section",t,function(t){var t={attrs:t.attrs.named,content:o.wrapData(t.content)},e="vc_pseudo_section_"+ ++c+"_"+VCS4()+VCS4();return r[e]={tag:e,data:t},'[vc_row][vc_pseudo_section id="'+e+'"][/vc_pseudo_section][/vc_row]'}),_.filter(t.trim().split(n),function(t){if(!_.isEmpty(t))return t}));return t=_.reduce(e,function(t,e){var n=(e=-1!==e.trim().indexOf("vc_pseudo_section_")||e.trim().match(i)?e:"[vc_row][vc_column][vc_column_text]"+e+"[/vc_column_text][/vc_column][/vc_row]").match(vc_regexp_shortcode());return t+(e=!_.isArray(n)||_.isUndefined(n[2])||-1!==n[2].indexOf("vc_pseudo_section_")||_.isUndefined(vc.map[n[2]])||!_.isUndefined(vc.map[n[2]].is_container)&&vc.map[n[2]].is_container||!_.isEmpty(vc.map[n[2]].as_parent)?e:"[vc_row][vc_column]"+e+"[/vc_column][/vc_row]")},""),0<Object.keys(r).length&&(t=(t=t.replace(/\[vc_row\]\[vc_pseudo_section/g,"[vc_pseudo_section")).replace(/\[\/vc_pseudo_section\]\[\/vc_row\]/g,"[/vc_pseudo_section]"),t=wp.shortcode.replace("vc_pseudo_section",t,function(t){t=r[t.attrs.named.id];return wp.shortcode.string({tag:"vc_section",attrs:t.data.attrs,content:t.data.content})})),t},fetch:function(){if(!this.isContentChanged())return this;this.order=0;var t=this.getContent();this.checksum=vc_globalHashCode(t),t=this.wrapData(t),this.data=this.parseContent({},t)},append:function(t){this.data={},this.order=0;try{var e=this.getContent();this.setContent(e+""+t)}catch(t){window.console&&window.console.warn&&window.console.warn("storage.append error",t)}},regexp_split:_.memoize(function(t){return new RegExp("(\\[(\\[?)["+t+"]+(?![\\w-])[^\\]\\/]*[\\/(?!\\])[^\\]\\/]*]?(?:\\/]\\]|\\](?:[^\\[]*(?:\\[(?!\\/"+t+"\\])[^\\[]*)*\\[\\/"+t+"\\])?)\\]?)","g")}),regexp:_.memoize(function(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)")})},vc.storage=new vc.Storage})(window.jQuery); (()=>{var a=vc.storage;vc.shortcode=Backbone.Model.extend({settings:!1,defaults:function(){var e=window.vc_guid();return{id:e,shortcode:"vc_text_block",order:vc.shortcodes.getNextOrder(),params:{},parent_id:!1,root_id:e,cloned:!1,html:!1,view:!1}},initialize:function(){this.bind("remove",this.removeChildren,this),this.bind("remove",this.removeEvents,this)},removeEvents:function(e){vc.events.triggerShortcodeEvents("destroy",e)},sync:function(e,t,n){if(n&&n.silent)return n.success(t);var r;switch(e){case"read":r=t.id?a.find(t):a.findAll();break;case"create":r=a.create(t);break;case"update":r=a.update(t);break;case"delete":r=a.destroy(t)}r?n.success(r):n.error("Record not found")},getParam:function(e){return _.isObject(this.get("params"))&&!_.isUndefined(this.get("params")[e])?this.get("params")[e]:""},removeChildren:function(e){e=vc.shortcodes.where({parent_id:e.id});_.each(e,function(e){vc.storage.lock(),e.destroy(),this.removeChildren(e)},this),e.length&&vc.storage.save()},setting:function(e){return!1===this.settings&&(this.settings=vc.getMapped(this.get("shortcode"))||{}),this.settings[e]}}),vc.shortcodes_collection=Backbone.Collection.extend({model:vc.shortcode,last_index:0,getNextOrder:function(){return this.last_index++},comparator:function(e){return e.get("order")},initialize:function(){},createFromString:function(e,t){e=vc.storage.parseContent({},e,!!_.isObject(t)&&t.toJSON());_.each(_.values(e),function(e){vc.shortcodes.create(e)},this)},sync:function(e,t,n){var r;switch(e){case"read":r=t.id?a.find(t):a.findAll();break;case"create":r=a.create(t);break;case"update":r=a.update(t);break;case"delete":r=a.destroy(t)}r?n.success(r):n.error("Record not found")},stringify:function(e){var t=_.sortBy(vc.shortcodes.where({parent_id:!1}),function(e){return e.get("order")});return this.modelsToString(t,e)},singleStringify:function(e,t){return this.modelsToString([vc.shortcodes.get(e)],t)},createShortcodeString:function(e,t){var n,r=e.get("shortcode"),a=_.extend({},e.get("params")),i={},a=vc.getMergedParams(r,a);return _.each(a,function(e,t){i[t]=vc.storage.escapeParam(e)},this),a=vc.getMapped(r),a=_.isObject(a)&&(_.isBoolean(a.is_container)&&!0===a.is_container||!_.isEmpty(a.as_parent)),n=this._getShortcodeContent(e,t),n={tag:r,attrs:i,content:n,type:_.isUndefined(vc.getParamSettings(r,"content"))&&!a?"single":""},_.isUndefined(t)?e.trigger("stringify",e,n):e.trigger("stringify:"+t,e,n),n.remove?"":wp.shortcode.string(n)},modelsToString:function(e,n){return _.reduce(e,function(e,t){return e+this.createShortcodeString(t,n)},"",this)},_getShortcodeContent:function(e,n){var t=_.sortBy(vc.shortcodes.where({parent_id:e.get("id")}),function(e){return e.get("order")});return t.length?_.reduce(t,function(e,t){return e+this.createShortcodeString(t,n)},"",this):(t=_.extend({},e.get("params")),_.isUndefined(t.content)?"":t.content)}}),vc.shortcodes=new vc.shortcodes_collection,vc.getDefaults=vc.memoizeWrapper(function(e){var t={},e=_.isObject(vc.map[e])&&_.isArray(vc.map[e].params)?vc.map[e].params:[];return _.each(e,function(e){_.isObject(e)&&(_.isUndefined(e.std)?vc.atts[e.type]&&vc.atts[e.type].defaults?t[e.param_name]=vc.atts[e.type].defaults(e):_.isUndefined(e.value)||(_.isObject(e.value)?t[e.param_name]=_.values(e.value)[0]:_.isArray(e.value)?t[e.param_name]=e.value[0]:t[e.param_name]=e.value):t[e.param_name]=e.std)}),t}),vc.getDefaultsAndDependencyMap=vc.memoizeWrapper(function(e){var t={},n={},e=_.isObject(vc.map[e])&&_.isArray(vc.map[e].params)?vc.map[e].params:[];return _.each(e,function(e){_.isObject(e)&&"content"!==e.param_name&&(_.isUndefined(e.std)?_.isUndefined(e.value)||(vc.atts[e.type]&&vc.atts[e.type].defaults?n[e.param_name]=vc.atts[e.type].defaults(e):_.isObject(e.value)?n[e.param_name]=_.values(e.value)[0]:_.isArray(e.value)?n[e.param_name]=e.value[0]:n[e.param_name]=e.value):n[e.param_name]=e.std,_.isUndefined(e.dependency)||_.isUndefined(e.dependency.element)||(t[e.param_name]=e.dependency))}),{defaults:n,dependencyMap:t}}),vc.getMergedParams=function(s,c){var o,d=vc.getDefaultsAndDependencyMap(s),u={};return c=_.extend({},d.defaults,c),o=_.extend({},d.dependencyMap),_.each(c,function(e,t){if("content"!==t){if(!_.isUndefined(o[t])){if(!_.isUndefined(o[o[t].element])&&_.isBoolean(o[o[t].element].failed)&&!0===o[o[t].element].failed)return void(o[t].failed=!0);var n=o[t].element,r=c[n],a=_.isEmpty(r),i=!1;if("string"==typeof r&&(i=c[n].split(",").map(function(e){return e.trim()}).filter(function(e){return e})),n=_.omit(o[t],"element"),_.isBoolean(n.not_empty)&&!0===n.not_empty&&a||_.isBoolean(n.is_empty)&&!0===n.is_empty&&!a||n.value&&!_.intersection(_.isArray(n.value)?n.value:[n.value],_.isArray(r)?r:[r]).length&&i&&n.value&&!_.intersection(_.isArray(n.value)?n.value:[n.value],_.isArray(i)?i:[i]).length||n.value_not_equal_to&&_.intersection(_.isArray(n.value_not_equal_to)?n.value_not_equal_to:[n.value_not_equal_to],_.isArray(r)?r:[r]).length&&i&&n.value_not_equal_to&&_.intersection(_.isArray(n.value_not_equal_to)?n.value_not_equal_to:[n.value_not_equal_to],_.isArray(i)?i:[i]).length)return void(o[t].failed=!0)}a=vc.getParamSettings(s,t),(_.isUndefined(a)||!_.isUndefined(d.defaults[t])&&d.defaults[t]!==e||_.isUndefined(d.defaults[t])&&""!==e||!_.isUndefined(a.save_always)&&!0===a.save_always)&&(u[t]=e)}}),u},vc.getParamSettings=vc.memoizeWrapper(function(e,t){e=_.isObject(vc.map[e])&&_.isArray(vc.map[e].params)?vc.map[e].params:[];return _.find(e,function(e){return _.isObject(e)&&e.param_name===t},this)},function(){return arguments[0]+","+arguments[1]}),vc.getParamSettingsByType=vc.memoizeWrapper(function(e,t){e=_.isObject(vc.map[e])&&_.isArray(vc.map[e].params)?vc.map[e].params:[];return _.find(e,function(e){return _.isObject(e)&&e.type===t},this)},function(){return arguments[0]+","+arguments[1]}),vc.shortcodeHasIdParam=vc.memoizeWrapper(function(e){return vc.getParamSettingsByType(e,"el_id")})})(window.jQuery); (a=>{vc.clone_index=1,vc.shortcode_view=Backbone.View.extend({tagName:"div",$content:"",use_default_content:!1,params:{},events:{"click .column_delete,.vc_control-btn-delete":"deleteShortcode","click .column_add,.vc_control-btn-prepend":"addElement","click .column_edit,.vc_control-btn-edit, .column_edit_trigger":"editElement","click .column_clone,.vc_control-btn-clone":"clone","click .column_copy,.vc_control-btn-copy":"copy","click .column_paste,.vc_control-btn-paste":"paste",mousemove:"checkControlsPosition"},removeView:function(){vc.closeActivePanel(this.model),this.remove()},checkControlsPosition:function(){var e,t;this.$controls_buttons&&(t=this.$el.height(),a(window).height()<t)&&(40<(e=a(window).scrollTop()-this.$el.offset().top+a(window).height()/2)&&e<t?this.$controls_buttons.css("top",e):t<e?this.$controls_buttons.css("top",t-40):this.$controls_buttons.css("top",40))},initialize:function(){this.model.bind("destroy",this.removeView,this),this.model.bind("change:params",this.changeShortcodeParams,this),this.model.bind("change_parent_id",this.changeShortcodeParent,this),this.createParams()},hasUserAccess:function(){var t=this.model.get("shortcode");return-1<_.indexOf(["vc_row","vc_column","vc_row_inner","vc_column_inner"],t)||!!_.every(vc.roles.current_user,function(e){return!(!_.isUndefined(vc.roles[e])&&!_.isUndefined(vc.roles[e].shortcodes)&&_.isUndefined(vc.roles[e].shortcodes[t]))})},canCurrentUser:function(e){var t=this.model.get("shortcode");return void 0===e||"all"===e?vc_user_access().shortcodeAll(t):vc_user_access().shortcodeEdit(t)},createParams:function(){var e=this.model.get("shortcode"),e=_.isObject(vc.map[e])&&_.isArray(vc.map[e].params)?vc.map[e].params:[];this.model.get("params");this.params={},_.each(e,function(e){this.params[e.param_name]=e},this)},setContent:function(){this.$content=this.$el.find("> .wpb_element_wrapper > .vc_container_for_children, > .vc_element-wrapper > .vc_container_for_children")},setEmpty:function(){},unsetEmpty:function(){},checkIsEmpty:function(){this.model.get("parent_id")&&vc.app.views[this.model.get("parent_id")].checkIsEmpty()},html2element:function(e){var t={},e=vc.template(e),e=a(e(this.model.toJSON()).trim());_.each(e.get(0).attributes,function(e){t[e.name]=e.value}),this.$el.attr(t).html(e.html()),this.setContent(),this.renderContent()},render:function(){var e=a("#vc_shortcode-template-"+this.model.get("shortcode"));return e.is("script")&&this.html2element(e.html()),(this.model.view=this).$controls_buttons=this.$el.find(".vc_controls > :first"),this},renderContent:function(){return this.$el.attr("data-model-id",this.model.get("id")),this.$el.data("model",this.model),this},changedContent:function(e){},_loadDefaults:function(){var e=this.model.get("shortcode");!!!vc.shortcodes.where({parent_id:this.model.get("id")}).length&&!0===this.use_default_content&&_.isObject(vc.map[e])&&_.isString(vc.map[e].default_content)&&vc.map[e].default_content.length&&(this.use_default_content=!1,vc.shortcodes.createFromString(vc.map[e].default_content,this.model))},_callJsCallback:function(){var e=this.model.get("shortcode");_.isObject(vc.map[e])&&_.isObject(vc.map[e].js_callback)&&!_.isUndefined(vc.map[e].js_callback.init)&&(e=vc.map[e].js_callback.init,window[e](this.$el))},ready:function(e){return this._loadDefaults(),this._callJsCallback(),this.model.get("parent_id")&&_.isObject(vc.app.views[this.model.get("parent_id")])&&vc.app.views[this.model.get("parent_id")].changedContent(this),_.defer(_.bind(function(){vc.events.trigger("shortcodeView:ready",this),vc.events.trigger("shortcodeView:ready:"+this.model.get("shortcode"),this)},this)),this},addShortcode:function(e,t){var n=_.last(vc.shortcodes.filter(function(e){return e.get("parent_id")===this.get("parent_id")&&parseFloat(e.get("order"))<parseFloat(this.get("order"))},e.model));n?e.render().$el.insertAfter("[data-model-id="+n.id+"]"):"append"===t?this.$content.append(e.render().el):this.$content.prepend(e.render().el)},changeShortcodeParams:function(e){var t=e.get("shortcode"),r=e.get("params"),n=vc.map[t];_.defer(function(){vc.events.trigger("backend.shortcodeViewChangeParams:"+t)}),(_.isArray(n.params)||_.isObject(n.params))&&_.each(n.params,function(e){var t,n,c=e.param_name,o=r[c],i=this.$el.find("> .wpb_element_wrapper, > .vc_element-wrapper"),s=o,c=i.children(".admin_label_"+c);_.isObject(vc.atts[e.type])&&_.isFunction(vc.atts[e.type].render)&&(o=vc.atts[e.type].render.call(this,e,o)),i.children("."+e.param_name).is("input,textarea,select")?i.children("[name="+e.param_name+"]").val(o):i.children("."+e.param_name).is("iframe")?i.children("[name="+e.param_name+"]").attr("src",o):i.children("."+e.param_name).is("img")?(t=i.children("[name="+e.param_name+"]"),o&&o.match(/^\d+$/)?a.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_single_image_src",content:o,size:"thumbnail",_vcnonce:window.vcAdminNonce},dataType:"html",context:this}).done(function(e){t.attr("src",e)}):o&&t.attr("src",o)):i.children("[name="+e.param_name+"]").html(o?vc_wpautop(o):""),c.length&&(""===o||_.isUndefined(o)?c.hide().addClass("hidden-label"):(_.isObject(e.value)&&!_.isArray(e.value)&&"checkbox"===e.type?(n=_.invert(e.value),s=_.map(o.split(/[\s]*\,[\s]*/),function(e){return _.isString(n[e])?n[e]:e}).join(", ")):_.isObject(e.value)&&!_.isArray(e.value)&&(n=_.invert(e.value),s=_.isString(n[o])?n[o]:o),c.html("<label>"+c.find("label").text()+"</label>: "+_.escape(s)),c.show().removeClass("hidden-label")))},this),n=vc.app.views[e.get("parent_id")],!1!==e.get("parent_id")&&_.isObject(n)&&n.checkIsEmpty()},changeShortcodeParent:function(e){var t;if(!1===this.model.get("parent_id"))return e;e=a("[data-model-id="+this.model.get("parent_id")+"]"),t=vc.app.views[this.model.get("parent_id")],this.$el.appendTo(e.find("> .wpb_element_wrapper > .wpb_column_container, > .vc_element-wrapper > .wpb_column_container")),t.checkIsEmpty()},deleteShortcode:function(e){_.isObject(e)&&e.preventDefault(),this.model.destroy()},addElement:function(e){_.isObject(e)&&e.preventDefault(),vc.add_element_block_view.render(this.model,!_.isObject(e)||!a(e.currentTarget).closest(".bottom-controls").hasClass("bottom-controls"))},editElement:function(e){_.isObject(e)&&e.preventDefault(),vc.active_panel&&vc.active_panel.model&&this.model&&(!vc.active_panel.model||!this.model||vc.active_panel.model.get("id")===this.model.get("id"))||(vc.closeActivePanel(),vc.edit_element_block_view.render(this.model))},clone:function(e){return _.isObject(e)&&e.preventDefault(),vc.clone_index/=10,this.cloneModel(this.model,this.model.get("parent_id"))},copy:function(e){return _.isObject(e)&&(e.preventDefault(),e.currentTarget.focus()),vc.copyShortcode(this.model)},paste:function(e){return _.isObject(e)&&e.preventDefault(),vc.clone_index/=10,vc.pasteShortcode(this.model)},cloneModel:function(e,t,n){var n=_.isBoolean(n)&&!0===n?e.get("order"):parseFloat(e.get("order"))+vc.clone_index,c=_.extend({},e.get("params")),o=e.get("shortcode"),i=vc.shortcodes.create({shortcode:o,id:window.vc_guid(),parent_id:t,order:n,cloned:!0,cloned_from:e.toJSON(),params:c});return _.each(vc.shortcodes.where({parent_id:e.id}),function(e){this.cloneModel(e,i.get("id"),!0)},this),i},remove:function(){this.$content&&this.$content.data("uiSortable")&&this.$content.sortable("destroy"),this.$content&&this.$content.data("uiDroppable")&&this.$content.droppable("destroy"),delete vc.app.views[this.model.id],window.vc.shortcode_view.__super__.remove.call(this)}}),vc.shortcodes.on("sync",function(e){_.isObject(e)&&!_.isEmpty(e.models)&&_.each(e.models,function(e){vc.events.triggerShortcodeEvents("sync",e)})}),vc.shortcodes.on("add",function(e){_.isObject(e)&&vc.events.triggerShortcodeEvents("add",e)})})(window.jQuery); (n=>{vc.showMessage=function(e,s,o,c){vc.message_timeout&&(n(".vc_message").remove(),window.clearTimeout(vc.message_timeout)),s=s||"success",o=o||1e4;var i=window.vc_mode&&"admin_page"===window.vc_mode?".metabox-composer-content":"body",c=c||i,t=n('<div class="vc_message '+s+'" style="z-index: 999;">'+e+"</div>").prependTo(n(c));t.fadeIn(500),vc.message_timeout=window.setTimeout(function(){t.slideUp(500,function(){n(this).remove()}),vc.message_timeout=!1},o)},window.vc_user_access&&!window.vc_user_access().partAccess("unfiltered_html")&&vc.showMessage(window.i18nLocale.unfiltered_html_access,"type-error",15e3)})(window.jQuery); (r=>{vc.saved_custom_css=!1,vc.createPreLoader=function(){r("#vc_preloader").show()},vc.removePreLoader=function(){r("#vc_preloader").hide()},vc.createOverlaySpinner=function(){vc.$overlaySpinner=r("#vc_overlay_spinner").show()},vc.removeOverlaySpinner=function(){vc.$overlaySpinner&&vc.$overlaySpinner.hide()},vc.visualComposerView=Backbone.View.extend({el:r("#wpb_wpbakery"),views:{},isEditorInFocus:!1,isKeydownEventAssigned:!1,disableFixedNav:!1,events:{"click #wpb-add-new-row":"createRow","click #vc_post-settings-button":"editSettings",'click #vc_add-new-element, [data-vc-element="add-element-action"]':"addElement","click #vc_fullscreen-button":"enterFullscreen","click #vc_windowed-button":"leaveFullscreen","click #vc_seo-button":"openSeo",'click [data-vc-element="add-text-block-action"]':"addTextBlock","click .wpb_switch-to-composer":"switchComposer","click #vc_templates-editor-button":"openTemplatesWindow","click #vc_templates-more-layouts":"openTemplatesWindow","click .vc_template[data-template_id] > .wpb_wrapper":"loadDefaultTemplate","click #wpb-save-post":"save","click .vc_control-preview":"preview","dragover .metabox-composer-content":"handleDragOver","dragleave .metabox-composer-content":"handleDragLeave","drop .metabox-composer-content":"handleDrop"},initializeAccessPolicy:function(){this.accessPolicy={be_editor:vc_user_access().editor("backend_editor"),fe_editor:vc_frontend_enabled&&vc_user_access().editor("frontend_editor"),classic_editor:!vc_user_access().check("backend_editor","disabled_ce_editor",void 0,!0)}},accessPolicyActions:function(){var e,t="",s="";this.accessPolicy.fe_editor&&(t='<a class="wpb_switch-to-front-composer" href="'+r("#wpb-edit-inline").attr("href")+'">'+window.i18nLocale.main_button_title_frontend_editor+"</a>"),this.accessPolicy.classic_editor?this.accessPolicy.be_editor&&(s='<a class="wpb_switch-to-composer" href="#">'+window.i18nLocale.main_button_title_backend_editor+"</a>"):(r("#postdivrich").addClass("vc-disable-editor"),this.accessPolicy.be_editor&&(e=this,_.defer(function(){e.show(),e.status="shown"}))),(t||s||gutenberg)&&(this.$buttonsContainer=r('<div class="composer-switch"><div class="composer-inner-switch"><span class="logo-icon"></span>'+s+t+"</div></div>").insertAfter("div#titlediv"),this.accessPolicy.classic_editor)&&(this.$switchButton=this.$buttonsContainer.find(".wpb_switch-to-composer"),this.$switchButton.on("click",this.switchComposer))},initialize:function(){var s=this;_.bindAll(this,"switchComposer","dropButton","processScroll","updateRowsSorting","updateElementsSorting"),this.accessPolicy=vc.accessPolicy,this.buildRelevance(),vc.events.on("shortcodes:add",vcAddShortcodeDefaultParams,this),vc.events.on("shortcodes:add",vc.atts.addShortcodeIdParam,this),vc.events.on("shortcodes:sync",vc.atts.addShortcodeIdParam,this),vc.events.on("shortcodes:add",this.addShortcode,this),vc.events.on("shortcodes:destroy",this.checkEmpty,this),vc.shortcodes.on("change:params",this.changeParamsEvents,this),vc.shortcodes.on("reset",this.addAll,this),r(document).on("wp-collapse-menu",function(e,t){"open"===t.state&&s.leaveFullscreen()}),this.render()},changeParamsEvents:function(e){vc.events.triggerShortcodeEvents("update",e)},render:function(){return this.$buttonsContainer=r(".composer-switch"),this.$switchButton=this.$buttonsContainer.find(".wpb_switch-to-composer"),this.$vcStatus=r("#wpb_vc_js_status"),this.$metablock_content=r(".metabox-composer-content"),this.$content=r("#wpbakery_content"),this.$post=r("#postdivrich"),this.$loading_block=r("#vc_logo"),vc.add_element_block_view=new vc.AddElementUIPanelBackendEditor({el:"#vc_ui-panel-add-element"}),vc.edit_element_block_view=new vc.EditElementUIPanel({el:"#vc_ui-panel-edit-element"}),vc.templates_panel_view=new vc.TemplateWindowUIPanelBackendEditor({el:"#vc_ui-panel-templates"}),vc.post_settings_view=new vc.PostSettingsUIPanelBackendEditor({el:"#vc_ui-panel-post-settings"}),vc.preset_panel_view=new vc.PresetSettingsUIPanelFrontendEditor({el:"#vc_ui-panel-preset"}),vc.post_seo_view=vc.PostSettingsSeoUIPanel&&new vc.PostSettingsSeoUIPanel({el:"#vc_ui-panel-post-seo"}),this.setSortable(),vc.is_mobile=0<r("body.mobile").length,vc.saved_custom_css=r("#wpb_custom_post_css_field").val(),vc.updateSettingsBadge(),_.defer(function(){vc.events.trigger("app.render")}),r("body").on("click",r.proxy(this.handleBodyClick,this)),this},addAll:function(){this.views={},this.$content.removeClass("loading").empty(),this.addChild(!1),this.checkEmpty(),this.$loading_block.removeClass("vc_ui-wp-spinner"),this.$metablock_content.removeClass("vc_loading-shortcodes"),_.defer(function(){vc.events.trigger("app.addAll")})},addChild:function(e){_.each(vc.shortcodes.where({parent_id:e}),function(e){this.appendShortcode(e),this.addChild(e.get("id"))},this),this.setSortable()},getView:function(e){var t=new(_.isObject(vc.map[e.get("shortcode")])&&_.isString(vc.map[e.get("shortcode")].js_view)&&vc.map[e.get("shortcode")].js_view.length&&!_.isUndefined(window[window.vc.map[e.get("shortcode")].js_view])?window[window.vc.map[e.get("shortcode")].js_view]:vc.shortcode_view)({model:e});return e.set({view:t}),t},setDraggable:function(){r("#wpb-add-new-element, #wpb-add-new-row").draggable({helper:function(){return r('<div id="drag_placeholder"></div>').appendTo("body")},zIndex:99999,cursor:"move",revert:"invalid",start:function(e,t){r("#drag_placeholder").addClass("column_placeholder").html(window.i18nLocale.drag_drop_me_in_column)}})},setDropable:function(){this.$content.droppable({greedy:!0,accept:".dropable_el,.dropable_row",hoverClass:"wpb_ui-state-active",drop:this.dropButton})},dropButton:function(e,t){t.draggable.is("#wpb-add-new-element")?this.addElement():t.draggable.is("#wpb-add-new-row")&&this.createRow()},appendShortcode:function(e){var t=this.getView(e),s=_.extend(vc.getDefaults(e.get("shortcode")),e.get("params"));e.set("params",s,{silent:!0}),s=!1!==e.get("parent_id")&&this.views[e.get("parent_id")],this.views[e.id]=t,e.get("parent_id")&&this.views[e.get("parent_id")].unsetEmpty(),s?s.addShortcode(t,"append"):this.$content.append(t.render().el),t.ready(),t.changeShortcodeParams(e),t.checkIsEmpty(),this.setNotEmpty()},addShortcode:function(e){var t,s,n=_.extend(vc.getDefaults(e.get("shortcode")),e.get("params"));e.set("params",n,{silent:!0}),t=this.getView(e),n=!1!==e.get("parent_id")&&this.views[e.get("parent_id")],t.use_default_content=!0!==e.get("cloned"),this.views[e.id]=t,n?(n.addShortcode(t),n.checkIsEmpty(),s=this,_.defer(function(){t.changeShortcodeParams&&t.changeShortcodeParams(e),t.ready(),t.checkIsEmpty(),s.setSortable(),s.setNotEmpty()})):(this.addRow(t),_.defer(function(){t.changeShortcodeParams&&t.changeShortcodeParams(e),t.ready(),t.checkIsEmpty()}))},addRow:function(e){var t=_.last(vc.shortcodes.filter(function(e){return!1===e.get("parent_id")&&parseFloat(e.get("order"))<parseFloat(this.get("order"))},e.model));t?e.render().$el.insertAfter("[data-model-id="+t.id+"]"):this.$content.append(e.render().el)},addTextBlock:function(e){var t,s;return e&&e.preventDefault&&e.preventDefault(),e=vc.shortcodes.create({shortcode:"vc_row",params:{}}),t=vc.shortcodes.create({shortcode:"vc_column",params:{width:"1/1"},parent_id:e.id,root_id:e.id}),s=vc.getDefaults("vc_column_text"),vc.shortcodes.create({shortcode:"vc_column_text",parent_id:t.id,root_id:e.id,params:s})},createRow:function(){var e=vc.shortcodes.create({shortcode:"vc_row",params:{}});return vc.shortcodes.create({shortcode:"vc_column",params:{width:"1/1"},parent_id:e.id,root_id:e.id}),e},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),vc.add_element_block_view.render(!1)},openTemplatesWindow:function(e){e&&e.preventDefault&&e.preventDefault(),r(e.currentTarget).is("#vc_templates-more-layouts")&&vc.templates_panel_view.once("show",function(){r('[data-vc-ui-element-target="[data-tab=default_templates]"]').click()}),vc.templates_panel_view.render().show()},loadDefaultTemplate:function(e){e&&e.preventDefault&&e.preventDefault(),vc.templates_panel_view.loadTemplate(e)},editSettings:function(e){e&&e.preventDefault&&e.preventDefault(),vc.post_settings_view.render().show()},enterFullscreen:function(){var e=r("body");e.hasClass("folded")?(e.data("vcKeepMenuFolded",!0),e.addClass("vc_fullscreen")):e.addClass("vc_fullscreen folded"),r("#vc_windowed-button").show(),r("#vc_fullscreen-button").hide()},leaveFullscreen:function(){var e=r("body");e.hasClass("vc_fullscreen")&&(e.data("vcKeepMenuFolded")?(e.removeClass("vc_fullscreen"),e.removeData("vcKeepMenuFolded")):e.removeClass("vc_fullscreen folded"),r("#vc_windowed-button").hide(),r("#vc_fullscreen-button").show())},sortingStarted:function(e,t){r("#wpbakery_content").addClass("vc_sorting-started")},sortingStopped:function(e,t){var s=t.item.data("element_type"),n=t.placeholder.closest("[data-element_type]").data("element_type")||"";vc.check_relevance(n,s)&&n!=s||(t.placeholder.addClass("vc_hidden-placeholder"),r(e.target).sortable("cancel")),r("#wpbakery_content").removeClass("vc_sorting-started")},updateElementsSorting:function(e,a){_.defer(function(e){var t,s=a.item.parent().closest("[data-model-id]").data("model"),n=a.item.data("model"),o=e.views[s.id].$content.find("> [data-model-id]"),c=0;_.isNull(a.sender)||(t=n.get("parent_id"),vc.storage.lock(),n.save({parent_id:s.id}),t&&e.views[t].checkIsEmpty(),e.views[s.id].checkIsEmpty()),o.each(function(){var e=r(this).data("model");vc.storage.lock(),e.save({order:c++})}),n.save()},this)},updateRowsSorting:function(a,i){_.defer(function(e){var t=i.item.parent(),s=t.closest("[data-model-id]"),s=!!s.length&&s.data("model").get("id"),n=i.item.data("model"),o=i.item.data("element_type"),c=i.item.parent().closest("[data-element_type]").data("element_type")||"";vc.check_relevance(c,o)&&c!=o?(c=n.get("parent_id"),t.find(e.rowSortableSelector).each(function(){var e=r(this).index();vc.storage.lock(),r(this).data("model").save({order:e})}),n.save({parent_id:s}),c&&e.views[c].checkIsEmpty(),s&&e.views[s].checkIsEmpty()):r(a.target).sortable("cancel")},this)},renderPlaceholder:function(e,t){var t=r(t).data("element_type"),s=_.isObject(vc.map[t])&&(_.isBoolean(vc.map[t].is_container)&&!0===vc.map[t].is_container||!_.isEmpty(vc.map[t].as_parent));return r('<div class="vc_helper vc_helper-'+t+'"><i class="vc_general vc_element-icon'+(vc.map[t].icon?" "+vc.map[t].icon:"")+'"'+(s?' data-is-container="true"':"")+"></i> "+vc.map[t].name+"</div>").prependTo("body")},rowSortableSelector:"> .wpb_vc_row, > .vc_main-sortable-element",setSortable:function(){if(vc_user_access().partAccess("dragndrop"))return r(".wpb_main_sortable").sortable({forcePlaceholderSize:!0,placeholder:"widgets-placeholder",cursor:"move",connectWith:".vc_section_container",items:this.rowSortableSelector,handle:".vc_column-move",cancel:".vc-non-draggable-row",distance:.5,start:this.sortingStarted,stop:this.sortingStopped,update:this.updateRowsSorting,tolerance:"intersect",over:function(e,t){var s=t.item.data("element_type"),n=t.placeholder.closest("[data-element_type]").data("element_type")||"";if(!vc.check_relevance(n,s)||n==s)return t.placeholder.addClass("vc_hidden-placeholder"),!1;t.placeholder.css({maxWidth:t.placeholder.parent().width()})},out:function(e,t){t.placeholder.removeClass("vc_hidden-placeholder"),t.placeholder.css({maxWidth:t.placeholder.parent().width()})}}),r(".wpb_column_container").sortable({forcePlaceholderSize:!0,forceHelperSize:!1,connectWith:".wpb_column_container",placeholder:"vc_placeholder",items:"> div.wpb_sortable,> div.vc-non-draggable",helper:this.renderPlaceholder,distance:3,cancel:".vc-non-draggable",scroll:!0,scrollSensitivity:70,cursor:"move",cursorAt:{top:20,left:16},tolerance:"intersect",start:function(){r("#wpbakery_content").addClass("vc_sorting-started"),r(".vc_not_inner_content").addClass("dragging_in")},stop:function(e,t){r("#wpbakery_content").removeClass("vc_sorting-started"),r(".dragging_in").removeClass("dragging_in");var s=t.item.data("element_type"),n=t.item.parent().closest("[data-element_type]").data("element_type")||"",o=!!_.isUndefined(vc.map[n].allowed_container_element)||vc.map[n].allowed_container_element;vc.check_relevance(n,s)&&n!=s||r(this).sortable("cancel"),_.isObject(vc.map[s])&&(_.isBoolean(vc.map[s].is_container)&&!0===vc.map[s].is_container||!_.isEmpty(vc.map[s].as_parent))&&!0!==o&&o!==t.item.data("element_type").replace(/_inner$/,"")&&r(this).sortable("cancel"),r(".vc_sorting-empty-container").removeClass("vc_sorting-empty-container")},update:this.updateElementsSorting,over:function(e,t){var s=t.item.data("element_type"),n=t.placeholder.closest("[data-element_type]").data("element_type"),o=!!_.isUndefined(vc.map[n].allowed_container_element)||vc.map[n].allowed_container_element;vc.check_relevance(n,s)&&n!=s||t.placeholder.addClass("vc_hidden-placeholder"),_.isObject(vc.map[s])&&(_.isBoolean(vc.map[s].is_container)&&!0===vc.map[s].is_container||!_.isEmpty(vc.map[s].as_parent))&&!0!==o&&o!==t.item.data("element_type").replace(/_inner$/,"")&&t.placeholder.addClass("vc_hidden-placeholder"),_.isNull(t.sender)||!t.sender.length||t.sender.find("> [data-element_type]:not(.ui-sortable-helper):visible").length||t.sender.addClass("vc_sorting-empty-container"),t.placeholder.css({maxWidth:t.placeholder.parent().width()})},out:function(e,t){t.placeholder.removeClass("vc_hidden-placeholder"),t.placeholder.css({maxWidth:t.placeholder.parent().width()})}}).disableSelection(),this},setNotEmpty:function(){r("#vc_no-content-helper").addClass("vc_not-empty"),r("#vc_navbar").addClass("vc_not-empty")},setIsEmpty:function(){vc.views={},r("#vc_no-content-helper").removeClass("vc_not-empty"),r("#vc_navbar").removeClass("vc_not-empty")},checkEmpty:function(e){if(_.isObject(e)&&!1!==e.get("parent_id")&&e.get("parent_id")!=e.id){e=this.views[e.get("parent_id")];if(!e)return;e.checkIsEmpty()}0===vc.shortcodes.length?this.setIsEmpty():this.setNotEmpty()},switchComposer:function(e){e&&e.preventDefault&&e.preventDefault(),"shown"===this.status?(this.accessPolicy.can("classic_editor")&&(_.isUndefined(this.$switchButton)||this.$switchButton.text(window.i18nLocale.main_button_title_backend_editor),_.isUndefined(this.$buttonsContainer)||this.$buttonsContainer.removeClass("vc_backend-status")),this.close(),this.status="closed"):(this.accessPolicy.can("classic_editor")&&(_.isUndefined(this.$switchButton)||this.$switchButton.text(window.i18nLocale.main_button_title_revert),_.isUndefined(this.$buttonsContainer)||this.$buttonsContainer.addClass("vc_backend-status")),this.show(),this.status="shown")},show:function(){this.$el.show(),this.$post.addClass("vc-disable-editor"),this.$vcStatus.val("true"),this.navOnScroll(),this.hideOtherEditors(),vc.storage.isContentChanged()&&(vc.undoRedoApi&&vc.undoRedoApi.add(vc.storage.getContent()),vc.app.setLoading(),vc.app.views={},_.defer(function(){vc.shortcodes.fetch({reset:!0}),vc.events.trigger("backendEditor.show")}))},hideOtherEditors:function(){r("#elementor-editor").insertAfter("#wpb_wpbakery"),r("#elementor-switch-mode").insertAfter("#wpb_wpbakery")},setLoading:function(){this.setNotEmpty(),this.$loading_block.addClass("vc_ui-wp-spinner"),this.$metablock_content.addClass("vc_loading-shortcodes")},close:function(){this.$vcStatus.val("false"),this.$el.hide(),_.isObject(window.editorExpand)&&(_.delay(function(){window.scrollBy(0,-1)},17),_.delay(function(){window.scrollBy(0,1)},17)),this.$post.removeClass("vc-disable-editor"),_.defer(function(){vc.events.trigger("backendEditor.close")})},checkVcStatus:function(){var e=new URL(window.location.href).searchParams.has("wpb-backend-editor");!vc.accessPolicy.can("be_editor")||vc.accessPolicy.can("classic_editor")&&"true"!==this.$vcStatus.val()&&!e||this.switchComposer()},setNavTop:function(){this.navTop=this.$nav.length&&this.$nav.offset().top-28},save:function(){r("#wpb-save-post p").text(window.i18nLocale.loading),r("#publish").click()},preview:function(){r("#post-preview").click()},navOnScroll:function(){this.$nav=r("#vc_navbar"),this.setNavTop(),this.processScroll(),r(window).off("scroll.composer resize.composer").on("scroll.composer resize.composer",this.processScroll)},processScroll:function(e){var t;!0===this.disableFixedNav?this.$nav.removeClass("vc_subnav-fixed"):((!this.navTop||this.navTop<0)&&this.setNavTop(),this.scrollTop=r(window).scrollTop()+80,0<this.navTop&&this.scrollTop>=this.navTop&&!this.isFixed?(this.isFixed=1,this.$nav.addClass("vc_subnav-fixed")):this.scrollTop<=this.navTop&&this.isFixed&&(this.isFixed=0,this.$nav.removeClass("vc_subnav-fixed")),0!==this.$nav.length&&(window.innerWidth<=600?46<window.scrollY?"0px"!==this.$nav.css("top")&&this.$nav.css("top","0"):(t=46-window.scrollY+"px",this.$nav.css("top")!==t&&this.$nav.css("top",t)):""!==this.$nav.css("top")&&this.$nav.css("top","")))},buildRelevance:function(){vc.shortcode_relevance={},_.map(vc.map,function(e){_.isObject(e.as_parent)&&_.isString(e.as_parent.only)&&(vc.shortcode_relevance["parent_only_"+e.base]=e.as_parent.only.replace(/\s/g,"").split(",")),_.isObject(e.as_parent)&&_.isString(e.as_parent.except)&&(vc.shortcode_relevance["parent_except_"+e.base]=e.as_parent.except.replace(/\s/g,"").split(",")),_.isObject(e.as_child)&&_.isString(e.as_child.only)&&(vc.shortcode_relevance["child_only_"+e.base]=e.as_child.only.replace(/\s/g,"").split(",")),_.isObject(e.as_child)&&_.isString(e.as_child.except)&&(vc.shortcode_relevance["child_except_"+e.base]=e.as_child.except.replace(/\s/g,"").split(","))}),vc.check_relevance=function(e,t){return!(_.isArray(vc.shortcode_relevance["parent_only_"+e])&&!_.contains(vc.shortcode_relevance["parent_only_"+e],t)||_.isArray(vc.shortcode_relevance["parent_except_"+e])&&_.contains(vc.shortcode_relevance["parent_except_"+e],t)||_.isArray(vc.shortcode_relevance["child_only_"+t])&&!_.contains(vc.shortcode_relevance["child_only_"+t],e)||_.isArray(vc.shortcode_relevance["child_except_"+t])&&_.contains(vc.shortcode_relevance["child_except"+t],e))}},handleEditorPaste:function(e){e=e.originalEvent.clipboardData.getData("text/plain")||"";vc.pasteShortcode(!1,!1,e)},handleBodyClick:function(e){this.isEditorInFocus=!!r(e.target).closest("#wpb_wpbakery, .vc_ui-panel-window").length,this.isEditorInFocus&&!this.isKeydownEventAssigned?(r("body").on("paste",this.handleEditorPaste),this.isKeydownEventAssigned=!0):!this.isEditorInFocus&&this.isKeydownEventAssigned&&(r("body").off("paste",this.handleEditorPaste),this.isKeydownEventAssigned=!1)},openSeo:function(e){e&&e.preventDefault&&e.preventDefault(),vc.post_seo_view.render()},handleDragOver:function(e){vc.imageDrop&&vc.imageDrop.handleDragOver(e)},handleDragLeave:function(e){vc.imageDrop&&vc.imageDrop.handleDragLeave(e)},handleDrop:function(e){vc.imageDrop&&vc.imageDrop.handleDrop(e)}}),r(function(){var e=r("#wpb_wpbakery");e.is("div")&&(vc.app=new vc.visualComposerView({el:e}),vc.accessPolicy.can("be_editor")&&!vc_user_access().isBlockEditorIsEnabled()&&vc.app.checkVcStatus(),r("#post").on("submit",function(){vc.storage.isChanged&&(vc.storage.isChanged=!1,window.jQuery(window).off("beforeunload.vcSave"))}),vc.events.on("vc:backend_editor:show",function(){vc.app.show(),vc.app.status="shown"}),vc.events.on("vc:backend_editor:switch",function(){vc.app.switchComposer()}))})})(window.jQuery); (a=>{var s=vc.shortcodes,l=new RegExp("background:\\s*(.+?)\\s+url\\(\\s*['\"]?(.*?)['\"]?\\s*\\)"),r=new RegExp("background\\-image:\\s*url\\(([^)]+)\\)"),d=new RegExp("background-color:\\s*([^;!]+)");window.VcRowView=vc.shortcode_view.extend({change_columns_layout:!1,events:{'click > .vc_controls [data-vc-control="delete"]':"deleteShortcode","click > .vc_controls .set_columns":"setColumns",'click > .vc_controls [data-vc-control="add"]':"addElement",'click > .vc_controls [data-vc-control="edit"]':"editElement",'click > .vc_controls [data-vc-control="clone"]':"clone",'click > .vc_controls [data-vc-control="copy"]':"copy",'click > .vc_controls [data-vc-control="paste"]':"paste",'click > .vc_controls [data-vc-control="move"]':"moveElement",'click > .vc_controls [data-vc-control="toggle"]':"toggleElement","click > .wpb_element_wrapper .vc_controls":"openClosedRow"},convertRowColumns:function(e){var t=e.toString().split(/_/),i=s.where({parent_id:this.model.id}),o=[],c=[],a="";return _.each(t,function(e,t){var n,e=_.map(e.toString().split(""),function(e,t){return parseInt(e,10)});a=3<e.length?e[0]+""+e[1]+"/"+e[2]+e[3]:2<e.length?e[0]+"/"+e[1]+e[2]:e[0]+"/"+e[1],c.push(a),e=_.extend(_.isUndefined(i[t])?{}:i[t].get("params"),{width:a}),vc.storage.lock(),n=s.create({shortcode:this.getChildTag(),params:e,parent_id:this.model.id}),_.isObject(i[t])&&_.each(s.where({parent_id:i[t].id}),function(e){vc.storage.lock(),e.save({parent_id:n.id}),vc.storage.lock(),e.trigger("change_parent_id")}),o.push(n)},this),t.length<i.length&&_.each(i.slice(t.length),function(e){_.each(s.where({parent_id:e.id}),function(e){vc.storage.lock(),e.save({parent_id:_.last(o).id}),vc.storage.lock(),e.trigger("change_parent_id")})}),_.each(i,function(e){vc.storage.lock(),e.destroy()},this),this.model.save(),this.setActiveLayoutButton(""+e),c},changeShortcodeParams:function(e){window.VcRowView.__super__.changeShortcodeParams.call(this,e),this.buildDesignHelpers(),this.setRowClasses()},setRowClasses:function(){var e=this.model.getParam("disable_element"),t="vc_hidden-xs vc_hidden-sm vc_hidden-md vc_hidden-lg";this.disable_element_class&&this.$el.removeClass(this.disable_element_class),_.isEmpty(e)||(this.$el.addClass(t),this.disable_element_class=t)},designHelpersSelector:"> .vc_controls .column_toggle",controlSection:".vc_controls.vc_controls-row.controls_row.vc_clearfix",buildDesignHelpers:function(){var e,t,n,i=this.model.getParam("css"),o=this.$el.find(this.designHelpersSelector),c=this.$el.find(this.controlSection);this.$el.find("> .vc_controls .vc_row_color").remove(),this.$el.find("> .vc_controls .vc_row_image").remove(),this.$el.find("> .vc_row_title").remove(),(n=i.match(r))&&!_.isUndefined(n[1])&&(e=n[1]),(n=i.match(d))&&!_.isUndefined(n[1])&&(t=n[1]),(n=i.match(l))&&!_.isUndefined(n[1])&&(t=n[1],e=n[2]),i=this.model.getParam("el_id"),this.$el.find("> .vc_controls .vc_row-hash-id").remove(),_.isEmpty(i)||a('<span class="vc_row-hash-id"></span>').text("#"+i).insertAfter(o),e&&a('<span class="vc_row_image" style="background-image: url('+e+');" title="'+window.i18nLocale.row_background_image+'"></span>').insertAfter(o),t&&a('<span class="vc_row_color" style="background-color: '+t+'" title="'+window.i18nLocale.row_background_color+'"></span>').insertAfter(o),(n=this.model.getParam("row_title"))&&a('<div class="vc_row_title" >'+n+"</div>").insertBefore(c)},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),s.create({shortcode:this.getChildTag(),params:{},parent_id:this.model.id}),this.setActiveLayoutButton(),this.$el.removeClass("vc_collapsed-row")},getChildTag:function(){return"vc_row_inner"===this.model.get("shortcode")?"vc_column_inner":"vc_column"},sortingSelector:"> [data-element_type=vc_column], > [data-element_type=vc_column_inner]",sortingSelectorCancel:".vc-non-draggable-column",setSorting:function(){var e;vc_user_access().partAccess("dragndrop")&&(1<(e=this).$content.find(this.sortingSelector).length?this.$content.removeClass("wpb-not-sortable").sortable({forcePlaceholderSize:!0,placeholder:"widgets-placeholder-column",tolerance:"pointer",cursor:"move",items:this.sortingSelector,cancel:this.sortingSelectorCancel,distance:.5,start:function(e,t){a("#wpbakery_content").addClass("vc_sorting-started"),t.placeholder.width(t.item.width())},stop:function(e,t){a("#wpbakery_content").removeClass("vc_sorting-started")},update:function(){var n=a(e.sortingSelector,e.$content);n.each(function(){var e=a(this).data("model"),t=a(this).index();e.set("order",t),n.length-1>t&&vc.storage.lock(),e.save()})},over:function(e,t){t.placeholder.css({maxWidth:t.placeholder.parent().width()}),t.placeholder.removeClass("vc_hidden-placeholder")},beforeStop:function(e,t){}}):(this.$content.hasClass("ui-sortable")&&this.$content.sortable("destroy"),this.$content.addClass("wpb-not-sortable")))},validateCellsList:function(e){var n,i=[],e=e.replace(/\s/g,"").split("+");return 12===_.reduce(_.map(e,function(e){var t;return e.match(/^(vc_)?span\d?$/)?!1===(t=vc_convert_column_span_size(e))?1e3:(n=t.split(/\//),i.push(n[0]+""+n[1]),12*parseInt(n[0],10)/parseInt(n[1],10)):e.match(/^[1-9]|1[0-2]\/[1-9]|1[0-2]$/)?(n=e.split(/\//),i.push(n[0]+""+n[1]),12*parseInt(n[0],10)/parseInt(n[1],10)):1e4}),function(e,t){return t+=e},0)&&i.join("_")},setActiveLayoutButton:function(e){e=e||_.map(vc.shortcodes.where({parent_id:this.model.get("id")}),function(e){e=e.getParam("width");return e?e.replace(/\//,""):"11"}).join("_"),this.$el.find("> .vc_controls .vc_active").removeClass("vc_active");e=this.$el.find('> .vc_ [data-cells-mask="'+vc_get_column_mask(e)+'"] [data-cells="'+e+'"], > .vc_controls [data-cells-mask="'+vc_get_column_mask(e)+'"][data-cells="'+e+'"]');(e.length?e:this.$el.find("> .vc_controls [data-cells-mask=custom]")).addClass("vc_active")},layoutEditor:function(){return _.isUndefined(vc.row_layout_editor)&&(vc.row_layout_editor=new vc.RowLayoutUIPanelBackendEditor({el:a("#vc_ui-panel-row-layout")})),vc.row_layout_editor},setColumns:function(e){_.isObject(e)&&e.preventDefault();var t,e=a(e.currentTarget);"custom"===e.data("cells")?this.layoutEditor().render(this.model).show():(vc.is_mobile&&!(t=e.parent()).hasClass("vc_visible")&&(t.addClass("vc_visible"),a(document).off("click.vcRowColumnsControl").on("click.vcRowColumnsControl",function(e){t.removeClass("vc_visible")})),e.is(".vc_active")||(this.change_columns_layout=!0,_.defer(function(e,t){e.convertRowColumns(t)},this,e.data("cells")))),this.$el.removeClass("vc_collapsed-row")},sizeRows:function(){var t=45;a("> .wpb_vc_column, > .wpb_vc_column_inner",this.$content).each(function(){var e=a(this).find("> .wpb_element_wrapper > .wpb_column_container").css({minHeight:0}).height();t<e&&(t=e)}).each(function(){a(this).find("> .wpb_element_wrapper > .wpb_column_container").css({minHeight:t})})},ready:function(e){return window.VcRowView.__super__.ready.call(this,e),this},checkIsEmpty:function(){window.VcRowView.__super__.checkIsEmpty.call(this),this.setSorting()},changedContent:function(e){if(this.change_columns_layout)return this;this.setActiveLayoutButton()},moveElement:function(e){e&&e.preventDefault&&e.preventDefault()},toggleElement:function(e){e&&e.preventDefault&&e.preventDefault(),this.$el.toggleClass("vc_collapsed-row")},openClosedRow:function(e){this.$el.removeClass("vc_collapsed-row")},remove:function(){this.$content&&(this.$content.data("uiSortable")&&this.$content.sortable("destroy"),this.$content.data("uiDroppable"))&&this.$content.droppable("destroy"),delete vc.app.views[this.model.id],window.VcRowView.__super__.remove.call(this)}}),window.VcColumnView=vc.shortcode_view.extend({events:{'click > .vc_controls [data-vc-control="delete"]':"deleteShortcode",'click > .vc_controls [data-vc-control="add"]':"addElement",'click > .vc_controls [data-vc-control="edit"]':"editElement",'click > .vc_controls [data-vc-control="clone"]':"clone",'click > .vc_controls [data-vc-control="copy"]':"copy",'click > .vc_controls [data-vc-control="paste"]':"paste","click > .wpb_element_wrapper > .vc_empty-container":"addToEmpty"},current_column_width:!1,initialize:function(e){window.VcColumnView.__super__.initialize.call(this,e),_.bindAll(this,"setDropable","dropButton")},render:function(){return window.VcColumnView.__super__.render.call(this),this.current_column_width=this.model.get("params").width||"1/1",this.$el.attr("data-width",this.current_column_width),this.setEmpty(),this},changeShortcodeParams:function(e){window.VcColumnView.__super__.changeShortcodeParams.call(this,e),this.setColumnClasses(),this.buildDesignHelpers()},designHelpersSelector:"> .vc_controls .column_add",buildDesignHelpers:function(){var e,t,n,i=this.model.getParam("css"),o=this.$el.find(this.designHelpersSelector).get(0);this.$el.find("> .vc_controls .vc_column_color").remove(),this.$el.find("> .vc_controls .vc_column_image").remove(),(e=i.match(r))&&!_.isUndefined(e[1])&&(t=e[1]),(e=i.match(d))&&!_.isUndefined(e[1])&&(n=e[1]),(e=i.match(l))&&!_.isUndefined(e[1])&&(n=e[1],t=e[2]),t&&a('<span class="vc_column_image" style="background-image: url('+t+');" title="'+i18nLocale.column_background_image+'"></span>').insertBefore(o),n&&a('<span class="vc_column_color" style="background-color: '+n+'" title="'+i18nLocale.column_background_color+'"></span>').insertBefore(o)},setColumnClasses:function(){var e,t=this.model.getParam("offset")||"",n=this.model.getParam("width")||"1/1",i=this.convertSize(n);this.current_offset_class&&this.$el.removeClass(this.current_offset_class),this.current_column_width!==n&&(e=this.convertSize(this.current_column_width),this.$el.attr("data-width",n).removeClass(e).addClass(i),this.current_column_width=n),t.match(/vc_col\-sm\-\d+/)&&this.$el.removeClass(i),_.isEmpty(t)||this.$el.addClass(t),this.current_offset_class=t},addToEmpty:function(e){e&&e.preventDefault&&e.preventDefault(),a(e.target).hasClass("vc_empty-container")&&this.addElement(e)},setDropable:function(){return this.$content.droppable({greedy:!0,accept:"vc_column_inner"===this.model.get("shortcode")?".dropable_el":".dropable_el,.dropable_row",hoverClass:"wpb_ui-state-active",drop:this.dropButton}),this},dropButton:function(e,t){t.draggable.is("#wpb-add-new-element")?vc.add_element_block_view({model:{position_to_add:"end"}}).show(this):t.draggable.is("#wpb-add-new-row")&&this.createRow()},setEmpty:function(){this.$el.addClass("vc_empty-column"),"edit"!==vc_user_access().getState("shortcodes")&&this.$content.addClass("vc_empty-container")},unsetEmpty:function(){this.$el.removeClass("vc_empty-column"),this.$content.removeClass("vc_empty-container")},checkIsEmpty:function(){s.where({parent_id:this.model.id}).length?this.unsetEmpty():this.setEmpty(),window.VcColumnView.__super__.checkIsEmpty.call(this)},createRow:function(){var e={width:"1/1"},t=s.create({shortcode:"vc_row_inner",params:{},parent_id:this.model.id});return s.create({shortcode:"vc_column_inner",params:e,parent_id:t.id}),t},convertSize:function(e){var t="vc_col-sm-",e=e?e.split("/"):[1,1],n=_.range(1,13),i=!_.isUndefined(e[0])&&0<=_.indexOf(n,parseInt(e[0],10))&&parseInt(e[0],10),n=!_.isUndefined(e[1])&&0<=_.indexOf(n,parseInt(e[1],10))&&parseInt(e[1],10);return!1!==i&&!1!==n?t+12*i/n:t+"12"},deleteShortcode:function(e){var t,n=this.model.get("parent_id");if(e&&e.preventDefault&&e.preventDefault(),!0!==confirm(window.i18nLocale.press_ok_to_delete_section))return!1;this.model.destroy(),n&&!vc.shortcodes.where({parent_id:n}).length?(t=vc.shortcodes.get(n),_.contains(["vc_column","vc_column_inner"],t.get("shortcode"))||t.destroy()):n&&(t=vc.shortcodes.get(n))&&t.view&&t.view.setActiveLayoutButton&&t.view.setActiveLayoutButton()},remove:function(){this.$content&&this.$content.data("uiSortable")&&this.$content.sortable("destroy"),this.$content&&this.$content.data("uiDroppable")&&this.$content.droppable("destroy"),delete vc.app.views[this.model.id],window.VcColumnView.__super__.remove.call(this)}}),window.VcSectionView=VcColumnView.extend({designHelpersSelector:"> .vc_controls-row .vc_column-edit",setColumnClasses:function(){var e=this.model.getParam("disable_element"),t="vc_hidden-xs vc_hidden-sm vc_hidden-md vc_hidden-lg";this.disable_element_class&&this.$el.removeClass(this.disable_element_class),_.isEmpty(e)||(this.$el.addClass(t),this.disable_element_class=t)},buildDesignHelpers:function(){var e,t,n,i=this.model.getParam("css"),o=this.$el.find(this.designHelpersSelector);this.$el.find("> .vc_controls-row .vc_row_color").remove(),this.$el.find("> .vc_controls-row .vc_row_image").remove(),(n=i.match(r))&&!_.isUndefined(n[1])&&(e=n[1]),(n=i.match(d))&&!_.isUndefined(n[1])&&(t=n[1]),(n=i.match(l))&&!_.isUndefined(n[1])&&(t=n[1],e=n[2]),i=this.model.getParam("el_id"),this.$el.find("> .vc_controls-row .vc_row-hash-id").remove(),_.isEmpty(i)||a('<span class="vc_row-hash-id"></span>').text("#"+i).insertAfter(o),e&&a('<span class="vc_row_image" style="background-image: url('+e+');" title="'+window.i18nLocale.row_background_image+'"></span>').insertAfter(o),t&&a('<span class="vc_row_color" style="background-color: '+t+'" title="'+window.i18nLocale.row_background_color+'"></span>').insertAfter(o)},checkIsEmpty:function(){window.VcSectionView.__super__.checkIsEmpty.call(this),this.setSorting()},setSorting:function(){var c;vc_user_access().partAccess("dragndrop")&&(c=this).$content.sortable({forcePlaceholderSize:!0,placeholder:"widgets-placeholder",connectWith:".wpb_main_sortable,.wpb_vc_section .vc_section_container",cursor:"move",items:"> .wpb_vc_row",handle:".vc_column-move",cancel:".vc-non-draggable-row",distance:.5,scroll:!0,scrollSensitivity:70,tolerance:"intersect",update:function(e,i){var o,t=i.item.data("element_type"),n=i.item.parent().closest("[data-element_type]").data("element_type");vc.check_relevance(n,t)&&n!=t&&(o=a("> div.wpb_sortable,> div.vc-non-draggable",c.$content)).each(function(){var e,t=a(this).data("model"),n=a(this).index();t.set("order",n),o.length-1>n&&vc.storage.lock(),_.isNull(i.sender)||(n=i.item.parent().closest("[data-model-id]").data("model"),e=t.get("parent_id"),vc.storage.lock(),t.save({parent_id:n.id}),e&&vc.app.views[e].checkIsEmpty(),vc.app.views[n.id].checkIsEmpty()),t.save()})},stop:function(e,t){a("#wpbakery_content").removeClass("vc_sorting-started"),a(".dragging_in").removeClass("dragging_in");var n=t.item.data("element_type"),t=t.item.parent().closest("[data-element_type]").data("element_type");vc.check_relevance(t,n)&&t!=n||a(this).sortable("cancel"),a(".vc_sorting-empty-container").removeClass("vc_sorting-empty-container")},over:function(e,t){var n=t.item.data("element_type"),i=t.placeholder.closest("[data-element_type]").data("element_type")||"",o=!!_.isUndefined(vc.map[i].allowed_container_element)||vc.map[i].allowed_container_element;return!vc.check_relevance(i,n)||i==n||_.isObject(vc.map[n])&&(_.isBoolean(vc.map[n].is_container)&&!0===vc.map[n].is_container||!_.isEmpty(vc.map[n].as_parent))&&!0!==o&&o!==t.item.data("element_type").replace(/_inner$/,"")?(t.placeholder.addClass("vc_hidden-placeholder"),!1):(_.isNull(t.sender)||!t.sender.length||t.sender.find("> [data-element_type]:not(.ui-sortable-helper):visible").length||t.sender.addClass("vc_sorting-empty-container"),void t.placeholder.css({maxWidth:t.placeholder.parent().width()}))},out:function(e,t){t.placeholder.removeClass("vc_hidden-placeholder"),t.placeholder.css({maxWidth:t.placeholder.parent().width()}),_.isNull(t.sender)||!t.sender.length||t.sender.find("> [data-element_type]:not(.ui-sortable-helper):visible").length||t.sender.addClass("vc_sorting-empty-container")}})}}),window.VcAccordionView=vc.shortcode_view.extend({adding_new_tab:!1,events:{"click .add_tab":"addTab","click > .vc_controls .column_delete, > .vc_controls .vc_control-btn-delete":"deleteShortcode","click > .vc_controls .column_edit, > .vc_controls .vc_control-btn-edit":"editElement","click > .vc_controls .column_clone,> .vc_controls .vc_control-btn-clone":"clone"},render:function(){return window.VcAccordionView.__super__.render.call(this),vc_user_access().shortcodeAll("vc_accordion_tab")?vc_user_access().partAccess("dragndrop")&&this.$content.sortable({axis:"y",handle:"h3",stop:function(e,t){t.item.prev().triggerHandler("focusout"),a(this).find("> .wpb_sortable").each(function(){a(this).data("model").save({order:a(this).index()})})}}):this.$el.find(".tab_controls").hide(),this},changeShortcodeParams:function(e){window.VcAccordionView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),e=!(!_.isString(e.collapsible)||"yes"!==e.collapsible),this.$content.hasClass("ui-accordion")&&this.$content.accordion("option","collapsible",e)},changedContent:function(e){this.$content.hasClass("ui-accordion")&&this.$content.accordion("destroy");var t=!(!_.isString(this.model.get("params").collapsible)||"yes"!==this.model.get("params").collapsible);this.$content.accordion({header:"h3",navigation:!1,autoHeight:!0,heightStyle:"content",collapsible:t,active:!1===this.adding_new_tab&&!0!==e.model.get("cloned")?0:e.$el.index()}),this.adding_new_tab=!1},addTab:function(e){if(e&&e.preventDefault&&e.preventDefault(),!vc_user_access().shortcodeAll("vc_accordion_tab"))return!1;this.adding_new_tab=!0,vc.shortcodes.create({shortcode:"vc_accordion_tab",params:{title:window.i18nLocale.section},parent_id:this.model.id})},_loadDefaults:function(){window.VcAccordionView.__super__._loadDefaults.call(this)}}),window.VcAccordionTabView=window.VcColumnView.extend({events:{"click > [data-element_type] > .vc_controls .vc_control-btn-delete":"deleteShortcode","click > [data-element_type] > .vc_controls .vc_control-btn-prepend":"addElement","click > [data-element_type] > .vc_controls .vc_control-btn-edit":"editElement","click > [data-element_type] > .vc_controls .vc_control-btn-clone":"clone","click > [data-element_type] > .wpb_element_wrapper > .vc_empty-container":"addToEmpty"},setContent:function(){this.$content=this.$el.find("> [data-element_type] > .wpb_element_wrapper > .vc_container_for_children")},changeShortcodeParams:function(e){window.VcAccordionTabView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),_.isObject(e)&&_.isString(e.title)&&this.$el.find("> h3 .tab-label").text(e.title)},setEmpty:function(){a("> [data-element_type]",this.$el).addClass("vc_empty-column"),"edit"!==vc_user_access().getState("shortcodes")&&this.$content.addClass("vc_empty-container")},unsetEmpty:function(){a("> [data-element_type]",this.$el).removeClass("vc_empty-column"),this.$content.removeClass("vc_empty-container")}}),window.VcMessageView=vc.shortcode_view.extend({changeShortcodeParams:function(e){var t;window.VcMessageView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),t=this.$el.find("> .wpb_element_wrapper").removeClass(_.values(this.params.color.value).join(" ")),_.isObject(e)&&_.isString(e.color)&&t.addClass(e.color)}}),window.VcMessageView_Backend=vc.shortcode_view.extend({changeShortcodeParams:function(e){var t,n,i,o;switch(window.VcMessageView_Backend.__super__.changeShortcodeParams.call(this,e),t=e.get("params"),e=this.$el.find("> .wpb_element_wrapper"),n=["vc_message_box"],_.isUndefined(t.message_box_style)&&(t.message_box_style="classic"),_.isUndefined(t.message_box_color)&&(t.message_box_color="alert-info"),t.style?"3d"===t.style?(t.message_box_style="3d",t.style="rounded"):"outlined"===t.style?(t.message_box_style="outline",t.style="rounded"):"square_outlined"===t.style&&(t.message_box_style="outline",t.style="square"):t.style="rounded",n.push("vc_message_box-"+t.style),t.message_box_style&&n.push("vc_message_box-"+t.message_box_style),e.attr("class","wpb_element_wrapper"),e.find(".vc_message_box-icon").remove(),i=_.isUndefined(t["icon_"+t.icon_type])?"fa fa-info-circle":t["icon_"+t.icon_type],o=t.color,t.color){case"info":i="fa fa-info-circle";break;case"alert-info":i="vc_pixel_icon vc_pixel_icon-info";break;case"success":i="fa fa-check";break;case"alert-success":i="vc_pixel_icon vc_pixel_icon-tick";break;case"warning":i="fa fa-exclamation-triangle";break;case"alert-warning":i="vc_pixel_icon vc_pixel_icon-alert";break;case"danger":i="fa fa-times";break;case"alert-danger":i="vc_pixel_icon vc_pixel_icon-explanation";break;default:o=t.message_box_color}n.push("vc_color-"+o),e.addClass(n.join(" ")),e.prepend(a('<div class="vc_message_box-icon"><i class="'+i+'"></i></div>'))}}),window.VcTextSeparatorView=vc.shortcode_view.extend({changeShortcodeParams:function(e){window.VcTextSeparatorView.__super__.changeShortcodeParams.call(this,e),e=e.get("params");var t=this.$el.find("> .wpb_element_wrapper");_.isObject(e)&&_.isString(e.title_align)&&t.removeClass(_.values(this.params.title_align.value).join(" ")).addClass(e.title_align),_.isObject(e)&&_.isString(e.add_icon)&&"true"===e.add_icon&&((e=a('<i class="'+e["i_icon_"+e.i_type]+'" ></i>')).prependTo(t.find("[name=title]")),e.after(" "))}}),window.VcCallToActionView=vc.shortcode_view.extend({changeShortcodeParams:function(e){window.VcCallToActionView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),_.isObject(e)&&_.isString(e.position)&&this.$el.find("> .wpb_element_wrapper").removeClass(_.values(this.params.position.value).join(" ")).addClass(e.position)}}),window.VcCallToActionView3=vc.shortcode_view.extend({changeShortcodeParams:function(e){var t;window.VcCallToActionView3.__super__.changeShortcodeParams.call(this,e),e=_.extend({add_icon:"",i_type:""},e.get("params")),t=this.$el.find(".vc_admin_label.admin_label_i_type"),_.isEmpty(e.add_icon)?t.addClass("hidden-label").hide():_.isEmpty(e.i_type)||_.isEmpty(e["i_icon_"+e.i_type])||(e=vc_toTitleCase(e.i_type)+' - <i class="'+e["i_icon_"+e.i_type]+'"></i>',t.html("<label>"+t.find("label").text()+"</label>: "+e),t.show().removeClass("hidden-label"))}}),window.VcToggleView=vc.shortcode_view.extend({events:function(){return _.extend({"click .vc_toggle_title":"toggle","click .toggle_title":"toggle"},window.VcToggleView.__super__.events)},toggle:function(e){e&&e.preventDefault&&e.preventDefault(),a(e.currentTarget).toggleClass("vc_toggle_title_active"),a(".vc_toggle_content",this.$el).slideToggle(500)},changeShortcodeParams:function(e){window.VcToggleView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),_.isObject(e)&&_.isString(e.open)&&"true"===e.open&&a(".vc_toggle_title",this.$el).addClass("vc_toggle_title_active").next().show()}}),window.VcButtonView=vc.shortcode_view.extend({events:function(){return _.extend({"click button":"buttonClick"},window.VcToggleView.__super__.events)},buttonClick:function(e){e&&e.preventDefault&&e.preventDefault()},changeShortcodeParams:function(e){var t;window.VcButtonView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),_.isObject(e)&&(t=e.color+" "+e.size+" "+e.icon,this.$el.find(".wpb_element_wrapper").removeClass(t),this.$el.find("button.title").attr({class:"title textfield wpb_button "+t}),"none"!==e.icon&&0===this.$el.find("button i.icon").length?this.$el.find("button.title").append('<i class="icon"></i>'):this.$el.find("button.title i.icon").remove())}}),window.VcButton2View=vc.shortcode_view.extend({events:function(){return _.extend({"click button":"buttonClick"},window.VcToggleView.__super__.events)},buttonClick:function(e){e&&e.preventDefault&&e.preventDefault()},changeShortcodeParams:function(e){window.VcButton2View.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),_.isObject(e)&&(e=(e.color?"vc_btn_"+e.color:"")+" "+(e.color?"vc_btn-"+e.color:"")+" "+(e.size?"vc_btn-"+e.size:"")+" "+(e.size?"vc_btn_"+e.size:"")+" "+(e.style?"vc_btn_"+e.style:""),this.$el.find(".wpb_element_wrapper").removeClass(e),this.$el.find("button.title").attr({class:"title textfield vc_btn "+e}))}}),window.VcButton3View=vc.shortcode_view.extend({buttonTemplate:!1,buttonTemplateCompiled:!1,$wrapper:!1,events:function(){return _.extend({"click .vc_btn3":"buttonClick"},window.VcToggleView.__super__.events)},buttonClick:function(e){e&&e.preventDefault&&e.preventDefault()},changeShortcodeParams:function(e){var t;window.VcButton3View.__super__.changeShortcodeParams.call(this,e),t=_.extend({},e.get("params")),this.buttonTemplate||(this.buttonTemplate=this.$el.find(".vc_btn3-container").html(),this.buttonTemplateCompiled=vc.template(this.buttonTemplate,vc.templateOptions.custom)),this.$wrapper||(this.$wrapper=this.$el.find(".wpb_element_wrapper")),_.isObject(t)&&(t.title&&_.isEmpty(t.title.trim())&&(t.title='<span class="vc_btn3-placeholder"> </span>'),"custom"===t.style?(t.color=void 0,_.isEmpty(t.custom_background)&&_.isEmpty(t.custom_text)&&(t.color="grey")):"outline-custom"===t.style&&(t.color=void 0,_.isEmpty(t.outline_custom_color))&&_.isEmpty(t.outline_custom_hover_background)&&_.isEmpty(t.outline_custom_hover_text)&&(t.style="outline",t.color="grey"),e=a(this.buttonTemplateCompiled({params:t})),"custom"===t.style?("undefined"!==t.custom_background&&e.css("background-color",t.custom_background),"undefined"!==t.custom_text&&e.css("color",t.custom_text)):"outline-custom"===t.style&&e.css({"background-color":"transparent","border-color":t.outline_custom_color,color:t.outline_custom_color}).hover(function(){a(this).css({"background-color":t.outline_custom_hover_background,"border-color":t.outline_custom_hover_background,color:t.outline_custom_hover_text})},function(){a(this).css({"background-color":"transparent","border-color":t.outline_custom_color,color:t.outline_custom_color})}),this.$wrapper.find(".vc_btn3-container").html(e))}}),window.VcTabsView=vc.shortcode_view.extend({new_tab_adding:!1,events:{"click .add_tab":"addTab","click > .vc_controls .vc_control-btn-delete":"deleteShortcode","click > .vc_controls .vc_control-btn-edit":"editElement","click > .vc_controls .vc_control-btn-clone":"clone"},initialize:function(e){window.VcTabsView.__super__.initialize.call(this,e),_.bindAll(this,"stopSorting")},render:function(){return window.VcTabsView.__super__.render.call(this),this.$tabs=this.$el.find(".wpb_tabs_holder"),this.createAddTabButton(),this},ready:function(e){window.VcTabsView.__super__.ready.call(this,e)},createAddTabButton:function(){var e=Date.now()+"-"+Math.floor(11*Math.random());this.$tabs.append('<div id="new-tab-'+e+'" class="new_element_button"></div>'),this.$add_button=a('<li class="add_tab_block"><a href="#new-tab-'+e+'" class="add_tab" title="'+window.i18nLocale.add_tab+'"></a></li>').appendTo(this.$tabs.find(".tabs_controls")),vc_user_access().shortcodeAll("vc_tab")||this.$add_button.hide()},addTab:function(e){var t;return e&&e.preventDefault&&e.preventDefault(),vc_user_access().shortcodeAll("vc_tab")&&(this.new_tab_adding=!0,e=window.i18nLocale.tab,t=this.$tabs.find("[data-element_type=vc_tab]").length,t=Date.now()+"-"+t+"-"+Math.floor(11*Math.random()),vc.shortcodes.create({shortcode:"vc_tab",params:{title:e,tab_id:t},parent_id:this.model.id})),!1},stopSorting:function(e,t){var n;this.$tabs.find("ul.tabs_controls li:not(.add_tab_block)").each(function(e){a(this).find("a").attr("href").replace("#","");n=vc.shortcodes.get(a("[id="+a(this).attr("aria-controls")+"]").data("model-id")),vc.storage.lock(),n.save({order:a(this).index()})}),n&&n.save()},changedContent:function(e){var t=e.model.get("params");this.$tabs.hasClass("ui-tabs")||(this.$tabs.tabs({select:function(e,t){return!a(t.tab).hasClass("add_tab")}}),this.$tabs.find(".ui-tabs-nav").prependTo(this.$tabs),vc_user_access().shortcodeAll("vc_tab")&&this.$tabs.find(".ui-tabs-nav").sortable({axis:"vc_tour"===this.$tabs.closest("[data-element_type]").data("element_type")?"y":"x",update:this.stopSorting,items:"> li:not(.add_tab_block)"})),!0===e.model.get("cloned")?(e.model.get("cloned_from"),e=a(".tabs_controls > .add_tab_block",this.$content),e=a("<li><a href='#tab-"+t.tab_id+"'>"+t.title+"</a></li>").insertBefore(e),this.$tabs.tabs("refresh"),this.$tabs.tabs("option","active",e.index())):(a("<li><a href='#tab-"+t.tab_id+"'>"+t.title+"</a></li>").insertBefore(this.$add_button),this.$tabs.tabs("refresh"),this.$tabs.tabs("option","active",this.new_tab_adding?a(".ui-tabs-nav li",this.$content).length-2:0)),this.new_tab_adding=!1},cloneModel:function(e,t,n){var i,n=_.isBoolean(n)&&!0===n?e.get("order"):parseFloat(e.get("order"))+vc.clone_index,o=_.extend({},e.get("params")),c=e.get("shortcode");return"vc_tab"===c&&_.extend(o,{tab_id:Date.now()+"-"+this.$tabs.find("[data-element-type=vc_tab]").length+"-"+Math.floor(11*Math.random())}),i=s.create({shortcode:c,id:vc_guid(),parent_id:t,order:n,cloned:"vc_tab"!==c,cloned_from:e.toJSON(),params:o}),_.each(s.where({parent_id:e.id}),function(e){this.cloneModel(e,i.get("id"),!0)},this),i}}),window.VcTabView=window.VcColumnView.extend({events:{"click > .vc_controls .vc_control-btn-delete":"deleteShortcode","click > .vc_controls .vc_control-btn-prepend":"addElement","click > .vc_controls .vc_control-btn-edit":"editElement","click > .vc_controls .vc_control-btn-clone":"clone","click > .wpb_element_wrapper > .vc_empty-container":"addToEmpty"},render:function(){var e=this.model.get("params");return window.VcTabView.__super__.render.call(this),e.tab_id||(e.tab_id=Date.now()+"-"+Math.floor(11*Math.random()),this.model.save("params",e)),this.id="tab-"+e.tab_id,this.$el.attr("id",this.id),this},ready:function(e){window.VcTabView.__super__.ready.call(this,e),this.$tabs=this.$el.closest(".wpb_tabs_holder");this.model.get("params");return this},changeShortcodeParams:function(e){window.VcTabView.__super__.changeShortcodeParams.call(this,e),e=e.get("params"),_.isObject(e)&&_.isString(e.title)&&_.isString(e.tab_id)&&a('.ui-tabs-nav [href="#tab-'+e.tab_id+'"]').text(e.title)},deleteShortcode:function(e){e&&e.preventDefault&&e.preventDefault();var t,e=confirm(window.i18nLocale.press_ok_to_delete_section),n=this.model.get("parent_id");return!0===e&&(this.model.destroy(),vc.shortcodes.where({parent_id:n}).length?(e=this.model.get("params"),t=a('[href="#tab-'+e.tab_id+'"]',this.$tabs).parent().index(),a('[href="#tab-'+e.tab_id+'"]').parent().remove(),0<(e=this.$tabs.find(".ui-tabs-nav li:not(.add_tab_block)").length)&&this.$tabs.tabs("refresh"),void(t<e?this.$tabs.tabs("option","active",t):0<e&&this.$tabs.tabs("option","active",e-1))):(vc.shortcodes.get(n).destroy(),!1))},cloneModel:function(e,t,n){var i,n=_.isBoolean(n)&&!0===n?e.get("order"):parseFloat(e.get("order"))+vc.clone_index,o=_.extend({},e.get("params")),c=e.get("shortcode");return"vc_tab"===c&&_.extend(o,{tab_id:Date.now()+"-"+this.$tabs.find("[data-element_type=vc_tab]").length+"-"+Math.floor(11*Math.random())}),i=s.create({shortcode:c,parent_id:t,order:n,cloned:!0,cloned_from:e.toJSON(),params:o}),_.each(s.where({parent_id:e.id}),function(e){this.cloneModel(e,i.get("id"),!0)},this),i}}),window.VcIconElementView_Backend=vc.shortcode_view.extend({changeShortcodeParams:function(e){var t=e.get("shortcode"),i=e.get("params"),t=vc.map[t];_.isArray(t.params)&&_.each(t.params,function(e){var t,n;!_.isUndefined(e.admin_label)&&e.admin_label&&(e=e.param_name,t=i[e],(n=this.$el.find("> .wpb_element_wrapper").children(".admin_label_"+e)).length)&&(""===t||_.isUndefined(t)?n.hide().addClass("hidden-label"):("type"!==e||_.isUndefined(i["icon_"+t])||(t=vc_toTitleCase(t)+" - <i class='"+i["icon_"+t]+"'></i>"),n.html("<label>"+n.find("label").text()+"</label>: "+t),n.show().removeClass("hidden-label")))},this),t=vc.app.views[this.model.get("parent_id")],!1!==e.get("parent_id")&&_.isObject(t)&&t.checkIsEmpty()}}),window.VcBackendTtaViewInterface=vc.shortcode_view.extend({sortableSelector:!1,$sortable:!1,$navigation:!1,defaultSectionTitle:window.i18nLocale.tab,sortableUpdateModelIdSelector:"data-vc-target-model-id",activeClass:"vc_active",sortingPlaceholder:"vc_placeholder",events:{"click > .vc_controls .vc_control-btn-delete":"deleteShortcode","click > .vc_controls .vc_control-btn-edit":"editElement","click > .vc_controls .vc_control-btn-clone":"clone","click > .vc_controls .vc_control-btn-copy":"copy","click > .vc_controls .vc_control-btn-paste":"paste","click > .vc_controls .vc_control-btn-prepend":"clickPrependSection","click .vc_tta-section-append":"clickAppendSection"},initialize:function(e){window.VcBackendTtaViewInterface.__super__.initialize.call(this,e),_.bindAll(this,"updateSorting")},render:function(){return window.VcBackendTtaViewInterface.__super__.render.call(this),this.$el.addClass("vc_tta-container vc_tta-o-non-responsive"),this},setContent:function(){this.$content=this.$el.find("> .wpb_element_wrapper .vc_tta-panels")},clickAppendSection:function(e){e&&e.preventDefault&&e.preventDefault(),this.addSection()},clickPrependSection:function(e){e&&e.preventDefault&&e.preventDefault(),this.addSection(!0)},addSection:function(e){e={shortcode:"vc_tta_section",params:{title:this.defaultSectionTitle},parent_id:this.model.get("id"),order:_.isBoolean(e)&&e?vc.add_element_block_view.getFirstPositionIndex():vc.shortcodes.getNextOrder(),prepend:e};return vc.shortcodes.create(e)},findSection:function(e){return this.$content.children('[data-model-id="'+e+'"]')},getIndex:function(e){return e.index()},buildSortable:function(e){return!("edit"===vc_user_access().getState("shortcodes")||!vc_user_access().shortcodeAll("vc_tta_section"))&&e.sortable({forcePlaceholderSize:!0,placeholder:this.sortingPlaceholder,helper:this.renderSortingPlaceholder,scroll:!0,cursor:"move",cursorAt:{top:20,left:16},start:function(e,t){},over:function(e,t){},stop:function(e,t){t.item.attr("style","")},update:this.updateSorting,items:this.sortableSelector})},updateSorting:function(e,t){var n;if(!vc_user_access().shortcodeAll("vc_tta_section"))return!1;(n=this).$sortable.find(this.sortableSelector).each(function(){var e=a(this),t=e.attr(n.sortableUpdateModelIdSelector),t=vc.shortcodes.get(t);vc.storage.lock(),t.save({order:n.getIndex(e)})}),vc.storage.unlock(),vc.storage.save()},makeFirstSectionActive:function(){this.$content.children(":first-child").addClass(this.activeClass)},checkForActiveSection:function(){this.$content.children("."+this.activeClass).length||this.makeFirstSectionActive()},changeActiveSection:function(e){this.$content.children(".vc_tta-panel."+this.activeClass).removeClass(this.activeClass),this.findSection(e).addClass(this.activeClass)},changedContent:function(e){e=window.VcBackendTtaViewInterface.__super__.changedContent.call(this,e);return this.checkForActiveSection(),this.buildSortable(this.$sortable),e},notifySectionChanged:function(e){var t=e.get("view");_.isObject(t)&&(e=e.getParam("title"),_.isString(e)&&e.length||(e=this.defaultSectionTitle),t.$el.find(".vc_tta-panel-title a .vc_tta-title-text").text(e))},notifySectionRendered:function(e){},getNextTab:function(e){var t=this.$navigation.children(),n=t.length-2,e=e.index(),n=e!==n?t.eq(e+1):t.eq(e-1);return n},renderSortingPlaceholder:function(e,t){return vc.app.renderPlaceholder(e,t)}}),window.VcBackendTtaTabsView=window.VcBackendTtaViewInterface.extend({sortableSelector:"> [data-vc-tab]",sortableSelectorCancel:".vc-non-draggable-container",sortablePlaceholderClass:"vc_placeholder-tta-tab",navigationSectionTemplate:null,navigationSectionTemplateParsed:null,$navigationSectionAdd:null,sortingPlaceholder:"vc_placeholder-tab vc_tta-tab",render:function(){return window.VcBackendTtaTabsView.__super__.render.call(this),this.$navigation=this.$el.find("> .wpb_element_wrapper .vc_tta-tabs-list"),this.$sortable=this.$navigation,this.$navigationSectionAdd=this.$navigation.children(".vc_tta-tab:first-child"),this.setNavigationSectionTemplate(this.$navigationSectionAdd.prop("outerHTML")),vc_user_access().shortcodeAll("vc_tta_section")?(this.$navigationSectionAdd.addClass("vc_tta-section-append").removeAttr("data-vc-target-model-id").removeAttr("data-vc-tab").find("[data-vc-target]").html('<i class="vc_tta-controls-icon vc_tta-controls-icon-plus"></i>').removeAttr("data-vc-tabs").removeAttr("data-vc-target").removeAttr("data-vc-target-model-id").removeAttr("data-vc-toggle"),"true"===this.$navigationSectionAdd.attr("data-hide-add-control")&&this.$navigationSectionAdd.css("display","none")):this.$navigationSectionAdd.hide(),this},setNavigationSectionTemplate:function(e){this.navigationSectionTemplate=e,this.navigationSectionTemplateParsed=vc.template(this.navigationSectionTemplate,vc.templateOptions.custom)},getNavigationSectionTemplate:function(){return this.navigationSectionTemplate},getParsedNavigationSectionTemplate:function(e){return this.navigationSectionTemplateParsed(e)},changeNavigationSectionTitle:function(e,t){this.findNavigationTab(e).find("[data-vc-target]").text(t)},changeActiveSection:function(e){window.VcBackendTtaTabsView.__super__.changeActiveSection.call(this,e),this.$navigation.children("."+this.activeClass).removeClass(this.activeClass),this.findNavigationTab(e).addClass(this.activeClass)},notifySectionRendered:function(e){var t,n;window.VcBackendTtaTabsView.__super__.notifySectionRendered.call(this,e),t=e.getParam("title"),t=a(this.getParsedNavigationSectionTemplate({model_id:e.get("id"),section_title:_.isString(t)&&0<t.length?t:this.defaultSectionTitle})),e.get("cloned")?(n=e.get("cloned_from"),_.isObject(n)&&((n=this.$navigation.children('[data-vc-target-model-id="'+n.id+'"]')).length?t.insertAfter(n):t.insertBefore(this.$navigation.children(".vc_tta-section-append")))):e.get("prepend")?t.insertBefore(this.$navigation.children(":first-child")):t.insertBefore(this.$navigation.children(":last-child"))},notifySectionChanged:function(e){var t;window.VcBackendTtaTabsView.__super__.notifySectionChanged.call(this,e),t=e.getParam("title"),_.isString(t)&&t.length||(t=this.defaultSectionTitle),this.changeNavigationSectionTitle(e.get("id"),t),e.view.$el.find("> .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_element-name").removeClass("vc_element-move"),e.view.$el.find("> .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_element-name .vc-c-icon-dragndrop").hide()},makeFirstSectionActive:function(){var e=this.$navigation.children(":first-child:not(.vc_tta-section-append)").addClass(this.activeClass);e.length&&this.findSection(e.data("vc-target-model-id")).addClass(this.activeClass)},findNavigationTab:function(e){return this.$navigation.children('[data-vc-target-model-id="'+e+'"]')},removeSection:function(e){var t,e=this.findNavigationTab(e.get("id"));e.hasClass(this.activeClass)&&((t=this.getNextTab(e)).addClass(this.activeClass),this.changeActiveSection(t.data("vc-target-model-id"))),e.remove()},renderSortingPlaceholder:function(e,t){var n=t,i=t.width()+1,t=t.height();return n.width(i),n.height(t),n}}),window.VcBackendTtaAccordionView=VcBackendTtaViewInterface.extend({sortableSelector:"> .vc_tta-panel:not(.vc_tta-section-append)",sortableSelectorCancel:".vc-non-draggable",sortableUpdateModelIdSelector:"data-model-id",defaultSectionTitle:window.i18nLocale.section,render:function(){return window.VcBackendTtaTabsView.__super__.render.call(this),this.$navigation=this.$content,this.$sortable=this.$content,vc_user_access().shortcodeAll("vc_tta_section")||this.$content.find(".vc_tta-section-append").hide(),this},removeSection:function(e){e=this.findSection(e.get("id"));e.hasClass(this.activeClass)&&this.getNextTab(e).addClass(this.activeClass)},addShortcode:function(e){var t=_.last(vc.shortcodes.filter(function(e){return e.get("parent_id")===this.get("parent_id")&&parseFloat(e.get("order"))<parseFloat(this.get("order"))},e.model));t?e.render().$el.insertAfter("[data-model-id="+t.id+"]"):this.$content.prepend(e.render().el)}}),window.VcBackendTtaTourView=window.VcBackendTtaTabsView.extend({defaultSectionTitle:window.i18nLocale.section}),window.VcBackendTtaPageableView=window.VcBackendTtaTabsView.extend({defaultSectionTitle:window.i18nLocale.section}),window.VcBackendTtaSectionView=window.VcColumnView.extend({parentObj:null,events:{"click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_control-btn-delete":"deleteShortcode","click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_control-btn-prepend":"addElement","click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_control-btn-edit":"editElement","click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_control-btn-clone":"clone","click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_control-btn-copy":"copy","click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_controls .vc_control-btn-paste":"paste","click > .wpb_element_wrapper > .vc_tta-panel-body > .vc_empty-container":"addToEmpty"},setContent:function(){this.$content=this.$el.find("> .wpb_element_wrapper > .vc_tta-panel-body > .vc_container_for_children")},render:function(){var e;return window.VcBackendTtaSectionView.__super__.render.call(this),e=vc.shortcodes.get(this.model.get("parent_id")),_.isObject(e)&&!_.isUndefined(e.view)&&(this.parentObj=e),this.$el.addClass("vc_tta-panel"),this.$el.attr("style",""),this.$el.attr("data-vc-toggle","tab"),this.replaceTemplateVars(),this},replaceTemplateVars:function(){var e=this.model.getParam("title"),t=(_.isEmpty(e)&&(e=this.parentObj&&this.parentObj.defaultSectionTitle&&this.parentObj.defaultSectionTitle.length?this.parentObj.defaultSectionTitle:window.i18nLocale.section),this.$el.find(".vc_tta-panel-heading")),n=vc.template(t.html(),vc.templateOptions.custom);t.html(n({model_id:this.model.get("id"),section_title:e}))},getIndex:function(){return this.$el.index()},ready:function(){this.updateParentNavigation(),window.VcBackendTtaSectionView.__super__.ready.call(this)},updateParentNavigation:function(){_.isObject(this.parentObj)&&this.parentObj.view&&this.parentObj.view.notifySectionRendered&&this.parentObj.view.notifySectionRendered(this.model)},deleteShortcode:function(e){return e&&e.preventDefault&&e.preventDefault(),!0===confirm(window.i18nLocale.press_ok_to_delete_section)&&(1===vc.shortcodes.where({parent_id:this.model.get("parent_id")}).length?(this.model.destroy(),this.parentObj&&this.parentObj.destroy()):(this.parentObj&&this.parentObj.view&&this.parentObj.view.removeSection&&this.parentObj.view.removeSection(this.model),this.model.destroy()),!0)},changeShortcodeParams:function(e){window.VcBackendTtaSectionView.__super__.changeShortcodeParams.call(this,e),_.isObject(this.parentObj)&&this.parentObj.view&&this.parentObj.view.notifySectionChanged&&this.parentObj.view.notifySectionChanged(e)}}),vc.addTemplateFilter(function(e){var t=VCS4()+"-"+VCS4();return e.replace(/tab\_id\=\"([^\"]+)\"/g,'tab_id="$1'+t+'"')})})(window.jQuery); (o=>{var t=function(t,n,i){this.target=t,this.$pointer=null,this.texts=i,this.pointerOptions=n,this.init()};t.prototype={init:function(){_.bindAll(this,"openedEvent","reposition")},show:function(){this.$pointer=o(this.target),this.$pointer.data("vcPointerMessage",this),this.pointerOptions.opened=this.openedEvent,this.$pointer.addClass("vc-with-vc-pointer").pointer(this.pointerOptions).pointer("open"),o(window).on("resize.vcPointer",this.reposition)},domButtonsWrapper:function(){return o('<div class="vc_wp-pointer-controls" />')},domCloseBtn:function(){return o('<a class="vc_pointer-close close">'+this.texts.finish+"</a>")},domNextBtn:function(){return o('<button class="button button-primary button-large vc_wp-pointers-next">'+this.texts.next+'<i class="vc_pointer-icon"></i></button>')},domPrevBtn:function(){return o('<button class="button button-primary button-large vc_wp-pointers-prev"><i class="vc_pointer-icon"></i>'+this.texts.prev+"</button> ")},openedEvent:function(t,n){var i=n.pointer.offset();n.pointer.css("z-index",1e5),i&&i.top&&o("body").scrollTop(80<i.top?i.top-80:0)},reposition:function(){this.$pointer.pointer("reposition")},close:function(){this.$pointer&&this.$pointer.removeClass("vc-with-vc-pointer").pointer("close"),o(window).off("resize.vcPointer")}},window.vcPointerMessage=t})(window.jQuery); (i=>{var t=function(t,i){this.pointers=t&&t.messages||[],this._texts=i,this.pointerId=t&&t.pointer_id?t.pointer_id:"",this.pointerData={},this._index=0,this.messagesDismissed=!1,this.init()};t.prototype={init:function(){_.bindAll(this,"show","clickEventClose","clickEventNext","clickEventPrev","buttonsEvent"),this.build()},getPointer:function(t){return this.pointerData=this.pointers[t]&&this.pointers[t].target?this.pointers[t]:null,i("body").hasClass("vc_editor")&&"#vc_ui-panel-post-custom-layout"===this.pointerData.target&&"none"===i(this.pointerData.target).css("display")&&this.next(),this.pointerData&&this.pointerData.options?new vcPointerMessage(this.pointerData.target,this.buildOptions(this.pointerData.options),this._texts):null},buildOptions:function(t){return t.buttonsEvent&&_.isFunction(window[t.buttonsEvent])?t.buttons=_.bind(window[t.buttonsEvent],this):t.buttons=this.buttonsEvent,t.vcPointerController=this,t},build:function(){if(this.pointer=this.getPointer(this._index),vc.events.once("backendEditor.close",this.close,this),!this.pointer)return!1;this.setShowEventHandler()},show:function(){this.pointer.show(),this.setCloseEventHandler(),vc.events.trigger("vcPointer:show")},setShowEventHandler:function(){var t;this.pointerData.showCallback&&window[this.pointerData.showCallback]?window[this.pointerData.showCallback].call(this):this.pointerData.showEvent?this.pointerData.showEvent.match(/\s/)?1<(t=this.pointerData.closeEvent.split(/\s+(.+)?/)).length&&i(t[1]).one(t[0],this.show):vc.events.once(this.pointerData.showEvent,this.show):this.show()},setCloseEventHandler:function(){var t;this.pointerData.closeCallback&&window[this.pointerData.closeCallback]?window[this.pointerData.closeCallback].call(this):this.pointerData.closeEvent?this.pointerData.closeEvent.match(/\s/)?(t=this.pointerData.closeEvent.split(/\s+(.+)?/),i(t[1]||this.$pointer).one(t[1]&&t[0]?t[0]:"click",this.clickEventNext)):vc.events.once(this.pointerData.closeEvent,this.nextOnEvent,this):this.pointer.$pointer&&0<this.pointer.$pointer.length&&i(this.pointer.$pointer).one("click",this.clickEventNext)},nextOnEvent:function(){this.close(),this.next()},next:function(){this._index++,this.build()},prev:function(){this._index--,this.build()},close:function(){this.pointer&&(this.pointer.close(),this.pointerData=null,this.pointer=null,vc.events.trigger("vcPointer:close",this))},buttonsEvent:function(){var t=this.pointer.domCloseBtn(),i=this.pointer.domNextBtn(),n=this.pointer.domPrevBtn();return t.bind("click.vcPointer",this.clickEventClose),t=this.pointer.domButtonsWrapper().append(t),0<this._index&&(n.bind("click.vcPointer",this.clickEventPrev),t.addClass("vc_wp-pointer-controls-prev").append(n)),this._index+1<this.pointers.length&&(i.bind("click.vcPointer",this.clickEventNext),t.addClass("vc_wp-pointer-controls-next").append(i)),t},clickEventClose:function(){this.close(),this.dismissMessages()},clickEventNext:function(){this.close(),this.next()},clickEventPrev:function(){this.close(),this.prev()},dismissMessages:function(){if(this.messagesDismissed)return!1;i.post(window.ajaxurl,{pointer:this.pointerId,action:"dismiss-wp-pointer"}),this.messagesDismissed=!0}},window.vcPointersController=t})(window.jQuery); (t=>{vc.events.on("app.render",function(){window.vcPointer&&window.vcPointer.pointers&&window.vcPointer.pointers.length&&_.each(vcPointer.pointers,function(t){new vcPointersController(t,vcPointer.texts)},this)}),vc.events.on("vcPointer:show",function(){vc.app.disableFixedNav=!0}),vc.events.on("vcPointer:close",function(){vc.app.disableFixedNav=!1}),window.vcPointersEditorsTourEvents=function(){var t=this.pointer.domCloseBtn();return t.bind("click.vcPointer",this.clickEventClose),t},window.vcPointersShowOnContentElementControls=function(){this.pointer&&t(this.pointer.target).length?(t(this.pointer.target).parent().addClass("vc-with-vc-pointer-controls"),this.show(),t("#wpb_wpbakery").one("click",function(){t(".vc-with-vc-pointer-controls").removeClass("vc-with-vc-pointer-controls")})):vc.events.once("shortcodes:add",vcPointersShowOnContentElementControls,this)},window.vcPointersSetInIFrame=function(){this.pointerData&&vc.frame_window.jQuery(this.pointerData.target).length?(this.pointer=new vc.frame_window.vcPointerMessage(this.pointerData.target,this.buildOptions(this.pointerData.options),this._texts),this.show(),this.pointer.$pointer.closest(".vc_controls").addClass("vc-with-vc-pointer-controls")):vc.events.once("shortcodeView:ready",vcPointersSetInIFrame,this)},window.vcPointersCloseInIFrame=function(){var t=this,n=vc.frame_window.jQuery;n("body").one("click",function(){n(".vc-with-vc-pointer-controls").removeClass("vc-with-vc-pointer-controls"),t.nextOnEvent()})}})(window.jQuery); (()=>{var i={stack:[],stackPosition:0,stackHash:JSON.stringify(""),zeroState:null,locked:!1,add:function(t){null===this.zeroState&&this.setZeroState(t),this.stackHash!==JSON.stringify(t)&&(this.can("redo")&&(this.stack=this.stack.slice(0,this.stackPosition)),this.stack.push(t),this.stackPosition=this.stack.length,this.stackHash=JSON.stringify(this.get()))},can:function(t){var i=!1;return"undo"===t?i=0<this.stack.length&&0<this.stackPosition:"redo"===t&&(i=0<this.stack.length&&this.stackPosition<this.stack.length),i},undo:function(){this.can("undo")&&(--this.stackPosition,this.stackHash=JSON.stringify(this.get()))},redo:function(){this.can("redo")&&(this.stackPosition+=1,this.stackHash=JSON.stringify(this.get()))},set:function(t){return this.stackPosition<t&&(this.stack=this.stack.slice(t-this.stackPosition),this.stackHash=JSON.stringify(this.get()),!0)},get:function(){return this.stackPosition<1?this.zeroState:this.stack[this.stackPosition-1]},setZeroState:function(t){this.zeroState=t,this.stackHash=JSON.stringify(this.get())}},t={add:function(t){!0!==i.locked&&(i.add(t),window.vc.events.trigger("undoredo:add",t))},getCurrentPosition:function(){return i.stackPosition},undo:function(){return i.undo(),window.vc.events.trigger("undoredo:undo"),t.get()},redo:function(){return i.redo(),window.vc.events.trigger("undoredo:redo"),t.get()},get:function(){return i.get()},canUndo:function(){return!this.isLocked()&&i.can("undo")},canRedo:function(){return!this.isLocked()&&i.can("redo")},setZeroState:function(t){null===i.zeroState?this.add(t):i.setZeroState(t)},lock:function(){i.locked=!0,window.vc.events.trigger("undoredo:lock")},unlock:function(){i.locked=!1,window.vc.events.trigger("undoredo:unlock")},isLocked:function(){return!0===i.locked}};void 0===window.vc&&(window.vc={}),window.vc.undoRedoApi=t})(); (e=>{e(function(){var o,d,n;window.vc&&window.vc.events&&(o=e(".vc_undo-button"),d=e(".vc_redo-button"),n=function(o){vc.storage.setContent(o),vc.shortcodes.fetch({reset:!0}),_.delay(function(){window.vc.undoRedoApi.unlock()},50)},window.vc.events.on("undoredo:add undoredo:undo undoredo:redo undoredo:lock undoredo:unlock",_.debounce(function(){o.attr("disabled",!window.vc.undoRedoApi.canUndo()),d.attr("disabled",!window.vc.undoRedoApi.canRedo())},150)),o.on("click.vc-undo",function(o){e(this).is("[disabled]")||window.vc.undoRedoApi.isLocked()?o&&o.preventDefault&&o.preventDefault():(vc.closeActivePanel(),window.vc.undoRedoApi.lock(),o=window.vc.undoRedoApi.undo(),n(o))}),d.on("click.vc-redo",function(o){e(this).is("[disabled]")||window.vc.undoRedoApi.isLocked()?o&&o.preventDefault&&o.preventDefault():(vc.closeActivePanel(),window.vc.undoRedoApi.lock(),o=window.vc.undoRedoApi.redo(),n(o))}))})})(window.jQuery); window.vc||(window.vc={}),(()=>{function r(o,e,t){"fromLocalStorage"===t&&(t=JSON.parse(localStorage.getItem("copiedShortcode")));for(var r=!1,c=(o&&(r=o.get("id")),Object.values(e?vc.ShortcodesBuilder.prototype.parse({},t,r):vc.storage.parseContent({},t,r))),n=0;n<c.length;n++){var i=c[n];if(a(o,i,c))break;s(0===n&&o,i,c,e)}e&&e.render()}vc.pasteShortcode=function(e,t,o){o?r(e,t,o):navigator.clipboard?navigator.permissions.query({name:"clipboard-read"}).then(function(o){"granted"===o.state?navigator.clipboard.readText().then(function(o){r(e,t,o)}):r(e,t,"fromLocalStorage")}).catch(function(){r(e,t,"fromLocalStorage")}):r(e,t,"fromLocalStorage")},vc.copyShortcode=function(o){o=vc.shortcodes.createShortcodeString(o);localStorage.setItem("copiedShortcode",JSON.stringify(o)),vc.utils.copyTextToClipboard(o)};var a=function(o,e,t){var r,c,n,i,a,s,d,l=!0;return o?(e=(o=p(o,e,t)).isModelRow,r=o.isModelRowInner,c=o.isModelTtaSection,n=o.isTopShortcodeRow,i=o.isTopShortcodeRowInner,a=o.isTopShortcodeSection,s=o.containerPreventsShortcode,l=(d=o.isShortcodeContainer)&&(s&&!(c&&i)||!s&&c&&n||e&&!(n||a)||r&&!i||o.isModelColumn&&n||o.isModelColumnInner&&(i||n))||!d&&(e||r)||(o.shortcodeRejectsAsChild||o.containerRejectsAsParent)&&!(a&&(o.isModelSection||e))):"vc_row"===t[0].shortcode&&(l=!1),l},s=function(o,e,t,r){var c,n,i,a,s,d=Object.assign({},e);return o&&(t=(e=p(o,e,t)).isModelRow,c=e.isModelRowInner,n=e.isModelSection,i=e.isTopShortcodeRow,a=e.isTopShortcodeRowInner,s=e.isTopShortcodeSection,e=e.isModelContainer,d.params.tab_id&&(d.params.tab_id=Date.now()+"-"+vc_guid()),c&&a||t&&i||!o.get("parent_id")&&(!n||!i)?(r&&(d.place_after_id=o.get("id")),d.parent_id=o.get("parent_id")):e&&!t&&(d.parent_id=o.get("id")),(t||c)&&(i||a)||(t||n)&&s)&&(d.order=parseFloat(o.get("order"))+vc.clone_index),r?(r.create(d),r.last()):vc.shortcodes.create(d)},p=function(o,e,t){var o=o.get("shortcode"),r=vc.map[o].allowed_container_element,c=vc.map[o].as_parent&&vc.map[o].as_parent.only,n=vc.map[t[0].shortcode].as_child&&vc.map[t[0].shortcode].as_child.only;return{isModelRow:"vc_row"===o,isModelSection:"vc_section"===o,isModelColumn:"vc_column"===o,isModelColumnInner:"vc_column_inner"===o,isModelRowInner:"vc_row_inner"===o,isModelTtaSection:"vc_tta_section"===o,isModelContainer:vc.map[o].is_container,isTopShortcodeRow:"vc_row"===t[0].shortcode,isTopShortcodeRowInner:"vc_row_inner"===t[0].shortcode,isTopShortcodeSection:"vc_section"===t[0].shortcode,containerPreventsShortcode:"string"==typeof r&&!r.includes(t[0].shortcode)||!1===r,isShortcodeContainer:vc.map[t[0].shortcode].is_container,shortcodeRejectsAsChild:"string"==typeof n&&!n.includes(o),containerRejectsAsParent:"string"==typeof c&&!c.includes(t[0].shortcode)}}})(); (o=>{var t=o("#vc_ui-helper-promo-popup");t.on("click",function(e){o(e.target).closest('[data-vc-ui-element="button-close"]').length&&t.removeClass("vc_active")})})(window.jQuery); (s=>{s.fn.initializeTooltips=function(a){return this.each(function(){var t,e=this,o=s(this).next(".tooltip-content")[0];function n(){clearTimeout(t),e.setAttribute("data-show",""),r.update()}function i(){t=setTimeout(function(){e.removeAttribute("data-show")},500)}["mouseenter","focus"].forEach(function(t){e.addEventListener(t,n),o.addEventListener(t,n)}),["mouseleave","blur"].forEach(function(t){e.addEventListener(t,i),o.addEventListener(t,i)}),a=a||".vc_shortcode-param";var r=Popper.createPopper(e,o,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[10,5]}},{name:"preventOverflow",options:{boundary:e.closest(a),altAxis:!0,tether:!1,rootBoundary:"document"}}]})}),this}})(jQuery); window.vc||(window.vc={}),(()=>{function a(e,o,c,t){var a=e?e.querySelector(".wpb-color-picker"):null,n=e?e.querySelector(".vc_color-control"):null,l=n.getAttribute("data-default-colorpicker-color"),r=e?n.value||l||"":null,l={el:a,container:e,default:r,theme:"classic",appClass:"wpb-pickr",autoReposition:!1,swatches:(()=>{var e=["#000000","#FFFFFF","#DD3333","#DD9933","#EEEE22","#81D742","#1E73BE","#8224E3"];return e=wpbData&&wpbData.pickrColors&&wpbData.pickrColors.length?wpbData.pickrColors:e})(),position:"bottom-middle",components:{preview:!0,opacity:!0,hue:!0,interaction:{hex:!0,rgba:!0,hsla:!0,hsva:!1,cmyk:!1,input:!0,cancel:!0,clear:!0,save:!1}},i18n:{"btn:cancel":"Cancel","btn:clear":"Default"}},i=(o&&(l=Object.assign({},l,o)),new Pickr(l));i.on("change",_.debounce(function(e){n.value=e.toHEXA().toString(),i.applyColor(),c&&c.change&&c.change(n)},200)).on("cancel",_.debounce(function(){var e=n.dataset.prevColor||r;n.value=e,i.setColor(e),c&&c.cancel&&c.cancel(n)},200)).on("hide",function(){n.dataset.prevColor=n.value,i.hide()}).on("clear",_.debounce(function(e){var o=n.getAttribute("data-default-value");n.value=o,c&&c.change&&c.change(n),n.dataset.prevColor=o,i.setColor(o)},200)),t.push(i)}vc.initColorPicker=function(e,o,c,t){o=o||{},c=c||{},t=t||[];e=(e||document).querySelectorAll(".color-group");try{o&&o.single?a(null,o,c,t):e.length&&e.forEach(function(e){a(e,o,c,t)})}catch(e){console.error("Error initializing color picker",e)}}})(); (n=>{n(document).ready(function(){n(".vc_dropdown-toggle").on("click",function(o){o.stopPropagation(),n(this).closest(".vc_dropdown").toggleClass("open")}),n(document).on("click",function(){n(".vc_dropdown").removeClass("open")})}),n("iframe").on("load",function(){(this.contentWindow||this.contentDocument.defaultView).document.addEventListener("click",function(){n(".vc_dropdown").removeClass("open")})})})(window.jQuery);