(function($){
$.fn.evoGenmaps=function(opt){
var defaults={
delay:	0,
fnt:	5,
cal:	'',
SC: 	'',
map_canvas_id:	'',
location_type:'',
address:'',
styles:'',
zoomlevel:'',
mapformat:'',
scroll:false,
iconURL:'',
trigger_point: '',
};
var options=$.extend({}, defaults, opt);
var geocoder;
var code={};
obj=this;
code.obj=this;
mapBox=$('#'+options.map_canvas_id);
code={
init:function(){
if(!mapBox.is(':visible')||mapBox.find('.gm-style').length > 0) return;
mapBox.html(evo_general_params.html.preload_gmap);
options.cal=obj.closest('.ajde_evcal_calendar').length ? obj.closest('.ajde_evcal_calendar'):options.cal;
code.process_SC();
if(options.fnt==5){
if(options.delay==0){	code.draw_map();	}else{
setTimeout(code.draw_map, options.delay, this);
}}
if(options.fnt==1){
code.load_gmap();
}
if(options.fnt==2){
if(options.delay==0){	code.load_gmap();	}else{
setTimeout(code.load_gmap, options.delay, this);
}}
if(options.fnt==3){	code.load_gmap();	}
if(options.fnt==4){
if(this.attr('data-gmtrig')=='1'&&this.attr('data-gmap_status')!='null'){
code.load_gmap();
}}
},
process_unique_map_id: function(){
var map_element=obj.closest('.eventon_list_event').find('.evo_metarow_gmap');
if(!map_element.length||!map_element.attr('id')) return false;
var map_element=obj.closest('.eventon_list_event').find('.evo_metarow_gmap');
var randomnumber=Math.floor(Math.random() * (99 - 10 + 1)) + 10;
options.map_canvas_id=map_element.attr('id') + '_' + randomnumber;
map_element.attr('id', options.map_canvas_id);
return options.map_canvas_id;
},
process_SC: function(){
if(options.SC||!options.cal) return;
options.SC=options.cal.evo_shortcode_data();
},
load_gmap: function(){
var SC=options.SC,
ev_location=obj.find('.event_location_attrs'),
location_type=ev_location.attr('data-location_type');
options.address=location_type=='address' ? ev_location.attr('data-location_address'):ev_location.attr('data-latlng');
options.location_type=location_type=='address' ? 'add':'latlng';
options.iconURL=SC&&SC.mapiconurl ? SC.mapiconurl:options.iconURL;
if(!options.address){
console.log('Location address missing in options.address');
return false;
}
var map_canvas_id=code.process_unique_map_id();
if(!map_canvas_id||!$('#' + map_canvas_id).length){
console.log('Map element with id missing in page');
return false;
}
options.zoomlevel=SC&&SC.mapzoom ? parseInt(SC.mapzoom):12;
options.scroll=SC.mapscroll;
options.mapformat=SC.mapformat;
code.draw_map();
},
draw_map: function(){
if(!options.map_canvas_id||$('body').find('#'+options.map_canvas_id).length==0){
console.log('Map element with id missing in page'); return false;
}
if(typeof gmapstyles!=='undefined'&&gmapstyles!='default'){
options.styles=JSON.parse(gmapstyles);
}
var myOptions={
mapTypeId: options.mapformat,
zoom: options.zoomlevel,
scrollwheel: options.scroll!='false',
zoomControl: true,
draggable: options.scroll!='false',
mapId: 'DEMO_MAP_ID'
};
var map_canvas=document.getElementById(options.map_canvas_id),
map=new google.maps.Map(map_canvas, myOptions),
geocoder=new google.maps.Geocoder();
var directionsService=new google.maps.DirectionsService();
var directionsRenderer=new google.maps.DirectionsRenderer({
map: map,
panel: document.getElementById('directions-panel-' + options.map_canvas_id)
});
$('#get-directions-' + options.map_canvas_id).on('click', function(){
var userAddress=$('#user-address-' + options.map_canvas_id).val();
if(!userAddress.trim()){
alert('Please enter a starting address');
return;
}
geocoder.geocode({ 'address': userAddress }, function(userResults, userStatus){
if(userStatus!==google.maps.GeocoderStatus.OK){
alert('Invalid starting address');
return;
}
var eventLocation;
if(options.location_type==='latlng'&&options.address){
var latlngStr=options.address.split(',');
eventLocation=new google.maps.LatLng(parseFloat(latlngStr[0]), parseFloat(latlngStr[1]));
}else{
geocoder.geocode({ 'address': options.address }, function(eventResults, eventStatus){
if(eventStatus===google.maps.GeocoderStatus.OK){
eventLocation=eventResults[0].geometry.location;
code.renderDirections(directionsService, directionsRenderer, userResults[0].geometry.location, eventLocation);
}});
return;
}
code.renderDirections(directionsService, directionsRenderer, userResults[0].geometry.location, eventLocation);
});
});
code.renderDirections=function(directionsService, directionsRenderer, origin, destination){
var request={
origin: origin,
destination: destination,
travelMode: google.maps.TravelMode.DRIVING
};
directionsService.route(request, function(result, status){
if(status===google.maps.DirectionsStatus.OK){
directionsRenderer.setDirections(result);
}else{
alert('Directions could not be calculated: ' + status);
}});
};
if(options.location_type=='latlng'&&options.address!==undefined){
var latlngStr=options.address.split(",",2);
var lat=parseFloat(latlngStr[0]);
var lng=parseFloat(latlngStr[1]);
var latlng=new google.maps.LatLng(lat, lng);
geocoder.geocode({'latLng': latlng}, function(results, status){
if(status==google.maps.GeocoderStatus.OK){
let markerOptions={
map: map,
position: latlng
};
if(options.iconURL&&options.iconURL.trim()!==''){
var img=new Image();
img.src=options.iconURL;
img.onload=function (){
var imgWidth=img.width;
var imgHeight=img.height;
var customIcon=document.createElement('div');
customIcon.className='custom-marker';
customIcon.style.width=imgWidth + 'px';
customIcon.style.height=imgHeight + 'px';
customIcon.style.backgroundImage=`url(${options.iconURL})`;
customIcon.style.backgroundSize='cover';
customIcon.style.position='absolute';
markerOptions.content=customIcon;
const marker=new google.maps.marker.AdvancedMarkerElement(markerOptions);
map.setCenter(marker.position);
};
img.onerror=function (){
console.error("Error loading marker image: " + options.iconURL);
const marker=new google.maps.marker.AdvancedMarkerElement(markerOptions);
map.setCenter(marker.position);
};}else{
const marker=new google.maps.marker.AdvancedMarkerElement(markerOptions);
map.setCenter(marker.position);
}}else{
map_canvas.style.display='none';
}});
}else if(options.address==''){
}else{
geocoder.geocode({ 'address': options.address}, function(results, status){
if(status==google.maps.GeocoderStatus.OK){
map.setCenter(results[0].geometry.location);
new google.maps.Marker({
map: map,
position: results[0].geometry.location,
icon: options.iconURL
});
}else{	map_canvas.style.display='none';		}});
}
$('#'+ options.map_canvas_id).addClass('mDrawn');
}}
code.init();
};
$.fn.evo_load_gmap=function(opt){
var defs={ map_canvas_id: '', delay: 0, trigger_point: '' },
OO=$.extend({}, defs, opt),
EL=this,
EL_id=OO.map_canvas_id||EL.attr('id'),
location_type=EL.data('location_type')=='add' ? 'add':'latlng',
address=location_type=='add' ? EL.data('address'):EL.data('latlng'),
scrollwheel=EL.data('scroll')=='yes',
elms=document.querySelectorAll("[id='" + EL_id + "']");
if(elms.length > 1){
var randomnumber=Math.floor(Math.random() * (99 - 10 + 1)) + 10;
EL_id=EL_id + '_' + randomnumber;
EL.attr('id', EL_id);
}
var __delay=OO.delay||EL.data('delay')||0;
let mapData={
map_canvas_id: EL_id,
cal: OO.cal,
fnt: 5,
location_type: location_type,
address: address,
zoomlevel: parseInt(EL.data('zoom')),
mapformat: EL.data('mty'),
scroll: scrollwheel,
iconURL: EL.data('mapicon')||'',
delay: __delay,
trigger_point: OO.trigger_point
};
EL.evoGenmaps(mapData);
};}(jQuery));
jQuery(document).ready(function($){
const BB=$('body');
$.fn.evo_cal_functions=function(O){
const el=this;
switch(O.action){
case 'load_shortcodes':
return el.find('.evo_cal_data').data('sc');
break;
case 'update_json':
el.find('.evo_cal_events').data('events', O.json);
break;
case 'update_shortcodes':
el.find('.evo_cal_data').data('sc', O.SC);
break;
}};
$.fn.evo_get_global=function(opt){
var defaults={ S1:'', S2:''};
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!(OPT.S1 in BUS)) return false;
if(!(OPT.S2 in BUS[OPT.S1])) return false;
return BUS[OPT.S1][OPT.S2];
}
$.fn.evo_get_txt=function(opt){
var defaults={ V:''}
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!('txt' in BUS)) return false;
if(!(OPT.V in BUS.txt)) return false;
return BUS.txt[OPT.V];
}
$.fn.evo_lang=function(text){
var t=text.toLowerCase()
.replace(/ /g, "_")
.replace(/[^\w-]+/g, "");
var BUS=$('#evo_global_data').data('d');
if(!('txt' in BUS)) return text;
if(!(t in BUS.txt)) return text;
return BUS.txt[ t ];
}
$.fn.evo_get_cal_def=function(opt){
var defaults={ V:''}
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!('cal_def' in BUS)) return false;
if(!(OPT.V in BUS.cal_def)) return false;
return BUS.cal_def[OPT.V];
}
$.fn.evo_get_dms_vals=function(opt){
var defaults={ type:'d', V:''}
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!('dms' in BUS)) return false;
if(!(OPT.type in BUS.dms)) return false;
return BUS.dms[ OPT.type ][ OPT.V ];
}
$.fn.evo_admin_get_ajax=function(opt){
var el=$(this);
var OO=this.evo_process_ajax_params(opt);
var _lbdata=OO.lbdata;
var _adata=OO.adata;
var _populate_id=OO._populate_id;
var customBefore=typeof opt.onBefore==='function' ? opt.onBefore:null;
var customSuccess=typeof opt.onSuccess==='function' ? opt.onSuccess:(typeof opt.success==='function' ? opt.success:null);
var customSuccess_Extra=typeof opt.successExtra==='function' ? opt.successExtra:null;
var customComplete=typeof opt.onComplete==='function' ? opt.onComplete:null;
var ajax_url=el.evo_get_ajax_url({a: _adata.a, e: _adata.end, type: _adata.ajax_type});
var LB=false;
if(_lbdata.class!='') LB=$('body').find('.evo_lightbox.'+ _lbdata.class);
let ajaxResponse='';
$.ajax({
beforeSend: function(){
if(customBefore){   customBefore.call(el, OO, LB); }
el.evo_perform_ajax_run_loader(OO, LB, 'start');
},
type: 'POST', url: ajax_url, data: _adata.data,	dataType:'json',
success:function(data){
ajaxResponse=data;
if(customSuccess){
customSuccess.call(el, OO, data, LB);
$('body').trigger('evo_ajax_success_' + OO.uid,[ OO, data , el]);
}else{
el.evo_perform_ajax_success(OO, data, LB);
if(customSuccess_Extra) customSuccess_Extra.call(el, OO, data, LB);
}},complete:function(){
if(customComplete){     customComplete.call(el, OO, ajaxResponse, LB);  }
el.evo_perform_ajax_run_loader(OO, LB, 'end');
}});
}
$.fn.evo_ajax_form_submit=function(opt , boxtype , formObj){
const el=this;
var OO=this.evo_process_ajax_params(opt);
var _lbdata=OO.lbdata;
var _spdata=OO.spdata;
var _adata=OO.adata;
var _populate_id=OO._populate_id;
var parent='';
if(boxtype=='sp') parent=el.closest('.evosp_in');
if(boxtype=='lb'){
parent=el.closest('.evo_lightbox');
if(_lbdata.class!='') parent=$('body').find('.evo_lightbox.'+ _lbdata.class);
}
var form=parent.find('form');
if(formObj!==undefined) form=formObj;
if(form.length==0){ console.log('No Fom object found'); return;}
if(el.hasClass('validate')){
var hasError=false;
$('body').trigger('evo_elm_form_presubmit_validation', [form, function(isValid){
hasError=isValid ? false: true;
}]);
if(hasError){
el.evo_snackbar('Required fields missing');
return;
}}
if(boxtype=='lb') parent.evo_lightbox_hide_msg();
var ajax_url=el.evo_get_ajax_url({a: _adata.a, e: _adata.end, type: _adata.ajax_type});
var extra_ajax_data=('data' in _adata) ? _adata.data:null;
let ajaxResponse='';
form.ajaxSubmit({
beforeSubmit: function(opt, xhr){
el.evo_perform_ajax_run_loader(OO, parent, 'start', boxtype);
},
dataType: 	'json',
url: ajax_url,	type: 	'POST',
data: extra_ajax_data,
success:function(data){
ajaxResponse=data;
el.evo_perform_ajax_success(OO, data, parent , boxtype);
},
complete:function(){
el.evo_perform_ajax_run_loader(OO, parent, 'end' , boxtype , ajaxResponse);
}});
}
$.fn.evo_ajax_lightbox_form_submit=function(opt , formObj){
this.evo_ajax_form_submit(opt, 'lb', formObj);
}
$.fn.evo_perform_ajax_run_loader=function(OO , LB, type , boxtype, ajaxResponse){
var el=this;
var _lbdata=OO.lbdata;
var _adata=OO.adata;
var _spdata=OO.spdata;
var customer_loader_elm=false;
var loader_btn_el=false;
var loader_in_icon=false;
if(_adata.loader_el!='')	customer_loader_elm=_adata.loader_el;
if('loader_class' in _adata&&_adata.loader_class!='')
customer_loader_elm=$('.' + _adata.loader_class);
if(_adata.loader_btn_el!=''&&_adata.loader_btn_el!==undefined) loader_btn_el=el;
if(_adata.loader_in_icon!=''&&_adata.loader_in_icon!==undefined) loader_in_icon=el;
var LB_loader=false;
if(LB&&'loader' in _lbdata&&_lbdata.loader) LB_loader=true;
if(type=='start'){
var trigger_id=('uid' in OO&&OO.uid!='') ? OO.uid:OO.ajax_action;
$('body').trigger('evo_ajax_beforesend_' + trigger_id ,[ OO, el ]);
if(LB_loader){
LB.find('.ajde_popup_text').addClass('evoloading');
LB.evo_lightbox_start_inloading();
}
if(customer_loader_elm) $(customer_loader_elm).addClass('evoloading ');
if(loader_btn_el) el.addClass('evobtn_loader');
if(loader_in_icon) el.addClass('evoloader_icon');
}else{
var trigger_id=('uid' in OO&&OO.uid!='') ? OO.uid:OO.ajax_action;
if(trigger_id===undefined) trigger_id=OO.adata.a;
$('body').trigger('evo_ajax_complete_' + trigger_id ,[ OO , el ]);
if(LB_loader){
LB.find('.ajde_popup_text').removeClass('evoloading');
LB.evo_lightbox_stop_inloading();
}
if(customer_loader_elm) $(customer_loader_elm).removeClass('evoloading');
if(loader_btn_el) el.removeClass('evobtn_loader');
if('loader_btn_el_done' in _adata&&_adata.loader_btn_el_done){
if(ajaxResponse.success) el.removeClass('evobtn_loader success');
}
if(loader_in_icon) el.removeClass('evoloader_icon');
}
return {
'l1': customer_loader_elm,
'l2':LB_loader
};}
$.fn.evo_perform_ajax_success=function(OO, data, LB , boxtype){
var el=this;
var _lbdata=OO.lbdata;
var _adata=OO.adata;
var _spdata=OO.spdata;
var _populate_id=OO._populate_id;
if(!data||data===undefined) return;
var _success=('success' in data) ? data.success:(data.status==='good');
var extractedContent='content' in data ? data.content: '';
if('data' in data&&'content' in data.data) extractedContent=data.data.content;
var extractedData=('data' in data) ? data.data:data;
extractedData['content']=extractedContent;
if(typeof extractedData!=='object'||extractedData===null){
extractedData={ msg: extractedData };}
extractedData.success=_success;
extractedData.status=('status' in extractedData) ? extractedData.status:(_success ? 'good':'bad');
data=extractedData;
if(LB.length > 0&&boxtype!='sp'){
console.log('show lb msg');
if(data&&typeof data==='object'&&!Array.isArray(data)&&'msg' in data&&data.msg!==''){
LB.evo_lightbox_show_msg({
'type':(_success ? 'good':'bad'),
'message':data.msg,
hide_lightbox:(_success ? _lbdata.hide:false),
hide_message: _lbdata.hide_msg
});
}
if(data&&_lbdata.new_content&&'content' in data&&data.content!=''){
if(_populate_id){
$('body').find('#'+_populate_id).replaceWith(data.content);
}else{
LB.evo_lightbox_populate_content({content: data.content});
}}
}else{
if(data&&_populate_id&&'content' in data&&data.content!=''){
$('body').find('#'+_populate_id).html(data.content);
}}
if('show_snackbar' in  _adata&&('msg' in data)&&data.msg!='')
el.evo_snackbar({message: data.msg});
if(data&&'populate_dom_classes' in data){
$.each(data.populate_dom_classes, function(domclass, content){
$('body').find('.'+ domclass).html(content);
});
}
if(data&&'replace_dom_classes' in data){
$.each(data.replace_dom_classes, function(domclass, content){
$('body').find('.'+ domclass).replaceWith(content);
});
}
if(data&&'refresh_dom_content' in data){
$.each(data.refresh_dom_content, function(domid, content){
$('body').find('#'+ domid).replaceWith(content);
});
}
if(_success&&'trig_success' in _adata){
$.each(_adata.trig_success, function(i, item){
var event_name=item[0];
var extra_data=item[1]||{};
$('body').trigger(event_name, extra_data);
});
}
if(data&&'sp_content' in data){
$("body").find('#evops_content').html(data.sp_content);
}
if(data&&'sp_content_foot' in data){
$("body").find('.evosp_foot_in').html(data.sp_content_foot);
}
if(data&&'sp_show_msg' in data){
BB.evo_showmsg_sidepanel(data.sp_show_msg);
}
$('body').trigger('evo_elm_load_interactivity');
setTimeout(function(){
if('evoelms' in data){
$.each(data.evoelms , function(uniqueid, elm_data){
$('body').find('.has_dynamic_vals').each(function(){
if($(this).attr('id')!=uniqueid) return;
var dynamic_elm=$(this);
$.each(elm_data , function(elm_key, elmv){
dynamic_elm.data(elm_key, elmv);
});
});
});
}},200);
$('body').trigger('evo_ajax_success_' + OO.uid,[ OO, data , el]);
}
$.fn.evo_process_ajax_params=function(opt){
var defz={
'uid':'',
'adata':{},
'lbdata':{},
'spdata':{},
'_populate_id':'',
'content':'',
'content_id' :'',
't':'',
'lbc':'',
'lbac':'',
'lbsz':'',
'lightbox_loader': true,
'preload_temp_key': 'init',
'load_new_content': true,
'lb_padding': '',
'load_new_content_id':'',
'ajax':'no',
'ajax_url':'',
'end':'admin',
'ajax_action':'',
'a':'',
'ajax_type':'ajax',
'd':'',
'other_data':'',
'ajaxdata':'',
};
var OO=$.extend({}, defz, opt);
var processed={};
processed['uid']=OO.uid;
var _adata=(OO.adata=='') ? {}: OO.adata;
var passed_type_val=false;
if('type' in _adata&&_adata.type!='' &&
!['ajax', 'rest', 'endpoint'].includes(_adata.type)
){
passed_type_val=_adata.type;
_adata.type='';
}
var def_avals={
'a':'',
'type':'ajax',
'end':'admin',
'data': '',
'loader_el':'',
'loader_btn_el':'',
'loader_btn_el_done':'',
'loader_class':'',
'url':'',
'trig_success':[],
}
$.each(def_avals, function(key, value){
if(key=='data'&&!('a' in _adata)&&('data' in _adata)&&'a' in _adata.data) return;
if(!(key in _adata)&&value!='') _adata[ key ]=value;
});
var def_adata_mapping={
'a':'a',
'ajax_action':'a',
'ajax_type':'type',
'end': 'end',
'ajax_url': 'url',
'ajaxdata':'data',
'ajax_data':'data',
'd':'data',
}
$.each(def_adata_mapping, function(oldV, newV){
if(newV in _adata&&_adata[ newV ]!='') return;
if(oldV in OO&&OO[oldV]!==''){
_adata[newV]=OO[oldV];
}});
if(_adata.data===undefined) _adata.data={};
$.each(_adata, function(key, value){
if(!(key in def_avals)){
}});
if('data' in _adata){
_adata['data']['nn']=(typeof evo_admin_ajax_handle!=='undefined'&&evo_admin_ajax_handle!==null)
? evo_admin_ajax_handle.postnonce
: evo_general_params.n;
_adata['data']['uid']=processed['uid'];
if(passed_type_val) _adata['data']['type']=passed_type_val;
if('action' in _adata.data) _adata['a']=_adata.data.action;
if('a' in _adata.data) _adata['a']=_adata.data.a;
if('ajaxdata' in OO) processed['ajaxdata']=_adata.data;
}
processed['adata']=_adata;
var _lbdata=(OO.lbdata=='') ? {}: OO.lbdata;
var def_lbdata_mapping={
'lbc':'class',
'lbsz':'size',
'lbac' :'additional_class',
't':'title',
'lb_padding': 'padding',
'load_new_content':'new_content',
'lightbox_loader': 'loader',
'content_id':'content_id',
'content':'content',
'hide_lightbox':'hide',
'hide_message':'hide_msg',
'lightbox_key': 'class',
}
$.each(def_lbdata_mapping, function(oldV, newV){
if(newV in _lbdata&&_lbdata[newV]!==''&&_lbdata[newV]!==null&&_lbdata[newV]!==undefined){
return;
}
if(oldV in OO&&OO[oldV]!==''){
_lbdata[newV]=OO[oldV];
}});
var def_lbvals={
'padding':'evopad30',
'loader': false,
'preload_temp_key':'init',
'new_content': true,
'additional_class':'',
'title':'',
'hide':false,
'hide_msg':2000,
'content':'',
'content_id':'',
}
$.each(def_lbvals, function(key, value){
if(key in _lbdata)  return;
if(value=='') return;
_lbdata[ key ]=value;
});
if(OO.ajaxdata.load_lbcontent) _lbdata['new_content']=true;
if(OO.ajaxdata.load_new_content) _lbdata['new_content']=true;
processed['_populate_id']=false;
if(OO.load_new_content_id!='')  processed['_populate_id']=OO.load_new_content_id;
if('new_content_id' in _lbdata&&_lbdata.new_content_id!='')  processed['_populate_id']=_lbdata.new_content_id;
if('content_id' in _lbdata&&_lbdata.content_id!='') processed['_populate_id']=_lbdata.content_id;
processed['lbdata']=_lbdata;
if(processed.uid==''&&'uid' in processed['lbdata']) processed['uid']=processed['lbdata']['uid'];
$.each(opt, function(oldkey, oldval){
if(oldkey in processed) return;
processed[ oldkey ]=oldval;
});
var _spdata=(OO.spdata=='') ? {}:OO.spdata;
var def_spvals={
'class':'',
'loader': false,
'new_content': true,
'additional_class':'',
'title':'',
'hide':false,
'hide_msg':2000,
'content':'',
'content_id':'',
'size':'',
}
$.each(def_spvals, function(key, value){
if(key in _lbdata)  return;
if(value=='') return;
_lbdata[ key ]=value;
});
return processed;
}
$('body').on('click','.evolb_trigger', function(event){
if(event!==undefined){
event.preventDefault();
event.stopPropagation();
}
$(this).evo_lightbox_open($(this).data('lbvals') ?? $(this).data('d')
);
});
$('body').on('click','.evolb_close_btn', function (){
const LB=$(this).closest('.evo_lightbox');
LB.evo_lightbox_close();
});
$('body').on('click','.evolb_trigger_save, .evo_submit_form', function(event){
if(event!==undefined){	event.preventDefault();	event.stopPropagation();	}
$(this).evo_ajax_form_submit($(this).data('d') ,($(this).closest('.evo_lightbox').length ? 'lb':''));
});
$('body').on('click','.evo_trigger_ajax_run', function(event){
if(event!==undefined){
event.preventDefault();
event.stopPropagation();
}
$(this).evo_admin_get_ajax($(this).data('d'));
});
$('body').on('evo_lightbox_trigger', function(event, data){
event.preventDefault();
$('body').evo_lightbox_open(data);
});
$.fn.evo_alert=function(opt){
var defz={
'title': 'Confirmation Action',
'message': '',
'yes_text': 'Proceed',
'no_text': 'No',
'on_yes': function(){},
'on_no': function(){}};
var options=$.extend({}, defz, opt);
var alertHtml='<div class="evo_alert_box">' +
'<p class="evotal evopad10i">' + options.message + '</p>' +
'<div class="evo_alert_buttons evotar">' +
'<button class="evo_alert_no evoboxsn evobrn evooln evocurp evohoop7 evopad10-20 evobr20 evobgclt">' + options.no_text + '</button>' +
'<button class="evo_alert_yes evoboxsn evobrn evooln evocurp evoHbgc1 evopad10-20 evobr20 evomarr10 evobgclp evoclw">' + options.yes_text + '</button>' +
'</div></div>';
var lightboxOptions={
lbdata: {
class: 'evo_alert_lightbox',
title: options.title||'Alert',
content: alertHtml,
padding: 'pad20',
size:'small',
},
};
$(this).evo_lightbox_open(lightboxOptions);
setTimeout(function(){
var LIGHTBOX=$('.evo_lightbox.evo_alert_lightbox');
LIGHTBOX.find('.evo_alert_yes').on('click', function(){
var shouldClose=options.on_yes(LIGHTBOX);
console.log(shouldClose);
if(shouldClose!==false){
LIGHTBOX.evo_lightbox_close();
}
removeKeyListeners();
});
LIGHTBOX.find('.evo_alert_no').on('click', function(){
options.on_no(LIGHTBOX);
LIGHTBOX.evo_lightbox_close();
removeKeyListeners();
});
function handleKeyPress(event){
if(event.key==='Escape'){
options.on_no(LIGHTBOX);
LIGHTBOX.remove();
removeKeyListeners();
}else if(event.key==='Enter'){
options.on_yes(LIGHTBOX);
LIGHTBOX.remove();
removeKeyListeners();
}}
$(document).on('keydown', handleKeyPress);
function removeKeyListeners(){
$(document).off('keydown', handleKeyPress);
}
LIGHTBOX.find('.evolb_close_btn').on('click', function(){
removeKeyListeners();
});
}, 350);
}
$.fn.evo_lightbox_open=function (opt){
var OO=this.evo_process_ajax_params(opt);
var _lbdata=OO.lbdata;
var _adata=OO.adata;
var _populate_id=OO._populate_id;
if(!('class' in _lbdata)||_lbdata.class=='') return;
const fl_footer=_adata.end=='client' ? '<div class="evolb_footer"></div>' :'';
var __lb_size=_lbdata.size===undefined ? '':_lbdata.size;
var html='<div class="evo_lightbox '+_lbdata.class+' '+_adata.end+' '+(_lbdata.additional_class!==undefined ? _lbdata.additional_class :'') +'" data-lbc="'+_lbdata.class+'"><div class="evolb_content_in"><div class="evolb_content_inin"><div class="evolb_box '+_lbdata.class+' '+ __lb_size +'"><div class="evolb_header"><a class="evolb_backbtn" style="display:none"><i class="fa fa-angle-left"></i></a>';
if(_lbdata.title!==undefined) html +='<p class="evolb_title">' + _lbdata.title + '</p>';
html +='<span class="evolb_close_btn evolbclose "><i class="fa fa-xmark"><i></span></div><div class="evolb_content '+ _lbdata.padding +'"></div><p class="message"></p>'+fl_footer+'</div></div></div></div>';
$('#evo_lightboxes').append(html);
const lbCount=$('#evo_lightboxes').find('.evo_lightbox').length;
var LIGHTBOX=$('.evo_lightbox.'+ _lbdata.class);
if($('.evo_sp').hasClass('show')) LIGHTBOX.addClass('aboveSP');
setTimeout(function(){
$('#evo_lightboxes').show();
LIGHTBOX.addClass('show');
$('body').addClass('evo_overflow');
$('html').addClass('evo_overflow');
},300);
LIGHTBOX.evo_lightbox_show_open_animation(OO);
if(_lbdata.content_id!=''){
var content=$('#' + _lbdata.content_id).html();
LIGHTBOX.find('.evolb_content').html(content);
}
if(_lbdata.content!=''){
LIGHTBOX.find('.evolb_content').html(_lbdata.content);
}
if('a' in _adata&&_adata.a!=''){
LB.evo_admin_get_ajax(OO);
}
if('url' in _adata&&_adata.url!=''){
$.ajax({
beforeSend: function(){},
url:	OO.ajax_url,
success:function(data){
LIGHTBOX.find('.evolb_content').html(data);
},complete:function(){}});
}
$('body').trigger('evo_lightbox_processed', [ OO, LIGHTBOX]);
}
$(document).on('click', function(e){
const $open=$('.evo_lightbox.show');
if($open.length===0) return;
if(!document.contains(e.target)) return;
const $open_sp=$('.evo_lightbox.show.on_sp');
if($open_sp.length > 0) return;
if($(e.target).closest('.evolb_box').length) return;
$open.last().evo_lightbox_close({ delay: 300 });
});
$.fn.evo_lightbox_close=function(opt){
if(!this.hasClass('show')) return;
const defaults={ delay: 500, remove_from_dom: true };
const OO=$.extend({}, defaults, opt);
const hideDelay=parseInt(OO.delay);
const completeClose=this.parent().find('.evo_lightbox.show').length===1;
hideDelay > 500 ? setTimeout(()=> this.removeClass('show'), hideDelay - 500):this.removeClass('show');
setTimeout(()=> {
completeClose&&$('body, html').removeClass('evo_overflow');
OO.remove_from_dom&&this.remove();
}, hideDelay);
};
$.fn.evo_lightbox_populate_content=function(opt){
LB=this;
var defaults={
'content':'',
}; var OO=$.extend({}, defaults, opt);
LB.find('.evolb_content').html(OO.content);
}
$.fn.evo_lightbox_show_msg=function(opt){
LB=this;
var defaults={
'type':'good',
'message':'',
'hide_message': false,
'hide_lightbox': false,
}; var OO=$.extend({}, defaults, opt);
LB.find('.message').removeClass('bad good').addClass(OO.type).html(OO.message).fadeIn();
if(OO.hide_message) setTimeout(function(){  LB.evo_lightbox_hide_msg() }, OO.hide_message);
if(OO.hide_lightbox) LB.evo_lightbox_close({ delay: OO.hide_lightbox });
}
$.fn.evo_lightbox_hide_msg=function(opt){
LB=this;
LB.find('p.message').hide();
}
$.fn.evo_lightbox_show_open_animation=function(opt){
LB=this;
var defaults={
'animation_type':'initial',
'preload_temp_key': 'init',
'end':'admin',
};
var OO=$.extend({}, defaults, opt);
if(OO.animation_type=='initial'){
passed_data=(typeof evo_admin_ajax_handle!=='undefined') ? evo_admin_ajax_handle: evo_general_params;
html=passed_data.html.preload_general;
if(OO.preload_temp_key!='init') html=passed_data.html[ OO.preload_temp_key ];
LB.find('.evolb_content').html(html);
}
if(OO.animation_type=='saving')
LB.find('.evolb_content').addClass('evoloading');
}
$.fn.evo_cal_lightbox_trigger=function(SC_data , obj, CAL , LB=null){
const event=obj.closest('.eventon_list_event');
const classes=['cancel_event', SC_data.additional_class, SC_data.calendar_type]
.filter(cls=> cls&&(cls!=='cancel_event'||obj.hasClass('cancel_event')))
.join(' ');
const other_data={
extra_classes: `evo_lightbox_body eventon_list_event evo_pop_body evcal_eventcard event_${SC_data.event_id}_${SC_data.repeat_interval} ${classes}`,
CAL,
obj,
et_data: obj.find('.evoet_data').data(),
SC: SC_data
};
const randomId=`evo_eventcard_${Math.floor(Math.random() * 90) + 10}`;
const lbac={ 'sc1': 'within', 'sc2': 'within ecSCR' }[evo_general_params.cal.lbs]||'';
const openLightbox=(content,  ajaxData=null)=> {
const config={
uid: 'evo_open_eventcard_lightbox',
lbc: randomId,
lbc: LB ? LB.data('lbc')||randomId:randomId,
lbac,
end: 'client',
content,
other_data
};
if(ajaxData){
Object.assign(config, {
ajax: 'yes',
ajax_type: 'endpoint',
ajax_action: 'eventon_load_single_eventcard_content',
d: ajaxData
});
}
if(LB){
if(ajaxData){
var OO=this.evo_process_ajax_params(config);
LB.evo_admin_get_ajax(OO);
$('body').trigger('evo_lightbox_processed', [ config, LB]);
return;
}
LB.evo_lightbox_populate_content({content: content});
$('body').trigger('evo_lightbox_processed', [ config, LB]);
return;
}
$('body').evo_lightbox_open(config);
};
if(SC_data.ux_val==='3a'){
const placeholder=`
<div class="evo_cardlb" style="padding:10px 10px 0 10px">
<div style="margin-bottom:20px; width:100%; height:200px" class="evo_preloading"></div>
${Array(3).fill('<div style="display:flex;justify-content:space-between;margin-bottom:10px"><div style="width:40px;height:40px;margin-right:20px" class="evo_preloading"></div><div style="flex:1 0 auto"><div class="evo_preloading" style="width:70%;height:20px;margin-bottom:10px"></div><div class="evo_preloading" style="width:100%;height:80px;margin-bottom:10px"></div></div></div>').join('')}
</div>
`;
const ajaxData={
event_id: SC_data.event_id,
ri: SC_data.repeat_interval,
SC: { ...SC_data, tile_style: '0', tile_bg: '0', tiles: 'no', eventtop_style: SC_data.tile_style=='2' ? '0':SC_data.eventtop_style },
load_lbcontent: true,
action: 'eventon_load_single_eventcard_content',
uid: 'load_single_eventcard_content_3a',
calid:(CAL ? CAL.attr('id'):''),
};
openLightbox(placeholder, ajaxData);
}else{
const content=event.find('.event_description').html();
const clrW=event.hasClass('clrW') ? 'clrW':'clrD';
openLightbox(`<div class="evopop_top ${clrW}">${obj.html()}</div><div class="evopop_body">${content}</div>`);
}}
$.fn.evo_cal_lb_listeners=function(){
$('body')
.on('evo_lightbox_processed', function(event, OO, LIGHTBOX){
if(OO.uid!='evo_open_eventcard_lightbox') return false;
var CAL=OO.other_data.CAL;
LIGHTBOX.addClass('eventcard eventon_events_list');
LIGHTBOX_content=LIGHTBOX.find('.evolb_content');
LIGHTBOX_content.attr('class', 'evolb_content '+ OO.other_data.extra_classes);
var SC=OO.other_data.SC;
var obj=OO.other_data.obj;
const evoet_data=OO.other_data.et_data;
bgcolor=bggrad='';
if(evoet_data){
bgcolor=evoet_data.bgc;
bggrad=evoet_data.bggrad;
}
var show_lightbox_color=(SC.eventtop_style=='0'||SC.eventtop_style=='4') ? false: true;
if((CAL&&CAL.hasClass('color')&&show_lightbox_color) ||
(!CAL&&show_lightbox_color)
){
LIGHTBOX_content.addClass('color');
LIGHTBOX_content.find('.evopop_top').css({
'background-color':bgcolor,
'background-image': bggrad,
});
}else{
LIGHTBOX_content.addClass('clean');
LIGHTBOX_content.find('.evopop_top').css({'border-left':'3px solid '+bgcolor});
}
if(obj.data('runjs')){
$('body').trigger('evo_load_single_event_content',[ SC.event_id, OO.other_data.obj]);
}
if(SC.evortl=='yes')	LIGHTBOX.addClass('evortl');
$('body').trigger('evolightbox_end', [ LIGHTBOX , CAL, OO]);
})
.on('evo_ajax_success_evo_open_eventcard_lightbox', function (event, OO, data){
if(OO.ajaxdata.uid!="load_single_eventcard_content_3a") return false;
LIGHTBOX=$('.evo_lightbox.'+ OO.lightbox_key);
CAL=$('body').find('#'+ OO.ajaxdata.calid);
$('body').trigger('evolightbox_end', [ LIGHTBOX , CAL, OO]);
})
;
}
BB
.on('click', '.evosp_trigger', function(e){
e.preventDefault(); e.stopPropagation();
const $el=$(this);
$el.addClass('evo_sp_trig_on');
$el.evo_open_sidepanel($el.data('d'), $el.data('spv'));
})
.on('click', '.evosp_close', function(e){ e.preventDefault(); e.stopPropagation(); $(this).evo_close_sidepanel() })
.on('click', '.evosp_trigger_save', function(e){ e.preventDefault(); e.stopPropagation(); $(this).evo_ajax_form_submit($(this).data('d'), 'sp');  })
.on('evosp_trig_close', function(e, opt){ $(this).evo_close_sidepanel(opt); });
$.fn.evo_open_sidepanel=function(opt, spv){
var defs={
'uid':'',
'end':'admin',
'hide_sp':false,
'hide_message':false,
'title':'',
'sp_title':'',
'sp_class':'',
'sp_id':'',
'content_id':'',
'content':'',
'content_footer':'',
'content_load_delay':0,
'ajax':'no',
'ajax_data':'',
'adata':{},
'other_data':{},
'spdata':{},
'size': 'sm',
'movepage': false,
end:'admin'
}
var OO=$.extend({}, defs, opt);
const SP=$('body').find('.evo_sp');
const load_html="<div class='evo_loading_bar_holder h100'><div class='evo_loading_bar wid_50 hi_50'></div><div class='evo_loading_bar hi_100'></div><div class='evo_loading_bar'></div><div class='evo_loading_bar'></div><div class='evo_loading_bar hi_50'></div></div>";
const footer_html=`<div class='evosp_foot evo_bordert evodfx evofxdrr evofxaic evofxww evogap10'><div class='evosp_foot_in evofx_1 evogap10'>
<div class='evo_loading_bar_holder h100 evopad0i'><div class='evo_loading_bar wid_50 hi_50'></div></div>
</div><p class='evosp_message message evomar0i'></p></div>`;
SP.html(`<div id='${OO.sp_id}' class='evosp_in ${OO.sp_class}'><span class='evosp_close'><i class='fa fa-multiply'></i></span><div class='evosp_head evoff_1'>${OO.sp_title}</div><div id='evops_content' class='evosp_body'>${load_html}</div>${footer_html}</div>`);
SP.addClass('show');
SP.removeClass('med lar sm').addClass(OO.size);
const SP_body=SP.find('.evosp_body');
const SP_head=SP.find('.evosp_head');
const SP_foot=SP.find('.evosp_foot');
const $open=$('.evo_lightbox.show');
if($open.length!==0){
$open.addClass('on_sp');
}
if(OO.content_id!=''){
if(OO.content_load_delay > 0){
setTimeout(function(){
SP.evo_populate_sidepanel(BB.find('#'+ OO.content_id).html());
}, OO.content_load_delay);
}else{
SP.evo_populate_sidepanel(BB.find('#'+ OO.content_id).html());
}}
if(( OO.ajax=='yes'&&OO.ajax_data!='')||(OO.adata!=''&&'a' in OO.adata)){
var passing_data={
adata: OO.adata,
ajaxdata: OO.ajax_data,
uid: OO.uid ,
end: OO.end,
load_new_content: true,
load_new_content_id: 'evops_content',
lightbox_loader:false,
end: OO.end,
};
SP.evo_admin_get_ajax(passing_data);
}else{
setTimeout(()=> BB.trigger('evo_sp_stop_loading'),OO.content_load_delay);
}
if(OO.content!=''){
setTimeout(()=> SP.evo_populate_sidepanel(OO.content),OO.content_load_delay);
if(OO.content_footer) setTimeout(()=> SP.evo_populate_sidepanel_footer(OO.content_footer), (OO.content_load_delay + 500));
}
if(spv!=''){
BB.on('evo_ajax_success_'+ OO.uid , function(){
$('#evops_content').find('input, select').each(function(){
var fel=$(this);
$.each(spv,function(index, val){
if(fel.attr('name')==index){
if(val=='no'||val=='yes') fel.evo_elm_change_yn_btn(val);
fel.val(val);
}});
});
});
}
BB.trigger('evo_sp_opened_'+OO.uid, OO);
BB.trigger('evo_sp_opened', OO);
}
BB.on('evo_sp_stop_loading',function(){
$('body').find('.evo_sp').find('.evo_loading_bar_holder').remove();
});
$.fn.evo_savevals_sidepanel=function(spv){
const el=BB.find('.evo_sp_trig_on');
el.data('spv', spv);
el.removeClass('evo_sp_trig_on');
}
$.fn.evo_populate_sidepanel=function(content){
const SP=$('body').find('.evo_sp');
SP.find('.evosp_body').html(content);
console.log('Populate SP');
}
$.fn.evo_populate_sidepanel_footer=function(content){
const SP=$('body').find('.evo_sp');
SP.find('.evosp_foot_in').html(content);
}
$.fn.evo_close_sidepanel=function(opt){
SP=BB.find('.evo_sp');
var defaults={ 'delay':200};
if(!(SP.hasClass('show'))) return;
var OO=$.extend({}, defaults, opt);
const $open=$('.evo_lightbox.show.on_sp');
if($open.length!==0){
$open.removeClass('on_sp');
}
setTimeout(function(){
BB.trigger('evo_sp_closed',[ SP ]);
SP.removeClass('show');
$('body').find('.editor-editor-interface.pagemoved').removeClass('pagemoved').css('right', 'auto');
BB.find('.evo_sp_trig_on').removeClass('evo_sp_trig_on');
}, OO.delay);
setTimeout(function(){	SP.html('');	},(OO.delay + 100) );
}
$.fn.evo_showmsg_sidepanel=function(opt){
var defaults={
'type':'good',
'message':'',
'hide_message': false,
'hide_sp': false,
}; var OO=$.extend({}, defaults, opt);
console.log('showing sp msg');
const SP=$('body').find('#evo_sp');
SP.find('.evosp_message').removeClass('bad good').addClass(OO.type).html(OO.message).fadeIn();
if(OO.hide_message) setTimeout(function(){  SP.evo_hidemsg_sidepanel() }, OO.hide_message);
if(OO.hide_sp) SP.evo_close_sidepanel({ delay: OO.hide_sp });
}
$.fn.evo_hidemsg_sidepanel=function(opt){
SP=this;
console.log('ss');
SP.find('p.evosp_message').hide();
}
$.fn.evo_get_ajax_url=function(opt){
var defaults={
a:'',
e:'client',
type: 'ajax'};
var OO=$.extend({}, defaults, opt);
if(OO.type=='endpoint'){
var evo_ajax_url=(OO.e=='client'||typeof evo_general_params!=='undefined' )?
evo_general_params.evo_ajax_url:evo_admin_ajax_handle.evo_ajax_url;
return  evo_ajax_url.toString().replace('%%endpoint%%', OO.a);
}else if(OO.type=='rest'){
var evo_ajax_url=(OO.e=='client'||typeof evo_general_params!=='undefined')?
evo_general_params.rest_url:evo_admin_ajax_handle.rest_url;
return  evo_ajax_url.toString().replace('%%endpoint%%', OO.a);
}else{
action_add=OO.a!='' ? '?action='+ OO.a: '';
return(OO.e=='client'||typeof evo_general_params!=='undefined') ?
evo_general_params.ajaxurl + action_add:evo_admin_ajax_handle.ajaxurl + action_add;
}}
$.fn.evo_start_loading=function(opt){
var defaults={ type:'1'};
var OPT=$.extend({}, defaults, opt);
var el=this;
if(OPT.type=='1') el.addClass('evoloading loading');
if(OPT.type=='2') el.addClass('evoloading_2');
}
$.fn.evo_stop_loading=function(opt){
var el=this;
var defaults={ type:'1'};
var OPT=$.extend({}, defaults, opt);
if(OPT.type=='1') el.removeClass('evoloading loading');
if(OPT.type=='2') el.removeClass('evoloading_2');
}
$.fn.evo_lightbox_start_inloading=function(opt){
LB=this;
LB.find('.evolb_content').addClass('loading evoloading');
}
$.fn.evo_lightbox_stop_inloading=function(opt){
LB=this;
LB.find('.evolb_content').removeClass('loading evoloading');
}
$.fn.evo_countdown_get=function(opt){
var defaults={ gap:'', endutc: ''};
var OPT=$.extend({}, defaults, opt);
var gap=OPT.gap;
if(gap==''){
var Mnow=moment().utc();
var M=moment();
M.set('millisecond', OPT.endutc);
gap=OPT.endutc - Mnow.unix();
}
if(gap < 0){
return {
'd': 0,
'h':0,
'm':0,
's':0
};}
distance=(gap * 1000);
var days=Math.floor(distance / (1000 * 60 * 60 * 24));
var hours=Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes=Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds=Math.floor((distance % (1000 * 60)) / 1000);
minutes=minutes<10? '0'+minutes:minutes;
seconds=seconds<10? '0'+seconds:seconds;
return {
'd': days,
'h':hours,
'm':minutes,
's':seconds
};};
$.fn.evo_countdown=function(opt){
var defaults={ S1:''};
var OPT=$.extend({}, defaults, opt);
var el=$(this);
const day_text=(el.data('d')!==undefined&&el.data('d')!='' )? el.data('d'):'Day';
const days_text=(el.data('ds')!==undefined&&el.data('ds')!='' )? el.data('ds'):'Days';
var duration=el.data('dur');
var endutc=parseInt(el.data('endutc'));
var text=el.data('t');
if(text===undefined) text='';
if(el.hasClass('evo_cd_on')) return;
var Mnow=moment().utc();
var M=moment();
M.set('millisecond', OPT.endutc);
gap=endutc - Mnow.unix();
if(gap > 0){
dd=el.evo_countdown_get({ 'gap': gap });
el.html(( dd.d>0 ? dd.d + ' ' +(dd.d >1 ? days_text: day_text) + " "  :'') + dd.h + ":" + dd.m +':'+ dd.s +'  '+text);
el.data('gap',(gap - 1));
el.addClass('evo_cd_on');
var CD=setInterval(function(){
gap=el.data('gap');
duration=el.data('dur');
const bar_elm=el.closest('.evo_event_progress').find('.evo_ep_bar');
if(gap > 0){
if(duration!==undefined&&bar_elm.length){
perc=((duration - gap)/ duration) * 100;
bar_elm.find('b').css('width',perc+'%');
}
dd=el.evo_countdown_get({ 'gap': gap });
el.html(( dd.d>0 ? dd.d + ' '  +(dd.d >1 ? days_text: day_text) + " ":'') + dd.h + ":" + dd.m +':'+ dd.s +' '+text);
el.data('gap',(gap - 1));
}else{
const expire_timer_action=el.data('exp_act');
if(expire_timer_action!==undefined){
$('body').trigger('runajax_refresh_now_cal',[
el ,
el.data('n'),
]);
}
const _complete_text=el.evo_get_txt({V:'event_completed'});
if(bar_elm.length){
bar_elm.addClass('evo_completed');
}
if(el.closest('.evcal_desc').length){
el.closest('.evcal_desc').find('.eventover').html(_complete_text);
el.closest('.evcal_desc').find('.evo_live_now').remove();
}
if(el.closest('.eventon_list_event').length){
el.closest('.eventon_list_event').find('span.evo_live_now').hide();
}
el.html('');
clearInterval(CD);
}},1000);
}else{
el.closest('.evo_event_progress').find('.evo_ep_bar').hide();
clearInterval(CD);
}};
$.fn.evo_HB_process_template=function(opt){
var defaults={ TD:'', part:''}
var OPT=$.extend({}, defaults, opt);
BUS=$('#evo_global_data').data('d');
template=Handlebars.compile(BUS.temp[ OPT.part ]);
return template(OPT.TD);
}
$.fn.evo_cal_events_in_range=function(opt){
var defaults={ S:'', E:'',
hide: true,
closeEC:true,
showEV: false,
showEVL: false,
showAllEvs: false
};
var OPT=$.extend({}, defaults, opt);
var CAL=$(this);
var eJSON=CAL.find('.evo_cal_events').data('events');
var SC=CAL.evo_shortcode_data();
R={};
html='';
json={};
show=0;
if(eJSON&&eJSON.length > 0){
$.each(eJSON, function(ind, ED){
eO=CAL.find('#event_'+ ED._ID);
if(eO===undefined||eO.length==0) return;
if(OPT.hide)	eO.hide();
this_show=false;
if(ED.month_long||ED.year_long){
this_show=true;
}else{
if(CAL.evo_is_in_range({
'S': OPT.S,	'E': OPT.E,	'start': ED.unix_start ,	'end':ED.unix_end
})){
this_show=true;
}}
if(OPT.showAllEvs) this_show=true;
if(this_show){
if(OPT.showEV) eO.show();
if(OPT.closeEC&&SC.evc_open=='no') eO.find('.event_description').hide().removeClass('open');
html +=eO[0].outerHTML;
json[ ED._ID]=ED;
show++;
}});
}else{
var cal_events=CAL.find('.eventon_list_event');
cal_events.each(function(index, elm){
var ED=$(elm).evo_cal_get_basic_eventdata();
if(!ED) return;
if(OPT.hide)	$(elm).hide();
this_show=false;
if($(elm).hasClass('month_long')||$(elm).hasClass('year_long')){
this_show=true;
}else{
if(CAL.evo_is_in_range({
'S': OPT.S,	'E': OPT.E,	'start': ED.unix_start ,	'end':ED.unix_end
})){
this_show=true;
}}
if(OPT.showAllEvs) this_show=true;
if(this_show){
if(OPT.showEV) $(elm).show();
if(OPT.closeEC&&SC.evc_open=='no')
$(elm).find('.event_description').hide().removeClass('open');
html +=$(elm)[0].outerHTML;
json[ ED.uID ]=ED;
show++;
}});
}
if(OPT.showEV){
no_event_content=CAL.evo_get_global({S1: 'html', S2:'no_events'});
tx_noevents=CAL.evo_get_txt({V:'no_events'});
EL=CAL.find('.eventon_events_list');
EL.find('.eventon_list_event.no_events').remove();
if(show==0)
EL.append('<div class="eventon_list_event no_events">'+ no_event_content +'</div>');
}
if(OPT.showEVL){
CAL.find('.eventon_events_list').show().removeClass('evo_hide');
}
R['count']=show;
R['html']=html;
R['json']=json;
return R;
}
$.fn.evo_is_in_range=function(opt){
var defaults={ S:'', E:'', start:'',end:''}
var OPT=$.extend({}, defaults, opt);
S=parseInt(OPT.S);
E=parseInt(OPT.E);
start=parseInt(OPT.start);
end=parseInt(OPT.end);
return (
(start <=S&&end >=E) ||
(start <=S&&end >=S&&end <=E) ||
(start <=E&&end >=E) ||
(start >=S&&end <=E)
) ? true: false;
}
$.fn.evo_cal_hide_events=function(){
CAL=$(this);
CAL.find('.eventon_list_event').hide();
}
$.fn.evo_cal_get_basic_eventdata=function(){
var ELM=$(this);
var _time=ELM.data('time');
if(_time===undefined) return false;
const time=_time.split('-');
const ri=ELM.data('ri').replace('r','');
const eID=ELM.data('event_id');
var _event_title=ELM.find('.evcal_event_title').text();
_event_title=_event_title.replace(/'/g, '&apos;');
let timeRange='';
const timeElement=ELM.find('.evo_tz_time');
if(timeElement.length > 0){
const timeClone=timeElement.clone();
timeClone.find('.evo_tz').remove();
let timeText=timeClone.text().trim();
timeText=timeText.replace(/[^\d:\s-]/g, '');
timeRange=timeText.trim()||'N/A';
}
var RR={
'uID': eID + '_' + ri,
'ID': eID ,
'event_id': eID ,
'ri': ri,
'event_start_unix': parseInt(time[0]),
'event_end_unix': parseInt(time[1]),
'time_text': timeRange,
'ux_val': ELM.find('.evcal_list_a').data('ux_val'),
'event_title': _event_title,
'hex_color': ELM.data('colr'),
'hide_et': ELM.hasClass('no_et') ? 'y':'n',
'evcal_event_color': ELM.data('colr'),
'unix_start': parseInt(time[0]),
'unix_end': parseInt(time[1]),
};
RR['ett1']={};
ELM.find('.evoet_eventtypes.ett1 .evoetet_val').each(function(){
RR['ett1'][ $(this).data('id')]=$(this).data('v');
});
const eventtop_data=ELM.find('.evoet_data').data('d');
if(eventtop_data&&'loc.n' in eventtop_data&&eventtop_data['loc.n']!=''){
RR['location']=eventtop_data['loc.n'];
}
if(eventtop_data&&'orgs' in eventtop_data&&eventtop_data.orgs!==undefined){
var org_names='';
$.each(eventtop_data.orgs, function(index, value){
org_names +=value +' ';
});
RR['organizer']=org_names;
}
if(ELM.find('.evo_event_schema').length > 0){
imgObj=ELM.find('.evo_event_schema').find('meta[itemprop=image]').attr('content');
RR['image_url']=imgObj;
}
if(eventtop_data&&'tags' in eventtop_data&&eventtop_data.tags!==undefined){
RR['event_tags']=eventtop_data.tags;
}
return RR;
}
$.fn.evo_cal_oneevent_onload=function(type){
if(type!='complete') return;
const bodyClasses=$('body').attr('class')||'';
const match=bodyClasses.match(/one_event_\d+_\d+/);
if(match){
const className=match[0];
const [, x, y]=className.match(/one_event_(\d+)_(\d+)/);
const event_obj=$('body').find('#event_'+ x +'_'+ y);
const $cal=event_obj.closest('.ajde_evcal_calendar');
const SC=$cal.evo_shortcode_data();
if(event_obj.length > 1) return;
const new_SC_data={
...SC,
repeat_interval: y,
event_id: x,
ux_val: '3a',
evortl: event_obj.find('.eventon_events_list').hasClass('evortl') ? 'yes':'no',
ajax_eventtop_show_content: true,
additional_class: CAL.attr('class').match(/etttc_\w+/)?.[0]||'',
};
console.log(new_SC_data);
$cal.evo_cal_lightbox_trigger(new_SC_data, event_obj, $cal);
}}
$.fn.evo_cal_event_get_uxval=function(SC, obj){
const CAL=this;
var ux_val=obj.data('ux_val');
if(SC&&'ux_val' in SC&&SC.ux_val!=''&&SC.ux_val!==undefined&&SC.ux_val!='0'){
ux_val=SC.ux_val;
}
if(SC&&SC.ux_val_mob!==undefined&&SC.ux_val_mob!='' &&
SC.ux_val_mob!='-'&&SC.ux_val_mob!=ux_val){
if(CAL.evo_is_mobile()) ux_val=SC.ux_val_mob;
}
return ux_val;
}
$.fn.evo_pre_cal=function(options){
var el=this;
var cal={};
var OO=$.extend({}, options);
var run=function(){
cal_width_assoc();
cal_load_nav_html();
}
var cal_width_assoc=function(){
cal_w=el.width();
if(cal_w <300) el.addClass('szS');
if(cal_w >300&&cal_w <600) el.addClass('szM');
if(cal_w >600&&cal_w <900) el.addClass('szL');
if(cal_w >900) el.addClass('szX');
}
var cal_load_nav_html=function(){
nav_data=el.evo_cal_get_footer_data('nav_data');
if(nav_data&&'month_title' in nav_data){
__html=nav_data.month_title;
if('arrows' in nav_data) __html +=nav_data.arrows;
el.find('.evo_header_mo').html(__html);
el.find('.evo_footer_nav').html(__html);
}}
run();
}
$.fn.evo_cal_localize_time=function(){
this.find('.evo_loct_inprocess').each(function(e){	$(this).evo_localize_time();	});
}
$.fn.evo_localize_time=function(){
const eventcard=this.closest('.eventon_list_event');
const hideEnd=eventcard.hasClass('no_et');
const textLocal=evo_general_params.text.local_time;
eventcard.find('.evo_mytime').each(function(){
const $el=$(this);
const isEventCard=$el.hasClass('evocard');
const { times, __f: fullFormat, __tf: timeOnlyFormat, tzo: utcOffset=0 }=$el.data();
const [start, end]=times.split('-').map(Number);
const startMoment=moment.unix(start).utc().local();
const endMoment=moment.unix(end).utc().local();
const sameMonth=startMoment.format('YYYY/M')===endMoment.format('YYYY/M');
const sameDay=sameMonth&&startMoment.format('DD')===endMoment.format('DD');
const startText=startMoment.format(fullFormat);
const endText=endMoment.format(sameDay ? timeOnlyFormat:fullFormat);
const html=`${startText}${hideEnd ? '':' - ' + endText}` +
(isEventCard ? `<span class='evomarl5'>(${textLocal})</span>`:'');
$el.replaceWith(`<span class='evo_newmytime'>${html}</span>`);
});
}
$.fn.evo_day_in_month=function(opt){
var defaults={ M:'', Y:''}
var OPT=$.extend({}, defaults, opt);
return new Date(OPT.Y, OPT.M, 0).getDate();
}
$.fn.evo_get_day_name_index=function(opt){
var defaults={ M:'', Y:'', D:''}
var OPT=$.extend({}, defaults, opt);
return new Date(Date.UTC(OPT.Y, OPT.M-1, OPT.D)).getUTCDay();
}
$.fn.evo_init_scrollbars=function(options){
const defaults={ scrollSpeed: 50 };
const settings=$.extend({}, defaults, options);
return this.each(function(){
const $scope=$(this);
$scope.find('.evo-scrollbar').each(function(){
const $container=$(this);
if($container.hasClass('evo-scroll-container')) return;
$container.addClass('evo-scroll-container');
const $parent=$container.parent();
if(!$parent.css('height')||$parent.css('height')==='auto'){
$parent.css('height', '300px');
}
const $content=$container.children().wrapAll('<div class="evo-scroll-content"></div>').parent();
$container.append('<div class="evo-scroll-tab-container"><div class="evo-scroll-tab"></div></div>');
const $tabContainer=$container.find('.evo-scroll-tab-container');
const $tab=$tabContainer.find('.evo-scroll-tab');
const $scrollContent=$container.find('.evo-scroll-content');
const updateTabHeight=()=> {
const height=$container.height();
const contentHeight=$scrollContent[0].scrollHeight;
const maxScroll=contentHeight - height;
const tabHeight=Math.max(height * (height / contentHeight), 20);
$tab.css('height', `${tabHeight}px`);
$tab.toggleClass('scroll-needed', maxScroll > 0);
console.log(height+' '+contentHeight+' '+maxScroll+' '+tabHeight);
};
$container.on('mouseenter', updateTabHeight);
$tab.on('click', (e)=> {
const height=$container.height();
const maxScroll=$scrollContent[0].scrollHeight - height;
const current=$container.scrollTop();
$container.scrollTop(current < maxScroll ? current + settings.scrollSpeed:current - settings.scrollSpeed);
});
let isDragging=false;
let startY, startScrollTop;
$tab.on('mousedown', (e)=> {
isDragging=true;
$tab.addClass('dragging');
startY=e.pageY;
startScrollTop=$container.scrollTop();
e.preventDefault();
});
$(document).on('mouseup', ()=> {
isDragging=false;
$tab.removeClass('dragging');
});
$(document).on('mousemove', (e)=> {
if(!isDragging) return;
const height=$container.height();
const maxScroll=$scrollContent[0].scrollHeight - height;
const tabHeight=$tab.height();
const tabMaxTravel=height - tabHeight;
const deltaY=e.pageY - startY;
const scrollPercent=deltaY / tabMaxTravel;
$container.scrollTop(Math.max(0, Math.min(startScrollTop + (scrollPercent * maxScroll), maxScroll)));
});
$container.on('scroll', ()=> {
const height=$container.height();
const contentHeight=$scrollContent[0].scrollHeight;
const maxScroll=contentHeight - height;
const tabHeight=$tab.height();
const tabMaxTravel=height - tabHeight;
const scrollPosition=$container.scrollTop();
const scrollPercent=maxScroll > 0 ? scrollPosition / maxScroll:0;
requestAnimationFrame(()=> {
$tabContainer.css('top', `${scrollPosition}px`);
$tab.css('top', `${scrollPercent * tabMaxTravel}px`);
});
});
});
});
}
/*
initCustomScrollbar($('body').find('.evo-scrollbar'));
window.initCustomScrollbar=function(selector){
const $elements=selector ? $(selector):$('body').find('.evo-scrollbar');
initCustomScrollbar($elements);
};
*/
$.fn.evo_prepare_lb=function(){
$(this).find('.evo_lightbox_body').html('');
}
$.fn.evo_show_lb=function(opt){
var defaults={ RTL:'', calid:''}
var OPT=$.extend({}, defaults, opt);
$(this).addClass('show '+ OPT.RTL).attr('data-cal_id', OPT.calid);
$('body').trigger('evolightbox_show');
}
$.fn.evo_append_lb=function(opt){
var defaults={ C:'', CAL:''}
var OPT=$.extend({}, defaults, opt);
$(this).find('.evo_lightbox_body').html(OPT.C);
if(OPT.CAL!=''&&OPT.CAL!==undefined&&OPT.CAL.hasClass('color')){
const LIST=$(this).find('.eventon_events_list');
if(LIST.length>0){
LIST.find('.eventon_list_event').addClass('color');
}}
}
$.fn.eventon_process_main_ft_img=function(OO){
const IMG=this;
var img_sty='def';
if(IMG.hasClass('fit')) img_sty='fit';
if(IMG.hasClass('full')) img_sty='full';
let box_width=IMG.width();
let box_height=IMG.height();
box_width=box_width > 0 ? box_width:100;
box_height=box_height > 0 ? box_height:100;
const img_width=parseInt(IMG.data('w'))||100;
const img_height=parseInt(IMG.data('h'))||100;
const img_ratio=img_height / img_width;
let new_width, new_height;
if(IMG.hasClass('fit')){
new_width=box_height / img_ratio;
new_height=box_height;
if(new_width > box_width){
if(img_ratio <1){
new_width=box_width; new_height=img_ratio * new_width;
}else{
new_height=box_height; new_width=new_height / img_ratio;
}}
IMG.find('span').css({'width':new_width, 'height': new_height});
}
if(IMG.hasClass('full')){
new_height=img_ratio * box_width;
new_width=box_width;
IMG.find('span').css({'width':new_width, 'height': new_height});
IMG.css({'height': new_height});
}}
$.fn.evo_RealTime_form_validation=function(){
return this.each(function(){
var form=$(this);
var req_fields=form.find('.input.req');
var email_fields=form.find('.input.email');
var humanvalid_fields=form.find('.input.evoelm_hval_val');
req_fields.on('input blur', function(){ $(this).evo_form_validate_field('text'); });
email_fields.on('input blur', function(){ $(this).evo_form_validate_field('email'); });
humanvalid_fields.on('input blur', function(){ $(this).evo_form_validate_field('humanvalid'); });
});
}
$.fn.evo_form_validation_check=function(){
var form=this;
var req_fields=form.find('.input.req');
var email_fields=form.find('.input.email');
var humanvalid_fields=form.find('.input.evoelm_hval_val');
function validateForm(){
var hasErrors=false;
req_fields.each(function(){
if($(this).evo_form_validate_field('text')) hasErrors=true;
});
email_fields.each(function(){
if($(this).evo_form_validate_field('email')) hasErrors=true;
});
humanvalid_fields.each(function(){
if($(this).evo_form_validate_field('humanvalid')) hasErrors=true;
});
return !hasErrors;
}
return validateForm();
}
$.fn.evo_form_validate_field=function(type){
var field=this;
var errorElement=field.siblings('em');
var hasError=false;
var fieldValue=field.val().trim();
if(type==='email'){
if(field.hasClass('req')){
hasError=fieldValue===''||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fieldValue);
}else{
hasError=fieldValue!==''&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fieldValue);
}}else if(type==='humanvalid'){
var correctAnswer=field.data('val');
hasError=('89r329' +field.val().trim()+ '8932ufe')!==correctAnswer;
}else{
hasError=field.val().trim()==='';
}
if(hasError){
if(errorElement.length===0){
errorElement=$('<em class="evoelm_field_errmsg evopadt5"></em>');
field.after(errorElement);
}
errorElement.html(getErrorMessage(type==='email' ? 'err2':type==='humanvalid' ? 'err3':'err1'))
.removeClass('evodn')
.addClass('evodib');
field.addClass('err');
}else{
errorElement.remove();
field.removeClass('err');
}
function getErrorMessage(type){
const messages={
err1: evo_general_params.text.err1,
err2: evo_general_params.text.err2,
err3: evo_general_params.text.err3 
};
return messages[type]||"";
}
return hasError;
}
$('body').on('evo_elm_form_presubmit_validation', function(event, form, callback){
event.preventDefault();
var $form=$(form);
var isValid=$form.evo_form_validation_check();
if(typeof callback==="function"){
callback(isValid);
}});
$.fn.evo_shortcode_data=function(){
var ev_cal=$(this);
return ev_cal.find('.evo_cal_data').data('sc');
}
$.fn.evo_get_filter_data=function(){
return $(this).find('.evo_cal_data').data('filter_data');
}
$.fn.evo_cal_get_filter_sub_data=function(tax , key){
newdata=$(this).evo_get_filter_data();
return newdata[ tax ][ key ];
}
$.fn.evo_cal_update_filter_data=function(tax, new_val, key){
newdata=$(this).evo_get_filter_data();
if(key===undefined) key='nterms';
newdata[ tax ][ key ]=new_val;
$(this).find('.evo_cal_data').data('filter_data', newdata);
}
$.fn.evo_cal_get_footer_data=function(key){
data=$(this).find('.evo_cal_data').data();
if(data===undefined) return false;
if(key in data) return data[ key ];
return false;
}
$.fn.evo_cal_hide_data=function(){
$(this).find('.evo_cal_data').attr({
'data-sc':'',
'data-filter_data':'',
'data-nav_data':'',
});
}
$.fn.evo_update_sc_from_filters=function(){
var el=$(this);
SC=el.evo_shortcode_data();
$.each(el.evo_get_filter_data() , function(index, value){
var default_val=value.terms;
var filter_val=value.nterms;
const NOT_values=value.__notvals;
filter_val=filter_val==''? 'NOT-all': filter_val;
var not_string='';
if(NOT_values!==undefined&&NOT_values.length >0&&filter_val!=default_val){
$.each(NOT_values, function(index, value){
not_string +='NOT-'+ value +',';
});
}
SC[ index ]=not_string + filter_val;
});
el.find('.evo_cal_data').data('sc', SC);
}
$.fn.evo_get_sc_val=function(opt){
var defaults={	F:''}
var OPT=$.extend({}, defaults, opt);
var ev_cal=$(this);
if(OPT.F=='') return false;
SC=ev_cal.find('.evo_cal_data').data('sc');
if(!(SC[ OPT.F])) return false;
return SC[ OPT.F];
}
$.fn.evo_update_cal_sc=function(opt){
var defaults={
F:'', V:''
}
var OPT=$.extend({}, defaults, opt);
var ev_cal=$(this);
SC=ev_cal.find('.evo_cal_data').data('sc');
SC[ OPT.F ]=OPT.V;
ev_cal.find('.evo_cal_data').data('sc', SC);
}
$.fn.evo_update_all_cal_sc=function(opt){
var defaults={SC:''}
var OPT=$.extend({}, defaults, opt);
var CAL=$(this);
CAL.find('.evo_cal_data').data('sc', OPT.SC);
}
$.fn.evo_is_hex_dark=function(opt){
var defaults={ hex:'808080'}
var OPT=$.extend({}, defaults, opt);
hex=OPT.hex;
var c=hex.replace('#','');
var is_hex=typeof c==='string'&&c.length===6&&!isNaN(Number('0x' + c));
if(is_hex){
var values=c.split('');
r=parseInt(values[0].toString() + values[1].toString(), 16);
g=parseInt(values[2].toString() + values[3].toString(), 16);
b=parseInt(values[4].toString() + values[5].toString(), 16);
}else{
var vals=c.substring(c.indexOf('(') +1, c.length -1).split(', ');
var r=vals[0]
var g=vals[1];
var b=vals[2];
}
var luma=((r * 299) + (g * 587) + (b * 114)) / 1000;
return luma> 128? true:false;
}
$.fn.evo_rgb_process=function(opt){
var defaults={ data:'808080',type:'rgb', method:'rgb_to_val'}
var opt=$.extend({}, defaults, opt);
const color=opt.data;
if(opt.method=='rgb_to_hex'){
if(color=='1'){
return;
}else{
if(color!==''&&color){
rgb=color.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
return "#" +
("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
("0" + parseInt(rgb[3],10).toString(16)).slice(-2);
}}
}
if(opt.method=='rgb_to_val'){
if(opt.type=='hex'){
var rgba=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
var rgb=new Array();
rgb['r']=parseInt(rgba[1], 16);
rgb['g']=parseInt(rgba[2], 16);
rgb['b']=parseInt(rgba[3], 16);
}else{
rgb=color;
}
return parseInt((rgb['r'] + rgb['g'] + rgb['b'])/3);
}}
$.fn.evo_get_OD=function(){
var ev_cal=$(this);
return ev_cal.find('.evo_cal_data').data('od');
}
$.fn.evo_getevodata=function(){
var ev_cal=$(this);
var evoData={};
ev_cal.find('.evo-data').each(function(){
$.each(this.attributes, function(i, attrib){
var name=attrib.name;
if(attrib.name!='class'&&attrib.name!='style'){
name__=attrib.name.split('-');
evoData[name__[1]]=attrib.value;
}});
});
return evoData;
}
$.fn.evo_is_mobile=function(){
return(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )? true: false;
}
$.fn.evo_loader_animation=function(opt){
var defaults={
direction:'start'
}
var OPT=$.extend({}, defaults, opt);
if(OPT.direction=='start'){
$(this).find('#eventon_loadbar').slideDown();
}else{
$(this).find('#eventon_loadbar').slideUp();
}}
$.fn.evo_item_shortcodes=function(){
var OBJ=$(this);
var shortcode_array={};
OBJ.each(function(){
$.each(this.attributes, function(i, attrib){
var name=attrib.name;
if(attrib.name!='class'&&attrib.name!='style'&&attrib.value!=''){
name__=attrib.name.split('-');
shortcode_array[name__[1]]=attrib.value;
}});
});
return shortcode_array;
}
$.fn.evo_shortcodes=function(){
var ev_cal=$(this);
var shortcode_array={};
ev_cal.find('.cal_arguments').each(function(){
$.each(this.attributes, function(i, attrib){
var name=attrib.name;
if(attrib.name!='class'&&attrib.name!='style'&&attrib.value!=''){
name__=attrib.name.split('-');
shortcode_array[name__[1]]=attrib.value;
}});
});
return shortcode_array;
}});
jQuery.easing['jswing']=jQuery.easing['swing'];
jQuery.extend(jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d){
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d){
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d){
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d){
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d){
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d){
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d){
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d){
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d){
return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d){
return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d){
if(t==0) return b;
if(t==d) return b+c;
if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d){
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d){
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d){
if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d)==1) return b+c;  if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
},
easeOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d)==1) return b+c;  if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b;
},
easeInOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d/2)==2) return b+c;  if(!p) p=d*(.3*1.5);
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d){
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d){
if((t/=d) < (1/2.75)){
return c*(7.5625*t*t) + b;
}else if(t < (2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
}else if(t < (2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}},
easeInOutBounce: function (x, t, b, c, d){
if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}});
(function webpackUniversalModuleDefinition(root, factory){
if(typeof exports==='object'&&typeof module==='object')
module.exports=factory();
else if(typeof define==='function'&&define.amd)
define([], factory);
else if(typeof exports==='object')
exports["Handlebars"]=factory();
else
root["Handlebars"]=factory();
})(this, function(){
return  (function(modules){
var installedModules={};
function __webpack_require__(moduleId){
if(installedModules[moduleId])
return installedModules[moduleId].exports;
var module=installedModules[moduleId]={
exports: {},
id: moduleId,
loaded: false
};
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
module.loaded=true;
return module.exports;
}
__webpack_require__.m=modules;
__webpack_require__.c=installedModules;
__webpack_require__.p="";
return __webpack_require__(0);
})
([
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _handlebarsRuntime=__webpack_require__(2);
var _handlebarsRuntime2=_interopRequireDefault(_handlebarsRuntime);
var _handlebarsCompilerAst=__webpack_require__(45);
var _handlebarsCompilerAst2=_interopRequireDefault(_handlebarsCompilerAst);
var _handlebarsCompilerBase=__webpack_require__(46);
var _handlebarsCompilerCompiler=__webpack_require__(51);
var _handlebarsCompilerJavascriptCompiler=__webpack_require__(52);
var _handlebarsCompilerJavascriptCompiler2=_interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
var _handlebarsCompilerVisitor=__webpack_require__(49);
var _handlebarsCompilerVisitor2=_interopRequireDefault(_handlebarsCompilerVisitor);
var _handlebarsNoConflict=__webpack_require__(44);
var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);
var _create=_handlebarsRuntime2['default'].create;
function create(){
var hb=_create();
hb.compile=function (input, options){
return _handlebarsCompilerCompiler.compile(input, options, hb);
};
hb.precompile=function (input, options){
return _handlebarsCompilerCompiler.precompile(input, options, hb);
};
hb.AST=_handlebarsCompilerAst2['default'];
hb.Compiler=_handlebarsCompilerCompiler.Compiler;
hb.JavaScriptCompiler=_handlebarsCompilerJavascriptCompiler2['default'];
hb.Parser=_handlebarsCompilerBase.parser;
hb.parse=_handlebarsCompilerBase.parse;
hb.parseWithoutProcessing=_handlebarsCompilerBase.parseWithoutProcessing;
return hb;
}
var inst=create();
inst.create=create;
_handlebarsNoConflict2['default'](inst);
inst.Visitor=_handlebarsCompilerVisitor2['default'];
inst['default']=inst;
exports['default']=inst;
module.exports=exports['default'];
}),
(function(module, exports){
"use strict";
exports["default"]=function (obj){
return obj&&obj.__esModule ? obj:{
"default": obj
};};
exports.__esModule=true;
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireWildcard=__webpack_require__(3)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _handlebarsBase=__webpack_require__(4);
var base=_interopRequireWildcard(_handlebarsBase);
var _handlebarsSafeString=__webpack_require__(37);
var _handlebarsSafeString2=_interopRequireDefault(_handlebarsSafeString);
var _handlebarsException=__webpack_require__(6);
var _handlebarsException2=_interopRequireDefault(_handlebarsException);
var _handlebarsUtils=__webpack_require__(5);
var Utils=_interopRequireWildcard(_handlebarsUtils);
var _handlebarsRuntime=__webpack_require__(38);
var runtime=_interopRequireWildcard(_handlebarsRuntime);
var _handlebarsNoConflict=__webpack_require__(44);
var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);
function create(){
var hb=new base.HandlebarsEnvironment();
Utils.extend(hb, base);
hb.SafeString=_handlebarsSafeString2['default'];
hb.Exception=_handlebarsException2['default'];
hb.Utils=Utils;
hb.escapeExpression=Utils.escapeExpression;
hb.VM=runtime;
hb.template=function (spec){
return runtime.template(spec, hb);
};
return hb;
}
var inst=create();
inst.create=create;
_handlebarsNoConflict2['default'](inst);
inst['default']=inst;
exports['default']=inst;
module.exports=exports['default'];
}),
(function(module, exports){
"use strict";
exports["default"]=function (obj){
if(obj&&obj.__esModule){
return obj;
}else{
var newObj={};
if(obj!=null){
for (var key in obj){
if(Object.prototype.hasOwnProperty.call(obj, key)) newObj[key]=obj[key];
}}
newObj["default"]=obj;
return newObj;
}};
exports.__esModule=true;
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.HandlebarsEnvironment=HandlebarsEnvironment;
var _utils=__webpack_require__(5);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _helpers=__webpack_require__(10);
var _decorators=__webpack_require__(30);
var _logger=__webpack_require__(32);
var _logger2=_interopRequireDefault(_logger);
var _internalProtoAccess=__webpack_require__(33);
var VERSION='4.7.7';
exports.VERSION=VERSION;
var COMPILER_REVISION=8;
exports.COMPILER_REVISION=COMPILER_REVISION;
var LAST_COMPATIBLE_COMPILER_REVISION=7;
exports.LAST_COMPATIBLE_COMPILER_REVISION=LAST_COMPATIBLE_COMPILER_REVISION;
var REVISION_CHANGES={
1: '<=1.0.rc.2',
2: '==1.0.0-rc.3',
3: '==1.0.0-rc.4',
4: '==1.x.x',
5: '==2.0.0-alpha.x',
6: '>=2.0.0-beta.1',
7: '>=4.0.0 <4.3.0',
8: '>=4.3.0'
};
exports.REVISION_CHANGES=REVISION_CHANGES;
var objectType='[object Object]';
function HandlebarsEnvironment(helpers, partials, decorators){
this.helpers=helpers||{};
this.partials=partials||{};
this.decorators=decorators||{};
_helpers.registerDefaultHelpers(this);
_decorators.registerDefaultDecorators(this);
}
HandlebarsEnvironment.prototype={
constructor: HandlebarsEnvironment,
logger: _logger2['default'],
log: _logger2['default'].log,
registerHelper: function registerHelper(name, fn){
if(_utils.toString.call(name)===objectType){
if(fn){
throw new _exception2['default']('Arg not supported with multiple helpers');
}
_utils.extend(this.helpers, name);
}else{
this.helpers[name]=fn;
}},
unregisterHelper: function unregisterHelper(name){
delete this.helpers[name];
},
registerPartial: function registerPartial(name, partial){
if(_utils.toString.call(name)===objectType){
_utils.extend(this.partials, name);
}else{
if(typeof partial==='undefined'){
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
}
this.partials[name]=partial;
}},
unregisterPartial: function unregisterPartial(name){
delete this.partials[name];
},
registerDecorator: function registerDecorator(name, fn){
if(_utils.toString.call(name)===objectType){
if(fn){
throw new _exception2['default']('Arg not supported with multiple decorators');
}
_utils.extend(this.decorators, name);
}else{
this.decorators[name]=fn;
}},
unregisterDecorator: function unregisterDecorator(name){
delete this.decorators[name];
},
resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses(){
_internalProtoAccess.resetLoggedProperties();
}};
var log=_logger2['default'].log;
exports.log=log;
exports.createFrame=_utils.createFrame;
exports.logger=_logger2['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports.extend=extend;
exports.indexOf=indexOf;
exports.escapeExpression=escapeExpression;
exports.isEmpty=isEmpty;
exports.createFrame=createFrame;
exports.blockParams=blockParams;
exports.appendContextPath=appendContextPath;
var escape={
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#x27;',
'`': '&#x60;',
'=': '&#x3D;'
};
var badChars=/[&<>"'`=]/g,
possible=/[&<>"'`=]/;
function escapeChar(chr){
return escape[chr];
}
function extend(obj ){
for (var i=1; i < arguments.length; i++){
for (var key in arguments[i]){
if(Object.prototype.hasOwnProperty.call(arguments[i], key)){
obj[key]=arguments[i][key];
}}
}
return obj;
}
var toString=Object.prototype.toString;
exports.toString=toString;
var isFunction=function isFunction(value){
return typeof value==='function';
};
if(isFunction(/x/)){
exports.isFunction=isFunction=function (value){
return typeof value==='function'&&toString.call(value)==='[object Function]';
};}
exports.isFunction=isFunction;
var isArray=Array.isArray||function (value){
return value&&typeof value==='object' ? toString.call(value)==='[object Array]':false;
};
exports.isArray=isArray;
function indexOf(array, value){
for (var i=0, len=array.length; i < len; i++){
if(array[i]===value){
return i;
}}
return -1;
}
function escapeExpression(string){
if(typeof string!=='string'){
if(string&&string.toHTML){
return string.toHTML();
}else if(string==null){
return '';
}else if(!string){
return string + '';
}
string='' + string;
}
if(!possible.test(string)){
return string;
}
return string.replace(badChars, escapeChar);
}
function isEmpty(value){
if(!value&&value!==0){
return true;
}else if(isArray(value)&&value.length===0){
return true;
}else{
return false;
}}
function createFrame(object){
var frame=extend({}, object);
frame._parent=object;
return frame;
}
function blockParams(params, ids){
params.path=ids;
return params;
}
function appendContextPath(contextPath, id){
return (contextPath ? contextPath + '.':'') + id;
}
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$defineProperty=__webpack_require__(7)['default'];
exports.__esModule=true;
var errorProps=['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];
function Exception(message, node){
var loc=node&&node.loc,
line=undefined,
endLineNumber=undefined,
column=undefined,
endColumn=undefined;
if(loc){
line=loc.start.line;
endLineNumber=loc.end.line;
column=loc.start.column;
endColumn=loc.end.column;
message +=' - ' + line + ':' + column;
}
var tmp=Error.prototype.constructor.call(this, message);
for (var idx=0; idx < errorProps.length; idx++){
this[errorProps[idx]]=tmp[errorProps[idx]];
}
if(Error.captureStackTrace){
Error.captureStackTrace(this, Exception);
}
try {
if(loc){
this.lineNumber=line;
this.endLineNumber=endLineNumber;
if(_Object$defineProperty){
Object.defineProperty(this, 'column', {
value: column,
enumerable: true
});
Object.defineProperty(this, 'endColumn', {
value: endColumn,
enumerable: true
});
}else{
this.column=column;
this.endColumn=endColumn;
}}
} catch (nop){
}}
Exception.prototype=new Error();
exports['default']=Exception;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
module.exports={ "default": __webpack_require__(8), __esModule: true };
}),
(function(module, exports, __webpack_require__){
var $=__webpack_require__(9);
module.exports=function defineProperty(it, key, desc){
return $.setDesc(it, key, desc);
};
}),
(function(module, exports){
var $Object=Object;
module.exports={
create:     $Object.create,
getProto:   $Object.getPrototypeOf,
isEnum:     {}.propertyIsEnumerable,
getDesc:    $Object.getOwnPropertyDescriptor,
setDesc:    $Object.defineProperty,
setDescs:   $Object.defineProperties,
getKeys:    $Object.keys,
getNames:   $Object.getOwnPropertyNames,
getSymbols: $Object.getOwnPropertySymbols,
each:       [].forEach
};
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.registerDefaultHelpers=registerDefaultHelpers;
exports.moveHelperToHooks=moveHelperToHooks;
var _helpersBlockHelperMissing=__webpack_require__(11);
var _helpersBlockHelperMissing2=_interopRequireDefault(_helpersBlockHelperMissing);
var _helpersEach=__webpack_require__(12);
var _helpersEach2=_interopRequireDefault(_helpersEach);
var _helpersHelperMissing=__webpack_require__(25);
var _helpersHelperMissing2=_interopRequireDefault(_helpersHelperMissing);
var _helpersIf=__webpack_require__(26);
var _helpersIf2=_interopRequireDefault(_helpersIf);
var _helpersLog=__webpack_require__(27);
var _helpersLog2=_interopRequireDefault(_helpersLog);
var _helpersLookup=__webpack_require__(28);
var _helpersLookup2=_interopRequireDefault(_helpersLookup);
var _helpersWith=__webpack_require__(29);
var _helpersWith2=_interopRequireDefault(_helpersWith);
function registerDefaultHelpers(instance){
_helpersBlockHelperMissing2['default'](instance);
_helpersEach2['default'](instance);
_helpersHelperMissing2['default'](instance);
_helpersIf2['default'](instance);
_helpersLog2['default'](instance);
_helpersLookup2['default'](instance);
_helpersWith2['default'](instance);
}
function moveHelperToHooks(instance, helperName, keepHelper){
if(instance.helpers[helperName]){
instance.hooks[helperName]=instance.helpers[helperName];
if(!keepHelper){
delete instance.helpers[helperName];
}}
}
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
exports['default']=function (instance){
instance.registerHelper('blockHelperMissing', function (context, options){
var inverse=options.inverse,
fn=options.fn;
if(context===true){
return fn(this);
}else if(context===false||context==null){
return inverse(this);
}else if(_utils.isArray(context)){
if(context.length > 0){
if(options.ids){
options.ids=[options.name];
}
return instance.helpers.each(context, options);
}else{
return inverse(this);
}}else{
if(options.data&&options.ids){
var data=_utils.createFrame(options.data);
data.contextPath=_utils.appendContextPath(options.data.contextPath, options.name);
options={ data: data };}
return fn(context, options);
}});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
(function(global){'use strict';
var _Object$keys=__webpack_require__(13)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _utils=__webpack_require__(5);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
exports['default']=function (instance){
instance.registerHelper('each', function (context, options){
if(!options){
throw new _exception2['default']('Must pass iterator to #each');
}
var fn=options.fn,
inverse=options.inverse,
i=0,
ret='',
data=undefined,
contextPath=undefined;
if(options.data&&options.ids){
contextPath=_utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
}
if(_utils.isFunction(context)){
context=context.call(this);
}
if(options.data){
data=_utils.createFrame(options.data);
}
function execIteration(field, index, last){
if(data){
data.key=field;
data.index=index;
data.first=index===0;
data.last = !!last;
if(contextPath){
data.contextPath=contextPath + field;
}}
ret=ret + fn(context[field], {
data: data,
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
});
}
if(context&&typeof context==='object'){
if(_utils.isArray(context)){
for (var j=context.length; i < j; i++){
if(i in context){
execIteration(i, i, i===context.length - 1);
}}
}else if(global.Symbol&&context[global.Symbol.iterator]){
var newContext=[];
var iterator=context[global.Symbol.iterator]();
for (var it=iterator.next(); !it.done; it=iterator.next()){
newContext.push(it.value);
}
context=newContext;
for (var j=context.length; i < j; i++){
execIteration(i, i, i===context.length - 1);
}}else{
(function (){
var priorKey=undefined;
_Object$keys(context).forEach(function (key){
if(priorKey!==undefined){
execIteration(priorKey, i - 1);
}
priorKey=key;
i++;
});
if(priorKey!==undefined){
execIteration(priorKey, i - 1, true);
}})();
}}
if(i===0){
ret=inverse(this);
}
return ret;
});
};
module.exports=exports['default'];
}.call(exports, (function(){ return this; }())))
}),
(function(module, exports, __webpack_require__){
module.exports={ "default": __webpack_require__(14), __esModule: true };
}),
(function(module, exports, __webpack_require__){
__webpack_require__(15);
module.exports=__webpack_require__(21).Object.keys;
}),
(function(module, exports, __webpack_require__){
var toObject=__webpack_require__(16);
__webpack_require__(18)('keys', function($keys){
return function keys(it){
return $keys(toObject(it));
};});
}),
(function(module, exports, __webpack_require__){
var defined=__webpack_require__(17);
module.exports=function(it){
return Object(defined(it));
};
}),
(function(module, exports){
module.exports=function(it){
if(it==undefined)throw TypeError("Can't call method on  " + it);
return it;
};
}),
(function(module, exports, __webpack_require__){
var $export=__webpack_require__(19)
, core=__webpack_require__(21)
, fails=__webpack_require__(24);
module.exports=function(KEY, exec){
var fn=(core.Object||{})[KEY]||Object[KEY]
, exp={};
exp[KEY]=exec(fn);
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
}),
(function(module, exports, __webpack_require__){
var global=__webpack_require__(20)
, core=__webpack_require__(21)
, ctx=__webpack_require__(22)
, PROTOTYPE='prototype';
var $export=function(type, name, source){
var IS_FORCED=type & $export.F
, IS_GLOBAL=type & $export.G
, IS_STATIC=type & $export.S
, IS_PROTO=type & $export.P
, IS_BIND=type & $export.B
, IS_WRAP=type & $export.W
, exports=IS_GLOBAL ? core:core[name]||(core[name]={})
, target=IS_GLOBAL ? global:IS_STATIC ? global[name]:(global[name]||{})[PROTOTYPE]
, key, own, out;
if(IS_GLOBAL)source=name;
for(key in source){
own = !IS_FORCED&&target&&key in target;
if(own&&key in exports)continue;
out=own ? target[key]:source[key];
exports[key]=IS_GLOBAL&&typeof target[key]!='function' ? source[key]
: IS_BIND&&own ? ctx(out, global)
: IS_WRAP&&target[key]==out ? (function(C){
var F=function(param){
return this instanceof C ? new C(param):C(param);
};
F[PROTOTYPE]=C[PROTOTYPE];
return F;
})(out):IS_PROTO&&typeof out=='function' ? ctx(Function.call, out):out;
if(IS_PROTO)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out;
}};
$export.F=1;
$export.G=2;
$export.S=4;
$export.P=8;
$export.B=16;
$export.W=32;
module.exports=$export;
}),
(function(module, exports){
var global=module.exports=typeof window!='undefined'&&window.Math==Math
? window:typeof self!='undefined'&&self.Math==Math ? self:Function('return this')();
if(typeof __g=='number')__g=global;
}),
(function(module, exports){
var core=module.exports={version: '1.2.6'};
if(typeof __e=='number')__e=core;
}),
(function(module, exports, __webpack_require__){
var aFunction=__webpack_require__(23);
module.exports=function(fn, that, length){
aFunction(fn);
if(that===undefined)return fn;
switch(length){
case 1: return function(a){
return fn.call(that, a);
};
case 2: return function(a, b){
return fn.call(that, a, b);
};
case 3: return function(a, b, c){
return fn.call(that, a, b, c);
};}
return function(){
return fn.apply(that, arguments);
};};
}),
(function(module, exports){
module.exports=function(it){
if(typeof it!='function')throw TypeError(it + ' is not a function!');
return it;
};
}),
(function(module, exports){
module.exports=function(exec){
try {
return !!exec();
} catch(e){
return true;
}};
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
exports['default']=function (instance){
instance.registerHelper('helperMissing', function () {
if(arguments.length===1){
return undefined;
}else{
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
}});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _utils=__webpack_require__(5);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
exports['default']=function (instance){
instance.registerHelper('if', function (conditional, options){
if(arguments.length!=2){
throw new _exception2['default']('#if requires exactly one argument');
}
if(_utils.isFunction(conditional)){
conditional=conditional.call(this);
}
if(!options.hash.includeZero&&!conditional||_utils.isEmpty(conditional)){
return options.inverse(this);
}else{
return options.fn(this);
}});
instance.registerHelper('unless', function (conditional, options){
if(arguments.length!=2){
throw new _exception2['default']('#unless requires exactly one argument');
}
return instance.helpers['if'].call(this, conditional, {
fn: options.inverse,
inverse: options.fn,
hash: options.hash
});
});
};
module.exports=exports['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports['default']=function (instance){
instance.registerHelper('log', function () {
var args=[undefined],
options=arguments[arguments.length - 1];
for (var i=0; i < arguments.length - 1; i++){
args.push(arguments[i]);
}
var level=1;
if(options.hash.level!=null){
level=options.hash.level;
}else if(options.data&&options.data.level!=null){
level=options.data.level;
}
args[0]=level;
instance.log.apply(instance, args);
});
};
module.exports=exports['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports['default']=function (instance){
instance.registerHelper('lookup', function (obj, field, options){
if(!obj){
return obj;
}
return options.lookupProperty(obj, field);
});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _utils=__webpack_require__(5);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
exports['default']=function (instance){
instance.registerHelper('with', function (context, options){
if(arguments.length!=2){
throw new _exception2['default']('#with requires exactly one argument');
}
if(_utils.isFunction(context)){
context=context.call(this);
}
var fn=options.fn;
if(!_utils.isEmpty(context)){
var data=options.data;
if(options.data&&options.ids){
data=_utils.createFrame(options.data);
data.contextPath=_utils.appendContextPath(options.data.contextPath, options.ids[0]);
}
return fn(context, {
data: data,
blockParams: _utils.blockParams([context], [data&&data.contextPath])
});
}else{
return options.inverse(this);
}});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.registerDefaultDecorators=registerDefaultDecorators;
var _decoratorsInline=__webpack_require__(31);
var _decoratorsInline2=_interopRequireDefault(_decoratorsInline);
function registerDefaultDecorators(instance){
_decoratorsInline2['default'](instance);
}
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
exports['default']=function (instance){
instance.registerDecorator('inline', function (fn, props, container, options){
var ret=fn;
if(!props.partials){
props.partials={};
ret=function (context, options){
var original=container.partials;
container.partials=_utils.extend({}, original, props.partials);
var ret=fn(context, options);
container.partials=original;
return ret;
};}
props.partials[options.args[0]]=options.fn;
return ret;
});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
var logger={
methodMap: ['debug', 'info', 'warn', 'error'],
level: 'info',
lookupLevel: function lookupLevel(level){
if(typeof level==='string'){
var levelMap=_utils.indexOf(logger.methodMap, level.toLowerCase());
if(levelMap >=0){
level=levelMap;
}else{
level=parseInt(level, 10);
}}
return level;
},
log: function log(level){
level=logger.lookupLevel(level);
if(typeof console!=='undefined'&&logger.lookupLevel(logger.level) <=level){
var method=logger.methodMap[level];
if(!console[method]){
method='log';
}
for (var _len=arguments.length, message=Array(_len > 1 ? _len - 1:0), _key=1; _key < _len; _key++){
message[_key - 1]=arguments[_key];
}
console[method].apply(console, message);
}}
};
exports['default']=logger;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$create=__webpack_require__(34)['default'];
var _Object$keys=__webpack_require__(13)['default'];
var _interopRequireWildcard=__webpack_require__(3)['default'];
exports.__esModule=true;
exports.createProtoAccessControl=createProtoAccessControl;
exports.resultIsAllowed=resultIsAllowed;
exports.resetLoggedProperties=resetLoggedProperties;
var _createNewLookupObject=__webpack_require__(36);
var _logger=__webpack_require__(32);
var logger=_interopRequireWildcard(_logger);
var loggedProperties=_Object$create(null);
function createProtoAccessControl(runtimeOptions){
var defaultMethodWhiteList=_Object$create(null);
defaultMethodWhiteList['constructor']=false;
defaultMethodWhiteList['__defineGetter__']=false;
defaultMethodWhiteList['__defineSetter__']=false;
defaultMethodWhiteList['__lookupGetter__']=false;
var defaultPropertyWhiteList=_Object$create(null);
defaultPropertyWhiteList['__proto__']=false;
return {
properties: {
whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
},
methods: {
whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
defaultValue: runtimeOptions.allowProtoMethodsByDefault
}};}
function resultIsAllowed(result, protoAccessControl, propertyName){
if(typeof result==='function'){
return checkWhiteList(protoAccessControl.methods, propertyName);
}else{
return checkWhiteList(protoAccessControl.properties, propertyName);
}}
function checkWhiteList(protoAccessControlForType, propertyName){
if(protoAccessControlForType.whitelist[propertyName]!==undefined){
return protoAccessControlForType.whitelist[propertyName]===true;
}
if(protoAccessControlForType.defaultValue!==undefined){
return protoAccessControlForType.defaultValue;
}
logUnexpecedPropertyAccessOnce(propertyName);
return false;
}
function logUnexpecedPropertyAccessOnce(propertyName){
if(loggedProperties[propertyName]!==true){
loggedProperties[propertyName]=true;
logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');
}}
function resetLoggedProperties(){
_Object$keys(loggedProperties).forEach(function (propertyName){
delete loggedProperties[propertyName];
});
}
}),
(function(module, exports, __webpack_require__){
module.exports={ "default": __webpack_require__(35), __esModule: true };
}),
(function(module, exports, __webpack_require__){
var $=__webpack_require__(9);
module.exports=function create(P, D){
return $.create(P, D);
};
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$create=__webpack_require__(34)['default'];
exports.__esModule=true;
exports.createNewLookupObject=createNewLookupObject;
var _utils=__webpack_require__(5);
function createNewLookupObject(){
for (var _len=arguments.length, sources=Array(_len), _key=0; _key < _len; _key++){
sources[_key]=arguments[_key];
}
return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
}
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
function SafeString(string){
this.string=string;
}
SafeString.prototype.toString=SafeString.prototype.toHTML=function (){
return '' + this.string;
};
exports['default']=SafeString;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$seal=__webpack_require__(39)['default'];
var _Object$keys=__webpack_require__(13)['default'];
var _interopRequireWildcard=__webpack_require__(3)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.checkRevision=checkRevision;
exports.template=template;
exports.wrapProgram=wrapProgram;
exports.resolvePartial=resolvePartial;
exports.invokePartial=invokePartial;
exports.noop=noop;
var _utils=__webpack_require__(5);
var Utils=_interopRequireWildcard(_utils);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _base=__webpack_require__(4);
var _helpers=__webpack_require__(10);
var _internalWrapHelper=__webpack_require__(43);
var _internalProtoAccess=__webpack_require__(33);
function checkRevision(compilerInfo){
var compilerRevision=compilerInfo&&compilerInfo[0]||1,
currentRevision=_base.COMPILER_REVISION;
if(compilerRevision >=_base.LAST_COMPATIBLE_COMPILER_REVISION&&compilerRevision <=_base.COMPILER_REVISION){
return;
}
if(compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION){
var runtimeVersions=_base.REVISION_CHANGES[currentRevision],
compilerVersions=_base.REVISION_CHANGES[compilerRevision];
throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
}else{
throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
}}
function template(templateSpec, env){
if(!env){
throw new _exception2['default']('No environment passed to template');
}
if(!templateSpec||!templateSpec.main){
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
}
templateSpec.main.decorator=templateSpec.main_d;
env.VM.checkRevision(templateSpec.compiler);
var templateWasPrecompiledWithCompilerV7=templateSpec.compiler&&templateSpec.compiler[0]===7;
function invokePartialWrapper(partial, context, options){
if(options.hash){
context=Utils.extend({}, context, options.hash);
if(options.ids){
options.ids[0]=true;
}}
partial=env.VM.resolvePartial.call(this, partial, context, options);
var extendedOptions=Utils.extend({}, options, {
hooks: this.hooks,
protoAccessControl: this.protoAccessControl
});
var result=env.VM.invokePartial.call(this, partial, context, extendedOptions);
if(result==null&&env.compile){
options.partials[options.name]=env.compile(partial, templateSpec.compilerOptions, env);
result=options.partials[options.name](context, extendedOptions);
}
if(result!=null){
if(options.indent){
var lines=result.split('\n');
for (var i=0, l=lines.length; i < l; i++){
if(!lines[i]&&i + 1===l){
break;
}
lines[i]=options.indent + lines[i];
}
result=lines.join('\n');
}
return result;
}else{
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
}}
var container={
strict: function strict(obj, name, loc){
if(!obj||!(name in obj)){
throw new _exception2['default']('"' + name + '" not defined in ' + obj, {
loc: loc
});
}
return container.lookupProperty(obj, name);
},
lookupProperty: function lookupProperty(parent, propertyName){
var result=parent[propertyName];
if(result==null){
return result;
}
if(Object.prototype.hasOwnProperty.call(parent, propertyName)){
return result;
}
if(_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)){
return result;
}
return undefined;
},
lookup: function lookup(depths, name){
var len=depths.length;
for (var i=0; i < len; i++){
var result=depths[i]&&container.lookupProperty(depths[i], name);
if(result!=null){
return depths[i][name];
}}
},
lambda: function lambda(current, context){
return typeof current==='function' ? current.call(context):current;
},
escapeExpression: Utils.escapeExpression,
invokePartial: invokePartialWrapper,
fn: function fn(i){
var ret=templateSpec[i];
ret.decorator=templateSpec[i + '_d'];
return ret;
},
programs: [],
program: function program(i, data, declaredBlockParams, blockParams, depths){
var programWrapper=this.programs[i],
fn=this.fn(i);
if(data||depths||blockParams||declaredBlockParams){
programWrapper=wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
}else if(!programWrapper){
programWrapper=this.programs[i]=wrapProgram(this, i, fn);
}
return programWrapper;
},
data: function data(value, depth){
while (value&&depth--){
value=value._parent;
}
return value;
},
mergeIfNeeded: function mergeIfNeeded(param, common){
var obj=param||common;
if(param&&common&&param!==common){
obj=Utils.extend({}, common, param);
}
return obj;
},
nullContext: _Object$seal({}),
noop: env.VM.noop,
compilerInfo: templateSpec.compiler
};
function ret(context){
var options=arguments.length <=1||arguments[1]===undefined ? {}:arguments[1];
var data=options.data;
ret._setup(options);
if(!options.partial&&templateSpec.useData){
data=initData(context, data);
}
var depths=undefined,
blockParams=templateSpec.useBlockParams ? []:undefined;
if(templateSpec.useDepths){
if(options.depths){
depths=context!=options.depths[0] ? [context].concat(options.depths):options.depths;
}else{
depths=[context];
}}
function main(context ){
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
}
main=executeDecorators(templateSpec.main, main, container, options.depths||[], data, blockParams);
return main(context, options);
}
ret.isTop=true;
ret._setup=function (options){
if(!options.partial){
var mergedHelpers=Utils.extend({}, env.helpers, options.helpers);
wrapHelpersToPassLookupProperty(mergedHelpers, container);
container.helpers=mergedHelpers;
if(templateSpec.usePartial){
container.partials=container.mergeIfNeeded(options.partials, env.partials);
}
if(templateSpec.usePartial||templateSpec.useDecorators){
container.decorators=Utils.extend({}, env.decorators, options.decorators);
}
container.hooks={};
container.protoAccessControl=_internalProtoAccess.createProtoAccessControl(options);
var keepHelperInHelpers=options.allowCallsToHelperMissing||templateWasPrecompiledWithCompilerV7;
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
}else{
container.protoAccessControl=options.protoAccessControl;
container.helpers=options.helpers;
container.partials=options.partials;
container.decorators=options.decorators;
container.hooks=options.hooks;
}};
ret._child=function (i, data, blockParams, depths){
if(templateSpec.useBlockParams&&!blockParams){
throw new _exception2['default']('must pass block params');
}
if(templateSpec.useDepths&&!depths){
throw new _exception2['default']('must pass parent depths');
}
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
};
return ret;
}
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths){
function prog(context){
var options=arguments.length <=1||arguments[1]===undefined ? {}:arguments[1];
var currentDepths=depths;
if(depths&&context!=depths[0]&&!(context===container.nullContext&&depths[0]===null)){
currentDepths=[context].concat(depths);
}
return fn(container, context, container.helpers, container.partials, options.data||data, blockParams&&[options.blockParams].concat(blockParams), currentDepths);
}
prog=executeDecorators(fn, prog, container, depths, data, blockParams);
prog.program=i;
prog.depth=depths ? depths.length:0;
prog.blockParams=declaredBlockParams||0;
return prog;
}
function resolvePartial(partial, context, options){
if(!partial){
if(options.name==='@partial-block'){
partial=options.data['partial-block'];
}else{
partial=options.partials[options.name];
}}else if(!partial.call&&!options.name){
options.name=partial;
partial=options.partials[partial];
}
return partial;
}
function invokePartial(partial, context, options){
var currentPartialBlock=options.data&&options.data['partial-block'];
options.partial=true;
if(options.ids){
options.data.contextPath=options.ids[0]||options.data.contextPath;
}
var partialBlock=undefined;
if(options.fn&&options.fn!==noop){
(function (){
options.data=_base.createFrame(options.data);
var fn=options.fn;
partialBlock=options.data['partial-block']=function partialBlockWrapper(context){
var options=arguments.length <=1||arguments[1]===undefined ? {}:arguments[1];
options.data=_base.createFrame(options.data);
options.data['partial-block']=currentPartialBlock;
return fn(context, options);
};
if(fn.partials){
options.partials=Utils.extend({}, options.partials, fn.partials);
}})();
}
if(partial===undefined&&partialBlock){
partial=partialBlock;
}
if(partial===undefined){
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
}else if(partial instanceof Function){
return partial(context, options);
}}
function noop(){
return '';
}
function initData(context, data){
if(!data||!('root' in data)){
data=data ? _base.createFrame(data):{};
data.root=context;
}
return data;
}
function executeDecorators(fn, prog, container, depths, data, blockParams){
if(fn.decorator){
var props={};
prog=fn.decorator(prog, props, container, depths&&depths[0], data, blockParams, depths);
Utils.extend(prog, props);
}
return prog;
}
function wrapHelpersToPassLookupProperty(mergedHelpers, container){
_Object$keys(mergedHelpers).forEach(function (helperName){
var helper=mergedHelpers[helperName];
mergedHelpers[helperName]=passLookupPropertyOption(helper, container);
});
}
function passLookupPropertyOption(helper, container){
var lookupProperty=container.lookupProperty;
return _internalWrapHelper.wrapHelper(helper, function (options){
return Utils.extend({ lookupProperty: lookupProperty }, options);
});
}
}),
(function(module, exports, __webpack_require__){
module.exports={ "default": __webpack_require__(40), __esModule: true };
}),
(function(module, exports, __webpack_require__){
__webpack_require__(41);
module.exports=__webpack_require__(21).Object.seal;
}),
(function(module, exports, __webpack_require__){
var isObject=__webpack_require__(42);
__webpack_require__(18)('seal', function($seal){
return function seal(it){
return $seal&&isObject(it) ? $seal(it):it;
};});
}),
(function(module, exports){
module.exports=function(it){
return typeof it==='object' ? it!==null:typeof it==='function';
};
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports.wrapHelper=wrapHelper;
function wrapHelper(helper, transformOptionsFn){
if(typeof helper!=='function'){
return helper;
}
var wrapper=function wrapper() {
var options=arguments[arguments.length - 1];
arguments[arguments.length - 1]=transformOptionsFn(options);
return helper.apply(this, arguments);
};
return wrapper;
}
}),
(function(module, exports){
(function(global){'use strict';
exports.__esModule=true;
exports['default']=function (Handlebars){
var root=typeof global!=='undefined' ? global:window,
$Handlebars=root.Handlebars;
Handlebars.noConflict=function (){
if(root.Handlebars===Handlebars){
root.Handlebars=$Handlebars;
}
return Handlebars;
};};
module.exports=exports['default'];
}.call(exports, (function(){ return this; }())))
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
var AST={
helpers: {
helperExpression: function helperExpression(node){
return node.type==='SubExpression'||(node.type==='MustacheStatement'||node.type==='BlockStatement')&&!!(node.params&&node.params.length||node.hash);
},
scopedId: function scopedId(path){
return (/^\.|this\b/.test(path.original)
);
},
simpleId: function simpleId(path){
return path.parts.length===1&&!AST.helpers.scopedId(path)&&!path.depth;
}}
};
exports['default']=AST;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
var _interopRequireWildcard=__webpack_require__(3)['default'];
exports.__esModule=true;
exports.parseWithoutProcessing=parseWithoutProcessing;
exports.parse=parse;
var _parser=__webpack_require__(47);
var _parser2=_interopRequireDefault(_parser);
var _whitespaceControl=__webpack_require__(48);
var _whitespaceControl2=_interopRequireDefault(_whitespaceControl);
var _helpers=__webpack_require__(50);
var Helpers=_interopRequireWildcard(_helpers);
var _utils=__webpack_require__(5);
exports.parser=_parser2['default'];
var yy={};
_utils.extend(yy, Helpers);
function parseWithoutProcessing(input, options){
if(input.type==='Program'){
return input;
}
_parser2['default'].yy=yy;
yy.locInfo=function (locInfo){
return new yy.SourceLocation(options&&options.srcName, locInfo);
};
var ast=_parser2['default'].parse(input);
return ast;
}
function parse(input, options){
var ast=parseWithoutProcessing(input, options);
var strip=new _whitespaceControl2['default'](options);
return strip.accept(ast);
}
}),
(function(module, exports){
"use strict";
exports.__esModule=true;
var handlebars=(function (){
var parser={ trace: function trace(){},
yy: {},
symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$){
var $0=$$.length - 1;
switch (yystate){
case 1:
return $$[$0 - 1];
break;
case 2:
this.$=yy.prepareProgram($$[$0]);
break;
case 3:
this.$=$$[$0];
break;
case 4:
this.$=$$[$0];
break;
case 5:
this.$=$$[$0];
break;
case 6:
this.$=$$[$0];
break;
case 7:
this.$=$$[$0];
break;
case 8:
this.$=$$[$0];
break;
case 9:
this.$={
type: 'CommentStatement',
value: yy.stripComment($$[$0]),
strip: yy.stripFlags($$[$0], $$[$0]),
loc: yy.locInfo(this._$)
};
break;
case 10:
this.$={
type: 'ContentStatement',
original: $$[$0],
value: $$[$0],
loc: yy.locInfo(this._$)
};
break;
case 11:
this.$=yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
break;
case 12:
this.$={ path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
break;
case 13:
this.$=yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
break;
case 14:
this.$=yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
break;
case 15:
this.$={ open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
break;
case 16:
this.$={ path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
break;
case 17:
this.$={ path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
break;
case 18:
this.$={ strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
break;
case 19:
var inverse=yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
program=yy.prepareProgram([inverse], $$[$0 - 1].loc);
program.chained=true;
this.$={ strip: $$[$0 - 2].strip, program: program, chain: true };
break;
case 20:
this.$=$$[$0];
break;
case 21:
this.$={ path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
break;
case 22:
this.$=yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
break;
case 23:
this.$=yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
break;
case 24:
this.$={
type: 'PartialStatement',
name: $$[$0 - 3],
params: $$[$0 - 2],
hash: $$[$0 - 1],
indent: '',
strip: yy.stripFlags($$[$0 - 4], $$[$0]),
loc: yy.locInfo(this._$)
};
break;
case 25:
this.$=yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
break;
case 26:
this.$={ path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
break;
case 27:
this.$=$$[$0];
break;
case 28:
this.$=$$[$0];
break;
case 29:
this.$={
type: 'SubExpression',
path: $$[$0 - 3],
params: $$[$0 - 2],
hash: $$[$0 - 1],
loc: yy.locInfo(this._$)
};
break;
case 30:
this.$={ type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
break;
case 31:
this.$={ type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
break;
case 32:
this.$=yy.id($$[$0 - 1]);
break;
case 33:
this.$=$$[$0];
break;
case 34:
this.$=$$[$0];
break;
case 35:
this.$={ type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
break;
case 36:
this.$={ type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
break;
case 37:
this.$={ type: 'BooleanLiteral', value: $$[$0]==='true', original: $$[$0]==='true', loc: yy.locInfo(this._$) };
break;
case 38:
this.$={ type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
break;
case 39:
this.$={ type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
break;
case 40:
this.$=$$[$0];
break;
case 41:
this.$=$$[$0];
break;
case 42:
this.$=yy.preparePath(true, $$[$0], this._$);
break;
case 43:
this.$=yy.preparePath(false, $$[$0], this._$);
break;
case 44:
$$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$=$$[$0 - 2];
break;
case 45:
this.$=[{ part: yy.id($$[$0]), original: $$[$0] }];
break;
case 46:
this.$=[];
break;
case 47:
$$[$0 - 1].push($$[$0]);
break;
case 48:
this.$=[];
break;
case 49:
$$[$0 - 1].push($$[$0]);
break;
case 50:
this.$=[];
break;
case 51:
$$[$0 - 1].push($$[$0]);
break;
case 58:
this.$=[];
break;
case 59:
$$[$0 - 1].push($$[$0]);
break;
case 64:
this.$=[];
break;
case 65:
$$[$0 - 1].push($$[$0]);
break;
case 70:
this.$=[];
break;
case 71:
$$[$0 - 1].push($$[$0]);
break;
case 78:
this.$=[];
break;
case 79:
$$[$0 - 1].push($$[$0]);
break;
case 82:
this.$=[];
break;
case 83:
$$[$0 - 1].push($$[$0]);
break;
case 86:
this.$=[];
break;
case 87:
$$[$0 - 1].push($$[$0]);
break;
case 90:
this.$=[];
break;
case 91:
$$[$0 - 1].push($$[$0]);
break;
case 94:
this.$=[];
break;
case 95:
$$[$0 - 1].push($$[$0]);
break;
case 98:
this.$=[$$[$0]];
break;
case 99:
$$[$0 - 1].push($$[$0]);
break;
case 100:
this.$=[$$[$0]];
break;
case 101:
$$[$0 - 1].push($$[$0]);
break;
}},
table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] },
parseError: function parseError(str, hash){
throw new Error(str);
},
parse: function parse(input){
var self=this,
stack=[0],
vstack=[null],
lstack=[],
table=this.table,
yytext="",
yylineno=0,
yyleng=0,
recovering=0,
TERROR=2,
EOF=1;
this.lexer.setInput(input);
this.lexer.yy=this.yy;
this.yy.lexer=this.lexer;
this.yy.parser=this;
if(typeof this.lexer.yylloc=="undefined") this.lexer.yylloc={};
var yyloc=this.lexer.yylloc;
lstack.push(yyloc);
var ranges=this.lexer.options&&this.lexer.options.ranges;
if(typeof this.yy.parseError==="function") this.parseError=this.yy.parseError;
function popStack(n){
stack.length=stack.length - 2 * n;
vstack.length=vstack.length - n;
lstack.length=lstack.length - n;
}
function lex(){
var token;
token=self.lexer.lex()||1;
if(typeof token!=="number"){
token=self.symbols_[token]||token;
}
return token;
}
var symbol,
preErrorSymbol,
state,
action,
a,
r,
yyval={},
p,
len,
newState,
expected;
while (true){
state=stack[stack.length - 1];
if(this.defaultActions[state]){
action=this.defaultActions[state];
}else{
if(symbol===null||typeof symbol=="undefined"){
symbol=lex();
}
action=table[state]&&table[state][symbol];
}
if(typeof action==="undefined"||!action.length||!action[0]){
var errStr="";
if(!recovering){
expected=[];
for (p in table[state]) if(this.terminals_[p]&&p > 2){
expected.push("'" + this.terminals_[p] + "'");
}
if(this.lexer.showPosition){
errStr="Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol]||symbol) + "'";
}else{
errStr="Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol==1 ? "end of input":"'" + (this.terminals_[symbol]||symbol) + "'");
}
this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol]||symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
}}
if(action[0] instanceof Array&&action.length > 1){
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
}
switch (action[0]){
case 1:
stack.push(symbol);
vstack.push(this.lexer.yytext);
lstack.push(this.lexer.yylloc);
stack.push(action[1]);
symbol=null;
if(!preErrorSymbol){
yyleng=this.lexer.yyleng;
yytext=this.lexer.yytext;
yylineno=this.lexer.yylineno;
yyloc=this.lexer.yylloc;
if(recovering > 0) recovering--;
}else{
symbol=preErrorSymbol;
preErrorSymbol=null;
}
break;
case 2:
len=this.productions_[action[1]][1];
yyval.$=vstack[vstack.length - len];
yyval._$={ first_line: lstack[lstack.length - (len||1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len||1)].first_column, last_column: lstack[lstack.length - 1].last_column };
if(ranges){
yyval._$.range=[lstack[lstack.length - (len||1)].range[0], lstack[lstack.length - 1].range[1]];
}
r=this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
if(typeof r!=="undefined"){
return r;
}
if(len){
stack=stack.slice(0, -1 * len * 2);
vstack=vstack.slice(0, -1 * len);
lstack=lstack.slice(0, -1 * len);
}
stack.push(this.productions_[action[1]][0]);
vstack.push(yyval.$);
lstack.push(yyval._$);
newState=table[stack[stack.length - 2]][stack[stack.length - 1]];
stack.push(newState);
break;
case 3:
return true;
}}
return true;
}};
var lexer=(function (){
var lexer={ EOF: 1,
parseError: function parseError(str, hash){
if(this.yy.parser){
this.yy.parser.parseError(str, hash);
}else{
throw new Error(str);
}},
setInput: function setInput(input){
this._input=input;
this._more=this._less=this.done=false;
this.yylineno=this.yyleng=0;
this.yytext=this.matched=this.match='';
this.conditionStack=['INITIAL'];
this.yylloc={ first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
if(this.options.ranges) this.yylloc.range=[0, 0];
this.offset=0;
return this;
},
input: function input(){
var ch=this._input[0];
this.yytext +=ch;
this.yyleng++;
this.offset++;
this.match +=ch;
this.matched +=ch;
var lines=ch.match(/(?:\r\n?|\n).*/g);
if(lines){
this.yylineno++;
this.yylloc.last_line++;
}else{
this.yylloc.last_column++;
}
if(this.options.ranges) this.yylloc.range[1]++;
this._input=this._input.slice(1);
return ch;
},
unput: function unput(ch){
var len=ch.length;
var lines=ch.split(/(?:\r\n?|\n)/g);
this._input=ch + this._input;
this.yytext=this.yytext.substr(0, this.yytext.length - len - 1);
this.offset -=len;
var oldLines=this.match.split(/(?:\r\n?|\n)/g);
this.match=this.match.substr(0, this.match.length - 1);
this.matched=this.matched.substr(0, this.matched.length - 1);
if(lines.length - 1) this.yylineno -=lines.length - 1;
var r=this.yylloc.range;
this.yylloc={ first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: lines ? (lines.length===oldLines.length ? this.yylloc.first_column:0) + oldLines[oldLines.length - lines.length].length - lines[0].length:this.yylloc.first_column - len
};
if(this.options.ranges){
this.yylloc.range=[r[0], r[0] + this.yyleng - len];
}
return this;
},
more: function more(){
this._more=true;
return this;
},
less: function less(n){
this.unput(this.match.slice(n));
},
pastInput: function pastInput(){
var past=this.matched.substr(0, this.matched.length - this.match.length);
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
},
upcomingInput: function upcomingInput(){
var next=this.match;
if(next.length < 20){
next +=this._input.substr(0, 20 - next.length);
}
return (next.substr(0, 20) + (next.length > 20 ? '...':'')).replace(/\n/g, "");
},
showPosition: function showPosition(){
var pre=this.pastInput();
var c=new Array(pre.length + 1).join("-");
return pre + this.upcomingInput() + "\n" + c + "^";
},
next: function next(){
if(this.done){
return this.EOF;
}
if(!this._input) this.done=true;
var token, match, tempMatch, index, col, lines;
if(!this._more){
this.yytext='';
this.match='';
}
var rules=this._currentRules();
for (var i=0; i < rules.length; i++){
tempMatch=this._input.match(this.rules[rules[i]]);
if(tempMatch&&(!match||tempMatch[0].length > match[0].length)){
match=tempMatch;
index=i;
if(!this.options.flex) break;
}}
if(match){
lines=match[0].match(/(?:\r\n?|\n).*/g);
if(lines) this.yylineno +=lines.length;
this.yylloc={ first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length:this.yylloc.last_column + match[0].length };
this.yytext +=match[0];
this.match +=match[0];
this.matches=match;
this.yyleng=this.yytext.length;
if(this.options.ranges){
this.yylloc.range=[this.offset, this.offset +=this.yyleng];
}
this._more=false;
this._input=this._input.slice(match[0].length);
this.matched +=match[0];
token=this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
if(this.done&&this._input) this.done=false;
if(token) return token;else return;
}
if(this._input===""){
return this.EOF;
}else{
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
}},
lex: function lex(){
var r=this.next();
if(typeof r!=='undefined'){
return r;
}else{
return this.lex();
}},
begin: function begin(condition){
this.conditionStack.push(condition);
},
popState: function popState(){
return this.conditionStack.pop();
},
_currentRules: function _currentRules(){
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
},
topState: function topState(){
return this.conditionStack[this.conditionStack.length - 2];
},
pushState: function begin(condition){
this.begin(condition);
}};
lexer.options={};
lexer.performAction=function anonymous(yy, yy_, $avoiding_name_collisions, YY_START){
function strip(start, end){
return yy_.yytext=yy_.yytext.substring(start, yy_.yyleng - end + start);
}
var YYSTATE=YY_START;
switch ($avoiding_name_collisions){
case 0:
if(yy_.yytext.slice(-2)==="\\\\"){
strip(0, 1);
this.begin("mu");
}else if(yy_.yytext.slice(-1)==="\\"){
strip(0, 1);
this.begin("emu");
}else{
this.begin("mu");
}
if(yy_.yytext) return 15;
break;
case 1:
return 15;
break;
case 2:
this.popState();
return 15;
break;
case 3:
this.begin('raw');return 15;
break;
case 4:
this.popState();
if(this.conditionStack[this.conditionStack.length - 1]==='raw'){
return 15;
}else{
strip(5, 9);
return 'END_RAW_BLOCK';
}
break;
case 5:
return 15;
break;
case 6:
this.popState();
return 14;
break;
case 7:
return 65;
break;
case 8:
return 68;
break;
case 9:
return 19;
break;
case 10:
this.popState();
this.begin('raw');
return 23;
break;
case 11:
return 55;
break;
case 12:
return 60;
break;
case 13:
return 29;
break;
case 14:
return 47;
break;
case 15:
this.popState();return 44;
break;
case 16:
this.popState();return 44;
break;
case 17:
return 34;
break;
case 18:
return 39;
break;
case 19:
return 51;
break;
case 20:
return 48;
break;
case 21:
this.unput(yy_.yytext);
this.popState();
this.begin('com');
break;
case 22:
this.popState();
return 14;
break;
case 23:
return 48;
break;
case 24:
return 73;
break;
case 25:
return 72;
break;
case 26:
return 72;
break;
case 27:
return 87;
break;
case 28:
break;
case 29:
this.popState();return 54;
break;
case 30:
this.popState();return 33;
break;
case 31:
yy_.yytext=strip(1, 2).replace(/\\"/g, '"');return 80;
break;
case 32:
yy_.yytext=strip(1, 2).replace(/\\'/g, "'");return 80;
break;
case 33:
return 85;
break;
case 34:
return 82;
break;
case 35:
return 82;
break;
case 36:
return 83;
break;
case 37:
return 84;
break;
case 38:
return 81;
break;
case 39:
return 75;
break;
case 40:
return 77;
break;
case 41:
return 72;
break;
case 42:
yy_.yytext=yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
break;
case 43:
return 'INVALID';
break;
case 44:
return 5;
break;
}};
lexer.rules=[/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
lexer.conditions={ "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true }};
return lexer;
})();
parser.lexer=lexer;
function Parser(){
this.yy={};}Parser.prototype=parser;parser.Parser=Parser;
return new Parser();
})();exports["default"]=handlebars;
module.exports=exports["default"];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _visitor=__webpack_require__(49);
var _visitor2=_interopRequireDefault(_visitor);
function WhitespaceControl(){
var options=arguments.length <=0||arguments[0]===undefined ? {}:arguments[0];
this.options=options;
}
WhitespaceControl.prototype=new _visitor2['default']();
WhitespaceControl.prototype.Program=function (program){
var doStandalone = !this.options.ignoreStandalone;
var isRoot = !this.isRootSeen;
this.isRootSeen=true;
var body=program.body;
for (var i=0, l=body.length; i < l; i++){
var current=body[i],
strip=this.accept(current);
if(!strip){
continue;
}
var _isPrevWhitespace=isPrevWhitespace(body, i, isRoot),
_isNextWhitespace=isNextWhitespace(body, i, isRoot),
openStandalone=strip.openStandalone&&_isPrevWhitespace,
closeStandalone=strip.closeStandalone&&_isNextWhitespace,
inlineStandalone=strip.inlineStandalone&&_isPrevWhitespace&&_isNextWhitespace;
if(strip.close){
omitRight(body, i, true);
}
if(strip.open){
omitLeft(body, i, true);
}
if(doStandalone&&inlineStandalone){
omitRight(body, i);
if(omitLeft(body, i)){
if(current.type==='PartialStatement'){
current.indent=/([ \t]+$)/.exec(body[i - 1].original)[1];
}}
}
if(doStandalone&&openStandalone){
omitRight((current.program||current.inverse).body);
omitLeft(body, i);
}
if(doStandalone&&closeStandalone){
omitRight(body, i);
omitLeft((current.inverse||current.program).body);
}}
return program;
};
WhitespaceControl.prototype.BlockStatement=WhitespaceControl.prototype.DecoratorBlock=WhitespaceControl.prototype.PartialBlockStatement=function (block){
this.accept(block.program);
this.accept(block.inverse);
var program=block.program||block.inverse,
inverse=block.program&&block.inverse,
firstInverse=inverse,
lastInverse=inverse;
if(inverse&&inverse.chained){
firstInverse=inverse.body[0].program;
while (lastInverse.chained){
lastInverse=lastInverse.body[lastInverse.body.length - 1].program;
}}
var strip={
open: block.openStrip.open,
close: block.closeStrip.close,
openStandalone: isNextWhitespace(program.body),
closeStandalone: isPrevWhitespace((firstInverse||program).body)
};
if(block.openStrip.close){
omitRight(program.body, null, true);
}
if(inverse){
var inverseStrip=block.inverseStrip;
if(inverseStrip.open){
omitLeft(program.body, null, true);
}
if(inverseStrip.close){
omitRight(firstInverse.body, null, true);
}
if(block.closeStrip.open){
omitLeft(lastInverse.body, null, true);
}
if(!this.options.ignoreStandalone&&isPrevWhitespace(program.body)&&isNextWhitespace(firstInverse.body)){
omitLeft(program.body);
omitRight(firstInverse.body);
}}else if(block.closeStrip.open){
omitLeft(program.body, null, true);
}
return strip;
};
WhitespaceControl.prototype.Decorator=WhitespaceControl.prototype.MustacheStatement=function (mustache){
return mustache.strip;
};
WhitespaceControl.prototype.PartialStatement=WhitespaceControl.prototype.CommentStatement=function (node){
var strip=node.strip||{};
return {
inlineStandalone: true,
open: strip.open,
close: strip.close
};};
function isPrevWhitespace(body, i, isRoot){
if(i===undefined){
i=body.length;
}
var prev=body[i - 1],
sibling=body[i - 2];
if(!prev){
return isRoot;
}
if(prev.type==='ContentStatement'){
return (sibling||!isRoot ? /\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(prev.original);
}}
function isNextWhitespace(body, i, isRoot){
if(i===undefined){
i=-1;
}
var next=body[i + 1],
sibling=body[i + 2];
if(!next){
return isRoot;
}
if(next.type==='ContentStatement'){
return (sibling||!isRoot ? /^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(next.original);
}}
function omitRight(body, i, multiple){
var current=body[i==null ? 0:i + 1];
if(!current||current.type!=='ContentStatement'||!multiple&&current.rightStripped){
return;
}
var original=current.value;
current.value=current.value.replace(multiple ? /^\s+/:/^[ \t]*\r?\n?/, '');
current.rightStripped=current.value!==original;
}
function omitLeft(body, i, multiple){
var current=body[i==null ? body.length - 1:i - 1];
if(!current||current.type!=='ContentStatement'||!multiple&&current.leftStripped){
return;
}
var original=current.value;
current.value=current.value.replace(multiple ? /\s+$/:/[ \t]+$/, '');
current.leftStripped=current.value!==original;
return current.leftStripped;
}
exports['default']=WhitespaceControl;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
function Visitor(){
this.parents=[];
}
Visitor.prototype={
constructor: Visitor,
mutating: false,
acceptKey: function acceptKey(node, name){
var value=this.accept(node[name]);
if(this.mutating){
if(value&&!Visitor.prototype[value.type]){
throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
}
node[name]=value;
}},
acceptRequired: function acceptRequired(node, name){
this.acceptKey(node, name);
if(!node[name]){
throw new _exception2['default'](node.type + ' requires ' + name);
}},
acceptArray: function acceptArray(array){
for (var i=0, l=array.length; i < l; i++){
this.acceptKey(array, i);
if(!array[i]){
array.splice(i, 1);
i--;
l--;
}}
},
accept: function accept(object){
if(!object){
return;
}
if(!this[object.type]){
throw new _exception2['default']('Unknown type: ' + object.type, object);
}
if(this.current){
this.parents.unshift(this.current);
}
this.current=object;
var ret=this[object.type](object);
this.current=this.parents.shift();
if(!this.mutating||ret){
return ret;
}else if(ret!==false){
return object;
}},
Program: function Program(program){
this.acceptArray(program.body);
},
MustacheStatement: visitSubExpression,
Decorator: visitSubExpression,
BlockStatement: visitBlock,
DecoratorBlock: visitBlock,
PartialStatement: visitPartial,
PartialBlockStatement: function PartialBlockStatement(partial){
visitPartial.call(this, partial);
this.acceptKey(partial, 'program');
},
ContentStatement: function ContentStatement() {},
CommentStatement: function CommentStatement() {},
SubExpression: visitSubExpression,
PathExpression: function PathExpression() {},
StringLiteral: function StringLiteral() {},
NumberLiteral: function NumberLiteral() {},
BooleanLiteral: function BooleanLiteral() {},
UndefinedLiteral: function UndefinedLiteral() {},
NullLiteral: function NullLiteral() {},
Hash: function Hash(hash){
this.acceptArray(hash.pairs);
},
HashPair: function HashPair(pair){
this.acceptRequired(pair, 'value');
}};
function visitSubExpression(mustache){
this.acceptRequired(mustache, 'path');
this.acceptArray(mustache.params);
this.acceptKey(mustache, 'hash');
}
function visitBlock(block){
visitSubExpression.call(this, block);
this.acceptKey(block, 'program');
this.acceptKey(block, 'inverse');
}
function visitPartial(partial){
this.acceptRequired(partial, 'name');
this.acceptArray(partial.params);
this.acceptKey(partial, 'hash');
}
exports['default']=Visitor;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.SourceLocation=SourceLocation;
exports.id=id;
exports.stripFlags=stripFlags;
exports.stripComment=stripComment;
exports.preparePath=preparePath;
exports.prepareMustache=prepareMustache;
exports.prepareRawBlock=prepareRawBlock;
exports.prepareBlock=prepareBlock;
exports.prepareProgram=prepareProgram;
exports.preparePartialBlock=preparePartialBlock;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
function validateClose(open, close){
close=close.path ? close.path.original:close;
if(open.path.original!==close){
var errorNode={ loc: open.path.loc };
throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
}}
function SourceLocation(source, locInfo){
this.source=source;
this.start={
line: locInfo.first_line,
column: locInfo.first_column
};
this.end={
line: locInfo.last_line,
column: locInfo.last_column
};}
function id(token){
if(/^\[.*\]$/.test(token)){
return token.substring(1, token.length - 1);
}else{
return token;
}}
function stripFlags(open, close){
return {
open: open.charAt(2)==='~',
close: close.charAt(close.length - 3)==='~'
};}
function stripComment(comment){
return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
}
function preparePath(data, parts, loc){
loc=this.locInfo(loc);
var original=data ? '@':'',
dig=[],
depth=0;
for (var i=0, l=parts.length; i < l; i++){
var part=parts[i].part,
isLiteral=parts[i].original!==part;
original +=(parts[i].separator||'') + part;
if(!isLiteral&&(part==='..'||part==='.'||part==='this')){
if(dig.length > 0){
throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
}else if(part==='..'){
depth++;
}}else{
dig.push(part);
}}
return {
type: 'PathExpression',
data: data,
depth: depth,
parts: dig,
original: original,
loc: loc
};}
function prepareMustache(path, params, hash, open, strip, locInfo){
var escapeFlag=open.charAt(3)||open.charAt(2),
escaped=escapeFlag!=='{'&&escapeFlag!=='&';
var decorator=/\*/.test(open);
return {
type: decorator ? 'Decorator':'MustacheStatement',
path: path,
params: params,
hash: hash,
escaped: escaped,
strip: strip,
loc: this.locInfo(locInfo)
};}
function prepareRawBlock(openRawBlock, contents, close, locInfo){
validateClose(openRawBlock, close);
locInfo=this.locInfo(locInfo);
var program={
type: 'Program',
body: contents,
strip: {},
loc: locInfo
};
return {
type: 'BlockStatement',
path: openRawBlock.path,
params: openRawBlock.params,
hash: openRawBlock.hash,
program: program,
openStrip: {},
inverseStrip: {},
closeStrip: {},
loc: locInfo
};}
function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo){
if(close&&close.path){
validateClose(openBlock, close);
}
var decorator=/\*/.test(openBlock.open);
program.blockParams=openBlock.blockParams;
var inverse=undefined,
inverseStrip=undefined;
if(inverseAndProgram){
if(decorator){
throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
}
if(inverseAndProgram.chain){
inverseAndProgram.program.body[0].closeStrip=close.strip;
}
inverseStrip=inverseAndProgram.strip;
inverse=inverseAndProgram.program;
}
if(inverted){
inverted=inverse;
inverse=program;
program=inverted;
}
return {
type: decorator ? 'DecoratorBlock':'BlockStatement',
path: openBlock.path,
params: openBlock.params,
hash: openBlock.hash,
program: program,
inverse: inverse,
openStrip: openBlock.strip,
inverseStrip: inverseStrip,
closeStrip: close&&close.strip,
loc: this.locInfo(locInfo)
};}
function prepareProgram(statements, loc){
if(!loc&&statements.length){
var firstLoc=statements[0].loc,
lastLoc=statements[statements.length - 1].loc;
if(firstLoc&&lastLoc){
loc={
source: firstLoc.source,
start: {
line: firstLoc.start.line,
column: firstLoc.start.column
},
end: {
line: lastLoc.end.line,
column: lastLoc.end.column
}};}}
return {
type: 'Program',
body: statements,
strip: {},
loc: loc
};}
function preparePartialBlock(open, program, close, locInfo){
validateClose(open, close);
return {
type: 'PartialBlockStatement',
name: open.path,
params: open.params,
hash: open.hash,
program: program,
openStrip: open.strip,
closeStrip: close&&close.strip,
loc: this.locInfo(locInfo)
};}
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$create=__webpack_require__(34)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.Compiler=Compiler;
exports.precompile=precompile;
exports.compile=compile;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _utils=__webpack_require__(5);
var _ast=__webpack_require__(45);
var _ast2=_interopRequireDefault(_ast);
var slice=[].slice;
function Compiler(){}
Compiler.prototype={
compiler: Compiler,
equals: function equals(other){
var len=this.opcodes.length;
if(other.opcodes.length!==len){
return false;
}
for (var i=0; i < len; i++){
var opcode=this.opcodes[i],
otherOpcode=other.opcodes[i];
if(opcode.opcode!==otherOpcode.opcode||!argEquals(opcode.args, otherOpcode.args)){
return false;
}}
len=this.children.length;
for (var i=0; i < len; i++){
if(!this.children[i].equals(other.children[i])){
return false;
}}
return true;
},
guid: 0,
compile: function compile(program, options){
this.sourceNode=[];
this.opcodes=[];
this.children=[];
this.options=options;
this.stringParams=options.stringParams;
this.trackIds=options.trackIds;
options.blockParams=options.blockParams||[];
options.knownHelpers=_utils.extend(_Object$create(null), {
helperMissing: true,
blockHelperMissing: true,
each: true,
'if': true,
unless: true,
'with': true,
log: true,
lookup: true
}, options.knownHelpers);
return this.accept(program);
},
compileProgram: function compileProgram(program){
var childCompiler=new this.compiler(),
result=childCompiler.compile(program, this.options),
guid=this.guid++;
this.usePartial=this.usePartial||result.usePartial;
this.children[guid]=result;
this.useDepths=this.useDepths||result.useDepths;
return guid;
},
accept: function accept(node){
if(!this[node.type]){
throw new _exception2['default']('Unknown type: ' + node.type, node);
}
this.sourceNode.unshift(node);
var ret=this[node.type](node);
this.sourceNode.shift();
return ret;
},
Program: function Program(program){
this.options.blockParams.unshift(program.blockParams);
var body=program.body,
bodyLength=body.length;
for (var i=0; i < bodyLength; i++){
this.accept(body[i]);
}
this.options.blockParams.shift();
this.isSimple=bodyLength===1;
this.blockParams=program.blockParams ? program.blockParams.length:0;
return this;
},
BlockStatement: function BlockStatement(block){
transformLiteralToPath(block);
var program=block.program,
inverse=block.inverse;
program=program&&this.compileProgram(program);
inverse=inverse&&this.compileProgram(inverse);
var type=this.classifySexpr(block);
if(type==='helper'){
this.helperSexpr(block, program, inverse);
}else if(type==='simple'){
this.simpleSexpr(block);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
this.opcode('emptyHash');
this.opcode('blockValue', block.path.original);
}else{
this.ambiguousSexpr(block, program, inverse);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
this.opcode('emptyHash');
this.opcode('ambiguousBlockValue');
}
this.opcode('append');
},
DecoratorBlock: function DecoratorBlock(decorator){
var program=decorator.program&&this.compileProgram(decorator.program);
var params=this.setupFullMustacheParams(decorator, program, undefined),
path=decorator.path;
this.useDecorators=true;
this.opcode('registerDecorator', params.length, path.original);
},
PartialStatement: function PartialStatement(partial){
this.usePartial=true;
var program=partial.program;
if(program){
program=this.compileProgram(partial.program);
}
var params=partial.params;
if(params.length > 1){
throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
}else if(!params.length){
if(this.options.explicitPartialContext){
this.opcode('pushLiteral', 'undefined');
}else{
params.push({ type: 'PathExpression', parts: [], depth: 0 });
}}
var partialName=partial.name.original,
isDynamic=partial.name.type==='SubExpression';
if(isDynamic){
this.accept(partial.name);
}
this.setupFullMustacheParams(partial, program, undefined, true);
var indent=partial.indent||'';
if(this.options.preventIndent&&indent){
this.opcode('appendContent', indent);
indent='';
}
this.opcode('invokePartial', isDynamic, partialName, indent);
this.opcode('append');
},
PartialBlockStatement: function PartialBlockStatement(partialBlock){
this.PartialStatement(partialBlock);
},
MustacheStatement: function MustacheStatement(mustache){
this.SubExpression(mustache);
if(mustache.escaped&&!this.options.noEscape){
this.opcode('appendEscaped');
}else{
this.opcode('append');
}},
Decorator: function Decorator(decorator){
this.DecoratorBlock(decorator);
},
ContentStatement: function ContentStatement(content){
if(content.value){
this.opcode('appendContent', content.value);
}},
CommentStatement: function CommentStatement(){},
SubExpression: function SubExpression(sexpr){
transformLiteralToPath(sexpr);
var type=this.classifySexpr(sexpr);
if(type==='simple'){
this.simpleSexpr(sexpr);
}else if(type==='helper'){
this.helperSexpr(sexpr);
}else{
this.ambiguousSexpr(sexpr);
}},
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse){
var path=sexpr.path,
name=path.parts[0],
isBlock=program!=null||inverse!=null;
this.opcode('getContext', path.depth);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
path.strict=true;
this.accept(path);
this.opcode('invokeAmbiguous', name, isBlock);
},
simpleSexpr: function simpleSexpr(sexpr){
var path=sexpr.path;
path.strict=true;
this.accept(path);
this.opcode('resolvePossibleLambda');
},
helperSexpr: function helperSexpr(sexpr, program, inverse){
var params=this.setupFullMustacheParams(sexpr, program, inverse),
path=sexpr.path,
name=path.parts[0];
if(this.options.knownHelpers[name]){
this.opcode('invokeKnownHelper', params.length, name);
}else if(this.options.knownHelpersOnly){
throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
}else{
path.strict=true;
path.falsy=true;
this.accept(path);
this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
}},
PathExpression: function PathExpression(path){
this.addDepth(path.depth);
this.opcode('getContext', path.depth);
var name=path.parts[0],
scoped=_ast2['default'].helpers.scopedId(path),
blockParamId = !path.depth&&!scoped&&this.blockParamIndex(name);
if(blockParamId){
this.opcode('lookupBlockParam', blockParamId, path.parts);
}else if(!name){
this.opcode('pushContext');
}else if(path.data){
this.options.data=true;
this.opcode('lookupData', path.depth, path.parts, path.strict);
}else{
this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
}},
StringLiteral: function StringLiteral(string){
this.opcode('pushString', string.value);
},
NumberLiteral: function NumberLiteral(number){
this.opcode('pushLiteral', number.value);
},
BooleanLiteral: function BooleanLiteral(bool){
this.opcode('pushLiteral', bool.value);
},
UndefinedLiteral: function UndefinedLiteral(){
this.opcode('pushLiteral', 'undefined');
},
NullLiteral: function NullLiteral(){
this.opcode('pushLiteral', 'null');
},
Hash: function Hash(hash){
var pairs=hash.pairs,
i=0,
l=pairs.length;
this.opcode('pushHash');
for (; i < l; i++){
this.pushParam(pairs[i].value);
}
while (i--){
this.opcode('assignToHash', pairs[i].key);
}
this.opcode('popHash');
},
opcode: function opcode(name){
this.opcodes.push({
opcode: name,
args: slice.call(arguments, 1),
loc: this.sourceNode[0].loc
});
},
addDepth: function addDepth(depth){
if(!depth){
return;
}
this.useDepths=true;
},
classifySexpr: function classifySexpr(sexpr){
var isSimple=_ast2['default'].helpers.simpleId(sexpr.path);
var isBlockParam=isSimple&&!!this.blockParamIndex(sexpr.path.parts[0]);
var isHelper = !isBlockParam&&_ast2['default'].helpers.helperExpression(sexpr);
var isEligible = !isBlockParam&&(isHelper||isSimple);
if(isEligible&&!isHelper){
var _name=sexpr.path.parts[0],
options=this.options;
if(options.knownHelpers[_name]){
isHelper=true;
}else if(options.knownHelpersOnly){
isEligible=false;
}}
if(isHelper){
return 'helper';
}else if(isEligible){
return 'ambiguous';
}else{
return 'simple';
}},
pushParams: function pushParams(params){
for (var i=0, l=params.length; i < l; i++){
this.pushParam(params[i]);
}},
pushParam: function pushParam(val){
var value=val.value!=null ? val.value:val.original||'';
if(this.stringParams){
if(value.replace){
value=value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
}
if(val.depth){
this.addDepth(val.depth);
}
this.opcode('getContext', val.depth||0);
this.opcode('pushStringParam', value, val.type);
if(val.type==='SubExpression'){
this.accept(val);
}}else{
if(this.trackIds){
var blockParamIndex=undefined;
if(val.parts&&!_ast2['default'].helpers.scopedId(val)&&!val.depth){
blockParamIndex=this.blockParamIndex(val.parts[0]);
}
if(blockParamIndex){
var blockParamChild=val.parts.slice(1).join('.');
this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
}else{
value=val.original||value;
if(value.replace){
value=value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
}
this.opcode('pushId', val.type, value);
}}
this.accept(val);
}},
setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty){
var params=sexpr.params;
this.pushParams(params);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
if(sexpr.hash){
this.accept(sexpr.hash);
}else{
this.opcode('emptyHash', omitEmpty);
}
return params;
},
blockParamIndex: function blockParamIndex(name){
for (var depth=0, len=this.options.blockParams.length; depth < len; depth++){
var blockParams=this.options.blockParams[depth],
param=blockParams&&_utils.indexOf(blockParams, name);
if(blockParams&&param >=0){
return [depth, param];
}}
}};
function precompile(input, options, env){
if(input==null||typeof input!=='string'&&input.type!=='Program'){
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
}
options=options||{};
if(!('data' in options)){
options.data=true;
}
if(options.compat){
options.useDepths=true;
}
var ast=env.parse(input, options),
environment=new env.Compiler().compile(ast, options);
return new env.JavaScriptCompiler().compile(environment, options);
}
function compile(input, options, env){
if(options===undefined) options={};
if(input==null||typeof input!=='string'&&input.type!=='Program'){
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
}
options=_utils.extend({}, options);
if(!('data' in options)){
options.data=true;
}
if(options.compat){
options.useDepths=true;
}
var compiled=undefined;
function compileInput(){
var ast=env.parse(input, options),
environment=new env.Compiler().compile(ast, options),
templateSpec=new env.JavaScriptCompiler().compile(environment, options, undefined, true);
return env.template(templateSpec);
}
function ret(context, execOptions){
if(!compiled){
compiled=compileInput();
}
return compiled.call(this, context, execOptions);
}
ret._setup=function (setupOptions){
if(!compiled){
compiled=compileInput();
}
return compiled._setup(setupOptions);
};
ret._child=function (i, data, blockParams, depths){
if(!compiled){
compiled=compileInput();
}
return compiled._child(i, data, blockParams, depths);
};
return ret;
}
function argEquals(a, b){
if(a===b){
return true;
}
if(_utils.isArray(a)&&_utils.isArray(b)&&a.length===b.length){
for (var i=0; i < a.length; i++){
if(!argEquals(a[i], b[i])){
return false;
}}
return true;
}}
function transformLiteralToPath(sexpr){
if(!sexpr.path.parts){
var literal=sexpr.path;
sexpr.path={
type: 'PathExpression',
data: false,
depth: 0,
parts: [literal.original + ''],
original: literal.original + '',
loc: literal.loc
};}}
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$keys=__webpack_require__(13)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _base=__webpack_require__(4);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _utils=__webpack_require__(5);
var _codeGen=__webpack_require__(53);
var _codeGen2=_interopRequireDefault(_codeGen);
function Literal(value){
this.value=value;
}
function JavaScriptCompiler(){}
JavaScriptCompiler.prototype={
nameLookup: function nameLookup(parent, name ){
return this.internalNameLookup(parent, name);
},
depthedLookup: function depthedLookup(name){
return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')'];
},
compilerInfo: function compilerInfo(){
var revision=_base.COMPILER_REVISION,
versions=_base.REVISION_CHANGES[revision];
return [revision, versions];
},
appendToBuffer: function appendToBuffer(source, location, explicit){
if(!_utils.isArray(source)){
source=[source];
}
source=this.source.wrap(source, location);
if(this.environment.isSimple){
return ['return ', source, ';'];
}else if(explicit){
return ['buffer +=', source, ';'];
}else{
source.appendToBuffer=true;
return source;
}},
initializeBuffer: function initializeBuffer(){
return this.quotedString('');
},
internalNameLookup: function internalNameLookup(parent, name){
this.lookupPropertyFunctionIsUsed=true;
return ['lookupProperty(', parent, ',', JSON.stringify(name), ')'];
},
lookupPropertyFunctionIsUsed: false,
compile: function compile(environment, options, context, asObject){
this.environment=environment;
this.options=options;
this.stringParams=this.options.stringParams;
this.trackIds=this.options.trackIds;
this.precompile = !asObject;
this.name=this.environment.name;
this.isChild = !!context;
this.context=context||{
decorators: [],
programs: [],
environments: []
};
this.preamble();
this.stackSlot=0;
this.stackVars=[];
this.aliases={};
this.registers={ list: [] };
this.hashes=[];
this.compileStack=[];
this.inlineStack=[];
this.blockParams=[];
this.compileChildren(environment, options);
this.useDepths=this.useDepths||environment.useDepths||environment.useDecorators||this.options.compat;
this.useBlockParams=this.useBlockParams||environment.useBlockParams;
var opcodes=environment.opcodes,
opcode=undefined,
firstLoc=undefined,
i=undefined,
l=undefined;
for (i=0, l=opcodes.length; i < l; i++){
opcode=opcodes[i];
this.source.currentLocation=opcode.loc;
firstLoc=firstLoc||opcode.loc;
this[opcode.opcode].apply(this, opcode.args);
}
this.source.currentLocation=firstLoc;
this.pushSource('');
if(this.stackSlot||this.inlineStack.length||this.compileStack.length){
throw new _exception2['default']('Compile completed with content left on stack');
}
if(!this.decorators.isEmpty()){
this.useDecorators=true;
this.decorators.prepend(['var decorators=container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']);
this.decorators.push('return fn;');
if(asObject){
this.decorators=Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
}else{
this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths){\n');
this.decorators.push('}\n');
this.decorators=this.decorators.merge();
}}else{
this.decorators=undefined;
}
var fn=this.createFunctionContext(asObject);
if(!this.isChild){
var ret={
compiler: this.compilerInfo(),
main: fn
};
if(this.decorators){
ret.main_d=this.decorators;
ret.useDecorators=true;
}
var _context=this.context;
var programs=_context.programs;
var decorators=_context.decorators;
for (i=0, l=programs.length; i < l; i++){
if(programs[i]){
ret[i]=programs[i];
if(decorators[i]){
ret[i + '_d']=decorators[i];
ret.useDecorators=true;
}}
}
if(this.environment.usePartial){
ret.usePartial=true;
}
if(this.options.data){
ret.useData=true;
}
if(this.useDepths){
ret.useDepths=true;
}
if(this.useBlockParams){
ret.useBlockParams=true;
}
if(this.options.compat){
ret.compat=true;
}
if(!asObject){
ret.compiler=JSON.stringify(ret.compiler);
this.source.currentLocation={ start: { line: 1, column: 0 }};
ret=this.objectLiteral(ret);
if(options.srcName){
ret=ret.toStringWithSourceMap({ file: options.destName });
ret.map=ret.map&&ret.map.toString();
}else{
ret=ret.toString();
}}else{
ret.compilerOptions=this.options;
}
return ret;
}else{
return fn;
}},
preamble: function preamble(){
this.lastContext=0;
this.source=new _codeGen2['default'](this.options.srcName);
this.decorators=new _codeGen2['default'](this.options.srcName);
},
createFunctionContext: function createFunctionContext(asObject){
var _this=this;
var varDeclarations='';
var locals=this.stackVars.concat(this.registers.list);
if(locals.length > 0){
varDeclarations +=', ' + locals.join(', ');
}
var aliasCount=0;
_Object$keys(this.aliases).forEach(function (alias){
var node=_this.aliases[alias];
if(node.children&&node.referenceCount > 1){
varDeclarations +=', alias' + ++aliasCount + '=' + alias;
node.children[0]='alias' + aliasCount;
}});
if(this.lookupPropertyFunctionIsUsed){
varDeclarations +=', ' + this.lookupPropertyFunctionVarDeclaration();
}
var params=['container', 'depth0', 'helpers', 'partials', 'data'];
if(this.useBlockParams||this.useDepths){
params.push('blockParams');
}
if(this.useDepths){
params.push('depths');
}
var source=this.mergeSource(varDeclarations);
if(asObject){
params.push(source);
return Function.apply(this, params);
}else{
return this.source.wrap(['function(', params.join(','), '){\n  ', source, '}']);
}},
mergeSource: function mergeSource(varDeclarations){
var isSimple=this.environment.isSimple,
appendOnly = !this.forceBuffer,
appendFirst=undefined,
sourceSeen=undefined,
bufferStart=undefined,
bufferEnd=undefined;
this.source.each(function (line){
if(line.appendToBuffer){
if(bufferStart){
line.prepend('  + ');
}else{
bufferStart=line;
}
bufferEnd=line;
}else{
if(bufferStart){
if(!sourceSeen){
appendFirst=true;
}else{
bufferStart.prepend('buffer +=');
}
bufferEnd.add(';');
bufferStart=bufferEnd=undefined;
}
sourceSeen=true;
if(!isSimple){
appendOnly=false;
}}
});
if(appendOnly){
if(bufferStart){
bufferStart.prepend('return ');
bufferEnd.add(';');
}else if(!sourceSeen){
this.source.push('return "";');
}}else{
varDeclarations +=', buffer=' + (appendFirst ? '':this.initializeBuffer());
if(bufferStart){
bufferStart.prepend('return buffer + ');
bufferEnd.add(';');
}else{
this.source.push('return buffer;');
}}
if(varDeclarations){
this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '':';\n'));
}
return this.source.merge();
},
lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration(){
return '\n      lookupProperty=container.lookupProperty||function(parent, propertyName){\n        if(Object.prototype.hasOwnProperty.call(parent, propertyName)){\n          return parent[propertyName];\n        }\n        return undefined\n    }\n    '.trim();
},
blockValue: function blockValue(name){
var blockHelperMissing=this.aliasable('container.hooks.blockHelperMissing'),
params=[this.contextName(0)];
this.setupHelperArgs(name, 0, params);
var blockName=this.popStack();
params.splice(1, 0, blockName);
this.push(this.source.functionCall(blockHelperMissing, 'call', params));
},
ambiguousBlockValue: function ambiguousBlockValue(){
var blockHelperMissing=this.aliasable('container.hooks.blockHelperMissing'),
params=[this.contextName(0)];
this.setupHelperArgs('', 0, params, true);
this.flushInline();
var current=this.topStack();
params.splice(1, 0, current);
this.pushSource(['if(!', this.lastHelper, '){ ', current, '=', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
},
appendContent: function appendContent(content){
if(this.pendingContent){
content=this.pendingContent + content;
}else{
this.pendingLocation=this.source.currentLocation;
}
this.pendingContent=content;
},
append: function append(){
if(this.isInline()){
this.replaceStack(function (current){
return ['!=null ? ', current, ':""'];
});
this.pushSource(this.appendToBuffer(this.popStack()));
}else{
var local=this.popStack();
this.pushSource(['if(', local, '!=null){ ', this.appendToBuffer(local, undefined, true), ' }']);
if(this.environment.isSimple){
this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
}}
},
appendEscaped: function appendEscaped(){
this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
},
getContext: function getContext(depth){
this.lastContext=depth;
},
pushContext: function pushContext(){
this.pushStackLiteral(this.contextName(this.lastContext));
},
lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped){
var i=0;
if(!scoped&&this.options.compat&&!this.lastContext){
this.push(this.depthedLookup(parts[i++]));
}else{
this.pushContext();
}
this.resolvePath('context', parts, i, falsy, strict);
},
lookupBlockParam: function lookupBlockParam(blockParamId, parts){
this.useBlockParams=true;
this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
this.resolvePath('context', parts, 1);
},
lookupData: function lookupData(depth, parts, strict){
if(!depth){
this.pushStackLiteral('data');
}else{
this.pushStackLiteral('container.data(data, ' + depth + ')');
}
this.resolvePath('data', parts, 0, true, strict);
},
resolvePath: function resolvePath(type, parts, i, falsy, strict){
var _this2=this;
if(this.options.strict||this.options.assumeObjects){
this.push(strictLookup(this.options.strict&&strict, this, parts, type));
return;
}
var len=parts.length;
for (; i < len; i++){
this.replaceStack(function (current){
var lookup=_this2.nameLookup(current, parts[i], type);
if(!falsy){
return ['!=null ? ', lookup, ':', current];
}else{
return ['&&', lookup];
}});
}},
resolvePossibleLambda: function resolvePossibleLambda(){
this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
},
pushStringParam: function pushStringParam(string, type){
this.pushContext();
this.pushString(type);
if(type!=='SubExpression'){
if(typeof string==='string'){
this.pushString(string);
}else{
this.pushStackLiteral(string);
}}
},
emptyHash: function emptyHash(omitEmpty){
if(this.trackIds){
this.push('{}');
}
if(this.stringParams){
this.push('{}');
this.push('{}');
}
this.pushStackLiteral(omitEmpty ? 'undefined':'{}');
},
pushHash: function pushHash(){
if(this.hash){
this.hashes.push(this.hash);
}
this.hash={ values: {}, types: [], contexts: [], ids: [] };},
popHash: function popHash(){
var hash=this.hash;
this.hash=this.hashes.pop();
if(this.trackIds){
this.push(this.objectLiteral(hash.ids));
}
if(this.stringParams){
this.push(this.objectLiteral(hash.contexts));
this.push(this.objectLiteral(hash.types));
}
this.push(this.objectLiteral(hash.values));
},
pushString: function pushString(string){
this.pushStackLiteral(this.quotedString(string));
},
pushLiteral: function pushLiteral(value){
this.pushStackLiteral(value);
},
pushProgram: function pushProgram(guid){
if(guid!=null){
this.pushStackLiteral(this.programExpression(guid));
}else{
this.pushStackLiteral(null);
}},
registerDecorator: function registerDecorator(paramSize, name){
var foundDecorator=this.nameLookup('decorators', name, 'decorator'),
options=this.setupHelperArgs(name, paramSize);
this.decorators.push(['fn=', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), '||fn;']);
},
invokeHelper: function invokeHelper(paramSize, name, isSimple){
var nonHelper=this.popStack(),
helper=this.setupHelper(paramSize, name);
var possibleFunctionCalls=[];
if(isSimple){
possibleFunctionCalls.push(helper.name);
}
possibleFunctionCalls.push(nonHelper);
if(!this.options.strict){
possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing'));
}
var functionLookupCode=['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')'];
var functionCall=this.source.functionCall(functionLookupCode, 'call', helper.callParams);
this.push(functionCall);
},
itemsSeparatedBy: function itemsSeparatedBy(items, separator){
var result=[];
result.push(items[0]);
for (var i=1; i < items.length; i++){
result.push(separator, items[i]);
}
return result;
},
invokeKnownHelper: function invokeKnownHelper(paramSize, name){
var helper=this.setupHelper(paramSize, name);
this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
},
invokeAmbiguous: function invokeAmbiguous(name, helperCall){
this.useRegister('helper');
var nonHelper=this.popStack();
this.emptyHash();
var helper=this.setupHelper(0, name, helperCall);
var helperName=this.lastHelper=this.nameLookup('helpers', name, 'helper');
var lookup=['(', '(helper=', helperName, '||', nonHelper, ')'];
if(!this.options.strict){
lookup[0]='(helper=';
lookup.push('!=null ? helper:', this.aliasable('container.hooks.helperMissing'));
}
this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit]:[], '),', '(typeof helper===', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ':helper))']);
},
invokePartial: function invokePartial(isDynamic, name, indent){
var params=[],
options=this.setupParams(name, 1, params);
if(isDynamic){
name=this.popStack();
delete options.name;
}
if(indent){
options.indent=JSON.stringify(indent);
}
options.helpers='helpers';
options.partials='partials';
options.decorators='container.decorators';
if(!isDynamic){
params.unshift(this.nameLookup('partials', name, 'partial'));
}else{
params.unshift(name);
}
if(this.options.compat){
options.depths='depths';
}
options=this.objectLiteral(options);
params.push(options);
this.push(this.source.functionCall('container.invokePartial', '', params));
},
assignToHash: function assignToHash(key){
var value=this.popStack(),
context=undefined,
type=undefined,
id=undefined;
if(this.trackIds){
id=this.popStack();
}
if(this.stringParams){
type=this.popStack();
context=this.popStack();
}
var hash=this.hash;
if(context){
hash.contexts[key]=context;
}
if(type){
hash.types[key]=type;
}
if(id){
hash.ids[key]=id;
}
hash.values[key]=value;
},
pushId: function pushId(type, name, child){
if(type==='BlockParam'){
this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child):''));
}else if(type==='PathExpression'){
this.pushString(name);
}else if(type==='SubExpression'){
this.pushStackLiteral('true');
}else{
this.pushStackLiteral('null');
}},
compiler: JavaScriptCompiler,
compileChildren: function compileChildren(environment, options){
var children=environment.children,
child=undefined,
compiler=undefined;
for (var i=0, l=children.length; i < l; i++){
child=children[i];
compiler=new this.compiler();
var existing=this.matchExistingProgram(child);
if(existing==null){
this.context.programs.push('');
var index=this.context.programs.length;
child.index=index;
child.name='program' + index;
this.context.programs[index]=compiler.compile(child, options, this.context, !this.precompile);
this.context.decorators[index]=compiler.decorators;
this.context.environments[index]=child;
this.useDepths=this.useDepths||compiler.useDepths;
this.useBlockParams=this.useBlockParams||compiler.useBlockParams;
child.useDepths=this.useDepths;
child.useBlockParams=this.useBlockParams;
}else{
child.index=existing.index;
child.name='program' + existing.index;
this.useDepths=this.useDepths||existing.useDepths;
this.useBlockParams=this.useBlockParams||existing.useBlockParams;
}}
},
matchExistingProgram: function matchExistingProgram(child){
for (var i=0, len=this.context.environments.length; i < len; i++){
var environment=this.context.environments[i];
if(environment&&environment.equals(child)){
return environment;
}}
},
programExpression: function programExpression(guid){
var child=this.environment.children[guid],
programParams=[child.index, 'data', child.blockParams];
if(this.useBlockParams||this.useDepths){
programParams.push('blockParams');
}
if(this.useDepths){
programParams.push('depths');
}
return 'container.program(' + programParams.join(', ') + ')';
},
useRegister: function useRegister(name){
if(!this.registers[name]){
this.registers[name]=true;
this.registers.list.push(name);
}},
push: function push(expr){
if(!(expr instanceof Literal)){
expr=this.source.wrap(expr);
}
this.inlineStack.push(expr);
return expr;
},
pushStackLiteral: function pushStackLiteral(item){
this.push(new Literal(item));
},
pushSource: function pushSource(source){
if(this.pendingContent){
this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
this.pendingContent=undefined;
}
if(source){
this.source.push(source);
}},
replaceStack: function replaceStack(callback){
var prefix=['('],
stack=undefined,
createdStack=undefined,
usedLiteral=undefined;
if(!this.isInline()){
throw new _exception2['default']('replaceStack on non-inline');
}
var top=this.popStack(true);
if(top instanceof Literal){
stack=[top.value];
prefix=['(', stack];
usedLiteral=true;
}else{
createdStack=true;
var _name=this.incrStack();
prefix=['((', this.push(_name), '=', top, ')'];
stack=this.topStack();
}
var item=callback.call(this, stack);
if(!usedLiteral){
this.popStack();
}
if(createdStack){
this.stackSlot--;
}
this.push(prefix.concat(item, ')'));
},
incrStack: function incrStack(){
this.stackSlot++;
if(this.stackSlot > this.stackVars.length){
this.stackVars.push('stack' + this.stackSlot);
}
return this.topStackName();
},
topStackName: function topStackName(){
return 'stack' + this.stackSlot;
},
flushInline: function flushInline(){
var inlineStack=this.inlineStack;
this.inlineStack=[];
for (var i=0, len=inlineStack.length; i < len; i++){
var entry=inlineStack[i];
if(entry instanceof Literal){
this.compileStack.push(entry);
}else{
var stack=this.incrStack();
this.pushSource([stack, '=', entry, ';']);
this.compileStack.push(stack);
}}
},
isInline: function isInline(){
return this.inlineStack.length;
},
popStack: function popStack(wrapped){
var inline=this.isInline(),
item=(inline ? this.inlineStack:this.compileStack).pop();
if(!wrapped&&item instanceof Literal){
return item.value;
}else{
if(!inline){
if(!this.stackSlot){
throw new _exception2['default']('Invalid stack pop');
}
this.stackSlot--;
}
return item;
}},
topStack: function topStack(){
var stack=this.isInline() ? this.inlineStack:this.compileStack,
item=stack[stack.length - 1];
if(item instanceof Literal){
return item.value;
}else{
return item;
}},
contextName: function contextName(context){
if(this.useDepths&&context){
return 'depths[' + context + ']';
}else{
return 'depth' + context;
}},
quotedString: function quotedString(str){
return this.source.quotedString(str);
},
objectLiteral: function objectLiteral(obj){
return this.source.objectLiteral(obj);
},
aliasable: function aliasable(name){
var ret=this.aliases[name];
if(ret){
ret.referenceCount++;
return ret;
}
ret=this.aliases[name]=this.source.wrap(name);
ret.aliasable=true;
ret.referenceCount=1;
return ret;
},
setupHelper: function setupHelper(paramSize, name, blockHelper){
var params=[],
paramsInit=this.setupHelperArgs(name, paramSize, params, blockHelper);
var foundHelper=this.nameLookup('helpers', name, 'helper'),
callContext=this.aliasable(this.contextName(0) + '!=null ? ' + this.contextName(0) + ':(container.nullContext||{})');
return {
params: params,
paramsInit: paramsInit,
name: foundHelper,
callParams: [callContext].concat(params)
};},
setupParams: function setupParams(helper, paramSize, params){
var options={},
contexts=[],
types=[],
ids=[],
objectArgs = !params,
param=undefined;
if(objectArgs){
params=[];
}
options.name=this.quotedString(helper);
options.hash=this.popStack();
if(this.trackIds){
options.hashIds=this.popStack();
}
if(this.stringParams){
options.hashTypes=this.popStack();
options.hashContexts=this.popStack();
}
var inverse=this.popStack(),
program=this.popStack();
if(program||inverse){
options.fn=program||'container.noop';
options.inverse=inverse||'container.noop';
}
var i=paramSize;
while (i--){
param=this.popStack();
params[i]=param;
if(this.trackIds){
ids[i]=this.popStack();
}
if(this.stringParams){
types[i]=this.popStack();
contexts[i]=this.popStack();
}}
if(objectArgs){
options.args=this.source.generateArray(params);
}
if(this.trackIds){
options.ids=this.source.generateArray(ids);
}
if(this.stringParams){
options.types=this.source.generateArray(types);
options.contexts=this.source.generateArray(contexts);
}
if(this.options.data){
options.data='data';
}
if(this.useBlockParams){
options.blockParams='blockParams';
}
return options;
},
setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister){
var options=this.setupParams(helper, paramSize, params);
options.loc=JSON.stringify(this.source.currentLocation);
options=this.objectLiteral(options);
if(useRegister){
this.useRegister('options');
params.push('options');
return ['options=', options];
}else if(params){
params.push(options);
return '';
}else{
return options;
}}
};
(function (){
var reservedWords=('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
var compilerWords=JavaScriptCompiler.RESERVED_WORDS={};
for (var i=0, l=reservedWords.length; i < l; i++){
compilerWords[reservedWords[i]]=true;
}})();
JavaScriptCompiler.isValidJavaScriptVariableName=function (name){
return !JavaScriptCompiler.RESERVED_WORDS[name]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
};
function strictLookup(requireTerminal, compiler, parts, type){
var stack=compiler.popStack(),
i=0,
len=parts.length;
if(requireTerminal){
len--;
}
for (; i < len; i++){
stack=compiler.nameLookup(stack, parts[i], type);
}
if(requireTerminal){
return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ')'];
}else{
return stack;
}}
exports['default']=JavaScriptCompiler;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$keys=__webpack_require__(13)['default'];
exports.__esModule=true;
var _utils=__webpack_require__(5);
var SourceNode=undefined;
try {
if(false){
var SourceMap=require('source-map');
SourceNode=SourceMap.SourceNode;
}} catch (err){}
if(!SourceNode){
SourceNode=function (line, column, srcFile, chunks){
this.src='';
if(chunks){
this.add(chunks);
}};
SourceNode.prototype={
add: function add(chunks){
if(_utils.isArray(chunks)){
chunks=chunks.join('');
}
this.src +=chunks;
},
prepend: function prepend(chunks){
if(_utils.isArray(chunks)){
chunks=chunks.join('');
}
this.src=chunks + this.src;
},
toStringWithSourceMap: function toStringWithSourceMap(){
return { code: this.toString() };},
toString: function toString(){
return this.src;
}};}
function castChunk(chunk, codeGen, loc){
if(_utils.isArray(chunk)){
var ret=[];
for (var i=0, len=chunk.length; i < len; i++){
ret.push(codeGen.wrap(chunk[i], loc));
}
return ret;
}else if(typeof chunk==='boolean'||typeof chunk==='number'){
return chunk + '';
}
return chunk;
}
function CodeGen(srcFile){
this.srcFile=srcFile;
this.source=[];
}
CodeGen.prototype={
isEmpty: function isEmpty(){
return !this.source.length;
},
prepend: function prepend(source, loc){
this.source.unshift(this.wrap(source, loc));
},
push: function push(source, loc){
this.source.push(this.wrap(source, loc));
},
merge: function merge(){
var source=this.empty();
this.each(function (line){
source.add(['  ', line, '\n']);
});
return source;
},
each: function each(iter){
for (var i=0, len=this.source.length; i < len; i++){
iter(this.source[i]);
}},
empty: function empty(){
var loc=this.currentLocation||{ start: {}};
return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
},
wrap: function wrap(chunk){
var loc=arguments.length <=1||arguments[1]===undefined ? this.currentLocation||{ start: {}}:arguments[1];
if(chunk instanceof SourceNode){
return chunk;
}
chunk=castChunk(chunk, this, loc);
return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
},
functionCall: function functionCall(fn, type, params){
params=this.generateList(params);
return this.wrap([fn, type ? '.' + type + '(':'(', params, ')']);
},
quotedString: function quotedString(str){
return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028')
.replace(/\u2029/g, '\\u2029') + '"';
},
objectLiteral: function objectLiteral(obj){
var _this=this;
var pairs=[];
_Object$keys(obj).forEach(function (key){
var value=castChunk(obj[key], _this);
if(value!=='undefined'){
pairs.push([_this.quotedString(key), ':', value]);
}});
var ret=this.generateList(pairs);
ret.prepend('{');
ret.add('}');
return ret;
},
generateList: function generateList(entries){
var ret=this.empty();
for (var i=0, len=entries.length; i < len; i++){
if(i){
ret.add(',');
}
ret.add(castChunk(entries[i], this));
}
return ret;
},
generateArray: function generateArray(entries){
var ret=this.generateList(entries);
ret.prepend('[');
ret.add(']');
return ret;
}};
exports['default']=CodeGen;
module.exports=exports['default'];
})
])
});
;
(function(e){function d(){var e=o();if(e!==u){u=e;i.trigger("orientationchange")}}function E(t,n,r,i){var s=r.type;r.type=n;e.event.dispatch.call(t,r,i);r.type=s}e.attrFn=e.attrFn||{};var t=navigator.userAgent.toLowerCase(),n=t.indexOf("chrome")>-1&&(t.indexOf("windows")>-1||t.indexOf("macintosh")>-1||t.indexOf("linux")>-1)&&t.indexOf("chrome")<0,r={swipe_h_threshold:50,swipe_v_threshold:50,taphold_threshold:750,doubletap_int:500,touch_capable:"ontouchstart"in document.documentElement&&!n,orientation_support:"orientation"in window&&"onorientationchange"in window,startevent:"ontouchstart"in document.documentElement&&!n?"touchstart":"mousedown",endevent:"ontouchstart"in document.documentElement&&!n?"touchend":"mouseup",moveevent:"ontouchstart"in document.documentElement&&!n?"touchmove":"mousemove",tapevent:"ontouchstart"in document.documentElement&&!n?"tap":"click",scrollevent:"ontouchstart"in document.documentElement&&!n?"touchmove":"scroll",hold_timer:null,tap_timer:null};e.isTouchCapable=function(){return r.touch_capable};e.getStartEvent=function(){return r.startevent};e.getEndEvent=function(){return r.endevent};e.getMoveEvent=function(){return r.moveevent};e.getTapEvent=function(){return r.tapevent};e.getScrollEvent=function(){return r.scrollevent};e.each(["tapstart","tapend","tap","singletap","doubletap","taphold","swipe","swipeup","swiperight","swipedown","swipeleft","swipeend","scrollstart","scrollend","orientationchange"],function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)};e.attrFn[n]=true});e.event.special.tapstart={setup:function(){var t=this,n=e(t);n.bind(r.startevent,function(e){n.data("callee",arguments.callee);if(e.which&&e.which!==1){return false}var i=e.originalEvent,s={position:{x:r.touch_capable?i.touches[0].screenX:e.screenX,y:r.touch_capable?i.touches[0].screenY:e.screenY},offset:{x:r.touch_capable?i.touches[0].pageX-i.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?i.touches[0].pageY-i.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};E(t,"tapstart",e,s);return true})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee)}};e.event.special.tapend={setup:function(){var t=this,n=e(t);n.bind(r.endevent,function(e){n.data("callee",arguments.callee);var i=e.originalEvent;var s={position:{x:r.touch_capable?i.changedTouches[0].screenX:e.screenX,y:r.touch_capable?i.changedTouches[0].screenY:e.screenY},offset:{x:r.touch_capable?i.changedTouches[0].pageX-i.changedTouches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?i.changedTouches[0].pageY-i.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};E(t,"tapend",e,s);return true})},remove:function(){e(this).unbind(r.endevent,e(this).data.callee)}};e.event.special.taphold={setup:function(){var t=this,n=e(t),i,s,o={x:0,y:0};n.bind(r.startevent,function(e){if(e.which&&e.which!==1){return false}else{n.data("tapheld",false);i=e.target;var s=e.originalEvent;var u=(new Date).getTime(),a={x:r.touch_capable?s.touches[0].screenX:e.screenX,y:r.touch_capable?s.touches[0].screenY:e.screenY},f={x:r.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:e.offsetY};o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;r.hold_timer=window.setTimeout(function(){var l=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX,c=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;if(e.target==i&&o.x==l&&o.y==c){n.data("tapheld",true);var h=(new Date).getTime(),p={x:r.touch_capable?s.touches[0].screenX:e.screenX,y:r.touch_capable?s.touches[0].screenY:e.screenY},d={x:r.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:e.offsetY};duration=h-u;var v={startTime:u,endTime:h,startPosition:a,startOffset:f,endPosition:p,endOffset:d,duration:duration,target:e.target};n.data("callee1",arguments.callee);E(t,"taphold",e,v)}},r.taphold_threshold);return true}}).bind(r.endevent,function(){n.data("callee2",arguments.callee);n.data("tapheld",false);window.clearTimeout(r.hold_timer)})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.endevent,e(this).data.callee2)}};e.event.special.doubletap={setup:function(){var t=this,n=e(t),i,s,o,u;n.bind(r.startevent,function(e){if(e.which&&e.which!==1){return false}else{n.data("doubletapped",false);i=e.target;n.data("callee1",arguments.callee);u=e.originalEvent;o={position:{x:r.touch_capable?u.touches[0].screenX:e.screenX,y:r.touch_capable?u.touches[0].screenY:e.screenY},offset:{x:r.touch_capable?u.touches[0].pageX-u.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?u.touches[0].pageY-u.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};return true}}).bind(r.endevent,function(e){var a=(new Date).getTime();var f=n.data("lastTouch")||a+1;var l=a-f;window.clearTimeout(s);n.data("callee2",arguments.callee);if(l<r.doubletap_int&&l>0&&e.target==i&&l>100){n.data("doubletapped",true);window.clearTimeout(r.tap_timer);var c={position:{x:r.touch_capable?u.touches[0].screenX:e.screenX,y:r.touch_capable?u.touches[0].screenY:e.screenY},offset:{x:r.touch_capable?u.touches[0].pageX-u.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?u.touches[0].pageY-u.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};var h={firstTap:o,secondTap:c,interval:c.time-o.time};E(t,"doubletap",e,h)}else{n.data("lastTouch",a);s=window.setTimeout(function(e){window.clearTimeout(s)},r.doubletap_int,[e])}n.data("lastTouch",a)})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.endevent,e(this).data.callee2)}};e.event.special.singletap={setup:function(){var t=this,n=e(t),i=null,s=null,o={x:0,y:0};n.bind(r.startevent,function(e){if(e.which&&e.which!==1){return false}else{s=(new Date).getTime();i=e.target;n.data("callee1",arguments.callee);o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;return true}}).bind(r.endevent,function(e){n.data("callee2",arguments.callee);if(e.target==i){end_pos_x=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.pageX;end_pos_y=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageY:e.pageY;r.tap_timer=window.setTimeout(function(){if(!n.data("doubletapped")&&!n.data("tapheld")&&o.x==end_pos_x&&o.y==end_pos_y){var i=e.originalEvent;var u={position:{x:r.touch_capable?i.changedTouches[0].screenX:e.screenX,y:r.touch_capable?i.changedTouches[0].screenY:e.screenY},offset:{x:r.touch_capable?i.changedTouches[0].pageX-i.changedTouches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?i.changedTouches[0].pageY-i.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};if(u.time-s<r.taphold_threshold){E(t,"singletap",e,u)}}},r.doubletap_int)}})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.endevent,e(this).data.callee2)}};e.event.special.tap={setup:function(){var t=this,n=e(t),i=false,s=null,o,u={x:0,y:0};n.bind(r.startevent,function(e){n.data("callee1",arguments.callee);if(e.which&&e.which!==1){return false}else{i=true;u.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;u.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;o=(new Date).getTime();s=e.target;return true}}).bind(r.endevent,function(e){n.data("callee2",arguments.callee);var a=e.originalEvent.targetTouches?e.originalEvent.changedTouches[0].pageX:e.pageX,f=e.originalEvent.targetTouches?e.originalEvent.changedTouches[0].pageY:e.pageY;if(s==e.target&&i&&(new Date).getTime()-o<r.taphold_threshold&&u.x==a&&u.y==f){var l=e.originalEvent;var c={position:{x:r.touch_capable?l.changedTouches[0].screenX:e.screenX,y:r.touch_capable?l.changedTouches[0].screenY:e.screenY},offset:{x:r.touch_capable?l.changedTouches[0].pageX-l.changedTouches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?l.changedTouches[0].pageY-l.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};E(t,"tap",e,c)}})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.endevent,e(this).data.callee2)}};e.event.special.swipe={setup:function(){function f(t){n=e(t.target);n.data("callee1",arguments.callee);o.x=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageX:t.pageX;o.y=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageY:t.pageY;u.x=o.x;u.y=o.y;i=true;var s=t.originalEvent;a={position:{x:r.touch_capable?s.touches[0].screenX:t.screenX,y:r.touch_capable?s.touches[0].screenY:t.screenY},offset:{x:r.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:t.offsetX,y:r.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:t.offsetY},time:(new Date).getTime(),target:t.target};var f=new Date;while(new Date-f<100){}}function l(t){n=e(t.target);n.data("callee2",arguments.callee);u.x=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageX:t.pageX;u.y=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageY:t.pageY;window.clearTimeout(r.hold_timer);var f;var l=n.data("xthreshold"),c=n.data("ythreshold"),h=typeof l!=="undefined"&&l!==false&&parseInt(l)?parseInt(l):r.swipe_h_threshold,p=typeof c!=="undefined"&&c!==false&&parseInt(c)?parseInt(c):r.swipe_v_threshold;if(o.y>u.y&&o.y-u.y>p){f="swipeup"}if(o.x<u.x&&u.x-o.x>h){f="swiperight"}if(o.y<u.y&&u.y-o.y>p){f="swipedown"}if(o.x>u.x&&o.x-u.x>h){f="swipeleft"}if(f!=undefined&&i){o.x=0;o.y=0;u.x=0;u.y=0;i=false;var d=t.originalEvent;endEvnt={position:{x:r.touch_capable?d.touches[0].screenX:t.screenX,y:r.touch_capable?d.touches[0].screenY:t.screenY},offset:{x:r.touch_capable?d.touches[0].pageX-d.touches[0].target.offsetLeft:t.offsetX,y:r.touch_capable?d.touches[0].pageY-d.touches[0].target.offsetTop:t.offsetY},time:(new Date).getTime(),target:t.target};var v=Math.abs(a.position.x-endEvnt.position.x),m=Math.abs(a.position.y-endEvnt.position.y);var g={startEvnt:a,endEvnt:endEvnt,direction:f.replace("swipe",""),xAmount:v,yAmount:m,duration:endEvnt.time-a.time};s=true;n.trigger("swipe",g).trigger(f,g)}}function c(t){n=e(t.target);var o="";n.data("callee3",arguments.callee);if(s){var u=n.data("xthreshold"),f=n.data("ythreshold"),l=typeof u!=="undefined"&&u!==false&&parseInt(u)?parseInt(u):r.swipe_h_threshold,c=typeof f!=="undefined"&&f!==false&&parseInt(f)?parseInt(f):r.swipe_v_threshold;var h=t.originalEvent;endEvnt={position:{x:r.touch_capable?h.changedTouches[0].screenX:t.screenX,y:r.touch_capable?h.changedTouches[0].screenY:t.screenY},offset:{x:r.touch_capable?h.changedTouches[0].pageX-h.changedTouches[0].target.offsetLeft:t.offsetX,y:r.touch_capable?h.changedTouches[0].pageY-h.changedTouches[0].target.offsetTop:t.offsetY},time:(new Date).getTime(),target:t.target};if(a.position.y>endEvnt.position.y&&a.position.y-endEvnt.position.y>c){o="swipeup"}if(a.position.x<endEvnt.position.x&&endEvnt.position.x-a.position.x>l){o="swiperight"}if(a.position.y<endEvnt.position.y&&endEvnt.position.y-a.position.y>c){o="swipedown"}if(a.position.x>endEvnt.position.x&&a.position.x-endEvnt.position.x>l){o="swipeleft"}var p=Math.abs(a.position.x-endEvnt.position.x),d=Math.abs(a.position.y-endEvnt.position.y);var v={startEvnt:a,endEvnt:endEvnt,direction:o.replace("swipe",""),xAmount:p,yAmount:d,duration:endEvnt.time-a.time};n.trigger("swipeend",v)}i=false;s=false}var t=this,n=e(t),i=false,s=false,o={x:0,y:0},u={x:0,y:0},a;n.bind(r.startevent,f);n.bind(r.moveevent,l);n.bind(r.endevent,c)},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.moveevent,e(this).data.callee2).unbind(r.endevent,e(this).data.callee3)}};e.event.special.scrollstart={setup:function(){function o(e,n){i=n;E(t,i?"scrollstart":"scrollend",e)}var t=this,n=e(t),i,s;n.bind(r.scrollevent,function(e){n.data("callee",arguments.callee);if(!i){o(e,true)}clearTimeout(s);s=setTimeout(function(){o(e,false)},50)})},remove:function(){e(this).unbind(r.scrollevent,e(this).data.callee)}};var i=e(window),s,o,u,a,f,l={0:true,180:true};if(r.orientation_support){var c=window.innerWidth||e(window).width(),h=window.innerHeight||e(window).height(),p=50;a=c>h&&c-h>p;f=l[window.orientation];if(a&&f||!a&&!f){l={"-90":true,90:true}}}e.event.special.orientationchange=s={setup:function(){if(r.orientation_support){return false}u=o();i.bind("throttledresize",d);return true},teardown:function(){if(r.orientation_support){return false}i.unbind("throttledresize",d);return true},add:function(e){var t=e.handler;e.handler=function(e){e.orientation=o();return t.apply(this,arguments)}}};e.event.special.orientationchange.orientation=o=function(){var e=true,t=document.documentElement;if(r.orientation_support){e=l[window.orientation]}else{e=t&&t.clientWidth/t.clientHeight<1.1}return e?"portrait":"landscape"};e.event.special.throttledresize={setup:function(){e(this).bind("resize",m)},teardown:function(){e(this).unbind("resize",m)}};var v=250,m=function(){b=(new Date).getTime();w=b-g;if(w>=v){g=b;e(this).trigger("throttledresize")}else{if(y){window.clearTimeout(y)}y=window.setTimeout(d,v-w)}},g=0,y,b,w;e.each({scrollend:"scrollstart",swipeup:"swipe",swiperight:"swipe",swipedown:"swipe",swipeleft:"swipe",swipeend:"swipe"},function(t,n,r){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)}}})})(jQuery);
(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
jQuery(document).ready(function($){
if(evo_general_params!=''&&evo_general_params!==undefined&&evo_general_params.is_admin) return;
var BODY=$('body');
var BUS='';
var ajax_url=evo_general_params.ajaxurl;
$.fn.evo_calendar=function (options){
var el=this;
var cal=this;
var cal={};
var calO=$.extend({
'SC': {},
'json':{},
'type':'init' ,
map_delay:0
}, options);
var SC=el.evo_shortcode_data();
this.find('.eventon_list_event').each(function(){
evo_cal_eventcard_interactions($(this));
});
var init=function(){
if($(el).hasClass('evcal_widget')){
$(el).find('.evcal_gmaps').each(function(){
var gmap_id=obj.attr('id');
var new_gmal_id=gmap_id+'_widget';
obj.attr({'id':new_gmal_id})
});
}
_evo_run_eventcard_map_load();
$(el).evo_cal_filtering();
$(el).evo_cal_localize_time();
$(cal).evo_cal_oneevent_onload(calO.type);
el.evo_cal_hide_data();
live_now_cal();
counters();
};
var live_now_cal=function(){
$(el).find('.evo_img_time').each(function(){
if($(this).closest('a.desc_trig').find('em.evcal_time').length){
_html=$(this).closest('a.desc_trig').find('em.evcal_time')[0].outerHTML;
$(this).html(_html);
}});
}
var counters=function(){
$(el).find('.evo_countdowner').each(function(){
$(this).evo_countdown();
});
}
init();
};
var EVO_EventCard_Listeners=function(){
const EVO_Card_Listeners={
E: { B: $('body') },
init(){
const { E }=this;
E.B.on('click.evoCard', '.evo_et_trigger', (e)=> this.evo_handle_et_sidePanel(e));
E.B.on('evo_ajax_success_evo_et_trigger.evoCard', (e, OO, data, el)=> this.evo_handle_et_sp_content(e, OO, data, el));
E.B.on('click.evoCard', '.tzo_trig', (e)=> this.localizeTime(e));
E.B.on('click.evoCard', '.evo_event_more_img', (e)=> this.handle_event_more_img(e));
E.B.on('click.evoCard', '.evo_img_triglb', (e)=> this.handle_img_triglb(e));
E.B.on('click.evoCard', '.evo_repeat_series_date', (e)=> this.handle_repeat_series_date(e));
E.B.on('click.evoCard', '.copy.evo_ss', (e)=> this.handle_copy_event_link(e));
E.B.on('click.evoCard', '.evo_copy_address', (e)=> this.handle_copy_event_address(e));
E.B.on('click.evoCard', '.evo_openmap_trig', (e)=> this.handle_open_inmaps(e));
E.B.on('click.evoCard', '.evo_locimg_more', (e)=> this.handle_locimg_more(e));
E.B.on('click.evoCard', '.evo_gal_icon', (e)=> this.handle_gal_icon(e));
E.B.on('click.evoCard', '.evobtn_details_show_more', (e)=> this.handle_details_show_more(e));
E.B.on('click.evoCard', '.evcal_close', (e)=> this.handle_close_eventcard(e));
E.B.on('click.evoCard', '.evocmd_button', (e)=> this.handle_evocmd_button(e));
E.B.on('click.evoCard', '.evo_org_clk_link', (e)=> this.handle_org_clk_link(e));
E.B.on('click.evoCard', '.editEventBtnET', (e)=> this.handle_edit_event_button(e));
E.B.on('click.evoCard', '.evo_organizer_more_trig', (e)=> this.handle_organizer_more_details(e));
},
handle_organizer_more_details(e){
const { E }=this;
const $el=$(e.currentTarget);
$el.parent().hide();
$el.parent().siblings('.evo_org_details_full').show().removeClass('evodni');
},
evo_handle_et_sidePanel(e){
const { E }=this;
const $el=$(e.currentTarget);
e.preventDefault();
$el.addClass('evo_sp_trig_on');
const aData=$el.data('d');
aData.adata.data['nonce']=evo_general_params.n;
$el.evo_open_sidepanel(aData);
},
evo_handle_et_sp_content(e, OO, data, el){
$(el).evo_populate_sidepanel(data.html);
$('#evo_sp').find('.evo_loading_bar_holder').remove();
},
localizeTime(e){
e.preventDefault();
e.stopPropagation();
$(e.target).evo_localize_time();
},
handle_event_more_img(e){
const $el=$(e.currentTarget);
const box=$el.closest('.evcal_eventcard');
const gal=$el.closest('.evocard_fti_in');
if(box.length===0) return;
$el.siblings('span').removeClass('select');
$el.addClass('select');
const mainIMG=box.find('.evocard_main_image');
mainIMG.data({
h: $el.data('h'),
w: $el.data('w'),
f: $el.data('f'),
a: $el.data('a'),
});
if(mainIMG.hasClass('def')){
mainIMG.css('background-image', `url(${$el.data('f')})`);
}else{
mainIMG.html(`<span style="background-image:url(${$el.data('f')})"></span>`);
mainIMG.eventon_process_main_ft_img();
}},
handle_img_triglb(e){
const $el=$(e.currentTarget);
if($el.hasClass('inlb')) return;
const __ac=parseInt($el.data('w')) >=parseInt($el.data('h')) ? 'iW':'iH';
$el.evo_lightbox_open({
uid: 'evocard_ft_img',
lbc: 'evolb_ft_img',
lbac: `within evocard_img ${__ac}`,
content: `<img class='evocard_main_image inlb' src='${$el.data('f')}' data-w='${$el.data('w')}' data-h='${$el.data('h')}' style='max-width:100%; max-height:100%;'/>`,
end: 'client',
lb_padding: '',
d: { event_id: $el.data('event_id'), ri: $el.data('ri') }});
},
handle_repeat_series_date(e){
const $el=$(e.currentTarget);
if(!$el.parent().hasClass('clickable')) return;
const ux=$el.data('ux');
const URL=$el.data('l');
if(ux==='def') window.location=URL;
if(ux==='defA') window.open(URL, '_blank');
},
handle_copy_event_link(e){
e.preventDefault();
e.stopPropagation();
const $el=$(e.currentTarget);
const ROW=$el.closest('.evcal_evdata_row');
const link=decodeURIComponent($el.data('l'));
navigator.clipboard.writeText(link);
const evo_card_socialshare_html=ROW.html();
ROW.html(`<p style='display:flex'><i class='fa fa-check marr10'></i> ${$el.data('t')}</p>`);
setTimeout(()=> {
ROW.html(evo_card_socialshare_html);
}, 3000);
},
handle_copy_event_address(e){
e.preventDefault();
e.stopPropagation();
const $el=$(e.currentTarget);
const content=decodeURIComponent($el.data('txt'));
navigator.clipboard.writeText(content);
$el.siblings('input').val($el.data('t'));
setTimeout(()=> {
$el.siblings('input').val(content);
}, 3000);
},
handle_open_inmaps(e){
e.preventDefault();
e.stopPropagation();
const $el=$(e.currentTarget);
const address=$el.data('d');
const ua=navigator.userAgent;
if(ua.includes('iphone')||ua.includes('ipad')||ua.includes('ipod')){
window.location='maps://maps.apple.com/?q=' + address;
setTimeout(()=> {
window.open('https://maps.apple.com/?q=' + address, '_blank');
}, 1000);
}
else if(ua.includes('android')){
window.location='geo:0,0?q=' + address;
setTimeout(()=> {
window.open('https://www.google.com/maps/search/?api=1&query=' + address, '_blank');
}, 1000);
}else{
window.open('https://www.google.com/maps/search/?api=1&query=' + address, '_blank', 'noopener');
}},
handle_locimg_more(e){
e.preventDefault();
e.stopPropagation();
$(e.currentTarget).closest('.evo_metarow_locImg').toggleClass('vis');
},
handle_gal_icon(e){
e.preventDefault();
e.stopPropagation();
const $el=$(e.currentTarget);
if($el.hasClass('on')) return;
$el.siblings('div').removeClass('on');
$el.addClass('on');
$el.closest('.evo_gal_box').find('.evo_gal_main_img')
.css('background-image', `url(${$el.data('u')})`)
.data('f', $el.data('u'))
.data('h', $el.data('h'))
.data('w', $el.data('w'));
},
handle_details_show_more(e){
e.preventDefault();
this.control_more_less($(e.currentTarget));
},
handle_close_eventcard(e){
e.preventDefault();
$(e.currentTarget).closest('.evcal_eventcard').slideUp().removeClass('open');
},
handle_evocmd_button(e){
e.preventDefault();
e.stopPropagation();
const $el=$(e.currentTarget);
const href=$el.data('href');
if($el.data('target')==='yes'){
window.open(href, '_blank');
}else{
window.location=href;
}},
handle_org_clk_link(e){
window.open($(e.currentTarget).data('link'), '_blank');
},
handle_edit_event_button(e){
e.stopPropagation();
const href=$(e.currentTarget).attr('href');
window.open(href);
},
control_more_less(obj){
const content=obj.attr('content');
const current_text=obj.find('.ev_more_text').html();
const changeTo_text=obj.find('.ev_more_text').attr('data-txt');
const cell=obj.closest('.evcal_evdata_cell');
if(content==='less'){
cell.removeClass('shorter_desc');
obj.attr('content', 'more');
obj.find('.ev_more_arrow').removeClass('ard');
obj.find('.ev_more_text').attr('data-txt', current_text).html(changeTo_text);
}else{
cell.addClass('shorter_desc');
obj.attr('content', 'less');
obj.find('.ev_more_arrow').addClass('ard');
obj.find('.ev_more_text').attr('data-txt', current_text).html(changeTo_text);
}}
};
EVO_Card_Listeners.init();
}
var evo_cal_eventcard_interactions=function(EC , load_maps){
EC.find(".evocard_main_image").eventon_process_main_ft_img();
EC.find('.evo_elm_HCS').each(function(){
$(this).evoContentSlider();
});
EC.find('.evo_countdowner').each(function(){
var obj=$(this);
obj.removeClass('evo_cd_on');
obj.evo_countdown();
});
$(window).on('resize',function(){
BODY.find(".evocard_main_image").each(function(){
$(this).eventon_process_main_ft_img();
});
});
}
$.fn._evo_cal_eventcard_interactions=function(EC, load_maps){
evo_cal_eventcard_interactions(EC , load_maps);
}
function _evo_run_eventcard_map_load(){
BODY.evo_run_eventcard_map_load();
}
$.fn.evo_run_eventcard_map_load=function(){
time=600;
BODY.find('.evo_metarow_gmap').each(function(index){
O=$(this);
if(!(O.is(":visible"))) return;
O.evo_load_gmap({
map_canvas_id: O.attr('id'),
trigger_point:'evo_calendar',
delay: time
});
time +=600;
});
}
var evo_cal_eventtop_interactions=function(ET){	}
EVO_Global_Init();
function EVO_Global_Init(){
EVO_Interactions();
EVO_EventCard_Listeners();
var run_initload=false;
if($('body').find('.ajde_evcal_calendar').length > 0) run_initload=true;
if($('body').find('.ajax_loading_cal').length > 0) run_initload=true;
if($('body').find('.eventon_single_event').length > 0) run_initload=true;
if(run_initload==false) return false;
var data_arg={};
BODY.trigger('evo_global_page_run');
data_arg['global']=$('#evo_global_data').data('d');
data_arg['cals']={};
data_arg['nonce']=evo_general_params.n;
BODY.find('.ajde_evcal_calendar').each(function(){
const CAL=$(this);
var SC=CAL.evo_shortcode_data();
CAL.evo_pre_cal();
if(CAL.hasClass('ajax_loading_cal')){
data_arg['cals'][ CAL.attr('id')]={};
data_arg['cals'][ CAL.attr('id')]['sc']=SC;
BODY.trigger('evo_global_page_run_after', CAL , SC);
}});
BODY.evo_admin_get_ajax({
adata:{
data:data_arg,
a:'eventon_init_load',ajax_type:'endpoint',end:'client'
},
onSuccess:function(OO, data, LB){
$('#evo_global_data').data('d', data);
BUS=data;
if('cals' in data){
var time=300;
$.each(data.cals, function(i,v){
setTimeout(function(){
CAL=BODY.find('#'+ i);
if(CAL.length===0) return;
if('html' in v){
CAL.find('#evcal_list').html(v.html);
CAL.removeClass('ajax_loading_cal');
CAL.find('.evo_ajax_load_events').remove();
}
CAL.evo_cal_functions({action:'update_shortcodes',SC: v.sc});
CAL.evo_cal_functions({action:'update_json',json: v.json});
$('body').trigger('evo_init_ajax_success_each_cal', [data, i, v, CAL]);
}, time);
time +=300;
});
}
$('body').trigger('evo_init_ajax_success', [data]);
setTimeout(function(){
BODY.find('.ajde_evcal_calendar').each(function(){
if($(this).hasClass('.ajax_loading_cal')) return;
$(this).evo_calendar({'type':'complete'});
});
}, time);
},
onComplete:function(OO, data){
$('body').trigger('evo_init_ajax_completed', [data]);
}});
handlebar_additional_arguments();
EVO_Cal_Body_listeners();
BODY.find('.evo_countdowner').each(function(){
$(this).evo_countdown();
});
}
$('body').on('mouseover','.ajdeToolTip, .evotooltip, .evotooltipfree',function(event){
event.stopPropagation();
const el=$(this);
if(el.hasClass('show')) return;
var free=el.hasClass('free')||el.hasClass('evotooltipfree');
var content=el.data('d')||el.attr('title')||'';
if(!content) return;
var p=el.position();
var cor=getCoords(event.target);
$('.evo_tooltip_box').removeClass('show').removeClass('L').html(content);
var box_height=$('.evo_tooltip_box').height();
var box_width=$('.evo_tooltip_box').width();
var top=cor.top - 55 - box_height + (free ? 20:0);
$('.evo_tooltip_box').css({'top': top, 'left':(cor.left + 5) })
.addClass('show');
if($(this).hasClass('L')){
$('.evo_tooltip_box').css({'left': (cor.left - box_width - 15) }).addClass('L');
}})
.on('mouseout','.ajdeToolTip, .evotooltip, .evotooltipfree',function(e){
event.stopPropagation();
var relatedTarget=$(event.relatedTarget);
var target=$(this);
$('.evo_tooltip_box').removeClass('show');
});
function getCoords(elem){
var box=elem.getBoundingClientRect();
var body=document.body;
var docEl=document.documentElement;
var scrollTop=window.pageYOffset||docEl.scrollTop||body.scrollTop;
var scrollLeft=window.pageXOffset||docEl.scrollLeft||body.scrollLeft;
var clientTop=docEl.clientTop||body.clientTop||0;
var clientLeft=docEl.clientLeft||body.clientLeft||0;
var top=box.top +  scrollTop - clientTop;
var left=box.left + scrollLeft - clientLeft;
return { top: Math.round(top), left: Math.round(left) };}
$('body').on('click','.ajde_yn_btn ', function(event){
if($('body').hasClass('wp-admin')) return false;
var obj=$(this);
var afterstatement=obj.attr('afterstatement');
afterstatement=(afterstatement===undefined)? obj.attr('data-afterstatement'): afterstatement;
var uid='';
if(obj.hasClass('NO')){
obj.removeClass('NO');
obj.siblings('input').val('yes');
if(afterstatement!=''){
var type=(obj.attr('as_type')=='class')? '.':'#';
if(obj.data('uid')!==undefined) uid=obj.data('uid');
$(type+ afterstatement).slideDown('fast');
}}else{
obj.addClass('NO');
obj.siblings('input').val('no');
if(afterstatement!=''){
var type=(obj.attr('as_type')=='class')? '.':'#';
$(type+ afterstatement).slideUp('fast');
}}
});
$.fn.evoContentSlider=function(){
return this.each(function(){
const $slider=$(this);
const $inner=$slider.find('.evo_elm_HCS_in');
const scrollAmount=10;
let scrollTimeout;
updateButtonVisibility($slider);
$slider.data('evo-slider-initialized', true);
$slider.on('click', '.evo_elmHCS_nav.content_slide_trig', function(){
const $button=$(this);
const scrollDistance=parseInt($slider.width()) / 2;
const currentScroll=$inner.scrollLeft();
let newScroll;
if($button.hasClass('HCSnavR')){
newScroll=currentScroll + scrollDistance;
$slider.find('.HCSnavL')[0].classList.add('vis');
}else{
newScroll=Math.max(0, currentScroll - scrollDistance);
}
$inner.animate({ scrollLeft: newScroll }, 200, ()=> {
updateButtonVisibility($slider);
});
});
$inner[0].addEventListener('wheel', function(e){
e.preventDefault();
const delta=e.deltaY;
const scrollableLength=this.scrollWidth - parseInt($slider.width());
const newScroll=Math.max(0, Math.min($inner.scrollLeft() + (delta > 0 ? scrollAmount:-scrollAmount), scrollableLength));
$inner.scrollLeft(newScroll);
updateButtonVisibility($slider);
}, { passive: false });
$inner[0].addEventListener('scroll', function(){
clearTimeout(scrollTimeout);
scrollTimeout=setTimeout(()=> {
updateButtonVisibility($slider);
}, 100);
});
});
};
$('body').on('evo_reload_slider', function(event, $slider){
updateButtonVisibility($slider);
});
function updateButtonVisibility($slider){
const $inner=$slider.find('.evo_elm_HCS_in');
const scrollableLength=$inner[0].scrollWidth - parseInt($slider.width());
const currentScroll=$inner.scrollLeft();
const leftButton=$slider.find('.HCSnavL')[0];
const rightButton=$slider.find('.HCSnavR')[0];
if(scrollableLength <=0){
leftButton.classList.remove('vis');
rightButton.classList.remove('vis');
return;
}
leftButton.classList.toggle('vis', currentScroll >=10);
rightButton.classList.toggle('vis', currentScroll < scrollableLength - 5);
}
let resizeTimeout;
$(window).on('resize', function(){
clearTimeout(resizeTimeout);
resizeTimeout=setTimeout(()=> {
$('.evo_elm_HCS').each(function(){
updateButtonVisibility($(this), $(this).find('.evo_elm_HCS_in'));
});
}, 100);
});
BODY.find('.evo_elm_HCS').each(function(event){
$(this).evoContentSlider();
});
BODY.on('click', '.evo_elm_dynamic_select_trig',function(e){
e.preventDefault();
const btn=$(this);
const row=btn.closest('.evo_elm_dynamic_select');
const list=btn.find('.evoelm_ds_list');
row.toggleClass('open');
btn.toggleClass('open');
if(btn.hasClass('open')){
const options=btn.siblings('div').data('d');
let html=`<div class="evoelm_ds_list evobr10 evodfx evofx_dr_c evobgcw evofz14 evoff_2 evo_ofh evoposa evoleft0 " role="listbox" aria-labelledby="selected-option">`;
$.each(options, (index, value)=> {
html +=`<span class="evoelm_ds_list_item evopad10 evocurp evoborderb" role="option" tabindex="-1" data-index="${index}">${value}</span>`;
});
html +='</div>';
btn.append(html);
}else{
list.remove();
}});
$(document).click(function(event){
if(!$(event.target).closest('.evo_elm_dynamic_select').length){
const openBox=BODY.find('.evo_elm_dynamic_select.open');
openBox.removeClass('open').find('button').removeClass('open');
openBox.find('.evoelm_ds_list').remove();
}});
BODY.on('click','.evoelm_ds_list_item',function(event){
const item=$(this);
const box=item.closest('.evo_elm_dynamic_select');
const value=item.data('index');
box.find('.evoelm_ds_current').html(item.html());
box.find('input').val(value);
BODY.trigger('evoelm_dynamic_select_clicked', [ item, value, box ]);
box.removeClass('open');
box.find('button').removeClass('open');
item.parent().remove();
});
var file_frame;
var __img_index;
var __img_obj;
var __img_box;
var __img_type;
BODY.on('click','.evolm_img_select_trig',function(event){
event.preventDefault();
const $trigger=$(this);
const __img_obj=$(this);
const $row=$trigger.closest('.evo_elm_row');
const __img_box=__img_obj.closest('.evo_metafield_image');
const __img_actions=__img_obj.closest('.evolm_img_actions');
const __img_type=__img_box.hasClass('multi')? 'multi': 'single';
const uploaderId=$row.data('id');
if(__img_type=='single'&&__img_box.hasClass('has_img')) return;
if(__img_type=='multi'){
__img_index=__img_obj.data('index');
if(__img_obj.hasClass('on')){
__img_obj.css('background-image', '').removeClass('on');
__img_obj.find('input').val('');
return;
}}
if(file_frame){     file_frame.close(); file_frame=null;   }
var user_id=__img_actions.data('userid') ? parseInt(__img_actions.data('userid')):0;
var library_args={ type: 'image' };
if(user_id > 0){ library_args.author=user_id; }
file_frame=wp.media.frames.downloadable_file=wp.media({
title: 'Choose an Image',
button: {text: 'Use Image'},
multiple: false,
library: library_args,
});
if(uploaderId!=''||uploaderId!==undefined){
file_frame.uploaderId=uploaderId;
}
file_frame.on('select', function(){
var selection=file_frame.state().get('selection');
if(selection.length > 0){
var attachment=selection.first().toJSON();
if(__img_type=='single'){
__img_box.addClass('has_img');
__img_box.find('input.evo_meta_img').val(attachment.id);
__img_box.find('.evoelm_img_holder').css('background-image', 'url(' + attachment.url + ')');
}else{
__img_obj.css('background-image', 'url(' + attachment.url + ')').addClass('on');
__img_obj.find('input').val(attachment.id);
}}else{
console.log('No image selected');
}});
file_frame.on('error', function(error){
console.error('Media Uploader Error:', error); alert('Error: ' + error.message);
});
file_frame.open();
});
BODY.on('click','.evoel_img_remove_trig',function(){
const field=$(this).closest('.evo_metafield_image');
if(!(field.hasClass('has_img')) ) return;
field.removeClass('has_img');
field.find('input').val('');
field.find('button').addClass('chooseimg');
field.find('.evoelm_img_holder').css('background-image', '');
});
$('body').on('click','.evo_plusminus_change', function(event){
if(evo_general_params.cal.is_admin) return;
OBJ=$(this);
QTY=parseInt(OBJ.siblings('input').val());
MAX=OBJ.siblings('input').data('max');
if(!MAX) MAX=OBJ.siblings('input').attr('max');
NEWQTY=(OBJ.hasClass('plu'))?  QTY+1: QTY-1;
NEWQTY=(NEWQTY <=0)? 0: NEWQTY;
if(NEWQTY==0&&OBJ.hasClass('min')){    return;    }
NEWQTY=(MAX!=''&&NEWQTY > MAX)? MAX: NEWQTY;
if(isNaN(NEWQTY) ) NEWQTY=0;
OBJ.siblings('input').val(NEWQTY).attr('value',NEWQTY);
if(QTY!=NEWQTY) $('body').trigger('evo_plusminus_changed',[NEWQTY, MAX, OBJ]);
if(NEWQTY==MAX){
PLU=OBJ.parent().find('b.plu');
if(!PLU.hasClass('reached')) PLU.addClass('reached');
if(QTY==MAX)   $('body').trigger('evo_plusminus_max_reached',[NEWQTY, MAX, OBJ]);
}else{
OBJ.parent().find('b.plu').removeClass('reached');
}});
function EVO_Cal_Body_listeners(){
BODY.evo_cal_lb_listeners();
const EVO_Listeners={
E: {
B: $('body')
},
init(){
const { B }=this.E;
B.on('click.evoCal', '.evo_faq_toggle', (e)=> this.handle_faq_toggle(e));
B.on('click.evoCal', '.evo_trig_ajax', (e)=> this.handle_general_ajax(e));
B.on('click.evoCal', '.eventon_anywhere.evoajax', (e)=> this.handle_event_anywhere(e));
B.on('click.evoCal', '.evo_no_events_btn', (e)=> this.handle_no_events_btn(e));
B.on('click.evoCal', '.evcal_arrows', (e)=> this.handle_month_switch(e));
B.on('click.evoCal', '.evoShow_more_events', (e)=> this.handle_show_more_events(e));
B.on('runajax_refresh_eventtop.evoCal', (e, OBJ, nonce)=> this.handle_refresh_eventtop(e, OBJ, nonce));
B.on('evo_slidedown_eventcard_complete.evoCal', (e, event_id, obj, is_slide_down)=> this.handle_slidedown_complete(e, event_id, obj, is_slide_down));
B.on('calendar_month_changed.evoCal', (e, CAL)=> this.handle_calendar_month_changed(e, CAL));
B.on('click.evoCal', '.evo-gototoday-btn', (e)=> this.handle_gototoday_btn(e));
B.on('runajax_refresh_now_cal.evoCal', (e, OBJ, nonce)=> this.handle_refresh_now_cal(e, OBJ, nonce));
this.handle_cal_head_interactions();
B.on('show_cal_head_btn.evoCal', (e, obj)=> this.handle_show_cal_head_btn(e, obj));
B.on('hide_cal_head_btn.evoCal', (e, obj)=> this.handle_hide_cal_head_btn(e, obj));
B.on('click.evoCal', '.ajde_evcal_calendar.boxstyle3 .eventon_list_event', (e)=> this.handle_tile_box_click(e));
B.on('click.evoCal', '.eventon_list_event .desc_trig', (e)=> this.handle_desc_trig(e));
},
handle_faq_toggle(e){
const toggle=$(e.currentTarget);
const answer=toggle.next('.evo_faq_answer');
const icon=toggle.find('i.fa');
answer.toggle();
icon.toggleClass('fa-plus fa-minus');
},
handle_general_ajax(e){
const obj=$(e.target);
let ajax_data=obj.data();
$(document).data('evo_data', ajax_data);
this.E.B.trigger('evo_before_trig_ajax', [obj]);
const new_ajax_data=$(document).data('evo_data');
new_ajax_data['nn']=the_ajax_script.postnonce;
$.ajax({
beforeSend: ()=> {
this.E.B.trigger('evo_beforesend_trig_ajax', [obj, new_ajax_data]);
},
type: 'POST',
url: get_ajax_url('eventon_gen_trig_ajax'),
data: new_ajax_data,
dataType: 'json',
success: (return_data)=> {
this.E.B.trigger('evo_success_trig_ajax', [obj, new_ajax_data, return_data]);
},
complete: ()=> {
this.E.B.trigger('evo_complete_trig_ajax', [obj, new_ajax_data]);
}});
},
handle_event_anywhere(e){
e.preventDefault();
const obj=$(e.currentTarget);
const data=obj.data('sc');
if(data.ev_uxval=='4') return;
data['evortl']='no';
if('id' in data) data['event_id']=data.id;
data['ux_val']='3a';
data['ajax_eventtop_show_content']=false;
obj.evo_cal_lightbox_trigger(data, obj, false);
},
handle_no_events_btn(e){
this.E.B.trigger('click_on_no_event_btn', [$(e.currentTarget)]);
},
handle_month_switch(e){
e.preventDefault();
const CAL=$(e.currentTarget).closest('.ajde_evcal_calendar');
let dir=$(e.currentTarget).hasClass('evcal_btn_prev') ? 'prev':'next';
const cal_id=CAL.attr('id');
if(CAL.hasClass('evortl')){
dir=dir=='next' ? 'prev':'next';
}
if($(e.currentTarget).closest('.evo_footer_nav').length > 0){
const BOX=$(e.currentTarget).closest('.evo_footer_nav');
const offset=BOX.offset();
const scrolltop=$(window).scrollTop();
const viewport_top=offset.top - scrolltop;
CAL.addClass('nav_from_foot').data('viewport_top', viewport_top);
}
run_cal_ajax(cal_id, dir, 'switchmonth');
},
handle_show_more_events(e){
const CAL=$(e.currentTarget).closest('.ajde_evcal_calendar');
const SC=CAL.evo_shortcode_data();
const OBJ=$(e.currentTarget);
if(SC.show_limit_redir!==''){
window.location=SC.show_limit_redir;
return false;
}
if(SC.show_limit_ajax=='yes'){
const CURRENT_PAGED=parseInt(SC.show_limit_paged);
CAL.evo_update_cal_sc({ F: 'show_limit_paged', V: CURRENT_PAGED + 1 });
run_cal_ajax(CAL.attr('id'), 'none', 'paged');
}else{
const event_count=parseInt(SC.event_count);
const eventList=OBJ.parent();
const allEvents=eventList.find('.eventon_list_event').length;
const currentShowing=eventList.find('.eventon_list_event:visible').length;
for (let x=1; x <=event_count; x++){
const inde=currentShowing + x - 1;
eventList.find(`.eventon_list_event:eq(${inde})`).slideDown();
}
if(allEvents >=currentShowing&&allEvents <=(currentShowing + event_count)){
OBJ.fadeOut();
}}
},
handle_refresh_eventtop(e, OBJ, nonce){},
handle_slidedown_complete(e, event_id, obj, is_slide_down){
if(!is_slide_down) return;
setTimeout(()=> {
const OO=obj.closest('.eventon_list_event');
evo_cal_eventcard_interactions(OO, true);
}, 300);
},
handle_calendar_month_changed(e, CAL){
const SC=CAL.evo_shortcode_data();
const B=CAL.find('.evo-gototoday-btn');
const O=CAL.find('.evo_j_container');
O.find('.evo_j_months a').removeClass('set');
O.find(`.evo_j_months a[data-val="${SC.fixed_month}"]`).addClass('set');
O.find('.evo_j_years a').removeClass('set');
O.find(`.evo_j_years a[data-val="${SC.fixed_year}"]`).addClass('set');
if(SC.fixed_month!=B.data('mo')||SC.fixed_year!=B.data('yr')){
this.E.B.trigger('show_cal_head_btn', [B]);
}else{
this.E.B.trigger('hide_cal_head_btn', [B]);
}},
handle_gototoday_btn(e){
const obj=$(e.currentTarget);
const CAL=obj.closest('.ajde_evcal_calendar');
const calid=CAL.attr('id');
CAL.evo_update_cal_sc({ F: 'fixed_month', V: obj.data('mo') });
CAL.evo_update_cal_sc({ F: 'fixed_year', V: obj.data('yr') });
run_cal_ajax(calid, 'none', 'today');
this.E.B.trigger('hide_cal_head_btn', [obj]);
},
handle_refresh_now_cal(e, OBJ, nonce){
const section=OBJ.closest('.evo_eventon_live_now_section');
const CAL=section.find('.ajde_evcal_calendar').eq(0);
const dataA={
nonce: evo_general_params.n,
other: OBJ.data(),
SC: CAL.evo_shortcode_data()
};
$.ajax({
beforeSend: ()=> {
section.addClass('evoloading');
},
type: 'POST',
url: get_ajax_url('eventon_refresh_now_cal'),
data: dataA,
dataType: 'json',
success: (data)=> {
if(data.status=='good'){
section.html(data.html);
this.E.B.trigger('evo_refresh_designated_elm', [OBJ, 'evo_vir_data']);
}},
complete: ()=> {
section.removeClass('evoloading');
this.E.B.find('.evo_countdowner').each(function(){
$(this).evo_countdown();
});
}});
},
handle_cal_head_interactions(){
const { B }=this.E;
B.on('click.evoCal', '.cal_head_btn', (e)=> {
const obj=$(e.currentTarget);
if(obj.hasClass('vis')){
this.E.B.trigger('hide_cal_head_btn', [obj]);
}else{
this.E.B.trigger('show_cal_head_btn', [obj]);
}});
B.on('evo_cal_header_btn_clicked',function(event, O, CAL){
var SC=CAL.evo_shortcode_data();
if(evo_general_params.cal.search_openoninit) return;
if(O.hasClass('evo-search')){
if(O.hasClass('vis')){
CAL.find('.evo_search_bar').show(1, function(){
$(this).find('input').focus();
});
}else{
CAL.find('.evo_search_bar').hide();
}}
if(O.hasClass('evo-sort-btn')||O.hasClass('evo-filter-btn')){
CAL.find('.evo_search_bar').hide();
}});
},
handle_show_cal_head_btn(e, obj){
if(!obj.hasClass('evo-gototoday-btn')){
obj.siblings(':not(.evo-gototoday-btn)').removeClass('show vis');
}
obj.addClass('show vis');
const CAL=obj.closest('.ajde_evcal_calendar');
this.E.B.trigger('evo_cal_header_btn_clicked', [obj, CAL, 'show']);
},
handle_hide_cal_head_btn(e, obj){
const CAL=obj.closest('.ajde_evcal_calendar');
obj.removeClass('show vis');
this.E.B.trigger('evo_cal_header_btn_clicked', [obj, CAL, 'hide']);
},
handle_tile_box_click(e){
e.preventDefault();
e.stopPropagation();
$(e.currentTarget).find('.desc_trig').trigger('click');
},
handle_desc_trig(e){
e.preventDefault();
const $this=$(e.currentTarget);
const $eventBox=$this.closest('.eventon_list_event');
const $cal=$this.closest('.evo_lightbox').data('cal_id') ?
$('#' + $this.closest('.evo_lightbox').data('cal_id')) :
$this.closest('.ajde_evcal_calendar');
const SC=$cal.evo_shortcode_data();
const ux_val=$cal.evo_cal_event_get_uxval(SC, $this);
const event_id=$eventBox.data('event_id');
const exlk=$this.data('exlk');
const isSingleEventBox=$this.closest('.eventon_single_event').length > 0&&$cal.find('.evo-data').data('exturl');
const actions={
'3': ()=> this.open_lightbox($this, $cal, SC, event_id, $eventBox, ux_val),
'3a': ()=> this.open_lightbox($this, $cal, SC, event_id, $eventBox, ux_val),
'4': ()=> this.open_url($this, $this.attr('href')||$this.parent().siblings('.evo_event_schema').find('a').attr('href'), '_self'),
'4a': ()=> this.open_url($this, $this.attr('href')||$this.parent().siblings('.evo_event_schema').find('a').attr('href'), '_blank'),
'2': ()=> this.handle_external_link($this, isSingleEventBox),
'X': ()=> false,
'none': ()=> false,
'default': ()=> exlk==='1' ? this.handle_external_link($this, isSingleEventBox):this.slide_down_event_card($this, $eventBox, $cal, SC, event_id)
};
return (actions[ux_val]||actions['default'])();
},
open_lightbox($trigger, $cal, SC, event_id, $eventBox, ux_val){
const repeat_interval=parseInt($eventBox.data('ri'))||0;
const etttc_class=$cal.attr('class').split(' ').find(cls=> cls.startsWith('etttc_'))||'';
const new_SC_data={
...SC,
repeat_interval,
event_id,
ux_val,
evortl: $trigger.closest('.eventon_events_list').hasClass('evortl') ? 'yes':'no',
ajax_eventtop_show_content: true,
additional_class: etttc_class
};
$cal.evo_cal_lightbox_trigger(new_SC_data, $trigger, $cal);
return false;
},
open_url($this, url, target){
target=$this.attr('target')==='_blank' ? '_blank':target;
if(url) window.open(url, target);
return target==='_blank';
},
handle_external_link($trigger, isSingleEventBox){
if(isSingleEventBox) return false;
const url=$trigger.attr('href');
if(url){
window.open(url, $trigger.attr('target')==='_blank' ? '_blank':'_self');
}
return !!url;
},
slide_down_event_card($trigger, $eventBox, $cal, SC, event_id){
const $content=$eventBox.find('.event_description');
const isOpen=$content.hasClass('open');
if(SC.accord==='yes'){
$cal.find('.eventon_list_event').removeClass('open');
$cal.find('.event_description').slideUp().removeClass('open');
}
$eventBox.toggleClass('open', !isOpen);
$content[isOpen ? 'slideUp':'slideDown']().toggleClass('open', !isOpen);
if($eventBox.find('.evo_metarow_gmap').length){
$eventBox.find('.evo_metarow_gmap').evo_load_gmap({ trigger_point: 'slideDownCard' });
}
if($trigger.data('runjs')){
this.E.B.trigger('evo_load_single_event_content', [event_id, $trigger]);
}
this.E.B.trigger('evo_slidedown_eventcard_complete', [event_id, $trigger, !isOpen]);
return false;
}}
EVO_Listeners.init();
}
function EVO_Interactions(){
const interactions_class={
E:{ B: $('body')},
run(){
const { B }=this.E;
this.evoLightboxEnd();
this.evocardNavTrig();
this.evoMapExpandTrig();
this.handle_lightbox_processed();
this.handle_calendar_interactions();
this.handle_global_listners();
this.handle_tabs();
this.handle_aria_population();
},
handle_aria_population(){
const chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const gen=()=> Array.from({length:9},()=>chars[Math.floor(Math.random()*62)]).join('');
const used=new Set();
$('.evo_aria_ready').each(function(){
const $label=$(this);
let $unique_label=$label.text().trim();
const $i=$label.siblings('.evo_aria_ready_match').first();
if(!$i.length) return;
let id;
do { id=gen(); } while (used.has(id));
used.add(id);
$unique_label=$unique_label.replace(/\[[^\]]*\]/, '['+id+']');
$label.html($unique_label);
$i.attr('aria-label', $unique_label);
$(this).attr('for', id);
$i.attr('id', id).removeAttr('aria-label');
});
},
evoLightboxEnd(){
this.E.B.on('evolightbox_end', (event, LB, CAL)=> {
setTimeout(()=> {
LB.find('.eventon_list_event').each(function(){
evo_cal_eventcard_interactions($(this), true);
});
_evo_run_eventcard_map_load();
LB.evo_cal_localize_time();
this.handle_aria_population();
}, 1000);
});
this.E.B.on('evolightbox_end', (e, LB, CAL, OO)=> {
if(!evo_general_params.cal.lbnav) return;
if(evo_general_params.cal.lbnav==='no') return;
if(OO===undefined||!('other_data' in OO)) return;
const event=$(OO.other_data.obj).closest('.event');
const calId=(CAL ? CAL.attr('id'):'');
const buttons=[
{ dir: 'prev', icon: 'left', sibling: event.prev('.event') },
{ dir: 'next', icon: 'right', sibling: event.next('.event') }
].filter(b=> b.sibling.length)
.map(b=> `
<div class='evocard_lb_navs'>
<button class='evocard_nav_trig ${b.dir} evoposa evocurp evohoop7 evobr30 evobgcw evodfx evofxjcc evofxaic evo_transit_all evoboxbb' data-id='${b.sibling.attr('id')}' data-cid='${calId}'>
<i class='fa fa-chevron-${b.icon}'></i>
</button>
</div>
`).join('');
LB.find('.evolb_box').append(buttons);
setTimeout(()=> LB.find('.evocard_nav_trig').addClass('show'), 500);
});
},
evocardNavTrig(){
this.E.B.on('click','.evocard_nav_trig',function(e){
e.preventDefault();
const $el=$(e.currentTarget);
const CAL=$('#' + $el.data('cid'));
const SC=CAL.evo_shortcode_data();
const eventId=$el.data('id').split('_')[1];
const newEvent=CAL.find(`#${$el.data('id')}`);
const newEventTrigger=newEvent.find('.desc_trig');
const LB=$el.closest('.evo_lightbox');
LB.find('.evocard_nav_trig').fadeOut().addClass('old');
setTimeout(()=> LB.find('.evocard_lb_navs').has('.old').remove(), 500);
LB.evo_lightbox_show_open_animation({ animation_type: 'saving' });
const updatedSC={
...SC,
repeat_interval: parseInt(newEvent.data('ri')),
ux_val: CAL.evo_cal_event_get_uxval(SC, newEventTrigger),
event_id: eventId,
ajax_eventtop_show_content: true,
evortl: newEvent.find('.eventon_events_list').hasClass('evortl') ? 'yes':'no',
additional_class: CAL.attr('class').match(/etttc_\w+/)?.[0]||'',
};
const newLbClass="evo_eventcard_"+eventId;
LB.removeClass(LB.data('lbc')).addClass(newLbClass).data('lbc', newLbClass);
setTimeout(()=> CAL.evo_cal_lightbox_trigger(updatedSC, newEventTrigger, CAL, LB), 1000);
});
},
evoMapExpandTrig(){
this.E.B.on('click','.evo_map_expand_trig',function(e){
e.preventDefault();
const $gmapDiv=$(this).closest('.evo_map').find('.evo_metarow_gmap');
const mapID=$gmapDiv.attr('id')+'_exp';
const $newDiv=$('<div id="'+ mapID +'" class="evo_lb_map evobr15" style="min-height:calc(100vh - 120px);"></div>');
const locationAdd=$gmapDiv.data('address');
const locationName=$gmapDiv.data('name');
const extra=`<div class='evodfx evofxdrr evofxaic evogap10 evomarr50'>
<input id="user-address-${mapID}" type="text" placeholder="Enter starting address"/>
<button id="get-directions-${mapID}" class='evo_nonbtn'><i class='fa fa-circle-arrow-right'></i></button>
<i class='fa fa-route evofz24i evocurp evoop5 evohoop7'></i>
<button class='evo_nonbtn evoff_2 evocurp evohoop7 evoop5'><i class='fa fa-calendar evomarr10 evofz24i'></i>More Events</button>
</div>`;
const $topDiv=`<div class='evodfx evofxdrr evogap10 evofxjcsb evofxaic evomarb10'>
<div class='evodfx evofxdrr evofxaic evogap10'>
<p class='evoff_1i evomar0i evofz18i'>${locationName}</p>
<p class='evomar0i evofz14i'>${locationAdd}</p>
</div>
</div>`;
const $botDiv=``;
$.each($gmapDiv.data(), function(key, value){
$newDiv.data(key, value).attr('data-'+key, value);
});
const calID=$(this).closest('.ajde_evcal_calendar').attr('id');
$(this).evo_lightbox_open({
uid: 'evo_map_expand',calid: calID,
lbdata:{ class:'evo_map_expand',content: $topDiv + $newDiv[0].outerHTML + $botDiv }});
});
},
handle_lightbox_processed(){
this.E.B.on('evo_lightbox_processed',function(e, OO, LB){
if(OO.uid=='evo_map_expand'){
setTimeout(function(){
LB.find('.evo_lb_map').evo_load_gmap({	cal: $('body').find('#'+ OO.calid)	});
}, 500);
}}).on('evo_ajax_success_evo_open_eventcard_lightbox', function(e, OO, data, el){
setTimeout(function(){
LB.find('.evcal_gmaps').evo_load_gmap({	cal: $('body').find('#'+ OO.d.calid)	});
}, 500);
});
},
handle_calendar_interactions(){
const { B }=this.E;
B.find('.ajde_evcal_calendar').each((index, calendar)=> {
const $calendar=$(calendar);
const $SC=$calendar.evo_shortcode_data();
if($calendar.hasClass('bub')){
$calendar.on('mouseover.evoCal', '.eventon_list_event', (e)=> {
const $event=$(e.currentTarget);
const $list=$event.closest('.eventon_events_list');
const title=$event.find('.evoet_dayblock').data('bub');
const position=$event.position();
$list.append(`<span class="evo_bub_box">${title}</span>`);
const $bubble=$list.find('.evo_bub_box');
let left=position.left;
let top=position.top - $bubble.height() - 30;
const listWidth=$list.width();
const totalWidth=position.left + $bubble.width() + $event.width();
if(totalWidth > listWidth){
left=position.left - $bubble.width() + $event.width() - 20;
}
$bubble.css({ top, left }).addClass('show');
}).on('mouseout.evoCal', '.eventon_list_event', (e)=> {
$(e.currentTarget).closest('.eventon_events_list').find('.evo_bub_box').remove();
});
}
$calendar.on('click.evoCal', '.evo-jumper-btn', (e)=> {
const $this=$(e.currentTarget);
$this.closest('.calendar_header').find('.evo_j_container').toggle();
$this.toggleClass('vis');
});
$calendar.on('click','.evo_j_dates a',function(){
var val=$(this).attr('data-val'),
type=$(this).parent().parent().attr('data-val'),
CAL=$calendar,
SC=CAL.evo_shortcode_data();
if(type=='m'){
CAL.evo_update_cal_sc({F:'fixed_month', V: val });
}else{
CAL.evo_update_cal_sc({F:'fixed_year', V: val });
}
run_cal_ajax(CAL.attr('id') ,'none','jumper');
if(SC.expj=='no')	container.delay(2000).slideUp();
});
$calendar.on('click', '.evo_vSW',function(){
const O=elm=$(this);
var DATA=O.data('d');
if(O.hasClass('focusX')) return;
CAL=$calendar;
CAL.find('.evoADDS').hide().delay(200).queue(function(){
$(this).remove();
});
var SC=$SC;
const cal_tz=CAL.evo_get_global({S1:'cal_def',S2:'cal_tz'});
var reload_cal_data=false;
_M1=moment().set({'year': SC.fixed_year, 'month':(SC.fixed_month -1), 'date':SC.fixed_day}).tz(cal_tz);
_M1.set('date',1).startOf('date');
_start=_M1.unix();
_M1.endOf('month').endOf('date');
_end=_M1.unix();
var DD=new Date(SC.fixed_year,SC.fixed_month -1 , SC.fixed_day, 0,0,0);
DD.setUTCHours(0);
DD.setUTCFullYear(SC.fixed_year);
DD.setUTCMonth(SC.fixed_month -1);
DD.setUTCDate(SC.fixed_day);
O.siblings('.evo_vSW').removeClass('focusX select');
O.addClass('focusX select');
CAL.find('.evo-viewswitcher-btn em').html(O.html());
O.closest('.evo_cal_view_switcher').removeClass('show');
if(DATA&&'ux_val' in DATA)	CAL.evo_update_cal_sc({F:'ux_val', V: DATA.ux_val });
O.siblings('.evo_vSW').each(function(){
var _d=$(this).data('d');
if(_d&&'c' in _d)	CAL.removeClass(_d['c']);
});
if(DATA&&'c' in DATA)	CAL.addClass(DATA.c);
CAL.find('.evoet_dayblock span').hide();
CAL.find('.evoet_dayblock span.evo_start').show();
CAL.find('.evoet_dayblock span.evo_end').show();
CAL.find('.evoet_dayblock span.evo_end.only_time').hide();
if(SC.focus_start_date_range!=_start&&SC.focus_end_date_range!=_end){
reload_cal_data=true;
CAL.evo_update_cal_sc({F:'focus_start_date_range',V: _start });
CAL.evo_update_cal_sc({F:'focus_end_date_range', V: _end });
}
if('el_visibility' in DATA){
el_visibility=DATA.el_visibility;
if(el_visibility=='show_events') CAL.find('.eventon_list_event').show();
if(el_visibility=='hide_events') CAL.find('.eventon_list_event').hide();
if(el_visibility=='hide_list') CAL.find('#evcal_list').addClass('evo_hide').hide();
if(el_visibility=='show_all'){
CAL.find('#evcal_list').removeClass('evo_hide').show();
CAL.find('.eventon_list_event').show();
}}
CAL.evo_update_cal_sc({F:'calendar_type', V: 'default'});
B.trigger('evo_vSW_clicked_before_ajax', [ O, CAL, DD, reload_cal_data ]);
if(reload_cal_data){
B.trigger('evo_run_cal_ajax',[CAL.attr('id'),'none','filering']);
}else{
B.trigger('evo_vSW_clicked_noajax', [ O, CAL ]);
}
B.trigger('evo_vSW_clicked', [ O, CAL, DD, reload_cal_data]);
if(elm.hasClass('evoti')){
CAL.find('.eventon_list_event').each(function(){
color=$(this).data('colr');
$(this).find('a.desc_trig').css({'background-color': color});
});
CAL.addClass('color').removeClass('sev').data('oC', 'sev');
}else{
if(CAL.hasClass('esty_0')||CAL.hasClass('esty_4')){
CAL.removeClass('color');
CAL.find('.eventon_list_event').each(function(){
$(this).find('a.desc_trig').css({'background-color': ''});
});
if(CAL.data('oC')!==undefined) CAL.addClass(CAL.data('oC'));
}}
});
});
},
handle_global_listners(){
const { B }=this.E;
B.on('evo_trigger_cal_reset', function(event, cal){
cal_resets(cal);
});
B.on('click', function(event){
BODY.trigger('clicked_on_page', [ $(event.target) , event ]);
});
B.find('.evo_location_map').each(function(){
$(this).evo_load_gmap();
});
B.on('evo_ajax_complete_eventon_get_tax_card_content', function(event,  OO){
LB=B.find('.'+ OO.lightbox_key);
setTimeout(function(){
if(LB.find('.evo_trigger_map').length > 0){
map_id_elm=LB.find('.evo_trigger_map');
map_id_elm.evo_load_gmap();
console.log('Loading Event Map');
}
LB.find('.evo_countdowner').each(function(){
$(this).evo_countdown();
});
CAL=LB.find('.ajde_evcal_calendar');
if(CAL.length) CAL.evo_cal_filtering();
},500);
});
},
handle_tabs(){
const { B }=this.E;
B.find('.evo_tab_container').each(function(){
$(this).find('.evo_tab_section').each(function(){
if(!$(this).hasClass('visible')){
$(this).addClass('hidden');
}});
});
B.on('click','.evo_tab',function(){
tab=$(this).data('tab');
tabsection=$(this).closest('.evo_tab_view').find('.evo_tab_container');
tabsection.find('.evo_tab_section').addClass('hidden').removeClass('visible');
tabsection.find('.'+tab).addClass('visible').removeClass('hidden');
$(this).parent().find('.evo_tab').removeClass('selected');
$(this).addClass('selected');
B.trigger('evo_tabs_newtab_selected',[ $(this)]);
});
},
};
interactions_class.run();
}
const EVO={
E:{
B: $('body')
},
init(){
this.Tools.init();
this.Interactions.init();
this.Virtual_Events.init();
this.Search.init();
this.Elements_Interactions.init();
this.setupGlobalListeners();
this.schedule_view();
this.ajax_triggers();
},
setupGlobalListeners(){
const { B }=this.E;
$(document).on('heartbeat-send', (e, data)=> {
if(this.BODY&&this.BODY.find('.evo_refresh_on_heartbeat').length){
this.BODY.find('.evo_refresh_on_heartbeat').each((i, el)=> {
if($(el).closest('.eventon_list_event').length <=0) return;
if($(el).data('refresh')!==undefined&&!$(el).data('refresh')) return;
data['evo_data']=EVO.Tools.build_elm_refresh_data($(el));
});
}});
$(document).on('heartbeat-tick', (e, data)=> {
EVO.Tools.evo_apply_refresh_content(data);
});
B.on('evo_refresh_elements', (e, send_data)=> {
if(!send_data||send_data.length <=0) return;
send_data['nonce']=evo_general_params.n;
$.ajax({
beforeSend: ()=> {
if('evo_data' in send_data){
$.each(send_data.evo_data, (ekey, eclasses)=> {
$.each(eclasses, (classnm, val)=> {
if(val&&'loader' in val&&val.loader&&'loader_class' in val){
$('#event_' + ekey).find('.' + val.loader_class).addClass('evoloading');
}});
});
}},
type: 'POST',
url: EVO.Tools.get_ajax_url('eventon_refresh_elm'),
data: send_data,
dataType: 'json',
success: (data)=> {
if(data.status==='good'){
EVO.Tools.evo_apply_refresh_content(data);
}},
complete: ()=> {
if('evo_data' in send_data){
$.each(send_data.evo_data, (ekey, eclasses)=> {
$.each(eclasses, (classnm, val)=> {
if(val&&'loader' in val&&val.loader&&'loader_class' in val){
$('#event_' + ekey).find('.' + val.loader_class).removeClass('evoloading');
}});
});
}}
});
});
B.on('evo_refresh_designated_elm', function(ee, elm, elm_class, extra_data){
const event=$(elm).closest('.eventon_list_event');
if(!event||event.find('.' + elm_class).length===0) return;
const refresh_elm=event.find('.' + elm_class);
let send_data={};
send_data['evo_data']=EVO.Tools.build_elm_refresh_data(refresh_elm , extra_data);
B.trigger('evo_refresh_elements',[ send_data ]);
});
},
schedule_view(){
EVO.E.B.on('evo_init_ajax_success_each_cal',function(event, data, i, v, CAL){
$('body').find('.ajde_evcal_calendar.evoSV').each(function(){
EVO.Tools.evosv_populate($(this));
});
})
.on('evo_main_ajax_before_fnc', function(event, CAL,  ajaxtype, data_arg){
SC=data_arg.shortcode;
if(SC.calendar_type=='schedule'){
CAL.find('#evcal_list').removeClass('evo_hide').show();
}}).on('evo_main_ajax_success', function(event, CAL,  ajaxtype, data , data_arg){
SC=data_arg.shortcode;
if(SC.calendar_type=='schedule'){
CAL.find('#evcal_list').addClass('evo_hide').hide();
}}).on('evo_main_ajax_complete', function(event, CAL,  ajaxtype, data , data_arg){
SC=data_arg.shortcode;
if(SC.calendar_type=='schedule'){
EVO.Tools.evosv_populate(CAL);
}})
.on('evo_vSW_clicked_before_ajax',function(event, O, CAL, DD, reload_cal_data){
if(!(O.hasClass('evosv'))) return;
var SC=CAL.evo_shortcode_data();
CAL.evo_update_cal_sc({F:'calendar_type', V: 'schedule'});
CAL.evo_update_cal_sc({F:'fixed_day', V: SC.fixed_day });
})
.on('evo_vSW_clicked',function(event, OBJ, CAL, DD, reload_cal_data){
if(!(OBJ.hasClass('evosv'))) return;
CAL.evo_update_cal_sc({F:'calendar_type', V: 'schedule'});
})
.on('evo_vSW_clicked_noajax',function(event, OBJ, CAL, DD, reload_cal_data){
if(!(OBJ.hasClass('evosv'))) return;
EVO.Tools.evosv_populate(CAL);
})
.on('click','.evosv_items',function(event, elm){
O=$(this);
CAL=O.closest('.ajde_evcal_calendar');
var e_cl='event_'+O.data('id');
const clicked_event_uxval=O.data('uxval');
if(clicked_event_uxval=='1'){
CAL.find('.'+e_cl).find('.desc_trig').data('ux_val', 3);
}
CAL.find('.'+e_cl).find('.desc_trig').trigger('click');
});
},
Interactions:{
init(){
const { B }=EVO.E;
},
},
Search:{
init(){
const { B }=EVO.E;
B.on('click.evoSearch', '.evo_do_search', (event)=> {
EVO.Tools.do_search_box($(event.target));
});
B.on('keypress.evoSearch', '.evo_search_field', (ev)=> {
if((ev.keyCode||ev.which)===13){
EVO.Tools.do_search_box($(ev.target).siblings('.evo_do_search'));
}});
B.on('keypress.evoSearch', '.evo_search_bar_in_field', (ev)=> {
if((ev.keyCode||ev.which)===13){
EVO.Tools.search_within_calendar($(ev.target));
}});
B.on('click', '.evosr_search_clear_btn', function(e){
e.preventDefault(); EVO.Tools.reset_search($(this).siblings('input'), $(this));
});
B.on('evo_main_ajax_complete', function(e, CAL, ajaxtype, responseJSON, data){
if(ajaxtype==='search'&&data.shortcode['s']){
CAL.find('.evosr_search_clear_btn').addClass('show');
}});
B.on({
'click': function(){ EVO.Tools.search_within_calendar($(this).siblings('input')); },
'keyup': function(e){
const $input=$(this), $clearBtn=$input.siblings('.evosr_search_clear_btn');
if(e.which===27){ e.preventDefault(); EVO.Tools.reset_search($input, $clearBtn); return; }
$clearBtn.toggleClass('show', $input.val().trim()!=='');
}}, '.evo_search_bar_in_field, .evosr_search_btn');
}},
Elements_Interactions:{
init(){
const { B }=EVO.E;
B.on('click','.evo_qty_change', function(event){
var OBJ=$(this);
var QTY=oQTY=parseInt(OBJ.siblings('em').html());
var MAX=OBJ.siblings('input').attr('max');
var BOX=OBJ.closest('.evo_purchase_box');
var pfd=BOX.find('.evo_purchase_box_data').data('pfd');
(OBJ.hasClass('plu'))?  QTY++: QTY--;
QTY=(QTY==0)? 1: QTY;
QTY=(MAX!=''&&QTY > MAX)? MAX: QTY;
var sin_price=OBJ.parent().data('p');
new_price=sin_price * QTY;
new_price=EVO.Tools.get_format_price(new_price, pfd);
BOX.find('.total .value').html(new_price);
OBJ.siblings('em').html(QTY);
OBJ.siblings('input').val(QTY);
B.trigger('evo_qty_changed',[QTY,oQTY, new_price,OBJ ]);
});
}},
Virtual_Events:{
init(){
const { B }=EVO.E;
this.jitsi();
B.on('click','.evo_vir_signin_btn',function(){
let extra_data={};
extra_data['signin']='y';
extra_data['refresh_main']='y';
extra_data['loader']=true;
extra_data['loader_class']='evo_vir_main_content';
B.trigger('evo_refresh_designated_elm',[ $(this) , 'evo_vir_data',extra_data]);
});
},
jitsi(mod_refresh){
const { B }=EVO.E;
const domain='meet.jit.si';
let api=[];
B.find('.evo-jitsi-wrapper').each(function(index, element){
const O=$(this);
const eventO=O.closest('.eventon_list_event');
if(mod_refresh!=''&&mod_refresh=='mod_refresh_no'&&O.hasClass('mod')) return;
const roomName=$(element).data('n');
const width=$(element).data('width');
const height=$(element).data('height');
const audioMuted=$(element).data('audiomute');
const videoMuted=$(element).data('videomute');
const screenSharing=$(element).data('screen');
const myOverwrite =
{
'TOOLBAR_BUTTONS': $(element).data('d'),
"DEFAULT_BACKGROUND": '#494a4e',
'MOBILE_APP_PROMO': false,
'SETTINGS_SECTIONS':['devices', 'language', 'profile', 'calendar'],
};
const options={
roomName,
width,
height,
parentNode: element,
configOverwrite: {
startWithAudioMuted: audioMuted,
startWithVideoMuted: videoMuted,
startScreenSharing: false,
disableInviteFunctions: false,
},
interfaceConfigOverwrite: myOverwrite,
};
api=new JitsiMeetExternalAPI(domain, options);
api.addEventListener('participantRoleChanged', function(event){
if(event.role==="moderator"){
this._record_moderator_join('yes', eventO.data('event_id'), eventO.data('ri'));
}
const pp=jQuery(element).data('p');
if(event.role==="moderator"&&pp!='__'){
ppp=pp.replace('_','');
api.executeCommand ('password', ppp);
}});
api.addEventListener('videoConferenceLeft', function(event){
if(eventO.find('.evo_vir_data').data('ismod')=='y'){
this._record_moderator_join('no', eventO.data('event_id'), eventO.data('ri'));
O.siblings('.evo_vir_mod_left').show();
O.hide();
}});
});
},
_record_moderator_join(joined, eid, ri){
var data_arg={
'action': 'eventon_record_mod_joined',
'eid': eid,
'ri': ri,
'joined': joined,
'nonce': evo_general_params.n,
};
$.ajax({
beforeSend: function(){},
type: 'POST',url: ajax_url,
data: data_arg,dataType:'json',
success:function(data){	}});
}},
ajax_triggers(){
const { B }=EVO.E;
B.on('evo_before_trig_ajax',function(event, obj){
if(!obj.hasClass('evo_trig_vir_end')) return;
var new_ajax_data=$(document).data('evo_data');
new_ajax_data['fnct']='mark_event_ended';
$(document).data('evo_data', new_ajax_data);
})
.on('evo_beforesend_trig_ajax',function(event, obj, new_ajax_data){
if(!obj.hasClass('evo_trig_vir_end')) return;
obj.closest('.evo_vir_mod_box').addClass('evoloading');
})
.on('evo_success_trig_ajax',function(event, obj, new_ajax_data, return_data){
if(!obj.hasClass('evo_trig_vir_end')) return;
if(!('_vir_ended' in return_data)) return;
extra_data={};
extra_data['refresh_main']='yy';
extra_data['loader']=true;
extra_data['loader_class']='evo_vir_main_content';
B.trigger('evo_refresh_designated_elm',[ obj , 'evo_vir_data',extra_data]);
})
.on('evo_complete_trig_ajax',function(event, obj, new_ajax_data){
if(!obj.hasClass('evo_trig_vir_end')) return;
obj.closest('.evo_vir_mod_box').removeClass('evoloading');
});
},
Tools:{
init(){
const { B }=EVO.E;
B.on('evo_ajax_beforesend_evo_get_search_results', (event, OO, el)=> {
$(el).find('.evo_search_results_count').hide();
$(el).addClass('searching');
}).on('evo_ajax_complete_evo_get_search_results', (event, OO, el)=> {
$(el).removeClass('searching');
}).on('evo_ajax_success_evo_get_search_results', (event, OO, data, el)=> {
$(el).find('.evo_search_results').html(data.content);
if($(el).find('.no_events').length===0){
const Events=$(el).find('.eventon_list_event').length;
$(el).find('.evo_search_results_count span').html(Events);
$(el).find('.evo_search_results_count').fadeIn();
}});
},
do_search_box(OBJ){
const { B }=EVO.E;
const SearchVal=OBJ.closest('.evosr_search_box').find('input').val();
const Evosearch=OBJ.closest('.EVOSR_section');
OBJ.closest('.evo_search_entry').find('.evosr_msg').toggle(!SearchVal);
if(!SearchVal) return false;
var ajax_results=Evosearch.evo_admin_get_ajax({
'ajaxdata': {
search: 		SearchVal,
shortcode:  	Evosearch.find('span.data').data('sc'),
nonce: 			evo_general_params.n
},
ajax_type:'endpoint',
ajax_action:'eventon_search_evo_events',
uid:'evo_get_search_results',
end: 'client',
});
},
search_within_calendar($input){
const ev_cal=$input.closest('.ajde_evcal_calendar');
ev_cal.evo_update_cal_sc({ F: 'show_limit_paged', V: '1' });
ev_cal.evo_update_cal_sc({ F: 's', V: $input.val() });
run_cal_ajax(ev_cal.attr('id'), 'none', 'search');
return false;
},
reset_search($input, $clearBtn){
const ev_cal=$input.closest('.ajde_evcal_calendar');
ev_cal.evo_update_cal_sc({ F: 's', V: '' });
run_cal_ajax(ev_cal.attr('id'), 'none', 'search');
$input.val('');
$clearBtn.removeClass('show');
},
get_format_price(price, data){
PF=data;
totalPrice=price.toFixed(PF.numDec);
htmlPrice=totalPrice.toString().replace('.', PF.decSep);
if(PF.thoSep.length > 0){
htmlPrice=EVO.Tools._addThousandSep(htmlPrice, PF.thoSep);
}
if(PF.curPos=='right'){
htmlPrice=htmlPrice + PF.currencySymbol;
}
else if(PF.curPos=='right_space'){
htmlPrice=htmlPrice + ' ' + PF.currencySymbol;
}
else if(PF.curPos=='left_space'){
htmlPrice=PF.currencySymbol + ' ' + htmlPrice;
}else{
htmlPrice=PF.currencySymbol + htmlPrice;
}
return htmlPrice;
},
_addThousandSep(n, thoSep){
var rx=/(\d+)(\d{3})/;
return String(n).replace(/^\d+/, function(w){
while(rx.test(w)){
w=w.replace(rx, '$1'+thoSep+'$2');
}
return w;
});
},
evo_apply_refresh_content(data){
const { B }=EVO.E;
if(!('evo_data' in data)) return;
$.each(data.evo_data, function(eclass, boxes){
var vir_data_vals=false;
if('evo_vir_data' in boxes) vir_data_vals=boxes.evo_vir_data.data;
B.find('.'+eclass).each(function(){
const event_elm=$(this);
$.each(boxes, (boxclass, boxdata)=> {
if(boxdata=='') return;
if(!boxdata.html||event_elm.find('.' + boxclass).length <=0) return;
event_elm.find('.' + boxclass).html(boxdata.html);
});
if(vir_data_vals){
if(vir_data_vals&&('vir_type' in vir_data_vals)
&& vir_data_vals.vir_type=='jitsi'
&& ('evo_vir_main_content' in boxes)
&& ('html' in boxes.evo_vir_main_content)
&& boxes.evo_vir_main_content.html!=''
){
EVO.Virtual_Events.jitsi('mod_refresh_no');
}
$.each(boxes, function(boxclass, boxdata){
if(boxdata.data==''||boxdata.data===undefined) return;
if(boxdata!==undefined&&vir_data_vals.vir_type=='jitsi'&&vir_data_vals.mod_joined=='left'){
boxdata.data['refresh_main']='yy';
}
event_elm.find('.'+boxclass).data(boxdata.data);
});
}});
});
},
build_elm_refresh_data(elm , extra_data){
const dataObj={};
const event=$(elm).closest('.eventon_list_event');
const ekey=event.data('event_id') + '_' + parseInt(event.data('ri'));
dataObj[ekey]={};
const key2=elm.data('key');
dataObj[ekey][key2]=elm.data();
if(elm.data('check_awaitmod')){
if((event.find('.evo_vir_jitsi_waitmod').length > 0)) dataObj[ekey][key2]['refresh_main']='yy';
if(event.find('.evo-jitsi-wrapper').length > 0&&dataObj[ekey][key2]['mod_joined']!=='left')
dataObj[ekey][key2]['refresh_main']='';
}
if(extra_data&&extra_data!==undefined){
$.each(extra_data, (index, val)=> {
dataObj[ekey][key2][index]=val;
});
}
return dataObj;
},
evosv_populate(CAL){
var SC=CAL.evo_shortcode_data();
OD=CAL.evo_get_OD();
var cal_events=CAL.find('.eventon_list_event');
days_in_month=CAL.evo_day_in_month({M: SC.fixed_month, Y: SC.fixed_year});
time_format=CAL.evo_get_global({S1:'cal_def',S2:'wp_time_format'});
_txt=CAL.evo_get_txt({V:'no_events'});
_txt2=CAL.evo_get_txt({V:'until'});
_txt3=CAL.evo_get_txt({V:'from'});
_txt4=CAL.evo_get_txt({V:'all_day'});
CAL.find('#evcal_list').addClass('evo_hide');
var has_events=false;
var html='';
var template_data={};
var processed_ids={};
var SU=parseInt(SC.focus_start_date_range);	var EU='';
var M=moment.unix(SU).tz(OD.cal_tz);
for(var x=1; x<=days_in_month; x++){
var month_name=CAL.evo_get_dms_vals({ V: (M.get('month') +1), type:'m3'});
var day_name=CAL.evo_get_dms_vals({ V: M.day(), type:'d3'});
SU=M.unix();	M.endOf('day');
EU=M.unix();	M.startOf('day');
var events={};
cal_events.each(function(index, elm){
ED=$(elm).evo_cal_get_basic_eventdata();
if(!ED) return;
processed_ids[ED.uID]=ED.uID;
ESU=ED.unix_start; EEU=ED.unix_end;
var inrange=CAL.evo_is_in_range({
'S': SU,	'E': EU,	'start': ESU,	'end':EEU
});
if(!inrange) return;
has_events=true;
m=moment.unix(ESU).tz(OD.cal_tz);
me=moment.unix(end).tz(OD.cal_tz);
var all_day=$(elm).find('a.desc_trig').hasClass('allday') ? true: false;
if(all_day){
ED['t']=_txt4;
}else{
if(ESU <=SU){
if(EEU >=EU) ED['t']=_txt4;
if(EEU < EU) ED['t']=_txt2+' ' + me.format(time_format);
}else if(ESU > SU){
if(EEU >=EU)  ED['t']=_txt3+' '+ m.format(time_format);
if(EEU < EU) ED['t']=m.format(time_format) +' - '+ me.format(time_format);
}}
if(ED.hide_et=='y')		ED['t']=m.format(time_format);
events[index]=ED;
});
if(events&&Object.keys(events).length > 0){
template_data[ x ]={};
template_data[ x ]['date']='<b>' + M.get('date')+'</b> '+ month_name+' '+ day_name;
template_data[ x ]['d']=M.format('YYYY-M-D');
template_data[ x ]['SU']=SU;
template_data[ x ]['events']={}
$.each(events, function(index, item){
location_data=organizer_data=event_tags='';
if(SC.show_location=='yes'&&'location' in item){
location_data="<div class='evosv_subdata evosv_location'><i class='fa fa-location-pin marr5'></i>" +item.location+"</div>";
}
if(SC.show_organizer=='yes'&&'organizer' in item){
organizer_data="<div class='evosv_subdata evosv_org'>" +item.organizer+"</div>";
}
if(SC.show_tags=='yes'&&'event_tags' in item){
event_tags="<div class='evosv_subdata evosv_tags'>";
$.each(item.event_tags, function(index, val){
event_tags +="<span class='evosv_tag " + index +"'>" + val+"</span>";
});
event_tags +="</div>";
}
template_data[ x ]['events'][ item.uID ]={
'time': item.t,
'ux_val': item.ux_val,
'title': item.event_title,
'color':item.hex_color,
'tag': event_tags,
'loc': location_data,
'org': organizer_data,
'i': item
}});
}
M.add(1, 'd');
}
var html_="<div class='evosv_grid evoADDS'>";
if(!has_events){
no_event_content=CAL.evo_get_global({S1: 'html', S2:'no_events'});
html_ +="<div class='date_row'><div class='row no_events evosv'>"+no_event_content+"</div></div>";
}else{
html_ +=CAL.evo_HB_process_template({
TD:template_data, part:'evosv_grid'
});
}
html_ +='</div>';
if(CAL.find('.evosv_grid').length > 0){
CAL.find('.evosv_grid').replaceWith(html_);
}else{
ELM=CAL.find('#eventon_loadbar_section');
ELM.after(html_);
}},
get_ajax_url(action){
var ajax_type='endpoint';
if('ajax_method' in evo_general_params) ajax_type=evo_general_params.ajax_method;
return EVO.E.B.evo_get_ajax_url({a:action, type: 	ajax_type });
},
}};
EVO.init();
function cal_resets(calOBJ){
calargs=$(calOBJ).find('.cal_arguments');
calargs.attr('data-show_limit_paged', 1);
calOBJ.evo_update_cal_sc({
F:'show_limit_paged',V:'1'
});
}
if($('body').find('.evo_layout_changer').length>0){
$('body').find('.evo_layout_changer').each(function(item){
if($(this).parent().hasClass('boxy')){
$(this).find('.fa-th-large').addClass('on');
}else{
$(this).find('.fa-reorder').addClass('on');
}});
$('.evo_layout_changer').on('click','i',function(){
const CAL=$(this).closest('.ajde_evcal_calendar');
TYPE=$(this).data('type');
$(this).parent().find('i').removeClass('on');
$(this).addClass('on');
if(TYPE=='row'){
CAL.attr('class','ajde_evcal_calendar');
CAL.find('.eventon_list_event').each(function(){
$(this).find('.desc_trig').css('background-color',  '');
$(this).find('.desc_trig_outter').css('background-color',  '');
});
}else if(TYPE=='bar'){
CAL.attr('class','ajde_evcal_calendar  box_2 sev cev');
CAL.find('.eventon_list_event').each(function(){
const color=$(this).data('colr');
$(this).find('.desc_trig').css('background-color',  color);
});
}else{
CAL.find('.eventon_list_event').each(function(){
const color=$(this).data('colr');
$(this).find('.desc_trig_outter').css('background-color',  color);
});
CAL.attr('class','ajde_evcal_calendar boxy boxstyle0 box_2');
}});
}
$('body').on('click', '.evo_sort_option',function(){
O=$(this);
var CAL=O.closest('.ajde_evcal_calendar');
var sort_by=O.data('val');
CAL.evo_update_cal_sc({F:'sort_by',V:sort_by});
O.parent().find('p').removeClass('select');
O.addClass('select');
run_cal_ajax(CAL.attr('id'),'none','sorting');
});
BODY.on('clicked_on_page',function(ev, obj, ee){
if(!(obj.hasClass('eventon_filter')) &&
!(obj.hasClass('filtering_set_val')) &&
!(obj.hasClass('evo_filter_val')) &&
!(obj.hasClass('evofp_filter_search_i')) &&
obj.parents('.filtering_set_val').length==0 
){
BODY.find('.evo_filter_menu').html('');
BODY.find('.evo_filter_tax_box.vis').removeClass('vis');
}});
$.fn.evo_cal_filtering=function(O){
var opt=$.extend({}, O);
var el=this;
const sortbox=el.find('.eventon_sorting_section'),
filter_container=sortbox.find('.evo_filter_container_in'),
filter_line=sortbox.find('.eventon_filter_line'),
fmenu=sortbox.find('.evo_filter_menu'),
all_cal_filter_data=el.evo_get_filter_data(),
SC=el.evo_shortcode_data();
var tterms=[];
var init=function(){
if(SC==''||SC===null) return;
if(el.hasClass('filters_go'))	return;
el.addClass('filters_go');
draw_filter_bar();
filter_actions();
run_filter_nav_check();
}
var draw_filter_bar=function(){
BODY.trigger('evo_filter_before_draw', [ el ]);
html='';
$.each(all_cal_filter_data , function(index, value){
if(SC&&'fast_filter' in SC&&SC.fast_filter=='yes'&&SC.ff_tax!=''&&SC.ff_tax!==undefined){
__t=SC.ff_tax.split(',');
if(__t.includes(index) ) return;
}
html +="<div class='eventon_filter evo_filter_tax_box evo_hideshow_st "+index+"' data-tax='"+ value.__tax +"' data-filter_type='"+ value.__filter_type +"'>";
html +="<div class='eventon_filter_selection'>";
html +="<p class='filtering_set_val'><i class='fa fa-check'></i> "+ value.__name +"<em class='fa fa-caret-down'></em></p>";
html +="</div>";
html +="</div>";
});
filter_line.html(html);
BODY.trigger('evo_filter_drawn', [ el ]);
}
var filter_actions=function(){
el.off('click', '.evo-filter-btn');
el.on('click','.evo-filter-btn',function(){
const CAL=$(this).closest('.ajde_evcal_calendar');
BODY.trigger('evo_filter_btn_trig', [ CAL , O ]);
if(CAL.hasClass('fp_lb')) return;
if(!($(this).hasClass('vis')) ){
sortbox.addClass('vis');
run_filter_nav_check();
}else{
sortbox.removeClass('vis');
}});
BODY.on('evo_cal_header_btn_clicked',function(event, O){
if(O.hasClass('evo-sort-btn')||O.hasClass('evo-search')){
const CAL=O.closest('.ajde_evcal_calendar');
CAL.find('.eventon_sorting_section').removeClass('vis');
}});
el.on('click','.filtering_set_val',function(){
O=$(this);
const filterbox=O.closest('.evo_filter_tax_box'),
filter_tax=filterbox.data('tax');
selected_terms=el.evo_cal_get_filter_sub_data(filter_tax , 'tterms');
el.find('.eventon_sort_line').hide();
if(filterbox.hasClass('vis')){
filterbox.removeClass('vis');
close_filter_menu();
return;
}
if(fmenu.data('tax')==filter_tax){
filterbox.removeClass('vis');
close_filter_menu();
return;
}else{
sortbox.find('.filtering_set_val').removeClass('show');
sortbox.find('.evo_filter_tax_box').removeClass('vis');
filterbox.addClass('vis');
}
var filter_item_data=all_cal_filter_data[ filter_tax ].__list;
var __menu_html='<div class="evo_filter_inside evo_filter_menu_in" data-tax="'+filter_tax+'"><div class="eventon_filter_dropdown">';
var sorted_data=Object.values(filter_item_data);
sorted_data.sort(function(a, b){
return a[1].localeCompare(b[1], 'en', {
numeric: true,
sensitivity: 'base'
});
});
var menuInside='';
var AllHtml='';
$.each(sorted_data, function (index, val){
var icon_html='';
var _class=filter_tax+'_'+ val[0] + ' '+ val[0];
if(val[3]!==undefined&&val[3]!=''&&val[3]=='n') _class +=' np';
if(selected_terms=='all')  _class +=' select';
if(selected_terms.includes(val[0]) )  _class +=' select';
if(val[2]!=''&&val[2]!==undefined){
_class +=' has_icon'; icon_html=val[2];
}
var _tax_color='';
if(val[4]!=''&&val[4]!==undefined){
_tax_color=`style='background-color:#${val[4]};'`;
}
const itemHTML=`<p class="evo_filter_val ${_class}" data-id="${val[0]}" ${_tax_color}>${icon_html} ${val[1]}</p>`;
if(val[0]=='all'){
AllHtml=itemHTML;
}else{
menuInside +=itemHTML;
}});
__menu_html +=AllHtml + menuInside +"</div></div>";
BODY.trigger('evo_filter_menu_html_ready', [ el , __menu_html , O , filterbox, filter_tax]);
if(el.hasClass('fp_side')) return;
const scrolled_width=filter_container.scrollLeft();
fmenu.html(__menu_html);
BODY.trigger('evo_filter_menu_built', [ el , fmenu , filter_tax ]);
__left_margin=filterbox.position().left + 10 - scrolled_width;
__menu_width=fmenu.find('.evo_filter_inside').width();
__cal_left_margin=el.position().left;
if(__left_margin + __menu_width + __cal_left_margin > $(window).width()){
if(( __left_margin + __menu_width) > el.width()){
new_left=el.width() - __menu_width - 10;
}else{
new_left=(el.width() - __menu_width) / 2;
}
fmenu.css('left', new_left);
}else{
fmenu.css('left', __left_margin);
}});
el.on('click','p.filtering_static_val',function(){
BODY.trigger('evo_filter_static_clicked', [ el , $(this) ]);
});
el.on('click','p.evo_filter_val',function (){
var O=$(this);
const filter_menuIN=O.closest('.evo_filter_inside'),
filter_tax=filter_menuIN.data('tax'),
filterbox=sortbox.find('.evo_filter_tax_box.'+ filter_tax),
all_terms_obj=filter_menuIN.find('p'),
new_term_id=O.data('id'),
old_terms=el.evo_cal_get_filter_sub_data(filter_tax , 'terms')
;
var tterms=el.evo_cal_get_filter_sub_data(filter_tax , 'nterms');
var new_terms=[];
if(SC.filter_type=='select'){
if(new_term_id=='all'){
if(O.hasClass('select')){
all_terms_obj.removeClass('select');
}else{
all_terms_obj.addClass('select');
new_terms.push('all');
}}else{
filter_menuIN.find('p.all').removeClass('select');
O.toggleClass('select');
var unselect_count=0;
all_terms_obj.each(function(){
if($(this).hasClass('select')){
new_terms.push($(this).data('id'))
}else{
if(!$(this).hasClass('all')) unselect_count++;
}});
if(unselect_count==0){
filter_menuIN.find('p.all').addClass('select');
new_terms.push('all');
}
if(new_terms.length==0&&O.parent().find('p.all').length==0)
new_terms.push('all');
}}else{
if(new_term_id=='all'){
if(O.hasClass('select')){
new_terms.push('NOT-all');
all_terms_obj.removeClass('select');
}else{
all_terms_obj.addClass('select');
new_terms.push(new_term_id);
}}else{
all_terms_obj.removeClass('select');
O.addClass('select');
new_terms.push(new_term_id);
}
update_filter_data(filter_tax, new_terms);
if(tterms==new_terms){
close_filter_menu();
}else{
cal_resets(el);
el.evo_update_sc_from_filters();
run_cal_ajax(el.attr('id') ,'none','filering');
close_filter_menu();
O.removeClass('show');
}
close_filter_menu();
filterbox.removeClass('vis');
}
if(compare_terms(new_terms, tterms)){
filterbox.removeClass('chg');
}else{
filterbox.addClass('chg');
}
if(compare_terms(old_terms, new_terms)){
filterbox.removeClass('set');
}else{
filterbox.addClass('set');
}
var chg_filters=sortbox.find('.evo_filter_tax_box.chg').length;
var set_count=sortbox.find('.evo_filter_tax_box.set').length;
if(SC.filter_type=='select')
(chg_filters > 0) ? show_apply_btns():hide_apply_btns();
if(!(el.hasClass('flhi')) ){
const filter_btn=el.find('.evo-filter-btn');
if(set_count > 0){
filter_btn.find('em').html(set_count).addClass('o');
}else{
filter_btn.find('em').removeClass('o');
}}
update_filter_data(filter_tax, new_terms , 'tterms');
run_filter_nav_check();
});
el.on('click','.evo_filter_submit',function(){
el.evo_filters_update_from_temp(filter_line, el);
cal_resets(el);
close_filter_menu();
sortbox.find('.filtering_set_val').removeClass('show');
el.evo_update_sc_from_filters();
run_cal_ajax(el.attr('id'),'none','filering');
run_filter_nav_check();
});
el.on('click','.evo_filter_clear',function(){
el.find('.evo_filter_tax_box').each(function(){
const O=$(this),
tax=O.data('tax'),
terms=O.data('terms');
O.removeClass('set');
O.find('.filtering_set_val').removeClass('set show');
el.find('.evo-filter-btn em').removeClass('o');
close_filter_menu();
});
$.each(all_cal_filter_data, function(tax, tdata){
update_filter_data(tax, tdata.terms);
});
hide_apply_btns();
el.evo_update_sc_from_filters();
run_cal_ajax(el.attr('id'),'none','filering');
run_filter_nav_check();
});
el.on('click','.evo_filter_nav',function(){
O=$(this);
_filter_bar=O.closest('.evo_filter_bar');
_filter_container=_filter_bar.find('.evo_filter_container_in');
_filter_line_width=_filter_bar.find('.eventon_filter_line')[0].scrollWidth;
_filter_container_width=parseInt(_filter_container.width()) + 0;
_leftPos=_filter_container.scrollLeft();
_scrollable_legth=_filter_line_width - _filter_container_width;
const scroll_length=_filter_container_width /2;
if(O.hasClass('evo_filter_r')){
_filter_container.animate({scrollLeft:_leftPos + scroll_length},200);
_filter_bar.find('.evo_filter_l').addClass('vis');
}else{
sleft=(_leftPos - scroll_length < scroll_length) ? 0:_leftPos - scroll_length;
_filter_container.animate({scrollLeft: sleft },200);
}
close_filter_menu();
setTimeout(function(){
var _leftPos=_filter_container.scrollLeft();
if(_leftPos < 10){
_filter_bar.find('.evo_filter_l').removeClass('vis');
_filter_bar.find('.evo_filter_r').addClass('vis');
}
if(_leftPos >(_scrollable_legth - 5) ){
_filter_bar.find('.evo_filter_r').removeClass('vis');
}},200);
});
$(window).on('resize',function(){
run_filter_nav_check();
});
}
var compare_terms=function(a, b){
if(a===b) return true;
if(a==null||b==null) return false;
if(a.length!==b.length) return false;
for (var i=0; i < a.length; ++i){
if(a[i]!==b[i]) return false;
}
return true;
}
var close_filter_menu=function(){
fmenu.html('').data('tax','');
}
var show_apply_btns=function(){
sortbox.find('.evo_filter_aply_btns').addClass('vis');
}
var hide_apply_btns=function(){
sortbox.find('.evo_filter_aply_btns').removeClass('vis');
}
var update_filter_data=function(tax, new_val, key){
el.evo_cal_update_filter_data(tax , new_val , key);
}
var run_filter_nav_check=function(){
$.each(el.find('.evo_filter_bar') , function(event){
_filter_bar=$(this);
_filter_container=_filter_bar.find('.evo_filter_container_in');
_filter_line_width=_filter_bar.find('.eventon_filter_line')[0].scrollWidth;
_filter_container_width=parseInt(_filter_container.width()) + 3;
var leftPos=_filter_container.scrollLeft();
if(_filter_line_width > _filter_container_width){
if(( _filter_container_width + leftPos) < _filter_line_width)
_filter_bar.find('.evo_filter_r').addClass('vis');
if(leftPos > 0){
_filter_bar.find('.evo_filter_l').addClass('vis');
}else{
_filter_bar.find('.evo_filter_r').addClass('vis');
}}else{
_filter_bar.find('.evo_filter_l').removeClass('vis');
_filter_bar.find('.evo_filter_r').removeClass('vis');
}});
}
init();
}
$.fn.evo_filters_update_from_temp=function(filter_line, cal){
filter_line.find('.evo_filter_tax_box').each(function(){
var taxonomy=$(this).data('tax');
const tterms=cal.evo_cal_get_filter_sub_data(taxonomy , 'tterms');
cal.evo_cal_update_filter_data(taxonomy , tterms, 'nterms');
$(this).removeClass('chg');
});
}
function run_cal_ajax(cal_id, direction, ajaxtype){
var CAL=ev_cal=$('#'+cal_id);
if(CAL.attr('data-runajax')!='0'){
const EVENTS_LIST=CAL.find('.eventon_events_list');
const $showMoreBtn=EVENTS_LIST.find('.evoShow_more_events');
var cat=CAL.find('.evcal_sort').attr('cat');
if(ajaxtype=='switchmonth'){
CAL.find('.cal_arguments').attr('data-show_limit_paged',1);
CAL.evo_update_cal_sc({F:'show_limit_paged', V: '1'});
}
SC=CAL.evo_cal_functions({action:'load_shortcodes'});
$('body').trigger('evo_main_ajax_before', [CAL, ajaxtype, direction, SC]);
var data_arg={
direction: 		direction,
shortcode: 		SC,
ajaxtype: 		ajaxtype,
nonce: 			evo_general_params.n,
nonceX: 		evo_general_params.nonce
};
$.ajax({
beforeSend: function(xhr){
xhr.setRequestHeader('X-WP-Nonce', evo_general_params.nonce);
CAL.addClass('evo_loading');
if(ajaxtype=='paged'){
const currentContent=$showMoreBtn.html();
$showMoreBtn.data('txt',currentContent);
if(SC.tiles=='yes'){
$showMoreBtn.addClass('evoloading');
$showMoreBtn.find('span').html('');
}else{
$showMoreBtn.find('span').addClass('evobtn_loader full');
}}else{
html=evo_general_params.html.preload_events;
if(SC.tiles=='yes') html=evo_general_params.html.preload_event_tiles;
EVENTS_LIST.html(html);
}
if(CAL.hasClass('nav_from_foot')){
scrolltop=CAL.offset().top;
$('html, body').animate({	scrollTop: scrolltop	},20);
}
$('body').trigger('evo_main_ajax_before_fnc',[CAL, ajaxtype, data_arg ]);
},
type: 'POST', url: get_ajax_url('eventon_get_events'),data: data_arg,dataType:'json',
success:function(data){
if(!data) return false;
if(ajaxtype=='paged'){
$showMoreBtn.remove();
EVENTS_LIST.find('.clear').remove();
EVENTS_LIST.append(data.html + "<div class='clear'></div>");
var events_in_list=EVENTS_LIST.find('.eventon_list_event').length;
if('total_events' in data&&data.total_events==events_in_list){
$showMoreBtn.hide();
}
var T={};
EVENTS_LIST.find('.evcal_month_line').each(function(){
d=$(this).data('d');
if(T[d])
$(this).remove();
else
T[d]=true;
});
var T={};
EVENTS_LIST.find('.sep_month_events').each(function(){
d=$(this).data('d');
if(T[d]){
var H=$(this).html();
EVENTS_LIST.find('.sep_month_events[data-d="'+d+'"]').append(H);
$(this).remove();
}else{T[d]=true;}});
}else{
EVENTS_LIST.html(data.html);
}
CAL.find('.evo_month_title').html(data.cal_month_title);
CAL.evo_cal_functions({action:'update_shortcodes',SC: data.SC});
CAL.evo_cal_functions({action:'update_json',json: data.json});
CAL.evo_calendar({
SC: data.SC,
json: data.json
});
$('body').trigger('calendar_month_changed',[CAL, data]);
$('body').trigger('evo_main_ajax_success', [CAL, ajaxtype, data, data_arg]);
},complete:function(data){
if(! EVENTS_LIST.hasClass('evo_hide')) EVENTS_LIST.delay(300).slideDown('slow');
if(CAL.hasClass('nav_from_foot')){
setTimeout(function(){
scrolltop=CAL.offset().top;
$('html, body').animate({	scrollTop: scrolltop	},20);
CAL.removeClass('nav_from_foot');
},302);
}
$('body').trigger('evo_main_ajax_complete', [CAL, ajaxtype, data.responseJSON , data_arg]);
CAL.removeClass('evo_loading');
}});
}}
$('body').on('evo_run_cal_ajax',function(event,cal_id, direction, ajaxtype){
run_cal_ajax(cal_id, direction, ajaxtype);
});
function ajax_post_content(sortby, cal_id, direction, ajaxtype){
run_cal_ajax(cal_id, direction, ajaxtype);
}
$('body').on('evo_load_single_event_content', function(event, eid, obj){
var ajaxdataa={};
ajaxdataa['eid']=eid;
ajaxdataa['nonce']=the_ajax_script.postnonce;
if(obj.data('j')){
$.each(obj.data('j'), function(index,val){
ajaxdataa[ index]=val;
});
}
$.ajax({
beforeSend: function(){ 	},
url:	get_ajax_url('eventon_load_event_content'),
data: 	ajaxdataa,	dataType:'json', type: 	'POST',
success:function(data){
$('body').trigger('evo_single_event_content_loaded', [data, obj]);
},complete:function(){ 	}});
});
if(BODY.evo_is_mobile()){
if($('body').find('.fb.evo_ss').length!=0){
$('body').find('.fb.evo_ss').each(function(){
obj=$(this);
obj.attr({'href':'http://m.facebook.com/sharer.php?u='+obj.attr('data-url')});
});
}}
if($('body').find('.evo_sin_page').length>0){
$('.evo_sin_page').each(function(){
$('body').trigger('evo_load_single_event_content',[ $(this).data('eid'), $(this)]);
$(this).find('.desc_trig ').attr({'data-ux_val':'none'});
});
}
$('body').find('.eventon_single_event').each(function(){
var _this=$(this);
var CAL=_this.closest('.ajde_evcal_calendar');
var SC=CAL.evo_shortcode_data();
var evObj=CAL.find('.eventon_list_event');
if(SC.expanded=='yes'){
_this.find('.evcal_eventcard').show();
var idd=_this.find('.evcal_gmaps');
_this.find('.evcal_close').parent().css({'padding-right':0});
_this.find('.evcal_close').hide();
var obj=_this.find('.desc_trig');
_this.find('.evo_metarow_gmap').evo_load_gmap();
evObj.find('.event_description').addClass('open');
}else if(SC.uxval=='3'){
var obj=_this.find('.desc_trig');
obj.removeAttr('data-exlk').attr({'data-ux_val':'3'});
}
var ev_excerpt=CAL.find('.event_excerpt').html();
if(ev_excerpt!=''&&ev_excerpt!==undefined&&SC.excerpt=='yes'){
var appendation='<div class="event_excerpt_in">'+ev_excerpt+'</div>'
evObj.append(appendation);
}
var obj=evObj.find('.desc_trig');
var event_id=evObj.data('event_id');
$('body').trigger('evo_slidedown_eventcard_complete',[ event_id, obj]);
});
function get_ajax_url(action){
var ajax_type='endpoint';
if('ajax_method' in evo_general_params) ajax_type=evo_general_params.ajax_method;
return $('body').evo_get_ajax_url({a:action, type: 	ajax_type });
}
function handlebar_additional_arguments(){
Handlebars.registerHelper('ifE',function(v1, options){
return (v1!==undefined&&v1!=''&&v1)
? options.fn(this)
: options.inverse(this);
});
Handlebars.registerHelper('ifEQ',function(v1, v2, options){
return(v1==v2)? options.fn(this): options.inverse(this);
});
Handlebars.registerHelper('ifNEQ',function(v1, v2, options){
return(v1!=v2)? options.fn(this): options.inverse(this);
});
Handlebars.registerHelper('BUStxt',function(V, options){
if(!(V in BUS.txt)) return V;
return BUS.txt[V];
});
Handlebars.registerHelper('GetDMnames',function(V, U, options){
return BUS.dms[U][ V ];
});
Handlebars.registerHelper('forAdds',function(count, add_val, options){
O='';
for(x=1; x<=count; x++){	O +=add_val;	}
return O;
});
Handlebars.registerHelper('GetEvProp',function(EID, PROP, CALID){
EID=EID.split('-');
EV=$('#'+ CALID).find('.evo_cal_events').data('events');
var O='';
$.each(EV, function(i,d){
if(d.ID==EID[0]&&d.ri==EID[1]){
if(!(PROP in d.event_pmv)) return;
O=d.event_pmv[PROP][0];
}});
return O;
});
Handlebars.registerHelper('GetEvV',function(EID, PROP, CALID){
EID=EID.split('-');
EV=$('#'+ CALID).find('.evo_cal_events').data('events');
var O='';
$.each(EV, function(i,d){
if(d.ID==EID[0]&&d.ri==EID[1]){
O=d[PROP];
}});
return O;
});
Handlebars.registerHelper('COUNT',function(V){
return Object.keys(V).length;
});
Handlebars.registerHelper('CountlimitLess',function(AR, C,options){
var L=Object.keys(AR).length;
return(L < C)? options.inverse(this): options.fn(this);
});
Handlebars.registerHelper('ifCOND',function(v1, operator, v2, options){
return checkCondition(v1, operator, v2)
? options.fn(this)
: options.inverse(this);
});
Handlebars.registerHelper('toJSON', function(obj){
return new Handlebars.SafeString(JSON.stringify(obj));
});
Handlebars.registerHelper('Cal_def_check',function(V, options){
if(BUS.cal_def&&BUS.cal_def[V]) return options.fn(this);
return options.inverse(this);
});
Handlebars.registerHelper('TypeCheck',function(V, options){
if(options.type==V) return options.fn(this);
return options.inverse(this);
});
}
function checkCondition(v1, operator, v2){
switch(operator){
case '==':
return (v1==v2);
case '===':
return (v1===v2);
case '!==':
return (v1!==v2);
case '<':
return (v1 < v2);
case '<=':
return (v1 <=v2);
case '>':
return (v1 > v2);
case '>=':
return (v1 >=v2);
case '&&':
return (v1&&v2);
case '||':
return (v1||v2);
default:
return false;
}}
BODY.on('evo_open_lightbox',function(event, lb_class, content){
const LIGHTBOX=$('.evo_lightbox.'+lb_class).eq(0);
if(LIGHTBOX.is("visible")===true) return false;
if(content!=''){
LIGHTBOX.find('.evo_lightbox_body').html(content);
}
BODY.trigger('evolightbox_show', [ lb_class ]);
});
BODY.on('clicked_on_page', function(event, obj, ev){
if(obj.hasClass('evo_content_inin')){
closing_lightbox(obj.closest('.evo_lightbox'));
}});
BODY.on('click','.evolbclose', function(){
if($(this).hasClass('evolb_close_btn')) return;
LIGHTBOX=$(this).closest('.evo_lightbox');
closing_lightbox(LIGHTBOX);
});
function closing_lightbox(lightboxELM){
if(! lightboxELM.hasClass('show')) return false;
Close=(lightboxELM.parent().find('.evo_lightbox.show').length==1)? true: false;
lightboxELM.removeClass('show');
$('body').trigger('lightbox_before_event_closing', [lightboxELM]);
setTimeout(function(){
lightboxELM.find('.evo_lightbox_body').html('');
if(Close){
$('body').removeClass('evo_overflow');
$('html').removeClass('evo_overflow');
}
$('body').trigger('lightbox_event_closing', [lightboxELM]);
}, 100);
}
$('body').on('evolightbox_show',function(event, lb_class){
$('.evo_lightboxes').show();
$('body').addClass('evo_overflow');
$('html').addClass('evo_overflow');
$('body').trigger('evolightbox_opened',[ lb_class ]);
});
});
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
jQuery(document).ready(function($){
var JDATA={};
var submit_open=false;
function load_json_to_local(O){
JDATA=O.closest('.evo_metarow_rsvp').find('.evors_jdata').data('j');
}
$.fn.evors_form=function (opt){
var form=this;
const form_holder=form.closest('.evors_forms');
var formtype=form.find('input[name="formtype"]').val();
works={
reset_notifications: function(elm){
$('.evors_lightbox_body').removeClass('error');
$('.evolb_content').removeClass('error');
elm.removeClass('err');
$('.evors_lightbox_body').find('.notification').hide();
},
interaction: function(){
var ERROR=false;
form.on('change','input[name="count"]', function(){
var O=$(this);
works.reset_notifications(O);
CAP=JDATA.cap;
true_capacity=JDATA.true_cap;
PERCAP=JDATA.precap;
form=O.closest('.evors_submission_form');
const oldCount=O.data('oval');
const rsvp_type=form.find('input[name=rsvp_type]').val();
VAL=parseInt(O.val());
original_rsvp_cap=parseInt(O.attr('value'));
if(formtype=='update'){
if(CAP=='wl'){
if(VAL > original_rsvp_cap){
$(this).addClass('err');
works.show_msg('err9');
ERROR=true;
}}else{
if(VAL > original_rsvp_cap){
const increased_spaces=VAL - original_rsvp_cap;
if(increased_spaces > true_capacity){
$(this).addClass('err');
works.show_msg('err9');
ERROR=true;
}}
}}else{
if(VAL > parseInt(CAP)&&CAP!='na'){
$(this).addClass('err');
works.show_msg('err9','','', 2000);
ERROR=true;
O.val(CAP);
}
if(VAL > parseInt(PERCAP)&&PERCAP!='na'){
$(this).addClass('err');
works.show_msg('err10');
ERROR=true;
}}
if(!ERROR){
works.reset_error();
}
if(!ERROR){
var guestNames=form.find('.form_guest_names');
var maskField=`<input class="regular input" name="names[]" type="text" placeholder="${evors_ajax_script.text.guest_name}">`;
var inputHolder=guestNames.find('.form_guest_names_list');
if(VAL>1){
var ExistInputCount=inputHolder.find('input').length;
if((VAL - 1) > ExistInputCount){
var appender='';
for (var x=0; x < (VAL - 1 - ExistInputCount); x++){
appender +=maskField;
}
inputHolder.append(appender);
}else{
inputHolder.find('input').each(function(index){
if(index >=(VAL - 1)) $(this).remove();
});
}
guestNames.show();
}else{
guestNames.hide();
inputHolder.html(maskField);
}}
});
form.on('click', 'span.evors_choices', function(){
var OBJ=$(this);
var VAL=OBJ.data('val');
form.attr('class','evors_gen_form evors_submission_form  rsvp_'+VAL);
OBJ.siblings().removeClass('set');
OBJ.addClass('set');
OBJ.parent().siblings('input').val(VAL);
});
$('body').on('evo_plusminus_changed', function(e, NEWQTY, MAX, OBJ){
$(OBJ).siblings('input').trigger('change');
});
form.on('click','.evors_incard_close',function(){
$(this).closest('.evors_incard_form').hide();
$(this).closest('.evo_metarow_rsvp').find('.evors_choices').removeClass('set');
});
form.on('click', '.evors_checkbox_field', function(){
var O=$(this);
if(O.hasClass('checked')){
O.removeClass('checked');
O.siblings('input').val('no');
}else{
O.addClass('checked');
O.siblings('input').val('yes');
}});
},
show_msg: function (code, type, message, hide_message){
if(message==''||message===undefined){
var C=form_holder.find('.evors_msg_').data('j');
var classN=(type==undefined||type=='error'||type=='')? 'err':type;
message=message||C.codes[code];
}
form_holder.find('.notification').addClass(classN).show().find('p').html(message);
form_holder.parent().addClass('error');
form.addClass('error');
if(hide_message > 0){
setTimeout(function(){
works.reset_error();
}, hide_message);
}},
reset_error: function(){
form_holder.find('.notification').hide().find('p').html('');
form_holder.parent().removeClass('error');
form.removeClass('error');
}}
works.interaction();
return this;
}
$('body').on('click','.evors_trig_open_rsvp_form', function(event){
event.preventDefault();
event.stopPropagation();
show_rsvp_form($(this), $(this).attr('data-val'), 'submit');
});
$('body').on('click','.evoRS_status_option_selection span.evors_choices',function(){
show_rsvp_form($(this), $(this).attr('data-val'), 'submit');
});
$('body').on('click', '.evors_rsvpiable span.evors_choices', function(event){
event.preventDefault();
event.stopPropagation();
load_json_to_local($(this));
var obj=$(this),
rsvp=obj.closest('.evors_rsvpiable'),
evoet_rsvp=obj.closest('.evoet_rsvp'),
ajaxdataa={};
ajaxdataa['rsvp']=obj.data('val');
ajaxdataa['lang']=rsvp.data('lang');
ajaxdataa['uid']=rsvp.data('uid');
ajaxdataa['updates']='no';
ajaxdataa['action']='the_ajax_evors_a7';
ajaxdataa['repeat_interval']=rsvp.data('ri');
ajaxdataa['e_id']=parseInt(rsvp.data('eid'));
var event_uid='event_'+ ajaxdataa.e_id +'_'+ ajaxdataa.repeat_interval;
$.ajax({
beforeSend: function(){
evoet_rsvp.addClass('evoloading');
},
type: 'POST',
url:evors_ajax_script.ajaxurl,
data: ajaxdataa,
dataType:'json',
success:function(data){
if(data.status=='0'){
$('body').trigger('evors_new_rsvp_eventtop');
$('body').find('.eventon_list_event.'+event_uid).each(function(){
evoet_rsvp.html(data.message);
setTimeout(function(){
evoet_rsvp.html(data.content_eventtop);
},3000);
$(this).find('.evors_eventtop_section_data').replaceWith(data.content);
if(data.card_content!==undefined){
$(this).find('.evors_eventcard_content').html(data.card_content);
}});
}else{
rsvp.append('<span class="error">'+data.message+'</span>');
}},complete:function(){
evoet_rsvp.removeClass('evoloading');
}});
});
$('body').on('click', '.evors_submit_rsvpform_btn', function(e){
e.preventDefault();
var obj=O = $(this),
ajaxdataa={ },
form=obj.closest('form.evors_submission_form'),
FORMPAR=form.parent(),
formSection=form.parent(),
error=0,
formType=form.find('input[name="formtype"]').val(),
lightbox=false;
const $count=parseInt(form.find('input[name=count]').val());
const $countMax=parseInt(form.find('input[name=count]').data('max'));
const newRSVP_status=form.find('input[name=rsvp]').val();
rsvp_hide_notifications();
FORMPAR.parent().removeClass('error');
if(error==0){
var changeCount=$count;
if(formType=='update'){
pastVal=parseInt(form.find('input[name=count]').attr('data-oval'));
changeCount=$count - pastVal;
}
if(form.find('.rsvp_status span.set').data('val')!='n'
&& JDATA.cap
&& JDATA.cap!='na'
){
var error2=false;
if(JDATA.cap=='wl'&&formType=='update'){
if(changeCount > 0) error2=true;
}else if(JDATA.cap!='wl'){
if(changeCount > parseInt(JDATA.cap)) error2=true;
}
if(error2){
error=4;
form.find('input[name=count]').addClass('err');
const errCode=(JDATA.cap=='wl'&&changeCount > 0) ? 'err11':'err9';
rsvp_error(errCode,'','',form);
}}
if(JDATA.precap!='na'&&$count > parseInt(JDATA.precap)){
error=4;
form.find('input[name=count]').addClass('err');
rsvp_error('err10','','',form);
}
if(formType=='update'&&JDATA.cap!='wl'&&$count > $countMax&&newRSVP_status!='n'){
error=4;
form.find('input[name=count]').addClass('err');
rsvp_error('err10','','',form);
}}
form.find('.form_row.req').each(function(index){
const row=$(this);
row.removeClass('err');
iO=$(this).find('input');
if(iO.length > 0){
$.each(iO, function(){
ioo=$(this);
if(ioo.hasClass('checkbox')&&ioo.val()=='no'){
error=1;
row.addClass('err');
}
if(ioo.val()==''&&ioo.is(":visible")){
error=1;
row.addClass('err');
}
if(ioo.val()=='') return true;
});
}
if($(this).find('select').length > 0&&$(this).find('select').val()=='-'){
error=1;
row.addClass('err');
}});
if(error==0){
var thisemail=form.find('input[name=email]');
if(!is_email(thisemail.val().trim())){
thisemail.addClass('err');
rsvp_error('err2','','', form);
error=2;
}}
if(error==0){
var human=rsvp_validate_human(form.find('input.captcha'));
if(!human){
error=3;
rsvp_error('err6','','',form);
}}
if(formType=='wl-remove') error=0;
if(error==0){
var updates=form.find('.updates input').attr('checked');
updates=(updates=='checked')? 'yes':'no';
ajaxdataa['action']='the_ajax_evors';
form.ajaxSubmit({
beforeSend: function(){
O.addClass('evobtn_loader full');
},
type: 'POST',url:evors_ajax_script.ajaxurl,data: ajaxdataa,dataType:'json',
success:function(data){
if(data.status=='0'){
FORMPAR.parent().html(data.message);
EVENTCARD=$('body').find('.event_'+data.e_id+'_'+ data.ri);
lb_eventcard=$('body').find('.evo_lightbox_body.event_'+ data.e_id+'_'+ data.ri);
if('data_content_eventtop' in data){
if(lb_eventcard.find('.evors_eventtop_section_data').length>0){
lb_eventcard.find('.evors_eventtop_section_data').replaceWith(data.data_content_eventtop);
}
if(EVENTCARD.find('.evors_eventtop_section_data').length>0){
EVENTCARD.find('.evors_eventtop_section_data').replaceWith(data.data_content_eventtop);
}}
if('data_content_eventtop_your' in data){
if(lb_eventcard.find('.evors_eventop_rsvped_data').length>0){
lb_eventcard.find('.evors_eventop_rsvped_data').replaceWith(data.data_content_eventtop_your);
}
if(EVENTCARD.find('.evors_eventop_rsvped_data').length>0){
EVENTCARD.find('.evors_eventop_rsvped_data').replaceWith(data.data_content_eventtop_your);
}}
if(data.e_id){
if(data.data_content_eventcard!=''){
const incard_form_html=EVENTCARD.find('.evors_incard_form').html();
EVENTCARD.find('.evors_eventcard_content').html(data.data_content_eventcard);
lb_eventcard.find('.evors_eventcard_content').html(data.data_content_eventcard);
if(EVENTCARD.find('.evors_incard_form').is(":visible")){
EVENTCARD.find('.evors_incard_form').html(incard_form_html).show();
}}
}
if($('body').find('#rsvp_event_'+data.e_id).length>0&&data.new_rsvp_text){
STATUS=$('#rsvp_event_'+data.e_id).find('span.rsvpstatus');
STATUS.html(data.new_rsvp_text);
STATUS.attr('class','rsvpstatus status_'+data.new_rsvp_text);
}
if($('body').find('.evo_vir_data').length>0){
const vir_data_box=$('body').find('.evo_vir_data');
if(vir_data_box.data('single')!==undefined
&& vir_data_box.data('single')=='y' &&
vir_data_box.data('refresh')
){
extra_data={};
extra_data['refresh_main']='yy';
$('body').trigger('evo_refresh_designated_elm',[ vir_data_box,'evo_vir_data', extra_data]);
}}
}else{
var passedRsvppd=(data.status)? 'err'+data.status:'err7';
rsvp_error(passedRsvppd, '', data.message,form);
}},complete:function(){
form.parent().removeClass('loading');
O.removeClass('evobtn_loader full');
}});
}else if(error==1){	rsvp_error('err','','',form);	}});
$("body").on('click','.evors_change_rsvp_trig',function(e){
e.preventDefault();
OBJ=$(this);
var _extra_data={};
_extra_data['rsvpid']=OBJ.data('rsvpid');
show_rsvp_form(OBJ, '','update', _extra_data);
})
.on('click','#lookup_rsvp_trig',function(e){
e.preventDefault();
OBJ=$(this);
var _extra_data={};
_extra_data['force_change']=true;
OBJ.addClass('evobtn_loader full');
show_rsvp_form(OBJ, '','update', _extra_data);
});
$('body').on('click','.evors_change_trig',function(){
OBJ=$(this);
OBJ.closest('.evors_forms').addClass('loading');
JDATA=OBJ.data('j');
show_rsvp_form(OBJ, '','update');
});
$('.eventon_rsvp_rsvplist').on('click','.update_rsvp',function(){
OBJ=$(this);
PAR=OBJ.parent();
JDATA=OBJ.parent().siblings('.evors_jdata').data('j');
show_rsvp_form(OBJ, '','update');
});
function show_rsvp_form(OBJ, RSVP,formtype, extra_data){
var ajaxdataa={};
ajaxdataa['action']='evors_get_rsvp_form';
ROW=OBJ.closest('.evo_metarow_rsvp');
if(OBJ.closest('.evo_metarow_rsvp').length) load_json_to_local(OBJ);
if(JDATA){
$.each(JDATA, function(index, val){
ajaxdataa[index]=val;
});
}
if(extra_data&&extra_data!==undefined){
$.each(extra_data, function(ind, vall){
ajaxdataa[ ind ]=vall;
});
}
ajaxdataa['rsvp']=RSVP;
ajaxdataa['formtype']=formtype;
const FORM=OBJ.closest('.evors_forms');
FORMNEST=FORM.parent();
$.ajax({
beforeSend: function(){ 	loading(OBJ);		},
url:	evors_ajax_script.ajaxurl,data: 	ajaxdataa,	dataType:'json', type: 	'POST',
success:function(data){
if(data.status=='good'){
if(ajaxdataa.incard=='yes'){
ROW.find('.evors_incard_form')
.removeClass('error')
.html(data.content)
.slideDown('fast');
}else{
var is_LB_exists=$('body').find('.evors_lightbox.evo_lightbox').length ? true: false;
if(is_LB_exists){
const LB=$('body').find('.evors_lightbox.evo_lightbox');
LB.find('.evolb_content').html(data.content);
}else{
var lb_ajax_data={
lbdata:{
class:'evors_lightbox',
padding:'evopad0',
additional_class:(ajaxdataa['form_style']=='clean' ? 'clean':''),
content: data.content
},
adata:{	end:'_client'	}};
ROW.evo_lightbox_open(lb_ajax_data);
}
if(ajaxdataa.formtype=='update'&&ajaxdataa.rsvpid==''){
setTimeout(function(){ $('body').find('.evors_findrsvp_trig').focus(); },500);
}
$('body').trigger('evolightbox_show');
}
$('body').find('form.evors_gen_form').evors_form();
}else{
}},complete:function(){
completeloading(OBJ);
FORMNEST.closest('.evorow').removeClass('loading');
FORM.removeClass('loading');
}});
}
function loading(obj){
if(obj.hasClass('change')){
obj.addClass('evobtn_loader');
return;
}
obj.closest('.evorow').addClass('loading');
obj.closest('.trig_evo_loading').addClass('evoloading');
obj.closest('p.rsvpmanager_event').addClass('loading');
}
function completeloading(obj){
obj.closest('.evorow').removeClass('loading');
obj.closest('.trig_evo_loading').removeClass('evoloading');
obj.closest('p.rsvpmanager_event').removeClass('loading');
if(obj.hasClass('change')) obj.removeClass('evobtn_loader');
}
$(document).on('keypress', '.evors_findrsvp_trig', function (e){
if(e.which===13){
e.preventDefault();
$('body').find('.evors_findrsvp_form_btn').trigger('click');
}});
$('body').on('click','.evors_findrsvp_form_btn', function(){
var obj=$(this);
var form=obj.closest('form.evors_findrsvp_form');
var error=0;
var formdata=form.serializeArray().reduce(function(obj, item){
obj[item.name]=item.value;
return obj;
}, {});
f_holder=obj.closest('.evors_forms');
form.find('.input').each(function(index){
if($(this).hasClass('req')&&$(this).val()==''){
error=1;
}});
if(error=='1'){
rsvp_error('err','','',form);
}else{
var ajaxdataa={};
ajaxdataa['action']='evors_find_rsvp_form';
form.ajaxSubmit({
beforeSend: function(){ 	obj.addClass('evobtn_loader full');		},
url:	evors_ajax_script.ajaxurl,
data: 	ajaxdataa,	dataType:'json', type: 	'POST',
success:function(data){
if(data.status=='good'){
if(formdata.incard=='yes'){
}else{
}
f_holder.parent().removeClass('error').addClass('t');
f_holder.parent().html(data.content);
$('body').find('form.evors_gen_form').evors_form();
}else{
rsvp_error('err5','','',form);
}
obj.removeClass('evobtn_loader full');
},complete:function(){ 		}});
}});
$('body').on('mouseover','.evors_whos_coming span.initials', function(){
OBJ=$(this);
EM=OBJ.parent().find('em.tooltip');
TEXT=OBJ.data('name');
POS=OBJ.position();
EM.css({'left':(POS.left+20), 'top':(POS.top-30)}).html(TEXT).show();
});
$('body').on('mouseout','.evors_whos_coming span', function(){
OBJ=$(this);
EM=OBJ.parent().find('em.tooltip');
EM.hide();
});
$('body').on('click','.evors_whos_coming span',function(){
LINK=$(this).data('link');
if(LINK!='na')
window.open(LINK, '_blank');
});
$('#evoau_event_manager').on('click','a.load_rsvp_stats',function(event){
event.preventDefault();
O=$(this);
var data_arg={
eid: O.data('eid'),
ri: O.data('ri'),
data: O.closest('.evoau_manager').find('.evoau_manager_json').data('js')
};
load_rsvp_stats(O , data_arg);
});
$(document).on('click','.evorsau_refresh_data',function(){
O=$(this);
var data_arg={
eid: O.closest('.evoau_manager_continer').data('eid'),
ri: O.closest('.evoau_manager_continer').data('ri'),
data: O.closest('.evoau_manager').find('.evoau_manager_json').data('js')
};
load_rsvp_stats(O , data_arg, true);
});
function load_rsvp_stats(O, data_arg, refresh){
data_arg['action']='evors_ajax_get_auem_stats';
MANAGER=O.closest('.evoau_manager');
$.ajax({
beforeSend: function(){
MANAGER.find('.trig_evo_loading').addClass('evoloading');
MANAGER.find('.eventon_actionuser_eventslist').addClass('evoloading');
},
type: 'POST',
url:evors_ajax_script.ajaxurl,
data: data_arg,
dataType:'json',
success:function(data){
if(refresh){
MANAGER.find('.evoau_manager_event_content').html(data.html);
}else{
$('body').trigger('evoau_show_eventdata',[MANAGER, data.html, true]);
}},complete:function(){
MANAGER.find('.eventon_actionuser_eventslist').removeClass('evoloading');
MANAGER.find('.trig_evo_loading').removeClass('evoloading');
}});
}
$(document).on('click','.evorsau_trig_find_attendee',function(){
$(this).parent().siblings('.evorsau_find_rsvp').toggle();
});
$(document).on('change paste keyup','input.evorsau_find_attendee',function(){
var O=$(this);
var val=O.val();
const section=O.closest('.evorsau_attendee_list');
section.find('li').each(function(){
var show=false;
if(val==$(this).data('rsvpid')) show=true;
if(val==$(this).data('e')) show=true;
if($(this).data('e').includes(val)) show=true;
if(val=='') show=true;
(show) ? $(this).show(): $(this).hide();
});
});
$('body').on('click','.evorsau_trig_rsvp_form',function(){
OBJ=$(this);
JDATA=OBJ.siblings('.evors_jdata').data('j');
var extra_data={};
extra_data['loginuser']='no';
show_rsvp_form(OBJ, '','submit', extra_data);
});
$('.evoau_manager_event').on('click','span.checkin',function(){
var obj=$(this);
var PAR=obj.closest('.evorsau_attendee_list');
if(!PAR.hasClass('checkable')) return false;
var status=obj.attr('data-status');
status=(status==''||status=='check-in')? 'checked':'check-in';
var data_arg={
action: 'the_ajax_evors_f4',
rsvp_id: obj.attr('data-id'),
status:  status,
nonce: PAR.find('input#evors_nonce').val()
};
$.ajax({
beforeSend: function(){
obj.html(obj.html()+'...');
},
type: 'POST',
url:evors_ajax_script.ajaxurl,
data: data_arg,
dataType:'json',
success:function(data){
obj.attr({'data-status':status}).html(data.new_status_lang)
.removeAttr('class')
.addClass(status+' checkin');
}});
});
$('body').on('click','.evorsw_remove_wl',function(){
FORM=$(this).closest('form');
FORM.find('input[name="formtype"]').val('wl-remove');
FORM.find('.evors_submit_rsvpform_btn').trigger('click');
});
$('body').on('click', '.evo_elm_dynamic_select_trig',function(e){
e.preventDefault();
});
function rsvp_error(code, type, message, O){
FORM=O.closest('.evors_forms');
F=FORM.find('form');
if(message==''||message===undefined){
var C=FORM.find('.evors_msg_').data('j');
var classN=(type==undefined||type=='error'||type=='')? 'err':type;
message=C.codes[code]
}
FORM.find('.notification').addClass(classN).show().find('p').html(message);
FORM.parent().addClass('error');
F.addClass('error');
}
function rsvp_hide_notifications(){
$('.evors_lightbox_body').find('.notification').hide();
}
function rsvp_validate_human(field){
if(field==undefined){
return true;
}else{
var numbers=['11', '3', '6', '3', '8'];
if(numbers[field.attr('data-cal')]==field.val()){
return true;
}else{ return false;}}
}
function is_email(email){
var regex=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
}});
jQuery(document).ready(function($){
(function (e, t, n, r){
e.fn._wc_variation_form=function (){
e.fn._wc_variation_form.find_matching_variations=function (t, n){
var r=[];
for (var i=0; i < t.length; i++){
var s=t[i],
o=s.variation_id;
e.fn._wc_variation_form.variations_match(s.attributes, n)&&r.push(s)
}
return r
};
e.fn._wc_variation_form.variations_match=function (e, t){
var n = !0;
for (attr_name in e){
var i=e[attr_name],
s=t[attr_name];
i!==r&&s!==r&&i.length!=0&&s.length!=0&&i!=s&&(n = !1)
}
return n
};
this.unbind("check_variations update_variation_values found_variation");
this.find(".reset_variations").unbind("click");
this.find(".variations select").unbind("change focusin");
return this.on("click", ".reset_variations", function (t){
e(this).closest("form.variations_form").find(".variations select").val("").change();
var n=e(this).closest(".product").find(".sku"),
r=e(this).closest(".product").find(".product_weight"),
i=e(this).closest(".product").find(".product_dimensions");
n.attr("data-o_sku")&&n.text(n.attr("data-o_sku"));
r.attr("data-o_weight")&&r.text(r.attr("data-o_weight"));
i.attr("data-o_dimensions")&&i.text(i.attr("data-o_dimensions"));
return !1
}).on("change", ".variations select", function (t){
var SECTION=$(this).closest('.evotx_ticket_purchase_section');
$('body').trigger('evotx_calculate_total', [ SECTION ]);
$variation_form=e(this).closest("form.variations_form");
$variation_form.find("input[name=variation_id]").val("").change();
$variation_form.find(".evotx_wc_var_addcart_trig").data("variation_id", '');
$variation_form.trigger("woocommerce_variation_select_change").trigger("check_variations", ["", !1]);
e(this).blur();
e().uniform&&e.isFunction(e.uniform.update)&&e.uniform.update()
}).on("focusin", ".variations select", function (t){
$variation_form=e(this).closest("form.variations_form");
$variation_form.trigger("woocommerce_variation_select_focusin").trigger("check_variations", [e(this).attr("name"), !0])
}).on("check_variations", function (n, r, i){
var s = !0,
o = !1,
u = !1,
a={},
f=e(this),
l=f.find(".reset_variations");
f.find(".variations select").each(function (){
e(this).val().length==0 ? s = !1:o = !0;
if(r&&e(this).attr("name")==r){
s = !1;
a[e(this).attr("name")]=""
}else{
value=e(this).val();
a[e(this).attr("name")]=value
}});
var c=parseInt(f.data("product_id")),
h=f.data("product_variations");
h||(h=t.product_variations[c]);
h||(h=t.product_variations);
h||(h=t["product_variations_" + c]);
var p=e.fn._wc_variation_form.find_matching_variations(h, a);
if(s){
var d=p.pop();
if(d){
f.find("input[name=variation_id]").val(d.variation_id).change();
f.find(".evotx_wc_var_addcart_trig").data("variation_id", d.variation_id);
f.trigger("found_variation", [d])
}else{
f.find(".variations select").val("");
i||f.trigger("reset_image");
alert(woocommerce_params.i18n_no_matching_variations_text)
}}else{
f.trigger("update_variation_values", [p]);
i||f.trigger("reset_image");
r||f.find(".single_variation_wrap").hide()
}
o ? l.css("visibility")=="hidden"&&l.css("visibility", "visible").hide().fadeIn():l.css("visibility", "hidden")
}).on("reset_image", function (t){
var n=e(this).closest(".product"),
r=n.find("div.images img:eq(0)"),
i=n.find("div.images a.zoom:eq(0)"),
s=r.attr("data-o_src"),
o=r.attr("data-o_title"),
u=i.attr("data-o_href");
s&&r.attr("src", s);
u&&i.attr("href", u);
if(o){
r.attr("alt", o).attr("title", o);
i.attr("title", o)
}}).on("update_variation_values", function (t, n){
$variation_form=e(this).closest("form.variations_form");
$variation_form.find(".variations select").each(function (t, r){
current_attr_select=e(r);
current_attr_select.data("attribute_options")||current_attr_select.data("attribute_options", current_attr_select.find("option:gt(0)").get());
current_attr_select.find("option:gt(0)").remove();
current_attr_select.append(current_attr_select.data("attribute_options"));
current_attr_select.find("option:gt(0)").removeClass("active");
var i=current_attr_select.attr("name");
for (num in n)
if(typeof n[num]!="undefined"){
var s=n[num].attributes;
for (attr_name in s){
var o=s[attr_name];
if(attr_name==i) if(o){
o=e("<div/>").html(o).text();
o=o.replace(/'/g, "\\'");
o=o.replace(/"/g, '\\"');
current_attr_select.find('option[value="' + o + '"]').addClass("active")
} else current_attr_select.find("option:gt(0)").addClass("active")
}}
current_attr_select.find("option:gt(0):not(.active)").remove()
});
$variation_form.trigger("woocommerce_update_variation_values")
}).on("found_variation", function (t, n){
var r=e(this),
i=e(this).closest(".product"),
s=i.find("div.images img:eq(0)"),
o=i.find("div.images a.zoom:eq(0)"),
u=s.attr("data-o_src"),
a=s.attr("data-o_title"),
f=o.attr("data-o_href"),
l=n.image_src,
c=n.image_link,
h=n.image_title;
r.find(".variations_button").show();
r.find(".single_variation").html(n.price_html + n.availability_html).show();
if(!u){
u=s.attr("src") ? s.attr("src"):"";
s.attr("data-o_src", u)
}
if(!f){
f=o.attr("href") ? o.attr("href"):"";
o.attr("data-o_href", f)
}
if(!a){
a=s.attr("title") ? s.attr("title"):"";
s.attr("data-o_title", a)
}
if(l&&l.length > 1){
s.attr("src", l).attr("alt", h).attr("title", h);
o.attr("href", c).attr("title", h)
}else{
s.attr("src", u).attr("alt", a).attr("title", a);
o.attr("href", f).attr("title", a)
}
var p=r.find(".single_variation_wrap"),
d=i.find(".product_meta").find(".sku"),
v=i.find(".product_weight"),
m=i.find(".product_dimensions");
d.attr("data-o_sku")||d.attr("data-o_sku", d.text());
v.attr("data-o_weight")||v.attr("data-o_weight", v.text());
m.attr("data-o_dimensions")||m.attr("data-o_dimensions", m.text());
n.sku ? d.text(n.sku):d.text(d.attr("data-o_sku"));
n.weight ? v.text(n.weight):v.text(v.attr("data-o_weight"));
n.dimensions ? m.text(n.dimensions):m.text(m.attr("data-o_dimensions"));
p.find(".quantity").show();
!n.is_in_stock&&!n.backorders_allowed&&r.find(".variations_button").hide();
n.min_qty ?
p.find("input[name=quantity]").attr("min", n.min_qty).val(n.min_qty) :
p.find("input[name=quantity]").removeAttr("min");
n.max_qty ?
p.find("input[name=quantity]").attr("max", n.max_qty) :
p.find("input[name=quantity]").removeAttr("max");
if(n.is_sold_individually=="yes"){
p.find("input[name=quantity]").val("1");
p.find(".quantity").hide()
}
p.show().trigger("show_variation", [n])
});
jQuery('form.variations_form .variations select').change();
function find_matching_variations(product_variations, settings){
var matching=[];
for (var i=0; i < product_variations.length; i++){
var variation=product_variations[i];
var variation_id=variation.variation_id;
if(variations_match(variation.attributes, settings)){
matching.push(variation);
}}
return matching;
}
function variations_match(attrs1, attrs2){
var match=true;
for (attr_name in attrs1){
var val1=attrs1[attr_name];
var val2=attrs2[attr_name];
if(val1!==undefined&&val2!==undefined&&val1.length!=0&&val2.length!=0&&val1!=val2){
match=false;
}}
return match;
}};})(jQuery, window, document);
$('body').on('click', '.evotx_show_variations',function(e){
e.preventDefault();
var O=jQuery(this);
O.parent().hide();
var _this_form=O.parent().siblings('.variations_form');
_this_form.show();
_this_form._wc_variation_form();
setTimeout(function(){
vars=O.data('defv');
_this_form.find('.variations select').each(function(){
sO=jQuery(this);
sF=sO.attr('id');
if(sF in vars){
sO.find('option[value="'+ vars[sF] +'"]').prop('select',true);
}else{
sO.find('option:eq(2)').prop('select',true);
}
sO.change();
});
},200);
});
});
jQuery(document).ready(function($){
var BODY=$('body');
$.fn.evotx_hide_loading=function(O){
el=this;
return el.closest('.evorow').find('.evo_loading_bar_holder').remove();
};
$.fn.evotx_get_data=function(O){
const el=this;
return el.hasClass('evotx_ticket_purchase_section')
? el.find('.evotx_data').data()
: el.closest('.evotx_ticket_purchase_section').find('.evotx_data').data();
};
$.fn.evotx_update_data=function(data){
el=this;
ROW=el.closest('.evorow');
if(el.hasClass('evotx_ticket_purchase_section')) ROW=el;
tx_data=ROW.evotx_get_data();
var new_tx_data=$.extend({}, tx_data, data);
ROW.find('.evotx_data').data(new_tx_data);
};
$.fn.evotx_get_event_data=function(O){
el=this;
dd=el.hasClass('evotx_ticket_purchase_section') ? el.find('.evotx_data').data() :
el.closest('.evotx_ticket_purchase_section').find('.evotx_data').data();
if(dd===undefined) return false;
if(!('event_data' in dd)) return false;
return dd.event_data;
};
$.fn.evotx_set_event_data=function(new_event_data){
el=this;
dd=el.hasClass('evotx_ticket_purchase_section') ? el.find('.evotx_data').data() :
el.closest('.evotx_ticket_purchase_section').find('.evotx_data').data();
dd['event_data']=new_event_data;
el.closest('.evorow').data(dd);
};
$.fn.evotx_get_all_select_data=function(){
el=this;
var other_data={};
pel=el.closest('.evorow');
if(el.hasClass('evotx_ticket_purchase_section')) pel=el;
pel.find('.evotx_other_data').each(function(ii){
$.each($(this).data(), function (index, value){
other_data[ index ]=value;
});
});
return other_data;
};
$.fn.evotx_get_select_data=function(unique_class){
el=this;
pel=el.closest('.evorow');
if(el.hasClass('evotx_ticket_purchase_section')) pel=el;
var other_data=pel.find('.evotx_other_data.'+unique_class).data();
return other_data;
};
$.fn.evotx_set_select_data=function(unique_class, data){
var $el=this;
var $container=$el.hasClass('evotx_ticket_purchase_section') ? $el:$el.closest('.evorow');
var $target=$container.find('.evotx_other_data.' + unique_class);
if($target.length===0) return;
var current=$target.data()||{};
var updated=$.extend({}, current, data);
$target.data(updated);
};
$.fn.evotx_get_custom_data=function(unique_class){
el=this;
pel=el.closest('.evorow');
if(el.hasClass('evotx_ticket_purchase_section')) pel=el;
var other_data=pel.find('.'+unique_class).data();
return other_data;
};
$.fn.evotx_set_custom_data=function(unique_class, data){
el=this;
pel=el.closest('.evorow');
if(el.hasClass('evotx_ticket_purchase_section')) pel=el;
dd=pel.evotx_get_custom_data(unique_class);
pel.find('.'+ unique_class).data($.extend({}, dd, data) );
};
$.fn.EVO_ToNumber=function(priceStr){
if(priceStr===undefined) return priceStr;
let cleanPrice=priceStr.toString().trim().replace(/[^0-9.,-]/g, '');
const isNegative=cleanPrice.startsWith('-');
cleanPrice=cleanPrice.replace('-', '');
const lastDot=cleanPrice.lastIndexOf('.');
const lastComma=cleanPrice.lastIndexOf(',');
if(lastDot > lastComma) cleanPrice=cleanPrice.replace(/,/g, '');
else if(lastComma > lastDot) cleanPrice=cleanPrice.replace(/\./g, '').replace(',', '.');
return isNaN(cleanPrice=parseFloat(cleanPrice)) ? 0:isNegative ? -cleanPrice:cleanPrice;
}
$.fn.EVO_ToPrice=function(price){
const el=this;
const PFD=el.hasClass('evotx_ticket_purchase_section')
? el.find('.evotx_data').data()
: el.closest('.evotx_ticket_purchase_section').find('.evotx_data').data();
const PF={ thoSep: evotx_object.thousand_separator, decSep: evotx_object.decimal_separator, currencySymbol: evotx_object.currency_symbol, numDec: evotx_object.decimals, curPos: evotx_object.currency_position, ...this.evotx_get_data()?.pf||{}};
let normalizedPrice=price;
const isDecimalNumber=typeof price==='number'||(typeof price==='string'&&!isNaN(parseFloat(price))&&/^[+-]?\d*\.?\d*$/.test(price));
if(!isDecimalNumber&&typeof price==='string'){
if(PF.thoSep){
normalizedPrice=normalizedPrice.replaceAll(PF.thoSep, '');
}
if(PF.decSep!=='.'){
normalizedPrice=normalizedPrice.replace(PF.decSep, '.');
}}
const number=parseFloat(normalizedPrice);
if(isNaN(number)) return PF.currencySymbol + '0' + PF.decSep + '00';
const isNegative=number < 0, absNumber=Math.abs(number);
let formattedPrice=absNumber.toFixed(PF.numDec).replace('.', PF.decSep);
if(PF.thoSep){
const [intPart, decPart]=formattedPrice.split(PF.decSep);
formattedPrice=intPart.replace(/\B(?=(\d{3})+(?!\d))/g, PF.thoSep) + (decPart ? PF.decSep + decPart:'');
}
formattedPrice=isNegative ? '-' + formattedPrice:formattedPrice;
return PF.curPos==='right' ? formattedPrice + PF.currencySymbol :
PF.curPos==='right_space' ? formattedPrice + ' ' + PF.currencySymbol :
PF.curPos==='left_space' ? PF.currencySymbol + ' ' + formattedPrice :
PF.currencySymbol + formattedPrice;
}
$('body').on('change','table.variations select',function(){
CART=$(this).closest('table').siblings('.evotx_orderonline_add_cart');
STOCK=CART.find('p.stock');
if(STOCK.hasClass('out-of-stock')){
CART.find('.variations_button').hide();
}else{
CART.find('.variations_button').show();
}});
$('body').on('evotx_qty_changed', function(event,QTY, MAX, OBJ){
SECTION=OBJ.closest('.evotx_ticket_purchase_section');
$('body').trigger('evotx_calculate_total', [SECTION]);
});
$('body').on('evotx_calculate_total', function(event, SECTION){
QTY=SECTION.find('input[name=quantity]').val();
sin_price=SECTION.find('p.price.tx_price_line span.value').data('sp');
price_extra=0;
var tx_data=SECTION.evotx_get_data();
var price_format_data=tx_data.pf;
sin_price=SECTION.EVO_ToNumber(sin_price);
if(SECTION.find('p.price.tx_price_line').length==0){
var sin_price=SECTION.find('.evotx_orderonline_add_cart bdi').text()
.replace(price_format_data.currencySymbol , '').trim();
if(sin_price==''||sin_price===undefined) return;
sin_price=SECTION.EVO_ToNumber(sin_price);
}
if(SECTION.find('p.price.tx_price_line input').length>0){
SECTION.find('p.price.tx_price_line input').each(function(){
if($(this).hasClass('nyp')) return;
DATA=SECTION.find('p.price.tx_price_line input').data('prices');
if(DATA===undefined) return;
price_muli=0;
price_extra=0;
if(Object.keys(DATA).length>0){
$.each(DATA, function(index, val){
if(val===undefined) return;
if(!('price') in val) return;
if(val.price===undefined) return;
p=SECTION.EVO_ToNumber(val.price);
p=p * parseInt(val.qty);
if(('pt' in val&&val.pt=='extra')||('uncor' in val&&val.uncor)){
price_extra +=p;
}else{
price_muli +=p;
}})
}
sin_price +=price_muli;
});
}
new_price=sin_price * QTY;
new_price +=price_extra;
new_price=SECTION.EVO_ToPrice(new_price);
SECTION.find('.evotx_addtocart_total span.value').html(new_price);
});
function get_format_price(price, SECTION){
return SECTION.EVO_ToPrice(price);
}
function __raw_price_to_number(price_string, SECTION){
return SECTION.EVO_ToNumber(price_string);
}
function _addThousandSep(n, thoSep){
var rx=/(\d+)(\d{3})/;
return String(n).replace(/^\d+/, function(w){
while(rx.test(w)){
w=w.replace(rx, '$1'+thoSep+'$2');
}
return w;
});
};
$('body').on('click','.evotx_qty_change', function(event){
OBJ=$(this);
if(OBJ.closest('.evotx_quantity').hasClass('one')) return;
QTY=parseInt(OBJ.siblings('em').html());
MAX=OBJ.siblings('input').data('max');
$('body').trigger('evotx_before_qty_changed',[ MAX, OBJ]);
if(!MAX) MAX=OBJ.siblings('input').attr('max');
NEWQTY=(OBJ.hasClass('plu'))?  QTY+1: QTY-1;
NEWQTY=(NEWQTY <=0)? 0: NEWQTY;
if(NEWQTY==0&&OBJ.hasClass('min')&&!OBJ.hasClass('zpos')){
return;
}
NEWQTY=(MAX!=''&&NEWQTY > MAX)? MAX: NEWQTY;
OBJ.siblings('em').html(NEWQTY);
OBJ.siblings('input').val(NEWQTY);
if(QTY!=NEWQTY) $('body').trigger('evotx_qty_changed',[NEWQTY, MAX, OBJ]);
if(NEWQTY==MAX){
PLU=OBJ.parent().find('b.plu');
if(!PLU.hasClass('reached')) PLU.addClass('reached');
if(QTY==MAX)   $('body').trigger('evotx_qty_max_reached',[NEWQTY, MAX, OBJ]);
}else{
OBJ.parent().find('b.plu').removeClass('reached');
}});
$('body').on('reset_data','form.evotx_orderonline_variable',function(event){
FORM=$(this);
FORM.find('.evotx_variation_purchase_section').hide();
});
$('body').on('evolightbox_end',function(){
$('body').trigger('show_variation');
});
$('body').on('show_variation','form.evotx_orderonline_variable',function(event, variation, purchasable){
FORM=$(this);
if(!variation.is_in_stock){
FORM.find('.evotx_variations_soldout').show();
FORM.find('.evotx_variation_purchase_section').hide();
}else{
FORM.find('.evotx_variations_soldout').hide();
FORM.find('.evotx_variation_purchase_section').show();
}
if(variation.sold_individually){
FORM.find('.evotx_quantity').hide();
}
NEWQTY=parseInt(FORM.find('.evotx_quantity_adjuster em').html());
NEWQTY=(variation.max_qty!=''&&NEWQTY > variation.max_qty)? variation.max_qty: NEWQTY;
FORM.find('.evotx_quantity_adjuster em').html(NEWQTY);
FORM.find('.evotx_quantity_adjuster input').val(NEWQTY);
});
BODY.on('click','.trig_evotx_btn',function(){
var ajaxdataa={};
ajaxdataa['action']='evotx_standalone_form';
ajaxdataa['data']=$(this).data();
BODY.evo_lightbox_open({
'uid': 'evotx_standalone_ticket',
'lbc': 'evotx_standalone_ticket',
'ajax':'yes',
'end':'client',
'd': ajaxdataa
});
}).on('evo_ajax_success_evotx_standalone_ticket',function(event, OO, data, el){
LB=BODY.find('.evo_lightbox.'+ OO.lightbox_key);
$('body').trigger('evotx_standlone_loaded',[ LB, data ]);
});
$('body').on('click', '.evotx_addtocart', function(event){
event.preventDefault();
if($(this).data('green')!='y') return;
var BTN=$(this);
var SECTION=BTN.closest('.evotx_ticket_purchase_section');
const ajaxdata={ action: 'evotx_add_to_cart' };
ajaxdata.event_data=SECTION.evotx_get_event_data();
ajaxdata.other_data=SECTION.evotx_get_all_select_data();
ajaxdata['qty']=SECTION.find('input[name="quantity"]').val();
ajaxdata['nyp']=SECTION.find('input[name="nyp"]').val();
ajaxdata['action']='evotx_add_to_cart';
if(ajaxdata['qty']===undefined&&BTN.hasClass('si')) ajaxdata.qty=1;
SECTION.find('input').each(function(){
if($(this).attr('name')===undefined) return;
if($(this).attr('name')=='add-to-cart') return;
ajaxdata[ $(this).attr('name') ]=$(this).val();
});
if(!ajaxdata.qty||ajaxdata.qty==0){
SECTION.evotx_show_msg({'status':'bad','msg':'t5'});
return false;
}
$.ajax({
beforeSend: function(){
BTN.addClass('evobtn_loader full w');
},
url:    evotx_object.ajaxurl,
data:   ajaxdata,  dataType:'json', type:  'POST',
success:function(data){
if(data.status=='good'){
$('body').trigger('evotx_added_to_cart',[ data, SECTION, ajaxdata ]);
SECTION.evotx_show_msg({'msg': data.msg});
if(evotx_object.redirect_to_cart=='cart'){
window.location.href=evotx_object.cart_url;
}else if(evotx_object.redirect_to_cart=='checkout'){
window.location.href=evotx_object.checkout_url;
}else{
$('body').trigger('evo_update_wc_cart');
}}else{
SECTION.evotx_show_msg({'status':'bad','msg':data.msg });
}},complete:function(){
BTN.removeClass('evobtn_loader full w');
SECTION.removeClass('evoloading');
}});
});
$(document).on('keypress',function(e){
var obj=$(e.target);
if(e.which==13&&obj.hasClass('nyp')){
e.preventDefault();
return;
}});
$('body').on('change','input.nyp',function(){
const EVOROW=$(this).closest('.evorow');
const TIX_SECTION=EVOROW.find('.evotx_ticket_purchase_section');
const typed_price=__raw_price_to_number($(this).val() , TIX_SECTION);
$(this).parent().data('sp', typed_price);
var min_nyp=parseFloat($(this).data('minnyp'));
console.log($(this).val()+' '+typed_price +' '+ min_nyp);
if(min_nyp > 0){
if(typed_price < min_nyp){
TIX_SECTION.evotx_show_msg({'status':'bad','msg':'t6','hide_hidables':false});
EVOROW.find('.evotx_addtocart').data('green','n');
}else{
EVOROW.find('.evotx_addtocart').data('green','y');
TIX_SECTION.evotx_hide_msg();
$('body').trigger('evotx_calculate_total', [ $(this).closest('.evotx_ticket_purchase_section') ]);
}}else{
$('body').trigger('evotx_calculate_total', [ $(this).closest('.evotx_ticket_purchase_section') ]);
}});
$.fn.evotx_show_msg=function(opt){
var defs={
'msg':'',
'status':'good',
'hide': false,
'hide_hidables': true,
'show_btn':true
}
var OO=$.extend({}, defs, opt);
el=$(this);
const TIX_SECTION=el.hasClass('evotx_ticket_purchase_section') ?
el:el.closest('.evotx_ticket_purchase_section');
const msg_el=TIX_SECTION.find('.tx_wc_notic');
var evotx_data=TIX_SECTION.evotx_get_data();
var msg_data=evotx_data.msg_interaction;
if(OO.show_btn&&OO.status=='good'){
TIX_SECTION.find('.evotx_cart_actions').show();
}else{
TIX_SECTION.find('.evotx_cart_actions').hide();
}
var message=OO.msg;
const TT=evotx_data&&'t' in evotx_data ? evotx_data.t:null;
if(TT!=null&&OO.msg in  TT) message=TT[ OO.msg ];
if(message==''||message===undefined) message=OO.status=='good' ? TT.t1:TT.t4;
message=message.replace(new RegExp("\\\\", "g"), "");
msg_el.html("<p class='evotx_success_msg "+ OO.status +"'>"+ message +"</p>").show();
if(msg_data.hide_after==true||OO.hide){
setTimeout(function(){
$(TIX_SECTION).find('.evotx_addtocart_msg').hide();
}, 3000);
}
if(msg_data.redirect!='nonemore'&&OO.hide_hidables){
$(TIX_SECTION).find('.evotx_hidable_section').hide();
}};
$.fn.evotx_hide_msg=function(){
var el=$(this);
const TIX_SECTION=el.hasClass('evotx_ticket_purchase_section') ?
el:el.closest('.evotx_ticket_purchase_section');
const msg_el=TIX_SECTION.find('.tx_wc_notic');
msg_el.hide();
TIX_SECTION.find('.evotx_addtocart_msg').hide();
};
$('body').on('evotx_ticket_msg', function(event, EVOROW, STATUS, bad_msg, hide_hidables){
$(EVOROW).evotx_show_msg({
'status': STATUS,
'hide_hidables': hide_hidables,
'msg': bad_msg
});
return;
});
$('body').on('evotx_ticket_msg_hide',function(event, EVOROW){
$(EVOROW).evotx_hide_msg();
});
$('body').on('click','.evoAddToCart', function(e){
e.preventDefault();
thisButton=$(this);
thisButton.closest('.evoTX_wc').addClass('evoloading');
TICKET_ROW=thisButton.closest('.evo_metarow_tix');
PURCHASESEC=TICKET_ROW.find('.evoTX_wc');
var ticket_row=thisButton.closest('.evo_metarow_tix');
var event_id=ticket_row.attr('data-event_id');
var ri=ticket_row.attr('data-ri');
var lang=thisButton.data('l');
var event_location=thisButton.closest('.evcal_eventcard').find('.evo_location_name').html();
event_location=(event_location!==undefined&&event_location!='' )?
encodeURIComponent(event_location):'';
location_str=event_location!=''? '&eloc='+event_location: '';
lang_str=(lang!==undefined)? '&lang='+lang:'';
if(thisButton.hasClass('variable_add_to_cart_button')){
var variation_form=thisButton.closest('form.variations_form'),
variations_table=variation_form.find('table.variations'),
singleVariation=variation_form.find('.single_variation p.stock');
if(singleVariation.hasClass('out-of-stock')){
return;
}
var product_id=parseInt(variation_form.attr('data-product_id'));
var variation_id=parseInt(variation_form.find('input[name=variation_id]').val());
var quantity=parseInt(variation_form.find('input[name=quantity]').val());
quantity=(quantity===undefined||quantity==''||isNaN(quantity)) ? 1: quantity;
values=variation_form.serialize();
var attributes='';
variations_table.find('select').each(function(index){
attributes +='&'+ $(this).attr('name') +'='+ $(this).val();
});
dataform=thisButton.closest('.variations_form').serializeArray();
var data_arg=dataform;
$.ajax({
type: 'POST',data: data_arg,
url: '?add-to-cart='+product_id+'&variation_id='+variation_id+attributes+'&quantity='+quantity +'&ri='+ri+'&eid='+event_id + location_str + lang_str,
beforeSend: function(){
$('body').trigger('adding_to_cart');
},
success: function(response, textStatus, jqXHR){
thisButton.evotx_show_msg();
}, complete: function(){
thisButton.closest('.evoTX_wc').removeClass('evoloading');
if(evotx_object.redirect_to_cart=='cart'){
window.location.href=evotx_object.cart_url;
}else if(evotx_object.redirect_to_cart=='checkout'){
window.location.href=evotx_object.checkout_url;
}else{
update_wc_cart();
}}
});
}
return false;
});
$('body').on('evo_update_wc_cart',function(){
update_wc_cart();
});
function update_wc_cart(){
var data={
action: 'evoTX_ajax_09'
};
$.ajax({
type:'POST',url:evotx_object.ajaxurl,
data:data,
dataType:'json',
success:function(data){
if(!data) return;
var this_page=window.location.toString();
this_page=this_page.replace('add-to-cart', 'added-to-cart');
var fragments=data.fragments;
var cart_hash=data.cart_hash;
fragments&&$.each(fragments, function (key, value){
$(key).addClass('updating');
});
if(fragments){
$.each(fragments, function(key){
$(key).addClass('updating');
});
}
$('.shop_table.cart, .updating, .cart_totals')
.fadeTo('400', '0.6')
.block({
message: null,
overlayCSS: {
opacity: 0.6
}});
if(fragments){
$.each(fragments, function(key, value){
$(key).replaceWith(value);
});
$(document.body).trigger('wc_fragments_loaded');
}
$('.widget_shopping_cart, .updating').stop(true).css('opacity', '1').unblock();
$('.shop_table.cart').load(this_page + ' .shop_table.cart:eq(0) > *', function(){
$('.shop_table.cart').stop(true).css('opacity', '1').unblock();
$(document.body).trigger('cart_page_refreshed');
});
$('.cart_totals').load(this_page + ' .cart_totals:eq(0) > *', function(){
$('.cart_totals').stop(true).css('opacity', '1').unblock();
});
$(document.body).trigger('added_to_cart', [ fragments, cart_hash ]);
}});
}
$('body').on('click','.evotx_INQ_submit', function(event){
event.preventDefault();
const LB=$(this).closest('.evo_lightbox');
var form=LB.find('.evotxINQ_form');
form.find('.evotxinq_field').removeClass('error');
var data={ action: 'evotx_ajax_06' };
var human=validate_human(form.find('input.captcha'));
if(!human){
form.find('input.captcha').addClass('error');
LB.evo_lightbox_show_msg({
'type': 'bad',
'message':evotx_object.text['003'],
});
return;
}
var error=false;
form.find('input, textarea').each(function(index){
if($(this).val()==''){
error=true;
$(this).addClass('error');
}
data[$(this).attr('name')]=$(this).val();
});
if(error){
LB.evo_lightbox_show_msg({
'type': 'bad',
'message':evotx_object.text['002'],
});
return;
}
LB.evo_admin_get_ajax({
'lightbox_key':'evotx_inqure_form',
'uid':'evotx_inqure_submit',
'ajaxdata': data,
'end':'client'
});
});
function validate_human(field){
if(field==undefined){
return true;
}else{
var numbers=['11', '3', '6', '3', '8'];
if(numbers[field.attr('data-cal')]==field.val()){
return true;
}else{ return false;}}
}
$('body').on('click','.evotx_add_to_cart em', function(){   });
$('body').on('mouseover','.evotx_whos_coming span', function(){
OBJ=$(this);
EM=OBJ.parent().find('em.tooltip');
TEXT=OBJ.data('name');
POS=OBJ.position();
EM.css({'left':(POS.left+20), 'top':(POS.top-30)}).html(TEXT).show();
});
$('body').on('mouseout','.evotx_whos_coming span', function(){
OBJ=$(this);
EM=OBJ.parent().find('em.tooltip');
EM.hide();
});
BODY.on('click','.evotx_view_ticket',function(){
var ajaxdataa={};
ajaxdataa['action']='evotx_my_account_ticket';
ajaxdataa['tn']=$(this).data('tn');
BODY.evo_lightbox_open({
'uid': 'evotx_ac_view_ticket',
'lbc': 'evotx_ac_view_ticket',
'lb_padding':'evopad0',
'ajax':'yes',
'end':'client',
'd': ajaxdataa
});
});
$('body').on('evo_ajax_success_evotxw_form_submit',function(e, OO, data , el){
const event_id=OO.ajaxdata.eid;
const ri=OO.ajaxdata.ri;
const wl_box=$(document).find('.evotxw_waitlist_size_'+event_id+'_'+ ri);
const new_wl_count=data.new_waitlist_size;
wl_box.text(new_wl_count);
});
$('#evoau_event_manager').on('click','a.load_tix_stats',function(event){
event.preventDefault();
MANAGER=$(this).closest('.evoau_manager');
var data_arg={
action: 'evotx_ajax_get_auem_stats',
eid: $(this).data('eid')
};
$.ajax({
beforeSend: function(){
MANAGER.find('.eventon_actionuser_eventslist').addClass('evoloading');
},
type: 'POST',
url:evotx_object.ajaxurl,
data: data_arg,
dataType:'json',
success:function(data){
$('body').trigger('evoau_show_eventdata',[MANAGER, data.html, true]);
},complete:function(){
MANAGER.find('.eventon_actionuser_eventslist').removeClass('evoloading');
}});
});
$(document).on('click','.evotxVA_ticket',function(e){
$(this).find('.evotxVA_data').toggle();
$(this).find('.fa_icon_ind').toggleClass('fa-chevron-down fa-chevron-up');
});
$('body').on('click','.evotx_status', function(){
var obj=$(this);
if(obj.hasClass('refunded')) return false;
if(obj.data('gc')==false) return false;
var data_arg={
action: 'the_ajax_evotx_a5',
tid: obj.data('tid'),
tiid: obj.data('tiid'),
status: obj.data('status'),
};
$.ajax({
beforeSend: function(){    obj.html(obj.html()+'...');  },
type: 'POST',
url:evotx_object.ajaxurl,
data: data_arg,
dataType:'json',
success:function(data){
obj.data('status', data.new_status)
obj.html(data.new_status_lang).removeAttr('class').addClass('evotx_status '+ data.new_status);
}});
});
$('.evoau_manager_event_content').on('click','span.evotx_incomplete_orders',function(){
$(this).closest('table').find('td.hidden').toggleClass('bad');
});
});
jQuery(document).ready(function($){
setTimeout(function(){
$('body').find('.evovo_variation_types').each(function(){
$(this).find('select').trigger('change');
});
},200);
$('body').on('change','.evovo_variation_types select', function (){
const SECTION=$(this).closest('.evotx_ticket_purchase_section');
const rDATA=SECTION.evotx_get_data();
const evovo_data=SECTION.evotx_get_custom_data('evovo_data').evovo_data;
const EVOROW=$(this).closest('.evorow');
const all_variations=evovo_data.v;
let new_variation_id=false;
let new_variation_price=evovo_data.defp;
let new_variation_max_qty='na';
let new_variation_data='';
SECTION.find('.evotx_hidable_section').show();
evovo_data['vart']={};
const selected_options={ var_ids: {}};
SECTION.find('.evovo_variation_types select').each(function(){
const variation_type_id=$(this).attr('name');
const selected_value=$(this).val();
evovo_data.vart[variation_type_id]=selected_value;
});
const selected_vars=evovo_data.vart;
let exact_match_id=false;
let all_match_id=false;
$.each(all_variations, function(var_id, data){
if(!('variations' in data)) return;
const variation_types=data.variations;
const variation_type_count=Object.keys(variation_types).length;
let exact_match_count=0;
let all_match_count=0;
$.each(data.variations , function(vtid, vval){
if(!(vtid in selected_vars)) return;
const selected_val=selected_vars[vtid];
if(selected_val===vval&&selected_val!=='All'){
exact_match_count++;
}
if(selected_val===vval||selected_val==='All'||vval==='All'){
all_match_count++;
}});
if(exact_match_count===variation_type_count&&!exact_match_id){
exact_match_id=var_id;
new_variation_price=data.regular_price||new_variation_price;
new_variation_max_qty=data.stock||new_variation_max_qty;
new_variation_data=data;
}
else if(all_match_count===variation_type_count&&!all_match_id){
all_match_id=var_id;
if(!exact_match_id){
new_variation_price=data.regular_price||new_variation_price;
new_variation_max_qty=data.stock||new_variation_max_qty;
new_variation_data=data;
}}
});
new_variation_id=exact_match_id||all_match_id;
if(!new_variation_id){
SECTION.find('.evotx_add_to_cart_bottom').addClass('outofstock');
SECTION.find('.evovo_price_options').hide();
SECTION.evotx_show_msg({ 'status': 'bad', 'msg': 'tvo2', 'hide_hidables': false });
return false;
}
selected_options['var_ids'][new_variation_id]=1;
selected_options['vart']=evovo_data['vart'];
let Current_outofstock=false;
if(new_variation_data&&new_variation_data.stock_status==='outofstock'){
Current_outofstock=true;
}
if(new_variation_data&&new_variation_data.stock==='0'){
Current_outofstock=true;
}
if(Current_outofstock){
SECTION.find('.evotx_add_to_cart_bottom').addClass('outofstock');
SECTION.find('.evovo_price_options').hide();
SECTION.evotx_show_msg({ 'status': 'bad', 'msg': 'tvo3', 'hide_hidables': false });
}else{
SECTION.find('.evotx_add_to_cart_bottom').removeClass('outofstock').show();
SECTION.find('.evovo_price_options').show();
SECTION.evotx_hide_msg();
}
const formatted_price=SECTION.EVO_ToPrice(new_variation_price);
SECTION.evotx_set_select_data('evovo', selected_options);
SECTION.evotx_set_custom_data('evovo_data', evovo_data);
SECTION.find('.tx_price_line .value')
.html(formatted_price)
.data('sp', new_variation_price);
console.log(formatted_price);
console.log(new_variation_price);
if(rDATA.event_data&&rDATA.event_data.showRem&&new_variation_max_qty!=='na'){
const SECTION_remaining=SECTION.find('.evotx_remaining');
SECTION_remaining.find('span span').html(new_variation_max_qty);
if(rDATA.event_data.showRem!==false){
SECTION_remaining.show();
}else{
SECTION_remaining.hide();
}}
const QTY_SECTION=SECTION.find('.evotx_quantity');
QTY_SECTION.find('input').data('max', new_variation_max_qty);
const Set_stock_val=QTY_SECTION.find('input').val();
if(!isNaN(new_variation_max_qty)){
SECTION.find('.evotx_remaining').show();
SECTION.find('.evotx_remaining_stock span').html(new_variation_max_qty);
}else{
SECTION.find('.evotx_remaining').hide();
}
if(new_variation_max_qty!=='na'&&Set_stock_val > new_variation_max_qty){
QTY_SECTION.find('input').val(new_variation_max_qty);
QTY_SECTION.find('em').html(new_variation_max_qty);
}else if(Set_stock_val < new_variation_max_qty){
QTY_SECTION.find('b.plu').removeClass('reached');
}
$('body').trigger('evotx_calculate_total', [SECTION]);
});
$('body').on('click','.evovo_var_types_ind .evovo_addremove',function(){
calculate_var_price($(this));
});
function calculate_var_price(SPAN){
SPAN=$(SPAN);
P=SPAN.closest('p');
SECTION=SPAN.closest('.evotx_ticket_purchase_section');
evovo_data=SECTION.evotx_get_custom_data('evovo_data');
DATA=evovo_data.evovo_data;
DATA_vt=DATA['v'];
DATA['prices']=SECTION.find('.price.tx_price_line input').data('prices');
if(DATA['prices']=='') DATA['prices']={};
var total_var_price=0;
selected_options={};
selected_options['var_ids']={};
SECTION.find('.evovo_var_types_ind').each(function(){
QTY=$(this).find('input').val();
vid=$(this).data('vid');
DATA.prices[ vid ]={};
if(QTY=='0'||QTY===undefined) return true;
selected_options['var_ids'][vid]=QTY;
let price=SECTION.EVO_ToNumber(DATA_vt[vid].regular_price);
DATA.prices[ vid ]['price']=DATA_vt[vid].regular_price;
DATA.prices[ vid ]['price_decimal']=price;
DATA.prices[ vid ]['qty']=QTY;
DATA.prices[ vid ]['variations']=DATA_vt[vid]['variations'];
DATA.prices[ vid ]['type']='ind_variation';
total_var_price +=price * QTY;
});
SECTION.evotx_set_select_data('evovo', selected_options);
SECTION.evotx_set_custom_data('evovo_data', DATA);
SECTION.find('.price.tx_price_line span.value').html(SECTION.EVO_ToPrice(total_var_price) );
SECTION.find('.price.tx_price_line input').data('prices', DATA.prices);
$('body').trigger('evotx_calculate_total', [SECTION]);
}
$('body').on('evotx_before_qty_changed',function(event, MAX, OBJ){
return;
});
$('body').on('click','.evovo_price_option .evovo_addremove',function(){
if(!$(this).hasClass('evotx_qty_change')) calculate_price_options($(this));
});
$('body').on('evotx_qty_changed', function(event, NEWQTY, MAX, OBJ){
calculate_price_options(OBJ);
});
function calculate_price_options(SPAN){
SPAN=$(SPAN);
if(!SPAN.hasClass('evovo_addremove')) return false;
MULT=(SPAN.hasClass('evotx_qty_change'))? true: false;
P=SPAN.closest('p');
SECTION=SPAN.closest('.evotx_ticket_purchase_section');
pOptions=SECTION.find('.evovo_price_options');
evovo_data=SECTION.evotx_get_custom_data('evovo_data');
DATA=evovo_data.evovo_data;
DATA_po=DATA.po;
uncor_qty=evovo_data.po_uncor_qty=='yes'? true:false;
DATA['prices']=SECTION.find('.price.tx_price_line input').data('prices');
if(DATA['prices']=='') DATA['prices']={};
QTY=0;
if(!MULT){
if(P.hasClass('add')){
P.removeClass('add').addClass('added');
P.find('input').val('1');
}else{
P.removeClass('added').addClass('add');
P.find('input').val('0');
}}
HTML=HTML_extra='';
selected_options={};
selected_options['options']={};
if(pOptions.find('p.evovo_price_option').length > 0){
pOptions.find('p.evovo_price_option').each(function(index){
if($(this).hasClass('soldout')) return;
pMULT=$(this).hasClass('mult')? true: false;
po_id=$(this).data('poid');
if(po_id===undefined) return;
DATA.prices[ po_id ]={};
QTY=parseInt($(this).find('input').val());
if(QTY < 1) return;
selected_options['options'][ po_id ]=QTY;
$priceOption_decimal_price=SECTION.EVO_ToNumber(DATA_po[po_id].regular_price);
DATA.prices[ po_id ]['type']='price_option';
DATA.prices[ po_id ]['price']=$priceOption_decimal_price;
DATA.prices[ po_id ]['qty']=QTY;
DATA.prices[ po_id ]['uncor']=uncor_qty;
DATA.prices[ po_id ]['pt']=('pricing_type' in DATA_po[po_id]) ? DATA_po[po_id].pricing_type:'include';
total_price=$priceOption_decimal_price * QTY;
formatted_total_price=SECTION.EVO_ToPrice(total_price);
code="<p class='evotx_item_price_line'><span class='evotx_label'>"+ DATA_po[po_id].name + "<em>"+ (QTY>1? 'x'+QTY:'') +"</em></span><span class='value'>" + formatted_total_price + "</span></p>";
(DATA.prices[ po_id ]['pt']=='extra') ? HTML_extra +=code:HTML +=code;
});
SPAN.evotx_set_select_data('evovo', selected_options);
}
SECTION.find('.evovo_price_option_prices_container').html(HTML);
SECTION.find('.evovo_price_option_prices_container_extra').html(HTML_extra);
SECTION.evotx_set_custom_data('evovo_data', DATA);
SECTION.find('.price.tx_price_line input').data('prices',DATA.prices);
$('body').trigger('evotx_calculate_total', [SECTION]);
}
$('body').on('evobo_block_prices_loaded', function(event,eventRow,  data, ajaxdataa){
$(eventRow).find('.evovo_variation_types select').trigger('change');
return;
});
});
jQuery(document).ready(function ($){
$('.zoom-social_icons-list__link').on({
'mouseenter': function (e){
e.preventDefault();
var $this=$(this).find('.zoom-social_icons-list-span');
var $rule=$this.data('hover-rule');
var $color=$this.data('hover-color');
if($color!==undefined){
$this.attr('data-old-color', $this.css($rule));
$this.css($rule, $color);
}},
'mouseleave': function (e){
e.preventDefault();
var $this=$(this).find('.zoom-social_icons-list-span');
var $rule=$this.data('hover-rule');
var $oldColor=$this.data('old-color');
if($oldColor!==undefined){
$this.css($rule, $oldColor);
}}
});
});
if(document.readyState!=='loading'){
tnp_ajax_init();
}else{
document.addEventListener("DOMContentLoaded", function (){
tnp_ajax_init();
});
}
function tnp_ajax_init(){
document.querySelectorAll('form.tnp-ajax').forEach(el=> {
el.addEventListener('submit', async function(ev){
ev.preventDefault();
ev.stopPropagation();
const response=await fetch(newsletter_data.action_url + '?action=tnp&na=sa', {
method: "POST",
body: new FormData(this)
});
this.innerHTML=await response.text();
});
});
};
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(a){"use strict";var o,r=window.Slick||{};o=0,(r=function(i,e){var t=this;t.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(i),appendDots:a(i),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},t.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(t,t.initials),t.activeBreakpoint=null,t.animType=null,t.animProp=null,t.breakpoints=[],t.breakpointSettings=[],t.cssTransitions=!1,t.focussed=!1,t.interrupted=!1,t.hidden="hidden",t.paused=!0,t.positionProp=null,t.respondTo=null,t.rowCount=1,t.shouldClick=!0,t.$slider=a(i),t.$slidesCache=null,t.transformType=null,t.transitionType=null,t.visibilityChange="visibilitychange",t.windowWidth=0,t.windowTimer=null,i=a(i).data("slick")||{},t.options=a.extend({},t.defaults,e,i),t.currentSlide=t.options.initialSlide,t.originalSettings=t.options,void 0!==document.mozHidden?(t.hidden="mozHidden",t.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(t.hidden="webkitHidden",t.visibilityChange="webkitvisibilitychange"),t.autoPlay=a.proxy(t.autoPlay,t),t.autoPlayClear=a.proxy(t.autoPlayClear,t),t.autoPlayIterator=a.proxy(t.autoPlayIterator,t),t.changeSlide=a.proxy(t.changeSlide,t),t.clickHandler=a.proxy(t.clickHandler,t),t.selectHandler=a.proxy(t.selectHandler,t),t.setPosition=a.proxy(t.setPosition,t),t.swipeHandler=a.proxy(t.swipeHandler,t),t.dragHandler=a.proxy(t.dragHandler,t),t.keyHandler=a.proxy(t.keyHandler,t),t.instanceUid=o++,t.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,t.registerBreakpoints(),t.init(!0)}).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},r.prototype.addSlide=r.prototype.slickAdd=function(i,e,t){var o=this;if("boolean"==typeof e)t=e,e=null;else if(e<0||e>=o.slideCount)return!1;o.unload(),"number"==typeof e?0===e&&0===o.$slides.length?a(i).appendTo(o.$slideTrack):t?a(i).insertBefore(o.$slides.eq(e)):a(i).insertAfter(o.$slides.eq(e)):!0===t?a(i).prependTo(o.$slideTrack):a(i).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each(function(i,e){a(e).attr("data-slick-index",i)}),o.$slidesCache=o.$slides,o.reinit()},r.prototype.animateHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.animate({height:i},e.options.speed))},r.prototype.animateSlide=function(i,e){var t={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(i=-i),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:i},o.options.speed,o.options.easing,e):o.$slideTrack.animate({top:i},o.options.speed,o.options.easing,e):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),a({animStart:o.currentLeft}).animate({animStart:i},{duration:o.options.speed,easing:o.options.easing,step:function(i){i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate("+i+"px, 0px)":t[o.animType]="translate(0px,"+i+"px)",o.$slideTrack.css(t)},complete:function(){e&&e.call()}})):(o.applyTransition(),i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate3d("+i+"px, 0px, 0px)":t[o.animType]="translate3d(0px,"+i+"px, 0px)",o.$slideTrack.css(t),e&&setTimeout(function(){o.disableTransition(),e.call()},o.options.speed))},r.prototype.getNavTarget=function(){var i=this.options.asNavFor;return i&&null!==i&&(i=a(i).not(this.$slider)),i},r.prototype.asNavFor=function(e){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var i=a(this).slick("getSlick");i.unslicked||i.slideHandler(e,!0)})},r.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,(!1===e.options.fade?e.$slideTrack:e.$slides.eq(i)).css(t)},r.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},r.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},r.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},r.prototype.buildArrows=function(){var i=this;!0===i.options.arrows&&(i.$prevArrow=a(i.options.prevArrow).addClass("slick-arrow"),i.$nextArrow=a(i.options.nextArrow).addClass("slick-arrow"),i.slideCount>i.options.slidesToShow?(i.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),i.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.prependTo(i.options.appendArrows),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.appendTo(i.options.appendArrows),!0!==i.options.infinite&&i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):i.$prevArrow.add(i.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},r.prototype.buildDots=function(){var i,e,t=this;if(!0===t.options.dots&&t.slideCount>t.options.slidesToShow){for(t.$slider.addClass("slick-dotted"),e=a("<ul />").addClass(t.options.dotsClass),i=0;i<=t.getDotCount();i+=1)e.append(a("<li />").append(t.options.customPaging.call(this,t,i)));t.$dots=e.appendTo(t.options.appendDots),t.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},r.prototype.buildOut=function(){var i=this;i.$slides=i.$slider.children(i.options.slide+":not(.slick-cloned)").addClass("slick-slide"),i.slideCount=i.$slides.length,i.$slides.each(function(i,e){a(e).attr("data-slick-index",i).data("originalStyling",a(e).attr("style")||"")}),i.$slider.addClass("slick-slider"),i.$slideTrack=0===i.slideCount?a('<div class="slick-track"/>').appendTo(i.$slider):i.$slides.wrapAll('<div class="slick-track"/>').parent(),i.$list=i.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),i.$slideTrack.css("opacity",0),!0!==i.options.centerMode&&!0!==i.options.swipeToSlide||(i.options.slidesToScroll=1),a("img[data-lazy]",i.$slider).not("[src]").addClass("slick-loading"),i.setupInfinite(),i.buildArrows(),i.buildDots(),i.updateDots(),i.setSlideClasses("number"==typeof i.currentSlide?i.currentSlide:0),!0===i.options.draggable&&i.$list.addClass("draggable")},r.prototype.buildRows=function(){var i,e,t,o=this,s=document.createDocumentFragment(),n=o.$slider.children();if(1<o.options.rows){for(t=o.options.slidesPerRow*o.options.rows,e=Math.ceil(n.length/t),i=0;i<e;i++){for(var r=document.createElement("div"),l=0;l<o.options.rows;l++){for(var d=document.createElement("div"),a=0;a<o.options.slidesPerRow;a++){var c=i*t+(l*o.options.slidesPerRow+a);n.get(c)&&d.appendChild(n.get(c))}r.appendChild(d)}s.appendChild(r)}o.$slider.empty().append(s),o.$slider.children().children().children().css({width:100/o.options.slidesPerRow+"%",display:"inline-block"})}},r.prototype.checkResponsive=function(i,e){var t,o,s,n=this,r=!1,l=n.$slider.width(),d=window.innerWidth||a(window).width();if("window"===n.respondTo?s=d:"slider"===n.respondTo?s=l:"min"===n.respondTo&&(s=Math.min(d,l)),n.options.responsive&&n.options.responsive.length&&null!==n.options.responsive){for(t in o=null,n.breakpoints)n.breakpoints.hasOwnProperty(t)&&(!1===n.originalSettings.mobileFirst?s<n.breakpoints[t]&&(o=n.breakpoints[t]):s>n.breakpoints[t]&&(o=n.breakpoints[t]));null!==o?null!==n.activeBreakpoint&&o===n.activeBreakpoint&&!e||(n.activeBreakpoint=o,"unslick"===n.breakpointSettings[o]?n.unslick(o):(n.options=a.extend({},n.originalSettings,n.breakpointSettings[o]),!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i)),r=o):null!==n.activeBreakpoint&&(n.activeBreakpoint=null,n.options=n.originalSettings,!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i),r=o),i||!1===r||n.$slider.trigger("breakpoint",[n,r])}},r.prototype.changeSlide=function(i,e){var t,o=this,s=a(i.currentTarget);switch(s.is("a")&&i.preventDefault(),s.is("li")||(s=s.closest("li")),t=o.slideCount%o.options.slidesToScroll!=0?0:(o.slideCount-o.currentSlide)%o.options.slidesToScroll,i.data.message){case"previous":n=0==t?o.options.slidesToScroll:o.options.slidesToShow-t,o.slideCount>o.options.slidesToShow&&o.slideHandler(o.currentSlide-n,!1,e);break;case"next":n=0==t?o.options.slidesToScroll:t,o.slideCount>o.options.slidesToShow&&o.slideHandler(o.currentSlide+n,!1,e);break;case"index":var n=0===i.data.index?0:i.data.index||s.index()*o.options.slidesToScroll;o.slideHandler(o.checkNavigable(n),!1,e),s.children().trigger("focus");break;default:return}},r.prototype.checkNavigable=function(i){var e=this.getNavigableIndexes(),t=0;if(i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},r.prototype.cleanUpEvents=function(){var i=this;i.options.dots&&null!==i.$dots&&a("li",i.$dots).off("click.slick",i.changeSlide).off("mouseenter.slick",a.proxy(i.interrupt,i,!0)).off("mouseleave.slick",a.proxy(i.interrupt,i,!1)),i.$slider.off("focus.slick blur.slick"),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow&&i.$prevArrow.off("click.slick",i.changeSlide),i.$nextArrow&&i.$nextArrow.off("click.slick",i.changeSlide)),i.$list.off("touchstart.slick mousedown.slick",i.swipeHandler),i.$list.off("touchmove.slick mousemove.slick",i.swipeHandler),i.$list.off("touchend.slick mouseup.slick",i.swipeHandler),i.$list.off("touchcancel.slick mouseleave.slick",i.swipeHandler),i.$list.off("click.slick",i.clickHandler),a(document).off(i.visibilityChange,i.visibility),i.cleanUpSlideEvents(),!0===i.options.accessibility&&i.$list.off("keydown.slick",i.keyHandler),!0===i.options.focusOnSelect&&a(i.$slideTrack).children().off("click.slick",i.selectHandler),a(window).off("orientationchange.slick.slick-"+i.instanceUid,i.orientationChange),a(window).off("resize.slick.slick-"+i.instanceUid,i.resize),a("[draggable!=true]",i.$slideTrack).off("dragstart",i.preventDefault),a(window).off("load.slick.slick-"+i.instanceUid,i.setPosition)},r.prototype.cleanUpSlideEvents=function(){var i=this;i.$list.off("mouseenter.slick",a.proxy(i.interrupt,i,!0)),i.$list.off("mouseleave.slick",a.proxy(i.interrupt,i,!1))},r.prototype.cleanUpRows=function(){var i;1<this.options.rows&&((i=this.$slides.children().children()).removeAttr("style"),this.$slider.empty().append(i))},r.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},r.prototype.destroy=function(i){var e=this;e.autoPlayClear(),e.touchObject={},e.cleanUpEvents(),a(".slick-cloned",e.$slider).detach(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.$prevArrow.length&&(e.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove()),e.$nextArrow&&e.$nextArrow.length&&(e.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove()),e.$slides&&(e.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.detach(),e.$list.detach(),e.$slider.append(e.$slides)),e.cleanUpRows(),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$slider.removeClass("slick-dotted"),e.unslicked=!0,i||e.$slider.trigger("destroy",[e])},r.prototype.disableTransition=function(i){var e={};e[this.transitionType]="",(!1===this.options.fade?this.$slideTrack:this.$slides.eq(i)).css(e)},r.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},r.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},r.prototype.filterSlides=r.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},r.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(i){i.stopImmediatePropagation();var e=a(this);setTimeout(function(){t.options.pauseOnFocus&&(t.focussed=e.is(":focus"),t.autoPlay())},0)})},r.prototype.getCurrent=r.prototype.slickCurrentSlide=function(){return this.currentSlide},r.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},r.prototype.getLeft=function(i){var e,t=this,o=0;return t.slideOffset=0,e=t.$slides.first().outerHeight(!0),!0===t.options.infinite?(t.slideCount>t.options.slidesToShow&&(t.slideOffset=t.slideWidth*t.options.slidesToShow*-1,o=e*t.options.slidesToShow*-1),t.slideCount%t.options.slidesToScroll!=0&&i+t.options.slidesToScroll>t.slideCount&&t.slideCount>t.options.slidesToShow&&(o=i>t.slideCount?(t.slideOffset=(t.options.slidesToShow-(i-t.slideCount))*t.slideWidth*-1,(t.options.slidesToShow-(i-t.slideCount))*e*-1):(t.slideOffset=t.slideCount%t.options.slidesToScroll*t.slideWidth*-1,t.slideCount%t.options.slidesToScroll*e*-1))):i+t.options.slidesToShow>t.slideCount&&(t.slideOffset=(i+t.options.slidesToShow-t.slideCount)*t.slideWidth,o=(i+t.options.slidesToShow-t.slideCount)*e),t.slideCount<=t.options.slidesToShow&&(o=t.slideOffset=0),!0===t.options.centerMode&&!0===t.options.infinite?t.slideOffset+=t.slideWidth*Math.floor(t.options.slidesToShow/2)-t.slideWidth:!0===t.options.centerMode&&(t.slideOffset=0,t.slideOffset+=t.slideWidth*Math.floor(t.options.slidesToShow/2)),e=!1===t.options.vertical?i*t.slideWidth*-1+t.slideOffset:i*e*-1+o,!0===t.options.variableWidth&&(o=t.slideCount<=t.options.slidesToShow||!1===t.options.infinite?t.$slideTrack.children(".slick-slide").eq(i):t.$slideTrack.children(".slick-slide").eq(i+t.options.slidesToShow),e=!0===t.options.rtl?o[0]?-1*(t.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===t.options.centerMode&&(o=t.slideCount<=t.options.slidesToShow||!1===t.options.infinite?t.$slideTrack.children(".slick-slide").eq(i):t.$slideTrack.children(".slick-slide").eq(i+t.options.slidesToShow+1),e=!0===t.options.rtl?o[0]?-1*(t.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(t.$list.width()-o.outerWidth())/2)),e},r.prototype.getOption=r.prototype.slickGetOption=function(i){return this.options[i]},r.prototype.getNavigableIndexes=function(){for(var i=this,e=0,t=0,o=[],s=!1===i.options.infinite?i.slideCount:(e=-1*i.options.slidesToScroll,t=-1*i.options.slidesToScroll,2*i.slideCount);e<s;)o.push(e),e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;return o},r.prototype.getSlick=function(){return this},r.prototype.getSlideCount=function(){var t,o=this,s=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0;return!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(i,e){if(e.offsetLeft-s+a(e).outerWidth()/2>-1*o.swipeLeft)return t=e,!1}),Math.abs(a(t).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},r.prototype.goTo=r.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},r.prototype.init=function(i){var e=this;a(e.$slider).hasClass("slick-initialized")||(a(e.$slider).addClass("slick-initialized"),e.buildRows(),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.updateArrows(),e.updateDots(),e.checkResponsive(!0),e.focusHandler()),i&&e.$slider.trigger("init",[e]),!0===e.options.accessibility&&e.initADA(),e.options.autoplay&&(e.paused=!1,e.autoPlay())},r.prototype.initADA=function(){var e=this;e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),e.$slideTrack.attr("role","listbox"),e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(i){a(this).attr({role:"option","aria-describedby":"slick-slide"+e.instanceUid+i})}),null!==e.$dots&&e.$dots.attr("role","tablist").find("li").each(function(i){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+e.instanceUid+i,id:"slick-slide"+e.instanceUid+i})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),e.activateADA()},r.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide))},r.prototype.initDotEvents=function(){var i=this;!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&a("li",i.$dots).on("click.slick",{message:"index"},i.changeSlide),!0===i.options.dots&&!0===i.options.pauseOnDotsHover&&a("li",i.$dots).on("mouseenter.slick",a.proxy(i.interrupt,i,!0)).on("mouseleave.slick",a.proxy(i.interrupt,i,!1))},r.prototype.initSlideEvents=function(){var i=this;i.options.pauseOnHover&&(i.$list.on("mouseenter.slick",a.proxy(i.interrupt,i,!0)),i.$list.on("mouseleave.slick",a.proxy(i.interrupt,i,!1)))},r.prototype.initializeEvents=function(){var i=this;i.initArrowEvents(),i.initDotEvents(),i.initSlideEvents(),i.$list.on("touchstart.slick mousedown.slick",{action:"start"},i.swipeHandler),i.$list.on("touchmove.slick mousemove.slick",{action:"move"},i.swipeHandler),i.$list.on("touchend.slick mouseup.slick",{action:"end"},i.swipeHandler),i.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},i.swipeHandler),i.$list.on("click.slick",i.clickHandler),a(document).on(i.visibilityChange,a.proxy(i.visibility,i)),!0===i.options.accessibility&&i.$list.on("keydown.slick",i.keyHandler),!0===i.options.focusOnSelect&&a(i.$slideTrack).children().on("click.slick",i.selectHandler),a(window).on("orientationchange.slick.slick-"+i.instanceUid,a.proxy(i.orientationChange,i)),a(window).on("resize.slick.slick-"+i.instanceUid,a.proxy(i.resize,i)),a("[draggable!=true]",i.$slideTrack).on("dragstart",i.preventDefault),a(window).on("load.slick.slick-"+i.instanceUid,i.setPosition)},r.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},r.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},r.prototype.lazyLoad=function(){var i,e,o=this;function t(i){a("img[data-lazy]",i).each(function(){var i=a(this),e=a(this).attr("data-lazy"),t=document.createElement("img");t.onload=function(){i.animate({opacity:0},100,function(){i.attr("src",e).animate({opacity:1},200,function(){i.removeAttr("data-lazy").removeClass("slick-loading")}),o.$slider.trigger("lazyLoaded",[o,i,e])})},t.onerror=function(){i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),o.$slider.trigger("lazyLoadError",[o,i,e])},t.src=e})}!0===o.options.centerMode?e=!0===o.options.infinite?(i=o.currentSlide+(o.options.slidesToShow/2+1))+o.options.slidesToShow+2:(i=Math.max(0,o.currentSlide-(o.options.slidesToShow/2+1)),o.options.slidesToShow/2+1+2+o.currentSlide):(i=o.options.infinite?o.options.slidesToShow+o.currentSlide:o.currentSlide,e=Math.ceil(i+o.options.slidesToShow),!0===o.options.fade&&(0<i&&i--,e<=o.slideCount&&e++)),t(o.$slider.find(".slick-slide").slice(i,e)),o.slideCount<=o.options.slidesToShow?t(o.$slider.find(".slick-slide")):o.currentSlide>=o.slideCount-o.options.slidesToShow?t(o.$slider.find(".slick-cloned").slice(0,o.options.slidesToShow)):0===o.currentSlide&&t(o.$slider.find(".slick-cloned").slice(-1*o.options.slidesToShow))},r.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},r.prototype.next=r.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},r.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},r.prototype.pause=r.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},r.prototype.play=r.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},r.prototype.postSlide=function(i){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),!0===e.options.accessibility&&e.initADA())},r.prototype.prev=r.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},r.prototype.preventDefault=function(i){i.preventDefault()},r.prototype.progressiveLazyLoad=function(i){i=i||1;var e,t,o=this,s=a("img[data-lazy]",o.$slider);s.length?(e=s.first(),t=e.attr("data-lazy"),(s=document.createElement("img")).onload=function(){e.attr("src",t).removeAttr("data-lazy").removeClass("slick-loading"),!0===o.options.adaptiveHeight&&o.setPosition(),o.$slider.trigger("lazyLoaded",[o,e,t]),o.progressiveLazyLoad()},s.onerror=function(){i<3?setTimeout(function(){o.progressiveLazyLoad(i+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),o.$slider.trigger("lazyLoadError",[o,e,t]),o.progressiveLazyLoad())},s.src=t):o.$slider.trigger("allImagesLoaded",[o])},r.prototype.refresh=function(i){var e=this,t=e.slideCount-e.options.slidesToShow;!e.options.infinite&&e.currentSlide>t&&(e.currentSlide=t),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),t=e.currentSlide,e.destroy(!0),a.extend(e,e.initials,{currentSlide:t}),e.init(),i||e.changeSlide({data:{message:"index",index:t}},!1)},r.prototype.registerBreakpoints=function(){var i,e,t,o=this,s=o.options.responsive||null;if(!0===Array.isArray(s)&&s.length){for(i in o.respondTo=o.options.respondTo||"window",s)if(t=o.breakpoints.length-1,e=s[i].breakpoint,s.hasOwnProperty(i)){for(;0<=t;)o.breakpoints[t]&&o.breakpoints[t]===e&&o.breakpoints.splice(t,1),t--;o.breakpoints.push(e),o.breakpointSettings[e]=s[i].settings}o.breakpoints.sort(function(i,e){return o.options.mobileFirst?i-e:e-i})}},r.prototype.reinit=function(){var i=this;i.$slides=i.$slideTrack.children(i.options.slide).addClass("slick-slide"),i.slideCount=i.$slides.length,i.currentSlide>=i.slideCount&&0!==i.currentSlide&&(i.currentSlide=i.currentSlide-i.options.slidesToScroll),i.slideCount<=i.options.slidesToShow&&(i.currentSlide=0),i.registerBreakpoints(),i.setProps(),i.setupInfinite(),i.buildArrows(),i.updateArrows(),i.initArrowEvents(),i.buildDots(),i.updateDots(),i.initDotEvents(),i.cleanUpSlideEvents(),i.initSlideEvents(),i.checkResponsive(!1,!0),!0===i.options.focusOnSelect&&a(i.$slideTrack).children().on("click.slick",i.selectHandler),i.setSlideClasses("number"==typeof i.currentSlide?i.currentSlide:0),i.setPosition(),i.focusHandler(),i.paused=!i.options.autoplay,i.autoPlay(),i.$slider.trigger("reInit",[i])},r.prototype.resize=function(){var i=this;a(window).width()!==i.windowWidth&&(clearTimeout(i.windowDelay),i.windowDelay=window.setTimeout(function(){i.windowWidth=a(window).width(),i.checkResponsive(),i.unslicked||i.setPosition()},50))},r.prototype.removeSlide=r.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),(!0===t?o.$slideTrack.children():o.$slideTrack.children(this.options.slide).eq(i)).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},r.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled||(!(s={})===o.cssTransitions?s[o.animType]="translate("+e+", "+t+")":s[o.animType]="translate3d("+e+", "+t+", 0px)"),o.$slideTrack.css(s)},r.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},r.prototype.setFade=function(){var t,o=this;o.$slides.each(function(i,e){t=o.slideWidth*i*-1,!0===o.options.rtl?a(e).css({position:"relative",right:t,top:0,zIndex:o.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:t,top:0,zIndex:o.options.zIndex-2,opacity:0})}),o.$slides.eq(o.currentSlide).css({zIndex:o.options.zIndex-1,opacity:1})},r.prototype.setHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.css("height",i))},r.prototype.setOption=r.prototype.slickSetOption=function(){var i,e,t,o,s,n=this,r=!1;if("object"===a.type(arguments[0])?(t=arguments[0],r=arguments[1],s="multiple"):"string"===a.type(arguments[0])&&(t=arguments[0],o=arguments[1],r=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?s="responsive":void 0!==arguments[1]&&(s="single")),"single"===s)n.options[t]=o;else if("multiple"===s)a.each(t,function(i,e){n.options[i]=e});else if("responsive"===s)for(e in o)if("array"!==a.type(n.options.responsive))n.options.responsive=[o[e]];else{for(i=n.options.responsive.length-1;0<=i;)n.options.responsive[i].breakpoint===o[e].breakpoint&&n.options.responsive.splice(i,1),i--;n.options.responsive.push(o[e])}r&&(n.unload(),n.reinit())},r.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},r.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},r.prototype.setSlideClasses=function(i){var e,t,o=this,s=o.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true");o.$slides.eq(i).addClass("slick-current"),!0===o.options.centerMode?(t=Math.floor(o.options.slidesToShow/2),!0===o.options.infinite&&(t<=i&&i<=o.slideCount-1-t?o.$slides.slice(i-t,i+t+1).addClass("slick-active").attr("aria-hidden","false"):(e=o.options.slidesToShow+i,s.slice(e-t+1,e+t+2).addClass("slick-active").attr("aria-hidden","false")),0===i?s.eq(s.length-1-o.options.slidesToShow).addClass("slick-center"):i===o.slideCount-1&&s.eq(o.options.slidesToShow).addClass("slick-center")),o.$slides.eq(i).addClass("slick-center")):0<=i&&i<=o.slideCount-o.options.slidesToShow?o.$slides.slice(i,i+o.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):s.length<=o.options.slidesToShow?s.addClass("slick-active").attr("aria-hidden","false"):(t=o.slideCount%o.options.slidesToShow,e=!0===o.options.infinite?o.options.slidesToShow+i:i,(o.options.slidesToShow==o.options.slidesToScroll&&o.slideCount-i<o.options.slidesToShow?s.slice(e-(o.options.slidesToShow-t),e+t):s.slice(e,e+o.options.slidesToShow)).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===o.options.lazyLoad&&o.lazyLoad()},r.prototype.setupInfinite=function(){var i,e,t,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(e=null,o.slideCount>o.options.slidesToShow)){for(t=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,i=o.slideCount;i>o.slideCount-t;--i)e=i-1,a(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(i=0;i<t;i+=1)e=i,a(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},r.prototype.interrupt=function(i){i||this.autoPlay(),this.interrupted=i},r.prototype.selectHandler=function(i){var e=this,i=a(i.target).is(".slick-slide")?a(i.target):a(i.target).parents(".slick-slide"),i=(i=parseInt(i.attr("data-slick-index")))||0;if(e.slideCount<=e.options.slidesToShow)return e.setSlideClasses(i),void e.asNavFor(i);e.slideHandler(i)},r.prototype.slideHandler=function(i,e,t){var o,s,n,r,l=this;if(e=e||!1,(!0!==l.animating||!0!==l.options.waitForAnimate)&&!(!0===l.options.fade&&l.currentSlide===i||l.slideCount<=l.options.slidesToShow))if(!1===e&&l.asNavFor(i),o=i,n=l.getLeft(o),e=l.getLeft(l.currentSlide),l.currentLeft=null===l.swipeLeft?e:l.swipeLeft,!1===l.options.infinite&&!1===l.options.centerMode&&(i<0||i>l.getDotCount()*l.options.slidesToScroll))!1===l.options.fade&&(o=l.currentSlide,!0!==t?l.animateSlide(e,function(){l.postSlide(o)}):l.postSlide(o));else if(!1===l.options.infinite&&!0===l.options.centerMode&&(i<0||i>l.slideCount-l.options.slidesToScroll))!1===l.options.fade&&(o=l.currentSlide,!0!==t?l.animateSlide(e,function(){l.postSlide(o)}):l.postSlide(o));else{if(l.options.autoplay&&clearInterval(l.autoPlayTimer),s=o<0?l.slideCount%l.options.slidesToScroll!=0?l.slideCount-l.slideCount%l.options.slidesToScroll:l.slideCount+o:o>=l.slideCount?l.slideCount%l.options.slidesToScroll!=0?0:o-l.slideCount:o,l.animating=!0,l.$slider.trigger("beforeChange",[l,l.currentSlide,s]),e=l.currentSlide,l.currentSlide=s,l.setSlideClasses(l.currentSlide),l.options.asNavFor&&(r=(r=l.getNavTarget()).slick("getSlick")).slideCount<=r.options.slidesToShow&&r.setSlideClasses(l.currentSlide),l.updateDots(),l.updateArrows(),!0===l.options.fade)return!0!==t?(l.fadeSlideOut(e),l.fadeSlide(s,function(){l.postSlide(s)})):l.postSlide(s),void l.animateHeight();!0!==t?l.animateSlide(n,function(){l.postSlide(s)}):l.postSlide(s)}},r.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},r.prototype.swipeDirection=function(){var i=this,e=i.touchObject.startX-i.touchObject.curX,t=i.touchObject.startY-i.touchObject.curY,e=Math.atan2(t,e),e=Math.round(180*e/Math.PI);return e<0&&(e=360-Math.abs(e)),e<=45&&0<=e||e<=360&&315<=e?!1===i.options.rtl?"left":"right":135<=e&&e<=225?!1===i.options.rtl?"right":"left":!0===i.options.verticalSwiping?35<=e&&e<=135?"down":"up":"vertical"},r.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.interrupted=!1,o.shouldClick=!(10<o.touchObject.swipeLength),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},r.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},r.prototype.swipeMove=function(i){var e,t,o=this,s=void 0!==i.originalEvent?i.originalEvent.touches:null;return!(!o.dragging||s&&1!==s.length)&&(e=o.getLeft(o.currentSlide),o.touchObject.curX=void 0!==s?s[0].pageX:i.clientX,o.touchObject.curY=void 0!==s?s[0].pageY:i.clientY,o.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(o.touchObject.curX-o.touchObject.startX,2))),!0===o.options.verticalSwiping&&(o.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(o.touchObject.curY-o.touchObject.startY,2)))),"vertical"!==(t=o.swipeDirection())?(void 0!==i.originalEvent&&4<o.touchObject.swipeLength&&i.preventDefault(),s=(!1===o.options.rtl?1:-1)*(o.touchObject.curX>o.touchObject.startX?1:-1),!0===o.options.verticalSwiping&&(s=o.touchObject.curY>o.touchObject.startY?1:-1),i=o.touchObject.swipeLength,(o.touchObject.edgeHit=!1)===o.options.infinite&&(0===o.currentSlide&&"right"===t||o.currentSlide>=o.getDotCount()&&"left"===t)&&(i=o.touchObject.swipeLength*o.options.edgeFriction,o.touchObject.edgeHit=!0),!1===o.options.vertical?o.swipeLeft=e+i*s:o.swipeLeft=e+i*(o.$list.height()/o.listWidth)*s,!0===o.options.verticalSwiping&&(o.swipeLeft=e+i*s),!0!==o.options.fade&&!1!==o.options.touchMove&&(!0===o.animating?(o.swipeLeft=null,!1):void o.setCSS(o.swipeLeft))):void 0)},r.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return!(t.touchObject={});void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},r.prototype.unfilterSlides=r.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},r.prototype.unload=function(){var i=this;a(".slick-cloned",i.$slider).remove(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove(),i.$nextArrow&&i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove(),i.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},r.prototype.unslick=function(i){this.$slider.trigger("unslick",[this,i]),this.destroy()},r.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2);!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):(i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode||i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode)&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},r.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},r.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)},a.fn.slick=function(){for(var i,e=this,t=arguments[0],o=Array.prototype.slice.call(arguments,1),s=e.length,n=0;n<s;n++)if("object"==typeof t||void 0===t?e[n].slick=new r(e[n],t):i=e[n].slick[t].apply(e[n].slick,o),void 0!==i)return i;return e}});
var wprpsp_next_arrow='<span class="slick-next slick-arrow" data-role="none" tabindex="0" role="button"><svg fill="currentColor" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg"><title/><path d="M69.8437,43.3876,33.8422,13.3863a6.0035,6.0035,0,0,0-7.6878,9.223l30.47,25.39-30.47,25.39a6.0035,6.0035,0,0,0,7.6878,9.2231L69.8437,52.6106a6.0091,6.0091,0,0,0,0-9.223Z"/></svg></span>',wprpsp_prev_arrow='<span class="slick-prev slick-arrow" data-role="none" tabindex="0" role="button"><svg fill="currentColor" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg"><title/><path d="M39.3756,48.0022l30.47-25.39a6.0035,6.0035,0,0,0-7.6878-9.223L26.1563,43.3906a6.0092,6.0092,0,0,0,0,9.2231L62.1578,82.615a6.0035,6.0035,0,0,0,7.6878-9.2231Z"/></svg></span>';function wprpsp_post_slider_init(){jQuery(".wprpsp-post-slider").each(function(i){var e,o,s,t;jQuery(this).hasClass("slick-initialized")||(e=null,o=jQuery(this).attr("id"),s=jQuery(this).attr("data-slider-nav-for"),t=JSON.parse(jQuery(this).closest(".wprpsp-pro-slider-wrp").attr("data-conf")),1==Wprpsp.is_avada&&jQuery(this).closest(".fusion-flex-container").addClass("wprpsp-fusion-flex"),void 0!==s&&""!=s&&(e="."+s),void 0!==o&&""!=o&&(""!=e&&jQuery(e).on("init",function(i,s){var t=jQuery(e+" .slick-list").innerHeight();jQuery("#"+o+" .wprpsp-post-image-wrap").css("height",t)}),jQuery("#"+o).slick({slidesToShow:1,slidesToScroll:1,asNavFor:e,lazyLoad:t.lazyload,speed:parseInt(t.speed),autoplaySpeed:parseInt(t.autoplay_interval),dots:"true"==t.dots,fade:"true"==t.fade,infinite:"true"==t.infinite,arrows:"true"==t.arrows,autoplay:"true"==t.autoplay,pauseOnHover:"true"==t.hover_pause,pauseOnFocus:"false"!=t.focus_pause,rtl:"true"==t.rtl,centerMode:0<t.centerpadding,centerPadding:t.centerpadding?parseInt(t.centerpadding)+"px":0,nextArrow:wprpsp_next_arrow,prevArrow:wprpsp_prev_arrow})),void 0!==s&&jQuery("."+s).slick({slidesToScroll:1,dots:!1,arrows:!1,centerMode:!1,focusOnSelect:!0,vertical:!0,verticalSwiping:!0,asNavFor:"#"+o,slidesToShow:parseInt(t.nav_slides),responsive:[{breakpoint:736,settings:{slidesToShow:2,slidesToScroll:1,infinite:!0,vertical:!1,centerMode:!0}},{breakpoint:569,settings:{slidesToShow:1,slidesToScroll:1,vertical:!1,centerMode:!0}},{breakpoint:319,settings:{slidesToShow:1,slidesToScroll:1,vertical:!1,centerMode:!0}},{breakpoint:220,settings:{slidesToShow:1,slidesToScroll:1,vertical:!1,centerMode:!0}}]}))})}function wprpsp_post_carousel_slider_init(){jQuery(".wprpsp-recent-post-carousel").each(function(i){var s,t;jQuery(this).hasClass("slick-initialized")||(s=jQuery(this).attr("id"),t=JSON.parse(jQuery(this).closest(".wprpsp-carousel-pro-slider-wrp").attr("data-conf")),1==Wprpsp.is_avada&&jQuery(this).closest(".fusion-flex-container").addClass("wprpsp-fusion-flex"),jQuery("#"+s).slick({lazyLoad:t.lazyload,speed:parseInt(t.speed),autoplaySpeed:parseInt(t.autoplay_interval),slidesToShow:parseInt(t.slides_to_show),slidesToScroll:parseInt(t.slides_to_scroll),dots:"true"==t.dots,infinite:"true"==t.infinite,arrows:"true"==t.arrows,autoplay:"true"==t.autoplay,centerMode:"true"==t.centermode,pauseOnHover:"true"==t.hover_pause,pauseOnFocus:"false"!=t.focus_pause,rtl:"true"==t.rtl,mobileFirst:1==Wprpsp.is_mobile,centerPadding:t.centerpadding?parseInt(t.centerpadding)+"px":0,nextArrow:wprpsp_next_arrow,prevArrow:wprpsp_prev_arrow,responsive:[{breakpoint:1023,settings:{slidesToShow:3<parseInt(t.slides_to_show)?3:parseInt(t.slides_to_show),slidesToScroll:1}},{breakpoint:767,settings:{slidesToShow:2<parseInt(t.slides_to_show)?2:parseInt(t.slides_to_show),slidesToScroll:1}},{breakpoint:479,settings:{slidesToShow:1,slidesToScroll:1,dots:!1}},{breakpoint:319,settings:{slidesToShow:1,slidesToScroll:1,dots:!1}},{breakpoint:220,settings:{slidesToShow:1,slidesToScroll:1,dots:!1}}]}))})}function wprpsp_post_gridbox_slider_init(){jQuery(".wprpsp-gridbox-slider").each(function(i){var s,t;jQuery(this).hasClass("slick-initialized")||(s=jQuery(this).attr("id"),t=JSON.parse(jQuery(this).closest(".wprpsp-gridbox-slider-wrp").attr("data-conf")),1==Wprpsp.is_avada&&jQuery(this).closest(".fusion-flex-container").addClass("wprpsp-fusion-flex"),void 0!==s&&""!=s&&null!=t&&jQuery("#"+s).slick({slidesToShow:1,slidesToScroll:1,lazyLoad:t.lazyload,speed:parseInt(t.speed),autoplaySpeed:parseInt(t.autoplay_interval),dots:"true"==t.dots,infinite:"true"==t.infinite,fade:"true"==t.fade,arrows:"true"==t.arrows,autoplay:"true"==t.autoplay,pauseOnHover:"true"==t.hover_pause,pauseOnFocus:"false"!=t.focus_pause,rtl:"true"==t.rtl,nextArrow:wprpsp_next_arrow,prevArrow:wprpsp_prev_arrow}))})}function wprpsp_widget_post_slider_init(){jQuery(".wprpsp-post-slider-widget").each(function(i){var s,t;jQuery(this).hasClass("slick-initialized")||(s=jQuery(this).attr("id"),t=JSON.parse(jQuery(this).closest(".wprpsp-post-widget-wrp").attr("data-conf")),1==Wprpsp.is_avada&&jQuery(this).closest(".fusion-flex-container").addClass("wprpsp-fusion-flex"),void 0!==s&&""!=s&&null!=t&&jQuery("#"+s).slick({slidesToShow:1,slidesToScroll:1,infinite:!0,lazyLoad:t.lazyload,speed:parseInt(t.speed),autoplaySpeed:parseInt(t.autoplay_interval),dots:"true"==t.dots,arrows:"true"==t.arrows,autoplay:"true"==t.autoplay,pauseOnHover:"true"==t.hover_pause,pauseOnFocus:"false"!=t.focus_pause,rtl:1==Wprpsp.is_rtl,nextArrow:wprpsp_next_arrow,prevArrow:wprpsp_prev_arrow}))})}!function(e){"use strict";wprpsp_post_slider_init(),wprpsp_post_carousel_slider_init(),wprpsp_post_gridbox_slider_init(),wprpsp_widget_post_slider_init(),1==Wprpsp.is_old_browser&&e(".wprpsp-image-fit .wprpsp-post-slides").each(function(i){var s,t=e(this).find(".wprpsp-post-img");void 0!==t&&(s=t.attr("src"),t.closest(".wprpsp-post-image-bg").css({background:"url("+s+") no-repeat top center","background-size":"cover"}),t.hide())}),e(document).on("click",".vc_toggle",function(){var i=e(this).find(".vc_toggle_content .wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");void 0!==s&&""!=s&&e(this).hasClass("slick-initialized")&&e("#"+s).slick("setPosition");s=e(this).attr("data-slider-nav-for");void 0!==s&&""!=s&&e("."+s).slick("setPosition")})}),e(document).on("click",".vc_tta-panel-title",function(){var i=e(this).closest(".vc_tta-panel").find(".wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");void 0!==s&&""!=s&&e(this).hasClass("slick-initialized")&&e("#"+s).slick("setPosition");s=e(this).attr("data-slider-nav-for");void 0!==s&&""!=s&&e("."+s).slick("setPosition")})}),0==Wprpsp.elementor_preview&&e(window).on("elementor/frontend/init",function(){e(".wprpsp-post-slider-init").each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}))},350);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1})},350))})}),e(document).on("click",".elementor-tab-title",function(){var i=e(this).attr("aria-controls"),i=e("#"+i).find(".wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}))},350);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1})},350))})}),e(document).on("click",".sow-accordion-panel",function(){var i=e(this).attr("data-anchor"),i=e("#accordion-content-"+i).find(".wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");void 0!==s&&""!=s&&e("#"+s).slick("setPosition");s=e(this).attr("data-slider-nav-for");void 0!==s&&""!=s&&e("."+s).slick("setPosition")})}),e(document).on("click focus",".sow-tabs-tab",function(){var i=e(this).index(),i=e(this).closest(".sow-tabs").find(".sow-tabs-panel").eq(i).find(".wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}))},300);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1})},300))})}),e(document).on("click",".fl-accordion-button, .fl-tabs-label",function(){var i=e(this).attr("aria-controls"),i=e("#"+i).find(".wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}))},300);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1})},300))})}),e(document).on("click",".et_pb_toggle",function(){var i=e(this).find(".et_pb_toggle_content").find(".wprpsp-post-slider-init");e(i).each(function(i){var s=e(this).attr("id");void 0!==s&&""!=s&&e("#"+s).slick("setPosition");s=e(this).attr("data-slider-nav-for");void 0!==s&&""!=s&&e("."+s).slick("setPosition")})}),e(".et_pb_tabs_controls li a").on("click",function(){var i=e(this).closest(".et_pb_tabs"),s=e(this).closest("li").attr("class"),s=i.find(".et_pb_all_tabs ."+s).find(".wprpsp-post-slider-init");e(s).each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}))},550);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1})},550))})}),e(document).on("click",".fusion-tabs li .tab-link",function(){var i=e(this).closest(".fusion-tabs"),s=e(this).attr("href"),s=i.find(s).find(".wprpsp-post-slider-init");e(s).each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}),e("#"+s).slick("setPosition"))},200);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1}),e("."+t).slick("setPosition")},200))})}),e(document).on("click",".fusion-accordian .panel-heading a",function(){var i=e(this).closest(".fusion-accordian"),s=e(this).attr("href"),s=i.find(s).find(".wprpsp-post-slider-init");e(s).each(function(i){var s=e(this).attr("id");e("#"+s).css({visibility:"hidden",opacity:0}),setTimeout(function(){void 0!==s&&""!=s&&(e("#"+s).slick("setPosition"),e("#"+s).css({visibility:"visible",opacity:1}),e("#"+s).slick("setPosition"))},200);var t=e(this).attr("data-slider-nav-for");void 0!==t&&""!=t&&(e("."+t).css({visibility:"hidden",opacity:0}),setTimeout(function(){e("."+t).slick("setPosition"),e("."+t).css({visibility:"visible",opacity:1}),e("."+t).slick("setPosition")},200))})})}(jQuery);
(function($){
$.fn.extend({
ajaxyLiveSearch: function(options, arg){
if(options&&typeof(options)=='object'){
options=$.extend({}, $.ajaxyLiveSearch.defaults, options);
}else{
options=$.ajaxyLiveSearch.defaults;
}
if(this.is("input")){
this.each(function(){
new $.ajaxyLiveSearch.load(this, options, arg);
});
return;
}}
});
$.ajaxyLiveSearch={
element: null,
timeout: null,
options: null,
load: function(elem, options, arg){
this.element=elem;
this.timeout=null;
this.options=options;
if($(elem).val()==""){
$(elem).val(options.text);
}
$(elem).attr('autocomplete', 'off');
if($('#live-search_sb').length==0){
$('body').append('<div id="live-search_sb" class="live-search_sb" style="position:absolute;display:none;width:'+ options.width + 'px;z-index:9999">'+
'<div class="live-search_sb_cont">' +
'<div class="live-search_sb_top"></div>' +
'<div id="live-search_results" style="width:100%">' +
'<div id="live-search_val" ></div>' +
'<div id="live-search_more"></div>' +
'</div>' +
'<div class="live-search_sb_bottom"></div>' +
'</div>' +
'</div>');
}
$.ajaxyLiveSearch.loadEvents(this);
},
loadResults: function(object){
options=object.options;
elem=object.element;
window.sf_lastElement=elem;
if(jQuery(elem).val()!=""){
jQuery("body").data("live-search_results", null);
var loading="<li class=\"live-search_lnk live-search_more live-search_selected\">"+
"<a id=\"live-search_loading\" href=\"" + options.searchUrl.replace('%s', encodeURI(jQuery(elem).val())) + "\"><i class=\"fa fa-spinner fa-spin\"></i>"+
"</a>"+
"</li>";
jQuery("#live-search_val").html("<ul>"+loading+"</ul>");
var pos=this.bounds(elem, options);
var containerPos=this.bounds('.top-nav .container' , options);
if(!pos){
jQuery("#live-search_sb").hide();
return false;
}
if(Math.ceil(containerPos.left) + parseInt(options.width, 10) > jQuery(window).width()){
jQuery("#live-search_sb").css('width', jQuery(window).width() - containerPos.left - 20);
}
if(jQuery('body').hasClass("rtl") ){
jQuery("#live-search_sb").css({top:pos.bottom, right:containerPos.right});
}else{
jQuery("#live-search_sb").css({top:pos.bottom, right:containerPos.left});
}
jQuery("#live-search_sb").show();
var data={ action: "ajaxy_sf", sf_value: jQuery(elem).val(), search:options.search};
if(options.ajaxData){
data=window[options.ajaxData](data);
}
if(options.search){
var mresults=options.search.split(',');
var results=[];
var m="";
var s=0;
var c=[];
for(var kindex in mresults){
var dm=mresults[kindex].split(":");
if(dm.length==2){
if(dm[1].indexOf(jQuery(elem).val())==0){
results[results.length]=mresults[kindex];
}}else if(dm.length==1){
if(mresults[kindex].indexOf(jQuery(elem).val())==0){
results[results.length]=mresults[kindex];
}}
}
c=$.ajaxyLiveSearch.htmlArrayResults(results);
m +=c[0];
s +=c[1];
var sf_selected="";
if(s==0){
sf_selected=" live-search_selected";
}
m +="<li class=\"live-search_lnk live-search_more" + sf_selected + "\">{total} "+ tie.lang_results_found +"</li>";
m=m.replace(/{search_value_escaped}/g, jQuery(elem).val());
m=m.replace(/{search_url_escaped}/g, options.searchUrl.replace('%s', encodeURI(jQuery(elem).val())));
m=m.replace(/{search_value}/g, jQuery(elem).val());
m=m.replace(/{total}/g, s);
jQuery("body").data("live-search_results", results);
if(s > 0){
jQuery("#live-search_val").html("<ul>"+m+"</ul>");
}else{
jQuery("#live-search_val").html("<ul>"+m+"</ul>");
}
$.ajaxyLiveSearch.loadLiveEvents(object);
jQuery("#live-search_sb").show();
}else{
jQuery.post(options.ajaxUrl, data, function(resp){
var results=eval("("+ resp + ")");
var m="";
var s=0;
for(var mindex in results){
var c=[];
for(var kindex in results[mindex]){
c=$.ajaxyLiveSearch.htmlResults(results[mindex][kindex], mindex, kindex);
m +=c[0];
s +=c[1];
}}
var sf_selected="";
if(s==0){
sf_selected=" live-search_selected";
m +="<li class=\"live-search_lnk live-search_more\">"+ tie.lang_no_results +"</li>";
}else{
if(!options.callback){
m +="<li class=\"live-search_lnk live-search_more\">" + sf_templates + "</li>";
}
m=m.replace(/{search_value_escaped}/g, jQuery(elem).val());
m=m.replace(/{search_url_escaped}/g, options.searchUrl.replace('%s', encodeURI(jQuery(elem).val())));
}
jQuery("body").data("live-search_results", results);
if(s > 0){
jQuery("#live-search_val").html('<ul class="live-search_main">'+m+'</ul>');
}else{
jQuery("#live-search_val").html('<ul class="live-search_main">'+m+'</ul>');
}
$.ajaxyLiveSearch.loadLiveEvents(object);
jQuery("#live-search_sb").show();
});
}}else{
jQuery("#live-search_sb").hide();
}},
bounds: function (elem, options){
var offset=jQuery(elem).offset();
if(offset){
return {top: offset.top, left: offset.left + options.leftOffset, bottom: offset.top +  jQuery(elem).innerHeight() + options.topOffset, right: offset.left - jQuery('#live-search_sb').innerWidth() + jQuery(elem).innerWidth()};}},
htmlResults: function (results, type, array_index){
var m="";
var s=0;
if(typeof(results)!="undefined"){
if(results.all.length > 0){
m +="<li class=\"live-search_header\">" + results.title + "</li><li><div class=\"live-search_result_container\"><ul>";
for(var i=0; i < results.all.length; i ++){
s ++;
m +="<li result-type='object' index-type='" + type + "' index-array='" + array_index + "' index='" + i + "' class=\"live-search_lnk "+results.class_name +"\">"+  $.ajaxyLiveSearch.replaceResults(results.all[i], results.template) + "</li>";
}
m +="</ul></div></li>";
}}
return new Array(m, s);
},
htmlArrayResults: function (results){
var m="";
var s=0;
if(typeof(results)!="undefined"){
if(results.length > 0){
m +="<li><div class=\"live-search_result_container\"><ul>";
for(var i=0; i < results.length; i ++){
var md=results[i].split(':');
var title="";
if(md.length==2){
title=md[1];
}else{
title=results[i];
}
s ++;
m +="<li result-type='array' index='" + i + "' class=\"live-search_lnk live-search_category\"><a href='javascript:;'>" + title + "</a></li>";
}
m +="</ul></div></li>";
}}
return new Array(m, s);
},
replaceResults: function (results, template){
for(var s in results){
template=template.replace(new RegExp("{"+s+"}", "g"), results[s]);
}
return template;
},
loadLiveEvents: function(object){
var d={object: object};
jQuery("#live-search_val li.live-search_lnk").mouseover(function(){
jQuery(".live-search_lnk").each(function(){ jQuery(this).attr("class",jQuery(this).attr("class").replace(" live-search_selected" , "")); });
jQuery(this).attr("class", jQuery(this).attr("class") + " live-search_selected");
});
if(d.object.options.callback){
jQuery("#live-search_val li.live-search_lnk").click(function(event){
try{
window[d.object.options.callback](d.object, this);
}catch(e){
alert(e);
}
return false;
});
}},
loadEvents: function(object){
var d={object: object};
jQuery(document).click(function(){ jQuery("#live-search_sb").hide(); });
jQuery(window).resize(function(){
var pos=$.ajaxyLiveSearch.bounds(window.sf_lastElement, d.object.options);
if(pos){
jQuery("#live-search_sb").css({top:pos.bottom, left:pos.left});
}});
jQuery(object.element).keyup(function(event){
if(event.keyCode!="38"&&event.keyCode!="40"&&event.keyCode!="13"&&event.keyCode!="27"&&event.keyCode!="39"&&event.keyCode!="37"){
var ajaxyObject=d.object;
if(ajaxyObject.timeout!=null){
clearTimeout(ajaxyObject.timeout);
}
jQuery(ajaxyObject.element).attr("class", jQuery(ajaxyObject.element).attr("class").replace(" live-search_focused", "") + " live-search_focused");
var l={object:d.object};
ajaxyObject.timeout=setTimeout(function(){ jQuery.ajaxyLiveSearch.loadResults(l.object); }, d.object.options.delay);
}});
jQuery(window).keydown(function(event){
if(jQuery("#live-search_sb").css("display")!="none"&&jQuery("#live-search_sb").css("display")!="undefined"&&jQuery("#live-search_sb").length > 0){
if(event.keyCode=="38"||event.keyCode=="40"){
if(jQuery.browser.webkit){
jQuery("#live-search_sb").focus();
}
var s_item=null;
var after_s_item=null;
var s_sel=false;
var all_items=jQuery("#live-search_val li.live-search_lnk");
var s_found=false;
event.stopPropagation();
event.preventDefault();
for(var i=0; i < all_items.length; i++){
if(jQuery(all_items[i]).attr("class").indexOf("live-search_selected") >=0&&s_found==false){
s_sel=true;
if(i < all_items.length - 1&&event.keyCode=="40"){
jQuery(all_items[i]).attr("class",jQuery(all_items[i]).attr("class").replace(" live-search_selected", ""));
jQuery(all_items[i+1]).attr("class", jQuery(all_items[i+1]).attr("class")+ " live-search_selected");
i=i+1;
s_found=true;
}
else if(i > 0&&event.keyCode=="38"){
jQuery(all_items[i]).attr("class",jQuery(all_items[i]).attr("class").replace(" live-search_selected", ""));
jQuery(all_items[i-1]).attr("class", jQuery(all_items[i-1]).attr("class")+ " live-search_selected");
i=i+1;
s_found=true;
}}else{
jQuery(all_items[i]).attr("class",jQuery(all_items[i]).attr("class").replace(" live-search_selected", ""));
}}
if(s_sel==false){
if(all_items.length > 0){
jQuery(all_items[0]).attr("class", jQuery(all_items[0]).attr("class")+ " live-search_selected");
}}
}
else if(event.keyCode==27){
jQuery("#live-search_sb").hide();
}
else if(event.keyCode==13){
var b=jQuery("#live-search_val li.live-search_selected a").attr("href");
if(typeof(b)!='undefined'&&b!=''){
if(d.object.options.callback){
d.object.options.callback(this);
}else{
window.location.href=b;
}
return false;
}else{
if(d.object.options.callback){
d.object.options.callback(this);
}
else if(d.object.element!=null){
window.location.href=sf_url.replace('%s', encodeURI(jQuery(d.object).val()));
}
return false;
}}
}});
jQuery(object.element).focus(function (){
if(jQuery(this).val()==d.object.options.text){
jQuery(this).val('');
jQuery(this).attr('class', jQuery(this).attr('class') + ' live-search_focused');
}
if(d.object.options.expand > 0){
jQuery(d.object.element).animate({width:d.object.options.iwidth});
}});
jQuery(object.element).blur(function (){
if(jQuery(this).val()==''){
jQuery(this).val(d.object.options.text);
jQuery(this).attr('class', jQuery(this).attr('class').replace(/ sf_focused/g, ''));
}
if(d.object.options.expand > 0){
jQuery(d.object.element).animate({width:d.object.options.expand});
}});
}};
$.ajaxyLiveSearch.defaults={
delay:500,
leftOffset: 0,
topOffset: 5,
text: "Search For",
iwidth: 180,
width: 315,
ajaxUrl: "",
ajaxData: false,
searchUrl: "",
expand: false,
callback: false,
search: false
};})(jQuery);
function sf_addItem(search, title, name, name_type, value){
var items=jQuery(search).find('.live-search_ajaxy-selective-item');
var exists=false;
var key="";
var md=value.split(':');
if(md.length==2){
key=md[0];
}else{
key=value;
}
if(items.length > 0){
for(var i=0; i < items.length; i ++){
if(jQuery(items[i]).find('input.live-search_ajaxy-selective-close-hidden').val()==key){
exists=true;
break;
}}
}
if(exists){
jQuery(search).find(".live-search_ajaxy-selective-input").val("");
jQuery('#live-search_sb').hide();
return;
}
var mds=title.split(':');
if(mds.length==2){
title=md[1];
}
var added_item=jQuery('<span class="live-search_ajaxy-selective-item">' + title + '<a class="live-search_ajaxy-selective-close">X</a><input class="live-search_ajaxy-selective-close-hidden" type="hidden" name="' + name + '" value="' + key + '" /></span>');
if(items.length <=0){
jQuery(search).prepend(added_item);
}else{
added_item.insertAfter(items[items.length - 1]);
}
added_item.click(function(){
jQuery(this).remove();
});
var input=jQuery(search).find(".live-search_ajaxy-selective-input");
if(input){
input.val("");
if(name_type!='array'){
input.css('visibility', 'hidden');
}else{
input.focus();
}}
jQuery('#live-search_sb').hide();
};
(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",t&&clearTimeout(t),t=setTimeout(function(){jQuery.event.handle.apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var u=["width","height"],v=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=u.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&v.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b=Math.round(b+this.offset.left),c=Math.round(c+this.offset.top);var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(l)return;var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a,n);l=!0};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0],s=p&&p.$el,t;while(!s||!s.length){t=this.styleQueue[o++];if(!t)return;s=t.$el}var u=parseFloat(getComputedStyle(s[0])[r]);u>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),v.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var w=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){w("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){w("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);
(function(c,K,C){c.fn.responsiveSlides=function(m){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},m);return this.each(function(){C++;var f=c(this),u,t,v,n,q,r,p=0,e=f.children(),D=e.length,h=parseFloat(a.speed),E=parseFloat(a.timeout),w=parseFloat(a.maxwidth),g=a.namespace,d=g+C,F=g+"_nav "+d+"_nav",x=g+"_here",k=d+"_on",
y=d+"_s",l=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),z={"float":"left",position:"relative",opacity:1,zIndex:2},A={"float":"none",position:"absolute",opacity:0,zIndex:1},G=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;u=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<u.length;c++)if("string"===typeof b[u[c]+a])return!0;return!1}(),B=function(b){a.before(b);G?(e.removeClass(k).css(A).eq(b).addClass(k).css(z),
p=b,setTimeout(function(){a.after(b)},h)):e.stop().fadeOut(h,function(){c(this).removeClass(k).css(A).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(k).css(z);a.after(b);p=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-.5}),f.empty().append(e));e.each(function(a){this.id=y+a});f.addClass(g+" "+d);m&&m.maxwidth&&f.css("max-width",w);e.hide().css(A).eq(0).addClass(k).css(z).show();G&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+
h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.length){if(E<h+100)return;if(a.pager&&!a.manualControls){var H=[];e.each(function(a){a+=1;H+="<li><a href='#' class='"+y+a+"'>"+a+"</a></li>"});l.append(H);m.navContainer?c(a.navContainer).append(l):f.after(l)}a.manualControls&&(l=c(a.manualControls),l.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&l.find("li").each(function(a){c(this).addClass(y+(a+1))});if(a.pager||a.manualControls)r=
l.find("a"),t=function(a){r.closest("li").removeClass(x).eq(a).addClass(x)};a.auto&&(v=function(){q=setInterval(function(){e.stop(!0,!0);var b=p+1<D?p+1:0;(a.pager||a.manualControls)&&t(b);B(b)},E)},v());n=function(){a.auto&&(clearInterval(q),v())};a.pause&&f.hover(function(){clearInterval(q)},function(){n()});if(a.pager||a.manualControls)r.bind("click",function(b){b.preventDefault();a.pauseControls||n();b=r.index(this);p===b||c("."+k).queue("fx").length||(t(b),B(b))}).eq(0).closest("li").addClass(x),
a.pauseControls&&r.hover(function(){clearInterval(q)},function(){n()});if(a.nav){g="<a href='#' class='"+F+" prev'>"+a.prevText+"</a><a href='#' class='"+F+" next'>"+a.nextText+"</a>";m.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),I=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+k);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<D?p+1:0;B(c(this)[0]===I[0]?b:d);(a.pager||a.manualControls)&&t(c(this)[0]===I[0]?b:d);a.pauseControls||n()}});
a.pauseControls&&d.hover(function(){clearInterval(q)},function(){n()})}}if("undefined"===typeof document.body.style.maxWidth&&m.maxwidth){var J=function(){f.css("width","100%");f.width()>w&&f.css("width",w)};J();c(K).bind("resize",function(){J()})}})}})(jQuery,this,0);