1function Help(e){if($("#dleuserpopup").remove(),$("body").append("<div id='dleuserpopup' title='Help' style='display:none'></div>"),"social"==e)var t=800;else t=570;return $("#dleuserpopup").dialog({autoOpen:!0,width:t,height:550,resizable:!1,buttons:{OK:function(){$(this).dialog("close"),$("#dleuserpopup").remove()}},open:function(t,s){$("#dleuserpopup").html("<iframe width='100%' height='440' src='?mod=help§ion="+e+"' frameborder='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>")},beforeClose:function(e,t){$("#dleuserpopup").html("")}}),!1}function ShowOrHide(e,t){if(t)DoDiv(e),DoDiv(t);else{var s=$("#"+e);s.is(":hidden")?s.fadeIn(1e3):s.fadeOut(1e3)}}function DoDiv(e){$("#"+e).is(":hidden")?$("#"+e).show(1):$("#"+e).hide(1)}!function(e){e.fn.datetimepicker=function(t){var s={i18n:{en:{months:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\n".split(" "),dayOfWeek:"Sun Mon Tue Wed Thu Fri Sat".split(" ")}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",step:60,closeOnDateSelect:0,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0},i=e.isPlainObject(t)||!t?e.extend({},s,t):e.extend({},s);return this.each(function(){var s;if(s=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(t))switch(t){case"show":s.open();break;case"hide":s.close();break;case"destroy":var n=(s=e(this)).data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime"),n.remove(),delete n,s.data("xdsoft_datetimepicker",null),s.off("enter.xdsoft keyup.xdsoft mousedown.xdsoft open.xdsoft"),e(window).off("resize.xdsoft"),e(window).off("mousedown.xdsoft keydown.xdsoft"),s.unmousewheel&&s.unmousewheel(),delete i)}else e(this).data("xdsoft_datetimepicker").setOptions(i);return 0}"string"!==e.type(t)&&function(t){var s,n=e('<div class="xdsoft_datetimepicker"></div>'),a=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),r=e('<div class="xdsoft_datepicker active"></div>'),o=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_label xdsoft_month"></div><div class="xdsoft_label xdsoft_year"></div><button type="button" class="xdsoft_next"></button></div>'),l=e('<div class="xdsoft_calendar"></div>'),d=e('<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>'),h=d.find(".xdsoft_time_box").eq(0),c=e('<div class="xdsoft_time_variant"></div>'),u=e('<div class="xdsoft_scrollbar"></div>'),f=e('<div class="xdsoft_scroller"></div>');n.setOptions=function(s){(i=e.extend({},i,s)).inline&&(n.addClass("xdsoft_inline"),t.after(n).hide()),(i.open||i.opened||i.inline)&&t.trigger("open.xdsoft"),i.inverseButton&&(i.next="xdsoft_prev",i.prev="xdsoft_next"),!i.datepicker&&i.timepicker&&r.removeClass("active"),i.datepicker&&!i.timepicker&&d.removeClass("active"),i.value&&t&&t.val&&t.val(i.value),isNaN(i.dayOfWeekStart)||0>parseInt(i.dayOfWeekStart)||6<parseInt(i.dayOfWeekStart)?i.dayOfWeekStart=0:i.dayOfWeekStart=parseInt(i.dayOfWeekStart),i.timepickerScrollbar||u.hide(),i.dayOfWeekStartPrev=0==i.dayOfWeekStart?6:i.dayOfWeekStart-1},n.data("options",i),n.on("mousedown",function(e){e.stopPropagation()}),u.append(f),d.find(".xdsoft_time_box").append(u),s=0,f.on("mousedown",function(t){var i=t.pageY,a=parseInt(f.css("margin-top")),r=u[0].offsetHeight;e("body").addClass("xdsoft_noselect"),e(window).on("mouseup",function(){e(window).off("mouseup",arguments.callee),e(window).off("mousemove",s),e("body").removeClass("xdsoft_noselect")}).on("mousemove",s=function(e){0>(e=e.pageY-i+a)&&(e=0),e+f[0].offsetHeight>r&&(e=r-f[0].offsetHeight),f.css("margin-top",e),n.trigger("scroll.
1scrollbar",[e])})}),n.on("scroll.timebox",function(e,t){if(i.timepickerScrollbar){var s=u.height()-f[0].offsetHeight;f.css("margin-top",t/(c[0].offsetHeight-h[0].offsetHeight)*s)}}).on("open.xdsoft",function(e){i.timepickerScrollbar&&(e=h[0].offsetHeight,height=c[0].offsetHeight,percent=e/height,sh=percent*u[0].offsetHeight,1<percent?f.hide():(f.show(),f.css("height",parseInt(10<sh?sh:10))))}),n.on("scroll.scrollbar",function(e,t){var s=t/(u[0].offsetHeight-f[0].offsetHeight);pheight=h[0].offsetHeight,height=c[0].offsetHeight,c.css("marginTop",-parseInt((height-pheight)*s))}),d.find(".xdsoft_time_box").append(c),n.append(r).append(d),!0!==i.withoutCopyright&&n.append(a),r.append(o).append(l),e("body").append(n),o.find(".xdsoft_prev,.xdsoft_next").click(function(){var t=e(this);n.data("xdsoft_datetime").currentTime.getMonth(),t.hasClass(i.next)?n.data("xdsoft_datetime").nextMonth():t.hasClass(i.prev)&&n.data("xdsoft_datetime").prevMonth()}),o.find(".xdsoft_year").click(function(){e(this),n.data("xdsoft_datetime").currentTime.getMonth(),n.data("xdsoft_datetime").nextYear()}),d.find(".xdsoft_prev,.xdsoft_next").click(function(){var t=e(this),s=c.parent()[0].offsetHeight,a=c[0].offsetHeight,r=Math.abs(parseInt(c.css("marginTop")));t.hasClass(i.next)&&a-s-i.timeHeightInTimePicker>=r?c.css("marginTop","-"+(r+i.timeHeightInTimePicker)+"px"):t.hasClass(i.prev)&&0<=r-i.timeHeightInTimePicker&&c.css("marginTop","-"+(r-i.timeHeightInTimePicker)+"px"),n.trigger("scroll.timebox",[Math.abs(parseInt(c.css("marginTop")))])}),n.on("change.xdsoft",function(){for(var t=e(this).data("xdsoft_datetime"),s="",n=new Date(t.currentTime.getFullYear(),t.currentTime.getMonth(),1);n.getDay()!=i.dayOfWeekStart;)n.setDate(n.getDate()-1);for(var a=0,r=new Date,d=(s+="<table><thead><tr>",0);7>d;d++)s+="<th>"+i.i18n[i.lang].dayOfWeek[6<d+i.dayOfWeekStart?0:d+i.dayOfWeekStart]+"</th>";for(s+="</tr></thead><tbody><tr>";a<t.currentTime.getDaysInMonth()||n.getDay()!=i.dayOfWeekStart||t.currentTime.getMonth()==n.getMonth();)a++,s+='<td data-date="'+n.getDate()+'" data-month="'+n.getMonth()+'" data-year="'+n.getFullYear()+'" class="'+(!1!==i.maxDate&&Math.round(t.strtodate(i.maxDate).getTime()/864e5)<Math.round(n.getTime()/864e5)||!1!==i.minDate&&Math.round(t.strtodate(i.minDate).getTime()/864e5)>Math.round(n.getTime()/864e5)?"xdsoft_disabled ":" ")+(t.currentTime.getMonth()!=n.getMonth()?" xdsoft_other_month ":" ")+(t.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")?" xdsoft_current ":" ")+(r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")?" xdsoft_today ":" ")+'"><div>'+n.getDate()+"</div></td>",n.getDay()==i.dayOfWeekStartPrev&&(s+="</tr>"),n.setDate(n.getDate()+1);s+="</tbody></table>",l.html(s),o.find(".xdsoft_label").eq(0).text(i.i18n[i.lang].months[t.currentTime.getMonth()]),o.find(".xdsoft_label").eq(1).text(t.currentTime.getFullYear());var h="",u=(n=s="",function(e,s){var n=new Date;n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(s),s=parseInt(n.getMinutes()),h+='<div class="'+(!1!==i.maxTime&&t.strtotime(i.maxTime).getTime()<n.getTime()||!1!==i.minTime&&t.strtotime(i.minTime).getTime()>n.getTime()?"xdsoft_disabled ":" ")+(parseInt(t.currentTime.getHours())==parseInt(e)&&parseInt(t.currentTime.getMinutes()/i.step)*i.step==parseInt(s)?" xdsoft_current ":"")+(parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(s)?" xdsoft_today ":"")+'" data-hour="'+e+'" data-minute="'+s+'">'+n.dateFormat(i.formatTime)+"</div>"});if(i.allowTimes&&e.isArray(i.allowTimes)&&i.allowTimes.length)for(a=0;a<i.allowTimes.length;a++)u(s=t.strtotime(i.allowTimes[a]).getHours(),n=t.strtotime(i.allowTimes[a]).getMinutes());else for(a=0;a<(i.hours12?12:24);a++)for(d=0;60>d;d+=i.step)u(s=(10>a?"0":"")+a,n=(10>d?"0":"")+d);c.html(h)}),n.on("open.xdsoft",function(){if(c.find(".xdsoft_current").length){var e=c.parent()[0].offsetHeight,t=c[0].offsetHeight,s=c.find(".xdsoft_current").index()*i.timeHeightInTimePicker;t-e<s&&(s=t-e),c.css("marginTop","-"+parseInt(s)+"px")}}),l.on("mousedown","td",function(){if(e(this).hasClass("xdsoft_disabled"))return!1;var s=n.data("xdsoft_datetime").currentTime;s.setFullYear(e(this).data("year")),s.setMonth(e(this).data("month")),s.setDate(e(this).data("date")),n.trigger("select.xdsoft",[s]),t.val(n.data("xdsoft_datetime").str()),!0!==i.closeOnDateSelect&&(0!==i.closeOnDateSelect||i.timepicker)||i.inline||n.close(),i.onSelectDate&&i.onSelectDate.call&&i.onSelectDate.call(n,n.data("xdsoft_datetime").currentTime,n.data("input")),n.trigger("change.xdsoft"),n.trigger("changedatetime.xdsoft")}),c.on("mousedown","div",function(){if(e(this).hasClass("xdsoft_disabled"))return!1;var t=n.data("xdsoft_datetime").currentTime;t.setHours(e(this).data("hour")),t.setMinutes(e(this).data("minute")),n.trigger("select.xdsoft",[t]),n.data("input").val(n.data("xdsoft_datetime").str()),!i.inline&&n.close(),i.onSelectTime&&i.onSelectTime.call&&i.onSelectTime.call(n,n.data("xdsoft_datetime").currentTime,n.data("input")),n.trigger("change.xdsoft"),n.trigger("changedatetime.xdsoft")}),n.mousewheel&&r.mousewheel(function(e,t,s,a){return!i.scrollMonth||(0>t?n.data("xdsoft_datetime").nextMonth():n.data("xdsoft_datetime").prevMonth(),!1)}),n.mousewheel&&d.mousewheel(function(e,t,s,a){if(!i.scrollTime)return!0;e=c.parent()[0].offsetHeight,s=c[0].offsetHeight,a=Math.abs(parseInt(c.css("marginTop")));var r=!0;return 0>t&&s-e-i.timeHeightInTimePicker>=a?(c.css("marginTop","-"+(a+i.timeHeightInTimePicker)+"px"),r=!1):0<t&&0<=a-i.timeHeightInTimePicker&&(c.css("marginTop","-"+(a-i.timeHeightInTimePicker)+"px"),r=!1),n.trigger("scroll.timebox",[Math.abs(parseInt(c.css("marginTop")))]),r}),n.on("changedatetime.xdsoft",function(){i.onChangeDateTime&&i.onChangeDateTime.call&&i.onChangeDateTime.call(n,n.data("xdsoft_datetime").currentTime,n.data("input"))});var p=0;t.mousewheel&&t.mousewheel(function(e,s,a,o){return!i.scrollInput||(!i.datepicker&&i.timepicker?(0<=(p=c.find(".xdsoft_current").length?c.find(".xdsoft_current").eq(0).index():0)+s&&p+s<c.children().length&&(p+=s),c.children().eq(p).length&&c.children().eq(p).trigger("mousedown"),!1):i.datepicker&&!i.timepicker?(r.trigger(e,[s,a,o]),t.val&&t.val(n.data("xdsoft_datetime").str()),n.trigger("changedatetime.xdsoft"),!1):void 0)}),n.open=function(){var t=!0;i.onShow&&i.onShow.call&&(t=i.onShow.call(n,n.data("xdsoft_datetime").currentTime,n.data("input"))),!1!==t&&(t=function(){var t=n.data("input").offset(),s=t.top+n.data("input")[0].offsetHeight;s+n[0].offsetHeight>
1e("body").height()&&(s=t.top-n[0].offsetHeight),n.css({left:t.left,top:s})},n.show(),t(),e(window).on("resize.xdsoft",t),i.closeOnWithoutClick&&e(window).on("mousedown.xdsoft keydown.xdsoft",function(){n.close(),e(this).off("mousedown",arguments.callee)}),n.trigger("open.xdsoft"))},n.close=function(){var e=!0;i.onClose&&i.onClose.call&&(e=i.onClose.call(n,n.data("xdsoft_datetime").currentTime,n.data("input"))),!1===e||i.opened||i.inline||n.hide()},n.data("input",t);var _=new function(){var e=this;e.now=function(){return new Date},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strtodatetime(t):e.isValidDate(t)?t:e.now(),n.trigger("change.xdsoft")},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setMonth(t),i.onChangeMonth&&i.onChangeMonth.call&&i.onChangeMonth.call(n,n.data("xdsoft_datetime").currentTime,n.data("input")),n.trigger("change.xdsoft"),t},e.nextYear=function(){var t=e.currentTime.getMonth();return e.currentTime.setFullYear(e.currentTime.getFullYear()+1),e.currentTime.setMonth(t),i.onChangeMonth&&i.onChangeMonth.call&&i.onChangeMonth.call(n,n.data("xdsoft_datetime").currentTime,n.data("input")),n.trigger("change.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return-1==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setMonth(t),i.onChangeMonth&&i.onChangeMonth.call&&i.onChangeMonth.call(n,n.data("xdsoft_datetime").currentTime,n.data("input")),n.trigger("change.xdsoft"),t},this.strtodatetime=function(t){return t=t?Date.parseDate(t,i.format):new Date,e.isValidDate(t)||(t=new Date),t},this.strtodate=function(t){return t=t?Date.parseDate(t,i.formatDate):new Date,e.isValidDate(t)||(t=new Date),t},this.strtotime=function(t){return t=t?Date.parseDate(t,i.formatTime):new Date,e.isValidDate(t)||(t=new Date),t},this.str=function(){return this.currentTime.dateFormat(i.format)}},m=0;n.data("xdsoft_datetime",_),n.setOptions(i),_.setCurrentTime(i.value?i.value:t&&t.val&&t.val()?t.val():new Date),t.data("xdsoft_datetimepicker",n).on("enter.xdsoft keyup.xdsoft mousedown.xdsoft open.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(m),m=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(_.setCurrentTime(t&&t.val&&t.val()?t.val():new Date),n.open())},100))})}(e(this))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){return null==Date.formatFunctions[e]&&Date.createNewFormat(e),this[Date.formatFunctions[e]]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function(){return ",special=!1,ch="",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(e){switch(e){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(e)+"' + "}},Date.parseDate=function(e,t){null==Date.parseFunctions[t]&&Date.createParser(t);var s=Date.parseFunctions[t];return Date[s](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input){\nvar y = -1, m = -1, d = -1, h = -1, i =
1-1, s = -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="",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 && 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(e,t){switch(e){case"D":return{g:0,c:null,
1s:"(?: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:0,c:null,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(e)}}},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(this.getTimezoneOffset()/60),2,"0")+String.leftPad(this.getTimezoneOffset()%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()-1},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=7-new Date(this.getFullYear(),0,1).getDay()+4;return document.write(t),String.leftPad((e-t)/7+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return!(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return e<0?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return e<0?e+7:e},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(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,s){var i=new String(e);for(null==s&&(s=" ");i.length<t;)i=s+i;return i},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"},function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){var t,s,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],n="onwheel"in document||document.documentMode>
1=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var a=i.length;a;)e.event.fixHooks[i[--a]]=e.event.mouseHooks;function r(i){var n,a,r,o=i||window.event,l=[].slice.call(arguments,1),d=0,h=0,c=0;return(i=e.event.fix(o)).type="mousewheel",o.wheelDelta&&(d=o.wheelDelta),o.detail&&(d=-1*o.detail),o.deltaY&&(d=c=-1*o.deltaY),o.deltaX&&(d=-1*(h=o.deltaX)),void 0!==o.wheelDeltaY&&(c=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(h=-1*o.wheelDeltaX),n=Math.abs(d),(!t||n<t)&&(t=n),a=Math.max(Math.abs(c),Math.abs(h)),(!s||a<s)&&(s=a),r=d>0?"floor":"ceil",d=Math[r](d/t),h=Math[r](h/s),c=Math[r](c/s),l.unshift(i,d,h,c),(e.event.dispatch||e.event.handle).apply(this,l)}e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],r,!1);else this.onmousewheel=r},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],r,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(){var e;(e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,s,i,n,a,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),r=[],i=0,n=(a=e.childNodes).length;n>i;i++)s=a[i],r.push(this.add_option(s,t,e.disabled));return r},e.prototype.add_option=function(e,t,s){return"OPTION"===e.nodeName.toUpperCase()?(""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:!0===s?s:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},e}()).select_to_array=function(t){var s,i,n,a,r;for(i=new e,n=0,a=(r=t.childNodes).length;a>n;n++)s=r[n],i.add_node(s);return i.parsed},this.SelectParser=e}.call(this),function(){var e;e=function(){function e(t,s){this.form_field=t,this.options=null!=s?s:{},e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup())}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1},e.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(){var e=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return e.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(){var e=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return e.blur_test()},100))},e.prototype.result_add_option=function(e){var t,s;return e.dom_id=this.container_id+"_o_"+e.array_index,t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.pu
1sh(e.classes),s=""!==e.style.cssText?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+s+">"+e.html+"</li>"},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.choices_count=function(){var e,t,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,e=0,t=(s=this.form_field.options).length;t>e;e++)s[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){return e.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},e.prototype.keyup_checker=function(e){var t,s;switch(t=null!=(s=e.which)?s:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",t=Math.floor(36*Math.random()),e.substring(t,t+1)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.browser_is_supported=function(){var e;return"Microsoft Internet Explorer"!==window.navigator.appName||null!==(e=document.documentMode)&&e>=8},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),this.AbstractChosen=e}.call(this),function(){var e,t,s,i={}.hasOwnProperty,n=function(e,t){function s(){this.constructor=e}for(var n in t)i.call(t,n)&&(e[n]=t[n]);return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,e};s=this,(e=jQuery).fn.extend({chosen:function(s){return AbstractChosen.browser_is_supported()?this.each(function(){var i;return(i=e(this)).hasClass("chzn-done")?void 0:i.data("chosen",new t(this,s))}):this}}),t=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},i.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},i.prototype.set_up_html=function(){var t,s;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",(t=["chzn-container"]).push("chzn-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chzn-rtl"),s={id:this.container_id,class:t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.container=e("<div />",s),this.is_multiple?this.container.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop"><ul class="chzn-results"></ul></div>'):this.container.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chzn-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){e.container_mousedown(t)}),this.container.mouseup(function(t){e.container_mouseup(t)}),this.container.mouseenter(function(t){e.mouse_enter(t)}),this.container.mouseleave(function(t){e.mouse_leave(t)}),this.search_results.mouseup(function(t){e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){e.search_results_mouseout(t)}),this.search_results.bind("mousewheel DOMMouseScroll",function(t){e.search_results_mousewheel(t)}),this.form_field_jq.bind("liszt:updated",function(t){e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){e.container_mousedown(t)}),this.search_field.blur(function(t){e.input_blur(t)}),this.search_field.keyup(function(t){e.keyup_checker(t)}),this.search_field.keydown(function(t){e.keydown_checker(t)}),this.search_field.focus(function(t){e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){e.choices_click(t)}):this.container.click(function(e){e.preventDefault()})},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field()):(this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus",this.activate_action))},i.prototype.container_mousedown=function(t){return this.is_disabled||(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null!=t&&e(t.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chzn-single").length||(t.preventDefault(),this.results_toggle(
1)):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field())},i.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},i.prototype.search_results_mousewheel=function(e){var t,s,i;return null!=(t=-(null!=(s=e.originalEvent)?s.wheelDelta:void 0)||(null!=(i=e.originialEvent)?i.detail:void 0))?(e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())):void 0},i.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chzn-container-active")?this.close_field():void 0},i.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){var e,t,i,n,a;for(this.parsing=!0,this.selected_option_count=null,this.results_data=s.SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chzn-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chzn-container-single-nosearch"))),e="",i=0,n=(a=this.results_data).length;n>i;i++)(t=a[i]).group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},i.prototype.result_add_group=function(t){return t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>"},i.prototype.result_do_highlight=function(e){var t,s,i,n,a;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),n=(i=parseInt(this.search_results.css("maxHeight"),10))+(a=this.search_results.scrollTop()),(t=(s=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(t-i>0?t-i:0);if(a>s)return this.search_results.scrollTop(s)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(this.container.addClass("chzn-with-drop"),this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results())},i.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chzn-with-drop"),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this})),this.results_showing=!1},i.prototype.set_tab_index=function(){var e;return this.form_field_jq.attr("tabindex")?(e=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",e)):void 0},i.prototype.set_label_behavior=function(){var t=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=e("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.click(function(e){return t.is_multiple?t.container_mousedown(e):t.activate_field()}):void 0},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(t){var s;return(s=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first()).length?(this.result_highlight=s,this.result_select(t),this.search_field.focus()):void 0},i.prototype.search_results_mouseover=function(t){var s;return(s=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first())?this.result_do_highlight(s):void 0},i.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},i.prototype.choice_build=function(t){var s,i,n=this;return s=e("<li />",{class:"search-choice"}).html("<span>"+t.html+"</span>"),t.disabled?s.addClass("search-choice-disabled"):((i=e("<a />",{href:"#",class:"search-choice-close",rel:t.array_index})).click(function(e){return n.choice_destroy_link_click(e)}),s.append(i)),this.search_container.before(s)},i.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(e(t.target))},i.prototype.choice_destroy=function(e){return this.result_deselect(e.attr("rel"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()):void 0},i.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_option_count=null,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,s,i,n;return this.result_highlight?(s=(t=this.result_highlight).attr("id"),this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),n=s.substr(s.lastIndexOf("_")+1),(i=this.results_data[n]).selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):(this.selected_item.find("span").first().text(i.text),this.allow_single_deselect&&this.single_deselect_control_build()),(e.metaKey||e.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},i.prototype.result_activate=function(e,t){return t.disabled?e.addClass("disabled-result"):this.is_multiple&&t.selected?e.addClass("result-selected"):e.addClass("active-result")},i.prototype.result_deactivate=function(e){return e.removeClass("active-result result-selected disabled-result")},i.prototype.result_deselect=function(t){var s;return s=this.results_data[t],!this.form_field.options[s.options_index].disabled&&(s.selected=!1,this.form_field.options[s.options_index].selected=!1,this.selected_option_count=null,e("#"+this.container_id+"_o_"+t).removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[s.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chzn-single-with-deselect")):void 0},i.prototype.winnow_results=function(){var t,s,i,n,a,r,o,l,d,h,c,u,f,p,_,m,g;for(this.no_results_clear(),l=0,d=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),this.search_contains,a=new RegExp(""+d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),u=new RegExp(d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),f=0,_=(g=this.results_data).length;_>f;f++)if(!(s=g[f]).empty)if(s.group)e("#"+s.dom_id).css("display","none");else{if(t=!1,o=s.dom_id,r=e("#"+o),a.test(s.html))t=!0,l+=1;else if(this.enable_split_word_search&&(s.html.indexOf(" ")>=0||0===s.html.indexOf("["))&&(n=s.html.replace(/\[|\]/g,"").split(" ")).length)for(p=0,m=n.length;m>p;p++)i=n[p],a.test(i)&&(t=!0,l+=1);t?(d.length?(h=s.html.search(u),c=(c=s.html.substr(0,h+d.length)+""+s.html.substr(h+d.length)).substr(0,h)+""+c.substr(h)):c=s.html,r.html(c),this.result_activate(r,s),null!=s.group_array_index&&e("#"+this.results_data[s.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&o===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(r))}return 1>l&&d.length?this.no_results(d):this.winnow_results_set_highlight()},i.prototype.winnow_results_set_highlight=function(){var e,t;return this.result_highlight||null==(e=(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?t.first():this.search_results.find(".active-result").first())?void 0:this.result_do_highlight(e)},i.prototype.no_results=function(t){var s;return(s=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>')).find("span").first().html(t),this.search_results.append(s)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last()).length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,s;switch(t=null!=(s=e.which)?s:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var t,s,i,n,a,r,o;if(this.is_multiple){for(a=0,i="position:absolute; left: -1000px; top: -1000px; display:none;",r=0,o=(n=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"]).length;o>r;r++)i+=(s=n[r])+":"+this.search_field.css(s)+";";return(t=e("<div />",{style:i})).text(this.search_field.val()),e("body").append(t),a=t.width()+25,t.remove(),this.f_width||(this.f_width=this.container.outerWidth()),a>this.f_width-10&&(a=this.f_width-10),this.search_field.css({width:a+"px"})}},i.prototype.generate_random_id=function(){var t;for(t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();e("#"+t).length>0;)t+=this.generate_random_char();return t},i}(AbstractChosen),s.Chosen=t}.call(this),function(e,t,s,i){var n="ontouchstart"in t,a=function(){var e=s.createElement("div"),i=s.documentElement;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",i.appendChild(e);var n=t.getComputedStyle&&"auto"===t.getComputedStyle(e,"").pointerEvents;return i.removeChild(e),!!n}(),r=n?"touchstart":"mousedown",o=n?"touchmove":"mousemove",l=n?"touchend":"mou
1seup";eCancel=n?"touchcancel":"mouseup";var d={listNodeName:"ol",itemNodeName:"li",rootClass:"dd",listClass:"dd-list",itemClass:"dd-item",dragClass:"dd-dragel",handleClass:"dd-handle",collapsedClass:"dd-collapsed",placeClass:"dd-placeholder",noDragClass:"dd-nodrag",emptyClass:"dd-empty",expandBtnHTML:'<button data-action="expand" type="button">Expand</button>',collapseBtnHTML:'<button data-action="collapse" type="button">Collapse</button>',group:0,maxDepth:5,threshold:20};function h(s,i){this.w=e(t),this.el=e(s),this.options=e.extend({},d,i),this.init()}h.prototype={init:function(){var s=this;s.reset(),s.el.data("nestable-group",this.options.group),s.placeEl=e('<div class="'+s.options.placeClass+'"/>'),e.each(this.el.find(s.options.itemNodeName),function(t,i){s.setParent(e(i))}),s.el.on("click","button",function(t){if(!s.dragEl&&(n||0===t.button)){var i=e(t.currentTarget),a=i.data("action"),r=i.parent(s.options.itemNodeName);"collapse"===a&&s.collapseItem(r),"expand"===a&&s.expandItem(r)}});var i=function(t){var i=e(t.target);if(!i.hasClass(s.options.handleClass)){if(i.closest("."+s.options.noDragClass).length)return;i=i.closest("."+s.options.handleClass)}!i.length||s.dragEl||!n&&0!==t.button||n&&1!==t.touches.length||(t.preventDefault(),s.dragStart(n?t.touches[0]:t))},a=function(e){s.dragEl&&(e.preventDefault(),s.dragMove(n?e.touches[0]:e))},d=function(e){s.dragEl&&(e.preventDefault(),s.dragStop(n?e.touches[0]:e))};n?(s.el[0].addEventListener(r,i,!1),t.addEventListener(o,a,!1),t.addEventListener(l,d,!1),t.addEventListener(eCancel,d,!1)):(s.el.on(r,i),s.w.on(o,a),s.w.on(l,d))},serialize:function(){var t=this;return step=function(s,i){var n=[];return s.children(t.options.itemNodeName).each(function(){var s=e(this),a=e.extend({},s.data()),r=s.children(t.options.listNodeName);r.length&&(a.children=step(r,i+1)),n.push(a)}),n},step(t.el.find(t.options.listNodeName).first(),0)},serialise:function(){return this.serialize()},reset:function(){this.mouse={offsetX:0,offsetY:0,startX:0,startY:0,lastX:0,lastY:0,nowX:0,nowY:0,distX:0,distY:0,dirAx:0,dirX:0,dirY:0,lastDirX:0,lastDirY:0,distAxX:0,distAxY:0},this.moving=!1,this.dragEl=null,this.dragRootEl=null,this.dragDepth=0,this.hasNewRoot=!1,this.pointEl=null},expandItem:function(e){e.removeClass(this.options.collapsedClass),e.children('[data-action="expand"]').hide(),e.children('[data-action="collapse"]').show(),e.children(this.options.listNodeName).show()},collapseItem:function(e){e.children(this.options.listNodeName).length&&(e.addClass(this.options.collapsedClass),e.children('[data-action="collapse"]').hide(),e.children('[data-action="expand"]').show(),e.children(this.options.listNodeName).hide())},expandAll:function(){var t=this;t.el.find(t.options.itemNodeName).each(function(){t.expandItem(e(this))})},collapseAll:function(){var t=this;t.el.find(t.options.itemNodeName).each(function(){t.collapseItem(e(this))})},setParent:function(t){t.children(this.options.listNodeName).length&&(t.prepend(e(this.options.expandBtnHTML)),t.prepend(e(this.options.collapseBtnHTML))),t.children('[data-action="expand"]').hide()},unsetParent:function(e){e.removeClass(this.options.collapsedClass),e.children("[data-action]").remove(),e.children(this.options.listNodeName).remove()},dragStart:function(t){var n=this.mouse,a=e(t.target).closest("."+this.options.handleClass),r=a.closest(this.options.itemNodeName);console.log(a),this.placeEl.css("height",r.height()),n.offsetX=t.offsetX!==i?t.offsetX:t.pageX-a.offset().left,n.offsetY=t.offsetY!==i?t.offsetY:t.pageY-a.offset().top,n.startX=n.lastX=t.pageX,n.startY=n.lastY=t.pageY,this.dragRootEl=this.el,this.dragEl=e(s.createElement(this.options.listNodeName)).addClass(this.options.listClass+" "+this.options.dragClass),this.dragEl.css("width",r.width()),r.after(this.placeEl),r[0].parentNode.removeChild(r[0]),r.appendTo(this.dragEl),e(s.body).append(this.dragEl),this.dragEl.css({left:t.pageX-n.offsetX,top:t.pageY-n.offsetY});var o,l,d=this.dragEl.find(this.options.itemNodeName);for(o=0;o<d.length;o++)(l=e(d[o]).parents(this.options.listNodeName).length)>this.dragDepth&&(this.dragDepth=l)},dragStop:function(e){var t=this.dragEl.children(this.options.itemNodeName).first();t[0].parentNode.removeChild(t[0]),this.placeEl.replaceWith(t),this.dragEl.remove(),this.el.trigger("change"),this.hasNew
1Root&&this.dragRootEl.trigger("change"),this.reset()},dragMove:function(i){var n,r,o,l=this.options,d=this.mouse;this.dragEl.css({left:i.pageX-d.offsetX,top:i.pageY-d.offsetY}),d.lastX=d.nowX,d.lastY=d.nowY,d.nowX=i.pageX,d.nowY=i.pageY,d.distX=d.nowX-d.lastX,d.distY=d.nowY-d.lastY,d.lastDirX=d.dirX,d.lastDirY=d.dirY,d.dirX=0===d.distX?0:d.distX>0?1:-1,d.dirY=0===d.distY?0:d.distY>0?1:-1;var h=Math.abs(d.distX)>Math.abs(d.distY)?1:0;if(!d.moving)return d.dirAx=h,void(d.moving=!0);d.dirAx!==h?(d.distAxX=0,d.distAxY=0):(d.distAxX+=Math.abs(d.distX),0!==d.dirX&&d.dirX!==d.lastDirX&&(d.distAxX=0),d.distAxY+=Math.abs(d.distY),0!==d.dirY&&d.dirY!==d.lastDirY&&(d.distAxY=0)),d.dirAx=h,d.dirAx&&d.distAxX>=l.threshold&&(d.distAxX=0,o=this.placeEl.prev(l.itemNodeName),d.distX>0&&o.length&&!o.hasClass(l.collapsedClass)&&(n=o.find(l.listNodeName).last(),this.placeEl.parents(l.listNodeName).length+this.dragDepth<=l.maxDepth&&(n.length?(n=o.children(l.listNodeName).last()).append(this.placeEl):((n=e("<"+l.listNodeName+"/>").addClass(l.listClass)).append(this.placeEl),o.append(n),this.setParent(o)))),d.distX<0&&(this.placeEl.next(l.itemNodeName).length||(r=this.placeEl.parent(),this.placeEl.closest(l.itemNodeName).after(this.placeEl),r.children().length||this.unsetParent(r.parent()))));var c=!1;if(a||(this.dragEl[0].style.visibility="hidden"),this.pointEl=e(s.elementFromPoint(i.pageX-s.body.scrollLeft,i.pageY-(t.pageYOffset||s.documentElement.scrollTop))),a||(this.dragEl[0].style.visibility="visible"),this.pointEl.hasClass(l.handleClass)&&(this.pointEl=this.pointEl.parent(l.itemNodeName)),this.pointEl.hasClass(l.emptyClass))c=!0;else if(!this.pointEl.length||!this.pointEl.hasClass(l.itemClass))return;var u=this.pointEl.closest("."+l.rootClass),f=this.dragRootEl.data("nestable-id")!==u.data("nestable-id");if(!d.dirAx||f||c){if(f&&l.group!==u.data("nestable-group"))return;if(this.dragDepth-1+this.pointEl.parents(l.listNodeName).length>l.maxDepth)return;var p=i.pageY<this.pointEl.offset().top+this.pointEl.height()/2;r=this.placeEl.parent(),c?((n=e(s.createElement(l.listNodeName)).addClass(l.listClass)).append(this.placeEl),this.pointEl.replaceWith(n)):p?this.pointEl.before(this.placeEl):this.pointEl.after(this.placeEl),r.children().length||this.unsetParent(r.parent()),this.dragRootEl.find(l.itemNodeName).length||this.dragRootEl.append('<div class="'+l.emptyClass+'"/>'),f&&(this.dragRootEl=u,this.hasNewRoot=this.el[0]!==this.dragRootEl[0])}}},e.fn.nestable=function(t){var s=this;return this.each(function(){var i=e(this).data("nestable");i?"string"==typeof t&&"function"==typeof i[t]&&(s=i[t]()):(e(this).data("nestable",new h(this,t)),e(this).data("nestable-id",(new Date).getTime()))}),s||this}}(window.jQuery||window.Zepto,window,document);var boxedpanel=0;function toggleleftpanel(){boxedpanel?($(".primary-sidebar, .sidebar-background").show(),$("#maincontainer").removeClass("boxed"),$(".main-content").css("margin-left","251px"),$(".boxedhidden").hide(),boxedpanel=0):($(".primary-sidebar, .sidebar-background").hide(),$(".main-content").css("margin","0"),$("#maincontainer").addClass("boxed"),$(".boxedhidden").show(),boxedpanel=1),"undefined"!=typeof Storage&&localStorage.setItem("boxedpanel",boxedpanel)}function ShowLoading(e){e&&$("#loading-layer").html(e);var t=($(window).width()-$("#loading-layer").width())/2,s=($(window).height()-$("#loading-layer").height())/2;$("#loading-layer").css({left:t+"px",top:s+"px",position:"fixed",zIndex:"99"}),$("#loading-layer").fadeTo("slow",1)}function HideLoading(e){$("#loading-layer").fadeOut("slow")}function DLEalert(e,t){$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-alert' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,minHeight:160,resizable:!1,buttons:{Ok:function(){$(this).dialog("close"),$("#dlepopup").remove()}}})}function DLEconfirm(e,t,s){var i={};i[act_lang[1]]=function(){$(this).dialog("close"),$("#dlepopup").remove()},i[act_lang[0]]=function(){$(this).dialog("close"),$("#dlepopup").remove(),s&&s()},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-confirm' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:500,minHeight:160,resizable:!1,buttons:i})}function DLEprompt(e,t,s,i,n){var a={};a[act_lang[3]]=function(){$(this).dialog("close")},a[act_lang[2]]=function(){if(!n&&$("#dle-promt-text").val().length<1)$("#dle-promt-text").addClass("ui-state-error");else{var e=$("#dle-promt-text").val();$(this).dialog("close"),$("#dlepopup").remove(),i&&i(e)}},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+s+"' style='display:none'>"+e+"<br /><br /><input type='text' name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;' value=\""+t+'"/></div>'),$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,buttons:a}),t.length>0?$("#dle-promt-text").select().focus():$("#dle-promt-text").focus()}function RunAjaxJS(e,t){var s=new Date,i=!1;s=s.getTime();var n=/<script.*?>(.|[\r\n])*?<\/script>/gi,a=n.exec(t);if(null!=a){var r=new Array(a.shift());for(i=!0;a;)null!=(a=n.exec(t))&&r.push(a.shift());for(var o=0;o<r.length;o++)t=t.replace(r[o],'<span id="'+s+o+'" style="display:none;"></span>')}if($("#"+e).html(t),i){var l=/<script.*?>((.|[\r\n])*?)<\/script>/gi;for(o=0;o<r.length;o++){var d=document.getElementById(s+""+o),h=d.parentNode;h.removeChild(d),l.lastIndex=0;var c=l.exec(r[o]),u=h.appendChild(document.createElement("script"));u.text=c[1];var f=r[o].substring(r[o].indexOf(" ",0),r[o].indexOf(">",0)).split(" ");if(f.length>1)for(var p=0;p<f.length;p++)if(f[p].length>0){var _=f[p].split("=");_[1]=_[1].substr(1,_[1].length-2),u.setAttribute(_[0],_[1])}}}}function media_upload(e,t,s,i){var n=(new Date).getTime(),a="none";return $("#mediaupload").remove(),$("body").append("<div id='mediaupload' title='"+act_lang[4]+"' style='display:none'></div>"),$("#mediaupload").dialog({autoOpen:!0,width:710,resizable:!1,dialogClass:"modalfixed",open:function(a,r){$("#mediaupload").html("<iframe name='mediauploadframe' id='mediauploadframe' width='100%' height='545' src='engine/ajax/upload.php?area="+e+"&author="+t+"&news_id="+s+"&wysiwyg="+i+"&rndval="+n+"' frameborder='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>"),$(".ui-dialog").draggable("option","containment","")},dragStart:function(e,t){a=$(".modalfixed").css("box-shadow"),$(".modalfixed").fadeTo(0,.6).css("box-shadow","none"),$("#mediaupload").css("visibility","hidden")},dragStop:function(e,t){$(".modalfixed").fadeTo(0,1).css("box-shadow",a),$("#mediaupload").css("visibility","visible")},beforeClose:function(e,t){$("#mediaupload").html("")}}),$(window).width()>830&&$(window).height()>530&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#mediaupload").dialog("option","position",["0","0"])),!1}function media_upload2kas(e,t,s,i){}(function(){this.Growl=function(){function e(){}return e.info=function(e){return e.class_name="info",e.title="<i class='icon-info-sign'></i> "+e.title,$.gritter.add(e)},e.warn=function(e){return e.class_name="warn",e.title="<i class='icon-warning-sign'></i> "+e.title,$.gritter.add(e)},e.error=function(e){return e.class_name="info",e.title="<i class='icon-exclamation-sign'></i> "+e.title,$.gritter.add(e)},e.success=function(e){return e.class_name="success",e.title="<i class='icon-ok-sign'></i> "+e.title,$.gritter.add(e)},e}()}).call(this),function(){$(function(){"undefined"!=typeof Storage&&1==localStorage.getItem("boxedpanel")&&toggleleftpanel(),$.extend($.gritter.options,{position:"top-right"}),$(".icheck").iCheck({checkboxClass:"icheckbox_flat-aero",radioClass:"iradio_flat-aero"}),$.uniform.defaults.fileButtonHtml="+",$.uniform.defaults.selectAutoWidth=!1,$(".tip, [rel=tooltip]").tooltip({gravity:"n",fade:!0,html:!0}),$(".tags").tokenfield(),$("select.uniform, input:file").uniform(),$(".iButton-icons-tab").each(function(){if($(this).is(":visible"))return $(this).iButton({labelOn:"<i class='icon-ok'></i>",labelOff:"<i class='icon-remove'></i>",handleWidth:30})}),$('[data-toggle="tab"]').on("shown.bs.tab",function(e){var t;return t=$(e.target).attr("href"),$(t).find(".iButton-icons-tab").iButton({labelOn:"<i class='icon-ok'></i>",labelOff:"<i class='icon-remove'></i>",handleWidth:30})}),$("#switch-sidebar").click(function(){return $("body").toggleClass("dropdown-sidebar")}),$("[data-rel=popover]").popover({container:"body"}),$("[data-rel=calendar]").datetimepicker({format:"Y-m-d H:i:s",step:30,closeOnDateSelect:!0,dayOfWeekStart:1,i18n:cal_language}),$("[data-rel=calendardate]").datetimepicker({format:"Y-m-d",closeOnDateSelect:!0,dayOfWeekStart:1,timepicker:!1,i18n:cal_language})})}.call(this);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.