Spade

Mini Shell

Directory:~$ /proc/self/root/home/lmsyaran/public_html/css/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/home/lmsyaran/public_html/css/js.zip

PK넋[5$�}
}
sampledata-process.jsnu�[���/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

!(function ($) {
	"use strict";

	var inProgress = false;

	var sampledataAjax = function(type, steps, step) {
		if (step > steps) {
			$('.sampledata-' + type + '
.row-title').append('<span class="icon-publish">
</span>');
			inProgress = false;
			return;
		}
		var stepClass = 'sampledata-steps-' + type + '-' +
step,
			$stepLi = $('<li class="' + stepClass +
'"><p class="loader-image text-center"><img
src="' + window.modSampledataIconProgress + '"
width="30" height="30"
></p></li>'),
			$progress = $(".sampledata-progress-" + type + "
progress");

		$("div.sampledata-progress-" + type + "
ul").append($stepLi);

		var request = $.ajax({
			url: window.modSampledataUrl,
			type: 'POST',
			dataType: 'json',
			data: {
				type: type,
				plugin: 'SampledataApplyStep' + step,
				step: step
			}
		});
		request.done(function(response){
			$stepLi.children('.loader-image').remove();

			if (response.success && response.data &&
response.data.length > 0) {
				var success, value, resultClass, $msg;

				// Display all messages that we got
				for(var i = 0, l = response.data.length; i < l; i++) {
					value   = response.data[i];
					success = value.success;
					resultClass = success ? 'success' : 'error';
					$stepLi.append($('<div>', {
						html: value.message,
						'class': 'alert alert-' + resultClass,
					}));
				}

				// Update progress
				$progress.val(step/steps);

				// Move on next step
				if (success) {
					step++;
					sampledataAjax(type, steps, step);
				}

			} else {
				$stepLi.addClass('alert alert-error');
				$stepLi.html(Joomla.JText._('MOD_SAMPLEDATA_INVALID_RESPONSE'));
				inProgress = false;
			}
		});
		request.fail(function(jqXHR, textStatus){
			alert('Something went wrong! Please close and reopen the browser
and try again!');
		});
	};

	window.sampledataApply = function(el) {
		var $el = $(el), type = $el.data('type'), steps =
$el.data('steps');

		// Check whether the work in progress or we alredy proccessed with
current item
		if (inProgress) {
			return;
		}
		if ($el.data('processed')) {
			alert(Joomla.JText._('MOD_SAMPLEDATA_ITEM_ALREADY_PROCESSED'));
			return;
		}

		// Make sure that use run this not by random clicking on the page links
		if (!confirm(Joomla.JText._('MOD_SAMPLEDATA_CONFIRM_START'))) {
			return false;
		}

		// Turn on the progress container
		$('.sampledata-progress-' + type).show();
		$el.data('processed', true)

		inProgress = true;
		sampledataAjax(type, steps, 1);
		return false;
	};

})(jQuery);
PKH��[�Qb&&overrider.jsnu�[���/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

/**
 * Some state variables for the overrider
 */
Joomla.overrider = {
	states: {
		refreshing  : false,
		refreshed   : false,
		counter     : 0,
		searchstring: '',
		searchtype  : 'value'
	}
};

/**
 * Method for refreshing the database cache of known language strings via
Ajax
 *
 * @return  void
 *
 * @since   2.5
 */
Joomla.overrider.refreshCache = function()
{
	var $ = jQuery.noConflict(), self = this;
	this.states.refreshing = true;

	$('#refresh-status').slideDown().css('display',
'block');

	$.ajax(
	{
		type: "POST",
		url:
'index.php?option=com_languages&task=strings.refresh&format=json',
		dataType: 'json'
	}).done(function (r)
	{
		if (r.error && r.message)
		{
			alert(r.message);
		}

		if (r.messages)
		{
			Joomla.renderMessages(r.messages);
		}

		$('#refresh-status').slideUp().hide();
		self.states.refreshing = false;
	}).fail(function (xhr)
	{
		alert(Joomla.JText._('COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR'));
		$('#refresh-status').slideUp().hide();
	});
};

/**
 * Method for searching known language strings via Ajax
 *
 * @param   more  Determines the limit start of the results
 *
 * @return  void
 *
 * @since   2.5
 */
Joomla.overrider.searchStrings = function(more)
{
	var $ = jQuery.noConflict(), self = this;

	// Prevent searching if the cache is refreshed at the moment
	if (this.states.refreshing)
	{
		return;
	}

	// Only update the used searchstring and searchtype if the search button
	// was used to start the search (that will be the case if 'more'
is null)
	if (!more)
	{
		this.states.searchstring = $('#jform_searchstring').val();
		this.states.searchtype   = $('#jform_searchtype') !== null ?
$('#jform_searchtype').val() : 'value';
	}

	if (!this.states.searchstring)
	{
		$('#jform_searchstring').addClass('invalid');

		return;
	}


	if (more)
	{
		// If 'more' is greater than 0 we have already displayed some
results for
		// the current searchstring, so display the spinner at the more link
		$('#more-results').addClass('overrider-spinner');
	}
	else
	{
		// Otherwise it is a new searchstring and we have to remove all previous
results first
		$('#more-results').hide();
		var $children = $('#results-container div.language-results');
		$children.remove();
		$('#results-container').addClass('overrider-spinner').slideDown().css('display',
'block');
	}

	$.ajax(
	{
		type: "POST",
		url:
'index.php?option=com_languages&task=strings.search&format=json',
		data: 'searchstring=' + self.states.searchstring +
'&searchtype=' + self.states.searchtype +
'&more=' + more,
		dataType: 'json'
	}).done(function (r)
	{
		if (r.error && r.message)
		{
			alert(r.message);
		}

		if (r.messages)
		{
			Joomla.renderMessages(r.messages);
		}

		if (r.data)
		{
			if (r.data.results)
			{
				self.insertResults(r.data.results);
			}

			if (r.data.more)
			{
				// If there are more results than the sent ones
				// display the more link
				self.states.more = r.data.more;
				$('#more-results').slideDown().css('display',
'block');
			}
			else
			{
				$('#more-results').hide();
			}
		}

		$('#results-container').removeClass('overrider-spinner');
		$('#more-results').removeClass('overrider-spinner');
	}).fail(function (xhr)
	{
		alert(Joomla.JText._('COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR'));
		$('#results-container').removeClass('overrider-spinner');
		$('#more-results').removeClass('overrider-spinner');
	});
};

/**
 * Method inserting the received results into the results container
 *
 * @param   results  An array of search result objects
 *
 * @return  void
 *
 * @since   2.5
 */
Joomla.overrider.insertResults = function(results)
{
	var $ = jQuery.noConflict(), self = this;

	// For creating an individual ID for each result we use a counter
	this.states.counter = this.states.counter + 1;

	// Create a container into which all the results will be inserted
	var $results_div = $('<div>', {
		id : 'language-results' + self.states.counter,
		class : 'language-results',
		style : 'display:none;'
	});

	// Create some elements for each result and insert it into the container
	$.each(results, function(index, item) {

		var $div = $('<div>', {
			class: 'result row' + index % 2,
			onclick: 'Joomla.overrider.selectString(' +
self.states.counter + index + ');'
		});

		var $key = $('<div>', {
			id:  'override_key' + self.states.counter + index,
			class: 'result-key',
			html: item.constant,
			title: item.file
		});

		var $string = $('<div>',{
			id: 'override_string' + self.states.counter + index,
			class:	'result-string',
			html: item.string
		});

		$key.appendTo($div);
		$string.appendTo($div);
		$div.appendTo($results_div);

	});

	// If there aren't any results display an appropriate message
	if (!results.length)
	{
		var $noresult = $('<div>',{
			html: Joomla.JText._('COM_LANGUAGES_VIEW_OVERRIDE_NO_RESULTS')
		});
		$noresult.appendTo($results_div);
	}

	// Finally insert the container afore the more link and reveal it
	$('#more-results').before($results_div);
	$('#language-results' +
this.states.counter).slideDown().css('display','block');
};

/**
 * Inserts a specific constant/value pair into the form and scrolls the
page back to the top
 *
 * @param   id  The ID of the element which was selected for insertion
 *
 * @return  void
 *
 * @since   2.5
 */
Joomla.overrider.selectString = function(id)
{
	var $ = jQuery.noConflict();
	$('#jform_key').val($('#override_key' + id).html());
	$('#jform_override').val($('#override_string' +
id).html());
	$(window).scrollTop(0);
};
PKH��[��x���overrider.min.jsnu�[���Joomla.overrider={states:{refreshing:!1,refreshed:!1,counter:0,searchstring:"",searchtype:"value"}},Joomla.overrider.refreshCache=function(){var
a=jQuery.noConflict(),b=this;this.states.refreshing=!0,a("#refresh-status").slideDown().css("display","block"),a.ajax({type:"POST",url:"index.php?option=com_languages&task=strings.refresh&format=json",dataType:"json"}).done(function(c){c.error&&c.message&&alert(c.message),c.messages&&Joomla.renderMessages(c.messages),a("#refresh-status").slideUp().hide(),b.states.refreshing=!1}).fail(function(b){alert(Joomla.JText._("COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR")),a("#refresh-status").slideUp().hide()})},Joomla.overrider.searchStrings=function(a){var
b=jQuery.noConflict(),c=this;if(!this.states.refreshing){if(a||(this.states.searchstring=b("#jform_searchstring").val(),this.states.searchtype=null!==b("#jform_searchtype")?b("#jform_searchtype").val():"value"),!this.states.searchstring)return
void
b("#jform_searchstring").addClass("invalid");if(a)b("#more-results").addClass("overrider-spinner");else{b("#more-results").hide();var
d=b("#results-container
div.language-results");d.remove(),b("#results-container").addClass("overrider-spinner").slideDown().css("display","block")}b.ajax({type:"POST",url:"index.php?option=com_languages&task=strings.search&format=json",data:"searchstring="+c.states.searchstring+"&searchtype="+c.states.searchtype+"&more="+a,dataType:"json"}).done(function(a){a.error&&a.message&&alert(a.message),a.messages&&Joomla.renderMessages(a.messages),a.data&&(a.data.results&&c.insertResults(a.data.results),a.data.more?(c.states.more=a.data.more,b("#more-results").slideDown().css("display","block")):b("#more-results").hide()),b("#results-container").removeClass("overrider-spinner"),b("#more-results").removeClass("overrider-spinner")}).fail(function(a){alert(Joomla.JText._("COM_LANGUAGES_VIEW_OVERRIDE_REQUEST_ERROR")),b("#results-container").removeClass("overrider-spinner"),b("#more-results").removeClass("overrider-spinner")})}},Joomla.overrider.insertResults=function(a){var
b=jQuery.noConflict(),c=this;this.states.counter=this.states.counter+1;var
d=b("<div>",{id:"language-results"+c.states.counter,class:"language-results",style:"display:none;"});if(b.each(a,function(a,e){var
f=b("<div>",{class:"result
row"+a%2,onclick:"Joomla.overrider.selectString("+c.states.counter+a+");"}),g=b("<div>",{id:"override_key"+c.states.counter+a,class:"result-key",html:e.constant,title:e.file}),h=b("<div>",{id:"override_string"+c.states.counter+a,class:"result-string",html:e.string});g.appendTo(f),h.appendTo(f),f.appendTo(d)}),!a.length){var
e=b("<div>",{html:Joomla.JText._("COM_LANGUAGES_VIEW_OVERRIDE_NO_RESULTS")});e.appendTo(d)}b("#more-results").before(d),b("#language-results"+this.states.counter).slideDown().css("display","block")},Joomla.overrider.selectString=function(a){var
b=jQuery.noConflict();b("#jform_key").val(b("#override_key"+a).html()),b("#jform_override").val(b("#override_string"+a).html()),b(window).scrollTop(0)};
PKĝ�[Z�f��main.jsnu�[���jQuery(document).ready(function($){
    $('.owl-carousel').owlCarousel({
        center: false,
        loop: true,
        margin:10,
        nav:true,
        autoplay:true,
        autoplayTimeout:2500,
        autoplayHoverPause:true,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:2
            },
            1000:{
                items:4
            }
        }
    });


});PKĝ�[�0>6�6�owl.carousel.min.jsnu�[���/**
 * Owl Carousel v2.3.4
 * Copyright 2013-2018 David Deutsch
 * Licensed under: SEE LICENSE IN
https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
 */
!function(a,b,c,d){function
e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new
b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var
b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var
b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var
b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var
a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var
a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var
b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else
c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var
a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("),
:eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var
b=this.$element.find(".owl-item");if(b.length)return
this._items=b.get().map(function(b){return
a(b)}),this._mergers=this._items.map(function(){return 1}),void
this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var
a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var
b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof
e.stagePadding&&(e.stagePadding=e.stagePadding()),delete
e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new
RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var
c=this.trigger("prepare",{content:b});return
c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var
b=0,c=this._pipe.length,d=a.proxy(function(a){return
this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case
e.Width.Inner:case e.Width.Outer:return this._width;default:return
this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void
this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core
selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var
d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)|
/g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new
Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core
touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core
touchmove.owl.core",a.proxy(function(b){var
d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core
touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var
b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var
d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new
Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var
e=-1,f=30,g=this.width(),h=this.coordinates();return
this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var
c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?"
"+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return
this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return
this._current;if(0===this._items.length)return
d;if(a=this.normalize(a),this._current!==a){var
b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return
this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return
b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var
c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return
a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var
b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else
if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else
f=e.center?this._items.length-1:this._items.length-e.items;return
a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return
a?0:this._clones.length/2},e.prototype.items=function(a){return
a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return
a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var
c=this._clones.length/2,e=c+this._items.length,f=function(a){return
a%2==0?e+a/2:c-(a+1)/2};return
b===d?a.map(this._clones,function(a,b){return
f(b)}):a.map(this._clones,function(a,c){return
a===b?f(c):null})},e.prototype.speed=function(a){return
a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var
c,e=1,f=b-1;return
b===d?a.map(this._coordinates,a.proxy(function(a,b){return
this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return
0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var
c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var
d;return
this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can
not detect viewport
width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b
instanceof
jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return
1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var
e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b
instanceof
jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new
Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var
d in
this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new
RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var
d=this.settings.rtl;switch(b){case"<":return
d?a>c:a<c;case">":return
d?a<c:a>c;case">=":return
d?a<=c:a>=c;case"<=":return
d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var
h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return
a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return
this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof
this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var
c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else
b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return
a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete
this._supress[b]},this))},e.prototype.pointer=function(a){var
c={x:null,y:null};return
a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var
c=Array.prototype.slice.call(arguments,1);return this.each(function(){var
d=a(this),f=d.data("owl.carousel");f||(f=new
e(this,"object"==typeof
b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof
b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var
a,c;b.clearInterval(this._interval);for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in
Object.getOwnPropertyNames(this))"function"!=typeof
this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel
change.owl.carousel
resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var
c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var
d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var
e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new
Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var
a,b;for(a in
this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel
refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var
d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var
b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var
a,b;for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned
.owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var
c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var
c=function(){return
a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw
new Error("Missing video
URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else
if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw
new Error("Video URL not
supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var
d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div
class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn
"+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return
l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var
c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe
frameborder="0" allowfullscreen mozallowfullscreen
webkitAllowFullScreen
></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div
class="owl-video-frame"
/>').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var
b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return
b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var
a,b;this._core.$element.off("click.owl.video");for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel
dragged.owl.carousel
translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,
animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var
b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated
owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated
owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated
owl-animated-out
owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var
a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b
in Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var
e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new
Date).getTime()-this._time},e.prototype.play=function(c,d){var
e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var
a,b;this.stop();for(a in
this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in
Object.getOwnPropertyNames(this))"function"!=typeof
this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use
strict";var
e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div
class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span
aria-label="Previous">&#x2039;</span>','<span
aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button
type="button"
role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var
b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button
role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var
d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b
in
this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var
a,b,c,d,e;e=this._core.settings;for(a in
this._handlers)this.$element.off(a,this._handlers[a]);for(b in
this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d
in this.overides)this._core[d]=this._overrides[d];for(c in
Object.getOwnPropertyNames(this))"function"!=typeof
this[c]&&(this[c]=null)},e.prototype.update=function(){var
a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var
b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new
Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var
c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var
b=this._core.relative(this._core.current());return
a.grep(this._pages,a.proxy(function(a,c){return
a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var
c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var
e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use
strict";var
e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var
c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var
d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return
a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var
c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var
c,d;a(b).off("hashchange.owl.navigation");for(c in
this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in
Object.getOwnPropertyNames(this))"function"!=typeof
this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function
e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return
a.each((b+" "+h.join(f+" ")+f).split("
"),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function
f(a){return e(a,!0)}var
g=a("<support>").get(0).style,h="Webkit Moz O
ms".split("
"),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new
String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new
String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new
String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);PKEc�[yXL~~admin-modules-modal.jsnu�[���/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

document.addEventListener('DOMContentLoaded', function() {
	"use strict";

	/** Get the elements **/
	var modulesLinks =
document.querySelectorAll('.js-module-insert'), i,
		positionsLinks =
document.querySelectorAll('.js-position-insert');

	/** Assign listener for click event (for single module id insertion) **/
	for (i= 0; modulesLinks.length > i; i++) {
		modulesLinks[i].addEventListener('click', function(event) {
			event.preventDefault();
			var modid = event.target.getAttribute('data-module'),
				editor = event.target.getAttribute('data-editor');

			/** Use the API, if editor supports it **/
			if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
				window.parent.Joomla.editors.instances[editor].replaceSelection("{loadmoduleid
" + modid + "}")
			} else {
				window.parent.jInsertEditorText("{loadmoduleid " + modid +
"}", editor);
			}

			window.parent.jModalClose();
		});
	}

	/** Assign listener for click event (for position insertion) **/
	for (i= 0; positionsLinks.length > i; i++) {
		positionsLinks[i].addEventListener('click', function(event) {
			event.preventDefault();
			var position = event.target.getAttribute('data-position'),
				editor = event.target.getAttribute('data-editor');

			/** Use the API, if editor supports it **/
			if (window.Joomla && window.Joomla.editors &&
Joomla.editors.instances &&
Joomla.editors.instances.hasOwnProperty(editor)) {
				Joomla.editors.instances[editor].replaceSelection("{loadposition
" + position + "}")
			} else {
				window.parent.jInsertEditorText("{loadposition " + position +
"}", editor);
			}

			window.parent.jModalClose();
		});
	}

});
PKEc�[c?�VHHadmin-modules-modal.min.jsnu�[���document.addEventListener('DOMContentLoaded',function(){'use
strict';var
b,a=document.querySelectorAll('.js-module-insert'),c=document.querySelectorAll('.js-position-insert');for(b=0;a.length>b;b++)a[b].addEventListener('click',function(d){d.preventDefault();var
e=d.target.getAttribute('data-module'),f=d.target.getAttribute('data-editor');window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(f)?window.parent.Joomla.editors.instances[f].replaceSelection('{loadmoduleid
'+e+'}'):window.parent.jInsertEditorText('{loadmoduleid
'+e+'}',f),window.parent.jModalClose()});for(b=0;c.length>b;b++)c[b].addEventListener('click',function(d){d.preventDefault();var
e=d.target.getAttribute('data-position'),f=d.target.getAttribute('data-editor');window.Joomla&&window.Joomla.editors&&Joomla.editors.instances&&Joomla.editors.instances.hasOwnProperty(f)?Joomla.editors.instances[f].replaceSelection('{loadposition
'+e+'}'):window.parent.jInsertEditorText('{loadposition
'+e+'}',f),window.parent.jModalClose()})});
PKd�[a>�RRjupdatecheck.jsnu�[���/**
 * @copyright	Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

var plg_quickicon_jupdatecheck_ajax_structure = {};

jQuery(document).ready(function() {
	plg_quickicon_jupdatecheck_ajax_structure = {
		success: function(data, textStatus, jqXHR) {
			var link =
jQuery('#plg_quickicon_joomlaupdate').find('span.j-links-link');

			try {
				var updateInfoList = jQuery.parseJSON(data);
			} catch (e) {
				// An error occurred
				link.html(plg_quickicon_joomlaupdate_text.ERROR);
			}

			if (updateInfoList instanceof Array) {
				if (updateInfoList.length < 1) {
					// No updates
					link.replaceWith(plg_quickicon_joomlaupdate_text.UPTODATE);
				} else {
					var updateInfo = updateInfoList.shift();
					if (updateInfo.version != plg_quickicon_jupdatecheck_jversion) {
						var updateString =
plg_quickicon_joomlaupdate_text.UPDATEFOUND.replace("%s",
'\u200E' + updateInfo.version + "");
						jQuery('#plg_quickicon_joomlaupdate').find('.j-links-link').html(updateString);
						var updateString =
plg_quickicon_joomlaupdate_text.UPDATEFOUND_MESSAGE.replace("%s",
'\u200E' + updateInfo.version + "");
						jQuery('#system-message-container').prepend(
							'<div class="alert alert-error
alert-joomlaupdate">'
							+ updateString
							+ ' <button class="btn btn-primary"
onclick="document.location=\'' +
plg_quickicon_joomlaupdate_url + '\'">'
							+ plg_quickicon_joomlaupdate_text.UPDATEFOUND_BUTTON +
'</button>'
							+ '</div>'
						);
					} else {
						link.html(plg_quickicon_joomlaupdate_text.UPTODATE);
					}
				}
			} else {
				// An error occurred
				link.html(plg_quickicon_joomlaupdate_text.ERROR);
			}
		},
		error: function(jqXHR, textStatus, errorThrown) {
			// An error occurred
			jQuery('#plg_quickicon_joomlaupdate').find('span.j-links-link').html(plg_quickicon_joomlaupdate_text.ERROR);
		},
		url: plg_quickicon_joomlaupdate_ajax_url +
'&eid=700&cache_timeout=3600'
	};
	setTimeout("ajax_object = new
jQuery.ajax(plg_quickicon_jupdatecheck_ajax_structure);", 2000);
});
PK��[t:	��admin_custom_tabs.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��admin_fields.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[��bbadmin_fields_conditions.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




function getFieldSelectOptions_server(fieldId){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json");
	if(token.length > 0 && fieldId > 0){
		var request = token+'=1&id='+fieldId;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}
function getFieldSelectOptions(fieldKey){
	// first check if the field is set
	if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length)
{
		var fieldId =
jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field
option:selected").val();
		getFieldSelectOptions_server(fieldId).done(function(result) {
			if(result){
				jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(result);
			}
			else
			{
				jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val('');
			}
		});
	}
}

 
PK��[6�s0
0
admin_fields_relations.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




jQuery(document).ready(function()
{
	// check and load all the customcode edit buttons
	getEditCustomCodeButtons();
});
// little script to set the value
function getCodeGlueOptions(field) {
	// get the ID
	var id = jQuery(field).attr('id');
	var target = id.split('__');
	//set the subID
	var subID = target[0]+'__'+target[1];
	// get listfield value
	var listfield =
jQuery('#'+subID+'__listfield').val();
	// get type value
	var type = jQuery('#'+subID+'__join_type').val();
	// get area value
	var area = jQuery('#'+subID+'__area').val();
	// check that values are set
	if (_isSet(listfield) && _isSet(type) && _isSet(area)) {
		// get joinfields values
		var joinfields =
jQuery('#'+subID+'__joinfields').val();
		// get codeGlueOptions
		getCodeGlueOptions_server(listfield, joinfields, type,
area).done(function(result) {
			if(result){
				jQuery('#'+subID+'__set').val(result);
			} else {
				jQuery('#'+subID+'__set').val('');
			}
		});
	} else {
		jQuery('#'+subID+'__set').val('');
	}
}

function getCodeGlueOptions_server(listfield, joinfields, type, area){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getCodeGlueOptions&format=json");
	// make sure the joinfields are set
	if (!_isSet(joinfields)) {
		joinfields = 'none';
	}
	if(token.length > 0 && listfield > 0 && type > 0
&& area > 0) {
		var request =
token+'=1&listfield='+listfield+'&type='+type+'&area='+area+'&joinfields='+joinfields;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

// the isSet function
function _isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}
 
PK��[��/q����
admin_view.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvvzvvwj_required = false;
jform_vvvvvzwvwk_required = false;
jform_vvvvwaavwl_required = false;
jform_vvvvwaavwm_required = false;
jform_vvvvwaavwn_required = false;
jform_vvvvwaavwo_required = false;
jform_vvvvwaavwp_required = false;
jform_vvvvwaavwq_required = false;
jform_vvvvwaavwr_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var add_css_view_vvvvvyv = jQuery("#jform_add_css_view
input[type='radio']:checked").val();
	vvvvvyv(add_css_view_vvvvvyv);

	var add_css_views_vvvvvyw = jQuery("#jform_add_css_views
input[type='radio']:checked").val();
	vvvvvyw(add_css_views_vvvvvyw);

	var add_javascript_view_file_vvvvvyx =
jQuery("#jform_add_javascript_view_file
input[type='radio']:checked").val();
	vvvvvyx(add_javascript_view_file_vvvvvyx);

	var add_javascript_views_file_vvvvvyy =
jQuery("#jform_add_javascript_views_file
input[type='radio']:checked").val();
	vvvvvyy(add_javascript_views_file_vvvvvyy);

	var add_javascript_view_footer_vvvvvyz =
jQuery("#jform_add_javascript_view_footer
input[type='radio']:checked").val();
	vvvvvyz(add_javascript_view_footer_vvvvvyz);

	var add_javascript_views_footer_vvvvvza =
jQuery("#jform_add_javascript_views_footer
input[type='radio']:checked").val();
	vvvvvza(add_javascript_views_footer_vvvvvza);

	var add_php_ajax_vvvvvzb = jQuery("#jform_add_php_ajax
input[type='radio']:checked").val();
	vvvvvzb(add_php_ajax_vvvvvzb);

	var add_php_getitem_vvvvvzc = jQuery("#jform_add_php_getitem
input[type='radio']:checked").val();
	vvvvvzc(add_php_getitem_vvvvvzc);

	var add_php_getitems_vvvvvzd = jQuery("#jform_add_php_getitems
input[type='radio']:checked").val();
	vvvvvzd(add_php_getitems_vvvvvzd);

	var add_php_getitems_after_all_vvvvvze =
jQuery("#jform_add_php_getitems_after_all
input[type='radio']:checked").val();
	vvvvvze(add_php_getitems_after_all_vvvvvze);

	var add_php_getlistquery_vvvvvzf =
jQuery("#jform_add_php_getlistquery
input[type='radio']:checked").val();
	vvvvvzf(add_php_getlistquery_vvvvvzf);

	var add_php_getform_vvvvvzg = jQuery("#jform_add_php_getform
input[type='radio']:checked").val();
	vvvvvzg(add_php_getform_vvvvvzg);

	var add_php_before_save_vvvvvzh = jQuery("#jform_add_php_before_save
input[type='radio']:checked").val();
	vvvvvzh(add_php_before_save_vvvvvzh);

	var add_php_save_vvvvvzi = jQuery("#jform_add_php_save
input[type='radio']:checked").val();
	vvvvvzi(add_php_save_vvvvvzi);

	var add_php_postsavehook_vvvvvzj =
jQuery("#jform_add_php_postsavehook
input[type='radio']:checked").val();
	vvvvvzj(add_php_postsavehook_vvvvvzj);

	var add_php_allowadd_vvvvvzk = jQuery("#jform_add_php_allowadd
input[type='radio']:checked").val();
	vvvvvzk(add_php_allowadd_vvvvvzk);

	var add_php_allowedit_vvvvvzl = jQuery("#jform_add_php_allowedit
input[type='radio']:checked").val();
	vvvvvzl(add_php_allowedit_vvvvvzl);

	var add_php_before_cancel_vvvvvzm =
jQuery("#jform_add_php_before_cancel
input[type='radio']:checked").val();
	vvvvvzm(add_php_before_cancel_vvvvvzm);

	var add_php_after_cancel_vvvvvzn =
jQuery("#jform_add_php_after_cancel
input[type='radio']:checked").val();
	vvvvvzn(add_php_after_cancel_vvvvvzn);

	var add_php_batchcopy_vvvvvzo = jQuery("#jform_add_php_batchcopy
input[type='radio']:checked").val();
	vvvvvzo(add_php_batchcopy_vvvvvzo);

	var add_php_batchmove_vvvvvzp = jQuery("#jform_add_php_batchmove
input[type='radio']:checked").val();
	vvvvvzp(add_php_batchmove_vvvvvzp);

	var add_php_before_publish_vvvvvzq =
jQuery("#jform_add_php_before_publish
input[type='radio']:checked").val();
	vvvvvzq(add_php_before_publish_vvvvvzq);

	var add_php_after_publish_vvvvvzr =
jQuery("#jform_add_php_after_publish
input[type='radio']:checked").val();
	vvvvvzr(add_php_after_publish_vvvvvzr);

	var add_php_before_delete_vvvvvzs =
jQuery("#jform_add_php_before_delete
input[type='radio']:checked").val();
	vvvvvzs(add_php_before_delete_vvvvvzs);

	var add_php_after_delete_vvvvvzt =
jQuery("#jform_add_php_after_delete
input[type='radio']:checked").val();
	vvvvvzt(add_php_after_delete_vvvvvzt);

	var add_php_document_vvvvvzu = jQuery("#jform_add_php_document
input[type='radio']:checked").val();
	vvvvvzu(add_php_document_vvvvvzu);

	var add_sql_vvvvvzv = jQuery("#jform_add_sql
input[type='radio']:checked").val();
	vvvvvzv(add_sql_vvvvvzv);

	var source_vvvvvzw = jQuery("#jform_source
input[type='radio']:checked").val();
	var add_sql_vvvvvzw = jQuery("#jform_add_sql
input[type='radio']:checked").val();
	vvvvvzw(source_vvvvvzw,add_sql_vvvvvzw);

	var source_vvvvvzy = jQuery("#jform_source
input[type='radio']:checked").val();
	var add_sql_vvvvvzy = jQuery("#jform_add_sql
input[type='radio']:checked").val();
	vvvvvzy(source_vvvvvzy,add_sql_vvvvvzy);

	var add_custom_import_vvvvwaa = jQuery("#jform_add_custom_import
input[type='radio']:checked").val();
	vvvvwaa(add_custom_import_vvvvwaa);

	var add_custom_import_vvvvwab = jQuery("#jform_add_custom_import
input[type='radio']:checked").val();
	vvvvwab(add_custom_import_vvvvwab);

	var add_custom_button_vvvvwac = jQuery("#jform_add_custom_button
input[type='radio']:checked").val();
	vvvvwac(add_custom_button_vvvvwac);
});

// the vvvvvyv function
function vvvvvyv(add_css_view_vvvvvyv)
{
	// set the function logic
	if (add_css_view_vvvvvyv == 1)
	{
		jQuery('#jform_css_view-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_view-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyw function
function vvvvvyw(add_css_views_vvvvvyw)
{
	// set the function logic
	if (add_css_views_vvvvvyw == 1)
	{
		jQuery('#jform_css_views-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_views-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyx function
function vvvvvyx(add_javascript_view_file_vvvvvyx)
{
	// set the function logic
	if (add_javascript_view_file_vvvvvyx == 1)
	{
		jQuery('#jform_javascript_view_file-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_view_file-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyy function
function vvvvvyy(add_javascript_views_file_vvvvvyy)
{
	// set the function logic
	if (add_javascript_views_file_vvvvvyy == 1)
	{
		jQuery('#jform_javascript_views_file-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_views_file-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyz function
function vvvvvyz(add_javascript_view_footer_vvvvvyz)
{
	// set the function logic
	if (add_javascript_view_footer_vvvvvyz == 1)
	{
		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
	}
}

// the vvvvvza function
function vvvvvza(add_javascript_views_footer_vvvvvza)
{
	// set the function logic
	if (add_javascript_views_footer_vvvvvza == 1)
	{
		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzb function
function vvvvvzb(add_php_ajax_vvvvvzb)
{
	// set the function logic
	if (add_php_ajax_vvvvvzb == 1)
	{
		jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzc function
function vvvvvzc(add_php_getitem_vvvvvzc)
{
	// set the function logic
	if (add_php_getitem_vvvvvzc == 1)
	{
		jQuery('#jform_php_getitem-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_getitem-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzd function
function vvvvvzd(add_php_getitems_vvvvvzd)
{
	// set the function logic
	if (add_php_getitems_vvvvvzd == 1)
	{
		jQuery('#jform_php_getitems-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_getitems-lbl').closest('.control-group').hide();
	}
}

// the vvvvvze function
function vvvvvze(add_php_getitems_after_all_vvvvvze)
{
	// set the function logic
	if (add_php_getitems_after_all_vvvvvze == 1)
	{
		jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_getitems_after_all-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzf function
function vvvvvzf(add_php_getlistquery_vvvvvzf)
{
	// set the function logic
	if (add_php_getlistquery_vvvvvzf == 1)
	{
		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzg function
function vvvvvzg(add_php_getform_vvvvvzg)
{
	// set the function logic
	if (add_php_getform_vvvvvzg == 1)
	{
		jQuery('#jform_php_getform-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_getform-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzh function
function vvvvvzh(add_php_before_save_vvvvvzh)
{
	// set the function logic
	if (add_php_before_save_vvvvvzh == 1)
	{
		jQuery('#jform_php_before_save-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_before_save-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzi function
function vvvvvzi(add_php_save_vvvvvzi)
{
	// set the function logic
	if (add_php_save_vvvvvzi == 1)
	{
		jQuery('#jform_php_save-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_save-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzj function
function vvvvvzj(add_php_postsavehook_vvvvvzj)
{
	// set the function logic
	if (add_php_postsavehook_vvvvvzj == 1)
	{
		jQuery('#jform_php_postsavehook-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postsavehook-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzk function
function vvvvvzk(add_php_allowadd_vvvvvzk)
{
	// set the function logic
	if (add_php_allowadd_vvvvvzk == 1)
	{
		jQuery('#jform_php_allowadd-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_allowadd-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzl function
function vvvvvzl(add_php_allowedit_vvvvvzl)
{
	// set the function logic
	if (add_php_allowedit_vvvvvzl == 1)
	{
		jQuery('#jform_php_allowedit-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_allowedit-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzm function
function vvvvvzm(add_php_before_cancel_vvvvvzm)
{
	// set the function logic
	if (add_php_before_cancel_vvvvvzm == 1)
	{
		jQuery('#jform_php_before_cancel-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_before_cancel-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzn function
function vvvvvzn(add_php_after_cancel_vvvvvzn)
{
	// set the function logic
	if (add_php_after_cancel_vvvvvzn == 1)
	{
		jQuery('#jform_php_after_cancel-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_after_cancel-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzo function
function vvvvvzo(add_php_batchcopy_vvvvvzo)
{
	// set the function logic
	if (add_php_batchcopy_vvvvvzo == 1)
	{
		jQuery('#jform_php_batchcopy-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_batchcopy-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzp function
function vvvvvzp(add_php_batchmove_vvvvvzp)
{
	// set the function logic
	if (add_php_batchmove_vvvvvzp == 1)
	{
		jQuery('#jform_php_batchmove-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_batchmove-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzq function
function vvvvvzq(add_php_before_publish_vvvvvzq)
{
	// set the function logic
	if (add_php_before_publish_vvvvvzq == 1)
	{
		jQuery('#jform_php_before_publish-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_before_publish-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzr function
function vvvvvzr(add_php_after_publish_vvvvvzr)
{
	// set the function logic
	if (add_php_after_publish_vvvvvzr == 1)
	{
		jQuery('#jform_php_after_publish-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_after_publish-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzs function
function vvvvvzs(add_php_before_delete_vvvvvzs)
{
	// set the function logic
	if (add_php_before_delete_vvvvvzs == 1)
	{
		jQuery('#jform_php_before_delete-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_before_delete-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzt function
function vvvvvzt(add_php_after_delete_vvvvvzt)
{
	// set the function logic
	if (add_php_after_delete_vvvvvzt == 1)
	{
		jQuery('#jform_php_after_delete-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_after_delete-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzu function
function vvvvvzu(add_php_document_vvvvvzu)
{
	// set the function logic
	if (add_php_document_vvvvvzu == 1)
	{
		jQuery('#jform_php_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvvzv function
function vvvvvzv(add_sql_vvvvvzv)
{
	// set the function logic
	if (add_sql_vvvvvzv == 1)
	{
		jQuery('#jform_source').closest('.control-group').show();
		// add required attribute to source field
		if (jform_vvvvvzvvwj_required)
		{
			updateFieldRequired('source',0);
			jQuery('#jform_source').prop('required','required');
			jQuery('#jform_source').attr('aria-required',true);
			jQuery('#jform_source').addClass('required');
			jform_vvvvvzvvwj_required = false;
		}
	}
	else
	{
		jQuery('#jform_source').closest('.control-group').hide();
		// remove required attribute from source field
		if (!jform_vvvvvzvvwj_required)
		{
			updateFieldRequired('source',1);
			jQuery('#jform_source').removeAttr('required');
			jQuery('#jform_source').removeAttr('aria-required');
			jQuery('#jform_source').removeClass('required');
			jform_vvvvvzvvwj_required = true;
		}
	}
}

// the vvvvvzw function
function vvvvvzw(source_vvvvvzw,add_sql_vvvvvzw)
{
	// set the function logic
	if (source_vvvvvzw == 2 && add_sql_vvvvvzw == 1)
	{
		jQuery('#jform_sql').closest('.control-group').show();
		// add required attribute to sql field
		if (jform_vvvvvzwvwk_required)
		{
			updateFieldRequired('sql',0);
			jQuery('#jform_sql').prop('required','required');
			jQuery('#jform_sql').attr('aria-required',true);
			jQuery('#jform_sql').addClass('required');
			jform_vvvvvzwvwk_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql').closest('.control-group').hide();
		// remove required attribute from sql field
		if (!jform_vvvvvzwvwk_required)
		{
			updateFieldRequired('sql',1);
			jQuery('#jform_sql').removeAttr('required');
			jQuery('#jform_sql').removeAttr('aria-required');
			jQuery('#jform_sql').removeClass('required');
			jform_vvvvvzwvwk_required = true;
		}
	}
}

// the vvvvvzy function
function vvvvvzy(source_vvvvvzy,add_sql_vvvvvzy)
{
	// set the function logic
	if (source_vvvvvzy == 1 && add_sql_vvvvvzy == 1)
	{
		jQuery('#jform_addtables-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_addtables-lbl').closest('.control-group').hide();
	}
}

// the vvvvwaa function
function vvvvwaa(add_custom_import_vvvvwaa)
{
	// set the function logic
	if (add_custom_import_vvvvwaa == 1)
	{
		jQuery('#jform_html_import_view').closest('.control-group').show();
		// add required attribute to html_import_view field
		if (jform_vvvvwaavwl_required)
		{
			updateFieldRequired('html_import_view',0);
			jQuery('#jform_html_import_view').prop('required','required');
			jQuery('#jform_html_import_view').attr('aria-required',true);
			jQuery('#jform_html_import_view').addClass('required');
			jform_vvvvwaavwl_required = false;
		}
		jQuery('.note_advanced_import').closest('.control-group').show();
		jQuery('#jform_php_import_display').closest('.control-group').show();
		// add required attribute to php_import_display field
		if (jform_vvvvwaavwm_required)
		{
			updateFieldRequired('php_import_display',0);
			jQuery('#jform_php_import_display').prop('required','required');
			jQuery('#jform_php_import_display').attr('aria-required',true);
			jQuery('#jform_php_import_display').addClass('required');
			jform_vvvvwaavwm_required = false;
		}
		jQuery('#jform_php_import_ext').closest('.control-group').show();
		// add required attribute to php_import_ext field
		if (jform_vvvvwaavwn_required)
		{
			updateFieldRequired('php_import_ext',0);
			jQuery('#jform_php_import_ext').prop('required','required');
			jQuery('#jform_php_import_ext').attr('aria-required',true);
			jQuery('#jform_php_import_ext').addClass('required');
			jform_vvvvwaavwn_required = false;
		}
		jQuery('#jform_php_import_headers').closest('.control-group').show();
		// add required attribute to php_import_headers field
		if (jform_vvvvwaavwo_required)
		{
			updateFieldRequired('php_import_headers',0);
			jQuery('#jform_php_import_headers').prop('required','required');
			jQuery('#jform_php_import_headers').attr('aria-required',true);
			jQuery('#jform_php_import_headers').addClass('required');
			jform_vvvvwaavwo_required = false;
		}
		jQuery('#jform_php_import').closest('.control-group').show();
		// add required attribute to php_import field
		if (jform_vvvvwaavwp_required)
		{
			updateFieldRequired('php_import',0);
			jQuery('#jform_php_import').prop('required','required');
			jQuery('#jform_php_import').attr('aria-required',true);
			jQuery('#jform_php_import').addClass('required');
			jform_vvvvwaavwp_required = false;
		}
		jQuery('#jform_php_import_save').closest('.control-group').show();
		// add required attribute to php_import_save field
		if (jform_vvvvwaavwq_required)
		{
			updateFieldRequired('php_import_save',0);
			jQuery('#jform_php_import_save').prop('required','required');
			jQuery('#jform_php_import_save').attr('aria-required',true);
			jQuery('#jform_php_import_save').addClass('required');
			jform_vvvvwaavwq_required = false;
		}
		jQuery('#jform_php_import_setdata').closest('.control-group').show();
		// add required attribute to php_import_setdata field
		if (jform_vvvvwaavwr_required)
		{
			updateFieldRequired('php_import_setdata',0);
			jQuery('#jform_php_import_setdata').prop('required','required');
			jQuery('#jform_php_import_setdata').attr('aria-required',true);
			jQuery('#jform_php_import_setdata').addClass('required');
			jform_vvvvwaavwr_required = false;
		}
	}
	else
	{
		jQuery('#jform_html_import_view').closest('.control-group').hide();
		// remove required attribute from html_import_view field
		if (!jform_vvvvwaavwl_required)
		{
			updateFieldRequired('html_import_view',1);
			jQuery('#jform_html_import_view').removeAttr('required');
			jQuery('#jform_html_import_view').removeAttr('aria-required');
			jQuery('#jform_html_import_view').removeClass('required');
			jform_vvvvwaavwl_required = true;
		}
		jQuery('.note_advanced_import').closest('.control-group').hide();
		jQuery('#jform_php_import_display').closest('.control-group').hide();
		// remove required attribute from php_import_display field
		if (!jform_vvvvwaavwm_required)
		{
			updateFieldRequired('php_import_display',1);
			jQuery('#jform_php_import_display').removeAttr('required');
			jQuery('#jform_php_import_display').removeAttr('aria-required');
			jQuery('#jform_php_import_display').removeClass('required');
			jform_vvvvwaavwm_required = true;
		}
		jQuery('#jform_php_import_ext').closest('.control-group').hide();
		// remove required attribute from php_import_ext field
		if (!jform_vvvvwaavwn_required)
		{
			updateFieldRequired('php_import_ext',1);
			jQuery('#jform_php_import_ext').removeAttr('required');
			jQuery('#jform_php_import_ext').removeAttr('aria-required');
			jQuery('#jform_php_import_ext').removeClass('required');
			jform_vvvvwaavwn_required = true;
		}
		jQuery('#jform_php_import_headers').closest('.control-group').hide();
		// remove required attribute from php_import_headers field
		if (!jform_vvvvwaavwo_required)
		{
			updateFieldRequired('php_import_headers',1);
			jQuery('#jform_php_import_headers').removeAttr('required');
			jQuery('#jform_php_import_headers').removeAttr('aria-required');
			jQuery('#jform_php_import_headers').removeClass('required');
			jform_vvvvwaavwo_required = true;
		}
		jQuery('#jform_php_import').closest('.control-group').hide();
		// remove required attribute from php_import field
		if (!jform_vvvvwaavwp_required)
		{
			updateFieldRequired('php_import',1);
			jQuery('#jform_php_import').removeAttr('required');
			jQuery('#jform_php_import').removeAttr('aria-required');
			jQuery('#jform_php_import').removeClass('required');
			jform_vvvvwaavwp_required = true;
		}
		jQuery('#jform_php_import_save').closest('.control-group').hide();
		// remove required attribute from php_import_save field
		if (!jform_vvvvwaavwq_required)
		{
			updateFieldRequired('php_import_save',1);
			jQuery('#jform_php_import_save').removeAttr('required');
			jQuery('#jform_php_import_save').removeAttr('aria-required');
			jQuery('#jform_php_import_save').removeClass('required');
			jform_vvvvwaavwq_required = true;
		}
		jQuery('#jform_php_import_setdata').closest('.control-group').hide();
		// remove required attribute from php_import_setdata field
		if (!jform_vvvvwaavwr_required)
		{
			updateFieldRequired('php_import_setdata',1);
			jQuery('#jform_php_import_setdata').removeAttr('required');
			jQuery('#jform_php_import_setdata').removeAttr('aria-required');
			jQuery('#jform_php_import_setdata').removeClass('required');
			jform_vvvvwaavwr_required = true;
		}
	}
}

// the vvvvwab function
function vvvvwab(add_custom_import_vvvvwab)
{
	// set the function logic
	if (add_custom_import_vvvvwab == 0)
	{
		jQuery('.note_beginner_import').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_beginner_import').closest('.control-group').hide();
	}
}

// the vvvvwac function
function vvvvwac(add_custom_button_vvvvwac)
{
	// set the function logic
	if (add_custom_button_vvvvwac == 1)
	{
		jQuery('#jform_custom_button-lbl').closest('.control-group').show();
		jQuery('#jform_php_controller-lbl').closest('.control-group').show();
		jQuery('#jform_php_controller_list-lbl').closest('.control-group').show();
		jQuery('#jform_php_model-lbl').closest('.control-group').show();
		jQuery('#jform_php_model_list-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
		jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
		jQuery('#jform_php_controller_list-lbl').closest('.control-group').hide();
		jQuery('#jform_php_model-lbl').closest('.control-group').hide();
		jQuery('#jform_php_model_list-lbl').closest('.control-group').hide();
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// check if this view has alias field
	checkAliasField();
	// check if this view has category field
	checkCategoryField();
	// get the linked details
	getLinked();
	// set button
	addButtonID('admin_fields','create_edit_buttons', 1);
// <-- first
	var valueSwitch = jQuery("#jform_add_custom_import
input[type='radio']:checked").val();
	getDynamicScripts(valueSwitch);
	// now load the fields
	getAjaxDisplay('admin_fields');
	getAjaxDisplay('admin_fields_conditions');
	getAjaxDisplay('admin_fields_relations');
	// set button
	addButtonID('admin_fields_conditions','create_edit_buttons',
1); // <-- second
	// set button to create more fields
	addButton('field','create_edit_buttons'); // <--
third
	// set button
	addButtonID('admin_fields_relations','create_edit_buttons',
1); // <-- forth
	// set button
	addButtonID('admin_custom_tabs','addtabs-lbl', 1); //
<-- fifth
	// check and load all the customcode edit buttons
	getEditCustomCodeButtons();
});

function checkAliasField() {
	getCodeFrom_server(1, 'type', 'type',
'checkAliasField').done(function(result) {
		if(result){
			// remove the notice
			jQuery('.note_create_edit_notice_p').remove();
		} else {
			// hide everything about alias management
			jQuery('#jform_alias_builder_type').closest('.control-group').remove();
			jQuery('#jform_alias_builder').closest('.control-group').remove();
			jQuery('.note_alias_builder_default').closest('.control-group').remove();
			jQuery('.note_alias_builder_custom').closest('.control-group').remove();
		}
	});
}

function checkCategoryField() {
	getCodeFrom_server(1, 'type', 'type',
'checkCategoryField').done(function(result) {
		if(result){
			// remove the notice
			jQuery('.note_create_edit_notice_p').remove();
		} else {
			// hide everything about category management
			jQuery('#jform_add_category_submenu').closest('.control-group').remove();
			jQuery('.note_category_menu_switch').closest('.control-group').remove();
		}
	});
}

function getAjaxDisplay(type){
	getCodeFrom_server(1, type, 'type',
'getAjaxDisplay').done(function(result) {
		if(result){
			jQuery('#display_'+type).html(result);
		}
		// set button
		addButtonID(type,'header_'+type+'_buttons', 2); //
<-- little edit button
	});
}

function addData(result,where){
	jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}

function getTableColumns(fieldKey, table_, nr_){
	// first check if the field is set
	if(jQuery("#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_table").length)
{
		// get options
		var tableName =
jQuery("#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_table
option:selected").val();
		getCodeFrom_server(1, tableName, 'table',
'tableColumns').done(function(result) {
			if(result){
				jQuery("textarea#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_sourcemap").val(result);
			} else {
				jQuery("textarea#jform_addtables_"+table_+"addtables"+fieldKey+nr_+"_sourcemap").val('');
			}
		});
	}
}

function getDynamicScripts(id){
	if (1 == id) {
		// get the current values
		var current_import_display =
jQuery('textarea#jform_php_import_display').val();
		var current_import =
jQuery('textarea#jform_php_import').val();
		var current_headers =
jQuery('textarea#jform_php_import_headers').val();
		var current_setdata =
jQuery('textarea#jform_php_import_setdata').val();
		var current_save =
jQuery('textarea#jform_php_import_save').val();
		var current_view =
jQuery('textarea#jform_html_import_view').val();
		var current_ext =
jQuery('textarea#jform_php_import_ext').val();
		// set the display method script
		if(current_import_display.length == 0){
			getCodeFrom_server(1, 'display', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_import_display').val(result);
				}
			});
		}
		// set the import method script
		if(current_import.length == 0){
			getCodeFrom_server(1, 'import', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_import').val(result);
				}
			});
		}
		// set the headers method script
		if(current_headers.length == 0){
			getCodeFrom_server(1, 'headers', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_import_headers').val(result);
				}
			});
		}
		// set the setData method script
		if(current_setdata.length == 0){
			getCodeFrom_server(1, 'setdata', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_import_setdata').val(result);
				}
			});
		}
		// set the save method script
		if(current_save.length == 0){
			getCodeFrom_server(1, 'save', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_import_save').val(result);
				}
			});
		}
		// set the view script
		if(current_view.length == 0){
			getCodeFrom_server(1, 'view', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_html_import_view').val(result);
				}
			});
		}
		// set the import ext script
		if(current_ext.length == 0){
			getCodeFrom_server(1, 'ext', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_import_ext').val(result);
				}
			});
		}
	}
}

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function addButtonID_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0 && size >
0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButtonID(type, where, size){
	addButtonID_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	});
}

function addButton_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButton(type, where, size){
	// just to insure that default behaviour still works
	size = typeof size !== 'undefined' ? size : 1;
	addButton_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	})
}

function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
} 
PK��[���class_extends.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




jQuery(document).ready(function()
{
	// load the used in div
	// jQuery('#usedin').show();
	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
});

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[����%%class_method.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwcgvxk_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var extension_type_vvvvwcg =
jQuery("#jform_extension_type").val();
	vvvvwcg(extension_type_vvvvwcg);
});

// the vvvvwcg function
function vvvvwcg(extension_type_vvvvwcg)
{
	if (isSet(extension_type_vvvvwcg) &&
extension_type_vvvvwcg.constructor !== Array)
	{
		var temp_vvvvwcg = extension_type_vvvvwcg;
		var extension_type_vvvvwcg = [];
		extension_type_vvvvwcg.push(temp_vvvvwcg);
	}
	else if (!isSet(extension_type_vvvvwcg))
	{
		var extension_type_vvvvwcg = [];
	}
	var extension_type =
extension_type_vvvvwcg.some(extension_type_vvvvwcg_SomeFunc);


	// set this function logic
	if (extension_type)
	{
		jQuery('#jform_joomla_plugin_group').closest('.control-group').show();
		// add required attribute to joomla_plugin_group field
		if (jform_vvvvwcgvxk_required)
		{
			updateFieldRequired('joomla_plugin_group',0);
			jQuery('#jform_joomla_plugin_group').prop('required','required');
			jQuery('#jform_joomla_plugin_group').attr('aria-required',true);
			jQuery('#jform_joomla_plugin_group').addClass('required');
			jform_vvvvwcgvxk_required = false;
		}
	}
	else
	{
		jQuery('#jform_joomla_plugin_group').closest('.control-group').hide();
		// remove required attribute from joomla_plugin_group field
		if (!jform_vvvvwcgvxk_required)
		{
			updateFieldRequired('joomla_plugin_group',1);
			jQuery('#jform_joomla_plugin_group').removeAttr('required');
			jQuery('#jform_joomla_plugin_group').removeAttr('aria-required');
			jQuery('#jform_joomla_plugin_group').removeClass('required');
			jform_vvvvwcgvxk_required = true;
		}
	}
}

// the vvvvwcg Some function
function extension_type_vvvvwcg_SomeFunc(extension_type_vvvvwcg)
{
	// set the function logic
	if (extension_type_vvvvwcg == 'plugins' ||
extension_type_vvvvwcg == 'plugin')
	{
		return true;
	}
	return false;
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// load the used in div
	// jQuery('#usedin').show();
	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
});

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[$���%%class_property.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwcfvxj_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var extension_type_vvvvwcf =
jQuery("#jform_extension_type").val();
	vvvvwcf(extension_type_vvvvwcf);
});

// the vvvvwcf function
function vvvvwcf(extension_type_vvvvwcf)
{
	if (isSet(extension_type_vvvvwcf) &&
extension_type_vvvvwcf.constructor !== Array)
	{
		var temp_vvvvwcf = extension_type_vvvvwcf;
		var extension_type_vvvvwcf = [];
		extension_type_vvvvwcf.push(temp_vvvvwcf);
	}
	else if (!isSet(extension_type_vvvvwcf))
	{
		var extension_type_vvvvwcf = [];
	}
	var extension_type =
extension_type_vvvvwcf.some(extension_type_vvvvwcf_SomeFunc);


	// set this function logic
	if (extension_type)
	{
		jQuery('#jform_joomla_plugin_group').closest('.control-group').show();
		// add required attribute to joomla_plugin_group field
		if (jform_vvvvwcfvxj_required)
		{
			updateFieldRequired('joomla_plugin_group',0);
			jQuery('#jform_joomla_plugin_group').prop('required','required');
			jQuery('#jform_joomla_plugin_group').attr('aria-required',true);
			jQuery('#jform_joomla_plugin_group').addClass('required');
			jform_vvvvwcfvxj_required = false;
		}
	}
	else
	{
		jQuery('#jform_joomla_plugin_group').closest('.control-group').hide();
		// remove required attribute from joomla_plugin_group field
		if (!jform_vvvvwcfvxj_required)
		{
			updateFieldRequired('joomla_plugin_group',1);
			jQuery('#jform_joomla_plugin_group').removeAttr('required');
			jQuery('#jform_joomla_plugin_group').removeAttr('aria-required');
			jQuery('#jform_joomla_plugin_group').removeClass('required');
			jform_vvvvwcfvxj_required = true;
		}
	}
}

// the vvvvwcf Some function
function extension_type_vvvvwcf_SomeFunc(extension_type_vvvvwcf)
{
	// set the function logic
	if (extension_type_vvvvwcf == 'plugins' ||
extension_type_vvvvwcf == 'plugin')
	{
		return true;
	}
	return false;
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// load the used in div
	// jQuery('#usedin').show();
	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
});

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[t:	��component_admin_views.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_config.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_custom_admin_menus.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_custom_admin_views.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[�d���component_dashboard.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




jQuery(document).ready(function()
{
	// check and load all the customcode edit buttons
	getEditCustomCodeButtons();
});

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[t:	��component_files_folders.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_modules.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_mysql_tweaks.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_placeholders.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_plugins.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_site_views.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��component_updates.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[(S��.�.custom_admin_view.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Initial Script
jQuery(document).ready(function()
{
	var add_php_view_vvvvwad = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
	vvvvwad(add_php_view_vvvvwad);

	var add_php_jview_display_vvvvwae =
jQuery("#jform_add_php_jview_display
input[type='radio']:checked").val();
	vvvvwae(add_php_jview_display_vvvvwae);

	var add_php_jview_vvvvwaf = jQuery("#jform_add_php_jview
input[type='radio']:checked").val();
	vvvvwaf(add_php_jview_vvvvwaf);

	var add_php_document_vvvvwag = jQuery("#jform_add_php_document
input[type='radio']:checked").val();
	vvvvwag(add_php_document_vvvvwag);

	var add_css_document_vvvvwah = jQuery("#jform_add_css_document
input[type='radio']:checked").val();
	vvvvwah(add_css_document_vvvvwah);

	var add_javascript_file_vvvvwai = jQuery("#jform_add_javascript_file
input[type='radio']:checked").val();
	vvvvwai(add_javascript_file_vvvvwai);

	var add_js_document_vvvvwaj = jQuery("#jform_add_js_document
input[type='radio']:checked").val();
	vvvvwaj(add_js_document_vvvvwaj);

	var add_custom_button_vvvvwak = jQuery("#jform_add_custom_button
input[type='radio']:checked").val();
	vvvvwak(add_custom_button_vvvvwak);

	var add_css_vvvvwal = jQuery("#jform_add_css
input[type='radio']:checked").val();
	vvvvwal(add_css_vvvvwal);

	var add_php_ajax_vvvvwam = jQuery("#jform_add_php_ajax
input[type='radio']:checked").val();
	vvvvwam(add_php_ajax_vvvvwam);
});

// the vvvvwad function
function vvvvwad(add_php_view_vvvvwad)
{
	// set the function logic
	if (add_php_view_vvvvwad == 1)
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
	}
}

// the vvvvwae function
function vvvvwae(add_php_jview_display_vvvvwae)
{
	// set the function logic
	if (add_php_jview_display_vvvvwae == 1)
	{
		jQuery('#jform_php_jview_display-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide();
	}
}

// the vvvvwaf function
function vvvvwaf(add_php_jview_vvvvwaf)
{
	// set the function logic
	if (add_php_jview_vvvvwaf == 1)
	{
		jQuery('#jform_php_jview-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_jview-lbl').closest('.control-group').hide();
	}
}

// the vvvvwag function
function vvvvwag(add_php_document_vvvvwag)
{
	// set the function logic
	if (add_php_document_vvvvwag == 1)
	{
		jQuery('#jform_php_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvwah function
function vvvvwah(add_css_document_vvvvwah)
{
	// set the function logic
	if (add_css_document_vvvvwah == 1)
	{
		jQuery('#jform_css_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvwai function
function vvvvwai(add_javascript_file_vvvvwai)
{
	// set the function logic
	if (add_javascript_file_vvvvwai == 1)
	{
		jQuery('#jform_javascript_file-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_file-lbl').closest('.control-group').hide();
	}
}

// the vvvvwaj function
function vvvvwaj(add_js_document_vvvvwaj)
{
	// set the function logic
	if (add_js_document_vvvvwaj == 1)
	{
		jQuery('#jform_js_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_js_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvwak function
function vvvvwak(add_custom_button_vvvvwak)
{
	// set the function logic
	if (add_custom_button_vvvvwak == 1)
	{
		jQuery('#jform_custom_button-lbl').closest('.control-group').show();
		jQuery('#jform_php_controller-lbl').closest('.control-group').show();
		jQuery('#jform_php_model-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
		jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
		jQuery('#jform_php_model-lbl').closest('.control-group').hide();
	}
}

// the vvvvwal function
function vvvvwal(add_css_vvvvwal)
{
	// set the function logic
	if (add_css_vvvvwal == 1)
	{
		jQuery('#jform_css-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css-lbl').closest('.control-group').hide();
	}
}

// the vvvvwam function
function vvvvwam(add_php_ajax_vvvvwam)
{
	// set the function logic
	if (add_php_ajax_vvvvwam == 1)
	{
		jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
	}
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// get the linked details
	getLinked();
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
}

function getSnippetDetails(id){
	getCodeFrom_server(id, '_type', '_type',
'snippetDetails').done(function(result) {
		if(result.snippet){
			var description = '';
			if (result.description.length > 0) {
				description =
'<p>'+result.description+'</p>';
			}
			var library = '';
			if (result.library.length > 0) {
				library = '
<b>('+result.library+')</b>';
			}
			var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea  id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
			jQuery('#snippet-code').remove();
			jQuery('.snippet-code').append(code);
			// make sure the code block is active
			jQuery("#snippet").focus(function() {
				var jQuerythis = jQuery(this);
				jQuerythis.select();
			
				// Work around Chrome's little problem
				jQuerythis.mouseup(function() {
					// Prevent further mouseup intervention
					jQuerythis.unbind("mouseup");
					return false;
				});
			});
		}
		if(result.usage){
			var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
			jQuery('#snippet-usage').remove();
			jQuery('.snippet-usage').append(usage);
		}
	})
}

function getDynamicValues_server(dynamicId){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
	if(token.length > 0 && dynamicId > 0){
		var request =
token+'=1&view=custom_admin_view&id='+dynamicId;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getDynamicValues(id){
	getDynamicValues_server(id).done(function(result) {
		if(result){
			jQuery('#dynamic_values').remove();
			jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getLayoutDetails_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request = token+'=1&id='+id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getLayoutDetails(id){
	getLayoutDetails_server(id).done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getTemplateDetails(id){
	getCodeFrom_server(id, 'type', 'type',
'templateDetails').done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
	jQuery("#jform_snippet option").each(function()
	{
		var key =  jQuery(this).val();
		var text =  jQuery(this).text();
		snippets[key] = text;
		snippetIds.push(key);
	});
	snippet = jQuery("#jform_snippet").val();
	getSnippets();
});

function getSnippets(){
	jQuery("#loading").show();
	// clear the selection
	jQuery('#jform_snippet').find('option').remove().end();
	jQuery('#jform_snippet').trigger('liszt:updated');
	// get libraries value if set
	var libraries = jQuery("#jform_libraries").val();
	if (libraries) {
		getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').done(function(result) {
			setSnippets(result);
			jQuery("#loading").hide();
			if (typeof snippetButton !== 'undefined') {
				// ensure button is correct
				var snippet = jQuery('#jform_snippet').val();
				snippetButton(snippet);
			}
		});
	}
	else
	{
		// load all snippets in none is selected
		setSnippets(snippetIds);
		jQuery("#loading").hide();
	}
}
function setSnippets(array){
	if (array) {
		jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
		jQuery.each( array, function( i, id ) {
			if (id in snippets) {
				jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
			}
			if (id == snippet) {
				jQuery('#jform_snippet').val(id);
			}
		});
	} else {
		jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
	}
	jQuery('#jform_snippet').trigger('liszt:updated');
}

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[��S5S5custom_code.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwcbvxf_required = false;
jform_vvvvwccvxg_required = false;
jform_vvvvwccvxh_required = false;
jform_vvvvwccvxi_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var target_vvvvwcb = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcb(target_vvvvwcb);

	var target_vvvvwcc = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcc(target_vvvvwcc);

	var target_vvvvwcd = jQuery("#jform_target
input[type='radio']:checked").val();
	var type_vvvvwcd = jQuery("#jform_type
input[type='radio']:checked").val();
	vvvvwcd(target_vvvvwcd,type_vvvvwcd);

	var type_vvvvwce = jQuery("#jform_type
input[type='radio']:checked").val();
	var target_vvvvwce = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwce(type_vvvvwce,target_vvvvwce);
});

// the vvvvwcb function
function vvvvwcb(target_vvvvwcb)
{
	// set the function logic
	if (target_vvvvwcb == 2)
	{
		jQuery('#jform_function_name').closest('.control-group').show();
		// add required attribute to function_name field
		if (jform_vvvvwcbvxf_required)
		{
			updateFieldRequired('function_name',0);
			jQuery('#jform_function_name').prop('required','required');
			jQuery('#jform_function_name').attr('aria-required',true);
			jQuery('#jform_function_name').addClass('required');
			jform_vvvvwcbvxf_required = false;
		}
		jQuery('.note_jcb_placeholder').closest('.control-group').show();
		jQuery('#jform_system_name').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_function_name').closest('.control-group').hide();
		// remove required attribute from function_name field
		if (!jform_vvvvwcbvxf_required)
		{
			updateFieldRequired('function_name',1);
			jQuery('#jform_function_name').removeAttr('required');
			jQuery('#jform_function_name').removeAttr('aria-required');
			jQuery('#jform_function_name').removeClass('required');
			jform_vvvvwcbvxf_required = true;
		}
		jQuery('.note_jcb_placeholder').closest('.control-group').hide();
		jQuery('#jform_system_name').closest('.control-group').hide();
	}
}

// the vvvvwcc function
function vvvvwcc(target_vvvvwcc)
{
	// set the function logic
	if (target_vvvvwcc == 1)
	{
		jQuery('#jform_component').closest('.control-group').show();
		// add required attribute to component field
		if (jform_vvvvwccvxg_required)
		{
			updateFieldRequired('component',0);
			jQuery('#jform_component').prop('required','required');
			jQuery('#jform_component').attr('aria-required',true);
			jQuery('#jform_component').addClass('required');
			jform_vvvvwccvxg_required = false;
		}
		jQuery('#jform_path').closest('.control-group').show();
		// add required attribute to path field
		if (jform_vvvvwccvxh_required)
		{
			updateFieldRequired('path',0);
			jQuery('#jform_path').prop('required','required');
			jQuery('#jform_path').attr('aria-required',true);
			jQuery('#jform_path').addClass('required');
			jform_vvvvwccvxh_required = false;
		}
		jQuery('#jform_from_line').closest('.control-group').show();
		jQuery('#jform_hashtarget').closest('.control-group').show();
		jQuery('#jform_to_line').closest('.control-group').show();
		jQuery('#jform_type').closest('.control-group').show();
		// add required attribute to type field
		if (jform_vvvvwccvxi_required)
		{
			updateFieldRequired('type',0);
			jQuery('#jform_type').prop('required','required');
			jQuery('#jform_type').attr('aria-required',true);
			jQuery('#jform_type').addClass('required');
			jform_vvvvwccvxi_required = false;
		}
	}
	else
	{
		jQuery('#jform_component').closest('.control-group').hide();
		// remove required attribute from component field
		if (!jform_vvvvwccvxg_required)
		{
			updateFieldRequired('component',1);
			jQuery('#jform_component').removeAttr('required');
			jQuery('#jform_component').removeAttr('aria-required');
			jQuery('#jform_component').removeClass('required');
			jform_vvvvwccvxg_required = true;
		}
		jQuery('#jform_path').closest('.control-group').hide();
		// remove required attribute from path field
		if (!jform_vvvvwccvxh_required)
		{
			updateFieldRequired('path',1);
			jQuery('#jform_path').removeAttr('required');
			jQuery('#jform_path').removeAttr('aria-required');
			jQuery('#jform_path').removeClass('required');
			jform_vvvvwccvxh_required = true;
		}
		jQuery('#jform_from_line').closest('.control-group').hide();
		jQuery('#jform_hashtarget').closest('.control-group').hide();
		jQuery('#jform_to_line').closest('.control-group').hide();
		jQuery('#jform_type').closest('.control-group').hide();
		// remove required attribute from type field
		if (!jform_vvvvwccvxi_required)
		{
			updateFieldRequired('type',1);
			jQuery('#jform_type').removeAttr('required');
			jQuery('#jform_type').removeAttr('aria-required');
			jQuery('#jform_type').removeClass('required');
			jform_vvvvwccvxi_required = true;
		}
	}
}

// the vvvvwcd function
function vvvvwcd(target_vvvvwcd,type_vvvvwcd)
{
	// set the function logic
	if (target_vvvvwcd == 1 && type_vvvvwcd == 1)
	{
		jQuery('#jform_hashendtarget').closest('.control-group').show();
		jQuery('#jform_to_line').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_hashendtarget').closest('.control-group').hide();
		jQuery('#jform_to_line').closest('.control-group').hide();
	}
}

// the vvvvwce function
function vvvvwce(type_vvvvwce,target_vvvvwce)
{
	// set the function logic
	if (type_vvvvwce == 1 && target_vvvvwce == 1)
	{
		jQuery('#jform_hashendtarget').closest('.control-group').show();
		jQuery('#jform_to_line').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_hashendtarget').closest('.control-group').hide();
		jQuery('#jform_to_line').closest('.control-group').hide();
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	var target = jQuery("#jform_target
input[type='radio']:checked").val();
	if (target == 2) {
		jQuery('#usedin').show();
		var functioName = jQuery('#jform_function_name').val();
		// check if this function name is taken
		checkFunctionName(functioName);
	}
	var type = jQuery("#jform_comment_type
input[type='radio']:checked").val();
	if (type == 2) {
		jQuery('#html-comment-info').show();
		jQuery('#phpjs-comment-info').hide();
	} else {
		jQuery('#html-comment-info').hide();
		jQuery('#phpjs-comment-info').show();
	}
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});
function setCustomCodePlaceholder() {
	var ide = jQuery('#jform_id').val();
	var functioName = jQuery('#jform_function_name').val();
	if (ide > 0 && functioName.length > 2) {
		jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>');
		jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'&#43;value1,value2]</code>');
	} else if (ide > 0){
		jQuery('#jcb-placeholder').html('<code>[not
ready]</code>');
		jQuery('#jcb-placeholder-arg').html('<code>[not
ready]</code>');
	} else if (functioName.length > 2) {
		jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>');
		jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'&#43;value1,value2]</code>');
	} else {
		jQuery('#jcb-placeholder').html('<code>[save to
see]</code>');
		jQuery('#jcb-placeholder-arg').html('<code>[save to
see]</code>');
	}
	// update the notes
	if (ide > 0) {
		jQuery('.placeholder-key-id').text(ide);
	}
}

function checkFunctionName(functioName) {
	if (functioName.length > 2) {
		var ide = jQuery('#jform_id').val();
		if (ide == 0) {
			ide = -1;
		}
		checkFunctionName_server(functioName, ide).done(function(result) {
			if(result.name && result.message){
				// show notice that functioName is okay
				jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
				jQuery('#jform_function_name').val(result.name);
				// now start search for where the function is used
				usedin(result.name, ide);
			} else if(result.message){
				// show notice that functioName is not okay
				jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
				jQuery('#jform_function_name').val('');
			} else {
				// set an error that message was not send
				jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'),
timeout: 5000, status: 'danger', pos: 'top-right'});
				jQuery('#jform_function_name').val('');
			}
			// set custom code placeholder
			setCustomCodePlaceholder();
		});
	} else {
		// set an error that message was not send
		jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_FUNCTION_NAME'),
timeout: 5000, status: 'danger', pos: 'top-right'});
		jQuery('#jform_function_name').val('');
		// set custom code placeholder
		setCustomCodePlaceholder();
	}
}
// check Function name
function checkFunctionName_server(functioName, ide){
	var getUrl =
"index.php?option=com_componentbuilder&task=ajax.checkFunctionName&raw=true&format=json";
	if(token.length > 0){
		var request =
'token='+token+'&functioName='+functioName+'&id='+ide;
	}
	return jQuery.ajax({
		type: 'POST',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


// check where this Function is used
function usedin(functioName, ide) {
	var found = false;
	jQuery('#before-usedin').hide();
	jQuery('#note-usedin-not').hide();
	jQuery('#note-usedin-found').hide();
	jQuery('#loading-usedin').show();
	var targets =
['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u'];
// if you update this, also update (below 20) &
[customcode-codeUsedInHtmlNote]!
	var targetNumber = 20;
	var run = 0;
	var usedinChecker = setInterval(function(){ 
		var target = targets[run];
		usedin_server(functioName, ide, target).done(function(used) {
			if (used.in) {
				jQuery('#usedin-'+used.id).show();
				jQuery('#area-'+used.id).html(used.in);
				jQuery.UIkit.notify({message: used.in, timeout: 5000, status:
'success', pos: 'top-right'});
				found = true;
			} else {
				jQuery('#usedin-'+target).hide();
			}
			if (run == targetNumber) {
				jQuery('#loading-usedin').hide();
				if (found) {
					jQuery('#note-usedin-found').show();
				} else {
					jQuery('#note-usedin-not').show();
				}
			}
		});
		if (run == targetNumber) {
			clearInterval(usedinChecker);
		}
		run++;
	}, 800);
}
function usedin_server(functioName, ide, target){
	var getUrl =
"index.php?option=com_componentbuilder&task=ajax.usedin&format=json";
	if(token.length > 0){
		var request =
token+'=1&functioName='+functioName+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[cZ����dynamic_get.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwbavws_required = false;
jform_vvvvwbcvwt_required = false;
jform_vvvvwbdvwu_required = false;
jform_vvvvwbevwv_required = false;
jform_vvvvwbfvww_required = false;
jform_vvvvwbqvwx_required = false;
jform_vvvvwbqvwy_required = false;
jform_vvvvwbvvwz_required = false;
jform_vvvvwbvvxa_required = false;
jform_vvvvwbvvxb_required = false;
jform_vvvvwbwvxc_required = false;
jform_vvvvwbxvxd_required = false;
jform_vvvvwbyvxe_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var gettype_vvvvwba = jQuery("#jform_gettype").val();
	vvvvwba(gettype_vvvvwba);

	var main_source_vvvvwbb = jQuery("#jform_main_source").val();
	vvvvwbb(main_source_vvvvwbb);

	var main_source_vvvvwbc = jQuery("#jform_main_source").val();
	vvvvwbc(main_source_vvvvwbc);

	var main_source_vvvvwbd = jQuery("#jform_main_source").val();
	vvvvwbd(main_source_vvvvwbd);

	var main_source_vvvvwbe = jQuery("#jform_main_source").val();
	vvvvwbe(main_source_vvvvwbe);

	var main_source_vvvvwbf = jQuery("#jform_main_source").val();
	vvvvwbf(main_source_vvvvwbf);

	var addcalculation_vvvvwbg = jQuery("#jform_addcalculation
input[type='radio']:checked").val();
	vvvvwbg(addcalculation_vvvvwbg);

	var addcalculation_vvvvwbh = jQuery("#jform_addcalculation
input[type='radio']:checked").val();
	var gettype_vvvvwbh = jQuery("#jform_gettype").val();
	vvvvwbh(addcalculation_vvvvwbh,gettype_vvvvwbh);

	var addcalculation_vvvvwbi = jQuery("#jform_addcalculation
input[type='radio']:checked").val();
	var gettype_vvvvwbi = jQuery("#jform_gettype").val();
	vvvvwbi(addcalculation_vvvvwbi,gettype_vvvvwbi);

	var main_source_vvvvwbl = jQuery("#jform_main_source").val();
	vvvvwbl(main_source_vvvvwbl);

	var main_source_vvvvwbm = jQuery("#jform_main_source").val();
	vvvvwbm(main_source_vvvvwbm);

	var add_php_before_getitem_vvvvwbn =
jQuery("#jform_add_php_before_getitem
input[type='radio']:checked").val();
	var gettype_vvvvwbn = jQuery("#jform_gettype").val();
	vvvvwbn(add_php_before_getitem_vvvvwbn,gettype_vvvvwbn);

	var add_php_after_getitem_vvvvwbo =
jQuery("#jform_add_php_after_getitem
input[type='radio']:checked").val();
	var gettype_vvvvwbo = jQuery("#jform_gettype").val();
	vvvvwbo(add_php_after_getitem_vvvvwbo,gettype_vvvvwbo);

	var gettype_vvvvwbq = jQuery("#jform_gettype").val();
	vvvvwbq(gettype_vvvvwbq);

	var add_php_getlistquery_vvvvwbr =
jQuery("#jform_add_php_getlistquery
input[type='radio']:checked").val();
	var gettype_vvvvwbr = jQuery("#jform_gettype").val();
	vvvvwbr(add_php_getlistquery_vvvvwbr,gettype_vvvvwbr);

	var add_php_before_getitems_vvvvwbs =
jQuery("#jform_add_php_before_getitems
input[type='radio']:checked").val();
	var gettype_vvvvwbs = jQuery("#jform_gettype").val();
	vvvvwbs(add_php_before_getitems_vvvvwbs,gettype_vvvvwbs);

	var add_php_after_getitems_vvvvwbt =
jQuery("#jform_add_php_after_getitems
input[type='radio']:checked").val();
	var gettype_vvvvwbt = jQuery("#jform_gettype").val();
	vvvvwbt(add_php_after_getitems_vvvvwbt,gettype_vvvvwbt);

	var gettype_vvvvwbv = jQuery("#jform_gettype").val();
	vvvvwbv(gettype_vvvvwbv);

	var gettype_vvvvwbw = jQuery("#jform_gettype").val();
	vvvvwbw(gettype_vvvvwbw);

	var gettype_vvvvwbx = jQuery("#jform_gettype").val();
	vvvvwbx(gettype_vvvvwbx);

	var gettype_vvvvwby = jQuery("#jform_gettype").val();
	var add_php_router_parse_vvvvwby =
jQuery("#jform_add_php_router_parse
input[type='radio']:checked").val();
	vvvvwby(gettype_vvvvwby,add_php_router_parse_vvvvwby);

	var gettype_vvvvwca = jQuery("#jform_gettype").val();
	vvvvwca(gettype_vvvvwca);
});

// the vvvvwba function
function vvvvwba(gettype_vvvvwba)
{
	if (isSet(gettype_vvvvwba) && gettype_vvvvwba.constructor !==
Array)
	{
		var temp_vvvvwba = gettype_vvvvwba;
		var gettype_vvvvwba = [];
		gettype_vvvvwba.push(temp_vvvvwba);
	}
	else if (!isSet(gettype_vvvvwba))
	{
		var gettype_vvvvwba = [];
	}
	var gettype = gettype_vvvvwba.some(gettype_vvvvwba_SomeFunc);


	// set this function logic
	if (gettype)
	{
		jQuery('#jform_getcustom').closest('.control-group').show();
		// add required attribute to getcustom field
		if (jform_vvvvwbavws_required)
		{
			updateFieldRequired('getcustom',0);
			jQuery('#jform_getcustom').prop('required','required');
			jQuery('#jform_getcustom').attr('aria-required',true);
			jQuery('#jform_getcustom').addClass('required');
			jform_vvvvwbavws_required = false;
		}
	}
	else
	{
		jQuery('#jform_getcustom').closest('.control-group').hide();
		// remove required attribute from getcustom field
		if (!jform_vvvvwbavws_required)
		{
			updateFieldRequired('getcustom',1);
			jQuery('#jform_getcustom').removeAttr('required');
			jQuery('#jform_getcustom').removeAttr('aria-required');
			jQuery('#jform_getcustom').removeClass('required');
			jform_vvvvwbavws_required = true;
		}
	}
}

// the vvvvwba Some function
function gettype_vvvvwba_SomeFunc(gettype_vvvvwba)
{
	// set the function logic
	if (gettype_vvvvwba == 3 || gettype_vvvvwba == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwbb function
function vvvvwbb(main_source_vvvvwbb)
{
	if (isSet(main_source_vvvvwbb) && main_source_vvvvwbb.constructor
!== Array)
	{
		var temp_vvvvwbb = main_source_vvvvwbb;
		var main_source_vvvvwbb = [];
		main_source_vvvvwbb.push(temp_vvvvwbb);
	}
	else if (!isSet(main_source_vvvvwbb))
	{
		var main_source_vvvvwbb = [];
	}
	var main_source = main_source_vvvvwbb.some(main_source_vvvvwbb_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_select_all').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_select_all').closest('.control-group').hide();
	}
}

// the vvvvwbb Some function
function main_source_vvvvwbb_SomeFunc(main_source_vvvvwbb)
{
	// set the function logic
	if (main_source_vvvvwbb == 1 || main_source_vvvvwbb == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwbc function
function vvvvwbc(main_source_vvvvwbc)
{
	if (isSet(main_source_vvvvwbc) && main_source_vvvvwbc.constructor
!== Array)
	{
		var temp_vvvvwbc = main_source_vvvvwbc;
		var main_source_vvvvwbc = [];
		main_source_vvvvwbc.push(temp_vvvvwbc);
	}
	else if (!isSet(main_source_vvvvwbc))
	{
		var main_source_vvvvwbc = [];
	}
	var main_source = main_source_vvvvwbc.some(main_source_vvvvwbc_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_view_table_main').closest('.control-group').show();
		// add required attribute to view_table_main field
		if (jform_vvvvwbcvwt_required)
		{
			updateFieldRequired('view_table_main',0);
			jQuery('#jform_view_table_main').prop('required','required');
			jQuery('#jform_view_table_main').attr('aria-required',true);
			jQuery('#jform_view_table_main').addClass('required');
			jform_vvvvwbcvwt_required = false;
		}
	}
	else
	{
		jQuery('#jform_view_table_main').closest('.control-group').hide();
		// remove required attribute from view_table_main field
		if (!jform_vvvvwbcvwt_required)
		{
			updateFieldRequired('view_table_main',1);
			jQuery('#jform_view_table_main').removeAttr('required');
			jQuery('#jform_view_table_main').removeAttr('aria-required');
			jQuery('#jform_view_table_main').removeClass('required');
			jform_vvvvwbcvwt_required = true;
		}
	}
}

// the vvvvwbc Some function
function main_source_vvvvwbc_SomeFunc(main_source_vvvvwbc)
{
	// set the function logic
	if (main_source_vvvvwbc == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbd function
function vvvvwbd(main_source_vvvvwbd)
{
	if (isSet(main_source_vvvvwbd) && main_source_vvvvwbd.constructor
!== Array)
	{
		var temp_vvvvwbd = main_source_vvvvwbd;
		var main_source_vvvvwbd = [];
		main_source_vvvvwbd.push(temp_vvvvwbd);
	}
	else if (!isSet(main_source_vvvvwbd))
	{
		var main_source_vvvvwbd = [];
	}
	var main_source = main_source_vvvvwbd.some(main_source_vvvvwbd_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_view_selection').closest('.control-group').show();
		// add required attribute to view_selection field
		if (jform_vvvvwbdvwu_required)
		{
			updateFieldRequired('view_selection',0);
			jQuery('#jform_view_selection').prop('required','required');
			jQuery('#jform_view_selection').attr('aria-required',true);
			jQuery('#jform_view_selection').addClass('required');
			jform_vvvvwbdvwu_required = false;
		}
	}
	else
	{
		jQuery('#jform_view_selection').closest('.control-group').hide();
		// remove required attribute from view_selection field
		if (!jform_vvvvwbdvwu_required)
		{
			updateFieldRequired('view_selection',1);
			jQuery('#jform_view_selection').removeAttr('required');
			jQuery('#jform_view_selection').removeAttr('aria-required');
			jQuery('#jform_view_selection').removeClass('required');
			jform_vvvvwbdvwu_required = true;
		}
	}
}

// the vvvvwbd Some function
function main_source_vvvvwbd_SomeFunc(main_source_vvvvwbd)
{
	// set the function logic
	if (main_source_vvvvwbd == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbe function
function vvvvwbe(main_source_vvvvwbe)
{
	if (isSet(main_source_vvvvwbe) && main_source_vvvvwbe.constructor
!== Array)
	{
		var temp_vvvvwbe = main_source_vvvvwbe;
		var main_source_vvvvwbe = [];
		main_source_vvvvwbe.push(temp_vvvvwbe);
	}
	else if (!isSet(main_source_vvvvwbe))
	{
		var main_source_vvvvwbe = [];
	}
	var main_source = main_source_vvvvwbe.some(main_source_vvvvwbe_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_db_table_main').closest('.control-group').show();
		// add required attribute to db_table_main field
		if (jform_vvvvwbevwv_required)
		{
			updateFieldRequired('db_table_main',0);
			jQuery('#jform_db_table_main').prop('required','required');
			jQuery('#jform_db_table_main').attr('aria-required',true);
			jQuery('#jform_db_table_main').addClass('required');
			jform_vvvvwbevwv_required = false;
		}
	}
	else
	{
		jQuery('#jform_db_table_main').closest('.control-group').hide();
		// remove required attribute from db_table_main field
		if (!jform_vvvvwbevwv_required)
		{
			updateFieldRequired('db_table_main',1);
			jQuery('#jform_db_table_main').removeAttr('required');
			jQuery('#jform_db_table_main').removeAttr('aria-required');
			jQuery('#jform_db_table_main').removeClass('required');
			jform_vvvvwbevwv_required = true;
		}
	}
}

// the vvvvwbe Some function
function main_source_vvvvwbe_SomeFunc(main_source_vvvvwbe)
{
	// set the function logic
	if (main_source_vvvvwbe == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwbf function
function vvvvwbf(main_source_vvvvwbf)
{
	if (isSet(main_source_vvvvwbf) && main_source_vvvvwbf.constructor
!== Array)
	{
		var temp_vvvvwbf = main_source_vvvvwbf;
		var main_source_vvvvwbf = [];
		main_source_vvvvwbf.push(temp_vvvvwbf);
	}
	else if (!isSet(main_source_vvvvwbf))
	{
		var main_source_vvvvwbf = [];
	}
	var main_source = main_source_vvvvwbf.some(main_source_vvvvwbf_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_db_selection').closest('.control-group').show();
		// add required attribute to db_selection field
		if (jform_vvvvwbfvww_required)
		{
			updateFieldRequired('db_selection',0);
			jQuery('#jform_db_selection').prop('required','required');
			jQuery('#jform_db_selection').attr('aria-required',true);
			jQuery('#jform_db_selection').addClass('required');
			jform_vvvvwbfvww_required = false;
		}
	}
	else
	{
		jQuery('#jform_db_selection').closest('.control-group').hide();
		// remove required attribute from db_selection field
		if (!jform_vvvvwbfvww_required)
		{
			updateFieldRequired('db_selection',1);
			jQuery('#jform_db_selection').removeAttr('required');
			jQuery('#jform_db_selection').removeAttr('aria-required');
			jQuery('#jform_db_selection').removeClass('required');
			jform_vvvvwbfvww_required = true;
		}
	}
}

// the vvvvwbf Some function
function main_source_vvvvwbf_SomeFunc(main_source_vvvvwbf)
{
	// set the function logic
	if (main_source_vvvvwbf == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwbg function
function vvvvwbg(addcalculation_vvvvwbg)
{
	// set the function logic
	if (addcalculation_vvvvwbg == 1)
	{
		jQuery('#jform_php_calculation-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_calculation-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbh function
function vvvvwbh(addcalculation_vvvvwbh,gettype_vvvvwbh)
{
	if (isSet(addcalculation_vvvvwbh) &&
addcalculation_vvvvwbh.constructor !== Array)
	{
		var temp_vvvvwbh = addcalculation_vvvvwbh;
		var addcalculation_vvvvwbh = [];
		addcalculation_vvvvwbh.push(temp_vvvvwbh);
	}
	else if (!isSet(addcalculation_vvvvwbh))
	{
		var addcalculation_vvvvwbh = [];
	}
	var addcalculation =
addcalculation_vvvvwbh.some(addcalculation_vvvvwbh_SomeFunc);

	if (isSet(gettype_vvvvwbh) && gettype_vvvvwbh.constructor !==
Array)
	{
		var temp_vvvvwbh = gettype_vvvvwbh;
		var gettype_vvvvwbh = [];
		gettype_vvvvwbh.push(temp_vvvvwbh);
	}
	else if (!isSet(gettype_vvvvwbh))
	{
		var gettype_vvvvwbh = [];
	}
	var gettype = gettype_vvvvwbh.some(gettype_vvvvwbh_SomeFunc);


	// set this function logic
	if (addcalculation && gettype)
	{
		jQuery('.note_calculation_item').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_calculation_item').closest('.control-group').hide();
	}
}

// the vvvvwbh Some function
function addcalculation_vvvvwbh_SomeFunc(addcalculation_vvvvwbh)
{
	// set the function logic
	if (addcalculation_vvvvwbh == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbh Some function
function gettype_vvvvwbh_SomeFunc(gettype_vvvvwbh)
{
	// set the function logic
	if (gettype_vvvvwbh == 1 || gettype_vvvvwbh == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwbi function
function vvvvwbi(addcalculation_vvvvwbi,gettype_vvvvwbi)
{
	if (isSet(addcalculation_vvvvwbi) &&
addcalculation_vvvvwbi.constructor !== Array)
	{
		var temp_vvvvwbi = addcalculation_vvvvwbi;
		var addcalculation_vvvvwbi = [];
		addcalculation_vvvvwbi.push(temp_vvvvwbi);
	}
	else if (!isSet(addcalculation_vvvvwbi))
	{
		var addcalculation_vvvvwbi = [];
	}
	var addcalculation =
addcalculation_vvvvwbi.some(addcalculation_vvvvwbi_SomeFunc);

	if (isSet(gettype_vvvvwbi) && gettype_vvvvwbi.constructor !==
Array)
	{
		var temp_vvvvwbi = gettype_vvvvwbi;
		var gettype_vvvvwbi = [];
		gettype_vvvvwbi.push(temp_vvvvwbi);
	}
	else if (!isSet(gettype_vvvvwbi))
	{
		var gettype_vvvvwbi = [];
	}
	var gettype = gettype_vvvvwbi.some(gettype_vvvvwbi_SomeFunc);


	// set this function logic
	if (addcalculation && gettype)
	{
		jQuery('.note_calculation_items').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_calculation_items').closest('.control-group').hide();
	}
}

// the vvvvwbi Some function
function addcalculation_vvvvwbi_SomeFunc(addcalculation_vvvvwbi)
{
	// set the function logic
	if (addcalculation_vvvvwbi == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbi Some function
function gettype_vvvvwbi_SomeFunc(gettype_vvvvwbi)
{
	// set the function logic
	if (gettype_vvvvwbi == 2 || gettype_vvvvwbi == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwbl function
function vvvvwbl(main_source_vvvvwbl)
{
	if (isSet(main_source_vvvvwbl) && main_source_vvvvwbl.constructor
!== Array)
	{
		var temp_vvvvwbl = main_source_vvvvwbl;
		var main_source_vvvvwbl = [];
		main_source_vvvvwbl.push(temp_vvvvwbl);
	}
	else if (!isSet(main_source_vvvvwbl))
	{
		var main_source_vvvvwbl = [];
	}
	var main_source = main_source_vvvvwbl.some(main_source_vvvvwbl_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_php_custom_get-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_custom_get-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbl Some function
function main_source_vvvvwbl_SomeFunc(main_source_vvvvwbl)
{
	// set the function logic
	if (main_source_vvvvwbl == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwbm function
function vvvvwbm(main_source_vvvvwbm)
{
	if (isSet(main_source_vvvvwbm) && main_source_vvvvwbm.constructor
!== Array)
	{
		var temp_vvvvwbm = main_source_vvvvwbm;
		var main_source_vvvvwbm = [];
		main_source_vvvvwbm.push(temp_vvvvwbm);
	}
	else if (!isSet(main_source_vvvvwbm))
	{
		var main_source_vvvvwbm = [];
	}
	var main_source = main_source_vvvvwbm.some(main_source_vvvvwbm_SomeFunc);


	// set this function logic
	if (main_source)
	{
		jQuery('#jform_filter-lbl').closest('.control-group').show();
		jQuery('#jform_global-lbl').closest('.control-group').show();
		jQuery('#jform_group-lbl').closest('.control-group').show();
		jQuery('#jform_order-lbl').closest('.control-group').show();
		jQuery('#jform_where-lbl').closest('.control-group').show();
		jQuery('#jform_join_db_table-lbl').closest('.control-group').show();
		jQuery('#jform_join_view_table-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_filter-lbl').closest('.control-group').hide();
		jQuery('#jform_global-lbl').closest('.control-group').hide();
		jQuery('#jform_group-lbl').closest('.control-group').hide();
		jQuery('#jform_order-lbl').closest('.control-group').hide();
		jQuery('#jform_where-lbl').closest('.control-group').hide();
		jQuery('#jform_join_db_table-lbl').closest('.control-group').hide();
		jQuery('#jform_join_view_table-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbm Some function
function main_source_vvvvwbm_SomeFunc(main_source_vvvvwbm)
{
	// set the function logic
	if (main_source_vvvvwbm == 1 || main_source_vvvvwbm == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwbn function
function vvvvwbn(add_php_before_getitem_vvvvwbn,gettype_vvvvwbn)
{
	if (isSet(add_php_before_getitem_vvvvwbn) &&
add_php_before_getitem_vvvvwbn.constructor !== Array)
	{
		var temp_vvvvwbn = add_php_before_getitem_vvvvwbn;
		var add_php_before_getitem_vvvvwbn = [];
		add_php_before_getitem_vvvvwbn.push(temp_vvvvwbn);
	}
	else if (!isSet(add_php_before_getitem_vvvvwbn))
	{
		var add_php_before_getitem_vvvvwbn = [];
	}
	var add_php_before_getitem =
add_php_before_getitem_vvvvwbn.some(add_php_before_getitem_vvvvwbn_SomeFunc);

	if (isSet(gettype_vvvvwbn) && gettype_vvvvwbn.constructor !==
Array)
	{
		var temp_vvvvwbn = gettype_vvvvwbn;
		var gettype_vvvvwbn = [];
		gettype_vvvvwbn.push(temp_vvvvwbn);
	}
	else if (!isSet(gettype_vvvvwbn))
	{
		var gettype_vvvvwbn = [];
	}
	var gettype = gettype_vvvvwbn.some(gettype_vvvvwbn_SomeFunc);


	// set this function logic
	if (add_php_before_getitem && gettype)
	{
		jQuery('#jform_php_before_getitem-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_before_getitem-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbn Some function
function
add_php_before_getitem_vvvvwbn_SomeFunc(add_php_before_getitem_vvvvwbn)
{
	// set the function logic
	if (add_php_before_getitem_vvvvwbn == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbn Some function
function gettype_vvvvwbn_SomeFunc(gettype_vvvvwbn)
{
	// set the function logic
	if (gettype_vvvvwbn == 1 || gettype_vvvvwbn == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwbo function
function vvvvwbo(add_php_after_getitem_vvvvwbo,gettype_vvvvwbo)
{
	if (isSet(add_php_after_getitem_vvvvwbo) &&
add_php_after_getitem_vvvvwbo.constructor !== Array)
	{
		var temp_vvvvwbo = add_php_after_getitem_vvvvwbo;
		var add_php_after_getitem_vvvvwbo = [];
		add_php_after_getitem_vvvvwbo.push(temp_vvvvwbo);
	}
	else if (!isSet(add_php_after_getitem_vvvvwbo))
	{
		var add_php_after_getitem_vvvvwbo = [];
	}
	var add_php_after_getitem =
add_php_after_getitem_vvvvwbo.some(add_php_after_getitem_vvvvwbo_SomeFunc);

	if (isSet(gettype_vvvvwbo) && gettype_vvvvwbo.constructor !==
Array)
	{
		var temp_vvvvwbo = gettype_vvvvwbo;
		var gettype_vvvvwbo = [];
		gettype_vvvvwbo.push(temp_vvvvwbo);
	}
	else if (!isSet(gettype_vvvvwbo))
	{
		var gettype_vvvvwbo = [];
	}
	var gettype = gettype_vvvvwbo.some(gettype_vvvvwbo_SomeFunc);


	// set this function logic
	if (add_php_after_getitem && gettype)
	{
		jQuery('#jform_php_after_getitem-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_after_getitem-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbo Some function
function
add_php_after_getitem_vvvvwbo_SomeFunc(add_php_after_getitem_vvvvwbo)
{
	// set the function logic
	if (add_php_after_getitem_vvvvwbo == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbo Some function
function gettype_vvvvwbo_SomeFunc(gettype_vvvvwbo)
{
	// set the function logic
	if (gettype_vvvvwbo == 1 || gettype_vvvvwbo == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwbq function
function vvvvwbq(gettype_vvvvwbq)
{
	if (isSet(gettype_vvvvwbq) && gettype_vvvvwbq.constructor !==
Array)
	{
		var temp_vvvvwbq = gettype_vvvvwbq;
		var gettype_vvvvwbq = [];
		gettype_vvvvwbq.push(temp_vvvvwbq);
	}
	else if (!isSet(gettype_vvvvwbq))
	{
		var gettype_vvvvwbq = [];
	}
	var gettype = gettype_vvvvwbq.some(gettype_vvvvwbq_SomeFunc);


	// set this function logic
	if (gettype)
	{
		jQuery('#jform_add_php_after_getitem').closest('.control-group').show();
		// add required attribute to add_php_after_getitem field
		if (jform_vvvvwbqvwx_required)
		{
			updateFieldRequired('add_php_after_getitem',0);
			jQuery('#jform_add_php_after_getitem').prop('required','required');
			jQuery('#jform_add_php_after_getitem').attr('aria-required',true);
			jQuery('#jform_add_php_after_getitem').addClass('required');
			jform_vvvvwbqvwx_required = false;
		}
		jQuery('#jform_add_php_before_getitem').closest('.control-group').show();
		// add required attribute to add_php_before_getitem field
		if (jform_vvvvwbqvwy_required)
		{
			updateFieldRequired('add_php_before_getitem',0);
			jQuery('#jform_add_php_before_getitem').prop('required','required');
			jQuery('#jform_add_php_before_getitem').attr('aria-required',true);
			jQuery('#jform_add_php_before_getitem').addClass('required');
			jform_vvvvwbqvwy_required = false;
		}
	}
	else
	{
		jQuery('#jform_add_php_after_getitem').closest('.control-group').hide();
		// remove required attribute from add_php_after_getitem field
		if (!jform_vvvvwbqvwx_required)
		{
			updateFieldRequired('add_php_after_getitem',1);
			jQuery('#jform_add_php_after_getitem').removeAttr('required');
			jQuery('#jform_add_php_after_getitem').removeAttr('aria-required');
			jQuery('#jform_add_php_after_getitem').removeClass('required');
			jform_vvvvwbqvwx_required = true;
		}
		jQuery('#jform_add_php_before_getitem').closest('.control-group').hide();
		// remove required attribute from add_php_before_getitem field
		if (!jform_vvvvwbqvwy_required)
		{
			updateFieldRequired('add_php_before_getitem',1);
			jQuery('#jform_add_php_before_getitem').removeAttr('required');
			jQuery('#jform_add_php_before_getitem').removeAttr('aria-required');
			jQuery('#jform_add_php_before_getitem').removeClass('required');
			jform_vvvvwbqvwy_required = true;
		}
	}
}

// the vvvvwbq Some function
function gettype_vvvvwbq_SomeFunc(gettype_vvvvwbq)
{
	// set the function logic
	if (gettype_vvvvwbq == 1 || gettype_vvvvwbq == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwbr function
function vvvvwbr(add_php_getlistquery_vvvvwbr,gettype_vvvvwbr)
{
	if (isSet(add_php_getlistquery_vvvvwbr) &&
add_php_getlistquery_vvvvwbr.constructor !== Array)
	{
		var temp_vvvvwbr = add_php_getlistquery_vvvvwbr;
		var add_php_getlistquery_vvvvwbr = [];
		add_php_getlistquery_vvvvwbr.push(temp_vvvvwbr);
	}
	else if (!isSet(add_php_getlistquery_vvvvwbr))
	{
		var add_php_getlistquery_vvvvwbr = [];
	}
	var add_php_getlistquery =
add_php_getlistquery_vvvvwbr.some(add_php_getlistquery_vvvvwbr_SomeFunc);

	if (isSet(gettype_vvvvwbr) && gettype_vvvvwbr.constructor !==
Array)
	{
		var temp_vvvvwbr = gettype_vvvvwbr;
		var gettype_vvvvwbr = [];
		gettype_vvvvwbr.push(temp_vvvvwbr);
	}
	else if (!isSet(gettype_vvvvwbr))
	{
		var gettype_vvvvwbr = [];
	}
	var gettype = gettype_vvvvwbr.some(gettype_vvvvwbr_SomeFunc);


	// set this function logic
	if (add_php_getlistquery && gettype)
	{
		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_getlistquery-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbr Some function
function
add_php_getlistquery_vvvvwbr_SomeFunc(add_php_getlistquery_vvvvwbr)
{
	// set the function logic
	if (add_php_getlistquery_vvvvwbr == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbr Some function
function gettype_vvvvwbr_SomeFunc(gettype_vvvvwbr)
{
	// set the function logic
	if (gettype_vvvvwbr == 2 || gettype_vvvvwbr == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwbs function
function vvvvwbs(add_php_before_getitems_vvvvwbs,gettype_vvvvwbs)
{
	if (isSet(add_php_before_getitems_vvvvwbs) &&
add_php_before_getitems_vvvvwbs.constructor !== Array)
	{
		var temp_vvvvwbs = add_php_before_getitems_vvvvwbs;
		var add_php_before_getitems_vvvvwbs = [];
		add_php_before_getitems_vvvvwbs.push(temp_vvvvwbs);
	}
	else if (!isSet(add_php_before_getitems_vvvvwbs))
	{
		var add_php_before_getitems_vvvvwbs = [];
	}
	var add_php_before_getitems =
add_php_before_getitems_vvvvwbs.some(add_php_before_getitems_vvvvwbs_SomeFunc);

	if (isSet(gettype_vvvvwbs) && gettype_vvvvwbs.constructor !==
Array)
	{
		var temp_vvvvwbs = gettype_vvvvwbs;
		var gettype_vvvvwbs = [];
		gettype_vvvvwbs.push(temp_vvvvwbs);
	}
	else if (!isSet(gettype_vvvvwbs))
	{
		var gettype_vvvvwbs = [];
	}
	var gettype = gettype_vvvvwbs.some(gettype_vvvvwbs_SomeFunc);


	// set this function logic
	if (add_php_before_getitems && gettype)
	{
		jQuery('#jform_php_before_getitems-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_before_getitems-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbs Some function
function
add_php_before_getitems_vvvvwbs_SomeFunc(add_php_before_getitems_vvvvwbs)
{
	// set the function logic
	if (add_php_before_getitems_vvvvwbs == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbs Some function
function gettype_vvvvwbs_SomeFunc(gettype_vvvvwbs)
{
	// set the function logic
	if (gettype_vvvvwbs == 2 || gettype_vvvvwbs == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwbt function
function vvvvwbt(add_php_after_getitems_vvvvwbt,gettype_vvvvwbt)
{
	if (isSet(add_php_after_getitems_vvvvwbt) &&
add_php_after_getitems_vvvvwbt.constructor !== Array)
	{
		var temp_vvvvwbt = add_php_after_getitems_vvvvwbt;
		var add_php_after_getitems_vvvvwbt = [];
		add_php_after_getitems_vvvvwbt.push(temp_vvvvwbt);
	}
	else if (!isSet(add_php_after_getitems_vvvvwbt))
	{
		var add_php_after_getitems_vvvvwbt = [];
	}
	var add_php_after_getitems =
add_php_after_getitems_vvvvwbt.some(add_php_after_getitems_vvvvwbt_SomeFunc);

	if (isSet(gettype_vvvvwbt) && gettype_vvvvwbt.constructor !==
Array)
	{
		var temp_vvvvwbt = gettype_vvvvwbt;
		var gettype_vvvvwbt = [];
		gettype_vvvvwbt.push(temp_vvvvwbt);
	}
	else if (!isSet(gettype_vvvvwbt))
	{
		var gettype_vvvvwbt = [];
	}
	var gettype = gettype_vvvvwbt.some(gettype_vvvvwbt_SomeFunc);


	// set this function logic
	if (add_php_after_getitems && gettype)
	{
		jQuery('#jform_php_after_getitems-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_after_getitems-lbl').closest('.control-group').hide();
	}
}

// the vvvvwbt Some function
function
add_php_after_getitems_vvvvwbt_SomeFunc(add_php_after_getitems_vvvvwbt)
{
	// set the function logic
	if (add_php_after_getitems_vvvvwbt == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwbt Some function
function gettype_vvvvwbt_SomeFunc(gettype_vvvvwbt)
{
	// set the function logic
	if (gettype_vvvvwbt == 2 || gettype_vvvvwbt == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwbv function
function vvvvwbv(gettype_vvvvwbv)
{
	if (isSet(gettype_vvvvwbv) && gettype_vvvvwbv.constructor !==
Array)
	{
		var temp_vvvvwbv = gettype_vvvvwbv;
		var gettype_vvvvwbv = [];
		gettype_vvvvwbv.push(temp_vvvvwbv);
	}
	else if (!isSet(gettype_vvvvwbv))
	{
		var gettype_vvvvwbv = [];
	}
	var gettype = gettype_vvvvwbv.some(gettype_vvvvwbv_SomeFunc);


	// set this function logic
	if (gettype)
	{
		jQuery('#jform_add_php_after_getitems').closest('.control-group').show();
		// add required attribute to add_php_after_getitems field
		if (jform_vvvvwbvvwz_required)
		{
			updateFieldRequired('add_php_after_getitems',0);
			jQuery('#jform_add_php_after_getitems').prop('required','required');
			jQuery('#jform_add_php_after_getitems').attr('aria-required',true);
			jQuery('#jform_add_php_after_getitems').addClass('required');
			jform_vvvvwbvvwz_required = false;
		}
		jQuery('#jform_add_php_before_getitems').closest('.control-group').show();
		// add required attribute to add_php_before_getitems field
		if (jform_vvvvwbvvxa_required)
		{
			updateFieldRequired('add_php_before_getitems',0);
			jQuery('#jform_add_php_before_getitems').prop('required','required');
			jQuery('#jform_add_php_before_getitems').attr('aria-required',true);
			jQuery('#jform_add_php_before_getitems').addClass('required');
			jform_vvvvwbvvxa_required = false;
		}
		jQuery('#jform_add_php_getlistquery').closest('.control-group').show();
		// add required attribute to add_php_getlistquery field
		if (jform_vvvvwbvvxb_required)
		{
			updateFieldRequired('add_php_getlistquery',0);
			jQuery('#jform_add_php_getlistquery').prop('required','required');
			jQuery('#jform_add_php_getlistquery').attr('aria-required',true);
			jQuery('#jform_add_php_getlistquery').addClass('required');
			jform_vvvvwbvvxb_required = false;
		}
	}
	else
	{
		jQuery('#jform_add_php_after_getitems').closest('.control-group').hide();
		// remove required attribute from add_php_after_getitems field
		if (!jform_vvvvwbvvwz_required)
		{
			updateFieldRequired('add_php_after_getitems',1);
			jQuery('#jform_add_php_after_getitems').removeAttr('required');
			jQuery('#jform_add_php_after_getitems').removeAttr('aria-required');
			jQuery('#jform_add_php_after_getitems').removeClass('required');
			jform_vvvvwbvvwz_required = true;
		}
		jQuery('#jform_add_php_before_getitems').closest('.control-group').hide();
		// remove required attribute from add_php_before_getitems field
		if (!jform_vvvvwbvvxa_required)
		{
			updateFieldRequired('add_php_before_getitems',1);
			jQuery('#jform_add_php_before_getitems').removeAttr('required');
			jQuery('#jform_add_php_before_getitems').removeAttr('aria-required');
			jQuery('#jform_add_php_before_getitems').removeClass('required');
			jform_vvvvwbvvxa_required = true;
		}
		jQuery('#jform_add_php_getlistquery').closest('.control-group').hide();
		// remove required attribute from add_php_getlistquery field
		if (!jform_vvvvwbvvxb_required)
		{
			updateFieldRequired('add_php_getlistquery',1);
			jQuery('#jform_add_php_getlistquery').removeAttr('required');
			jQuery('#jform_add_php_getlistquery').removeAttr('aria-required');
			jQuery('#jform_add_php_getlistquery').removeClass('required');
			jform_vvvvwbvvxb_required = true;
		}
	}
}

// the vvvvwbv Some function
function gettype_vvvvwbv_SomeFunc(gettype_vvvvwbv)
{
	// set the function logic
	if (gettype_vvvvwbv == 2 || gettype_vvvvwbv == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwbw function
function vvvvwbw(gettype_vvvvwbw)
{
	if (isSet(gettype_vvvvwbw) && gettype_vvvvwbw.constructor !==
Array)
	{
		var temp_vvvvwbw = gettype_vvvvwbw;
		var gettype_vvvvwbw = [];
		gettype_vvvvwbw.push(temp_vvvvwbw);
	}
	else if (!isSet(gettype_vvvvwbw))
	{
		var gettype_vvvvwbw = [];
	}
	var gettype = gettype_vvvvwbw.some(gettype_vvvvwbw_SomeFunc);


	// set this function logic
	if (gettype)
	{
		jQuery('#jform_pagination').closest('.control-group').show();
		// add required attribute to pagination field
		if (jform_vvvvwbwvxc_required)
		{
			updateFieldRequired('pagination',0);
			jQuery('#jform_pagination').prop('required','required');
			jQuery('#jform_pagination').attr('aria-required',true);
			jQuery('#jform_pagination').addClass('required');
			jform_vvvvwbwvxc_required = false;
		}
	}
	else
	{
		jQuery('#jform_pagination').closest('.control-group').hide();
		// remove required attribute from pagination field
		if (!jform_vvvvwbwvxc_required)
		{
			updateFieldRequired('pagination',1);
			jQuery('#jform_pagination').removeAttr('required');
			jQuery('#jform_pagination').removeAttr('aria-required');
			jQuery('#jform_pagination').removeClass('required');
			jform_vvvvwbwvxc_required = true;
		}
	}
}

// the vvvvwbw Some function
function gettype_vvvvwbw_SomeFunc(gettype_vvvvwbw)
{
	// set the function logic
	if (gettype_vvvvwbw == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwbx function
function vvvvwbx(gettype_vvvvwbx)
{
	if (isSet(gettype_vvvvwbx) && gettype_vvvvwbx.constructor !==
Array)
	{
		var temp_vvvvwbx = gettype_vvvvwbx;
		var gettype_vvvvwbx = [];
		gettype_vvvvwbx.push(temp_vvvvwbx);
	}
	else if (!isSet(gettype_vvvvwbx))
	{
		var gettype_vvvvwbx = [];
	}
	var gettype = gettype_vvvvwbx.some(gettype_vvvvwbx_SomeFunc);


	// set this function logic
	if (gettype)
	{
		jQuery('#jform_add_php_router_parse').closest('.control-group').show();
		// add required attribute to add_php_router_parse field
		if (jform_vvvvwbxvxd_required)
		{
			updateFieldRequired('add_php_router_parse',0);
			jQuery('#jform_add_php_router_parse').prop('required','required');
			jQuery('#jform_add_php_router_parse').attr('aria-required',true);
			jQuery('#jform_add_php_router_parse').addClass('required');
			jform_vvvvwbxvxd_required = false;
		}
	}
	else
	{
		jQuery('#jform_add_php_router_parse').closest('.control-group').hide();
		// remove required attribute from add_php_router_parse field
		if (!jform_vvvvwbxvxd_required)
		{
			updateFieldRequired('add_php_router_parse',1);
			jQuery('#jform_add_php_router_parse').removeAttr('required');
			jQuery('#jform_add_php_router_parse').removeAttr('aria-required');
			jQuery('#jform_add_php_router_parse').removeClass('required');
			jform_vvvvwbxvxd_required = true;
		}
	}
}

// the vvvvwbx Some function
function gettype_vvvvwbx_SomeFunc(gettype_vvvvwbx)
{
	// set the function logic
	if (gettype_vvvvwbx == 1 || gettype_vvvvwbx == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwby function
function vvvvwby(gettype_vvvvwby,add_php_router_parse_vvvvwby)
{
	if (isSet(gettype_vvvvwby) && gettype_vvvvwby.constructor !==
Array)
	{
		var temp_vvvvwby = gettype_vvvvwby;
		var gettype_vvvvwby = [];
		gettype_vvvvwby.push(temp_vvvvwby);
	}
	else if (!isSet(gettype_vvvvwby))
	{
		var gettype_vvvvwby = [];
	}
	var gettype = gettype_vvvvwby.some(gettype_vvvvwby_SomeFunc);

	if (isSet(add_php_router_parse_vvvvwby) &&
add_php_router_parse_vvvvwby.constructor !== Array)
	{
		var temp_vvvvwby = add_php_router_parse_vvvvwby;
		var add_php_router_parse_vvvvwby = [];
		add_php_router_parse_vvvvwby.push(temp_vvvvwby);
	}
	else if (!isSet(add_php_router_parse_vvvvwby))
	{
		var add_php_router_parse_vvvvwby = [];
	}
	var add_php_router_parse =
add_php_router_parse_vvvvwby.some(add_php_router_parse_vvvvwby_SomeFunc);


	// set this function logic
	if (gettype && add_php_router_parse)
	{
		jQuery('#jform_php_router_parse').closest('.control-group').show();
		// add required attribute to php_router_parse field
		if (jform_vvvvwbyvxe_required)
		{
			updateFieldRequired('php_router_parse',0);
			jQuery('#jform_php_router_parse').prop('required','required');
			jQuery('#jform_php_router_parse').attr('aria-required',true);
			jQuery('#jform_php_router_parse').addClass('required');
			jform_vvvvwbyvxe_required = false;
		}
	}
	else
	{
		jQuery('#jform_php_router_parse').closest('.control-group').hide();
		// remove required attribute from php_router_parse field
		if (!jform_vvvvwbyvxe_required)
		{
			updateFieldRequired('php_router_parse',1);
			jQuery('#jform_php_router_parse').removeAttr('required');
			jQuery('#jform_php_router_parse').removeAttr('aria-required');
			jQuery('#jform_php_router_parse').removeClass('required');
			jform_vvvvwbyvxe_required = true;
		}
	}
}

// the vvvvwby Some function
function gettype_vvvvwby_SomeFunc(gettype_vvvvwby)
{
	// set the function logic
	if (gettype_vvvvwby == 1 || gettype_vvvvwby == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwby Some function
function
add_php_router_parse_vvvvwby_SomeFunc(add_php_router_parse_vvvvwby)
{
	// set the function logic
	if (add_php_router_parse_vvvvwby == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwca function
function vvvvwca(gettype_vvvvwca)
{
	if (isSet(gettype_vvvvwca) && gettype_vvvvwca.constructor !==
Array)
	{
		var temp_vvvvwca = gettype_vvvvwca;
		var gettype_vvvvwca = [];
		gettype_vvvvwca.push(temp_vvvvwca);
	}
	else if (!isSet(gettype_vvvvwca))
	{
		var gettype_vvvvwca = [];
	}
	var gettype = gettype_vvvvwca.some(gettype_vvvvwca_SomeFunc);


	// set this function logic
	if (gettype)
	{
		jQuery('#jform_plugin_events').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_plugin_events').closest('.control-group').hide();
	}
}

// the vvvvwca Some function
function gettype_vvvvwca_SomeFunc(gettype_vvvvwca)
{
	// set the function logic
	if (gettype_vvvvwca == 1)
	{
		return true;
	}
	return false;
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// get the linked details
	getLinked();
	var valueSwitch = jQuery("#jform_add_php_router_parse
input[type='radio']:checked").val();
	getDynamicScripts(valueSwitch);
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

function setSelectAll(select_all){
	// get source type
	var main_source =  jQuery("#jform_main_source").val();
	if (1 == main_source) {
		var key = 'view';
	} else if (2 == main_source) {
		var key = 'db';
	} else {
		return true;
	}
	// only continue if set
	if (select_all == 1) {
		// set default notice
		jQuery("#jform_"+key+"_selection").val('a.*');
		// set the selection text area to read only
		jQuery("#jform_"+key+"_selection").prop("readonly",
true);
	} else {
		// remove the read only from selection text area
		jQuery("#jform_"+key+"_selection").prop("readonly",
false);
		// get selected options
		var value_main =  jQuery("#jform_"+key+"_table_main
option:selected").val();
		// make sure that all fields are set as selected
		if (key === 'view') {
			getViewTableColumns(value_main, 'a', key, 3, true,
'', '');
		} else {
			getDbTableColumns(value_main, 'a', key, 3, true, '',
'');
		}
	}
}

function getViewTableColumns_server(viewId,asKey,rowType){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true");
	if (token.length > 0 && viewId > 0 && asKey.length
> 0)
	{
		var request =
token+'=1&as='+asKey+'&type='+rowType+'&id='+viewId;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getViewTableColumns(id, asKey, key, rowType, main, table_, nr_){
	// check if this is the main view
	if (main){
		var select_all =  jQuery("#jform_select_all
input[type='radio']:checked").val();
		// do not continue if set
		if (select_all == 1){
			setSelectAll(select_all);
			return true;
		}
	}
	getViewTableColumns_server(id, asKey, rowType).done(function(result) {
		if (result) {
			loadSelectionData(result, 'view', key, main, table_, nr_);
		} else {
			loadSelectionData(false, 'view', key, main, table_, nr_);
		}
	})
}

function getDbTableColumns_server(name,asKey,rowType)
{
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true");
	if (token.length > 0 && name.length > 0 &&
asKey.length > 0) {
		var request =
token+'=1&as='+asKey+'&type='+rowType+'&name='+name;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getDbTableColumns(name, asKey, key, rowType, main, table_, nr_){
	// check if this is the main view
	if (main){
		var select_all =  jQuery("#jform_select_all
input[type='radio']:checked").val();
		// do not continue if set
		if (select_all == 1){
			setSelectAll(select_all);
			return true;
		}
	}
	getDbTableColumns_server(name,asKey,rowType).done(function(result) {
		if (result) {
			loadSelectionData(result, 'db', key, main, table_, nr_);
		} else {
			loadSelectionData(false, 'db', key, main, table_, nr_);
		}
	})
}

function loadSelectionData(result, type, key, main, table_, nr_)
{
	if (main)
	{
		var textArea = 'textarea#jform_'+key+'_selection';
	}
	else 
	{
		var textArea =
'textarea#jform_join_'+type+'_table'+table_+'_join_'+type+'_table'+key+nr_+'_selection';
	}
	// no update the text area
	if (result)
	{
		jQuery(textArea).val(result);
	}
	else
	{
		jQuery(textArea).val('');
	}
}
function updateSubItems(fieldName, fieldNr, table_, nr_) {
	if(jQuery('#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table').length)
{
		jQuery('#adminForm').on('change',
'#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table',function
(e) {
			e.preventDefault();
			// get options
			var value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table
option:selected").val();
			var as_value2 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as
option:selected").val();
			var row_value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type
option:selected").val();
			if (fieldName === 'view') {
				getViewTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
			} else {
				getDbTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
			}
		});
		jQuery('#adminForm').on('change',
'#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_as',function
(e) {
			e.preventDefault();
			// get options
			var value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table
option:selected").val();
			var as_value2 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as
option:selected").val();
			var row_value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type
option:selected").val();
			if (fieldName === 'view') {
				getViewTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
			} else {
				getDbTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
			}
		});
		jQuery('#adminForm').on('change',
'#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_row_type',function
(e) {
			e.preventDefault();
			// get options
			var value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table
option:selected").val();
			var as_value2 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as
option:selected").val();
			var row_value1 =
jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type
option:selected").val();
			if (fieldName === 'view') {
				getViewTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
			} else {
				getDbTableColumns(value1, as_value2, fieldNr, row_value1, false,
table_, nr_);
			}
		});
	}
}

function getDynamicScripts(id){
	if (1 == id) {
		// get the current values
		var current_router_parse =
jQuery('textarea#jform_php_router_parse').val();
		// set the router parse method script
		if(current_router_parse.length == 0){
			getCodeFrom_server(1, 'routerparse', 'type',
'getDynamicScripts').done(function(result) {
				if(result){
					jQuery('textarea#jform_php_router_parse').val(result);
				}
			});
		}
	}
}

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
} 
PK��[��ururfield.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwczvxo_required = false;
jform_vvvvwdavxp_required = false;
jform_vvvvwdbvxq_required = false;
jform_vvvvwdcvxr_required = false;
jform_vvvvwdfvxs_required = false;
jform_vvvvwdfvxt_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var datalenght_vvvvwcz = jQuery("#jform_datalenght").val();
	vvvvwcz(datalenght_vvvvwcz);

	var datadefault_vvvvwda = jQuery("#jform_datadefault").val();
	vvvvwda(datadefault_vvvvwda);

	var datatype_vvvvwdb = jQuery("#jform_datatype").val();
	vvvvwdb(datatype_vvvvwdb);

	var datatype_vvvvwdc = jQuery("#jform_datatype").val();
	vvvvwdc(datatype_vvvvwdc);

	var store_vvvvwdd = jQuery("#jform_store").val();
	var datatype_vvvvwdd = jQuery("#jform_datatype").val();
	vvvvwdd(store_vvvvwdd,datatype_vvvvwdd);

	var store_vvvvwdf = jQuery("#jform_store").val();
	vvvvwdf(store_vvvvwdf);

	var add_css_view_vvvvwdg = jQuery("#jform_add_css_view
input[type='radio']:checked").val();
	vvvvwdg(add_css_view_vvvvwdg);

	var add_css_views_vvvvwdh = jQuery("#jform_add_css_views
input[type='radio']:checked").val();
	vvvvwdh(add_css_views_vvvvwdh);

	var add_javascript_view_footer_vvvvwdi =
jQuery("#jform_add_javascript_view_footer
input[type='radio']:checked").val();
	vvvvwdi(add_javascript_view_footer_vvvvwdi);

	var add_javascript_views_footer_vvvvwdj =
jQuery("#jform_add_javascript_views_footer
input[type='radio']:checked").val();
	vvvvwdj(add_javascript_views_footer_vvvvwdj);
});

// the vvvvwcz function
function vvvvwcz(datalenght_vvvvwcz)
{
	if (isSet(datalenght_vvvvwcz) && datalenght_vvvvwcz.constructor
!== Array)
	{
		var temp_vvvvwcz = datalenght_vvvvwcz;
		var datalenght_vvvvwcz = [];
		datalenght_vvvvwcz.push(temp_vvvvwcz);
	}
	else if (!isSet(datalenght_vvvvwcz))
	{
		var datalenght_vvvvwcz = [];
	}
	var datalenght = datalenght_vvvvwcz.some(datalenght_vvvvwcz_SomeFunc);


	// set this function logic
	if (datalenght)
	{
		jQuery('#jform_datalenght_other').closest('.control-group').show();
		// add required attribute to datalenght_other field
		if (jform_vvvvwczvxo_required)
		{
			updateFieldRequired('datalenght_other',0);
			jQuery('#jform_datalenght_other').prop('required','required');
			jQuery('#jform_datalenght_other').attr('aria-required',true);
			jQuery('#jform_datalenght_other').addClass('required');
			jform_vvvvwczvxo_required = false;
		}
	}
	else
	{
		jQuery('#jform_datalenght_other').closest('.control-group').hide();
		// remove required attribute from datalenght_other field
		if (!jform_vvvvwczvxo_required)
		{
			updateFieldRequired('datalenght_other',1);
			jQuery('#jform_datalenght_other').removeAttr('required');
			jQuery('#jform_datalenght_other').removeAttr('aria-required');
			jQuery('#jform_datalenght_other').removeClass('required');
			jform_vvvvwczvxo_required = true;
		}
	}
}

// the vvvvwcz Some function
function datalenght_vvvvwcz_SomeFunc(datalenght_vvvvwcz)
{
	// set the function logic
	if (datalenght_vvvvwcz == 'Other')
	{
		return true;
	}
	return false;
}

// the vvvvwda function
function vvvvwda(datadefault_vvvvwda)
{
	if (isSet(datadefault_vvvvwda) && datadefault_vvvvwda.constructor
!== Array)
	{
		var temp_vvvvwda = datadefault_vvvvwda;
		var datadefault_vvvvwda = [];
		datadefault_vvvvwda.push(temp_vvvvwda);
	}
	else if (!isSet(datadefault_vvvvwda))
	{
		var datadefault_vvvvwda = [];
	}
	var datadefault = datadefault_vvvvwda.some(datadefault_vvvvwda_SomeFunc);


	// set this function logic
	if (datadefault)
	{
		jQuery('#jform_datadefault_other').closest('.control-group').show();
		// add required attribute to datadefault_other field
		if (jform_vvvvwdavxp_required)
		{
			updateFieldRequired('datadefault_other',0);
			jQuery('#jform_datadefault_other').prop('required','required');
			jQuery('#jform_datadefault_other').attr('aria-required',true);
			jQuery('#jform_datadefault_other').addClass('required');
			jform_vvvvwdavxp_required = false;
		}
	}
	else
	{
		jQuery('#jform_datadefault_other').closest('.control-group').hide();
		// remove required attribute from datadefault_other field
		if (!jform_vvvvwdavxp_required)
		{
			updateFieldRequired('datadefault_other',1);
			jQuery('#jform_datadefault_other').removeAttr('required');
			jQuery('#jform_datadefault_other').removeAttr('aria-required');
			jQuery('#jform_datadefault_other').removeClass('required');
			jform_vvvvwdavxp_required = true;
		}
	}
}

// the vvvvwda Some function
function datadefault_vvvvwda_SomeFunc(datadefault_vvvvwda)
{
	// set the function logic
	if (datadefault_vvvvwda == 'Other')
	{
		return true;
	}
	return false;
}

// the vvvvwdb function
function vvvvwdb(datatype_vvvvwdb)
{
	if (isSet(datatype_vvvvwdb) && datatype_vvvvwdb.constructor !==
Array)
	{
		var temp_vvvvwdb = datatype_vvvvwdb;
		var datatype_vvvvwdb = [];
		datatype_vvvvwdb.push(temp_vvvvwdb);
	}
	else if (!isSet(datatype_vvvvwdb))
	{
		var datatype_vvvvwdb = [];
	}
	var datatype = datatype_vvvvwdb.some(datatype_vvvvwdb_SomeFunc);


	// set this function logic
	if (datatype)
	{
		jQuery('#jform_datadefault').closest('.control-group').show();
		jQuery('#jform_indexes').closest('.control-group').show();
		// add required attribute to indexes field
		if (jform_vvvvwdbvxq_required)
		{
			updateFieldRequired('indexes',0);
			jQuery('#jform_indexes').prop('required','required');
			jQuery('#jform_indexes').attr('aria-required',true);
			jQuery('#jform_indexes').addClass('required');
			jform_vvvvwdbvxq_required = false;
		}
	}
	else
	{
		jQuery('#jform_datadefault').closest('.control-group').hide();
		jQuery('#jform_indexes').closest('.control-group').hide();
		// remove required attribute from indexes field
		if (!jform_vvvvwdbvxq_required)
		{
			updateFieldRequired('indexes',1);
			jQuery('#jform_indexes').removeAttr('required');
			jQuery('#jform_indexes').removeAttr('aria-required');
			jQuery('#jform_indexes').removeClass('required');
			jform_vvvvwdbvxq_required = true;
		}
	}
}

// the vvvvwdb Some function
function datatype_vvvvwdb_SomeFunc(datatype_vvvvwdb)
{
	// set the function logic
	if (datatype_vvvvwdb == 'CHAR' || datatype_vvvvwdb ==
'VARCHAR' || datatype_vvvvwdb == 'DATETIME' ||
datatype_vvvvwdb == 'DATE' || datatype_vvvvwdb ==
'TIME' || datatype_vvvvwdb == 'INT' || datatype_vvvvwdb
== 'TINYINT' || datatype_vvvvwdb == 'BIGINT' ||
datatype_vvvvwdb == 'FLOAT' || datatype_vvvvwdb ==
'DECIMAL' || datatype_vvvvwdb == 'DOUBLE')
	{
		return true;
	}
	return false;
}

// the vvvvwdc function
function vvvvwdc(datatype_vvvvwdc)
{
	if (isSet(datatype_vvvvwdc) && datatype_vvvvwdc.constructor !==
Array)
	{
		var temp_vvvvwdc = datatype_vvvvwdc;
		var datatype_vvvvwdc = [];
		datatype_vvvvwdc.push(temp_vvvvwdc);
	}
	else if (!isSet(datatype_vvvvwdc))
	{
		var datatype_vvvvwdc = [];
	}
	var datatype = datatype_vvvvwdc.some(datatype_vvvvwdc_SomeFunc);


	// set this function logic
	if (datatype)
	{
		jQuery('#jform_datalenght').closest('.control-group').show();
		// add required attribute to datalenght field
		if (jform_vvvvwdcvxr_required)
		{
			updateFieldRequired('datalenght',0);
			jQuery('#jform_datalenght').prop('required','required');
			jQuery('#jform_datalenght').attr('aria-required',true);
			jQuery('#jform_datalenght').addClass('required');
			jform_vvvvwdcvxr_required = false;
		}
	}
	else
	{
		jQuery('#jform_datalenght').closest('.control-group').hide();
		// remove required attribute from datalenght field
		if (!jform_vvvvwdcvxr_required)
		{
			updateFieldRequired('datalenght',1);
			jQuery('#jform_datalenght').removeAttr('required');
			jQuery('#jform_datalenght').removeAttr('aria-required');
			jQuery('#jform_datalenght').removeClass('required');
			jform_vvvvwdcvxr_required = true;
		}
	}
}

// the vvvvwdc Some function
function datatype_vvvvwdc_SomeFunc(datatype_vvvvwdc)
{
	// set the function logic
	if (datatype_vvvvwdc == 'CHAR' || datatype_vvvvwdc ==
'VARCHAR' || datatype_vvvvwdc == 'INT' ||
datatype_vvvvwdc == 'TINYINT' || datatype_vvvvwdc ==
'BIGINT' || datatype_vvvvwdc == 'FLOAT' ||
datatype_vvvvwdc == 'DECIMAL' || datatype_vvvvwdc ==
'DOUBLE')
	{
		return true;
	}
	return false;
}

// the vvvvwdd function
function vvvvwdd(store_vvvvwdd,datatype_vvvvwdd)
{
	if (isSet(store_vvvvwdd) && store_vvvvwdd.constructor !== Array)
	{
		var temp_vvvvwdd = store_vvvvwdd;
		var store_vvvvwdd = [];
		store_vvvvwdd.push(temp_vvvvwdd);
	}
	else if (!isSet(store_vvvvwdd))
	{
		var store_vvvvwdd = [];
	}
	var store = store_vvvvwdd.some(store_vvvvwdd_SomeFunc);

	if (isSet(datatype_vvvvwdd) && datatype_vvvvwdd.constructor !==
Array)
	{
		var temp_vvvvwdd = datatype_vvvvwdd;
		var datatype_vvvvwdd = [];
		datatype_vvvvwdd.push(temp_vvvvwdd);
	}
	else if (!isSet(datatype_vvvvwdd))
	{
		var datatype_vvvvwdd = [];
	}
	var datatype = datatype_vvvvwdd.some(datatype_vvvvwdd_SomeFunc);


	// set this function logic
	if (store && datatype)
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').hide();
	}
}

// the vvvvwdd Some function
function store_vvvvwdd_SomeFunc(store_vvvvwdd)
{
	// set the function logic
	if (store_vvvvwdd == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwdd Some function
function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd)
{
	// set the function logic
	if (datatype_vvvvwdd == 'CHAR' || datatype_vvvvwdd ==
'VARCHAR' || datatype_vvvvwdd == 'TEXT' ||
datatype_vvvvwdd == 'MEDIUMTEXT' || datatype_vvvvwdd ==
'LONGTEXT' || datatype_vvvvwdd == 'BLOB' ||
datatype_vvvvwdd == 'TINYBLOB' || datatype_vvvvwdd ==
'MEDIUMBLOB' || datatype_vvvvwdd == 'LONGBLOB')
	{
		return true;
	}
	return false;
}

// the vvvvwdf function
function vvvvwdf(store_vvvvwdf)
{
	if (isSet(store_vvvvwdf) && store_vvvvwdf.constructor !== Array)
	{
		var temp_vvvvwdf = store_vvvvwdf;
		var store_vvvvwdf = [];
		store_vvvvwdf.push(temp_vvvvwdf);
	}
	else if (!isSet(store_vvvvwdf))
	{
		var store_vvvvwdf = [];
	}
	var store = store_vvvvwdf.some(store_vvvvwdf_SomeFunc);


	// set this function logic
	if (store)
	{
		jQuery('#jform_initiator_on_get_model').closest('.control-group').show();
		jQuery('#jform_initiator_on_save_model').closest('.control-group').show();
		jQuery('.note_expert_field_save_mode').closest('.control-group').show();
		jQuery('#jform_on_get_model_field').closest('.control-group').show();
		// add required attribute to on_get_model_field field
		if (jform_vvvvwdfvxs_required)
		{
			updateFieldRequired('on_get_model_field',0);
			jQuery('#jform_on_get_model_field').prop('required','required');
			jQuery('#jform_on_get_model_field').attr('aria-required',true);
			jQuery('#jform_on_get_model_field').addClass('required');
			jform_vvvvwdfvxs_required = false;
		}
		jQuery('#jform_on_save_model_field').closest('.control-group').show();
		// add required attribute to on_save_model_field field
		if (jform_vvvvwdfvxt_required)
		{
			updateFieldRequired('on_save_model_field',0);
			jQuery('#jform_on_save_model_field').prop('required','required');
			jQuery('#jform_on_save_model_field').attr('aria-required',true);
			jQuery('#jform_on_save_model_field').addClass('required');
			jform_vvvvwdfvxt_required = false;
		}
	}
	else
	{
		jQuery('#jform_initiator_on_get_model').closest('.control-group').hide();
		jQuery('#jform_initiator_on_save_model').closest('.control-group').hide();
		jQuery('.note_expert_field_save_mode').closest('.control-group').hide();
		jQuery('#jform_on_get_model_field').closest('.control-group').hide();
		// remove required attribute from on_get_model_field field
		if (!jform_vvvvwdfvxs_required)
		{
			updateFieldRequired('on_get_model_field',1);
			jQuery('#jform_on_get_model_field').removeAttr('required');
			jQuery('#jform_on_get_model_field').removeAttr('aria-required');
			jQuery('#jform_on_get_model_field').removeClass('required');
			jform_vvvvwdfvxs_required = true;
		}
		jQuery('#jform_on_save_model_field').closest('.control-group').hide();
		// remove required attribute from on_save_model_field field
		if (!jform_vvvvwdfvxt_required)
		{
			updateFieldRequired('on_save_model_field',1);
			jQuery('#jform_on_save_model_field').removeAttr('required');
			jQuery('#jform_on_save_model_field').removeAttr('aria-required');
			jQuery('#jform_on_save_model_field').removeClass('required');
			jform_vvvvwdfvxt_required = true;
		}
	}
}

// the vvvvwdf Some function
function store_vvvvwdf_SomeFunc(store_vvvvwdf)
{
	// set the function logic
	if (store_vvvvwdf == 6)
	{
		return true;
	}
	return false;
}

// the vvvvwdg function
function vvvvwdg(add_css_view_vvvvwdg)
{
	// set the function logic
	if (add_css_view_vvvvwdg == 1)
	{
		jQuery('#jform_css_view-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_view-lbl').closest('.control-group').hide();
	}
}

// the vvvvwdh function
function vvvvwdh(add_css_views_vvvvwdh)
{
	// set the function logic
	if (add_css_views_vvvvwdh == 1)
	{
		jQuery('#jform_css_views-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_views-lbl').closest('.control-group').hide();
	}
}

// the vvvvwdi function
function vvvvwdi(add_javascript_view_footer_vvvvwdi)
{
	// set the function logic
	if (add_javascript_view_footer_vvvvwdi == 1)
	{
		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide();
	}
}

// the vvvvwdj function
function vvvvwdj(add_javascript_views_footer_vvvvwdj)
{
	// set the function logic
	if (add_javascript_views_footer_vvvvwdj == 1)
	{
		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide();
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// get type value
	var fieldtype = jQuery("#jform_fieldtype
option:selected").val();
	getFieldTypeProperties(fieldtype, false);
	// get the linked details
	getLinked();
	// get the validation rules
	getValidationRulesTable();
	// set button to create more fields
	addButton('validation_rule',
'validation_rules_header', 2);
	// get the field type text
	var fieldText = jQuery("#jform_fieldtype
option:selected").text().toLowerCase();
	// now check if database input is needed
	dbChecker(fieldText);
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

// the options row id key
var rowIdKey = 'properties';

function getFieldTypeProperties(fieldtype, db){
	getCodeFrom_server(fieldtype, 'type', 'type',
'fieldTypeProperties').done(function(result) {
		if(result.subform){
			// load the list of properties
			propertiesArray = result.nameListOptions;
			// remove previous forms of exist
			jQuery('.prop_removal').remove();
			// hide notice
			jQuery('.note_select_field_type').closest('.control-group').remove();
			// append to note_filter_information class
			jQuery('.note_filter_information').closest('.control-group').prepend(result.extra);
			// append to note_filter_information class
			if(result.textarea){
				jQuery.each( result.textarea, function( i, tField ) {
					// append to note_filter_information class
					jQuery('.note_filter_information').closest('.control-group').prepend(tField);
				});
			}
			// append to note_filter_information class
			jQuery('.note_filter_information').closest('.control-group').prepend(result.subform);
			// add the watcher
			rowWatcher();
			// initialize the new form
			jQuery('div.subform-repeatable').subformRepeatable();
			// update all the list fields to only show items not selected already
			propertyDynamicSet();
			// set the field type info
			jQuery('#help').remove();
			jQuery('.helpNote').append('<div
id="help">'+result.description+'<br
/>'+result.values_description+'</div>');
			// load the database properties if not set and defaults were found
			if (db && result.database){
				// update datatype
				jQuery('#jform_datatype').val(result.database.datatype);
				jQuery('#jform_datatype').trigger("liszt:updated");
				jQuery('#jform_datatype').trigger("change");
				// be sure to remove from no required
				updateFieldRequired('datatype', 0);
				// update datalenght
				jQuery('#jform_datalenght').val(result.database.datalenght);
				jQuery('#jform_datalenght').trigger("liszt:updated");
				jQuery('#jform_datalenght').trigger("change");
				// be sure to remove from no required
				updateFieldRequired('datalenght', 0);
				// load the datalenght_other if needed
				if ('Other' === result.database.datalenght){
					jQuery('#jform_datalenght_other').val(result.database.datalenght_other);
					// be sure to remove from no required
					updateFieldRequired('datalenght_other', 0);
				}
				// update datadefault
				jQuery('#jform_datadefault').val(result.database.datadefault);
				jQuery('#jform_datadefault').trigger("liszt:updated");
				jQuery('#jform_datadefault').trigger("change");
				// load the datadefault_other if needed
				if ('Other' === result.database.datadefault){
					jQuery('#jform_datadefault_other').val(result.database.datadefault_other);
					// be sure to remove from no required
					updateFieldRequired('datadefault_other', 0);
				}
				// update indexes
				jQuery('#jform_indexes').val(result.database.indexes);
				jQuery('#jform_indexes').trigger("liszt:updated");
				jQuery('#jform_indexes').trigger("change");
				// be sure to remove from no required
				updateFieldRequired('indexes', 0);
				// update store
				jQuery('#jform_store').val(result.database.store);
				jQuery('#jform_store').trigger("liszt:updated");
				jQuery('#jform_store').trigger("change");
				// be sure to remove from no required
				updateFieldRequired('store', 0);
			}
		}
	})
}

function getFieldPropertyDesc(field, targetForm){
	// get the ID
	var id = jQuery(field).attr('id');
	// build the target array
	var target = id.split('__');
	// get property value
	var property = jQuery(field).val();
	// first check that there isn't any of this property type already
set
	if (propertyIsSet(property, id, targetForm)) {
		// reset the selection
		jQuery('#'+id).val('');
		jQuery('#'+id).trigger("liszt:updated");
		// give out a notice
		jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER'),
timeout: 5000, status: 'warning', pos: 'top-center'});
		// update the values
		jQuery('#'+target[0]+'__desc').val('');
		jQuery('#'+target[0]+'__value').val('');
	} else {
		// do a dynamic update
		propertyDynamicSet();
		// get type value
		if (targetForm === 'properties') {
			var fieldtype = jQuery("#jform_fieldtype
option:selected").val();
		} else {
			var fieldtype = 'extra';
		}
		getFieldPropertyDesc_server(fieldtype, property).done(function(result) {
			if(result.desc || result.value){
				// update the values
				jQuery('#'+target[0]+'__desc').val(result.desc);
				jQuery('#'+target[0]+'__value').val(result.value);
			} else {
				// update the values
				jQuery('#'+target[0]+'__desc').val(Joomla.JText._('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND'));
				jQuery('#'+target[0]+'__value').val('');
			}
		});
	}
}

// set properties the options
propertiesArray = {};
var propertyIdRemoved;

function propertyDynamicSet() {
	propertiesAvailable = {};
	propertiesSelectedArray = {};
	propertiesTrackerArray = {};
	var i;
	for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
		// build ID
		var id_check = rowIdKey+'_'+rowIdKey+i+'__name';
		// first check if Id is on page as that not the same as the one currently
calling
		if (jQuery("#"+id_check).length && propertyIdRemoved
!== id_check) {
			// build the selected array
			var key =  jQuery("#"+id_check+"
option:selected").val();
			var text =  jQuery("#"+id_check+"
option:selected").text();
			propertiesSelectedArray[key] = text;
			// keep track of the value set
			propertiesTrackerArray[id_check] = key;
			// clear the options out
			jQuery("#"+id_check).find('option').remove().end();
		}
	}
	// trigger chosen on the list fields
	jQuery('.field_list_name_options').chosen({"disable_search_threshold":10,"search_contains":true,"allow_single_deselect":true,"placeholder_text_multiple":Joomla.JText._("COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS"),"placeholder_text_single":Joomla.JText._("COM_COMPONENTBUILDER_SELECT_A_PROPERTY"),"no_results_text":Joomla.JText._("COM_COMPONENTBUILDER_NO_RESULTS_MATCH")});
	// now build the list to keep
	jQuery.each( propertiesArray, function( prop, name ) {
		if (!propertiesSelectedArray.hasOwnProperty(prop)) {
			propertiesAvailable[prop] = name;
		}
	});
	// now add the lists back
	jQuery.each( propertiesTrackerArray, function( tId, tKey ) {
		if (jQuery('#'+tId).length) {
			jQuery('#'+tId).append('<option
value="'+tKey+'">'+propertiesSelectedArray[tKey]+'</option>');
			jQuery.each( propertiesAvailable, function( aKey, aValue ) {
				jQuery('#'+tId).append('<option
value="'+aKey+'">'+aValue+'</option>');
			});
			jQuery('#'+tId).val(tKey);
			jQuery('#'+tId).trigger('liszt:updated');
		}
	});
}

function rowWatcher() {
	jQuery(document).on('subform-row-remove', function(event, row){
       		propertyIdRemoved =
jQuery(row.innerHTML).find('.field_list_name_options').attr('id');
       		propertyDynamicSet();
	});
	jQuery(document).on('subform-row-add', function(event, row){
       		propertyDynamicSet();
	});
}

function propertyIsSet(prop, id, targetForm) {
	var i;
	for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
		// build ID
		var id_check = targetForm+'_'+targetForm+i+'__name';
		// first check if Id is on page as that not the same as the one currently
calling
		if (jQuery("#"+id_check).length && id_check != id) {
			// get the property value
			var tmp = jQuery("#"+id_check+"
option:selected").val();
			// now validate
			if (tmp === prop) {
				return true;
			}
		}
	}
	return false;
}

function getFieldPropertyDesc_server(fieldtype, property){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getFieldPropertyDesc&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && (fieldtype > 0 || fieldtype.length
> 0) && property.length > 0){
		var request =
token+'=1&fieldtype='+fieldtype+'&property='+property;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getValidationRulesTable(){
	getCodeFrom_server(1,'type','type',
'getValidationRulesTable').done(function(result) {
		if(result){
			jQuery('#display_validation_rules').html(result);
		}
	});
}

function dbChecker(type){
	if ('note' === type || 'spacer' === type) {
		// update the datatype selection
		jQuery('#jform_datatype').val('').trigger('liszt:updated').change();
		jQuery('#jform_datalenght').val('').trigger('liszt:updated').change();
		jQuery('#jform_datadefault').val('').trigger('liszt:updated').change();
		jQuery('#jform_datadefault').val('').trigger('liszt:updated').change();
		jQuery('#jform_indexes').val(0).trigger('liszt:updated').change();
		jQuery('#jform_store').val(0).trigger('liszt:updated').change();
		// remove the datatype
		jQuery('#jform_datatype-lbl').closest('.control-group').hide();
		jQuery('#jform_datatype').closest('.control-group').hide();
		updateFieldRequired('datatype',1);
		jQuery('#jform_datatype').removeAttr('required');
		jQuery('#jform_datatype').removeAttr('aria-required');
		jQuery('#jform_datatype').removeClass('required');
		// remove the null selection
		jQuery('#jform_null_switch-lbl').closest('.control-group').hide();
		jQuery('#jform_null_switch').closest('.control-group').hide();
		updateFieldRequired('null_switch',1);
		jQuery('#jform_null_switch').removeAttr('required');
		jQuery('#jform_null_switch').removeAttr('aria-required');
		jQuery('#jform_null_switch').removeClass('required');
		// show notice
		jQuery('.note_no_database_settings_needed').closest('.control-group').show();
		jQuery('.note_database_settings_needed').closest('.control-group').hide();
	} else {
		// add the datatype
		jQuery('#jform_datatype-lbl').closest('.control-group').show();
		jQuery('#jform_datatype').closest('.control-group').show();
		updateFieldRequired('datatype',0);
		jQuery('#jform_datatype').prop('required','required');
		jQuery('#jform_datatype').attr('aria-required',true);
		jQuery('#jform_datatype').addClass('required');
		// add the null selection
		jQuery('#jform_null_switch-lbl').closest('.control-group').show();
		jQuery('#jform_null_switch').closest('.control-group').show();
		updateFieldRequired('null_switch',0);
		jQuery('#jform_null_switch').prop('required','required');
		jQuery('#jform_null_switch').attr('aria-required',true);
		jQuery('#jform_null_switch').addClass('required');
		// remove notice
		jQuery('.note_no_database_settings_needed').closest('.control-group').hide();
		jQuery('.note_database_settings_needed').closest('.control-group').show();
	}
}

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
}

function addButton_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButton(type, where, size){
	// just to insure that default behaviour still works
	size = typeof size !== 'undefined' ? size : 1;
	addButton_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	})
}

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[�}9j9jfieldtype.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwdkvxu_required = false;
jform_vvvvwdmvxv_required = false;
jform_vvvvwdovxw_required = false;
jform_vvvvwdqvxx_required = false;
jform_vvvvwdrvxy_required = false;
jform_vvvvwdsvxz_required = false;
jform_vvvvwdxvya_required = false;
jform_vvvvwdxvyb_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var datalenght_vvvvwdk = jQuery("#jform_datalenght").val();
	var has_defaults_vvvvwdk = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk);

	var datadefault_vvvvwdm = jQuery("#jform_datadefault").val();
	var has_defaults_vvvvwdm = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm);

	var datatype_vvvvwdo = jQuery("#jform_datatype").val();
	var has_defaults_vvvvwdo = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo);

	var datatype_vvvvwdq = jQuery("#jform_datatype").val();
	var has_defaults_vvvvwdq = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq);

	var has_defaults_vvvvwdr = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	var datatype_vvvvwdr = jQuery("#jform_datatype").val();
	vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr);

	var datatype_vvvvwds = jQuery("#jform_datatype").val();
	var has_defaults_vvvvwds = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds);

	var store_vvvvwdu = jQuery("#jform_store").val();
	var datatype_vvvvwdu = jQuery("#jform_datatype").val();
	var has_defaults_vvvvwdu = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);

	var datatype_vvvvwdv = jQuery("#jform_datatype").val();
	var store_vvvvwdv = jQuery("#jform_store").val();
	var has_defaults_vvvvwdv = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);

	var has_defaults_vvvvwdw = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	var store_vvvvwdw = jQuery("#jform_store").val();
	var datatype_vvvvwdw = jQuery("#jform_datatype").val();
	vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);

	var has_defaults_vvvvwdx = jQuery("#jform_has_defaults
input[type='radio']:checked").val();
	vvvvwdx(has_defaults_vvvvwdx);
});

// the vvvvwdk function
function vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk)
{
	if (isSet(datalenght_vvvvwdk) && datalenght_vvvvwdk.constructor
!== Array)
	{
		var temp_vvvvwdk = datalenght_vvvvwdk;
		var datalenght_vvvvwdk = [];
		datalenght_vvvvwdk.push(temp_vvvvwdk);
	}
	else if (!isSet(datalenght_vvvvwdk))
	{
		var datalenght_vvvvwdk = [];
	}
	var datalenght = datalenght_vvvvwdk.some(datalenght_vvvvwdk_SomeFunc);

	if (isSet(has_defaults_vvvvwdk) &&
has_defaults_vvvvwdk.constructor !== Array)
	{
		var temp_vvvvwdk = has_defaults_vvvvwdk;
		var has_defaults_vvvvwdk = [];
		has_defaults_vvvvwdk.push(temp_vvvvwdk);
	}
	else if (!isSet(has_defaults_vvvvwdk))
	{
		var has_defaults_vvvvwdk = [];
	}
	var has_defaults =
has_defaults_vvvvwdk.some(has_defaults_vvvvwdk_SomeFunc);


	// set this function logic
	if (datalenght && has_defaults)
	{
		jQuery('#jform_datalenght_other').closest('.control-group').show();
		// add required attribute to datalenght_other field
		if (jform_vvvvwdkvxu_required)
		{
			updateFieldRequired('datalenght_other',0);
			jQuery('#jform_datalenght_other').prop('required','required');
			jQuery('#jform_datalenght_other').attr('aria-required',true);
			jQuery('#jform_datalenght_other').addClass('required');
			jform_vvvvwdkvxu_required = false;
		}
	}
	else
	{
		jQuery('#jform_datalenght_other').closest('.control-group').hide();
		// remove required attribute from datalenght_other field
		if (!jform_vvvvwdkvxu_required)
		{
			updateFieldRequired('datalenght_other',1);
			jQuery('#jform_datalenght_other').removeAttr('required');
			jQuery('#jform_datalenght_other').removeAttr('aria-required');
			jQuery('#jform_datalenght_other').removeClass('required');
			jform_vvvvwdkvxu_required = true;
		}
	}
}

// the vvvvwdk Some function
function datalenght_vvvvwdk_SomeFunc(datalenght_vvvvwdk)
{
	// set the function logic
	if (datalenght_vvvvwdk == 'Other')
	{
		return true;
	}
	return false;
}

// the vvvvwdk Some function
function has_defaults_vvvvwdk_SomeFunc(has_defaults_vvvvwdk)
{
	// set the function logic
	if (has_defaults_vvvvwdk == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdm function
function vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm)
{
	if (isSet(datadefault_vvvvwdm) && datadefault_vvvvwdm.constructor
!== Array)
	{
		var temp_vvvvwdm = datadefault_vvvvwdm;
		var datadefault_vvvvwdm = [];
		datadefault_vvvvwdm.push(temp_vvvvwdm);
	}
	else if (!isSet(datadefault_vvvvwdm))
	{
		var datadefault_vvvvwdm = [];
	}
	var datadefault = datadefault_vvvvwdm.some(datadefault_vvvvwdm_SomeFunc);

	if (isSet(has_defaults_vvvvwdm) &&
has_defaults_vvvvwdm.constructor !== Array)
	{
		var temp_vvvvwdm = has_defaults_vvvvwdm;
		var has_defaults_vvvvwdm = [];
		has_defaults_vvvvwdm.push(temp_vvvvwdm);
	}
	else if (!isSet(has_defaults_vvvvwdm))
	{
		var has_defaults_vvvvwdm = [];
	}
	var has_defaults =
has_defaults_vvvvwdm.some(has_defaults_vvvvwdm_SomeFunc);


	// set this function logic
	if (datadefault && has_defaults)
	{
		jQuery('#jform_datadefault_other').closest('.control-group').show();
		// add required attribute to datadefault_other field
		if (jform_vvvvwdmvxv_required)
		{
			updateFieldRequired('datadefault_other',0);
			jQuery('#jform_datadefault_other').prop('required','required');
			jQuery('#jform_datadefault_other').attr('aria-required',true);
			jQuery('#jform_datadefault_other').addClass('required');
			jform_vvvvwdmvxv_required = false;
		}
	}
	else
	{
		jQuery('#jform_datadefault_other').closest('.control-group').hide();
		// remove required attribute from datadefault_other field
		if (!jform_vvvvwdmvxv_required)
		{
			updateFieldRequired('datadefault_other',1);
			jQuery('#jform_datadefault_other').removeAttr('required');
			jQuery('#jform_datadefault_other').removeAttr('aria-required');
			jQuery('#jform_datadefault_other').removeClass('required');
			jform_vvvvwdmvxv_required = true;
		}
	}
}

// the vvvvwdm Some function
function datadefault_vvvvwdm_SomeFunc(datadefault_vvvvwdm)
{
	// set the function logic
	if (datadefault_vvvvwdm == 'Other')
	{
		return true;
	}
	return false;
}

// the vvvvwdm Some function
function has_defaults_vvvvwdm_SomeFunc(has_defaults_vvvvwdm)
{
	// set the function logic
	if (has_defaults_vvvvwdm == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdo function
function vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo)
{
	if (isSet(datatype_vvvvwdo) && datatype_vvvvwdo.constructor !==
Array)
	{
		var temp_vvvvwdo = datatype_vvvvwdo;
		var datatype_vvvvwdo = [];
		datatype_vvvvwdo.push(temp_vvvvwdo);
	}
	else if (!isSet(datatype_vvvvwdo))
	{
		var datatype_vvvvwdo = [];
	}
	var datatype = datatype_vvvvwdo.some(datatype_vvvvwdo_SomeFunc);

	if (isSet(has_defaults_vvvvwdo) &&
has_defaults_vvvvwdo.constructor !== Array)
	{
		var temp_vvvvwdo = has_defaults_vvvvwdo;
		var has_defaults_vvvvwdo = [];
		has_defaults_vvvvwdo.push(temp_vvvvwdo);
	}
	else if (!isSet(has_defaults_vvvvwdo))
	{
		var has_defaults_vvvvwdo = [];
	}
	var has_defaults =
has_defaults_vvvvwdo.some(has_defaults_vvvvwdo_SomeFunc);


	// set this function logic
	if (datatype && has_defaults)
	{
		jQuery('#jform_datalenght').closest('.control-group').show();
		// add required attribute to datalenght field
		if (jform_vvvvwdovxw_required)
		{
			updateFieldRequired('datalenght',0);
			jQuery('#jform_datalenght').prop('required','required');
			jQuery('#jform_datalenght').attr('aria-required',true);
			jQuery('#jform_datalenght').addClass('required');
			jform_vvvvwdovxw_required = false;
		}
	}
	else
	{
		jQuery('#jform_datalenght').closest('.control-group').hide();
		// remove required attribute from datalenght field
		if (!jform_vvvvwdovxw_required)
		{
			updateFieldRequired('datalenght',1);
			jQuery('#jform_datalenght').removeAttr('required');
			jQuery('#jform_datalenght').removeAttr('aria-required');
			jQuery('#jform_datalenght').removeClass('required');
			jform_vvvvwdovxw_required = true;
		}
	}
}

// the vvvvwdo Some function
function datatype_vvvvwdo_SomeFunc(datatype_vvvvwdo)
{
	// set the function logic
	if (datatype_vvvvwdo == 'CHAR' || datatype_vvvvwdo ==
'VARCHAR' || datatype_vvvvwdo == 'INT' ||
datatype_vvvvwdo == 'TINYINT' || datatype_vvvvwdo ==
'BIGINT' || datatype_vvvvwdo == 'FLOAT' ||
datatype_vvvvwdo == 'DECIMAL' || datatype_vvvvwdo ==
'DOUBLE')
	{
		return true;
	}
	return false;
}

// the vvvvwdo Some function
function has_defaults_vvvvwdo_SomeFunc(has_defaults_vvvvwdo)
{
	// set the function logic
	if (has_defaults_vvvvwdo == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdq function
function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq)
{
	if (isSet(datatype_vvvvwdq) && datatype_vvvvwdq.constructor !==
Array)
	{
		var temp_vvvvwdq = datatype_vvvvwdq;
		var datatype_vvvvwdq = [];
		datatype_vvvvwdq.push(temp_vvvvwdq);
	}
	else if (!isSet(datatype_vvvvwdq))
	{
		var datatype_vvvvwdq = [];
	}
	var datatype = datatype_vvvvwdq.some(datatype_vvvvwdq_SomeFunc);

	if (isSet(has_defaults_vvvvwdq) &&
has_defaults_vvvvwdq.constructor !== Array)
	{
		var temp_vvvvwdq = has_defaults_vvvvwdq;
		var has_defaults_vvvvwdq = [];
		has_defaults_vvvvwdq.push(temp_vvvvwdq);
	}
	else if (!isSet(has_defaults_vvvvwdq))
	{
		var has_defaults_vvvvwdq = [];
	}
	var has_defaults =
has_defaults_vvvvwdq.some(has_defaults_vvvvwdq_SomeFunc);


	// set this function logic
	if (datatype && has_defaults)
	{
		jQuery('#jform_datadefault').closest('.control-group').show();
		jQuery('#jform_indexes').closest('.control-group').show();
		// add required attribute to indexes field
		if (jform_vvvvwdqvxx_required)
		{
			updateFieldRequired('indexes',0);
			jQuery('#jform_indexes').prop('required','required');
			jQuery('#jform_indexes').attr('aria-required',true);
			jQuery('#jform_indexes').addClass('required');
			jform_vvvvwdqvxx_required = false;
		}
	}
	else
	{
		jQuery('#jform_datadefault').closest('.control-group').hide();
		jQuery('#jform_indexes').closest('.control-group').hide();
		// remove required attribute from indexes field
		if (!jform_vvvvwdqvxx_required)
		{
			updateFieldRequired('indexes',1);
			jQuery('#jform_indexes').removeAttr('required');
			jQuery('#jform_indexes').removeAttr('aria-required');
			jQuery('#jform_indexes').removeClass('required');
			jform_vvvvwdqvxx_required = true;
		}
	}
}

// the vvvvwdq Some function
function datatype_vvvvwdq_SomeFunc(datatype_vvvvwdq)
{
	// set the function logic
	if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq ==
'VARCHAR' || datatype_vvvvwdq == 'DATETIME' ||
datatype_vvvvwdq == 'DATE' || datatype_vvvvwdq ==
'TIME' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq
== 'TINYINT' || datatype_vvvvwdq == 'BIGINT' ||
datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq ==
'DECIMAL' || datatype_vvvvwdq == 'DOUBLE')
	{
		return true;
	}
	return false;
}

// the vvvvwdq Some function
function has_defaults_vvvvwdq_SomeFunc(has_defaults_vvvvwdq)
{
	// set the function logic
	if (has_defaults_vvvvwdq == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdr function
function vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr)
{
	if (isSet(has_defaults_vvvvwdr) &&
has_defaults_vvvvwdr.constructor !== Array)
	{
		var temp_vvvvwdr = has_defaults_vvvvwdr;
		var has_defaults_vvvvwdr = [];
		has_defaults_vvvvwdr.push(temp_vvvvwdr);
	}
	else if (!isSet(has_defaults_vvvvwdr))
	{
		var has_defaults_vvvvwdr = [];
	}
	var has_defaults =
has_defaults_vvvvwdr.some(has_defaults_vvvvwdr_SomeFunc);

	if (isSet(datatype_vvvvwdr) && datatype_vvvvwdr.constructor !==
Array)
	{
		var temp_vvvvwdr = datatype_vvvvwdr;
		var datatype_vvvvwdr = [];
		datatype_vvvvwdr.push(temp_vvvvwdr);
	}
	else if (!isSet(datatype_vvvvwdr))
	{
		var datatype_vvvvwdr = [];
	}
	var datatype = datatype_vvvvwdr.some(datatype_vvvvwdr_SomeFunc);


	// set this function logic
	if (has_defaults && datatype)
	{
		jQuery('#jform_datadefault').closest('.control-group').show();
		jQuery('#jform_indexes').closest('.control-group').show();
		// add required attribute to indexes field
		if (jform_vvvvwdrvxy_required)
		{
			updateFieldRequired('indexes',0);
			jQuery('#jform_indexes').prop('required','required');
			jQuery('#jform_indexes').attr('aria-required',true);
			jQuery('#jform_indexes').addClass('required');
			jform_vvvvwdrvxy_required = false;
		}
	}
	else
	{
		jQuery('#jform_datadefault').closest('.control-group').hide();
		jQuery('#jform_indexes').closest('.control-group').hide();
		// remove required attribute from indexes field
		if (!jform_vvvvwdrvxy_required)
		{
			updateFieldRequired('indexes',1);
			jQuery('#jform_indexes').removeAttr('required');
			jQuery('#jform_indexes').removeAttr('aria-required');
			jQuery('#jform_indexes').removeClass('required');
			jform_vvvvwdrvxy_required = true;
		}
	}
}

// the vvvvwdr Some function
function has_defaults_vvvvwdr_SomeFunc(has_defaults_vvvvwdr)
{
	// set the function logic
	if (has_defaults_vvvvwdr == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdr Some function
function datatype_vvvvwdr_SomeFunc(datatype_vvvvwdr)
{
	// set the function logic
	if (datatype_vvvvwdr == 'CHAR' || datatype_vvvvwdr ==
'VARCHAR' || datatype_vvvvwdr == 'DATETIME' ||
datatype_vvvvwdr == 'DATE' || datatype_vvvvwdr ==
'TIME' || datatype_vvvvwdr == 'INT' || datatype_vvvvwdr
== 'TINYINT' || datatype_vvvvwdr == 'BIGINT' ||
datatype_vvvvwdr == 'FLOAT' || datatype_vvvvwdr ==
'DECIMAL' || datatype_vvvvwdr == 'DOUBLE')
	{
		return true;
	}
	return false;
}

// the vvvvwds function
function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds)
{
	if (isSet(datatype_vvvvwds) && datatype_vvvvwds.constructor !==
Array)
	{
		var temp_vvvvwds = datatype_vvvvwds;
		var datatype_vvvvwds = [];
		datatype_vvvvwds.push(temp_vvvvwds);
	}
	else if (!isSet(datatype_vvvvwds))
	{
		var datatype_vvvvwds = [];
	}
	var datatype = datatype_vvvvwds.some(datatype_vvvvwds_SomeFunc);

	if (isSet(has_defaults_vvvvwds) &&
has_defaults_vvvvwds.constructor !== Array)
	{
		var temp_vvvvwds = has_defaults_vvvvwds;
		var has_defaults_vvvvwds = [];
		has_defaults_vvvvwds.push(temp_vvvvwds);
	}
	else if (!isSet(has_defaults_vvvvwds))
	{
		var has_defaults_vvvvwds = [];
	}
	var has_defaults =
has_defaults_vvvvwds.some(has_defaults_vvvvwds_SomeFunc);


	// set this function logic
	if (datatype && has_defaults)
	{
		jQuery('#jform_store').closest('.control-group').show();
		// add required attribute to store field
		if (jform_vvvvwdsvxz_required)
		{
			updateFieldRequired('store',0);
			jQuery('#jform_store').prop('required','required');
			jQuery('#jform_store').attr('aria-required',true);
			jQuery('#jform_store').addClass('required');
			jform_vvvvwdsvxz_required = false;
		}
	}
	else
	{
		jQuery('#jform_store').closest('.control-group').hide();
		// remove required attribute from store field
		if (!jform_vvvvwdsvxz_required)
		{
			updateFieldRequired('store',1);
			jQuery('#jform_store').removeAttr('required');
			jQuery('#jform_store').removeAttr('aria-required');
			jQuery('#jform_store').removeClass('required');
			jform_vvvvwdsvxz_required = true;
		}
	}
}

// the vvvvwds Some function
function datatype_vvvvwds_SomeFunc(datatype_vvvvwds)
{
	// set the function logic
	if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds ==
'VARCHAR' || datatype_vvvvwds == 'TEXT' ||
datatype_vvvvwds == 'MEDIUMTEXT' || datatype_vvvvwds ==
'LONGTEXT' || datatype_vvvvwds == 'BLOB' ||
datatype_vvvvwds == 'TINYBLOB' || datatype_vvvvwds ==
'MEDIUMBLOB' || datatype_vvvvwds == 'LONGBLOB')
	{
		return true;
	}
	return false;
}

// the vvvvwds Some function
function has_defaults_vvvvwds_SomeFunc(has_defaults_vvvvwds)
{
	// set the function logic
	if (has_defaults_vvvvwds == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdu function
function vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu)
{
	if (isSet(store_vvvvwdu) && store_vvvvwdu.constructor !== Array)
	{
		var temp_vvvvwdu = store_vvvvwdu;
		var store_vvvvwdu = [];
		store_vvvvwdu.push(temp_vvvvwdu);
	}
	else if (!isSet(store_vvvvwdu))
	{
		var store_vvvvwdu = [];
	}
	var store = store_vvvvwdu.some(store_vvvvwdu_SomeFunc);

	if (isSet(datatype_vvvvwdu) && datatype_vvvvwdu.constructor !==
Array)
	{
		var temp_vvvvwdu = datatype_vvvvwdu;
		var datatype_vvvvwdu = [];
		datatype_vvvvwdu.push(temp_vvvvwdu);
	}
	else if (!isSet(datatype_vvvvwdu))
	{
		var datatype_vvvvwdu = [];
	}
	var datatype = datatype_vvvvwdu.some(datatype_vvvvwdu_SomeFunc);

	if (isSet(has_defaults_vvvvwdu) &&
has_defaults_vvvvwdu.constructor !== Array)
	{
		var temp_vvvvwdu = has_defaults_vvvvwdu;
		var has_defaults_vvvvwdu = [];
		has_defaults_vvvvwdu.push(temp_vvvvwdu);
	}
	else if (!isSet(has_defaults_vvvvwdu))
	{
		var has_defaults_vvvvwdu = [];
	}
	var has_defaults =
has_defaults_vvvvwdu.some(has_defaults_vvvvwdu_SomeFunc);


	// set this function logic
	if (store && datatype && has_defaults)
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').hide();
	}
}

// the vvvvwdu Some function
function store_vvvvwdu_SomeFunc(store_vvvvwdu)
{
	// set the function logic
	if (store_vvvvwdu == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwdu Some function
function datatype_vvvvwdu_SomeFunc(datatype_vvvvwdu)
{
	// set the function logic
	if (datatype_vvvvwdu == 'CHAR' || datatype_vvvvwdu ==
'VARCHAR' || datatype_vvvvwdu == 'TEXT' ||
datatype_vvvvwdu == 'MEDIUMTEXT' || datatype_vvvvwdu ==
'LONGTEXT' || datatype_vvvvwdu == 'BLOB' ||
datatype_vvvvwdu == 'TINYBLOB' || datatype_vvvvwdu ==
'MEDIUMBLOB' || datatype_vvvvwdu == 'LONGBLOB')
	{
		return true;
	}
	return false;
}

// the vvvvwdu Some function
function has_defaults_vvvvwdu_SomeFunc(has_defaults_vvvvwdu)
{
	// set the function logic
	if (has_defaults_vvvvwdu == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdv function
function vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv)
{
	if (isSet(datatype_vvvvwdv) && datatype_vvvvwdv.constructor !==
Array)
	{
		var temp_vvvvwdv = datatype_vvvvwdv;
		var datatype_vvvvwdv = [];
		datatype_vvvvwdv.push(temp_vvvvwdv);
	}
	else if (!isSet(datatype_vvvvwdv))
	{
		var datatype_vvvvwdv = [];
	}
	var datatype = datatype_vvvvwdv.some(datatype_vvvvwdv_SomeFunc);

	if (isSet(store_vvvvwdv) && store_vvvvwdv.constructor !== Array)
	{
		var temp_vvvvwdv = store_vvvvwdv;
		var store_vvvvwdv = [];
		store_vvvvwdv.push(temp_vvvvwdv);
	}
	else if (!isSet(store_vvvvwdv))
	{
		var store_vvvvwdv = [];
	}
	var store = store_vvvvwdv.some(store_vvvvwdv_SomeFunc);

	if (isSet(has_defaults_vvvvwdv) &&
has_defaults_vvvvwdv.constructor !== Array)
	{
		var temp_vvvvwdv = has_defaults_vvvvwdv;
		var has_defaults_vvvvwdv = [];
		has_defaults_vvvvwdv.push(temp_vvvvwdv);
	}
	else if (!isSet(has_defaults_vvvvwdv))
	{
		var has_defaults_vvvvwdv = [];
	}
	var has_defaults =
has_defaults_vvvvwdv.some(has_defaults_vvvvwdv_SomeFunc);


	// set this function logic
	if (datatype && store && has_defaults)
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').hide();
	}
}

// the vvvvwdv Some function
function datatype_vvvvwdv_SomeFunc(datatype_vvvvwdv)
{
	// set the function logic
	if (datatype_vvvvwdv == 'CHAR' || datatype_vvvvwdv ==
'VARCHAR' || datatype_vvvvwdv == 'TEXT' ||
datatype_vvvvwdv == 'MEDIUMTEXT' || datatype_vvvvwdv ==
'LONGTEXT' || datatype_vvvvwdv == 'BLOB' ||
datatype_vvvvwdv == 'TINYBLOB' || datatype_vvvvwdv ==
'MEDIUMBLOB' || datatype_vvvvwdv == 'LONGBLOB')
	{
		return true;
	}
	return false;
}

// the vvvvwdv Some function
function store_vvvvwdv_SomeFunc(store_vvvvwdv)
{
	// set the function logic
	if (store_vvvvwdv == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwdv Some function
function has_defaults_vvvvwdv_SomeFunc(has_defaults_vvvvwdv)
{
	// set the function logic
	if (has_defaults_vvvvwdv == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdw function
function vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw)
{
	if (isSet(has_defaults_vvvvwdw) &&
has_defaults_vvvvwdw.constructor !== Array)
	{
		var temp_vvvvwdw = has_defaults_vvvvwdw;
		var has_defaults_vvvvwdw = [];
		has_defaults_vvvvwdw.push(temp_vvvvwdw);
	}
	else if (!isSet(has_defaults_vvvvwdw))
	{
		var has_defaults_vvvvwdw = [];
	}
	var has_defaults =
has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc);

	if (isSet(store_vvvvwdw) && store_vvvvwdw.constructor !== Array)
	{
		var temp_vvvvwdw = store_vvvvwdw;
		var store_vvvvwdw = [];
		store_vvvvwdw.push(temp_vvvvwdw);
	}
	else if (!isSet(store_vvvvwdw))
	{
		var store_vvvvwdw = [];
	}
	var store = store_vvvvwdw.some(store_vvvvwdw_SomeFunc);

	if (isSet(datatype_vvvvwdw) && datatype_vvvvwdw.constructor !==
Array)
	{
		var temp_vvvvwdw = datatype_vvvvwdw;
		var datatype_vvvvwdw = [];
		datatype_vvvvwdw.push(temp_vvvvwdw);
	}
	else if (!isSet(datatype_vvvvwdw))
	{
		var datatype_vvvvwdw = [];
	}
	var datatype = datatype_vvvvwdw.some(datatype_vvvvwdw_SomeFunc);


	// set this function logic
	if (has_defaults && store && datatype)
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_whmcs_encryption').closest('.control-group').hide();
	}
}

// the vvvvwdw Some function
function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw)
{
	// set the function logic
	if (has_defaults_vvvvwdw == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwdw Some function
function store_vvvvwdw_SomeFunc(store_vvvvwdw)
{
	// set the function logic
	if (store_vvvvwdw == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwdw Some function
function datatype_vvvvwdw_SomeFunc(datatype_vvvvwdw)
{
	// set the function logic
	if (datatype_vvvvwdw == 'CHAR' || datatype_vvvvwdw ==
'VARCHAR' || datatype_vvvvwdw == 'TEXT' ||
datatype_vvvvwdw == 'MEDIUMTEXT' || datatype_vvvvwdw ==
'LONGTEXT' || datatype_vvvvwdw == 'BLOB' ||
datatype_vvvvwdw == 'TINYBLOB' || datatype_vvvvwdw ==
'MEDIUMBLOB' || datatype_vvvvwdw == 'LONGBLOB')
	{
		return true;
	}
	return false;
}

// the vvvvwdx function
function vvvvwdx(has_defaults_vvvvwdx)
{
	// set the function logic
	if (has_defaults_vvvvwdx == 1)
	{
		jQuery('#jform_datatype').closest('.control-group').show();
		// add required attribute to datatype field
		if (jform_vvvvwdxvya_required)
		{
			updateFieldRequired('datatype',0);
			jQuery('#jform_datatype').prop('required','required');
			jQuery('#jform_datatype').attr('aria-required',true);
			jQuery('#jform_datatype').addClass('required');
			jform_vvvvwdxvya_required = false;
		}
		jQuery('#jform_null_switch').closest('.control-group').show();
		// add required attribute to null_switch field
		if (jform_vvvvwdxvyb_required)
		{
			updateFieldRequired('null_switch',0);
			jQuery('#jform_null_switch').prop('required','required');
			jQuery('#jform_null_switch').attr('aria-required',true);
			jQuery('#jform_null_switch').addClass('required');
			jform_vvvvwdxvyb_required = false;
		}
	}
	else
	{
		jQuery('#jform_datatype').closest('.control-group').hide();
		// remove required attribute from datatype field
		if (!jform_vvvvwdxvya_required)
		{
			updateFieldRequired('datatype',1);
			jQuery('#jform_datatype').removeAttr('required');
			jQuery('#jform_datatype').removeAttr('aria-required');
			jQuery('#jform_datatype').removeClass('required');
			jform_vvvvwdxvya_required = true;
		}
		jQuery('#jform_null_switch').closest('.control-group').hide();
		// remove required attribute from null_switch field
		if (!jform_vvvvwdxvyb_required)
		{
			updateFieldRequired('null_switch',1);
			jQuery('#jform_null_switch').removeAttr('required');
			jQuery('#jform_null_switch').removeAttr('aria-required');
			jQuery('#jform_null_switch').removeClass('required');
			jform_vvvvwdxvyb_required = true;
		}
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function($)
{
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[S���Q!Q!help_document.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvweivyn_required = false;
jform_vvvvwejvyo_required = false;
jform_vvvvwekvyp_required = false;
jform_vvvvwelvyq_required = false;
jform_vvvvwenvyr_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var location_vvvvwei = jQuery("#jform_location
input[type='radio']:checked").val();
	vvvvwei(location_vvvvwei);

	var location_vvvvwej = jQuery("#jform_location
input[type='radio']:checked").val();
	vvvvwej(location_vvvvwej);

	var type_vvvvwek = jQuery("#jform_type").val();
	vvvvwek(type_vvvvwek);

	var type_vvvvwel = jQuery("#jform_type").val();
	vvvvwel(type_vvvvwel);

	var type_vvvvwem = jQuery("#jform_type").val();
	vvvvwem(type_vvvvwem);

	var target_vvvvwen = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwen(target_vvvvwen);
});

// the vvvvwei function
function vvvvwei(location_vvvvwei)
{
	// set the function logic
	if (location_vvvvwei == 1)
	{
		jQuery('#jform_admin_view').closest('.control-group').show();
		// add required attribute to admin_view field
		if (jform_vvvvweivyn_required)
		{
			updateFieldRequired('admin_view',0);
			jQuery('#jform_admin_view').prop('required','required');
			jQuery('#jform_admin_view').attr('aria-required',true);
			jQuery('#jform_admin_view').addClass('required');
			jform_vvvvweivyn_required = false;
		}
	}
	else
	{
		jQuery('#jform_admin_view').closest('.control-group').hide();
		// remove required attribute from admin_view field
		if (!jform_vvvvweivyn_required)
		{
			updateFieldRequired('admin_view',1);
			jQuery('#jform_admin_view').removeAttr('required');
			jQuery('#jform_admin_view').removeAttr('aria-required');
			jQuery('#jform_admin_view').removeClass('required');
			jform_vvvvweivyn_required = true;
		}
	}
}

// the vvvvwej function
function vvvvwej(location_vvvvwej)
{
	// set the function logic
	if (location_vvvvwej == 2)
	{
		jQuery('#jform_site_view').closest('.control-group').show();
		// add required attribute to site_view field
		if (jform_vvvvwejvyo_required)
		{
			updateFieldRequired('site_view',0);
			jQuery('#jform_site_view').prop('required','required');
			jQuery('#jform_site_view').attr('aria-required',true);
			jQuery('#jform_site_view').addClass('required');
			jform_vvvvwejvyo_required = false;
		}
	}
	else
	{
		jQuery('#jform_site_view').closest('.control-group').hide();
		// remove required attribute from site_view field
		if (!jform_vvvvwejvyo_required)
		{
			updateFieldRequired('site_view',1);
			jQuery('#jform_site_view').removeAttr('required');
			jQuery('#jform_site_view').removeAttr('aria-required');
			jQuery('#jform_site_view').removeClass('required');
			jform_vvvvwejvyo_required = true;
		}
	}
}

// the vvvvwek function
function vvvvwek(type_vvvvwek)
{
	if (isSet(type_vvvvwek) && type_vvvvwek.constructor !== Array)
	{
		var temp_vvvvwek = type_vvvvwek;
		var type_vvvvwek = [];
		type_vvvvwek.push(temp_vvvvwek);
	}
	else if (!isSet(type_vvvvwek))
	{
		var type_vvvvwek = [];
	}
	var type = type_vvvvwek.some(type_vvvvwek_SomeFunc);


	// set this function logic
	if (type)
	{
		jQuery('#jform_url').closest('.control-group').show();
		// add required attribute to url field
		if (jform_vvvvwekvyp_required)
		{
			updateFieldRequired('url',0);
			jQuery('#jform_url').prop('required','required');
			jQuery('#jform_url').attr('aria-required',true);
			jQuery('#jform_url').addClass('required');
			jform_vvvvwekvyp_required = false;
		}
	}
	else
	{
		jQuery('#jform_url').closest('.control-group').hide();
		// remove required attribute from url field
		if (!jform_vvvvwekvyp_required)
		{
			updateFieldRequired('url',1);
			jQuery('#jform_url').removeAttr('required');
			jQuery('#jform_url').removeAttr('aria-required');
			jQuery('#jform_url').removeClass('required');
			jform_vvvvwekvyp_required = true;
		}
	}
}

// the vvvvwek Some function
function type_vvvvwek_SomeFunc(type_vvvvwek)
{
	// set the function logic
	if (type_vvvvwek == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwel function
function vvvvwel(type_vvvvwel)
{
	if (isSet(type_vvvvwel) && type_vvvvwel.constructor !== Array)
	{
		var temp_vvvvwel = type_vvvvwel;
		var type_vvvvwel = [];
		type_vvvvwel.push(temp_vvvvwel);
	}
	else if (!isSet(type_vvvvwel))
	{
		var type_vvvvwel = [];
	}
	var type = type_vvvvwel.some(type_vvvvwel_SomeFunc);


	// set this function logic
	if (type)
	{
		jQuery('#jform_article').closest('.control-group').show();
		// add required attribute to article field
		if (jform_vvvvwelvyq_required)
		{
			updateFieldRequired('article',0);
			jQuery('#jform_article').prop('required','required');
			jQuery('#jform_article').attr('aria-required',true);
			jQuery('#jform_article').addClass('required');
			jform_vvvvwelvyq_required = false;
		}
	}
	else
	{
		jQuery('#jform_article').closest('.control-group').hide();
		// remove required attribute from article field
		if (!jform_vvvvwelvyq_required)
		{
			updateFieldRequired('article',1);
			jQuery('#jform_article').removeAttr('required');
			jQuery('#jform_article').removeAttr('aria-required');
			jQuery('#jform_article').removeClass('required');
			jform_vvvvwelvyq_required = true;
		}
	}
}

// the vvvvwel Some function
function type_vvvvwel_SomeFunc(type_vvvvwel)
{
	// set the function logic
	if (type_vvvvwel == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwem function
function vvvvwem(type_vvvvwem)
{
	if (isSet(type_vvvvwem) && type_vvvvwem.constructor !== Array)
	{
		var temp_vvvvwem = type_vvvvwem;
		var type_vvvvwem = [];
		type_vvvvwem.push(temp_vvvvwem);
	}
	else if (!isSet(type_vvvvwem))
	{
		var type_vvvvwem = [];
	}
	var type = type_vvvvwem.some(type_vvvvwem_SomeFunc);


	// set this function logic
	if (type)
	{
		jQuery('#jform_content-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_content-lbl').closest('.control-group').hide();
	}
}

// the vvvvwem Some function
function type_vvvvwem_SomeFunc(type_vvvvwem)
{
	// set the function logic
	if (type_vvvvwem == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwen function
function vvvvwen(target_vvvvwen)
{
	// set the function logic
	if (target_vvvvwen == 1)
	{
		jQuery('#jform_groups').closest('.control-group').show();
		// add required attribute to groups field
		if (jform_vvvvwenvyr_required)
		{
			updateFieldRequired('groups',0);
			jQuery('#jform_groups').prop('required','required');
			jQuery('#jform_groups').attr('aria-required',true);
			jQuery('#jform_groups').addClass('required');
			jform_vvvvwenvyr_required = false;
		}
	}
	else
	{
		jQuery('#jform_groups').closest('.control-group').hide();
		// remove required attribute from groups field
		if (!jform_vvvvwenvyr_required)
		{
			updateFieldRequired('groups',1);
			jQuery('#jform_groups').removeAttr('required');
			jQuery('#jform_groups').removeAttr('aria-required');
			jQuery('#jform_groups').removeClass('required');
			jform_vvvvwenvyr_required = true;
		}
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
} 
PK��[�#o,,
index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[n��Ktwtwjoomla_component.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvvwbvvv_required = false;
jform_vvvvvwcvvw_required = false;
jform_vvvvvwevvx_required = false;
jform_vvvvvwwvvy_required = false;
jform_vvvvvwxvvz_required = false;
jform_vvvvvxavwa_required = false;
jform_vvvvvxavwb_required = false;
jform_vvvvvxavwc_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var add_php_helper_admin_vvvvvvv =
jQuery("#jform_add_php_helper_admin
input[type='radio']:checked").val();
	vvvvvvv(add_php_helper_admin_vvvvvvv);

	var add_php_helper_site_vvvvvvw = jQuery("#jform_add_php_helper_site
input[type='radio']:checked").val();
	vvvvvvw(add_php_helper_site_vvvvvvw);

	var add_php_helper_both_vvvvvvx = jQuery("#jform_add_php_helper_both
input[type='radio']:checked").val();
	vvvvvvx(add_php_helper_both_vvvvvvx);

	var add_css_admin_vvvvvvy = jQuery("#jform_add_css_admin
input[type='radio']:checked").val();
	vvvvvvy(add_css_admin_vvvvvvy);

	var add_css_site_vvvvvvz = jQuery("#jform_add_css_site
input[type='radio']:checked").val();
	vvvvvvz(add_css_site_vvvvvvz);

	var add_javascript_vvvvvwa = jQuery("#jform_add_javascript
input[type='radio']:checked").val();
	vvvvvwa(add_javascript_vvvvvwa);

	var add_sql_vvvvvwb = jQuery("#jform_add_sql
input[type='radio']:checked").val();
	vvvvvwb(add_sql_vvvvvwb);

	var add_sql_uninstall_vvvvvwc = jQuery("#jform_add_sql_uninstall
input[type='radio']:checked").val();
	vvvvvwc(add_sql_uninstall_vvvvvwc);

	var emptycontributors_vvvvvwd = jQuery("#jform_emptycontributors
input[type='radio']:checked").val();
	vvvvvwd(emptycontributors_vvvvvwd);

	var add_license_vvvvvwe = jQuery("#jform_add_license
input[type='radio']:checked").val();
	vvvvvwe(add_license_vvvvvwe);

	var add_admin_event_vvvvvwf = jQuery("#jform_add_admin_event
input[type='radio']:checked").val();
	vvvvvwf(add_admin_event_vvvvvwf);

	var add_site_event_vvvvvwg = jQuery("#jform_add_site_event
input[type='radio']:checked").val();
	vvvvvwg(add_site_event_vvvvvwg);

	var addreadme_vvvvvwh = jQuery("#jform_addreadme
input[type='radio']:checked").val();
	vvvvvwh(addreadme_vvvvvwh);

	var add_update_server_vvvvvwi = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvwi(add_update_server_vvvvvwi);

	var add_sales_server_vvvvvwj = jQuery("#jform_add_sales_server
input[type='radio']:checked").val();
	vvvvvwj(add_sales_server_vvvvvwj);

	var add_license_vvvvvwk = jQuery("#jform_add_license
input[type='radio']:checked").val();
	vvvvvwk(add_license_vvvvvwk);

	var add_php_postflight_install_vvvvvwl =
jQuery("#jform_add_php_postflight_install
input[type='radio']:checked").val();
	vvvvvwl(add_php_postflight_install_vvvvvwl);

	var add_php_postflight_update_vvvvvwm =
jQuery("#jform_add_php_postflight_update
input[type='radio']:checked").val();
	vvvvvwm(add_php_postflight_update_vvvvvwm);

	var add_php_method_uninstall_vvvvvwn =
jQuery("#jform_add_php_method_uninstall
input[type='radio']:checked").val();
	vvvvvwn(add_php_method_uninstall_vvvvvwn);

	var add_php_preflight_install_vvvvvwo =
jQuery("#jform_add_php_preflight_install
input[type='radio']:checked").val();
	vvvvvwo(add_php_preflight_install_vvvvvwo);

	var add_php_preflight_update_vvvvvwp =
jQuery("#jform_add_php_preflight_update
input[type='radio']:checked").val();
	vvvvvwp(add_php_preflight_update_vvvvvwp);

	var update_server_target_vvvvvwq =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvwq = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvwq(update_server_target_vvvvvwq,add_update_server_vvvvvwq);

	var add_update_server_vvvvvwr = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	var update_server_target_vvvvvwr =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	vvvvvwr(add_update_server_vvvvvwr,update_server_target_vvvvvwr);

	var update_server_target_vvvvvws =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvws = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvws(update_server_target_vvvvvws,add_update_server_vvvvvws);

	var update_server_target_vvvvvwu =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvwu = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvwu(update_server_target_vvvvvwu,add_update_server_vvvvvwu);

	var add_update_server_vvvvvww = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvww(add_update_server_vvvvvww);

	var buildcomp_vvvvvwx = jQuery("#jform_buildcomp
input[type='radio']:checked").val();
	vvvvvwx(buildcomp_vvvvvwx);

	var dashboard_type_vvvvvwy = jQuery("#jform_dashboard_type
input[type='radio']:checked").val();
	vvvvvwy(dashboard_type_vvvvvwy);

	var dashboard_type_vvvvvwz = jQuery("#jform_dashboard_type
input[type='radio']:checked").val();
	vvvvvwz(dashboard_type_vvvvvwz);

	var translation_tool_vvvvvxa =
jQuery("#jform_translation_tool").val();
	vvvvvxa(translation_tool_vvvvvxa);
});

// the vvvvvvv function
function vvvvvvv(add_php_helper_admin_vvvvvvv)
{
	// set the function logic
	if (add_php_helper_admin_vvvvvvv == 1)
	{
		jQuery('#jform_php_helper_admin-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_helper_admin-lbl').closest('.control-group').hide();
	}
}

// the vvvvvvw function
function vvvvvvw(add_php_helper_site_vvvvvvw)
{
	// set the function logic
	if (add_php_helper_site_vvvvvvw == 1)
	{
		jQuery('#jform_php_helper_site-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_helper_site-lbl').closest('.control-group').hide();
	}
}

// the vvvvvvx function
function vvvvvvx(add_php_helper_both_vvvvvvx)
{
	// set the function logic
	if (add_php_helper_both_vvvvvvx == 1)
	{
		jQuery('#jform_php_helper_both-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_helper_both-lbl').closest('.control-group').hide();
	}
}

// the vvvvvvy function
function vvvvvvy(add_css_admin_vvvvvvy)
{
	// set the function logic
	if (add_css_admin_vvvvvvy == 1)
	{
		jQuery('#jform_css_admin-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_admin-lbl').closest('.control-group').hide();
	}
}

// the vvvvvvz function
function vvvvvvz(add_css_site_vvvvvvz)
{
	// set the function logic
	if (add_css_site_vvvvvvz == 1)
	{
		jQuery('#jform_css_site-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_site-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwa function
function vvvvvwa(add_javascript_vvvvvwa)
{
	// set the function logic
	if (add_javascript_vvvvvwa == 1)
	{
		jQuery('#jform_javascript-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwb function
function vvvvvwb(add_sql_vvvvvwb)
{
	// set the function logic
	if (add_sql_vvvvvwb == 1)
	{
		jQuery('#jform_sql').closest('.control-group').show();
		// add required attribute to sql field
		if (jform_vvvvvwbvvv_required)
		{
			updateFieldRequired('sql',0);
			jQuery('#jform_sql').prop('required','required');
			jQuery('#jform_sql').attr('aria-required',true);
			jQuery('#jform_sql').addClass('required');
			jform_vvvvvwbvvv_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql').closest('.control-group').hide();
		// remove required attribute from sql field
		if (!jform_vvvvvwbvvv_required)
		{
			updateFieldRequired('sql',1);
			jQuery('#jform_sql').removeAttr('required');
			jQuery('#jform_sql').removeAttr('aria-required');
			jQuery('#jform_sql').removeClass('required');
			jform_vvvvvwbvvv_required = true;
		}
	}
}

// the vvvvvwc function
function vvvvvwc(add_sql_uninstall_vvvvvwc)
{
	// set the function logic
	if (add_sql_uninstall_vvvvvwc == 1)
	{
		jQuery('#jform_sql_uninstall').closest('.control-group').show();
		// add required attribute to sql_uninstall field
		if (jform_vvvvvwcvvw_required)
		{
			updateFieldRequired('sql_uninstall',0);
			jQuery('#jform_sql_uninstall').prop('required','required');
			jQuery('#jform_sql_uninstall').attr('aria-required',true);
			jQuery('#jform_sql_uninstall').addClass('required');
			jform_vvvvvwcvvw_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql_uninstall').closest('.control-group').hide();
		// remove required attribute from sql_uninstall field
		if (!jform_vvvvvwcvvw_required)
		{
			updateFieldRequired('sql_uninstall',1);
			jQuery('#jform_sql_uninstall').removeAttr('required');
			jQuery('#jform_sql_uninstall').removeAttr('aria-required');
			jQuery('#jform_sql_uninstall').removeClass('required');
			jform_vvvvvwcvvw_required = true;
		}
	}
}

// the vvvvvwd function
function vvvvvwd(emptycontributors_vvvvvwd)
{
	// set the function logic
	if (emptycontributors_vvvvvwd == 1)
	{
		jQuery('#jform_number').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_number').closest('.control-group').hide();
	}
}

// the vvvvvwe function
function vvvvvwe(add_license_vvvvvwe)
{
	// set the function logic
	if (add_license_vvvvvwe == 1)
	{
		jQuery('#jform_license_type').closest('.control-group').show();
		// add required attribute to license_type field
		if (jform_vvvvvwevvx_required)
		{
			updateFieldRequired('license_type',0);
			jQuery('#jform_license_type').prop('required','required');
			jQuery('#jform_license_type').attr('aria-required',true);
			jQuery('#jform_license_type').addClass('required');
			jform_vvvvvwevvx_required = false;
		}
	}
	else
	{
		jQuery('#jform_license_type').closest('.control-group').hide();
		// remove required attribute from license_type field
		if (!jform_vvvvvwevvx_required)
		{
			updateFieldRequired('license_type',1);
			jQuery('#jform_license_type').removeAttr('required');
			jQuery('#jform_license_type').removeAttr('aria-required');
			jQuery('#jform_license_type').removeClass('required');
			jform_vvvvvwevvx_required = true;
		}
	}
}

// the vvvvvwf function
function vvvvvwf(add_admin_event_vvvvvwf)
{
	// set the function logic
	if (add_admin_event_vvvvvwf == 1)
	{
		jQuery('#jform_php_admin_event-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_admin_event-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwg function
function vvvvvwg(add_site_event_vvvvvwg)
{
	// set the function logic
	if (add_site_event_vvvvvwg == 1)
	{
		jQuery('#jform_php_site_event-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_site_event-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwh function
function vvvvvwh(addreadme_vvvvvwh)
{
	// set the function logic
	if (addreadme_vvvvvwh == 1)
	{
		jQuery('.note_readme').closest('.control-group').show();
		jQuery('#jform_readme-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_readme').closest('.control-group').hide();
		jQuery('#jform_readme-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwi function
function vvvvvwi(add_update_server_vvvvvwi)
{
	// set the function logic
	if (add_update_server_vvvvvwi == 1)
	{
		jQuery('#jform_update_server_url').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server_url').closest('.control-group').hide();
	}
}

// the vvvvvwj function
function vvvvvwj(add_sales_server_vvvvvwj)
{
	// set the function logic
	if (add_sales_server_vvvvvwj == 1)
	{
		jQuery('#jform_sales_server').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_sales_server').closest('.control-group').hide();
	}
}

// the vvvvvwk function
function vvvvvwk(add_license_vvvvvwk)
{
	// set the function logic
	if (add_license_vvvvvwk == 1)
	{
		jQuery('.note_whmcs_lisencing_note').closest('.control-group').show();
		jQuery('#jform_whmcs_key').closest('.control-group').show();
		jQuery('#jform_whmcs_url').closest('.control-group').show();
		jQuery('#jform_whmcs_buy_link').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_whmcs_lisencing_note').closest('.control-group').hide();
		jQuery('#jform_whmcs_key').closest('.control-group').hide();
		jQuery('#jform_whmcs_url').closest('.control-group').hide();
		jQuery('#jform_whmcs_buy_link').closest('.control-group').hide();
	}
}

// the vvvvvwl function
function vvvvvwl(add_php_postflight_install_vvvvvwl)
{
	// set the function logic
	if (add_php_postflight_install_vvvvvwl == 1)
	{
		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwm function
function vvvvvwm(add_php_postflight_update_vvvvvwm)
{
	// set the function logic
	if (add_php_postflight_update_vvvvvwm == 1)
	{
		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwn function
function vvvvvwn(add_php_method_uninstall_vvvvvwn)
{
	// set the function logic
	if (add_php_method_uninstall_vvvvvwn == 1)
	{
		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwo function
function vvvvvwo(add_php_preflight_install_vvvvvwo)
{
	// set the function logic
	if (add_php_preflight_install_vvvvvwo == 1)
	{
		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwp function
function vvvvvwp(add_php_preflight_update_vvvvvwp)
{
	// set the function logic
	if (add_php_preflight_update_vvvvvwp == 1)
	{
		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').hide();
	}
}

// the vvvvvwq function
function vvvvvwq(update_server_target_vvvvvwq,add_update_server_vvvvvwq)
{
	// set the function logic
	if (update_server_target_vvvvvwq == 1 && add_update_server_vvvvvwq
== 1)
	{
		jQuery('#jform_update_server').closest('.control-group').show();
		jQuery('.note_update_server_note_ftp').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server').closest('.control-group').hide();
		jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
	}
}

// the vvvvvwr function
function vvvvvwr(add_update_server_vvvvvwr,update_server_target_vvvvvwr)
{
	// set the function logic
	if (add_update_server_vvvvvwr == 1 && update_server_target_vvvvvwr
== 1)
	{
		jQuery('#jform_update_server').closest('.control-group').show();
		jQuery('.note_update_server_note_ftp').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server').closest('.control-group').hide();
		jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
	}
}

// the vvvvvws function
function vvvvvws(update_server_target_vvvvvws,add_update_server_vvvvvws)
{
	// set the function logic
	if (update_server_target_vvvvvws == 2 && add_update_server_vvvvvws
== 1)
	{
		jQuery('.note_update_server_note_zip').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_update_server_note_zip').closest('.control-group').hide();
	}
}

// the vvvvvwu function
function vvvvvwu(update_server_target_vvvvvwu,add_update_server_vvvvvwu)
{
	// set the function logic
	if (update_server_target_vvvvvwu == 3 && add_update_server_vvvvvwu
== 1)
	{
		jQuery('.note_update_server_note_other').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_update_server_note_other').closest('.control-group').hide();
	}
}

// the vvvvvww function
function vvvvvww(add_update_server_vvvvvww)
{
	// set the function logic
	if (add_update_server_vvvvvww == 1)
	{
		jQuery('#jform_update_server_target').closest('.control-group').show();
		// add required attribute to update_server_target field
		if (jform_vvvvvwwvvy_required)
		{
			updateFieldRequired('update_server_target',0);
			jQuery('#jform_update_server_target').prop('required','required');
			jQuery('#jform_update_server_target').attr('aria-required',true);
			jQuery('#jform_update_server_target').addClass('required');
			jform_vvvvvwwvvy_required = false;
		}
	}
	else
	{
		jQuery('#jform_update_server_target').closest('.control-group').hide();
		// remove required attribute from update_server_target field
		if (!jform_vvvvvwwvvy_required)
		{
			updateFieldRequired('update_server_target',1);
			jQuery('#jform_update_server_target').removeAttr('required');
			jQuery('#jform_update_server_target').removeAttr('aria-required');
			jQuery('#jform_update_server_target').removeClass('required');
			jform_vvvvvwwvvy_required = true;
		}
	}
}

// the vvvvvwx function
function vvvvvwx(buildcomp_vvvvvwx)
{
	// set the function logic
	if (buildcomp_vvvvvwx == 1)
	{
		jQuery('#jform_buildcompsql').closest('.control-group').show();
		// add required attribute to buildcompsql field
		if (jform_vvvvvwxvvz_required)
		{
			updateFieldRequired('buildcompsql',0);
			jQuery('#jform_buildcompsql').prop('required','required');
			jQuery('#jform_buildcompsql').attr('aria-required',true);
			jQuery('#jform_buildcompsql').addClass('required');
			jform_vvvvvwxvvz_required = false;
		}
	}
	else
	{
		jQuery('#jform_buildcompsql').closest('.control-group').hide();
		// remove required attribute from buildcompsql field
		if (!jform_vvvvvwxvvz_required)
		{
			updateFieldRequired('buildcompsql',1);
			jQuery('#jform_buildcompsql').removeAttr('required');
			jQuery('#jform_buildcompsql').removeAttr('aria-required');
			jQuery('#jform_buildcompsql').removeClass('required');
			jform_vvvvvwxvvz_required = true;
		}
	}
}

// the vvvvvwy function
function vvvvvwy(dashboard_type_vvvvvwy)
{
	// set the function logic
	if (dashboard_type_vvvvvwy == 2)
	{
		jQuery('#jform_dashboard').closest('.control-group').show();
		jQuery('.note_dynamic_dashboard').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_dashboard').closest('.control-group').hide();
		jQuery('.note_dynamic_dashboard').closest('.control-group').hide();
	}
}

// the vvvvvwz function
function vvvvvwz(dashboard_type_vvvvvwz)
{
	// set the function logic
	if (dashboard_type_vvvvvwz == 1)
	{
		jQuery('.note_botton_component_dashboard').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_botton_component_dashboard').closest('.control-group').hide();
	}
}

// the vvvvvxa function
function vvvvvxa(translation_tool_vvvvvxa)
{
	if (isSet(translation_tool_vvvvvxa) &&
translation_tool_vvvvvxa.constructor !== Array)
	{
		var temp_vvvvvxa = translation_tool_vvvvvxa;
		var translation_tool_vvvvvxa = [];
		translation_tool_vvvvvxa.push(temp_vvvvvxa);
	}
	else if (!isSet(translation_tool_vvvvvxa))
	{
		var translation_tool_vvvvvxa = [];
	}
	var translation_tool =
translation_tool_vvvvvxa.some(translation_tool_vvvvvxa_SomeFunc);


	// set this function logic
	if (translation_tool)
	{
		jQuery('#jform_crowdin_account_api_key').closest('.control-group').show();
		jQuery('.note_crowdin').closest('.control-group').show();
		jQuery('#jform_crowdin_project_api_key').closest('.control-group').show();
		// add required attribute to crowdin_project_api_key field
		if (jform_vvvvvxavwa_required)
		{
			updateFieldRequired('crowdin_project_api_key',0);
			jQuery('#jform_crowdin_project_api_key').prop('required','required');
			jQuery('#jform_crowdin_project_api_key').attr('aria-required',true);
			jQuery('#jform_crowdin_project_api_key').addClass('required');
			jform_vvvvvxavwa_required = false;
		}
		jQuery('#jform_crowdin_project_identifier').closest('.control-group').show();
		// add required attribute to crowdin_project_identifier field
		if (jform_vvvvvxavwb_required)
		{
			updateFieldRequired('crowdin_project_identifier',0);
			jQuery('#jform_crowdin_project_identifier').prop('required','required');
			jQuery('#jform_crowdin_project_identifier').attr('aria-required',true);
			jQuery('#jform_crowdin_project_identifier').addClass('required');
			jform_vvvvvxavwb_required = false;
		}
		jQuery('#jform_crowdin_username').closest('.control-group').show();
		// add required attribute to crowdin_username field
		if (jform_vvvvvxavwc_required)
		{
			updateFieldRequired('crowdin_username',0);
			jQuery('#jform_crowdin_username').prop('required','required');
			jQuery('#jform_crowdin_username').attr('aria-required',true);
			jQuery('#jform_crowdin_username').addClass('required');
			jform_vvvvvxavwc_required = false;
		}
	}
	else
	{
		jQuery('#jform_crowdin_account_api_key').closest('.control-group').hide();
		jQuery('.note_crowdin').closest('.control-group').hide();
		jQuery('#jform_crowdin_project_api_key').closest('.control-group').hide();
		// remove required attribute from crowdin_project_api_key field
		if (!jform_vvvvvxavwa_required)
		{
			updateFieldRequired('crowdin_project_api_key',1);
			jQuery('#jform_crowdin_project_api_key').removeAttr('required');
			jQuery('#jform_crowdin_project_api_key').removeAttr('aria-required');
			jQuery('#jform_crowdin_project_api_key').removeClass('required');
			jform_vvvvvxavwa_required = true;
		}
		jQuery('#jform_crowdin_project_identifier').closest('.control-group').hide();
		// remove required attribute from crowdin_project_identifier field
		if (!jform_vvvvvxavwb_required)
		{
			updateFieldRequired('crowdin_project_identifier',1);
			jQuery('#jform_crowdin_project_identifier').removeAttr('required');
			jQuery('#jform_crowdin_project_identifier').removeAttr('aria-required');
			jQuery('#jform_crowdin_project_identifier').removeClass('required');
			jform_vvvvvxavwb_required = true;
		}
		jQuery('#jform_crowdin_username').closest('.control-group').hide();
		// remove required attribute from crowdin_username field
		if (!jform_vvvvvxavwc_required)
		{
			updateFieldRequired('crowdin_username',1);
			jQuery('#jform_crowdin_username').removeAttr('required');
			jQuery('#jform_crowdin_username').removeAttr('aria-required');
			jQuery('#jform_crowdin_username').removeClass('required');
			jform_vvvvvxavwc_required = true;
		}
	}
}

// the vvvvvxa Some function
function translation_tool_vvvvvxa_SomeFunc(translation_tool_vvvvvxa)
{
	// set the function logic
	if (translation_tool_vvvvvxa == 1)
	{
		return true;
	}
	return false;
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// check what is the dashboard switch
	var dasboard_type = jQuery("#jform_dashboard_type
input[type='radio']:checked").val();
	dasboardSwitch(dasboard_type);
	// set buttons
	function setButtons1() {
		addButtonID('component_files_folders','button_component_files_folders',
1);
		addButtonID('component_site_views','button_create_edit_views',
1);
	 }
	function setButtons2() {
		addButtonID('component_updates','component_version',
1);
		addButtonID('component_mysql_tweaks','button_mysql_tweak_options',
1);
		addButtonID('component_custom_admin_views','button_create_edit_views',
1);
	 }
	function setButtons3() {
		addButtonID('component_custom_admin_menus','button_add_custom_menus',
1);
		addButtonID('component_config','button_add_config',
1);
		addButtonID('component_admin_views','button_create_edit_views',
1);
	 }

	 // use setTimeout() to execute
	 setTimeout(setButtons1, 1000);
	 setTimeout(setButtons2, 2000);
	 setTimeout(setButtons3, 3000);
	
	// now load the displays
	function setDisplays1() {
		getAjaxDisplay('component_admin_views');
	}
	function setDisplays2() {
		getAjaxDisplay('component_custom_admin_views');
	}
	function setDisplays3() {
		getAjaxDisplay('component_site_views');
	}

	 // use setTimeout() to execute
	 setTimeout(setDisplays1, 1500);
	 setTimeout(setDisplays2, 2500);
	 setTimeout(setDisplays3, 3500);

	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 400);

	// get crowdin detail if set
	setTimeout(getTranslationToolDetails, 600);
});

function getTranslationToolDetails(){
	// get the translation tool selection
	var tool = jQuery("#jform_translation_tool").val();
	// trigger Crowdin
	if (tool == 1) {
		// get the identifier
		var identifier =
jQuery("#jform_crowdin_project_identifier").val();
		// get the key
		var key = jQuery("#jform_crowdin_project_api_key").val();
		// query server for details
		getCrowdinDetails_server(identifier, key).done(function(result) {
			if (result.error){
				jQuery('#crowdin_information_box').show();
				jQuery('#crowdin_error_box').show();
				jQuery('#crowdin_error_box').html(result.error);
				jQuery('#crowdin_success_box').hide();
			} else if(result.html) {
				jQuery('#crowdin_success_box').show();
				jQuery('#crowdin_success_box').html(result.html);
				jQuery('#crowdin_error_box').hide();
				jQuery('#crowdin_information_box').hide();
			} else {
				jQuery('#crowdin_information_box').show();
				jQuery('#crowdin_success_box').hide();
			}
		});
	}
}

function getCrowdinDetails_server(identifier, key){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getCrowdinDetails&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && identifier.length > 0 &&
key.length > 0){
		var request =
token+'=1&identifier='+identifier+'&key='+key;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getAjaxDisplay(type){
	getAjaxDisplay_server(type).done(function(result) {
		if(result){
			jQuery('#display_'+type).html(result);
		}
		// set button
		addButtonID(type,'header_'+type+'_buttons', 2); //
<-- little edit button
	});
}

function getAjaxDisplay_server(type){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0){
		var request = token+'=1&type=' + type;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function addData(result, where){
	jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}

function dasboardSwitch(value){
	// hide if default
	if (2 == value) {
		jQuery('.control-group-componentdashboard-one').hide();
	} else {
		// default behaviour
		if (jQuery('div.control-group-componentdashboard-one').length)
{
			jQuery('.control-group-componentdashboard-one').show();
		} else {
			addButtonID('component_dashboard','button_component_dashboard',
1);
		}
	}
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function addButtonID_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0 && size >
0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButtonID(type, where, size){
	addButtonID_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	});
}

function addButton_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButton(type, where, size){
	// just to insure that default behaviour still works
	size = typeof size !== 'undefined' ? size : 1;
	addButton_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	})
} 
PK��[���OaOajoomla_module.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvvxrvwd_required = false;
jform_vvvvvxsvwe_required = false;
jform_vvvvvxtvwf_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var add_class_helper_vvvvvxb =
jQuery("#jform_add_class_helper").val();
	vvvvvxb(add_class_helper_vvvvvxb);

	var add_class_helper_header_vvvvvxc =
jQuery("#jform_add_class_helper_header
input[type='radio']:checked").val();
	var add_class_helper_vvvvvxc =
jQuery("#jform_add_class_helper").val();
	vvvvvxc(add_class_helper_header_vvvvvxc,add_class_helper_vvvvvxc);

	var add_php_script_construct_vvvvvxe =
jQuery("#jform_add_php_script_construct
input[type='radio']:checked").val();
	vvvvvxe(add_php_script_construct_vvvvvxe);

	var add_php_preflight_install_vvvvvxf =
jQuery("#jform_add_php_preflight_install
input[type='radio']:checked").val();
	vvvvvxf(add_php_preflight_install_vvvvvxf);

	var add_php_preflight_update_vvvvvxg =
jQuery("#jform_add_php_preflight_update
input[type='radio']:checked").val();
	vvvvvxg(add_php_preflight_update_vvvvvxg);

	var add_php_preflight_uninstall_vvvvvxh =
jQuery("#jform_add_php_preflight_uninstall
input[type='radio']:checked").val();
	vvvvvxh(add_php_preflight_uninstall_vvvvvxh);

	var add_php_postflight_install_vvvvvxi =
jQuery("#jform_add_php_postflight_install
input[type='radio']:checked").val();
	vvvvvxi(add_php_postflight_install_vvvvvxi);

	var add_php_postflight_update_vvvvvxj =
jQuery("#jform_add_php_postflight_update
input[type='radio']:checked").val();
	vvvvvxj(add_php_postflight_update_vvvvvxj);

	var add_php_method_uninstall_vvvvvxk =
jQuery("#jform_add_php_method_uninstall
input[type='radio']:checked").val();
	vvvvvxk(add_php_method_uninstall_vvvvvxk);

	var update_server_target_vvvvvxl =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvxl = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvxl(update_server_target_vvvvvxl,add_update_server_vvvvvxl);

	var add_update_server_vvvvvxm = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	var update_server_target_vvvvvxm =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	vvvvvxm(add_update_server_vvvvvxm,update_server_target_vvvvvxm);

	var update_server_target_vvvvvxn =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvxn = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvxn(update_server_target_vvvvvxn,add_update_server_vvvvvxn);

	var update_server_target_vvvvvxp =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvxp = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvxp(update_server_target_vvvvvxp,add_update_server_vvvvvxp);

	var add_update_server_vvvvvxr = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvxr(add_update_server_vvvvvxr);

	var add_sql_vvvvvxs = jQuery("#jform_add_sql
input[type='radio']:checked").val();
	vvvvvxs(add_sql_vvvvvxs);

	var add_sql_uninstall_vvvvvxt = jQuery("#jform_add_sql_uninstall
input[type='radio']:checked").val();
	vvvvvxt(add_sql_uninstall_vvvvvxt);

	var add_update_server_vvvvvxu = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvxu(add_update_server_vvvvvxu);

	var add_sales_server_vvvvvxv = jQuery("#jform_add_sales_server
input[type='radio']:checked").val();
	vvvvvxv(add_sales_server_vvvvvxv);

	var addreadme_vvvvvxw = jQuery("#jform_addreadme
input[type='radio']:checked").val();
	vvvvvxw(addreadme_vvvvvxw);
});

// the vvvvvxb function
function vvvvvxb(add_class_helper_vvvvvxb)
{
	if (isSet(add_class_helper_vvvvvxb) &&
add_class_helper_vvvvvxb.constructor !== Array)
	{
		var temp_vvvvvxb = add_class_helper_vvvvvxb;
		var add_class_helper_vvvvvxb = [];
		add_class_helper_vvvvvxb.push(temp_vvvvvxb);
	}
	else if (!isSet(add_class_helper_vvvvvxb))
	{
		var add_class_helper_vvvvvxb = [];
	}
	var add_class_helper =
add_class_helper_vvvvvxb.some(add_class_helper_vvvvvxb_SomeFunc);


	// set this function logic
	if (add_class_helper)
	{
		jQuery('#jform_add_class_helper_header').closest('.control-group').show();
		jQuery('#jform_class_helper_code-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_add_class_helper_header').closest('.control-group').hide();
		jQuery('#jform_class_helper_code-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxb Some function
function add_class_helper_vvvvvxb_SomeFunc(add_class_helper_vvvvvxb)
{
	// set the function logic
	if (add_class_helper_vvvvvxb == 1 || add_class_helper_vvvvvxb == 2)
	{
		return true;
	}
	return false;
}

// the vvvvvxc function
function vvvvvxc(add_class_helper_header_vvvvvxc,add_class_helper_vvvvvxc)
{
	if (isSet(add_class_helper_header_vvvvvxc) &&
add_class_helper_header_vvvvvxc.constructor !== Array)
	{
		var temp_vvvvvxc = add_class_helper_header_vvvvvxc;
		var add_class_helper_header_vvvvvxc = [];
		add_class_helper_header_vvvvvxc.push(temp_vvvvvxc);
	}
	else if (!isSet(add_class_helper_header_vvvvvxc))
	{
		var add_class_helper_header_vvvvvxc = [];
	}
	var add_class_helper_header =
add_class_helper_header_vvvvvxc.some(add_class_helper_header_vvvvvxc_SomeFunc);

	if (isSet(add_class_helper_vvvvvxc) &&
add_class_helper_vvvvvxc.constructor !== Array)
	{
		var temp_vvvvvxc = add_class_helper_vvvvvxc;
		var add_class_helper_vvvvvxc = [];
		add_class_helper_vvvvvxc.push(temp_vvvvvxc);
	}
	else if (!isSet(add_class_helper_vvvvvxc))
	{
		var add_class_helper_vvvvvxc = [];
	}
	var add_class_helper =
add_class_helper_vvvvvxc.some(add_class_helper_vvvvvxc_SomeFunc);


	// set this function logic
	if (add_class_helper_header && add_class_helper)
	{
		jQuery('#jform_class_helper_header-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_class_helper_header-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxc Some function
function
add_class_helper_header_vvvvvxc_SomeFunc(add_class_helper_header_vvvvvxc)
{
	// set the function logic
	if (add_class_helper_header_vvvvvxc == 1)
	{
		return true;
	}
	return false;
}

// the vvvvvxc Some function
function add_class_helper_vvvvvxc_SomeFunc(add_class_helper_vvvvvxc)
{
	// set the function logic
	if (add_class_helper_vvvvvxc == 1 || add_class_helper_vvvvvxc == 2)
	{
		return true;
	}
	return false;
}

// the vvvvvxe function
function vvvvvxe(add_php_script_construct_vvvvvxe)
{
	// set the function logic
	if (add_php_script_construct_vvvvvxe == 1)
	{
		jQuery('#jform_php_script_construct-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_script_construct-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxf function
function vvvvvxf(add_php_preflight_install_vvvvvxf)
{
	// set the function logic
	if (add_php_preflight_install_vvvvvxf == 1)
	{
		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxg function
function vvvvvxg(add_php_preflight_update_vvvvvxg)
{
	// set the function logic
	if (add_php_preflight_update_vvvvvxg == 1)
	{
		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxh function
function vvvvvxh(add_php_preflight_uninstall_vvvvvxh)
{
	// set the function logic
	if (add_php_preflight_uninstall_vvvvvxh == 1)
	{
		jQuery('#jform_php_preflight_uninstall-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_uninstall-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxi function
function vvvvvxi(add_php_postflight_install_vvvvvxi)
{
	// set the function logic
	if (add_php_postflight_install_vvvvvxi == 1)
	{
		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxj function
function vvvvvxj(add_php_postflight_update_vvvvvxj)
{
	// set the function logic
	if (add_php_postflight_update_vvvvvxj == 1)
	{
		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxk function
function vvvvvxk(add_php_method_uninstall_vvvvvxk)
{
	// set the function logic
	if (add_php_method_uninstall_vvvvvxk == 1)
	{
		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxl function
function vvvvvxl(update_server_target_vvvvvxl,add_update_server_vvvvvxl)
{
	// set the function logic
	if (update_server_target_vvvvvxl == 1 && add_update_server_vvvvvxl
== 1)
	{
		jQuery('#jform_update_server').closest('.control-group').show();
		jQuery('.note_update_server_note_ftp').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server').closest('.control-group').hide();
		jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
	}
}

// the vvvvvxm function
function vvvvvxm(add_update_server_vvvvvxm,update_server_target_vvvvvxm)
{
	// set the function logic
	if (add_update_server_vvvvvxm == 1 && update_server_target_vvvvvxm
== 1)
	{
		jQuery('#jform_update_server').closest('.control-group').show();
		jQuery('.note_update_server_note_ftp').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server').closest('.control-group').hide();
		jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
	}
}

// the vvvvvxn function
function vvvvvxn(update_server_target_vvvvvxn,add_update_server_vvvvvxn)
{
	// set the function logic
	if (update_server_target_vvvvvxn == 2 && add_update_server_vvvvvxn
== 1)
	{
		jQuery('.note_update_server_note_zip').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_update_server_note_zip').closest('.control-group').hide();
	}
}

// the vvvvvxp function
function vvvvvxp(update_server_target_vvvvvxp,add_update_server_vvvvvxp)
{
	// set the function logic
	if (update_server_target_vvvvvxp == 3 && add_update_server_vvvvvxp
== 1)
	{
		jQuery('.note_update_server_note_other').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_update_server_note_other').closest('.control-group').hide();
	}
}

// the vvvvvxr function
function vvvvvxr(add_update_server_vvvvvxr)
{
	// set the function logic
	if (add_update_server_vvvvvxr == 1)
	{
		jQuery('#jform_update_server_target').closest('.control-group').show();
		// add required attribute to update_server_target field
		if (jform_vvvvvxrvwd_required)
		{
			updateFieldRequired('update_server_target',0);
			jQuery('#jform_update_server_target').prop('required','required');
			jQuery('#jform_update_server_target').attr('aria-required',true);
			jQuery('#jform_update_server_target').addClass('required');
			jform_vvvvvxrvwd_required = false;
		}
	}
	else
	{
		jQuery('#jform_update_server_target').closest('.control-group').hide();
		// remove required attribute from update_server_target field
		if (!jform_vvvvvxrvwd_required)
		{
			updateFieldRequired('update_server_target',1);
			jQuery('#jform_update_server_target').removeAttr('required');
			jQuery('#jform_update_server_target').removeAttr('aria-required');
			jQuery('#jform_update_server_target').removeClass('required');
			jform_vvvvvxrvwd_required = true;
		}
	}
}

// the vvvvvxs function
function vvvvvxs(add_sql_vvvvvxs)
{
	// set the function logic
	if (add_sql_vvvvvxs == 1)
	{
		jQuery('#jform_sql').closest('.control-group').show();
		// add required attribute to sql field
		if (jform_vvvvvxsvwe_required)
		{
			updateFieldRequired('sql',0);
			jQuery('#jform_sql').prop('required','required');
			jQuery('#jform_sql').attr('aria-required',true);
			jQuery('#jform_sql').addClass('required');
			jform_vvvvvxsvwe_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql').closest('.control-group').hide();
		// remove required attribute from sql field
		if (!jform_vvvvvxsvwe_required)
		{
			updateFieldRequired('sql',1);
			jQuery('#jform_sql').removeAttr('required');
			jQuery('#jform_sql').removeAttr('aria-required');
			jQuery('#jform_sql').removeClass('required');
			jform_vvvvvxsvwe_required = true;
		}
	}
}

// the vvvvvxt function
function vvvvvxt(add_sql_uninstall_vvvvvxt)
{
	// set the function logic
	if (add_sql_uninstall_vvvvvxt == 1)
	{
		jQuery('#jform_sql_uninstall').closest('.control-group').show();
		// add required attribute to sql_uninstall field
		if (jform_vvvvvxtvwf_required)
		{
			updateFieldRequired('sql_uninstall',0);
			jQuery('#jform_sql_uninstall').prop('required','required');
			jQuery('#jform_sql_uninstall').attr('aria-required',true);
			jQuery('#jform_sql_uninstall').addClass('required');
			jform_vvvvvxtvwf_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql_uninstall').closest('.control-group').hide();
		// remove required attribute from sql_uninstall field
		if (!jform_vvvvvxtvwf_required)
		{
			updateFieldRequired('sql_uninstall',1);
			jQuery('#jform_sql_uninstall').removeAttr('required');
			jQuery('#jform_sql_uninstall').removeAttr('aria-required');
			jQuery('#jform_sql_uninstall').removeClass('required');
			jform_vvvvvxtvwf_required = true;
		}
	}
}

// the vvvvvxu function
function vvvvvxu(add_update_server_vvvvvxu)
{
	// set the function logic
	if (add_update_server_vvvvvxu == 1)
	{
		jQuery('#jform_update_server_url').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server_url').closest('.control-group').hide();
	}
}

// the vvvvvxv function
function vvvvvxv(add_sales_server_vvvvvxv)
{
	// set the function logic
	if (add_sales_server_vvvvvxv == 1)
	{
		jQuery('#jform_sales_server').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_sales_server').closest('.control-group').hide();
	}
}

// the vvvvvxw function
function vvvvvxw(addreadme_vvvvvxw)
{
	// set the function logic
	if (addreadme_vvvvvxw == 1)
	{
		jQuery('#jform_readme-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_readme-lbl').closest('.control-group').hide();
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function() {
	// get the linked details
	getLinked();
	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
});

function setModuleCode() {
	var selected_get =  jQuery("#jform_add_class_helper 
option:selected").val();
	var custom_gets =  jQuery("#jform_custom_get").val();
	var libraries =  jQuery("#jform_libraries").val();
	var values = {'class': selected_get, 'get':
custom_gets, 'lib': libraries};
	var editor_id = 'jform_mod_code';
	getCodeFrom_server(1, JSON.stringify(values), 'data',
'getModuleCode').done(function(result) {
		if(result.tmpl){
			 addCodeToEditor(result.tmpl.code, editor_id, result.tmpl.merge,
result.tmpl.merge_target);
		}
		if(result.css){
			 addCodeToEditor(result.css.code, editor_id, result.css.merge,
result.css.merge_target);
		}
		if(result.class){
			 addCodeToEditor(result.class.code, editor_id, result.class.merge,
result.class.merge_target);
		}
		if(result.get){
			 addCodeToEditor(result.get.code, editor_id, result.get.merge,
result.get.merge_target);
		}
		if(result.lib){
			 addCodeToEditor(result.lib.code, editor_id, result.lib.merge,
result.lib.merge_target);
		}
	});
}

function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
}

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function addCodeToEditor(code_string, editor_id, merge, merge_target){
	if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
		var old_code_string = Joomla.editors.instances[editor_id].getValue();
		if (merge && old_code_string.length > 0) {
			// make sure not to load the same string twice
			if (old_code_string.indexOf(code_string) == -1)  {
				if ('prepend' === merge_target) {
					var _string = code_string + "\n\n" + old_code_string;
				} else if (merge_target && 'append' !== merge_target)
{
					var old_code_array = old_code_string.split(merge_target);
					if (old_code_array.length > 1) {
						var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
					} else {
						var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
					}
				} else {
					var _string = old_code_string + "\n\n" + code_string;
				}
				Joomla.editors.instances[editor_id].setValue(_string.trim());
				return true;
			}
		} else {
			Joomla.editors.instances[editor_id].setValue(code_string.trim());
			return true;
		}
	} else {
		var old_code_string = jQuery('textarea#'+editor_id).val();
		if (merge && old_code_string.length > 0) {
			// make sure not to load the same string twice
			if (old_code_string.indexOf(code_string) == -1) {
				if ('prepend' === merge_target) {
					var _string = code_string + "\n\n" + old_code_string;
				} else if (merge_target && 'append' !== merge_target)
{
					var old_code_array = old_code_string.split(merge_target);
					if (old_code_array.length > 1) {
						var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
					} else {
						var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
					}
				} else {
					var _string = old_code_string + "\n\n" + code_string;
				}
				jQuery('textarea#'+editor_id).val(_string.trim());
				return true;
			}
		} else {
			jQuery('textarea#'+editor_id).val(code_string.trim());
			return true;
		}
	}
	return false;
}


function removeCodeFromEditor(code_string, editor_id){
	if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
		var old_code_string = Joomla.editors.instances[editor_id].getValue();
		if (old_code_string.length > 0) {
			// make sure string is found
			if (old_code_string.indexOf(code_string) !== -1) {
				// remove the code
				Joomla.editors.instances[editor_id].setValue(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
				return true;
			}
		}
	} else {
		var old_code_string = jQuery('textarea#'+editor_id).val();
		if (old_code_string.length > 0) {
			// make sure string is found
			if (old_code_string.indexOf(code_string) !== -1) {
				// remove the code
				jQuery('textarea#'+editor_id).val(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
				return true;
			}
		}
	}
	return false;
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function getSnippetDetails(id){
	getCodeFrom_server(id, '_type', '_type',
'snippetDetails').done(function(result) {
		if(result.snippet){
			var description = '';
			if (result.description.length > 0) {
				description =
'<p>'+result.description+'</p>';
			}
			var library = '';
			if (result.library.length > 0) {
				library = '
<b>('+result.library+')</b>';
			}
			var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea  id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
			jQuery('#snippet-code').remove();
			jQuery('.snippet-code').append(code);
			// make sure the code block is active
			jQuery("#snippet").focus(function() {
				var jQuerythis = jQuery(this);
				jQuerythis.select();
			
				// Work around Chrome's little problem
				jQuerythis.mouseup(function() {
					// Prevent further mouseup intervention
					jQuerythis.unbind("mouseup");
					return false;
				});
			});
		}
		if(result.usage){
			var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
			jQuery('#snippet-usage').remove();
			jQuery('.snippet-usage').append(usage);
		}
	})
}

// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
	jQuery("#jform_snippet option").each(function()
	{
		var key =  jQuery(this).val();
		var text =  jQuery(this).text();
		snippets[key] = text;
		snippetIds.push(key);
	});
	snippet = jQuery("#jform_snippet").val();
	getSnippets();
});

function getSnippets(){
	jQuery("#loading").show();
	// clear the selection
	jQuery('#jform_snippet').find('option').remove().end();
	jQuery('#jform_snippet').trigger('liszt:updated');
	// get libraries value if set
	var libraries = jQuery("#jform_libraries").val();
	if (libraries) {
		getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').done(function(result) {
			setSnippets(result);
			jQuery("#loading").hide();
			if (typeof snippetButton !== 'undefined') {
				// ensure button is correct
				var snippet = jQuery('#jform_snippet').val();
				snippetButton(snippet);
			}
		});
	}
	else
	{
		// load all snippets in none is selected
		setSnippets(snippetIds);
		jQuery("#loading").hide();
	}
}
function setSnippets(array){
	if (array) {
		jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
		jQuery.each( array, function( i, id ) {
			if (id in snippets) {
				jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
			}
			if (id == snippet) {
				jQuery('#jform_snippet').val(id);
			}
		});
	} else {
		jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
	}
	jQuery('#jform_snippet').trigger('liszt:updated');
} 
PK��[t:	��#joomla_module_files_folders_urls.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��joomla_module_updates.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[��O�ԊԊjoomla_plugin.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvvypvwg_required = false;
jform_vvvvvyqvwh_required = false;
jform_vvvvvyrvwi_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var class_extends_vvvvvxx =
jQuery("#jform_class_extends").val();
	var joomla_plugin_group_vvvvvxx =
jQuery("#jform_joomla_plugin_group").val();
	vvvvvxx(class_extends_vvvvvxx,joomla_plugin_group_vvvvvxx);

	var joomla_plugin_group_vvvvvxy =
jQuery("#jform_joomla_plugin_group").val();
	var class_extends_vvvvvxy =
jQuery("#jform_class_extends").val();
	vvvvvxy(joomla_plugin_group_vvvvvxy,class_extends_vvvvvxy);

	var class_extends_vvvvvxz =
jQuery("#jform_class_extends").val();
	vvvvvxz(class_extends_vvvvvxz);

	var add_head_vvvvvya = jQuery("#jform_add_head
input[type='radio']:checked").val();
	var class_extends_vvvvvya =
jQuery("#jform_class_extends").val();
	vvvvvya(add_head_vvvvvya,class_extends_vvvvvya);

	var add_php_script_construct_vvvvvyc =
jQuery("#jform_add_php_script_construct
input[type='radio']:checked").val();
	vvvvvyc(add_php_script_construct_vvvvvyc);

	var add_php_preflight_install_vvvvvyd =
jQuery("#jform_add_php_preflight_install
input[type='radio']:checked").val();
	vvvvvyd(add_php_preflight_install_vvvvvyd);

	var add_php_preflight_update_vvvvvye =
jQuery("#jform_add_php_preflight_update
input[type='radio']:checked").val();
	vvvvvye(add_php_preflight_update_vvvvvye);

	var add_php_preflight_uninstall_vvvvvyf =
jQuery("#jform_add_php_preflight_uninstall
input[type='radio']:checked").val();
	vvvvvyf(add_php_preflight_uninstall_vvvvvyf);

	var add_php_postflight_install_vvvvvyg =
jQuery("#jform_add_php_postflight_install
input[type='radio']:checked").val();
	vvvvvyg(add_php_postflight_install_vvvvvyg);

	var add_php_postflight_update_vvvvvyh =
jQuery("#jform_add_php_postflight_update
input[type='radio']:checked").val();
	vvvvvyh(add_php_postflight_update_vvvvvyh);

	var add_php_method_uninstall_vvvvvyi =
jQuery("#jform_add_php_method_uninstall
input[type='radio']:checked").val();
	vvvvvyi(add_php_method_uninstall_vvvvvyi);

	var update_server_target_vvvvvyj =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvyj = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvyj(update_server_target_vvvvvyj,add_update_server_vvvvvyj);

	var add_update_server_vvvvvyk = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	var update_server_target_vvvvvyk =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	vvvvvyk(add_update_server_vvvvvyk,update_server_target_vvvvvyk);

	var update_server_target_vvvvvyl =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvyl = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvyl(update_server_target_vvvvvyl,add_update_server_vvvvvyl);

	var update_server_target_vvvvvyn =
jQuery("#jform_update_server_target
input[type='radio']:checked").val();
	var add_update_server_vvvvvyn = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvyn(update_server_target_vvvvvyn,add_update_server_vvvvvyn);

	var add_update_server_vvvvvyp = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvyp(add_update_server_vvvvvyp);

	var add_sql_vvvvvyq = jQuery("#jform_add_sql
input[type='radio']:checked").val();
	vvvvvyq(add_sql_vvvvvyq);

	var add_sql_uninstall_vvvvvyr = jQuery("#jform_add_sql_uninstall
input[type='radio']:checked").val();
	vvvvvyr(add_sql_uninstall_vvvvvyr);

	var add_update_server_vvvvvys = jQuery("#jform_add_update_server
input[type='radio']:checked").val();
	vvvvvys(add_update_server_vvvvvys);

	var add_sales_server_vvvvvyt = jQuery("#jform_add_sales_server
input[type='radio']:checked").val();
	vvvvvyt(add_sales_server_vvvvvyt);

	var addreadme_vvvvvyu = jQuery("#jform_addreadme
input[type='radio']:checked").val();
	vvvvvyu(addreadme_vvvvvyu);
});

// the vvvvvxx function
function vvvvvxx(class_extends_vvvvvxx,joomla_plugin_group_vvvvvxx)
{
	if (isSet(class_extends_vvvvvxx) &&
class_extends_vvvvvxx.constructor !== Array)
	{
		var temp_vvvvvxx = class_extends_vvvvvxx;
		var class_extends_vvvvvxx = [];
		class_extends_vvvvvxx.push(temp_vvvvvxx);
	}
	else if (!isSet(class_extends_vvvvvxx))
	{
		var class_extends_vvvvvxx = [];
	}
	var class_extends =
class_extends_vvvvvxx.some(class_extends_vvvvvxx_SomeFunc);

	if (isSet(joomla_plugin_group_vvvvvxx) &&
joomla_plugin_group_vvvvvxx.constructor !== Array)
	{
		var temp_vvvvvxx = joomla_plugin_group_vvvvvxx;
		var joomla_plugin_group_vvvvvxx = [];
		joomla_plugin_group_vvvvvxx.push(temp_vvvvvxx);
	}
	else if (!isSet(joomla_plugin_group_vvvvvxx))
	{
		var joomla_plugin_group_vvvvvxx = [];
	}
	var joomla_plugin_group =
joomla_plugin_group_vvvvvxx.some(joomla_plugin_group_vvvvvxx_SomeFunc);


	// set this function logic
	if (class_extends && joomla_plugin_group)
	{
		jQuery('#jform_main_class_code-lbl').closest('.control-group').show();
		jQuery('#jform_method_selection-lbl').closest('.control-group').show();
		jQuery('#jform_property_selection-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_main_class_code-lbl').closest('.control-group').hide();
		jQuery('#jform_method_selection-lbl').closest('.control-group').hide();
		jQuery('#jform_property_selection-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxx Some function
function class_extends_vvvvvxx_SomeFunc(class_extends_vvvvvxx)
{
	// set the function logic
	if (isSet(class_extends_vvvvvxx))
	{
		return true;
	}
	return false;
}

// the vvvvvxx Some function
function joomla_plugin_group_vvvvvxx_SomeFunc(joomla_plugin_group_vvvvvxx)
{
	// set the function logic
	if (isSet(joomla_plugin_group_vvvvvxx))
	{
		return true;
	}
	return false;
}

// the vvvvvxy function
function vvvvvxy(joomla_plugin_group_vvvvvxy,class_extends_vvvvvxy)
{
	if (isSet(joomla_plugin_group_vvvvvxy) &&
joomla_plugin_group_vvvvvxy.constructor !== Array)
	{
		var temp_vvvvvxy = joomla_plugin_group_vvvvvxy;
		var joomla_plugin_group_vvvvvxy = [];
		joomla_plugin_group_vvvvvxy.push(temp_vvvvvxy);
	}
	else if (!isSet(joomla_plugin_group_vvvvvxy))
	{
		var joomla_plugin_group_vvvvvxy = [];
	}
	var joomla_plugin_group =
joomla_plugin_group_vvvvvxy.some(joomla_plugin_group_vvvvvxy_SomeFunc);

	if (isSet(class_extends_vvvvvxy) &&
class_extends_vvvvvxy.constructor !== Array)
	{
		var temp_vvvvvxy = class_extends_vvvvvxy;
		var class_extends_vvvvvxy = [];
		class_extends_vvvvvxy.push(temp_vvvvvxy);
	}
	else if (!isSet(class_extends_vvvvvxy))
	{
		var class_extends_vvvvvxy = [];
	}
	var class_extends =
class_extends_vvvvvxy.some(class_extends_vvvvvxy_SomeFunc);


	// set this function logic
	if (joomla_plugin_group && class_extends)
	{
		jQuery('#jform_main_class_code-lbl').closest('.control-group').show();
		jQuery('#jform_method_selection-lbl').closest('.control-group').show();
		jQuery('#jform_property_selection-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_main_class_code-lbl').closest('.control-group').hide();
		jQuery('#jform_method_selection-lbl').closest('.control-group').hide();
		jQuery('#jform_property_selection-lbl').closest('.control-group').hide();
	}
}

// the vvvvvxy Some function
function joomla_plugin_group_vvvvvxy_SomeFunc(joomla_plugin_group_vvvvvxy)
{
	// set the function logic
	if (isSet(joomla_plugin_group_vvvvvxy))
	{
		return true;
	}
	return false;
}

// the vvvvvxy Some function
function class_extends_vvvvvxy_SomeFunc(class_extends_vvvvvxy)
{
	// set the function logic
	if (isSet(class_extends_vvvvvxy))
	{
		return true;
	}
	return false;
}

// the vvvvvxz function
function vvvvvxz(class_extends_vvvvvxz)
{
	if (isSet(class_extends_vvvvvxz) &&
class_extends_vvvvvxz.constructor !== Array)
	{
		var temp_vvvvvxz = class_extends_vvvvvxz;
		var class_extends_vvvvvxz = [];
		class_extends_vvvvvxz.push(temp_vvvvvxz);
	}
	else if (!isSet(class_extends_vvvvvxz))
	{
		var class_extends_vvvvvxz = [];
	}
	var class_extends =
class_extends_vvvvvxz.some(class_extends_vvvvvxz_SomeFunc);


	// set this function logic
	if (class_extends)
	{
		jQuery('#jform_add_head').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_add_head').closest('.control-group').hide();
	}
}

// the vvvvvxz Some function
function class_extends_vvvvvxz_SomeFunc(class_extends_vvvvvxz)
{
	// set the function logic
	if (isSet(class_extends_vvvvvxz))
	{
		return true;
	}
	return false;
}

// the vvvvvya function
function vvvvvya(add_head_vvvvvya,class_extends_vvvvvya)
{
	if (isSet(add_head_vvvvvya) && add_head_vvvvvya.constructor !==
Array)
	{
		var temp_vvvvvya = add_head_vvvvvya;
		var add_head_vvvvvya = [];
		add_head_vvvvvya.push(temp_vvvvvya);
	}
	else if (!isSet(add_head_vvvvvya))
	{
		var add_head_vvvvvya = [];
	}
	var add_head = add_head_vvvvvya.some(add_head_vvvvvya_SomeFunc);

	if (isSet(class_extends_vvvvvya) &&
class_extends_vvvvvya.constructor !== Array)
	{
		var temp_vvvvvya = class_extends_vvvvvya;
		var class_extends_vvvvvya = [];
		class_extends_vvvvvya.push(temp_vvvvvya);
	}
	else if (!isSet(class_extends_vvvvvya))
	{
		var class_extends_vvvvvya = [];
	}
	var class_extends =
class_extends_vvvvvya.some(class_extends_vvvvvya_SomeFunc);


	// set this function logic
	if (add_head && class_extends)
	{
		jQuery('#jform_head-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_head-lbl').closest('.control-group').hide();
	}
}

// the vvvvvya Some function
function add_head_vvvvvya_SomeFunc(add_head_vvvvvya)
{
	// set the function logic
	if (add_head_vvvvvya == 1)
	{
		return true;
	}
	return false;
}

// the vvvvvya Some function
function class_extends_vvvvvya_SomeFunc(class_extends_vvvvvya)
{
	// set the function logic
	if (isSet(class_extends_vvvvvya))
	{
		return true;
	}
	return false;
}

// the vvvvvyc function
function vvvvvyc(add_php_script_construct_vvvvvyc)
{
	// set the function logic
	if (add_php_script_construct_vvvvvyc == 1)
	{
		jQuery('#jform_php_script_construct-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_script_construct-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyd function
function vvvvvyd(add_php_preflight_install_vvvvvyd)
{
	// set the function logic
	if (add_php_preflight_install_vvvvvyd == 1)
	{
		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_install-lbl').closest('.control-group').hide();
	}
}

// the vvvvvye function
function vvvvvye(add_php_preflight_update_vvvvvye)
{
	// set the function logic
	if (add_php_preflight_update_vvvvvye == 1)
	{
		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_update-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyf function
function vvvvvyf(add_php_preflight_uninstall_vvvvvyf)
{
	// set the function logic
	if (add_php_preflight_uninstall_vvvvvyf == 1)
	{
		jQuery('#jform_php_preflight_uninstall-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_preflight_uninstall-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyg function
function vvvvvyg(add_php_postflight_install_vvvvvyg)
{
	// set the function logic
	if (add_php_postflight_install_vvvvvyg == 1)
	{
		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postflight_install-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyh function
function vvvvvyh(add_php_postflight_update_vvvvvyh)
{
	// set the function logic
	if (add_php_postflight_update_vvvvvyh == 1)
	{
		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_postflight_update-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyi function
function vvvvvyi(add_php_method_uninstall_vvvvvyi)
{
	// set the function logic
	if (add_php_method_uninstall_vvvvvyi == 1)
	{
		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').hide();
	}
}

// the vvvvvyj function
function vvvvvyj(update_server_target_vvvvvyj,add_update_server_vvvvvyj)
{
	// set the function logic
	if (update_server_target_vvvvvyj == 1 && add_update_server_vvvvvyj
== 1)
	{
		jQuery('#jform_update_server').closest('.control-group').show();
		jQuery('.note_update_server_note_ftp').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server').closest('.control-group').hide();
		jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
	}
}

// the vvvvvyk function
function vvvvvyk(add_update_server_vvvvvyk,update_server_target_vvvvvyk)
{
	// set the function logic
	if (add_update_server_vvvvvyk == 1 && update_server_target_vvvvvyk
== 1)
	{
		jQuery('#jform_update_server').closest('.control-group').show();
		jQuery('.note_update_server_note_ftp').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server').closest('.control-group').hide();
		jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
	}
}

// the vvvvvyl function
function vvvvvyl(update_server_target_vvvvvyl,add_update_server_vvvvvyl)
{
	// set the function logic
	if (update_server_target_vvvvvyl == 2 && add_update_server_vvvvvyl
== 1)
	{
		jQuery('.note_update_server_note_zip').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_update_server_note_zip').closest('.control-group').hide();
	}
}

// the vvvvvyn function
function vvvvvyn(update_server_target_vvvvvyn,add_update_server_vvvvvyn)
{
	// set the function logic
	if (update_server_target_vvvvvyn == 3 && add_update_server_vvvvvyn
== 1)
	{
		jQuery('.note_update_server_note_other').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_update_server_note_other').closest('.control-group').hide();
	}
}

// the vvvvvyp function
function vvvvvyp(add_update_server_vvvvvyp)
{
	// set the function logic
	if (add_update_server_vvvvvyp == 1)
	{
		jQuery('#jform_update_server_target').closest('.control-group').show();
		// add required attribute to update_server_target field
		if (jform_vvvvvypvwg_required)
		{
			updateFieldRequired('update_server_target',0);
			jQuery('#jform_update_server_target').prop('required','required');
			jQuery('#jform_update_server_target').attr('aria-required',true);
			jQuery('#jform_update_server_target').addClass('required');
			jform_vvvvvypvwg_required = false;
		}
	}
	else
	{
		jQuery('#jform_update_server_target').closest('.control-group').hide();
		// remove required attribute from update_server_target field
		if (!jform_vvvvvypvwg_required)
		{
			updateFieldRequired('update_server_target',1);
			jQuery('#jform_update_server_target').removeAttr('required');
			jQuery('#jform_update_server_target').removeAttr('aria-required');
			jQuery('#jform_update_server_target').removeClass('required');
			jform_vvvvvypvwg_required = true;
		}
	}
}

// the vvvvvyq function
function vvvvvyq(add_sql_vvvvvyq)
{
	// set the function logic
	if (add_sql_vvvvvyq == 1)
	{
		jQuery('#jform_sql').closest('.control-group').show();
		// add required attribute to sql field
		if (jform_vvvvvyqvwh_required)
		{
			updateFieldRequired('sql',0);
			jQuery('#jform_sql').prop('required','required');
			jQuery('#jform_sql').attr('aria-required',true);
			jQuery('#jform_sql').addClass('required');
			jform_vvvvvyqvwh_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql').closest('.control-group').hide();
		// remove required attribute from sql field
		if (!jform_vvvvvyqvwh_required)
		{
			updateFieldRequired('sql',1);
			jQuery('#jform_sql').removeAttr('required');
			jQuery('#jform_sql').removeAttr('aria-required');
			jQuery('#jform_sql').removeClass('required');
			jform_vvvvvyqvwh_required = true;
		}
	}
}

// the vvvvvyr function
function vvvvvyr(add_sql_uninstall_vvvvvyr)
{
	// set the function logic
	if (add_sql_uninstall_vvvvvyr == 1)
	{
		jQuery('#jform_sql_uninstall').closest('.control-group').show();
		// add required attribute to sql_uninstall field
		if (jform_vvvvvyrvwi_required)
		{
			updateFieldRequired('sql_uninstall',0);
			jQuery('#jform_sql_uninstall').prop('required','required');
			jQuery('#jform_sql_uninstall').attr('aria-required',true);
			jQuery('#jform_sql_uninstall').addClass('required');
			jform_vvvvvyrvwi_required = false;
		}
	}
	else
	{
		jQuery('#jform_sql_uninstall').closest('.control-group').hide();
		// remove required attribute from sql_uninstall field
		if (!jform_vvvvvyrvwi_required)
		{
			updateFieldRequired('sql_uninstall',1);
			jQuery('#jform_sql_uninstall').removeAttr('required');
			jQuery('#jform_sql_uninstall').removeAttr('aria-required');
			jQuery('#jform_sql_uninstall').removeClass('required');
			jform_vvvvvyrvwi_required = true;
		}
	}
}

// the vvvvvys function
function vvvvvys(add_update_server_vvvvvys)
{
	// set the function logic
	if (add_update_server_vvvvvys == 1)
	{
		jQuery('#jform_update_server_url').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_update_server_url').closest('.control-group').hide();
	}
}

// the vvvvvyt function
function vvvvvyt(add_sales_server_vvvvvyt)
{
	// set the function logic
	if (add_sales_server_vvvvvyt == 1)
	{
		jQuery('#jform_sales_server').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_sales_server').closest('.control-group').hide();
	}
}

// the vvvvvyu function
function vvvvvyu(addreadme_vvvvvyu)
{
	// set the function logic
	if (addreadme_vvvvvyu == 1)
	{
		jQuery('#jform_readme-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_readme-lbl').closest('.control-group').hide();
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// get the linked details
	getLinked();
	// load the active array values
	buildSelectionMemory('property');
	buildSelectionMemory('method');
	// load the active selection array values
	getClassCodeIds('joomla_plugin_group',
'jform_class_extends', false);
	getClassCodeIds('property',
'jform_joomla_plugin_group', false);
	getClassCodeIds('method', 'jform_joomla_plugin_group',
false);
	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
	// trigger the row watcher
	rowWatcher();
});

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


// set selection the options
selectionMemory = {'property':{},'method':{}};
selectionActiveArray = {'property':{},'method':{}};
selectedIdRemoved =
{'property':'not','method':'not'};

function buildSelectionMemory(type) {
	var i;
	for (i = 0; i < 70; i++) {
		// build ID
		var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
		// set memory
		if (jQuery("#"+id_check).length) {
			selectionMemory[type][id_check] = jQuery("#"+id_check+"
option:selected").val();
		}
	}
}

function getClassHeaderCode(){
	// now get the values
	var value = jQuery("#jform_class_extends 
option:selected").val();
	var add_value = jQuery("#jform_add_head
input[type='radio']:checked").val();
	if (add_value == 1 && value > 0){
		// we first check local memory
		var _result = jQuery.jStorage.get('extends_header_'+value,
null);
		if (_result) {
				// now set the code
				addCodeToEditor(_result, "jform_head", false, null);
		} else {
			// now get the code
			getCodeFrom_server(value, 'extends', 'type',
'getClassHeaderCode').done(function(result) {
				if(result){
					// now set the code
					addCodeToEditor(result, "jform_head", false, null);
					// add result to local memory
					jQuery.jStorage.set('extends_header_'+value, result, {TTL:
expire});
				}
			});
		}
	}
}

function getClassCodeIds(type, target_field, reset_all){
	// now get the value
	var value = jQuery('#'+target_field).val();
	// now get the code
	getCodeFrom_server(value, type, 'type',
'getClassCodeIds').done(function(result) {
		if(result){
			// reset the selection
			selectionActiveArray[type] = {};
			// update the active array
			jQuery.each(result, function(i, prop) {
				selectionActiveArray[type][prop] = selectionArray[type][prop];
			});
			// update the active field selection
			updateActiveFieldSelection(type, reset_all);
		}
	});
}

function updateActiveFieldSelection(type, reset_all){
	// update the selection options
	if ('joomla_plugin_group' === type) {
		// get value if not going to reset all
		if (!reset_all){
			// get the active values
			var activeValue =  jQuery("#jform_"+type+"
option:selected").val();
			var activeText =  jQuery("#jform_"+type+"
option:selected").text();
			// clear the options out
			jQuery("#jform_"+type).find('option').remove().end();
			// add the active selection back (must be what is available)
			jQuery("#jform_"+type).append('<option
value="'+activeValue+'">'+activeText+'</option>');
			// now add the lists back
			jQuery.each( selectionActiveArray[type], function(aValue, aText ) {
				if (activeValue !== aValue) {
					jQuery("#jform_"+type).append('<option
value="'+aValue+'">'+aText+'</option>');
				}
			});
			jQuery("#jform_"+type).val(activeValue);			
		} else {
			// clear the options out
			jQuery("#jform_"+type).find('option').remove().end();
			// now add the lists back
			jQuery.each( selectionActiveArray[type], function(aValue, aText ) {
				jQuery("#jform_"+type).append('<option
value="'+aValue+'">'+aText+'</option>');
			});
			jQuery("#jform_"+type).val('');
		}
		jQuery("#jform_"+type).trigger('liszt:updated');
		// reset all when global update is made
		if (reset_all) {
			resetAll('method');
			resetAll('property');
		}
	} else {
		selectionDynamicUpdate(type);
		// reset all when global update is made
		if (reset_all) {
			resetAll(type);
		}
	}
}

function resetAll(type) {
	var i;
	for (i = 0; i < 10; i++) {
		// build ID
		var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
		// first check if Id is on page as that not the same as the one currently
calling
		if (jQuery("#"+id_check).length) {
			if (i == 0) {
				jQuery('#'+id_check).val('');
				jQuery('#'+id_check).trigger('liszt:updated');
			} else {
				// remove the row
				jQuery('#'+id_check).closest('tr').remove();
			}
		}
	}
	Joomla.editors.instances['jform_main_class_code'].setValue('');
	selectionMemory = {'property':{},'method':{}};
}

function getClassCode(field, type){
	// get the ID
	var id = jQuery(field).attr('id');
	// now get the value
	var value = jQuery('#' + id).val();
	// check if we have a memory for this field, if true remove code of old
selection and clear memory
	if (selectionMemory[type].hasOwnProperty(id) &&
selectionMemory[type][id] > 0) {
		// the old id to remove
		var old_value = selectionMemory[type][id];
		// remove the code // we first check local memory
		var _result =
jQuery.jStorage.get('code_4_'+type+'_'+old_value,
null);
		if (_result) {
			// now remove the code
			if (removeCodeFromEditor(_result, 'jform_main_class_code')) {
				selectionMemory[type][id] = 0;
			}
		} else {
			// now get the code
			getCodeFrom_server(old_value, type, 'type',
'getClassCode').done(function(result) {
				if(result){
					// now remove the code
					if (removeCodeFromEditor(result, 'jform_main_class_code'))
{
						selectionMemory[type][id] = 0;
					}
					// add result to local memory
					jQuery.jStorage.set('code_4_'+type+'_'+old_value,
result, {TTL: expire});
				}
			});
		}
	}
	if (propertyIsSet(value, id, type)) {
		// reset the selection
		jQuery('#'+id).val('');
		jQuery('#'+id).trigger("liszt:updated");
		// give out a notice
		jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER'),
timeout: 5000, status: 'warning', pos: 'top-center'});
	} else {
		// set the active removed value
		selectedIdRemoved[type] = id;
		// do a dynamic update (to remove what was already used)
		selectionDynamicUpdate(type);
		// set the add action
		if (type === 'property') {
			var _action_add = 'prepend';
		} else {
			var _action_add = 'append';
		}
		// we first check local memory
		var _result =
jQuery.jStorage.get('code_4_'+type+'_'+value, null);
		if (_result) {
			// now set the code
			if (addCodeToEditor(_result, "jform_main_class_code", true,
_action_add)) {
				selectionMemory[type][id] = value;
			}
		} else {
			// now get the code
			getCodeFrom_server(value, type, 'type',
'getClassCode').done(function(result) {
				if(result){
					// now set the code
					if (addCodeToEditor(result, "jform_main_class_code", true,
_action_add)) {
						selectionMemory[type][id] = value;
					}
					// add result to local memory
					jQuery.jStorage.set('code_4_'+type+'_'+value,
result, {TTL: expire});
				}
			});
		}
	}
}

function selectionDynamicUpdate(type) {
	selectionAvailable = {};
	selectionSelectedArray = {};
	selectionTrackerArray = {};
	var i;
	for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
		// build ID
		var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
		// first check if Id is on page as that not the same as the one currently
calling
		if (jQuery("#"+id_check).length &&
selectedIdRemoved[type] !== id_check) {
			// build the selected array
			var key =  jQuery("#"+id_check+"
option:selected").val();
			var text =  jQuery("#"+id_check+"
option:selected").text();
			selectionSelectedArray[key] = text;
			// keep track of the value set
			selectionTrackerArray[id_check] = key;
			// clear the options out
			jQuery("#"+id_check).find('option').remove().end();
		}
	}
	// now build the list to keep
	jQuery.each( selectionActiveArray[type], function( prop, name ) {
		if (!selectionSelectedArray.hasOwnProperty(prop)) {
			selectionAvailable[prop] = name;
		}
	});
	// now add the lists back
	jQuery.each( selectionTrackerArray, function( tId, tKey ) {
		if (jQuery('#'+tId).length) {
			jQuery('#'+tId).append('<option
value="'+tKey+'">'+selectionSelectedArray[tKey]+'</option>');
			jQuery.each( selectionAvailable, function( aKey, aValue ) {
				jQuery('#'+tId).append('<option
value="'+aKey+'">'+aValue+'</option>');
			});
			jQuery('#'+tId).val(tKey);
			jQuery('#'+tId).trigger('liszt:updated');
		}
	});
}

function rowWatcher() {
	jQuery(document).on('subform-row-remove', function(event, row){
		// we first chck if this is a method call
       		var valid_call =
jQuery(row.innerHTML).find('.method_selection_list').attr('id');
		var type_call = 'method';
		if (!isSet(valid_call)){
			// now lets see if this is a property call
			var valid_call =
jQuery(row.innerHTML).find('.property_selection_list').attr('id');
			var type_call = 'property';
		}
		// so lets update selection if call valid
		if (isSet(valid_call)){
			selectedIdRemoved[type_call] = valid_call;
			selectionDynamicUpdate(type_call);
			// also remove from code
			var valid_value = jQuery(row.innerHTML).find('#' + valid_call
+ ' option:selected').val();
			if (valid_value === '') {
				valid_value = selectionMemory[type_call][valid_call];
			}
			// remove the code // we first check local memory
			var _result =
jQuery.jStorage.get('code_4_'+type_call+'_'+valid_value,
null);
			if (_result) {
				// now remove the code
				if (removeCodeFromEditor(_result, 'jform_main_class_code'))
{
					selectionMemory[type_call][valid_call] = 0;
				}
			} else {
				// now get the code
				getCodeFrom_server(valid_value, type_call, 'type',
'getClassCode').done(function(result) {
					if(result){
						if (removeCodeFromEditor(result, 'jform_main_class_code'))
{
							selectionMemory[type_call][valid_call] = 0;;
						}
						// add result to local memory
						jQuery.jStorage.set('code_4_'+type_call+'_'+valid_value,
result, {TTL: expire});
					}
				});
			}
		}
	});
	jQuery(document).on('subform-row-add', function(event, row){
		// we first chck if this is a method call
       		var valid_call =
jQuery(row.innerHTML).find('.method_selection_list').attr('id');
		var type_call = 'method';
		if (!isSet(valid_call)){
			// now lets see if this is a property call
			var valid_call =
jQuery(row.innerHTML).find('.property_selection_list').attr('id');
			var type_call = 'property';
		}
		// so lets update selection if call valid
		if (isSet(valid_call)){
			selectedIdRemoved[type_call] = 'not';
			selectionDynamicUpdate(type_call);
		}
	});
}

function propertyIsSet(prop, id, type) {
	var i;
	for (i = 0; i < 70; i++) { // for now this is the number of field we
should check
		// build ID
		var id_check =
'jform_'+type+'_selection'+'__'+type+'_selection'+i+'__'+type;
		// first check if Id is on page as that not the same as the one currently
calling
		if (jQuery("#"+id_check).length && id_check != id) {
			// get the property value
			var tmp = jQuery("#"+id_check+"
option:selected").val();
			// now validate
			if (tmp === prop) {
				return true;
			}
		}
	}
	return false;
}


function addCodeToEditor(code_string, editor_id, merge, merge_target){
	if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
		var old_code_string = Joomla.editors.instances[editor_id].getValue();
		if (merge && old_code_string.length > 0) {
			// make sure not to load the same string twice
			if (old_code_string.indexOf(code_string) == -1)  {
				if ('prepend' === merge_target) {
					var _string = code_string + "\n\n" + old_code_string;
				} else if (merge_target && 'append' !== merge_target)
{
					var old_code_array = old_code_string.split(merge_target);
					if (old_code_array.length > 1) {
						var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
					} else {
						var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
					}
				} else {
					var _string = old_code_string + "\n\n" + code_string;
				}
				Joomla.editors.instances[editor_id].setValue(_string.trim());
				return true;
			}
		} else {
			Joomla.editors.instances[editor_id].setValue(code_string.trim());
			return true;
		}
	} else {
		var old_code_string = jQuery('textarea#'+editor_id).val();
		if (merge && old_code_string.length > 0) {
			// make sure not to load the same string twice
			if (old_code_string.indexOf(code_string) == -1) {
				if ('prepend' === merge_target) {
					var _string = code_string + "\n\n" + old_code_string;
				} else if (merge_target && 'append' !== merge_target)
{
					var old_code_array = old_code_string.split(merge_target);
					if (old_code_array.length > 1) {
						var _string = old_code_array.shift() + "\n\n" + code_string
+ "\n\n" + merge_target + old_code_array.join(merge_target);
					} else {
						var _string = code_string + "\n\n" + merge_target +
old_code_array.join('');
					}
				} else {
					var _string = old_code_string + "\n\n" + code_string;
				}
				jQuery('textarea#'+editor_id).val(_string.trim());
				return true;
			}
		} else {
			jQuery('textarea#'+editor_id).val(code_string.trim());
			return true;
		}
	}
	return false;
}


function removeCodeFromEditor(code_string, editor_id){
	if (Joomla.editors.instances.hasOwnProperty(editor_id)) {
		var old_code_string = Joomla.editors.instances[editor_id].getValue();
		if (old_code_string.length > 0) {
			// make sure string is found
			if (old_code_string.indexOf(code_string) !== -1) {
				// remove the code
				Joomla.editors.instances[editor_id].setValue(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
				return true;
			}
		}
	} else {
		var old_code_string = jQuery('textarea#'+editor_id).val();
		if (old_code_string.length > 0) {
			// make sure string is found
			if (old_code_string.indexOf(code_string) !== -1) {
				// remove the code
				jQuery('textarea#'+editor_id).val(old_code_string.replace(code_string+"\n\n",'').replace("\n\n"+code_string,'').replace(code_string,''));
				return true;
			}
		}
	}
	return false;
}


function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
}

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[t:	��#joomla_plugin_files_folders_urls.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��joomla_plugin_group.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��joomla_plugin_updates.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t���eejquery.json.min.jsnu�[���/*! jQuery
JSON plugin v2.5.1 */
!function($){"use strict";var
escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON="object"==typeof
JSON&&JSON.stringify?JSON.stringify:function(a){if(null===a)return"null";var
b,c,d,e,f=$.type(a);if("undefined"===f)return void
0;if("number"===f||"boolean"===f)return
String(a);if("string"===f)return
$.quoteString(a);if("function"==typeof a.toJSON)return
$.toJSON(a.toJSON());if("date"===f){var
g=a.getUTCMonth()+1,h=a.getUTCDate(),i=a.getUTCFullYear(),j=a.getUTCHours(),k=a.getUTCMinutes(),l=a.getUTCSeconds(),m=a.getUTCMilliseconds();return
10>g&&(g="0"+g),10>h&&(h="0"+h),10>j&&(j="0"+j),10>k&&(k="0"+k),10>l&&(l="0"+l),100>m&&(m="0"+m),10>m&&(m="0"+m),'"'+i+"-"+g+"-"+h+"T"+j+":"+k+":"+l+"."+m+'Z"'}if(b=[],$.isArray(a)){for(c=0;c<a.length;c++)b.push($.toJSON(a[c])||"null");return"["+b.join(",")+"]"}if("object"==typeof
a){for(c in a)if(hasOwn.call(a,c)){if(f=typeof
c,"number"===f)d='"'+c+'"';else{if("string"!==f)continue;d=$.quoteString(c)}f=typeof
a[c],"function"!==f&&"undefined"!==f&&(e=$.toJSON(a[c]),b.push(d+":"+e))}return"{"+b.join(",")+"}"}},$.evalJSON="object"==typeof
JSON&&JSON.parse?JSON.parse:function(str){return
eval("("+str+")")},$.secureEvalJSON="object"==typeof
JSON&&JSON.parse?JSON.parse:function(str){var
filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered))return
eval("("+str+")");throw new SyntaxError("Error
parsing JSON, source is not valid.")},$.quoteString=function(a){return
a.match(escape)?'"'+a.replace(escape,function(a){var
b=meta[a];return"string"==typeof
b?b:(b=a.charCodeAt(),"\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16))})+'"':'"'+a+'"'}}(jQuery);PK��[s�{X��jstorage.min.jsnu�[���(function(){function
C(){var
a="{}";if("userDataBehavior"==f){g.load("jStorage");try{a=g.getAttribute("jStorage")}catch(b){}try{r=g.getAttribute("jStorage_update")}catch(c){}h.jStorage=a}D();x();E()}function
u(){var
a;clearTimeout(F);F=setTimeout(function(){if("localStorage"==f||"globalStorage"==f)a=h.jStorage_update;else
if("userDataBehavior"==f){g.load("jStorage");try{a=g.getAttribute("jStorage_update")}catch(b){}}if(a&&a!=r){r=a;var
l=p.parse(p.stringify(c.__jstorage_meta.CRC32)),k;C();k=p.parse(p.stringify(c.__jstorage_meta.CRC32));
var d,n=[],e=[];for(d in
l)l.hasOwnProperty(d)&&(k[d]?l[d]!=k[d]&&"2."==String(l[d]).substr(0,2)&&n.push(d):e.push(d));for(d
in
k)k.hasOwnProperty(d)&&(l[d]||n.push(d));s(n,"updated");s(e,"deleted")}},25)}function
s(a,b){a=[].concat(a||[]);var c,k,d,n;if("flushed"==b){a=[];for(c
in
m)m.hasOwnProperty(c)&&a.push(c);b="deleted"}c=0;for(d=a.length;c<d;c++){if(m[a[c]])for(k=0,n=m[a[c]].length;k<n;k++)m[a[c]][k](a[c],b);if(m["*"])for(k=0,n=m["*"].length;k<n;k++)m["*"][k](a[c],b)}}function
v(){var a=(+new Date).toString();
if("localStorage"==f||"globalStorage"==f)try{h.jStorage_update=a}catch(b){f=!1}else"userDataBehavior"==f&&(g.setAttribute("jStorage_update",a),g.save("jStorage"));u()}function
D(){if(h.jStorage)try{c=p.parse(String(h.jStorage))}catch(a){h.jStorage="{}"}else
h.jStorage="{}";z=h.jStorage?String(h.jStorage).length:0;c.__jstorage_meta||(c.__jstorage_meta={});c.__jstorage_meta.CRC32||(c.__jstorage_meta.CRC32={})}function
w(){if(c.__jstorage_meta.PubSub){for(var a=+new
Date-2E3,b=0,l=c.__jstorage_meta.PubSub.length;b<
l;b++)if(c.__jstorage_meta.PubSub[b][0]<=a){c.__jstorage_meta.PubSub.splice(b,c.__jstorage_meta.PubSub.length-b);break}c.__jstorage_meta.PubSub.length||delete
c.__jstorage_meta.PubSub}try{h.jStorage=p.stringify(c),g&&(g.setAttribute("jStorage",h.jStorage),g.save("jStorage")),z=h.jStorage?String(h.jStorage).length:0}catch(k){}}function
q(a){if("string"!=typeof a&&"number"!=typeof
a)throw new TypeError("Key name must be string or
numeric");if("__jstorage_meta"==a)throw new
TypeError("Reserved key name");
return!0}function x(){var
a,b,l,k,d=Infinity,n=!1,e=[];clearTimeout(G);if(c.__jstorage_meta&&"object"==typeof
c.__jstorage_meta.TTL){a=+new
Date;l=c.__jstorage_meta.TTL;k=c.__jstorage_meta.CRC32;for(b in
l)l.hasOwnProperty(b)&&(l[b]<=a?(delete l[b],delete k[b],delete
c[b],n=!0,e.push(b)):l[b]<d&&(d=l[b]));Infinity!=d&&(G=setTimeout(x,Math.min(d-a,2147483647)));n&&(w(),v(),s(e,"deleted"))}}function
E(){var a;if(c.__jstorage_meta.PubSub){var
b,l=A,k=[];for(a=c.__jstorage_meta.PubSub.length-1;0<=a;a--)b=
c.__jstorage_meta.PubSub[a],b[0]>A&&(l=b[0],k.unshift(b));for(a=k.length-1;0<=a;a--){b=k[a][1];var
d=k[a][2];if(t[b])for(var
n=0,e=t[b].length;n<e;n++)try{t[b][n](b,p.parse(p.stringify(d)))}catch(g){}}A=l}}var
y=window.jQuery||window.$||(window.$={}),p={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(a){return
String(a).evalJSON()}||y.parseJSON||y.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||y.toJSON};if("function"!==
typeof p.parse||"function"!==typeof p.stringify)throw
Error("No JSON support found, include
//cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");var
c={__jstorage_meta:{CRC32:{}}},h={jStorage:"{}"},g=null,z=0,f=!1,m={},F=!1,r=0,t={},A=+new
Date,G,B={isXML:function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1},encode:function(a){if(!this.isXML(a))return!1;try{return(new
XMLSerializer).serializeToString(a)}catch(b){try{return
a.xml}catch(c){}}return!1},
decode:function(a){var b="DOMParser"in window&&(new
DOMParser).parseFromString||window.ActiveXObject&&function(a){var
b=new
ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a);return
b};if(!b)return!1;a=b.call("DOMParser"in window&&new
DOMParser||window,a,"text/xml");return
this.isXML(a)?a:!1}};y.jStorage={version:"0.4.12",set:function(a,b,l){q(a);l=l||{};if("undefined"==typeof
b)return
this.deleteKey(a),b;if(B.isXML(b))b={_is_xml:!0,xml:B.encode(b)};else{if("function"==typeof
b)return;
b&&"object"==typeof
b&&(b=p.parse(p.stringify(b)))}c[a]=b;for(var
k=c.__jstorage_meta.CRC32,d=p.stringify(b),g=d.length,e=2538058380^g,h=0,f;4<=g;)f=d.charCodeAt(h)&255|(d.charCodeAt(++h)&255)<<8|(d.charCodeAt(++h)&255)<<16|(d.charCodeAt(++h)&255)<<24,f=1540483477*(f&65535)+((1540483477*(f>>>16)&65535)<<16),f^=f>>>24,f=1540483477*(f&65535)+((1540483477*(f>>>16)&65535)<<16),e=1540483477*(e&65535)+((1540483477*(e>>>16)&65535)<<16)^f,g-=4,++h;switch(g){case
3:e^=(d.charCodeAt(h+2)&255)<<16;case 2:e^=
(d.charCodeAt(h+1)&255)<<8;case
1:e^=d.charCodeAt(h)&255,e=1540483477*(e&65535)+((1540483477*(e>>>16)&65535)<<16)}e^=e>>>13;e=1540483477*(e&65535)+((1540483477*(e>>>16)&65535)<<16);k[a]="2."+((e^e>>>15)>>>0);this.setTTL(a,l.TTL||0);s(a,"updated");return
b},get:function(a,b){q(a);return a in
c?c[a]&&"object"==typeof
c[a]&&c[a]._is_xml?B.decode(c[a].xml):c[a]:"undefined"==typeof
b?null:b},deleteKey:function(a){q(a);return a in c?(delete
c[a],"object"==typeof c.__jstorage_meta.TTL&&a in
c.__jstorage_meta.TTL&&
delete c.__jstorage_meta.TTL[a],delete
c.__jstorage_meta.CRC32[a],w(),v(),s(a,"deleted"),!0):!1},setTTL:function(a,b){var
l=+new Date;q(a);b=Number(b)||0;return a in
c?(c.__jstorage_meta.TTL||(c.__jstorage_meta.TTL={}),0<b?c.__jstorage_meta.TTL[a]=l+b:delete
c.__jstorage_meta.TTL[a],w(),x(),v(),!0):!1},getTTL:function(a){var b=+new
Date;q(a);return a in
c&&c.__jstorage_meta.TTL&&c.__jstorage_meta.TTL[a]?(a=c.__jstorage_meta.TTL[a]-b)||0:0},flush:function(){c={__jstorage_meta:{CRC32:{}}};w();v();s(null,
"flushed");return!0},storageObj:function(){function
a(){}a.prototype=c;return new a},index:function(){var a=[],b;for(b in
c)c.hasOwnProperty(b)&&"__jstorage_meta"!=b&&a.push(b);return
a},storageSize:function(){return z},currentBackend:function(){return
f},storageAvailable:function(){return!!f},listenKeyChange:function(a,b){q(a);m[a]||(m[a]=[]);m[a].push(b)},stopListening:function(a,b){q(a);if(m[a])if(b)for(var
c=m[a].length-1;0<=c;c--)m[a][c]==b&&m[a].splice(c,1);else
delete m[a]},subscribe:function(a,
b){a=(a||"").toString();if(!a)throw new TypeError("Channel
not
defined");t[a]||(t[a]=[]);t[a].push(b)},publish:function(a,b){a=(a||"").toString();if(!a)throw
new TypeError("Channel not
defined");c.__jstorage_meta||(c.__jstorage_meta={});c.__jstorage_meta.PubSub||(c.__jstorage_meta.PubSub=[]);c.__jstorage_meta.PubSub.unshift([+new
Date,a,b]);w();v()},reInit:function(){C()},noConflict:function(a){delete
window.$.jStorage;a&&(window.jStorage=this);return
this}};(function(){var a=!1;if("localStorage"in
window)try{window.localStorage.setItem("_tmptest","tmpval"),a=!0,window.localStorage.removeItem("_tmptest")}catch(b){}if(a)try{window.localStorage&&(h=window.localStorage,f="localStorage",r=h.jStorage_update)}catch(c){}else
if("globalStorage"in
window)try{window.globalStorage&&(h="localhost"==window.location.hostname?window.globalStorage["localhost.localdomain"]:window.globalStorage[window.location.hostname],f="globalStorage",r=h.jStorage_update)}catch(k){}else
if(g=document.createElement("link"),
g.addBehavior){g.style.behavior="url(#default#userData)";document.getElementsByTagName("head")[0].appendChild(g);try{g.load("jStorage")}catch(d){g.setAttribute("jStorage","{}"),g.save("jStorage"),g.load("jStorage")}a="{}";try{a=g.getAttribute("jStorage")}catch(m){}try{r=g.getAttribute("jStorage_update")}catch(e){}h.jStorage=a;f="userDataBehavior"}else{g=null;return}D();x();"localStorage"==f||"globalStorage"==f?"addEventListener"in
window?window.addEventListener("storage",u,!1):document.attachEvent("onstorage",
u):"userDataBehavior"==f&&setInterval(u,1E3);E();"addEventListener"in
window&&window.addEventListener("pageshow",function(a){a.persisted&&u()},!1)})()})();PK��[t:	��language.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[�}q
]]language_translation.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




jQuery(document).ready(function($)
{
	// set button to add more languages
	addButton('language','entranslation');
});
function addData(result,where){
	jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}

function addButton_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButton(type, where, size){
	// just to insure that default behaviour still works
	size = typeof size !== 'undefined' ? size : 1;
	addButton_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	})
} 
PK��[��)���	layout.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Initial Script
jQuery(document).ready(function()
{
	var add_php_view_vvvvwaz = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
	vvvvwaz(add_php_view_vvvvwaz);
});

// the vvvvwaz function
function vvvvwaz(add_php_view_vvvvwaz)
{
	// set the function logic
	if (add_php_view_vvvvwaz == 1)
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
	}
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function($)
{
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function getSnippetDetails(id){
	getCodeFrom_server(id, '_type', '_type',
'snippetDetails').done(function(result) {
		if(result.snippet){
			var description = '';
			if (result.description.length > 0) {
				description =
'<p>'+result.description+'</p>';
			}
			var library = '';
			if (result.library.length > 0) {
				library = '
<b>('+result.library+')</b>';
			}
			var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea  id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
			jQuery('#snippet-code').remove();
			jQuery('.snippet-code').append(code);
			// make sure the code block is active
			jQuery("#snippet").focus(function() {
				var jQuerythis = jQuery(this);
				jQuerythis.select();
			
				// Work around Chrome's little problem
				jQuerythis.mouseup(function() {
					// Prevent further mouseup intervention
					jQuerythis.unbind("mouseup");
					return false;
				});
			});
		}
		if(result.usage){
			var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
			jQuery('#snippet-usage').remove();
			jQuery('.snippet-usage').append(usage);
		}
	})
}

function getDynamicValues_server(dynamicId){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
	if(token.length > 0 && dynamicId > 0){
		var request = token+'=1&view=layout&id='+dynamicId;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getDynamicValues(id){
	getDynamicValues_server(id).done(function(result) {
		if(result){
			jQuery('#dynamic_values').remove();
			jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getLayoutDetails_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request = token+'=1&id='+id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getLayoutDetails(id){
	getLayoutDetails_server(id).done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
	jQuery("#jform_snippet option").each(function()
	{
		var key =  jQuery(this).val();
		var text =  jQuery(this).text();
		snippets[key] = text;
		snippetIds.push(key);
	});
	snippet = jQuery("#jform_snippet").val();
	getSnippets();
});

function getSnippets(){
	jQuery("#loading").show();
	// clear the selection
	jQuery('#jform_snippet').find('option').remove().end();
	jQuery('#jform_snippet').trigger('liszt:updated');
	// get libraries value if set
	var libraries = jQuery("#jform_libraries").val();
	if (libraries) {
		getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').done(function(result) {
			setSnippets(result);
			jQuery("#loading").hide();
			if (typeof snippetButton !== 'undefined') {
				// ensure button is correct
				var snippet = jQuery('#jform_snippet').val();
				snippetButton(snippet);
			}
		});
	}
	else
	{
		// load all snippets in none is selected
		setSnippets(snippetIds);
		jQuery("#loading").hide();
	}
}
function setSnippets(array){
	if (array) {
		jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
		jQuery.each( array, function( i, id ) {
			if (id in snippets) {
				jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
			}
			if (id == snippet) {
				jQuery('#jform_snippet').val(id);
			}
		});
	} else {
		jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
	}
	jQuery('#jform_snippet').trigger('liszt:updated');
} 
PK��[�~�E�`�`
library.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwcjvxl_required = false;
jform_vvvvwcxvxm_required = false;
jform_vvvvwcxvxn_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var how_vvvvwch = jQuery("#jform_how").val();
	var target_vvvvwch = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwch(how_vvvvwch,target_vvvvwch);

	var how_vvvvwcj = jQuery("#jform_how").val();
	var target_vvvvwcj = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcj(how_vvvvwcj,target_vvvvwcj);

	var how_vvvvwcl = jQuery("#jform_how").val();
	var target_vvvvwcl = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcl(how_vvvvwcl,target_vvvvwcl);

	var how_vvvvwcn = jQuery("#jform_how").val();
	var target_vvvvwcn = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcn(how_vvvvwcn,target_vvvvwcn);

	var how_vvvvwcp = jQuery("#jform_how").val();
	var target_vvvvwcp = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcp(how_vvvvwcp,target_vvvvwcp);

	var target_vvvvwcq = jQuery("#jform_target
input[type='radio']:checked").val();
	var how_vvvvwcq = jQuery("#jform_how").val();
	vvvvwcq(target_vvvvwcq,how_vvvvwcq);

	var how_vvvvwcr = jQuery("#jform_how").val();
	var target_vvvvwcr = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcr(how_vvvvwcr,target_vvvvwcr);

	var target_vvvvwcs = jQuery("#jform_target
input[type='radio']:checked").val();
	var how_vvvvwcs = jQuery("#jform_how").val();
	vvvvwcs(target_vvvvwcs,how_vvvvwcs);

	var how_vvvvwct = jQuery("#jform_how").val();
	var target_vvvvwct = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwct(how_vvvvwct,target_vvvvwct);

	var target_vvvvwcu = jQuery("#jform_target
input[type='radio']:checked").val();
	var how_vvvvwcu = jQuery("#jform_how").val();
	vvvvwcu(target_vvvvwcu,how_vvvvwcu);

	var target_vvvvwcv = jQuery("#jform_target
input[type='radio']:checked").val();
	var type_vvvvwcv = jQuery("#jform_type
input[type='radio']:checked").val();
	vvvvwcv(target_vvvvwcv,type_vvvvwcv);

	var target_vvvvwcx = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcx(target_vvvvwcx);

	var target_vvvvwcy = jQuery("#jform_target
input[type='radio']:checked").val();
	vvvvwcy(target_vvvvwcy);
});

// the vvvvwch function
function vvvvwch(how_vvvvwch,target_vvvvwch)
{
	if (isSet(how_vvvvwch) && how_vvvvwch.constructor !== Array)
	{
		var temp_vvvvwch = how_vvvvwch;
		var how_vvvvwch = [];
		how_vvvvwch.push(temp_vvvvwch);
	}
	else if (!isSet(how_vvvvwch))
	{
		var how_vvvvwch = [];
	}
	var how = how_vvvvwch.some(how_vvvvwch_SomeFunc);

	if (isSet(target_vvvvwch) && target_vvvvwch.constructor !== Array)
	{
		var temp_vvvvwch = target_vvvvwch;
		var target_vvvvwch = [];
		target_vvvvwch.push(temp_vvvvwch);
	}
	else if (!isSet(target_vvvvwch))
	{
		var target_vvvvwch = [];
	}
	var target = target_vvvvwch.some(target_vvvvwch_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('#jform_addconditions-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
	}
}

// the vvvvwch Some function
function how_vvvvwch_SomeFunc(how_vvvvwch)
{
	// set the function logic
	if (how_vvvvwch == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwch Some function
function target_vvvvwch_SomeFunc(target_vvvvwch)
{
	// set the function logic
	if (target_vvvvwch == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcj function
function vvvvwcj(how_vvvvwcj,target_vvvvwcj)
{
	if (isSet(how_vvvvwcj) && how_vvvvwcj.constructor !== Array)
	{
		var temp_vvvvwcj = how_vvvvwcj;
		var how_vvvvwcj = [];
		how_vvvvwcj.push(temp_vvvvwcj);
	}
	else if (!isSet(how_vvvvwcj))
	{
		var how_vvvvwcj = [];
	}
	var how = how_vvvvwcj.some(how_vvvvwcj_SomeFunc);

	if (isSet(target_vvvvwcj) && target_vvvvwcj.constructor !== Array)
	{
		var temp_vvvvwcj = target_vvvvwcj;
		var target_vvvvwcj = [];
		target_vvvvwcj.push(temp_vvvvwcj);
	}
	else if (!isSet(target_vvvvwcj))
	{
		var target_vvvvwcj = [];
	}
	var target = target_vvvvwcj.some(target_vvvvwcj_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('#jform_php_setdocument').closest('.control-group').show();
		// add required attribute to php_setdocument field
		if (jform_vvvvwcjvxl_required)
		{
			updateFieldRequired('php_setdocument',0);
			jQuery('#jform_php_setdocument').prop('required','required');
			jQuery('#jform_php_setdocument').attr('aria-required',true);
			jQuery('#jform_php_setdocument').addClass('required');
			jform_vvvvwcjvxl_required = false;
		}
	}
	else
	{
		jQuery('#jform_php_setdocument').closest('.control-group').hide();
		// remove required attribute from php_setdocument field
		if (!jform_vvvvwcjvxl_required)
		{
			updateFieldRequired('php_setdocument',1);
			jQuery('#jform_php_setdocument').removeAttr('required');
			jQuery('#jform_php_setdocument').removeAttr('aria-required');
			jQuery('#jform_php_setdocument').removeClass('required');
			jform_vvvvwcjvxl_required = true;
		}
	}
}

// the vvvvwcj Some function
function how_vvvvwcj_SomeFunc(how_vvvvwcj)
{
	// set the function logic
	if (how_vvvvwcj == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwcj Some function
function target_vvvvwcj_SomeFunc(target_vvvvwcj)
{
	// set the function logic
	if (target_vvvvwcj == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcl function
function vvvvwcl(how_vvvvwcl,target_vvvvwcl)
{
	if (isSet(how_vvvvwcl) && how_vvvvwcl.constructor !== Array)
	{
		var temp_vvvvwcl = how_vvvvwcl;
		var how_vvvvwcl = [];
		how_vvvvwcl.push(temp_vvvvwcl);
	}
	else if (!isSet(how_vvvvwcl))
	{
		var how_vvvvwcl = [];
	}
	var how = how_vvvvwcl.some(how_vvvvwcl_SomeFunc);

	if (isSet(target_vvvvwcl) && target_vvvvwcl.constructor !== Array)
	{
		var temp_vvvvwcl = target_vvvvwcl;
		var target_vvvvwcl = [];
		target_vvvvwcl.push(temp_vvvvwcl);
	}
	else if (!isSet(target_vvvvwcl))
	{
		var target_vvvvwcl = [];
	}
	var target = target_vvvvwcl.some(target_vvvvwcl_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('.note_display_library_config').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_display_library_config').closest('.control-group').hide();
	}
}

// the vvvvwcl Some function
function how_vvvvwcl_SomeFunc(how_vvvvwcl)
{
	// set the function logic
	if (how_vvvvwcl == 2 || how_vvvvwcl == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwcl Some function
function target_vvvvwcl_SomeFunc(target_vvvvwcl)
{
	// set the function logic
	if (target_vvvvwcl == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcn function
function vvvvwcn(how_vvvvwcn,target_vvvvwcn)
{
	if (isSet(how_vvvvwcn) && how_vvvvwcn.constructor !== Array)
	{
		var temp_vvvvwcn = how_vvvvwcn;
		var how_vvvvwcn = [];
		how_vvvvwcn.push(temp_vvvvwcn);
	}
	else if (!isSet(how_vvvvwcn))
	{
		var how_vvvvwcn = [];
	}
	var how = how_vvvvwcn.some(how_vvvvwcn_SomeFunc);

	if (isSet(target_vvvvwcn) && target_vvvvwcn.constructor !== Array)
	{
		var temp_vvvvwcn = target_vvvvwcn;
		var target_vvvvwcn = [];
		target_vvvvwcn.push(temp_vvvvwcn);
	}
	else if (!isSet(target_vvvvwcn))
	{
		var target_vvvvwcn = [];
	}
	var target = target_vvvvwcn.some(target_vvvvwcn_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
	}
}

// the vvvvwcn Some function
function how_vvvvwcn_SomeFunc(how_vvvvwcn)
{
	// set the function logic
	if (how_vvvvwcn == 1 || how_vvvvwcn == 2 || how_vvvvwcn == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwcn Some function
function target_vvvvwcn_SomeFunc(target_vvvvwcn)
{
	// set the function logic
	if (target_vvvvwcn == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcp function
function vvvvwcp(how_vvvvwcp,target_vvvvwcp)
{
	if (isSet(how_vvvvwcp) && how_vvvvwcp.constructor !== Array)
	{
		var temp_vvvvwcp = how_vvvvwcp;
		var how_vvvvwcp = [];
		how_vvvvwcp.push(temp_vvvvwcp);
	}
	else if (!isSet(how_vvvvwcp))
	{
		var how_vvvvwcp = [];
	}
	var how = how_vvvvwcp.some(how_vvvvwcp_SomeFunc);

	if (isSet(target_vvvvwcp) && target_vvvvwcp.constructor !== Array)
	{
		var temp_vvvvwcp = target_vvvvwcp;
		var target_vvvvwcp = [];
		target_vvvvwcp.push(temp_vvvvwcp);
	}
	else if (!isSet(target_vvvvwcp))
	{
		var target_vvvvwcp = [];
	}
	var target = target_vvvvwcp.some(target_vvvvwcp_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('.note_no_behaviour_one').closest('.control-group').show();
		jQuery('.note_no_behaviour_three').closest('.control-group').show();
		jQuery('.note_no_behaviour_two').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_no_behaviour_one').closest('.control-group').hide();
		jQuery('.note_no_behaviour_three').closest('.control-group').hide();
		jQuery('.note_no_behaviour_two').closest('.control-group').hide();
	}
}

// the vvvvwcp Some function
function how_vvvvwcp_SomeFunc(how_vvvvwcp)
{
	// set the function logic
	if (how_vvvvwcp == 0)
	{
		return true;
	}
	return false;
}

// the vvvvwcp Some function
function target_vvvvwcp_SomeFunc(target_vvvvwcp)
{
	// set the function logic
	if (target_vvvvwcp == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcq function
function vvvvwcq(target_vvvvwcq,how_vvvvwcq)
{
	if (isSet(target_vvvvwcq) && target_vvvvwcq.constructor !== Array)
	{
		var temp_vvvvwcq = target_vvvvwcq;
		var target_vvvvwcq = [];
		target_vvvvwcq.push(temp_vvvvwcq);
	}
	else if (!isSet(target_vvvvwcq))
	{
		var target_vvvvwcq = [];
	}
	var target = target_vvvvwcq.some(target_vvvvwcq_SomeFunc);

	if (isSet(how_vvvvwcq) && how_vvvvwcq.constructor !== Array)
	{
		var temp_vvvvwcq = how_vvvvwcq;
		var how_vvvvwcq = [];
		how_vvvvwcq.push(temp_vvvvwcq);
	}
	else if (!isSet(how_vvvvwcq))
	{
		var how_vvvvwcq = [];
	}
	var how = how_vvvvwcq.some(how_vvvvwcq_SomeFunc);


	// set this function logic
	if (target && how)
	{
		jQuery('.note_no_behaviour_one').closest('.control-group').show();
		jQuery('.note_no_behaviour_three').closest('.control-group').show();
		jQuery('.note_no_behaviour_two').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_no_behaviour_one').closest('.control-group').hide();
		jQuery('.note_no_behaviour_three').closest('.control-group').hide();
		jQuery('.note_no_behaviour_two').closest('.control-group').hide();
	}
}

// the vvvvwcq Some function
function target_vvvvwcq_SomeFunc(target_vvvvwcq)
{
	// set the function logic
	if (target_vvvvwcq == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcq Some function
function how_vvvvwcq_SomeFunc(how_vvvvwcq)
{
	// set the function logic
	if (how_vvvvwcq == 0)
	{
		return true;
	}
	return false;
}

// the vvvvwcr function
function vvvvwcr(how_vvvvwcr,target_vvvvwcr)
{
	if (isSet(how_vvvvwcr) && how_vvvvwcr.constructor !== Array)
	{
		var temp_vvvvwcr = how_vvvvwcr;
		var how_vvvvwcr = [];
		how_vvvvwcr.push(temp_vvvvwcr);
	}
	else if (!isSet(how_vvvvwcr))
	{
		var how_vvvvwcr = [];
	}
	var how = how_vvvvwcr.some(how_vvvvwcr_SomeFunc);

	if (isSet(target_vvvvwcr) && target_vvvvwcr.constructor !== Array)
	{
		var temp_vvvvwcr = target_vvvvwcr;
		var target_vvvvwcr = [];
		target_vvvvwcr.push(temp_vvvvwcr);
	}
	else if (!isSet(target_vvvvwcr))
	{
		var target_vvvvwcr = [];
	}
	var target = target_vvvvwcr.some(target_vvvvwcr_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('.note_yes_behaviour_one').closest('.control-group').show();
		jQuery('.note_yes_behaviour_two').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
		jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
	}
}

// the vvvvwcr Some function
function how_vvvvwcr_SomeFunc(how_vvvvwcr)
{
	// set the function logic
	if (how_vvvvwcr == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcr Some function
function target_vvvvwcr_SomeFunc(target_vvvvwcr)
{
	// set the function logic
	if (target_vvvvwcr == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcs function
function vvvvwcs(target_vvvvwcs,how_vvvvwcs)
{
	if (isSet(target_vvvvwcs) && target_vvvvwcs.constructor !== Array)
	{
		var temp_vvvvwcs = target_vvvvwcs;
		var target_vvvvwcs = [];
		target_vvvvwcs.push(temp_vvvvwcs);
	}
	else if (!isSet(target_vvvvwcs))
	{
		var target_vvvvwcs = [];
	}
	var target = target_vvvvwcs.some(target_vvvvwcs_SomeFunc);

	if (isSet(how_vvvvwcs) && how_vvvvwcs.constructor !== Array)
	{
		var temp_vvvvwcs = how_vvvvwcs;
		var how_vvvvwcs = [];
		how_vvvvwcs.push(temp_vvvvwcs);
	}
	else if (!isSet(how_vvvvwcs))
	{
		var how_vvvvwcs = [];
	}
	var how = how_vvvvwcs.some(how_vvvvwcs_SomeFunc);


	// set this function logic
	if (target && how)
	{
		jQuery('.note_yes_behaviour_one').closest('.control-group').show();
		jQuery('.note_yes_behaviour_two').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
		jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
	}
}

// the vvvvwcs Some function
function target_vvvvwcs_SomeFunc(target_vvvvwcs)
{
	// set the function logic
	if (target_vvvvwcs == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcs Some function
function how_vvvvwcs_SomeFunc(how_vvvvwcs)
{
	// set the function logic
	if (how_vvvvwcs == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwct function
function vvvvwct(how_vvvvwct,target_vvvvwct)
{
	if (isSet(how_vvvvwct) && how_vvvvwct.constructor !== Array)
	{
		var temp_vvvvwct = how_vvvvwct;
		var how_vvvvwct = [];
		how_vvvvwct.push(temp_vvvvwct);
	}
	else if (!isSet(how_vvvvwct))
	{
		var how_vvvvwct = [];
	}
	var how = how_vvvvwct.some(how_vvvvwct_SomeFunc);

	if (isSet(target_vvvvwct) && target_vvvvwct.constructor !== Array)
	{
		var temp_vvvvwct = target_vvvvwct;
		var target_vvvvwct = [];
		target_vvvvwct.push(temp_vvvvwct);
	}
	else if (!isSet(target_vvvvwct))
	{
		var target_vvvvwct = [];
	}
	var target = target_vvvvwct.some(target_vvvvwct_SomeFunc);


	// set this function logic
	if (how && target)
	{
		jQuery('.note_build_in_behaviour_one').closest('.control-group').show();
		jQuery('.note_build_in_behaviour_three').closest('.control-group').show();
		jQuery('.note_build_in_behaviour_two').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_build_in_behaviour_one').closest('.control-group').hide();
		jQuery('.note_build_in_behaviour_three').closest('.control-group').hide();
		jQuery('.note_build_in_behaviour_two').closest('.control-group').hide();
	}
}

// the vvvvwct Some function
function how_vvvvwct_SomeFunc(how_vvvvwct)
{
	// set the function logic
	if (how_vvvvwct == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwct Some function
function target_vvvvwct_SomeFunc(target_vvvvwct)
{
	// set the function logic
	if (target_vvvvwct == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcu function
function vvvvwcu(target_vvvvwcu,how_vvvvwcu)
{
	if (isSet(target_vvvvwcu) && target_vvvvwcu.constructor !== Array)
	{
		var temp_vvvvwcu = target_vvvvwcu;
		var target_vvvvwcu = [];
		target_vvvvwcu.push(temp_vvvvwcu);
	}
	else if (!isSet(target_vvvvwcu))
	{
		var target_vvvvwcu = [];
	}
	var target = target_vvvvwcu.some(target_vvvvwcu_SomeFunc);

	if (isSet(how_vvvvwcu) && how_vvvvwcu.constructor !== Array)
	{
		var temp_vvvvwcu = how_vvvvwcu;
		var how_vvvvwcu = [];
		how_vvvvwcu.push(temp_vvvvwcu);
	}
	else if (!isSet(how_vvvvwcu))
	{
		var how_vvvvwcu = [];
	}
	var how = how_vvvvwcu.some(how_vvvvwcu_SomeFunc);


	// set this function logic
	if (target && how)
	{
		jQuery('.note_build_in_behaviour_one').closest('.control-group').show();
		jQuery('.note_build_in_behaviour_three').closest('.control-group').show();
		jQuery('.note_build_in_behaviour_two').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_build_in_behaviour_one').closest('.control-group').hide();
		jQuery('.note_build_in_behaviour_three').closest('.control-group').hide();
		jQuery('.note_build_in_behaviour_two').closest('.control-group').hide();
	}
}

// the vvvvwcu Some function
function target_vvvvwcu_SomeFunc(target_vvvvwcu)
{
	// set the function logic
	if (target_vvvvwcu == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwcu Some function
function how_vvvvwcu_SomeFunc(how_vvvvwcu)
{
	// set the function logic
	if (how_vvvvwcu == 4)
	{
		return true;
	}
	return false;
}

// the vvvvwcv function
function vvvvwcv(target_vvvvwcv,type_vvvvwcv)
{
	// set the function logic
	if (target_vvvvwcv == 1 && type_vvvvwcv == 2)
	{
		jQuery('#jform_libraries').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_libraries').closest('.control-group').hide();
	}
}

// the vvvvwcx function
function vvvvwcx(target_vvvvwcx)
{
	// set the function logic
	if (target_vvvvwcx == 1)
	{
		jQuery('#jform_how').closest('.control-group').show();
		// add required attribute to how field
		if (jform_vvvvwcxvxm_required)
		{
			updateFieldRequired('how',0);
			jQuery('#jform_how').prop('required','required');
			jQuery('#jform_how').attr('aria-required',true);
			jQuery('#jform_how').addClass('required');
			jform_vvvvwcxvxm_required = false;
		}
		jQuery('#jform_type').closest('.control-group').show();
		// add required attribute to type field
		if (jform_vvvvwcxvxn_required)
		{
			updateFieldRequired('type',0);
			jQuery('#jform_type').prop('required','required');
			jQuery('#jform_type').attr('aria-required',true);
			jQuery('#jform_type').addClass('required');
			jform_vvvvwcxvxn_required = false;
		}
	}
	else
	{
		jQuery('#jform_how').closest('.control-group').hide();
		// remove required attribute from how field
		if (!jform_vvvvwcxvxm_required)
		{
			updateFieldRequired('how',1);
			jQuery('#jform_how').removeAttr('required');
			jQuery('#jform_how').removeAttr('aria-required');
			jQuery('#jform_how').removeClass('required');
			jform_vvvvwcxvxm_required = true;
		}
		jQuery('#jform_type').closest('.control-group').hide();
		// remove required attribute from type field
		if (!jform_vvvvwcxvxn_required)
		{
			updateFieldRequired('type',1);
			jQuery('#jform_type').removeAttr('required');
			jQuery('#jform_type').removeAttr('aria-required');
			jQuery('#jform_type').removeClass('required');
			jform_vvvvwcxvxn_required = true;
		}
	}
}

// the vvvvwcy function
function vvvvwcy(target_vvvvwcy)
{
	// set the function logic
	if (target_vvvvwcy == 2)
	{
		jQuery('.note_yes_behaviour_library').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_yes_behaviour_library').closest('.control-group').hide();
	}
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// get the linked details
	getLinked();
	// now load the displays
	getAjaxDisplay('library_config');
	getAjaxDisplay('library_files_folders_urls');

	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
});

function addData(result,where){
	jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}

function getAjaxDisplay(type){
	getCodeFrom_server(1, type, 'type',
'getAjaxDisplay').done(function(result) {
		if (result) {
			jQuery('#display_'+type).html(result);
		}
		// set button
		addButtonID(type,'header_'+type+'_buttons', 2); //
<-- little edit button
	});
}

function getFieldSelectOptions(fieldKey){
	// first check if the field is set
	if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field").length)
{
		var fieldId =
jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field
option:selected").val();
		getCodeFrom_server(fieldId, 'type', 'type',
'fieldSelectOptions').done(function(result) {
			if(result) {
				jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(result);
			} else {
				jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val('');
			}
		});
	}
}

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function addButtonID_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0 && size >
0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButtonID(type, where, size){
	addButtonID_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	});
}

function addButton_server(type, size){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && type.length > 0){
		var request =
token+'=1&type='+type+'&size='+size;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
function addButton(type, where, size){
	// just to insure that default behaviour still works
	size = typeof size !== 'undefined' ? size : 1;
	addButton_server(type, size).done(function(result) {
		if(result){
			if (2 == size) {
				jQuery('#'+where).html(result);
			} else {
				addData(result, '#jform_'+where);
			}
		}
	})
}

function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
} 
PK��[t:	��library_config.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��library_files_folders_urls.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[U��;L;L	marked.jsnu�[���/**
 * marked - a markdown parser
 * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
 * https://github.com/chjj/marked
 */
(function(){var block={newline:/^\n+/,code:/^(
{4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^
*(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n
*(=|-){2,} *(?:\n+|$)/,blockquote:/^(
*>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull)
[\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment
*(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^
*\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])?
*(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^(
*)(bull) [^\n]*(?:\n(?!\1bull
)[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_]
*){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^
*(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1
*(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#*
*(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^
*(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^
*\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function
Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var
lexer=new Lexer(options);return
lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g,"
   ").replace(/\u00a0/g,"
").replace(/\u2424/g,"\n");return
this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var
src=src.replace(/^
+$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^
{4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^
*| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\|
*$/g,"").split(/ *\|
*/),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^
*-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^
*:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^
*:-+
*$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/
*\|
*/)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^
*>
?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^
*([*+-]|\d+\.) +/,"");if(~item.indexOf("\n
")){space-=item.length;item=!this.options.pedantic?item.replace(new
RegExp("^
{1,"+space+"}","gm"),""):item.replace(/^
{1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^
*| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\|
*$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\|
*)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^
*-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^
*:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^
*:-+
*$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^
*\| *| *\| *$/g,"").split(/ *\|
*/)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw
new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return
this.tokens};var
inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^
>]+(@|:\/)[^
>]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^
{2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]|
{2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function
InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new
Renderer;this.renderer.options=this.options;if(!this.links){throw new
Error("Tokens array requires a `links`
property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else
if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var
inline=new InlineLexer(links,options);return
inline.output(src)};InlineLexer.prototype.output=function(src){var
out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a
/i.test(cap[0])){this.inLink=true}else
if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g,"
");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw
new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return
out};InlineLexer.prototype.outputLink=function(cap,link){var
href=escape(link.href),title=link.title?escape(link.title):null;return
cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return
text;return
text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return
text;var
out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return
out};function
Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var
out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code
class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return
html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+'
id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return
this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var
type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var
type=flags.header?"th":"td";var
tag=flags.align?"<"+type+'
style="text-align:'+flags.align+'">':"<"+type+">";return
tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return
this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var
prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var
out='<a
href="'+href+'"';if(title){out+='
title="'+title+'"'}out+=">"+text+"</a>";return
out};Renderer.prototype.image=function(href,title,text){var
out='<img src="'+href+'"
alt="'+text+'"';if(title){out+='
title="'+title+'"'}out+=this.options.xhtml?"/>":">";return
out};Renderer.prototype.text=function(text){return text};function
Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new
Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var
parser=new Parser(options,renderer);return
parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new
InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var
out="";while(this.next()){out+=this.tok()}return
out};Parser.prototype.next=function(){return
this.token=this.tokens.pop()};Parser.prototype.peek=function(){return
this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var
body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return
this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return
this.renderer.hr()}case"heading":{return
this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return
this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var
header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return
this.renderer.table(header,body)}case"blockquote_start":{var
body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return
this.renderer.blockquote(body)}case"list_start":{var
body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return
this.renderer.list(body,ordered)}case"list_item_start":{var
body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return
this.renderer.listitem(body)}case"loose_item_start":{var
body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return
this.renderer.listitem(body)}case"html":{var
html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return
this.renderer.html(html)}case"paragraph":{return
this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return
this.renderer.paragraph(this.parseText())}}};function
escape(html,encode){return
html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function
unescape(html){return
html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return
n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function
replace(regex,opt){regex=regex.source;opt=opt||"";return function
self(name,val){if(!name)return new
RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return
self}}function noop(){}noop.exec=noop;function merge(obj){var
i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key
in
target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return
obj}function marked(src,opt,callback){if(callback||typeof
opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var
highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return
callback(e)}pending=tokens.length;var
done=function(err){if(err){opt.highlight=highlight;return callback(err)}var
out;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return
err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return
done()}delete opt.highlight;if(!pending)return
done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return
highlight(token.text,token.lang,function(err,code){if(err)return
done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return
Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease
report this to
https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An
error
occured:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw
e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return
marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new
Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof
module!=="undefined"&&typeof
exports==="object"){module.exports=marked}else if(typeof
define==="function"&&define.amd){define(function(){return
marked})}else{this.marked=marked}}).call(function(){return this||(typeof
window!=="undefined"?window:global)}());

PK��[JMs��placeholder.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




jQuery(document).ready(function()
{
	jQuery('#placedin').show();
	var placeholderName = jQuery('#jform_target').val();
	// check if this function name is taken
	checkPlaceholderName(placeholderName);
});
function setPlaceholderName(){
	// noting for now (we may add more functionality later)
}

function checkPlaceholderName(placeholderName) {
	if (placeholderName.length > 2) {
		var ide = jQuery('#jform_id').val();
		if (ide == 0) {
			ide = -1;
		}
		checkPlaceholderName_server(placeholderName, ide).done(function(result)
{
			if(result.name && result.message){
				// show notice that placeholderName is okay
				jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
				jQuery('#jform_target').val(result.name);
				// now start search for where the function is used
				placedin(result.name, ide);
			} else if(result.message){
				// show notice that placeholderName is not okay
				jQuery.UIkit.notify({message: result.message, timeout: 5000, status:
result.status, pos: 'top-right'});
				jQuery('#jform_target').val('');
			} else {
				// set an error that message was not send
				jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_PLACEHOLDER_ALREADY_TAKEN_PLEASE_TRY_AGAIN'),
timeout: 5000, status: 'danger', pos: 'top-right'});
				jQuery('#jform_target').val('');
			}
			// set custom code placeholder
			setPlaceholderName();
		});
	} else {
		// set an error that message was not send
		jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_PLACEHOLDER'),
timeout: 5000, status: 'danger', pos: 'top-right'});
		jQuery('#jform_target').val('');
		// set custom code placeholder
		setPlaceholderName();
	}
}
// check Placeholder
function checkPlaceholderName_server(placeholderName, ide){
	var getUrl =
"index.php?option=com_componentbuilder&task=ajax.checkPlaceholderName&raw=true&format=json";
	if(token.length > 0){
		var request =
'token='+token+'&placeholderName='+placeholderName+'&id='+ide;
	}
	return jQuery.ajax({
		type: 'POST',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


// check where this Function is used
function placedin(placeholder, ide) {
	var found = false;
	jQuery('#before-placedin').hide();
	jQuery('#note-placedin-not').hide();
	jQuery('#note-placedin-found').hide();
	jQuery('#loading-placedin').show();
	var targets =
['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u'];
// if you update this, also update (below 20) &
[customcode-codeUsedInHtmlNote]!
	var targetNumber = 20;
	var run = 0;
	var placedinChecker = setInterval(function(){ 
		var target = targets[run];
		placedin_server(placeholder, ide, target).done(function(used) {
			if (used.in) {
				jQuery('#placedin-'+used.id).show();
				jQuery('#area-'+used.id).html(used.in);
				jQuery.UIkit.notify({message: used.in, timeout: 5000, status:
'success', pos: 'top-right'});
				found = true;
			} else {
				jQuery('#placedin-'+target).hide();
			}
			if (run == targetNumber) {
				jQuery('#loading-placedin').hide();
				if (found) {
					jQuery('#note-placedin-found').show();
				} else {
					jQuery('#note-placedin-not').show();
				}
			}
		});
		if (run == targetNumber) {
			clearInterval(placedinChecker);
		}
		run++;
	}, 800);
}
function placedin_server(placeholder, ide, target){
	var getUrl =
"index.php?option=com_componentbuilder&task=ajax.placedin&format=json";
	if(token.length > 0){
		var request =
token+'=1&placeholder='+placeholder+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}
 
PK��[}�4�~A~A	server.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Some Global Values
jform_vvvvwdyvyd_required = false;
jform_vvvvwdyvye_required = false;
jform_vvvvwdyvyf_required = false;
jform_vvvvwdyvyg_required = false;
jform_vvvvwdyvyh_required = false;
jform_vvvvwdzvyi_required = false;
jform_vvvvweavyj_required = false;
jform_vvvvwecvyk_required = false;
jform_vvvvweevyl_required = false;

// Initial Script
jQuery(document).ready(function()
{
	var protocol_vvvvwdy = jQuery("#jform_protocol").val();
	vvvvwdy(protocol_vvvvwdy);

	var protocol_vvvvwdz = jQuery("#jform_protocol").val();
	vvvvwdz(protocol_vvvvwdz);

	var protocol_vvvvwea = jQuery("#jform_protocol").val();
	var authentication_vvvvwea =
jQuery("#jform_authentication").val();
	vvvvwea(protocol_vvvvwea,authentication_vvvvwea);

	var protocol_vvvvwec = jQuery("#jform_protocol").val();
	var authentication_vvvvwec =
jQuery("#jform_authentication").val();
	vvvvwec(protocol_vvvvwec,authentication_vvvvwec);

	var protocol_vvvvwee = jQuery("#jform_protocol").val();
	var authentication_vvvvwee =
jQuery("#jform_authentication").val();
	vvvvwee(protocol_vvvvwee,authentication_vvvvwee);

	var protocol_vvvvweg = jQuery("#jform_protocol").val();
	var authentication_vvvvweg =
jQuery("#jform_authentication").val();
	vvvvweg(protocol_vvvvweg,authentication_vvvvweg);
});

// the vvvvwdy function
function vvvvwdy(protocol_vvvvwdy)
{
	if (isSet(protocol_vvvvwdy) && protocol_vvvvwdy.constructor !==
Array)
	{
		var temp_vvvvwdy = protocol_vvvvwdy;
		var protocol_vvvvwdy = [];
		protocol_vvvvwdy.push(temp_vvvvwdy);
	}
	else if (!isSet(protocol_vvvvwdy))
	{
		var protocol_vvvvwdy = [];
	}
	var protocol = protocol_vvvvwdy.some(protocol_vvvvwdy_SomeFunc);


	// set this function logic
	if (protocol)
	{
		jQuery('#jform_authentication').closest('.control-group').show();
		// add required attribute to authentication field
		if (jform_vvvvwdyvyd_required)
		{
			updateFieldRequired('authentication',0);
			jQuery('#jform_authentication').prop('required','required');
			jQuery('#jform_authentication').attr('aria-required',true);
			jQuery('#jform_authentication').addClass('required');
			jform_vvvvwdyvyd_required = false;
		}
		jQuery('#jform_host').closest('.control-group').show();
		// add required attribute to host field
		if (jform_vvvvwdyvye_required)
		{
			updateFieldRequired('host',0);
			jQuery('#jform_host').prop('required','required');
			jQuery('#jform_host').attr('aria-required',true);
			jQuery('#jform_host').addClass('required');
			jform_vvvvwdyvye_required = false;
		}
		jQuery('#jform_port').closest('.control-group').show();
		// add required attribute to port field
		if (jform_vvvvwdyvyf_required)
		{
			updateFieldRequired('port',0);
			jQuery('#jform_port').prop('required','required');
			jQuery('#jform_port').attr('aria-required',true);
			jQuery('#jform_port').addClass('required');
			jform_vvvvwdyvyf_required = false;
		}
		jQuery('#jform_path').closest('.control-group').show();
		// add required attribute to path field
		if (jform_vvvvwdyvyg_required)
		{
			updateFieldRequired('path',0);
			jQuery('#jform_path').prop('required','required');
			jQuery('#jform_path').attr('aria-required',true);
			jQuery('#jform_path').addClass('required');
			jform_vvvvwdyvyg_required = false;
		}
		jQuery('.note_ssh_security').closest('.control-group').show();
		jQuery('#jform_username').closest('.control-group').show();
		// add required attribute to username field
		if (jform_vvvvwdyvyh_required)
		{
			updateFieldRequired('username',0);
			jQuery('#jform_username').prop('required','required');
			jQuery('#jform_username').attr('aria-required',true);
			jQuery('#jform_username').addClass('required');
			jform_vvvvwdyvyh_required = false;
		}
	}
	else
	{
		jQuery('#jform_authentication').closest('.control-group').hide();
		// remove required attribute from authentication field
		if (!jform_vvvvwdyvyd_required)
		{
			updateFieldRequired('authentication',1);
			jQuery('#jform_authentication').removeAttr('required');
			jQuery('#jform_authentication').removeAttr('aria-required');
			jQuery('#jform_authentication').removeClass('required');
			jform_vvvvwdyvyd_required = true;
		}
		jQuery('#jform_host').closest('.control-group').hide();
		// remove required attribute from host field
		if (!jform_vvvvwdyvye_required)
		{
			updateFieldRequired('host',1);
			jQuery('#jform_host').removeAttr('required');
			jQuery('#jform_host').removeAttr('aria-required');
			jQuery('#jform_host').removeClass('required');
			jform_vvvvwdyvye_required = true;
		}
		jQuery('#jform_port').closest('.control-group').hide();
		// remove required attribute from port field
		if (!jform_vvvvwdyvyf_required)
		{
			updateFieldRequired('port',1);
			jQuery('#jform_port').removeAttr('required');
			jQuery('#jform_port').removeAttr('aria-required');
			jQuery('#jform_port').removeClass('required');
			jform_vvvvwdyvyf_required = true;
		}
		jQuery('#jform_path').closest('.control-group').hide();
		// remove required attribute from path field
		if (!jform_vvvvwdyvyg_required)
		{
			updateFieldRequired('path',1);
			jQuery('#jform_path').removeAttr('required');
			jQuery('#jform_path').removeAttr('aria-required');
			jQuery('#jform_path').removeClass('required');
			jform_vvvvwdyvyg_required = true;
		}
		jQuery('.note_ssh_security').closest('.control-group').hide();
		jQuery('#jform_username').closest('.control-group').hide();
		// remove required attribute from username field
		if (!jform_vvvvwdyvyh_required)
		{
			updateFieldRequired('username',1);
			jQuery('#jform_username').removeAttr('required');
			jQuery('#jform_username').removeAttr('aria-required');
			jQuery('#jform_username').removeClass('required');
			jform_vvvvwdyvyh_required = true;
		}
	}
}

// the vvvvwdy Some function
function protocol_vvvvwdy_SomeFunc(protocol_vvvvwdy)
{
	// set the function logic
	if (protocol_vvvvwdy == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwdz function
function vvvvwdz(protocol_vvvvwdz)
{
	if (isSet(protocol_vvvvwdz) && protocol_vvvvwdz.constructor !==
Array)
	{
		var temp_vvvvwdz = protocol_vvvvwdz;
		var protocol_vvvvwdz = [];
		protocol_vvvvwdz.push(temp_vvvvwdz);
	}
	else if (!isSet(protocol_vvvvwdz))
	{
		var protocol_vvvvwdz = [];
	}
	var protocol = protocol_vvvvwdz.some(protocol_vvvvwdz_SomeFunc);


	// set this function logic
	if (protocol)
	{
		jQuery('.note_ftp_signature').closest('.control-group').show();
		jQuery('#jform_signature').closest('.control-group').show();
		// add required attribute to signature field
		if (jform_vvvvwdzvyi_required)
		{
			updateFieldRequired('signature',0);
			jQuery('#jform_signature').prop('required','required');
			jQuery('#jform_signature').attr('aria-required',true);
			jQuery('#jform_signature').addClass('required');
			jform_vvvvwdzvyi_required = false;
		}
	}
	else
	{
		jQuery('.note_ftp_signature').closest('.control-group').hide();
		jQuery('#jform_signature').closest('.control-group').hide();
		// remove required attribute from signature field
		if (!jform_vvvvwdzvyi_required)
		{
			updateFieldRequired('signature',1);
			jQuery('#jform_signature').removeAttr('required');
			jQuery('#jform_signature').removeAttr('aria-required');
			jQuery('#jform_signature').removeClass('required');
			jform_vvvvwdzvyi_required = true;
		}
	}
}

// the vvvvwdz Some function
function protocol_vvvvwdz_SomeFunc(protocol_vvvvwdz)
{
	// set the function logic
	if (protocol_vvvvwdz == 1)
	{
		return true;
	}
	return false;
}

// the vvvvwea function
function vvvvwea(protocol_vvvvwea,authentication_vvvvwea)
{
	if (isSet(protocol_vvvvwea) && protocol_vvvvwea.constructor !==
Array)
	{
		var temp_vvvvwea = protocol_vvvvwea;
		var protocol_vvvvwea = [];
		protocol_vvvvwea.push(temp_vvvvwea);
	}
	else if (!isSet(protocol_vvvvwea))
	{
		var protocol_vvvvwea = [];
	}
	var protocol = protocol_vvvvwea.some(protocol_vvvvwea_SomeFunc);

	if (isSet(authentication_vvvvwea) &&
authentication_vvvvwea.constructor !== Array)
	{
		var temp_vvvvwea = authentication_vvvvwea;
		var authentication_vvvvwea = [];
		authentication_vvvvwea.push(temp_vvvvwea);
	}
	else if (!isSet(authentication_vvvvwea))
	{
		var authentication_vvvvwea = [];
	}
	var authentication =
authentication_vvvvwea.some(authentication_vvvvwea_SomeFunc);


	// set this function logic
	if (protocol && authentication)
	{
		jQuery('#jform_password').closest('.control-group').show();
		// add required attribute to password field
		if (jform_vvvvweavyj_required)
		{
			updateFieldRequired('password',0);
			jQuery('#jform_password').prop('required','required');
			jQuery('#jform_password').attr('aria-required',true);
			jQuery('#jform_password').addClass('required');
			jform_vvvvweavyj_required = false;
		}
	}
	else
	{
		jQuery('#jform_password').closest('.control-group').hide();
		// remove required attribute from password field
		if (!jform_vvvvweavyj_required)
		{
			updateFieldRequired('password',1);
			jQuery('#jform_password').removeAttr('required');
			jQuery('#jform_password').removeAttr('aria-required');
			jQuery('#jform_password').removeClass('required');
			jform_vvvvweavyj_required = true;
		}
	}
}

// the vvvvwea Some function
function protocol_vvvvwea_SomeFunc(protocol_vvvvwea)
{
	// set the function logic
	if (protocol_vvvvwea == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwea Some function
function authentication_vvvvwea_SomeFunc(authentication_vvvvwea)
{
	// set the function logic
	if (authentication_vvvvwea == 1 || authentication_vvvvwea == 3 ||
authentication_vvvvwea == 5)
	{
		return true;
	}
	return false;
}

// the vvvvwec function
function vvvvwec(protocol_vvvvwec,authentication_vvvvwec)
{
	if (isSet(protocol_vvvvwec) && protocol_vvvvwec.constructor !==
Array)
	{
		var temp_vvvvwec = protocol_vvvvwec;
		var protocol_vvvvwec = [];
		protocol_vvvvwec.push(temp_vvvvwec);
	}
	else if (!isSet(protocol_vvvvwec))
	{
		var protocol_vvvvwec = [];
	}
	var protocol = protocol_vvvvwec.some(protocol_vvvvwec_SomeFunc);

	if (isSet(authentication_vvvvwec) &&
authentication_vvvvwec.constructor !== Array)
	{
		var temp_vvvvwec = authentication_vvvvwec;
		var authentication_vvvvwec = [];
		authentication_vvvvwec.push(temp_vvvvwec);
	}
	else if (!isSet(authentication_vvvvwec))
	{
		var authentication_vvvvwec = [];
	}
	var authentication =
authentication_vvvvwec.some(authentication_vvvvwec_SomeFunc);


	// set this function logic
	if (protocol && authentication)
	{
		jQuery('#jform_private').closest('.control-group').show();
		// add required attribute to private field
		if (jform_vvvvwecvyk_required)
		{
			updateFieldRequired('private',0);
			jQuery('#jform_private').prop('required','required');
			jQuery('#jform_private').attr('aria-required',true);
			jQuery('#jform_private').addClass('required');
			jform_vvvvwecvyk_required = false;
		}
	}
	else
	{
		jQuery('#jform_private').closest('.control-group').hide();
		// remove required attribute from private field
		if (!jform_vvvvwecvyk_required)
		{
			updateFieldRequired('private',1);
			jQuery('#jform_private').removeAttr('required');
			jQuery('#jform_private').removeAttr('aria-required');
			jQuery('#jform_private').removeClass('required');
			jform_vvvvwecvyk_required = true;
		}
	}
}

// the vvvvwec Some function
function protocol_vvvvwec_SomeFunc(protocol_vvvvwec)
{
	// set the function logic
	if (protocol_vvvvwec == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwec Some function
function authentication_vvvvwec_SomeFunc(authentication_vvvvwec)
{
	// set the function logic
	if (authentication_vvvvwec == 2 || authentication_vvvvwec == 3)
	{
		return true;
	}
	return false;
}

// the vvvvwee function
function vvvvwee(protocol_vvvvwee,authentication_vvvvwee)
{
	if (isSet(protocol_vvvvwee) && protocol_vvvvwee.constructor !==
Array)
	{
		var temp_vvvvwee = protocol_vvvvwee;
		var protocol_vvvvwee = [];
		protocol_vvvvwee.push(temp_vvvvwee);
	}
	else if (!isSet(protocol_vvvvwee))
	{
		var protocol_vvvvwee = [];
	}
	var protocol = protocol_vvvvwee.some(protocol_vvvvwee_SomeFunc);

	if (isSet(authentication_vvvvwee) &&
authentication_vvvvwee.constructor !== Array)
	{
		var temp_vvvvwee = authentication_vvvvwee;
		var authentication_vvvvwee = [];
		authentication_vvvvwee.push(temp_vvvvwee);
	}
	else if (!isSet(authentication_vvvvwee))
	{
		var authentication_vvvvwee = [];
	}
	var authentication =
authentication_vvvvwee.some(authentication_vvvvwee_SomeFunc);


	// set this function logic
	if (protocol && authentication)
	{
		jQuery('#jform_private_key').closest('.control-group').show();
		// add required attribute to private_key field
		if (jform_vvvvweevyl_required)
		{
			updateFieldRequired('private_key',0);
			jQuery('#jform_private_key').prop('required','required');
			jQuery('#jform_private_key').attr('aria-required',true);
			jQuery('#jform_private_key').addClass('required');
			jform_vvvvweevyl_required = false;
		}
	}
	else
	{
		jQuery('#jform_private_key').closest('.control-group').hide();
		// remove required attribute from private_key field
		if (!jform_vvvvweevyl_required)
		{
			updateFieldRequired('private_key',1);
			jQuery('#jform_private_key').removeAttr('required');
			jQuery('#jform_private_key').removeAttr('aria-required');
			jQuery('#jform_private_key').removeClass('required');
			jform_vvvvweevyl_required = true;
		}
	}
}

// the vvvvwee Some function
function protocol_vvvvwee_SomeFunc(protocol_vvvvwee)
{
	// set the function logic
	if (protocol_vvvvwee == 2)
	{
		return true;
	}
	return false;
}

// the vvvvwee Some function
function authentication_vvvvwee_SomeFunc(authentication_vvvvwee)
{
	// set the function logic
	if (authentication_vvvvwee == 4 || authentication_vvvvwee == 5)
	{
		return true;
	}
	return false;
}

// the vvvvweg function
function vvvvweg(protocol_vvvvweg,authentication_vvvvweg)
{
	if (isSet(protocol_vvvvweg) && protocol_vvvvweg.constructor !==
Array)
	{
		var temp_vvvvweg = protocol_vvvvweg;
		var protocol_vvvvweg = [];
		protocol_vvvvweg.push(temp_vvvvweg);
	}
	else if (!isSet(protocol_vvvvweg))
	{
		var protocol_vvvvweg = [];
	}
	var protocol = protocol_vvvvweg.some(protocol_vvvvweg_SomeFunc);

	if (isSet(authentication_vvvvweg) &&
authentication_vvvvweg.constructor !== Array)
	{
		var temp_vvvvweg = authentication_vvvvweg;
		var authentication_vvvvweg = [];
		authentication_vvvvweg.push(temp_vvvvweg);
	}
	else if (!isSet(authentication_vvvvweg))
	{
		var authentication_vvvvweg = [];
	}
	var authentication =
authentication_vvvvweg.some(authentication_vvvvweg_SomeFunc);


	// set this function logic
	if (protocol && authentication)
	{
		jQuery('#jform_secret').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_secret').closest('.control-group').hide();
	}
}

// the vvvvweg Some function
function protocol_vvvvweg_SomeFunc(protocol_vvvvweg)
{
	// set the function logic
	if (protocol_vvvvweg == 2)
	{
		return true;
	}
	return false;
}

// the vvvvweg Some function
function authentication_vvvvweg_SomeFunc(authentication_vvvvweg)
{
	// set the function logic
	if (authentication_vvvvweg == 2 || authentication_vvvvweg == 3 ||
authentication_vvvvweg == 4 || authentication_vvvvweg == 5)
	{
		return true;
	}
	return false;
}

// update fields required
function updateFieldRequired(name, status) {
	// check if not_required exist
	if (jQuery('#jform_not_required').length > 0) {
		var not_required =
jQuery('#jform_not_required').val().split(",");

		if(status == 1)
		{
			not_required.push(name);
		}
		else
		{
			not_required = removeFieldFromNotRequired(not_required, name);
		}

		jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
	}
}

// remove field from not_required
function removeFieldFromNotRequired(array, what) {
	return array.filter(function(element){
		return element !== what;
	});
}

// fix not required array
function fixNotRequiredArray(array) {
	var seen = {};
	return removeEmptyFromNotRequiredArray(array).filter(function(item) {
		return seen.hasOwnProperty(item) ? false : (seen[item] = true);
	});
}

// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
	return array.filter(function (el) {
		// remove ( 一_一) as well - lol
		return (el.length > 0 && '一_一' !== el);
	});
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
} 
PK��[��5W�2�2site_view.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Initial Script
jQuery(document).ready(function()
{
	var add_php_view_vvvvwan = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
	vvvvwan(add_php_view_vvvvwan);

	var add_php_jview_display_vvvvwao =
jQuery("#jform_add_php_jview_display
input[type='radio']:checked").val();
	vvvvwao(add_php_jview_display_vvvvwao);

	var add_php_jview_vvvvwap = jQuery("#jform_add_php_jview
input[type='radio']:checked").val();
	vvvvwap(add_php_jview_vvvvwap);

	var add_php_document_vvvvwaq = jQuery("#jform_add_php_document
input[type='radio']:checked").val();
	vvvvwaq(add_php_document_vvvvwaq);

	var add_css_document_vvvvwar = jQuery("#jform_add_css_document
input[type='radio']:checked").val();
	vvvvwar(add_css_document_vvvvwar);

	var add_javascript_file_vvvvwas = jQuery("#jform_add_javascript_file
input[type='radio']:checked").val();
	vvvvwas(add_javascript_file_vvvvwas);

	var add_js_document_vvvvwat = jQuery("#jform_add_js_document
input[type='radio']:checked").val();
	vvvvwat(add_js_document_vvvvwat);

	var add_css_vvvvwau = jQuery("#jform_add_css
input[type='radio']:checked").val();
	vvvvwau(add_css_vvvvwau);

	var add_php_ajax_vvvvwav = jQuery("#jform_add_php_ajax
input[type='radio']:checked").val();
	vvvvwav(add_php_ajax_vvvvwav);

	var add_custom_button_vvvvwaw = jQuery("#jform_add_custom_button
input[type='radio']:checked").val();
	vvvvwaw(add_custom_button_vvvvwaw);

	var button_position_vvvvwax =
jQuery("#jform_button_position").val();
	vvvvwax(button_position_vvvvwax);
});

// the vvvvwan function
function vvvvwan(add_php_view_vvvvwan)
{
	// set the function logic
	if (add_php_view_vvvvwan == 1)
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
	}
}

// the vvvvwao function
function vvvvwao(add_php_jview_display_vvvvwao)
{
	// set the function logic
	if (add_php_jview_display_vvvvwao == 1)
	{
		jQuery('#jform_php_jview_display-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_jview_display-lbl').closest('.control-group').hide();
	}
}

// the vvvvwap function
function vvvvwap(add_php_jview_vvvvwap)
{
	// set the function logic
	if (add_php_jview_vvvvwap == 1)
	{
		jQuery('#jform_php_jview-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_jview-lbl').closest('.control-group').hide();
	}
}

// the vvvvwaq function
function vvvvwaq(add_php_document_vvvvwaq)
{
	// set the function logic
	if (add_php_document_vvvvwaq == 1)
	{
		jQuery('#jform_php_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvwar function
function vvvvwar(add_css_document_vvvvwar)
{
	// set the function logic
	if (add_css_document_vvvvwar == 1)
	{
		jQuery('#jform_css_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvwas function
function vvvvwas(add_javascript_file_vvvvwas)
{
	// set the function logic
	if (add_javascript_file_vvvvwas == 1)
	{
		jQuery('#jform_javascript_file-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_javascript_file-lbl').closest('.control-group').hide();
	}
}

// the vvvvwat function
function vvvvwat(add_js_document_vvvvwat)
{
	// set the function logic
	if (add_js_document_vvvvwat == 1)
	{
		jQuery('#jform_js_document-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_js_document-lbl').closest('.control-group').hide();
	}
}

// the vvvvwau function
function vvvvwau(add_css_vvvvwau)
{
	// set the function logic
	if (add_css_vvvvwau == 1)
	{
		jQuery('#jform_css-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_css-lbl').closest('.control-group').hide();
	}
}

// the vvvvwav function
function vvvvwav(add_php_ajax_vvvvwav)
{
	// set the function logic
	if (add_php_ajax_vvvvwav == 1)
	{
		jQuery('#jform_ajax_input-lbl').closest('.control-group').show();
		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_ajax_input-lbl').closest('.control-group').hide();
		jQuery('#jform_php_ajaxmethod-lbl').closest('.control-group').hide();
	}
}

// the vvvvwaw function
function vvvvwaw(add_custom_button_vvvvwaw)
{
	// set the function logic
	if (add_custom_button_vvvvwaw == 1)
	{
		jQuery('#jform_custom_button-lbl').closest('.control-group').show();
		jQuery('#jform_php_controller-lbl').closest('.control-group').show();
		jQuery('#jform_php_model-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_custom_button-lbl').closest('.control-group').hide();
		jQuery('#jform_php_controller-lbl').closest('.control-group').hide();
		jQuery('#jform_php_model-lbl').closest('.control-group').hide();
	}
}

// the vvvvwax function
function vvvvwax(button_position_vvvvwax)
{
	if (isSet(button_position_vvvvwax) &&
button_position_vvvvwax.constructor !== Array)
	{
		var temp_vvvvwax = button_position_vvvvwax;
		var button_position_vvvvwax = [];
		button_position_vvvvwax.push(temp_vvvvwax);
	}
	else if (!isSet(button_position_vvvvwax))
	{
		var button_position_vvvvwax = [];
	}
	var button_position =
button_position_vvvvwax.some(button_position_vvvvwax_SomeFunc);


	// set this function logic
	if (button_position)
	{
		jQuery('.note_custom_toolbar_placeholder').closest('.control-group').show();
	}
	else
	{
		jQuery('.note_custom_toolbar_placeholder').closest('.control-group').hide();
	}
}

// the vvvvwax Some function
function button_position_vvvvwax_SomeFunc(button_position_vvvvwax)
{
	// set the function logic
	if (button_position_vvvvwax == 5)
	{
		return true;
	}
	return false;
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function()
{
	// get the linked details
	getLinked();
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getLinked(){
	getCodeFrom_server(1, 'type', 'type',
'getLinked').done(function(result) {
		if(result){
			jQuery('#display_linked_to').html(result);
		}
	});
}

function getSnippetDetails(id){
	getCodeFrom_server(id, '_type', '_type',
'snippetDetails').done(function(result) {
		if(result.snippet){
			var description = '';
			if (result.description.length > 0) {
				description =
'<p>'+result.description+'</p>';
			}
			var library = '';
			if (result.library.length > 0) {
				library = '
<b>('+result.library+')</b>';
			}
			var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea  id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
			jQuery('#snippet-code').remove();
			jQuery('.snippet-code').append(code);
			// make sure the code block is active
			jQuery("#snippet").focus(function() {
				var jQuerythis = jQuery(this);
				jQuerythis.select();
			
				// Work around Chrome's little problem
				jQuerythis.mouseup(function() {
					// Prevent further mouseup intervention
					jQuerythis.unbind("mouseup");
					return false;
				});
			});
		}
		if(result.usage){
			var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
			jQuery('#snippet-usage').remove();
			jQuery('.snippet-usage').append(usage);
		}
	})
}

function getDynamicValues_server(dynamicId){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
	if(token.length > 0 && dynamicId > 0){
		var request = token+'=1&view=site_view&id='+dynamicId;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getDynamicValues(id){
	getDynamicValues_server(id).done(function(result) {
		if(result){
			jQuery('#dynamic_values').remove();
			jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getLayoutDetails_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request = token+'=1&id='+id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getLayoutDetails(id){
	getLayoutDetails_server(id).done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getTemplateDetails(id){
	getCodeFrom_server(id, 'type', 'type',
'templateDetails').done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
	jQuery("#jform_snippet option").each(function()
	{
		var key =  jQuery(this).val();
		var text =  jQuery(this).text();
		snippets[key] = text;
		snippetIds.push(key);
	});
	snippet = jQuery("#jform_snippet").val();
	getSnippets();
});

function getSnippets(){
	jQuery("#loading").show();
	// clear the selection
	jQuery('#jform_snippet').find('option').remove().end();
	jQuery('#jform_snippet').trigger('liszt:updated');
	// get libraries value if set
	var libraries = jQuery("#jform_libraries").val();
	if (libraries) {
		getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').done(function(result) {
			setSnippets(result);
			jQuery("#loading").hide();
			if (typeof snippetButton !== 'undefined') {
				// ensure button is correct
				var snippet = jQuery('#jform_snippet').val();
				snippetButton(snippet);
			}
		});
	}
	else
	{
		// load all snippets in none is selected
		setSnippets(snippetIds);
		jQuery("#loading").hide();
	}
}
function setSnippets(array){
	if (array) {
		jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
		jQuery.each( array, function( i, id ) {
			if (id in snippets) {
				jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
			}
			if (id == snippet) {
				jQuery('#jform_snippet').val(id);
			}
		});
	} else {
		jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
	}
	jQuery('#jform_snippet').trigger('liszt:updated');
}

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK��[t:	��
snippet.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[t:	��snippet_type.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

 
PK��[7�K��"�"strtotime.jsnu�[���function
strtotime (text, now) {
  //  discuss at: http://locutus.io/php/strtotime/
  // original by: Caio Ariede (http://caioariede.com)
  // improved by: Kevin van Zonneveld (http://kvz.io)
  // improved by: Caio Ariede (http://caioariede.com)
  // improved by: A. Matías Quezada (http://amatiasq.com)
  // improved by: preuter
  // improved by: Brett Zamir (http://brett-zamir.me)
  // improved by: Mirko Faber
  //    input by: David
  // bugfixed by: Wagner B. Soares
  // bugfixed by: Artur Tchernychev
  // bugfixed by: Stephan Bösch-Plepelits (http://github.com/plepe)
  //      note 1: Examples all have a fixed timestamp to prevent
  //      note 1: tests to fail because of variable time(zones)
  //   example 1: strtotime('+1 day', 1129633200)
  //   returns 1: 1129719600
  //   example 2: strtotime('+1 week 2 days 4 hours 2 seconds',
1129633200)
  //   returns 2: 1130425202
  //   example 3: strtotime('last month', 1129633200)
  //   returns 3: 1127041200
  //   example 4: strtotime('2009-05-04 08:30:00 GMT')
  //   returns 4: 1241425800
  //   example 5: strtotime('2009-05-04 08:30:00+00')
  //   returns 5: 1241425800
  //   example 6: strtotime('2009-05-04 08:30:00+02:00')
  //   returns 6: 1241418600
  //   example 7: strtotime('2009-05-04T08:30:00Z')
  //   returns 7: 1241425800
  var parsed
  var match
  var today
  var year
  var date
  var days
  var ranges
  var len
  var times
  var regex
  var i
  var fail = false
  if (!text) {
    return fail
  }
  // Unecessary spaces
  text = text.replace(/^\s+|\s+$/g, '')
    .replace(/\s{2,}/g, ' ')
    .replace(/[\t\r\n]/g, '')
    .toLowerCase()
  // in contrast to php, js Date.parse function interprets:
  // dates given as yyyy-mm-dd as in timezone: UTC,
  // dates with "." or "-" as MDY instead of DMY
  // dates with two-digit years differently
  // etc...etc...
  // ...therefore we manually parse lots of common date formats
  var pattern = new RegExp([
    '^(\\d{1,4})',
    '([\\-\\.\\/:])',
    '(\\d{1,2})',
    '([\\-\\.\\/:])',
    '(\\d{1,4})',
    '(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?',
    '(?:\\s([A-Z]+)?)?$'
  ].join(''))
  match = text.match(pattern)
  if (match && match[2] === match[4]) {
    if (match[1] > 1901) {
      switch (match[2]) {
        case '-':
          // YYYY-M-D
          if (match[3] > 12 || match[5] > 31) {
            return fail
          }
          return new Date(match[1], parseInt(match[3], 10) - 1, match[5],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
        case '.':
          // YYYY.M.D is not parsed by strtotime()
          return fail
        case '/':
          // YYYY/M/D
          if (match[3] > 12 || match[5] > 31) {
            return fail
          }
          return new Date(match[1], parseInt(match[3], 10) - 1, match[5],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
      }
    } else if (match[5] > 1901) {
      switch (match[2]) {
        case '-':
          // D-M-YYYY
          if (match[3] > 12 || match[1] > 31) {
            return fail
          }
          return new Date(match[5], parseInt(match[3], 10) - 1, match[1],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
        case '.':
          // D.M.YYYY
          if (match[3] > 12 || match[1] > 31) {
            return fail
          }
          return new Date(match[5], parseInt(match[3], 10) - 1, match[1],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
        case '/':
          // M/D/YYYY
          if (match[1] > 12 || match[3] > 31) {
            return fail
          }
          return new Date(match[5], parseInt(match[1], 10) - 1, match[3],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
      }
    } else {
      switch (match[2]) {
        case '-':
          // YY-M-D
          if (match[3] > 12 || match[5] > 31 || (match[1] < 70
&& match[1] > 38)) {
            return fail
          }
          year = match[1] >= 0 && match[1] <= 38 ? +match[1]
+ 2000 : match[1]
          return new Date(year, parseInt(match[3], 10) - 1, match[5],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
        case '.':
          // D.M.YY or H.MM.SS
          if (match[5] >= 70) {
            // D.M.YY
            if (match[3] > 12 || match[1] > 31) {
              return fail
            }
            return new Date(match[5], parseInt(match[3], 10) - 1, match[1],
            match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
          }
          if (match[5] < 60 && !match[6]) {
            // H.MM.SS
            if (match[1] > 23 || match[3] > 59) {
              return fail
            }
            today = new Date()
            return new Date(today.getFullYear(), today.getMonth(),
today.getDate(),
            match[1] || 0, match[3] || 0, match[5] || 0, match[9] || 0) /
1000
          }
          // invalid format, cannot be parsed
          return fail
        case '/':
          // M/D/YY
          if (match[1] > 12 || match[3] > 31 || (match[5] < 70
&& match[5] > 38)) {
            return fail
          }
          year = match[5] >= 0 && match[5] <= 38 ? +match[5]
+ 2000 : match[5]
          return new Date(year, parseInt(match[1], 10) - 1, match[3],
          match[6] || 0, match[7] || 0, match[8] || 0, match[9] || 0) /
1000
        case ':':
          // HH:MM:SS
          if (match[1] > 23 || match[3] > 59 || match[5] > 59) {
            return fail
          }
          today = new Date()
          return new Date(today.getFullYear(), today.getMonth(),
today.getDate(),
          match[1] || 0, match[3] || 0, match[5] || 0) / 1000
      }
    }
  }
  // other formats and "now" should be parsed by Date.parse()
  if (text === 'now') {
    return now === null || isNaN(now)
      ? new Date().getTime() / 1000 | 0
      : now | 0
  }
  if (!isNaN(parsed = Date.parse(text))) {
    return parsed / 1000 | 0
  }
  // Browsers !== Chrome have problems parsing ISO 8601 date strings, as
they do
  // not accept lower case characters, space, or shortened time zones.
  // Therefore, fix these problems and try again.
  // Examples:
  //   2015-04-15 20:33:59+02
  //   2015-04-15 20:33:59z
  //   2015-04-15t20:33:59+02:00
  pattern = new RegExp([
    '^([0-9]{4}-[0-9]{2}-[0-9]{2})',
    '[ t]',
    '([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)',
    '([\\+-][0-9]{2}(:[0-9]{2})?|z)'
  ].join(''))
  match = text.match(pattern)
  if (match) {
    // @todo: time zone information
    if (match[4] === 'z') {
      match[4] = 'Z'
    } else if (match[4].match(/^([+-][0-9]{2})$/)) {
      match[4] = match[4] + ':00'
    }
    if (!isNaN(parsed = Date.parse(match[1] + 'T' + match[2] +
match[4]))) {
      return parsed / 1000 | 0
    }
  }
  date = now ? new Date(now * 1000) : new Date()
  days = {
    'sun': 0,
    'mon': 1,
    'tue': 2,
    'wed': 3,
    'thu': 4,
    'fri': 5,
    'sat': 6
  }
  ranges = {
    'yea': 'FullYear',
    'mon': 'Month',
    'day': 'Date',
    'hou': 'Hours',
    'min': 'Minutes',
    'sec': 'Seconds'
  }
  function lastNext (type, range, modifier) {
    var diff
    var day = days[range]
    if (typeof day !== 'undefined') {
      diff = day - date.getDay()
      if (diff === 0) {
        diff = 7 * modifier
      } else if (diff > 0 && type === 'last') {
        diff -= 7
      } else if (diff < 0 && type === 'next') {
        diff += 7
      }
      date.setDate(date.getDate() + diff)
    }
  }
  function process (val) {
    // @todo: Reconcile this with regex using \s, taking into account
    // browser issues with split and regexes
    var splt = val.split(' ')
    var type = splt[0]
    var range = splt[1].substring(0, 3)
    var typeIsNumber = /\d+/.test(type)
    var ago = splt[2] === 'ago'
    var num = (type === 'last' ? -1 : 1) * (ago ? -1 : 1)
    if (typeIsNumber) {
      num *= parseInt(type, 10)
    }
    if (ranges.hasOwnProperty(range) &&
!splt[1].match(/^mon(day|\.)?$/i)) {
      return date['set' + ranges[range]](date['get' +
ranges[range]]() + num)
    }
    if (range === 'wee') {
      return date.setDate(date.getDate() + (num * 7))
    }
    if (type === 'next' || type === 'last') {
      lastNext(type, range, num)
    } else if (!typeIsNumber) {
      return false
    }
    return true
  }
  times =
'(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec' +
   
'|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?'
+
    '|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)'
  regex = '([+-]?\\d+\\s' + times + '|' +
'(last|next)\\s' + times + ')(\\sago)?'
  match = text.match(new RegExp(regex, 'gi'))
  if (!match) {
    return fail
  }
  for (i = 0, len = match.length; i < len; i++) {
    if (!process(match[i])) {
      return fail
    }
  }
  return (date.getTime() / 1000)
}
PK��[[=-11template.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// Initial Script
jQuery(document).ready(function()
{
	var add_php_view_vvvvway = jQuery("#jform_add_php_view
input[type='radio']:checked").val();
	vvvvway(add_php_view_vvvvway);
});

// the vvvvway function
function vvvvway(add_php_view_vvvvway)
{
	// set the function logic
	if (add_php_view_vvvvway == 1)
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').show();
	}
	else
	{
		jQuery('#jform_php_view-lbl').closest('.control-group').hide();
	}
}

// the isSet function
function isSet(val)
{
	if ((val != undefined) && (val != null) && 0 !==
val.length){
		return true;
	}
	return false;
}


jQuery(document).ready(function($)
{
	// check and load all the custom code edit buttons
	getEditCustomCodeButtons();
});

function getCodeFrom_server(id, type, type_name, callingName){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax." +
callingName +
"&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0 && type.length > 0)
{
		var request = token + '=1&' + type_name + '=' +
type + '&id=' + id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}


function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
}

function getSnippetDetails(id){
	getCodeFrom_server(id, '_type', '_type',
'snippetDetails').done(function(result) {
		if(result.snippet){
			var description = '';
			if (result.description.length > 0) {
				description =
'<p>'+result.description+'</p>';
			}
			var library = '';
			if (result.library.length > 0) {
				library = '
<b>('+result.library+')</b>';
			}
			var code = '<div
id="snippet-code"><b>'+result.name+'
('+result.type+')</b> <a
href="'+result.url+'" target="_blank" >see
more details'+library+'</a><br
/><em>'+result.heading+'</em><br
/><textarea  id="snippet" class="span12"
rows="11">'+result.snippet+'</textarea></div>';
			jQuery('#snippet-code').remove();
			jQuery('.snippet-code').append(code);
			// make sure the code block is active
			jQuery("#snippet").focus(function() {
				var jQuerythis = jQuery(this);
				jQuerythis.select();
			
				// Work around Chrome's little problem
				jQuerythis.mouseup(function() {
					// Prevent further mouseup intervention
					jQuerythis.unbind("mouseup");
					return false;
				});
			});
		}
		if(result.usage){
			var usage = '<div
id="snippet-usage"><p>'+result.usage+'</p></div>';
			jQuery('#snippet-usage').remove();
			jQuery('.snippet-usage').append(usage);
		}
	})
}

function getDynamicValues_server(dynamicId){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json");
	if(token.length > 0 && dynamicId > 0){
		var request = token+'=1&view=template&id='+dynamicId;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getDynamicValues(id){
	getDynamicValues_server(id).done(function(result) {
		if(result){
			jQuery('#dynamic_values').remove();
			jQuery('.dynamic_values').append('<div
id="dynamic_values">'+result+'</div>');
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getLayoutDetails_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request = token+'=1&id='+id;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'jsonp',
		data: request,
		jsonp: 'callback'
	});
}

function getLayoutDetails(id){
	getLayoutDetails_server(id).done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

function getTemplateDetails(id){
	getCodeFrom_server(id, 'type', 'type',
'templateDetails').done(function(result) {
		if(result){
			jQuery('#details').append(result);
			// make sure the code bocks are active
			jQuery("code").click(function() {
				jQuery(this).selText().addClass("selected");
			});
		}
	})
}

// set snippets that are on the page
var snippetIds = [];
var snippets = {};
var snippet = 0;
jQuery(document).ready(function($)
{
	jQuery("#jform_snippet option").each(function()
	{
		var key =  jQuery(this).val();
		var text =  jQuery(this).text();
		snippets[key] = text;
		snippetIds.push(key);
	});
	snippet = jQuery("#jform_snippet").val();
	getSnippets();
});

function getSnippets(){
	jQuery("#loading").show();
	// clear the selection
	jQuery('#jform_snippet').find('option').remove().end();
	jQuery('#jform_snippet').trigger('liszt:updated');
	// get libraries value if set
	var libraries = jQuery("#jform_libraries").val();
	if (libraries) {
		getCodeFrom_server(1, JSON.stringify(libraries), 'libraries',
'getSnippets').done(function(result) {
			setSnippets(result);
			jQuery("#loading").hide();
			if (typeof snippetButton !== 'undefined') {
				// ensure button is correct
				var snippet = jQuery('#jform_snippet').val();
				snippetButton(snippet);
			}
		});
	}
	else
	{
		// load all snippets in none is selected
		setSnippets(snippetIds);
		jQuery("#loading").hide();
	}
}
function setSnippets(array){
	if (array) {
		jQuery('#jform_snippet').append('<option
value="">'+select_a_snippet+'</option>');
		jQuery.each( array, function( i, id ) {
			if (id in snippets) {
				jQuery('#jform_snippet').append('<option
value="'+id+'">'+snippets[id]+'</option>');
			}
			if (id == snippet) {
				jQuery('#jform_snippet').val(id);
			}
		});
	} else {
		jQuery('#jform_snippet').append('<option
value="">'+create_a_snippet+'</option>');
	}
	jQuery('#jform_snippet').trigger('liszt:updated');
} 
PK��[5�t��
timeago.jsnu�[���/**
 * Timeago is a jQuery plugin that makes it easy to support automatically
 * updating fuzzy timestamps (e.g. "4 minutes ago" or "about
1 day ago").
 *
 * @name timeago
 * @version 1.5.4
 * @requires jQuery v1.2.3+
 * @author Ryan McGeary
 * @license MIT License -
http://www.opensource.org/licenses/mit-license.php
 *
 * For usage and examples, visit:
 * http://timeago.yarp.com/
 *
 * Copyright (c) 2008-2017, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
 */

(function (factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['jquery'], factory);
  } else if (typeof module === 'object' && typeof
module.exports === 'object') {
    factory(require('jquery'));
  } else {
    // Browser globals
    factory(jQuery);
  }
}(function ($) {
  $.timeago = function(timestamp) {
    if (timestamp instanceof Date) {
      return inWords(timestamp);
    } else if (typeof timestamp === "string") {
      return inWords($.timeago.parse(timestamp));
    } else if (typeof timestamp === "number") {
      return inWords(new Date(timestamp));
    } else {
      return inWords($.timeago.datetime(timestamp));
    }
  };
  var $t = $.timeago;

  $.extend($.timeago, {
    settings: {
      refreshMillis: 60000,
      allowPast: true,
      allowFuture: false,
      localeTitle: false,
      cutoff: 0,
      autoDispose: true,
      strings: {
        prefixAgo: null,
        prefixFromNow: null,
        suffixAgo: "ago",
        suffixFromNow: "from now",
        inPast: 'any moment now',
        seconds: "less than a minute",
        minute: "about a minute",
        minutes: "%d minutes",
        hour: "about an hour",
        hours: "about %d hours",
        day: "a day",
        days: "%d days",
        month: "about a month",
        months: "%d months",
        year: "about a year",
        years: "%d years",
        wordSeparator: " ",
        numbers: []
      }
    },

    inWords: function(distanceMillis) {
      if (!this.settings.allowPast && ! this.settings.allowFuture)
{
          throw 'timeago allowPast and allowFuture settings can not
both be set to false.';
      }

      var $l = this.settings.strings;
      var prefix = $l.prefixAgo;
      var suffix = $l.suffixAgo;
      if (this.settings.allowFuture) {
        if (distanceMillis < 0) {
          prefix = $l.prefixFromNow;
          suffix = $l.suffixFromNow;
        }
      }

      if (!this.settings.allowPast && distanceMillis >= 0) {
        return this.settings.strings.inPast;
      }

      var seconds = Math.abs(distanceMillis) / 1000;
      var minutes = seconds / 60;
      var hours = minutes / 60;
      var days = hours / 24;
      var years = days / 365;

      function substitute(stringOrFunction, number) {
        var string = $.isFunction(stringOrFunction) ?
stringOrFunction(number, distanceMillis) : stringOrFunction;
        var value = ($l.numbers && $l.numbers[number]) || number;
        return string.replace(/%d/i, value);
      }

      var words = seconds < 45 && substitute($l.seconds,
Math.round(seconds)) ||
        seconds < 90 && substitute($l.minute, 1) ||
        minutes < 45 && substitute($l.minutes,
Math.round(minutes)) ||
        minutes < 90 && substitute($l.hour, 1) ||
        hours < 24 && substitute($l.hours, Math.round(hours)) ||
        hours < 42 && substitute($l.day, 1) ||
        days < 30 && substitute($l.days, Math.round(days)) ||
        days < 45 && substitute($l.month, 1) ||
        days < 365 && substitute($l.months, Math.round(days /
30)) ||
        years < 1.5 && substitute($l.year, 1) ||
        substitute($l.years, Math.round(years));

      var separator = $l.wordSeparator || "";
      if ($l.wordSeparator === undefined) { separator = " "; }
      return $.trim([prefix, words, suffix].join(separator));
    },

    parse: function(iso8601) {
      var s = $.trim(iso8601);
      s = s.replace(/\.\d+/,""); // remove milliseconds
      s = s.replace(/-/,"/").replace(/-/,"/");
      s = s.replace(/T/," ").replace(/Z/," UTC");
      s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00
-> -0400
      s = s.replace(/([\+\-]\d\d)$/," $100"); // +09 -> +0900
      return new Date(s);
    },
    datetime: function(elem) {
      var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") :
$(elem).attr("title");
      return $t.parse(iso8601);
    },
    isTime: function(elem) {
      // jQuery's `is()` doesn't play well with HTML5 in IE
      return $(elem).get(0).tagName.toLowerCase() === "time"; //
$(elem).is("time");
    }
  });

  // functions that can be called via $(el).timeago('action')
  // init is default when no action is given
  // functions are called with context of a single element
  var functions = {
    init: function() {
      functions.dispose.call(this);
      var refresh_el = $.proxy(refresh, this);
      refresh_el();
      var $s = $t.settings;
      if ($s.refreshMillis > 0) {
        this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
      }
    },
    update: function(timestamp) {
      var date = (timestamp instanceof Date) ? timestamp :
$t.parse(timestamp);
      $(this).data('timeago', { datetime: date });
      if ($t.settings.localeTitle) {
        $(this).attr("title", date.toLocaleString());
      }
      refresh.apply(this);
    },
    updateFromDOM: function() {
      $(this).data('timeago', { datetime: $t.parse(
$t.isTime(this) ? $(this).attr("datetime") :
$(this).attr("title") ) });
      refresh.apply(this);
    },
    dispose: function () {
      if (this._timeagoInterval) {
        window.clearInterval(this._timeagoInterval);
        this._timeagoInterval = null;
      }
    }
  };

  $.fn.timeago = function(action, options) {
    var fn = action ? functions[action] : functions.init;
    if (!fn) {
      throw new Error("Unknown function name '"+ action
+"' for timeago");
    }
    // each over objects here and call the requested function
    this.each(function() {
      fn.call(this, options);
    });
    return this;
  };

  function refresh() {
    var $s = $t.settings;

    //check if it's still visible
    if ($s.autoDispose &&
!$.contains(document.documentElement,this)) {
      //stop if it has been removed
      $(this).timeago("dispose");
      return this;
    }

    var data = prepareData(this);

    if (!isNaN(data.datetime)) {
      if ( $s.cutoff === 0 || Math.abs(distance(data.datetime)) <
$s.cutoff) {
        $(this).text(inWords(data.datetime));
      } else {
        if ($(this).attr('title').length > 0) {
            $(this).text($(this).attr('title'));
        }
      }
    }
    return this;
  }

  function prepareData(element) {
    element = $(element);
    if (!element.data("timeago")) {
      element.data("timeago", { datetime: $t.datetime(element)
});
      var text = $.trim(element.text());
      if ($t.settings.localeTitle) {
        element.attr("title",
element.data('timeago').datetime.toLocaleString());
      } else if (text.length > 0 && !($t.isTime(element)
&& element.attr("title"))) {
        element.attr("title", text);
      }
    }
    return element.data("timeago");
  }

  function inWords(date) {
    return $t.inWords(distance(date));
  }

  function distance(date) {
    return (new Date().getTime() - date.getTime());
  }

  // fix for IE6 suckage
  document.createElement("abbr");
  document.createElement("time");
}));
PK��[A��8��validation_rule.jsnu�[���/**
 * @package    Joomla.Component.Builder
 *
 * @created    30th April, 2015
 * @author     Llewellyn van der Merwe
<http://www.joomlacomponentbuilder.com>
 * @github     Joomla Component Builder
<https://github.com/vdm-io/Joomla-Component-Builder>
 * @copyright  Copyright (C) 2015 Vast Development Method. All rights
reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */




jQuery(document).ready(function()
{
	// get the rule name
	var ruleName = jQuery('#jform_name').val();
	// check if this rule name is taken
	checkRuleName(ruleName);

	// get type value
	var rulefilename = jQuery("#jform_inherit
option:selected").val();
	if(jQuery('#jform_php').length == 0) {
		getExistingValidationRuleCode(rulefilename);
	}

	// load the used in div
	// jQuery('#usedin').show();

	// check and load all the customcode edit buttons
	setTimeout(getEditCustomCodeButtons, 300);
});

function getExistingValidationRuleCode_server(rulefilename){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getExistingValidationRuleCode&format=json&raw=true");
	if(token.length > 0 && rulefilename.length > 0){
		var request = token+'=1&name='+rulefilename;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getExistingValidationRuleCode(rulefilename,setValue){
	getExistingValidationRuleCode_server(rulefilename).done(function(result)
{
		if(result.values){
			jQuery('textarea#jform_php').val(result.values);
		}
	})
}

function checkRuleName(ruleName) {
	if (ruleName.length > 2) {
		var ide = jQuery('#jform_id').val();
		if (ide == 0) {
			ide = -1;
		}
		checkRuleName_server(ruleName, ide).done(function(result) {
			if(result.name && result.message){
				// show notice that functioName is okay
				jQuery.UIkit.notify({message: result.message, timeout: result.timeout,
status: result.status, pos: 'top-right'});
				jQuery('#jform_name').val(result.name);
				// now start search for where the function is used
				usedin(result.name, ide);
			} else if(result.message){
				// show notice that ruleName is not okay
				jQuery.UIkit.notify({message: result.message, timeout: result.timeout,
status: result.status, pos: 'top-right'});
				jQuery('#jform_name').val('');
			} else {
				// set an error that message was not send
				jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_VALIDATION_RULE_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN'),
timeout: 7000, status: 'danger', pos: 'top-right'});
				jQuery('#jform_name').val('');
			}
		});
	} else {
		// set an error that message was not send
		jQuery.UIkit.notify({message:
Joomla.JText._('COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME'),
timeout: 5000, status: 'danger', pos: 'top-right'});
		jQuery('#jform_name').val('');
	}
}
// check Function Name
function checkRuleName_server(ruleName, ide){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.checkRuleName&format=json&raw=true");
	if(token.length > 0){
		var request =
token+'=1&name='+ruleName+'&id='+ide;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons_server(id){
	var getUrl =
JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
	if(token.length > 0 && id > 0){
		var request =
token+'=1&id='+id+'&return_here='+return_here;
	}
	return jQuery.ajax({
		type: 'GET',
		url: getUrl,
		dataType: 'json',
		data: request,
		jsonp: false
	});
}

function getEditCustomCodeButtons(){
	// get the id
	id = jQuery("#jform_id").val();
	getEditCustomCodeButtons_server(id).done(function(result) {
		if(isObject(result)){
			jQuery.each(result, function( field, buttons ) {
				jQuery('<div class="control-group"><div
class="control-label"><label>Add/Edit
Customcode</label></div><div class="controls
control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+
field);
				jQuery.each(buttons, function( name, button ) {
					jQuery(".control-customcode-buttons-"+field).append(button);
				});
			});
		}
	})
}

// check object is not empty
function isObject(obj) {
	for(var prop in obj) {
		if (Object.prototype.hasOwnProperty.call(obj, prop)) {
			return true;
		}
	}
	return false;
} 
PK넋[5$�}
}
sampledata-process.jsnu�[���PKH��[�Qb&&�
overrider.jsnu�[���PKH��[��x���$!overrider.min.jsnu�[���PKĝ�[Z�f��+-main.jsnu�[���PKĝ�[�0>6�6�=/owl.carousel.min.jsnu�[���PKEc�[yXL~~��admin-modules-modal.jsnu�[���PKEc�[c?�VHHz�admin-modules-modal.min.jsnu�[���PKd�[a>�RR�jupdatecheck.jsnu�[���PK��[t:	����admin_custom_tabs.jsnu�[���PK��[t:	����admin_fields.jsnu�[���PK��[��bb`�admin_fields_conditions.jsnu�[���PK��[6�s0
0
�admin_fields_relations.jsnu�[���PK��[��/q����
�admin_view.jsnu�[���PK��[���D�class_extends.jsnu�[���PK��[����%%��class_method.jsnu�[���PK��[$���%%��class_property.jsnu�[���PK��[t:	��_�component_admin_views.jsnu�[���PK��[t:	��G�component_config.jsnu�[���PK��[t:	��*�component_custom_admin_menus.jsnu�[���PK��[t:	���component_custom_admin_views.jsnu�[���PK��[�d����component_dashboard.jsnu�[���PK��[t:	���component_files_folders.jsnu�[���PK��[t:	���component_modules.jsnu�[���PK��[t:	����component_mysql_tweaks.jsnu�[���PK��[t:	����component_placeholders.jsnu�[���PK��[t:	����component_plugins.jsnu�[���PK��[t:	����component_site_views.jsnu�[���PK��[t:	����component_updates.jsnu�[���PK��[(S��.�.f�custom_admin_view.jsnu�[���PK��[��S5S5Xcustom_code.jsnu�[���PK��[cZ�����8dynamic_get.jsnu�[���PK��[��urur��field.jsnu�[���PK��[�}9j9j�dfieldtype.jsnu�[���PK��[S���Q!Q!��help_document.jsnu�[���PK��[�#o,,
��index.htmlnu�[���PK��[n��Ktwtw��joomla_component.jsnu�[���PK��[���OaOa�hjoomla_module.jsnu�[���PK��[t:	��#9�joomla_module_files_folders_urls.jsnu�[���PK��[t:	��,�joomla_module_updates.jsnu�[���PK��[��O�ԊԊ�joomla_plugin.jsnu�[���PK��[t:	��#(Yjoomla_plugin_files_folders_urls.jsnu�[���PK��[t:	��[joomla_plugin_group.jsnu�[���PK��[t:	��]joomla_plugin_updates.jsnu�[���PK��[t���ee�^jquery.json.min.jsnu�[���PK��[s�{X���fjstorage.min.jsnu�[���PK��[t:	��u�language.jsnu�[���PK��[�}q
]]P�language_translation.jsnu�[���PK��[��)���	�layout.jsnu�[���PK��[�~�E�`�`
�library.jsnu�[���PK��[t:	��
library_config.jsnu�[���PK��[t:	���library_files_folders_urls.jsnu�[���PK��[U��;L;L	�
marked.jsnu�[���PK��[JMs��MZplaceholder.jsnu�[���PK��[}�4�~A~A	kserver.jsnu�[���PK��[��5W�2�2ˬsite_view.jsnu�[���PK��[t:	��
��snippet.jsnu�[���PK��[t:	��l�snippet_type.jsnu�[���PK��[7�K��"�"K�strtotime.jsnu�[���PK��[[=-11template.jsnu�[���PK��[5�t��
�#timeago.jsnu�[���PK��[A��8���@validation_rule.jsnu�[���PK==�tR