Your IP : 216.73.216.46


Current Path : /home/megadansyp/www/t3-assets/js/
Upload File :
Current File : /home/megadansyp/www/t3-assets/js/js-fb394-56392.js


/*===============================
/media/jui/js/ajax-chosen.min.js
================================================================================*/;

(function($){return $.fn.ajaxChosen=function(settings,callback,chosenOptions){var chosenXhr,defaultOptions,options,select;if(settings==null){settings={};}
if(callback==null){callback={};}
if(chosenOptions==null){chosenOptions=function(){};}
defaultOptions={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term",keepTypingMsg:Joomla.JText._('JGLOBAL_KEEP_TYPING'),lookingForMsg:Joomla.JText._('JGLOBAL_LOOKING_FOR')};select=this;chosenXhr=null;options=$.extend({},defaultOptions,$(select).data(),settings);this.chosen(chosenOptions?chosenOptions:{});return this.each(function(){return $(this).next('.chzn-container').find(".search-field > input, .chzn-search > input").bind('keyup',function(){var field,msg,success,untrimmed_val,val;untrimmed_val=$(this).attr('value');val=$.trim($(this).attr('value'));msg=val.length<options.minTermLength?options.keepTypingMsg:options.lookingForMsg+(" '"+val+"'");select.next('.chzn-container').find('.no-results').text(msg);if(val===$(this).data('prevVal')){return false;}
$(this).data('prevVal',val);if(this.timer){clearTimeout(this.timer);}
if(val.length<options.minTermLength){return false;}
field=$(this);if(!(options.data!=null)){options.data={};}
options.data[options.jsonTermKey]=val;if(options.dataCallback!=null){options.data=options.dataCallback(options.data);}
success=options.success;options.success=function(data){var items,selected_values;if(!(data!=null)){return;}
selected_values=[];select.find('option').each(function(){if(!$(this).is(":selected")){return $(this).remove();}else{return selected_values.push($(this).val()+"-"+$(this).text());}});select.find('optgroup:empty').each(function(){return $(this).remove();});items=callback(data);$.each(items,function(i,element){var group,text,value;if(element.group){group=select.find("optgroup[label='"+element.text+"']");if(!group.size()){group=$("<optgroup />");}
group.attr('label',element.text).appendTo(select);return $.each(element.items,function(i,element){var text,value;if(typeof element==="string"){value=i;text=element;}else{value=element.value;text=element.text;}
if($.inArray(value+"-"+text,selected_values)===-1){return $("<option />").attr('value',value).html(text).appendTo(group);}});}else{if(typeof element==="string"){value=i;text=element;}else{value=element.value;text=element.text;}
if($.inArray(value+"-"+text,selected_values)===-1){return $("<option />").attr('value',value).html(text).appendTo(select);}}});if(Object.keys(items).length){select.trigger("liszt:updated");}else{select.data().chosen.no_results_clear();select.data().chosen.no_results(field.attr('value'));}
if(success!=null){success(data);}
return field.attr('value',untrimmed_val);};return this.timer=setTimeout(function(){if(chosenXhr){chosenXhr.abort();}
return chosenXhr=$.ajax(options);},options.afterTypeDelay);});});};})(jQuery);


/*===============================
/media/system/js/polyfill.classlist.js
================================================================================*/;
(function(){"defineProperty"in Object&&function(){try{var t={};return Object.defineProperty(t,"test",{value:42}),!0}catch(e){return!1}}()||!function(t){var e=Object.prototype.hasOwnProperty("__defineGetter__"),n="Getters & setters cannot be defined on this javascript engine",o="A property cannot both have accessors and be writable or have a value";Object.defineProperty=function(r,i,c){if(t&&(r===window||r===document||r===Element.prototype||r instanceof Element))return t(r,i,c);if(null===r||!(r instanceof Object||"object"==typeof r))throw new TypeError("Object must be an object (Object.defineProperty polyfill)");if(!(c instanceof Object))throw new TypeError("Descriptor must be an object (Object.defineProperty polyfill)");var a=String(i),u="value"in c||"writable"in c,p="get"in c&&typeof c.get,l="set"in c&&typeof c.set;if(p){if("function"!==p)throw new TypeError("Getter expected a function (Object.defineProperty polyfill)");if(!e)throw new TypeError(n);if(u)throw new TypeError(o);r.__defineGetter__(a,c.get)}else r[a]=c.value;if(l){if("function"!==l)throw new TypeError("Setter expected a function (Object.defineProperty polyfill)");if(!e)throw new TypeError(n);if(u)throw new TypeError(o);r.__defineSetter__(a,c.set)}return"value"in c&&(r[a]=c.value),r}}(Object.defineProperty);var t=function(){function t(t){if(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(t))return String(t);throw new Error("InvalidCharacterError: DOM Exception 5")}function e(t){for(var e,n=-1,o={};e=t[++n];)o[e]=!0;return o}function n(t,e){var n,o=[];for(n in e)e[n]&&o.push(n);[].splice.apply(t,[0,t.length].concat(o))}var o=function(){};return o.prototype={constructor:o,item:function(t){return this[parseFloat(t)]||null},length:Array.prototype.length,toString:function(){return[].join.call(this," ")},add:function(){for(var o,r=e(this),i=0;i in arguments;++i)o=t(arguments[i]),r[o]=!0;n(this,r)},contains:function(t){return t in e(this)},remove:function(){for(var o,r=e(this),i=0;i in arguments;++i)o=t(arguments[i]),r[o]=!1;n(this,r)},toggle:function(o){var r=e(this),i=1 in arguments?!arguments[1]:t(o)in r;return r[o]=!i,n(this,r),!i}},o}();"Document"in this||(this.HTMLDocument?this.Document=this.HTMLDocument:(this.Document=this.HTMLDocument=document.constructor=new Function("return function Document() {}")(),this.Document.prototype=document)),"Element"in this&&"HTMLElement"in this||!function(){function t(){return l--||clearTimeout(e),document.body&&!document.body.prototype&&/(complete|interactive)/.test(document.readyState)?(a(document,!0),e&&document.body.prototype&&clearTimeout(e),!!document.body.prototype):!1}if(window.Element&&!window.HTMLElement)return void(window.HTMLElement=window.Element);window.Element=window.HTMLElement=new Function("return function Element() {}")();var e,n=document.appendChild(document.createElement("body")),o=n.appendChild(document.createElement("iframe")),r=o.contentWindow.document,i=Element.prototype=r.appendChild(r.createElement("*")),c={},a=function(t,e){var n,o,r,i=t.childNodes||[],u=-1;if(1===t.nodeType&&t.constructor!==Element){t.constructor=Element;for(n in c)o=c[n],t[n]=o}for(;r=e&&i[++u];)a(r,e);return t},u=document.getElementsByTagName("*"),p=document.createElement,l=100;i.attachEvent("onpropertychange",function(t){for(var e,n=t.propertyName,o=!c.hasOwnProperty(n),r=i[n],a=c[n],p=-1;e=u[++p];)1===e.nodeType&&(o||e[n]===a)&&(e[n]=r);c[n]=r}),i.constructor=Element,i.hasAttribute||(i.hasAttribute=function(t){return null!==this.getAttribute(t)}),t(!0)||(document.onreadystatechange=t,e=setInterval(t,25)),document.createElement=function(t){var e=p(String(t).toLowerCase());return a(e)},document.removeChild(n)}(),"document"in this&&"classList"in document.documentElement||Object.defineProperty(Element.prototype,"classList",{configurable:!0,get:function(){function e(){var t="object"==typeof r.className?r.className.baseVal:r.className;[].splice.apply(o,[0,o.length].concat((t||"").replace(/^\s+|\s+$/g,"").split(/\s+/)))}function n(){r.attachEvent&&r.detachEvent("onpropertychange",e),"object"==typeof r.className?r.className.baseVal=i.toString.call(o):r.className=i.toString.call(o),r.attachEvent&&r.attachEvent("onpropertychange",e)}var o,r=this,i=t.prototype,c=function(){};return c.prototype=new t,c.prototype.item=function(){return e(),i.item.apply(o,arguments)},c.prototype.toString=function(){return e(),i.toString.apply(o,arguments)},c.prototype.add=function(){return e(),i.add.apply(o,arguments),n()},c.prototype.contains=function(){return e(),i.contains.apply(o,arguments)},c.prototype.remove=function(){return e(),i.remove.apply(o,arguments),n()},c.prototype.toggle=function(t){return e(),t=i.toggle.apply(o,arguments),n(),t},o=new c,r.attachEvent&&r.attachEvent("onpropertychange",e),o}})}).call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});


