UNPKG

causeway-standard-theme

Version:

9 lines 204 kB
/*!
*********************************************************************************************
* CausewayStyle v3.1.9-3
* Copyright 1998-2018 Causeway Software Solutions Limited.
* Author: Vijay Sharma
*********************************************************************************************
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e,t){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var e=new Date;return i(e.getFullYear(),e.getMonth(),e.getDate())}function s(e,t){return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}function o(i,n){return function(){return n!==t&&e.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}function r(e){return e&&!isNaN(e.getTime())}function a(t,i){var n=e(t).data(),s={},o=new RegExp("^"+i.toLowerCase()+"([A-Z])");i=new RegExp("^"+i.toLowerCase());for(var r in n)i.test(r)&&(s[r.replace(o,function(e,t){return t.toLowerCase()})]=n[r]);return s}function l(t){var i={};if(m[t]||(t=t.split("-")[0],m[t])){var n=m[t];return e.each(g,function(e,t){t in n&&(i[t]=n[t])}),i}}var d=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){for(var t=e&&e.valueOf(),i=0,n=this.length;i<n;i++)if(0<=this[i].valueOf()-t&&this[i].valueOf()-t<864e5)return i;return-1},remove:function(e){this.splice(e,1)},replace:function(t){t&&(e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var e=new d;return e.replace(this),e}};return function(){var i=[];return i.push.apply(i,arguments),e.extend(i,t),i}}(),h=function(t,i){e.data(t,"datepicker",this),this._process_options(i),this.dates=new d,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=e(t),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=e(v.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(e,t){return Number(t)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};h.prototype={constructor:h,_resolveViewName:function(t){return e.each(v.viewModes,function(i,n){if(t===i||-1!==e.inArray(t,n.names))return t=i,!1}),t},_resolveDaysOfWeek:function(t){return e.isArray(t)||(t=t.split(/[,\s]*/)),e.map(t,Number)},_check_template:function(i){try{return i!==t&&""!==i&&((i.match(/[<>]/g)||[]).length<=0||e(i).length>0)}catch(e){return!1}},_process_options:function(t){this._o=e.extend({},this._o,t);var s=this.o=e.extend({},this._o),o=s.language;m[o]||(o=o.split("-")[0],m[o]||(o=f.language)),s.language=o,s.startView=this._resolveViewName(s.startView),s.minViewMode=this._resolveViewName(s.minViewMode),s.maxViewMode=this._resolveViewName(s.maxViewMode),s.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,s.startView)),!0!==s.multidate&&(s.multidate=Number(s.multidate)||!1,!1!==s.multidate&&(s.multidate=Math.max(0,s.multidate))),s.multidateSeparator=String(s.multidateSeparator),s.weekStart%=7,s.weekEnd=(s.weekStart+6)%7;var r=v.parseFormat(s.format);s.startDate!==-1/0&&(s.startDate?s.startDate instanceof Date?s.startDate=this._local_to_utc(this._zero_time(s.startDate)):s.startDate=v.parseDate(s.startDate,r,s.language,s.assumeNearbyYear):s.startDate=-1/0),s.endDate!==1/0&&(s.endDate?s.endDate instanceof Date?s.endDate=this._local_to_utc(this._zero_time(s.endDate)):s.endDate=v.parseDate(s.endDate,r,s.language,s.assumeNearbyYear):s.endDate=1/0),s.daysOfWeekDisabled=this._resolveDaysOfWeek(s.daysOfWeekDisabled||[]),s.daysOfWeekHighlighted=this._resolveDaysOfWeek(s.daysOfWeekHighlighted||[]),s.datesDisabled=s.datesDisabled||[],e.isArray(s.datesDisabled)||(s.datesDisabled=s.datesDisabled.split(",")),s.datesDisabled=e.map(s.datesDisabled,function(e){return v.parseDate(e,r,s.language,s.assumeNearbyYear)});var a=String(s.orientation).toLowerCase().split(/\s+/g),l=s.orientation.toLowerCase();if(a=e.grep(a,function(e){return/^auto|left|right|top|bottom$/.test(e)}),s.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===a.length)switch(a[0]){case"top":case"bottom":s.orientation.y=a[0];break;case"left":case"right":s.orientation.x=a[0]}else l=e.grep(a,function(e){return/^left|right$/.test(e)}),s.orientation.x=l[0]||"auto",l=e.grep(a,function(e){return/^top|bottom$/.test(e)}),s.orientation.y=l[0]||"auto";else;if(s.defaultViewDate instanceof Date||"string"==typeof s.defaultViewDate)s.defaultViewDate=v.parseDate(s.defaultViewDate,r,s.language,s.assumeNearbyYear);else if(s.defaultViewDate){var d=s.defaultViewDate.year||(new Date).getFullYear(),h=s.defaultViewDate.month||0,c=s.defaultViewDate.day||1;s.defaultViewDate=i(d,h,c)}else s.defaultViewDate=n()},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var i,n,s,o=0;o<e.length;o++)i=e[o][0],2===e[o].length?(n=t,s=e[o][1]):3===e[o].length&&(n=e[o][1],s=e[o][2]),i.on(s,n)},_unapplyEvents:function(e){for(var i,n,s,o=0;o<e.length;o++)i=e[o][0],2===e[o].length?(s=t,n=e[o][1]):3===e[o].length&&(s=e[o][1],n=e[o][2]),i.off(n,s)},_buildEvents:function(){var t={keyup:e.proxy(function(t){-1===e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:e.proxy(this.keydown,this),paste:e.proxy(this.paste,this)};!0===this.o.showOnFocus&&(t.focus=e.proxy(this.show,this)),this.isInput?this._events=[[this.element,t]]:this.component&&this.inputField.length?this._events=[[this.inputField,t],[this.component,{click:e.proxy(this.show,this)}]]:this._events=[[this.element,{click:e.proxy(this.show,this),keydown:e.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":e.proxy(function(e){this.update(e.date)},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[this.picker,".prev, .next",{click:e.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:e.proxy(this.dayCellClick,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,i){var n=i||this.dates.get(-1),s=this._utc_to_local(n);this.element.trigger({type:t,date:s,viewMode:this.viewMode,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){0===arguments.length?(e=this.dates.length-1,t=this.o.format):"string"==typeof e&&(t=e,e=this.dates.length-1),t=t||this.o.format;var i=this.dates.get(e);return v.formatDate(i,t,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&e(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var i;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==e.inArray("text/plain",t.originalEvent.clipboardData.types))i=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i),this.update(),t.preventDefault()},_utc_to_local:function(e){if(!e)return e;var t=new Date(e.getTime()+6e4*e.getTimezoneOffset());return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(t=new Date(e.getTime()+6e4*t.getTimezoneOffset())),t},_local_to_utc:function(e){return e&&new Date(e.getTime()-6e4*e.getTimezoneOffset())},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&i(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var e=this.dates.get(-1);return e!==t?new Date(e):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,e.map(t,this._utc_to_local)),this},setDate:o("setDates"),setUTCDate:o("setUTCDates"),remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var e=this.getFormattedDate();return this.inputField.val(e),this},getFormattedDate:function(i){i===t&&(i=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,i,n)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(e){return this._process_options({startDate:e}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(e){return this._process_options({endDate:e}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(e){return this._process_options({daysOfWeekDisabled:e}),this.update(),this},setDaysOfWeekHighlighted:function(e){return this._process_options({daysOfWeekHighlighted:e}),this.update(),this},setDatesDisabled:function(e){return this._process_options({datesDisabled:e}),this.update(),this},place:function(){if(this.isInline)return this;var t=this.picker.outerWidth(),i=this.picker.outerHeight(),n=e(this.o.container),s=n.width(),o="body"===this.o.container?e(document).scrollTop():n.scrollTop(),r=n.offset(),a=[0];this.element.parents().each(function(){var t=e(this).css("z-index");"auto"!==t&&0!==Number(t)&&a.push(Number(t))});var l=Math.max.apply(Math,a)+this.o.zIndexOffset,d=this.component?this.component.parent().offset():this.element.offset(),h=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),u=d.left-r.left,p=d.top-r.top;"body"!==this.o.container&&(p+=o),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(u-=t-c)):d.left<0?(this.picker.addClass("datepicker-orient-left"),u-=d.left-10):u+t>s?(this.picker.addClass("datepicker-orient-right"),u+=c-t):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var f=this.o.orientation.y;if("auto"===f&&(f=-o+p-i<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+f),"top"===f?p-=i+parseInt(this.picker.css("padding-top")):p+=h,this.o.rtl){var g=s-(u+c);this.picker.css({top:p,right:g,zIndex:l})}else this.picker.css({top:p,left:u,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),i=[],n=!1;return arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),i.push(t)},this)),n=!0):(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),i=i&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=e.map(i,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=e.grep(i,e.proxy(function(e){return!this.dateWithinRange(e)||!e},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw">&#160;</th>');t<this.o.weekStart+7;)i+='<th class="dow',-1!==e.inArray(t,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+m[this.o.language].daysMin[t++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var e=this._utc_to_local(this.viewDate),t="",i=0;i<12;i++)t+='<span class="month'+(e&&e.getMonth()===i?" focused":"")+'">'+m[this.o.language].monthsShort[i]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=e.map(t,function(e){return e.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var i=[],o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),a=n();return t.getUTCFullYear()<o||t.getUTCFullYear()===o&&t.getUTCMonth()<r?i.push("old"):(t.getUTCFullYear()>o||t.getUTCFullYear()===o&&t.getUTCMonth()>r)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&s(t,a)&&i.push("today"),-1!==this.dates.contains(t)&&i.push("active"),this.dateWithinRange(t)||i.push("disabled"),this.dateIsDisabled(t)&&i.push("disabled","disabled-date"),-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),-1!==e.inArray(t.valueOf(),this.range)&&i.push("selected"),t.valueOf()===this.range[0]&&i.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,s,o,r,a,l){for(var d,h,c,u="",p=s/10,f=this.picker.find(i),g=Math.floor(o/s)*s,m=g+9*p,v=Math.floor(this.viewDate.getFullYear()/p)*p,y=e.map(this.dates,function(e){return Math.floor(e.getUTCFullYear()/p)*p}),b=g-p;b<=m+p;b+=p)d=[n],h=null,b===g-p?d.push("old"):b===m+p&&d.push("new"),-1!==e.inArray(b,y)&&d.push("active"),(b<r||b>a)&&d.push("disabled"),b===v&&d.push("focused"),l!==e.noop&&((c=l(new Date(b,0,1)))===t?c={}:"boolean"==typeof c?c={enabled:c}:"string"==typeof c&&(c={classes:c}),!1===c.enabled&&d.push("disabled"),c.classes&&(d=d.concat(c.classes.split(/\s+/))),c.tooltip&&(h=c.tooltip)),u+='<span class="'+d.join(" ")+'"'+(h?' title="'+h+'"':"")+">"+b+"</span>";f.find(".datepicker-switch").text(g+"-"+m),f.find("td").html(u)},fill:function(){var n,s,o=new Date(this.viewDate),r=o.getUTCFullYear(),a=o.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,d=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,u=m[this.o.language].today||m.en.today||"",p=m[this.o.language].clear||m.en.clear||"",f=m[this.o.language].titleFormat||m.en.titleFormat;if(!isNaN(r)&&!isNaN(a)){this.picker.find(".datepicker-days .datepicker-switch").text(v.formatDate(o,f,this.o.language)),this.picker.find("tfoot .today").text(u).css("display",!0===this.o.todayBtn||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(p).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var g=i(r,a,0),y=g.getUTCDate();g.setUTCDate(y-(g.getUTCDay()-this.o.weekStart+7)%7);var b=new Date(g);g.getUTCFullYear()<100&&b.setUTCFullYear(g.getUTCFullYear()),b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var w,_,C=[];g.valueOf()<b;){if((w=g.getUTCDay())===this.o.weekStart&&(C.push("<tr>"),this.o.calendarWeeks)){var x=new Date(+g+(this.o.weekStart-w-7)%7*864e5),S=new Date(Number(x)+(11-x.getUTCDay())%7*864e5),D=new Date(Number(D=i(S.getUTCFullYear(),0,1))+(11-D.getUTCDay())%7*864e5),k=(S-D)/864e5/7+1;C.push('<td class="cw">'+k+"</td>")}(_=this.getClassNames(g)).push("day");var $=g.getUTCDate();this.o.beforeShowDay!==e.noop&&((s=this.o.beforeShowDay(this._utc_to_local(g)))===t?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),!1===s.enabled&&_.push("disabled"),s.classes&&(_=_.concat(s.classes.split(/\s+/))),s.tooltip&&(n=s.tooltip),s.content&&($=s.content)),_=e.isFunction(e.uniqueSort)?e.uniqueSort(_):e.unique(_),C.push('<td class="'+_.join(" ")+'"'+(n?' title="'+n+'"':"")+' data-date="'+g.getTime().toString()+'">'+$+"</td>"),n=null,w===this.o.weekEnd&&C.push("</tr>"),g.setUTCDate(g.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(C.join(""));var N=m[this.o.language].monthsTitle||m.en.monthsTitle||"Months",T=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?N:r).end().find("tbody span").removeClass("active");if(e.each(this.dates,function(e,t){t.getUTCFullYear()===r&&T.eq(t.getUTCMonth()).addClass("active")}),(r<l||r>h)&&T.addClass("disabled"),r===l&&T.slice(0,d).addClass("disabled"),r===h&&T.slice(c+1).addClass("disabled"),this.o.beforeShowMonth!==e.noop){var M=this;e.each(T,function(i,n){var s=new Date(r,i,1),o=M.o.beforeShowMonth(s);o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||e(n).hasClass("disabled")||e(n).addClass("disabled"),o.classes&&e(n).addClass(o.classes),o.tooltip&&e(n).prop("title",o.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,r,l,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,r,l,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,r,l,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var e,t,i=new Date(this.viewDate),n=i.getUTCFullYear(),s=i.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,r=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,d=1;switch(this.viewMode){case 4:d*=10;case 3:d*=10;case 2:d*=10;case 1:e=Math.floor(n/d)*d<o,t=Math.floor(n/d)*d+d>a;break;case 0:e=n<=o&&s<r,t=n>=a&&s>l}this.picker.find(".prev").toggleClass("disabled",e),this.picker.find(".next").toggleClass("disabled",t)}},click:function(t){t.preventDefault(),t.stopPropagation();var s,o,r,a;(s=e(t.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),s.hasClass("today")&&!s.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),s.hasClass("clear")&&this.clearDates(),s.hasClass("disabled")||(s.hasClass("month")||s.hasClass("year")||s.hasClass("decade")||s.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(a=s.parent().find("span").index(s),r=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,r=Number(s.text()),this.viewDate.setUTCFullYear(r)),this._trigger(v.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(r,a,o)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var i=e(t.currentTarget).data("date"),n=new Date(i);this.o.updateViewDate&&(n.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),n.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(n)},navArrowsClick:function(t){var i=e(t.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(i*=12*v.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(v.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(e){var t=this.dates.contains(e);if(e||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(e)):this.dates.push(e),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(e,t){t&&"date"!==t||this._toggle_multidate(e&&new Date(e)),(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=e&&new Date(e)),this.fill(),this.setValue(),t&&"view"===t||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(e,t){var i=new Date(e);return i.setUTCDate(e.getUTCDate()+t),i},moveWeek:function(e,t){return this.moveDay(e,7*t)},moveMonth:function(e,t){if(!r(e))return this.o.defaultViewDate;if(!t)return e;var i,n,s=new Date(e.valueOf()),o=s.getUTCDate(),a=s.getUTCMonth(),l=Math.abs(t);if(t=t>0?1:-1,1===l)n=-1===t?function(){return s.getUTCMonth()===a}:function(){return s.getUTCMonth()!==i},i=a+t,s.setUTCMonth(i),i=(i+12)%12;else{for(var d=0;d<l;d++)s=this.moveMonth(s,t);i=s.getUTCMonth(),s.setUTCDate(o),n=function(){return i!==s.getUTCMonth()}}for(;n();)s.setUTCDate(--o),s.setUTCMonth(i);return s},moveYear:function(e,t){return this.moveMonth(e,12*t)},moveAvailableDate:function(e,t,i){do{if(e=this[i](e,t),!this.dateWithinRange(e))return!1;i="moveDay"}while(this.dateIsDisabled(e));return e},weekOfDateIsDisabled:function(t){return-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||e.grep(this.o.datesDisabled,function(e){return s(t,e)}).length>0},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":visible")){var t,i,n=!1,s=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault(),e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===e.keyCode||38===e.keyCode?-1:1,0===this.viewMode?e.ctrlKey?(i=this.moveAvailableDate(s,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):e.shiftKey?(i=this.moveAvailableDate(s,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===e.keyCode||39===e.keyCode?i=this.moveAvailableDate(s,t,"moveDay"):this.weekOfDateIsDisabled(s)||(i=this.moveAvailableDate(s,t,"moveWeek")):1===this.viewMode?(38!==e.keyCode&&40!==e.keyCode||(t*=4),i=this.moveAvailableDate(s,t,"moveMonth")):2===this.viewMode&&(38!==e.keyCode&&40!==e.keyCode||(t*=4),i=this.moveAvailableDate(s,t,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),e.preventDefault());break;case 13:if(!this.o.forceParse)break;s=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(s),n=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),e.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}n&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==e.keyCode&&27!==e.keyCode||(this.show(),e.stopPropagation())},setViewMode:function(e){this.viewMode=e,this.picker.children("div").hide().filter(".datepicker-"+v.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(t,i){e.data(t,"datepicker",this),this.element=e(t),this.inputs=e.map(i.inputs,function(e){return e.jquery?e[0]:e}),delete i.inputs,this.keepEmptyValues=i.keepEmptyValues,delete i.keepEmptyValues,p.call(e(this.inputs),i).on("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e.data(t,"datepicker")}),this.updateDates()};c.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,i){i.setRange(t)})},clearDates:function(){e.each(this.pickers,function(e,t){t.clearDates()})},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=e.data(i.target,"datepicker");if(n!==t){var s=n.getUTCDate(),o=this.keepEmptyValues,r=e.inArray(i.target,this.inputs),a=r-1,l=r+1,d=this.inputs.length;if(-1!==r){if(e.each(this.pickers,function(e,t){t.getUTCDate()||t!==n&&o||t.setUTCDate(s)}),s<this.dates[a])for(;a>=0&&s<this.dates[a];)this.pickers[a--].setUTCDate(s);else if(s>this.dates[l])for(;l<d&&s>this.dates[l];)this.pickers[l++].setUTCDate(s);this.updateDates(),delete this.updating}}}},destroy:function(){e.map(this.pickers,function(e){e.destroy()}),e(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var u=e.fn.datepicker,p=function(i){var n=Array.apply(null,arguments);n.shift();var s;if(this.each(function(){var t=e(this),o=t.data("datepicker"),r="object"==typeof i&&i;if(!o){var d=a(this,"date"),u=l(e.extend({},f,d,r).language),p=e.extend({},f,u,d,r);t.hasClass("input-daterange")||p.inputs?(e.extend(p,{inputs:p.inputs||t.find("input").toArray()}),o=new c(this,p)):o=new h(this,p),t.data("datepicker",o)}"string"==typeof i&&"function"==typeof o[i]&&(s=o[i].apply(o,n))}),s===t||s instanceof h||s instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return s};e.fn.datepicker=p;var f=e.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:e.noop,beforeShowMonth:e.noop,beforeShowYear:e.noop,beforeShowDecade:e.noop,beforeShowCentury:e.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0},g=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=h;var m=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],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"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},v={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(e){if("function"==typeof e.toValue&&"function"==typeof e.toDisplay)return e;var t=e.replace(this.validParts,"\0").split("\0"),i=e.match(this.validParts);if(!t||!t.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(i,s,o,r){function a(e,t){return!0===t&&(t=10),e<100&&(e+=2e3)>(new Date).getFullYear()+t&&(e-=100),e}function l(){var e=this.slice(0,d[p].length),t=d[p].slice(0,e.length);return e.toLowerCase()===t.toLowerCase()}if(!i)return t;if(i instanceof Date)return i;if("string"==typeof s&&(s=v.parseFormat(s)),s.toValue)return s.toValue(i,s,o);var d,c,u,p,f,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},y={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in y&&(i=y[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(d=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,p=0;p<d.length;p++)c=d[p].match(/([\-+]\d+)([dmwy])/i),u=Number(c[1]),f=g[c[2].toLowerCase()],i=h.prototype[f](i,u);return h.prototype._zero_utc_time(i)}d=i&&i.match(this.nonpunctuation)||[];var b,w,_={},C=["yyyy","yy","M","MM","m","mm","d","dd"],x={yyyy:function(e,t){return e.setUTCFullYear(r?a(t,r):t)},m:function(e,t){if(isNaN(e))return e;for(t-=1;t<0;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!==t;)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}};x.yy=x.yyyy,x.M=x.MM=x.mm=x.m,x.dd=x.d,i=n();var S=s.parts.slice();if(d.length!==S.length&&(S=e(S).filter(function(t,i){return-1!==e.inArray(i,C)}).toArray()),d.length===S.length){var D;for(p=0,D=S.length;p<D;p++){if(b=parseInt(d[p],10),c=S[p],isNaN(b))switch(c){case"MM":w=e(m[o].months).filter(l),b=e.inArray(w[0],m[o].months)+1;break;case"M":w=e(m[o].monthsShort).filter(l),b=e.inArray(w[0],m[o].monthsShort)+1}_[c]=b}var k,$;for(p=0;p<C.length;p++)($=C[p])in _&&!isNaN(_[$])&&(k=new Date(i),x[$](k,_[$]),isNaN(k)||(i=k))}return i},formatDate:function(t,i,n){if(!t)return"";if("string"==typeof i&&(i=v.parseFormat(i)),i.toDisplay)return i.toDisplay(t,i,n);var s={d:t.getUTCDate(),D:m[n].daysShort[t.getUTCDay()],DD:m[n].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:m[n].monthsShort[t.getUTCMonth()],MM:m[n].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,t=[];for(var o=e.extend([],i.separators),r=0,a=i.parts.length;r<=a;r++)o.length&&t.push(o.shift()),t.push(s[i.parts[r]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+f.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+f.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};v.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table></div></div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=u,this},e.fn.datepicker.version="1.8.0",e.fn.datepicker.deprecated=function(e){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+e)},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=e(this);i.data("datepicker")||(t.preventDefault(),p.call(i,"show"))}),e(function(){p.call(e('[data-provide="datepicker-inline"]'))})}),function(e,t,i,n){function s(t,i){this.element=e(t),this.settings=e.extend({},C,i),this._defaults=C,this._name=_,this.init()}function o(e){e.element.trigger("change")}function r(t){t.element.find("option").each(function(i,n){var s=e(n);void 0===s.data("original-index")&&s.data("original-index",t.elementCount++),void 0===s.data("_selected")&&s.data("_selected",!1)})}function a(t,i,n){t.element.find("option").each(function(s,o){var r=e(o);r.data("original-index")===i&&(r.prop("selected",n),n?(r.attr("data-sortindex",t.sortIndex),t.sortIndex++):r.removeAttr("data-sortindex"))})}function l(e,t){return e.replace(/\{(\d+)\}/g,function(e,i){return void 0!==t[i]?t[i]:e})}function d(e){if(e.settings.infoText){var t=e.elements.select1.find("option").length,i=e.elements.select2.find("option").length,n=e.element.find("option").length-e.selectedElements,s=e.selectedElements,o="";o=0===n?e.settings.infoTextEmpty:t===n?l(e.settings.infoText,[t,n]):l(e.settings.infoTextFiltered,[t,n]),e.elements.info1.html(o),e.elements.box1.toggleClass("filtered",!(t===n||0===n)),o=0===s?e.settings.infoTextEmpty:i===s?l(e.settings.infoText,[i,s]):l(e.settings.infoTextFiltered,[i,s]),e.elements.info2.html(o),e.elements.box2.toggleClass("filtered",!(i===s||0===s))}}function h(t){t.selectedElements=0,t.elements.select1.empty(),t.elements.select2.empty(),t.element.find("option").each(function(i,n){var s=e(n);s.prop("selected")?(t.selectedElements++,t.elements.select2.append(s.clone(!0).prop("selected",s.data("_selected")))):t.elements.select1.append(s.clone(!0).prop("selected",s.data("_selected")))}),t.settings.showFilterInputs&&(c(t,1),c(t,2)),d(t)}function c(t,i){if(t.settings.showFilterInputs){u(t,i),t.elements["select"+i].empty().scrollTop(0);var n=new RegExp(e.trim(t.elements["filterInput"+i].val()),"gi"),s=t.element.find("option"),o=t.element;(o=1===i?s.not(":selected"):o.find("option:selected")).each(function(o,r){var a=e(r),l=!0;(r.text.match(n)||t.settings.filterOnValues&&a.attr("value").match(n))&&(l=!1,t.elements["select"+i].append(a.clone(!0).prop("selected",a.data("_selected")))),s.eq(a.data("original-index")).data("filtered"+i,l)}),d(t)}}function u(t,i){var n=t.element.find("option");t.elements["select"+i].find("option").each(function(t,i){var s=e(i);n.eq(s.data("original-index")).data("_selected",s.prop("selected"))})}function p(e){var t=e.children("option");t.sort(function(e,t){var i=parseInt(e.getAttribute("data-sortindex")),n=parseInt(t.getAttribute("data-sortindex"));return i>n?1:i<n?-1:0}),t.detach().appendTo(e)}function f(t){t.find("option").sort(function(t,i){return e(t).data("original-index")>e(i).data("original-index")?1:-1}).appendTo(t)}function g(e){e.elements.select1.find("option").each(function(){e.element.find("option").data("_selected",!1)})}function m(t){"all"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect?"moved"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect||u(t,1):(u(t,1),u(t,2)),t.elements.select1.find("option:selected").each(function(i,n){var s=e(n);s.data("filtered1")||a(t,s.data("original-index"),!0)}),h(t),o(t),t.settings.sortByInputOrder?p(t.elements.select2):f(t.elements.select2)}function v(t){"all"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect?"moved"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect||u(t,2):(u(t,1),u(t,2)),t.elements.select2.find("option:selected").each(function(i,n){var s=e(n);s.data("filtered2")||a(t,s.data("original-index"),!1)}),h(t),o(t),f(t.elements.select1),t.settings.sortByInputOrder&&p(t.elements.select2)}function y(t){"all"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect?"moved"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect||u(t,1):(u(t,1),u(t,2)),t.element.find("option").each(function(i,n){var s=e(n);s.data("filtered1")||(s.prop("selected",!0),s.attr("data-sortindex",t.sortIndex),t.sortIndex++)}),h(t),o(t)}function b(t){"all"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect?"moved"!==t.settings.preserveSelectionOnMove||t.settings.moveOnSelect||u(t,2):(u(t,1),u(t,2)),t.element.find("option").each(function(t,i){var n=e(i);n.data("filtered2")||(n.prop("selected",!1),n.removeAttr("data-sortindex"))}),h(t),o(t)}function w(e){e.elements.form.submit(function(t){e.elements.filterInput1.is(":focus")?(t.preventDefault(),e.elements.filterInput1.focusout()):e.elements.filterInput2.is(":focus")&&(t.preventDefault(),e.elements.filterInput2.focusout())}),e.element.on("bootstrapDualListbox.refresh",function(t,i){e.refresh(i)}),e.elements.filterClear1.on("click",function(){e.setNonSelectedFilter("",!0)}),e.elements.filterClear2.on("click",function(){e.setSelectedFilter("",!0)}),!1===e.settings.eventMoveOverride&&e.elements.moveButton.on("click",function(){m(e)}),!1===e.settings.eventMoveAllOverride&&e.elements.moveAllButton.on("click",function(){y(e)}),!1===e.settings.eventRemoveOverride&&e.elements.removeButton.on("click",function(){v(e)}),!1===e.settings.eventRemoveAllOverride&&e.elements.removeAllButton.on("click",function(){b(e)}),e.elements.filterInput1.on("change keyup",function(){c(e,1)}),e.elements.filterInput2.on("change keyup",function(){c(e,2)})}var _="bootstrapDualListbox",C={bootstrap2Compatible:!1,filterTextClear:"show all",filterPlaceHolder:"Filter",moveSelectedLabel:"Move selected",moveAllLabel:"Move all",removeSelectedLabel:"Remove selected",removeAllLabel:"Remove all",moveOnSelect:!0,preserveSelectionOnMove:!1,selectedListLabel:!1,nonSelectedListLabel:!1,helperSelectNamePostfix:"_helper",selectorMinimalHeight:100,showFilterInputs:!0,nonSelectedFilter:"",selectedFilter:"",infoText:"Showing all {0}",infoTextFiltered:'<span class="label label-warning">Filtered</span> {0} from {1}',infoTextEmpty:"Empty list",filterOnValues:!1,sortByInputOrder:!1,eventMoveOverride:!1,eventMoveAllOverride:!1,eventRemoveOverride:!1,eventRemoveAllOverride:!1},x=/android/i.test(navigator.userAgent.toLowerCase());s.prototype={init:function(){this.container=e('<div class="bootstrap-duallistbox-container"> <div class="box1">   <label></label>   <span class="info-container">     <span class="info"></span>     <button type="button" class="btn clear1 pull-right"></button>   </span>   <input class="filter" type="text">   <div class="btn-group buttons">     <button type="button" class="btn moveall">       <i></i>       <i></i>     </button>     <button type="button" class="btn move">       <i></i>     </button>   </div>   <select multiple="multiple"></select> </div> <div class="box2">   <label></label>   <span class="info-container">     <span class="info"></span>     <button type="button" class="btn clear2 pull-right"></button>   </span>   <input class="filter" type="text">   <div class="btn-group buttons">     <button type="button" class="btn remove">       <i></i>     </button>     <button type="button" class="btn removeall">       <i></i>       <i></i>     </button>   </div>   <select multiple="multiple"></select> </div></div>').insertBefore(this.element),this.elements={originalSelect:this.element,box1:e(".box1",this.container),box2:e(".box2",this.container),filterInput1:e(".box1 .filter",this.container),filterInput2:e(".box2 .filter",this.container),filterClear1:e(".box1 .clear1",this.container),filterClear2:e(".box2 .clear2",this.container),label1:e(".box1 > label",this.container),label2:e(".box2 > label",this.container),info1:e(".box1 .info",this.container),info2:e(".box2 .info",this.container),select1:e(".box1 select",this.container),select2:e(".box2 select",this.container),moveButton:e(".box1 .move",this.container),removeButton:e(".box2 .remove",this.container),moveAllButton:e(".box1 .moveall",this.container),removeAllButton:e(".box2 .removeall",this.container),form:e(e(".box1 .filter",this.container)[0].form)},this.originalSelectName=this.element.attr("name")||"";var t="bootstrap-duallistbox-nonselected-list_"+this.originalSelectName,i="bootstrap-duallistbox-selected-list_"+this.originalSelectName;return this.elements.select1.attr("id",t),this.elements.select2.attr("id",i),this.elements.label1.attr("for",t),this.elements.label2.attr("for",i),this.selectedElements=0,this.sortIndex=0,this.elementCount=0,this.setBootstrap2Compatible(this.settings.bootstrap2Compatible),this.setFilterTextClear(this.settings.filterTextClear),this.setFilterPlaceHolder(this.settings.filterPlaceHolder),this.setMoveSelectedLabel(this.settings.moveSelectedLabel),this.setMoveAllLabel(this.settings.moveAllLabel),this.setRemoveSelectedLabel(this.settings.removeSelectedLabel),this.setRemoveAllLabel(this.settings.removeAllLabel),this.setMoveOnSelect(this.settings.moveOnSelect),this.setPreserveSelectionOnMove(this.settings.preserveSelectionOnMove),this.setSelectedListLabel(this.settings.selectedListLabel),this.setNonSelectedListLabel(this.settings.nonSelectedListLabel),this.setHelperSelectNamePostfix(this.settings.helperSelectNamePostfix),this.setSelectOrMinimalHeight(this.settings.selectorMinimalHeight),r(this),this.setShowFilterInputs(this.settings.showFilterInputs),this.setNonSelectedFilter(this.settings.nonSelectedFilter),this.setSelectedFilter(this.settings.selectedFilter),this.setInfoText(this.settings.infoText),this.setInfoTextFiltered(this.settings.infoTextFiltered),this.setInfoTextEmpty(this.settings.infoTextEmpty),this.setFilterOnValues(this.settings.filterOnValues),this.setSortByInputOrder(this.settings.sortByInputOrder),this.setEventMoveOverride(this.settings.eventMoveOverride),this.setEventMoveAllOverride(this.settings.eventMoveAllOverride),this.setEventRemoveOverride(this.settings.eventRemoveOverride),this.setEventRemoveAllOverride(this.settings.eventRemoveAllOverride),this.element.hide(),w(this),h(this),this.element},setBootstrap2Compatible:function(e,t){return this.settings.bootstrap2Compatible=e,e?(this.container.removeClass("row").addClass("row-fluid bs2compatible"),this.container.find(".box1, .box2").removeClass("col-md-6").addClass("span6"),this.container.find(".clear1, .clear2").removeClass("btn-default btn-xs").addClass("btn-mini"),this.container.find("input, select").removeClass("form-control"),this.container.find(".btn").removeClass("btn-default"),this.container.find(".moveall > i, .move > i").removeClass("glyphicon glyphicon-arrow-right").addClass("icon-arrow-right"),this.container.find(".removeall > i, .remove > i").removeClass("glyphicon glyphicon-arrow-left").addClass("icon-arrow-left")):(this.container.removeClass("row-fluid bs2compatible").addClass("row"),this.container.find(".box1, .box2").removeClass("span6").addClass("col-md-6"),this.container.find(".clear1, .clear2").removeClass("btn-mini").addClass("btn-default btn-xs"),this.container.find("input, select").addClass("form-control"),this.container.find(".btn").addClass("btn-default"),this.container.find(".moveall > i, .move > i").removeClass("icon-arrow-right").addClass("glyphicon glyphicon-arrow-right"),this.container.find(".removeall > i, .remove > i").removeClass("icon-arrow-left").addClass("glyphicon glyphicon-arrow-left")),t&&h(this),this.element},setFilterTextClear:function(e,t){return this.settings.filterTextClear=e,this.elements.filterClear1.html(e),this.elements.filterClear2.html(e),t&&h(this),this.element},setFilterPlaceHolder:function(e,t){return this.settings.filterPlaceHolder=e,this.elements.filterInput1.attr("placeholder",e),this.elements.filterInput2.attr("placeholder",e),t&&h(this),this.element},setMoveSelectedLabel:function(e,t){return this.settings.moveSelectedLabel=e,this.elements.moveButton.attr("title",e),t&&h(this),this.element},setMoveAllLabel:function(e,t){return this.settings.moveAllLabel=e,this.elements.moveAllButton.attr("title",e),t&&h(this),this.element},setRemoveSelectedLabel:function(e,t){return this.settings.removeSelectedLabel=e,this.elements.removeButton.attr("title",e),t&&h(this),this.element},setRemoveAllLabel:function(e,t){return this.settings.removeAllLabel=e,this.elements.removeAllButton.attr("title",e),t&&h(this),this.element},setMoveOnSelect:function(e,t){if(x&&(e=!0),this.settings.moveOnSelect=e,this.settings.moveOnSelect){this.container.addClass("moveonselect");var i=this;this.elements.select1.on("change",function(){m(i)}),this.elements.select2.on("change",function(){v(i)})}else this.container.removeClass("moveonselect"),this.elements.select1.off("change"),this.elements.select2.off("change");return t&&h(this),this.element},setPreserveSelectionOnMove:function(e,t){return x&&(e=!1),this.settings.preserveSelectionOnMove=e,t&&h(this),this.element},setSelectedListLabel:function(e,t){return this.settings.selectedListLabel=e,e?this.elements.label2.show().html(e):this.elements.label2.hide().html(e),t&&h(this),this.element},setNonSelectedListLabel:function(e,t){return this.settings.nonSelectedListLabel=e,e?this.elements.label1.show().html(e):this.elements.label1.hide().html(e),t&&h(this),this.element},setHelperSelectNamePostfix:function(e,t){return this.settings.helperSelectNamePostfix=e,e?(this.elements.select1.attr("name",this.originalSelectName+e+"1"),this.elements.select2.attr("name",this.originalSelectName+e+"2")):(this.elements.select1.removeAttr("name"),this.elements.select2.removeAttr("name")),t&&h(this),this.element},setSelectOrMinimalHeight:function(e,t){this.settings.selectorMinimalHeight=e;var i=this.element.height();return this.element.height()<e&&(i=e),this.elements.select1.height(i),this.elements.select2.height(i),t&&h(this),this.element},setShowFilterInputs:function(e,t){return e?(this.elements.filterInput1.show(),this.elements.filterInput2.show()):(this.setNonSelectedFilter(""),this.setSelectedFilter(""),h(this),this.elements.filterInput1.hide(),this.elements.filterInput2.hide()),this.settings.showFilterInputs=e,t&&h(this),this.element},setNonSelectedFilter:function(e,t){if(this.settings.showFilterInputs)return this.settings.nonSelectedFilter=e,this.elements.filterInput1.val(e),t&&h(this),this.element},setSelectedFilter:function(e,t){if(this.settings.showFilterInputs)return this.settings.selectedFilter=e,this.elements.filterInput2.val(e),t&&h(this),this.element},setInfoText:function(e,t){return this.settings.infoText=e,t&&h(this),this.element},setInfoTextFiltered:function(e,t){return this.settings.infoTextFiltered=e,t&&h(this),this.element},setInfoTextEmpty:function(e,t){return this.settings.infoTextEmpty=e,t&&h(this),this.element},setFilterOnValues:function(e,t){return this.settings.filterOnValues=e,t&&h(this),this.element},setSortByInputOrder:function(e,t){return this.settings.sortByInputOrder=e,t&&h(this),this.element},setEventMoveOverride:function(e,t){return this.settings.eventMoveOverride=e,t&&h(this),this.element},setEventMoveAllOverride:function(e,t){return this.settings.eventMoveAllOverride=e,t&&h(this),this.element},setEventRemoveOverride:function(e,t){return this.settings.eventRemoveOverride=e,t&&h(this),this.element},setEventRemoveAllOverride:function(e,t){return this.settings.eventRemoveAllOverride=e,t&&h(this),this.element},getContainer:function(){return this.container},refresh:function(e){r(this),e?g(this):(u(this,1),u(this,2)),h(this)},destroy:function(){return this.container.remove(),this.element.show(),e.data(this,"plugin_"+_,null),this.element}},e.fn[_]=function(t){var i=arguments;if(void 0===t||"object"==typeof t)return this.each(function(){e(this).is("select")?e.data(this,"plugin_"+_)||e.data(this,"plugin_"+_,new s(this,t)):e(this).find("select").each(function(i,n){e(n).bootstrapDualListbox(t)})});if("string"==typeof t&&"_"!==t[0]&&"init"!==t){var n;return this.each(function(){var o=e.data(this,"plugin_"+_);o instanceof s&&"function"==typeof o[t]&&(n=o[t].apply(o,Array.prototype.slice.call(i,1)))}),void 0!==n?n:this}}}(jQuery,window,document),function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(0,function(e){!function(e){"use strict";function t(t){var i=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return e.each(i,function(){t=t.replace(this.re,this.ch)}),t}function i(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i="(?:"+Object.keys(t).join("|")+")",n=new RegExp(i),s=new RegExp(i,"g"),o=null==e?"":""+e;return n.test(o)?o.replace(s,function(e){return t[e]}):o}function n(t,i){var n=arguments,o=t,r=i;[].shift.apply(n);var a,l=this.each(function(){var t=e(this);if(t.is("select")){var i=t.data("selectpicker"),l="object"==typeof o&&o;if(i){if(l)for(var d in l)l.hasOwnProperty(d)&&(i.options[d]=l[d])}else{var h=e.extend({},s.DEFAULTS,e.fn.selectpicker.defaults||{},t.data(),l);h.template=e.extend({},s.DEFAULTS.template,e.fn.selectpicker.defaults?e.fn.selectpicker.defaults.template:{},t.data().template,l.template),t.data("selectpicker",i=new s(this,h,r))}"string"==typeof o&&(a=i[o]instanceof Function?i[o].apply(i,n):i.options[o])}});return void 0!==a?a:l}String.prototype.includes||function(){var e={}.toString,t=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),i="".indexOf,n=function(t){if(null==this)throw new TypeError;var n=String(this);if(t&&"[object RegExp]"==e.call(t))throw new TypeError;var s=n.length,o=String(t),r=o.length,a=arguments.length>1?arguments[1]:void 0,l=a?Number(a):0;return l!=l&&(l=0),!(r+Math.min(Math.max(l,0),s)>s)&&-1!=i.call(n,o,l)};t?t(String.prototype,"includes",{value:n,configurable:!0,writable:!0}):String.prototype.includes=n}(),String.prototype.startsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),t={}.toString,i=function(e){if(null==this)throw new TypeError;var i=String(this);if(e&&"[object RegExp]"==t.call(e))throw new TypeError;var n=i.length,s=String(e),o=s.length,r=arguments.length>1?arguments[1]:void 0,a=r?Number(r):0;a!=a&&(a=0);var l=Math.min(Math.max(a,0),n);if(o+l>n)return!1;for(var d=-1;++d<o;)if(i.charCodeAt(l+d)!=s.charCodeAt(d))return!1;return!0};e?e(String.prototype,"startsWith",{value:i,configurable:!0,writable:!0}):String.prototype.startsWith=i}(),Object.keys||(Object.keys=function(e,t,i){i=[];for(t in e)i.hasOwnProperty.call(e,t)&&i.push(t);return i}),e.fn.triggerNative=function(e){var t,i=this[0];i.dispatchEvent?("function"==typeof Event?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),i.dispatchEvent(t)):(i.fireEvent&&((t=document.createEventObject()).eventType=e,i.fireEvent("on"+e,t)),this.trigger(e))},e.expr[":"].icontains=function(t,i,n){var s=e(t);return(s.data("tokens")||s.text()).toUpperCase().includes(n[3].toUpperCase())},e.expr[":"].ibegins=function(t,i,n){var s=e(t);return(s.data("tokens")||s.text()).toUpperCase().startsWith(n[3].toUpperCase())},e.expr[":"].aicontains=function(t,i,n){var s=e(t);return(s.data("tokens")||s.data("normalizedText")||s.text()).toUpperCase().includes(n[3].toUpperCase())},e.expr[":"].aibegins=function(t,i,n){var s=e(t);return(s.data("tokens")||s.data("normalizedText")||s.text()).toUpperCase().startsWith(n[3].toUpperCase())};var s=function(t,i,n){n&&(n.stopPropagation(),n.preventDefault()),this.$element=e(t),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=i,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=s.prototype.val,this.render=s.prototype.render,this.refresh=s.prototype.refresh,this.setStyle=s.prototype.setStyle,this.selectAll=s.prototype.selectAll,this.deselectAll=s.prototype.deselectAll,this.destroy=s.prototype.destroy,this.remove=s.prototype.remove,this.show=s.prototype.show,this.hide=s.prototype.hide,this.init()};s.VERSION="1.7.7",s.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(e,t){return 1==e?"{0} item selected":"{0} items selected"},maxOptionsText:function(e,t){return[1==e?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},s.prototype={constructor:s,init:function(){var t=this,i=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),void 0!==i&&(this.$button.attr("data-id",i),e('label[for="'+i+'"]').click(function(e){e.preventDefault(),t.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){t.$element.trigger("hide.bs.select",e)},"hidden.bs.dropdown":function(e){t.$element.trigger("hidden.bs.select",e)},"show.bs.dropdown":function(e){t.$element.trigger("show.bs.select",e)},"shown.bs.dropdown":function(e){t.$element.trigger("shown.bs.select",e)}}),setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple?" show-tick":"",n=this.$element.parent().hasClass("input-group")?" input-group-btn":"",s=this.autofocus?" autofocus":"",o=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"",r=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+i(this.options.liveSearchPlaceholder)+'"')+"></div>":"",a=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"</button></div></div>":"",l=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"</button></div></div>":"",d='<div class="btn-group bootstrap-select'+t+n+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+s+'><span class="filter-option pull-left"></span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open">'+o+r+a+'<ul class="dropdown-menu inner" role="menu"></ul>'+l+"</div></div>";return e(d)},createView:function(){var e=this.createDropdown(),t=this.createLi();return e.find("ul")[0].innerHTML=t,e},reloadLi:function(){this.destroyLi();var e=this.createLi();this.$menuInner[0].innerHTML=e},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var n=this,s=[],o=0,r=document.createElement("option"),a=-1,l=function(e,t,i,n){return"<li"+(void 0!==i&""!==i?' class="'+i+'"':"")+(void 0!==t&null!==t?' data-original-index="'+t+'"':"")+(void 0!==n&null!==n?'data-optgroup="'+n+'"':"")+">"+e+"</li>"},d=function(e,s,o,r){return'<a tabindex="0"'+(void 0!==s?' class="'+s+'"':"")+(void 0!==o?' style="'+o+'"':"")+(n.options.liveSearchNormalize?' data-normalized-text="'+t(i(e))+'"':"")+(void 0!==r||null!==r?' data-tokens="'+r+'"':"")+">"+e+'<span class="'+n.options.iconBase+" "+n.options.tickIcon+' check-mark"></span></a>'};if(this.options.title&&!this.multiple&&(a--,!this.$element.find(".bs-title-option").length)){var h=this.$element[0];r.className="bs-title-option",r.appendChild(document.createTextNode(this.options.title)),r.value="",h.insertBefore(r,h.firstChild),void 0===e(h.options[h.selectedIndex]).attr("selected")&&(r.selected=!0)}return this.$element.find("option").each(function(t){var i=e(this);if(a++,!i.hasClass("bs-title-option")){var r=this.className||"",h=this.style.cssText,c=i.data("content")?i.data("content"):i.html(),u=i.data("tokens")?i.data("tokens"):null,p=void 0!==i.data("subtext")?'<small class="text-muted">'+i.data("subtext")+"</small>":"",f=void 0!==i.data("icon")?'<span class="'+n.options.iconBase+" "+i.data("icon")+'"></span> ':"",g=this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled;if(""!==f&&g&&(f="<span>"+f+"</span>"),n.options.hideDisabled&&g)a--;else{if(i.data("content")||(c=f+'<span class="text">'+c+p+"</span>"),"OPTGROUP"===this.parentNode.tagName&&!0!==i.data("divider")){var m=" "+this.parentNode.className||"";if(0===i.index()){o+=1;var v=this.parentNode.label,y=void 0!==i.parent().data("subtext")?'<small class="text-muted">'+i.parent().data("subtext")+"</small>":"";v=(i.parent().data("icon")?'<span class="'+n.options.iconBase+" "+i.parent().data("icon")+'"></span> ':"")+'<span class="text">'+v+y+"</span>",0!==t&&s.length>0&&(a++,s.push(l("",null,"divider",o+"div"))),a++,s.push(l(v,null,"dropdown-header"+m,o))}s.push(l(d(c,"opt "+r+m,h,u),t,"",o))}else!0===i.data("divider")?s.push(l("",t,"divider")):!0===i.data("hidden")?s.push(l(d(c,r,h,u),t,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(a++,s.push(l("",null,"divider",o+"div"))),s.push(l(d(c,r,h,u),t)));n.liObj[t]=a}}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),s.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(t){var i,n=this;!1!==t&&this.$element.find("option").each(function(e){var t=n.findLis().eq(n.liObj[e]);n.setDisabled(e,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,t),n.setSelected(e,this.selected,t)}),this.tabIndex();var s=this.$element.find("option").map(function(){if(this.selected){if(n.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var t,i=e(this),s=i.data("icon")&&n.options.showIcon?'<i class="'+n.options.iconBase+" "+i.data("icon")+'"></i> ':"";return t=n.options.showSubtext&&i.data("subtext")&&!n.multiple?' <small class="text-muted">'+i.data("subtext")+"</small>":"",void 0!==i.attr("title")?i.attr("title"):i.data("content")&&n.options.showContent?i.data("content"):s+i.html()+t}}).toArray(),o=this.multiple?s.join(this.options.multipleSeparator):s[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var r=this.options.selectedTextFormat.split(">");if(r.length>1&&s.length>r[1]||1==r.length&&s.length>=2){i=this.options.hideDisabled?", [disabled]":"";var a=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+i).length;o=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(s.length,a):this.options.countSelectedText).replace("{0}",s.length.toString()).replace("{1}",a.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(o=this.options.title),o||(o=void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",e.trim(o.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(o),this.$element.trigger("rendered.bs.select")},setStyle:function(e,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=e||this.options.style;"add"==t?this.$button.addClass(i):"remove"==t?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(t){if(t||!1!==this.options.size&&!this.sizeInfo){var i=document.createElement("div"),n=document.createElement("div"),s=document.createElement("ul"),o=document.createElement("li"),r=document.createElement("li"),a=document.createElement("a"),l=document.createElement("span"),d=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,h=this.options.liveSearch?document.createElement("div"):null,c=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,u=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(l.className="text",i.className=this.$menu[0].parentNode.className+" open",n.className="dropdown-menu open",s.className="dropdown-menu inner",o.className="divider",l.appendChild(document.createTextNode("Inner text")),a.appendChild(l),r.appendChild(a),s.appendChild(r),s.appendChild(o),d&&n.appendChild(d),h){var p=document.createElement("span");h.className="bs-searchbox",p.className="form-control",h.appendChild(p),n.appendChild(h)}c&&n.appendChild(c),n.appendChild(s),u&&n.appendChild(u),i.appendChild(n),document.body.appendChild(i);var f=a.offsetHeight,g=d?d.offsetHeight:0,m=h?h.offsetHeight:0,v=c?c.offsetHeight:0,y=u?u.offsetHeight:0,b=e(o).outerHeight(!0),w="function"==typeof getComputedStyle&&getComputedStyle(n),_=w?null:e(n),C=parseInt(w?w.paddingTop:_.css("paddingTop"))+parseInt(w?w.paddingBottom:_.css("paddingBottom"))+parseInt(w?w.borderTopWidth:_.css("borderTopWidth"))+parseInt(w?w.borderBottomWidth:_.css("borderBottomWidth")),x=C+parseInt(w?w.marginTop:_.css("marginTop"))+parseInt(w?w.marginBottom:_.css("marginBottom"))+2;document.body.removeChild(i),this.sizeInfo={liHeight:f,headerHeight:g,searchHeight:m,actionsHeight:v,doneButtonHeight:y,dividerHeight:b,menuPadding:C,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var t,i,n,s,o=this,r=this.$menu,a=this.$menuInner,l=e(window),d=this.$newElement[0].offsetHeight,h=this.sizeInfo.liHeight,c=this.sizeInfo.headerHeight,u=this.sizeInfo.searchHeight,p=this.sizeInfo.actionsHeight,f=this.sizeInfo.doneButtonHeight,g=this.sizeInfo.dividerHeight,m=this.sizeInfo.menuPadding,v=this.sizeInfo.menuExtras,y=this.options.hideDisabled?".disabled":"",b=function(){n=o.$newElement.offset().top-l.scrollTop(),s=l.height()-n-d};if(b(),"auto"===this.options.size){var w=function(){var l,d=function(t,i){return function(n){return i?n.classList?n.classList.contains(t):e(n).hasClass(t):!(n.classList?n.classList.contains(t):e(n).hasClass(t))}},g=o.$menuInner[0].getElementsByTagName("li"),y=Array.prototype.filter?Array.prototype.filter.call(g,d("hidden",!1)):o.$lis.not(".hidden"),w=Array.prototype.filter?Array.prototype.filter.call(y,d("dropdown-header",!0)):y.filter(".dropdown-header");b(),t=s-v,o.options.container?(r.data("height")||r.data("height",r.height()),i=r.data("height")):i=r.height(),o.options.dropupAuto&&o.$newElement.toggleClass("dropup",n>s&&t-v<i),o.$newElement.hasClass("dropup")&&(t=n-v),l=y.length+w.length>3?3*h+v-2:0,r.css({"max-height":t+"px",overflow:"hidden","min-height":l+c+u+p+f+"px"}),a.css({"max-height":t-c-u-p-f-m+"px","overflow-y":"auto","min-height":Math.max(l-m,0)+"px"})};w(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",w),l.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",w)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(y).length>this.options.size){var _=this.$lis.not(".divider").not(y).children().slice(0,this.options.size).last().parent().index(),C=this.$lis.slice(0,_+1).filter(".divider").length;t=h*this.options.size+C*g+m,o.options.container?(r.data("height")||r.data("height",r.height()),i=r.data("height")):i=r.height(),o.options.dropupAuto&&this.$newElement.toggleClass("dropup",n>s&&t-v<i),r.css({"max-height":t+c+u+p+f+"px",overflow:"hidden","min-height":""}),a.css({"max-height":t-m+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var e=this.$menu.parent().clone().appendTo("body"),t=this.options.container?this.$newElement.clone().appendTo("body"):e,i=e.children(".dropdown-menu").outerWidth(),n=t.css("width","auto").children("button").outerWidth();e.remove(),t.remove(),this.$newElement.css("width",Math.max(i,n)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=e('<div class="bs-container" />');var t,i,n=this,s=function(e){n.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",e.hasClass("dropup")),t=e.offset(),i=e.hasClass("dropup")?0:e[0].offsetHeight,n.$bsContainer.css({top:t.top+i,left:t.left,width:e[0].offsetWidth})};this.$newElement.on("click",function(){var t=e(this);n.isDisabled()||(s(t),n.$bsContainer.appendTo(n.options.container).toggleClass("open",!t.hasClass("open")).append(n.$menu))}),e(window).on("resize scroll",function(){s(n.$newElement)}),this.$element.on("hide.bs.select",function(){n.$menu.data("height",n.$menu.height()),n.$bsContainer.detach()})},setSelected:function(e,t,i){i||(i=this.findLis().eq(this.liObj[e])),i.toggleClass("selected",t)},setDisabled:function(e,t,i){i||(i=this.findLis().eq(this.liObj[e])),t?i.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):i.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var e=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!e.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var t=this,i=e(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(e){e.stopPropagation()}),i.data("spaceSelect",!1),this.$button.on("keyup",function(e){/(32)/.test(e.keyCode.toString(10))&&i.data("spaceSelect")&&(e.preventDefault(),i.data("spaceSelect",!1))}),this.$newElement.on("click",function(){t.setSize(),t.$element.on("shown.bs.select",function(){if(t.options.liveSearch||t.multiple){if(!t.multiple){var e=t.liObj[t.$element[0].selectedIndex];if("number"!=typeof e||!1===t.options.size)return;var i=t.$lis.eq(e)[0].offsetTop-t.$menuInner[0].offsetTop;i=i-t.$menuInner[0].offsetHeight/2+t.sizeInfo.liHeight/2,t.$menuInner[0].scrollTop=i}}else t.$menuInner.find(".selected a").focus()})}),this.$menuInner.on("click","li a",function(i){var n=e(this),s=n.parent().data("originalIndex"),o=t.$element.val(),r=t.$element.prop("selectedIndex");if(t.multiple&&i.stopPropagation(),i.preventDefault(),!t.isDisabled()&&!n.parent().hasClass("disabled")){var a=t.$element.find("option"),l=a.eq(s),d=l.prop("selected"),h=l.parent("optgroup"),c=t.options.maxOptions,u=h.data("maxOptions")||!1;if(t.multiple){if(l.prop("selected",!d),t.setSelected(s,!d),n.blur(),!1!==c||!1!==u){var p=c<a.filter(":selected").length,f=u<h.find("option:selected").length;if(c&&p||u&&f)if(c&&1==c)a.prop("selected",!1),l.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(s,!0);else if(u&&1==u){h.find("option:selected").prop("selected",!1),l.prop("selected",!0);var g=n.parent().data("optgroup");t.$menuInner.find('[data-optgroup="'+g+'"]').removeClass("selected"),t.setSelected(s,!0)}else{var m="function"==typeof t.options.maxOptionsText?t.options.maxOptionsText(c,u):t.options.maxOptionsText,v=m[0].replace("{n}",c),y=m[1].replace("{n}",u),b=e('<div class="notify"></div>');m[2]&&(v=v.replace("{var}",m[2][c>1?0:1]),y=y.replace("{var}",m[2][u>1?0:1])),l.prop("selected",!1),t.$menu.append(b),c&&p&&(b.append(e("<div>"+v+"</div>")),t.$element.trigger("maxReached.bs.select")),u&&f&&(b.append(e("<div>"+y+"</div>")),t.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){t.setSelected(s,!1)},10),b.delay(750).fadeOut(300,function(){e(this).remove()})}}}else a.prop("selected",!1),l.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(s,!0);t.multiple?t.options.liveSearch&&t.$searchbox.focus():t.$button.focus(),(o!=t.$element.val()&&t.multiple||r!=t.$element.prop("selectedIndex")&&!t.multiple)&&(t.$element.triggerNative("change"),t.$element.trigger("changed.bs.select",[s,l.prop("selected"),d]))}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),t.options.liveSearch&&!e(i.target).hasClass("close")?t.$searchbox.focus():t.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),t.options.liveSearch?t.$searchbox.focus():t.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){t.$button.click()}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(i){t.options.liveSearch?t.$searchbox.focus():t.$button.focus(),i.preventDefault(),i.stopPropagation(),e(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll(),t.$element.triggerNative("change")}),this.$element.change(function(){t.render(!1)})},liveSearchListener:function(){var n=this,s=e('<li class="no-results"></li>');this.$newElement.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){n.$menuInner.find(".active").removeClass("active"),n.$searchbox.val()&&(n.$searchbox.val(""),n.$lis.not(".is-hidden").removeClass("hidden"),s.parent().length&&s.remove()),n.multiple||n.$menuInner.find(".selected").addClass("active"),setTimeout(function(){n.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(n.$searchbox.val()){var o=n.$lis.not(".is-hidden").removeClass("hidden").children("a");(o=n.options.liveSearchNormalize?o.not(":a"+n._searchStyle()+'("'+t(n.$searchbox.val())+'")'):o.not(":"+n._searchStyle()+'("'+n.$searchbox.val()+'")')).parent().addClass("hidden"),n.$lis.filter(".dropdown-header").each(function(){var t=e(this),i=t.data("optgroup");0===n.$lis.filter("[data-optgroup="+i+"]").not(t).not(".hidden").length&&(t.addClass("hidden"),n.$lis.filter("[data-optgroup="+i+"div]").addClass("hidden"))});var r=n.$lis.not(".hidden");r.each(function(t){var i=e(this);i.hasClass("divider")&&(i.index()===r.first().index()||i.index()===r.last().index()||r.eq(t+1).hasClass("divider"))&&i.addClass("hidden")}),n.$lis.not(".hidden, .no-results").length?s.parent().length&&s.remove():(s.parent().length&&s.remove(),s.html(n.options.noneResultsText.replace("{0}",'"'+i(n.$searchbox.val())+'"')).show(),n.$menuInner.append(s))}else n.$lis.not(".is-hidden").removeClass("hidden"),s.parent().length&&s.remove();n.$lis.filter(".active").removeClass("active"),n.$searchbox.val()&&n.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),e(this).focus()})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(e){return void 0!==e?(this.$element.val(e),this.render(),this.$element):this.$element.val()},changeAll:function(t){void 0===t&&(t=!0),this.findLis();for(var i=this.$element.find("option"),n=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",t),s=n.length,o=[],r=0;r<s;r++){var a=n[r].getAttribute("data-original-index");o[o.length]=i.eq(a)[0]}e(o).prop("selected",t),this.render(!1)},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},keydown:function(i){var n,s,o,r,a,l,d,h,c,u=e(this),p=u.is("input")?u.parent().parent():u.parent(),f=p.data("this"),g=":not(.disabled, .hidden, .dropdown-header, .divider)",m={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(f.options.liveSearch&&(p=u.parent().parent()),f.options.container&&(p=f.$menu),n=e("[role=menu] li",p),!(c=f.$menu.parent().hasClass("open"))&&(i.keyCode>=48&&i.keyCode<=57||i.keyCode>=96&&i.keyCode<=105||i.keyCode>=65&&i.keyCode<=90)&&(f.options.container?f.$newElement.trigger("click"):(f.setSize(),f.$menu.parent().addClass("open"),c=!0),f.$searchbox.focus()),f.options.liveSearch&&(/(^9$|27)/.test(i.keyCode.toString(10))&&c&&0===f.$menu.find(".active").length&&(i.preventDefault(),f.$menu.parent().removeClass("open"),f.options.container&&f.$newElement.removeClass("open"),f.$button.focus()),n=e("[role=menu] li"+g,p),u.val()||/(38|40)/.test(i.keyCode.toString(10))||0===n.filter(".active").length&&(n=f.$menuInner.find("li"),n=f.options.liveSearchNormalize?n.filter(":a"+f._searchStyle()+"("+t(m[i.keyCode])+")"):n.filter(":"+f._searchStyle()+"("+m[i.keyCode]+")"))),n.length){if(/(38|40)/.test(i.keyCode.toString(10)))s=n.index(n.find("a").filter(":focus").parent()),r=n.filter(g).first().index(),a=n.filter(g).last().index(),o=n.eq(s).nextAll(g).eq(0).index(),l=n.eq(s).prevAll(g).eq(0).index(),d=n.eq(o).prevAll(g).eq(0).index(),f.options.liveSearch&&(n.each(function(t){e(this).hasClass("disabled")||e(this).data("index",t)}),s=n.index(n.filter(".active")),r=n.first().data("index"),a=n.last().data("index"),o=n.eq(s).nextAll().eq(0).data("index"),l=n.eq(s).prevAll().eq(0).data("index"),d=n.eq(o).prevAll().eq(0).data("index")),h=u.data("prevIndex"),38==i.keyCode?(f.options.liveSearch&&s--,s!=d&&s>l&&(s=l),s<r&&(s=r),s==h&&(s=a)):40==i.keyCode&&(f.options.liveSearch&&s++,-1==s&&(s=0),s!=d&&s<o&&(s=o),s>a&&(s=a),s==h&&(s=r)),u.data("prevIndex",s),f.options.liveSearch?(i.preventDefault(),u.hasClass("dropdown-toggle")||(n.removeClass("active").eq(s).addClass("active").children("a").focus(),u.focus())):n.eq(s).children("a").focus();else if(!u.is("input")){var v,y=[];n.each(function(){e(this).hasClass("disabled")||e.trim(e(this).children("a").text().toLowerCase()).substring(0,1)==m[i.keyCode]&&y.push(e(this).index())}),v=e(document).data("keycount"),v++,e(document).data("keycount",v),e.trim(e(":focus").text().toLowerCase()).substring(0,1)!=m[i.keyCode]?(v=1,e(document).data("keycount",v)):v>=y.length&&(e(document).data("keycount",0),v>y.length&&(v=1)),n.eq(y[v-1]).children("a").focus()}if((/(13|32)/.test(i.keyCode.toString(10))||/(^9$)/.test(i.keyCode.toString(10))&&f.options.selectOnTab)&&c){if(/(32)/.test(i.keyCode.toString(10))||i.preventDefault(),f.options.liveSearch)/(32)/.test(i.keyCode.toString(10))||(f.$menuInner.find(".active a").click(),u.focus());else{var b=e(":focus");b.click(),b.focus(),i.preventDefault(),e(document).data("spaceSelect",!0)}e(document).data("keycount",0)}(/(^9$|27)/.test(i.keyCode.toString(10))&&c&&(f.multiple||f.options.liveSearch)||/(27)/.test(i.keyCode.toString(10))&&!c)&&(f.$menu.parent().removeClass("open"),f.options.container&&f.$newElement.removeClass("open"),f.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var o=e.fn.selectpicker;e.fn.selectpicker=n,e.fn.selectpicker.Constructor=s,e.fn.selectpicker.noConflict=function(){return e.fn.selectpicker=o,this},e(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',s.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(e){e.stopPropagation()}),e(window).on("load.bs.select.data-api",function(){e(".selectpicker").each(function(){var t=e(this);n.call(t,t.data())})})}(e)}),jQuery.fn.mousehold=function(e){if(e&&"function"==typeof e){var t=0,i=!1,n=void 0;return this.each(function(){$(this).mousedown(function(){i=!0;var n=0,s=this;t=setInterval(function(){n++,e.call(s,n),i=!1},100)}),n=function(){clearInterval(t),i&&e.call(this,1),i=!1},$(this).mouseout(n),$(this).mouseup(n)})}},function(e){var t=function(t,n){this.element=e(t),this.element.addClass("spinedit"),this.element.addClass("noSelect"),this.intervalId=void 0;var s="object"==typeof n;this.minimum=e.fn.spinedit.defaults.minimum,s&&"number"==typeof n.minimum&&this.setMinimum(n.minimum),this.maximum=e.fn.spinedit.defaults.maximum,s&&"number"==typeof n.maximum&&this.setMaximum(n.maximum),this.numberOfDecimals=e.fn.spinedit.defaults.numberOfDecimals,s&&"number"==typeof n.numberOfDecimals&&this.setNumberOfDecimals(n.numberOfDecimals);var o=e.fn.spinedit.defaults.value;if(s&&"number"==typeof n.value)o=n.value;else if(this.element.val()){var r=parseFloat(this.element.val());isNaN(r)||(o=r.toFixed(this.numberOfDecimals))}this.setValue(o),this.step=e.fn.spinedit.defaults.step,s&&"number"==typeof n.step&&this.setStep(n.step);var a=e(i.template);this.element.after(a),e(a).each(function(t,i){e(i).bind("selectstart click mousedown",function(){return!1})}),a.find(".glyphicon.glyphicon-plus").mousehold(e.proxy(this.increase,this)),a.find(".glyphicon.glyphicon-minus").mousehold(e.proxy(this.decrease,this)),this.element.on("keypress",e.proxy(this._keypress,this)),this.element.on("blur",e.proxy(this._checkConstraints,this))};t.prototype={constructor:t,setMinimum:function(e){this.minimum=parseFloat(e)},setMaximum:function(e){this.maximum=parseFloat(e)},setStep:function(e){this.step=parseFloat(e)},setNumberOfDecimals:function(e){this.numberOfDecimals=parseInt(e)},setValue:function(e){e=parseFloat(e),isNaN(e)&&(e=this.minimum),this.value!=e&&(e<this.minimum&&(e=this.minimum),e>this.maximum&&(e=this.maximum),this.value=e,this.element.val(this.value.toFixed(this.numberOfDecimals)),this.element.change(),this.element.trigger({type:"valueChanged",value:parseFloat(this.value.toFixed(this.numberOfDecimals))}))},increase:function(){var e=this.value+this.step;this.setValue(e)},decrease:function(){var e=this.value-this.step;this.setValue(e)},_keypress:function(e){var t=e.keyCode||e.charCode;if(45!=t&&!(this.numberOfDecimals>0&&46==t)){for(var i=[],n=48;n<58;n++)i.push(n);i.indexOf(t)>=0||e.preventDefault()}},_checkConstraints:function(t){var i=e(t.target);this.setValue(i.val())}},e.fn.spinedit=function(i){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var s=e(this),o=s.data("spinedit"),r="object"==typeof i&&i;o||(s.data("spinedit",new t(this,e.extend({},e.fn.spinedit().defaults,r))),o=s.data("spinedit")),"string"==typeof i&&"function"==typeof o[i]&&o[i].apply(o,n)})},e.fn.spinedit.defaults={value:0,minimum:0,maximum:100,step:1,numberOfDecimals:0},e.fn.spinedit.Constructor=t;var i={};i.template='<div class="spinedit"><i class="glyphicon glyphicon-plus"></i><i class="glyphicon glyphicon-minus"></i></div>'}(window.jQuery),function(e){"use strict";var t=e(window),i=function(t,i){this.widget="",this.$element=e(t),this.defaultTime=i.defaultTime,this.disableFocus=i.disableFocus,this.disableMousewheel=i.disableMousewheel,this.isOpen=i.isOpen,this.minuteStep=i.minuteStep,this.modalBackdrop=i.modalBackdrop,this.orientation=i.orientation,this.secondStep=i.secondStep,this.showInputs=i.showInputs,this.showMeridian=i.showMeridian,this.showSeconds=i.showSeconds,this.template=i.template,this.appendWidgetTo=i.appendWidgetTo,this.showWidgetOnAddonClick=i.showWidgetOnAddonClick,this.xOffset=i.xOffset,this.yOffset=i.yOffset;var n=String(i.orientation).toLowerCase().split(/\s+/g),s=i.orientation.toLowerCase();if(n=e.grep(n,function(e){return/^auto|left|right|top|bottom$/.test(e)}),this.orientation={x:"auto",y:"auto"},s&&"auto"!==s)if(1===n.length)switch(n[0]){case"top":case"bottom":this.orientation.y=n[0];break;case"left":case"right":this.orientation.x=n[0]}else s=e.grep(n,function(e){return/^left|right$/.test(e)}),this.orientation.x=s[0]||"auto",s=e.grep(n,function(e){return/^top|bottom$/.test(e)}),this.orientation.y=s[0]||"auto";else;this._init()};i.prototype={constructor:i,_init:function(){var t=this;this.showWidgetOnAddonClick&&(this.$element.parent().hasClass("input-append")||this.$element.parent().hasClass("input-prepend"))?(this.$element.parent(".input-append, .input-prepend").find(".add-on").on({"click.timepicker":e.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":e.proxy(this.showWidget,this),"click.timepicker":e.proxy(this.showWidget,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=e(this.getTemplate()).on("click",e.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each(function(){e(this).on({"click.timepicker":function(){e(this).select()},"keydown.timepicker":e.proxy(t.widgetKeydown,t),"keyup.timepicker":e.proxy(t.widgetKeyup,t)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=23:this.hour--},decrementMinute:function(e){var t;(t=e?this.minute-e:this.minute-this.minuteStep)<0?(this.decrementHour(),this.minute=t+60):this.minute=t},decrementSecond:function(){var e=this.second-this.secondStep;e<0?(this.decrementMinute(!0),this.second=e+60):this.second=e},elementKeydown:function(e){switch(e.keyCode){case 9:case 27:this.updateFromElementVal();break;case 37:e.preventDefault(),this.highlightPrevUnit();break;case 38:switch(e.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:e.preventDefault(),this.highlightNextUnit();break;case 40:switch(e.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var e=this.$element.get(0);if("selectionStart"in e)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange(),i=document.selection.createRange().text.length;return t.moveStart("character",-e.value.length),t.text.length-i}},getTemplate:function(){var e,t,i,n,s,o;switch(this.showInputs?(t='<input type="text" class="bootstrap-timepicker-hour" maxlength="2"/>',i='<input type="text" class="bootstrap-timepicker-minute" maxlength="2"/>',n='<input type="text" class="bootstrap-timepicker-second" maxlength="2"/>',s='<input type="text" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(t='<span class="bootstrap-timepicker-hour"></span>',i='<span class="bootstrap-timepicker-minute"></span>',n='<span class="bootstrap-timepicker-second"></span>',s='<span class="bootstrap-timepicker-meridian"></span>'),o='<table class=" table-condensed"><tr><td><a href="#" data-action="incrementHour"><span class="glyphicon glyphicon-chevron-up"></span></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><span class="glyphicon glyphicon-chevron-up"></span></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="incrementSecond"><span class="glyphicon glyphicon-chevron-up"></span></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><span class="glyphicon glyphicon-chevron-up"></span></a></td>':"")+"</tr><tr><td>"+t+'</td> <td class="separator">:</td><td>'+i+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+n+"</td>":"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td>'+s+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><span class="glyphicon glyphicon-chevron-down"></span></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><span class="glyphicon glyphicon-chevron-down"></span></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="decrementSecond"><span class="glyphicon glyphicon-chevron-down"></span></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><span class="glyphicon glyphicon-chevron-down"></span></a></td>':"")+"</tr></table>",this.template){case"modal":e='<div class="bootstrap-timepicker-widget modal hide fade in" 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":e='<div class="bootstrap-timepicker-widget dropdown-menu">'+o+"</div>"}return e},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),e(document).off("mousedown.timepicker, touchend.timepicker"),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){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.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="hour",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(0,1):e.setSelectionRange(0,2)},0)},highlightMinute:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="minute",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(2,4):e.setSelectionRange(3,5)},0)},highlightSecond:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="second",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(5,7):e.setSelectionRange(6,8)},0)},highlightMeridian:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="meridian",e.setSelectionRange&&(this.showSeconds?setTimeout(function(){t.hour<10?e.setSelectionRange(8,10):e.setSelectionRange(9,11)},0):setTimeout(function(){t.hour<10?e.setSelectionRange(5,7):e.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}23!==this.hour?this.hour++:this.hour=0},incrementMinute:function(e){var t;(t=e?this.minute+e:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=t-60):this.minute=t},incrementSecond:function(){var e=this.second+this.secondStep-this.second%this.secondStep;e>59?(this.incrementMinute(!0),this.second=e-60):this.second=e},mousewheel:function(t){if(!this.disableMousewheel){t.preventDefault(),t.stopPropagation();var i=t.originalEvent.wheelDelta||-t.originalEvent.detail,n=null;switch("mousewheel"===t.type?n=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"===t.type&&(n=40*t.originalEvent.detail),n&&(t.preventDefault(),e(this).scrollTop(n+e(this).scrollTop())),this.highlightedUnit){case"minute":i>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":i>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:i>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},place:function(){if(!this.isInline){var i=this.$widget.outerWidth(),n=this.$widget.outerHeight(),s=t.width(),o=t.height(),r=t.scrollTop(),a=t.scrollLeft(),l=parseInt(this.$element.parents().filter(function(){return"auto"!=e(this).css("z-index")}).first().css("z-index"))+10,d=this.component?this.component.parent().offset():this.$element.offset(),h=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),u=d.left,p=d.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left");var f=this.orientation.x;if("auto"!==f)this.$widget.addClass("timepicker-orient-"+f),"right"===f&&(u-=i-c);else if(this.$widget.addClass("timepicker-orient-left"),d.left<0)u-=d.left-10;else if(d.left+i>s){u=s-i-10;var g=-a+d.left-i,m=a+s-(d.left+c+i);f=Math.max(g,m)===m?"left":"right"}var v,y,b=this.orientation.y;"auto"===b&&(v=-r+d.top-n,y=r+o-(d.top+h+n),b=Math.max(v,y)===y?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+b),"top"===b?p+=h:p-=n+parseInt(this.$widget.css("padding-top")),"top"===b?p-=this.yOffset:p+=this.yOffset,"left"===f?u-=this.xOffset:u+=this.xOffset,this.$widget.css({top:p,left:u,zIndex:l})}},remove:function(){e("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(e){if(this.$element.val())this.updateFromElementVal();else if("current"===e){var t=new Date,i=t.getHours(),n=t.getMinutes(),s=t.getSeconds(),o="AM";0!==s&&60===(s=Math.ceil(t.getSeconds()/this.secondStep)*this.secondStep)&&(n+=1,s=0),0!==n&&60===(n=Math.ceil(t.getMinutes()/this.minuteStep)*this.minuteStep)&&(i+=1,n=0),this.showMeridian&&(0===i?i=12:i>=12?(i>12&&(i-=12),o="PM"):o="AM"),this.hour=i,this.minute=n,this.second=s,this.meridian=o,this.update()}else!1===e?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(e)},setTime:function(e,t){if(e){var i,n,s,o,r;"object"==typeof e&&e.getMonth?(n=e.getHours(),s=e.getMinutes(),o=e.getSeconds(),this.showMeridian&&(r="AM",n>12&&(r="PM",n%=12),12===n&&(r="PM"))):(r=null!==e.match(/p/i)?"PM":"AM",n=(i=(e=e.replace(/[^0-9\:]/g,"")).split(":"))[0]?i[0].toString():i.toString(),s=i[1]?i[1].toString():"",o=i[2]?i[2].toString():"",n.length>4&&(o=n.substr(4,2)),n.length>2&&(s=n.substr(2,2),n=n.substr(0,2)),s.length>2&&(o=s.substr(2,2),s=s.substr(0,2)),o.length>2&&(o=o.substr(2,2)),n=parseInt(n),s=parseInt(s),o=parseInt(o),isNaN(n)&&(n=0),isNaN(s)&&(s=0),isNaN(o)&&(o=0),this.showMeridian?n<1?n=1:n>12&&(n=12):(n>=24?n=23:n<0&&(n=0),n<13&&"PM"===r&&(n+=12)),s<0?s=0:s>=60&&(s=59),this.showSeconds&&(isNaN(o)?o=0:o<0?o=0:o>=60&&(o=59))),this.hour=n,this.minute=s,this.second=o,this.meridian=r,this.update(t)}else this.clear()},showWidget:function(){if(!this.isOpen&&!this.$element.is(":disabled")){this.$widget.appendTo(this.appendWidgetTo);var t=this;e(document).on("mousedown.timepicker, touchend.timepicker",function(e){t.$element.parent().find(e.target).length||t.$widget.is(e.target)||t.$widget.find(e.target).length||t.hideWidget()}),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",e.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.$widget.find("td a").hide(),this.$widget.find("td a").show(),this.isOpen=!0}},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(e){this.updateElement(),e||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var e=this.hour,t=1===this.minute.toString().length?"0"+this.minute:this.minute,i=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(e),this.$widget.find("input.bootstrap-timepicker-minute").val(t),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(i),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(e),this.$widget.find("span.bootstrap-timepicker-minute").text(t),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(i),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var e=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(e,!0)}},widgetClick:function(t){t.stopPropagation(),t.preventDefault();var i=e(t.target),n=i.closest("a").data("action");n&&this[n](),this.update(),i.is("input")&&i.get(0).setSelectionRange(0,2)},widgetKeydown:function(t){var i=e(t.target),n=i.attr("class").replace("bootstrap-timepicker-","");switch(t.keyCode){case 9:if(this.showMeridian&&"meridian"===n||this.showSeconds&&"second"===n||!this.showMeridian&&!this.showSeconds&&"minute"===n)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(t.preventDefault(),n){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2);break;case 40:switch(t.preventDefault(),n){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2)}},widgetKeyup:function(e){(65===e.keyCode||77===e.keyCode||80===e.keyCode||46===e.keyCode||8===e.keyCode||e.keyCode>=46&&e.keyCode<=57)&&this.updateFromWidgetInputs()}},e.fn.timepicker=function(t){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var s=e(this),o=s.data("timepicker"),r="object"==typeof t&&t;o||s.data("timepicker",o=new i(this,e.extend({},e.fn.timepicker.defaults,r,e(this).data()))),"string"==typeof t&&"function"==typeof o[t]&&o[t].apply(o,n)})},e.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:"auto",secondStep:15,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,xOffset:0,yOffset:0},e.fn.timepicker.Constructor=i}(jQuery),function e(t,i,n){function s(r,a){if(!i[r]){if(!t[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(o)return o(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var h=i[r]={exports:{}};t[r][0].call(h.exports,function(e){var i=t[r][1][e];return s(i||e)},h,h.exports,e,t,i,n)}return i[r].exports}for(var o="function"==typeof require&&require,r=0;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,i){var n,s,o,r,a,l,d=function(e,t){function i(){this.constructor=e}for(var n in t)h.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},h={}.hasOwnProperty;l=e("./node"),r=l.Position,n=function(){function e(e){this.tree_widget=e,this.hovered_area=null,this.$ghost=null,this.hit_areas=[],this.is_dragging=!1,this.current_item=null}return e.prototype.mouseCapture=function(e){var t,i;return t=$(e.target),this.mustCaptureElement(t)?this.tree_widget.options.onIsMoveHandle&&!this.tree_widget.options.onIsMoveHandle(t)?null:((i=this.tree_widget._getNodeElement(t))&&this.tree_widget.options.onCanMove&&(this.tree_widget.options.onCanMove(i.node)||(i=null)),this.current_item=i,null!==this.current_item):null},e.prototype.mouseStart=function(e){var t;return this.refresh(),t=$(e.target).offset(),this.drag_element=new s(this.current_item.node,e.page_x-t.left,e.page_y-t.top,this.tree_widget.element),this.is_dragging=!0,this.current_item.$element.addClass("jqtree-moving"),!0},e.prototype.mouseDrag=function(e){var t;return this.drag_element.move(e.page_x,e.page_y),t=this.findHoveredArea(e.page_x,e.page_y),this.canMoveToArea(t)&&t?(t.node.isFolder()||this.stopOpenFolderTimer(),this.hovered_area!==t&&(this.hovered_area=t,this.mustOpenFolderTimer(t)?this.startOpenFolderTimer(t.node):this.stopOpenFolderTimer(),this.updateDropHint())):(this.removeHover(),this.removeDropHint(),this.stopOpenFolderTimer()),!0},e.prototype.mustCaptureElement=function(e){return!e.is("input,select")},e.prototype.canMoveToArea=function(e){var t;return!!e&&(!this.tree_widget.options.onCanMoveTo||(t=r.getName(e.position),this.tree_widget.options.onCanMoveTo(this.current_item.node,e.node,t)))},e.prototype.mouseStop=function(e){return this.moveItem(e),this.clear(),this.removeHover(),this.removeDropHint(),this.removeHitAreas(),this.current_item&&(this.current_item.$element.removeClass("jqtree-moving"),this.current_item=null),this.is_dragging=!1,!1},e.prototype.refresh=function(){if(this.removeHitAreas(),this.current_item&&(this.generateHitAreas(),this.current_item=this.tree_widget._getNodeElementForNode(this.current_item.node),this.is_dragging))return this.current_item.$element.addClass("jqtree-moving")},e.prototype.removeHitAreas=function(){return this.hit_areas=[]},e.prototype.clear=function(){return this.drag_element.remove(),this.drag_element=null},e.prototype.removeDropHint=function(){if(this.previous_ghost)return this.previous_ghost.remove()},e.prototype.removeHover=function(){return this.hovered_area=null},e.prototype.generateHitAreas=function(){var e;return e=new o(this.tree_widget.tree,this.current_item.node,this.getTreeDimensions().bottom),this.hit_areas=e.generate()},e.prototype.findHoveredArea=function(e,t){var i,n,s,o,r;if(n=this.getTreeDimensions(),e<n.left||t<n.top||e>n.right||t>n.bottom)return null;for(o=0,s=this.hit_areas.length;o<s;)if(r=o+s>>1,i=this.hit_areas[r],t<i.top)s=r;else{if(!(t>i.bottom))return i;o=r+1}return null},e.prototype.mustOpenFolderTimer=function(e){var t;return(t=e.node).isFolder()&&!t.is_open&&e.position===r.INSIDE},e.prototype.updateDropHint=function(){var e;if(this.hovered_area)return this.removeDropHint(),e=this.tree_widget._getNodeElementForNode(this.hovered_area.node),this.previous_ghost=e.addDropHint(this.hovered_area.position)},e.prototype.startOpenFolderTimer=function(e){var t;return t=function(t){return function(){return t.tree_widget._openNode(e,t.tree_widget.options.slide,function(){return t.refresh(),t.updateDropHint()})}}(this),this.stopOpenFolderTimer(),this.open_folder_timer=setTimeout(t,this.tree_widget.options.openFolderDelay)},e.prototype.stopOpenFolderTimer=function(){if(this.open_folder_timer)return clearTimeout(this.open_folder_timer),this.open_folder_timer=null},e.prototype.moveItem=function(e){var t,i,n,s,o;if(this.hovered_area&&this.hovered_area.position!==r.NONE&&this.canMoveToArea(this.hovered_area)&&(i=this.current_item.node,o=this.hovered_area.node,n=this.hovered_area.position,s=i.parent,n===r.INSIDE&&(this.hovered_area.node.is_open=!0),t=function(e){return function(){return e.tree_widget.tree.moveNode(i,o,n),e.tree_widget.element.empty(),e.tree_widget._refreshElements()}}(this),!this.tree_widget._triggerEvent("tree.move",{move_info:{moved_node:i,target_node:o,position:r.getName(n),previous_parent:s,do_move:t,original_event:e.original_event}}).isDefaultPrevented()))return t()},e.prototype.getTreeDimensions=function(){var e;return e=this.tree_widget.element.offset(),{left:e.left,top:e.top,right:e.left+this.tree_widget.element.width(),bottom:e.top+this.tree_widget.element.height()+16}},e}(),a=function(){function e(e){this.tree=e}return e.prototype.iterate=function(){var e,t;return t=!0,(e=function(i){return function(n,s){var o,r,a,l,d,h,c;if(h=(n.is_open||!n.element)&&n.hasChildren(),n.element){if(!(o=$(n.element)).is(":visible"))return;t&&(i.handleFirstNode(n,o),t=!1),n.hasChildren()?n.is_open?i.handleOpenFolder(n,o)||(h=!1):i.handleClosedFolder(n,s,o):i.handleNode(n,s,o)}if(h){for(r=n.children.length,a=l=0,d=(c=n.children).length;l<d;a=++l)c[a],a===r-1?e(n.children[a],null):e(n.children[a],n.children[a+1]);if(n.is_open)return i.handleAfterOpenFolder(n,s,o)}}}(this))(this.tree,null)},e.prototype.handleNode=function(e,t,i){},e.prototype.handleOpenFolder=function(e,t){},e.prototype.handleClosedFolder=function(e,t,i){},e.prototype.handleAfterOpenFolder=function(e,t,i){},e.prototype.handleFirstNode=function(e,t){},e}(),o=function(e){function t(e,i,n){t.__super__.constructor.call(this,e),this.current_node=i,this.tree_bottom=n}return d(t,a),t.prototype.generate=function(){return this.positions=[],this.last_top=0,this.iterate(),this.generateHitAreas(this.positions)},t.prototype.getTop=function(e){return e.offset().top},t.prototype.addPosition=function(e,t,i){var n;return n={top:i,node:e,position:t},this.positions.push(n),this.last_top=i},t.prototype.handleNode=function(e,t,i){var n;return n=this.getTop(i),e===this.current_node?this.addPosition(e,r.NONE,n):this.addPosition(e,r.INSIDE,n),t===this.current_node||e===this.current_node?this.addPosition(e,r.NONE,n):this.addPosition(e,r.AFTER,n)},t.prototype.handleOpenFolder=function(e,t){return e!==this.current_node&&(e.children[0]!==this.current_node&&this.addPosition(e,r.INSIDE,this.getTop(t)),!0)},t.prototype.handleClosedFolder=function(e,t,i){var n;return n=this.getTop(i),e===this.current_node?this.addPosition(e,r.NONE,n):(this.addPosition(e,r.INSIDE,n),t!==this.current_node?this.addPosition(e,r.AFTER,n):void 0)},t.prototype.handleFirstNode=function(e,t){if(e!==this.current_node)return this.addPosition(e,r.BEFORE,this.getTop($(e.element)))},t.prototype.handleAfterOpenFolder=function(e,t,i){return e===this.current_node.node||t===this.current_node.node?this.addPosition(e,r.NONE,this.last_top):this.addPosition(e,r.AFTER,this.last_top)},t.prototype.generateHitAreas=function(e){var t,i,n,s,o,r;for(r=-1,t=[],i=[],n=0,s=e.length;n<s;n++)(o=e[n]).top!==r&&t.length&&(t.length&&this.generateHitAreasForGroup(i,t,r,o.top),r=o.top,t=[]),t.push(o);return this.generateHitAreasForGroup(i,t,r,this.tree_bottom),i},t.prototype.generateHitAreasForGroup=function(e,t,i,n){var s,o,r,a,l;for(l=Math.min(t.length,4),s=Math.round((n-i)/l),o=i,r=0;r<l;)a=t[r],e.push({top:o,bottom:o+s,node:a.node,position:a.position}),o+=s,r+=1;return null},t}(),s=function(){function e(e,t,i,n){this.offset_x=t,this.offset_y=i,this.$element=$('<span class="jqtree-title jqtree-dragging">'+e.name+"</span>"),this.$element.css("position","absolute"),n.append(this.$element)}return e.prototype.move=function(e,t){return this.$element.offset({left:e-this.offset_x,top:t-this.offset_y})},e.prototype.remove=function(){return this.$element.remove()},e}(),t.exports=n},{"./node":5}],2:[function(e,t,i){var n,s,o;e("./node_element").NodeElement,o=e("./util"),s=o.html_escape,n=function(){function e(e){this.tree_widget=e,this.opened_icon_element=this.createButtonElement(e.options.openedIcon),this.closed_icon_element=this.createButtonElement(e.options.closedIcon)}return e.prototype.render=function(e){return e&&e.parent?this.renderFromNode(e):this.renderFromRoot()},e.prototype.renderFromRoot=function(){var e;return(e=this.tree_widget.element).empty(),this.createDomElements(e[0],this.tree_widget.tree.children,!0,!0)},e.prototype.renderFromNode=function(e){var t,i;if(t=$(e.element),i=this.createLi(e),this.attachNodeData(e,i),t.after(i),t.remove(),e.children)return this.createDomElements(i,e.children,!1,!1)},e.prototype.createDomElements=function(e,t,i,n){var s,o,r,a,l;for(l=this.createUl(i),e.appendChild(l),o=0,r=t.length;o<r;o++)s=t[o],a=this.createLi(s),l.appendChild(a),this.attachNodeData(s,a),s.hasChildren()&&this.createDomElements(a,s.children,!1,s.is_open);return null},e.prototype.attachNodeData=function(e,t){return e.element=t,$(t).data("node",e)},e.prototype.createUl=function(e){var t,i;return t=e?"jqtree-tree":"",i=document.createElement("ul"),i.className="jqtree_common "+t,i},e.prototype.createLi=function(e){var t;return t=e.isFolder()?this.createFolderLi(e):this.createNodeLi(e),this.tree_widget.options.onCreateLi&&this.tree_widget.options.onCreateLi(e,$(t)),t},e.prototype.createFolderLi=function(e){var t,i,n,s,o,r,a,l;return t=this.getButtonClasses(e),o=this.getFolderClasses(e),s=this.escapeIfNecessary(e.name),r=e.is_open?this.opened_icon_element:this.closed_icon_element,a=document.createElement("li"),a.className="jqtree_common "+o,n=document.createElement("div"),n.className="jqtree-element jqtree_common",a.appendChild(n),i=document.createElement("a"),i.className="jqtree_common "+t,i.appendChild(r.cloneNode(!1)),n.appendChild(i),l=document.createElement("span"),l.className="jqtree_common jqtree-title jqtree-title-folder",n.appendChild(l),l.innerHTML=s,a},e.prototype.createNodeLi=function(e){var t,i,n,s,o,r;return o=["jqtree_common"],this.tree_widget.select_node_handler&&this.tree_widget.select_node_handler.isNodeSelected(e)&&o.push("jqtree-selected"),t=o.join(" "),n=this.escapeIfNecessary(e.name),s=document.createElement("li"),s.className=t,i=document.createElement("div"),i.className="jqtree-element jqtree_common",s.appendChild(i),r=document.createElement("span"),r.className="jqtree-title jqtree_common",r.innerHTML=n,i.appendChild(r),s},e.prototype.getButtonClasses=function(e){var t;return t=["jqtree-toggler"],e.is_open||t.push("jqtree-closed"),t.join(" ")},e.prototype.getFolderClasses=function(e){var t;return t=["jqtree-folder"],e.is_open||t.push("jqtree-closed"),this.tree_widget.select_node_handler&&this.tree_widget.select_node_handler.isNodeSelected(e)&&t.push("jqtree-selected"),e.is_loading&&t.push("jqtree-loading"),t.join(" ")},e.prototype.escapeIfNecessary=function(e){return this.tree_widget.options.autoEscape?s(e):e},e.prototype.createButtonElement=function(e){var t;return"string"==typeof e?(t=document.createElement("div"),t.innerHTML=e,document.createTextNode(t.innerHTML)):$(e)[0]},e}(),t.exports=n},{"./node_element":6,"./util":12}],3:[function(e,t,i){var n,s=function(e,t){return function(){return e.apply(t,arguments)}};n=function(){function e(e){this.selectNode=s(this.selectNode,this),this.tree_widget=e,e.options.keyboardSupport&&$(document).bind("keydown.jqtree",$.proxy(this.handleKeyDown,this))}return 37,38,39,40,e.prototype.deinit=function(){return $(document).unbind("keydown.jqtree")},e.prototype.moveDown=function(){var e;return!!(e=this.tree_widget.getSelectedNode())&&this.selectNode(e.getNextNode())},e.prototype.moveUp=function(){var e;return!!(e=this.tree_widget.getSelectedNode())&&this.selectNode(e.getPreviousNode())},e.prototype.moveRight=function(){var e;return!((e=this.tree_widget.getSelectedNode())&&e.isFolder()&&!e.is_open&&(this.tree_widget.openNode(e),1))},e.prototype.moveLeft=function(){var e;return!((e=this.tree_widget.getSelectedNode())&&e.isFolder()&&e.is_open&&(this.tree_widget.closeNode(e),1))},e.prototype.handleKeyDown=function(e){if(!this.tree_widget.options.keyboardSupport)return!0;if($(document.activeElement).is("textarea,input,select"))return!0;if(!this.tree_widget.getSelectedNode())return!0;switch(e.which){case 40:return this.moveDown();case 38:return this.moveUp();case 39:return this.moveRight();case 37:return this.moveLeft()}return!0},e.prototype.selectNode=function(e){return!e||(this.tree_widget.selectNode(e),this.tree_widget.scroll_handler&&!this.tree_widget.scroll_handler.isScrolledIntoView($(e.element).find(".jqtree-element"))&&this.tree_widget.scrollToNode(e),!1)},e}(),t.exports=n},{}],4:[function(e,t,i){var n,s,o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty;s=e("./simple.widget"),n=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,s),t.is_mouse_handled=!1,t.prototype._init=function(){return this.$el.bind("mousedown.mousewidget",$.proxy(this._mouseDown,this)),this.$el.bind("touchstart.mousewidget",$.proxy(this._touchStart,this)),this.is_mouse_started=!1,this.mouse_delay=0,this._mouse_delay_timer=null,this._is_mouse_delay_met=!0,this.mouse_down_info=null},t.prototype._deinit=function(){var e;return this.$el.unbind("mousedown.mousewidget"),this.$el.unbind("touchstart.mousewidget"),(e=$(document)).unbind("mousemove.mousewidget"),e.unbind("mouseup.mousewidget")},t.prototype._mouseDown=function(e){var t;if(1===e.which)return(t=this._handleMouseDown(e,this._getPositionInfo(e)))&&e.preventDefault(),t},t.prototype._handleMouseDown=function(e,i){if(!t.is_mouse_handled&&(this.is_mouse_started&&this._handleMouseUp(i),this.mouse_down_info=i,this._mouseCapture(i)))return this._handleStartMouse(),this.is_mouse_handled=!0,!0},t.prototype._handleStartMouse=function(){var e;if((e=$(document)).bind("mousemove.mousewidget",$.proxy(this._mouseMove,this)),e.bind("touchmove.mousewidget",$.proxy(this._touchMove,this)),e.bind("mouseup.mousewidget",$.proxy(this._mouseUp,this)),e.bind("touchend.mousewidget",$.proxy(this._touchEnd,this)),this.mouse_delay)return this._startMouseDelayTimer()},t.prototype._startMouseDelayTimer=function(){return this._mouse_delay_timer&&clearTimeout(this._mouse_delay_timer),this._mouse_delay_timer=setTimeout(function(e){return function(){return e._is_mouse_delay_met=!0}}(this),this.mouse_delay),this._is_mouse_delay_met=!1},t.prototype._mouseMove=function(e){return this._handleMouseMove(e,this._getPositionInfo(e))},t.prototype._handleMouseMove=function(e,t){return this.is_mouse_started?(this._mouseDrag(t),e.preventDefault()):!(!this.mouse_delay||this._is_mouse_delay_met)||(this.is_mouse_started=!1!==this._mouseStart(this.mouse_down_info),this.is_mouse_started?this._mouseDrag(t):this._handleMouseUp(t),!this.is_mouse_started)},t.prototype._getPositionInfo=function(e){return{page_x:e.pageX,page_y:e.pageY,target:e.target,original_event:e}},t.prototype._mouseUp=function(e){return this._handleMouseUp(this._getPositionInfo(e))},t.prototype._handleMouseUp=function(e){var t;(t=$(document)).unbind("mousemove.mousewidget"),t.unbind("touchmove.mousewidget"),t.unbind("mouseup.mousewidget"),t.unbind("touchend.mousewidget"),this.is_mouse_started&&(this.is_mouse_started=!1,this._mouseStop(e))},t.prototype._mouseCapture=function(e){return!0},t.prototype._mouseStart=function(e){return null},t.prototype._mouseDrag=function(e){return null},t.prototype._mouseStop=function(e){return null},t.prototype.setMouseDelay=function(e){return this.mouse_delay=e},t.prototype._touchStart=function(e){var t;if(!(e.originalEvent.touches.length>1))return t=e.originalEvent.changedTouches[0],this._handleMouseDown(e,this._getPositionInfo(t))},t.prototype._touchMove=function(e){var t;if(!(e.originalEvent.touches.length>1))return t=e.originalEvent.changedTouches[0],this._handleMouseMove(e,this._getPositionInfo(t))},t.prototype._touchEnd=function(e){var t;if(!(e.originalEvent.touches.length>1))return t=e.originalEvent.changedTouches[0],this._handleMouseUp(this._getPositionInfo(t))},t}(),t.exports=n},{"./simple.widget":10}],5:[function(e,t,i){var n,s;(s={getName:function(e){return s.strings[e-1]},nameToIndex:function(e){var t,i,n;for(t=i=1,n=s.strings.length;1<=n?i<=n:i>=n;t=1<=n?++i:--i)if(s.strings[t-1]===e)return t;return 0}}).BEFORE=1,s.AFTER=2,s.INSIDE=3,s.NONE=4,s.strings=["before","after","inside","none"],n=function(){function e(t,i,n){null==i&&(i=!1),null==n&&(n=e),this.setData(t),this.children=[],this.parent=null,i&&(this.id_mapping={},this.tree=this,this.node_class=n)}return e.prototype.setData=function(e){var t,i;if("object"!=typeof e)this.name=e;else for(t in e)i=e[t],"label"===t?this.name=i:this[t]=i;return null},e.prototype.initFromData=function(e){var t,i;return i=function(e){return function(i){if(e.setData(i),i.children)return t(i.children)}}(this),t=function(e){return function(t){var i,n,s,o;for(n=0,s=t.length;n<s;n++)i=t[n],(o=new e.tree.node_class("")).initFromData(i),e.addChild(o);return null}}(this),i(e),null},e.prototype.loadFromData=function(e){var t,i,n,s;for(this.removeChildren(),t=0,i=e.length;t<i;t++)s=e[t],n=new this.tree.node_class(s),this.addChild(n),"object"==typeof s&&s.children&&n.loadFromData(s.children);return null},e.prototype.addChild=function(e){return this.children.push(e),e._setParent(this)},e.prototype.addChildAtPosition=function(e,t){return this.children.splice(t,0,e),e._setParent(this)},e.prototype._setParent=function(e){return this.parent=e,this.tree=e.tree,this.tree.addNodeToIndex(this)},e.prototype.removeChild=function(e){return e.removeChildren(),this._removeChild(e)},e.prototype._removeChild=function(e){return this.children.splice(this.getChildIndex(e),1),this.tree.removeNodeFromIndex(e)},e.prototype.getChildIndex=function(e){return $.inArray(e,this.children)},e.prototype.hasChildren=function(){return 0!==this.children.length},e.prototype.isFolder=function(){return this.hasChildren()||this.load_on_demand},e.prototype.iterate=function(e){var t;return(t=function(i,n){var s,o,r,a;if(i.children){for(o=0,r=(a=i.children).length;o<r;o++)s=a[o],e(s,n)&&s.hasChildren()&&t(s,n+1);return null}})(this,0),null},e.prototype.moveNode=function(e,t,i){if(!e.isParentOf(t))return e.parent._removeChild(e),i===s.AFTER?t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)+1):i===s.BEFORE?t.parent.addChildAtPosition(e,t.parent.getChildIndex(t)):i===s.INSIDE?t.addChildAtPosition(e,0):void 0},e.prototype.getData=function(){var e;return(e=function(t){var i,n,s,o,r,a,l;for(i=[],n=0,o=t.length;n<o;n++){r=t[n],a={};for(s in r)l=r[s],"parent"!==s&&"children"!==s&&"element"!==s&&"tree"!==s&&Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=l);r.hasChildren()&&(a.children=e(r.children)),i.push(a)}return i})(this.children)},e.prototype.getNodeByName=function(e){var t;return t=null,this.iterate(function(i){return i.name!==e||(t=i,!1)}),t},e.prototype.addAfter=function(e){var t,i;return this.parent?(i=new this.tree.node_class(e),t=this.parent.getChildIndex(this),this.parent.addChildAtPosition(i,t+1),i):null},e.prototype.addBefore=function(e){var t,i;return this.parent?(i=new this.tree.node_class(e),t=this.parent.getChildIndex(this),this.parent.addChildAtPosition(i,t),i):null},e.prototype.addParent=function(e){var t,i,n,s,o,r;if(this.parent){for((s=new this.tree.node_class(e))._setParent(this.tree),i=0,n=(r=(o=this.parent).children).length;i<n;i++)t=r[i],s.addChild(t);return o.children=[],o.addChild(s),s}return null},e.prototype.remove=function(){if(this.parent)return this.parent.removeChild(this),this.parent=null},e.prototype.append=function(e){var t;return t=new this.tree.node_class(e),this.addChild(t),t},e.prototype.prepend=function(e){var t;return t=new this.tree.node_class(e),this.addChildAtPosition(t,0),t},e.prototype.isParentOf=function(e){var t;for(t=e.parent;t;){if(t===this)return!0;t=t.parent}return!1},e.prototype.getLevel=function(){var e,t;for(e=0,t=this;t.parent;)e+=1,t=t.parent;return e},e.prototype.getNodeById=function(e){return this.id_mapping[e]},e.prototype.addNodeToIndex=function(e){if(null!=e.id)return this.id_mapping[e.id]=e},e.prototype.removeNodeFromIndex=function(e){if(null!=e.id)return delete this.id_mapping[e.id]},e.prototype.removeChildren=function(){return this.iterate(function(e){return function(t){return e.tree.removeNodeFromIndex(t),!0}}(this)),this.children=[]},e.prototype.getPreviousSibling=function(){var e;return this.parent&&(e=this.parent.getChildIndex(this)-1)>=0?this.parent.children[e]:null},e.prototype.getNextSibling=function(){var e;return this.parent&&(e=this.parent.getChildIndex(this)+1)<this.parent.children.length?this.parent.children[e]:null},e.prototype.getNodesByProperty=function(e,t){return this.filter(function(i){return i[e]===t})},e.prototype.filter=function(e){var t;return t=[],this.iterate(function(i){return e(i)&&t.push(i),!0}),t},e.prototype.getNextNode=function(e){return null==e&&(e=!0),e&&this.hasChildren()&&this.is_open?this.children[0]:this.parent?this.getNextSibling()||this.parent.getNextNode(!1):null},e.prototype.getPreviousNode=function(){var e;return this.parent?(e=this.getPreviousSibling())?e.hasChildren()&&e.is_open?e.getLastChild():e:this.parent.parent?this.parent:null:null},e.prototype.getLastChild=function(){var e;return this.hasChildren()?(e=this.children[this.children.length-1]).hasChildren()&&e.is_open?e.getLastChild():e:null},e}(),t.exports={Node:n,Position:s}},{}],6:[function(e,t,i){var n,s,o,r,a,l,d=function(e,t){function i(){this.constructor=e}for(var n in t)h.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},h={}.hasOwnProperty;l=e("./node"),a=l.Position,r=function(){function e(e,t){this.init(e,t)}return e.prototype.init=function(e,t){return this.node=e,this.tree_widget=t,e.element||(e.element=this.tree_widget.element),this.$element=$(e.element)},e.prototype.getUl=function(){return this.$element.children("ul:first")},e.prototype.getSpan=function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")},e.prototype.getLi=function(){return this.$element},e.prototype.addDropHint=function(e){return e===a.INSIDE?new n(this.$element):new o(this.node,this.$element,e)},e.prototype.select=function(){return this.getLi().addClass("jqtree-selected")},e.prototype.deselect=function(){return this.getLi().removeClass("jqtree-selected")},e}(),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return d(t,r),t.prototype.open=function(e,t){var i,n;if(null==t&&(t=!0),!this.node.is_open)return this.node.is_open=!0,(i=this.getButton()).removeClass("jqtree-closed"),i.html(""),i.append(this.tree_widget.renderer.opened_icon_element.cloneNode(!1)),n=function(t){return function(){return t.getLi().removeClass("jqtree-closed"),e&&e(),t.tree_widget._triggerEvent("tree.open",{node:t.node})}}(this),t?this.getUl().slideDown("fast",n):(this.getUl().show(),n())},t.prototype.close=function(e){var t,i;if(null==e&&(e=!0),this.node.is_open)return this.node.is_open=!1,(t=this.getButton()).addClass("jqtree-closed"),t.html(""),t.append(this.tree_widget.renderer.closed_icon_element.cloneNode(!1)),i=function(e){return function(){return e.getLi().addClass("jqtree-closed"),e.tree_widget._triggerEvent("tree.close",{node:e.node})}}(this),e?this.getUl().slideUp("fast",i):(this.getUl().hide(),i())},t.prototype.getButton=function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")},t.prototype.addDropHint=function(e){return this.node.is_open||e!==a.INSIDE?new o(this.node,this.$element,e):new n(this.$element)},t}(),n=function(){function e(e){var t,i;t=e.children(".jqtree-element"),i=e.width()-4,this.$hint=$('<span class="jqtree-border"></span>'),t.append(this.$hint),this.$hint.css({width:i,height:t.outerHeight()-4})}return e.prototype.remove=function(){return this.$hint.remove()},e}(),o=function(){function e(e,t,i){this.$element=t,this.node=e,this.$ghost=$('<li class="jqtree_common jqtree-ghost"><span class="jqtree_common jqtree-circle"></span><span class="jqtree_common jqtree-line"></span></li>'),i===a.AFTER?this.moveAfter():i===a.BEFORE?this.moveBefore():i===a.INSIDE&&(e.isFolder()&&e.is_open?this.moveInsideOpenFolder():this.moveInside())}return e.prototype.remove=function(){return this.$ghost.remove()},e.prototype.moveAfter=function(){return this.$element.after(this.$ghost)},e.prototype.moveBefore=function(){return this.$element.before(this.$ghost)},e.prototype.moveInsideOpenFolder=function(){return $(this.node.children[0].element).before(this.$ghost)},e.prototype.moveInside=function(){return this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")},e}(),t.exports={FolderElement:s,NodeElement:r}},{"./node":5}],7:[function(e,t,i){var n,s,o;(o=e("./util")).indexOf,s=o.isInt,n=function(){function e(e){this.tree_widget=e}return e.prototype.saveState=function(){var e;return e=JSON.stringify(this.getState()),this.tree_widget.options.onSetStateFromStorage?this.tree_widget.options.onSetStateFromStorage(e):this.supportsLocalStorage()?localStorage.setItem(this.getCookieName(),e):$.cookie?($.cookie.raw=!0,$.cookie(this.getCookieName(),e,{path:"/"})):void 0},e.prototype.getStateFromStorage=function(){var e;return(e=this._loadFromStorage())?this._parseState(e):null},e.prototype._parseState=function(e){var t;return(t=$.parseJSON(e))&&t.selected_node&&s(t.selected_node)&&(t.selected_node=[t.selected_node]),t},e.prototype._loadFromStorage=function(){return this.tree_widget.options.onGetStateFromStorage?this.tree_widget.options.onGetStateFromStorage():this.supportsLocalStorage()?localStorage.getItem(this.getCookieName()):$.cookie?($.cookie.raw=!0,$.cookie(this.getCookieName())):null},e.prototype.getState=function(){var e,t;return e=function(e){return function(){var t;return t=[],e.tree_widget.tree.iterate(function(e){return e.is_open&&e.id&&e.hasChildren()&&t.push(e.id),!0}),t}}(this),t=function(e){return function(){var t;return function(){var e,i,n,s;for(s=[],e=0,i=(n=this.tree_widget.getSelectedNodes()).length;e<i;e++)t=n[e],s.push(t.id);return s}.call(e)}}(this),{open_nodes:e(),selected_node:t()}},e.prototype.setInitialState=function(e){var t;return!!e&&(t=this._openInitialNodes(e.open_nodes),this._selectInitialNodes(e.selected_node),t)},e.prototype._openInitialNodes=function(e){var t,i,n,s,o;for(n=!1,t=0,i=e.length;t<i;t++)o=e[t],(s=this.tree_widget.getNodeById(o))&&(s.load_on_demand?n=!0:s.is_open=!0);return n},e.prototype._selectInitialNodes=function(e){var t,i,n,s,o;for(o=0,t=0,i=e.length;t<i;t++)s=e[t],(n=this.tree_widget.getNodeById(s))&&(o+=1,this.tree_widget.select_node_handler.addToSelection(n));return 0!==o},e.prototype.setInitialStateOnDemand=function(e){if(e)return this._setInitialStateOnDemand(e.open_nodes,e.selected_node)},e.prototype._setInitialStateOnDemand=function(e,t){var i,n;return n=function(n){return function(){var s,o,r,a,l;for(r=[],s=0,o=e.length;s<o;s++)l=e[s],(a=n.tree_widget.getNodeById(l))?a.is_loading||(a.load_on_demand?i(a):n.tree_widget._openNode(a,!1)):r.push(l);if(e=r,n._selectInitialNodes(t))return n.tree_widget._refreshElements()}}(this),i=function(e){return function(t){return e.tree_widget._openNode(t,!1,n)}}(this),n()},e.prototype.getCookieName=function(){return"string"==typeof this.tree_widget.options.saveState?this.tree_widget.options.saveState:"tree"},e.prototype.supportsLocalStorage=function(){var e;return e=function(){var e;if("undefined"==typeof localStorage||null===localStorage)return!1;try{e="_storage_test",sessionStorage.setItem(e,!0),sessionStorage.removeItem(e)}catch(e){return e,!1}return!0},null==this._supportsLocalStorage&&(this._supportsLocalStorage=e()),this._supportsLocalStorage},e.prototype.getNodeIdToBeSelected=function(){var e;return(e=this.getStateFromStorage())&&e.selected_node?e.selected_node[0]:null},e}(),t.exports=n},{"./util":12}],8:[function(e,t,i){var n;n=function(){function e(e){this.tree_widget=e,this.previous_top=-1,this._initScrollParent()}return e.prototype._initScrollParent=function(){var e,t,i;return t=function(e){return function(){var t,i,n,s,o,r;if(t=["overflow","overflow-y"],(n=function(e){var i,n,s,o;for(n=0,s=t.length;n<s;n++)if(i=t[n],"auto"===(o=$.css(e,i))||"scroll"===o)return!0;return!1})(e.tree_widget.$el[0]))return e.tree_widget.$el;for(s=0,o=(r=e.tree_widget.$el.parents()).length;s<o;s++)if(i=r[s],n(i))return $(i);return null}}(this),i=function(e){return function(){return e.scroll_parent_top=0,e.$scroll_parent=null}}(this),"fixed"===this.tree_widget.$el.css("position")&&i(),(e=t())&&e.length&&"HTML"!==e[0].tagName?(this.$scroll_parent=e,this.scroll_parent_top=this.$scroll_parent.offset().top):i()},e.prototype.checkScrolling=function(){var e;if((e=this.tree_widget.dnd_handler.hovered_area)&&e.top!==this.previous_top)return this.previous_top=e.top,this.$scroll_parent?this._handleScrollingWithScrollParent(e):this._handleScrollingWithDocument(e)},e.prototype._handleScrollingWithScrollParent=function(e){return this.scroll_parent_top+this.$scroll_parent[0].offsetHeight-e.bottom<20?(this.$scroll_parent[0].scrollTop+=20,this.tree_widget.refreshHitAreas(),this.previous_top=-1):e.top-this.scroll_parent_top<20?(this.$scroll_parent[0].scrollTop-=20,this.tree_widget.refreshHitAreas(),this.previous_top=-1):void 0},e.prototype._handleScrollingWithDocument=function(e){return e.top-$(document).scrollTop()<20?$(document).scrollTop($(document).scrollTop()-20):$(window).height()-(e.bottom-$(document).scrollTop())<20?$(document).scrollTop($(document).scrollTop()+20):void 0},e.prototype.scrollTo=function(e){var t;return this.$scroll_parent?this.$scroll_parent[0].scrollTop=e:(t=this.tree_widget.$el.offset().top,$(document).scrollTop(e+t))},e.prototype.isScrolledIntoView=function(e){var t,i,n,s,o;return t=$(e),this.$scroll_parent?(o=0,s=this.$scroll_parent.height(),i=(n=t.offset().top-this.scroll_parent_top)+t.height()):(s=(o=$(window).scrollTop())+$(window).height(),i=(n=t.offset().top)+t.height()),i<=s&&n>=o},e}(),t.exports=n},{}],9:[function(e,t,i){var n;n=function(){function e(e){this.tree_widget=e,this.clear()}return e.prototype.getSelectedNode=function(){var e;return!!(e=this.getSelectedNodes()).length&&e[0]},e.prototype.getSelectedNodes=function(){var e,t,i;if(this.selected_single_node)return[this.selected_single_node];i=[];for(e in this.selected_nodes)(t=this.tree_widget.getNodeById(e))&&i.push(t);return i},e.prototype.getSelectedNodesUnder=function(e){var t,i,n;if(this.selected_single_node)return e.isParentOf(this.selected_single_node)?[this.selected_single_node]:[];n=[];for(t in this.selected_nodes)(i=this.tree_widget.getNodeById(t))&&e.isParentOf(i)&&n.push(i);return n},e.prototype.isNodeSelected=function(e){return e.id?this.selected_nodes[e.id]:!!this.selected_single_node&&this.selected_single_node.element===e.element},e.prototype.clear=function(){return this.selected_nodes={},this.selected_single_node=null},e.prototype.removeFromSelection=function(e,t){if(null==t&&(t=!1),e.id){if(delete this.selected_nodes[e.id],t)return e.iterate(function(t){return function(i){return delete t.selected_nodes[e.id],!0}}(this))}else if(this.selected_single_node&&e.element===this.selected_single_node.element)return this.selected_single_node=null},e.prototype.addToSelection=function(e){return e.id?this.selected_nodes[e.id]=!0:this.selected_single_node=e},e}(),t.exports=n},{}],10:[function(e,t,i){var n,s=[].slice;n=function(){function e(e,t){this.$el=$(e),this.options=$.extend({},this.defaults,t)}return e.prototype.defaults={},e.prototype.destroy=function(){return this._deinit()},e.prototype._init=function(){return null},e.prototype._deinit=function(){return null},e.register=function(t,i){var n,o,r,a,l;return a=function(){return"simple_widget_"+i},l=function(t,i){var n;return(n=$.data(t,i))&&n instanceof e?n:null},o=function(e,i){var n,s,o,r,d;for(n=a(),o=0,r=e.length;o<r;o++)s=e[o],l(s,n)||(d=new t(s,i),$.data(s,n)||$.data(s,n,d),d._init());return e},r=function(e){var t,i,n,s,o,r;for(t=a(),o=[],n=0,s=e.length;n<s;n++)i=e[n],(r=l(i,t))&&r.destroy(),o.push($.removeData(i,t));return o},n=function(t,i,n){var s,o,r,l,d,h;for(l=null,o=0,r=t.length;o<r;o++)s=t[o],(d=$.data(s,a()))&&d instanceof e&&(h=d[i])&&"function"==typeof h&&(l=h.apply(d,n));return l},$.fn[i]=function(){var e,i,a,l,d;return a=arguments[0],i=2<=arguments.length?s.call(arguments,1):[],e=this,void 0===a||"object"==typeof a?(d=a,o(e,d)):"string"==typeof a&&"_"!==a[0]?"destroy"===(l=a)?r(e):"get_widget_class"===l?t:n(e,l,i):void 0}},e}(),t.exports=n},{}],11:[function(e,t,i){var n,s,o,r,a,l,d,h,c,u,p,f,g,m,v,y,b,w=function(e,t){function i(){this.constructor=e}for(var n in t)_.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},_={}.hasOwnProperty;m=e("./version"),n=e("./drag_and_drop_handler"),s=e("./elements_renderer"),a=e("./key_handler"),l=e("./mouse.widget"),u=e("./save_state_handler"),p=e("./scroll_handler"),f=e("./select_node_handler"),g=e("./simple.widget"),y=e("./node"),d=y.Node,c=y.Position,b=e("./util"),v=e("./node_element"),h=v.NodeElement,o=v.FolderElement,(r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return w(t,l),t.prototype.defaults={autoOpen:!1,saveState:!1,dragAndDrop:!1,selectable:!0,useContextMenu:!0,onCanSelectNode:null,onSetStateFromStorage:null,onGetStateFromStorage:null,onCreateLi:null,onIsMoveHandle:null,onCanMove:null,onCanMoveTo:null,onLoadFailed:null,autoEscape:!0,dataUrl:null,closedIcon:"&#x25ba;",openedIcon:"&#x25bc;",slide:!0,nodeClass:d,dataFilter:null,keyboardSupport:!0,openFolderDelay:500},t.prototype.toggle=function(e,t){return null==t&&(t=null),null===t&&(t=this.options.slide),e.is_open?this.closeNode(e,t):this.openNode(e,t)},t.prototype.getTree=function(){return this.tree},t.prototype.selectNode=function(e){return this._selectNode(e,!1)},t.prototype._selectNode=function(e,t){var i,n,s,o;if(null==t&&(t=!1),this.select_node_handler){if(i=function(t){return function(){return t.options.onCanSelectNode?t.options.selectable&&t.options.onCanSelectNode(e):t.options.selectable}}(this),s=function(t){return function(){var i;if((i=e.parent)&&i.parent&&!i.is_open)return t.openNode(i,!1)}}(this),o=function(e){return function(){if(e.options.saveState)return e.save_state_handler.saveState()}}(this),!e)return this._deselectCurrentNode(),void o();if(i())return this.select_node_handler.isNodeSelected(e)?t&&(this._deselectCurrentNode(),this._triggerEvent("tree.select",{node:null,previous_node:e})):(n=this.getSelectedNode(),this._deselectCurrentNode(),this.addToSelection(e),this._triggerEvent("tree.select",{node:e,deselected_node:n}),s()),o()}},t.prototype.getSelectedNode=function(){return this.select_node_handler?this.select_node_handler.getSelectedNode():null},t.prototype.toJson=function(){return JSON.stringify(this.tree.getData())},t.prototype.loadData=function(e,t){return this._loadData(e,t)},t.prototype.loadDataFromUrl=function(e,t,i){return"string"!==$.type(e)&&(i=t,t=e,e=null),this._loadDataFromUrl(e,t,i)},t.prototype.reload=function(){return this.loadDataFromUrl()},t.prototype._loadDataFromUrl=function(e,t,i){var n,s,o,r,a,l;if(n=null,s=function(e){return function(){return(n=t?$(t.element):e.element).addClass("jqtree-loading")}}(this),l=function(){if(n)return n.removeClass("jqtree-loading")},a=function(){if("string"===$.type(e)&&(e={url:e}),!e.method)return e.method="get"},o=function(e){return function(n){if(l(),e._loadData(n,t),i&&$.isFunction(i))return i()}}(this),r=function(t){return function(){return a(),$.ajax({url:e.url,data:e.data,type:e.method.toUpperCase(),cache:!1,dataType:"json",success:function(e){var i;return i=$.isArray(e)||"object"==typeof e?e:$.parseJSON(e),t.options.dataFilter&&(i=t.options.dataFilter(i)),o(i)},error:function(e){if(l(),t.options.onLoadFailed)return t.options.onLoadFailed(e)}})}}(this),e||(e=this._getDataUrlInfo(t)),s(),e){if(!$.isArray(e))return r();o(e)}else l()},t.prototype._loadData=function(e,t){var i,n;if(null==t&&(t=null),i=function(e){return function(){var i,n,s,o;if(e.select_node_handler)for(i=0,n=(o=e.select_node_handler.getSelectedNodesUnder(t)).length;i<n;i++)s=o[i],e.select_node_handler.removeFromSelection(s);return null}}(this),n=function(i){return function(){return t.loadFromData(e),t.load_on_demand=!1,t.is_loading=!1,i._refreshElements(t)}}(this),e)return this._triggerEvent("tree.load_data",{tree_data:e}),t?(i(),n()):this._initTree(e),this.isDragging()?this.dnd_handler.refresh():void 0},t.prototype.getNodeById=function(e){return this.tree.getNodeById(e)},t.prototype.getNodeByName=function(e){return this.tree.getNodeByName(e)},t.prototype.getNodesByProperty=function(e,t){return this.tree.getNodesByProperty(e,t)},t.prototype.openNode=function(e,t){return null==t&&(t=null),null===t&&(t=this.options.slide),this._openNode(e,t)},t.prototype._openNode=function(e,t,i){var n,s;if(null==t&&(t=!0),n=function(e){return function(t,i,n){return new o(t,e).open(n,i)}}(this),e.isFolder()){if(e.load_on_demand)return this._loadFolderOnDemand(e,t,i);for(s=e.parent;s;)s.parent&&n(s,!1,null),s=s.parent;return n(e,t,i),this._saveState()}},t.prototype._loadFolderOnDemand=function(e,t,i){return null==t&&(t=!0),e.is_loading=!0,this._loadDataFromUrl(null,e,function(n){return function(){return n._openNode(e,t,i)}}(this))},t.prototype.closeNode=function(e,t){if(null==t&&(t=null),null===t&&(t=this.options.slide),e.isFolder())return new o(e,this).close(t),this._saveState()},t.prototype.isDragging=function(){return!!this.dnd_handler&&this.dnd_handler.is_dragging},t.prototype.refreshHitAreas=function(){return this.dnd_handler.refresh()},t.prototype.addNodeAfter=function(e,t){var i;return i=t.addAfter(e),this._refreshElements(t.parent),i},t.prototype.addNodeBefore=function(e,t){var i;return i=t.addBefore(e),this._refreshElements(t.parent),i},t.prototype.addParentNode=function(e,t){var i;return i=t.addParent(e),this._refreshElements(i.parent),i},t.prototype.removeNode=function(e){var t;if(t=e.parent)return this.select_node_handler.removeFromSelection(e,!0),e.remove(),this._refreshElements(t)},t.prototype.appendNode=function(e,t){var i;return t=t||this.tree,i=t.append(e),this._refreshElements(t),i},t.prototype.prependNode=function(e,t){var i;return t||(t=this.tree),i=t.prepend(e),this._refreshElements(t),i},t.prototype.updateNode=function(e,t){var i;return(i=t.id&&t.id!==e.id)&&this.tree.removeNodeFromIndex(e),e.setData(t),i&&this.tree.addNodeToIndex(e),this.renderer.renderFromNode(e),this._selectCurrentNode()},t.prototype.moveNode=function(e,t,i){var n;return n=c.nameToIndex(i),this.tree.moveNode(e,t,n),this._refreshElements()},t.prototype.getStateFromStorage=function(){return this.save_state_handler.getStateFromStorage()},t.prototype.addToSelection=function(e){if(e)return this.select_node_handler.addToSelection(e),this._getNodeElementForNode(e).select(),this._saveState()},t.prototype.getSelectedNodes=function(){return this.select_node_handler.getSelectedNodes()},t.prototype.isNodeSelected=function(e){return this.select_node_handler.isNodeSelected(e)},t.prototype.removeFromSelection=function(e){return this.select_node_handler.removeFromSelection(e),this._getNodeElementForNode(e).deselect(),this._saveState()},t.prototype.scrollToNode=function(e){var t,i;return t=$(e.element),i=t.offset().top-this.$el.offset().top,this.scroll_handler.scrollTo(i)},t.prototype.getState=function(){return this.save_state_handler.getState()},t.prototype.setState=function(e){return this.save_state_handler.setInitialState(e),this._refreshElements()},t.prototype.setOption=function(e,t){return this.options[e]=t},t.prototype.moveDown=function(){if(this.key_handler)return this.key_handler.moveDown()},t.prototype.moveUp=function(){if(this.key_handler)return this.key_handler.moveUp()},t.prototype.getVersion=function(){return m},t.prototype._init=function(){if(t.__super__._init.call(this),this.element=this.$el,this.mouse_delay=300,this.is_initialized=!1,this.renderer=new s(this),null!=u?this.save_state_handler=new u(this):this.options.saveState=!1,null!=f&&(this.select_node_handler=new f(this)),null!=n?this.dnd_handler=new n(this):this.options.dragAndDrop=!1,null!=p&&(this.scroll_handler=new p(this)),null!=a&&null!=f&&(this.key_handler=new a(this)),this._initData(),this.element.click($.proxy(this._click,this)),this.element.dblclick($.proxy(this._dblclick,this)),this.options.useContextMenu)return this.element.bind("contextmenu",$.proxy(this._contextmenu,this))},t.prototype._deinit=function(){return this.element.empty(),this.element.unbind(),this.key_handler&&this.key_handler.deinit(),this.tree=null,t.__super__._deinit.call(this)},t.prototype._initData=function(){return this.options.data?this._loadData(this.options.data):this._loadDataFromUrl(this._getDataUrlInfo())},t.prototype._getDataUrlInfo=function(e){var t,i;return t=this.options.dataUrl||this.element.data("url"),i=function(i){return function(){var n,s,o;return o={url:t},e&&e.id?(n={node:e.id},o.data=n):(s=i._getNodeIdToBeSelected())&&(n={selected_node:s},o.data=n),o}}(this),$.isFunction(t)?t(e):"string"===$.type(t)?i():t},t.prototype._getNodeIdToBeSelected=function(){return this.options.saveState?this.save_state_handler.getNodeIdToBeSelected():null},t.prototype._initTree=function(e){var t;if(this.tree=new this.options.nodeClass(null,!0,this.options.nodeClass),this.select_node_handler&&this.select_node_handler.clear(),this.tree.loadFromData(e),t=this._setInitialState(),this._refreshElements(),t&&this._setInitialStateOnDemand(),!this.is_initialized)return this.is_initialized=!0,this._triggerEvent("tree.init")},t.prototype._setInitialState=function(){var e,t,i,n,s;return s=function(e){return function(){var t,i;return e.options.saveState&&e.save_state_handler&&(i=e.save_state_handler.getStateFromStorage())?(t=e.save_state_handler.setInitialState(i),[!0,t]):[!1,!1]}}(this),e=function(e){return function(){var t,i;return!1!==e.options.autoOpen&&(t=e._getAutoOpenMaxLevel(),i=!1,e.tree.iterate(function(e,n){return e.load_on_demand?(i=!0,!1):!!e.hasChildren()&&(e.is_open=!0,n!==t)}),i)}}(this),n=s(),t=n[0],i=n[1],t||(i=e()),i},t.prototype._setInitialStateOnDemand=function(){var e,t;if(t=function(e){return function(){var t;return!(!e.options.saveState||!e.save_state_handler)&&(!!(t=e.save_state_handler.getStateFromStorage())&&(e.save_state_handler.setInitialStateOnDemand(t),!0))}}(this),e=function(e){return function(){var t,i,n;return i=e._getAutoOpenMaxLevel(),[],t=function(t){return e._openNode(t,!1,n)},(n=function(){return e.tree.iterate(function(n,s){return n.load_on_demand?(n.is_loading||t(n),!1):(e._openNode(n,!1),s!==i)})})()}}(this),!t())return e()},t.prototype._getAutoOpenMaxLevel=function(){return!0===this.options.autoOpen?-1:parseInt(this.options.autoOpen)},t.prototype._refreshElements=function(e){return null==e&&(e=null),this.renderer.render(e),this._triggerEvent("tree.refresh")},t.prototype._click=function(e){var t,i;if(t=this._getClickTarget(e.target)){if("button"===t.type)return this.toggle(t.node,this.options.slide),e.preventDefault(),e.stopPropagation();if("label"===t.type&&(i=t.node,!this._triggerEvent("tree.click",{node:i,click_event:e}).isDefaultPrevented()))return this._selectNode(i,!0)}},t.prototype._dblclick=function(e){var t;if((t=this._getClickTarget(e.target))&&"label"===t.type)return this._triggerEvent("tree.dblclick",{node:t.node,click_event:e})},t.prototype._getClickTarget=function(e){var t,i,n,s;if(n=$(e),(t=n.closest(".jqtree-toggler")).length){if(s=this._getNode(t))return{type:"button",node:s}}else if((i=n.closest(".jqtree-element")).length&&(s=this._getNode(i)))return{type:"label",node:s};return null},t.prototype._getNode=function(e){var t;return 0===(t=e.closest("li.jqtree_common")).length?null:t.data("node")},t.prototype._getNodeElementForNode=function(e){return e.isFolder()?new o(e,this):new h(e,this)},t.prototype._getNodeElement=function(e){var t;return(t=this._getNode(e))?this._getNodeElementForNode(t):null},t.prototype._contextmenu=function(e){var t,i;if((t=$(e.target).closest("ul.jqtree-tree .jqtree-element")).length&&(i=this._getNode(t)))return e.preventDefault(),e.stopPropagation(),this._triggerEvent("tree.contextmenu",{node:i,click_event:e}),!1},t.prototype._saveState=function(){if(this.options.saveState)return this.save_state_handler.saveState()},t.prototype._mouseCapture=function(e){return!!this.options.dragAndDrop&&this.dnd_handler.mouseCapture(e)},t.prototype._mouseStart=function(e){return!!this.options.dragAndDrop&&this.dnd_handler.mouseStart(e)},t.prototype._mouseDrag=function(e){var t;return!!this.options.dragAndDrop&&(t=this.dnd_handler.mouseDrag(e),this.scroll_handler&&this.scroll_handler.checkScrolling(),t)},t.prototype._mouseStop=function(e){return!!this.options.dragAndDrop&&this.dnd_handler.mouseStop(e)},t.prototype._triggerEvent=function(e,t){var i;return i=$.Event(e),$.extend(i,t),this.element.trigger(i),i},t.prototype.testGenerateHitAreas=function(e){return this.dnd_handler.current_item=this._getNodeElementForNode(e),this.dnd_handler.generateHitAreas(),this.dnd_handler.hit_areas},t.prototype._selectCurrentNode=function(){var e;if((e=this.getSelectedNode())&&(v=this._getNodeElementForNode(e)))return v.select()},t.prototype._deselectCurrentNode=function(){var e;if(e=this.getSelectedNode())return this.removeFromSelection(e)},t}()).getModule=function(e){return{node:y,util:b}[e]},g.register(r,"tree")},{"./drag_and_drop_handler":1,"./elements_renderer":2,"./key_handler":3,"./mouse.widget":4,"./node":5,"./node_element":6,"./save_state_handler":7,"./scroll_handler":8,"./select_node_handler":9,"./simple.widget":10,"./util":12,"./version":13}],12:[function(e,t,i){var n,s,o,r;n=function(e,t){var i,n,s;for(i=n=0,s=e.length;n<s;i=++n)if(e[i]===t)return i;return-1},o=function(e,t){return e.indexOf?e.indexOf(t):n(e,t)},r=function(e){return"number"==typeof e&&e%1==0},s=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},t.exports={_indexOf:n,html_escape:s,indexOf:o,isInt:r}},{}],13:[function(e,t,i){t.exports="1.0.0"},{}]},{},[11]),function(e){"use strict";e.extend({tablesorter:new function(){function t(){var e=arguments[0],t=arguments.length>1?Array.prototype.slice.call(arguments):e;"undefined"!=typeof console&&void 0!==console.log?console[/error/i.test(e)?"error":/warn/i.test(e)?"warn":"log"](t):alert(t)}function i(e,i){t(e+" ("+((new Date).getTime()-i.getTime())+"ms)")}function n(e){for(var t in e)return!1;return!0}function s(t,i,n){if(!i)return"";var s,o=t.config,r=o.textExtraction||"",a="";return a="basic"===r?e(i).attr(o.textAttribute)||i.textContent||i.innerText||e(i).text()||"":"function"==typeof r?r(i,t,n):"function"==typeof(s=C.getColumnData(t,r,n))?s(i,t,n):i.textContent||i.innerText||e(i).text()||"",e.trim(a)}function o(e,i,n,o){for(var r,a=C.parsers.length,l=!1,d="",h=!0;""===d&&h;)i[++n]?(d=s(e,l=i[n].cells[o],o),e.config.debug&&t("Checking if value was empty on row "+n+", column: "+o+': "'+d+'"')):h=!1;for(;--a>=0;)if((r=C.parsers[a])&&"text"!==r.id&&r.is&&r.is(d,e,l))return r;return C.getParserById("text")}function r(e){var n,s,r,a,l,d,h,c,u,p,f=e.config,g=f.$tbodies=f.$table.children("tbody:not(."+f.cssInfoBlock+")"),m=0,v="",y=g.length;if(0===y)return f.debug?t("Warning: *Empty table!* Not building a parser cache"):"";for(f.debug&&(p=new Date,t("Detecting parsers for each column")),s={extractors:[],parsers:[]};m<y;){if((n=g[m].rows)[m])for(r=f.columns,a=0;a<r;a++)l=f.$headers.filter('[data-column="'+a+'"]:last'),d=C.getColumnData(e,f.headers,a),u=C.getParserById(C.getData(l,d,"extractor")),c=C.getParserById(C.getData(l,d,"sorter")),h="false"===C.getData(l,d,"parser"),f.empties[a]=(C.getData(l,d,"empty")||f.emptyTo||(f.emptyToBottom?"bottom":"top")).toLowerCase(),f.strings[a]=(C.getData(l,d,"string")||f.stringTo||"max").toLowerCase(),h&&(c=C.getParserById("no-parser")),u||(u=!1),c||(c=o(e,n,-1,a)),f.debug&&(v+="column:"+a+"; extractor:"+u.id+"; parser:"+c.id+"; string:"+f.strings[a]+"; empty: "+f.empties[a]+"\n"),s.parsers[a]=c,s.extractors[a]=u;m+=s.parsers.length?y:1}f.debug&&(t(v||"No parsers detected"),i("Completed detecting parsers",p)),f.parsers=s.parsers,f.extractors=s.extractors}function a(n){var o,r,a,l,d,h,c,u,p,f,g,m,v,y=n.config,b=y.$table.children("tbody"),w=y.extractors,_=y.parsers;if(y.cache={},y.totalRows=0,!_)return y.debug?t("Warning: *Empty table!* Not building a cache"):"";for(y.debug&&(f=new Date),y.showProcessing&&C.isProcessing(n,!0),c=0;c<b.length;c++)if(v=[],o=y.cache[c]={normalized:[]},!b.eq(c).hasClass(y.cssInfoBlock)){for(g=b[c]&&b[c].rows.length||0,d=0;d<g;++d)if(m={child:[]},u=e(b[c].rows[d]),[new Array(y.columns)],p=[],u.hasClass(y.cssChildRow)&&0!==d)r=o.normalized.length-1,o.normalized[r][y.columns].$row=o.normalized[r][y.columns].$row.add(u),u.prev().hasClass(y.cssChildRow)||u.prev().addClass(C.css.cssHasChild),m.child[r]=e.trim(u[0].textContent||u[0].innerText||u.text()||"");else{for(m.$row=u,m.order=d,h=0;h<y.columns;++h)void 0!==_[h]?(r=s(n,u[0].cells[h],h),a=void 0===w[h].id?r:w[h].format(r,n,u[0].cells[h],h),l="no-parser"===_[h].id?"":_[h].format(a,n,u[0].cells[h],h),p.push(y.ignoreCase&&"string"==typeof l?l.toLowerCase():l),"numeric"===(_[h].type||"").toLowerCase()&&(v[h]=Math.max(Math.abs(l)||0,v[h]||0))):y.debug&&t("No parser found for cell:",u[0].cells[h],"does it have a header?");p[y.columns]=m,o.normalized.push(p)}o.colMax=v,y.totalRows+=o.normalized.length}y.showProcessing&&C.isProcessing(n),y.debug&&i("Building cache for "+g+" rows",f)}function l(t,s){var o,r,a,l,d,h,c,u=t.config,p=u.widgetOptions,f=t.tBodies,g=[],m=u.cache;if(n(m))return u.appender?u.appender(t,g):t.isUpdating?u.$table.trigger("updateComplete",t):"";for(u.debug&&(c=new Date),h=0;h<f.length;h++)if((a=e(f[h])).length&&!a.hasClass(u.cssInfoBlock)){for(l=C.processTbody(t,a,!0),r=(o=m[h].normalized).length,d=0;d<r;d++)g.push(o[d][u.columns].$row),u.appender&&(!u.pager||u.pager.removeRows&&p.pager_removeRows||u.pager.ajax)||l.append(o[d][u.columns].$row);C.processTbody(t,l,!1)}u.appender&&u.appender(t,g),u.debug&&i("Rebuilt table",c),s||u.appender||C.applyWidget(t),t.isUpdating&&u.$table.trigger("updateComplete",t)}function d(e){return/^d/i.test(e)||1===e}function h(n){var s,o,r,a,l,h,c,p=n.config;p.headerList=[],p.headerContent=[],p.debug&&(c=new Date),p.columns=C.computeColumnIndex(p.$table.children("thead, tfoot").children("tr")),a=p.cssIcon?'<i class="'+(p.cssIcon===C.css.icon?C.css.icon:p.cssIcon+" "+C.css.icon)+'"></i>':"",p.$headers=e(n).find(p.selectorHeaders).each(function(t){o=e(this),s=C.getColumnData(n,p.headers,t,!0),p.headerContent[t]=e(this).html(),""!==p.headerTemplate&&(l=p.headerTemplate.replace(/\{content\}/g,e(this).html()).replace(/\{icon\}/g,a),p.onRenderTemplate&&(r=p.onRenderTemplate.apply(o,[t,l]))&&"string"==typeof r&&(l=r),e(this).html('<div class="'+C.css.headerIn+'">'+l+"</div>")),p.onRenderHeader&&p.onRenderHeader.apply(o,[t]),this.column=parseInt(e(this).attr("data-column"),10),this.order=d(C.getData(o,s,"sortInitialOrder")||p.sortInitialOrder)?[1,0,2]:[0,1,2],this.count=-1,this.lockedOrder=!1,void 0!==(h=C.getData(o,s,"lockedOrder")||!1)&&!1!==h&&(this.order=this.lockedOrder=d(h)?[1,1,1]:[0,0,0]),o.addClass(C.css.header+" "+p.cssHeader),p.headerList[t]=this,o.parent().addClass(C.css.headerRow+" "+p.cssHeaderRow).attr("role","row"),p.tabIndex&&o.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"}),u(n),p.debug&&(i("Built headers:",c),t(p.$headers))}function c(e,t,i){var n=e.config;n.$table.find(n.selectorRemove).remove(),r(e),a(e),w(n.$table,t,i)}function u(t){var i,n,s,o=t.config;o.$headers.each(function(r,a){n=e(a),s=C.getColumnData(t,o.headers,r,!0),i="false"===C.getData(a,s,"sorter")||"false"===C.getData(a,s,"parser"),a.sortDisabled=i,n[i?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+i),t.id&&(i?n.removeAttr("aria-controls"):n.attr("aria-controls",t.id))})}function p(t){var i,n,s,o=t.config,r=o.sortList,a=r.length,l=C.css.sortNone+" "+o.cssNone,d=[C.css.sortAsc+" "+o.cssAsc,C.css.sortDesc+" "+o.cssDesc],h=["ascending","descending"],c=e(t).find("tfoot tr").children().add(o.$extraHeaders).removeClass(d.join(" "));for(o.$headers.removeClass(d.join(" ")).addClass(l).attr("aria-sort","none"),n=0;n<a;n++)if(2!==r[n][1]&&(i=o.$headers.not(".sorter-false").filter('[data-column="'+r[n][0]+'"]'+(1===a?":last":""))).length){for(s=0;s<i.length;s++)i[s].sortDisabled||i.eq(s).removeClass(l).addClass(d[r[n][1]]).attr("aria-sort",h[r[n][1]]);c.length&&c.filter('[data-column="'+r[n][0]+'"]').removeClass(l).addClass(d[r[n][1]])}o.$headers.not(".sorter-false").each(function(){var t=e(this),i=this.order[(this.count+1)%(o.sortReset?3:2)],n=t.text()+": "+C.language[t.hasClass(C.css.sortAsc)?"sortAsc":t.hasClass(C.css.sortDesc)?"sortDesc":"sortNone"]+C.language[0===i?"nextAsc":1===i?"nextDesc":"nextNone"];t.attr("aria-label",n)})}function f(t){var i,n,s=t.config;s.widthFixed&&0===s.$table.find("colgroup").length&&(i=e("<colgroup>"),n=e(t).width(),e(t.tBodies).not("."+s.cssInfoBlock).find("tr:first").children(":visible").each(function(){i.append(e("<col>").css("width",parseInt(e(this).width()/n*1e3,10)/10+"%"))}),s.$table.prepend(i))}function g(t,i){var n,s,o,r,a,l=t.config,d=i||l.sortList;l.sortList=[],e.each(d,function(t,i){if(r=parseInt(i[0],10),o=l.$headers.filter('[data-column="'+r+'"]:last')[0]){switch(s=(""+i[1]).match(/^(1|d|s|o|n)/),s=s?s[0]:""){case"1":case"d":s=1;break;case"s":s=a||0;break;case"o":n=o.order[(a||0)%(l.sortReset?3:2)],s=0===n?1:1===n?0:2;break;case"n":o.count=o.count+1,s=o.order[o.count%(l.sortReset?3:2)];break;default:s=0}a=0===t?s:a,n=[r,parseInt(s,10)||0],l.sortList.push(n),s=e.inArray(n[1],o.order),o.count=s>=0?s:n[1]%(l.sortReset?3:2)}})}function m(e,t){return e&&e[t]?e[t].type||"":""}function v(t,i,n){if(t.isUpdating)return setTimeout(function(){v(t,i,n)},50);var s,o,r,a,d,h=t.config,c=!n[h.sortMultiSortKey],u=h.$table;if(u.trigger("sortStart",t),i.count=n[h.sortResetKey]?2:(i.count+1)%(h.sortReset?3:2),h.sortRestart&&(o=i,h.$headers.each(function(){this===o||!c&&e(this).is("."+C.css.sortDesc+",."+C.css.sortAsc)||(this.count=-1)})),o=i.column,c){if(h.sortList=[],null!==h.sortForce)for(s=h.sortForce,r=0;r<s.length;r++)s[r][0]!==o&&h.sortList.push(s[r]);if((a=i.order[i.count])<2&&(h.sortList.push([o,a]),i.colSpan>1))for(r=1;r<i.colSpan;r++)h.sortList.push([o+r,a])}else{if(h.sortAppend&&h.sortList.length>1)for(r=0;r<h.sortAppend.length;r++)(d=C.isValueInArray(h.sortAppend[r][0],h.sortList))>=0&&h.sortList.splice(d,1);if(C.isValueInArray(o,h.sortList)>=0)for(r=0;r<h.sortList.length;r++)d=h.sortList[r],a=h.$headers.filter('[data-column="'+d[0]+'"]:last')[0],d[0]===o&&(d[1]=a.order[i.count],2===d[1]&&(h.sortList.splice(r,1),a.count=-1));else if((a=i.order[i.count])<2&&(h.sortList.push([o,a]),i.colSpan>1))for(r=1;r<i.colSpan;r++)h.sortList.push([o+r,a])}if(null!==h.sortAppend)for(s=h.sortAppend,r=0;r<s.length;r++)s[r][0]!==o&&h.sortList.push(s[r]);u.trigger("sortBegin",t),setTimeout(function(){p(t),y(t),l(t),u.trigger("sortEnd",t)},1)}function y(e){var t,s,o,r,a,l,d,h,c,u,p=0,f=e.config,g=f.textSorter||"",v=f.sortList,y=v.length,b=e.tBodies.length;if(!f.serverSideSorting&&!n(f.cache)){for(f.debug&&(a=new Date),s=0;s<b;s++)l=f.cache[s].colMax,f.cache[s].normalized.sort(function(i,n){for(t=0;t<y;t++){if(r=v[t][0],d=v[t][1],p=0===d,f.sortStable&&i[r]===n[r]&&1===y)return i[f.columns].order-n[f.columns].order;if((o=/n/i.test(m(f.parsers,r)))&&f.strings[r]?(o="boolean"==typeof f.string[f.strings[r]]?(p?1:-1)*(f.string[f.strings[r]]?-1:1):f.strings[r]?f.string[f.strings[r]]||0:0,h=f.numberSorter?f.numberSorter(i[r],n[r],p,l[r],e):C["sortNumeric"+(p?"Asc":"Desc")](i[r],n[r],o,l[r],r,e)):(c=p?i:n,u=p?n:i,h="function"==typeof g?g(c[r],u[r],p,r,e):"object"==typeof g&&g.hasOwnProperty(r)?g[r](c[r],u[r],p,r,e):C["sortNatural"+(p?"Asc":"Desc")](i[r],n[r],r,e,f)),h)return h}return i[f.columns].order-n[f.columns].order});f.debug&&i("Sorting on "+v.toString()+" and dir "+d+" time",a)}}function b(t,i){var n=t[0];n.isUpdating&&t.trigger("updateComplete",n),e.isFunction(i)&&i(t[0])}function w(e,t,i){var n=e[0].config.sortList;!1!==t&&!e[0].isProcessing&&n.length?e.trigger("sorton",[n,function(){b(e,i)},!0]):(b(e,i),C.applyWidget(e[0],!1))}function _(t){var i=t.config,o=i.$table;o.unbind("sortReset update updateRows updateCell updateAll addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(i.namespace+" ")).bind("sortReset"+i.namespace,function(n,s){n.stopPropagation(),i.sortList=[],p(t),y(t),l(t),e.isFunction(s)&&s(t)}).bind("updateAll"+i.namespace,function(e,n,s){e.stopPropagation(),t.isUpdating=!0,C.refreshWidgets(t,!0,!0),C.restoreHeaders(t),h(t),C.bindEvents(t,i.$headers,!0),_(t),c(t,n,s)}).bind("update"+i.namespace+" updateRows"+i.namespace,function(e,i,n){e.stopPropagation(),t.isUpdating=!0,u(t),c(t,i,n)}).bind("updateCell"+i.namespace,function(n,r,a,l){n.stopPropagation(),t.isUpdating=!0,o.find(i.selectorRemove).remove();var d,h,c,u,p=o.find("tbody"),f=e(r),g=p.index(e.fn.closest?f.closest("tbody"):f.parents("tbody").filter(":first")),m=e.fn.closest?f.closest("tr"):f.parents("tr").filter(":first");r=f[0],p.length&&g>=0&&(c=p.eq(g).find("tr").index(m),u=f.index(),i.cache[g].normalized[c][i.columns].$row=m,h=void 0===i.extractors[u].id?s(t,r,u):i.extractors[u].format(s(t,r,u),t,r,u),d="no-parser"===i.parsers[u].id?"":i.parsers[u].format(h,t,r,u),i.cache[g].normalized[c][u]=i.ignoreCase&&"string"==typeof d?d.toLowerCase():d,"numeric"===(i.parsers[u].type||"").toLowerCase()&&(i.cache[g].colMax[u]=Math.max(Math.abs(d)||0,i.cache[g].colMax[u]||0)),w(o,a,l))}).bind("addRows"+i.namespace,function(a,l,d,h){if(a.stopPropagation(),t.isUpdating=!0,n(i.cache))u(t),c(t,d,h);else{var p,f,g,m,v,y,b,_=(l=e(l).attr("role","row")).filter("tr").length,C=o.find("tbody").index(l.parents("tbody").filter(":first"));for(i.parsers&&i.parsers.length||r(t),p=0;p<_;p++){for(g=l[p].cells.length,b=[],y={child:[],$row:l.eq(p),order:i.cache[C].normalized.length},f=0;f<g;f++)m=void 0===i.extractors[f].id?s(t,l[p].cells[f],f):i.extractors[f].format(s(t,l[p].cells[f],f),t,l[p].cells[f],f),v="no-parser"===i.parsers[f].id?"":i.parsers[f].format(m,t,l[p].cells[f],f),b[f]=i.ignoreCase&&"string"==typeof v?v.toLowerCase():v,"numeric"===(i.parsers[f].type||"").toLowerCase()&&(i.cache[C].colMax[f]=Math.max(Math.abs(b[f])||0,i.cache[C].colMax[f]||0));b.push(y),i.cache[C].normalized.push(b)}w(o,d,h)}}).bind("updateComplete"+i.namespace,function(){t.isUpdating=!1}).bind("sorton"+i.namespace,function(i,s,r,d){var h=t.config;i.stopPropagation(),o.trigger("sortStart",this),g(t,s),p(t),h.delayInit&&n(h.cache)&&a(t),o.trigger("sortBegin",this),y(t),l(t,d),o.trigger("sortEnd",this),C.applyWidget(t),e.isFunction(r)&&r(t)}).bind("appendCache"+i.namespace,function(i,n,s){i.stopPropagation(),l(t,s),e.isFunction(n)&&n(t)}).bind("updateCache"+i.namespace,function(n,s){i.parsers&&i.parsers.length||r(t),a(t),e.isFunction(s)&&s(t)}).bind("applyWidgetId"+i.namespace,function(e,n){e.stopPropagation(),C.getWidgetById(n).format(t,i,i.widgetOptions)}).bind("applyWidgets"+i.namespace,function(e,i){e.stopPropagation(),C.applyWidget(t,i)}).bind("refreshWidgets"+i.namespace,function(e,i,n){e.stopPropagation(),C.refreshWidgets(t,i,n)}).bind("destroy"+i.namespace,function(e,i,n){e.stopPropagation(),C.destroy(t,i,n)}).bind("resetToLoadState"+i.namespace,function(){C.refreshWidgets(t,!0,!0),i=e.extend(!0,C.defaults,i.originalSettings),t.hasInitialized=!1,C.setup(t,i)})}var C=this;C.version="2.17.8",C.parsers=[],C.widgets=[],C.defaults={theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,widgets:[],widgetOptions:{zebra:["even","odd"]},initWidgets:!0,initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssIcon:"tablesorter-icon",cssInfoBlock:"tablesorter-infoOnly",selectorHeaders:"> thead >tr:not(.filter) > th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]},C.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},C.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},C.log=t,C.benchmark=i,C.construct=function(t){return this.each(function(){var i=this,n=e.extend(!0,{},C.defaults,t);n.originalSettings=t,!i.hasInitialized&&C.buildTable&&"TABLE"!==this.tagName?C.buildTable(i,n):C.setup(i,n)})},C.setup=function(i,n){if(!i||!i.tHead||0===i.tBodies.length||!0===i.hasInitialized)return n.debug?t("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var s="",o=e(i),l=e.metadata;i.hasInitialized=!1,i.isProcessing=!0,i.config=n,e.data(i,"tablesorter",n),n.debug&&e.data(i,"startoveralltimer",new Date),n.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(e.fn.jquery.split(".")),n.string={max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,null:0,top:!0,bottom:!1},n.emptyTo=n.emptyTo.toLowerCase(),n.stringTo=n.stringTo.toLowerCase(),/tablesorter\-/.test(o.attr("class"))||(s=""!==n.theme?" tablesorter-"+n.theme:""),n.table=i,n.$table=o.addClass(C.css.table+" "+n.tableClass+s).attr("role","grid"),n.$headers=o.find(n.selectorHeaders),n.namespace?n.namespace="."+n.namespace.replace(/\W/g,""):n.namespace=".tablesorter"+Math.random().toString(16).slice(2),n.$table.children().children("tr").attr("role","row"),n.$tbodies=o.children("tbody:not(."+n.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),n.$table.find("caption").length&&n.$table.attr("aria-labelledby","theCaption"),n.widgetInit={},n.textExtraction=n.$table.attr("data-text-extraction")||n.textExtraction||"basic",h(i),f(i),r(i),n.totalRows=0,n.delayInit||a(i),C.bindEvents(i,n.$headers,!0),_(i),n.supportsDataObject&&void 0!==o.data().sortlist?n.sortList=o.data().sortlist:l&&o.metadata()&&o.metadata().sortlist&&(n.sortList=o.metadata().sortlist),C.applyWidget(i,!0),n.sortList.length>0?o.trigger("sorton",[n.sortList,{},!n.initWidgets,!0]):(p(i),n.initWidgets&&C.applyWidget(i,!1)),n.showProcessing&&o.unbind("sortBegin"+n.namespace+" sortEnd"+n.namespace).bind("sortBegin"+n.namespace+" sortEnd"+n.namespace,function(e){clearTimeout(n.processTimer),C.isProcessing(i),"sortBegin"===e.type&&(n.processTimer=setTimeout(function(){C.isProcessing(i,!0)},500))}),i.hasInitialized=!0,i.isProcessing=!1,n.debug&&C.benchmark("Overall initialization time",e.data(i,"startoveralltimer")),o.trigger("tablesorter-initialized",i),"function"==typeof n.initialized&&n.initialized(i)},C.getColumnData=function(t,i,n,s){if(void 0!==i&&null!==i){var o,r=(t=e(t)[0]).config;if(i[n])return s?i[n]:i[r.$headers.index(r.$headers.filter('[data-column="'+n+'"]:last'))];for(o in i)if("string"==typeof o&&(s?r.$headers.eq(n).filter(o):r.$headers.filter('[data-column="'+n+'"]:last').filter(o)).length)return i[o]}},C.computeColumnIndex=function(t){var i,n,s,o,r,a,l,d,h,c,u,p,f,g=[],m={},v=0;for(i=0;i<t.length;i++)for(l=t[i].cells,n=0;n<l.length;n++){for(a=l[n],r=e(a),h=(d=a.parentNode.rowIndex)+"-"+r.index(),c=a.rowSpan||1,u=a.colSpan||1,void 0===g[d]&&(g[d]=[]),s=0;s<g[d].length+1;s++)if(void 0===g[d][s]){p=s;break}for(m[h]=p,v=Math.max(p,v),r.attr({"data-column":p}),s=d;s<d+c;s++)for(void 0===g[s]&&(g[s]=[]),f=g[s],o=p;o<p+u;o++)f[o]="x"}return v+1},C.isProcessing=function(t,i,n){var s=(t=e(t))[0].config,o=n||t.find("."+C.css.header);i?(void 0!==n&&s.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&C.isValueInArray(parseFloat(e(this).attr("data-column")),s.sortList)>=0})),t.add(o).addClass(C.css.processing+" "+s.cssProcessing)):t.add(o).removeClass(C.css.processing+" "+s.cssProcessing)},C.processTbody=function(t,i,n){t=e(t)[0];var s;if(n)return t.isProcessing=!0,i.before('<span class="tablesorter-savemyplace"/>'),s=e.fn.detach?i.detach():i.remove();s=e(t).find("span.tablesorter-savemyplace"),i.insertAfter(s),s.remove(),t.isProcessing=!1},C.clearTableBody=function(t){e(t)[0].config.$tbodies.children().detach()},C.bindEvents=function(t,i,s){var o,r=(t=e(t)[0]).config;!0!==s&&(r.$extraHeaders=r.$extraHeaders?r.$extraHeaders.add(i):i),i.find(r.selectorSort).add(i.filter(r.selectorSort)).unbind("mousedown mouseup sort keyup ".split(" ").join(r.namespace+" ")).bind("mousedown mouseup sort keyup ".split(" ").join(r.namespace+" "),function(s,l){var d,h=s.type;if(!(1!==(s.which||s.button)&&!/sort|keyup/.test(h)||"keyup"===h&&13!==s.which||"mouseup"===h&&!0!==l&&(new Date).getTime()-o>250)){if("mousedown"===h)return o=(new Date).getTime(),/(input|select|button|textarea)/i.test(s.target.tagName)?"":!r.cancelSelection;r.delayInit&&n(r.cache)&&a(t),d=e.fn.closest?e(this).closest("th, td")[0]:/TH|TD/.test(this.tagName)?this:e(this).parents("th, td")[0],(d=r.$headers[i.index(d)]).sortDisabled||v(t,d,s)}}),r.cancelSelection&&i.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},C.restoreHeaders=function(t){var i=e(t)[0].config;i.$table.find(i.selectorHeaders).each(function(t){e(this).find("."+C.css.headerIn).length&&e(this).html(i.headerContent[t])})},C.destroy=function(t,i,n){if((t=e(t)[0]).hasInitialized){C.refreshWidgets(t,!0,!0);var s=e(t),o=t.config,r=s.find("thead:first"),a=r.find("tr."+C.css.headerRow).removeClass(C.css.headerRow+" "+o.cssHeaderRow),l=s.find("tfoot:first > tr").children("th, td");!1===i&&e.inArray("uitheme",o.widgets)>=0&&(s.trigger("applyWidgetId",["uitheme"]),s.trigger("applyWidgetId",["zebra"])),r.find("tr").not(a).remove(),s.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState ".split(" ").join(o.namespace+" ")),o.$headers.add(l).removeClass([C.css.header,o.cssHeader,o.cssAsc,o.cssDesc,C.css.sortAsc,C.css.sortDesc,C.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),a.find(o.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(o.namespace+" ")),C.restoreHeaders(t),s.toggleClass(C.css.table+" "+o.tableClass+" tablesorter-"+o.theme,!1===i),t.hasInitialized=!1,delete t.config.cache,"function"==typeof n&&n(t)}},C.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i},C.sortNatural=function(e,t){if(e===t)return 0;var i,n,s,o,r,a,l,d,h=C.regex;if(h.hex.test(t)){if(n=parseInt(e.match(h.hex),16),o=parseInt(t.match(h.hex),16),n<o)return-1;if(n>o)return 1}for(i=e.replace(h.chunk,"\\0$1\\0").replace(h.chunks,"").split("\\0"),s=t.replace(h.chunk,"\\0$1\\0").replace(h.chunks,"").split("\\0"),d=Math.max(i.length,s.length),l=0;l<d;l++){if(r=isNaN(i[l])?i[l]||0:parseFloat(i[l])||0,a=isNaN(s[l])?s[l]||0:parseFloat(s[l])||0,isNaN(r)!==isNaN(a))return isNaN(r)?1:-1;if(typeof r!=typeof a&&(r+="",a+=""),r<a)return-1;if(r>a)return 1}return 0},C.sortNaturalAsc=function(e,t,i,n,s){if(e===t)return 0;var o=s.string[s.empties[i]||s.emptyTo];return""===e&&0!==o?"boolean"==typeof o?o?-1:1:-o||-1:""===t&&0!==o?"boolean"==typeof o?o?1:-1:o||1:C.sortNatural(e,t)},C.sortNaturalDesc=function(e,t,i,n,s){if(e===t)return 0;var o=s.string[s.empties[i]||s.emptyTo];return""===e&&0!==o?"boolean"==typeof o?o?-1:1:o||1:""===t&&0!==o?"boolean"==typeof o?o?1:-1:-o||-1:C.sortNatural(t,e)},C.sortText=function(e,t){return e>t?1:e<t?-1:0},C.getTextValue=function(e,t,i){if(i){var n,s=e?e.length:0,o=i+t;for(n=0;n<s;n++)o+=e.charCodeAt(n);return t*o}return 0},C.sortNumericAsc=function(e,t,i,n,s,o){if(e===t)return 0;var r=o.config,a=r.string[r.empties[s]||r.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:-a||-1:""===t&&0!==a?"boolean"==typeof a?a?1:-1:a||1:(isNaN(e)&&(e=C.getTextValue(e,i,n)),isNaN(t)&&(t=C.getTextValue(t,i,n)),e-t)},C.sortNumericDesc=function(e,t,i,n,s,o){if(e===t)return 0;var r=o.config,a=r.string[r.empties[s]||r.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:a||1:""===t&&0!==a?"boolean"==typeof a?a?1:-1:-a||-1:(isNaN(e)&&(e=C.getTextValue(e,i,n)),isNaN(t)&&(t=C.getTextValue(t,i,n)),t-e)},C.sortNumeric=function(e,t){return e-t},C.characterEquivalents={a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõö",O:"ÓÒÔÕÖ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},C.replaceAccents=function(e){var t,i="[",n=C.characterEquivalents;if(!C.characterRegex){C.characterRegexArray={};for(t in n)"string"==typeof t&&(i+=n[t],C.characterRegexArray[t]=new RegExp("["+n[t]+"]","g"));C.characterRegex=new RegExp(i+"]")}if(C.characterRegex.test(e))for(t in n)"string"==typeof t&&(e=e.replace(C.characterRegexArray[t],t));return e},C.isValueInArray=function(e,t){var i,n=t.length;for(i=0;i<n;i++)if(t[i][0]===e)return i;return-1},C.addParser=function(e){var t,i=C.parsers.length,n=!0;for(t=0;t<i;t++)C.parsers[t].id.toLowerCase()===e.id.toLowerCase()&&(n=!1);n&&C.parsers.push(e)},C.getParserById=function(e){if("false"==e)return!1;var t,i=C.parsers.length;for(t=0;t<i;t++)if(C.parsers[t].id.toLowerCase()===e.toString().toLowerCase())return C.parsers[t];return!1},C.addWidget=function(e){C.widgets.push(e)},C.hasWidget=function(t,i){return(t=e(t)).length&&t[0].config&&t[0].config.widgetInit[i]||!1},C.getWidgetById=function(e){var t,i,n=C.widgets.length;for(t=0;t<n;t++)if((i=C.widgets[t])&&i.hasOwnProperty("id")&&i.id.toLowerCase()===e.toLowerCase())return i},C.applyWidget=function(t,n){var s,o,r,a=(t=e(t)[0]).config,l=a.widgetOptions,d=[];!1!==n&&t.hasInitialized&&(t.isApplyingWidgets||t.isUpdating)||(a.debug&&(s=new Date),a.widgets.length&&(t.isApplyingWidgets=!0,a.widgets=e.grep(a.widgets,function(t,i){return e.inArray(t,a.widgets)===i}),e.each(a.widgets||[],function(e,t){(r=C.getWidgetById(t))&&r.id&&(r.priority||(r.priority=10),d[e]=r)}),d.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),e.each(d,function(i,s){s&&(!n&&a.widgetInit[s.id]||(a.widgetInit[s.id]=!0,s.hasOwnProperty("options")&&(l=t.config.widgetOptions=e.extend(!0,{},s.options,l)),s.hasOwnProperty("init")&&s.init(t,s,a,l)),!n&&s.hasOwnProperty("format")&&s.format(t,a,l,!1))})),setTimeout(function(){t.isApplyingWidgets=!1},0),a.debug&&(o=a.widgets.length,i("Completed "+(!0===n?"initializing ":"applying ")+o+" widget"+(1!==o?"s":""),s)))},C.refreshWidgets=function(i,n,s){var o,r=(i=e(i)[0]).config,a=r.widgets,l=C.widgets,d=l.length;for(o=0;o<d;o++)l[o]&&l[o].id&&(n||e.inArray(l[o].id,a)<0)&&(r.debug&&t('Refeshing widgets: Removing "'+l[o].id+'"'),l[o].hasOwnProperty("remove")&&r.widgetInit[l[o].id]&&(l[o].remove(i,r,r.widgetOptions),r.widgetInit[l[o].id]=!1));!0!==s&&C.applyWidget(i,n)},C.getData=function(t,i,n){var s,o,r="",a=e(t);return a.length?(s=!!e.metadata&&a.metadata(),o=" "+(a.attr("class")||""),void 0!==a.data(n)||void 0!==a.data(n.toLowerCase())?r+=a.data(n)||a.data(n.toLowerCase()):s&&void 0!==s[n]?r+=s[n]:i&&void 0!==i[n]?r+=i[n]:" "!==o&&o.match(" "+n+"-")&&(r=o.match(new RegExp("\\s"+n+"-([\\w-]+)"))[1]||""),e.trim(r)):""},C.formatFloat=function(t,i){if("string"!=typeof t||""===t)return t;var n;return t=(i&&i.config?!1!==i.config.usNumberFormat:void 0===i||i)?t.replace(/,/g,""):t.replace(/[\s|\.]/g,"").replace(/,/g,"."),/^\s*\([.\d]+\)/.test(t)&&(t=t.replace(/^\s*\(([.\d]+)\)/,"-$1")),n=parseFloat(t),isNaN(n)?e.trim(t):n},C.isDigit=function(e){return!isNaN(e)||/^[\-+(]?\d+[)]?$/.test(e.toString().replace(/[,.'"\s]/g,""))}}});var t=e.tablesorter;e.fn.extend({tablesorter:t.construct}),t.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),t.addParser({id:"text",is:function(){return!0},format:function(i,n){var s=n.config;return i&&(i=e.trim(s.ignoreCase?i.toLocaleLowerCase():i),i=s.sortLocaleCompare?t.replaceAccents(i):i),i},type:"text"}),t.addParser({id:"digit",is:function(e){return t.isDigit(e)},format:function(i,n){var s=t.formatFloat((i||"").replace(/[^\w,. \-()]/g,""),n);return i&&"number"==typeof s?s:i?e.trim(i&&n.config.ignoreCase?i.toLocaleLowerCase():i):i},type:"numeric"}),t.addParser({id:"currency",is:function(e){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((e||"").replace(/[+\-,. ]/g,""))},format:function(i,n){var s=t.formatFloat((i||"").replace(/[^\w,. \-()]/g,""),n);return i&&"number"==typeof s?s:i?e.trim(i&&n.config.ignoreCase?i.toLocaleLowerCase():i):i},type:"numeric"}),t.addParser({id:"ipAddress",is:function(e){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(e)},format:function(e,i){var n,s=e?e.split("."):"",o="",r=s.length;for(n=0;n<r;n++)o+=("00"+s[n]).slice(-3);return e?t.formatFloat(o,i):e},type:"numeric"}),t.addParser({id:"url",is:function(e){return/^(https?|ftp|file):\/\//.test(e)},format:function(t){return t?e.trim(t.replace(/(https?|ftp|file):\/\//,"")):t},parsed:!0,type:"text"}),t.addParser({id:"isoDate",is:function(e){return/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/.test(e)},format:function(e,i){return e?t.formatFloat(""!==e?new Date(e.replace(/-/g,"/")).getTime()||e:"",i):e},type:"numeric"}),t.addParser({id:"percent",is:function(e){return/(\d\s*?%|%\s*?\d)/.test(e)&&e.length<15},format:function(e,i){return e?t.formatFloat(e.replace(/%/g,""),i):e},type:"numeric"}),t.addParser({id:"usLongDate",is:function(e){return/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i.test(e)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(e)},format:function(e,i){return e?t.formatFloat(new Date(e.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||e,i):e},type:"numeric"}),t.addParser({id:"shortDate",is:function(e){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((e||"").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(e,i,n,s){if(e){var o=i.config,r=o.$headers.filter("[data-column="+s+"]:last"),a=r.length&&r[0].dateFormat||t.getData(r,t.getColumnData(i,o.headers,s),"dateFormat")||o.dateFormat;e=e.replace(/\s+/g," ").replace(/[\-.,]/g,"/"),"mmddyyyy"===a?e=e.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===a?e=e.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===a&&(e=e.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return e?t.formatFloat(new Date(e).getTime()||e,i):e},type:"numeric"}),t.addParser({id:"time",is:function(e){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(e)},format:function(e,i){return e?t.formatFloat(new Date("2000/01/01 "+e.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||e,i):e},type:"numeric"}),t.addParser({id:"metadata",is:function(){return!1},format:function(t,i,n){var s=i.config,o=s.parserMetadataName?s.parserMetadataName:"sortValue";return e(n).metadata()[o]},type:"numeric"}),t.addWidget({id:"zebra",priority:90,format:function(i,n,s){var o,r,a,l,d,h=new RegExp(n.cssChildRow,"i"),c=n.$tbodies;for(n.debug&&(l=new Date),d=0;d<c.length;d++)r=0,c.eq(d).children("tr:visible").not(n.selectorRemove).each(function(){o=e(this),h.test(this.className)||r++,a=r%2==0,o.removeClass(s.zebra[a?1:0]).addClass(s.zebra[a?0:1])});n.debug&&t.benchmark("Applying Zebra widget",l)},remove:function(t,i,n){var s,o,r=i.$tbodies,a=(n.zebra||["even","odd"]).join(" ");for(s=0;s<r.length;s++)(o=e.tablesorter.processTbody(t,r.eq(s),!0)).children().removeClass(a),e.tablesorter.processTbody(t,o,!1)}})}(jQuery),function(e){var t={initTree:function(t){var i=e.extend({},this.treegrid.defaults,t);return this.each(function(){var t=e(this);t.treegrid("setTreeContainer",e(this)),t.treegrid("setSettings",i),i.getRootNodes.apply(this,[e(this)]).treegrid("initNode",i)})},initNode:function(t){return this.each(function(){var i=e(this);i.treegrid("setTreeContainer",t.getTreeGridContainer.apply(this)),i.treegrid("getChildNodes").treegrid("initNode",t),i.treegrid("initExpander").treegrid("initIndent").treegrid("initEvents").treegrid("initState").treegrid("initSettingsEvents")})},initEvents:function(){var t=e(this);return t.on("change",function(){var t=e(this);t.treegrid("render"),t.treegrid("getSetting","saveState")&&t.treegrid("saveState")}),t.on("collapse",function(){var t=e(this);t.removeClass("treegrid-expanded"),t.addClass("treegrid-collapsed")}),t.on("expand",function(){var t=e(this);t.removeClass("treegrid-collapsed"),t.addClass("treegrid-expanded")}),t},initSettingsEvents:function(){var t=e(this);return t.on("change",function(){var t=e(this);"function"==typeof t.treegrid("getSetting","onChange")&&t.treegrid("getSetting","onChange").apply(t)}),t.on("collapse",function(){var t=e(this);"function"==typeof t.treegrid("getSetting","onCollapse")&&t.treegrid("getSetting","onCollapse").apply(t)}),t.on("expand",function(){var t=e(this);"function"==typeof t.treegrid("getSetting","onExpand")&&t.treegrid("getSetting","onExpand").apply(t)}),t},initExpander:function(){var t=e(this),i=t.find("td").get(t.treegrid("getSetting","treeColumn")),n=t.treegrid("getSetting","expanderTemplate"),s=t.treegrid("getSetting","getExpander").apply(this);return s&&s.remove(),e(n).prependTo(i).click(function(){e(e(this).closest("tr")).treegrid("toggle")}),t},initIndent:function(){var t=e(this);t.find(".treegrid-indent").remove();for(var i=0;i<e(this).treegrid("getDepth");i++)e(t.treegrid("getSetting","indentTemplate")).insertBefore(t.find(".treegrid-expander"));return t},initState:function(){var t=e(this);return t.treegrid("getSetting","saveState")&&!t.treegrid("isFirstInit")?t.treegrid("restoreState"):"expanded"===t.treegrid("getSetting","initialState")?t.treegrid("expand"):t.treegrid("collapse"),t},isFirstInit:function(){var t=e(this).treegrid("getTreeContainer");return void 0===t.data("first_init")&&t.data("first_init",void 0===e.cookie(t.treegrid("getSetting","saveStateName"))),t.data("first_init")},saveState:function(){var t=e(this);if("cookie"===t.treegrid("getSetting","saveStateMethod")){var i=e.cookie(t.treegrid("getSetting","saveStateName"))||"",n=""===i?[]:i.split(","),s=t.treegrid("getNodeId");t.treegrid("isExpanded")?-1===e.inArray(s,n)&&n.push(s):t.treegrid("isCollapsed")&&-1!==e.inArray(s,n)&&n.splice(e.inArray(s,n),1),e.cookie(t.treegrid("getSetting","saveStateName"),n.join(","))}return t},restoreState:function(){var t=e(this);if("cookie"===t.treegrid("getSetting","saveStateMethod")){var i=e.cookie(t.treegrid("getSetting","saveStateName")).split(",");-1!==e.inArray(t.treegrid("getNodeId"),i)?t.treegrid("expand"):t.treegrid("collapse")}return t},getSetting:function(t){return e(this).treegrid("getTreeContainer")?e(this).treegrid("getTreeContainer").data("settings")[t]:null},setSettings:function(t){e(this).treegrid("getTreeContainer").data("settings",t)},getTreeContainer:function(){return e(this).data("treegrid")},setTreeContainer:function(t){return e(this).data("treegrid",t)},getRootNodes:function(){return e(this).treegrid("getSetting","getRootNodes").apply(this,[e(this).treegrid("getTreeContainer")])},getAllNodes:function(){return e(this).treegrid("getSetting","getAllNodes").apply(this,[e(this).treegrid("getTreeContainer")])},isNode:function(){return null!==e(this).treegrid("getNodeId")},getNodeId:function(){return null===e(this).treegrid("getSetting","getNodeId")?null:e(this).treegrid("getSetting","getNodeId").apply(this)},getParentNodeId:function(){return e(this).treegrid("getSetting","getParentNodeId").apply(this)},getParentNode:function(){return null===e(this).treegrid("getParentNodeId")?null:e(this).treegrid("getSetting","getNodeById").apply(this,[e(this).treegrid("getParentNodeId"),e(this).treegrid("getTreeContainer")])},getChildNodes:function(){return e(this).treegrid("getSetting","getChildNodes").apply(this,[e(this).treegrid("getNodeId"),e(this).treegrid("getTreeContainer")])},getDepth:function(){return null===e(this).treegrid("getParentNode")?0:e(this).treegrid("getParentNode").treegrid("getDepth")+1},isRoot:function(){return 0===e(this).treegrid("getDepth")},isLeaf:function(){return 0===e(this).treegrid("getChildNodes").length},isLast:function(){if(e(this).treegrid("isNode")){var t=e(this).treegrid("getParentNode");if(null===t){if(e(this).treegrid("getNodeId")===e(this).treegrid("getRootNodes").last().treegrid("getNodeId"))return!0}else if(e(this).treegrid("getNodeId")===t.treegrid("getChildNodes").last().treegrid("getNodeId"))return!0}return!1},isFirst:function(){if(e(this).treegrid("isNode")){var t=e(this).treegrid("getParentNode");if(null===t){if(e(this).treegrid("getNodeId")===e(this).treegrid("getRootNodes").first().treegrid("getNodeId"))return!0}else if(e(this).treegrid("getNodeId")===t.treegrid("getChildNodes").first().treegrid("getNodeId"))return!0}return!1},isExpanded:function(){return e(this).hasClass("treegrid-expanded")},isCollapsed:function(){return e(this).hasClass("treegrid-collapsed")},isOneOfParentsCollapsed:function(){var t=e(this);return!t.treegrid("isRoot")&&(!!t.treegrid("getParentNode").treegrid("isCollapsed")||t.treegrid("getParentNode").treegrid("isOneOfParentsCollapsed"))},expand:function(){return e(this).each(function(){var t=e(this);t.treegrid("isLeaf")||t.treegrid("isExpanded")||(t.trigger("expand"),t.trigger("change"))})},expandAll:function(){var t=e(this);return t.treegrid("getRootNodes").treegrid("expandRecursive"),t},expandRecursive:function(){return e(this).each(function(){var t=e(this);t.treegrid("expand"),t.treegrid("isLeaf")||t.treegrid("getChildNodes").treegrid("expandRecursive")})},collapse:function(){return e(this).each(function(){var t=e(this);t.treegrid("isLeaf")||t.treegrid("isCollapsed")||(t.trigger("collapse"),t.trigger("change"))})},collapseAll:function(){var t=e(this);return t.treegrid("getRootNodes").treegrid("collapseRecursive"),t},collapseRecursive:function(){return e(this).each(function(){var t=e(this);t.treegrid("collapse"),t.treegrid("isLeaf")||t.treegrid("getChildNodes").treegrid("collapseRecursive")})},toggle:function(){var t=e(this);return t.treegrid("isExpanded")?t.treegrid("collapse"):t.treegrid("expand"),t},render:function(){return e(this).each(function(){var t=e(this);t.treegrid("isOneOfParentsCollapsed")?t.hide():t.show(),t.treegrid("isLeaf")||(t.treegrid("renderExpander"),t.treegrid("getChildNodes").treegrid("render"))})},renderExpander:function(){return e(this).each(function(){var t=e(this),i=t.treegrid("getSetting","getExpander").apply(this);i?t.treegrid("isCollapsed")?(i.removeClass(t.treegrid("getSetting","expanderExpandedClass")),i.addClass(t.treegrid("getSetting","expanderCollapsedClass"))):(i.removeClass(t.treegrid("getSetting","expanderCollapsedClass")),i.addClass(t.treegrid("getSetting","expanderExpandedClass"))):(t.treegrid("initExpander"),t.treegrid("renderExpander"))})}};e.fn.treegrid=function(i){return t[i]?t[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void e.error("Method with name "+i+" does not exists for jQuery.treegrid"):t.initTree.apply(this,arguments)},e.fn.treegrid.defaults={initialState:"expanded",saveState:!1,saveStateMethod:"cookie",saveStateName:"tree-grid-state",expanderTemplate:'<span class="treegrid-expander"></span>',indentTemplate:'<span class="treegrid-indent"></span>',expanderExpandedClass:"treegrid-expander-expanded",expanderCollapsedClass:"treegrid-expander-collapsed",treeColumn:0,getExpander:function(){return e(this).find(".treegrid-expander")},getNodeId:function(){var t=/treegrid-([A-Za-z0-9_-]+)/;return t.test(e(this).attr("class"))?t.exec(e(this).attr("class"))[1]:null},getParentNodeId:function(){var t=/treegrid-parent-([A-Za-z0-9_-]+)/;return t.test(e(this).attr("class"))?t.exec(e(this).attr("class"))[1]:null},getNodeById:function(e,t){var i="treegrid-"+e;return t.find("tr."+i)},getChildNodes:function(e,t){var i="treegrid-parent-"+e;return t.find("tr."+i)},getTreeGridContainer:function(){return e(this).closest("table")},getRootNodes:function(t){var i=e.grep(t.find("tr"),function(t){var i=e(t).attr("class"),n=/treegrid-parent-([A-Za-z0-9_-]+)/;return/treegrid-([A-Za-z0-9_-]+)/.test(i)&&!n.test(i)});return e(i)},getAllNodes:function(t){var i=e.grep(t.find("tr"),function(t){var i=e(t).attr("class");return/treegrid-([A-Za-z0-9_-]+)/.test(i)});return e(i)},onCollapse:null,onExpand:null,onChange:null}}(jQuery),function(e){e.fn.simpleColor=function(t){var i=this,n=["990033","ff3366","cc0033","ff0033","ff9999","cc3366","ffccff","cc6699","993366","660033","cc3399","ff99cc","ff66cc","ff99ff","ff6699","cc0066","ff0066","ff3399","ff0099","ff33cc","ff00cc","ff66ff","ff33ff","ff00ff","cc0099","990066","cc66cc","cc33cc","cc99ff","cc66ff","cc33ff","993399","cc00cc","cc00ff","9900cc","990099","cc99cc","996699","663366","660099","9933cc","660066","9900ff","9933ff","9966cc","330033","663399","6633cc","6600cc","9966ff","330066","6600ff","6633ff","ccccff","9999ff","9999cc","6666cc","6666ff","666699","333366","333399","330099","3300cc","3300ff","3333ff","3333cc","0066ff","0033ff","3366ff","3366cc","000066","000033","0000ff","000099","0033cc","0000cc","336699","0066cc","99ccff","6699ff","003366","6699cc","006699","3399cc","0099cc","66ccff","3399ff","003399","0099ff","33ccff","00ccff","99ffff","66ffff","33ffff","00ffff","00cccc","009999","669999","99cccc","ccffff","33cccc","66cccc","339999","336666","006666","003333","00ffcc","33ffcc","33cc99","00cc99","66ffcc","99ffcc","00ff99","339966","006633","336633","669966","66cc66","99ff99","66ff66","339933","99cc99","66ff99","33ff99","33cc66","00cc66","66cc99","009966","009933","33ff66","00ff66","ccffcc","ccff99","99ff66","99ff33","00ff33","33ff33","00cc33","33cc33","66ff33","00ff00","66cc33","006600","003300","009900","33ff00","66ff00","99ff00","66cc00","00cc00","33cc00","339900","99cc66","669933","99cc33","336600","669900","99cc00","ccff66","ccff33","ccff00","999900","cccc00","cccc33","333300","666600","999933","cccc66","666633","999966","cccc99","ffffcc","ffff99","ffff66","ffff33","ffff00","ffcc00","ffcc66","ffcc33","cc9933","996600","cc9900","ff9900","cc6600","993300","cc6633","663300","ff9966","ff6633","ff9933","ff6600","cc3300","996633","330000","663333","996666","cc9999","993333","cc6666","ffcccc","ff3333","cc3333","ff6666","660000","990000","cc0000","ff0000","ff3300","cc9966","ffcc99","ffffff","cccccc","999999","666666","333333","000000","000000","000000","000000","000000","000000","000000","000000","000000"];return t=e.extend({defaultColor:this.attr("defaultColor")||"#FFF",cellWidth:this.attr("cellWidth")||10,cellHeight:this.attr("cellHeight")||10,cellMargin:this.attr("cellMargin")||1,boxWidth:this.attr("boxWidth")||"115px",boxHeight:this.attr("boxHeight")||"20px",columns:this.attr("columns")||16,insert:this.attr("insert")||"after",colors:this.attr("colors")||n,displayColorCode:this.attr("displayColorCode")||!1,colorCodeAlign:this.attr("colorCodeAlign")||"center",colorCodeColor:this.attr("colorCodeColor")||"#FFF",onSelect:null,onCellEnter:null,onClose:null,livePreview:!1,padding:this.attr("padding")||"10px"},t||{}),t.totalWidth=t.columns*(t.cellWidth+2*t.cellMargin)+2*(parseInt(t.padding)+1),t.chooserCSS=e.extend({border:"1px solid #a4a6a9",margin:"0 0 0 0",width:t.totalWidth,height:t.totalHeight,top:t.totalHeight,right:0,padding:t.padding,position:"absolute",zIndex:1,"background-color":"#fff"},t.chooserCSS||{}),t.displayCSS=e.extend({"background-color":t.defaultColor,border:"1px solid #000",width:t.boxWidth,height:t.boxHeight,"line-height":t.boxHeight+"px",cursor:"pointer"},t.displayCSS||{}),this.hide(),-1!=navigator.userAgent.indexOf("MSIE")&&(t.totalWidth+=2),t.totalHeight=Math.ceil(t.colors.length/t.columns)*(t.cellHeight+2*t.cellMargin),e.simpleColorOptions=t,this.each(function(n){t=e.simpleColorOptions;var s=e("<div class='simpleColorContainer' />");s.css("position","relative");var o=this.value&&""!=this.value?this.value:t.defaultColor,r=e("<div class='simpleColorDisplay' />");r.css(e.extend(t.displayCSS,{"background-color":o})),r.data("color",o),s.append(r),t.displayColorCode&&(r.data("displayColorCode",!0),r.text(this.value),r.css({color:t.colorCodeColor,textAlign:t.colorCodeAlign}));var a={input:this,container:s,displayBox:r};r.bind("click",a,function(n){if(e("html").bind("click.simpleColorDisplay",function(s){e("html").unbind("click.simpleColorDisplay"),e(".simpleColorChooser").hide();var o=e(s.target);!1!==o.is(".simpleColorCell")&&!1!==e.contains(e(n.target).closest(".simpleColorContainer")[0],o[0])||(r.css("background-color",r.data("color")),t.displayColorCode&&r.text(r.data("color"))),t.onClose&&t.onClose(i)}),n.data.container.chooser)n.data.container.chooser.toggle();else{var s=e("<div class='simpleColorChooser'/>");s.css(t.chooserCSS),n.data.container.chooser=s,n.data.container.append(s);var o=e("<div class='simpleColorCell simpleDefaultColor' id='"+t.defaultColor.replace("#","")+"' style='background-color: "+t.defaultColor+"'/><p>Default Color</p> ");s.append(o),(t.onCellEnter||t.livePreview)&&o.bind("mouseenter",function(e){t.onCellEnter&&t.onCellEnter(this.id,i),t.livePreview&&(/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(this.id)?r.css("background-color","#"+this.id):r.css("background-color",this.id),t.displayColorCode&&r.text("#"+this.id))}),o.bind("click",{input:n.data.input,chooser:s,displayBox:r},function(n){var s="#"+this.id;n.data.input.value=s,e(n.data.input).change(),e(n.data.displayBox).data("color",s),n.data.displayBox.css("background-color",s),n.data.chooser.hide(),t.displayColorCode&&n.data.displayBox.text(s),t.onSelect&&t.onSelect(this.id,i)});for(var a=0;a<t.colors.length;a++)(o=e("<div class='simpleColorCell' id='"+t.colors[a]+"'/>")).css({width:t.cellWidth+"px",height:t.cellHeight+"px",margin:t.cellMargin+"px",cursor:"pointer",lineHeight:t.cellHeight+"px",fontSize:"1px",float:"left","background-color":"#"+t.colors[a]}),s.append(o),(t.onCellEnter||t.livePreview)&&o.bind("mouseenter",function(e){t.onCellEnter&&t.onCellEnter(this.id,i),t.livePreview&&(r.css("background-color","#"+this.id),t.displayColorCode&&r.text("#"+this.id))}),o.bind("click",{input:n.data.input,chooser:s,displayBox:r},function(n){var s="#"+this.id;n.data.input.value=s,e(n.data.input).change(),e(n.data.displayBox).data("color",s),n.data.displayBox.css("background-color",s),n.data.chooser.hide(),t.displayColorCode&&n.data.displayBox.text(s),t.onSelect&&t.onSelect(this.id,i)})}}),e(this).after(s),e(this).data("container",s)}),e(".simpleColorDisplay").each(function(){e(this).click(function(t){e(".simpleColorChooser").not(e(this).next(".simpleColorChooser")).hide(),t.stopPropagation()})}),this},e.fn.closeChooser=function(){return this.each(function(t){e(this).data("container").find(".simpleColorChooser").hide()}),this},e.fn.setColor=function(t){return this.each(function(i){var n=e(this).data("container").find(".simpleColorDisplay");n.css("background-color",t).data("color",t),!0===n.data("displayColorCode")&&n.text(t)}),this}}(jQuery),function(e,t,i){function n(e){var t={},n=/^jQuery\d+$/;return i.each(e.attributes,function(e,i){i.specified&&!n.test(i.name)&&(t[i.name]=i.value)}),t}function s(e,t){var n=this,s=i(n);if(n.value==s.attr("placeholder")&&s.hasClass(f))if(s.data("placeholder-password")){if(s=s.hide().next().show().attr("id",s.removeAttr("id").data("placeholder-id")),!0===e)return s[0].value=t;s.focus()}else n.value="",s.removeClass(f),n==r()&&n.select()}function o(){var e,t=this,o=i(t),r=this.id;if(""==t.value){if("password"==t.type){if(!o.data("placeholder-textinput")){try{e=o.clone().attr({type:"text"})}catch(t){e=i("<input>").attr(i.extend(n(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":o,"placeholder-id":r}).bind("focus.placeholder",s),o.data({"placeholder-textinput":e,"placeholder-id":r}).before(e)}o=o.removeAttr("id").hide().prev().attr("id",r).show()}o.addClass(f),o[0].value=o.attr("placeholder")}else o.removeClass(f)}function r(){try{return t.activeElement}catch(e){}}var a,l,d="placeholder"in t.createElement("input"),h="placeholder"in t.createElement("textarea"),c=i.fn,u=i.valHooks,p=i.propHooks,f="placeholder";d&&h?(l=c.placeholder=function(){return this}).input=l.textarea=!0:((l=c.placeholder=function(){arguments.length&&"object"==typeof arguments[0]&&"string"==typeof arguments[0].classname&&(f=arguments[0].classname);var e=this;return e.filter((d?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":s,"blur.placeholder":o}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e}).input=d,l.textarea=h,a={get:function(e){var t=i(e),n=t.data("placeholder-password");return n?n[0].value:t.data("placeholder-enabled")&&t.hasClass(f)?"":e.value},set:function(e,t){var n=i(e),a=n.data("placeholder-password");return a?a[0].value=t:n.data("placeholder-enabled")?(""==t?(e.value=t,e!=r()&&o.call(e)):n.hasClass(f)?s.call(e,!0,t)||(e.value=t):e.value=t,n):e.value=t}},d||(u.input=a,p.value=a),h||(u.textarea=a,p.value=a),i(function(){i(t).delegate("form","submit.placeholder",function(){var e=i(".placeholder",this).each(s);setTimeout(function(){e.each(o)},10)})}),i(e).bind("beforeunload.placeholder",function(){i(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery),function(e,t,i){var n=e();e.fn.dropdownHover=function(i){return"ontouchstart"in document?this:(n=n.add(this.parent()),this.each(function(){function s(e){t.clearTimeout(o),t.clearTimeout(r),r=t.setTimeout(function(){n.find(":focus").blur(),!0===u.instantlyCloseOthers&&n.removeClass("open"),t.clearTimeout(r),a.attr("aria-expanded","true"),l.addClass("open"),a.trigger(c)},u.hoverDelay)}var o,r,a=e(this),l=a.parent(),d={delay:500,hoverDelay:0,instantlyCloseOthers:!0},h={delay:e(this).data("delay"),hoverDelay:e(this).data("hover-delay"),instantlyCloseOthers:e(this).data("close-others")},c="show.bs.dropdown",u=e.extend(!0,{},d,i,h);l.hover(function(e){if(!l.hasClass("open")&&!a.is(e.target))return!0;s()},function(){t.clearTimeout(r),o=t.setTimeout(function(){a.attr("aria-expanded","false"),l.removeClass("open"),a.trigger("hide.bs.dropdown")},u.delay)}),a.hover(function(e){if(!l.hasClass("open")&&!l.is(e.target))return!0;s()}),l.find(".dropdown-submenu").each(function(){var i,n=e(this);n.hover(function(){t.clearTimeout(i),n.children(".dropdown-menu").show(),n.siblings().children(".dropdown-menu").hide()},function(){var e=n.children(".dropdown-menu");i=t.setTimeout(function(){e.hide()},u.delay)})})}))},e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window),function(e){e.fn.extend({fixedTblHdrLftCol:function(t){function i(e){var t=$;return t||(t=e.outerWidth(!0)-h(e)),t}function n(e){var t=N;return t||(t=e.outerHeight(!0)-l(e)),t}function s(e){return e.find("thead tr").length}function o(t){for(var i=e([]),n=0;n<s(t);n++){for(var o=e([]),r=0;r<k.scroll.leftCol.fixedSpan;r++)o.push(t.find("thead tr:nth-child("+(n+1)+") th:nth-child("+(r+1)+")"));i.push(o)}return i}function r(t){for(var i=e([]),n=0;n<s(t);n++)i.push(t.find("thead tr:nth-child("+(n+1)+") th:first-child"));return i}function a(e,t){return e.find("thead tr:nth-child("+(t+1)+") th")}function l(t){var i=M;return i||(r(t).each(function(){i+=e(this).outerHeight(!0)}),M=i),i}function d(t){for(var i=e([]),n=0;n<k.scroll.leftCol.fixedSpan;n++)i.push(t.find("tbody tr:first-child td:nth-child("+(n+1)+")"));return i}function h(t){var i=T;return i||(d(t).each(function(){i+=e(this).outerWidth(!0)}),T=i),i}function c(t){var i=0;return t.find("tbody tr:first-child td").each(function(){i+=e(this).outerWidth(!0)}),i}function u(t){t.wrap(e(document.createElement("div")).attr("id",k.wrapper.outer.idName).addClass(k.wrapper.outer.className).css("width",i(t)).css("height",n(t)).css("position","relative").css("padding-left",h(t)+"px").css("padding-top",l(t)+"px").css("overflow","hidden"))}function p(t){t.wrap(e(document.createElement("div")).attr("id",k.wrapper.inner.idName).addClass(k.wrapper.inner.className).css("overflow-x",k.scroll.headRow.overflow).css("overflow-y",k.scroll.leftCol.overflow).css("width",i(t)).css("height",n(t)))}function f(e){var t=h(e),i=c(e);e.css("border-collapse","collapse").css("width",i-t+"px")}function g(t){var i=0;r(t).each(function(n){var s=0;a(t,n).each(function(t){var n=e(this).outerWidth(!0),o=e(this).outerHeight(!0);s+=n,0==t&&(i+=o),e(this).addClass(k.scroll.headRow.className).css("position","absolute").css("top",i-o+"px").css("left",s-n+"px")})})}function m(t){var i=h(t),n=c(t);t.find("tbody tr").each(function(){e(this).css("width",n-i+"px")})}function v(t){var i=0;d(t).each(function(n){var s=e(this).outerWidth(!0);i+=s,t.find("tbody tr td:nth-child("+(n+1)+")").addClass(k.scroll.leftCol.className).css("position","absolute").css("left",i-s+"px")})}function y(t){t.find("tbody tr").each(function(){for(var t=0,i=0;i<k.scroll.leftCol.fixedSpan;i++){var n=e(this).find("td:nth-child("+(i+1)+")").height();n>t&&(t=n)}e(this).find("td:nth-child("+(k.scroll.leftCol.fixedSpan+1)+")").height(t),e(this).hide().fadeIn(0)})}function b(t){var i=e("<div></div>").attr("id",k.corner.outer.idName).addClass(k.corner.outer.className).css("position","absolute").css("left","0px").css("top","0px").css("margin","0").css("padding","0").css("width",h(t)+"px").css("height",l(t)+"px"),n=e("<table></table>").attr("id",k.corner.inner.idName).addClass(k.corner.inner.className).css("border-collapse","collapse"),s=e("<thead></thead>");o(t).each(function(){var t=e("<tr></tr>");e(this).each(function(){var i=e(this).clone(k.corner.deepClone);e(this).removeAttr("id"),e(this).unbind(),i.appendTo(t)}),t.appendTo(s)}),s.appendTo(n),n.appendTo(i),i.appendTo(t.parent())}function w(t){var i=[];t.find("tbody tr:first").each(function(){e(this).find("td").each(function(){var t=e(this).position();i.push(t.left)})}),t.find("thead tr").each(function(){e(this).find("th").each(function(t){e(this).css("left",i[t]+"px")})})}function _(e){v(e),m(e),g(e),f(e),u(e),p(e),y(e),k.corner.append&&b(e),w(e)}function C(t){t.find("tbody tr").each(function(){for(var t=0;t<k.scroll.leftCol.fixedSpan;t++)e(this).find("td:nth-child("+(t+1)+")").css("top",e(this).find("td:nth-child("+(k.scroll.leftCol.fixedSpan+1)+")").position().top+"px")})}function x(t){t.find("thead tr").each(function(i){i<s(t)&&e(this).find("th").each(function(i){e(this).css("left",t.find("tbody tr:first-child td:nth-child("+(i+1)+")").position().left+"px")})})}function S(e,t){t.scrollTop(e.scrollTop()),t.scrollLeft(e.scrollLeft())}function D(t){var i=k.scroll.syncWith;e.isArray(i)?e.each(i,function(){S(t,e(this.toString()).parent())}):S(t,e(i).parent())}var k=e.extend(!0,{scroll:{height:null,width:null,headRow:{className:"fTHLC-head-row",enabled:!0,overflow:"auto"},leftCol:{className:"fTHLC-left-col",enabled:!0,overflow:"auto",fixedSpan:1},syncWith:null},wrapper:{outer:{idName:null,className:"fTHLC-outer-wrapper"},inner:{idName:null,className:"fTHLC-inner-wrapper"}},corner:{append:!0,deepClone:!1,outer:{idName:null,className:"fTHLC-outer-corner"},inner:{idName:null,className:"fTHLC-inner-corner"}}},t),$=k.scroll.width,N=k.scroll.height,T=null,M=null;return this.each(function(){if("table"!=e(this)[0].tagName.toLowerCase())return!0;_(e(this)),(k.scroll.leftCol.enabled||k.scroll.headRow.enabled)&&e(this).parent().scroll(function(){k.scroll.headRow.enabled&&x(e(this)),k.scroll.leftCol.enabled&&C(e(this)),k.scroll.syncWith&&D(e(this))})})}})}(jQuery),function(e,t){"use strict";e.fn.tableHeadFixer=function(i){function n(t,i){var n,s,o,r,a=p.left,l=1;for(n=1;n<=a;n+=l)s=l>1?n-1:n,r=(o=e(t).find("> *:nth-child("+s+")")).prop("colspan"),o.cellPos().left<a&&i(o),l=r}function s(t,i){var n,s,o,r,a=p.right,l=1;for(n=1;n<=a;n+=l)s=l>1?n-1:n,r=(o=e(t).find("> *:nth-last-child("+s+")")).prop("colspan"),i(o),l=r}function o(){var t=e(p.table);p.head&&(p.left>0&&t.find("thead tr").each(function(t){n(t,function(t){e(t).css("z-index",p["z-index"]+1)})}),p.right>0&&t.find("thead tr").each(function(t){s(t,function(t){e(t).css("z-index",p["z-index"]+1)})})),p.foot&&(p.left>0&&t.find("tfoot tr").each(function(t){n(t,function(t){e(t).css("z-index",p["z-index"])})}),p.right>0&&t.find("tfoot tr").each(function(t){s(t,function(t){e(t).css("z-index",p["z-index"])})}))}function r(){var t=e(p.parent),i=e(p.table);t.append(i),t.css({"overflow-x":"auto","overflow-y":"auto"}),t.scroll(function(){var e=t[0].scrollWidth,i=t[0].clientWidth,n=t[0].scrollHeight,s=t[0].clientHeight,o=t.scrollTop(),r=t.scrollLeft();p.head&&this.find("thead tr > *").css("top",o),p.foot&&this.find("tfoot tr > *").css("bottom",n-s-o),p.left>0&&p.leftColumns.css("left",r),p.right>0&&p.rightColumns.css("right",e-i-r)}.bind(i))}function a(t){t.each(function(t){(t=e(t)).css("background-color","")})}function l(){var t=e(p.table).find("thead").find("tr > *");a(t),t.css({position:"relative"})}function d(){var t=e(p.table).find("tfoot").find("tr > *");a(t),t.css({position:"relative"})}function h(){var t=e(p.table).find("tr"),i=p.leftColumns;p.leftColumns=e(),t.each(function(e){n(e,function(e){p.leftColumns=p.leftColumns.add(e)})}),i.each(function(t){a(t=e(t)),t.css({position:"relative"})})}function c(){var t=e(p.table).find("tr"),i=p.rightColumns;p.rightColumns=e(),t.each(function(e){s(e,function(e){p.rightColumns=p.rightColumns.add(e)})}),i.each(function(t){a(t=e(t)),t.css({position:"relative"})})}var u={head:!0,foot:!1,left:0,right:0,"z-index":0},p=e.extend({},u,i);return this.each(function(){p.table=this,p.parent=e(p.table).parent(),r(),!0===p.head&&l(),!0===p.foot&&d(),p.left>0&&h(),p.right>0&&c(),o(),e(p.parent).trigger("scroll"),e(t).resize(function(){e(p.parent).trigger("scroll")})})}}(jQuery,window),function(e){"use strict";function t(t){var i=[];t.children("tr").each(function(t,n){e(n).children("td, th").each(function(n,s){var o,r,a=e(s),l=a.attr("colspan")||0,d=a.attr("rowspan")||0;for(l=l||1,d=d||1;i[t]&&i[t][n];++n);for(o=n;o<n+l;++o)for(r=t;r<t+d;++r)i[r]||(i[r]=[]),i[r][o]=!0;var h={top:t,left:n};a.data("cellPos",h)})})}e.fn.cellPos=function(e){var i=this.first(),n=i.data("cellPos");return n&&!e||t(i.closest("table, thead, tbody, tfoot")),n=i.data("cellPos")}}(jQuery);