!function(t){var e=function(e,s){if(this.element=t(e),this.format=i.parseFormat(s.format||this.element.data("date-format")||"mm/dd/yyyy"),this.picker=t(i.template).appendTo("body").on({click:t.proxy(this.click,this)}),this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on"):!1,this.isInput?this.element.on({focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this)}):this.component?this.component.on("click",t.proxy(this.show,this)):this.element.on("click",t.proxy(this.show,this)),this.minViewMode=s.minViewMode||this.element.data("date-minviewmode")||0,"string"==typeof this.minViewMode)switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0}if(this.viewMode=s.viewMode||this.element.data("date-viewmode")||0,"string"==typeof this.viewMode)switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0}this.startViewMode=this.viewMode,this.weekStart=s.weekStart||this.element.data("date-weekstart")||0,this.weekEnd=0===this.weekStart?6:this.weekStart-1,this.onRender=s.onRender,this.fillDow(),this.fillMonths(),this.update(),this.showMode()};e.prototype={constructor:e,show:function(e){this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),t(window).on("resize",t.proxy(this.place,this)),e&&(e.stopPropagation(),e.preventDefault()),!this.isInput;var i=this;t(document).on("mousedown",function(e){0==t(e.target).closest(".datepicker").length&&i.hide()}),this.element.trigger({type:"show",date:this.date})},hide:function(){this.picker.hide(),t(window).off("resize",this.place),this.viewMode=this.startViewMode,this.showMode(),this.isInput||t(document).off("mousedown",this.hide),this.element.trigger({type:"hide",date:this.date})},set:function(){var t=i.formatDate(this.date,this.format);this.isInput?this.element.prop("value",t):(this.component&&this.element.find("input").prop("value",t),this.element.data("date",t))},setValue:function(t){this.date="string"==typeof t?i.parseDate(t,this.format):new Date(t),this.set(),this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),1,0,0,0,0),this.fill()},place:function(){var t=this.component?this.component.offset():this.element.offset();this.picker.css({top:t.top+this.height,left:t.left})},update:function(t){this.date=i.parseDate("string"==typeof t?t:this.isInput?this.element.prop("value"):this.element.data("date"),this.format),this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),1,0,0,0,0),this.fill()},fillDow:function(){for(var t=this.weekStart,e="<tr>";t<this.weekStart+7;)e+='<th class="dow">'+i.dates.daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;12>e;)t+='<span class="month">'+i.dates.monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").append(t)},fill:function(){var t=new Date(this.viewDate),e=t.getFullYear(),s=t.getMonth(),n=this.date.valueOf();this.picker.find(".datepicker-days th:eq(1)").text(i.dates.months[s]+" "+e);var o=new Date(e,s-1,28,0,0,0,0),a=i.getDaysInMonth(o.getFullYear(),o.getMonth());o.setDate(a),o.setDate(a-(o.getDay()-this.weekStart+7)%7);var r=new Date(o);r.setDate(r.getDate()+42),r=r.valueOf();for(var h,c,l,d=[];o.valueOf()<r;)o.getDay()===this.weekStart&&d.push("<tr>"),h=this.onRender(o),c=o.getFullYear(),l=o.getMonth(),s>l&&c===e||e>c?h+=" old":(l>s&&c===e||c>e)&&(h+=" new"),o.valueOf()===n&&(h+=" active"),d.push('<td class="day '+h+'">'+o.getDate()+"</td>"),o.getDay()===this.weekEnd&&d.push("</tr>"),o.setDate(o.getDate()+1);this.picker.find(".datepicker-days tbody").empty().append(d.join(""));var u=this.date.getFullYear(),p=this.picker.find(".datepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");u===e&&p.eq(this.date.getMonth()).addClass("active"),d="",e=10*parseInt(e/10,10);var f=this.picker.find(".datepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var m=-1;11>m;m++)d+='<span class="year'+(-1===m||10===m?" old":"")+(u===e?" active":"")+'">'+e+"</span>",e+=1;f.html(d)},click:function(e){e.stopPropagation(),e.preventDefault();var s=t(e.target).closest("span, td, th");if(1===s.length)switch(s[0].nodeName.toLowerCase()){case"th":switch(s[0].className){case"switch":this.showMode(1);break;case"prev":case"next":this.viewDate["set"+i.modes[this.viewMode].navFnc].call(this.viewDate,this.viewDate["get"+i.modes[this.viewMode].navFnc].call(this.viewDate)+i.modes[this.viewMode].navStep*("prev"===s[0].className?-1:1)),this.fill(),this.set()}break;case"span":if(s.is(".month")){var n=s.parent().find("span").index(s);this.viewDate.setMonth(n)}else{var o=parseInt(s.text(),10)||0;this.viewDate.setFullYear(o)}0!==this.viewMode&&(this.date=new Date(this.viewDate),this.element.trigger({type:"changeDate",date:this.date,viewMode:i.modes[this.viewMode].clsName})),this.showMode(-1),this.fill(),this.set();break;case"td":if(s.is(".day")&&!s.is(".disabled")){var a=parseInt(s.text(),10)||1,n=this.viewDate.getMonth();s.is(".old")?n-=1:s.is(".new")&&(n+=1);var o=this.viewDate.getFullYear();this.date=new Date(o,n,a,0,0,0,0),this.viewDate=new Date(o,n,Math.min(28,a),0,0,0,0),this.fill(),this.set(),this.element.trigger({type:"changeDate",date:this.date,viewMode:i.modes[this.viewMode].clsName})}}},mousedown:function(t){t.stopPropagation(),t.preventDefault()},showMode:function(t){t&&(this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+i.modes[this.viewMode].clsName).show()}},t.fn.datepicker=function(i,s){return this.each(function(){var n=t(this),o=n.data("datepicker"),a="object"==typeof i&&i;o||n.data("datepicker",o=new e(this,t.extend({},t.fn.datepicker.defaults,a))),"string"==typeof i&&o[i](s)})},t.fn.datepicker.defaults={onRender:function(){return""}},t.fn.datepicker.Constructor=e;var i={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],dates:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},getDaysInMonth:function(t,e){return[31,i.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},parseFormat:function(t){var e=t.match(/[.\/\-\s].*?/),i=t.split(/\W+/);if(!e||!i||0===i.length)throw new Error("Invalid date format.");return{separator:e,parts:i}},parseDate:function(t,e){var i,s=t.split(e.separator),t=new Date;if(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),s.length===e.parts.length){for(var n=t.getFullYear(),o=t.getDate(),a=t.getMonth(),r=0,h=e.parts.length;h>r;r++)switch(i=parseInt(s[r],10)||1,e.parts[r]){case"dd":case"d":o=i,t.setDate(i);break;case"mm":case"m":a=i-1,t.setMonth(i-1);break;case"yy":n=2e3+i,t.setFullYear(2e3+i);break;case"yyyy":n=i,t.setFullYear(i)}t=new Date(n,a,o,0,0,0)}return t},formatDate:function(t,e){var i={d:t.getDate(),m:t.getMonth()+1,yy:t.getFullYear().toString().substring(2),yyyy:t.getFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;for(var t=[],s=0,n=e.parts.length;n>s;s++)t.push(i[e.parts[s]]);return t.join(e.separator)},headTemplate:'<thead><tr><th class="prev">&lsaquo;</th><th colspan="5" class="switch"></th><th class="next">&rsaquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>'};i.template='<div class="datepicker dropdown-menu"><div class="datepicker-days"><table class=" table-condensed">'+i.headTemplate+'<tbody></tbody></table></div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+"</table></div></div>"}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.timepicker.defaults,i,this.$element.data()),this.minuteStep=this.options.minuteStep||this.minuteStep,this.secondStep=this.options.secondStep||this.secondStep,this.showMeridian=this.options.showMeridian||this.showMeridian,this.showSeconds=this.options.showSeconds||this.showSeconds,this.showInputs=this.options.showInputs||this.showInputs,this.disableFocus=this.options.disableFocus||this.disableFocus,this.template=this.options.template||this.template,this.modalBackdrop=this.options.modalBackdrop||this.modalBackdrop,this.defaultTime=this.options.defaultTime||this.defaultTime,this.open=!1,this.init()};e.prototype={constructor:e,init:function(){this.$element.parent().hasClass("input-append")?(this.$element.parent(".input-append").find(".add-on").on("click",t.proxy(this.showWidget,this)),this.$element.on({focus:t.proxy(this.highlightUnit,this),click:t.proxy(this.highlightUnit,this),keypress:t.proxy(this.elementKeypress,this),blur:t.proxy(this.blurElement,this)})):this.$element.on(this.template?{focus:t.proxy(this.showWidget,this),click:t.proxy(this.showWidget,this),blur:t.proxy(this.blurElement,this)}:{focus:t.proxy(this.highlightUnit,this),click:t.proxy(this.highlightUnit,this),keypress:t.proxy(this.elementKeypress,this),blur:t.proxy(this.blurElement,this)}),this.$widget=t(this.getTemplate()).appendTo("body"),this.$widget.on("click",t.proxy(this.widgetClick,this)),this.showInputs&&this.$widget.find("input").on({click:function(){this.select()},keypress:t.proxy(this.widgetKeypress,this),change:t.proxy(this.updateFromWidgetInputs,this)}),this.setDefaultTime(this.defaultTime)},showWidget:function(e){if(e.stopPropagation(),e.preventDefault(),!this.open){this.$element.trigger("show"),this.disableFocus&&this.$element.blur();var i=t.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});this.updateFromElementVal(),t("html").trigger("click.timepicker.data-api").one("click.timepicker.data-api",t.proxy(this.hideWidget,this)),"modal"===this.template?this.$widget.modal("show").on("hidden",t.proxy(this.hideWidget,this)):(this.$widget.css({top:i.top+i.height,left:i.left}),this.open||this.$widget.addClass("open")),this.open=!0,this.$element.trigger("shown")}},hideWidget:function(){this.$element.trigger("hide"),"modal"===this.template?this.$widget.modal("hide"):this.$widget.removeClass("open"),this.open=!1,this.$element.trigger("hidden")},widgetClick:function(e){e.stopPropagation(),e.preventDefault();var i=t(e.target).closest("a").data("action");i&&(this[i](),this.update())},widgetKeypress:function(e){var i=t(e.target).closest("input").attr("name");switch(e.keyCode){case 9:this.showMeridian?"meridian"==i&&this.hideWidget():this.showSeconds?"second"==i&&this.hideWidget():"minute"==i&&this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(i){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.update();break;case 40:switch(i){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.update()}},elementKeypress:function(t){this.$element.get(0);switch(t.keyCode){case 0:break;case 9:this.updateFromElementVal(),this.showMeridian?"meridian"!=this.highlightedUnit&&(t.preventDefault(),this.highlightNextUnit()):this.showSeconds?"second"!=this.highlightedUnit&&(t.preventDefault(),this.highlightNextUnit()):"minute"!=this.highlightedUnit&&(t.preventDefault(),this.highlightNextUnit());break;case 27:this.updateFromElementVal();break;case 37:this.updateFromElementVal(),this.highlightPrevUnit();break;case 38:switch(this.highlightedUnit){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.updateElement();break;case 39:this.updateFromElementVal(),this.highlightNextUnit();break;case 40:switch(this.highlightedUnit){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.updateElement()}0!==t.keyCode&&8!==t.keyCode&&9!==t.keyCode&&46!==t.keyCode&&t.preventDefault()},setValues:function(t){if(this.showMeridian){var e=t.split(" "),i=e[0].split(":");this.meridian=e[1]}else var i=t.split(":");this.hour=parseInt(i[0],10),this.minute=parseInt(i[1],10),this.second=parseInt(i[2],10),isNaN(this.hour)&&(this.hour=0),isNaN(this.minute)&&(this.minute=0),this.showMeridian?(this.hour>12?this.hour=12:this.hour<1&&(this.hour=1),"am"==this.meridian||"a"==this.meridian?this.meridian="AM":("pm"==this.meridian||"p"==this.meridian)&&(this.meridian="PM"),"AM"!=this.meridian&&"PM"!=this.meridian&&(this.meridian="AM")):this.hour>=24?this.hour=23:this.hour<0&&(this.hour=0),this.minute<0?this.minute=0:this.minute>=60&&(this.minute=59),this.showSeconds&&(isNaN(this.second)?this.second=0:this.second<0?this.second=0:this.second>=60&&(this.second=59)),""!=this.$element.val()&&this.updateElement(),this.updateWidget()},setMeridian:function(t){"a"==t||"am"==t||"AM"==t?this.meridian="AM":"p"==t||"pm"==t||"PM"==t?this.meridian="PM":this.updateWidget(),this.updateElement()},setDefaultTime:function(t){if(t){if("current"===t){var e=new Date,i=e.getHours(),s=Math.floor(e.getMinutes()/this.minuteStep)*this.minuteStep,n=Math.floor(e.getSeconds()/this.secondStep)*this.secondStep,o="AM";this.showMeridian&&(0===i?i=12:i>=12?(i>12&&(i-=12),o="PM"):o="AM"),this.hour=i,this.minute=s,this.second=n,this.meridian=o}else this.setValues("value"===t?this.$element.val():t);""!=this.$element.val()&&this.updateElement(),this.updateWidget()}else this.hour=0,this.minute=0,this.second=0},formatTime:function(t,e,i,s){return t=10>t?"0"+t:t,e=10>e?"0"+e:e,i=10>i?"0"+i:i,t+":"+e+(this.showSeconds?":"+i:"")+(this.showMeridian?" "+s:"")},getTime:function(){return this.formatTime(this.hour,this.minute,this.second,this.meridian)},setTime:function(t){this.setValues(t),this.update()},update:function(){this.updateElement(),this.updateWidget()},blurElement:function(){this.highlightedUnit=void 0,this.updateFromElementVal()},updateElement:function(){var t=this.getTime();switch(this.$element.val(t).change(),this.highlightedUnit){case"hour":this.highlightHour();break;case"minute":this.highlightMinute();break;case"second":this.highlightSecond();break;case"meridian":this.highlightMeridian()}},updateWidget:function(){this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(this.hour<10?"0"+this.hour:this.hour),this.$widget.find("input.bootstrap-timepicker-minute").val(this.minute<10?"0"+this.minute:this.minute),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(this.second<10?"0"+this.second:this.second),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(this.hour),this.$widget.find("span.bootstrap-timepicker-minute").text(this.minute<10?"0"+this.minute:this.minute),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(this.second<10?"0"+this.second:this.second),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))},updateFromElementVal:function(){var t=this.$element.val();t&&(this.setValues(t),this.updateWidget())},updateFromWidgetInputs:function(){var e=t("input.bootstrap-timepicker-hour",this.$widget).val()+":"+t("input.bootstrap-timepicker-minute",this.$widget).val()+(this.showSeconds?":"+t("input.bootstrap-timepicker-second",this.$widget).val():"")+(this.showMeridian?" "+t("input.bootstrap-timepicker-meridian",this.$widget).val():"");this.setValues(e)},getCursorPosition:function(){var t=this.$element.get(0);if("selectionStart"in t)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange(),i=document.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-i}},highlightUnit:function(){this.$element.get(0);this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.highlightMeridian();break;case"second":this.highlightMeridian();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMeridian();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){this.highlightedUnit="hour",this.$element.get(0).setSelectionRange(0,2)},highlightMinute:function(){this.highlightedUnit="minute",this.$element.get(0).setSelectionRange(3,5)},highlightSecond:function(){this.highlightedUnit="second",this.$element.get(0).setSelectionRange(6,8)},highlightMeridian:function(){this.highlightedUnit="meridian",this.showSeconds?this.$element.get(0).setSelectionRange(9,11):this.$element.get(0).setSelectionRange(6,8)},incrementHour:function(){if(this.showMeridian)if(11===this.hour)this.toggleMeridian();else if(12===this.hour)return this.hour=1;return 23===this.hour?this.hour=0:void(this.hour=this.hour+1)},decrementHour:function(){if(this.showMeridian){if(1===this.hour)return this.hour=12;12===this.hour&&this.toggleMeridian()}return 0===this.hour?this.hour=23:void(this.hour=this.hour-1)},incrementMinute:function(){var t=this.minute+this.minuteStep-this.minute%this.minuteStep;t>59?(this.incrementHour(),this.minute=t-60):this.minute=t},decrementMinute:function(){var t=this.minute-this.minuteStep;0>t?(this.decrementHour(),this.minute=t+60):this.minute=t},incrementSecond:function(){var t=this.second+this.secondStep-this.second%this.secondStep;t>59?(this.incrementMinute(),this.second=t-60):this.second=t},decrementSecond:function(){var t=this.second-this.secondStep;0>t?(this.decrementMinute(),this.second=t+60):this.second=t},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM",this.update()},getTemplate:function(){if(this.options.templates[this.options.template])return this.options.templates[this.options.template];if(this.showInputs)var t='<input type="text" name="hour" class="bootstrap-timepicker-hour" maxlength="2"/>',e='<input type="text" name="minute" class="bootstrap-timepicker-minute" maxlength="2"/>',i='<input type="text" name="second" class="bootstrap-timepicker-second" maxlength="2"/>',s='<input type="text" name="meridian" class="bootstrap-timepicker-meridian" maxlength="2"/>';else var t='<span class="bootstrap-timepicker-hour"></span>',e='<span class="bootstrap-timepicker-minute"></span>',i='<span class="bootstrap-timepicker-second"></span>',s='<span class="bootstrap-timepicker-meridian"></span>';var n,o='<table class="'+(this.showSeconds?"show-seconds":"")+" "+(this.showMeridian?"show-meridian":"")+'"><tr><td><a href="#" data-action="incrementHour"><i class="icon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><i class="icon-chevron-up"></i></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="incrementSecond"><i class="icon-chevron-up"></i></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="icon-chevron-up"></i></a></td>':"")+"</tr><tr><td>"+t+'</td> <td class="separator">:</td><td>'+e+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+i+"</td>":"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td>'+s+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><i class="icon-chevron-down"></i></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><i class="icon-chevron-down"></i></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="decrementSecond"><i class="icon-chevron-down"></i></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><i class="icon-chevron-down"></i></a></td>':"")+"</tr></table>";switch(this.options.template){case"modal":n='<div class="bootstrap-timepicker modal hide fade in" style="top: 30%; margin-top: 0; width: 200px; margin-left: -100px;" data-backdrop="'+(this.modalBackdrop?"true":"false")+'"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">×</a><h3>Pick a Time</h3></div><div class="modal-content">'+o+'</div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">Ok</a></div></div>';break;case"dropdown":n='<div class="bootstrap-timepicker dropdown-menu">'+o+"</div>"}return n}},t.fn.timepicker=function(i){return this.each(function(){var s=t(this),n=s.data("timepicker"),o="object"==typeof i&&i;n||s.data("timepicker",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.timepicker.defaults={minuteStep:15,secondStep:15,disableFocus:!1,defaultTime:"current",showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",modalBackdrop:!1,templates:{}},t.fn.timepicker.Constructor=e}(window.jQuery),!function(t){t(function(){"use strict";t.support.transition=function(){var t=function(){var t,e=document.createElement("bootstrap"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in i)if(void 0!==e.style[t])return i[t]}();return t&&{end:t}}()})}(window.jQuery),!function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.prototype.close=function(e){function i(){s.trigger("closed").remove()}var s,n=t(this),o=n.attr("data-target");o||(o=n.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),s=t(o),e&&e.preventDefault(),s.length||(s=n.hasClass("alert")?n:n.parent()),s.trigger(e=t.Event("close")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.on(t.support.transition.end,i):i())},t.fn.alert=function(e){return this.each(function(){var s=t(this),n=s.data("alert");n||s.data("alert",n=new i(this)),"string"==typeof e&&n[e].call(s)})},t.fn.alert.Constructor=i,t(function(){t("body").on("click.alert.data-api",e,i.prototype.close)})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.button.defaults,i)};e.prototype.setState=function(t){var e="disabled",i=this.$element,s=i.data(),n=i.is("input")?"val":"html";t+="Text",s.resetText||i.data("resetText",i[n]()),i[n](s[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},e.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons-radio"]');t&&t.find(".active").removeClass("active"),this.$element.toggleClass("active")},t.fn.button=function(i){return this.each(function(){var s=t(this),n=s.data("button"),o="object"==typeof i&&i;n||s.data("button",n=new e(this,o)),"toggle"==i?n.toggle():i&&n.setState(i)})},t.fn.button.defaults={loadingText:"loading..."},t.fn.button.Constructor=e,t(function(){t("body").on("click.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle")})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=i,this.options.slide&&this.slide(this.options.slide),"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},to:function(e){var i=this.$element.find(".item.active"),s=i.parent().children(),n=s.index(i),o=this;if(!(e>s.length-1||0>e))return this.sliding?this.$element.one("slid",function(){o.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",t(s[e]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(e,i){var s=this.$element.find(".item.active"),n=i||s[e](),o=this.interval,a="next"==e?"left":"right",r="next"==e?"first":"last",h=this,c=t.Event("slide",{relatedTarget:n[0]});if(this.sliding=!0,o&&this.pause(),n=n.length?n:this.$element.find(".item")[r](),!n.hasClass("active")){if(t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(c),c.isDefaultPrevented())return;n.addClass(e),n[0].offsetWidth,s.addClass(a),n.addClass(a),this.$element.one(t.support.transition.end,function(){n.removeClass([e,a].join(" ")).addClass("active"),s.removeClass(["active",a].join(" ")),h.sliding=!1,setTimeout(function(){h.$element.trigger("slid")},0)})}else{if(this.$element.trigger(c),c.isDefaultPrevented())return;s.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return o&&this.cycle(),this}}},t.fn.carousel=function(i){return this.each(function(){var s=t(this),n=s.data("carousel"),o=t.extend({},t.fn.carousel.defaults,"object"==typeof i&&i),a="string"==typeof i?i:o.slide;n||s.data("carousel",n=new e(this,o)),"number"==typeof i?n.to(i):a?n[a]():o.interval&&n.cycle()})},t.fn.carousel.defaults={interval:5e3,pause:"hover"},t.fn.carousel.Constructor=e,t(function(){t("body").on("click.carousel.data-api","[data-slide]",function(e){var i,s=t(this),n=t(s.attr("data-target")||(i=s.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),o=!n.data("modal")&&t.extend({},n.data(),s.data());n.carousel(o),e.preventDefault()})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,i),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){var t=this.$element.hasClass("width");return t?"width":"height"},show:function(){var e,i,s,n;if(!this.transitioning){if(e=this.dimension(),i=t.camelCase(["scroll",e].join("-")),s=this.$parent&&this.$parent.find("> .accordion-group > .in"),s&&s.length){if(n=s.data("collapse"),n&&n.transitioning)return;s.collapse("hide"),n||s.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),t.support.transition&&this.$element[e](this.$element[0][i])}},hide:function(){var e;this.transitioning||(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,i,s){var n=this,o=function(){"show"==i.type&&n.reset(),n.transitioning=0,n.$element.trigger(s)};this.$element.trigger(i),i.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,o):o())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},t.fn.collapse=function(i){return this.each(function(){var s=t(this),n=s.data("collapse"),o="object"==typeof i&&i;n||s.data("collapse",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t(function(){t("body").on("click.collapse.data-api","[data-toggle=collapse]",function(e){var i,s=t(this),n=s.attr("data-target")||e.preventDefault()||(i=s.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),o=t(n).data("collapse")?"toggle":s.data();s[t(n).hasClass("in")?"addClass":"removeClass"]("collapsed"),t(n).collapse(o)})})}(window.jQuery),!function(t){"use strict";function e(){i(t(s)).removeClass("open")}function i(e){var i,s=e.attr("data-target");return s||(s=e.attr("href"),s=s&&/#/.test(s)&&s.replace(/.*(?=#[^\s]*$)/,"")),i=t(s),i.length||(i=e.parent()),i}var s="[data-toggle=dropdown]",n=function(e){var i=t(e).on("click.dropdown.data-api",this.toggle);t("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(){var s,n,o=t(this);if(!o.is(".disabled, :disabled"))return s=i(o),n=s.hasClass("open"),e(),n||(s.toggleClass("open"),o.focus()),!1},keydown:function(e){var s,n,o,a,r;if(/(38|40|27)/.test(e.keyCode)&&(s=t(this),e.preventDefault(),e.stopPropagation(),!s.is(".disabled, :disabled"))){if(o=i(s),a=o.hasClass("open"),!a||a&&27==e.keyCode)return s.click();n=t("[role=menu] li:not(.divider) a",o),n.length&&(r=n.index(n.filter(":focus")),38==e.keyCode&&r>0&&r--,40==e.keyCode&&r<n.length-1&&r++,~r||(r=0),n.eq(r).focus())}}},t.fn.dropdown=function(e){return this.each(function(){var i=t(this),s=i.data("dropdown");s||i.data("dropdown",s=new n(this)),"string"==typeof e&&s[e].call(i)})},t.fn.dropdown.Constructor=n,t(function(){t("html").on("click.dropdown.data-api touchstart.dropdown.data-api",e),t("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",s,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",s+", [role=menu]",n.prototype.keydown)})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=i,this.$element=t(e).delegate('[data-dismiss="modal"]',"click.dismiss.modal",t.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};e.prototype={constructor:e,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var e=this,i=t.Event("show");this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(t("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var i=t.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show(),i&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1).focus(),e.enforceFocus(),i?e.$element.one(t.support.transition.end,function(){e.$element.trigger("shown")}):e.$element.trigger("shown")}))},hide:function(e){e&&e.preventDefault();e=t.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,t("body").removeClass("modal-open"),this.escape(),t(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),t.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var e=this;t(document).on("focusin.modal",function(t){e.$element[0]===t.target||e.$element.has(t.target).length||e.$element.focus()})},escape:function(){var t=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&t.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var e=this,i=setTimeout(function(){e.$element.off(t.support.transition.end),e.hideModal()},500);this.$element.one(t.support.transition.end,function(){clearTimeout(i),e.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden"),this.backdrop()
},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(e){var i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&i;this.$backdrop=t('<div class="modal-backdrop '+i+'" />').appendTo(document.body),"static"!=this.options.backdrop&&this.$backdrop.click(t.proxy(this.hide,this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),s?this.$backdrop.one(t.support.transition.end,e):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(t.support.transition.end,t.proxy(this.removeBackdrop,this)):this.removeBackdrop()):e&&e()}},t.fn.modal=function(i){return this.each(function(){var s=t(this),n=s.data("modal"),o=t.extend({},t.fn.modal.defaults,s.data(),"object"==typeof i&&i);n||s.data("modal",n=new e(this,o)),"string"==typeof i?n[i]():o.show&&n.show()})},t.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},t.fn.modal.Constructor=e,t(function(){t("body").on("click.modal.data-api",'[data-toggle="modal"]',function(e){var i=t(this),s=i.attr("href"),n=t(i.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,"")),o=n.data("modal")?"toggle":t.extend({remote:!/#/.test(s)&&s},n.data(),i.data());e.preventDefault(),n.modal(o).one("hide",function(){i.focus()})})})}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("tooltip",t,e)};e.prototype={constructor:e,init:function(e,i,s){var n,o;this.type=e,this.$element=t(i),this.options=this.getOptions(s),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(n="hover"==this.options.trigger?"mouseenter":"focus",o="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(n+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(o+"."+this.type,this.options.selector,t.proxy(this.leave,this))),this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(e){return e=t.extend({},t.fn[this.type].defaults,e,this.$element.data()),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},enter:function(e){var i=t(e.currentTarget)[this.type](this._options).data(this.type);return i.options.delay&&i.options.delay.show?(clearTimeout(this.timeout),i.hoverState="in",void(this.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show))):i.show()},leave:function(e){var i=t(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),i.options.delay&&i.options.delay.hide?(i.hoverState="out",void(this.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide))):i.hide()},show:function(){var t,e,i,s,n,o,a;if(this.hasContent()&&this.enabled){switch(t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),o="function"==typeof this.options.placement?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,e=/in/.test(o),t.remove().css({top:0,left:0,display:"block"}).appendTo(e?this.$element:document.body),i=this.getPosition(e),s=t[0].offsetWidth,n=t[0].offsetHeight,e?o.split(" ")[1]:o){case"bottom":a={top:i.top+i.height,left:i.left+i.width/2-s/2};break;case"top":a={top:i.top-n,left:i.left+i.width/2-s/2};break;case"left":a={top:i.top+i.height/4-n/4,left:i.left-s};break;case"right":a={top:i.top+i.height/2-n/2,left:i.left+i.width}}t.css(a).addClass(o).addClass("in")}},setContent:function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},hide:function(){function e(){var e=setTimeout(function(){i.off(t.support.transition.end).remove()},500);i.one(t.support.transition.end,function(){clearTimeout(e),i.remove()})}var i=this.tip();return i.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?e():i.remove(),this},fixTitle:function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(e){return t.extend({},e?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},tip:function(){return this.$tip=this.$tip||t(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},t.fn.tooltip=function(i){return this.each(function(){var s=t(this),n=s.data("tooltip"),o="object"==typeof i&&i;n||s.data("tooltip",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype,{constructor:e,setContent:function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content > *")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-content")||("function"==typeof i.content?i.content.call(e[0]):i.content)},tip:function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),t.fn.popover=function(i){return this.each(function(){var s=t(this),n=s.data("popover"),o="object"==typeof i&&i;n||s.data("popover",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.popover.Constructor=e,t.fn.popover.defaults=t.extend({},t.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(t){"use strict";function e(e,i){var s,n=t.proxy(this.process,this),o=t(t(e).is("body")?window:e);this.options=t.extend({},t.fn.scrollspy.defaults,i),this.$scrollElement=o.on("scroll.scroll-spy.data-api",n),this.selector=(this.options.target||(s=t(e).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=t("body"),this.refresh(),this.process()}e.prototype={constructor:e,refresh:function(){var e,i=this;this.offsets=t([]),this.targets=t([]),e=this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),s=/^#\w/.test(i)&&t(i);return s&&s.length&&[[s.position().top,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},process:function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,s=i-this.$scrollElement.height(),n=this.offsets,o=this.targets,a=this.activeTarget;if(e>=s)return a!=(t=o.last()[0])&&this.activate(t);for(t=n.length;t--;)a!=o[t]&&e>=n[t]&&(!n[t+1]||e<=n[t+1])&&this.activate(o[t])},activate:function(e){var i,s;this.activeTarget=e,t(this.selector).parent(".active").removeClass("active"),s=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(s).parent("li").addClass("active"),i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")}},t.fn.scrollspy=function(i){return this.each(function(){var s=t(this),n=s.data("scrollspy"),o="object"==typeof i&&i;n||s.data("scrollspy",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.defaults={offset:10},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),!function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype={constructor:e,show:function(){var e,i,s,n=this.element,o=n.closest("ul:not(.dropdown-menu)"),a=n.attr("data-target");a||(a=n.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,"")),n.parent("li").hasClass("active")||(e=o.find(".active a").last()[0],s=t.Event("show",{relatedTarget:e}),n.trigger(s),s.isDefaultPrevented()||(i=t(a),this.activate(n.parent("li"),o),this.activate(i,i.parent(),function(){n.trigger({type:"shown",relatedTarget:e})})))},activate:function(e,i,s){function n(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),s&&s()}var o=i.find("> .active"),a=s&&t.support.transition&&o.hasClass("fade");a?o.one(t.support.transition.end,n):n(),o.removeClass("in")}},t.fn.tab=function(i){return this.each(function(){var s=t(this),n=s.data("tab");n||s.data("tab",n=new e(this)),"string"==typeof i&&n[i]()})},t.fn.tab.Constructor=e,t(function(){t("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,i),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=t(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:e.top+e.height,left:e.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var i=this;return e=t.grep(e,function(t){return i.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,i=[],s=[],n=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?s.push(e):n.push(e):i.push(e);return i.concat(s,n)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var i=this;return e=t(e).map(function(e,s){return e=t(i.options.item).attr("data-value",s),e.find("a").html(i.highlighter(s)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),i=e.next();i.length||(i=t(this.$menu.find("li")[0])),i.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),(t.browser.chrome||t.browser.webkit||t.browser.msie)&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=!~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},blur:function(){var t=this;setTimeout(function(){t.hide()},150)},click:function(t){t.stopPropagation(),t.preventDefault(),this.select()},mouseenter:function(e){this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")}},t.fn.typeahead=function(i){return this.each(function(){var s=t(this),n=s.data("typeahead"),o="object"==typeof i&&i;n||s.data("typeahead",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t(function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var i=t(this);i.data("typeahead")||(e.preventDefault(),i.typeahead(i.data()))})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=t.extend({},t.fn.affix.defaults,i),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,i=t(document).height(),s=this.$window.scrollTop(),n=this.$element.offset(),o=this.options.offset,a=o.bottom,r=o.top,h="affix affix-top affix-bottom";"object"!=typeof o&&(a=r=o),"function"==typeof r&&(r=o.top()),"function"==typeof a&&(a=o.bottom()),e=null!=this.unpin&&s+this.unpin<=n.top?!1:null!=a&&n.top+this.$element.height()>=i-a?"bottom":null!=r&&r>=s?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?n.top-s:null,this.$element.removeClass(h).addClass("affix"+(e?"-"+e:"")))}},t.fn.affix=function(i){return this.each(function(){var s=t(this),n=s.data("affix"),o="object"==typeof i&&i;n||s.data("affix",n=new e(this,o)),"string"==typeof i&&n[i]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),i=e.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),e.affix(i)})})}(window.jQuery),function(t,e,i,s,n,o){function a(t,e){var i=typeof t[e];return"function"==i||!("object"!=i||!t[e])||"unknown"==i}function r(t,e){return!("object"!=typeof t[e]||!t[e])}function h(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(){return!1}function l(){if(!B){B=!0;for(var t=0;t<V.length;t++)V[t]();V.length=0}}function d(t,e){return B?void t.call(e):void V.push(function(){t.call(e)})}function u(){var t=parent;if(""!==_)for(var e=0,i=_.split(".");e<i.length;e++)t=t[i[e]];return t.easyXDM}function p(e){return t.easyXDM=L,_=e,_&&(U="easyXDM_"+_.replace(".","_")+"_"),j}function f(t){return t.match(A)[3]}function m(t){return t.match(A)[4]||""}function g(t){var e=t.toLowerCase().match(A),i=e[2],s=e[3],n=e[4]||"";return("http:"==i&&":80"==n||"https:"==i&&":443"==n)&&(n=""),i+"//"+s+n}function v(t){if(t=t.replace(H,"$1/"),!t.match(/^(http||https):\/\//)){var e="/"===t.substring(0,1)?"":i.pathname;"/"!==e.substring(e.length-1)&&(e=e.substring(0,e.lastIndexOf("/")+1)),t=i.protocol+"//"+i.host+e+t}for(;N.test(t);)t=t.replace(N,"");return t}function w(t,e){var i="",s=t.indexOf("#");-1!==s&&(i=t.substring(s),t=t.substring(0,s));var n=[];for(var a in e)e.hasOwnProperty(a)&&n.push(a+"="+o(e[a]));return t+(W?"#":-1==t.indexOf("?")?"?":"&")+n.join("&")+i}function y(t){return"undefined"==typeof t}function b(t,e,i){var s;for(var n in e)e.hasOwnProperty(n)&&(n in t?(s=e[n],"object"==typeof s?b(t[n],s,i):i||(t[n]=e[n])):t[n]=e[n]);return t}function C(){var t=e.body.appendChild(e.createElement("form")),i=t.appendChild(e.createElement("input"));i.name=U+"TEST"+R,E=i!==t.elements[i.name],e.body.removeChild(t)}function k(t){y(E)&&C();var i;E?i=e.createElement('<iframe name="'+t.props.name+'"/>'):(i=e.createElement("IFRAME"),i.name=t.props.name),i.id=i.name=t.props.name,delete t.props.name,"string"==typeof t.container&&(t.container=e.getElementById(t.container)),t.container||(b(i.style,{position:"absolute",top:"-2000px",left:"0px"}),t.container=e.body);var s=t.props.src;if(t.props.src="javascript:false",b(i,t.props),i.border=i.frameBorder=0,i.allowTransparency=!0,t.container.appendChild(i),t.onLoad&&D(i,"load",t.onLoad),t.usePost){var n,o=t.container.appendChild(e.createElement("form"));if(o.target=i.name,o.action=s,o.method="POST","object"==typeof t.usePost)for(var a in t.usePost)t.usePost.hasOwnProperty(a)&&(E?n=e.createElement('<input name="'+a+'"/>'):(n=e.createElement("INPUT"),n.name=a),n.value=t.usePost[a],o.appendChild(n));o.submit(),o.parentNode.removeChild(o)}else i.src=s;return t.props.src=s,i}function x(t,e){"string"==typeof t&&(t=[t]);for(var i,s=t.length;s--;)if(i=t[s],i=new RegExp("^"==i.substr(0,1)?i:"^"+i.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"),i.test(e))return!0;return!1}function S(s){var n,o=s.protocol;if(s.isHost=s.isHost||y(K.xdm_p),W=s.hash||!1,s.props||(s.props={}),s.isHost)s.remote=v(s.remote),s.channel=s.channel||"default"+R++,s.secret=Math.random().toString(16).substring(2),y(o)&&(o=g(i.href)==g(s.remote)?"4":a(t,"postMessage")||a(e,"postMessage")?"1":s.swf&&a(t,"ActiveXObject")&&c()?"6":"Gecko"===navigator.product&&"frameElement"in t&&-1==navigator.userAgent.indexOf("WebKit")?"5":s.remoteHelper?"2":"0");else if(s.channel=K.xdm_c.replace(/["'<>\\]/g,""),s.secret=K.xdm_s,s.remote=K.xdm_e.replace(/["'<>\\]/g,""),o=K.xdm_p,s.acl&&!x(s.acl,s.remote))throw new Error("Access denied for "+s.remote);switch(s.protocol=o,o){case"0":if(b(s,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),s.isHost){if(!s.local){for(var r,h=i.protocol+"//"+i.host,l=e.body.getElementsByTagName("img"),d=l.length;d--;)if(r=l[d],r.src.substring(0,h.length)===h){s.local=r.src;break}s.local||(s.local=t)}var u={xdm_c:s.channel,xdm_p:0};s.local===t?(s.usePolling=!0,s.useParent=!0,s.local=i.protocol+"//"+i.host+i.pathname+i.search,u.xdm_e=s.local,u.xdm_pa=1):u.xdm_e=v(s.local),s.container&&(s.useResize=!1,u.xdm_po=1),s.remote=w(s.remote,u)}else b(s,{channel:K.xdm_c,remote:K.xdm_e,useParent:!y(K.xdm_pa),usePolling:!y(K.xdm_po),useResize:s.useParent?!1:s.useResize});n=[new j.stack.HashTransport(s),new j.stack.ReliableBehavior({}),new j.stack.QueueBehavior({encode:!0,maxLength:4e3-s.remote.length}),new j.stack.VerifyBehavior({initiate:s.isHost})];break;case"1":n=[new j.stack.PostMessageTransport(s)];break;case"2":s.isHost&&(s.remoteHelper=v(s.remoteHelper)),n=[new j.stack.NameTransport(s),new j.stack.QueueBehavior,new j.stack.VerifyBehavior({initiate:s.isHost})];break;case"3":n=[new j.stack.NixTransport(s)];break;case"4":n=[new j.stack.SameOriginTransport(s)];break;case"5":n=[new j.stack.FrameElementTransport(s)];break;case"6":$||c(),n=[new j.stack.FlashTransport(s)]}return n.push(new j.stack.QueueBehavior({lazy:s.lazy,remove:!0})),n}function M(t){for(var e,i={incoming:function(t,e){this.up.incoming(t,e)},outgoing:function(t,e){this.down.outgoing(t,e)},callback:function(t){this.up.callback(t)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},s=0,n=t.length;n>s;s++)e=t[s],b(e,i,!0),0!==s&&(e.down=t[s-1]),s!==n-1&&(e.up=t[s+1]);return e}function T(t){t.up.down=t.down,t.down.up=t.up,t.up=t.down=null}var E,$,O,D,P,I=this,R=Math.floor(1e4*Math.random()),F=Function.prototype,A=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,N=/[\-\w]+\/\.\.\//,H=/([^:])\/\//g,_="",j={},L=t.easyXDM,U="easyXDM_",W=!1;if(a(t,"addEventListener"))D=function(t,e,i){t.addEventListener(e,i,!1)},P=function(t,e,i){t.removeEventListener(e,i,!1)};else{if(!a(t,"attachEvent"))throw new Error("Browser not supported");D=function(t,e,i){t.attachEvent("on"+e,i)},P=function(t,e,i){t.detachEvent("on"+e,i)}}var z,B=!1,V=[];if("readyState"in e?(z=e.readyState,B="complete"==z||~navigator.userAgent.indexOf("AppleWebKit/")&&("loaded"==z||"interactive"==z)):B=!!e.body,!B){if(a(t,"addEventListener"))D(e,"DOMContentLoaded",l);else if(D(e,"readystatechange",function(){"complete"==e.readyState&&l()}),e.documentElement.doScroll&&t===top){var q=function(){if(!B){try{e.documentElement.doScroll("left")}catch(t){return void s(q,1)}l()}};q()}D(t,"load",l)}var K=function(t){t=t.substring(1).split("&");for(var e,i={},s=t.length;s--;)e=t[s].split("="),i[e[0]]=n(e[1]);return i}(/xdm_e=/.test(i.search)?i.search:i.hash),Y=function(){var t={},e={a:[1,2,3]},i='{"a":[1,2,3]}';return"undefined"!=typeof JSON&&"function"==typeof JSON.stringify&&JSON.stringify(e).replace(/\s/g,"")===i?JSON:(Object.toJSON&&Object.toJSON(e).replace(/\s/g,"")===i&&(t.stringify=Object.toJSON),"function"==typeof String.prototype.evalJSON&&(e=i.evalJSON(),e.a&&3===e.a.length&&3===e.a[2]&&(t.parse=function(t){return t.evalJSON()})),t.stringify&&t.parse?(Y=function(){return t},t):null)};b(j,{version:"2.4.19.3",query:K,stack:{},apply:b,getJSONObject:Y,whenReady:d,noConflict:p}),j.DomHelper={on:D,un:P,requiresJSON:function(i){r(t,"JSON")||e.write('<script type="text/javascript" src="'+i+'"></script>')}},function(){var t={};j.Fn={set:function(e,i){t[e]=i},get:function(e,i){if(t.hasOwnProperty(e)){var s=t[e];return i&&delete t[e],s}}}}(),j.Socket=function(t){var e=M(S(t).concat([{incoming:function(e,i){t.onMessage(e,i)},callback:function(e){t.onReady&&t.onReady(e)}}])),i=g(t.remote);this.origin=g(t.remote),this.destroy=function(){e.destroy()},this.postMessage=function(t){e.outgoing(t,i)},e.init()},j.Rpc=function(t,e){if(e.local)for(var i in e.local)if(e.local.hasOwnProperty(i)){var s=e.local[i];"function"==typeof s&&(e.local[i]={method:s})}var n=M(S(t).concat([new j.stack.RpcBehavior(this,e),{callback:function(e){t.onReady&&t.onReady(e)}}]));this.origin=g(t.remote),this.destroy=function(){n.destroy()},n.init()},j.stack.SameOriginTransport=function(t){var e,n,o,a;return e={outgoing:function(t,e,i){o(t),i&&i()},destroy:function(){n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){a=g(t.remote),t.isHost?(b(t.props,{src:w(t.remote,{xdm_e:i.protocol+"//"+i.host+i.pathname,xdm_c:t.channel,xdm_p:4}),name:U+t.channel+"_provider"}),n=k(t),j.Fn.set(t.channel,function(t){return o=t,s(function(){e.up.callback(!0)},0),function(t){e.up.incoming(t,a)}})):(o=u().Fn.get(t.channel,!0)(function(t){e.up.incoming(t,a)}),s(function(){e.up.callback(!0)},0))},init:function(){d(e.onDOMReady,e)}}},j.stack.FlashTransport=function(t){function n(t){s(function(){r.up.incoming(t,c)},0)}function a(i){var s=t.swf+"?host="+t.isHost,n="easyXDM_swf_"+Math.floor(1e4*Math.random());j.Fn.set("flash_loaded"+i.replace(/[\-.]/g,"_"),function(){j.stack.FlashTransport[i].swf=l=u.firstChild;for(var t=j.stack.FlashTransport[i].queue,e=0;e<t.length;e++)t[e]();t.length=0}),t.swfContainer?u="string"==typeof t.swfContainer?e.getElementById(t.swfContainer):t.swfContainer:(u=e.createElement("div"),b(u.style,O&&t.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),e.body.appendChild(u));var a="callback=flash_loaded"+o(i.replace(/[\-.]/g,"_"))+"&proto="+I.location.protocol+"&domain="+o(f(I.location.href))+"&port="+o(m(I.location.href))+"&ns="+o(_);u.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+n+"' data='"+s+"'><param name='allowScriptAccess' value='sameDomain'></param><param name='wmode' value='transparent'><param name='movie' value='"+s+"'></param><param name='flashvars' value='"+a+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+a+"' allowScriptAccess='sameDomain' wmode='transparent' src='"+s+"' height='1' width='1'></embed></object>"}var r,h,c,l,u;return r={outgoing:function(e,i,s){l.postMessage(t.channel,e.toString()),s&&s()},destroy:function(){try{l.destroyChannel(t.channel)}catch(e){}l=null,h&&(h.parentNode.removeChild(h),h=null)},onDOMReady:function(){c=t.remote,j.Fn.set("flash_"+t.channel+"_init",function(){s(function(){r.up.callback(!0)})}),j.Fn.set("flash_"+t.channel+"_onMessage",n),t.swf=v(t.swf);var e=f(t.swf),o=function(){j.stack.FlashTransport[e].init=!0,l=j.stack.FlashTransport[e].swf,l.createChannel(t.channel,t.secret,g(t.remote),t.isHost),t.isHost&&(O&&t.swfNoThrottle&&b(t.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),b(t.props,{src:w(t.remote,{xdm_e:g(i.href),xdm_c:t.channel,xdm_p:6,xdm_s:t.secret}),name:U+t.channel+"_provider"}),h=k(t))};j.stack.FlashTransport[e]&&j.stack.FlashTransport[e].init?o():j.stack.FlashTransport[e]?j.stack.FlashTransport[e].queue.push(o):(j.stack.FlashTransport[e]={queue:[o]},a(e))},init:function(){d(r.onDOMReady,r)}}},j.stack.PostMessageTransport=function(e){function n(t){if(t.origin)return g(t.origin);if(t.uri)return g(t.uri);if(t.domain)return i.protocol+"//"+t.domain;throw"Unable to retrieve the origin of the event"}function o(t){var i=n(t);i==c&&t.data.substring(0,e.channel.length+1)==e.channel+" "&&a.up.incoming(t.data.substring(e.channel.length+1),i)}var a,r,h,c;return a={outgoing:function(t,i,s){h.postMessage(e.channel+" "+t,i||c),s&&s()},destroy:function(){P(t,"message",o),r&&(h=null,r.parentNode.removeChild(r),r=null)},onDOMReady:function(){if(c=g(e.remote),e.isHost){var n=function(i){i.data==e.channel+"-ready"&&(h="postMessage"in r.contentWindow?r.contentWindow:r.contentWindow.document,P(t,"message",n),D(t,"message",o),s(function(){a.up.callback(!0)},0))};D(t,"message",n),b(e.props,{src:w(e.remote,{xdm_e:g(i.href),xdm_c:e.channel,xdm_p:1}),name:U+e.channel+"_provider"}),r=k(e)}else D(t,"message",o),h="postMessage"in t.parent?t.parent:t.parent.document,h.postMessage(e.channel+"-ready",c),s(function(){a.up.callback(!0)},0)},init:function(){d(a.onDOMReady,a)}}},j.stack.FrameElementTransport=function(n){var o,a,r,h;return o={outgoing:function(t,e,i){r.call(this,t),i&&i()},destroy:function(){a&&(a.parentNode.removeChild(a),a=null)},onDOMReady:function(){h=g(n.remote),n.isHost?(b(n.props,{src:w(n.remote,{xdm_e:g(i.href),xdm_c:n.channel,xdm_p:5}),name:U+n.channel+"_provider"}),a=k(n),a.fn=function(t){return delete a.fn,r=t,s(function(){o.up.callback(!0)},0),function(t){o.up.incoming(t,h)}}):(e.referrer&&g(e.referrer)!=K.xdm_e&&(t.top.location=K.xdm_e),r=t.frameElement.fn(function(t){o.up.incoming(t,h)}),o.up.callback(!0))},init:function(){d(o.onDOMReady,o)}}},j.stack.NameTransport=function(t){function e(e){var i=t.remoteHelper+(r?"#_3":"#_2")+t.channel;h.contentWindow.sendMessage(e,i)}function i(){r?2!==++l&&r||a.up.callback(!0):(e("ready"),a.up.callback(!0))}function n(t){a.up.incoming(t,p)}function o(){u&&s(function(){u(!0)},0)}var a,r,h,c,l,u,p,f;return a={outgoing:function(t,i,s){u=s,e(t)},destroy:function(){h.parentNode.removeChild(h),h=null,r&&(c.parentNode.removeChild(c),c=null)},onDOMReady:function(){r=t.isHost,l=0,p=g(t.remote),t.local=v(t.local),r?(j.Fn.set(t.channel,function(e){r&&"ready"===e&&(j.Fn.set(t.channel,n),i())}),f=w(t.remote,{xdm_e:t.local,xdm_c:t.channel,xdm_p:2}),b(t.props,{src:f+"#"+t.channel,name:U+t.channel+"_provider"}),c=k(t)):(t.remoteHelper=t.remote,j.Fn.set(t.channel,n));var e=function(){var n=h||this;P(n,"load",e),j.Fn.set(t.channel+"_load",o),function a(){"function"==typeof n.contentWindow.sendMessage?i():s(a,50)}()};h=k({props:{src:t.local+"#_4"+t.channel},onLoad:e})},init:function(){d(a.onDOMReady,a)}}},j.stack.HashTransport=function(e){function i(t){if(m){var i=e.remote+"#"+p++ +"_"+t;(h||!v?m.contentWindow:m).location=i}}function n(t){u=t,r.up.incoming(u.substring(u.indexOf("_")+1),w)}function o(){if(f){var t=f.location.href,e="",i=t.indexOf("#");-1!=i&&(e=t.substring(i)),e&&e!=u&&n(e)}}function a(){c=setInterval(o,l)}var r,h,c,l,u,p,f,m,v,w;return r={outgoing:function(t){i(t)},destroy:function(){t.clearInterval(c),(h||!v)&&m.parentNode.removeChild(m),m=null},onDOMReady:function(){if(h=e.isHost,l=e.interval,u="#"+e.channel,p=0,v=e.useParent,w=g(e.remote),h){if(b(e.props,{src:e.remote,name:U+e.channel+"_provider"}),v)e.onLoad=function(){f=t,a(),r.up.callback(!0)};else{var i=0,n=e.delay/50;!function o(){if(++i>n)throw new Error("Unable to reference listenerwindow");try{f=m.contentWindow.frames[U+e.channel+"_consumer"]}catch(t){}f?(a(),r.up.callback(!0)):s(o,50)}()}m=k(e)}else f=t,a(),v?(m=parent,r.up.callback(!0)):(b(e,{props:{src:e.remote+"#"+e.channel+new Date,name:U+e.channel+"_consumer"},onLoad:function(){r.up.callback(!0)}}),m=k(e))},init:function(){d(r.onDOMReady,r)}}},j.stack.ReliableBehavior=function(){var t,e,i=0,s=0,n="";return t={incoming:function(o,a){var r=o.indexOf("_"),h=o.substring(0,r).split(",");o=o.substring(r+1),h[0]==i&&(n="",e&&e(!0)),o.length>0&&(t.down.outgoing(h[1]+","+i+"_"+n,a),s!=h[1]&&(s=h[1],t.up.incoming(o,a)))},outgoing:function(o,a,r){n=o,e=r,t.down.outgoing(s+","+ ++i+"_"+o,a)}}},j.stack.QueueBehavior=function(t){function e(){if(t.remove&&0===r.length)return void T(i);if(!h&&0!==r.length&&!a){h=!0;var n=r.shift();i.down.outgoing(n.data,n.origin,function(t){h=!1,n.callback&&s(function(){n.callback(t)},0),e()})}}var i,a,r=[],h=!0,c="",l=0,d=!1,u=!1;return i={init:function(){y(t)&&(t={}),t.maxLength&&(l=t.maxLength,u=!0),t.lazy?d=!0:i.down.init()},callback:function(t){h=!1;var s=i.up;e(),s.callback(t)},incoming:function(e,s){if(u){var o=e.indexOf("_"),a=parseInt(e.substring(0,o),10);c+=e.substring(o+1),0===a&&(t.encode&&(c=n(c)),i.up.incoming(c,s),c="")}else i.up.incoming(e,s)},outgoing:function(s,n,a){t.encode&&(s=o(s));var h,c=[];if(u){for(;0!==s.length;)h=s.substring(0,l),s=s.substring(h.length),c.push(h);for(;h=c.shift();)r.push({data:c.length+"_"+h,origin:n,callback:0===c.length?a:null})}else r.push({data:s,origin:n,callback:a});d?i.down.init():e()},destroy:function(){a=!0,i.down.destroy()}}},j.stack.VerifyBehavior=function(t){function e(){s=Math.random().toString(16).substring(2),i.down.outgoing(s)}var i,s,n;return i={incoming:function(o,a){var r=o.indexOf("_");-1===r?o===s?i.up.callback(!0):n||(n=o,t.initiate||e(),i.down.outgoing(o)):o.substring(0,r)===n&&i.up.incoming(o.substring(r+1),a)},outgoing:function(t,e,n){i.down.outgoing(s+"_"+t,e,n)},callback:function(){t.initiate&&e()}}},j.stack.RpcBehavior=function(t,e){function i(t){t.jsonrpc="2.0",o.down.outgoing(a.stringify(t))}function s(t,e){var s=Array.prototype.slice;return function(){var n,o=arguments.length,a={method:e};o>0&&"function"==typeof arguments[o-1]?(o>1&&"function"==typeof arguments[o-2]?(n={success:arguments[o-2],error:arguments[o-1]},a.params=s.call(arguments,0,o-2)):(n={success:arguments[o-1]},a.params=s.call(arguments,0,o-1)),c[""+ ++r]=n,a.id=r):a.params=s.call(arguments,0),t.namedParams&&1===a.params.length&&(a.params=a.params[0]),i(a)}}function n(t,e,s,n){if(!s)return void(e&&i({id:e,error:{code:-32601,message:"Procedure not found."}}));var o,a;e?(o=function(t){o=F,i({id:e,result:t})},a=function(t,s){a=F;var n={id:e,error:{code:-32099,message:t}};s&&(n.error.data=s),i(n)}):o=a=F,h(n)||(n=[n]);try{var r=s.method.apply(s.scope,n.concat([o,a]));y(r)||o(r)}catch(c){a(c.message)}}var o,a=e.serializer||Y(),r=0,c={};return o={incoming:function(t){var s=a.parse(t);if(s.method)e.handle?e.handle(s,i):n(s.method,s.id,e.local[s.method],s.params);else{var o=c[s.id];s.error?o.error&&o.error(s.error):o.success&&o.success(s.result),delete c[s.id]
}},init:function(){if(e.remote)for(var i in e.remote)e.remote.hasOwnProperty(i)&&(t[i]=s(e.remote[i],i));o.down.init()},destroy:function(){for(var i in e.remote)e.remote.hasOwnProperty(i)&&t.hasOwnProperty(i)&&delete t[i];o.down.destroy()}}},I.easyXDM=j}(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent),function(t){"undefined"==typeof t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var i=t([0]),s=-1,n=this.length;++s<n&&(i.context=i[0]=this[s])&&e.call(i[0],s,i)!==!1;);return this}})}(jQuery),function(t,e){"use strict";function i(e){var i=t(document.createTextNode(""));e.before(i),i.before(e),i.remove()}function s(t){function e(t){return L[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function n(t,e){for(var i=0,s=e.length;s>i;i+=1)if(a(t,e[i]))return i;return-1}function o(){var e=t(j);e.appendTo("body");var i={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),i}function a(t,i){return t===i?!0:t===e||i===e?!1:null===t||null===i?!1:t.constructor===String?t+""==i+"":i.constructor===String?i+""==t+"":!1}function r(e,i){var s,n,o;if(null===e||e.length<1)return[];for(s=e.split(i),n=0,o=s.length;o>n;n+=1)s[n]=t.trim(s[n]);return s}function h(t){return t.outerWidth(!1)-t.width()}function c(i){var s="keyup-change-value";i.on("keydown",function(){t.data(i,s)===e&&t.data(i,s,i.val())}),i.on("keyup",function(){var n=t.data(i,s);n!==e&&i.val()!==n&&(t.removeData(i,s),i.trigger("keyup-change"))})}function l(i){i.on("mousemove",function(i){var s=_;(s===e||s.x!==i.pageX||s.y!==i.pageY)&&t(i.target).trigger("mousemove-filtered",i)})}function d(t,i,s){s=s||e;var n;return function(){var e=arguments;window.clearTimeout(n),n=window.setTimeout(function(){i.apply(s,e)},t)}}function u(t,e){var i=d(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){n(t.target,e.get())>=0&&i(t)})}function p(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,i=t[0],s=t.val().length;t.focus();var n=i.offsetWidth>0||i.offsetHeight>0;n&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(s,s):i.createTextRange&&(e=i.createTextRange(),e.collapse(!1),e.select()))},0)}function f(e){e=t(e)[0];var i=0,s=0;if("selectionStart"in e)i=e.selectionStart,s=e.selectionEnd-i;else if("selection"in document){e.focus();var n=document.selection.createRange();s=document.selection.createRange().text.length,n.moveStart("character",-e.value.length),i=n.text.length-s}return{offset:i,length:s}}function m(t){t.preventDefault(),t.stopPropagation()}function g(t){t.preventDefault(),t.stopImmediatePropagation()}function v(e){if(!A){var i=e[0].currentStyle||window.getComputedStyle(e[0],null);A=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),A.attr("class","select2-sizer"),t("body").append(A)}return A.text(e.val()),A.width()}function w(e,i,s){var n,o,a=[];n=t.trim(e.attr("class")),n&&(n=""+n,t(n.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),n=t.trim(i.attr("class")),n&&(n=""+n,t(n.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=s(this),o&&a.push(o))})),e.attr("class",a.join(" "))}function y(t,e,i,n){var o=s(t.toUpperCase()).indexOf(s(e.toUpperCase())),a=e.length;return 0>o?void i.push(n(t)):(i.push(n(t.substring(0,o))),i.push("<span class='select2-match'>"),i.push(n(t.substring(o,o+a))),i.push("</span>"),void i.push(n(t.substring(o+a,t.length))))}function b(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function C(i){var s,n=null,o=i.quietMillis||100,a=i.url,r=this;return function(h){window.clearTimeout(s),s=window.setTimeout(function(){var s=i.data,o=a,c=i.transport||t.fn.select2.ajaxDefaults.transport,l={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||e,dataType:i.dataType||"json"},d=t.extend({},t.fn.select2.ajaxDefaults.params,l);s=s?s.call(r,h.term,h.page,h.context):null,o="function"==typeof o?o.call(r,h.term,h.page,h.context):o,n&&"function"==typeof n.abort&&n.abort(),i.params&&(t.isFunction(i.params)?t.extend(d,i.params.call(r)):t.extend(d,i.params)),t.extend(d,{url:o,dataType:i.dataType,data:s,success:function(t){var e=i.results(t,h.page,h);h.callback(e)},error:function(t,e,i){var s={hasError:!0,jqXHR:t,textStatus:e,errorThrown:i};h.callback(s)}}),n=c.call(r,d)},o)}}function k(e){var i,s,n=e,o=function(t){return""+t.text};t.isArray(n)&&(s=n,n={results:s}),t.isFunction(n)===!1&&(s=n,n=function(){return s});var a=n();return a.text&&(o=a.text,t.isFunction(o)||(i=a.text,o=function(t){return t[i]})),function(e){var i,s=e.term,a={results:[]};return""===s?void e.callback(n()):(i=function(n,a){var r,h;if(n=n[0],n.children){r={};for(h in n)n.hasOwnProperty(h)&&(r[h]=n[h]);r.children=[],t(n.children).each2(function(t,e){i(e,r.children)}),(r.children.length||e.matcher(s,o(r),n))&&a.push(r)}else e.matcher(s,o(n),n)&&a.push(n)},t(n().results).each2(function(t,e){i(e,a.results)}),void e.callback(a))}}function x(i){var s=t.isFunction(i);return function(n){var o=n.term,a={results:[]},r=s?i(n):i;t.isArray(r)&&(t(r).each(function(){var t=this.text!==e,i=t?this.text:this;(""===o||n.matcher(o,i))&&a.results.push(t?this:{id:this,text:this})}),n.callback(a))}}function S(e,i){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(i+" must be a string, function, or falsy value")}function M(e,i){if(t.isFunction(e)){var s=Array.prototype.slice.call(arguments,2);return e.apply(i,s)}return e}function T(e){var i=0;return t.each(e,function(t,e){e.children?i+=T(e.children):i++}),i}function E(t,i,s,n){var o,r,h,c,l,d=t,u=!1;if(!n.createSearchChoice||!n.tokenSeparators||n.tokenSeparators.length<1)return e;for(;;){for(r=-1,h=0,c=n.tokenSeparators.length;c>h&&(l=n.tokenSeparators[h],r=t.indexOf(l),!(r>=0));h++);if(0>r)break;if(o=t.substring(0,r),t=t.substring(r+l.length),o.length>0&&(o=n.createSearchChoice.call(this,o,i),o!==e&&null!==o&&n.id(o)!==e&&null!==n.id(o))){for(u=!1,h=0,c=i.length;c>h;h++)if(a(n.id(o),n.id(i[h]))){u=!0;break}u||s(o)}}return d!==t?t:void 0}function $(){var e=this;t.each(arguments,function(t,i){e[i].remove(),e[i]=null})}function O(e,i){var s=function(){};return s.prototype=new e,s.prototype.constructor=s,s.prototype.parent=e.prototype,s.prototype=t.extend(s.prototype,i),s}if(window.Select2===e){var D,P,I,R,F,A,N,H,_={x:0,y:0},D={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:return!0}return!1},isControl:function(t){var e=t.which;switch(e){case D.SHIFT:case D.CTRL:case D.ALT:return!0}return t.metaKey?!0:!1},isFunctionKey:function(t){return t=t.which?t.which:t,t>=112&&123>=t}},j="<div class='select2-measure-scrollbar'></div>",L={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};N=t(document),F=function(){var t=1;return function(){return t++}}(),P=O(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(i){var s,n,a=".select2-results";this.opts=i=this.prepareOpts(i),this.id=i.id,i.element.data("select2")!==e&&null!==i.element.data("select2")&&i.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(i.element.attr("id")||"autogen"+F()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",i.element.attr("title")),this.body=t("body"),w(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",i.element.attr("style")),this.container.css(M(i.containerCss,this.opts.element)),this.container.addClass(M(i.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",m),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),w(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(M(i.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",m),this.results=s=this.container.find(a),this.search=n=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",m),l(this.results),this.dropdown.on("mousemove-filtered",a,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",a,this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",a,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",a,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),u(80,this.results),this.dropdown.on("scroll-debounced",a,this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&s.mousewheel(function(t,e,i,n){var o=s.scrollTop();n>0&&0>=o-n?(s.scrollTop(0),m(t)):0>n&&s.get(0).scrollHeight-s.scrollTop()+n<=s.height()&&(s.scrollTop(s.get(0).scrollHeight-s.height()),m(t))}),c(n),n.on("keyup-change input paste",this.bind(this.updateResults)),n.on("focus",function(){n.addClass("select2-focused")}),n.on("blur",function(){n.removeClass("select2-focused")}),this.dropdown.on("mouseup",a,this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=e,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==i.maximumInputLength&&this.search.attr("maxlength",i.maximumInputLength);var r=i.element.prop("disabled");r===e&&(r=!1),this.enable(!r);var h=i.element.prop("readonly");h===e&&(h=!1),this.readonly(h),H=H||o(),this.autofocus=i.element.prop("autofocus"),i.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",i.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,i=t.data("select2"),s=this;this.close(),t.length&&t[0].detachEvent&&t.each(function(){this.detachEvent("onpropertychange",s._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,i!==e&&(i.container.remove(),i.liveRegion.remove(),i.dropdown.remove(),t.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),$.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:a(t.attr("locked"),"locked")||a(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(i){var s,n,o,h,c=this;if(s=i.element,"select"===s.get(0).tagName.toLowerCase()&&(this.select=n=i.element),n&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),i=t.extend({},{populateResults:function(s,n,o){var a,r=this.opts.id,h=this.liveRegion;(a=function(s,n,l){var d,u,p,f,m,g,v,w,y,b;s=i.sortResults(s,n,o);var C=[];for(d=0,u=s.length;u>d;d+=1)p=s[d],m=p.disabled===!0,f=!m&&r(p)!==e,g=p.children&&p.children.length>0,v=t("<li></li>"),v.addClass("select2-results-dept-"+l),v.addClass("select2-result"),v.addClass(f?"select2-result-selectable":"select2-result-unselectable"),m&&v.addClass("select2-disabled"),g&&v.addClass("select2-result-with-children"),v.addClass(c.opts.formatResultCssClass(p)),v.attr("role","presentation"),w=t(document.createElement("div")),w.addClass("select2-result-label"),w.attr("id","select2-result-label-"+F()),w.attr("role","option"),b=i.formatResult(p,w,o,c.opts.escapeMarkup),b!==e&&(w.html(b),v.append(w)),g&&(y=t("<ul></ul>"),y.addClass("select2-result-sub"),a(p.children,y,l+1),v.append(y)),v.data("select2-data",p),C.push(v[0]);n.append(C),h.text(i.formatMatches(s.length))})(n,s,0)}},t.fn.select2.defaults,i),"function"!=typeof i.id&&(o=i.id,i.id=function(t){return t[o]}),t.isArray(i.element.data("select2Tags"))){if("tags"in i)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+i.element.attr("id");i.tags=i.element.data("select2Tags")}if(n?(i.query=this.bind(function(t){var i,n,o,a={results:[],more:!1},r=t.term;o=function(e,i){var s;e.is("option")?t.matcher(r,e.text(),e)&&i.push(c.optionToData(e)):e.is("optgroup")&&(s=c.optionToData(e),e.children().each2(function(t,e){o(e,s.children)}),s.children.length>0&&i.push(s))},i=s.children(),this.getPlaceholder()!==e&&i.length>0&&(n=this.getPlaceholderOption(),n&&(i=i.not(n))),i.each2(function(t,e){o(e,a.results)}),t.callback(a)}),i.id=function(t){return t.id}):"query"in i||("ajax"in i?(h=i.element.data("ajax-url"),h&&h.length>0&&(i.ajax.url=h),i.query=C.call(i.element,i.ajax)):"data"in i?i.query=k(i.data):"tags"in i&&(i.query=x(i.tags),i.createSearchChoice===e&&(i.createSearchChoice=function(e){return{id:t.trim(e),text:t.trim(e)}}),i.initSelection===e&&(i.initSelection=function(e,s){var n=[];t(r(e.val(),i.separator)).each(function(){var e={id:this,text:this},s=i.tags;t.isFunction(s)&&(s=s()),t(s).each(function(){return a(this.id,e.id)?(e=this,!1):void 0}),n.push(e)}),s(n)}))),"function"!=typeof i.query)throw"query function not defined for Select2 "+i.element.attr("id");if("top"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(t,e){t.unshift(e)};else if("bottom"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(t,e){t.push(e)};else if("function"!=typeof i.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return i},monitorSource:function(){var i,s=this.opts.element,n=this;s.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var t=s.prop("disabled");t===e&&(t=!1),this.enable(!t);var i=s.prop("readonly");i===e&&(i=!1),this.readonly(i),w(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(M(this.opts.containerCssClass,this.opts.element)),w(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(M(this.opts.dropdownCssClass,this.opts.element))}),s.length&&s[0].attachEvent&&s.each(function(){this.attachEvent("onpropertychange",n._sync)}),i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,i!==e&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new i(function(e){t.each(e,n._sync)}),this.propertyObserver.observe(s.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(e){var i=t.Event("select2-selecting",{val:this.id(e),object:e,choice:e});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(e){e=e||{},e=t.extend({},e,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(e),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var t=this._enabled&&!this._readonly,e=!t;return t===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",e),this.close(),this.enabledInterface=t,!0)},enable:function(t){t===e&&(t=!0),this._enabled!==t&&(this._enabled=t,this.opts.element.prop("disabled",!t),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(t){t===e&&(t=!1),this._readonly!==t&&(this._readonly=t,this.opts.element.prop("readonly",t),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var e,i,s,n,o,a=this.dropdown,r=this.container.offset(),h=this.container.outerHeight(!1),c=this.container.outerWidth(!1),l=a.outerHeight(!1),d=t(window),u=d.width(),p=d.height(),f=d.scrollLeft()+u,m=d.scrollTop()+p,g=r.top+h,v=r.left,w=m>=g+l,y=r.top-l>=d.scrollTop(),b=a.outerWidth(!1),C=f>=v+b,k=a.hasClass("select2-drop-above");k?(i=!0,!y&&w&&(s=!0,i=!1)):(i=!1,!w&&y&&(s=!0,i=!0)),s&&(a.hide(),r=this.container.offset(),h=this.container.outerHeight(!1),c=this.container.outerWidth(!1),l=a.outerHeight(!1),f=d.scrollLeft()+u,m=d.scrollTop()+p,g=r.top+h,v=r.left,b=a.outerWidth(!1),C=f>=v+b,a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=t(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:H.width),b>c?c=b:b=c,l=a.outerHeight(!1),C=f>=v+b):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(e=this.body.offset(),g-=e.top,v-=e.left),C||(v=r.left+this.container.outerWidth(!1)-b),n={left:v,width:c},i?(n.top=r.top-l,n.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(n.top=g,n.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),n=t.extend(n,M(this.opts.dropdownCss,this.opts.element)),a.css(n)},shouldOpen:function(){var e;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(e=t.Event("select2-opening"),this.opts.element.trigger(e),!e.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),N.on("mousemove.select2Event",function(t){_.x=t.pageX,_.y=t.pageY}),!0):!1},opening:function(){var e,s=this.containerEventName,n="scroll."+s,o="resize."+s,a="orientationchange."+s;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),e=t("#select2-drop-mask"),0==e.length&&(e=t(document.createElement("div")),e.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),e.hide(),e.appendTo(this.body),e.on("mousedown touchstart click",function(s){i(e);var n,o=t("#select2-drop");o.length>0&&(n=o.data("select2"),n.opts.selectOnBlur&&n.selectHighlighted({noFocus:!0}),n.close(),s.preventDefault(),s.stopPropagation())})),this.dropdown.prev()[0]!==e[0]&&this.dropdown.before(e),t("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),e.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var r=this;this.container.parents().add(window).each(function(){t(this).on(o+" "+n+" "+a,function(){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,i="scroll."+e,s="resize."+e,n="orientationchange."+e;this.container.parents().add(window).each(function(){t(this).off(i).off(s).off(n)}),this.clearDropdownAlignmentPreference(),t("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),N.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(t.Event("select2-close"))}},externalSearch:function(t){this.open(),this.search.val(t),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return M(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var e,i,s,n,o,a,r,h,c=this.results;if(i=this.highlight(),!(0>i)){if(0==i)return void c.scrollTop(0);e=this.findHighlightableChoices().find(".select2-result-label"),s=t(e[i]),h=(s.offset()||{}).top||0,n=h+s.outerHeight(!0),i===e.length-1&&(r=c.find("li.select2-more-results"),r.length>0&&(n=r.offset().top+r.outerHeight(!0))),o=c.offset().top+c.outerHeight(!0),n>o&&c.scrollTop(c.scrollTop()+(n-o)),a=h-c.offset().top,0>a&&"none"!=s.css("display")&&c.scrollTop(c.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(e){for(var i=this.findHighlightableChoices(),s=this.highlight();s>-1&&s<i.length;){s+=e;var n=t(i[s]);if(n.hasClass("select2-result-selectable")&&!n.hasClass("select2-disabled")&&!n.hasClass("select2-selected")){this.highlight(s);break}}},highlight:function(e){var i,s,o=this.findHighlightableChoices();return 0===arguments.length?n(o.filter(".select2-highlighted")[0],o.get()):(e>=o.length&&(e=o.length-1),0>e&&(e=0),this.removeHighlight(),i=t(o[e]),i.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",i.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(i.text()),s=i.data("select2-data"),void(s&&this.opts.element.trigger({type:"select2-highlight",val:this.id(s),choice:s})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(e){var i=t(e.target).closest(".select2-result-selectable");if(i.length>0&&!i.is(".select2-highlighted")){var s=this.findHighlightableChoices();this.highlight(s.index(i))}else 0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var t,e=this.results,i=e.find("li.select2-more-results"),s=this.resultsPage+1,n=this,o=this.search.val(),a=this.context;0!==i.length&&(t=i.offset().top-e.offset().top-e.height(),t<=this.opts.loadMorePadding&&(i.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:s,context:a,matcher:this.opts.matcher,callback:this.bind(function(t){n.opened()&&(n.opts.populateResults.call(this,e,t.results,{term:o,page:s,context:a}),n.postprocessResults(t,!1,!1),t.more===!0?(i.detach().appendTo(e).text(M(n.opts.formatLoadMore,n.opts.element,s+1)),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):i.remove(),n.positionDropdown(),n.resultsPage=s,n.context=t.context,this.opts.element.trigger({type:"select2-loaded",items:t}))})})))},tokenize:function(){},updateResults:function(i){function s(){c.removeClass("select2-active"),u.positionDropdown(),u.liveRegion.text(l.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?l.text():u.opts.formatMatches(l.find(".select2-result-selectable").length))}function n(t){l.html(t),s()}var o,r,h,c=this.search,l=this.results,d=this.opts,u=this,p=c.val(),f=t.data(this.container,"select2-last-term");if((i===!0||!f||!a(p,f))&&(t.data(this.container,"select2-last-term",p),i===!0||this.showSearchInput!==!1&&this.opened())){h=++this.queryCount;var m=this.getMaximumSelectionSize();if(m>=1&&(o=this.data(),t.isArray(o)&&o.length>=m&&S(d.formatSelectionTooBig,"formatSelectionTooBig")))return void n("<li class='select2-selection-limit'>"+M(d.formatSelectionTooBig,d.element,m)+"</li>");if(c.val().length<d.minimumInputLength)return n(S(d.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+M(d.formatInputTooShort,d.element,c.val(),d.minimumInputLength)+"</li>":""),void(i&&this.showSearch&&this.showSearch(!0));if(d.maximumInputLength&&c.val().length>d.maximumInputLength)return void n(S(d.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+M(d.formatInputTooLong,d.element,c.val(),d.maximumInputLength)+"</li>":"");d.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+M(d.formatSearching,d.element)+"</li>"),c.addClass("select2-active"),this.removeHighlight(),r=this.tokenize(),r!=e&&null!=r&&c.val(r),this.resultsPage=1,d.query({element:d.element,term:c.val(),page:this.resultsPage,context:null,matcher:d.matcher,callback:this.bind(function(o){var r;if(h==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==e&&S(d.formatAjaxError,"formatAjaxError"))return void n("<li class='select2-ajax-error'>"+M(d.formatAjaxError,d.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===e?null:o.context,this.opts.createSearchChoice&&""!==c.val()&&(r=this.opts.createSearchChoice.call(u,c.val(),o.results),r!==e&&null!==r&&u.id(r)!==e&&null!==u.id(r)&&0===t(o.results).filter(function(){return a(u.id(this),u.id(r))
}).length&&this.opts.createSearchChoicePosition(o.results,r)),0===o.results.length&&S(d.formatNoMatches,"formatNoMatches"))return void n("<li class='select2-no-results'>"+M(d.formatNoMatches,d.element,c.val())+"</li>");l.empty(),u.opts.populateResults.call(this,l,o.results,{term:c.val(),page:this.resultsPage,context:null}),o.more===!0&&S(d.formatLoadMore,"formatLoadMore")&&(l.append("<li class='select2-more-results'>"+d.escapeMarkup(M(d.formatLoadMore,d.element,this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,i),s(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){p(this.search)},selectHighlighted:function(t){if(this._touchMoved)return void this.clearTouchMoved();var e=this.highlight(),i=this.results.find(".select2-highlighted"),s=i.closest(".select2-result").data("select2-data");s?(this.highlight(e),this.onSelect(s,t)):t&&t.noFocus&&this.close()},getPlaceholder:function(){var t;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((t=this.getPlaceholderOption())!==e?t.text():e)},getPlaceholderOption:function(){if(this.select){var i=this.select.children("option").first();if(this.opts.placeholderOption!==e)return"first"===this.opts.placeholderOption&&i||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===t.trim(i.text())&&""===i.val())return i}},initContainerWidth:function(){function i(){var i,s,n,o,a,r;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(i=this.opts.element.attr("style"),i!==e)for(s=i.split(";"),o=0,a=s.length;a>o;o+=1)if(r=s[o].replace(/\s/g,""),n=r.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==n&&n.length>=1)return n[1];return"resolve"===this.opts.width?(i=this.opts.element.css("width"),i.indexOf("%")>0?i:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return t.isFunction(this.opts.width)?this.opts.width():this.opts.width}var s=i.call(this);null!==s&&this.container.css("width",s)}}),I=O(P,{createContainer:function(){var e=t(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""));return e},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,s,n;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),i=this.search.get(0),i.createTextRange?(s=i.createTextRange(),s.collapse(!1),s.select()):i.setSelectionRange&&(n=this.search.val().length,i.setSelectionRange(n,n))),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){t("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),$.call(this,"selection","focusser")},initContainer:function(){var e,s,n=this.container,o=this.dropdown,a=F();this.showSearch(this.opts.minimumResultsForSearch<0?!1:!0),this.selection=e=n.find(".select2-choice"),this.focusser=n.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),s=t("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(s.text()).attr("for",this.focusser.attr("id"));var r=this.opts.element.attr("title");this.opts.element.attr("title",r||s.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(t("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===D.PAGE_UP||t.which===D.PAGE_DOWN)return void m(t);switch(t.which){case D.UP:case D.DOWN:return this.moveHighlight(t.which===D.UP?-1:1),void m(t);case D.ENTER:return this.selectHighlighted(),void m(t);case D.TAB:return void this.selectHighlighted({noFocus:!0});case D.ESC:return this.cancel(t),void m(t)}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==D.TAB&&!D.isControl(t)&&!D.isFunctionKey(t)&&t.which!==D.ESC){if(this.opts.openOnEnter===!1&&t.which===D.ENTER)return void m(t);if(t.which==D.DOWN||t.which==D.UP||t.which==D.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void m(t)}return t.which==D.DELETE||t.which==D.BACKSPACE?(this.opts.allowClear&&this.clear(),void m(t)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(this.opts.minimumResultsForSearch>=0){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){this.isInterfaceEnabled()&&(this.clear(),g(t),this.close(),this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(s){i(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),m(s)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){m(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(t.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(e){var i=this.selection.data("select2-data");if(i){var s=t.Event("select2-clearing");if(this.opts.element.trigger(s),s.isDefaultPrevented())return;var n=this.getPlaceholderOption();this.opts.element.val(n?n.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),e!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==e&&null!==i&&(t.updateSelection(i),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(i,t.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()===e?!1:(t=this.getPlaceholderOption())!==e&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===e||null===this.opts.element.val()},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var s=t.find("option").filter(function(){return this.selected&&!this.disabled});e(i.optionToData(s))}:"data"in e&&(e.initSelection=e.initSelection||function(i,s){var n=i.val(),o=null;e.query({matcher:function(t,i,s){var r=a(n,e.id(s));return r&&(o=s),r},callback:t.isFunction(s)?function(){s(o)}:t.noop})}),e},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===e?e:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==e){if(this.select&&this.getPlaceholderOption()===e)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,i){var s=0,n=this;if(this.findHighlightableChoices().each2(function(t,e){return a(n.id(e.data("select2-data")),n.opts.element.val())?(s=t,!1):void 0}),i!==!1&&this.highlight(e===!0&&s>=0?s:0),e===!0){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(T(t.results)>=o)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),t(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(t,e){if(this.triggerSelect(t)){var i=this.opts.element.val(),s=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),a(i,this.id(t))||this.triggerChange({added:t,removed:s})}},updateSelection:function(t){var i,s,n=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),n.empty(),null!==t&&(i=this.opts.formatSelection(t,n,this.opts.escapeMarkup)),i!==e&&n.append(i),s=this.opts.formatSelectionCssClass(t,n),s!==e&&n.addClass(s),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==e&&this.container.addClass("select2-allowclear")},val:function(){var t,i=!1,s=null,n=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],arguments.length>1&&(i=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return s=n.optionToData(e),!1}),this.updateSelection(s),this.setPlaceholder(),i&&this.triggerChange({added:s,removed:o});else{if(!t&&0!==t)return void this.clear(i);if(this.opts.initSelection===e)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){n.opts.element.val(t?n.id(t):""),n.updateSelection(t),n.setPlaceholder(),i&&n.triggerChange({added:t,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var i,s=!1;return 0===arguments.length?(i=this.selection.data("select2-data"),i==e&&(i=null),i):(arguments.length>1&&(s=arguments[1]),void(t?(i=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),s&&this.triggerChange({added:t,removed:i})):this.clear(s)))}}),R=O(P,{createContainer:function(){var e=t(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return e},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var s=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){s.push(i.optionToData(e))}),e(s)}:"data"in e&&(e.initSelection=e.initSelection||function(i,s){var n=r(i.val(),e.separator),o=[];e.query({matcher:function(i,s,r){var h=t.grep(n,function(t){return a(t,e.id(r))}).length;return h&&o.push(r),h},callback:t.isFunction(s)?function(){for(var t=[],i=0;i<n.length;i++)for(var r=n[i],h=0;h<o.length;h++){var c=o[h];if(a(r,e.id(c))){t.push(c),o.splice(h,1);break}}s(t)}:t.noop})}),e},selectChoice:function(t){var e=this.container.find(".select2-search-choice-focus");e.length&&t&&t[0]==e[0]||(e.length&&this.opts.element.trigger("choice-deselected",e),e.removeClass("select2-search-choice-focus"),t&&t.length&&(this.close(),t.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",t)))},destroy:function(){t("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),$.call(this,"searchContainer","selection")},initContainer:function(){var e,i=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(i);var s=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){s.search[0].focus(),s.selectChoice(t(this))}),this.search.attr("id","s2id_autogen"+F()),this.search.prev().text(t("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()){++this.keydowns;var i=e.find(".select2-search-choice-focus"),s=i.prev(".select2-search-choice:not(.select2-locked)"),n=i.next(".select2-search-choice:not(.select2-locked)"),o=f(this.search);if(i.length&&(t.which==D.LEFT||t.which==D.RIGHT||t.which==D.BACKSPACE||t.which==D.DELETE||t.which==D.ENTER)){var a=i;return t.which==D.LEFT&&s.length?a=s:t.which==D.RIGHT?a=n.length?n:null:t.which===D.BACKSPACE?this.unselect(i.first())&&(this.search.width(10),a=s.length?s:n):t.which==D.DELETE?this.unselect(i.first())&&(this.search.width(10),a=n.length?n:null):t.which==D.ENTER&&(a=null),this.selectChoice(a),m(t),void(a&&a.length||this.open())}if((t.which===D.BACKSPACE&&1==this.keydowns||t.which==D.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),void m(t);if(this.selectChoice(null),this.opened())switch(t.which){case D.UP:case D.DOWN:return this.moveHighlight(t.which===D.UP?-1:1),void m(t);case D.ENTER:return this.selectHighlighted(),void m(t);case D.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case D.ESC:return this.cancel(t),void m(t)}if(t.which!==D.TAB&&!D.isControl(t)&&!D.isFunctionKey(t)&&t.which!==D.BACKSPACE&&t.which!==D.ESC){if(t.which===D.ENTER){if(this.opts.openOnEnter===!1)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return}this.open(),(t.which===D.PAGE_UP||t.which===D.PAGE_DOWN)&&m(t),t.which===D.ENTER&&m(t)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger(t.Event("select2-blur"))})),this.container.on("click",i,this.bind(function(e){this.isInterfaceEnabled()&&(t(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==e&&null!==i&&(t.updateSelection(i),t.close(),t.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),i=this.getMaxSearchWidth();t!==e&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(t).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var i=[],s=[],o=this;t(e).each(function(){n(o.id(this),i)<0&&(i.push(o.id(this)),s.push(this))}),e=s,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var t=this.search.val();t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts),null!=t&&t!=e&&(this.search.val(t),t.length>0&&this.open())},onSelect:function(t,i){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(t,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),i&&i.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(i){var s,n,o=!i.locked,a=t("<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),r=t("<li class='select2-search-choice select2-locked'><div></div></li>"),h=o?a:r,c=this.id(i),l=this.getVal();s=this.opts.formatSelection(i,h.find("div"),this.opts.escapeMarkup),s!=e&&h.find("div").replaceWith("<div>"+s+"</div>"),n=this.opts.formatSelectionCssClass(i,h.find("div")),n!=e&&h.addClass(n),o&&h.find(".select2-search-choice-close").on("mousedown",m).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(t(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),m(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),h.data("select2-data",i),h.insertBefore(this.searchContainer),l.push(c),this.setVal(l)},unselect:function(e){var i,s,o=this.getVal();if(e=e.closest(".select2-search-choice"),0===e.length)throw"Invalid argument: "+e+". Must be .select2-search-choice";if(i=e.data("select2-data")){var a=t.Event("select2-removing");if(a.val=this.id(i),a.choice=i,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(s=n(this.id(i),o))>=0;)o.splice(s,1),this.setVal(o),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(t,e,i){var s=this.getVal(),o=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),r=this;o.each2(function(t,e){var i=r.id(e.data("select2-data"));n(i,s)>=0&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),-1==this.highlight()&&i!==!1&&r.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&S(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+M(r.opts.formatNoMatches,r.opts.element,r.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-h(this.search)},resizeSearch:function(){var t,e,i,s,n,o=h(this.search);t=v(this.search)+10,e=this.search.offset().left,i=this.selection.width(),s=this.selection.offset().left,n=i-(e-s)-o,t>n&&(n=i-o),40>n&&(n=i-o),0>=n&&(n=t),this.search.width(Math.floor(n))},getVal:function(){var t;return this.select?(t=this.select.val(),null===t?[]:t):(t=this.opts.element.val(),r(t,this.opts.separator))},setVal:function(e){var i;this.select?this.select.val(e):(i=[],t(e).each(function(){n(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(t,e){for(var e=e.slice(0),t=t.slice(0),i=0;i<e.length;i++)for(var s=0;s<t.length;s++)a(this.opts.id(e[i]),this.opts.id(t[s]))&&(e.splice(i,1),i>0&&i--,t.splice(s,1),s--);return{added:e,removed:t}},val:function(i,s){var n,o=this;if(0===arguments.length)return this.getVal();if(n=this.data(),n.length||(n=[]),!i&&0!==i)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(s&&this.triggerChange({added:this.data(),removed:n}));if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),s&&this.triggerChange(this.buildChangeDetails(n,this.data()));else{if(this.opts.initSelection===e)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var i=t.map(e,o.id);o.setVal(i),o.updateSelection(e),o.clearSearch(),s&&o.triggerChange(o.buildChangeDetails(n,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(i.opts.id(t(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,i){var s,n,o=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get():(n=this.data(),e||(e=[]),s=t.map(e,function(t){return o.opts.id(t)}),this.setVal(s),this.updateSelection(e),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(n,this.data())),void 0)}}),t.fn.select2=function(){var i,s,o,a,r,h=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],d=["val","data"],u={search:"externalSearch"};return this.each(function(){if(0===h.length||"object"==typeof h[0])i=0===h.length?{}:t.extend({},h[0]),i.element=t(this),"select"===i.element.get(0).tagName.toLowerCase()?r=i.element.prop("multiple"):(r=i.multiple||!1,"tags"in i&&(i.multiple=r=!0)),s=r?new window.Select2["class"].multi:new window.Select2["class"].single,s.init(i);else{if("string"!=typeof h[0])throw"Invalid arguments to select2 plugin: "+h;if(n(h[0],c)<0)throw"Unknown method: "+h[0];if(a=e,s=t(this).data("select2"),s===e)return;if(o=h[0],"container"===o?a=s.container:"dropdown"===o?a=s.dropdown:(u[o]&&(o=u[o]),a=s[o].apply(s,h.slice(1))),n(h[0],l)>=0||n(h[0],d)>=0&&1==h.length)return!1}}),a===e?this:a},t.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,i,s){var n=[];return y(t.text,i.term,n,s),n.join("")},formatSelection:function(t,i,s){return t?s(t.text):e},sortResults:function(t){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(){return e},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==e?null:t.id},matcher:function(t,e){return s(""+e).toUpperCase().indexOf(s(""+t).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:E,escapeMarkup:b,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return e},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){var e="ontouchstart"in window||navigator.msMaxTouchPoints>0;return e&&t.opts.minimumResultsForSearch<0?!1:!0}},t.fn.select2.locales=[],t.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(t,e){var i=e-t.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(t,e){var i=t.length-e;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"}},t.extend(t.fn.select2.defaults,t.fn.select2.locales.en),t.fn.select2.ajaxDefaults={transport:t.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:C,local:k,tags:x},util:{debounce:d,markMatch:y,escapeMarkup:b,stripDiacritics:s},"class":{"abstract":P,single:I,multi:R}}}}(jQuery),function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Spinner=e()}(this,function(){"use strict";function t(t,e){var i,s=document.createElement(t||"div");for(i in e)s[i]=e[i];return s}function e(t){for(var e=1,i=arguments.length;i>e;e++)t.appendChild(arguments[e]);return t}function i(t,e,i,s){var n=["opacity",e,~~(100*t),i,s].join("-"),o=.01+i/s*100,a=Math.max(1-(1-t)/e*(100-o),t),r=c.substring(0,c.indexOf("Animation")).toLowerCase(),h=r&&"-"+r+"-"||"";return d[n]||(u.insertRule("@"+h+"keyframes "+n+"{0%{opacity:"+a+"}"+o+"%{opacity:"+t+"}"+(o+.01)+"%{opacity:1}"+(o+e)%100+"%{opacity:"+t+"}100%{opacity:"+a+"}}",u.cssRules.length),d[n]=1),n}function s(t,e){var i,s,n=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),s=0;s<l.length;s++)if(i=l[s]+e,void 0!==n[i])return i;return void 0!==n[e]?e:void 0}function n(t,e){for(var i in e)t.style[s(t,i)||i]=e[i];return t}function o(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)void 0===t[s]&&(t[s]=i[s])}return t}function a(t,e){return"string"==typeof t?t:t[e%t.length]}function r(t){this.opts=o(t||{},r.defaults,p)}function h(){function i(e,i){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',i)}u.addRule(".spin-vml","behavior:url(#default#VML)"),r.prototype.lines=function(t,s){function o(){return n(i("group",{coordsize:l+" "+l,coordorigin:-c+" "+-c}),{width:l,height:l})}function r(t,r,h){e(u,e(n(o(),{rotation:360/s.lines*t+"deg",left:~~r}),e(n(i("roundrect",{arcsize:s.corners}),{width:c,height:s.width,left:s.radius,top:-s.width>>1,filter:h}),i("fill",{color:a(s.color,t),opacity:s.opacity}),i("stroke",{opacity:0}))))}var h,c=s.length+s.width,l=2*c,d=2*-(s.width+s.length)+"px",u=n(o(),{position:"absolute",top:d,left:d});if(s.shadow)for(h=1;h<=s.lines;h++)r(h,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(h=1;h<=s.lines;h++)r(h);return e(t,u)},r.prototype.opacity=function(t,e,i,s){var n=t.firstChild;s=s.shadow&&s.lines||0,n&&e+s<n.childNodes.length&&(n=n.childNodes[e+s],n=n&&n.firstChild,n=n&&n.firstChild,n&&(n.opacity=i))}}var c,l=["webkit","Moz","ms","O"],d={},u=function(){var i=t("style",{type:"text/css"});return e(document.getElementsByTagName("head")[0],i),i.sheet||i.styleSheet}(),p={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};r.defaults={},o(r.prototype,{spin:function(e){this.stop();{var i=this,s=i.opts,o=i.el=n(t(0,{className:s.className}),{position:s.position,width:0,zIndex:s.zIndex});s.radius+s.length+s.width}if(n(o,{left:s.left,top:s.top}),e&&e.insertBefore(o,e.firstChild||null),o.setAttribute("role","progressbar"),i.lines(o,i.opts),!c){var a,r=0,h=(s.lines-1)*(1-s.direction)/2,l=s.fps,d=l/s.speed,u=(1-s.opacity)/(d*s.trail/100),p=d/s.lines;!function f(){r++;for(var t=0;t<s.lines;t++)a=Math.max(1-(r+(s.lines-t)*p)%d*u,s.opacity),i.opacity(o,t*s.direction+h,a,s);i.timeout=i.el&&setTimeout(f,~~(1e3/l))}()}return i},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this
},lines:function(s,o){function r(e,i){return n(t(),{position:"absolute",width:o.length+o.width+"px",height:o.width+"px",background:e,boxShadow:i,transformOrigin:"left",transform:"rotate("+~~(360/o.lines*l+o.rotate)+"deg) translate("+o.radius+"px,0)",borderRadius:(o.corners*o.width>>1)+"px"})}for(var h,l=0,d=(o.lines-1)*(1-o.direction)/2;l<o.lines;l++)h=n(t(),{position:"absolute",top:1+~(o.width/2)+"px",transform:o.hwaccel?"translate3d(0,0,0)":"",opacity:o.opacity,animation:c&&i(o.opacity,o.trail,d+l*o.direction,o.lines)+" "+1/o.speed+"s linear infinite"}),o.shadow&&e(h,n(r("#000","0 0 4px #000"),{top:"2px"})),e(s,e(h,r(a(o.color,l),"0 0 1px rgba(0,0,0,.1)")));return s},opacity:function(t,e,i){e<t.childNodes.length&&(t.childNodes[e].style.opacity=i)}});var f=n(t("group"),{behavior:"url(#default#VML)"});return!s(f,"transform")&&f.adj?h():c=s(f,"animation"),r});