(function (){
var requirejs, require, define;
(function (undef){
var main, req, makeMap, handlers,
defined={},
waiting={},
config={},
defining={},
hasOwn=Object.prototype.hasOwnProperty,
aps=[].slice,
jsSuffixRegExp=/\.js$/;
function hasProp(obj, prop){
return hasOwn.call(obj, prop);
}
function normalize(name, baseName){
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
foundI, foundStarMap, starI, i, j, part,
baseParts=baseName&&baseName.split("/"),
map=config.map,
starMap=(map&&map['*'])||{};
if(name&&name.charAt(0)==="."){
if(baseName){
name=name.split('/');
lastIndex=name.length - 1;
if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){
name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp, '');
}
name=baseParts.slice(0, baseParts.length - 1).concat(name);
for (i=0; i < name.length; i +=1){
part=name[i];
if(part==="."){
name.splice(i, 1);
i -=1;
}else if(part===".."){
if(i===1&&(name[2]==='..'||name[0]==='..')){
break;
}else if(i > 0){
name.splice(i - 1, 2);
i -=2;
}}
}
name=name.join("/");
}else if(name.indexOf('./')===0){
name=name.substring(2);
}}
if((baseParts||starMap)&&map){
nameParts=name.split('/');
for (i=nameParts.length; i > 0; i -=1){
nameSegment=nameParts.slice(0, i).join("/");
if(baseParts){
for (j=baseParts.length; j > 0; j -=1){
mapValue=map[baseParts.slice(0, j).join('/')];
if(mapValue){
mapValue=mapValue[nameSegment];
if(mapValue){
foundMap=mapValue;
foundI=i;
break;
}}
}}
if(foundMap){
break;
}
if(!foundStarMap&&starMap&&starMap[nameSegment]){
foundStarMap=starMap[nameSegment];
starI=i;
}}
if(!foundMap&&foundStarMap){
foundMap=foundStarMap;
foundI=starI;
}
if(foundMap){
nameParts.splice(0, foundI, foundMap);
name=nameParts.join('/');
}}
return name;
}
function makeRequire(relName, forceSync){
return function (){
var args=aps.call(arguments, 0);
if(typeof args[0]!=='string'&&args.length===1){
args.push(null);
}
return req.apply(undef, args.concat([relName, forceSync]));
};}
function makeNormalize(relName){
return function (name){
return normalize(name, relName);
};}
function makeLoad(depName){
return function (value){
defined[depName]=value;
};}
function callDep(name){
if(hasProp(waiting, name)){
var args=waiting[name];
delete waiting[name];
defining[name]=true;
main.apply(undef, args);
}
if(!hasProp(defined, name)&&!hasProp(defining, name)){
throw new Error('No ' + name);
}
return defined[name];
}
function splitPrefix(name){
var prefix,
index=name ? name.indexOf('!'):-1;
if(index > -1){
prefix=name.substring(0, index);
name=name.substring(index + 1, name.length);
}
return [prefix, name];
}
makeMap=function (name, relName){
var plugin,
parts=splitPrefix(name),
prefix=parts[0];
name=parts[1];
if(prefix){
prefix=normalize(prefix, relName);
plugin=callDep(prefix);
}
if(prefix){
if(plugin&&plugin.normalize){
name=plugin.normalize(name, makeNormalize(relName));
}else{
name=normalize(name, relName);
}}else{
name=normalize(name, relName);
parts=splitPrefix(name);
prefix=parts[0];
name=parts[1];
if(prefix){
plugin=callDep(prefix);
}}
return {
f: prefix ? prefix + '!' + name:name,
n: name,
pr: prefix,
p: plugin
};};
function makeConfig(name){
return function (){
return (config&&config.config&&config.config[name])||{};};
}
handlers={
require: function (name){
return makeRequire(name);
},
exports: function (name){
var e=defined[name];
if(typeof e!=='undefined'){
return e;
}else{
return (defined[name]={});
}},
module: function (name){
return {
id: name,
uri: '',
exports: defined[name],
config: makeConfig(name)
};}};
main=function (name, deps, callback, relName){
var cjsModule, depName, ret, map, i,
args=[],
callbackType=typeof callback,
usingExports;
relName=relName||name;
if(callbackType==='undefined'||callbackType==='function'){
deps = !deps.length&&callback.length ? ['require', 'exports', 'module']:deps;
for (i=0; i < deps.length; i +=1){
map=makeMap(deps[i], relName);
depName=map.f;
if(depName==="require"){
args[i]=handlers.require(name);
}else if(depName==="exports"){
args[i]=handlers.exports(name);
usingExports=true;
}else if(depName==="module"){
cjsModule=args[i]=handlers.module(name);
}else if(hasProp(defined, depName) ||
hasProp(waiting, depName) ||
hasProp(defining, depName)){
args[i]=callDep(depName);
}else if(map.p){
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
args[i]=defined[depName];
}else{
throw new Error(name + ' missing ' + depName);
}}
ret=callback ? callback.apply(defined[name], args):undefined;
if(name){
if(cjsModule&&cjsModule.exports!==undef &&
cjsModule.exports!==defined[name]){
defined[name]=cjsModule.exports;
}else if(ret!==undef||!usingExports){
defined[name]=ret;
}}
}else if(name){
defined[name]=callback;
}};
requirejs=require=req=function (deps, callback, relName, forceSync, alt){
if(typeof deps==="string"){
if(handlers[deps]){
return handlers[deps](callback);
}
return callDep(makeMap(deps, callback).f);
}else if(!deps.splice){
config=deps;
if(config.deps){
req(config.deps, config.callback);
}
if(!callback){
return;
}
if(callback.splice){
deps=callback;
callback=relName;
relName=null;
}else{
deps=undef;
}}
callback=callback||function (){};
if(typeof relName==='function'){
relName=forceSync;
forceSync=alt;
}
if(forceSync){
main(undef, deps, callback, relName);
}else{
setTimeout(function (){
main(undef, deps, callback, relName);
}, 4);
}
return req;
};
req.config=function (cfg){
return req(cfg);
};
requirejs._defined=defined;
define=function (name, deps, callback){
if(typeof name!=='string'){
throw new Error('See almond README: incorrect module build, no module name');
}
if(!deps.splice){
callback=deps;
deps=[];
}
if(!hasProp(defined, name)&&!hasProp(waiting, name)){
waiting[name]=[name, deps, callback];
}};
define.amd={
jQuery: true
};}());
define("../lib/almond", function(){});
define('views/header',[], function(){
var view=Marionette.ItemView.extend({
template: "#tmpl-nf-mp-header",
fullProgressBar: false,
initialize: function(options){
this.listenTo(this.collection, 'change:part', this.reRender);
this.listenTo(this.collection, 'change:errors', this.reRender);
this.listenTo(nfRadio.channel('forms'), 'before:submit', this.fillProgressBar);
},
reRender: function(){
this.model=this.collection.getElement();
this.render();
},
templateHelpers: function(){
var that=this;
return {
renderPartTitle: function(){
if('undefined'==typeof that.collection.formModel.get('settings').mp_display_titles||0==that.collection.formModel.get('settings').mp_display_titles) return '';
var template=Backbone.Radio.channel('app').request('get:template', '#tmpl-nf-mp-part-title');
var parts=_.invoke(that.collection.getVisibleParts(), 'pick', [ 'title', 'errors', 'visible' ])
if(1 < parts.length){
return template( { title: this.title });
}else{
return '';
}},
renderBreadcrumbs: function(){
if('undefined'==typeof that.collection.formModel.get('settings').mp_breadcrumb||0==that.collection.formModel.get('settings').mp_breadcrumb) return '';
var template=Backbone.Radio.channel('app').request('get:template', '#tmpl-nf-mp-breadcrumbs');
var parts=_.invoke(that.collection.getVisibleParts(), 'pick', [ 'title', 'errors', 'visible' ])
if(1 < parts.length){
return template( { parts: parts, currentIndex: that.collection.getVisibleParts().indexOf(that.model) });
}else{
return '';
}},
renderProgressBar: function(){
if('undefined'==typeof that.collection.formModel.get('settings').mp_progress_bar||0==that.collection.formModel.get('settings').mp_progress_bar) return '';
var template=Backbone.Radio.channel('app').request('get:template', '#tmpl-nf-mp-progress-bar');
var currentIndex=that.collection.getVisibleParts().indexOf(that.model);
var percent=(that.fullProgressBar) ? 100:currentIndex / that.collection.getVisibleParts().length * 100;
if(1 < that.collection.getVisibleParts().length){
return template( { percent: percent });
}else{
return '';
}}
}},
events: {
'click .nf-breadcrumb': 'clickBreadcrumb'
},
clickBreadcrumb: function(e){
e.preventDefault();
this.collection.setElement(this.collection.getVisibleParts()[ jQuery(e.target).data('index') ]);
},
fillProgressBar: function(formModel){
this.fullProgressBar=true;
this.render();
this.fullProgressBar=false;
}});
return view;
});
define('views/footer',[], function(){
var view=Marionette.ItemView.extend({
template: "#tmpl-nf-mp-footer",
initialize: function(options){
this.listenTo(this.collection, 'change:part', this.reRender);
},
reRender: function(){
this.model=this.collection.getElement();
this.render();
},
templateHelpers: function(){
var that=this;
return {
renderNextPrevious: function(){
var template=Backbone.Radio.channel('app').request('get:template', '#tmpl-nf-mp-next-previous');
var showNext=false;
var showPrevious=false;
var visibleParts=that.collection.where({ visible: true });
if(visibleParts.indexOf(that.model)!=visibleParts.length - 1){
showNext=true;
}
if(visibleParts.indexOf(that.model)!=0){
showPrevious=true;
}
if(! showNext&&! showPrevious) return '';
var prevLabel=that.collection.formModel.get('mp_prev_label')||nfMPSettings.prevLabel;
var nextLabel=that.collection.formModel.get('mp_next_label')||nfMPSettings.nextLabel;
return template( { showNext: showNext, showPrevious: showPrevious, prevLabel: prevLabel, nextLabel: nextLabel });
},
}}
});
return view;
});
define('views/formContent',[ 'views/header', 'views/footer' ], function(HeaderView, FooterView){
var view=Marionette.LayoutView.extend({
template: "#tmpl-nf-mp-form-content",
regions: {
header: '.nf-mp-header',
body: '.nf-mp-body',
footer: '.nf-mp-footer'
},
initialize: function(options){
this.formModel=options.formModel;
this.collection=options.data;
this.listenTo(this.collection, 'change:part', this.changePart);
this.listenTo(this.collection, 'change:visible', this.renderHeaderFooter);
},
onRender: function(){
this.header.show(new HeaderView( { collection: this.collection, model: this.collection.getElement() }) );
var formContentViewFilters=nfRadio.channel('formContent').request('get:viewFilters');
var sortedArray=_.without(formContentViewFilters, undefined);
var callback=sortedArray[1];
this.formContentView=callback();
this.body.show(new this.formContentView({ collection: this.collection.getElement().get('formContentData') }) );
this.footer.show(new FooterView( { collection: this.collection, model: this.collection.getElement() }) );
},
renderHeaderFooter: function(){
this.header.show(new HeaderView( { collection: this.collection, model: this.collection.getElement() }) );
this.footer.show(new FooterView( { collection: this.collection, model: this.collection.getElement() }) );
},
changePart: function(){
this.body.show(new this.formContentView({ collection: this.collection.getElement().get('formContentData') }) );
var formTop=jQuery(this.body.el).closest('.nf-form-cont').offset().top;
if(jQuery(window).scrollTop() > formTop - 50){
jQuery(window).scrollTop(formTop - 50);
}},
events: {
'click .nf-next': 'clickNext',
'click .nf-previous': 'clickPrevious'
},
clickNext: function(e){
e.preventDefault();
this.collection.next();
},
clickPrevious: function(e){
e.preventDefault();
this.collection.previous();
}});
return view;
});
define('models/partModel',[], function(){
var model=Backbone.Model.extend({
fieldErrors: {},
defaults: {
errors: false,
visible: true,
title: ''
},
initialize: function(){
this.filterFormContentData();
this.listenTo(this.get('formContentData'), 'change:errors', this.maybeChangeActivePart);
this.fieldErrors[ this.cid ]=[];
this.on('change:visible', this.changeVisible, this);
this.set('order', Number(this.get('order') ));
},
filterFormContentData: function(){
if(! this.get('formContentData') ) return;
var formContentData=this.get('formContentData');
var formContentLoadFilters=nfRadio.channel('formContent').request('get:loadFilters');
var sortedArray=_.without(formContentLoadFilters, undefined);
var callback=sortedArray[ 1 ];
var empty=(0==formContentData.length) ? true:false;
if('undefined'==typeof formContentLoadFilters[4]&&_.isArray(formContentData)&&0!=formContentData.length&&'undefined'!=typeof formContentData[0].cells){
var partFields=[];
var cells=_.pluck(formContentData, 'cells');
_.each(cells, function(cell){
var fields=_.flatten(_.pluck(cell, 'fields') );
partFields=_.union(partFields, fields);
});
formContentData=partFields;
this.set('formContentData', formContentData);
}
this.set('formContentData', callback(formContentData, this.collection.formModel, empty, formContentData) );
},
maybeChangeActivePart: function(fieldModel){
if(0 < fieldModel.get('errors').length){
this.set('errors', true);
this.fieldErrors[ this.cid ].push(fieldModel.get('key') );
if(this.collection.getElement()!=this &&
this.collection.indexOf(this.collection.getElement()) > this.collection.indexOf(this)
){
this.collection.setElement(this);
}}else{
this.fieldErrors[ this.cid ]=_.without(this.fieldErrors[ this.cid ], fieldModel.get('key') );
if(0==this.fieldErrors[ this.cid ].length){
this.set('errors', false);
}}
},
validateFields: function(){
this.get('formContentData').validateFields();
},
changeVisible: function(){
if(this.get('visible') ){
this.get('formContentData').showFields();
}else{
this.get('formContentData').hideFields();
}}
});
return model;
});
define('models/partCollection',[ 'models/partModel' ], function(PartModel){
var collection=Backbone.Collection.extend({
model: PartModel,
currentElement: false,
initialize: function(models, options){
this.formModel=options.formModel;
},
getElement: function(){
if(! this.currentElement){
this.setElement(this.at(0), true);
}
return this.currentElement;
},
setElement: function(model, silent){
silent=silent||false;
if(! silent){
if(this.partErrors()) return;
}
this.currentElement=model;
if(! silent){
this.trigger('change:part', this);
nfRadio.channel('nfMP').trigger('change:part', this);
}},
setNextElement: function(model, silent){
silent=silent||false;
if(! silent){
if(this.partErrors()) return;
}
this.currentElement=model;
if(! silent){
this.trigger('change:part', this);
nfRadio.channel('nfMP').trigger('change:part', this);
}},
setPreviousElement: function(model, silent){
silent=silent||false;
this.currentElement=model;
if(! silent){
this.trigger('change:part', this);
nfRadio.channel('nfMP').trigger('change:part', this);
}},
next: function (){
if(this.getVisibleParts().length - 1!=this.getVisibleParts().indexOf(this.getElement()) ){
this.setNextElement(this.getVisibleParts()[ this.getVisibleParts().indexOf(this.getElement()) + 1 ]);
}
return this;
},
previous: function(){
if(0!=this.getVisibleParts().indexOf(this.getElement()) ){
this.setPreviousElement(this.getVisibleParts()[ this.getVisibleParts().indexOf(this.getElement()) - 1 ]);
}
return this;
},
partErrors: function(){
if('undefined'==typeof this.formModel.get('settings').mp_validate||0==this.formModel.get('settings').mp_validate) return false;
this.currentElement.validateFields();
return this.currentElement.get('errors');
},
validateFields: function(){
_.each(this.getVisibleParts(), function(partModel){ partModel.validateFields(); });
},
getVisibleParts: function(){
return this.where({ visible: true });
}});
return collection;
});
define('controllers/loadFilters',[ 'views/formContent', 'models/partCollection' ], function(FormContentView, PartCollection){
var controller=Marionette.Object.extend({
initialize: function(){
nfRadio.channel('formContent').request('add:viewFilter', this.getformContentView, 1);
nfRadio.channel('formContent').request('add:loadFilter', this.formContentLoad, 1);
},
getformContentView: function(formContentData){
return FormContentView;
},
formContentLoad: function(formContentData, formModel){
if(true===formContentData instanceof PartCollection) return formContentData;
if(_.isArray(formContentData)&&0!=_.isArray(formContentData).length&&'undefined'!=typeof _.first(formContentData)&&'part'==_.first(formContentData).type){
var partCollection=new PartCollection(formContentData, { formModel: formModel });
}else{
var partCollection=new PartCollection( { formContentData: formContentData }, { formModel: formModel });
}
return partCollection;
}});
return controller;
});
define('controllers/conditionalLogic',[], function(){
var controller=Marionette.Object.extend({
initialize: function(){
nfRadio.channel('condition:trigger').reply('show_part', this.showPart, this);
nfRadio.channel('condition:trigger').reply('hide_part', this.hidePart, this);
},
showPart: function(conditionModel, then){
conditionModel.set('alreadyTriggered', true);
this.changePartVisibility(conditionModel, then, true);
conditionModel.set('alreadyTriggered', false);
},
hidePart: function(conditionModel, then){
conditionModel.set('alreadyTriggered', true);
this.changePartVisibility(conditionModel, then, false);
conditionModel.set('alreadyTriggered', false);
},
changePartVisibility: function(conditionModel, then, visible){
var mpResetFlag=Date.now();
if(! conditionModel.collection.mpResetFlag){
conditionModel.collection.mpResetFlag=mpResetFlag;
}
var partCollection=conditionModel.collection.formModel.get('formContentData');
partCollection.findWhere({ key: then.key }).set('visible', visible);
conditionModel.collection.each(function(model){
if(model==conditionModel) return;
if(model.get('alreadyTriggered') ) return;
model.checkWhen();
model.set('alreadyTriggered', true);
});
if(mpResetFlag==conditionModel.collection.mpResetFlag){
conditionModel.collection.invoke('set', { 'alreadyTriggered': false });
conditionModel.collection.mpResetFlag=false;
}}
});
return controller;
});
define('controllers/renderRecaptcha',[], function(){
var controller=Marionette.Object.extend({
initialize: function(){
this.listenTo(nfRadio.channel('nfMP'), 'change:part', this.changePart, this);
},
changePart: function(conditionModel, then){
jQuery('.g-recaptcha').each(function(){
var callback=jQuery(this).data('callback');
var fieldID=jQuery(this).data('fieldid');
if(typeof window[ callback ]!=='function'){
window[ callback ]=function(response){
nfRadio.channel('recaptcha').request('update:response', response, fieldID);
};}
var opts={
theme: jQuery(this).data('theme'),
sitekey: jQuery(this).data('sitekey'),
callback: callback
};
grecaptcha.render(jQuery(this)[0], opts);
});
},
});
return controller;
});
define('controllers/renderTurnstile',[], function(){
var controller=Marionette.Object.extend({
initialize: function(){
this.listenTo(nfRadio.channel('nfMP'), 'change:part', this.changePart, this);
},
changePart: function(conditionModel, then){
setTimeout(function(){
jQuery('.cf-turnstile, .nf-cf-turnstile').each(function(){
var element=this;
var sitekey=jQuery(element).data('sitekey');
var fieldID=jQuery(element).data('fieldid');
if(! sitekey||jQuery(element).children().length > 0){
return;
}
if(typeof turnstile==='undefined'){
return;
}
try {
var callbackName='nfTurnstileCallback_' + fieldID;
window[ callbackName ]=function(token){
var input=document.getElementById('nf-field-' + fieldID);
if(input){
input.value=token;
jQuery(input).trigger('change');
jQuery(input).closest('.field-wrap').removeClass('nf-error');
jQuery(input).closest('.field-wrap').find('.nf-error-msg').remove();
}
if(typeof nfRadio!=='undefined'&&nfRadio.channel){
try {
nfRadio.channel('turnstile').request('update:response', token, fieldID);
} catch(e){
}}
};
turnstile.render(element, {
sitekey: sitekey,
theme: jQuery(element).data('theme')||'auto',
size: jQuery(element).data('size')||'normal',
callback: callbackName
});
} catch(e){
console.warn('Turnstile render error:', e);
}});
}, 100);
}});
return controller;
});
define('controllers/renderHelpText',[], function(){
var controller=Marionette.Object.extend({
initialize: function(){
this.listenTo(nfRadio.channel('nfMP'), 'change:part', this.changePart, this);
},
changePart: function(conditionModel, then){
jQuery('.nf-help').each(function(){
var jBox=jQuery(this).jBox('Tooltip', {
theme: 'TooltipBorder',
content: jQuery(this).data('text')
});
});
},
});
return controller;
});
define('controllers/fieldValuePreserver',[], function(){
var controller=Marionette.Object.extend({
fieldCache: {},
dateOnlyCache: {},
initialize: function(){
var self=this;
jQuery(document).on('change', '.hour, .minute, .ampm', function(e){
self.onTimeSelectChange(e);
});
jQuery(document).on('mousedown', '.nf-next, .nf-previous', function(e){
self.cacheAllVisibleTimeFields();
self.cacheDateOnlyFields();
});
this.listenTo(nfRadio.channel('forms'), 'before:submit', this.onBeforeSubmit);
},
cacheAllVisibleTimeFields: function(){
var self=this;
jQuery('.nf-field-container').each(function(){
var $container=jQuery(this);
var $hour=$container.find('.hour');
if(! $hour.length) return;
var fieldId=$container.data('id');
if(! fieldId){
var $input=$container.find('.nf-element').first();
if($input.length&&$input.attr('id') ){
fieldId=$input.attr('id').replace(/^nf-field-/, '');
}}
if(! fieldId) return;
var $minute=$container.find('.minute');
var $ampm=$container.find('.ampm');
var $dateInput=$container.find('input[type="hidden"], input.nf-element').first();
var dateValue=$dateInput.length ? $dateInput.val():'';
self.fieldCache[ fieldId ]={
date: dateValue,
hour: $hour.val()||null,
minute: $minute.val()||null,
ampm: $ampm.val()||null
};});
},
cacheDateOnlyFields: function(){
var self=this;
jQuery('.nf-field-container').each(function(){
var $container=jQuery(this);
var $hiddenInput=$container.find('input[type="hidden"].datepicker');
if(! $hiddenInput.length){
$hiddenInput=$container.find('input[type="hidden"].flatpickr-input');
}
if(! $hiddenInput.length) return;
if($container.find('.hour').length) return;
var fieldId=$container.data('id');
if(! fieldId){
var inputId=$hiddenInput.attr('id');
if(inputId){
fieldId=inputId.replace(/^nf-field-/, '');
}}
if(! fieldId) return;
var formattedDate=$hiddenInput.val();
if(formattedDate){
self.dateOnlyCache[ String(fieldId) ]=formattedDate;
}});
},
onTimeSelectChange: function(e){
var $select=jQuery(e.target);
var $container=$select.closest('.nf-field-container');
if(! $container.length) return;
var fieldId=$container.data('id');
if(! fieldId){
var $input=$container.find('.nf-element').first();
if($input.length&&$input.attr('id') ){
fieldId=$input.attr('id').replace(/^nf-field-/, '');
}}
if(! fieldId) return;
var $hour=$container.find('.hour');
var $minute=$container.find('.minute');
var $ampm=$container.find('.ampm');
var $dateInput=$container.find('input[type="hidden"], input.nf-element').first();
var dateValue=$dateInput.length ? $dateInput.val():'';
this.fieldCache[ fieldId ]={
date: dateValue,
hour: $hour.val()||null,
minute: $minute.val()||null,
ampm: $ampm.val()||null
};},
onBeforeSubmit: function(formModel){
var self=this;
var fields=formModel.get('fields');
if(! fields||! fields.models) return;
fields.models.forEach(function(fieldModel){
if('date'!==fieldModel.get('type') ) return;
var dateMode=fieldModel.get('date_mode');
var fieldId=fieldModel.get('id');
if('date_only'===dateMode){
var cachedDate=self.dateOnlyCache[ String(fieldId) ];
if(cachedDate){
fieldModel.set('value', cachedDate, { silent: true });
}
return;
}
var cached=self.fieldCache[ fieldId ];
if(! cached) return;
var el=fieldModel.get('el');
var $el=jQuery(el);
var domAvailable=$el.length&&$el.find('.hour').length&&$el.closest('body').length;
if(domAvailable){
return;
}
if('time_only'===dateMode){
var timeValue='';
if(cached.hour&&cached.minute){
timeValue=cached.hour + ':' + cached.minute;
if(cached.ampm){
timeValue +=' ' + cached.ampm;
}}
fieldModel.set('value', timeValue);
}else{
fieldModel.set('value', {
date: cached.date||'',
hour: cached.hour||'',
minute: cached.minute||'',
ampm: cached.ampm||''
});
}
var originalGetValue=fieldModel.getValue;
fieldModel.getValue=function(){
var val=this.get('value');
if(typeof val==='object'&&val!==null){
var result=val.date||'';
if(val.hour&&val.minute){
result +=' ' + val.hour + ':' + val.minute;
}
if(val.ampm){
result +=' ' + val.ampm;
}
return result;
}
return val;
};});
}});
return controller;
});
define(
'controllers/loadControllers',[
'controllers/conditionalLogic',
'controllers/renderRecaptcha',
'controllers/renderTurnstile',
'controllers/renderHelpText',
'controllers/fieldValuePreserver'
],
function
(
ConditionalLogic,
RenderRecaptcha,
RenderTurnstile,
RenderHelpText,
FieldValuePreserver
){
var controller=Marionette.Object.extend({
initialize: function(){
new ConditionalLogic();
new RenderRecaptcha();
new RenderTurnstile();
new RenderHelpText();
new FieldValuePreserver();
}});
return controller;
});
var nfRadio=Backbone.Radio;
require([ 'controllers/loadFilters', 'controllers/loadControllers' ], function(LoadFilters, LoadControllers){
var NFMultiPart=Marionette.Application.extend({
initialize: function(options){
this.listenTo(nfRadio.channel('form'), 'before:filterData', this.loadFilters);
this.listenTo(nfRadio.channel('form'), 'loaded', this.loadControllers);
},
loadFilters: function(formModel){
new LoadFilters();
},
loadControllers: function(formModel){
new LoadControllers();
},
onStart: function(){
}});
var nfMultiPart=new NFMultiPart();
nfMultiPart.start();
});
define("main", function(){});
}());
!function(){var e,t,i;!function(n){function o(e,t){return M.call(e,t)}function l(e,t){var i,n,o,l,r,s,c,f,d,a,u,h=t&&t.split("/"),m=v.map,g=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(e=e.split("/"),r=e.length-1,v.nodeIdCompat&&b.test(e[r])&&(e[r]=e[r].replace(b,"")),e=h.slice(0,h.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(u=e[d]))e.splice(d,1),d-=1;else if(".."===u){if(1===d&&(".."===e[2]||".."===e[0]))break;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||g)&&m){for(i=e.split("/"),d=i.length;d>0;d-=1){if(n=i.slice(0,d).join("/"),h)for(a=h.length;a>0;a-=1)if((o=m[h.slice(0,a).join("/")])&&(o=o[n])){l=o,s=d;break}if(l)break;!c&&g&&g[n]&&(c=g[n],f=d)}!l&&c&&(l=c,s=f),l&&(i.splice(0,s,l),e=i.join("/"))}return e}function r(e,t){return function(){var i=y.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),h.apply(n,i.concat([e,t]))}}function s(e){return function(t){return l(t,e)}}function c(e){return function(t){p[e]=t}}function f(e){if(o(w,e)){var t=w[e];delete w[e],C[e]=!0,u.apply(n,t)}if(!o(p,e)&&!o(C,e))throw new Error("No "+e);return p[e]}function d(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function a(e){return function(){return v&&v.config&&v.config[e]||{}}}var u,h,m,g,p={},w={},v={},C={},M=Object.prototype.hasOwnProperty,y=[].slice,b=/\.js$/;m=function(e,t){var i,n=d(e),o=n[0];return e=n[1],o&&(o=l(o,t),i=f(o)),o?e=i&&i.normalize?i.normalize(e,s(t)):l(e,t):(e=l(e,t),n=d(e),o=n[0],e=n[1],o&&(i=f(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:i}},g={require:function(e){return r(e)},exports:function(e){var t=p[e];return void 0!==t?t:p[e]={}},module:function(e){return{id:e,uri:"",exports:p[e],config:a(e)}}},u=function(e,t,i,l){var s,d,a,u,h,v,M=[],y=typeof i;if(l=l||e,"undefined"===y||"function"===y){for(t=!t.length&&i.length?["require","exports","module"]:t,h=0;h<t.length;h+=1)if(u=m(t[h],l),"require"===(d=u.f))M[h]=g.require(e);else if("exports"===d)M[h]=g.exports(e),v=!0;else if("module"===d)s=M[h]=g.module(e);else if(o(p,d)||o(w,d)||o(C,d))M[h]=f(d);else{if(!u.p)throw new Error(e+" missing "+d);u.p.load(u.n,r(l,!0),c(d),{}),M[h]=p[d]}a=i?i.apply(p[e],M):void 0,e&&(s&&s.exports!==n&&s.exports!==p[e]?p[e]=s.exports:a===n&&v||(p[e]=a))}else e&&(p[e]=i)},e=t=h=function(e,t,i,o,l){if("string"==typeof e)return g[e]?g[e](t):f(m(e,t).f);if(!e.splice){if(v=e,v.deps&&h(v.deps,v.callback),!t)return;t.splice?(e=t,t=i,i=null):e=n}return t=t||function(){},"function"==typeof i&&(i=o,o=l),o?u(n,e,t,i):setTimeout(function(){u(n,e,t,i)},4),h},h.config=function(e){return h(e)},e._defined=p,i=function(e,t,i){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(i=t,t=[]),o(p,e)||o(w,e)||(w[e]=[e,t,i])},i.amd={jQuery:!0}}(),i("../lib/almond",function(){}),i("views/cellComposite",[],function(){return Marionette.CompositeView.extend({template:"#nf-tmpl-cell",className:"nf-cell",getChildView:function(){return n.channel("views").request("get:fieldLayout")},initialize:function(){this.collection=this.model.get("fields"),jQuery(this.el).css("width",this.model.get("width")+"%")},onRender:function(){0==this.collection.length&&jQuery(this.el).html("&nbsp;")},attachHtml:function(e,t){jQuery(e.el).find("nf-fields").append(t.el)}})}),i("views/rowComposite",["views/cellComposite"],function(e){return Marionette.CompositeView.extend({template:"#nf-tmpl-row",childView:e,className:"nf-row",initialize:function(){this.collection=this.model.get("cells")},onAttach:function(){1<this.collection.length&&jQuery(this.el).closest(".nf-form-wrap").addClass("nf-multi-cell")},attachHtml:function(e,t){jQuery(e.el).find("nf-cells").append(t.el)}})}),i("views/rowCollection",["views/rowComposite"],function(e){return Marionette.CollectionView.extend({tagName:"nf-rows-wrap",childView:e})}),i("models/cellFieldCollection",[],function(){return Backbone.Collection.extend({comparator:"order",initialize:function(e,t){this.cellModel=t.cellModel,_.each(e,function(e){e.set("cellcid",this.cellModel.cid,{silent:!0})},this),this.listenTo(this.cellModel.collection.rowModel.collection,"validate:fields",this.validateFields),this.listenTo(this.cellModel.collection.rowModel.collection,"show:fields",this.showFields),this.listenTo(this.cellModel.collection.rowModel.collection,"hide:fields",this.hideFields),this.cellModel.collection.formModel.get("fields").on("reset",this.resetCollection,this)},validateFields:function(){_.each(this.models,function(e){if("repeater"===e.get("type")){const t=n.channel("field-repeater").request("get:repeaterFieldsModelsArrayByForm",e.get("formID"));_.each(t,function(e){e.set("clean",!1),n.channel("submit").trigger("validate:field",e)})}else e.set("clean",!1),n.channel("submit").trigger("validate:field",e)},this)},showFields:function(){this.invoke("set",{visible:!0}),this.invoke(function(){this.trigger("change:value",this)})},hideFields:function(){this.invoke("set",{visible:!1}),this.invoke(function(){this.trigger("change:value",this)})},resetCollection:function(e){var t=[];_.each(this.models,function(i){"submit"!=i.get("type")?t.push(e.findWhere({key:i.get("key")})):t.push(i)}),this.reset(t)}})}),i("models/cellModel",["models/cellFieldCollection"],function(e){return Backbone.Model.extend({initialize:function(){var t=this.collection.formModel.get("fields"),i=[];_.each(this.get("fields"),function(e){if(void 0===t.get(e)){var n=t.findWhere({key:e});void 0!==n&&i.push(n)}else i.push(t.get(e))}),this.set("fields",new e(i,{cellModel:this})),this.set("order",Number(this.get("order"))),this.listenTo(this.get("fields"),"change:errors",this.triggerErrors)},triggerErrors:function(e){this.collection.trigger("change:errors",e)}})}),i("models/cellCollection",["models/cellModel"],function(e){return Backbone.Collection.extend({model:e,comparator:"order",initialize:function(e,t){this.rowModel=t.rowModel,this.formModel=t.formModel}})}),i("models/rowModel",["models/cellCollection"],function(e){return Backbone.Model.extend({initialize:function(){this.set("cells",new e(this.get("cells"),{rowModel:this,formModel:this.collection.formModel})),this.set("order",Number(this.get("order"))),this.listenTo(this.get("cells"),"change:errors",this.triggerErrors)},triggerErrors:function(e){this.collection.trigger("change:errors",e)}})}),i("models/rowCollection",["models/rowModel"],function(e){return Backbone.Collection.extend({model:e,comparator:"order",initialize:function(e,t){this.formModel=t.formModel},validateFields:function(){this.trigger("validate:fields",this)},showFields:function(){this.trigger("show:fields",this)},hideFields:function(){this.trigger("hide:fields",this)}})}),i("controllers/formContentFilters",["views/rowCollection","models/rowCollection"],function(e,t){return Marionette.Object.extend({initialize:function(){n.channel("formContent").request("add:viewFilter",this.getFormContentView,4),n.channel("formContent").request("add:loadFilter",this.formContentLoad,4),n.channel("fieldContents").request("add:viewFilter",this.getFormContentView,4),n.channel("fieldContents").request("add:loadFilter",this.formContentLoad,4)},getFormContentView:function(t){return e},formContentLoad:function(e,i,o,l){if(!0==e instanceof t)return e;var r=n.channel("formContent").request("get:loadFilters"),s=void 0!==r[1];!s&&_.isArray(e)&&0!=_.isArray(e).length&&void 0!==_.first(e)&&"part"==_.first(e).type&&(e=_.flatten(_.pluck(e,"formContentData"))),o=o||!1,l=l||!1;var c=[];return _.isArray(e)&&0!=e.length&&void 0===e[0].cells?_.each(e,function(e,t){c.push({order:t,cells:[{order:0,fields:[e],width:"100"}]})}):c=_.isEmpty(c)&&"undefined"!=typeof nfLayouts&&!s?nfLayouts.rows:e,new t(c,{formModel:i})}})}),i("controllers/loadControllers",["controllers/formContentFilters"],function(e){return Marionette.Object.extend({initialize:function(){new e}})});var n=Backbone.Radio;t(["controllers/loadControllers"],function(e){(new(Marionette.Application.extend({initialize:function(e){this.listenTo(n.channel("form"),"before:filterData",this.loadControllers)},loadControllers:function(t){new e}}))).start()}),i("main",function(){})}();
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,mute:1,wmode:"transparent"},events:{onReady(e){let t=e.target,i=t.getIframe(),o=(t.mute(),setInterval(()=>{var e;document.body.contains(i)?0<(e=t.getDuration())&&t.getCurrentTime()>e-.5&&t.seekTo(0):clearInterval(o)},250))},onStateChange(e){YT.PlayerState.ENDED===e.data&&(e.target.seekTo(0),e.target.playVideo())}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t=e.innerWidth(),i=e.innerHeight(),o=Math.max(i,t/(16/9)),n=o*(16/9),o=Math.round(o),n=Math.round(3*n);e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:-Math.round((n-t)/2)+"px",marginTop:-Math.round((o-i)/2)+"px",width:n+"px",height:o+"px"})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);
(a=>{var r,t,e,n;function o(n,i){var o=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=a(this),e=t.data("vc.accordion");e||(e=new r(t,a.extend(!0,{},i)),t.data("vc.accordion",e)),"string"==typeof n&&e[n].apply(e,o)})}(r=function(t){this.$element=t,this.activeClass="vc_active",this.animatingClass="vc_animating",this.useCacheFlag=void 0,this.$target=void 0,this.$targetContent=void 0,this.selector=void 0,this.$container=void 0,this.animationDuration=void 0,this.index=0}).transitionEvent=function(){var t,e=document.createElement("vcFakeElement"),n={transition:"transitionend",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(void 0!==e.style[t])return n[t]},r.emulateTransitionEnd=function(t,e){var n=!1;e=e||250,t.one(r.transitionName,function(){n=!0}),setTimeout(function(){n||t.trigger(r.transitionName)},e)},r.DEFAULT_TYPE="collapse",r.transitionName=r.transitionEvent(),r.prototype.controller=function(t){var e=this.$element,n=t;"string"==typeof(n=void 0===(n="string"!=typeof n?e.data("vcAction")||this.getContainer().data("vcAction"):n)?r.DEFAULT_TYPE:n)&&o.call(e,n,t)},r.prototype.isCacheUsed=function(){var t=this;return void 0===this.useCacheFlag&&(this.useCacheFlag=function(){return!1!==t.$element.data("vcUseCache")}()),this.useCacheFlag},r.prototype.getSelector=function(){var e=this.$element,t=function(){var t=e.data("vcTarget");return t=t||e.attr("href")};return this.isCacheUsed()?(void 0===this.selector&&(this.selector=t()),this.selector):t()},r.prototype.findContainer=function(){var t=this.$element.closest(this.$element.data("vcContainer"));return t=t.length?t:a("body")},r.prototype.getContainer=function(){return this.isCacheUsed()?(void 0===this.$container&&(this.$container=this.findContainer()),this.$container):this.findContainer()},r.prototype.getTarget=function(){var e=this,n=e.getSelector(),t=function(){var t=e.getContainer().find(n);return t=t.length?t:e.getContainer().filter(n)};return this.isCacheUsed()?(void 0===this.$target&&(this.$target=t()),this.$target):t()},r.prototype.getTargetContent=function(){var t,e=this.getTarget();return this.isCacheUsed()?(void 0===this.$targetContent&&((t=e).data("vcContent")&&!(t=e.find(e.data("vcContent"))).length&&(t=e),this.$targetContent=t),this.$targetContent):e.data("vcContent")&&(t=e.find(e.data("vcContent"))).length?t:e},r.prototype.getTriggers=function(){var n=0;return this.getContainer().find("[data-vc-accordion]").each(function(){var t=a(this),e=t.data("vc.accordion");void 0===e&&(t.vcAccordion(),e=t.data("vc.accordion")),e&&e.setIndex&&e.setIndex(n++)})},r.prototype.setIndex=function(t){this.index=t},r.prototype.getIndex=function(){return this.index},r.prototype.triggerEvent=function(t,e){"string"==typeof t&&(t=a.Event(t),this.$element.trigger(t,e))},r.prototype.getActiveTriggers=function(){return this.getTriggers().filter(function(){var t=a(this).data("vc.accordion");return t.getTarget().hasClass(t.activeClass)})},r.prototype.changeLocationHash=function(){var t,e=this.getTarget();(t=e.length?e.attr("id"):t)&&(history.pushState?history.pushState(null,null,"#"+t):location.hash="#"+t)},r.prototype.isActive=function(){return this.getTarget().hasClass(this.activeClass)},r.prototype.getAnimationDuration=function(){var t=this,e=function(){return void 0===r.transitionName?"0s":t.getTargetContent().css("transition-duration").split(",")[0]};return this.isCacheUsed()?(void 0===this.animationDuration&&(this.animationDuration=e()),this.animationDuration):e()},r.prototype.getAnimationDurationMilliseconds=function(){var t=this.getAnimationDuration();return"ms"===t.substr(-2)?parseInt(t):"s"===t.substr(-1)?Math.round(1e3*parseFloat(t)):void 0},r.prototype.isAnimated=function(){return 0<parseFloat(this.getAnimationDuration())},r.prototype.show=function(e){var n=this,i=n.getTarget(),o=n.getTargetContent();n.isActive()||(n.isAnimated()?(n.triggerEvent("beforeShow.vc.accordion"),i.queue(function(t){o.one(r.transitionName,function(){i.removeClass(n.animatingClass),o.attr("style",""),n.triggerEvent("afterShow.vc.accordion",e)}),r.emulateTransitionEnd(o,n.getAnimationDurationMilliseconds()+100),t()}).queue(function(t){o.attr("style",""),o.css({position:"absolute",visibility:"hidden",display:"block"});var e=o.height();o.data("vcHeight",e),o.attr("style",""),t()}).queue(function(t){o.height(0),o.css({"padding-top":0,"padding-bottom":0}),t()}).queue(function(t){i.addClass(n.animatingClass),i.addClass(n.activeClass),("object"==typeof e&&e.hasOwnProperty("changeHash")&&e.changeHash||void 0===e)&&n.changeLocationHash(),n.triggerEvent("show.vc.accordion",e),t()}).queue(function(t){var e=o.data("vcHeight");o.animate({height:e},{duration:n.getAnimationDurationMilliseconds(),complete:function(){o.data("events")||o.attr("style","")}}),o.css({"padding-top":"","padding-bottom":""}),t()})):(i.addClass(n.activeClass),n.triggerEvent("show.vc.accordion",e)))},r.prototype.hide=function(e){var n=this,i=n.getTarget(),o=n.getTargetContent();n.isActive()&&(n.isAnimated()?(n.triggerEvent("beforeHide.vc.accordion"),i.queue(function(t){o.one(r.transitionName,function(){i.removeClass(n.animatingClass),o.attr("style",""),n.triggerEvent("afterHide.vc.accordion",e)}),r.emulateTransitionEnd(o,n.getAnimationDurationMilliseconds()+100),t()}).queue(function(t){i.addClass(n.animatingClass),i.removeClass(n.activeClass),n.triggerEvent("hide.vc.accordion",e),t()}).queue(function(t){var e=o.height();o.height(e),t()}).queue(function(t){o.animate({height:0},n.getAnimationDurationMilliseconds()),o.css({"padding-top":0,"padding-bottom":0}),t()})):(i.removeClass(n.activeClass),n.triggerEvent("hide.vc.accordion",e)))},r.prototype.toggle=function(t){var e=this.$element;this.isActive()?o.call(e,"hide",t):o.call(e,"show",t)},r.prototype.dropdown=function(e){let n=this,i=n.getTarget();n.isActive()?(i.removeClass(n.activeClass),n.triggerEvent("hide.vc.accordion",e),a(document).off("click.vc.accordion.data-api.dropdown")):(i.addClass(n.activeClass),n.triggerEvent("show.vc.accordion",e),a(document).on("click.vc.accordion.data-api.dropdown",function(t){a(t.target).closest(i).length||a(t.target).closest(n.$element).length||(i.removeClass(n.activeClass),n.triggerEvent("hide.vc.accordion",e),a(document).off("click.vc.accordion.data-api.dropdown"))}))},r.prototype.collapse=function(t){var e=this.$element,n=this.getActiveTriggers().filter(function(){return e[0]!==this});n.length&&o.call(n,"hide",t),o.call(e,"show",t)},r.prototype.collapseAll=function(t){var e=this.$element,n=this.getActiveTriggers().filter(function(){return e[0]!==this});n.length&&o.call(n,"hide",t),o.call(e,"toggle",t)},r.prototype.showNext=function(t){var e,n=this.getTriggers(),i=this.getActiveTriggers();n.length&&(-1<(e=i.length&&(i=i.eq(i.length-1).vcAccordion().data("vc.accordion"))&&i.getIndex?i.getIndex():e)&&e+1<n.length?o.call(n.eq(e+1),"controller",t):o.call(n.eq(0),"controller",t))},r.prototype.showPrev=function(t){var e,n=this.getTriggers(),i=this.getActiveTriggers();n.length&&(i.length&&(i=i.eq(i.length-1).vcAccordion().data("vc.accordion"))&&i.getIndex&&(e=i.getIndex()),o.call(-1<e?0<=e-1?n.eq(e-1):n.eq(n.length-1):n.eq(0),"controller",t))},r.prototype.showAt=function(t,e){var n=this.getTriggers();n.length&&t&&t<n.length&&o.call(n.eq(t),"controller",e)},r.prototype.scrollToActive=function(t){var e,n;(void 0===t||void 0===t.scrollTo||t.scrollTo)&&(0,(n=a((e=this).getTarget())).length)&&this.$element.length&&setTimeout(function(){n.offset().top-a(window).scrollTop()-+e.$element.outerHeight()<0&&a("html, body").animate({scrollTop:n.offset().top-+e.$element.outerHeight()},300)},300)},e=a.fn.vcAccordion,a.fn.vcAccordion=o,a.fn.vcAccordion.Constructor=r,a.fn.vcAccordion.noConflict=function(){return a.fn.vcAccordion=e,this},t=function(t){var e=a(this);t.preventDefault(),o.call(e,"controller")},n=function(){var t,e=window.location.hash;e&&(t=a(e)).length&&(e=t.find('[data-vc-accordion][href="'+e+'"],[data-vc-accordion][data-vc-target="'+e+'"]')).length&&(setTimeout(function(){a("html, body").animate({scrollTop:t.offset().top-.2*a(window).height()},0)},300),e.trigger("click"))},a(window).on("hashchange.vc.accordion",n),a(document).on("click.vc.accordion.data-api","[data-vc-accordion]",t),a(document).ready(n),a(document).on("afterShow.vc.accordion",function(t,e){o.call(a(t.target),"scrollToActive",e)})})(window.jQuery);
(n=>{var o,s,t;o=function(a,o){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=n(this),e=t.data("vc.tta.autoplay");e||(e=new s(t,n.extend(!0,{},s.DEFAULTS,t.data("vc-tta-autoplay"),o)),t.data("vc.tta.autoplay",e)),"string"==typeof a?e[a].apply(e,i):e.start(i)})},(s=function(t,e){this.$element=t,this.options=e}).DEFAULTS={delay:5e3,pauseOnHover:!0,stopOnClick:!0},s.prototype.show=function(){this.$element.find("[data-vc-accordion]:eq(0)").vcAccordion("showNext",{changeHash:!1,scrollTo:!1})},s.prototype.hasTimer=function(){return void 0!==this.$element.data("vc.tta.autoplay.timer")},s.prototype.setTimer=function(t){this.$element.data("vc.tta.autoplay.timer",t)},s.prototype.getTimer=function(){return this.$element.data("vc.tta.autoplay.timer")},s.prototype.deleteTimer=function(){this.$element.removeData("vc.tta.autoplay.timer")},s.prototype.start=function(){var e,a;e=this.$element,(a=this).hasTimer()||(this.setTimer(window.setInterval(this.show.bind(this),this.options.delay)),this.options.stopOnClick&&e.on("click.vc.tta.autoplay.data-api","[data-vc-accordion]",function(t){t&&t.preventDefault&&t.preventDefault(),a.hasTimer()&&o.call(e,"stop")}),this.options.pauseOnHover&&e.hover(function(t){t&&t.preventDefault&&t.preventDefault(),a.hasTimer()&&o.call(e,"mouseleave"===t.type?"resume":"pause")}))},s.prototype.resume=function(){this.hasTimer()&&this.setTimer(window.setInterval(this.show.bind(this),this.options.delay))},s.prototype.stop=function(){this.pause(),this.deleteTimer(),this.$element.off("click.vc.tta.autoplay.data-api mouseenter mouseleave")},s.prototype.pause=function(){var t=this.getTimer();void 0!==t&&window.clearInterval(t)},t=n.fn.vcTtaAutoPlay,n.fn.vcTtaAutoPlay=o,n.fn.vcTtaAutoPlay.Constructor=s,n.fn.vcTtaAutoPlay.noConflict=function(){return n.fn.vcTtaAutoPlay=t,this},n(document).ready(function(){n("[data-vc-tta-autoplay]").each(function(){n(this).vcTtaAutoPlay()})})})(window.jQuery);
(n=>{var o,t,e,a,i=n(document);function r(a,i){var r=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=n(this),e=t.data("vc.tabs");e||(e=new o(t,n.extend(!0,{},i)),t.data("vc.tabs",e)),"string"==typeof a&&e[a].apply(e,r)})}(o=function(t){this.$element=n(t),this.activeClass="vc_active",this.tabSelector="[data-vc-tab]",this.useCacheFlag=void 0,this.$target=void 0,this.selector=void 0,this.$targetTab=void 0,this.$relatedAccordion=void 0,this.$container=void 0}).prototype.isCacheUsed=function(){var t=this;return void 0===this.useCacheFlag&&(this.useCacheFlag=function(){return!1!==t.$element.data("vcUseCache")}()),this.useCacheFlag},o.prototype.getContainer=function(){return this.isCacheUsed()?(void 0===this.$container&&(this.$container=this.findContainer()),this.$container):this.findContainer()},o.prototype.findContainer=function(){var t=this.$element.closest(this.$element.data("vcContainer"));return t=t.length?t:n("body")},o.prototype.getContainerAccordion=function(){return this.getContainer().find("[data-vc-accordion]")},o.prototype.getSelector=function(){var e=this.$element,t=function(){var t=e.data("vcTarget");return t=t||e.attr("href")};return this.isCacheUsed()?(void 0===this.selector&&(this.selector=t()),this.selector):t()},o.prototype.getTarget=function(){var t=this.getSelector();return this.isCacheUsed()?(void 0===this.$target&&(this.$target=this.getContainer().find(t)),this.$target):this.getContainer().find(t)},o.prototype.getRelatedAccordion=function(){var a=this,t=function(){var t=a.getContainerAccordion().filter(function(){var t=n(this),e=t.data("vc.accordion");return void 0===e&&(t.vcAccordion(),e=t.data("vc.accordion")),a.getSelector()===e.getSelector()});if(t.length)return t};return this.isCacheUsed()?(void 0===this.$relatedAccordion&&(this.$relatedAccordion=t()),this.$relatedAccordion):t()},o.prototype.triggerEvent=function(t){"string"==typeof t&&(t=n.Event(t),this.$element.trigger(t))},o.prototype.getTargetTab=function(){var t=this.$element;return this.isCacheUsed()?(void 0===this.$targetTab&&(this.$targetTab=t.closest(this.tabSelector)),this.$targetTab):t.closest(this.tabSelector)},o.prototype.tabClick=function(){this.getRelatedAccordion().trigger("click")},o.prototype.show=function(){var t=this.getTargetTab();!t.hasClass(this.activeClass)&&(this.triggerEvent("show.vc.tab"),t.addClass(this.activeClass),t=t.find('[role="tab"]'))&&t.attr("aria-selected","true")},o.prototype.hide=function(){var t=this.getTargetTab();t.hasClass(this.activeClass)&&(this.triggerEvent("hide.vc.tab"),t.removeClass(this.activeClass),t=t.find('[role="tab"]'))&&t.attr("aria-selected","false")},t=n.fn.vcTabs,n.fn.vcTabs=r,n.fn.vcTabs.Constructor=o,n.fn.vcTabs.noConflict=function(){return n.fn.vcTabs=t,this},e=function(t){var e=n(this);t.preventDefault(),r.call(e,"tabClick")},a=function(t){var a=n(t.target).data("vc.accordion");a&&(void 0===a.getRelatedTab&&(a.getRelatedTab=function(){var t=function(){return a.getContainer().find("[data-vc-tabs]").filter(function(){var t=n(this),e=t.data("vc.accordion");return void 0===e&&t.vcAccordion(),(e=t.data("vc.accordion")).getSelector()===a.getSelector()})};return a.isCacheUsed()?(void 0===a.relatedTab&&(a.relatedTab=t()),a.relatedTab):t()}),r.call(a.getRelatedTab(),t.type))},i.ready(function(){document.querySelectorAll('.vc_tta-panel-body:not([role="tabpanel"])').forEach(function(t){var e=t.closest(".vc_tta-tabs");e&&e.querySelector(".vc_tta-tabs-container")&&"none"!==window.getComputedStyle(t.closest(".vc_tta-tabs").querySelector(".vc_tta-tabs-container")).display&&(t.setAttribute("role","tabpanel"),e=t.closest(".vc_tta-panel").getAttribute("id"))&&!t.hasAttribute("aria-labelledby")&&(e=document.querySelector("#tab-"+e))&&t.setAttribute("aria-labelledby",e.getAttribute("id"))})}),i.on("click.vc.tabs.data-api","[data-vc-tabs]",e),i.on("show.vc.accordion hide.vc.accordion",a)})(window.jQuery);
(()=>{var e=0,r={};function i(t){if(!t)throw new Error("No options passed to Waypoint constructor");if(!t.element)throw new Error("No element option passed to Waypoint constructor");if(!t.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=i.Adapter.extend({},i.defaults,t),this.element=this.options.element,this.adapter=new i.Adapter(this.element),this.callback=t.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=i.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=i.Context.findOrCreateByElement(this.options.context),i.offsetAliases[this.options.offset]&&(this.options.offset=i.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),r[this.key]=this,e+=1}i.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},i.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},i.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete r[this.key]},i.prototype.disable=function(){return this.enabled=!1,this},i.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},i.prototype.next=function(){return this.group.next(this)},i.prototype.previous=function(){return this.group.previous(this)},i.invokeAll=function(t){var e,i=[];for(e in r)i.push(r[e]);for(var o=0,n=i.length;o<n;o++)i[o][t]()},i.destroyAll=function(){i.invokeAll("destroy")},i.disableAll=function(){i.invokeAll("disable")},i.enableAll=function(){for(var t in i.Context.refreshAll(),r)r[t].enabled=!0;return this},i.refreshAll=function(){i.Context.refreshAll()},i.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},i.viewportWidth=function(){return document.documentElement.clientWidth},i.adapters=[],i.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},i.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.VcWaypoint=i})(),(()=>{function e(t){window.setTimeout(t,1e3/60)}var i=0,o={},u=window.VcWaypoint,t=window.onload;function n(t){this.element=t,this.Adapter=u.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,u.windowContext||(u.windowContext=!0,u.windowContext=new n(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}n.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},n.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".vcwaypoints"),delete o[this.key])},n.prototype.createThrottledResizeHandler=function(){var t=this;function e(){t.handleResize(),t.didResize=!1}this.adapter.on("resize.vcwaypoints",function(){t.didResize||(t.didResize=!0,u.requestAnimationFrame(e))})},n.prototype.createThrottledScrollHandler=function(){var t=this;function e(){t.handleScroll(),t.didScroll=!1}this.adapter.on("scroll.vcwaypoints",function(){t.didScroll&&!u.isTouch||(t.didScroll=!0,u.requestAnimationFrame(e))})},n.prototype.handleResize=function(){u.Context.refreshAll()},n.prototype.handleScroll=function(){var t,e,i={},o={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(t in o){var n,r=o[t],s=r.newScroll>r.oldScroll?r.forward:r.backward;for(n in this.waypoints[t]){var a,l,h=this.waypoints[t][n];null!==h.triggerPoint&&(a=r.oldScroll<h.triggerPoint,l=r.newScroll>=h.triggerPoint,a&&l||!a&&!l)&&(h.queueTrigger(s),i[h.group.id]=h.group)}}for(e in i)i[e].flushTriggers();this.oldScroll={x:o.horizontal.newScroll,y:o.vertical.newScroll}},n.prototype.innerHeight=function(){return this.element==this.element.window?u.viewportHeight():this.adapter.innerHeight()},n.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},n.prototype.innerWidth=function(){return this.element==this.element.window?u.viewportWidth():this.adapter.innerWidth()},n.prototype.destroy=function(){var t,e=[];for(t in this.waypoints)for(var i in this.waypoints[t])e.push(this.waypoints[t][i]);for(var o=0,n=e.length;o<n;o++)e[o].destroy()},n.prototype.refresh=function(){var t,e,i=this.element==this.element.window,o=i?void 0:this.adapter.offset(),n={};for(e in this.handleScroll(),t={horizontal:{contextOffset:i?0:o.left,contextScroll:i?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:i?0:o.top,contextScroll:i?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var r,s=t[e];for(r in this.waypoints[e]){var a,l=this.waypoints[e][r],h=l.options.offset,p=l.triggerPoint,c=0,d=null==p;l.element!==l.element.window&&(c=l.adapter.offset()[s.offsetProp]),"function"==typeof h?h=h.apply(l):"string"==typeof h&&(h=parseFloat(h),-1<l.options.offset.indexOf("%"))&&(h=Math.ceil(s.contextDimension*h/100)),a=s.contextScroll-s.contextOffset,l.triggerPoint=Math.floor(c+a-h),c=p<s.oldScroll,a=l.triggerPoint>=s.oldScroll,h=!c&&!a,!d&&(c&&a)?(l.queueTrigger(s.backward),n[l.group.id]=l.group):(!d&&h||d&&s.oldScroll>=l.triggerPoint)&&(l.queueTrigger(s.forward),n[l.group.id]=l.group)}}return u.requestAnimationFrame(function(){for(var t in n)n[t].flushTriggers()}),this},n.findOrCreateByElement=function(t){return n.findByElement(t)||new n(t)},n.refreshAll=function(){for(var t in o)o[t].refresh()},n.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){t&&t(),n.refreshAll()},u.requestAnimationFrame=function(t){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||e).call(window,t)},u.Context=n})(),(()=>{function r(t,e){return t.triggerPoint-e.triggerPoint}function s(t,e){return e.triggerPoint-t.triggerPoint}var e={vertical:{},horizontal:{}},i=window.VcWaypoint;function o(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),e[this.axis][this.name]=this}o.prototype.add=function(t){this.waypoints.push(t)},o.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},o.prototype.flushTriggers=function(){for(var t in this.triggerQueues){var e=this.triggerQueues[t];e.sort("up"===t||"left"===t?s:r);for(var i=0,o=e.length;i<o;i+=1){var n=e[i];!n.options.continuous&&i!==e.length-1||n.trigger([t])}}this.clearTriggerQueues()},o.prototype.next=function(t){this.waypoints.sort(r);t=i.Adapter.inArray(t,this.waypoints);return t===this.waypoints.length-1?null:this.waypoints[t+1]},o.prototype.previous=function(t){this.waypoints.sort(r);t=i.Adapter.inArray(t,this.waypoints);return t?this.waypoints[t-1]:null},o.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},o.prototype.remove=function(t){t=i.Adapter.inArray(t,this.waypoints);-1<t&&this.waypoints.splice(t,1)},o.prototype.first=function(){return this.waypoints[0]},o.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},o.findOrCreate=function(t){return e[t.axis][t.name]||new o(t)},i.Group=o})(),(()=>{var i=window.jQuery,t=window.VcWaypoint;function o(t){this.$element=i(t)}i.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,e){o.prototype[e]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,t)}}),i.each(["extend","inArray","isEmptyObject"],function(t,e){o[e]=i[e]}),t.adapters.push({name:"jquery",Adapter:o}),t.Adapter=o})(),(()=>{var n=window.VcWaypoint;function t(o){return function(){var e=[],i=arguments[0];return o.isFunction(arguments[0])&&((i=o.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var t=o.extend({},i,{element:this});"string"==typeof t.context&&(t.context=o(this).closest(t.context)[0]),e.push(new n(t))}),e}}window.jQuery&&(window.jQuery.fn.vcwaypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.vcwaypoint=t(window.Zepto))})();