(function(n){"use strict";var t={i18n:{ar:{months:["ÙƒØ§Ù†ÙˆÙ† Ø§Ù„Ø«Ø§Ù†ÙŠ","Ø´Ø¨Ø§Ø·","Ø¢Ø°Ø§Ø±","Ù†ÙŠØ³Ø§Ù†","Ù…Ø§ÙŠÙˆ","Ø­Ø²ÙŠØ±Ø§Ù†","ØªÙ…ÙˆØ²","Ø¢Ø¨","Ø£ÙŠÙ„ÙˆÙ„","ØªØ´Ø±ÙŠÙ† Ø§Ù„Ø£ÙˆÙ„","ØªØ´Ø±ÙŠÙ† Ø§Ù„Ø«Ø§Ù†ÙŠ","ÙƒØ§Ù†ÙˆÙ† Ø§Ù„Ø£ÙˆÙ„"],dayOfWeek:["Ù†","Ø«","Ø¹","Ø®","Ø¬","Ø³","Ø­"]},ro:{months:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],dayOfWeek:["l","ma","mi","j","v","s","d"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeek:["Sen","Sel","Rab","Kam","Jum","Sab","Min"]},bg:{months:["Ð¯Ð½ÑƒÐ°Ñ€Ð¸","Ð¤ÐµÐ²Ñ€ÑƒÐ°Ñ€Ð¸","ÐœÐ°Ñ€Ñ‚","ÐÐ¿Ñ€Ð¸Ð»","ÐœÐ°Ð¹","Ð®Ð½Ð¸","Ð®Ð»Ð¸","ÐÐ²Ð³ÑƒÑÑ‚","Ð¡ÐµÐ¿Ñ‚ÐµÐ¼Ð²Ñ€Ð¸","ÐžÐºÑ‚Ð¾Ð¼Ð²Ñ€Ð¸","ÐÐ¾ÐµÐ¼Ð²Ñ€Ð¸","Ð”ÐµÐºÐµÐ¼Ð²Ñ€Ð¸"],dayOfWeek:["ÐÐ´","ÐŸÐ½","Ð’Ñ‚","Ð¡Ñ€","Ð§Ñ‚","ÐŸÑ‚","Ð¡Ð±"]},fa:{months:["ÙØ±ÙˆØ±Ø¯ÛŒÙ†","Ø§Ø±Ø¯ÛŒØ¨Ù‡Ø´Øª","Ø®Ø±Ø¯Ø§Ø¯","ØªÛŒØ±","Ù…Ø±Ø¯Ø§Ø¯","Ø´Ù‡Ø±ÛŒÙˆØ±","Ù…Ù‡Ø±","Ø¢Ø¨Ø§Ù†","Ø¢Ø°Ø±","Ø¯ÛŒ","Ø¨Ù‡Ù…Ù†","Ø§Ø³ÙÙ†Ø¯"],dayOfWeek:["ÛŒÚ©Ø´Ù†Ø¨Ù‡","Ø¯ÙˆØ´Ù†Ø¨Ù‡","Ø³Ù‡ Ø´Ù†Ø¨Ù‡","Ú†Ù‡Ø§Ø±Ø´Ù†Ø¨Ù‡","Ù¾Ù†Ø¬Ø´Ù†Ø¨Ù‡","Ø¬Ù…Ø¹Ù‡","Ø´Ù†Ø¨Ù‡"]},ru:{months:["Ð¯Ð½Ð²Ð°Ñ€ÑŒ","Ð¤ÐµÐ²Ñ€Ð°Ð»ÑŒ","ÐœÐ°Ñ€Ñ‚","ÐÐ¿Ñ€ÐµÐ»ÑŒ","ÐœÐ°Ð¹","Ð˜ÑŽÐ½ÑŒ","Ð˜ÑŽÐ»ÑŒ","ÐÐ²Ð³ÑƒÑÑ‚","Ð¡ÐµÐ½Ñ‚ÑÐ±Ñ€ÑŒ","ÐžÐºÑ‚ÑÐ±Ñ€ÑŒ","ÐÐ¾ÑÐ±Ñ€ÑŒ","Ð”ÐµÐºÐ°Ð±Ñ€ÑŒ"],dayOfWeek:["Ð’ÑÐº","ÐŸÐ½","Ð’Ñ‚","Ð¡Ñ€","Ð§Ñ‚","ÐŸÑ‚","Ð¡Ð±"]},uk:{months:["Ð¡Ñ–Ñ‡ÐµÐ½ÑŒ","Ð›ÑŽÑ‚Ð¸Ð¹","Ð‘ÐµÑ€ÐµÐ·ÐµÐ½ÑŒ","ÐšÐ²Ñ–Ñ‚ÐµÐ½ÑŒ","Ð¢Ñ€Ð°Ð²ÐµÐ½ÑŒ","Ð§ÐµÑ€Ð²ÐµÐ½ÑŒ","Ð›Ð¸Ð¿ÐµÐ½ÑŒ","Ð¡ÐµÑ€Ð¿ÐµÐ½ÑŒ","Ð’ÐµÑ€ÐµÑÐµÐ½ÑŒ","Ð–Ð¾Ð²Ñ‚ÐµÐ½ÑŒ","Ð›Ð¸ÑÑ‚Ð¾Ð¿Ð°Ð´","Ð“Ñ€ÑƒÐ´ÐµÐ½ÑŒ"],dayOfWeek:["ÐÐ´Ð»","ÐŸÐ½Ð´","Ð’Ñ‚Ñ€","Ð¡Ñ€Ð´","Ð§Ñ‚Ð²","ÐŸÑ‚Ð½","Ð¡Ð±Ñ‚"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},el:{months:["Î™Î±Î½Î¿Ï…Î¬ÏÎ¹Î¿Ï‚","Î¦ÎµÎ²ÏÎ¿Ï…Î¬ÏÎ¹Î¿Ï‚","ÎœÎ¬ÏÏ„Î¹Î¿Ï‚","Î‘Ï€ÏÎ¯Î»Î¹Î¿Ï‚","ÎœÎ¬Î¹Î¿Ï‚","Î™Î¿ÏÎ½Î¹Î¿Ï‚","Î™Î¿ÏÎ»Î¹Î¿Ï‚","Î‘ÏÎ³Î¿Ï…ÏƒÏ„Î¿Ï‚","Î£ÎµÏ€Ï„Î­Î¼Î²ÏÎ¹Î¿Ï‚","ÎŸÎºÏ„ÏŽÎ²ÏÎ¹Î¿Ï‚","ÎÎ¿Î­Î¼Î²ÏÎ¹Î¿Ï‚","Î”ÎµÎºÎ­Î¼Î²ÏÎ¹Î¿Ï‚"],dayOfWeek:["ÎšÏ…Ï","Î”ÎµÏ…","Î¤ÏÎ¹","Î¤ÎµÏ„","Î ÎµÎ¼","Î Î±Ï","Î£Î±Î²"]},de:{months:["Januar","Februar","MÃ¤rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Åžubat","Mart","Nisan","MayÄ±s","Haziran","Temmuz","AÄŸustos","EylÃ¼l","Ekim","KasÄ±m","AralÄ±k"],dayOfWeek:["Paz","Pts","Sal","Ã‡ar","Per","Cum","Cts"]},fr:{months:["Janvier","FÃ©vrier","Mars","Avril","Mai","Juin","Juillet","AoÃ»t","Septembre","Octobre","Novembre","DÃ©cembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","MiÃ©","Jue","Vie","SÃ¡b"]},th:{months:["à¸¡à¸à¸£à¸²à¸„à¸¡","à¸à¸¸à¸¡à¸ à¸²à¸žà¸±à¸™à¸˜à¹Œ","à¸¡à¸µà¸™à¸²à¸„à¸¡","à¹€à¸¡à¸©à¸²à¸¢à¸™","à¸žà¸¤à¸©à¸ à¸²à¸„à¸¡","à¸¡à¸´à¸–à¸¸à¸™à¸²à¸¢à¸™","à¸à¸£à¸à¸Žà¸²à¸„à¸¡","à¸ªà¸´à¸‡à¸«à¸²à¸„à¸¡","à¸à¸±à¸™à¸¢à¸²à¸¢à¸™","à¸•à¸¸à¸¥à¸²à¸„à¸¡","à¸žà¸¤à¸¨à¸ˆà¸´à¸à¸²à¸¢à¸™","à¸˜à¸±à¸™à¸§à¸²à¸„à¸¡"],dayOfWeek:["à¸­à¸².","à¸ˆ.","à¸­.","à¸ž.","à¸žà¸¤.","à¸¨.","à¸ª."]},pl:{months:["styczeÅ„","luty","marzec","kwiecieÅ„","maj","czerwiec","lipiec","sierpieÅ„","wrzesieÅ„","paÅºdziernik","listopad","grudzieÅ„"],dayOfWeek:["nd","pn","wt","Å›r","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","MarÃ§o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["ä¸€æœˆ","äºŒæœˆ","ä¸‰æœˆ","å››æœˆ","äº”æœˆ","å…­æœˆ","ä¸ƒæœˆ","å…«æœˆ","ä¹æœˆ","åæœˆ","åä¸€æœˆ","åäºŒæœˆ"],dayOfWeek:["æ—¥","ä¸€","äºŒ","ä¸‰","å››","äº”","å…­"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["SÃ¶n","MÃ¥n","Tis","Ons","Tor","Fre","LÃ¶r"]},kr:{months:["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],dayOfWeek:["ì¼","ì›”","í™”","ìˆ˜","ëª©","ê¸ˆ","í† "]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["SÃ¸n","Man","Tir","Ons","Tor","Fre","LÃ¸r"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeek:["SÃ¸n","Man","Tir","Ons","Tor","Fre","LÃ¸r"]},ja:{months:["1æœˆ","2æœˆ","3æœˆ","4æœˆ","5æœˆ","6æœˆ","7æœˆ","8æœˆ","9æœˆ","10æœˆ","11æœˆ","12æœˆ"],dayOfWeek:["æ—¥","æœˆ","ç«","æ°´","æœ¨","é‡‘","åœŸ"]},vi:{months:["ThÃ¡ng 1","ThÃ¡ng 2","ThÃ¡ng 3","ThÃ¡ng 4","ThÃ¡ng 5","ThÃ¡ng 6","ThÃ¡ng 7","ThÃ¡ng 8","ThÃ¡ng 9","ThÃ¡ng 10","ThÃ¡ng 11","ThÃ¡ng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeek:["Ned","Pon","Tor","Sre","ÄŒet","Pet","Sob"]},cs:{months:["Leden","Ãšnor","BÅ™ezen","Duben","KvÄ›ten","ÄŒerven","ÄŒervenec","Srpen","ZÃ¡Å™Ã­","Å˜Ã­jen","Listopad","Prosinec"],dayOfWeek:["Ne","Po","Ãšt","St","ÄŒt","PÃ¡","So"]},hu:{months:["JanuÃ¡r","FebruÃ¡r","MÃ¡rcius","Ãprilis","MÃ¡jus","JÃºnius","JÃºlius","Augusztus","Szeptember","OktÃ³ber","November","December"],dayOfWeek:["Va","HÃ©","Ke","Sze","Cs","PÃ©","Szo"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],disabledDates:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0};Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){for(var i=t||0,r=this.length;i<r;i+=1)if(this[i]===n)return i;return-1});Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()};n.fn.xdsoftScroller=function(t){return this.each(function(){var i=n(this),s=function(n){var t={x:0,y:0},i;return n.type==="touchstart"||n.type==="touchmove"||n.type==="touchend"||n.type==="touchcancel"?(i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0],t.x=i.clientX,t.y=i.clientY):(n.type==="mousedown"||n.type==="mouseup"||n.type==="mousemove"||n.type==="mouseover"||n.type==="mouseout"||n.type==="mouseenter"||n.type==="mouseleave")&&(t.x=n.clientX,t.y=n.clientY),t},f,u,e,o,r,h=100,c=!1,w=0,a=0,v=0,y=!1,p=0,l=function(){};if(t==="hide"){i.find(".xdsoft_scrollbar").hide();return}if(!n(this).hasClass("xdsoft_scroller_box")){f=i.children().eq(0);u=i[0].clientHeight;e=f[0].offsetHeight;o=n('<div class="xdsoft_scrollbar"><\/div>');r=n('<div class="xdsoft_scroller"><\/div>');o.append(r);i.addClass("xdsoft_scroller_box").append(o);l=function(n){var t=s(n).y-w+p;t<0&&(t=0);t+r[0].offsetHeight>v&&(t=v-r[0].offsetHeight);i.trigger("scroll_element.xdsoft_scroller",[h?t/h:0])};r.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(f){if(u||i.trigger("resize_scroll.xdsoft_scroller",[t]),w=s(f).y,p=parseInt(r.css("margin-top"),10),v=o[0].offsetHeight,f.type==="mousedown"){document&&n(document.body).addClass("xdsoft_noselect");n([document.body,window]).on("mouseup.xdsoft_scroller",function e(){n([document.body,window]).off("mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",l).removeClass("xdsoft_noselect")});n(document.body).on("mousemove.xdsoft_scroller",l)}else y=!0,f.stopPropagation(),f.preventDefault()}).on("touchmove",function(n){y&&(n.preventDefault(),l(n))}).on("touchend touchcancel",function(){y=!1;p=0});i.on("scroll_element.xdsoft_scroller",function(n,t){u||i.trigger("resize_scroll.xdsoft_scroller",[t,!0]);t=t>1?1:t<0||isNaN(t)?0:t;r.css("margin-top",h*t);setTimeout(function(){f.css("marginTop",-parseInt((f[0].offsetHeight-u)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(n,t,s){var c,l;u=i[0].clientHeight;e=f[0].offsetHeight;c=u/e;l=c*o[0].offsetHeight;c>1?r.hide():(r.show(),r.css("height",parseInt(l>10?l:10,10)),h=o[0].offsetHeight-r[0].offsetHeight,s!==!0&&i.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(f.css("marginTop"),10))/(e-u)]))});i.on("mousewheel",function(n){var t=Math.abs(parseInt(f.css("marginTop"),10));return t=t-n.deltaY*20,t<0&&(t=0),i.trigger("scroll_element.xdsoft_scroller",[t/(e-u)]),n.stopPropagation(),!1});i.on("touchstart",function(n){c=s(n);a=Math.abs(parseInt(f.css("marginTop"),10))});i.on("touchmove",function(n){if(c){n.preventDefault();var t=s(n);i.trigger("scroll_element.xdsoft_scroller",[(a-(t.y-c.y))/(e-u)])}});i.on("touchend touchcancel",function(){c=!1;a=0})}i.trigger("resize_scroll.xdsoft_scroller",[t])})};n.fn.datetimepicker=function(i){var c=48,b=57,l=96,a=105,o=17,f=46,v=13,k=27,e=8,d=37,g=38,nt=39,tt=40,y=9,it=116,rt=65,ut=67,ft=86,et=90,ot=89,s=!1,r=n.isPlainObject(i)||!i?n.extend(!0,{},t,i):n.extend(!0,{},t),p=0,h,w,u,st=function(n){n.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(){n.is(":disabled")||n.is(":hidden")||!n.is(":visible")||n.data("xdsoft_datetimepicker")||(clearTimeout(p),p=setTimeout(function(){n.data("xdsoft_datetimepicker")||h(n);n.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})};h=function(t){function ni(){var n=!1,i;return r.startDate?n=u.strToDate(r.startDate):(n=r.value||(t&&t.val&&t.val()?t.val():""),n?n=u.strToDateTime(n):r.defaultDate&&(n=u.strToDate(r.defaultDate),r.defaultTime&&(i=u.strtotime(r.defaultTime),n.setHours(i.getHours()),n.setMinutes(i.getMinutes())))),n&&u.isValidDate(n)?h.data("changed",!0):n="",n||0}var h=n("<div "+(r.id?'id="'+r.id+'"':"")+" "+(r.style?'style="'+r.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_'+r.theme+" xdsoft_noselect "+(r.weeks?" xdsoft_showweeks":"")+r.className+'"><\/div>'),ti=n('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net<\/a><\/div>'),ct=n('<div class="xdsoft_datepicker active"><\/div>'),w=n('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"><\/button><button type="button" class="xdsoft_today_button"><\/button><div class="xdsoft_label xdsoft_month"><span><\/span><i><\/i><\/div><div class="xdsoft_label xdsoft_year"><span><\/span><i><\/i><\/div><button type="button" class="xdsoft_next"><\/button><\/div>'),pt=n('<div class="xdsoft_calendar"><\/div>'),lt=n('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"><\/button><div class="xdsoft_time_box"><\/div><button type="button" class="xdsoft_next"><\/button><\/div>'),st=lt.find(".xdsoft_time_box").eq(0),p=n('<div class="xdsoft_time_variant"><\/div>'),wt=n('<div class="xdsoft_select xdsoft_monthselect"><div><\/div><\/div>'),bt=n('<div class="xdsoft_select xdsoft_yearselect"><div><\/div><\/div>'),at=!1,gt,kt,vt,ht,yt,dt=0,ii=0;w.find(".xdsoft_month span").after(wt);w.find(".xdsoft_year span").after(bt);w.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){var i=n(this).find(".xdsoft_select").eq(0),e=0,o=0,s=i.is(":visible"),r,f;for(w.find(".xdsoft_select").hide(),u.currentTime&&(e=u.currentTime[n(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),i[s?"hide":"show"](),r=i.find("div.xdsoft_option"),f=0;f<r.length;f+=1)if(r.eq(f).data("value")===e)break;else o+=r[0].offsetHeight;return i.xdsoftScroller(o/(i.children()[0].offsetHeight-i[0].clientHeight)),t.stopPropagation(),!1});w.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(n){n.stopPropagation();n.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(){var t=u.currentTime.getFullYear();u&&u.currentTime&&u.currentTime[n(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](n(this).data("value"));n(this).parent().parent().hide();h.trigger("xchange.xdsoft");r.onChangeMonth&&n.isFunction(r.onChangeMonth)&&r.onChangeMonth.call(h,u.currentTime,h.data("input"));t!==u.currentTime.getFullYear()&&n.isFunction(r.onChangeYear)&&r.onChangeYear.call(h,u.currentTime,h.data("input"))});h.setOptions=function(i){if(r=n.extend(!0,{},r,i),i.allowTimes&&n.isArray(i.allowTimes)&&i.allowTimes.length&&(r.allowTimes=n.extend(!0,[],i.allowTimes)),i.weekends&&n.isArray(i.weekends)&&i.weekends.length&&(r.weekends=n.extend(!0,[],i.weekends)),i.disabledDates&&n.isArray(i.disabledDates)&&i.disabledDates.length&&(r.disabledDates=n.extend(!0,[],i.disabledDates)),(r.open||r.opened)&&!r.inline&&t.trigger("open.xdsoft"),r.inline&&(at=!0,h.addClass("xdsoft_inline"),t.after(h).hide()),r.inverseButton&&(r.next="xdsoft_prev",r.prev="xdsoft_next"),r.datepicker?ct.addClass("active"):ct.removeClass("active"),r.timepicker?lt.addClass("active"):lt.removeClass("active"),r.value&&(t&&t.val&&t.val(r.value),u.setCurrentTime(r.value)),r.dayOfWeekStart=isNaN(r.dayOfWeekStart)?0:parseInt(r.dayOfWeekStart,10)%7,r.timepickerScrollbar||st.xdsoftScroller("hide"),r.minDate&&/^-(.*)$/.test(r.minDate)&&(r.minDate=u.strToDateTime(r.minDate).dateFormat(r.formatDate)),r.maxDate&&/^\+(.*)$/.test(r.maxDate)&&(r.maxDate=u.strToDateTime(r.maxDate).dateFormat(r.formatDate)),w.find(".xdsoft_today_button").css("visibility",r.todayButton?"visible":"hidden"),r.mask){var ht=function(n){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(n.setSelectionRange)return n.selectionStart}catch(i){return 0}},vt=function(n,t){if(n=typeof n=="string"||n instanceof String?document.getElementById(n):n,!n)return!1;if(n.createTextRange){var i=n.createTextRange();return i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",t),i.select(),!0}return n.setSelectionRange?(n.setSelectionRange(t,t),!0):!1},p=function(n,t){var i=n.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(i).test(t)};if(t.off("keydown.xdsoft"),r.mask===!0&&(r.mask=r.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),n.type(r.mask)==="string"){p(r.mask,t.val())||t.val(r.mask.replace(/[0-9]/g,"_"));t.on("keydown.xdsoft",function(i){var w=this.value,u=i.which,h,st;if(u>=c&&u<=b||u>=l&&u<=a||u===e||u===f){for(h=ht(this),st=u!==e&&u!==f?String.fromCharCode(l<=u&&u<=a?u-c:u):"_",(u===e||u===f)&&h&&(h-=1,st="_");/[^0-9_]/.test(r.mask.substr(h,1))&&h<r.mask.length&&h>0;)h+=u===e||u===f?-1:1;if(w=w.substr(0,h)+st+w.substr(h+1),n.trim(w)==="")w=r.mask.replace(/[0-9]/g,"_");else if(h===r.mask.length)return i.preventDefault(),!1;for(h+=u===e||u===f?0:1;/[^0-9_]/.test(r.mask.substr(h,1))&&h<r.mask.length&&h>0;)h+=u===e||u===f?-1:1;p(r.mask,w)?(this.value=w,vt(this,h)):n.trim(w)===""?this.value=r.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft")}else if([rt,ut,ft,et,ot].indexOf(u)!==-1&&s||[k,g,tt,d,nt,it,o,y,v].indexOf(u)!==-1)return!0;return i.preventDefault(),!1})}}if(r.validateOnBlur)t.off("blur.xdsoft").on("blur.xdsoft",function(){r.allowBlank&&!n.trim(n(this).val()).length?(n(this).val(null),h.data("xdsoft_datetime").empty()):Date.parseDate(n(this).val(),r.format)?h.data("xdsoft_datetime").setCurrentTime(n(this).val()):(n(this).val(u.now().dateFormat(r.format)),h.data("xdsoft_datetime").setCurrentTime(n(this).val()));h.trigger("changedatetime.xdsoft")});r.dayOfWeekStartPrev=r.dayOfWeekStart===0?6:r.dayOfWeekStart-1;h.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")};h.data("options",r).on("mousedown.xdsoft",function(n){return n.stopPropagation(),n.preventDefault(),bt.hide(),wt.hide(),!1});st.append(p);st.xdsoftScroller();h.on("afterOpen.xdsoft",function(){st.xdsoftScroller()});h.append(ct).append(lt);r.withoutCopyright!==!0&&h.append(ti);ct.append(w).append(pt);n(r.parentID).append(h);gt=function(){var t=this;t.now=function(n){var i=new Date,u,f;return!n&&r.defaultDate&&(u=t.strToDate(r.defaultDate),i.setFullYear(u.getFullYear()),i.setMonth(u.getMonth()),i.setDate(u.getDate())),r.yearOffset&&i.setFullYear(i.getFullYear()+r.yearOffset),!n&&r.defaultTime&&(f=t.strtotime(r.defaultTime),i.setHours(f.getHours()),i.setMinutes(f.getMinutes())),i};t.isValidDate=function(n){return Object.prototype.toString.call(n)!=="[object Date]"?!1:!isNaN(n.getTime())};t.setCurrentTime=function(n){t.currentTime=typeof n=="string"?t.strToDateTime(n):t.isValidDate(n)?n:t.now();h.trigger("xchange.xdsoft")};t.empty=function(){t.currentTime=null};t.getCurrentTime=function(){return t.currentTime};t.nextMonth=function(){var i=t.currentTime.getMonth()+1,f;return i===12&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),i=0),f=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),i+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(i),r.onChangeMonth&&n.isFunction(r.onChangeMonth)&&r.onChangeMonth.call(h,u.currentTime,h.data("input")),f!==t.currentTime.getFullYear()&&n.isFunction(r.onChangeYear)&&r.onChangeYear.call(h,u.currentTime,h.data("input")),h.trigger("xchange.xdsoft"),i};t.prevMonth=function(){var i=t.currentTime.getMonth()-1;return i===-1&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),i=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),i+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(i),r.onChangeMonth&&n.isFunction(r.onChangeMonth)&&r.onChangeMonth.call(h,u.currentTime,h.data("input")),h.trigger("xchange.xdsoft"),i};t.getWeekOfYear=function(n){var t=new Date(n.getFullYear(),0,1);return Math.ceil(((n-t)/864e5+t.getDay()+1)/7)};t.strToDateTime=function(n){var i=[],e,f;return n&&n instanceof Date&&t.isValidDate(n)?n:(i=/^(\+|\-)(.*)$/.exec(n),i&&(i[2]=Date.parseDate(i[2],r.formatDate)),i&&i[2]?(e=i[2].getTime()-i[2].getTimezoneOffset()*6e4,f=new Date(u.now().getTime()+parseInt(i[1]+"1",10)*e)):f=n?Date.parseDate(n,r.format):t.now(),t.isValidDate(f)||(f=t.now()),f)};t.strToDate=function(n){if(n&&n instanceof Date&&t.isValidDate(n))return n;var i=n?Date.parseDate(n,r.formatDate):t.now(!0);return t.isValidDate(i)||(i=t.now(!0)),i};t.strtotime=function(n){if(n&&n instanceof Date&&t.isValidDate(n))return n;var i=n?Date.parseDate(n,r.formatTime):t.now(!0);return t.isValidDate(i)||(i=t.now(!0)),i};t.str=function(){return t.currentTime.dateFormat(r.format)};t.currentTime=this.now()};u=new gt;w.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){h.data("changed",!0);u.setCurrentTime(0);h.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(u.str());h.trigger("close.xdsoft")});w.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=n(this),i=0,f=!1;(function e(n){var o=u.currentTime.getMonth();t.hasClass(r.next)?u.nextMonth():t.hasClass(r.prev)&&u.prevMonth();r.monthChangeSpinner&&(f||(i=setTimeout(e,n||100)))})(500);n([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(i);f=!0;n([document.body,window]).off("mouseup.xdsoft",o)})});lt.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var i=n(this),u=0,f=!1,t=110;(function e(n){var s=st[0].clientHeight,h=p[0].offsetHeight,o=Math.abs(parseInt(p.css("marginTop"),10));i.hasClass(r.next)&&h-s-r.timeHeightInTimePicker>=o?p.css("marginTop","-"+(o+r.timeHeightInTimePicker)+"px"):i.hasClass(r.prev)&&o-r.timeHeightInTimePicker>=0&&p.css("marginTop","-"+(o-r.timeHeightInTimePicker)+"px");st.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(p.css("marginTop"),10)/(h-s))]);t=t>10?10:t-10;f||(u=setTimeout(e,n||t))})(500);n([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(u);f=!0;n([document.body,window]).off("mouseup.xdsoft",o)})});kt=0;h.on("xchange.xdsoft",function(t){clearTimeout(kt);kt=setTimeout(function(){for(var o="",f=new Date(u.currentTime.getFullYear(),u.currentTime.getMonth(),1,12,0,0),t=0,s,k=u.now(),l=!1,a=!1,b,tt,c,it,e=[],v,d=!0,g="",y="",nt;f.getDay()!==r.dayOfWeekStart;)f.setDate(f.getDate()-1);for(o+="<table><thead><tr>",r.weeks&&(o+="<th><\/th>"),s=0;s<7;s+=1)o+="<th>"+r.i18n[r.lang].dayOfWeek[(s+r.dayOfWeekStart)%7]+"<\/th>";for(o+="<\/tr><\/thead>",o+="<tbody>",r.maxDate!==!1&&(l=u.strToDate(r.maxDate),l=new Date(l.getFullYear(),l.getMonth(),l.getDate(),23,59,59,999)),r.minDate!==!1&&(a=u.strToDate(r.minDate),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()));t<u.currentTime.countDaysInMonth()||f.getDay()!==r.dayOfWeekStart||u.currentTime.getMonth()===f.getMonth();)e=[],t+=1,b=f.getDate(),tt=f.getFullYear(),c=f.getMonth(),it=u.getWeekOfYear(f),e.push("xdsoft_date"),v=r.beforeShowDay&&n.isFunction(r.beforeShowDay.call)?r.beforeShowDay.call(h,f):null,l!==!1&&f>l||a!==!1&&f<a||v&&v[0]===!1?e.push("xdsoft_disabled"):r.disabledDates.indexOf(f.dateFormat(r.formatDate))!==-1&&e.push("xdsoft_disabled"),v&&v[1]!==""&&e.push(v[1]),u.currentTime.getMonth()!==c&&e.push("xdsoft_other_month"),(r.defaultSelect||h.data("changed"))&&u.currentTime.dateFormat(r.formatDate)===f.dateFormat(r.formatDate)&&e.push("xdsoft_current"),k.dateFormat(r.formatDate)===f.dateFormat(r.formatDate)&&e.push("xdsoft_today"),(f.getDay()===0||f.getDay()===6||r.weekends.indexOf(f.dateFormat(r.formatDate))===-1)&&e.push("xdsoft_weekend"),r.beforeShowDay&&n.isFunction(r.beforeShowDay)&&e.push(r.beforeShowDay(f)),d&&(o+="<tr>",d=!1,r.weeks&&(o+="<th>"+it+"<\/th>")),o+='<td data-date="'+b+'" data-month="'+c+'" data-year="'+tt+'" class="xdsoft_date xdsoft_day_of_week'+f.getDay()+" "+e.join(" ")+'"><div>'+b+"<\/div><\/td>",f.getDay()===r.dayOfWeekStartPrev&&(o+="<\/tr>",d=!0),f.setDate(b+1);if(o+="<\/tbody><\/table>",pt.html(o),w.find(".xdsoft_label span").eq(0).text(r.i18n[r.lang].months[u.currentTime.getMonth()]),w.find(".xdsoft_label span").eq(1).text(u.currentTime.getFullYear()),g="",y="",c="",nt=function(n,t){var i=u.now();i.setHours(n);n=parseInt(i.getHours(),10);i.setMinutes(t);t=parseInt(i.getMinutes(),10);e=[];(r.maxTime!==!1&&u.strtotime(r.maxTime).getTime()<i.getTime()||r.minTime!==!1&&u.strtotime(r.minTime).getTime()>i.getTime())&&e.push("xdsoft_disabled");(r.initTime||r.defaultSelect||h.data("changed"))&&parseInt(u.currentTime.getHours(),10)===parseInt(n,10)&&(r.step>59||Math[r.roundTime](u.currentTime.getMinutes()/r.step)*r.step===parseInt(t,10))&&(r.defaultSelect||h.data("changed")?e.push("xdsoft_current"):r.initTime&&e.push("xdsoft_init_time"));parseInt(k.getHours(),10)===parseInt(n,10)&&parseInt(k.getMinutes(),10)===parseInt(t,10)&&e.push("xdsoft_today");g+='<div class="xdsoft_time '+e.join(" ")+'" data-hour="'+n+'" data-minute="'+t+'">'+i.dateFormat(r.formatTime)+"<\/div>"},r.allowTimes&&n.isArray(r.allowTimes)&&r.allowTimes.length)for(t=0;t<r.allowTimes.length;t+=1)y=u.strtotime(r.allowTimes[t]).getHours(),c=u.strtotime(r.allowTimes[t]).getMinutes(),nt(y,c);else for(t=0,s=0;t<(r.hours12?12:24);t+=1)for(s=0;s<60;s+=r.step)y=(t<10?"0":"")+t,c=(s<10?"0":"")+s,nt(y,c);for(p.html(g),i="",t=0,t=parseInt(r.yearStart,10)+r.yearOffset;t<=parseInt(r.yearEnd,10)+r.yearOffset;t+=1)i+='<div class="xdsoft_option '+(u.currentTime.getFullYear()===t?"xdsoft_current":"")+'" data-value="'+t+'">'+t+"<\/div>";for(bt.children().eq(0).html(i),t=0,i="";t<=11;t+=1)i+='<div class="xdsoft_option '+(u.currentTime.getMonth()===t?"xdsoft_current":"")+'" data-value="'+t+'">'+r.i18n[r.lang].months[t]+"<\/div>";wt.children().eq(0).html(i);n(h).trigger("generate.xdsoft")},10);t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(r.timepicker){var n,t,i,u;p.find(".xdsoft_current").length?n=".xdsoft_current":p.find(".xdsoft_init_time").length&&(n=".xdsoft_init_time");n?(t=st[0].clientHeight,i=p[0].offsetHeight,u=p.find(n).index()*r.timeHeightInTimePicker+1,i-t<u&&(u=i-t),st.trigger("scroll_element.xdsoft_scroller",[parseInt(u,10)/(i-t)])):st.trigger("scroll_element.xdsoft_scroller",[0])}});vt=0;pt.on("click.xdsoft","td",function(i){i.stopPropagation();vt+=1;var e=n(this),f=u.currentTime;if((f===undefined||f===null)&&(u.currentTime=u.now(),f=u.currentTime),e.hasClass("xdsoft_disabled"))return!1;f.setDate(1);f.setFullYear(e.data("year"));f.setMonth(e.data("month"));f.setDate(e.data("date"));h.trigger("select.xdsoft",[f]);t.val(u.str());(vt>1||r.closeOnDateSelect===!0||r.closeOnDateSelect===0&&!r.timepicker)&&!r.inline&&h.trigger("close.xdsoft");r.onSelectDate&&n.isFunction(r.onSelectDate)&&r.onSelectDate.call(h,u.currentTime,h.data("input"),i);h.data("changed",!0);h.trigger("xchange.xdsoft");h.trigger("changedatetime.xdsoft");setTimeout(function(){vt=0},200)});p.on("click.xdsoft","div",function(t){t.stopPropagation();var f=n(this),i=u.currentTime;if((i===undefined||i===null)&&(u.currentTime=u.now(),i=u.currentTime),f.hasClass("xdsoft_disabled"))return!1;i.setHours(f.data("hour"));i.setMinutes(f.data("minute"));h.trigger("select.xdsoft",[i]);h.data("input").val(u.str());r.inline||h.trigger("close.xdsoft");r.onSelectTime&&n.isFunction(r.onSelectTime)&&r.onSelectTime.call(h,u.currentTime,h.data("input"),t);h.data("changed",!0);h.trigger("xchange.xdsoft");h.trigger("changedatetime.xdsoft")});ct.on("mousewheel.xdsoft",function(n){return r.scrollMonth?(n.deltaY<0?u.nextMonth():u.prevMonth(),!1):!0});t.on("mousewheel.xdsoft",function(n){return r.scrollInput?!r.datepicker&&r.timepicker?(ht=p.find(".xdsoft_current").length?p.find(".xdsoft_current").eq(0).index():0,ht+n.deltaY>=0&&ht+n.deltaY<p.children().length&&(ht+=n.deltaY),p.children().eq(ht).length&&p.children().eq(ht).trigger("mousedown"),!1):r.datepicker&&!r.timepicker?(ct.trigger(n,[n.deltaY,n.deltaX,n.deltaY]),t.val&&t.val(u.str()),h.trigger("changedatetime.xdsoft"),!1):void 0:!0});h.on("changedatetime.xdsoft",function(t){if(r.onChangeDateTime&&n.isFunction(r.onChangeDateTime)){var i=h.data("input");r.onChangeDateTime.call(h,u.currentTime,i,t);delete r.value;i.trigger("change")}}).on("generate.xdsoft",function(){r.onGenerate&&n.isFunction(r.onGenerate)&&r.onGenerate.call(h,u.currentTime,h.data("input"));at&&(h.trigger("afterOpen.xdsoft"),at=!1)}).on("click.xdsoft",function(n){n.stopPropagation()});ht=0;yt=function(){var u=h.data("input").offset(),t=u.top+h.data("input")[0].offsetHeight-1,i=u.left,f="absolute";r.fixed?(t-=n(window).scrollTop(),i-=n(window).scrollLeft(),f="fixed"):(t+h[0].offsetHeight>n(window).height()+n(window).scrollTop()&&(t=u.top-h[0].offsetHeight+1),t<0&&(t=0),i+h[0].offsetWidth>n(window).width()&&(i=n(window).width()-h[0].offsetWidth));h.css({left:i,top:t,position:f})};h.on("open.xdsoft",function(t){var i=!0;if(r.onShow&&n.isFunction(r.onShow)&&(i=r.onShow.call(h,u.currentTime,h.data("input"),t)),i!==!1){h.show();yt();n(window).off("resize.xdsoft",yt).on("resize.xdsoft",yt);if(r.closeOnWithoutClick)n([document.body,window]).on("mousedown.xdsoft",function f(){h.trigger("close.xdsoft");n([document.body,window]).off("mousedown.xdsoft",f)})}}).on("close.xdsoft",function(t){var i=!0;w.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide();r.onClose&&n.isFunction(r.onClose)&&(i=r.onClose.call(h,u.currentTime,h.data("input"),t));i===!1||r.opened||r.inline||h.hide();t.stopPropagation()}).on("toggle.xdsoft",function(){h.is(":visible")?h.trigger("close.xdsoft"):h.trigger("open.xdsoft")}).data("input",t);dt=0;ii=0;h.data("xdsoft_datetime",u);h.setOptions(r);u.setCurrentTime(ni());t.data("xdsoft_datetimepicker",h).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||t.data("xdsoft_datetimepicker").is(":visible")&&r.closeOnInputClick||(clearTimeout(dt),dt=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(at=!0,u.setCurrentTime(ni()),h.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var f=this.value,i,u=t.which;return[v].indexOf(u)!==-1&&r.enterLikeTab?(i=n("input:visible,textarea:visible"),h.trigger("close.xdsoft"),i.eq(i.index(this)+1).focus(),!1):[y].indexOf(u)!==-1?(h.trigger("close.xdsoft"),!0):void 0})};w=function(t){var i=t.data("xdsoft_datetimepicker");i&&(i.data("xdsoft_datetime",null),i.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),n(window).off("resize.xdsoft"),n([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};n(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(n){n.keyCode===o&&(s=!0)}).on("keyup.xdsoftctrl",function(n){n.keyCode===o&&(s=!1)});return this.each(function(){var t=n(this).data("xdsoft_datetimepicker");if(t){if(n.type(i)==="string")switch(i){case"show":n(this).select().focus();t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"toggle":t.trigger("toggle.xdsoft");break;case"destroy":w(n(this));break;case"reset":this.value=this.defaultValue;this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,r.format))||t.data("changed",!1);t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(i);return 0}n.type(i)!=="string"&&(!r.lazyInit||r.open||r.inline?h(n(this)):st(n(this)))})};n.fn.datetimepicker.defaults=t})(jQuery),function(){!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n:n(jQuery)}(function(n){function u(r){var u=r||window.event,w=c.call(arguments,1),l=0,s=0,e=0,a=0,b=0,k=0,v,y,p;if(r=n.event.fix(u),r.type="mousewheel","detail"in u&&(e=-1*u.detail),"wheelDelta"in u&&(e=u.wheelDelta),"wheelDeltaY"in u&&(e=u.wheelDeltaY),"wheelDeltaX"in u&&(s=-1*u.wheelDeltaX),"axis"in u&&u.axis===u.HORIZONTAL_AXIS&&(s=-1*e,e=0),l=0===e?s:e,"deltaY"in u&&(e=-1*u.deltaY,l=e),"deltaX"in u&&(s=u.deltaX,0===e&&(l=-1*s)),0!==e||0!==s)return 1===u.deltaMode?(v=n.data(this,"mousewheel-line-height"),l*=v,e*=v,s*=v):2===u.deltaMode&&(y=n.data(this,"mousewheel-page-height"),l*=y,e*=y,s*=y),(a=Math.max(Math.abs(e),Math.abs(s)),(!t||t>a)&&(t=a,o(u,a)&&(t/=40)),o(u,a)&&(l/=40,s/=40,e/=40),l=Math[l>=1?"floor":"ceil"](l/t),s=Math[s>=1?"floor":"ceil"](s/t),e=Math[e>=1?"floor":"ceil"](e/t),i.settings.normalizeOffset&&this.getBoundingClientRect)&&(p=this.getBoundingClientRect(),b=r.clientX-p.left,k=r.clientY-p.top),r.deltaX=s,r.deltaY=e,r.deltaFactor=t,r.offsetX=b,r.offsetY=k,r.deltaMode=0,w.unshift(r,l,s,e),f&&clearTimeout(f),f=setTimeout(h,200),(n.event.dispatch||n.event.handle).apply(this,w)}function h(){t=null}function o(n,t){return i.settings.adjustOldDeltas&&"mousewheel"===n.type&&t%120==0}var f,t,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice,e,i;if(n.event.fixHooks)for(e=s.length;e;)n.event.fixHooks[s[--e]]=n.event.mouseHooks;i=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],u,!1);else this.onmousewheel=u;n.data(this,"mousewheel-line-height",i.getLineHeight(this));n.data(this,"mousewheel-page-height",i.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],u,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(n){if(n=="unixtime")return parseInt(this.getTime()/1e3);Date.formatFunctions[n]==null&&Date.createNewFormat(n);var t=Date.formatFunctions[n];return this[t]()};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++,i;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="";for(i=0;i<format.length;++i)ch=format.charAt(i),special||ch!="\\"?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")};Date.getFormatCode=function(n){switch(n){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(n)+"' + "}};Date.parseDate=function(n,t){if(t=="unixtime")return new Date(isNaN(parseInt(n))?0:parseInt(n)*1e3);Date.parseFunctions[t]==null&&Date.createParser(t);var i=Date.parseFunctions[t];return Date[i](n)};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1,i;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="";for(i=0;i<format.length;++i)ch=format.charAt(i),special||ch!="\\"?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code)};Date.formatCodeToRegex=function(n,t){switch(n){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(n)}}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")};Date.prototype.getDayOfYear=function(){var t=0,n;for(Date.daysInMonth[1]=this.isLeapYear()?29:28,n=0;n<this.getMonth();++n)t+=Date.daysInMonth[n];return t+this.getDate()};Date.prototype.getWeekOfYear=function(){var n=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),i=11-t.getDay();return String.leftPad(Math.ceil((n-i)/7)+1,2,"0")};Date.prototype.isLeapYear=function(){var n=this.getFullYear();return(n&3)==0&&(n%100||n%400==0&&n)};Date.prototype.getFirstDayOfMonth=function(){var n=(this.getDay()-(this.getDate()-1))%7;return n<0?n+7:n};Date.prototype.getLastDayOfMonth=function(){var n=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return n<0?n+7:n};Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};String.escape=function(n){return n.replace(/('|\\)/g,"\\$1")};String.leftPad=function(n,t,i){var r=new String(n);for(i==null&&(i=" ");r.length<t;)r=i+r;return r};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"}}()