/*===============================
/media/system/js/polyfill.map.js
================================================================================*/;
(function(a){"map"in Array.prototype||(Array.prototype.map=function(c){if(this===a||null===this)throw new TypeError(this+" is not an object");if(!(c instanceof Function))throw new TypeError(c+" is not a function");for(var d=Object(this),e=arguments[1],f=d instanceof String?d.split(""):d,g=Math.max(Math.min(f.length,9007199254740991),0)||0,h=-1,i=[];++h<g;)h in f&&(i[h]=c.call(e,f[h],h,d));return i})}).call("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});


/*===============================
/media/system/js/fields/calendar-locales/fr.js
================================================================================*/;
window.JoomlaCalLocale={today:"Aujourd'hui",weekend:[0,6],wk:"wk",time:"Heure&nbsp;:",days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],shortDays:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],shortMonths:["Jan","Fév","Mar","Avr","Mai","Jui","Juol","Aoû","Sep","Oct","Nov","Déc"],AM:"AM",PM:"PM",am:"am",pm:"pm",dateType:"gregorian",minYear:1900,maxYear:2100,exit:"Fermer",save:"Effacer"};


/*===============================
/media/system/js/fields/calendar-locales/date/gregorian/date-helper.min.js
================================================================================*/;
!function(t){"use strict";t.SECOND=1e3,t.MINUTE=60*t.SECOND,t.HOUR=60*t.MINUTE,t.DAY=24*t.HOUR,t.WEEK=7*t.DAY,t.prototype.setLocalDateOnly=function(e,a){if("gregorian"!=e)return"";var r=new t(a);this.setDate(1),this.setFullYear(r.getFullYear()),this.setMonth(r.getMonth()),this.setDate(r.getDate())},t.prototype.setLocalDate=function(t,e){return"gregorian"!=t?"":this.setDate(e)},t.prototype.setLocalMonth=function(t,e,a){return"gregorian"!=t?"":(void 0==a&&this.getDate(),this.setMonth(e))},t.prototype.setOtherFullYear=function(e,a){if("gregorian"!=e)return"";var r=new t(this);return r.setFullYear(a),r.getMonth()!=this.getMonth()&&this.setDate(28),this.setUTCFullYear(a)},t.prototype.setLocalFullYear=function(e,a){if("gregorian"!=e)return"";var r=new t(this);return r.setFullYear(a),r.getMonth()!=this.getMonth()&&this.setDate(28),this.setFullYear(a)},t.prototype.getLocalWeekDays=function(t,e){return 6},t.prototype.getOtherFullYear=function(t){return"gregorian"!=t?"":this.getFullYear()},t.prototype.getLocalFullYear=function(t){return"gregorian"!=t?"":this.getFullYear()},t.prototype.getLocalMonth=function(t){return"gregorian"!=t?"":this.getMonth()},t.prototype.getLocalDate=function(t){return"gregorian"!=t?"":this.getDate()},t.prototype.getLocalDay=function(t){return"gregorian"!=t?"":this.getDay()},t.prototype.getLocalMonthDays=function(t,e){if("gregorian"!=t)return"";var a=this.getFullYear();return void 0===e&&(e=this.getMonth()),0!=a%4||0==a%100&&0!=a%400||1!=e?[31,28,31,30,31,30,31,31,30,31,30,31][e]:29},t.prototype.getLocalWeekNumber=function(e){if("gregorian"!=e)return"";var a=new t(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),r=a.getDay();a.setDate(a.getDate()-(r+6)%7+3);var o=a.valueOf();return a.setMonth(0),a.setDate(4),Math.round((o-a.valueOf())/6048e5)+1},t.prototype.getLocalDayOfYear=function(e){if("gregorian"!=e)return"";var a=new t(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0)-new t(this.getFullYear(),0,0,0,0,0);return Math.floor(a/t.DAY)},t.prototype.equalsTo=function(t){return this.getFullYear()==t.getFullYear()&&this.getMonth()==t.getMonth()&&this.getDate()==t.getDate()&&this.getHours()==t.getHours()&&this.getMinutes()==t.getMinutes()},t.localCalToGregorian=function(t,e,a){return""},t.gregorianToLocalCal=function(t,e,a){return""},t.parseFieldDate=function(e,a,r){"gregorian"!=r&&(e=t.toEnglish(e));var o=new t,n=0,s=-1,i=0,l=e.split(/\W+/),g=a.match(/%./g),u=0,h=0,c=0,p=0,f=0;for(u=0;u<l.length;++u)if(l[u])switch(g[u]){case"%d":case"%e":i=parseInt(l[u],10);break;case"%m":s=parseInt(l[u],10)-1;break;case"%Y":case"%y":(n=parseInt(l[u],10))<100&&(n+=n>29?1900:2e3);break;case"%b":case"%B":for(h=0;h<12;++h)if(JoomlaCalLocale.months[h].substr(0,l[u].length).toLowerCase()==l[u].toLowerCase()){s=h;break}break;case"%H":case"%I":case"%k":case"%l":c=parseInt(l[u],10);break;case"%P":case"%p":/pm/i.test(l[u])&&c<12?c+=12:/am/i.test(l[u])&&c>=12&&(c-=12);break;case"%M":p=parseInt(l[u],10);break;case"%S":f=parseInt(l[u],10)}if(isNaN(n)&&(n=o.getFullYear()),isNaN(s)&&(s=o.getMonth()),isNaN(i)&&(i=o.getDate()),isNaN(c)&&(c=o.getHours()),isNaN(p)&&(p=o.getMinutes()),isNaN(f)&&(f=o.getSeconds()),0!=n&&-1!=s&&0!=i)return new t(n,s,i,c,p,f);for(n=0,s=-1,i=0,u=0;u<l.length;++u)if(-1!=l[u].search(/[a-zA-Z]+/)){var D=-1;for(h=0;h<12;++h)if(JoomlaCalLocale.months[h].substr(0,l[u].length).toLowerCase()==l[u].toLowerCase()){D=h;break}-1!=D&&(-1!=s&&(i=s+1),s=D)}else parseInt(l[u],10)<=12&&-1==s?s=l[u]-1:parseInt(l[u],10)>31&&0==n?(n=parseInt(l[u],10))<100&&(n+=n>29?1900:2e3):0==i&&(i=l[u]);return 0==n&&(n=o.getFullYear()),-1!=s&&0!=i?new t(n,s,i,c,p,f):o},t.prototype.print=function(e,a,r){if("string"!=typeof a&&(e=""),a||(a="gregorian"),"string"!=typeof e&&(e=""),!e)return"";if("NaN"==this.getLocalDate(a)||!this.getLocalDate(a))return"";var o=this.getLocalMonth(a),n=this.getLocalDate(a),s=this.getLocalFullYear(a),i=this.getLocalWeekNumber(a),l=this.getDay(),g={},u=this.getHours(),h=u>=12,c=h?u-12:u,p=this.getLocalDayOfYear(a);0==c&&(c=12);var f=this.getMinutes(),D=this.getSeconds();g["%a"]=JoomlaCalLocale.shortDays[l],g["%A"]=JoomlaCalLocale.days[l],g["%b"]=JoomlaCalLocale.shortMonths[o],g["%B"]=JoomlaCalLocale.months[o],g["%C"]=1+Math.floor(s/100),g["%d"]=n<10?"0"+n:n,g["%e"]=n,g["%H"]=u<10?"0"+u:u,g["%I"]=c<10?"0"+c:c,g["%j"]=p<100?p<10?"00"+p:"0"+p:p,g["%k"]=u,g["%l"]=c,g["%m"]=o<9?"0"+(1+o):1+o,g["%M"]=f<10?"0"+f:f,g["%n"]="\n",g["%p"]=h?JoomlaCalLocale.PM:JoomlaCalLocale.AM,g["%P"]=h?JoomlaCalLocale.pm:JoomlaCalLocale.am,g["%s"]=Math.floor(this.getTime()/1e3),g["%S"]=D<10?"0"+D:D,g["%t"]="\t",g["%U"]=g["%W"]=g["%V"]=i<10?"0"+i:i,g["%u"]=l+1,g["%w"]=l,g["%y"]=(""+s).substr(2,2),g["%Y"]=s,g["%%"]="%";var L=/%./g,M=e.replace(L,function(t){return g[t]||t});return"[object Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers)&&"gregorian"!=a&&r&&(M=t.convertNumbers(M)),M}}(Date);



/*===============================
/media/system/js/fields/calendar.min.js
================================================================================*/;
!(function(window,document){'use strict';Date.convertNumbers=function(str){var str=str.toString();if(Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers)==='[object Array]'){for(var i=0;i<JoomlaCalLocale.localLangNumbers.length;i++){str=str.replace(new RegExp(i,'g'),JoomlaCalLocale.localLangNumbers[i])}}
return str};Date.toEnglish=function(str){str=this.toString();var nums=[0,1,2,3,4,5,6,7,8,9];for(var i=0;i<10;i++){str=str.replace(new RegExp(nums[i],'g'),i)}
return str};var JoomlaCalendar=function(element){if(!element){throw new Error("Calendar setup failed:\n  No valid element found, Please check your code")}
if(typeof Date.parseFieldDate!=='function'){throw new Error("Calendar setup failed:\n  No valid date helper, Please check your code")}
if(element._joomlaCalendar){throw new Error('JoomlaCalendar instance already exists for the element')}
element._joomlaCalendar=this;this.writable=!0;this.hidden=!0;this.params={};this.element=element;this.inputField=element.getElementsByTagName('input')[0];this.button=element.getElementsByTagName('button')[0];if(!this.inputField){throw new Error("Calendar setup failed:\n  No valid input found, Please check your code")}
this.params={debug:!1,clicked:!1,element:{style:{display:"none"}},writable:!0};var self=this,btn=this.button,instanceParams={inputField:this.inputField,dateType:JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:'gregorian',direction:(document.dir!==undefined)?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"),firstDayOfWeek:btn.getAttribute("data-firstday")?parseInt(btn.getAttribute("data-firstday")):0,dateFormat:"%Y-%m-%d %H:%M:%S",weekend:JoomlaCalLocale.weekend?JoomlaCalLocale.weekend:[0,6],minYear:JoomlaCalLocale.minYear?JoomlaCalLocale.minYear:1900,maxYear:JoomlaCalLocale.maxYear?JoomlaCalLocale.maxYear:2100,minYearTmp:btn.getAttribute("data-min-year"),maxYearTmp:btn.getAttribute("data-max-year"),weekendTmp:btn.getAttribute("data-weekend"),time24:!0,showsOthers:(parseInt(btn.getAttribute("data-show-others"))===1)?!0:!1,showsTime:!0,weekNumbers:(parseInt(btn.getAttribute("data-week-numbers"))===1)?!0:!1,showsTodayBtn:!0,compressedHeader:(parseInt(btn.getAttribute("data-only-months-nav"))===1)?!0:!1,};if(btn.getAttribute("data-dayformat")){instanceParams.dateFormat=btn.getAttribute("data-dayformat")?btn.getAttribute("data-dayformat"):"%Y-%m-%d %H:%M:%S"}
if(btn.getAttribute("data-time-24")){instanceParams.time24=parseInt(btn.getAttribute("data-time-24"))===24?!0:!1}
if(btn.getAttribute("data-show-time")){instanceParams.showsTime=parseInt(btn.getAttribute("data-show-time"))===1?!0:!1}
if(btn.getAttribute("data-today-btn")){instanceParams.showsTodayBtn=parseInt(btn.getAttribute("data-today-btn"))===1?!0:!1}
for(var param in instanceParams){this.params[param]=instanceParams[param]}
if(isInt(self.params.minYearTmp)){self.params.minYear=getBoundary(parseInt(self.params.minYearTmp),self.params.dateType)}
if(isInt(self.params.maxYearTmp)){self.params.maxYear=getBoundary(parseInt(self.params.maxYearTmp),self.params.dateType)}
if(self.params.weekendTmp!=="undefined"){self.params.weekend=self.params.weekendTmp.split(',').map(function(item){return parseInt(item,10)})}
this._dayMouseDown=function(event){return self._handleDayMouseDown(event)};this._calKeyEvent=function(event){return self._handleCalKeyEvent(event)};this._documentClick=function(event){return self._handleDocumentClick(event)};this.checkInputs();if(this.inputField.getAttribute('readonly')){return}
this._create();this._bindEvents()};JoomlaCalendar.prototype.checkInputs=function(){var inputAltValueDate=Date.parseFieldDate(this.inputField.getAttribute('data-alt-value'),this.params.dateFormat,'gregorian');if(this.inputField.value!==''){this.date=inputAltValueDate;this.inputField.value=inputAltValueDate.print(this.params.dateFormat,this.params.dateType,!0)}else{this.date=new Date()}};JoomlaCalendar.prototype.recreate=function(){var element=this.element,el=element.querySelector('.js-calendar');if(el){element._joomlaCalendar=null;el.parentNode.removeChild(el);new JoomlaCalendar(element)}};JoomlaCalendar.prototype.updateTime=function(hours,mins,secs){var self=this,date=self.date;var d=self.date.getLocalDate(self.params.dateType),m=self.date.getLocalMonth(self.params.dateType),y=self.date.getLocalFullYear(self.params.dateType),ampm=this.inputField.parentNode.parentNode.querySelectorAll('.time-ampm')[0];if(!self.params.time24){if(/pm/i.test(ampm.value)&&hours<12){hours=parseInt(hours)+12}else if(/am/i.test(ampm.value)&&hours==12){hours=0}}
date.setHours(hours);date.setMinutes(parseInt(mins,10));date.setSeconds(date.getSeconds());date.setLocalFullYear(self.params.dateType,y);date.setLocalMonth(self.params.dateType,m);date.setLocalDate(self.params.dateType,d);self.dateClicked=!1;this.callHandler()};JoomlaCalendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this.date=date;this.processCalendar(this.params.firstDayOfWeek,date)}};JoomlaCalendar.prototype.moveCursorBy=function(step){var date=new Date(this.date);date.setDate(date.getDate()-step);this.setDate(date)};JoomlaCalendar.prototype.resetSelected=function(element){var options=element.options;var i=options.length;while(i--){var current=options[i];if(current.selected){current.selected=!1}}};JoomlaCalendar.prototype.callHandler=function(){this.inputField.setAttribute('data-alt-value',this.date.print(this.params.dateFormat,'gregorian',!1));if(this.inputField.getAttribute('data-alt-value')&&this.inputField.getAttribute('data-alt-value')!=='0000-00-00 00:00:00'){this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0);if(this.params.dateType!=='gregorian'){this.inputField.setAttribute('data-local-value',this.date.print(this.params.dateFormat,this.params.dateType,!0))}}
this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0);if(typeof this.inputField.onchange=="function"){this.inputField.onchange()}
if(this.dateClicked&&typeof this.params.onUpdate==="function"){this.params.onUpdate(this)}
if(this.dateClicked){this.close()}else{this.processCalendar()}};JoomlaCalendar.prototype.close=function(){this.hide()};JoomlaCalendar.prototype.show=function(){if(navigator.appName.indexOf("Internet Explorer")!==-1){var badBrowser=(navigator.appVersion.indexOf("MSIE 9")===-1&&navigator.appVersion.indexOf("MSIE 1")===-1);if(badBrowser){if(window.jQuery&&jQuery().chosen){var selItems=this.element.getElementsByTagName('select');for(var i=0;i<selItems.length;i++){jQuery(selItems[i]).chosen('destroy')}}}}
this.checkInputs();this.inputField.focus();this.dropdownElement.style.display="block";this.hidden=!1;document.addEventListener("keydown",this._calKeyEvent,!0);document.addEventListener("keypress",this._calKeyEvent,!0);document.addEventListener("mousedown",this._documentClick,!0);var containerTmp=this.element.querySelector('.js-calendar');if((window.innerHeight+window.scrollY)<containerTmp.getBoundingClientRect().bottom+20){containerTmp.style.marginTop=-(containerTmp.getBoundingClientRect().height+this.inputField.getBoundingClientRect().height)+"px"}
this.processCalendar()};JoomlaCalendar.prototype.hide=function(){document.removeEventListener("keydown",this._calKeyEvent,!0);document.removeEventListener("keypress",this._calKeyEvent,!0);document.removeEventListener("mousedown",this._documentClick,!0);this.dropdownElement.style.display="none";this.hidden=!0};JoomlaCalendar.prototype._handleDocumentClick=function(ev){var el=ev.target;if(el!==null&&!el.classList.contains('time')){for(;el!==null&&el!==this.element;el=el.parentNode);}
if(el===null){document.activeElement.blur();this.hide();return stopCalEvent(ev)}};JoomlaCalendar.prototype._handleDayMouseDown=function(ev){var self=this,el=ev.currentTarget,target=ev.target||ev.srcElement;if(target&&target.hasAttribute('data-action')){return}
if(el.nodeName!=='TD'){var testel=el.getParent('TD');if(testel.nodeName==='TD'){el=testel}else{el=el.getParent('TD');if(el.classList.contains('js-calendar')){el=el.getElementsByTagName('table')[0]}}}else{if(!(target.classList.contains('js-btn'))&&!el.classList.contains('day')&&!el.classList.contains('title')){return}}
if(!el||el.disabled){return!1}
if(typeof el.navtype==="undefined"||el.navtype!==300){if(el.navtype===50){el._current=el.innerHTML}
if(target===el||target.parentNode===el){self.cellClick(el,ev)}
var mon=null;if(typeof el.month!=="undefined"){mon=el}
if(typeof el.parentNode.month!=="undefined"){mon=el.parentNode}
var date=null;if(mon){date=new Date(self.date);if(mon.month!==date.getLocalMonth(self.params.dateType)){date.setLocalMonth(self.params.dateType,mon.month);self.setDate(date);self.dateClicked=!1;this.callHandler()}}else{var year=null;if(typeof el.year!=="undefined"){year=target}
if(typeof el.parentNode.year!=="undefined"){year=target.parentNode}
if(year){date=new Date(self.date);if(year.year!==date.getLocalFullYear(self.params.dateType)){date.setFullYear(self.params.dateType,year.year);self.setDate(date);self.dateClicked=!1;this.callHandler()}}}}
return stopCalEvent(ev)};JoomlaCalendar.prototype.cellClick=function(el,ev){var self=this,closing=!1,newdate=!1,date=null;if(typeof el.navtype==="undefined"){if(self.currentDateEl){el.classList.add("selected");self.currentDateEl=el.caldate;closing=(self.currentDateEl===el.caldate);if(!closing){self.currentDateEl=el.caldate}}
self.date.setLocalDateOnly('gregorian',el.caldate);var other_month=!(self.dateClicked=!el.otherMonth);if(self.currentDateEl){newdate=!el.disabled}
if(other_month){this.processCalendar()}}else{date=new Date(self.date);self.dateClicked=!1;var year=date.getOtherFullYear(self.params.dateType),mon=date.getLocalMonth(self.params.dateType);switch(el.navtype){case 400:break;case-2:if(!self.params.compressedHeader){if(year>self.params.minYear){date.setOtherFullYear(self.params.dateType,year-1)}}
break;case-1:var day=date.getLocalDate(self.params.dateType);if(mon>0){var max=date.getLocalMonthDays(self.params.dateType,mon-1);if(day>max){date.setLocalDate(self.params.dateType,max)}
date.setLocalMonth(self.params.dateType,mon-1)}else if(year-->self.params.minYear){date.setOtherFullYear(self.params.dateType,year);var max=date.getLocalMonthDays(self.params.dateType,11);if(day>max){date.setLocalDate(self.params.dateType,max)}
date.setLocalMonth(self.params.dateType,11)}
break;case 1:var day=date.getLocalDate(self.params.dateType);if(mon<11){var max=date.getLocalMonthDays(self.params.dateType,mon+1);if(day>max){date.setLocalDate(self.params.dateType,max)}
date.setLocalMonth(self.params.dateType,mon+1)}else if(year<self.params.maxYear){date.setOtherFullYear(self.params.dateType,year+1);var max=date.getLocalMonthDays(self.params.dateType,0);if(day>max){date.setLocalDate(self.params.dateType,max)}
date.setLocalMonth(self.params.dateType,0)}
break;case 2:if(!self.params.compressedHeader)
if(year<self.params.maxYear){date.setOtherFullYear(self.params.dateType,year+1)}
break;case 0:break}
if(!date.equalsTo(self.date)){this.setDate(date);newdate=!0}else if(el.navtype===0){newdate=closing=!0}}
if(newdate){if(self.params.showsTime){this.dateClicked=!1}
ev&&this.callHandler()}
el.classList.remove("hilite");if(closing&&!self.params.showsTime){self.dateClicked=!1;ev&&this.close()}};JoomlaCalendar.prototype._handleCalKeyEvent=function(ev){var self=this,K=ev.keyCode;if(ev.target===this.inputField&&(K===13||K===9)){this.close()}
if(self.params.direction==='rtl'){if(K===37){K=39}else if(K===39){K=37}}
if(K===32){if(ev.shiftKey){ev.preventDefault();this.cellClick(self._nav_now,ev);self.close()}}
if(K===27){this.close()}
if(K===38){this.moveCursorBy(7)}
if(K===40){this.moveCursorBy(-7)}
if(K===37){this.moveCursorBy(1)}
if(K===39){this.moveCursorBy(-1)}
if(ev.target===this.inputField&&!(K>48||K<57||K===186||K===189||K===190||K===32)){return stopCalEvent(ev)}};JoomlaCalendar.prototype._create=function(){var self=this,parent=this.element,table=createElement("table"),div=createElement("div");this.table=table;table.className='table';table.cellSpacing=0;table.cellPadding=0;table.style.marginBottom=0;this.dropdownElement=div;parent.appendChild(div);if(this.params.direction){div.style.direction=this.params.direction}
div.className='js-calendar';div.style.position="absolute";div.style.boxShadow="0px 0px 70px 0px rgba(0,0,0,0.67)";div.style.minWidth=this.inputField.width;div.style.padding='0';div.style.display="none";div.style.left="auto";div.style.top="auto";div.style.zIndex=1060;div.style.borderRadius="20px";this.wrapper=createElement('div');this.wrapper.className='calendar-container';div.appendChild(this.wrapper);this.wrapper.appendChild(table);var thead=createElement("thead",table);thead.className='calendar-header';var cell=null,row=null,cal=this,hh=function(text,cs,navtype,node,styles,classes,attributes){node=node?node:"td";styles=styles?styles:{};cell=createElement(node,row);if(cs){classes=classes?'class="'+classes+'"':'';cell.colSpan=cs}
for(var key in styles){cell.style[key]=styles[key]}
for(var key in attributes){cell.setAttribute(key,attributes[key])}
if(navtype!==0&&Math.abs(navtype)<=2){cell.className+=" nav"}
if(cs){cell.addEventListener("mousedown",self._dayMouseDown,!0)}
cell.calendar=cal;cell.navtype=navtype;if(navtype!==0&&Math.abs(navtype)<=2){cell.innerHTML="<a "+classes+" style='display:inline;padding:2px 6px;cursor:pointer;text-decoration:none;' unselectable='on'>"+text+"</a>"}else{cell.innerHTML=cs?"<div unselectable='on'"+classes+">"+text+"</div>":text;if(!cs&&classes){cell.className=classes}}
return cell};if(this.params.compressedHeader===!1){row=createElement("tr",thead);row.className="calendar-head-row";this._nav_py=hh("&lsaquo;",1,-2,'',{"text-align":"center","font-size":"18px","line-height":"18px"},'js-btn btn-prev-year');this.title=hh('<div style="text-align:center;font-size:18px"><span></span></div>',this.params.weekNumbers?6:5,300);this.title.className="title";this._nav_ny=hh(" &rsaquo;",1,2,'',{"text-align":"center","font-size":"18px","line-height":"18px"},'js-btn btn-next-year')}
row=createElement("tr",thead);row.className="calendar-head-row";this._nav_pm=hh("&lsaquo;",1,-1,'',{"text-align":"center","font-size":"2em","line-height":"1em"},'js-btn btn-prev-month');this._nav_month=hh('<div style="text-align:center;font-size:1.2em"><span></span></div>',this.params.weekNumbers?6:5,888,'td',{'textAlign':'center'});this._nav_month.className="title";this._nav_nm=hh(" &rsaquo;",1,1,'',{"text-align":"center","font-size":"2em","line-height":"1em"},'js-btn btn-next-month');row=createElement("tr",thead);row.className=self.params.weekNumbers?"daynames wk":"daynames";if(this.params.weekNumbers){cell=createElement("td",row);cell.className="day-name wn";cell.innerHTML=JoomlaCalLocale.wk}
for(var i=7;i>0;--i){cell=createElement("td",row);if(!i){cell.calendar=self}}
this.firstdayname=(this.params.weekNumbers)?row.firstChild.nextSibling:row.firstChild;var fdow=this.params.firstDayOfWeek,cell=this.firstdayname,weekend=JoomlaCalLocale.weekend;for(var i=0;i<7;++i){var realday=(i+fdow)%7;cell.classList.add("day-name");this.params.weekNumbers?cell.classList.add('day-name-week'):'';if(i){cell.calendar=self;cell.fdow=realday}
if(weekend.indexOf(weekend)!==-1){cell.classList.add("weekend")}
cell.innerHTML=JoomlaCalLocale.shortDays[(i+fdow)%7];cell=cell.nextSibling}
var tbody=createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=createElement("tr",tbody);if(this.params.weekNumbers){cell=createElement("td",row)}
for(var j=7;j>0;--j){cell=createElement("td",row);cell.calendar=this;cell.addEventListener("mousedown",this._dayMouseDown,!0)}}
if(this.params.showsTime){row=createElement("tr",tbody);row.className="time";cell=createElement("td",row);cell.className="time time-title";cell.colSpan=1;cell.style.verticalAlign='middle';cell.innerHTML=" ";var cell1=createElement("td",row);cell1.className="time hours-select";cell1.colSpan=2;var cell2=createElement("td",row);cell2.className="time minutes-select";cell2.colSpan=2;(function(){function makeTimePart(className,selected,range_start,range_end,cellTml){var part=createElement("select",cellTml),num;part.calendar=self;part.className=className;part.setAttribute('data-chosen',!0);part.style.width='100%';part.navtype=50;part._range=[];for(var i=range_start;i<=range_end;++i){var txt,selAttr='';if(i===selected){selAttr=!0}
if(i<10&&range_end>=10){num='0'+i;txt=Date.convertNumbers('0')+Date.convertNumbers(i)}else{num=''+i;txt=''+Date.convertNumbers(i)}
part.options.add(new Option(txt,num,selAttr,selAttr))}
return part}
var hrs=self.date.getHours(),mins=self.date.getMinutes(),t12=!self.params.time24,pm=(self.date.getHours()>12);if(t12&&pm){hrs-=12}
var H=makeTimePart("time time-hours",hrs,t12?1:0,t12?12:23,cell1),M=makeTimePart("time time-minutes",mins,0,59,cell2),AP=null;cell=createElement("td",row);cell.className="time ampm-select";cell.colSpan=self.params.weekNumbers?1:2;if(t12){var selAttr=!0,altDate=Date.parseFieldDate(self.inputField.getAttribute('data-alt-value'),self.params.dateFormat,'gregorian');pm=(altDate.getHours()>=12);var part=createElement("select",cell);part.className="time-ampm";part.style.width='100%';part.options.add(new Option(JoomlaCalLocale.PM,"pm",pm?selAttr:'',pm?selAttr:''));part.options.add(new Option(JoomlaCalLocale.AM,"am",pm?'':selAttr,pm?'':selAttr));AP=part;AP.addEventListener("change",function(event){self.updateTime(event.target.parentNode.parentNode.childNodes[1].childNodes[0].value,event.target.parentNode.parentNode.childNodes[2].childNodes[0].value,event.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}else{cell.innerHTML="&#160;";cell.colSpan=self.params.weekNumbers?3:2}
H.addEventListener("change",function(event){self.updateTime(event.target.parentNode.parentNode.childNodes[1].childNodes[0].value,event.target.parentNode.parentNode.childNodes[2].childNodes[0].value,event.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1);M.addEventListener("change",function(event){self.updateTime(event.target.parentNode.parentNode.childNodes[1].childNodes[0].value,event.target.parentNode.parentNode.childNodes[2].childNodes[0].value,event.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)})()}
row=createElement("div",this.wrapper);row.className="buttons-wrapper btn-group";this._nav_save=hh(JoomlaCalLocale.save,'',100,'button','','js-btn btn btn-clear',{"type":"button","data-action":"clear"});if(!this.inputField.hasAttribute('required')){var savea=row.querySelector('[data-action="clear"]');savea.addEventListener("click",function(e){e.preventDefault();var days=self.table.querySelectorAll('td');for(var i=0;i<days.length;i++){if(days[i].classList.contains('selected')){days[i].classList.remove('selected');break}}
self.inputField.setAttribute('data-alt-value',"0000-00-00 00:00:00");self.inputField.setAttribute('value','');self.inputField.value=''})}
if(this.params.showsTodayBtn){this._nav_now=hh(JoomlaCalLocale.today,'',0,'button','','js-btn btn btn-today',{"type":"button","data-action":"today"});var todaya=this.wrapper.querySelector('[data-action="today"]');todaya.addEventListener('click',function(e){e.preventDefault();self.date.setLocalDateOnly('gregorian',new Date());self.dateClicked=!0;self.callHandler();self.close()})}
this._nav_exit=hh(JoomlaCalLocale.exit,'',999,'button','','js-btn btn btn-exit',{"type":"button","data-action":"exit"});var exita=this.wrapper.querySelector('[data-action="exit"]');exita.addEventListener('click',function(e){e.preventDefault();if(!self.dateClicked){if(self.inputField.value){if(self.params.dateType!=='gregorian'){self.inputField.setAttribute('data-local-value',self.inputField.value)}
if(typeof self.dateClicked==='undefined'){self.inputField.setAttribute('data-alt-value',Date.parseFieldDate(self.inputField.value,self.params.dateFormat,self.params.dateType).print(self.params.dateFormat,'gregorian',!1))}else{self.inputField.setAttribute('data-alt-value',self.date.print(self.params.dateFormat,'gregorian',!1))}}else{self.inputField.setAttribute('data-alt-value','0000-00-00 00:00:00')}
self.date=Date.parseFieldDate(self.inputField.getAttribute('data-alt-value'),self.params.dateFormat,self.params.dateType)}
self.close()});this.processCalendar()};JoomlaCalendar.prototype.processCalendar=function(){this.table.style.visibility="hidden";var firstDayOfWeek=this.params.firstDayOfWeek,date=this.date,today=new Date(),TY=today.getLocalFullYear(this.params.dateType),TM=today.getLocalMonth(this.params.dateType),TD=today.getLocalDate(this.params.dateType),year=date.getOtherFullYear(this.params.dateType),hrs=date.getHours(),mins=date.getMinutes(),secs=date.getSeconds(),t12=!this.params.time24;if(year<this.params.minYear){year=this.params.minYear;date.getOtherFullYear(this.params.dateType,year)}else if(year>this.params.maxYear){year=this.params.maxYear;date.getOtherFullYear(this.params.dateType,year)}
this.params.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getLocalMonth(this.params.dateType);var mday=date.getLocalDate(this.params.dateType);date.setLocalDate(this.params.dateType,1);var day1=(date.getLocalDay(this.params.dateType)-this.params.firstDayOfWeek)%7;if(day1<0){day1+=7}
date.setLocalDate(this.params.dateType,-day1);date.setLocalDate(this.params.dateType,date.getLocalDate(this.params.dateType)+1);var row=this.tbody.firstChild,ar_days=this.ar_days=new Array(),weekend=JoomlaCalLocale.weekend,monthDays=parseInt(date.getLocalWeekDays(this.params.dateType));for(var i=0;i<monthDays;++i,row=row.nextSibling){var cell=row.firstChild;if(this.params.weekNumbers){cell.className="day wn";cell.innerHTML=date.getLocalWeekNumber(this.params.dateType);cell=cell.nextSibling}
row.className=this.params.weekNumbers?"daysrow wk":"daysrow";var hasdays=!1,iday,dpos=ar_days[i]=[],totalDays=monthDays+1;for(var j=0;j<totalDays;++j,cell=cell.nextSibling,date.setLocalDate(this.params.dateType,iday+1)){cell.className="day";cell.style.textAlign='center';iday=date.getLocalDate(this.params.dateType);var wday=date.getLocalDay(this.params.dateType);cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getLocalMonth(this.params.dateType)===month);if(!current_month){if(this.params.showsOthers){cell.className+=" disabled othermonth ";cell.otherMonth=!0}else{cell.className+=" emptycell";cell.innerHTML="&#160;";cell.disabled=!0;continue}}else{cell.otherMonth=!1;hasdays=!0;cell.style.cursor="pointer"}
cell.disabled=!1;cell.innerHTML=this.params.debug?iday:Date.convertNumbers(iday);if(!cell.disabled){cell.caldate=new Date(date);if(current_month&&iday===mday){cell.className+=" selected";this.currentDateEl=cell}
if(date.getLocalFullYear(this.params.dateType)===TY&&date.getLocalMonth(this.params.dateType)===TM&&iday===TD){cell.className+=" today"}
if(weekend.indexOf(wday)!==-1)
cell.className+=" weekend"}}
if(!(hasdays||this.params.showsOthers)){row.style.display='none';row.className="emptyrow"}else{row.style.display=''}}
if(this.params.showsTime){if(hrs>12&&t12){hrs-=12}
hrs=(hrs<10)?"0"+hrs:hrs;mins=(mins<10)?"0"+mins:mins;var hoursEl=this.table.querySelector('.time-hours'),minsEl=this.table.querySelector('.time-minutes');this.resetSelected(hoursEl);if(!this.params.time24)
{hoursEl.value=(hrs=="00")?"12":hrs}
else{hoursEl.value=hrs}
this.resetSelected(minsEl);minsEl.value=mins;if(!this.params.time24)
{var dateAlt=new Date(this.inputField.getAttribute('data-alt-value')),ampmEl=this.table.querySelector('.time-ampm'),hrsAlt=dateAlt.getHours();if(hrsAlt>12){this.resetSelected(ampmEl);ampmEl.value='pm'}}}
if(!this.params.compressedHeader){this._nav_month.getElementsByTagName('span')[0].innerHTML=this.params.debug?month+' '+JoomlaCalLocale.months[month]:JoomlaCalLocale.months[month];this.title.getElementsByTagName('span')[0].innerHTML=this.params.debug?year+' '+Date.convertNumbers(year.toString()):Date.convertNumbers(year.toString())}else{var tmpYear=Date.convertNumbers(year.toString());this._nav_month.getElementsByTagName('span')[0].innerHTML=!this.params.monthBefore?JoomlaCalLocale.months[month]+' - '+tmpYear:tmpYear+' - '+JoomlaCalLocale.months[month]}
this.table.style.visibility="visible"};JoomlaCalendar.prototype._bindEvents=function(){var self=this;this.inputField.addEventListener('blur',function(event){var calObj=JoomlaCalendar.getCalObject(this)._joomlaCalendar;if(calObj.dropdownElement.style.display==='block'){event.preventDefault();return}
if(calObj){if(calObj.inputField.value){if(typeof calObj.params.dateClicked==='undefined'){calObj.inputField.setAttribute('data-local-value',calObj.inputField.value);if(calObj.params.dateType!=='gregorian'){var ndate,date=Date.parseFieldDate(calObj.inputField.value,calObj.params.dateFormat,calObj.params.dateType);ndate=Date.localCalToGregorian(date.getFullYear(),date.getMonth(),date.getDate());date.setFullYear(ndate[0]);date.setMonth(ndate[1]);date.setDate(ndate[2]);calObj.inputField.setAttribute('data-alt-value',date.print(calObj.params.dateFormat,'gregorian',!1))}else{calObj.inputField.setAttribute('data-alt-value',Date.parseFieldDate(calObj.inputField.value,calObj.params.dateFormat,calObj.params.dateType).print(calObj.params.dateFormat,'gregorian',!1))}}else{calObj.inputField.setAttribute('data-alt-value',calObj.date.print(calObj.params.dateFormat,'gregorian',!1))}}else{calObj.inputField.setAttribute('data-alt-value','0000-00-00 00:00:00')}
calObj.date=Date.parseFieldDate(calObj.inputField.getAttribute('data-alt-value'),calObj.params.dateFormat,calObj.params.dateType)}
self.close()},!0);this.button.addEventListener('click',function(){self.show()},!1)};var stopCalEvent=function(ev){ev||(ev=window.event);ev.preventDefault();ev.stopPropagation();return!1};var createElement=function(type,parent){var el=null;el=document.createElement(type);if(typeof parent!=="undefined"){parent.appendChild(el)}return el};var isInt=function(input){return!isNaN(input)&&(function(x){return(x|0)===x})(parseFloat(input))};var getBoundary=function(input,type){var date=new Date();var y=date.getLocalFullYear(type);return y+input};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(elt){var len=this.length>>>0,from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0){from+=len}
for(;from<len;from++){if(from in this&&this[from]===elt){return from}}
return-1}}
JoomlaCalendar.getCalObject=function(element){if(!element){return!1}
while(element.parentNode){element=element.parentNode;if(element.classList.contains('field-calendar')){return element}}
return!1};JoomlaCalendar.prototype.setAltValue=function(){var input=this.inputField;if(input.getAttribute('disabled'))return;input.value=input.getAttribute('data-alt-value')?input.getAttribute('data-alt-value'):''};JoomlaCalendar.onSubmit=function(){Joomla=window.Joomla||{};if(!Joomla.calendarProcessed){Joomla.calendarProcessed=!0;var elements=document.querySelectorAll(".field-calendar");for(var i=0;i<elements.length;i++){var element=elements[i],instance=element._joomlaCalendar;if(instance){instance.setAltValue()}}}};JoomlaCalendar.init=function(element,container){window.JoomlaCalLocale=window.JoomlaCalLocale?JoomlaCalLocale:{};JoomlaCalLocale.today=JoomlaCalLocale.today?JoomlaCalLocale.today:'today';JoomlaCalLocale.weekend=JoomlaCalLocale.weekend?JoomlaCalLocale.weekend:[0,6];JoomlaCalLocale.localLangNumbers=JoomlaCalLocale.localLangNumbers?JoomlaCalLocale.localLangNumbers:[0,1,2,3,4,5,6,7,8,9];JoomlaCalLocale.wk=JoomlaCalLocale.wk?JoomlaCalLocale.wk:'wk';JoomlaCalLocale.AM=JoomlaCalLocale.AM?JoomlaCalLocale.AM:'AM';JoomlaCalLocale.PM=JoomlaCalLocale.PM?JoomlaCalLocale.PM:'PM';JoomlaCalLocale.am=JoomlaCalLocale.am?JoomlaCalLocale.am:'am';JoomlaCalLocale.pm=JoomlaCalLocale.pm?JoomlaCalLocale.pm:'pm';JoomlaCalLocale.dateType=JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:'gregorian';JoomlaCalLocale.time=JoomlaCalLocale.time?JoomlaCalLocale.time:'time';JoomlaCalLocale.days=JoomlaCalLocale.days?JoomlaCalLocale.days:'["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]';JoomlaCalLocale.shortDays=JoomlaCalLocale.shortDays?JoomlaCalLocale.shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"];JoomlaCalLocale.months=JoomlaCalLocale.months?JoomlaCalLocale.months:["January","February","March","April","May","June","July","August","September","October","November","December"];JoomlaCalLocale.shortMonths=JoomlaCalLocale.shortMonths?JoomlaCalLocale.shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];JoomlaCalLocale.minYear=JoomlaCalLocale.minYear?JoomlaCalLocale.minYear:1900;JoomlaCalLocale.maxYear=JoomlaCalLocale.maxYear?JoomlaCalLocale.maxYear:2100;JoomlaCalLocale.exit=JoomlaCalLocale.exit?JoomlaCalLocale.exit:'Cancel';JoomlaCalLocale.clear=JoomlaCalLocale.clear?JoomlaCalLocale.clear:'Clear';var instance=element._joomlaCalendar;if(!instance){new JoomlaCalendar(element)}else{instance.recreate()}
if(element&&element.getElementsByTagName('input')[0]&&element.getElementsByTagName('input')[0].form&&!element.getElementsByTagName('input')[0].disabled){element.getElementsByTagName('input')[0].form.addEventListener('submit',JoomlaCalendar.onSubmit)}};window.JoomlaCalendar=JoomlaCalendar;document.addEventListener("DOMContentLoaded",function(){var elements,i;elements=document.querySelectorAll(".field-calendar");for(i=0;i<elements.length;i++){JoomlaCalendar.init(elements[i])}
window.jQuery&&jQuery(document).on("subform-row-add",function(event,row){elements=row.querySelectorAll(".field-calendar");for(i=0;i<elements.length;i++){JoomlaCalendar.init(elements[i])}});window.Calendar={};Calendar.setup=function(obj){if(obj.inputField&&document.getElementById(obj.inputField)){var element=document.getElementById(obj.inputField),cal=element.parentNode.querySelectorAll('button')[0];for(var property in obj){if(obj.hasOwnProperty(property)){switch(property){case 'ifFormat':if(cal)cal.setAttribute('data-dayformat',obj.ifFormat);break;case 'firstDay':if(cal)cal.setAttribute('data-firstday',parseInt(obj.firstDay));break;case 'weekNumbers':if(cal)cal.setAttribute('data-week-numbers',(obj.weekNumbers==="true"||obj.weekNumbers===!0)?'1':'0');break;case 'showOthers':if(cal)cal.setAttribute('data-show-others',(obj.showOthers==="true"||obj.showOthers===!0)?'1':'0');break;case 'showsTime':if(cal)cal.setAttribute('data-show-time',(obj.showsTime==="true"||obj.showsTime===!0)?'1':'0');break;case 'timeFormat':if(cal)cal.setAttribute('data-time-24',parseInt(obj.timeFormat));break;case 'displayArea':case 'inputField':case 'button':case 'eventName':case 'daFormat':case 'disableFunc':case 'dateStatusFunc':case 'dateTooltipFunc':case 'dateText':case 'align':case 'range':case 'flat':case 'flatCallback':case 'onSelect':case 'onClose':case 'onUpdate':case 'date':case 'electric':case 'step':case 'position':case 'cache':case 'multiple':break}}}
JoomlaCalendar.init(element.parentNode.parentNode)}
return null}})})(window,document)