").html($("#vc_controls-template-default").html());var controls=this.$el.data("shortcode-controls");_.isUndefined(controls)||$(".vc_control-btn[data-control]",this.default_controls_template).each(function(){-1==$.inArray($(this).data("control"),controls)&&$(this).remove()})}return this.default_controls_template.html()},changed:function(){this.$el.removeClass("vc_empty-shortcode-element"),this.$el.height()<5&&this.$el.addClass("vc_empty-shortcode-element")},edit:function(e){e&&e.preventDefault&&e.preventDefault(),e&&e.stopPropagation&&e.stopPropagation(),"edit_element"===vc.activePanelName()&&vc.active_panel.model&&vc.active_panel.model.get("id")===this.model.get("id")||(vc.closeActivePanel(),vc.edit_element_block_view.render(this.model))},destroy:function(e){e&&e.preventDefault&&e.preventDefault(),e&&e.stopPropagation&&e.stopPropagation(),vc.showMessage(window.sprintf(window.i18nLocale.inline_element_deleted,this.model.setting("name"))),this.model.destroy()},removeView:function(model){this.remove(),vc.setDataChanged(),vc.builder.notifyParent(this.model.get("parent_id")),vc.closeActivePanel(model),vc.setFrameSize()},update:function(model){this.beforeUpdate(),vc.builder.update(model||this.model)},clone:function(e){var new_model,builder=new vc.ShortcodesBuilder;if(e&&e.preventDefault&&e.preventDefault(),e&&e.stopPropagation&&e.stopPropagation(),this.builder&&!this.builder.is_build_complete)return!1;this.builder=builder,new_model=vc.CloneModel(builder,this.model,this.model.get("parent_id")),builder.setResultMessage(window.sprintf(window.i18nLocale.inline_element_cloned,new_model.setting("name"),new_model.get("id"))),builder.render()},getParam:function(param_name){return _.isObject(this.model.get("params"))&&!_.isUndefined(this.model.get("params")[param_name])?this.model.get("params")[param_name]:null},placeElement:function($el,activity){var model=vc.shortcodes.get($el.data("modelId"));model&&model.get("place_after_id")?($el.insertAfter(vc.$page.find("[data-model-id="+model.get("place_after_id")+"]")),model.unset("place_after_id")):_.isString(activity)&&"prepend"===activity?$el.prependTo(this.content()):$el.appendTo(this.content()),this.changed()}}),vc.FrameView=Backbone.View.extend({events:{'click [data-vc-element="add-element-action"]':"addElement","click #vc_no-content-add-text-block":"addTextBlock","click #vc_templates-more-layouts":"openTemplatesWindow","click .vc_template[data-template_id] > .wpb_wrapper":"loadDefaultTemplate"},openTemplatesWindow:function(e){vc.templates_panel_view.once("show",function(){$('[data-vc-ui-element-target="[data-tab=default_templates]"]').click()}),vc.app.openTemplatesWindow.call(this,e)},updateKeyPress:function(e){if(13===e.which)return e&&e.preventDefault&&e.preventDefault(),vc.$title.attr("contenteditable",!1),$(".entry-content").trigger("click"),!1},loadDefaultTemplate:function(e){e&&e.preventDefault&&e.preventDefault(),vc.templates_panel_view.loadTemplate(e),$("#vc_no-content-helper").remove()},setTitle:function(title){vc.$title.length&&vc.$title.text(title||vc.no_title_placeholder),vc.title=title,vc.update_title=!0},initialize:function(){vc.frame_window=vc.$frame.get(0).contentWindow},setActiveHover:function(e){this.$hover_element&&this.$hover_element.removeClass("vc_hover"),this.$hover_element=$(e.currentTarget).addClass("vc_hover"),e.stopPropagation()},unsetActiveHover:function(e){this.$hover_element&&this.$hover_element.removeClass("vc_hover")},setSortable:function(){vc.frame_window.vc_iframe.setSortable(vc.app)},render:function(){return!1!==vc_user_access().getState("post_settings")&&(vc.$title=$(vc.$frame.get(0).contentWindow.document).find('h1:contains("'+(vc.title||vc.no_title_placeholder).replace(/"/g,'\\"')+'")'),vc.$title.on("click",function(e){e.preventDefault(),vc.post_settings_view.render().show()})),this},noContent:function(no){vc.frame_window.vc_iframe.showNoContent(no)},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),vc.add_element_block_view.render(!1)},addTextBlock:function(e){var builder,row_params,column_params,column_text_params;e&&e.preventDefault&&e.preventDefault(),row_params={},column_params={width:"1/1"},column_text_params=vc.getDefaults("vc_column_text"),(builder=new vc.ShortcodesBuilder).create({shortcode:"vc_row",params:row_params}).create({shortcode:"vc_column",parent_id:builder.lastID(),params:column_params}).create({shortcode:"vc_column_text",parent_id:builder.lastID(),params:column_text_params}).render(),vc.edit_element_block_view.render(builder.last())},scrollTo:function(model){vc.frame_window.vc_iframe.scrollTo(model.get("id"))},addInlineScript:function(script){return vc.frame_window.vc_iframe.addInlineScript(script)},addInlineScriptBody:function(script){return vc.frame_window.vc_iframe.addInlineScriptBody(script)}}),vc.View=Backbone.View.extend({el:$("body"),mode:"view",current_size:"100%",events:{"click #vc_add-new-row":"createRow","click #vc_add-new-element":"addElement","click #vc_post-settings-button":"editSettings","click #vc_templates-editor-button":"openTemplatesWindow","click #vc_guides-toggle-button":"toggleMode","click #vc_button-cancel":"cancel","click #vc_button-edit-admin":"cancel","click #vc_button-update":"save","click #vc_button-save-draft, #vc_button-save-as-pending":"save","click .vc_screen-width":"resizeFrame","click .vc_edit-cloned":"editCloned","click [data-vc-manage-elements]":"openPresetWindow"},initialize:function(){_.bindAll(this,"saveRowOrder","saveElementOrder","saveColumnOrder","resizeWindow"),vc.shortcodes.on("change:params",this.changeParamsEvents,this),vc.events.on("shortcodes:add shortcodes:vc_section",vcAddShortcodeDefaultParams,this),vc.events.on("shortcodes:add",vc.atts.addShortcodeIdParam,this)},changeParamsEvents:function(model){vc.events.triggerShortcodeEvents("update",model)},render:function(){return vc.updateSettingsBadge(),vc.$page=$(vc.$frame.get(0).contentWindow.document).find("#vc_inline-anchor").parent(),vc.$frame_body=$(vc.$frame.get(0).contentWindow.document).find("body").addClass("vc_editor"),this.setMode("compose"),this.$size_control=$("#vc_screen-size-control"),$(".vc_element-container",vc.frame_window.document).droppable({accept:".vc_element_button"}),$(window).resize(this.resizeWindow),_.defer(function(){vc.events.trigger("app.render")}),this},cancel:function(e){e&&e.preventDefault&&e.preventDefault(),window.location.href=$(e.currentTarget).data("url")},save:function(e){e&&e.preventDefault&&e.preventDefault(),vc.builder.save($(e.currentTarget).data("changeStatus"))},resizeFrame:function(e){var $control=$(e.currentTarget);if(e&&e.preventDefault&&e.preventDefault(),$control.hasClass("active"))return!1;this.$size_control.find(".active").removeClass("active"),$("#vc_screen-size-current").attr("class","vc_current-layout-icon "+$control.attr("class")),this.current_size=$control.data("size"),$control.addClass("active"),vc.setFrameSize(this.current_size)},editCloned:function(e){var model_id,model;e&&e.preventDefault&&e.preventDefault(),model_id=$(e.currentTarget).data("modelId"),model=vc.shortcodes.get(model_id),vc.edit_element_block_view.render(model)},resizeWindow:function(){vc.setFrameSize(this.current_size)},switchMode:function(e){var $control=$(e.currentTarget);e&&e.preventDefault&&e.preventDefault(),this.setMode($control.data("mode")),$control.siblings(".vc_active").removeClass("vc_active"),$control.addClass("vc_active")},toggleMode:function(e){var $control=$(e.currentTarget);e&&e.preventDefault&&e.preventDefault(),"compose"===this.mode?($control.addClass("vc_off").text(window.i18nLocale.guides_off),this.setMode("view")):($control.removeClass("vc_off").text(window.i18nLocale.guides_on),this.setMode("compose"))},setMode:function(mode){var $body=$("body").removeClass(this.mode+"-mode");vc.$frame_body.removeClass(this.mode+"-mode"),this.mode=mode,$body.addClass(this.mode+"-mode"),vc.$frame_body.addClass(this.mode+"-mode")},placeElement:function($view,activity){var model=vc.shortcodes.get($view.data("modelId"));model&&model.get("place_after_id")?($view.insertAfter(vc.$page.find("[data-model-id="+model.get("place_after_id")+"]")),model.unset("place_after_id")):_.isString(activity)&&"prepend"===activity?$view.prependTo(vc.$page):$view.insertBefore(vc.$page.find("#vc_no-content-helper"))},addShortcodes:function(models){_.each(models,function(model){this.addShortcode(model),this.addShortcodes(vc.shortcodes.where({parent_id:model.get("id")}))},this)},createShortcodeHtml:function(model){var $template=$("#vc_template-"+model.get("shortcode")),template=$template.length?$template.html():'
',compiledTemplate=vc.template(template,vc.templateOptions.custom);return $(compiledTemplate(model.toJSON()).trim())},addAll:function(models){this.addShortcodes(models.where({parent_id:!1}))},createRow:function(e){e&&e.preventDefault&&e.preventDefault();var row_params,column_params,builder=new vc.ShortcodesBuilder;row_params={},column_params={width:"1/1"},builder.create({shortcode:"vc_row",params:row_params}).create({shortcode:"vc_column",parent_id:builder.lastID(),params:column_params}).render()},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),vc.add_element_block_view.render(!1)},editSettings:function(e){e&&e.preventDefault&&e.preventDefault(),vc.post_settings_view.render().show()},openTemplatesEditor:function(e){e&&e.preventDefault&&e.preventDefault(),vc.templates_editor_view.render().show()},openTemplatesWindow:function(e){e&&e.preventDefault&&e.preventDefault(),vc.templates_panel_view.render().show()},setFrameSize:function(){vc.setFrameSize()},dropButton:function(){},saveRowOrder:function(event,ui){_.defer(function(app){var $current_parent,row_params,column_params,$rows,builder;$current_parent=$(ui.item.parent()),$rows=$current_parent.find("> [data-tag=vc_row],> [data-tag=vc_section]"),builder=new vc.ShortcodesBuilder,$rows.each(function(key,value){var $el;if(($el=$(this)).is(".droppable")){row_params={},column_params={width:"1/1"},$el.remove();var row_data={shortcode:"vc_row",params:row_params,order:key};0===key?vc.activity="prepend":key+1!==$rows.length&&(row_data.place_after_id=vc.$page.find("> [data-tag=vc_row]:eq("+(key-1)+")").data("modelId")),builder.create(row_data).create({shortcode:"vc_column",parent_id:builder.lastID(),params:column_params}).render()}else{var model=vc.shortcodes.get($el.data("modelId")),prev_parent=model.get("parent_id"),current_parent=$current_parent.closest(".vc_element").data("modelId")||!1;model.save({order:key,parent_id:current_parent},{silent:!0}),prev_parent!==current_parent&&(vc.builder.notifyParent(current_parent),vc.builder.notifyParent(prev_parent))}}),vc.setDataChanged()},this)},saveElementOrder:function(event,ui){_.defer(function(app,e,ui){var $column,$elements;_.isNull(ui.sender)&&($column=ui.item.parent(),$elements=$column.find("> [data-model-id]"),$column.find("> [data-model-id]").each(function(key,value){var $element,model,prev_parent,current_parent,prepend;prepend=!1,($element=$(this)).is(".droppable")?(current_parent=vc.shortcodes.get($column.parents(".vc_element[data-tag]:first").data("modelId")),$element.remove(),0===key?prepend=!0:key+1!==$elements.length&&(prepend=$column.find("> [data-tag]:eq("+(key-1)+")").data("modelId")),current_parent&&vc.add_element_block_view.render(current_parent,prepend)):(prev_parent=(model=vc.shortcodes.get($element.data("modelId"))).get("parent_id"),current_parent=$column.parents(".vc_element[data-tag]:first").data("modelId"),model.save({order:key,parent_id:current_parent},{silent:!0}),prev_parent!==current_parent&&(vc.builder.notifyParent(current_parent),vc.builder.notifyParent(prev_parent)))})),vc.setDataChanged()},this,event,ui)},saveColumnOrder:function(event,ui){_.defer(function(app,e,ui){ui.item.parent().find("> [data-model-id]").each(function(){var $element,index;index=($element=$(this)).index(),vc.shortcodes.get($element.data("modelId")).save({order:index})})},this,event,ui),vc.setDataChanged()},openPresetWindow:function(e){e&&e.preventDefault&&e.preventDefault(),vc.preset_panel_view.render().show()}})}(window.jQuery),function($){"use strict";_.isUndefined(window.vc)&&(window.vc={}),vc.addTemplateFilter(function(str){var random_id=VCS4()+"-"+VCS4();return str.replace(/tab\_id\=\"([^\"]+)\"/g,'tab_id="$1'+random_id+'"')})}(window.jQuery),function($){"use strict";window.vc.events.on("shortcodeView:updated",function(model){var modelId;!0===(vc.map[model.get("shortcode")]||!1).is_container&&(modelId=model.get("id"),window.vc.frame_window.vc_iframe.updateChildGrids(modelId))}),window.InlineShortcodeViewContainer=window.InlineShortcodeView.extend({controls_selector:"#vc_controls-template-container",events:{"click > .vc_controls .vc_element .vc_control-btn-delete":"destroy","click > .vc_controls .vc_element .vc_control-btn-edit":"edit","click > .vc_controls .vc_element .vc_control-btn-clone":"clone","click > .vc_controls .vc_element .vc_control-btn-prepend":"prependElement","click > .vc_controls .vc_control-btn-append":"appendElement","click > .vc_empty-element":"appendElement",mouseenter:"resetActive",mouseleave:"holdActive"},hold_active:!1,parent_view:!1,initialize:function(params){_.bindAll(this,"holdActive"),window.InlineShortcodeViewContainer.__super__.initialize.call(this,params),this.model.get("parent_id")&&(this.parent_view=vc.shortcodes.get(this.model.get("parent_id")).view)},resetActive:function(e){this.hold_active&&window.clearTimeout(this.hold_active)},holdActive:function(e){this.resetActive(),this.$el.addClass("vc_hold-active");var view=this;this.hold_active=window.setTimeout(function(){view.hold_active&&window.clearTimeout(view.hold_active),view.hold_active=!1,view.$el.removeClass("vc_hold-active")},700)},content:function(){return!1===this.$content&&(this.$content=this.$el.find(".vc_container-anchor:first").parent(),this.$el.find(".vc_container-anchor:first").remove()),this.$content},render:function(){return window.InlineShortcodeViewContainer.__super__.render.call(this),this.content().addClass("vc_element-container"),this.$el.addClass("vc_container-block"),this},changed:function(){this.allowAddControlOnEmpty()&&(0===this.$el.find(".vc_element[data-tag]").length?this.$el.addClass("vc_empty").find("> :first").addClass("vc_empty-element"):this.$el.removeClass("vc_empty").find("> .vc_empty-element").removeClass("vc_empty-element"))},prependElement:function(e){e&&e.preventDefault&&e.preventDefault(),this.prepend=!0,window.vc.add_element_block_view.render(this.model,!0)},appendElement:function(e){e&&e.preventDefault&&e.preventDefault(),window.vc.add_element_block_view.render(this.model)},addControls:function(){var shortcodeTag,parentShortcodeTag,allAccess,moveAccess,editAccess,parentAllAccess,parentEditAccess,template,parent,data,parentName;shortcodeTag=this.model.get("shortcode"),template=$(this.controls_selector).html(),(parent=vc.shortcodes.get(this.model.get("parent_id")))&&(parentName=vc.getMapped(parent.get("shortcode")).name,parentShortcodeTag=parent.get("shortcode")),allAccess=vc_user_access().shortcodeAll(shortcodeTag),editAccess=vc_user_access().shortcodeEdit(shortcodeTag),parentAllAccess=vc_user_access().shortcodeAll(parentShortcodeTag),parentEditAccess=vc_user_access().shortcodeEdit(parentShortcodeTag),moveAccess=vc_user_access().partAccess("dragndrop"),data={name:vc.getMapped(shortcodeTag).name,tag:shortcodeTag,parent_name:parentName,parent_tag:parentShortcodeTag,can_edit:editAccess,can_all:allAccess,moveAccess:moveAccess,parent_can_edit:parentEditAccess,parent_can_all:parentAllAccess,state:vc_user_access().getState("shortcodes"),allowAdd:this.allowAddControl(),switcherPrefix:parentAllAccess&&allAccess?"":"-disable-switcher"};var compiledTemplate=vc.template(_.unescape(template),_.extend({},vc.templateOptions.custom,{evaluate:/\{#([\s\S]+?)#}/g}));this.$controls=$(compiledTemplate(data).trim()).addClass("vc_controls"),this.$controls.appendTo(this.$el)},allowAddControl:function(){return"edit"!==vc_user_access().getState("shortcodes")},multi_edit:function(e){var parent,children,models=[];e&&e.preventDefault&&e.preventDefault(),this.model.get("parent_id")&&(parent=vc.shortcodes.get(this.model.get("parent_id"))),parent?(models.push(parent),children=vc.shortcodes.where({parent_id:parent.get("id")}),window.vc.multi_edit_element_block_view.render(models.concat(children),this.model.get("id"))):window.vc.edit_element_block_view.render(this.model)},allowAddControlOnEmpty:function(){return"edit"!==vc_user_access().getState("shortcodes")}})}(window.jQuery),function($){"use strict";window.InlineShortcodeViewContainerWithParent=window.InlineShortcodeViewContainer.extend({controls_selector:"#vc_controls-template-container-with-parent",events:{"click > .vc_controls .vc_element .vc_control-btn-delete":"destroy","click > .vc_controls .vc_element .vc_control-btn-edit":"edit","click > .vc_controls .vc_element .vc_control-btn-clone":"clone","click > .vc_controls .vc_element .vc_control-btn-prepend":"prependElement","click > .vc_controls .vc_control-btn-append":"appendElement","click > .vc_controls .vc_parent .vc_control-btn-delete":"destroyParent","click > .vc_controls .vc_parent .vc_control-btn-edit":"editParent","click > .vc_controls .vc_parent .vc_control-btn-clone":"cloneParent","click > .vc_controls .vc_parent .vc_control-btn-prepend":"addSibling","click > .vc_controls .vc_parent .vc_control-btn-layout":"changeLayout","click > .vc_empty-element":"appendElement","click > .vc_controls .vc_control-btn-switcher":"switchControls",mouseenter:"resetActive",mouseleave:"holdActive"},destroyParent:function(e){e&&e.preventDefault&&e.preventDefault(),this.parent_view.destroy(e)},cloneParent:function(e){e&&e.preventDefault&&e.preventDefault(),this.parent_view.clone(e)},editParent:function(e){e&&e.preventDefault&&e.preventDefault(),this.parent_view.edit(e)},addSibling:function(e){e&&e.preventDefault&&e.preventDefault(),this.parent_view.addElement(e)},changeLayout:function(e){e&&e.preventDefault&&e.preventDefault(),this.parent_view.changeLayout(e)},switchControls:function(e){var $parent,$current;e&&e.preventDefault&&e.preventDefault(),vc.unsetHoldActive(),($parent=$(e.currentTarget).parent()).addClass("vc_active"),($current=$parent.siblings(".vc_active")).removeClass("vc_active"),$current.hasClass("vc_element")||window.setTimeout(this.holdActive,500)}})}(window.jQuery),function(){"use strict";window.InlineShortcodeView_vc_section=window.InlineShortcodeViewContainer.extend({controls_selector:"#vc_controls-template-container",initialize:function(){_.bindAll(this,"checkSectionWidth"),window.InlineShortcodeView_vc_section.__super__.initialize.call(this),vc.frame_window.jQuery(vc.frame_window.document).off("vc-full-width-row-single",this.checkSectionWidth),vc.frame_window.jQuery(vc.frame_window.document).on("vc-full-width-row-single",this.checkSectionWidth)},checkSectionWidth:function(e,data){data.el.hasClass("vc_section")&&data.el.attr("data-vc-stretch-content")&&data.el.siblings(".vc_controls").find(".vc_controls-out-tl").css({left:data.offset-17})},render:function(){var $content=this.content();return $content&&$content.hasClass("vc_row-has-fill")&&($content.removeClass("vc_row-has-fill"),this.$el.addClass("vc_row-has-fill")),window.InlineShortcodeView_vc_section.__super__.render.call(this)}})}(),function($){"use strict";window.InlineShortcodeView_vc_row=window.InlineShortcodeView.extend({column_tag:"vc_column",events:{mouseenter:"removeHoldActive"},layout:1,addControls:function(){return this.$controls=$('
'),this.$controls.appendTo(this.$el),this},render:function(){var $content=this.content();return $content&&$content.hasClass("vc_row-has-fill")&&($content.removeClass("vc_row-has-fill"),this.$el.addClass("vc_row-has-fill")),window.InlineShortcodeView_vc_row.__super__.render.call(this),this},removeHoldActive:function(){vc.unsetHoldActive()},addColumn:function(){vc.builder.create({shortcode:this.column_tag,parent_id:this.model.get("id")}).render()},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),this.addColumn()},changeLayout:function(e){e&&e.preventDefault&&e.preventDefault(),this.layoutEditor().render(this.model).show()},layoutEditor:function(){return _.isUndefined(vc.row_layout_editor)&&(vc.row_layout_editor=new vc.RowLayoutUIPanelFrontendEditor({el:$("#vc_ui-panel-row-layout")})),vc.row_layout_editor},convertToWidthsArray:function(string){return _.map(string.split(/_/),function(c){var w=c.split("");return w.splice(Math.floor(c.length/2),0,"/"),w.join("")})},changed:function(){window.InlineShortcodeView_vc_row.__super__.changed.call(this),this.addLayoutClass()},content:function(){return!1===this.$content&&(this.$content=this.$el.find(".vc_container-anchor:first").parent()),this.$el.find(".vc_container-anchor:first").remove(),this.$content},addLayoutClass:function(){this.$el.removeClass("vc_layout_"+this.layout),this.layout=_.reject(vc.shortcodes.where({parent_id:this.model.get("id")}),function(model){return model.get("deleted")}).length,this.$el.addClass("vc_layout_"+this.layout)},convertRowColumns:function(layout,builder){return!!layout&&(columns_contents=[],columns=this.convertToWidthsArray(layout),vc.layout_change_shortcodes=[],vc.layout_old_columns=vc.shortcodes.where({parent_id:this.model.get("id")}),_.each(vc.layout_old_columns,function(column){column.set("deleted",!0),columns_contents.push({shortcodes:vc.shortcodes.where({parent_id:column.get("id")}),params:column.get("params")})}),_.each(columns,function(column){var prev_settings=columns_contents.shift();_.isObject(prev_settings)?(new_model=builder.create({shortcode:this.column_tag,parent_id:this.model.get("id"),order:vc.shortcodes.nextOrder(),params:_.extend({},prev_settings.params,{width:column})}).last(),_.each(prev_settings.shortcodes,function(shortcode){shortcode.save({parent_id:new_model.get("id"),order:vc.shortcodes.nextOrder()},{silent:!0}),vc.layout_change_shortcodes.push(shortcode)},this)):(column_params={width:column},new_model=builder.create({shortcode:this.column_tag,parent_id:this.model.get("id"),order:vc.shortcodes.nextOrder(),params:column_params}).last())},this),_.each(columns_contents,function(column){_.each(column.shortcodes,function(shortcode){shortcode.save({parent_id:new_model.get("id"),order:vc.shortcodes.nextOrder()},{silent:!0}),vc.layout_change_shortcodes.push(shortcode),shortcode.view.rowsColumnsConverted&&shortcode.view.rowsColumnsConverted()},this)},this),builder.render(function(){_.each(vc.layout_change_shortcodes,function(shortcode){shortcode.trigger("change:parent_id"),shortcode.view.rowsColumnsConverted&&shortcode.view.rowsColumnsConverted()}),_.each(vc.layout_old_columns,function(column){column.destroy()}),vc.layout_old_columns=[],vc.layout_change_shortcodes=[]}),columns);var column_params,new_model,columns_contents,columns},allowAddControl:function(){return"edit"!==vc_user_access().getState("shortcodes")},allowAddControlOnEmpty:function(){return"edit"!==vc_user_access().getState("shortcodes")}})}(window.jQuery),function($){"use strict";window.InlineShortcodeView_vc_column=window.InlineShortcodeViewContainerWithParent.extend({controls_selector:"#vc_controls-template-vc_column",resizeDomainName:"columnSize",_x:0,css_width:12,prepend:!1,initialize:function(params){window.InlineShortcodeView_vc_column.__super__.initialize.call(this,params),_.bindAll(this,"startChangeSize","stopChangeSize","resize")},render:function(){return window.InlineShortcodeView_vc_column.__super__.render.call(this),this.prepend=!1,$('
').appendTo(this.$el).mousedown(this.startChangeSize),this.setColumnClasses(),this.customCssClassReplace(),this},destroy:function(e){var parent_id=this.model.get("parent_id");window.InlineShortcodeView_vc_column.__super__.destroy.call(this,e),vc.shortcodes.where({parent_id:parent_id}).length||vc.shortcodes.get(parent_id).destroy()},customCssClassReplace:function(){var css_classes,css_regex,class_match;css_regex=/.*(vc_custom_\d+).*/,(class_match=!(!(css_classes=this.$el.find(".wpb_column").attr("class"))||!css_classes.match)&&css_classes.match(css_regex))&&class_match[1]&&(this.$el.addClass(class_match[1]),this.$el.find(".wpb_column").attr("class",css_classes.replace(class_match[1],"").trim()))},setColumnClasses:function(){var offset,width,$content;offset=this.getParam("offset")||"",width=this.getParam("width")||"1/1",$content=this.$el.find("> .wpb_column"),this.css_class_width=this.convertSize(width),this.css_class_width!==width&&(this.css_class_width=this.css_class_width.replace(/[^\d]/g,"")),$content.removeClass("vc_col-sm-"+this.css_class_width),offset.match(/vc_col\-sm\-\d+/)||this.$el.addClass("vc_col-sm-"+this.css_class_width),vc.responsive_disabled&&(offset=offset.replace(/vc_col\-(lg|md|xs)[^\s]*/g,"")),_.isEmpty(offset)||($content.removeClass(offset),this.$el.addClass(offset))},startChangeSize:function(e){var width=this.getParam(width)||12;this._grid_step=this.parent_view.$el.width()/width,vc.frame_window.jQuery("body").addClass("vc_column-dragging").disableSelection(),this._x=parseInt(e.pageX,10),vc.$page.bind("mousemove."+this.resizeDomainName,this.resize),$(vc.frame_window.document).on("mouseup",this.stopChangeSize)},stopChangeSize:function(){this._x=0,vc.frame_window.jQuery("body").removeClass("vc_column-dragging").enableSelection(),vc.$page.unbind("mousemove."+this.resizeDomainName)},resize:function(e){var old_width,diff,params=this.model.get("params");diff=e.pageX-this._x,Math.abs(diff)
'),this.$controls.appendTo(this.$el),this},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),this.addSection("parent.prepend"===$(e.currentTarget).data("vcControl"))},appendElement:function(e){return this.addElement(e)},prependElement:function(e){return this.addElement(e)},addSection:function(prepend){var params,i;for(params={shortcode:this.childTag,parent_id:this.model.get("id"),isActiveSection:!0,params:{title:this.defaultSectionTitle}},prepend&&(vc.activity="prepend",params.order=this.getSiblingsFirstPositionIndex()),vc.builder.create(params),i=vc.builder.models.length-1;0<=i;i--)vc.builder.models[i].get("shortcode");vc.builder.render()},getSiblingsFirstPositionIndex:function(){var order,first_shortcode;return order=0,(first_shortcode=vc.shortcodes.sort().findWhere({parent_id:this.model.get("id")}))&&(order=first_shortcode.get("order")-1),order},changed:function(){vc.frame_window.vc_iframe.buildTTA(),window.InlineShortcodeView_vc_tta_accordion.__super__.changed.call(this),_.defer(this.buildSortable),this.buildPagination()},updated:function(){window.InlineShortcodeView_vc_tta_accordion.__super__.updated.call(this),_.defer(this.buildSortable),this.buildPagination()},buildSortable:function(){vc_user_access().shortcodeEdit(this.model.get("shortcode"))&&this.$el&&this.$el.find(".vc_tta-panels").sortable({forcePlaceholderSize:!0,placeholder:"vc_placeholder-row",start:this.startSorting,over:function(event,ui){ui.placeholder.css({maxWidth:ui.placeholder.parent().width()}),ui.placeholder.removeClass("vc_hidden-placeholder")},items:"> .vc_element",handle:".vc_tta-panel-heading, .vc_child-element-move",update:this.updateSorting})},startSorting:function(event,ui){ui.placeholder.width(ui.item.width())},updateSorting:function(event,ui){var self=this;this.getPanelsList().find("> .vc_element").each(function(){var model_id,$this;model_id=($this=$(this)).data("modelId"),vc.shortcodes.get(model_id).save({order:self.getIndex($this)},{silent:!0})}),this.buildPagination()},getIndex:function($element){return $element.index()},getPanelsList:function(){return this.$el.find(".vc_tta-panels")},parentChanged:function(){window.InlineShortcodeView_vc_tta_accordion.__super__.parentChanged.call(this),void 0!==vc.frame_window.vc_round_charts&&vc.frame_window.vc_round_charts(this.model.get("id")),void 0!==vc.frame_window.vc_line_charts&&vc.frame_window.vc_line_charts(this.model.get("id"))},buildPagination:function(){},removePagination:function(){this.$el.find(".vc_tta-panels-container").find(" > .vc_pagination").remove()},getPaginationList:function(){var $accordions,classes,style_chunks,that,html,params;return params=this.model.get("params"),!_.isUndefined(params.pagination_style)&¶ms.pagination_style.length?($accordions=this.$el.find("[data-vc-accordion]"),(classes=[]).push("vc_general"),classes.push("vc_pagination"),style_chunks=params.pagination_style.split("-"),classes.push("vc_pagination-style-"+style_chunks[0]),classes.push("vc_pagination-shape-"+style_chunks[1]),!_.isUndefined(params.pagination_color)&¶ms.pagination_color.length&&classes.push("vc_pagination-color-"+params.pagination_color),(html=[]).push('
"),$(html.join(""))):null}})}(window.jQuery),function($){"use strict";window.InlineShortcodeView_vc_tta_tabs=window.InlineShortcodeView_vc_tta_accordion.extend({render:function(){return window.InlineShortcodeView_vc_tta_tabs.__super__.render.call(this),_.bindAll(this,"buildSortableNavigation","updateSortingNavigation"),this.createTabs(),_.defer(this.buildSortableNavigation),this},createTabs:function(){var models=_.sortBy(vc.shortcodes.where({parent_id:this.model.get("id")}),function(model){return model.get("order")});_.each(models,function(model){this.sectionUpdated(model,!0)},this)},defaultSectionTitle:window.i18nLocale.tab,addIcon:function(model,html){var icon,icon_html;return"true"===model.getParam("add_icon")&&(icon=model.getParam("i_icon_"+model.getParam("i_type")),_.isUndefined(icon)||(icon_html='
'),"right"===model.getParam("i_position")?html+=icon_html:html=icon_html+html),html},sectionUpdated:function(model,justAppend){var $tabEl,$navigation,sectionId,html,title,index,tabAdded,$element;(tabAdded=!1,sectionId=model.get("id"),$tabEl=($navigation=this.$el.find(".vc_tta-tabs-container .vc_tta-tabs-list")).find('[data-vc-target="[data-model-id='+sectionId+']"]'),title=model.getParam("title"),$tabEl.length)?(html='
"),!0!==justAppend&&-1<(index=_.pluck(_.sortBy(vc.shortcodes.where({parent_id:this.model.get("id")}),function(childModel){return childModel.get("order")}),"id").indexOf(model.get("id"))-1)&&$navigation.find("[data-vc-tab]:eq("+index+")").length&&($element.insertAfter($navigation.find("[data-vc-tab]:eq("+index+")")),tabAdded=!0),tabAdded||$element.appendTo($navigation),model.get("isActiveSection")&&$element.addClass(this.activeClass));this.buildPagination()},getNextTab:function($viewTab){var lastIndex,viewTabIndex,$navigationSections;return lastIndex=($navigationSections=this.$el.find(".vc_tta-tabs-container .vc_tta-tabs-list").children()).length-1,(viewTabIndex=$viewTab.index())!==lastIndex?$navigationSections.eq(viewTabIndex+1):$navigationSections.eq(viewTabIndex-1)},removeSection:function(modelId){var $viewTab,$nextTab;($viewTab=this.$el.find('.vc_tta-tabs-container .vc_tta-tabs-list [data-vc-target="[data-model-id='+modelId+']"]').parent()).hasClass(this.activeClass)&&($nextTab=this.getNextTab($viewTab),vc.frame_window.jQuery($nextTab).find("[data-vc-target]").trigger("click")),$viewTab.remove(),this.buildPagination()},buildSortableNavigation:function(){vc_user_access().shortcodeEdit(this.model.get("shortcode"))&&this.$el.find(".vc_tta-tabs-container .vc_tta-tabs-list").sortable({items:".vc_tta-tab",forcePlaceholderSize:!0,placeholder:"vc_tta-tab vc_placeholder-tta-tab",helper:this.renderSortingHelper,start:function(event,ui){ui.placeholder.width(ui.item.width())},over:function(event,ui){ui.placeholder.css({maxWidth:ui.placeholder.parent().width()}),ui.placeholder.removeClass("vc_hidden-placeholder")},update:this.updateSortingNavigation})},updateSorting:function(event,ui){window.InlineShortcodeView_vc_tta_tabs.__super__.updateSorting.call(this,event,ui),this.updateTabsPositions(this.getPanelsList())},updateSortingNavigation:function(){var $tabs,self;($tabs=(self=this).$el.find(".vc_tta-tabs-list")).find("> .vc_tta-tab").each(function(){var modelId,$li;modelId=($li=$(this).removeAttr("style")).data("vcTargetModelId"),vc.shortcodes.get(modelId).save({order:self.getIndex($li)},{silent:!0})}),this.updatePanelsPositions($tabs)},updateTabsPositions:function($panels){var $tabs,$elements,tabSortableData;($tabs=this.$el.find(".vc_tta-tabs-list")).length&&($elements=[],tabSortableData=$panels.sortable("toArray",{attribute:"data-model-id"}),_.each(tabSortableData,function(value){$elements.push($tabs.find('[data-vc-target-model-id="'+value+'"]'))},this),$tabs.prepend($elements)),this.buildPagination()},updatePanelsPositions:function($tabs){var $elements,tabSortableData,$panels;$panels=this.getPanelsList(),$elements=[],tabSortableData=$tabs.sortable("toArray",{attribute:"data-vc-target-model-id"}),_.each(tabSortableData,function(value){$elements.push($panels.find('[data-model-id="'+value+'"]'))},this),$panels.prepend($elements),this.buildPagination()},renderSortingHelper:function(event,currentItem){var helper,currentItemWidth,currentItemHeight;return currentItemWidth=(helper=currentItem).width()+1,currentItemHeight=currentItem.height(),helper.width(currentItemWidth),helper.height(currentItemHeight),helper},buildPagination:function(){var params;this.removePagination(),params=this.model.get("params"),!_.isUndefined(params.pagination_style)&¶ms.pagination_style.length&&("top"===params.tab_position?this.$el.find(".vc_tta-panels-container").append(this.getPaginationList()):this.getPaginationList().insertBefore(this.$el.find(".vc_tta-container .vc_tta-panels")))}})}(window.jQuery),function(){"use strict";window.InlineShortcodeView_vc_tta_tour=window.InlineShortcodeView_vc_tta_tabs.extend({defaultSectionTitle:window.i18nLocale.section,buildPagination:function(){this.removePagination();var params=this.model.get("params");!_.isUndefined(params.pagination_style)&¶ms.pagination_style.length&&this.$el.find(".vc_tta-panels-container").append(this.getPaginationList())}})}(),function(){"use strict";window.InlineShortcodeView_vc_tta_pageable=window.InlineShortcodeView_vc_tta_tour.extend({})}(),function($){"use strict";window.vc.ttaSectionActivateOnClone=!1,window.InlineShortcodeView_vc_tta_section=window.InlineShortcodeViewContainerWithParent.extend({events:{'click > .vc_controls [data-vc-control="destroy"]':"destroy",'click > .vc_controls [data-vc-control="edit"]':"edit",'click > .vc_controls [data-vc-control="clone"]':"clone",'click > .vc_controls [data-vc-control="prepend"]':"prependElement",'click > .vc_controls [data-vc-control="append"]':"appendElement",'click > .vc_controls [data-vc-control="parent.destroy"]':"destroyParent",'click > .vc_controls [data-vc-control="parent.edit"]':"editParent",'click > .vc_controls [data-vc-control="parent.clone"]':"cloneParent",'click > .vc_controls [data-vc-control="parent.append"]':"addSibling","click .vc_tta-panel-body > [data-js-panel-body].vc_empty-element":"appendElement","click > .vc_controls .vc_control-btn-switcher":"switchControls",mouseenter:"resetActive",mouseleave:"holdActive"},controls_selector:"#vc_controls-template-vc_tta_section",previousClasses:!1,activeClass:"vc_active",render:function(){var model=this.model;return window.InlineShortcodeView_vc_tta_section.__super__.render.call(this),_.bindAll(this,"bindAccordionEvents"),this.refreshContent(),this.moveClasses(),_.defer(this.bindAccordionEvents),this.isAsActiveSection()&&window.vc.frame_window.vc_iframe.addActivity(function(){window.vc.frame_window.jQuery('[data-vc-accordion][data-vc-target="[data-model-id='+model.get("id")+']"]').trigger("click")}),this},allowAddControl:function(){return vc_user_access().shortcodeAll("vc_tta_section")},clone:function(e){vc.ttaSectionActivateOnClone=!0,window.InlineShortcodeView_vc_tta_section.__super__.clone.call(this,e)},addSibling:function(e){window.InlineShortcodeView_vc_tta_section.__super__.addSibling.call(this,e)},parentChanged:function(){return window.InlineShortcodeView_vc_tta_section.__super__.parentChanged.call(this),this.refreshContent(!0),this},changed:function(){this.allowAddControlOnEmpty()&&0===this.$el.find(".vc_element[data-tag]").length?this.$el.addClass("vc_empty").find(".vc_tta-panel-body > [data-js-panel-body]").addClass("vc_empty-element"):this.$el.removeClass("vc_empty").find(".vc_tta-panel-body > [data-js-panel-body].vc_empty-element").removeClass("vc_empty-element")},moveClasses:function(){var panelClassName;this.previousClasses&&(this.$el.get(0).className=this.$el.get(0).className.replace(this.previousClasses,"")),panelClassName=this.$el.find(".vc_tta-panel").get(0).className,this.$el.attr("data-vc-content",this.$el.find(".vc_tta-panel").data("vcContent")),this.previousClasses=panelClassName,this.$el.find(".vc_tta-panel").get(0).className="",this.$el.get(0).className=this.$el.get(0).className+" "+this.previousClasses,this.$el.find(".vc_tta-panel-title [data-vc-target]").attr("data-vc-target","[data-model-id="+this.model.get("id")+"]")},refreshContent:function(noSectionUpdate){var $controlsIcon,$controlsIconsPositionEl,parentModel,parentParams,paramsMap;parentModel=vc.shortcodes.get(this.model.get("parent_id")),_.isObject(parentModel)&&(paramsMap=vc.getDefaultsAndDependencyMap(parentModel.get("shortcode")),parentParams=_.extend({},paramsMap.defaults,parentModel.get("params")),$controlsIcon=this.$el.find(".vc_tta-controls-icon"),parentParams&&!_.isUndefined(parentParams.c_icon)&&0