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-00808.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(e,a){"use strict";Date.convertNumbers=function(e){var e=e.toString();if("[object Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers))for(var a=0;a<JoomlaCalLocale.localLangNumbers.length;a++)e=e.replace(new RegExp(a,"g"),JoomlaCalLocale.localLangNumbers[a]);return e},Date.toEnglish=function(e){e=this.toString();for(var a=[0,1,2,3,4,5,6,7,8,9],t=0;10>t;t++)e=e.replace(new RegExp(a[t],"g"),t);return e};var t=function(e){if(!e)throw new Error("Calendar setup failed:\n  No valid element found, Please check your code");if("function"!=typeof Date.parseFieldDate)throw new Error("Calendar setup failed:\n  No valid date helper, Please check your code");if(e._joomlaCalendar)throw new Error("JoomlaCalendar instance already exists for the element");if(e._joomlaCalendar=this,this.writable=!0,this.hidden=!0,this.params={},this.element=e,this.inputField=e.getElementsByTagName("input")[0],this.button=e.getElementsByTagName("button")[0],!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 t=this,r=this.button,s={inputField:this.inputField,dateType:JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:"gregorian",direction:void 0!==a.dir?a.dir:a.getElementsByTagName("html")[0].getAttribute("dir"),firstDayOfWeek:r.getAttribute("data-firstday")?parseInt(r.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:r.getAttribute("data-min-year"),maxYearTmp:r.getAttribute("data-max-year"),weekendTmp:r.getAttribute("data-weekend"),time24:!0,showsOthers:1===parseInt(r.getAttribute("data-show-others"))?!0:!1,showsTime:!0,weekNumbers:1===parseInt(r.getAttribute("data-week-numbers"))?!0:!1,showsTodayBtn:!0,compressedHeader:1===parseInt(r.getAttribute("data-only-months-nav"))?!0:!1};r.getAttribute("data-dayformat")&&(s.dateFormat=r.getAttribute("data-dayformat")?r.getAttribute("data-dayformat"):"%Y-%m-%d %H:%M:%S"),r.getAttribute("data-time-24")&&(s.time24=24===parseInt(r.getAttribute("data-time-24"))?!0:!1),r.getAttribute("data-show-time")&&(s.showsTime=1===parseInt(r.getAttribute("data-show-time"))?!0:!1),r.getAttribute("data-today-btn")&&(s.showsTodayBtn=1===parseInt(r.getAttribute("data-today-btn"))?!0:!1);for(var i in s)this.params[i]=s[i];l(t.params.minYearTmp)&&(t.params.minYear=o(parseInt(t.params.minYearTmp),t.params.dateType)),l(t.params.maxYearTmp)&&(t.params.maxYear=o(parseInt(t.params.maxYearTmp),t.params.dateType)),"undefined"!==t.params.weekendTmp&&(t.params.weekend=t.params.weekendTmp.split(",").map(function(e){return parseInt(e,10)})),this._dayMouseDown=function(e){return t._handleDayMouseDown(e)},this._calKeyEvent=function(e){return t._handleCalKeyEvent(e)},this._documentClick=function(e){return t._handleDocumentClick(e)},this.checkInputs(),this.inputField.getAttribute("readonly")||(this._create(),this._bindEvents())};t.prototype.checkInputs=function(){var e=Date.parseFieldDate(this.inputField.getAttribute("data-alt-value"),this.params.dateFormat,"gregorian");""!==this.inputField.value?(this.date=e,this.inputField.value=e.print(this.params.dateFormat,this.params.dateType,!0)):this.date=new Date},t.prototype.recreate=function(){var e=this.element,a=e.querySelector(".js-calendar");a&&(e._joomlaCalendar=null,a.parentNode.removeChild(a),new t(e))},t.prototype.updateTime=function(e,a,t){var r=this,s=r.date,l=r.date.getLocalDate(r.params.dateType),o=r.date.getLocalMonth(r.params.dateType),i=r.date.getLocalFullYear(r.params.dateType),n=this.inputField.parentNode.parentNode.querySelectorAll(".time-ampm")[0];r.params.time24||(/pm/i.test(n.value)&&12>e?e=parseInt(e)+12:/am/i.test(n.value)&&12===e&&(e=0)),s.setHours(e),s.setMinutes(parseInt(a,10)),s.setSeconds(s.getSeconds()),s.setLocalFullYear(r.params.dateType,i),s.setLocalMonth(r.params.dateType,o),s.setLocalDate(r.params.dateType,l),r.dateClicked=!1,this.callHandler()},t.prototype.setDate=function(e){e.equalsTo(this.date)||(this.date=e,this.processCalendar(this.params.firstDayOfWeek,e))},t.prototype.moveCursorBy=function(e){var a=new Date(this.date);a.setDate(a.getDate()-e),this.setDate(a)},t.prototype.resetSelected=function(e){for(var a=e.options,t=a.length;t--;){var r=a[t];r.selected&&(r.selected=!1)}},t.prototype.callHandler=function(){this.inputField.setAttribute("data-alt-value",this.date.print(this.params.dateFormat,"gregorian",!1)),this.inputField.getAttribute("data-alt-value")&&"0000-00-00 00:00:00"!==this.inputField.getAttribute("data-alt-value")&&(this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0),"gregorian"!==this.params.dateType&&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),"function"==typeof this.inputField.onchange&&this.inputField.onchange(),this.dateClicked&&"function"==typeof this.params.onUpdate&&this.params.onUpdate(this),this.dateClicked?this.close():this.processCalendar()},t.prototype.close=function(){a.activeElement.blur(),this.hide()},t.prototype.show=function(){if(-1!==navigator.appName.indexOf("Internet Explorer")){var t=-1===navigator.appVersion.indexOf("MSIE 9")&&-1===navigator.appVersion.indexOf("MSIE 1");if(t&&e.jQuery&&jQuery().chosen)for(var r=this.element.getElementsByTagName("select"),s=0;s<r.length;s++)jQuery(r[s]).chosen("destroy")}this.checkInputs(),this.inputField.focus(),this.dropdownElement.style.display="block",this.hidden=!1,a.addEventListener("keydown",this._calKeyEvent,!0),a.addEventListener("keypress",this._calKeyEvent,!0),a.addEventListener("mousedown",this._documentClick,!0);var l=this.element.querySelector(".js-calendar");e.innerHeight+e.scrollY<l.getBoundingClientRect().bottom+20&&(l.style.marginTop=-(l.getBoundingClientRect().height+this.inputField.getBoundingClientRect().height)+"px"),this.processCalendar()},t.prototype.hide=function(){a.removeEventListener("keydown",this._calKeyEvent,!0),a.removeEventListener("keypress",this._calKeyEvent,!0),a.removeEventListener("mousedown",this._documentClick,!0),this.dropdownElement.style.display="none",this.hidden=!0},t.prototype._handleDocumentClick=function(e){var t=e.target;if(null!==t&&!t.classList.contains("time"))for(;null!==t&&t!==this.element;t=t.parentNode);return null===t?(a.activeElement.blur(),this.hide(),r(e)):void 0},t.prototype._handleDayMouseDown=function(e){var a=this,t=e.currentTarget,s=e.target||e.srcElement;if(!s||!s.hasAttribute("data-action")){if("TD"!==t.nodeName){var l=t.getParent("TD");"TD"===l.nodeName?t=l:(t=t.getParent("TD"),t.classList.contains("js-calendar")&&(t=t.getElementsByTagName("table")[0]))}else if(!s.classList.contains("js-btn")&&!t.classList.contains("day")&&!t.classList.contains("title"))return;if(!t||t.disabled)return!1;if("undefined"==typeof t.navtype||300!==t.navtype){50===t.navtype&&(t._current=t.innerHTML),(s===t||s.parentNode===t)&&a.cellClick(t,e);var o=null;"undefined"!=typeof t.month&&(o=t),"undefined"!=typeof t.parentNode.month&&(o=t.parentNode);var i=null;if(o)i=new Date(a.date),o.month!==i.getLocalMonth(a.params.dateType)&&(i.setLocalMonth(a.params.dateType,o.month),a.setDate(i),a.dateClicked=!1,this.callHandler());else{var n=null;"undefined"!=typeof t.year&&(n=s),"undefined"!=typeof t.parentNode.year&&(n=s.parentNode),n&&(i=new Date(a.date),n.year!==i.getLocalFullYear(a.params.dateType)&&(i.setFullYear(a.params.dateType,n.year),a.setDate(i),a.dateClicked=!1,this.callHandler()))}}return r(e)}},t.prototype.cellClick=function(e,a){var t=this,r=!1,s=!1,l=null;if("undefined"==typeof e.navtype){t.currentDateEl&&(e.classList.add("selected"),t.currentDateEl=e.caldate,r=t.currentDateEl===e.caldate,r||(t.currentDateEl=e.caldate)),t.date.setLocalDateOnly("gregorian",e.caldate);var o=!(t.dateClicked=!e.otherMonth);t.currentDateEl&&(s=!e.disabled),o&&this.processCalendar()}else{l=new Date(t.date),t.dateClicked=!1;var i=l.getOtherFullYear(t.params.dateType),n=l.getLocalMonth(t.params.dateType);switch(e.navtype){case 400:break;case-2:t.params.compressedHeader||i>t.params.minYear&&l.setOtherFullYear(t.params.dateType,i-1);break;case-1:var d=l.getLocalDate(t.params.dateType);if(n>0){var p=l.getLocalMonthDays(t.params.dateType,n-1);d>p&&l.setLocalDate(t.params.dateType,p),l.setLocalMonth(t.params.dateType,n-1)}else if(i-->t.params.minYear){l.setOtherFullYear(t.params.dateType,i);var p=l.getLocalMonthDays(t.params.dateType,11);d>p&&l.setLocalDate(t.params.dateType,p),l.setLocalMonth(t.params.dateType,11)}break;case 1:var d=l.getLocalDate(t.params.dateType);if(11>n){var p=l.getLocalMonthDays(t.params.dateType,n+1);d>p&&l.setLocalDate(t.params.dateType,p),l.setLocalMonth(t.params.dateType,n+1)}else if(i<t.params.maxYear){l.setOtherFullYear(t.params.dateType,i+1);var p=l.getLocalMonthDays(t.params.dateType,0);d>p&&l.setLocalDate(t.params.dateType,p),l.setLocalMonth(t.params.dateType,0)}break;case 2:t.params.compressedHeader||i<t.params.maxYear&&l.setOtherFullYear(t.params.dateType,i+1);break;case 0:}l.equalsTo(t.date)?0===e.navtype&&(s=r=!0):(this.setDate(l),s=!0)}s&&(t.params.showsTime&&(this.dateClicked=!1),a&&this.callHandler()),e.classList.remove("hilite"),r&&!t.params.showsTime&&(t.dateClicked=!1,a&&this.close())},t.prototype._handleCalKeyEvent=function(e){var a=this,t=e.keyCode;return e.target!==this.inputField||13!==t&&9!==t||this.close(),"rtl"===a.params.direction&&(37===t?t=39:39===t&&(t=37)),32===t&&e.shiftKey&&(e.preventDefault(),this.cellClick(a._nav_now,e),a.close()),27===t&&this.close(),38===t&&this.moveCursorBy(7),40===t&&this.moveCursorBy(-7),37===t&&this.moveCursorBy(1),39===t&&this.moveCursorBy(-1),e.target!==this.inputField||t>48||57>t||186===t||189===t||190===t||32===t?void 0:r(e)},t.prototype._create=function(){var e=this,a=this.element,t=s("table"),r=s("div");this.table=t,t.className="table",t.cellSpacing=0,t.cellPadding=0,t.style.marginBottom=0,this.dropdownElement=r,a.appendChild(r),this.params.direction&&(r.style.direction=this.params.direction),r.className="js-calendar",r.style.position="absolute",r.style.boxShadow="0px 0px 70px 0px rgba(0,0,0,0.67)",r.style.minWidth=this.inputField.width,r.style.padding="0",r.style.display="none",r.style.left="auto",r.style.top="auto",r.style.zIndex=1060,r.style.borderRadius="20px",this.wrapper=s("div"),this.wrapper.className="calendar-container",r.appendChild(this.wrapper),this.wrapper.appendChild(t);var l=s("thead",t);l.className="calendar-header";var o=null,i=null,n=this,d=function(a,t,r,l,d,p,m){l=l?l:"td",d=d?d:{},o=s(l,i),t&&(p=p?'class="'+p+'"':"",o.colSpan=t);for(var c in d)o.style[c]=d[c];for(var c in m)o.setAttribute(c,m[c]);return 0!==r&&Math.abs(r)<=2&&(o.className+=" nav"),t&&o.addEventListener("mousedown",e._dayMouseDown,!0),o.calendar=n,o.navtype=r,0!==r&&Math.abs(r)<=2?o.innerHTML="<a "+p+" style='display:inline;padding:2px 6px;cursor:pointer;text-decoration:none;' unselectable='on'>"+a+"</a>":(o.innerHTML=t?"<div unselectable='on'"+p+">"+a+"</div>":a,!t&&p&&(o.className=p)),o};this.params.compressedHeader===!1&&(i=s("tr",l),i.className="calendar-head-row",this._nav_py=d("&lsaquo;",1,-2,"",{"text-align":"center","font-size":"18px","line-height":"18px"},"js-btn btn-prev-year"),this.title=d('<div style="text-align:center;font-size:18px"><span></span></div>',this.params.weekNumbers?6:5,300),this.title.className="title",this._nav_ny=d(" &rsaquo;",1,2,"",{"text-align":"center","font-size":"18px","line-height":"18px"},"js-btn btn-next-year")),i=s("tr",l),i.className="calendar-head-row",this._nav_pm=d("&lsaquo;",1,-1,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn btn-prev-month"),this._nav_month=d('<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=d(" &rsaquo;",1,1,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn btn-next-month"),i=s("tr",l),i.className=e.params.weekNumbers?"daynames wk":"daynames",this.params.weekNumbers&&(o=s("td",i),o.className="day-name wn",o.innerHTML=JoomlaCalLocale.wk);for(var p=7;p>0;--p)o=s("td",i),p||(o.calendar=e);this.firstdayname=this.params.weekNumbers?i.firstChild.nextSibling:i.firstChild;for(var m=this.params.firstDayOfWeek,o=this.firstdayname,c=JoomlaCalLocale.weekend,p=0;7>p;++p){var u=(p+m)%7;o.classList.add("day-name"),this.params.weekNumbers?o.classList.add("day-name-week"):"",p&&(o.calendar=e,o.fdow=u),-1!==c.indexOf(c)&&o.classList.add("weekend"),o.innerHTML=JoomlaCalLocale.shortDays[(p+m)%7],o=o.nextSibling}var h=s("tbody",t);for(this.tbody=h,p=6;p>0;--p){i=s("tr",h),this.params.weekNumbers&&(o=s("td",i));for(var y=7;y>0;--y)o=s("td",i),o.calendar=this,o.addEventListener("mousedown",this._dayMouseDown,!0)}if(this.params.showsTime){i=s("tr",h),i.className="time",o=s("td",i),o.className="time time-title",o.colSpan=1,o.style.verticalAlign="middle",o.innerHTML=" ";var v=s("td",i);v.className="time hours-select",v.colSpan=2;var g=s("td",i);g.className="time minutes-select",g.colSpan=2,function(){function a(a,t,r,l,o){var i,n=s("select",o);n.calendar=e,n.className=a,n.setAttribute("data-chosen",!0),n.style.width="100%",n.navtype=50,n._range=[];for(var d=r;l>=d;++d){var p,m="";d===t&&(m=!0),10>d&&l>=10?(i="0"+d,p=Date.convertNumbers("0")+Date.convertNumbers(d)):(i=""+d,p=""+Date.convertNumbers(d)),n.options.add(new Option(p,i,m,m))}return n}var t=e.date.getHours(),r=e.date.getMinutes(),l=!e.params.time24,n=e.date.getHours()>12;l&&n&&(t-=12);var d=a("time time-hours",t,l?1:0,l?12:23,v),p=a("time time-minutes",r,0,59,g),m=null;if(o=s("td",i),o.className="time ampm-select",o.colSpan=e.params.weekNumbers?1:2,l){var c=!0,u=Date.parseFieldDate(e.inputField.getAttribute("data-alt-value"),e.params.dateFormat,"gregorian");n=u.getHours()>12;var h=s("select",o);h.className="time-ampm",h.style.width="100%",h.options.add(new Option(JoomlaCalLocale.PM,"pm",n?c:"",n?c:"")),h.options.add(new Option(JoomlaCalLocale.AM,"am",n?"":c,n?"":c)),m=h,m.addEventListener("change",function(a){e.updateTime(a.target.parentNode.parentNode.childNodes[1].childNodes[0].value,a.target.parentNode.parentNode.childNodes[2].childNodes[0].value,a.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}else o.innerHTML="&#160;",o.colSpan=e.params.weekNumbers?3:2;d.addEventListener("change",function(a){e.updateTime(a.target.parentNode.parentNode.childNodes[1].childNodes[0].value,a.target.parentNode.parentNode.childNodes[2].childNodes[0].value,a.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1),p.addEventListener("change",function(a){e.updateTime(a.target.parentNode.parentNode.childNodes[1].childNodes[0].value,a.target.parentNode.parentNode.childNodes[2].childNodes[0].value,a.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}()}if(i=s("div",this.wrapper),i.className="buttons-wrapper btn-group",this._nav_save=d(JoomlaCalLocale.save,"",100,"button","","js-btn btn btn-clear",{type:"button","data-action":"clear"}),!this.inputField.hasAttribute("required")){var f=i.querySelector('[data-action="clear"]');f.addEventListener("click",function(a){a.preventDefault();for(var t=e.table.querySelectorAll("td"),r=0;r<t.length;r++)if(t[r].classList.contains("selected")){t[r].classList.remove("selected");break}e.inputField.setAttribute("data-alt-value","0000-00-00 00:00:00"),e.inputField.setAttribute("value",""),e.inputField.value=""})}if(this.params.showsTodayBtn){this._nav_now=d(JoomlaCalLocale.today,"",0,"button","","js-btn btn btn-today",{type:"button","data-action":"today"});var b=this.wrapper.querySelector('[data-action="today"]');b.addEventListener("click",function(a){a.preventDefault(),e.date.setLocalDateOnly("gregorian",new Date),e.dateClicked=!0,e.callHandler(),e.close()})}this._nav_exit=d(JoomlaCalLocale.exit,"",999,"button","","js-btn btn btn-exit",{type:"button","data-action":"exit"});var L=this.wrapper.querySelector('[data-action="exit"]');L.addEventListener("click",function(a){a.preventDefault(),e.dateClicked||(e.inputField.value?("gregorian"!==e.params.dateType&&e.inputField.setAttribute("data-local-value",e.inputField.value),"undefined"==typeof e.dateClicked?e.inputField.setAttribute("data-alt-value",Date.parseFieldDate(e.inputField.value,e.params.dateFormat,e.params.dateType).print(e.params.dateFormat,"gregorian",!1)):e.inputField.setAttribute("data-alt-value",e.date.print(e.params.dateFormat,"gregorian",!1))):e.inputField.setAttribute("data-alt-value","0000-00-00 00:00:00"),e.date=Date.parseFieldDate(e.inputField.getAttribute("data-alt-value"),e.params.dateFormat,e.params.dateType)),e.close()}),this.processCalendar()},t.prototype.processCalendar=function(){this.table.style.visibility="hidden";var e=this.params.firstDayOfWeek,a=this.date,t=new Date,r=t.getLocalFullYear(this.params.dateType),s=t.getLocalMonth(this.params.dateType),l=t.getLocalDate(this.params.dateType),o=a.getOtherFullYear(this.params.dateType),i=a.getHours(),n=a.getMinutes(),d=(a.getSeconds(),!this.params.time24);o<this.params.minYear?(o=this.params.minYear,a.getOtherFullYear(this.params.dateType,o)):o>this.params.maxYear&&(o=this.params.maxYear,a.getOtherFullYear(this.params.dateType,o)),this.params.firstDayOfWeek=e,this.date=new Date(a);var p=a.getLocalMonth(this.params.dateType),m=a.getLocalDate(this.params.dateType);a.setLocalDate(this.params.dateType,1);var c=(a.getLocalDay(this.params.dateType)-this.params.firstDayOfWeek)%7;0>c&&(c+=7),a.setLocalDate(this.params.dateType,-c),a.setLocalDate(this.params.dateType,a.getLocalDate(this.params.dateType)+1);for(var u=this.tbody.firstChild,h=this.ar_days=new Array,y=JoomlaCalLocale.weekend,v=parseInt(a.getLocalWeekDays(this.params.dateType)),g=0;v>g;++g,u=u.nextSibling){var f=u.firstChild;this.params.weekNumbers&&(f.className="day wn",f.innerHTML=a.getLocalWeekNumber(this.params.dateType),f=f.nextSibling),u.className=this.params.weekNumbers?"daysrow wk":"daysrow";for(var b,L=!1,C=h[g]=[],w=v+1,T=0;w>T;++T,f=f.nextSibling,a.setLocalDate(this.params.dateType,b+1)){f.className="day",f.style.textAlign="center",b=a.getLocalDate(this.params.dateType);var N=a.getLocalDay(this.params.dateType);f.pos=g<<4|T,C[T]=f;var D=a.getLocalMonth(this.params.dateType)===p;if(D)f.otherMonth=!1,L=!0,f.style.cursor="pointer";else{if(!this.params.showsOthers){f.className+=" emptycell",f.innerHTML="&#160;",f.disabled=!0;continue}f.className+=" disabled othermonth ",f.otherMonth=!0}f.disabled=!1,f.innerHTML=this.params.debug?b:Date.convertNumbers(b),f.disabled||(f.caldate=new Date(a),D&&b===m&&(f.className+=" selected",this.currentDateEl=f),a.getLocalFullYear(this.params.dateType)===r&&a.getLocalMonth(this.params.dateType)===s&&b===l&&(f.className+=" today"),-1!==y.indexOf(N)&&(f.className+=" weekend"))}L||this.params.showsOthers?u.style.display="":(u.style.display="none",u.className="emptyrow")}if(this.params.showsTime){i>12&&d&&(i-=12),i=10>i?"0"+i:i,n=10>n?"0"+n:n;var F=this.table.querySelector(".time-hours"),k=this.table.querySelector(".time-minutes");if(this.resetSelected(F),F.value=i,this.resetSelected(k),k.value=n,!this.params.time24){var J=new Date(this.inputField.getAttribute("data-alt-value")),A=this.table.querySelector(".time-ampm"),M=J.getHours();M>12&&(this.resetSelected(A),A.value="pm")}}if(this.params.compressedHeader){var x=Date.convertNumbers(o.toString());this._nav_month.getElementsByTagName("span")[0].innerHTML=this.params.monthBefore?x+" - "+JoomlaCalLocale.months[p]:JoomlaCalLocale.months[p]+" - "+x}else this._nav_month.getElementsByTagName("span")[0].innerHTML=this.params.debug?p+" "+JoomlaCalLocale.months[p]:JoomlaCalLocale.months[p],this.title.getElementsByTagName("span")[0].innerHTML=this.params.debug?o+" "+Date.convertNumbers(o.toString()):Date.convertNumbers(o.toString());this.table.style.visibility="visible"},t.prototype._bindEvents=function(){var e=this;this.inputField.addEventListener("blur",function(a){var r=t.getCalObject(this)._joomlaCalendar;if("block"===r.dropdownElement.style.display)return void a.preventDefault();if(r){if(r.inputField.value)if("undefined"==typeof r.params.dateClicked)if(r.inputField.setAttribute("data-local-value",r.inputField.value),"gregorian"!==r.params.dateType){var s,l=Date.parseFieldDate(r.inputField.value,r.params.dateFormat,r.params.dateType);s=Date.localCalToGregorian(l.getFullYear(),l.getMonth(),l.getDate()),l.setFullYear(s[0]),l.setMonth(s[1]),l.setDate(s[2]),r.inputField.setAttribute("data-alt-value",l.print(r.params.dateFormat,"gregorian",!1))}else r.inputField.setAttribute("data-alt-value",Date.parseFieldDate(r.inputField.value,r.params.dateFormat,r.params.dateType).print(r.params.dateFormat,"gregorian",!1));else r.inputField.setAttribute("data-alt-value",r.date.print(r.params.dateFormat,"gregorian",!1));else r.inputField.setAttribute("data-alt-value","0000-00-00 00:00:00");r.date=Date.parseFieldDate(r.inputField.getAttribute("data-alt-value"),r.params.dateFormat,r.params.dateType)}e.close()},!0),this.button.addEventListener("click",function(){e.show()},!1)};var r=function(a){return a||(a=e.event),a.preventDefault(),a.stopPropagation(),!1},s=function(e,t){var r=null;return r=a.createElement(e),"undefined"!=typeof t&&t.appendChild(r),r},l=function(e){return!isNaN(e)&&function(e){return(0|e)===e}(parseFloat(e))},o=function(e,a){var t=new Date,r=t.getLocalFullYear(a);return r+e};Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var a=this.length>>>0,t=Number(arguments[1])||0;for(t=0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=a);a>t;t++)if(t in this&&this[t]===e)return t;return-1}),t.getCalObject=function(e){if(!e)return!1;for(;e.parentNode;)if(e=e.parentNode,e.classList.contains("field-calendar"))return e;return!1},t.prototype.setAltValue=function(){var e=this.inputField;e.getAttribute("disabled")||(e.value=e.getAttribute("data-alt-value")?e.getAttribute("data-alt-value"):"")},t.onSubmit=function(){if(Joomla=e.Joomla||{},!Joomla.calendarProcessed){Joomla.calendarProcessed=!0;for(var t=a.querySelectorAll(".field-calendar"),r=0;r<t.length;r++){var s=t[r],l=s._joomlaCalendar;l&&l.setAltValue()}}},t.init=function(a,r){e.JoomlaCalLocale=e.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 s=a._joomlaCalendar;s?s.recreate():new t(a),a&&a.getElementsByTagName("input")[0]&&a.getElementsByTagName("input")[0].form&&!a.getElementsByTagName("input")[0].disabled&&a.getElementsByTagName("input")[0].form.addEventListener("submit",t.onSubmit)},e.JoomlaCalendar=t,a.addEventListener("DOMContentLoaded",function(){var r,s;for(r=a.querySelectorAll(".field-calendar"),s=0;s<r.length;s++)t.init(r[s]);e.jQuery&&jQuery(a).on("subform-row-add",function(e,a){for(r=a.querySelectorAll(".field-calendar"),s=0;s<r.length;s++)t.init(r[s])}),e.Calendar={},Calendar.setup=function(e){if(e.inputField&&a.getElementById(e.inputField)){var r=a.getElementById(e.inputField),s=r.parentNode.querySelectorAll("button")[0];for(var l in e)if(e.hasOwnProperty(l))switch(l){case"ifFormat":s&&s.setAttribute("data-dayformat",e.ifFormat);break;case"firstDay":s&&s.setAttribute("data-firstday",parseInt(e.firstDay));break;case"weekNumbers":s&&s.setAttribute("data-week-numbers","true"===e.weekNumbers||e.weekNumbers===!0?"1":"0");break;case"showOthers":s&&s.setAttribute("data-show-others","true"===e.showOthers||e.showOthers===!0?"1":"0");break;case"showsTime":s&&s.setAttribute("data-show-time","true"===e.showsTime||e.showsTime===!0?"1":"0");break;case"timeFormat":s&&s.setAttribute("data-time-24",parseInt(e.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":}t.init(r.parentNode.parentNode)}return null}})}(window,document);