diff --git a/README.md b/README.md
index e8fab321f..beab9a469 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ You can also use on of the following methods:
- [Volo](https://github.com/volojs/volo) `volo add fuelux` (update with `volo add -f fuelux`).
- Clone via git `git clone https://github.com/ExactTarget/fuelux/`
- Cloning the repository ensures you can apply future updates to Fuel UX easily, but requires to you manage its [dependencies](#dependencies) on your own.
-- Download a [.zip archive](http://www.fuelcdn.com/fuelux/3.16.0/fuelux.zip).
+- Download a [.zip archive](http://www.fuelcdn.com/fuelux/3.16.1/fuelux.zip).
# Using Fuel UX
@@ -81,11 +81,11 @@ For other methods of managing dependencies consider [AMD support via require](#a
Ensure all the dependencies are included on the page (eg, such as using the CDN as shown below).
```
-
+
-
+
```
@@ -116,7 +116,7 @@ If using AMD (such as [RequireJS](http://requirejs.org)), reference the FuelUX d
```javascript
require.config({
paths: {
- 'fuelux': 'http://www.fuelcdn.com/fuelux/3.16.0/'
+ 'fuelux': 'http://www.fuelcdn.com/fuelux/3.16.1/'
//...
}
});
diff --git a/dist/css/fuelux.css b/dist/css/fuelux.css
index f43b8dc45..cd7407da7 100644
--- a/dist/css/fuelux.css
+++ b/dist/css/fuelux.css
@@ -1,5 +1,5 @@
/*!
- * Fuel UX v3.16.1
+ * Fuel UX v3.16.2
* Copyright 2012-2017 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/
diff --git a/dist/css/fuelux.min.css b/dist/css/fuelux.min.css
index 4a8763770..f446a7c5a 100644
--- a/dist/css/fuelux.min.css
+++ b/dist/css/fuelux.min.css
@@ -1,5 +1,5 @@
/*!
- * Fuel UX v3.16.1
+ * Fuel UX v3.16.2
* Copyright 2012-2017 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/
diff --git a/dist/fuelux.zip b/dist/fuelux.zip
index e777abf84..aaf27e8ad 100644
Binary files a/dist/fuelux.zip and b/dist/fuelux.zip differ
diff --git a/dist/js/fuelux.js b/dist/js/fuelux.js
index d28d4f80b..6848fd42e 100644
--- a/dist/js/fuelux.js
+++ b/dist/js/fuelux.js
@@ -1,5 +1,5 @@
/*!
- * Fuel UX v3.16.1
+ * Fuel UX v3.16.2
* Copyright 2012-2017 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/
diff --git a/dist/js/fuelux.min.js b/dist/js/fuelux.min.js
index c3ec0c2af..59c4aad72 100644
--- a/dist/js/fuelux.min.js
+++ b/dist/js/fuelux.min.js
@@ -1,7 +1,7 @@
/*!
- * Fuel UX v3.16.1
+ * Fuel UX v3.16.2
* Copyright 2012-2017 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/
-!function(e){"function"==typeof define&&define.amd?define(["jquery","bootstrap"],e):e(jQuery)}(function(e){if(void 0===e)throw new Error("Fuel UX's JavaScript requires jQuery");if(void 0===e.fn.dropdown||void 0===e.fn.collapse)throw new Error("Fuel UX's JavaScript requires Bootstrap");!function(e){var t=e.fn.checkbox,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){this.options=e.extend({},e.fn.checkbox.defaults,s);var n=e(t);if("label"===t.tagName.toLowerCase()){this.$label=n,this.$chk=this.$label.find('input[type="checkbox"]'),this.$container=n.parent(".checkbox"),!this.options.ignoreVisibilityCheck&&this.$chk.css("visibility").match(/hidden|collapse/)&&i("For accessibility reasons, in order for tab and space to function on checkbox, checkbox ` `'s `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.");var a=this.$chk.attr("data-toggle");this.$toggleContainer=e(a),this.$chk.on("change",e.proxy(this.itemchecked,this)),this.setInitialState()}else i("Checkbox must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/checkbox.html for example of proper markup. Call `.checkbox()` on the `` not the ` `")};(s.prototype={constructor:s,setInitialState:function(){var e=this.$chk,t=e.prop("checked"),i=e.prop("disabled");this.setCheckedState(e,t),this.setDisabledState(e,i)},setCheckedState:function(e,t){var i=e,s=this.$label,n=this.$toggleContainer;t?(i.prop("checked",!0),s.addClass("checked"),n.removeClass("hide hidden"),s.trigger("checked.fu.checkbox")):(i.prop("checked",!1),s.removeClass("checked"),n.addClass("hidden"),s.trigger("unchecked.fu.checkbox")),s.trigger("changed.fu.checkbox",t)},setDisabledState:function(t,i){var s=e(t),n=this.$label;return i?(s.prop("disabled",!0),n.addClass("disabled"),n.trigger("disabled.fu.checkbox")):(s.prop("disabled",!1),n.removeClass("disabled"),n.trigger("enabled.fu.checkbox")),s},itemchecked:function(t){var i=e(t.target),s=i.prop("checked");this.setCheckedState(i,s)},toggle:function(){this.isChecked()?this.uncheck():this.check()},check:function(){this.setCheckedState(this.$chk,!0)},uncheck:function(){this.setCheckedState(this.$chk,!1)},isChecked:function(){return this.$chk.prop("checked")},enable:function(){this.setDisabledState(this.$chk,!1)},disable:function(){this.setDisabledState(this.$chk,!0)},destroy:function(){return this.$label.remove(),this.$label[0].outerHTML}}).getValue=s.prototype.isChecked,e.fn.checkbox=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.checkbox"),l="object"==typeof t&&t;r||a.data("fu.checkbox",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.checkbox.defaults={ignoreVisibilityCheck:!1},e.fn.checkbox.Constructor=s,e.fn.checkbox.noConflict=function(){return e.fn.checkbox=t,this},e(document).on("mouseover.fu.checkbox.data-api","[data-initialize=checkbox]",function(t){var i=e(t.target);i.data("fu.checkbox")||i.checkbox(i.data())}),e(function(){e("[data-initialize=checkbox]").each(function(){var t=e(this);t.data("fu.checkbox")||t.checkbox(t.data())})})}(e),function(e){var t=e.fn.combobox,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.combobox.defaults,i),this.$dropMenu=this.$element.find(".dropdown-menu"),this.$input=this.$element.find("input"),this.$button=this.$element.find(".btn"),this.$inputGroupBtn=this.$element.find(".input-group-btn"),this.$element.on("click.fu.combobox","a",e.proxy(this.itemclicked,this)),this.$element.on("change.fu.combobox","input",e.proxy(this.inputchanged,this)),this.$element.on("shown.bs.dropdown",e.proxy(this.menuShown,this)),this.$input.on("keyup.fu.combobox",e.proxy(this.keypress,this)),this.setDefaultSelection(),0===this.$dropMenu.children("li").length&&this.$button.addClass("disabled"),this.options.filterOnKeypress&&this.options.filter(this.$dropMenu.find("li"),this.$input.val(),this)};(i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element[0].outerHTML},doSelect:function(e){void 0!==e[0]?(this.$element.find("li.selected:first").removeClass("selected"),this.$selectedItem=e,this.$selectedItem.addClass("selected"),this.$input.val(this.$selectedItem.text().trim())):(this.$selectedItem=null,this.$element.find("li.selected:first").removeClass("selected"))},clearSelection:function(){this.$selectedItem=null,this.$input.val(""),this.$dropMenu.find("li").removeClass("selected")},menuShown:function(){this.options.autoResizeMenu&&this.resizeMenu()},resizeMenu:function(){var e=this.$element.outerWidth();this.$dropMenu.outerWidth(e)},selectedItem:function(){var t={};if(this.$selectedItem){var i=this.$selectedItem.text().trim();t=e.extend({text:i},this.$selectedItem.data())}else t={text:this.$input.val().trim(),notFound:!0};return t},selectByText:function(t){var i=e([]);this.$element.find("li").each(function(){if((this.textContent||this.innerText||e(this).text()||"").trim().toLowerCase()===(t||"").trim().toLowerCase())return i=e(this),!1}),this.doSelect(i)},selectByValue:function(e){var t='li[data-value="'+e+'"]';this.selectBySelector(t)},selectByIndex:function(e){var t="li:eq("+e+")";this.selectBySelector(t)},selectBySelector:function(e){var t=this.$element.find(e);this.doSelect(t)},setDefaultSelection:function(){var e="li[data-selected=true]:first",t=this.$element.find(e);t.length>0&&(this.selectBySelector(e),t.removeData("selected"),t.removeAttr("data-selected"))},enable:function(){this.$element.removeClass("disabled"),this.$input.removeAttr("disabled"),this.$button.removeClass("disabled")},disable:function(){this.$element.addClass("disabled"),this.$input.attr("disabled",!0),this.$button.addClass("disabled")},itemclicked:function(t){this.$selectedItem=e(t.target).parent(),this.$input.val(this.$selectedItem.text().trim()).trigger("change",{synthetic:!0});var i=this.selectedItem();this.$element.trigger("changed.fu.combobox",i),t.preventDefault(),this.$element.find(".dropdown-toggle").focus()},keypress:function(e){var t=38===e.which||40===e.which||37===e.which||39===e.which;if(this.options.showOptionsOnKeypress&&!this.$inputGroupBtn.hasClass("open")&&(this.$button.dropdown("toggle"),this.$input.focus()),13===e.which){e.preventDefault();var i=this.$dropMenu.find("li.selected").text().trim();i.length>0?this.selectByText(i):this.selectByText(this.$input.val()),this.$inputGroupBtn.removeClass("open")}else if(27===e.which)e.preventDefault(),this.clearSelection(),this.$inputGroupBtn.removeClass("open");else if(this.options.showOptionsOnKeypress&&(40===e.which||38===e.which)){e.preventDefault();var s=this.$dropMenu.find("li.selected");s.length>0&&(s=40===e.which?s.next(":not(.hidden)"):s.prev(":not(.hidden)")),0===s.length&&(s=40===e.which?this.$dropMenu.find("li:not(.hidden):first"):this.$dropMenu.find("li:not(.hidden):last")),this.doSelect(s)}this.options.filterOnKeypress&&!t&&this.options.filter(this.$dropMenu.find("li"),this.$input.val(),this),this.previousKeyPress=e.which},inputchanged:function(t,i){var s=e(t.target).val();if(i&&i.synthetic)this.selectByText(s);else{this.selectByText(s);var n=this.selectedItem();0===n.text.length&&(n={text:s}),this.$element.trigger("changed.fu.combobox",n)}}}).getValue=i.prototype.selectedItem,e.fn.combobox=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.combobox"),l="object"==typeof t&&t;r||a.data("fu.combobox",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.combobox.defaults={autoResizeMenu:!0,filterOnKeypress:!1,showOptionsOnKeypress:!1,filter:function(t,i,s){var n=0;s.$dropMenu.find(".empty-indicator").remove(),t.each(function(t){var s=e(this),a=e(this).text().trim();s.removeClass(),a===i?(s.addClass("text-success"),n++):a.substr(0,i.length)===i?(s.addClass("text-info"),n++):s.addClass("hidden")}),0===n&&s.$dropMenu.append('No Matches ')}},e.fn.combobox.Constructor=i,e.fn.combobox.noConflict=function(){return e.fn.combobox=t,this},e(document).on("mousedown.fu.combobox.data-api","[data-initialize=combobox]",function(t){var i=e(t.target).closest(".combobox");i.data("fu.combobox")||i.combobox(i.data())}),e(function(){e("[data-initialize=combobox]").each(function(){var t=e(this);t.data("fu.combobox")||t.combobox(t.data())})})}(e),function(e){var t="moment.js is not available so you cannot use this function",i=[],s=!1,n=e.fn.datepicker,a=!1,r=function(){var e,t;for(a=!0,e=0,t=i.length;en.year||i===n.year&&t>n.month||i===n.year&&t===n.month&&e>=n.date)&&(i11){if(this.sameYearOnly)return;e=0,t++}this.renderMonth(new Date(t,e,1))},onYearScroll:function(t){if(!this.artificialScrolling){var i,s,n=e(t.currentTarget),a="border-box"===n.css("box-sizing")?n.outerHeight():n.height(),r=n.get(0).scrollHeight,l=n.scrollTop(),o=a/(r-l)*100;if(l/r*100<5){for(i=(s=parseInt(n.find("li:first").attr("data-year"),10))-1;i>s-11;i--)n.prepend(''+i+" ");this.artificialScrolling=!0,n.scrollTop(n.get(0).scrollHeight-r+l),this.artificialScrolling=!1}else if(o>90)for(i=(s=parseInt(n.find("li:last").attr("data-year"),10))+1;i'+i+" ")}},parseDate:function(e){var t,i,n,a,r,l,o,d=this,h=new Date(NaN);if(e){if(this.moment)return a=function(e){var t=s(e,d.momentFormat);return!0===t.isValid()?t.toDate():h},n=function(e){var t=s(new Date(e));return!0===t.isValid()?t.toDate():h},r=function(e,t,i){var s=t(e);return d.isInvalidDate(s)?(s=i(e),d.isInvalidDate(s)?h:s):s},"string"==typeof e?r(e,a,n):r(e,n,a);if("string"==typeof e){if(t=new Date(Date.parse(e)),!this.isInvalidDate(t))return t;if(e=e.split("T")[0],i=/^\s*(\d{4})-(\d\d)-(\d\d)\s*$/,(o=i.exec(e))&&(l=parseInt(o[2],10),t=new Date(o[1],l-1,o[3]),l===t.getMonth()+1))return t}else if(t=new Date(e),!this.isInvalidDate(t))return t}return new Date(NaN)},prev:function(){var e=this.$headerTitle.attr("data-month"),t=this.$headerTitle.attr("data-year");if(--e<0){if(this.sameYearOnly)return;e=11,t--}this.renderMonth(new Date(t,e,1))},renderMonth:function(t){t=t||new Date;var i,s,n,a,r,l,o,d,h,c,p,u=new Date(t.getFullYear(),t.getMonth(),1).getDay(),f=new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=new Date(t.getFullYear(),t.getMonth(),0).getDate(),v=this.$headerTitle.find(".month"),g=t.getMonth(),$=new Date,b=$.getDate(),y=$.getMonth(),w=$.getFullYear(),C=this.selectedDate,x=this.$days.find("tbody"),k=t.getFullYear();for(C&&(C={date:C.getDate(),month:C.getMonth(),year:C.getFullYear()}),v.find(".current").removeClass("current"),v.find('span[data-month="'+g+'"]').addClass("current"),this.$headerTitle.find(".year").text(k),this.$headerTitle.attr({"data-month":g,"data-year":k}),x.empty(),0!==u?(i=m-u+1,o=-1):(i=1,o=0),l=f<=35-u?5:6,a=0;a"),r=0;r<7;r++)c=e(" "),-1===o?(c.addClass("last-month"),d!==o&&c.addClass("first")):1===o&&(c.addClass("next-month"),d!==o&&c.addClass("first")),n=k,(s=g+o)<0?(s=11,n--):s>11&&(s=0,n++),c.attr({"data-date":i,"data-month":s,"data-year":n}),n===w&&s===y&&i===b?c.addClass("current-day"):(n'+i+" "):c.html(''+i+" "),i++,h=d,d=o,-1===o&&i>m?(i=1,h!==(o=0)&&c.addClass("last")):0===o&&i>f&&(i=1,h!==(o=1)&&c.addClass("last")),a===l-1&&6===r&&c.addClass("last"),p.append(c);x.append(p)}},renderWheel:function(e){var t,i,s,n=e.getMonth(),a=this.$wheelsMonth.find("ul"),r=e.getFullYear(),l=this.$wheelsYear.find("ul");for(this.sameYearOnly?(this.$wheelsMonth.addClass("full"),this.$wheelsYear.addClass("hidden")):(this.$wheelsMonth.removeClass("full"),this.$wheelsYear.removeClass("hide hidden")),a.find(".selected").removeClass("selected"),(i=a.find('li[data-month="'+n+'"]')).addClass("selected"),a.scrollTop(a.scrollTop()+(i.position().top-a.outerHeight()/2-i.outerHeight(!0)/2)),l.empty(),t=r-10;t'+t+" ");(s=l.find('li[data-year="'+r+'"]')).addClass("selected"),this.artificialScrolling=!0,l.scrollTop(l.scrollTop()+(s.position().top-l.outerHeight()/2-s.outerHeight(!0)/2)),this.artificialScrolling=!1,i.find("button").focus()},selectClicked:function(){var e=this.$wheelsMonth.find(".selected").attr("data-month"),t=this.$wheelsYear.find(".selected").attr("data-year");this.changeView("calendar",new Date(t,e,1))},setCulture:function(e){if(!e)return!1;if(!this.moment)throw t;s.locale(e)},setDate:function(e){var t=this.parseDate(e);return this.isInvalidDate(t)?(this.selectedDate=null,this.renderMonth()):this.isRestricted(t.getDate(),t.getMonth(),t.getFullYear())?(this.selectedDate=!1,this.renderMonth()):(this.selectedDate=t,this.renderMonth(t),this.$input.val(this.formatDate(t))),this.inputValue=this.$input.val(),this.selectedDate},setFormat:function(e){if(!e)return!1;if(!this.moment)throw t;this.momentFormat=e},setRestrictedDates:function(e){var t,i,s=[],n=this,a=function(e){return e===-1/0?{date:-1/0,month:-1/0,year:-1/0}:e===1/0?{date:1/0,month:1/0,year:1/0}:(e=n.parseDate(e),{date:e.getDate(),month:e.getMonth(),year:e.getFullYear()})};for(this.restricted=e,t=0,i=e.length;t=i.fromTop&&i.dropdownHeight>=i.fromBottom?i.fromTop>=i.fromBottom:void 0))}function s(t){var i,s=t.attr("data-target"),n=!0;return s?"window"!==s&&(i=e(s),n=!1):e.each(t.parents(),function(t,s){if("visible"!==e(s).css("overflow"))return i=s,n=!1,!1}),n&&(i=window),{overflowElement:e(i),isWindow:n}}e(document).on("click.fu.dropdown-autoflip","[data-toggle=dropdown][data-flip]",function(i){"auto"===e(this).data().flip&&t(e(this).next(".dropdown-menu"))}),e(document).on("suggested.fu.pillbox",function(i,s){t(e(s)),e(s).parent().addClass("open")}),e.fn.dropdownautoflip=function(){}}(e),function(e){var t=e.fn.loader,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.loader.defaults,i)};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},ieRepaint:function(){},msieVersion:function(){},next:function(){},pause:function(){},play:function(){},previous:function(){},reset:function(){}},e.fn.loader=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.loader"),l="object"==typeof t&&t;r||a.data("fu.loader",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.loader.defaults={},e.fn.loader.Constructor=i,e.fn.loader.noConflict=function(){return e.fn.loader=t,this},e(function(){e("[data-initialize=loader]").each(function(){var t=e(this);t.data("fu.loader")||t.loader(t.data())})})}(e),function(e){var t=e.fn.placard,i={accepted:"onAccept",cancelled:"onCancel"},s=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.placard.defaults,i),"true"===this.$element.attr("data-ellipsis")&&(this.options.applyEllipsis=!0),this.$accept=this.$element.find(".placard-accept"),this.$cancel=this.$element.find(".placard-cancel"),this.$field=this.$element.find(".placard-field"),this.$footer=this.$element.find(".placard-footer"),this.$header=this.$element.find(".placard-header"),this.$popup=this.$element.find(".placard-popup"),this.actualValue=null,this.clickStamp="_",this.previousValue="",-1===this.options.revertOnCancel&&(this.options.revertOnCancel=this.$accept.length>0),this.isContentEditableDiv=this.$field.is("div"),this.isInput=this.$field.is("input"),this.divInTextareaMode=this.isContentEditableDiv&&"true"===this.$field.attr("data-textarea"),this.$field.on("focus.fu.placard",e.proxy(this.show,this)),this.$field.on("keydown.fu.placard",e.proxy(this.keyComplete,this)),this.$element.on("close.fu.placard",e.proxy(this.hide,this)),this.$accept.on("click.fu.placard",e.proxy(this.complete,this,"accepted")),this.$cancel.on("click.fu.placard",function(e){e.preventDefault(),s.complete("cancelled")}),this.applyEllipsis()},n=function(e){return e.$element.hasClass("showing")},a=function(){var t;if((t=e(document).find(".placard.showing")).length>0){if(t.data("fu.placard")&&t.data("fu.placard").options.explicit)return!1;t.placard("externalClickListener",{},!0)}return!0};s.prototype={constructor:s,complete:function(e){var t=this.options[i[e]],s={previousValue:this.previousValue,value:this.getValue()};t?(t(s),this.$element.trigger(e+".fu.placard",s)):("cancelled"===e&&this.options.revertOnCancel&&this.setValue(this.previousValue,!0),this.$element.trigger(e+".fu.placard",s),this.hide())},keyComplete:function(e){(this.isContentEditableDiv&&!this.divInTextareaMode||this.isInput)&&13===e.keyCode?(this.complete("accepted"),this.$field.blur()):27===e.keyCode&&(this.complete("cancelled"),this.$field.blur())},destroy:function(){return this.$element.remove(),e(document).off("click.fu.placard.externalClick."+this.clickStamp),this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element[0].outerHTML},disable:function(){this.$element.addClass("disabled"),this.$field.attr("disabled","disabled"),this.isContentEditableDiv&&this.$field.removeAttr("contenteditable"),this.hide()},applyEllipsis:function(){var e,t,i;if(this.options.applyEllipsis)if(e=this.$field.get(0),this.isContentEditableDiv&&!this.divInTextareaMode||this.isInput)e.scrollLeft=0;else if(e.scrollTop=0,e.clientHeight=e.scrollHeight;)i+=this.actualValue[t],this.setValue(i+"...",!0),t++;i=i.length>0?i.substring(0,i.length-1):"",this.setValue(i+"...",!0)}},enable:function(){this.$element.removeClass("disabled"),this.$field.removeAttr("disabled"),this.isContentEditableDiv&&this.$field.attr("contenteditable","true")},externalClickListener:function(e,t){(!0===t||this.isExternalClick(e))&&this.complete(this.options.externalClickAction)},getValue:function(){return null!==this.actualValue?this.actualValue:this.isContentEditableDiv?this.$field.html():this.$field.val()},hide:function(){this.$element.hasClass("showing")&&(this.$element.removeClass("showing"),this.applyEllipsis(),e(document).off("click.fu.placard.externalClick."+this.clickStamp),this.$element.trigger("hidden.fu.placard"))},isExternalClick:function(t){var i,s,n=this.$element.get(0),a=this.options.externalClickExceptions||[],r=e(t.target);if(t.target===n||r.parents(".placard:first").get(0)===n)return!1;for(i=0,s=a.length;i0)return!1;return!0},setValue:function(e,t){return void 0===t&&(t=!this.options.applyEllipsis),this.isContentEditableDiv?this.$field.empty().append(e):this.$field.val(e),t||n(this)||this.applyEllipsis(),this.$field},show:function(){n(this)||a()&&(this.previousValue=this.isContentEditableDiv?this.$field.html():this.$field.val(),null!==this.actualValue&&(this.setValue(this.actualValue,!0),this.actualValue=null),this.showPlacard())},showPlacard:function(){this.$element.addClass("showing"),this.$header.length>0&&this.$popup.css("top","-"+this.$header.outerHeight(!0)+"px"),this.$footer.length>0&&this.$popup.css("bottom","-"+this.$footer.outerHeight(!0)+"px"),this.$element.trigger("shown.fu.placard"),this.clickStamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.options.explicit||e(document).on("click.fu.placard.externalClick."+this.clickStamp,e.proxy(this.externalClickListener,this))}},e.fn.placard=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.placard"),l="object"==typeof t&&t;r||a.data("fu.placard",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.placard.defaults={onAccept:void 0,onCancel:void 0,externalClickAction:"cancelled",externalClickExceptions:[],explicit:!1,revertOnCancel:-1,applyEllipsis:!1},e.fn.placard.Constructor=s,e.fn.placard.noConflict=function(){return e.fn.placard=t,this},e(document).on("focus.fu.placard.data-api","[data-initialize=placard]",function(t){var i=e(t.target).closest(".placard");i.data("fu.placard")||i.placard(i.data())}),e(function(){e("[data-initialize=placard]").each(function(){var t=e(this);t.data("fu.placard")||t.placard(t.data())})})}(e),function(e){var t=e.fn.radio,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){if(this.options=e.extend({},e.fn.radio.defaults,s),"label"===t.tagName.toLowerCase()){this.$label=e(t),this.$radio=this.$label.find('input[type="radio"]'),this.groupName=this.$radio.attr("name"),!this.options.ignoreVisibilityCheck&&this.$radio.css("visibility").match(/hidden|collapse/)&&i("For accessibility reasons, in order for tab and space to function on radio, `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.");var n=this.$radio.attr("data-toggle");this.$toggleContainer=e(n),this.$radio.on("change",e.proxy(this.itemchecked,this)),this.setInitialState()}else i("Radio must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/radio.html for example of proper markup. Call `.radio()` on the `` not the ` `")};(s.prototype={constructor:s,setInitialState:function(){var e=this.$radio,t=e.prop("checked"),i=e.prop("disabled");this.setCheckedState(e,t),this.setDisabledState(e,i)},resetGroup:function(){e('input[name="'+this.groupName+'"]').each(function(t,i){var s=e(i),n=s.parent(),a=s.attr("data-toggle"),r=e(a);n.removeClass("checked"),r.addClass("hidden")})},setCheckedState:function(t,i){var s=t,n=s.parent(),a=s.attr("data-toggle"),r=e(a);i?(this.resetGroup(),s.prop("checked",!0),n.addClass("checked"),r.removeClass("hide hidden"),n.trigger("checked.fu.radio")):(s.prop("checked",!1),n.removeClass("checked"),r.addClass("hidden"),n.trigger("unchecked.fu.radio")),n.trigger("changed.fu.radio",i)},setDisabledState:function(t,i){var s=e(t),n=this.$label;return i?(s.prop("disabled",!0),n.addClass("disabled"),n.trigger("disabled.fu.radio")):(s.prop("disabled",!1),n.removeClass("disabled"),n.trigger("enabled.fu.radio")),s},itemchecked:function(t){var i=e(t.target);this.setCheckedState(i,!0)},check:function(){this.setCheckedState(this.$radio,!0)},uncheck:function(){this.setCheckedState(this.$radio,!1)},isChecked:function(){return this.$radio.prop("checked")},enable:function(){this.setDisabledState(this.$radio,!1)},disable:function(){this.setDisabledState(this.$radio,!0)},destroy:function(){return this.$label.remove(),this.$label[0].outerHTML}}).getValue=s.prototype.isChecked,e.fn.radio=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.radio"),l="object"==typeof t&&t;r||a.data("fu.radio",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.radio.defaults={ignoreVisibilityCheck:!1},e.fn.radio.Constructor=s,e.fn.radio.noConflict=function(){return e.fn.radio=t,this},e(document).on("mouseover.fu.radio.data-api","[data-initialize=radio]",function(t){var i=e(t.target);i.data("fu.radio")||i.radio(i.data())}),e(function(){e("[data-initialize=radio]").each(function(){var t=e(this);t.data("fu.radio")||t.radio(t.data())})})}(e),function(e){var t=e.fn.search,i=function(t,i){this.$element=e(t),this.$repeater=e(t).closest(".repeater"),this.options=e.extend({},e.fn.search.defaults,i),"true"===this.$element.attr("data-searchOnKeyPress")&&(this.options.searchOnKeyPress=!0),this.$button=this.$element.find("button"),this.$input=this.$element.find("input"),this.$icon=this.$element.find(".glyphicon, .fuelux-icon"),this.$button.on("click.fu.search",e.proxy(this.buttonclicked,this)),this.$input.on("keyup.fu.search",e.proxy(this.keypress,this)),this.$repeater.length>0&&this.$repeater.on("rendered.fu.repeater",e.proxy(this.clearPending,this)),this.activeSearch=""};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element[0].outerHTML},search:function(e){this.$icon.hasClass("glyphicon")&&this.$icon.removeClass("glyphicon-search").addClass("glyphicon-remove"),this.$icon.hasClass("fuelux-icon")&&this.$icon.removeClass("fuelux-icon-search").addClass("fuelux-icon-remove"),this.activeSearch=e,this.$element.addClass("searched pending"),this.$element.trigger("searched.fu.search",e)},clear:function(){this.$icon.hasClass("glyphicon")&&this.$icon.removeClass("glyphicon-remove").addClass("glyphicon-search"),this.$icon.hasClass("fuelux-icon")&&this.$icon.removeClass("fuelux-icon-remove").addClass("fuelux-icon-search"),this.$element.hasClass("pending")&&this.$element.trigger("canceled.fu.search"),this.activeSearch="",this.$input.val(""),this.$element.trigger("cleared.fu.search"),this.$element.removeClass("searched pending")},clearPending:function(){this.$element.removeClass("pending")},action:function(){var e=this.$input.val();e&&e.length>0?this.search(e):this.clear()},buttonclicked:function(t){t.preventDefault(),e(t.currentTarget).is(".disabled, :disabled")||(this.$element.hasClass("pending")||this.$element.hasClass("searched")?this.clear():this.action())},keypress:function(e){13===e.which?(e.preventDefault(),this.action()):9===e.which?e.preventDefault():27===e.which?(e.preventDefault(),this.clear()):this.options.searchOnKeyPress&&this.action()},disable:function(){this.$element.addClass("disabled"),this.$input.attr("disabled","disabled"),this.options.allowCancel||this.$button.addClass("disabled")},enable:function(){this.$element.removeClass("disabled"),this.$input.removeAttr("disabled"),this.$button.removeClass("disabled")}},e.fn.search=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.search"),l="object"==typeof t&&t;r||a.data("fu.search",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.search.defaults={clearOnEmpty:!1,searchOnKeyPress:!1,allowCancel:!1},e.fn.search.Constructor=i,e.fn.search.noConflict=function(){return e.fn.search=t,this},e(document).on("mousedown.fu.search.data-api","[data-initialize=search]",function(t){var i=e(t.target).closest(".search");i.data("fu.search")||i.search(i.data())}),e(function(){e("[data-initialize=search]").each(function(){var t=e(this);t.data("fu.search")||t.search(t.data())})})}(e),function(e){var t=e.fn.selectlist,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.selectlist.defaults,i),this.$button=this.$element.find(".btn.dropdown-toggle"),this.$hiddenField=this.$element.find(".hidden-field"),this.$label=this.$element.find(".selected-label"),this.$dropdownMenu=this.$element.find(".dropdown-menu"),this.$element.on("click.fu.selectlist",".dropdown-menu a",e.proxy(this.itemClicked,this)),this.setDefaultSelection(),"auto"!==i.resize&&"auto"!==this.$element.attr("data-resize")||this.resize(),0===this.$dropdownMenu.children("li").length&&(this.disable(),this.doSelect(e(this.options.emptyLabelHTML))),this.$element.on("shown.bs.dropdown",function(){var t=e(this);e(document).on("keypress.fu.selectlist",function(i){var s=String.fromCharCode(i.which);t.find("li").each(function(t,i){if(e(i).text().charAt(0).toLowerCase()===s)return e(i).children("a").focus(),!1})})}),this.$element.on("hide.bs.dropdown",function(){e(document).off("keypress.fu.selectlist")})};(i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},doSelect:function(t){var i;this.$selectedItem=i=t,this.$hiddenField.val(this.$selectedItem.attr("data-value")),this.$label.html(e(this.$selectedItem.children()[0]).html()),this.$element.find("li").each(function(){i.is(e(this))?e(this).attr("data-selected",!0):e(this).removeData("selected").removeAttr("data-selected")})},itemClicked:function(t){this.$element.trigger("clicked.fu.selectlist",this.$selectedItem),t.preventDefault(),e(t.currentTarget).parent("li").is(".disabled, :disabled")||(e(t.target).parent().is(this.$selectedItem)||this.itemChanged(t),this.$element.find(".dropdown-toggle").focus())},itemChanged:function(t){this.doSelect(e(t.target).closest("li"));var i=this.selectedItem();this.$element.trigger("changed.fu.selectlist",i)},resize:function(){var t=0,i=0,s=e("
").addClass("selectlist-sizer");Boolean(e(document).find("html").hasClass("fuelux"))?e(document.body).append(s):e(".fuelux:first").append(s),s.append(this.$element.clone()),this.$element.find("a").each(function(){s.find(".selected-label").text(e(this).text()),i=s.find(".selectlist").outerWidth(),(i+=s.find(".sr-only").outerWidth())>t&&(t=i)}),t<=1||(this.$button.css("width",t),this.$dropdownMenu.css("width",t),s.remove())},selectedItem:function(){var t=this.$selectedItem.text();return e.extend({text:t},this.$selectedItem.data())},selectByText:function(t){var i=e([]);this.$element.find("li").each(function(){if((this.textContent||this.innerText||e(this).text()||"").toLowerCase()===(t||"").toLowerCase())return i=e(this),!1}),this.doSelect(i)},selectByValue:function(e){var t='li[data-value="'+e+'"]';this.selectBySelector(t)},selectByIndex:function(e){var t="li:eq("+e+")";this.selectBySelector(t)},selectBySelector:function(e){var t=this.$element.find(e);this.doSelect(t)},setDefaultSelection:function(){var e=this.$element.find("li[data-selected=true]").eq(0);0===e.length&&(e=this.$element.find("li").has("a").eq(0)),this.doSelect(e)},enable:function(){this.$element.removeClass("disabled"),this.$button.removeClass("disabled")},disable:function(){this.$element.addClass("disabled"),this.$button.addClass("disabled")}}).getValue=i.prototype.selectedItem,e.fn.selectlist=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.selectlist"),l="object"==typeof t&&t;r||a.data("fu.selectlist",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.selectlist.defaults={emptyLabelHTML:'No items '},e.fn.selectlist.Constructor=i,e.fn.selectlist.noConflict=function(){return e.fn.selectlist=t,this},e(document).on("mousedown.fu.selectlist.data-api","[data-initialize=selectlist]",function(t){var i=e(t.target).closest(".selectlist");i.data("fu.selectlist")||i.selectlist(i.data())}),e(function(){e("[data-initialize=selectlist]").each(function(){var t=e(this);t.data("fu.selectlist")||t.selectlist(t.data())})})}(e),function(e){var t=e.fn.spinbox,i=function(t,i){this.$element=e(t),this.$element.find(".btn").on("click",function(e){e.preventDefault()}),this.options=e.extend({},e.fn.spinbox.defaults,i),this.options.step=this.$element.data("step")||this.options.step,this.options.valuethis.options.max?e=this.options.cycle?this.options.min:this.options.max:ethis.options.max?e-=this.options.step:e .tree-loader").remove()):t.remove());var d=a.find(".tree-loader:last");!1===o&&d.removeClass("hide hidden"),this.options.dataSource(l||{},function(t){e.each(t.data,function(t,i){var n=i.type;"folder"===i.type&&(n="branch");var l=s.$element.find("[data-template=tree"+n+"]:eq(0)").clone().removeClass("hide hidden").removeData("template").removeAttr("data-template");l.find(".tree-"+n+"-name > .tree-label").html(i.text||i.name),l.data(i);var o=i.attr||i.dataAttributes||[];e.each(o,function(e,t){switch(e){case"cssClass":case"class":case"className":l.addClass(t);break;case"data-icon":l.find(".icon-item").removeClass().addClass("icon-item "+t),l.attr(e,t);break;case"id":l.attr(e,t),l.attr("aria-labelledby",t+"-label"),l.find(".tree-branch-name > .tree-label").attr("id",t+"-label");break;default:l.attr(e,t)}}),r?a.append(l):a.find(".tree-branch-children:eq(0)").append(l)}),a.find(".tree-loader").addClass("hidden"),s.$element.trigger("loaded.fu.tree",a)})},selectTreeNode:function(t,i){var a={};a.$element=e(t);var r={};r.$elements=this.$element.find(".tree-selected"),r.dataForEvent=[],"folder"===i?(a.$element=a.$element.closest(".tree-branch"),a.$icon=a.$element.find(".icon-folder")):a.$icon=a.$element.find(".icon-item"),a.elementData=a.$element.data(),c(a.$element),r=this.options.multiSelect?s(this,a,r):n(this,a,r),d(this.$element,a.$element),this.$element.trigger(r.eventType+".fu.tree",{target:a.elementData,selected:r.dataForEvent}),a.$element.trigger("updated.fu.tree",{selected:r.dataForEvent,item:a.$element,eventType:r.eventType})},discloseFolder:function(t){var i=e(t).closest(".tree-branch"),s=i.find(".tree-branch-children"),n=s.eq(0);i.addClass("tree-open"),i.attr("aria-expanded","true"),n.removeClass("hide hidden"),i.find("> .tree-branch-header .icon-folder").eq(0).removeClass("glyphicon-folder-close").addClass("glyphicon-folder-open");var a=this.$element,r=function(){a.trigger("disclosedFolder.fu.tree",i.data())};s.children().length?r():(a.one("loaded.fu.tree",r),this.populate(s))},closeFolder:function(t){var i=e(t).closest(".tree-branch"),s=i.find(".tree-branch-children").eq(0);i.removeClass("tree-open"),i.attr("aria-expanded","false"),s.addClass("hidden"),i.find("> .tree-branch-header .icon-folder").eq(0).removeClass("glyphicon-folder-open").addClass("glyphicon-folder-close"),this.options.cacheItems||s.empty(),this.$element.trigger("closed.fu.tree",i.data())},toggleFolder:function(t){var i=e(t);i.find(".glyphicon-folder-close").length?this.discloseFolder(t):i.find(".glyphicon-folder-open").length&&this.closeFolder(t)},selectFolder:function(e){this.options.folderSelect&&this.selectTreeNode(e,"folder")},selectItem:function(e){this.options.itemSelect&&this.selectTreeNode(e,"item")},selectedItems:function(){var t=this.$element.find(".tree-selected"),i=[];return e.each(t,function(t,s){i.push(e(s).data())}),i},collapse:function(){var e=this,t=[];e.$element.on("closed.fu.tree",function i(s,n){t.push(n),0===e.$element.find(".tree-branch.tree-open:not('.hidden, .hide')").length&&(e.$element.trigger("closedAll.fu.tree",{tree:e.$element,reportedClosed:t}),e.$element.off("loaded.fu.tree",e.$element,i))}),e.$element.find(".tree-branch.tree-open:not('.hidden, .hide')").each(function(){e.closeFolder(this)})},discloseVisible:function(){var t=this,i=t.$element.find(".tree-branch:not('.tree-open, .hidden, .hide')"),s=[];t.$element.on("loaded.fu.tree",function e(n,a){s.push(a),s.length===i.length&&(t.$element.trigger("disclosedVisible.fu.tree",{tree:t.$element,reportedOpened:s}),t.$element.off("loaded.fu.tree",t.$element,e))}),t.$element.find(".tree-branch:not('.tree-open, .hidden, .hide')").each(function(){t.discloseFolder(e(this).find(".tree-branch-header"))})},discloseAll:function(){var e=this;void 0===e.$element.data("disclosures")&&e.$element.data("disclosures",0);var t=e.options.disclosuresUpperLimit>=1&&e.$element.data("disclosures")>=e.options.disclosuresUpperLimit;if(0===e.$element.find(".tree-branch:not('.tree-open, .hidden, .hide')").length)e.$element.trigger("disclosedAll.fu.tree",{tree:e.$element,disclosures:e.$element.data("disclosures")}),e.options.cacheItems||e.$element.one("closeAll.fu.tree",function(){e.$element.data("disclosures",0)});else{if(t&&(e.$element.trigger("exceededDisclosuresLimit.fu.tree",{tree:e.$element,disclosures:e.$element.data("disclosures")}),!e.$element.data("ignore-disclosures-limit")))return;e.$element.data("disclosures",e.$element.data("disclosures")+1),e.$element.one("disclosedVisible.fu.tree",function(){e.discloseAll()}),e.discloseVisible()}},refreshFolder:function(e){var t=e.closest(".tree-branch"),i=t.find(".tree-branch-children");i.eq(0).empty(),t.hasClass("tree-open")?this.populate(i,!1):this.populate(i,!0),this.$element.trigger("refreshedFolder.fu.tree",t.data())}}).closeAll=r.prototype.collapse,r.prototype.openFolder=r.prototype.discloseFolder,r.prototype.getValue=r.prototype.selectedItems;var l=function(e,t){e.attr("tabindex",-1),e.find("li").attr("tabindex",-1),t&&t.length>0&&t.attr("tabindex",0)},o=function(e,t){var i=t.find(".tree-selected:first");i.length<=0&&(i=t.find('li:not(".hidden"):first')),d(e,i)},d=function(e,t){l(e,t),e.attr("aria-activedescendant",t.attr("id")),t.focus(),e.trigger("setFocus.fu.tree",t)},h=function(t,i){if(i.isDefaultPrevented()||i.isPropagationStopped())return!1;var s=i.originalEvent.target,n=e(s),a=n.hasClass("tree-open"),r=!1,l=!0,h=function(){t.trigger("keyboardNavigated.fu.tree",i,n)};switch(i.which){case 13:case 32:var c=t.hasClass("tree-folder-select"),p=n.hasClass("tree-branch"),u=n.hasClass("tree-item");l=!1,p?c?(t.one("selected.fu.tree deselected.fu.tree",h),t.tree("selectFolder",n.find(".tree-branch-header")[0])):(t.one("loaded.fu.tree closed.fu.tree",h),t.tree("toggleFolder",n.find(".tree-branch-header")[0])):u?(t.one("selected.fu.tree",h),t.tree("selectItem",n)):(f=e(n.prevAll().not(".hidden")[0]),n.click(),t.one("loaded.fu.tree",function(){v=e(f.nextAll().not(".hidden")[0]),d(t,v),h()})),r=!0;break;case 35:d(t,t.find('li:not(".hidden"):last')),r=!0;break;case 36:d(t,t.find('li:not(".hidden"):first')),r=!0;break;case 37:a?(l=!1,t.one("closed.fu.tree",h),t.tree("closeFolder",s)):d(t,e(n.parents("li")[0])),r=!0;break;case 38:var f=[];if((f=e(n.prevAll().not(".hidden")[0])).hasClass("tree-open")){var m=f.find('li:not(".hidden"):last');m.length>0&&(f=e(m[0]))}f.length<1&&(f=e(n.parents("li")[0])),d(t,f),r=!0;break;case 39:a?o(t,n):(l=!1,t.one("disclosed.fu.tree",h),t.tree("discloseFolder",s)),r=!0;break;case 40:var v=e(n.find('li:not(".hidden"):first')[0]);(!a||v.length<=0)&&(v=e(n.nextAll().not(".hidden")[0])),v.length<1&&(v=e(e(n.parents("li")[0]).nextAll().not(".hidden")[0])),d(t,v),r=!0;break;default:return!0}return r&&(i.preventDefault(),i.stopPropagation(),l&&h()),!0},c=function(e){e.attr("aria-selected",!0)},p=function(e){e.attr("aria-selected",!1)};e.fn.tree=function(t){var i,s=Array.prototype.slice.call(arguments,1),n=this.each(function(){var n=e(this),a=n.data("fu.tree"),l="object"==typeof t&&t;a||(n.data("fu.tree",a=new r(this,l)),n.trigger("initialized.fu.tree")),"string"==typeof t&&(i=a[t].apply(a,s))});return void 0===i?n:i};var u=function t(i,s){if(e.isEmptyObject(i))return s;if(void 0===s)return!1;for(var n=0;n0&&t({data:u(e,this.staticData)})},multiSelect:!1,cacheItems:!0,folderSelect:!0,itemSelect:!0,disclosuresUpperLimit:0},e.fn.tree.Constructor=r,e.fn.tree.noConflict=function(){return e.fn.tree=a,this}}(e),function(e){var t={BACKSPACE_KEYCODE:8,COMMA_KEYCODE:188,DELETE_KEYCODE:46,DOWN_ARROW_KEYCODE:40,ENTER_KEYCODE:13,TAB_KEYCODE:9,UP_ARROW_KEYCODE:38},i=function(e){return function(t){return t.keyCode===e}},s=i(t.BACKSPACE_KEYCODE),n=i(t.DELETE_KEYCODE),a=i(t.TAB_KEYCODE),r=i(t.UP_ARROW_KEYCODE),l=i(t.DOWN_ARROW_KEYCODE),o=/&[^\s]*;/;e.fn.utilities={CONST:t,cleanInput:function(t){for(;o.test(t);)t=e("").html(t).text();return e("").text(t).html()},isBackspaceKey:s,isDeleteKey:n,isShiftHeld:function(e){return!0===e.shiftKey},isTabKey:a,isUpArrow:r,isDownArrow:l}}(e),function(e){var t=e.fn.wizard,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.wizard.defaults,i),this.options.disablePreviousStep="previous"===this.$element.attr("data-restrict")||this.options.disablePreviousStep,this.currentStep=this.options.selectedItem.step,this.numSteps=this.$element.find(".steps li").length,this.$prevBtn=this.$element.find("button.btn-prev"),this.$nextBtn=this.$element.find("button.btn-next");var s=this.$nextBtn.children().detach();this.nextText=e.trim(this.$nextBtn.text()),this.$nextBtn.append(s);var n=this.$element.children(".steps-container");0===n.length&&(n=this.$element,this.$element.addClass("no-steps-container"),window&&window.console&&window.console.warn&&window.console.warn('please update your wizard markup to include ".steps-container" as seen in http://getfuelux.com/javascript.html#wizard-usage-markup')),n=n.find(".steps"),this.$prevBtn.on("click.fu.wizard",e.proxy(this.previous,this)),this.$nextBtn.on("click.fu.wizard",e.proxy(this.next,this)),n.on("click.fu.wizard","li.complete",e.proxy(this.stepclicked,this)),this.selectedItem(this.options.selectedItem),this.options.disablePreviousStep&&(this.$prevBtn.attr("disabled",!0),this.$element.find(".steps").addClass("previous-disabled"))};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},addSteps:function(t){var i,s,n,a,r,l,o=[].slice.call(arguments).slice(1),d=this.$element.find(".steps"),h=this.$element.find(".step-content");for(t=-1===t||t>this.numSteps+1?this.numSteps+1:t,o[0]instanceof Array&&(o=o[0]),r=d.find("li:nth-child("+t+")"),a=h.find(".step-pane:nth-child("+t+")"),r.length<1&&(r=null),i=0,s=o.length;i ')).append(o[i].label||"").append(' '),l.find(".badge").append(o[i].badge||t),(n=e('
')).append(o[i].pane||""),r?(r.before(l),a.before(n)):(d.append(l),h.append(n)),t++;this.syncSteps(),this.numSteps=d.find("li").length,this.setState()},removeSteps:function(t,i){var s,n="nextAll",a=0,r=this.$element.find(".steps"),l=this.$element.find(".step-content");i=void 0!==i?i:1,t>r.find("li").length?s=r.find("li:last"):(s=r.find("li:nth-child("+t+")").prev()).length<1&&(n="children",s=r),s[n]().each(function(){var t=e(this),s=t.attr("data-step");if(!(a1,i=1===this.currentStep,s=this.currentStep===this.numSteps;this.options.disablePreviousStep||this.$prevBtn.attr("disabled",!0===i||!1===t);var n=this.$nextBtn.attr("data-last");if(n){this.lastText=n;var a=this.nextText;!0===s?(a=this.lastText,this.$element.addClass("complete")):this.$element.removeClass("complete");var r=this.$nextBtn.children().detach();this.$nextBtn.text(a).append(r)}var l=this.$element.find(".steps li");l.removeClass("active").removeClass("complete"),l.find("span.badge").removeClass("badge-info").removeClass("badge-success");var o=".steps li:lt("+(this.currentStep-1)+")",d=this.$element.find(o);d.addClass("complete"),d.find("span.badge").addClass("badge-success");var h=".steps li:eq("+(this.currentStep-1)+")",c=this.$element.find(h);c.addClass("active"),c.find("span.badge").addClass("badge-info");var p=this.$element.find(".step-content"),u=c.attr("data-step");p.find(".step-pane").removeClass("active"),p.find('.step-pane[data-step="'+u+'"]:first').addClass("active"),this.$element.find(".steps").first().attr("style","margin-left: 0");var f=0;this.$element.find(".steps > li").each(function(){f+=e(this).outerWidth()});var m=0;if(m=this.$element.find(".actions").length?this.$element.width()-this.$element.find(".actions").first().outerWidth():this.$element.width(),f>m){var v=f-m;this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"),this.$element.find("li.active").first().position().left<200&&((v+=this.$element.find("li.active").first().position().left-200)<1?this.$element.find(".steps").first().attr("style","margin-left: 0"):this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"))}if(void 0!==this.initialized){var g=e.Event("changed.fu.wizard");this.$element.trigger(g,{step:this.currentStep})}this.initialized=!0},stepclicked:function(t){var i=e(t.currentTarget),s=this.$element.find(".steps li").index(i);if(!(s');t?i.append(t):i.append("---------"),this.$element.append(i),this.disable()},getPercentage:function(){var e="border-box"===this.$element.css("box-sizing")?this.$element.outerHeight():this.$element.height(),t=this.$element.get(0).scrollHeight;return t>e?e/(t-this.curScrollTop)*100:0},fetchData:function(t){var i,s=e('
'),n=this,a=function(){var t={percentage:n.curPercentage,scrollTop:n.curScrollTop},i=e('
');s.append(i),i.loader(),n.options.dataSource&&n.options.dataSource(t,function(e){var t;s.remove(),e.content&&n.$element.append(e.content),e.end&&(t=!0!==e.end?e.end:void 0,n.end(t)),n.fetchingData=!1})};this.fetchingData=!0,this.$element.append(s),this.options.hybrid&&!0!==t?(i=e(' '),"object"==typeof this.options.hybrid?i.append(this.options.hybrid.label):i.append(' '),i.on("click.fu.infinitescroll",function(){i.remove(),a()}),s.append(i)):a()},onScroll:function(e){this.curScrollTop=this.$element.scrollTop(),this.curPercentage=this.getPercentage(),!this.fetchingData&&this.curPercentage>=this.options.percentage&&this.fetchData()}},e.fn.infinitescroll=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.infinitescroll"),l="object"==typeof t&&t;r||a.data("fu.infinitescroll",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.infinitescroll.defaults={dataSource:null,hybrid:!1,percentage:95},e.fn.infinitescroll.Constructor=i,e.fn.infinitescroll.noConflict=function(){return e.fn.infinitescroll=t,this}}(e),function(e){var t=e.fn.pillbox,i=e.fn.utilities,s=e.fn.utilities.CONST,n=s.COMMA_KEYCODE,a=s.ENTER_KEYCODE,r=i.isBackspaceKey,l=i.isDeleteKey,o=i.isTabKey,d=i.isUpArrow,h=i.isDownArrow,c=i.cleanInput,p=i.isShiftHeld,u=function(t,i){this.$element=e(t),this.$moreCount=this.$element.find(".pillbox-more-count"),this.$pillGroup=this.$element.find(".pill-group"),this.$addItem=this.$element.find(".pillbox-add-item"),this.$addItemWrap=this.$addItem.parent(),this.$suggest=this.$element.find(".suggest"),this.$pillHTML='\t \t\t\tRemove \t ',this.options=e.extend({},e.fn.pillbox.defaults,i),-1===this.options.readonly?void 0!==this.$element.attr("data-readonly")&&this.readonly(!0):this.options.readonly&&this.readonly(!0),this.acceptKeyCodes=this._generateObject(this.options.acceptKeyCodes),this.$element.on("click.fu.pillbox",".pill-group > .pill",e.proxy(this.itemClicked,this)),this.$element.on("click.fu.pillbox",e.proxy(this.inputFocus,this)),this.$element.on("keydown.fu.pillbox",".pillbox-add-item",e.proxy(this.inputEvent,this)),this.options.onKeyDown&&this.$element.on("mousedown.fu.pillbox",".suggest > li",e.proxy(this.suggestionClick,this)),this.options.edit&&(this.$element.addClass("pills-editable"),this.$element.on("blur.fu.pillbox",".pillbox-add-item",e.proxy(this.cancelEdit,this))),this.$element.on("blur.fu.pillbox",".pillbox-add-item",e.proxy(this.inputEvent,this))};(u.prototype={constructor:u,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},items:function(){var t=this;return this.$pillGroup.children(".pill").map(function(){return t.getItemData(e(this))}).get()},itemClicked:function(t){var i,s=e(t.target);if(t.preventDefault(),t.stopPropagation(),this._closeSuggestions(),s.hasClass("pill"))i=s;else if(i=s.parent(),void 0===this.$element.attr("data-readonly")){if(s.hasClass("glyphicon-close"))return this.options.onRemove?this.options.onRemove(this.getItemData(i,{el:i}),e.proxy(this._removeElement,this)):this._removeElement(this.getItemData(i,{el:i})),!1;if(this.options.edit){if(i.find(".pillbox-list-edit").length)return!1;this.openEdit(i)}}return this.$element.trigger("clicked.fu.pillbox",this.getItemData(i)),!0},readonly:function(e){e?this.$element.attr("data-readonly","readonly"):this.$element.removeAttr("data-readonly"),this.options.truncate&&this.truncate(e)},suggestionClick:function(t){var i=e(t.currentTarget),s={text:i.html(),value:i.data("value")};t.preventDefault(),this.$addItem.val(""),i.data("attr")&&(s.attr=JSON.parse(i.data("attr"))),s.data=i.data("data"),this.addItems(s,!0),this._closeSuggestions()},itemCount:function(){return this.$pillGroup.children(".pill").length},addItems:function(){var t,i,s,n=this;!isFinite(String(arguments[0]))||arguments[0]instanceof Array?s=(t=[].slice.call(arguments).slice(0))[1]&&!t[1].text:(t=[].slice.call(arguments).slice(1),i=arguments[0]),t[0]instanceof Array&&(t=t[0]),t.length&&(e.each(t,function(e,i){var s={text:i.text,value:i.value?i.value:i.text,el:n.$pillHTML};i.attr&&(s.attr=i.attr),i.data&&(s.data=i.data),t[e]=s}),this.options.edit&&this.currentEdit&&(t[0].el=this.currentEdit.wrap("
").parent().html()),s&&t.pop(1),n.options.onAdd&&s?this.options.edit&&this.currentEdit?n.options.onAdd(t[0],e.proxy(n.saveEdit,this)):n.options.onAdd(t[0],e.proxy(n.placeItems,this)):this.options.edit&&this.currentEdit?n.saveEdit(t):i?n.placeItems(i,t):n.placeItems(t,s))},removeItems:function(e,t){var i=this;if(e)for(var s=t||1,n=0;n .pill:nth-child("+e+")");if(!a)break;a.remove()}else this.$pillGroup.find(".pill").remove(),this._removePillTrigger({method:"removeAll"})},placeItems:function(){var t,i,s,n;if(!isFinite(String(arguments[0]))||arguments[0]instanceof Array?n=(t=[].slice.call(arguments).slice(0))[1]&&!t[1].text:(t=[].slice.call(arguments).slice(1),i=arguments[0]),t[0]instanceof Array&&(t=t[0]),t.length){var a=[];e.each(t,function(t,i){var s=e(i.el);s.attr("data-value",i.value),s.find("span:first").html(i.text),i.attr&&e.each(i.attr,function(e,t){"cssClass"===e||"class"===e?s.addClass(t):s.attr(e,t)}),i.data&&s.data("data",i.data),a.push(s)}),this.$pillGroup.children(".pill").length>0?i&&(s=this.$pillGroup.find(".pill:nth-child("+i+")")).length?s.before(a):this.$pillGroup.children(".pill:last").after(a):this.$pillGroup.prepend(a),n&&this.$element.trigger("added.fu.pillbox",{text:t[0].text,value:t[0].value})}},inputEvent:function(e){var t=this,i=t.options.cleanInput(this.$addItem.val()),s="focusout"===e.type,n=s&&i.length>0;if(this.acceptKeyCodes[e.keyCode]&&!p(e)||n){var a,c;if(this.options.onKeyDown&&this._isSuggestionsOpen()){var u=this.$suggest.find(".pillbox-suggest-sel");u.length&&(i=t.options.cleanInput(u.html()),c=t.options.cleanInput(u.data("value")),a=u.data("attr"))}return(i.replace(/[ ]*\,[ ]*/,"").match(/\S/)||this.options.allowEmptyPills&&i.length)&&(this._closeSuggestions(),this.$addItem.hide().val(""),a?this.addItems({text:i,value:c,attr:JSON.parse(a)},!0):this.addItems({text:i,value:c},!0),setTimeout(function(){t.$addItem.show().attr({size:10}).focus()},0)),e.preventDefault(),!0}if(r(e)||l(e)){if(!i.length){if(e.preventDefault(),this.options.edit&&this.currentEdit)return this.cancelEdit(),!0;this._closeSuggestions();var f=this.$pillGroup.children(".pill:last");return f.hasClass("pillbox-highlight")?this._removeElement(this.getItemData(f,{el:f})):f.addClass("pillbox-highlight"),!0}}else i.length>10&&this.$addItem.width() .pill[data-value="'+t+'"]').remove()}),this._removePillTrigger({method:"removeByValue",removedValues:t})},removeByText:function(){var t=[].slice.call(arguments).slice(0),i=this;e.each(t,function(e,t){i.$pillGroup.find('> .pill:contains("'+t+'")').remove()}),this._removePillTrigger({method:"removeByText",removedText:t})},truncate:function(t){var i=this;if(this.$element.removeClass("truncate"),this.$addItemWrap.removeClass("truncated"),this.$pillGroup.find(".pill").removeClass("truncated"),t){this.$element.addClass("truncate");var s=this.$element.width(),n=!1,a=0,r=this.$pillGroup.find(".pill").length,l=0;this.$pillGroup.find(".pill").each(function(){var t=e(this);n?t.addClass("truncated"):(a++,i.$moreCount.text(r-a),l+t.outerWidth(!0)+i.$addItemWrap.outerWidth(!0)<=s?l+=t.outerWidth(!0):(i.$moreCount.text(r-a+1),t.addClass("truncated"),n=!0))}),a===r&&this.$addItemWrap.addClass("truncated")}},inputFocus:function(){this.$element.find(".pillbox-add-item").focus()},getItemData:function(t,i){return e.extend({text:t.find("span:first").html()},t.data(),i)},_removeElement:function(e){e.el.remove(),delete e.el,this.$element.trigger("removed.fu.pillbox",e)},_removePillTrigger:function(e){this.$element.trigger("removed.fu.pillbox",e)},_generateObject:function(t){var i={};return e.each(t,function(e,t){i[t]=!0}),i},_openSuggestions:function(t,i){var s=e("");return this.callbackId===t.timeStamp&&(i.data&&i.data.length&&(e.each(i.data,function(t,i){var n=i.value?i.value:i.text,a=e(''+i.text+" ");i.attr&&a.data("attr",JSON.stringify(i.attr)),i.data&&a.data("data",i.data),s.append(a)}),this.$suggest.html("").append(s.children()),e(document).trigger("suggested.fu.pillbox",this.$suggest)),!0)},_closeSuggestions:function(){this.$suggest.html("").parent().removeClass("open")},_isSuggestionsOpen:function(){return this.$suggest.parent().hasClass("open")},_keySuggestions:function(e){var t=this.$suggest.find("li.pillbox-suggest-sel"),i=d(e);if(e.preventDefault(),t.length){var s=i?t.prev():t.next();s.length||(s=i?this.$suggest.find("li:last"):this.$suggest.find("li:first")),s&&(s.addClass("pillbox-suggest-sel"),t.removeClass("pillbox-suggest-sel"))}else(t=this.$suggest.find("li:first")).addClass("pillbox-suggest-sel")}}).getValue=u.prototype.items,e.fn.pillbox=function(t){var i,s=Array.prototype.slice.call(arguments,1),n=this.each(function(){var n=e(this),a=n.data("fu.pillbox"),r="object"==typeof t&&t;a||n.data("fu.pillbox",a=new u(this,r)),"string"==typeof t&&(i=a[t].apply(a,s))});return void 0===i?n:i},e.fn.pillbox.defaults={edit:!1,readonly:-1,truncate:!1,acceptKeyCodes:[a,n],allowEmptyPills:!1,cleanInput:c},e.fn.pillbox.Constructor=u,e.fn.pillbox.noConflict=function(){return e.fn.pillbox=t,this},e(document).on("mousedown.fu.pillbox.data-api","[data-initialize=pillbox]",function(t){var i=e(t.target).closest(".pillbox");i.data("fu.pillbox")||i.pillbox(i.data())}),e(function(){e("[data-initialize=pillbox]").each(function(){var t=e(this);t.data("fu.pillbox")||t.pillbox(t.data())})})}(e),function(e){var t=e.fn.repeater,i=function(t,i){var s,n,a=this;this.$element=e(t),this.$canvas=this.$element.find(".repeater-canvas"),this.$count=this.$element.find(".repeater-count"),this.$end=this.$element.find(".repeater-end"),this.$filters=this.$element.find(".repeater-filters"),this.$loader=this.$element.find(".repeater-loader"),this.$pageSize=this.$element.find(".repeater-itemization .selectlist"),this.$nextBtn=this.$element.find(".repeater-next"),this.$pages=this.$element.find(".repeater-pages"),this.$prevBtn=this.$element.find(".repeater-prev"),this.$primaryPaging=this.$element.find(".repeater-primaryPaging"),this.$search=this.$element.find(".repeater-search").find(".search"),this.$secondaryPaging=this.$element.find(".repeater-secondaryPaging"),this.$start=this.$element.find(".repeater-start"),this.$viewport=this.$element.find(".repeater-viewport"),this.$views=this.$element.find(".repeater-views"),this.currentPage=0,this.currentView=null,this.isDisabled=!1,this.infiniteScrollingCallback=function(){},this.infiniteScrollingCont=null,this.infiniteScrollingEnabled=!1,this.infiniteScrollingEnd=null,this.infiniteScrollingOptions={},this.lastPageInput=0,this.options=e.extend({},e.fn.repeater.defaults,i),this.pageIncrement=0,this.resizeTimeout={},this.stamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.storedDataSourceOpts=null,this.syncingViewButtonState=!1,this.viewOptions={},this.viewType=null,this.$filters.selectlist(),this.$pageSize.selectlist(),this.$primaryPaging.find(".combobox").combobox(),this.$search.search({searchOnKeyPress:this.options.searchOnKeyPress,allowCancel:this.options.allowCancel}),this.$filters.on("changed.fu.selectlist",function(e,t){a.$element.trigger("filtered.fu.repeater",t),a.render({clearInfinite:!0,pageIncrement:null})}),this.$nextBtn.on("click.fu.repeater",e.proxy(this.next,this)),this.$pageSize.on("changed.fu.selectlist",function(e,t){a.$element.trigger("pageSizeChanged.fu.repeater",t),a.render({pageIncrement:null})}),this.$prevBtn.on("click.fu.repeater",e.proxy(this.previous,this)),this.$primaryPaging.find(".combobox").on("changed.fu.combobox",function(e,t){a.pageInputChange(t.text,t)}),this.$search.on("searched.fu.search cleared.fu.search",function(e,t){a.$element.trigger("searchChanged.fu.repeater",t),a.render({clearInfinite:!0,pageIncrement:null})}),this.$search.on("canceled.fu.search",function(e,t){a.$element.trigger("canceled.fu.repeater",t),a.render({clearInfinite:!0,pageIncrement:null})}),this.$secondaryPaging.on("blur.fu.repeater",function(){a.pageInputChange(a.$secondaryPaging.val())}),this.$secondaryPaging.on("keyup",function(e){13===e.keyCode&&a.pageInputChange(a.$secondaryPaging.val())}),this.$views.find("input").on("change.fu.repeater",e.proxy(this.viewChanged,this)),e(window).on("resize.fu.repeater."+this.stamp,function(){clearTimeout(a.resizeTimeout),a.resizeTimeout=setTimeout(function(){a.resize(),a.$element.trigger("resized.fu.repeater")},75)}),this.$loader.loader(),this.$loader.loader("pause"),-1!==this.options.defaultView?n=this.options.defaultView:(s=this.$views.find("label.active input"),n=s.length>0?s.val():"list"),this.setViewOptions(n),this.initViewTypes(function(){a.resize(),a.$element.trigger("resized.fu.repeater"),a.render({changeView:n})})},s=function(e){window.console&&window.console.warn&&window.console.warn(e)},n=function t(i){var s=[];i.children().each(function(){var i=e(this),n=i.attr("data-preserve");"deep"===n?(i.detach(),s.push(i)):"shallow"===n&&(t(i),i.detach(),s.push(i))}),i.empty(),i.append(s)},a=function(t,i){var s;i&&"none"!==(s=i.action?i.action:"append")&&void 0!==i.item&&(void 0!==i.container?e(i.container):t)[s](i.item)},r=function(e,t,i){var s=e+1;s0&&(n.filter=this.$filters.selectlist("selectedItem")),this.infiniteScrollingEnabled||(n.pageSize=25,this.$pageSize.length>0&&(n.pageSize=parseInt(this.$pageSize.selectlist("selectedItem").value,10)));var a=this.$search&&this.$search.find("input")&&this.$search.find("input").val();""!==a&&(n.search=a);var r=(e.fn.repeater.viewTypes[this.viewType]||{}).dataOptions;return r&&(n=r.call(this,n)),n=e.extend(n,s)},infiniteScrolling:function(e,t){var i=this.$element.find(".repeater-footer"),s=this.$element.find(".repeater-viewport"),n=t||{};if(e)this.infiniteScrollingEnabled=!0,this.infiniteScrollingEnd=n.end,delete n.dataSource,delete n.end,this.infiniteScrollingOptions=n,s.css({height:s.height()+i.outerHeight()}),i.hide();else{var a=this.infiniteScrollingCont;delete a.data().infinitescroll,a.off("scroll"),a.removeClass("infinitescroll"),this.infiniteScrollingCont=null,this.infiniteScrollingEnabled=!1,this.infiniteScrollingEnd=null,this.infiniteScrollingOptions={},s.css({height:s.height()-i.outerHeight()}),i.show()}},infiniteScrollPaging:function(e){var t=!0!==this.infiniteScrollingEnd?this.infiniteScrollingEnd:void 0,i=e.page,s=e.pages;this.currentPage=void 0!==i?i:NaN,(!0===e.end||this.currentPage+1>=s)&&this.infiniteScrollingCont.infinitescroll("end",t)},initInfiniteScrolling:function(){var t=this.$canvas.find('[data-infinite="true"]:first');if((t=t.length<1?this.$canvas:t).data("fu.infinitescroll"))t.infinitescroll("enable");else{var i=this,s=e.extend({},this.infiniteScrollingOptions);s.dataSource=function(e,t){i.infiniteScrollingCallback=t,i.render({pageIncrement:1})},t.infinitescroll(s),this.infiniteScrollingCont=t}},initViewTypes:function(t){var i=[];for(var s in e.fn.repeater.viewTypes)({}).hasOwnProperty.call(e.fn.repeater.viewTypes,s)&&i.push(e.fn.repeater.viewTypes[s]);i.length>0?l.call(this,0,i,t):t()},itemization:function(e){this.$count.html(void 0!==e.count?e.count:"?"),this.$end.html(void 0!==e.end?e.end:"?"),this.$start.html(void 0!==e.start?e.start:"?")},next:function(){this.$nextBtn.attr("disabled","disabled"),this.$prevBtn.attr("disabled","disabled"),this.pageIncrement=1,this.$element.trigger("nextClicked.fu.repeater"),this.render({pageIncrement:this.pageIncrement})},pageInputChange:function(e,t){var i;if(e!==this.lastPageInput){this.lastPageInput=e;var s=parseInt(e,10)-1;i=s-this.currentPage,this.$element.trigger("pageChanged.fu.repeater",[s,t]),this.render({pageIncrement:i})}},pagination:function(e){this.$primaryPaging.removeClass("active"),this.$secondaryPaging.removeClass("active");var t=e.pages;this.currentPage=void 0!==e.page?e.page:NaN;var i=0===t?0:this.currentPage+1;if(t<=this.viewOptions.dropPagingCap){this.$primaryPaging.addClass("active");var s=this.$primaryPaging.find(".dropdown-menu");s.empty();for(var n=0;n'+a+" ")}this.$primaryPaging.find("input.form-control").val(i)}else this.$secondaryPaging.addClass("active"),this.$secondaryPaging.val(i);this.lastPageInput=this.currentPage+1+"",this.$pages.html(""+t),this.currentPage+1=0?(this.$prevBtn.removeAttr("disabled"),this.$prevBtn.removeClass("page-end")):(this.$prevBtn.attr("disabled","disabled"),this.$prevBtn.addClass("page-end")),0!==this.pageIncrement&&(this.pageIncrement>0?this.$nextBtn.is(":disabled")?this.$prevBtn.focus():this.$nextBtn.focus():this.$prevBtn.is(":disabled")?this.$nextBtn.focus():this.$prevBtn.focus())},previous:function(){this.$nextBtn.attr("disabled","disabled"),this.$prevBtn.attr("disabled","disabled"),this.pageIncrement=-1,this.$element.trigger("previousClicked.fu.repeater"),this.render({pageIncrement:this.pageIncrement})},render:function(t){this.disable();var i=!1,s=e.fn.repeater.viewTypes[this.viewType]||{},n=t||{};if(n.changeView&&this.currentView!==n.changeView){var a=this.currentView;this.currentView=n.changeView,this.viewType=this.currentView.split(".")[0],this.setViewOptions(this.currentView),this.$element.attr("data-currentview",this.currentView),this.$element.attr("data-viewtype",this.viewType),i=!0,n.viewChanged=i,this.$element.trigger("viewChanged.fu.repeater",this.currentView),this.infiniteScrollingEnabled&&this.infiniteScrolling(!1),(s=e.fn.repeater.viewTypes[this.viewType]||{}).selected&&s.selected.call(this,{prevView:a})}this.syncViewButtonState(),n.preserve=void 0!==n.preserve?n.preserve:!i,this.clear(n),(!this.infiniteScrollingEnabled||this.infiniteScrollingEnabled&&i)&&this.$loader.show().loader("play");var r=this.getDataOptions(n),l=this;(0,this.viewOptions.dataSource)(r,function(e){d.call(l,{data:e,dataOptions:r,options:n,viewChanged:i,viewTypeObj:s})})},resize:function(){for(var t,i,s,n=-1===this.viewOptions.staticHeight?this.$element.attr("data-staticheight"):this.viewOptions.staticHeight,a={},r=[],l=[],o=this.$element.parentsUntil(":visible").addBack(),d=0;d0?r:this.$canvas;if(e.renderItem){var o,d=(e.repeat||"data.items").split("."),h=d[0];if("data"===h||"this"===h){o="this"===h?this:t;for(var c=d.slice(1),p=0;p0&&(e.prop("checked",!0),e.parents("label:first").addClass("active")),this.syncingViewButtonState=!1}}).runRenderer=i.prototype.renderItems,e.fn.repeater=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.repeater"),l="object"==typeof t&&t;r||a.data("fu.repeater",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.repeater.defaults={dataSource:function(e,t){t({count:0,end:0,items:[],page:0,pages:1,start:0})},defaultView:-1,dropPagingCap:10,staticHeight:-1,views:null,searchOnKeyPress:!1,allowCancel:!0},e.fn.repeater.viewTypes={},e.fn.repeater.Constructor=i,e.fn.repeater.noConflict=function(){return e.fn.repeater=t,this}}(e),function(e){e.fn.repeater&&(e.fn.repeater.Constructor.prototype.list_clearSelectedItems=function(){this.$canvas.find(".repeater-list-check").remove(),this.$canvas.find(".repeater-list table tbody tr.selected").removeClass("selected")},e.fn.repeater.Constructor.prototype.list_highlightColumn=function(t,i){var s=this.$canvas.find(".repeater-list-wrapper > table tbody");(this.viewOptions.list_highlightSortedColumn||i)&&(s.find("td.sorted").removeClass("sorted"),s.find("tr").each(function(){e(this).find("td:nth-child("+(t+1)+")").filter(function(){return!e(this).parent().hasClass("empty")}).addClass("sorted")}))},e.fn.repeater.Constructor.prototype.list_getSelectedItems=function(){var t=[];return this.$canvas.find(".repeater-list .repeater-list-wrapper > table tbody tr.selected").each(function(){var i=e(this);t.push({data:i.data("item_data"),element:i})}),t},e.fn.repeater.Constructor.prototype.getValue=e.fn.repeater.Constructor.prototype.list_getSelectedItems,e.fn.repeater.Constructor.prototype.list_positionHeadings=function(){var t=this.$element.find(".repeater-list-wrapper"),i=t.offset().left;t.scrollLeft()>0?t.find(".repeater-list-heading").each(function(){var t=e(this),s=t.parents("th:first").offset().left-i+"px";t.addClass("shifted").css("left",s)}):t.find(".repeater-list-heading").each(function(){e(this).removeClass("shifted").css("left","")})},e.fn.repeater.Constructor.prototype.list_setSelectedItems=function(t,i){var s,n,a,r,l=this.viewOptions.list_selectable,o=this,d=t;e.isArray(d)||(d=[d]);var h=function(e,t,s){var n;void 0===t||t?(i||"multi"===l||o.list_clearSelectedItems(),e.hasClass("selected")||(e.addClass("selected"),(o.viewOptions.list_frozenColumns||"multi"===o.viewOptions.list_selectable)&&((n=o.$element.find(".frozen-column-wrapper tr:nth-child("+(s+1)+")")).addClass("selected"),n.find(".repeater-select-checkbox").addClass("checked")),o.viewOptions.list_actions&&o.$element.find(".actions-column-wrapper tr:nth-child("+(s+1)+")").addClass("selected"),e.find("td:first").prepend('
'))):(o.viewOptions.list_frozenColumns&&((n=o.$element.find(".frozen-column-wrapper tr:nth-child("+(s+1)+")")).addClass("selected"),n.find(".repeater-select-checkbox").removeClass("checked")),o.viewOptions.list_actions&&o.$element.find(".actions-column-wrapper tr:nth-child("+(s+1)+")").removeClass("selected"),e.find(".repeater-list-check").remove(),e.removeClass("selected"))};for(r=!0===i||"multi"===l?d.length:l&&d.length>0?1:0,n=0;n table tbody tr:nth-child("+(d[n].index+1)+")")).length>0&&h(a,d[n].selected,d[n].index):void 0!==d[n].property&&void 0!==d[n].value&&this.$canvas.find(".repeater-list .repeater-list-wrapper > table tbody tr").each(function(t){a=e(this),(s=a.data("item_data")||{})[d[n].property]===d[n].value&&h(a,d[n].selected,t)})},e.fn.repeater.Constructor.prototype.list_sizeHeadings=function(){this.$element.find(".repeater-list table").find("thead th").each(function(){var t=e(this),i=t.find(".repeater-list-heading");i.css({height:t.outerHeight()}),i.outerWidth(i.data("forced-width")||t.outerWidth())})},e.fn.repeater.Constructor.prototype.list_setFrozenColumns=function(){var t=this.$canvas.find(".table-frozen"),i=this.$element.find(".repeater-canvas"),s=this.$element.find(".repeater-list .repeater-list-wrapper > table"),n=this.$element.find(".repeater-list"),a=this.viewOptions.list_frozenColumns,r=this;if("multi"===this.viewOptions.list_selectable&&(a+=1,i.addClass("multi-select-enabled")),t.length<1){var l=e('
').insertBefore(s),o=s.clone().addClass("table-frozen");o.find("th:not(:lt("+a+"))").remove(),o.find("td:not(:nth-child(n+0):nth-child(-n+"+a+"))").remove();var d=o.clone().removeClass("table-frozen");d.find("tbody").remove();var h=e('
').append(d),c=h.find("th label.checkbox-custom.checkbox-inline");c.attr("id",c.attr("id")+"_cloned"),l.append(o),n.append(h),this.$canvas.addClass("frozen-enabled")}this.list_sizeFrozenColumns(),e(".frozen-thead-wrapper .repeater-list-heading").on("click",function(){var t=e(this).parent("th").index();t+=1,r.$element.find(".repeater-list-wrapper > table thead th:nth-child("+t+") .repeater-list-heading")[0].click()})},e.fn.repeater.Constructor.prototype.list_positionColumns=function(){var e=this.$element.find(".repeater-canvas"),t=e.scrollTop(),i=e.scrollLeft(),s=this.viewOptions.list_frozenColumns||"multi"===this.viewOptions.list_selectable,n=this.viewOptions.list_actions,a=this.$element.find(".repeater-canvas").outerWidth(),r=this.$element.find(".repeater-list .repeater-list-wrapper > table").outerWidth()-(a-(this.$element.find(".table-actions")?this.$element.find(".table-actions").outerWidth():0))>=i;t>0?e.find(".repeater-list-heading").css("top",t):e.find(".repeater-list-heading").css("top","0"),i>0?(s&&(e.find(".frozen-thead-wrapper").css("left",i),e.find(".frozen-column-wrapper").css("left",i)),n&&r&&(e.find(".actions-thead-wrapper").css("right",-i),e.find(".actions-column-wrapper").css("right",-i))):(s&&(e.find(".frozen-thead-wrapper").css("left","0"),e.find(".frozen-column-wrapper").css("left","0")),n&&(e.find(".actions-thead-wrapper").css("right","0"),e.find(".actions-column-wrapper").css("right","0")))},e.fn.repeater.Constructor.prototype.list_createItemActions=function(){var t,i,s="",n=this,a=this.$element.find(".repeater-list .repeater-list-wrapper > table"),r=this.$canvas.find(".table-actions");for(t=0,i=this.viewOptions.list_actions.items.length;t '+o+" "}var d='
";if(r.length<1){var h=e('
').insertBefore(a),c=a.clone().addClass("table-actions");if(c.find("th:not(:last-child)").remove(),c.find("tr td:not(:last-child)").remove(),"multi"===this.viewOptions.list_selectable||"action"===this.viewOptions.list_selectable)c.find("thead tr").html(' '+d+"
"),"action"!==this.viewOptions.list_selectable&&c.find("thead .btn").attr("disabled","disabled");else{var p=this.viewOptions.list_actions.label||'a ';c.find("thead tr").addClass("empty-heading").html(""+p+''+p+"
")}c.find("td").each(function(t){e(this).html(d),e(this).find("a").attr("data-row",t+1)}),h.append(c),this.$canvas.addClass("actions-enabled")}this.list_sizeActionsTable(),this.$element.find(".table-actions tbody .action-item").on("click",function(t){if(!n.isDisabled){var i={actionName:e(this).data("action"),rows:[e(this).data("row")]};n.list_getActionItems(i,t)}}),this.$element.find(".table-actions thead .action-item").on("click",function(t){if(!n.isDisabled){var i={actionName:e(this).data("action"),rows:[]},s=".repeater-list-wrapper > table .selected";"action"===n.viewOptions.list_selectable&&(s=".repeater-list-wrapper > table tr"),n.$element.find(s).each(function(e){i.rows.push(e+1)}),n.list_getActionItems(i,t)}})},e.fn.repeater.Constructor.prototype.list_getActionItems=function(t,i){for(var s=[],n=e.grep(this.viewOptions.list_actions.items,function(e){return e.name===t.actionName})[0],a=0,r=t.rows.length;a table tbody tr:nth-child("+t.rows[a]+")");s.push({item:l,rowData:l.data("item_data")})}if(1===s.length&&(s=s[0]),n.clickAction){n.clickAction(s,function(){},i)}},e.fn.repeater.Constructor.prototype.list_sizeActionsTable=function(){var t=this.$element.find(".repeater-list table.table-actions"),i=t.find("thead tr th"),s=this.$element.find(".repeater-list-wrapper > table");i.outerHeight(s.find("thead tr th").outerHeight()),i.find(".repeater-list-heading").outerHeight(i.outerHeight()),t.find("tbody tr td:first-child").each(function(t){e(this).outerHeight(s.find("tbody tr:eq("+t+") td").outerHeight())})},e.fn.repeater.Constructor.prototype.list_sizeFrozenColumns=function(){var t=this.$element.find(".repeater-list .repeater-list-wrapper > table");this.$element.find(".repeater-list table.table-frozen tr").each(function(i){e(this).height(t.find("tr:eq("+i+")").height())});var i=t.find("td:eq(0)").outerWidth();this.$element.find(".frozen-column-wrapper, .frozen-thead-wrapper").width(i)},e.fn.repeater.Constructor.prototype.list_frozenOptionsInitialize=function(){function t(e){a.list_revertingCheckbox=!0,e.checkbox("toggle"),delete a.list_revertingCheckbox}var i=this.$element.find(".frozen-column-wrapper .checkbox-inline"),s=this.$element.find(".header-checkbox .checkbox-custom"),n=this.$element.find(".repeater-list table"),a=this;this.$element.find("tr.selectable").on("mouseover mouseleave",function(t){var i=e(this).index();i+=1,"mouseover"===t.type?n.find("tbody tr:nth-child("+i+")").addClass("hovered"):n.find("tbody tr:nth-child("+i+")").removeClass("hovered")}),s.checkbox(),i.checkbox();var r=this.$element.find(".table-frozen tbody .checkbox-inline"),l=this.$element.find(".frozen-thead-wrapper thead .checkbox-inline input");r.on("change",function(i){if(i.preventDefault(),!a.list_revertingCheckbox)if(a.isDisabled)t(e(i.currentTarget));else{var s=e(this).attr("data-row");s=parseInt(s,10)+1,a.$element.find(".repeater-list-wrapper > table tbody tr:nth-child("+s+")").click();var n=a.$element.find(".table-frozen tbody .checkbox-inline.checked").length;0===n?(l.prop("checked",!1),l.prop("indeterminate",!1)):n===r.length?(l.prop("checked",!0),l.prop("indeterminate",!1)):(l.prop("checked",!1),l.prop("indeterminate",!0))}}),l.on("change",function(s){a.list_revertingCheckbox||(a.isDisabled?t(e(s.currentTarget)):e(this).is(":checked")?(a.$element.find(".repeater-list-wrapper > table tbody tr:not(.selected)").click(),a.$element.trigger("selected.fu.repeaterList",i)):(a.$element.find(".repeater-list-wrapper > table tbody tr.selected").click(),a.$element.trigger("deselected.fu.repeaterList",i)))})},e.fn.repeater.defaults=e.extend({},e.fn.repeater.defaults,{list_columnRendered:null,list_columnSizing:!0,list_columnSyncing:!0,list_highlightSortedColumn:!0,list_infiniteScroll:!1,list_noItemsHTML:"no items found",list_selectable:!1,list_sortClearing:!1,list_rowRendered:null,list_frozenColumns:0,list_actions:!1}),e.fn.repeater.viewTypes.list={cleared:function(){this.viewOptions.list_columnSyncing&&this.list_sizeHeadings()},dataOptions:function(e){return this.list_sortDirection&&(e.sortDirection=this.list_sortDirection),this.list_sortProperty&&(e.sortProperty=this.list_sortProperty),e},enabled:function(e){this.viewOptions.list_actions&&(e.status?(this.$canvas.find(".repeater-actions-button").removeAttr("disabled"),h.call(this)):this.$canvas.find(".repeater-actions-button").attr("disabled","disabled"))},initialize:function(e,t){this.list_sortDirection=null,this.list_sortProperty=null,this.list_specialBrowserClass=d(),this.list_actions_width=void 0!==this.viewOptions.list_actions.width?this.viewOptions.list_actions.width:37,this.list_noItems=!1,t()},resize:function(){o.call(this,this.$element.find(".repeater-list-wrapper > table thead tr")),this.viewOptions.list_actions&&this.list_sizeActionsTable(),(this.viewOptions.list_frozenColumns||"multi"===this.viewOptions.list_selectable)&&this.list_sizeFrozenColumns(),this.viewOptions.list_columnSyncing&&this.list_sizeHeadings()},selected:function(){var e,t=this.viewOptions.list_infiniteScroll;this.list_firstRender=!0,this.$loader.addClass("noHeader"),t&&(e="object"==typeof t?t:{},this.infiniteScrolling(!0,e))},before:function(t){var i,s=t.container.find(".repeater-list"),n=this;return t.data.count>0?this.list_noItems=!1:this.list_noItems=!0,s.length<1&&((s=e('')).find(".repeater-list-wrapper").on("scroll.fu.repeaterList",function(){n.viewOptions.list_columnSyncing&&n.list_positionHeadings()}),(n.viewOptions.list_frozenColumns||n.viewOptions.list_actions||"multi"===n.viewOptions.list_selectable)&&t.container.on("scroll.fu.repeaterList",function(){n.list_positionColumns()}),t.container.append(s)),t.container.removeClass("actions-enabled actions-enabled multi-select-enabled"),i=s.find("table"),l.call(this,i,t.data),r.call(this,i,t.data),!1},renderItem:function(e){return a.call(this,e.container,e.subset,e.index),!1},after:function(){var e;return!this.viewOptions.list_frozenColumns&&"multi"!==this.viewOptions.list_selectable||this.list_noItems||this.list_setFrozenColumns(),this.viewOptions.list_actions&&!this.list_noItems&&(this.list_createItemActions(),this.list_sizeActionsTable()),!this.viewOptions.list_frozenColumns&&!this.viewOptions.list_actions&&"multi"!==this.viewOptions.list_selectable||this.list_noItems||(this.list_positionColumns(),this.list_frozenOptionsInitialize()),this.viewOptions.list_columnSyncing&&(this.list_sizeHeadings(),this.list_positionHeadings()),(e=this.$canvas.find(".repeater-list-wrapper > table .repeater-list-heading.sorted")).length>0&&this.list_highlightColumn(e.data("fu_item_index")),!1}});var t=function(e,t){if(!t)return!1;if(!e||t.length!==e.length)return!0;for(var i=0,s=t.length;i"),d=n[a]._auto_width,h=n[a].property;if(!1!==this.viewOptions.list_actions&&"@_ACTIONS_@"===h&&(l='
'),l=void 0!==l?l:"",o.addClass(void 0!==r?r:"").append(l),void 0!==d&&o.outerWidth(d),t.append(o),"multi"===this.viewOptions.list_selectable&&"@_CHECKBOX_@"===n[a].property){var c=' ';o.html(c)}return o},s=function(t,i,s){var n,a,r,l,o,d="glyphicon-chevron-down",h="glyphicon-chevron-up",c=e('
'),p='',u=e(" "),f=this;if(c.data("fu_item_index",s),c.prepend(i[s].label),u.html(c.html()).find("[id]").removeAttr("id"),"@_CHECKBOX_@"!==i[s].property?u.append(c):u.append(p),n=u.add(c),l=c.find(".glyphicon.rlc:first"),o=l.add(u.find(".glyphicon.rlc:first")),this.viewOptions.list_actions&&"@_ACTIONS_@"===i[s].property){var m=this.list_actions_width;u.css("width",m),c.css("width",m)}void 0!==(a=i[s].className)&&n.addClass(a),(r=i[s].sortable)&&(n.addClass("sortable"),c.on("click.fu.repeaterList",function(){f.isDisabled||(f.list_sortProperty="string"==typeof r?r:i[s].property,c.hasClass("sorted")?l.hasClass(h)?(o.removeClass(h).addClass(d),f.list_sortDirection="desc"):f.viewOptions.list_sortClearing?(n.removeClass("sorted"),o.removeClass(d),f.list_sortDirection=null,f.list_sortProperty=null):(o.removeClass(d).addClass(h),f.list_sortDirection="asc"):(t.find("th, .repeater-list-heading").removeClass("sorted"),o.removeClass(d).addClass(h),f.list_sortDirection="asc",n.addClass("sorted")),f.render({clearInfinite:!0,pageIncrement:null}))})),"asc"!==i[s].sortDirection&&"desc"!==i[s].sortDirection||(t.find("th, .repeater-list-heading").removeClass("sorted"),n.addClass("sortable sorted"),"asc"===i[s].sortDirection?(o.addClass(h),this.list_sortDirection="asc"):(o.addClass(d),this.list_sortDirection="desc"),this.list_sortProperty="string"==typeof r?r:i[s].property),t.append(u)},n=function(t){var i="multi"===t.viewOptions.list_selectable,s=t.viewOptions.list_actions,n=t.$element;if(!t.isDisabled){var a=e(this),r=e(this).index()+1,l=n.find(".frozen-column-wrapper tr:nth-child("+r+")"),o=n.find(".actions-column-wrapper tr:nth-child("+r+")"),d=n.find(".frozen-column-wrapper tr:nth-child("+r+") .checkbox-inline");a.is(".selected")?(a.removeClass("selected"),i?(d.click(),l.removeClass("selected"),s&&o.removeClass("selected")):a.find(".repeater-list-check").remove(),n.trigger("deselected.fu.repeaterList",a)):(i?(d.click(),a.addClass("selected"),l.addClass("selected"),s&&o.addClass("selected")):(t.$canvas.find(".repeater-list-check").remove(),t.$canvas.find(".repeater-list tbody tr.selected").each(function(){e(this).removeClass("selected"),n.trigger("deselected.fu.repeaterList",e(this))}),a.find("td:first").prepend('
'),a.addClass("selected"),l.addClass("selected")),n.trigger("selected.fu.repeaterList",a)),h.call(t)}},a=function(t,s,a){var r=e(" ");if(this.viewOptions.list_selectable&&(r.data("item_data",s[a]),"action"!==this.viewOptions.list_selectable)){r.addClass("selectable"),r.attr("tabindex",0);var l=this;r.on("click.fu.repeaterList",function(){n.call(this,l)}),r.keyup(function(e){13===e.keyCode&&r.trigger("click.fu.repeaterList")})}this.viewOptions.list_actions&&!this.viewOptions.list_selectable&&r.data("item_data",s[a]);for(var o=[],d=0,h=this.list_columns.length;d'),t.append(n)),"string"==typeof i.error&&i.error.length>0?((s=e(' ')).find("td").append(i.error),n.append(s)):i.items&&i.items.length<1&&((s=e(' ')).find("td").append(this.viewOptions.list_noItemsHTML),n.append(s))},l=function(i,n){var a,r,l,d=n.columns||[],h=i.find("thead");if(this.list_firstRender||t(this.list_columns,d)||0===h.length){if(h.remove(),"multi"===this.viewOptions.list_selectable&&!this.list_noItems){var c={label:"c",property:"@_CHECKBOX_@",sortable:!1};d.splice(0,0,c)}if(this.list_columns=d,this.list_firstRender=!1,this.$loader.removeClass("noHeader"),this.viewOptions.list_actions){var p={label:this.viewOptions.list_actions.label||'a ',property:"@_ACTIONS_@",sortable:!1,width:this.list_actions_width};d.push(p)}for(l=(h=e(' ')).find("tr"),a=0,r=d.length;a0)){var o=this.$canvas.find(".repeater-list-wrapper").outerWidth();for(n=Math.floor((o-a)/s),i=0;in&&(n=r[i].minWidth),r[i].col.outerWidth(n),this.list_columns[r[i].index]._auto_width=n}},d=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),i=e.indexOf("Firefox");return t>0?"ie-"+parseInt(e.substring(t+5,e.indexOf(".",t)),10):i>0?"firefox":""},h=function(){var e=".repeater-list-wrapper > table .selected",t=this.$element.find(".table-actions");"action"===this.viewOptions.list_selectable&&(e=".repeater-list-wrapper > table tr"),this.$canvas.find(e).length>0?t.find("thead .btn").removeAttr("disabled"):t.find("thead .btn").attr("disabled","disabled")}}(e),function(e){function t(t,i){for(var s=!1;!s&&i.search("{{")>=0;)!function(){var n,a,r;a=i.indexOf("{{"),n=i.indexOf("}}",a+2),a>-1&&n>-1?(r=e.trim(i.substring(a+2,n)),r=void 0!==t[r]?t[r]:"",i=i.substring(0,a)+r+i.substring(n+2)):s=!0}();return i}e.fn.repeater&&(e.fn.repeater.Constructor.prototype.thumbnail_clearSelectedItems=function(){this.$canvas.find(".repeater-thumbnail-cont .selectable.selected").removeClass("selected")},e.fn.repeater.Constructor.prototype.thumbnail_getSelectedItems=function(){var t=[];return this.$canvas.find(".repeater-thumbnail-cont .selectable.selected").each(function(){t.push(e(this))}),t},e.fn.repeater.Constructor.prototype.thumbnail_setSelectedItems=function(t,i){function s(e,t){(t=void 0===t||t)?(i||"multi"===o||d.thumbnail_clearSelectedItems(),e.addClass("selected")):e.removeClass("selected")}var n,a,r,l,o=this.viewOptions.thumbnail_selectable,d=this;for(e.isArray(t)||(t=[t]),r=!0===i||"multi"===o?t.length:o&&t.length>0?1:0,n=0;n0&&s(a,t[n].selected)):t[n].selector&&this.$canvas.find(".repeater-thumbnail-cont .selectable").each(function(){(a=e(this)).is(t[n].selector)&&s(a,t[n].selected)})},e.fn.repeater.defaults=e.extend({},e.fn.repeater.defaults,{thumbnail_alignment:"left",thumbnail_infiniteScroll:!1,thumbnail_itemRendered:null,thumbnail_noItemsHTML:"no items found",thumbnail_selectable:!1,thumbnail_template:'{{name}} '}),e.fn.repeater.viewTypes.thumbnail={selected:function(){var e,t=this.viewOptions.thumbnail_infiniteScroll;t&&(e="object"==typeof t?t:{},this.infiniteScrolling(!0,e))},before:function(t){var i,s=this.viewOptions.thumbnail_alignment,n=this.$canvas.find(".repeater-thumbnail-cont"),a=t.data,r={};return n.length<1?(n=e('
'),s&&"none"!==s?(s={center:1,justify:1,left:1,right:1}[s]?s:"justify",n.addClass("align-"+s),this.thumbnail_injectSpacers=!0):this.thumbnail_injectSpacers=!1,r.item=n):r.action="none",a.items&&a.items.length<1?((i=e('
')).append(this.viewOptions.thumbnail_noItemsHTML),n.append(i)):n.find(".empty:first").remove(),r},renderItem:function(i){var s=this.viewOptions.thumbnail_selectable,n=this,a=e(t(i.subset[i.index],this.viewOptions.thumbnail_template));return a.data("item_data",i.data.items[i.index]),s&&(a.addClass("selectable"),a.on("click",function(){n.isDisabled||(a.hasClass("selected")?(a.removeClass("selected"),n.$element.trigger("deselected.fu.repeaterThumbnail",a)):("multi"!==s&&n.$canvas.find(".repeater-thumbnail-cont .selectable.selected").each(function(){var t=e(this);t.removeClass("selected"),n.$element.trigger("deselected.fu.repeaterThumbnail",t)}),a.addClass("selected"),n.$element.trigger("selected.fu.repeaterThumbnail",a)))})),i.container.append(a),this.thumbnail_injectSpacers&&a.after(' '),this.viewOptions.thumbnail_itemRendered&&this.viewOptions.thumbnail_itemRendered({container:i.container,item:a,itemData:i.subset[i.index]},function(){}),!1}})}(e),function(e){var t=e.fn.scheduler,i=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.scheduler.defaults,i),this.$startDate=this.$element.find(".start-datetime .start-date"),this.$startTime=this.$element.find(".start-datetime .start-time"),this.$timeZone=this.$element.find(".timezone-container .timezone"),this.$repeatIntervalPanel=this.$element.find(".repeat-every-panel"),this.$repeatIntervalSelect=this.$element.find(".repeat-options"),this.$repeatIntervalSpinbox=this.$element.find(".repeat-every"),this.$repeatIntervalTxt=this.$element.find(".repeat-every-text"),this.$end=this.$element.find(".repeat-end"),this.$endSelect=this.$end.find(".end-options"),this.$endAfter=this.$end.find(".end-after"),this.$endDate=this.$end.find(".end-on-date"),this.$recurrencePanels=this.$element.find(".repeat-panel"),this.$repeatIntervalSelect.selectlist(),this.$element.find(".selectlist").selectlist(),this.$startDate.datepicker(this.options.startDateOptions);var n="function"==typeof this.options.startDateChanged?this.options.startDateChanged:this._guessEndDate;this.$startDate.on("change changed.fu.datepicker dateClicked.fu.datepicker",e.proxy(n,this)),this.$startTime.combobox(),""===this.$startTime.find("input").val()&&this.$startTime.combobox("selectByIndex",0),"0"===this.$repeatIntervalSpinbox.find("input").val()?this.$repeatIntervalSpinbox.spinbox({value:1,min:1,limitToStep:!0}):this.$repeatIntervalSpinbox.spinbox({min:1,limitToStep:!0}),this.$endAfter.spinbox({value:1,min:1,limitToStep:!0}),this.$endDate.datepicker(this.options.endDateOptions),this.$element.find(".radio-custom").radio(),this.$repeatIntervalSelect.on("changed.fu.selectlist",e.proxy(this.repeatIntervalSelectChanged,this)),this.$endSelect.on("changed.fu.selectlist",e.proxy(this.endSelectChanged,this)),this.$element.find(".repeat-days-of-the-week .btn-group .btn").on("change.fu.scheduler",function(e,t){s.changed(e,t,!0)}),this.$element.find(".combobox").on("changed.fu.combobox",e.proxy(this.changed,this)),this.$element.find(".datepicker").on("changed.fu.datepicker",e.proxy(this.changed,this)),this.$element.find(".datepicker").on("dateClicked.fu.datepicker",e.proxy(this.changed,this)),this.$element.find(".selectlist").on("changed.fu.selectlist",e.proxy(this.changed,this)),this.$element.find(".spinbox").on("changed.fu.spinbox",e.proxy(this.changed,this)),this.$element.find(".repeat-monthly .radio-custom, .repeat-yearly .radio-custom").on("change.fu.scheduler",e.proxy(this.changed,this))},s=function(e,t){var i,s="";return s+=e.getFullYear(),s+=t,i=e.getMonth()+1,s+=i<10?"0"+i:i,s+=t,i=e.getDate(),s+=i<10?"0"+i:i},n={secondly:1e3,minutely:6e4,hourly:36e5,daily:864e5,weekly:6048e5,monthly:3024e6,yearly:314496e5},a=function(e,t,i,s){return new Date(e.getTime()+n[i]*s)};i.prototype={constructor:i,destroy:function(){var t;return this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element.find(".datepicker .calendar").empty(),t=this.$element[0].outerHTML,this.$element.find(".combobox").combobox("destroy"),this.$element.find(".datepicker").datepicker("destroy"),this.$element.find(".selectlist").selectlist("destroy"),this.$element.find(".spinbox").spinbox("destroy"),this.$element.find(".radio-custom").radio("destroy"),this.$element.remove(),t},changed:function(t,i,s){s||t.stopPropagation(),this.$element.trigger("changed.fu.scheduler",{data:void 0!==i?i:e(t.currentTarget).data(),originalEvent:t,value:this.getValue()})},disable:function(){this.toggleState("disable")},enable:function(){this.toggleState("enable")},setUtcTime:function(e,t,i){var s=e.split("-"),n=t.split(":"),a=new Date(Date.UTC(s[0],s[1]-1,s[2],n[0],n[1],n[2]?n[2]:0));if("Z"===i)a.setUTCHours(a.getUTCHours()+0);else{var r=[];r[0]="(.)",r[1]=".*?",r[2]="\\d",r[3]=".*?",r[4]="(\\d)";var l=new RegExp(r.join(""),["i"]).exec(i);if(null!==l){var o=l[1],d=l[2],h="+"===o?1:-1;a.setUTCHours(a.getUTCHours()+h*parseInt(d,10))}}var c=a.getTimezoneOffset();return a.setMinutes(c),a},endSelectChanged:function(e,t){var i;i=t?t.value:this.$endSelect.selectlist("selectedItem").value,this.$endAfter.parent().addClass("hidden"),this.$endAfter.parent().attr("aria-hidden","true"),this.$endDate.parent().addClass("hidden"),this.$endDate.parent().attr("aria-hidden","true"),"after"===i?(this.$endAfter.parent().removeClass("hide hidden"),this.$endAfter.parent().attr("aria-hidden","false")):"date"===i&&(this.$endDate.parent().removeClass("hide hidden"),this.$endDate.parent().attr("aria-hidden","false"))},_guessEndDate:function(){var e=this.$repeatIntervalSelect.selectlist("selectedItem").value,t=new Date(this.$endDate.datepicker("getDate")),i=new Date(this.$startDate.datepicker("getDate")),s=this.$repeatIntervalSpinbox.find("input").val();"none"!==e&&t<=i&&(this.$repeatIntervalSpinbox.is(":visible")||(s=1),"weekdays"===e&&(s=1,e="weekly"),t=a(i,0,e,s),this.$endDate.datepicker("setDate",t))},getValue:function(){var t,i=this.$repeatIntervalSpinbox.spinbox("value"),n="",a=this.$repeatIntervalSelect.selectlist("selectedItem").value;t=this.$startTime.combobox("selectedItem").value?(t=this.$startTime.combobox("selectedItem").value).toLowerCase():this.$startTime.combobox("selectedItem").text.toLowerCase();var r,l,o,d,h,c,p,u=this.$timeZone.selectlist("selectedItem");c=""+s(this.$startDate.datepicker("getDate"),"-"),c+="T",l=t.search("am")>=0,o=t.search("pm")>=0,(t=e.trim(t.replace(/am/g,"").replace(/pm/g,"")).split(":"))[0]=parseInt(t[0],10),t[1]=parseInt(t[1],10),l&&t[0]>11?t[0]=0:o&&t[0]<12&&(t[0]+=12),c+=t[0]<10?"0"+t[0]:t[0],c+=":",c+=t[1]<10?"0"+t[1]:t[1],c+="+00:00"===u.offset?"Z":u.offset,"none"===a?n="FREQ=DAILY;INTERVAL=1;COUNT=1;":"secondly"===a?(n="FREQ=SECONDLY;",n+="INTERVAL="+i+";"):"minutely"===a?(n="FREQ=MINUTELY;",n+="INTERVAL="+i+";"):"hourly"===a?(n="FREQ=HOURLY;",n+="INTERVAL="+i+";"):"daily"===a?(n+="FREQ=DAILY;",n+="INTERVAL="+i+";"):"weekdays"===a?(n+="FREQ=WEEKLY;",n+="BYDAY=MO,TU,WE,TH,FR;",n+="INTERVAL=1;"):"weekly"===a?(r=[],this.$element.find(".repeat-days-of-the-week .btn-group input:checked").each(function(){r.push(e(this).data().value)}),n+="FREQ=WEEKLY;",n+="BYDAY="+r.join(",")+";",n+="INTERVAL="+i+";"):"monthly"===a?(n+="FREQ=MONTHLY;",n+="INTERVAL="+i+";","bymonthday"===(p=this.$element.find("input[name=repeat-monthly]:checked").val())?n+="BYMONTHDAY="+parseInt(this.$element.find(".repeat-monthly-date .selectlist").selectlist("selectedItem").text,10)+";":"bysetpos"===p&&(r=this.$element.find(".repeat-monthly-day .month-days").selectlist("selectedItem").value,h=this.$element.find(".repeat-monthly-day .month-day-pos").selectlist("selectedItem").value,n+="BYDAY="+r+";",n+="BYSETPOS="+h+";")):"yearly"===a&&(n+="FREQ=YEARLY;","bymonthday"===(p=this.$element.find("input[name=repeat-yearly]:checked").val())?(n+="BYMONTH="+(d=this.$element.find(".repeat-yearly-date .year-month").selectlist("selectedItem").value)+";",n+="BYMONTHDAY="+this.$element.find(".repeat-yearly-date .year-month-day").selectlist("selectedItem").text+";"):"bysetpos"===p&&(r=this.$element.find(".repeat-yearly-day .year-month-days").selectlist("selectedItem").value,h=this.$element.find(".repeat-yearly-day .year-month-day-pos").selectlist("selectedItem").value,d=this.$element.find(".repeat-yearly-day .year-month").selectlist("selectedItem").value,n+="BYDAY="+r+";",n+="BYSETPOS="+h+";",n+="BYMONTH="+d+";"));var f=this.$endSelect.selectlist("selectedItem").value,m="";return"none"!==a&&("after"===f?m="COUNT="+this.$endAfter.spinbox("value")+";":"date"===f&&(m="UNTIL="+s(this.$endDate.datepicker("getDate"),"")+";")),{startDateTime:c,timeZone:u,recurrencePattern:n=";"===(n+=m).substring(n.length-1)?n.substring(0,n.length-1):n}},repeatIntervalSelectChanged:function(e,t){var i,s,n;switch(t?(s=t.value,n=t.text):(s=(i=this.$repeatIntervalSelect.selectlist("selectedItem")).value||"",n=i.text||""),this.$repeatIntervalTxt.text(n),s.toLowerCase()){case"hourly":case"daily":case"weekly":case"monthly":this.$repeatIntervalPanel.removeClass("hide hidden"),this.$repeatIntervalPanel.attr("aria-hidden","false");break;default:this.$repeatIntervalPanel.addClass("hidden"),this.$repeatIntervalPanel.attr("aria-hidden","true")}this.$recurrencePanels.addClass("hidden"),this.$recurrencePanels.attr("aria-hidden","true"),this.$element.find(".repeat-"+s).removeClass("hide hidden"),this.$element.find(".repeat-"+s).attr("aria-hidden","false"),"none"===s?(this.$end.addClass("hidden"),this.$end.attr("aria-hidden","true")):(this.$end.removeClass("hide hidden"),this.$end.attr("aria-hidden","false")),this._guessEndDate()},_parseAndSetRecurrencePattern:function(e,t){var i,s,n,a,r={},l=0,o="",d=e.toUpperCase().split(";");for(l=0;l-1?a.timeZoneOffset="+"+e.trim(t.split("+")[1]):t.search(/\-/)>-1?a.timeZoneOffset="-"+e.trim(t.split("-")[1]):a.timeZoneOffset="+00:00",a.time24HourFormatSplit=a.time24HourFormat.split(":"),i=parseInt(a.time24HourFormatSplit[0],10),s=a.time24HourFormatSplit[1]?parseInt(a.time24HourFormatSplit[1].split("+")[0].split("-")[0].split("Z")[0],10):0,n=i<12?"AM":"PM",0===i?i=12:i>12&&(i-=12),s=s<10?"0"+s:s,a.time12HourFormat=i+":"+s,a.time12HourFormatWithPeriod=i+":"+s+" "+n,a},_parseTimeZone:function(t,i){return i.timeZoneQuerySelector="",t.timeZone?("string"==typeof t.timeZone?i.timeZoneQuerySelector+='li[data-name="'+t.timeZone+'"]':e.each(t.timeZone,function(e,t){i.timeZoneQuerySelector+="li[data-"+e+'="'+t+'"]'}),i.timeZoneOffset=t.timeZone.offset):t.startDateTime?(i.timeZoneOffset="+00:00"===i.timeZoneOffset?"Z":i.timeZoneOffset,i.timeZoneQuerySelector+='li[data-offset="'+i.timeZoneOffset+'"]'):i.timeZoneOffset="Z",i.timeZoneOffset},_setTimeUI:function(e){this.$startTime.find("input").val(e),this.$startTime.combobox("selectByText",e)},_setTimeZoneUI:function(e){this.$timeZone.selectlist("selectBySelector",e)},setValue:function(e){var t,i,s,n,a={};if(e.startDateTime)i=(t=e.startDateTime.split("T"))[0],(s=t[1])?(a=this._parseStartDateTime(s),this._setTimeUI(a.time12HourFormatWithPeriod)):(a.time12HourFormat="00:00",a.time24HourFormat="00:00");else{a.time12HourFormat="00:00",a.time24HourFormat="00:00";var r=this.$startDate.datepicker("getDate");i=r.getFullYear()+"-"+r.getMonth()+"-"+r.getDate()}this._parseTimeZone(e,a),a.timeZoneQuerySelector&&this._setTimeZoneUI(a.timeZoneQuerySelector),e.recurrencePattern&&this._parseAndSetRecurrencePattern(e.recurrencePattern,a),n=this.setUtcTime(i,a.time24HourFormat,a.timeZoneOffset),this.$startDate.datepicker("setDate",n)},toggleState:function(e){this.$element.find(".combobox").combobox(e),this.$element.find(".datepicker").datepicker(e),this.$element.find(".selectlist").selectlist(e),this.$element.find(".spinbox").spinbox(e),this.$element.find(".radio-custom").radio(e),e="disable"===e?"addClass":"removeClass",this.$element.find(".repeat-days-of-the-week .btn-group")[e]("disabled")},value:function(e){return e?this.setValue(e):this.getValue()}},e.fn.scheduler=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.scheduler"),l="object"==typeof t&&t;r||a.data("fu.scheduler",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.scheduler.defaults={},e.fn.scheduler.Constructor=i,e.fn.scheduler.noConflict=function(){return e.fn.scheduler=t,this},e(document).on("mousedown.fu.scheduler.data-api","[data-initialize=scheduler]",function(t){var i=e(t.target).closest(".scheduler");i.data("fu.scheduler")||i.scheduler(i.data())}),e(function(){e("[data-initialize=scheduler]").each(function(){var t=e(this);t.data("scheduler")||t.scheduler(t.data())})})}(e),function(e){var t=e.fn.picker,i=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.picker.defaults,i),this.$accept=this.$element.find(".picker-accept"),this.$cancel=this.$element.find(".picker-cancel"),this.$trigger=this.$element.find(".picker-trigger"),this.$footer=this.$element.find(".picker-footer"),this.$header=this.$element.find(".picker-header"),this.$popup=this.$element.find(".picker-popup"),this.$body=this.$element.find(".picker-body"),this.clickStamp="_",this.isInput=this.$trigger.is("input"),this.$trigger.on("keydown.fu.picker",e.proxy(this.keyComplete,this)),this.$trigger.on("focus.fu.picker",e.proxy(function(t){(void 0===t||e(t.target).is("input[type=text]"))&&e.proxy(this.show(),this)},this)),this.$trigger.on("click.fu.picker",e.proxy(function(t){e(t.target).is("input[type=text]")?e.proxy(this.show(),this):e.proxy(this.toggle(),this)},this)),this.$accept.on("click.fu.picker",e.proxy(this.complete,this,"accepted")),this.$cancel.on("click.fu.picker",function(e){e.preventDefault(),s.complete("cancelled")})},s=function(t){var i=Math.max(document.documentElement.clientHeight,window.innerHeight||0),s=e(document).scrollTop(),n=t.$popup.offset();return n.top+t.$popup.outerHeight(!0)>i+s||n.top0)return!1;return!0},show:function(){var t;if((t=e(document).find(".picker.showing")).length>0){if(t.data("fu.picker")&&t.data("fu.picker").options.explicit)return;t.picker("externalClickListener",{},!0)}this.$element.addClass("showing"),n(this),this.$element.trigger("shown.fu.picker"),this.clickStamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.options.explicit||e(document).on("click.fu.picker.externalClick."+this.clickStamp,e.proxy(this.externalClickListener,this))}},e.fn.picker=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.picker"),l="object"==typeof t&&t;r||a.data("fu.picker",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.picker.defaults={onAccept:void 0,onCancel:void 0,onExit:void 0,externalClickExceptions:[],explicit:!1},e.fn.picker.Constructor=i,e.fn.picker.noConflict=function(){return e.fn.picker=t,this},e(document).on("focus.fu.picker.data-api","[data-initialize=picker]",function(t){var i=e(t.target).closest(".picker");i.data("fu.picker")||i.picker(i.data())}),e(function(){e("[data-initialize=picker]").each(function(){var t=e(this);t.data("fu.picker")||t.picker(t.data())})})}(e)});
\ No newline at end of file
+!function(e){"function"==typeof define&&define.amd?define(["jquery","bootstrap"],e):e(jQuery)}(function(e){if(void 0===e)throw new Error("Fuel UX's JavaScript requires jQuery");if(void 0===e.fn.dropdown||void 0===e.fn.collapse)throw new Error("Fuel UX's JavaScript requires Bootstrap");!function(e){var t=e.fn.checkbox,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){this.options=e.extend({},e.fn.checkbox.defaults,s);var n=e(t);if("label"===t.tagName.toLowerCase()){this.$label=n,this.$chk=this.$label.find('input[type="checkbox"]'),this.$container=n.parent(".checkbox"),!this.options.ignoreVisibilityCheck&&this.$chk.css("visibility").match(/hidden|collapse/)&&i("For accessibility reasons, in order for tab and space to function on checkbox, checkbox ` `'s `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.");var a=this.$chk.attr("data-toggle");this.$toggleContainer=e(a),this.$chk.on("change",e.proxy(this.itemchecked,this)),this.setInitialState()}else i("Checkbox must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/checkbox.html for example of proper markup. Call `.checkbox()` on the `` not the ` `")};(s.prototype={constructor:s,setInitialState:function(){var e=this.$chk,t=e.prop("checked"),i=e.prop("disabled");this.setCheckedState(e,t),this.setDisabledState(e,i)},setCheckedState:function(e,t){var i=e,s=this.$label,n=this.$toggleContainer;t?(i.prop("checked",!0),s.addClass("checked"),n.removeClass("hide hidden"),s.trigger("checked.fu.checkbox")):(i.prop("checked",!1),s.removeClass("checked"),n.addClass("hidden"),s.trigger("unchecked.fu.checkbox")),s.trigger("changed.fu.checkbox",t)},setDisabledState:function(t,i){var s=e(t),n=this.$label;return i?(s.prop("disabled",!0),n.addClass("disabled"),n.trigger("disabled.fu.checkbox")):(s.prop("disabled",!1),n.removeClass("disabled"),n.trigger("enabled.fu.checkbox")),s},itemchecked:function(t){var i=e(t.target),s=i.prop("checked");this.setCheckedState(i,s)},toggle:function(){this.isChecked()?this.uncheck():this.check()},check:function(){this.setCheckedState(this.$chk,!0)},uncheck:function(){this.setCheckedState(this.$chk,!1)},isChecked:function(){return this.$chk.prop("checked")},enable:function(){this.setDisabledState(this.$chk,!1)},disable:function(){this.setDisabledState(this.$chk,!0)},destroy:function(){return this.$label.remove(),this.$label[0].outerHTML}}).getValue=s.prototype.isChecked,e.fn.checkbox=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.checkbox"),l="object"==typeof t&&t;r||a.data("fu.checkbox",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.checkbox.defaults={ignoreVisibilityCheck:!1},e.fn.checkbox.Constructor=s,e.fn.checkbox.noConflict=function(){return e.fn.checkbox=t,this},e(document).on("mouseover.fu.checkbox.data-api","[data-initialize=checkbox]",function(t){var i=e(t.target);i.data("fu.checkbox")||i.checkbox(i.data())}),e(function(){e("[data-initialize=checkbox]").each(function(){var t=e(this);t.data("fu.checkbox")||t.checkbox(t.data())})})}(e),function(e){var t=e.fn.combobox,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.combobox.defaults,i),this.$dropMenu=this.$element.find(".dropdown-menu"),this.$input=this.$element.find("input"),this.$button=this.$element.find(".btn"),this.$inputGroupBtn=this.$element.find(".input-group-btn"),this.$element.on("click.fu.combobox","a",e.proxy(this.itemclicked,this)),this.$element.on("change.fu.combobox","input",e.proxy(this.inputchanged,this)),this.$element.on("shown.bs.dropdown",e.proxy(this.menuShown,this)),this.$input.on("keyup.fu.combobox",e.proxy(this.keypress,this)),this.setDefaultSelection(),0===this.$dropMenu.children("li").length&&this.$button.addClass("disabled"),this.options.filterOnKeypress&&this.options.filter(this.$dropMenu.find("li"),this.$input.val(),this)};(i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element[0].outerHTML},doSelect:function(e){void 0!==e[0]?(this.$element.find("li.selected:first").removeClass("selected"),this.$selectedItem=e,this.$selectedItem.addClass("selected"),this.$input.val(this.$selectedItem.text().trim())):(this.$selectedItem=null,this.$element.find("li.selected:first").removeClass("selected"))},clearSelection:function(){this.$selectedItem=null,this.$input.val(""),this.$dropMenu.find("li").removeClass("selected")},menuShown:function(){this.options.autoResizeMenu&&this.resizeMenu()},resizeMenu:function(){var e=this.$element.outerWidth();this.$dropMenu.outerWidth(e)},selectedItem:function(){var t={};if(this.$selectedItem){var i=this.$selectedItem.text().trim();t=e.extend({text:i},this.$selectedItem.data())}else t={text:this.$input.val().trim(),notFound:!0};return t},selectByText:function(t){var i=e([]);this.$element.find("li").each(function(){if((this.textContent||this.innerText||e(this).text()||"").trim().toLowerCase()===(t||"").trim().toLowerCase())return i=e(this),!1}),this.doSelect(i)},selectByValue:function(e){var t='li[data-value="'+e+'"]';this.selectBySelector(t)},selectByIndex:function(e){var t="li:eq("+e+")";this.selectBySelector(t)},selectBySelector:function(e){var t=this.$element.find(e);this.doSelect(t)},setDefaultSelection:function(){var e="li[data-selected=true]:first",t=this.$element.find(e);t.length>0&&(this.selectBySelector(e),t.removeData("selected"),t.removeAttr("data-selected"))},enable:function(){this.$element.removeClass("disabled"),this.$input.removeAttr("disabled"),this.$button.removeClass("disabled")},disable:function(){this.$element.addClass("disabled"),this.$input.attr("disabled",!0),this.$button.addClass("disabled")},itemclicked:function(t){this.$selectedItem=e(t.target).parent(),this.$input.val(this.$selectedItem.text().trim()).trigger("change",{synthetic:!0});var i=this.selectedItem();this.$element.trigger("changed.fu.combobox",i),t.preventDefault(),this.$element.find(".dropdown-toggle").focus()},keypress:function(e){var t=38===e.which||40===e.which||37===e.which||39===e.which;if(this.options.showOptionsOnKeypress&&!this.$inputGroupBtn.hasClass("open")&&(this.$button.dropdown("toggle"),this.$input.focus()),13===e.which){e.preventDefault();var i=this.$dropMenu.find("li.selected").text().trim();i.length>0?this.selectByText(i):this.selectByText(this.$input.val()),this.$inputGroupBtn.removeClass("open")}else if(27===e.which)e.preventDefault(),this.clearSelection(),this.$inputGroupBtn.removeClass("open");else if(this.options.showOptionsOnKeypress&&(40===e.which||38===e.which)){e.preventDefault();var s=this.$dropMenu.find("li.selected");s.length>0&&(s=40===e.which?s.next(":not(.hidden)"):s.prev(":not(.hidden)")),0===s.length&&(s=40===e.which?this.$dropMenu.find("li:not(.hidden):first"):this.$dropMenu.find("li:not(.hidden):last")),this.doSelect(s)}this.options.filterOnKeypress&&!t&&this.options.filter(this.$dropMenu.find("li"),this.$input.val(),this),this.previousKeyPress=e.which},inputchanged:function(t,i){var s=e(t.target).val();if(i&&i.synthetic)this.selectByText(s);else{this.selectByText(s);var n=this.selectedItem();0===n.text.length&&(n={text:s}),this.$element.trigger("changed.fu.combobox",n)}}}).getValue=i.prototype.selectedItem,e.fn.combobox=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.combobox"),l="object"==typeof t&&t;r||a.data("fu.combobox",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.combobox.defaults={autoResizeMenu:!0,filterOnKeypress:!1,showOptionsOnKeypress:!1,filter:function(t,i,s){var n=0;s.$dropMenu.find(".empty-indicator").remove(),t.each(function(t){var s=e(this),a=e(this).text().trim();s.removeClass(),a===i?(s.addClass("text-success"),n++):a.substr(0,i.length)===i?(s.addClass("text-info"),n++):s.addClass("hidden")}),0===n&&s.$dropMenu.append('No Matches ')}},e.fn.combobox.Constructor=i,e.fn.combobox.noConflict=function(){return e.fn.combobox=t,this},e(document).on("mousedown.fu.combobox.data-api","[data-initialize=combobox]",function(t){var i=e(t.target).closest(".combobox");i.data("fu.combobox")||i.combobox(i.data())}),e(function(){e("[data-initialize=combobox]").each(function(){var t=e(this);t.data("fu.combobox")||t.combobox(t.data())})})}(e),function(e){var t="moment.js is not available so you cannot use this function",i=[],s=!1,n=e.fn.datepicker,a=!1,r=function(){var e,t;for(a=!0,e=0,t=i.length;en.year||i===n.year&&t>n.month||i===n.year&&t===n.month&&e>=n.date)&&(i11){if(this.sameYearOnly)return;e=0,t++}this.renderMonth(new Date(t,e,1))},onYearScroll:function(t){if(!this.artificialScrolling){var i,s,n=e(t.currentTarget),a="border-box"===n.css("box-sizing")?n.outerHeight():n.height(),r=n.get(0).scrollHeight,l=n.scrollTop(),o=a/(r-l)*100;if(l/r*100<5){for(i=(s=parseInt(n.find("li:first").attr("data-year"),10))-1;i>s-11;i--)n.prepend(''+i+" ");this.artificialScrolling=!0,n.scrollTop(n.get(0).scrollHeight-r+l),this.artificialScrolling=!1}else if(o>90)for(i=(s=parseInt(n.find("li:last").attr("data-year"),10))+1;i'+i+" ")}},parseDate:function(e){var t,i,n,a,r,l,o,d=this,h=new Date(NaN);if(e){if(this.moment)return a=function(e){var t=s(e,d.momentFormat);return!0===t.isValid()?t.toDate():h},n=function(e){var t=s(new Date(e));return!0===t.isValid()?t.toDate():h},r=function(e,t,i){var s=t(e);return d.isInvalidDate(s)?(s=i(e),d.isInvalidDate(s)?h:s):s},"string"==typeof e?r(e,a,n):r(e,n,a);if("string"==typeof e){if(t=new Date(Date.parse(e)),!this.isInvalidDate(t))return t;if(e=e.split("T")[0],i=/^\s*(\d{4})-(\d\d)-(\d\d)\s*$/,(o=i.exec(e))&&(l=parseInt(o[2],10),t=new Date(o[1],l-1,o[3]),l===t.getMonth()+1))return t}else if(t=new Date(e),!this.isInvalidDate(t))return t}return new Date(NaN)},prev:function(){var e=this.$headerTitle.attr("data-month"),t=this.$headerTitle.attr("data-year");if(--e<0){if(this.sameYearOnly)return;e=11,t--}this.renderMonth(new Date(t,e,1))},renderMonth:function(t){t=t||new Date;var i,s,n,a,r,l,o,d,h,c,p,u=new Date(t.getFullYear(),t.getMonth(),1).getDay(),f=new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=new Date(t.getFullYear(),t.getMonth(),0).getDate(),v=this.$headerTitle.find(".month"),g=t.getMonth(),$=new Date,b=$.getDate(),y=$.getMonth(),w=$.getFullYear(),C=this.selectedDate,x=this.$days.find("tbody"),k=t.getFullYear();for(C&&(C={date:C.getDate(),month:C.getMonth(),year:C.getFullYear()}),v.find(".current").removeClass("current"),v.find('span[data-month="'+g+'"]').addClass("current"),this.$headerTitle.find(".year").text(k),this.$headerTitle.attr({"data-month":g,"data-year":k}),x.empty(),0!==u?(i=m-u+1,o=-1):(i=1,o=0),l=f<=35-u?5:6,a=0;a"),r=0;r<7;r++)c=e(" "),-1===o?(c.addClass("last-month"),d!==o&&c.addClass("first")):1===o&&(c.addClass("next-month"),d!==o&&c.addClass("first")),n=k,(s=g+o)<0?(s=11,n--):s>11&&(s=0,n++),c.attr({"data-date":i,"data-month":s,"data-year":n}),n===w&&s===y&&i===b?c.addClass("current-day"):(n'+i+" "):c.html(''+i+" "),i++,h=d,d=o,-1===o&&i>m?(i=1,h!==(o=0)&&c.addClass("last")):0===o&&i>f&&(i=1,h!==(o=1)&&c.addClass("last")),a===l-1&&6===r&&c.addClass("last"),p.append(c);x.append(p)}},renderWheel:function(e){var t,i,s,n=e.getMonth(),a=this.$wheelsMonth.find("ul"),r=e.getFullYear(),l=this.$wheelsYear.find("ul");for(this.sameYearOnly?(this.$wheelsMonth.addClass("full"),this.$wheelsYear.addClass("hidden")):(this.$wheelsMonth.removeClass("full"),this.$wheelsYear.removeClass("hide hidden")),a.find(".selected").removeClass("selected"),(i=a.find('li[data-month="'+n+'"]')).addClass("selected"),a.scrollTop(a.scrollTop()+(i.position().top-a.outerHeight()/2-i.outerHeight(!0)/2)),l.empty(),t=r-10;t'+t+" ");(s=l.find('li[data-year="'+r+'"]')).addClass("selected"),this.artificialScrolling=!0,l.scrollTop(l.scrollTop()+(s.position().top-l.outerHeight()/2-s.outerHeight(!0)/2)),this.artificialScrolling=!1,i.find("button").focus()},selectClicked:function(){var e=this.$wheelsMonth.find(".selected").attr("data-month"),t=this.$wheelsYear.find(".selected").attr("data-year");this.changeView("calendar",new Date(t,e,1))},setCulture:function(e){if(!e)return!1;if(!this.moment)throw t;s.locale(e)},setDate:function(e){var t=this.parseDate(e);return this.isInvalidDate(t)?(this.selectedDate=null,this.renderMonth()):this.isRestricted(t.getDate(),t.getMonth(),t.getFullYear())?(this.selectedDate=!1,this.renderMonth()):(this.selectedDate=t,this.renderMonth(t),this.$input.val(this.formatDate(t))),this.inputValue=this.$input.val(),this.selectedDate},setFormat:function(e){if(!e)return!1;if(!this.moment)throw t;this.momentFormat=e},setRestrictedDates:function(e){var t,i,s=[],n=this,a=function(e){return e===-1/0?{date:-1/0,month:-1/0,year:-1/0}:e===1/0?{date:1/0,month:1/0,year:1/0}:(e=n.parseDate(e),{date:e.getDate(),month:e.getMonth(),year:e.getFullYear()})};for(this.restricted=e,t=0,i=e.length;t=i.fromTop&&i.dropdownHeight>=i.fromBottom?i.fromTop>=i.fromBottom:void 0))}function s(t){var i,s=t.attr("data-target"),n=!0;return s?"window"!==s&&(i=e(s),n=!1):e.each(t.parents(),function(t,s){if("visible"!==e(s).css("overflow"))return i=s,n=!1,!1}),n&&(i=window),{overflowElement:e(i),isWindow:n}}e(document).on("click.fu.dropdown-autoflip","[data-toggle=dropdown][data-flip]",function(i){"auto"===e(this).data().flip&&t(e(this).next(".dropdown-menu"))}),e(document).on("suggested.fu.pillbox",function(i,s){t(e(s)),e(s).parent().addClass("open")}),e.fn.dropdownautoflip=function(){}}(e),function(e){var t=e.fn.loader,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.loader.defaults,i)};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},ieRepaint:function(){},msieVersion:function(){},next:function(){},pause:function(){},play:function(){},previous:function(){},reset:function(){}},e.fn.loader=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.loader"),l="object"==typeof t&&t;r||a.data("fu.loader",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.loader.defaults={},e.fn.loader.Constructor=i,e.fn.loader.noConflict=function(){return e.fn.loader=t,this},e(function(){e("[data-initialize=loader]").each(function(){var t=e(this);t.data("fu.loader")||t.loader(t.data())})})}(e),function(e){var t=e.fn.placard,i={accepted:"onAccept",cancelled:"onCancel"},s=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.placard.defaults,i),"true"===this.$element.attr("data-ellipsis")&&(this.options.applyEllipsis=!0),this.$accept=this.$element.find(".placard-accept"),this.$cancel=this.$element.find(".placard-cancel"),this.$field=this.$element.find(".placard-field"),this.$footer=this.$element.find(".placard-footer"),this.$header=this.$element.find(".placard-header"),this.$popup=this.$element.find(".placard-popup"),this.actualValue=null,this.clickStamp="_",this.previousValue="",-1===this.options.revertOnCancel&&(this.options.revertOnCancel=this.$accept.length>0),this.isContentEditableDiv=this.$field.is("div"),this.isInput=this.$field.is("input"),this.divInTextareaMode=this.isContentEditableDiv&&"true"===this.$field.attr("data-textarea"),this.$field.on("focus.fu.placard",e.proxy(this.show,this)),this.$field.on("keydown.fu.placard",e.proxy(this.keyComplete,this)),this.$element.on("close.fu.placard",e.proxy(this.hide,this)),this.$accept.on("click.fu.placard",e.proxy(this.complete,this,"accepted")),this.$cancel.on("click.fu.placard",function(e){e.preventDefault(),s.complete("cancelled")}),this.applyEllipsis()},n=function(e){return e.$element.hasClass("showing")},a=function(){var t;if((t=e(document).find(".placard.showing")).length>0){if(t.data("fu.placard")&&t.data("fu.placard").options.explicit)return!1;t.placard("externalClickListener",{},!0)}return!0};s.prototype={constructor:s,complete:function(e){var t=this.options[i[e]],s={previousValue:this.previousValue,value:this.getValue()};t?(t(s),this.$element.trigger(e+".fu.placard",s)):("cancelled"===e&&this.options.revertOnCancel&&this.setValue(this.previousValue,!0),this.$element.trigger(e+".fu.placard",s),this.hide())},keyComplete:function(e){(this.isContentEditableDiv&&!this.divInTextareaMode||this.isInput)&&13===e.keyCode?(this.complete("accepted"),this.$field.blur()):27===e.keyCode&&(this.complete("cancelled"),this.$field.blur())},destroy:function(){return this.$element.remove(),e(document).off("click.fu.placard.externalClick."+this.clickStamp),this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element[0].outerHTML},disable:function(){this.$element.addClass("disabled"),this.$field.attr("disabled","disabled"),this.isContentEditableDiv&&this.$field.removeAttr("contenteditable"),this.hide()},applyEllipsis:function(){var e,t,i;if(this.options.applyEllipsis)if(e=this.$field.get(0),this.isContentEditableDiv&&!this.divInTextareaMode||this.isInput)e.scrollLeft=0;else if(e.scrollTop=0,e.clientHeight=e.scrollHeight;)i+=this.actualValue[t],this.setValue(i+"...",!0),t++;i=i.length>0?i.substring(0,i.length-1):"",this.setValue(i+"...",!0)}},enable:function(){this.$element.removeClass("disabled"),this.$field.removeAttr("disabled"),this.isContentEditableDiv&&this.$field.attr("contenteditable","true")},externalClickListener:function(e,t){(!0===t||this.isExternalClick(e))&&this.complete(this.options.externalClickAction)},getValue:function(){return null!==this.actualValue?this.actualValue:this.isContentEditableDiv?this.$field.html():this.$field.val()},hide:function(){this.$element.hasClass("showing")&&(this.$element.removeClass("showing"),this.applyEllipsis(),e(document).off("click.fu.placard.externalClick."+this.clickStamp),this.$element.trigger("hidden.fu.placard"))},isExternalClick:function(t){var i,s,n=this.$element.get(0),a=this.options.externalClickExceptions||[],r=e(t.target);if(t.target===n||r.parents(".placard:first").get(0)===n)return!1;for(i=0,s=a.length;i0)return!1;return!0},setValue:function(e,t){return void 0===t&&(t=!this.options.applyEllipsis),this.isContentEditableDiv?this.$field.empty().append(e):this.$field.val(e),t||n(this)||this.applyEllipsis(),this.$field},show:function(){n(this)||a()&&(this.previousValue=this.isContentEditableDiv?this.$field.html():this.$field.val(),null!==this.actualValue&&(this.setValue(this.actualValue,!0),this.actualValue=null),this.showPlacard())},showPlacard:function(){this.$element.addClass("showing"),this.$header.length>0&&this.$popup.css("top","-"+this.$header.outerHeight(!0)+"px"),this.$footer.length>0&&this.$popup.css("bottom","-"+this.$footer.outerHeight(!0)+"px"),this.$element.trigger("shown.fu.placard"),this.clickStamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.options.explicit||e(document).on("click.fu.placard.externalClick."+this.clickStamp,e.proxy(this.externalClickListener,this))}},e.fn.placard=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.placard"),l="object"==typeof t&&t;r||a.data("fu.placard",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.placard.defaults={onAccept:void 0,onCancel:void 0,externalClickAction:"cancelled",externalClickExceptions:[],explicit:!1,revertOnCancel:-1,applyEllipsis:!1},e.fn.placard.Constructor=s,e.fn.placard.noConflict=function(){return e.fn.placard=t,this},e(document).on("focus.fu.placard.data-api","[data-initialize=placard]",function(t){var i=e(t.target).closest(".placard");i.data("fu.placard")||i.placard(i.data())}),e(function(){e("[data-initialize=placard]").each(function(){var t=e(this);t.data("fu.placard")||t.placard(t.data())})})}(e),function(e){var t=e.fn.radio,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){if(this.options=e.extend({},e.fn.radio.defaults,s),"label"===t.tagName.toLowerCase()){this.$label=e(t),this.$radio=this.$label.find('input[type="radio"]'),this.groupName=this.$radio.attr("name"),!this.options.ignoreVisibilityCheck&&this.$radio.css("visibility").match(/hidden|collapse/)&&i("For accessibility reasons, in order for tab and space to function on radio, `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.");var n=this.$radio.attr("data-toggle");this.$toggleContainer=e(n),this.$radio.on("change",e.proxy(this.itemchecked,this)),this.setInitialState()}else i("Radio must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/radio.html for example of proper markup. Call `.radio()` on the `` not the ` `")};(s.prototype={constructor:s,setInitialState:function(){var e=this.$radio,t=e.prop("checked"),i=e.prop("disabled");this.setCheckedState(e,t),this.setDisabledState(e,i)},resetGroup:function(){e('input[name="'+this.groupName+'"]').each(function(t,i){var s=e(i),n=s.parent(),a=s.attr("data-toggle"),r=e(a);n.removeClass("checked"),r.addClass("hidden")})},setCheckedState:function(t,i){var s=t,n=s.parent(),a=s.attr("data-toggle"),r=e(a);i?(this.resetGroup(),s.prop("checked",!0),n.addClass("checked"),r.removeClass("hide hidden"),n.trigger("checked.fu.radio")):(s.prop("checked",!1),n.removeClass("checked"),r.addClass("hidden"),n.trigger("unchecked.fu.radio")),n.trigger("changed.fu.radio",i)},setDisabledState:function(t,i){var s=e(t),n=this.$label;return i?(s.prop("disabled",!0),n.addClass("disabled"),n.trigger("disabled.fu.radio")):(s.prop("disabled",!1),n.removeClass("disabled"),n.trigger("enabled.fu.radio")),s},itemchecked:function(t){var i=e(t.target);this.setCheckedState(i,!0)},check:function(){this.setCheckedState(this.$radio,!0)},uncheck:function(){this.setCheckedState(this.$radio,!1)},isChecked:function(){return this.$radio.prop("checked")},enable:function(){this.setDisabledState(this.$radio,!1)},disable:function(){this.setDisabledState(this.$radio,!0)},destroy:function(){return this.$label.remove(),this.$label[0].outerHTML}}).getValue=s.prototype.isChecked,e.fn.radio=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.radio"),l="object"==typeof t&&t;r||a.data("fu.radio",r=new s(this,l)),"string"==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.radio.defaults={ignoreVisibilityCheck:!1},e.fn.radio.Constructor=s,e.fn.radio.noConflict=function(){return e.fn.radio=t,this},e(document).on("mouseover.fu.radio.data-api","[data-initialize=radio]",function(t){var i=e(t.target);i.data("fu.radio")||i.radio(i.data())}),e(function(){e("[data-initialize=radio]").each(function(){var t=e(this);t.data("fu.radio")||t.radio(t.data())})})}(e),function(e){var t=e.fn.search,i=function(t,i){this.$element=e(t),this.$repeater=e(t).closest(".repeater"),this.options=e.extend({},e.fn.search.defaults,i),"true"===this.$element.attr("data-searchOnKeyPress")&&(this.options.searchOnKeyPress=!0),this.$button=this.$element.find("button"),this.$input=this.$element.find("input"),this.$icon=this.$element.find(".glyphicon, .fuelux-icon"),this.$button.on("click.fu.search",e.proxy(this.buttonclicked,this)),this.$input.on("keyup.fu.search",e.proxy(this.keypress,this)),this.$repeater.length>0&&this.$repeater.on("rendered.fu.repeater",e.proxy(this.clearPending,this)),this.activeSearch=""};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element[0].outerHTML},search:function(e){this.$icon.hasClass("glyphicon")&&this.$icon.removeClass("glyphicon-search").addClass("glyphicon-remove"),this.$icon.hasClass("fuelux-icon")&&this.$icon.removeClass("fuelux-icon-search").addClass("fuelux-icon-remove"),this.activeSearch=e,this.$element.addClass("searched pending"),this.$element.trigger("searched.fu.search",e)},clear:function(){this.$icon.hasClass("glyphicon")&&this.$icon.removeClass("glyphicon-remove").addClass("glyphicon-search"),this.$icon.hasClass("fuelux-icon")&&this.$icon.removeClass("fuelux-icon-remove").addClass("fuelux-icon-search"),this.$element.hasClass("pending")&&this.$element.trigger("canceled.fu.search"),this.activeSearch="",this.$input.val(""),this.$element.trigger("cleared.fu.search"),this.$element.removeClass("searched pending")},clearPending:function(){this.$element.removeClass("pending")},action:function(){var e=this.$input.val();e&&e.length>0?this.search(e):this.clear()},buttonclicked:function(t){t.preventDefault(),e(t.currentTarget).is(".disabled, :disabled")||(this.$element.hasClass("pending")||this.$element.hasClass("searched")?this.clear():this.action())},keypress:function(e){13===e.which?(e.preventDefault(),this.action()):9===e.which?e.preventDefault():27===e.which?(e.preventDefault(),this.clear()):this.options.searchOnKeyPress&&this.action()},disable:function(){this.$element.addClass("disabled"),this.$input.attr("disabled","disabled"),this.options.allowCancel||this.$button.addClass("disabled")},enable:function(){this.$element.removeClass("disabled"),this.$input.removeAttr("disabled"),this.$button.removeClass("disabled")}},e.fn.search=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.search"),l="object"==typeof t&&t;r||a.data("fu.search",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.search.defaults={clearOnEmpty:!1,searchOnKeyPress:!1,allowCancel:!1},e.fn.search.Constructor=i,e.fn.search.noConflict=function(){return e.fn.search=t,this},e(document).on("mousedown.fu.search.data-api","[data-initialize=search]",function(t){var i=e(t.target).closest(".search");i.data("fu.search")||i.search(i.data())}),e(function(){e("[data-initialize=search]").each(function(){var t=e(this);t.data("fu.search")||t.search(t.data())})})}(e),function(e){var t=e.fn.selectlist,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.selectlist.defaults,i),this.$button=this.$element.find(".btn.dropdown-toggle"),this.$hiddenField=this.$element.find(".hidden-field"),this.$label=this.$element.find(".selected-label"),this.$dropdownMenu=this.$element.find(".dropdown-menu"),this.$element.on("click.fu.selectlist",".dropdown-menu a",e.proxy(this.itemClicked,this)),this.setDefaultSelection(),"auto"!==i.resize&&"auto"!==this.$element.attr("data-resize")||this.resize(),0===this.$dropdownMenu.children("li").length&&(this.disable(),this.doSelect(e(this.options.emptyLabelHTML))),this.$element.on("shown.bs.dropdown",function(){var t=e(this);e(document).on("keypress.fu.selectlist",function(i){var s=String.fromCharCode(i.which);t.find("li").each(function(t,i){if(e(i).text().charAt(0).toLowerCase()===s)return e(i).children("a").focus(),!1})})}),this.$element.on("hide.bs.dropdown",function(){e(document).off("keypress.fu.selectlist")})};(i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},doSelect:function(t){var i;this.$selectedItem=i=t,this.$hiddenField.val(this.$selectedItem.attr("data-value")),this.$label.html(e(this.$selectedItem.children()[0]).html()),this.$element.find("li").each(function(){i.is(e(this))?e(this).attr("data-selected",!0):e(this).removeData("selected").removeAttr("data-selected")})},itemClicked:function(t){this.$element.trigger("clicked.fu.selectlist",this.$selectedItem),t.preventDefault(),e(t.currentTarget).parent("li").is(".disabled, :disabled")||(e(t.target).parent().is(this.$selectedItem)||this.itemChanged(t),this.$element.find(".dropdown-toggle").focus())},itemChanged:function(t){this.doSelect(e(t.target).closest("li"));var i=this.selectedItem();this.$element.trigger("changed.fu.selectlist",i)},resize:function(){var t=0,i=0,s=e("
").addClass("selectlist-sizer");Boolean(e(document).find("html").hasClass("fuelux"))?e(document.body).append(s):e(".fuelux:first").append(s),s.append(this.$element.clone()),this.$element.find("a").each(function(){s.find(".selected-label").text(e(this).text()),i=s.find(".selectlist").outerWidth(),(i+=s.find(".sr-only").outerWidth())>t&&(t=i)}),t<=1||(this.$button.css("width",t),this.$dropdownMenu.css("width",t),s.remove())},selectedItem:function(){var t=this.$selectedItem.text();return e.extend({text:t},this.$selectedItem.data())},selectByText:function(t){var i=e([]);this.$element.find("li").each(function(){if((this.textContent||this.innerText||e(this).text()||"").toLowerCase()===(t||"").toLowerCase())return i=e(this),!1}),this.doSelect(i)},selectByValue:function(e){var t='li[data-value="'+e+'"]';this.selectBySelector(t)},selectByIndex:function(e){var t="li:eq("+e+")";this.selectBySelector(t)},selectBySelector:function(e){var t=this.$element.find(e);this.doSelect(t)},setDefaultSelection:function(){var e=this.$element.find("li[data-selected=true]").eq(0);0===e.length&&(e=this.$element.find("li").has("a").eq(0)),this.doSelect(e)},enable:function(){this.$element.removeClass("disabled"),this.$button.removeClass("disabled")},disable:function(){this.$element.addClass("disabled"),this.$button.addClass("disabled")}}).getValue=i.prototype.selectedItem,e.fn.selectlist=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.selectlist"),l="object"==typeof t&&t;r||a.data("fu.selectlist",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.selectlist.defaults={emptyLabelHTML:'No items '},e.fn.selectlist.Constructor=i,e.fn.selectlist.noConflict=function(){return e.fn.selectlist=t,this},e(document).on("mousedown.fu.selectlist.data-api","[data-initialize=selectlist]",function(t){var i=e(t.target).closest(".selectlist");i.data("fu.selectlist")||i.selectlist(i.data())}),e(function(){e("[data-initialize=selectlist]").each(function(){var t=e(this);t.data("fu.selectlist")||t.selectlist(t.data())})})}(e),function(e){var t=e.fn.spinbox,i=function(t,i){this.$element=e(t),this.$element.find(".btn").on("click",function(e){e.preventDefault()}),this.options=e.extend({},e.fn.spinbox.defaults,i),this.options.step=this.$element.data("step")||this.options.step,this.options.valuethis.options.max?e=this.options.cycle?this.options.min:this.options.max:ethis.options.max?e-=this.options.step:e .tree-loader").remove()):t.remove());var d=a.find(".tree-loader:last");!1===o&&d.removeClass("hide hidden"),this.options.dataSource(l||{},function(t){e.each(t.data,function(t,i){var n=i.type;"folder"===i.type&&(n="branch");var l=s.$element.find("[data-template=tree"+n+"]:eq(0)").clone().removeClass("hide hidden").removeData("template").removeAttr("data-template");l.find(".tree-"+n+"-name > .tree-label").html(i.text||i.name),l.data(i);var o=i.attr||i.dataAttributes||[];e.each(o,function(e,t){switch(e){case"cssClass":case"class":case"className":l.addClass(t);break;case"data-icon":l.find(".icon-item").removeClass().addClass("icon-item "+t),l.attr(e,t);break;case"id":l.attr(e,t),l.attr("aria-labelledby",t+"-label"),l.find(".tree-branch-name > .tree-label").attr("id",t+"-label");break;default:l.attr(e,t)}}),r?a.append(l):a.find(".tree-branch-children:eq(0)").append(l)}),a.find(".tree-loader").addClass("hidden"),s.$element.trigger("loaded.fu.tree",a)})},selectTreeNode:function(t,i){var a={};a.$element=e(t);var r={};r.$elements=this.$element.find(".tree-selected"),r.dataForEvent=[],"folder"===i?(a.$element=a.$element.closest(".tree-branch"),a.$icon=a.$element.find(".icon-folder")):a.$icon=a.$element.find(".icon-item"),a.elementData=a.$element.data(),c(a.$element),r=this.options.multiSelect?s(0,a,r):n(this,a,r),d(this.$element,a.$element),this.$element.trigger(r.eventType+".fu.tree",{target:a.elementData,selected:r.dataForEvent}),a.$element.trigger("updated.fu.tree",{selected:r.dataForEvent,item:a.$element,eventType:r.eventType})},discloseFolder:function(t){var i=e(t).closest(".tree-branch"),s=i.find(".tree-branch-children"),n=s.eq(0);i.addClass("tree-open"),i.attr("aria-expanded","true"),n.removeClass("hide hidden"),i.find("> .tree-branch-header .icon-folder").eq(0).removeClass("glyphicon-folder-close").addClass("glyphicon-folder-open");var a=this.$element,r=function(){a.trigger("disclosedFolder.fu.tree",i.data())};s.children().length?r():(a.one("loaded.fu.tree",r),this.populate(s))},closeFolder:function(t){var i=e(t).closest(".tree-branch"),s=i.find(".tree-branch-children").eq(0);i.removeClass("tree-open"),i.attr("aria-expanded","false"),s.addClass("hidden"),i.find("> .tree-branch-header .icon-folder").eq(0).removeClass("glyphicon-folder-open").addClass("glyphicon-folder-close"),this.options.cacheItems||s.empty(),this.$element.trigger("closed.fu.tree",i.data())},toggleFolder:function(t){var i=e(t);i.find(".glyphicon-folder-close").length?this.discloseFolder(t):i.find(".glyphicon-folder-open").length&&this.closeFolder(t)},selectFolder:function(e){this.options.folderSelect&&this.selectTreeNode(e,"folder")},selectItem:function(e){this.options.itemSelect&&this.selectTreeNode(e,"item")},selectedItems:function(){var t=this.$element.find(".tree-selected"),i=[];return e.each(t,function(t,s){i.push(e(s).data())}),i},collapse:function(){var e=this,t=[];e.$element.on("closed.fu.tree",function i(s,n){t.push(n),0===e.$element.find(".tree-branch.tree-open:not('.hidden, .hide')").length&&(e.$element.trigger("closedAll.fu.tree",{tree:e.$element,reportedClosed:t}),e.$element.off("loaded.fu.tree",e.$element,i))}),e.$element.find(".tree-branch.tree-open:not('.hidden, .hide')").each(function(){e.closeFolder(this)})},discloseVisible:function(){var t=this,i=t.$element.find(".tree-branch:not('.tree-open, .hidden, .hide')"),s=[];t.$element.on("loaded.fu.tree",function e(n,a){s.push(a),s.length===i.length&&(t.$element.trigger("disclosedVisible.fu.tree",{tree:t.$element,reportedOpened:s}),t.$element.off("loaded.fu.tree",t.$element,e))}),t.$element.find(".tree-branch:not('.tree-open, .hidden, .hide')").each(function(){t.discloseFolder(e(this).find(".tree-branch-header"))})},discloseAll:function(){var e=this;void 0===e.$element.data("disclosures")&&e.$element.data("disclosures",0);var t=e.options.disclosuresUpperLimit>=1&&e.$element.data("disclosures")>=e.options.disclosuresUpperLimit;if(0===e.$element.find(".tree-branch:not('.tree-open, .hidden, .hide')").length)e.$element.trigger("disclosedAll.fu.tree",{tree:e.$element,disclosures:e.$element.data("disclosures")}),e.options.cacheItems||e.$element.one("closeAll.fu.tree",function(){e.$element.data("disclosures",0)});else{if(t&&(e.$element.trigger("exceededDisclosuresLimit.fu.tree",{tree:e.$element,disclosures:e.$element.data("disclosures")}),!e.$element.data("ignore-disclosures-limit")))return;e.$element.data("disclosures",e.$element.data("disclosures")+1),e.$element.one("disclosedVisible.fu.tree",function(){e.discloseAll()}),e.discloseVisible()}},refreshFolder:function(e){var t=e.closest(".tree-branch"),i=t.find(".tree-branch-children");i.eq(0).empty(),t.hasClass("tree-open")?this.populate(i,!1):this.populate(i,!0),this.$element.trigger("refreshedFolder.fu.tree",t.data())}}).closeAll=r.prototype.collapse,r.prototype.openFolder=r.prototype.discloseFolder,r.prototype.getValue=r.prototype.selectedItems;var l=function(e,t){e.attr("tabindex",-1),e.find("li").attr("tabindex",-1),t&&t.length>0&&t.attr("tabindex",0)},o=function(e,t){var i=t.find(".tree-selected:first");i.length<=0&&(i=t.find('li:not(".hidden"):first')),d(e,i)},d=function(e,t){l(e,t),e.attr("aria-activedescendant",t.attr("id")),t.focus(),e.trigger("setFocus.fu.tree",t)},h=function(t,i){if(i.isDefaultPrevented()||i.isPropagationStopped())return!1;var s=i.originalEvent.target,n=e(s),a=n.hasClass("tree-open"),r=!1,l=!0,h=function(){t.trigger("keyboardNavigated.fu.tree",i,n)};switch(i.which){case 13:case 32:var c=t.hasClass("tree-folder-select"),p=n.hasClass("tree-branch"),u=n.hasClass("tree-item");l=!1,p?c?(t.one("selected.fu.tree deselected.fu.tree",h),t.tree("selectFolder",n.find(".tree-branch-header")[0])):(t.one("loaded.fu.tree closed.fu.tree",h),t.tree("toggleFolder",n.find(".tree-branch-header")[0])):u?(t.one("selected.fu.tree",h),t.tree("selectItem",n)):(f=e(n.prevAll().not(".hidden")[0]),n.click(),t.one("loaded.fu.tree",function(){v=e(f.nextAll().not(".hidden")[0]),d(t,v),h()})),r=!0;break;case 35:d(t,t.find('li:not(".hidden"):last')),r=!0;break;case 36:d(t,t.find('li:not(".hidden"):first')),r=!0;break;case 37:a?(l=!1,t.one("closed.fu.tree",h),t.tree("closeFolder",s)):d(t,e(n.parents("li")[0])),r=!0;break;case 38:var f=[];if((f=e(n.prevAll().not(".hidden")[0])).hasClass("tree-open")){var m=f.find('li:not(".hidden"):last');m.length>0&&(f=e(m[0]))}f.length<1&&(f=e(n.parents("li")[0])),d(t,f),r=!0;break;case 39:a?o(t,n):(l=!1,t.one("disclosed.fu.tree",h),t.tree("discloseFolder",s)),r=!0;break;case 40:var v=e(n.find('li:not(".hidden"):first')[0]);(!a||v.length<=0)&&(v=e(n.nextAll().not(".hidden")[0])),v.length<1&&(v=e(e(n.parents("li")[0]).nextAll().not(".hidden")[0])),d(t,v),r=!0;break;default:return!0}return r&&(i.preventDefault(),i.stopPropagation(),l&&h()),!0},c=function(e){e.attr("aria-selected",!0)},p=function(e){e.attr("aria-selected",!1)};e.fn.tree=function(t){var i,s=Array.prototype.slice.call(arguments,1),n=this.each(function(){var n=e(this),a=n.data("fu.tree"),l="object"==typeof t&&t;a||(n.data("fu.tree",a=new r(this,l)),n.trigger("initialized.fu.tree")),"string"==typeof t&&(i=a[t].apply(a,s))});return void 0===i?n:i};var u=function t(i,s){if(e.isEmptyObject(i))return s;if(void 0===s)return!1;for(var n=0;n0&&t({data:u(e,this.staticData)})},multiSelect:!1,cacheItems:!0,folderSelect:!0,itemSelect:!0,disclosuresUpperLimit:0},e.fn.tree.Constructor=r,e.fn.tree.noConflict=function(){return e.fn.tree=a,this}}(e),function(e){var t={BACKSPACE_KEYCODE:8,COMMA_KEYCODE:188,DELETE_KEYCODE:46,DOWN_ARROW_KEYCODE:40,ENTER_KEYCODE:13,TAB_KEYCODE:9,UP_ARROW_KEYCODE:38},i=function(e){return function(t){return t.keyCode===e}},s=i(t.BACKSPACE_KEYCODE),n=i(t.DELETE_KEYCODE),a=i(t.TAB_KEYCODE),r=i(t.UP_ARROW_KEYCODE),l=i(t.DOWN_ARROW_KEYCODE),o=/&[^\s]*;/;e.fn.utilities={CONST:t,cleanInput:function(t){for(;o.test(t);)t=e("").html(t).text();return e("").text(t).html()},isBackspaceKey:s,isDeleteKey:n,isShiftHeld:function(e){return!0===e.shiftKey},isTabKey:a,isUpArrow:r,isDownArrow:l}}(e),function(e){var t=e.fn.wizard,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.wizard.defaults,i),this.options.disablePreviousStep="previous"===this.$element.attr("data-restrict")||this.options.disablePreviousStep,this.currentStep=this.options.selectedItem.step,this.numSteps=this.$element.find(".steps li").length,this.$prevBtn=this.$element.find("button.btn-prev"),this.$nextBtn=this.$element.find("button.btn-next");var s=this.$nextBtn.children().detach();this.nextText=e.trim(this.$nextBtn.text()),this.$nextBtn.append(s);var n=this.$element.children(".steps-container");0===n.length&&(n=this.$element,this.$element.addClass("no-steps-container"),window&&window.console&&window.console.warn&&window.console.warn('please update your wizard markup to include ".steps-container" as seen in http://getfuelux.com/javascript.html#wizard-usage-markup')),n=n.find(".steps"),this.$prevBtn.on("click.fu.wizard",e.proxy(this.previous,this)),this.$nextBtn.on("click.fu.wizard",e.proxy(this.next,this)),n.on("click.fu.wizard","li.complete",e.proxy(this.stepclicked,this)),this.selectedItem(this.options.selectedItem),this.options.disablePreviousStep&&(this.$prevBtn.attr("disabled",!0),this.$element.find(".steps").addClass("previous-disabled"))};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},addSteps:function(t){var i,s,n,a,r,l,o=[].slice.call(arguments).slice(1),d=this.$element.find(".steps"),h=this.$element.find(".step-content");for(t=-1===t||t>this.numSteps+1?this.numSteps+1:t,o[0]instanceof Array&&(o=o[0]),r=d.find("li:nth-child("+t+")"),a=h.find(".step-pane:nth-child("+t+")"),r.length<1&&(r=null),i=0,s=o.length;i ')).append(o[i].label||"").append(' '),l.find(".badge").append(o[i].badge||t),(n=e('
')).append(o[i].pane||""),r?(r.before(l),a.before(n)):(d.append(l),h.append(n)),t++;this.syncSteps(),this.numSteps=d.find("li").length,this.setState()},removeSteps:function(t,i){var s,n="nextAll",a=0,r=this.$element.find(".steps"),l=this.$element.find(".step-content");i=void 0!==i?i:1,t>r.find("li").length?s=r.find("li:last"):(s=r.find("li:nth-child("+t+")").prev()).length<1&&(n="children",s=r),s[n]().each(function(){var t=e(this),s=t.attr("data-step");if(!(a1,i=1===this.currentStep,s=this.currentStep===this.numSteps;this.options.disablePreviousStep||this.$prevBtn.attr("disabled",!0===i||!1===t);var n=this.$nextBtn.attr("data-last");if(n){this.lastText=n;var a=this.nextText;!0===s?(a=this.lastText,this.$element.addClass("complete")):this.$element.removeClass("complete");var r=this.$nextBtn.children().detach();this.$nextBtn.text(a).append(r)}var l=this.$element.find(".steps li");l.removeClass("active").removeClass("complete"),l.find("span.badge").removeClass("badge-info").removeClass("badge-success");var o=".steps li:lt("+(this.currentStep-1)+")",d=this.$element.find(o);d.addClass("complete"),d.find("span.badge").addClass("badge-success");var h=".steps li:eq("+(this.currentStep-1)+")",c=this.$element.find(h);c.addClass("active"),c.find("span.badge").addClass("badge-info");var p=this.$element.find(".step-content"),u=c.attr("data-step");p.find(".step-pane").removeClass("active"),p.find('.step-pane[data-step="'+u+'"]:first').addClass("active"),this.$element.find(".steps").first().attr("style","margin-left: 0");var f=0;this.$element.find(".steps > li").each(function(){f+=e(this).outerWidth()});var m=0;if(m=this.$element.find(".actions").length?this.$element.width()-this.$element.find(".actions").first().outerWidth():this.$element.width(),f>m){var v=f-m;this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"),this.$element.find("li.active").first().position().left<200&&((v+=this.$element.find("li.active").first().position().left-200)<1?this.$element.find(".steps").first().attr("style","margin-left: 0"):this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"))}if(void 0!==this.initialized){var g=e.Event("changed.fu.wizard");this.$element.trigger(g,{step:this.currentStep})}this.initialized=!0},stepclicked:function(t){var i=e(t.currentTarget),s=this.$element.find(".steps li").index(i);if(!(s');t?i.append(t):i.append("---------"),this.$element.append(i),this.disable()},getPercentage:function(){var e="border-box"===this.$element.css("box-sizing")?this.$element.outerHeight():this.$element.height(),t=this.$element.get(0).scrollHeight;return t>e?e/(t-this.curScrollTop)*100:0},fetchData:function(t){var i,s=e('
'),n=this,a=function(){var t={percentage:n.curPercentage,scrollTop:n.curScrollTop},i=e('
');s.append(i),i.loader(),n.options.dataSource&&n.options.dataSource(t,function(e){var t;s.remove(),e.content&&n.$element.append(e.content),e.end&&(t=!0!==e.end?e.end:void 0,n.end(t)),n.fetchingData=!1})};this.fetchingData=!0,this.$element.append(s),this.options.hybrid&&!0!==t?(i=e(' '),"object"==typeof this.options.hybrid?i.append(this.options.hybrid.label):i.append(' '),i.on("click.fu.infinitescroll",function(){i.remove(),a()}),s.append(i)):a()},onScroll:function(e){this.curScrollTop=this.$element.scrollTop(),this.curPercentage=this.getPercentage(),!this.fetchingData&&this.curPercentage>=this.options.percentage&&this.fetchData()}},e.fn.infinitescroll=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.infinitescroll"),l="object"==typeof t&&t;r||a.data("fu.infinitescroll",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.infinitescroll.defaults={dataSource:null,hybrid:!1,percentage:95},e.fn.infinitescroll.Constructor=i,e.fn.infinitescroll.noConflict=function(){return e.fn.infinitescroll=t,this}}(e),function(e){var t=e.fn.pillbox,i=e.fn.utilities,s=e.fn.utilities.CONST,n=s.COMMA_KEYCODE,a=s.ENTER_KEYCODE,r=i.isBackspaceKey,l=i.isDeleteKey,o=i.isTabKey,d=i.isUpArrow,h=i.isDownArrow,c=i.cleanInput,p=i.isShiftHeld,u=function(t,i){this.$element=e(t),this.$moreCount=this.$element.find(".pillbox-more-count"),this.$pillGroup=this.$element.find(".pill-group"),this.$addItem=this.$element.find(".pillbox-add-item"),this.$addItemWrap=this.$addItem.parent(),this.$suggest=this.$element.find(".suggest"),this.$pillHTML='\t \t\t\tRemove \t ',this.options=e.extend({},e.fn.pillbox.defaults,i),-1===this.options.readonly?void 0!==this.$element.attr("data-readonly")&&this.readonly(!0):this.options.readonly&&this.readonly(!0),this.acceptKeyCodes=this._generateObject(this.options.acceptKeyCodes),this.$element.on("click.fu.pillbox",".pill-group > .pill",e.proxy(this.itemClicked,this)),this.$element.on("click.fu.pillbox",e.proxy(this.inputFocus,this)),this.$element.on("keydown.fu.pillbox",".pillbox-add-item",e.proxy(this.inputEvent,this)),this.options.onKeyDown&&this.$element.on("mousedown.fu.pillbox",".suggest > li",e.proxy(this.suggestionClick,this)),this.options.edit&&(this.$element.addClass("pills-editable"),this.$element.on("blur.fu.pillbox",".pillbox-add-item",e.proxy(this.cancelEdit,this))),this.$element.on("blur.fu.pillbox",".pillbox-add-item",e.proxy(this.inputEvent,this))};(u.prototype={constructor:u,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},items:function(){var t=this;return this.$pillGroup.children(".pill").map(function(){return t.getItemData(e(this))}).get()},itemClicked:function(t){var i,s=e(t.target);if(t.preventDefault(),t.stopPropagation(),this._closeSuggestions(),s.hasClass("pill"))i=s;else if(i=s.parent(),void 0===this.$element.attr("data-readonly")){if(s.hasClass("glyphicon-close"))return this.options.onRemove?this.options.onRemove(this.getItemData(i,{el:i}),e.proxy(this._removeElement,this)):this._removeElement(this.getItemData(i,{el:i})),!1;if(this.options.edit){if(i.find(".pillbox-list-edit").length)return!1;this.openEdit(i)}}return this.$element.trigger("clicked.fu.pillbox",this.getItemData(i)),!0},readonly:function(e){e?this.$element.attr("data-readonly","readonly"):this.$element.removeAttr("data-readonly"),this.options.truncate&&this.truncate(e)},suggestionClick:function(t){var i=e(t.currentTarget),s={text:i.html(),value:i.data("value")};t.preventDefault(),this.$addItem.val(""),i.data("attr")&&(s.attr=JSON.parse(i.data("attr"))),s.data=i.data("data"),this.addItems(s,!0),this._closeSuggestions()},itemCount:function(){return this.$pillGroup.children(".pill").length},addItems:function(){var t,i,s,n=this;!isFinite(String(arguments[0]))||arguments[0]instanceof Array?s=(t=[].slice.call(arguments).slice(0))[1]&&!t[1].text:(t=[].slice.call(arguments).slice(1),i=arguments[0]),t[0]instanceof Array&&(t=t[0]),t.length&&(e.each(t,function(e,i){var s={text:i.text,value:i.value?i.value:i.text,el:n.$pillHTML};i.attr&&(s.attr=i.attr),i.data&&(s.data=i.data),t[e]=s}),this.options.edit&&this.currentEdit&&(t[0].el=this.currentEdit.wrap("
").parent().html()),s&&t.pop(1),n.options.onAdd&&s?this.options.edit&&this.currentEdit?n.options.onAdd(t[0],e.proxy(n.saveEdit,this)):n.options.onAdd(t[0],e.proxy(n.placeItems,this)):this.options.edit&&this.currentEdit?n.saveEdit(t):i?n.placeItems(i,t):n.placeItems(t,s))},removeItems:function(e,t){var i=this;if(e)for(var s=t||1,n=0;n .pill:nth-child("+e+")");if(!a)break;a.remove()}else this.$pillGroup.find(".pill").remove(),this._removePillTrigger({method:"removeAll"})},placeItems:function(){var t,i,s,n;if(!isFinite(String(arguments[0]))||arguments[0]instanceof Array?n=(t=[].slice.call(arguments).slice(0))[1]&&!t[1].text:(t=[].slice.call(arguments).slice(1),i=arguments[0]),t[0]instanceof Array&&(t=t[0]),t.length){var a=[];e.each(t,function(t,i){var s=e(i.el);s.attr("data-value",i.value),s.find("span:first").html(i.text),i.attr&&e.each(i.attr,function(e,t){"cssClass"===e||"class"===e?s.addClass(t):s.attr(e,t)}),i.data&&s.data("data",i.data),a.push(s)}),this.$pillGroup.children(".pill").length>0?i&&(s=this.$pillGroup.find(".pill:nth-child("+i+")")).length?s.before(a):this.$pillGroup.children(".pill:last").after(a):this.$pillGroup.prepend(a),n&&this.$element.trigger("added.fu.pillbox",{text:t[0].text,value:t[0].value})}},inputEvent:function(e){var t=this,i=t.options.cleanInput(this.$addItem.val()),s="focusout"===e.type,n=s&&i.length>0;if(this.acceptKeyCodes[e.keyCode]&&!p(e)||n){var a,c;if(this.options.onKeyDown&&this._isSuggestionsOpen()){var u=this.$suggest.find(".pillbox-suggest-sel");u.length&&(i=t.options.cleanInput(u.html()),c=t.options.cleanInput(u.data("value")),a=u.data("attr"))}return(i.replace(/[ ]*\,[ ]*/,"").match(/\S/)||this.options.allowEmptyPills&&i.length)&&(this._closeSuggestions(),this.$addItem.hide().val(""),a?this.addItems({text:i,value:c,attr:JSON.parse(a)},!0):this.addItems({text:i,value:c},!0),setTimeout(function(){t.$addItem.show().attr({size:10}).focus()},0)),e.preventDefault(),!0}if(r(e)||l(e)){if(!i.length){if(e.preventDefault(),this.options.edit&&this.currentEdit)return this.cancelEdit(),!0;this._closeSuggestions();var f=this.$pillGroup.children(".pill:last");return f.hasClass("pillbox-highlight")?this._removeElement(this.getItemData(f,{el:f})):f.addClass("pillbox-highlight"),!0}}else i.length>10&&this.$addItem.width() .pill[data-value="'+t+'"]').remove()}),this._removePillTrigger({method:"removeByValue",removedValues:t})},removeByText:function(){var t=[].slice.call(arguments).slice(0),i=this;e.each(t,function(e,t){i.$pillGroup.find('> .pill:contains("'+t+'")').remove()}),this._removePillTrigger({method:"removeByText",removedText:t})},truncate:function(t){var i=this;if(this.$element.removeClass("truncate"),this.$addItemWrap.removeClass("truncated"),this.$pillGroup.find(".pill").removeClass("truncated"),t){this.$element.addClass("truncate");var s=this.$element.width(),n=!1,a=0,r=this.$pillGroup.find(".pill").length,l=0;this.$pillGroup.find(".pill").each(function(){var t=e(this);n?t.addClass("truncated"):(a++,i.$moreCount.text(r-a),l+t.outerWidth(!0)+i.$addItemWrap.outerWidth(!0)<=s?l+=t.outerWidth(!0):(i.$moreCount.text(r-a+1),t.addClass("truncated"),n=!0))}),a===r&&this.$addItemWrap.addClass("truncated")}},inputFocus:function(){this.$element.find(".pillbox-add-item").focus()},getItemData:function(t,i){return e.extend({text:t.find("span:first").html()},t.data(),i)},_removeElement:function(e){e.el.remove(),delete e.el,this.$element.trigger("removed.fu.pillbox",e)},_removePillTrigger:function(e){this.$element.trigger("removed.fu.pillbox",e)},_generateObject:function(t){var i={};return e.each(t,function(e,t){i[t]=!0}),i},_openSuggestions:function(t,i){var s=e("");return this.callbackId===t.timeStamp&&(i.data&&i.data.length&&(e.each(i.data,function(t,i){var n=i.value?i.value:i.text,a=e(''+i.text+" ");i.attr&&a.data("attr",JSON.stringify(i.attr)),i.data&&a.data("data",i.data),s.append(a)}),this.$suggest.html("").append(s.children()),e(document).trigger("suggested.fu.pillbox",this.$suggest)),!0)},_closeSuggestions:function(){this.$suggest.html("").parent().removeClass("open")},_isSuggestionsOpen:function(){return this.$suggest.parent().hasClass("open")},_keySuggestions:function(e){var t=this.$suggest.find("li.pillbox-suggest-sel"),i=d(e);if(e.preventDefault(),t.length){var s=i?t.prev():t.next();s.length||(s=i?this.$suggest.find("li:last"):this.$suggest.find("li:first")),s&&(s.addClass("pillbox-suggest-sel"),t.removeClass("pillbox-suggest-sel"))}else(t=this.$suggest.find("li:first")).addClass("pillbox-suggest-sel")}}).getValue=u.prototype.items,e.fn.pillbox=function(t){var i,s=Array.prototype.slice.call(arguments,1),n=this.each(function(){var n=e(this),a=n.data("fu.pillbox"),r="object"==typeof t&&t;a||n.data("fu.pillbox",a=new u(this,r)),"string"==typeof t&&(i=a[t].apply(a,s))});return void 0===i?n:i},e.fn.pillbox.defaults={edit:!1,readonly:-1,truncate:!1,acceptKeyCodes:[a,n],allowEmptyPills:!1,cleanInput:c},e.fn.pillbox.Constructor=u,e.fn.pillbox.noConflict=function(){return e.fn.pillbox=t,this},e(document).on("mousedown.fu.pillbox.data-api","[data-initialize=pillbox]",function(t){var i=e(t.target).closest(".pillbox");i.data("fu.pillbox")||i.pillbox(i.data())}),e(function(){e("[data-initialize=pillbox]").each(function(){var t=e(this);t.data("fu.pillbox")||t.pillbox(t.data())})})}(e),function(e){var t=e.fn.repeater,i=function(t,i){var s,n,a=this;this.$element=e(t),this.$canvas=this.$element.find(".repeater-canvas"),this.$count=this.$element.find(".repeater-count"),this.$end=this.$element.find(".repeater-end"),this.$filters=this.$element.find(".repeater-filters"),this.$loader=this.$element.find(".repeater-loader"),this.$pageSize=this.$element.find(".repeater-itemization .selectlist"),this.$nextBtn=this.$element.find(".repeater-next"),this.$pages=this.$element.find(".repeater-pages"),this.$prevBtn=this.$element.find(".repeater-prev"),this.$primaryPaging=this.$element.find(".repeater-primaryPaging"),this.$search=this.$element.find(".repeater-search").find(".search"),this.$secondaryPaging=this.$element.find(".repeater-secondaryPaging"),this.$start=this.$element.find(".repeater-start"),this.$viewport=this.$element.find(".repeater-viewport"),this.$views=this.$element.find(".repeater-views"),this.currentPage=0,this.currentView=null,this.isDisabled=!1,this.infiniteScrollingCallback=function(){},this.infiniteScrollingCont=null,this.infiniteScrollingEnabled=!1,this.infiniteScrollingEnd=null,this.infiniteScrollingOptions={},this.lastPageInput=0,this.options=e.extend({},e.fn.repeater.defaults,i),this.pageIncrement=0,this.resizeTimeout={},this.stamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.storedDataSourceOpts=null,this.syncingViewButtonState=!1,this.viewOptions={},this.viewType=null,this.$filters.selectlist(),this.$pageSize.selectlist(),this.$primaryPaging.find(".combobox").combobox(),this.$search.search({searchOnKeyPress:this.options.searchOnKeyPress,allowCancel:this.options.allowCancel}),this.$filters.on("changed.fu.selectlist",function(e,t){a.$element.trigger("filtered.fu.repeater",t),a.render({clearInfinite:!0,pageIncrement:null})}),this.$nextBtn.on("click.fu.repeater",e.proxy(this.next,this)),this.$pageSize.on("changed.fu.selectlist",function(e,t){a.$element.trigger("pageSizeChanged.fu.repeater",t),a.render({pageIncrement:null})}),this.$prevBtn.on("click.fu.repeater",e.proxy(this.previous,this)),this.$primaryPaging.find(".combobox").on("changed.fu.combobox",function(e,t){a.pageInputChange(t.text,t)}),this.$search.on("searched.fu.search cleared.fu.search",function(e,t){a.$element.trigger("searchChanged.fu.repeater",t),a.render({clearInfinite:!0,pageIncrement:null})}),this.$search.on("canceled.fu.search",function(e,t){a.$element.trigger("canceled.fu.repeater",t),a.render({clearInfinite:!0,pageIncrement:null})}),this.$secondaryPaging.on("blur.fu.repeater",function(){a.pageInputChange(a.$secondaryPaging.val())}),this.$secondaryPaging.on("keyup",function(e){13===e.keyCode&&a.pageInputChange(a.$secondaryPaging.val())}),this.$views.find("input").on("change.fu.repeater",e.proxy(this.viewChanged,this)),e(window).on("resize.fu.repeater."+this.stamp,function(){clearTimeout(a.resizeTimeout),a.resizeTimeout=setTimeout(function(){a.resize(),a.$element.trigger("resized.fu.repeater")},75)}),this.$loader.loader(),this.$loader.loader("pause"),-1!==this.options.defaultView?n=this.options.defaultView:(s=this.$views.find("label.active input"),n=s.length>0?s.val():"list"),this.setViewOptions(n),this.initViewTypes(function(){a.resize(),a.$element.trigger("resized.fu.repeater"),a.render({changeView:n})})},s=function(e){window.console&&window.console.warn&&window.console.warn(e)},n=function t(i){var s=[];i.children().each(function(){var i=e(this),n=i.attr("data-preserve");"deep"===n?(i.detach(),s.push(i)):"shallow"===n&&(t(i),i.detach(),s.push(i))}),i.empty(),i.append(s)},a=function(t,i){var s;i&&"none"!==(s=i.action?i.action:"append")&&void 0!==i.item&&(void 0!==i.container?e(i.container):t)[s](i.item)},r=function(e,t,i){var s=e+1;s0&&(n.filter=this.$filters.selectlist("selectedItem")),this.infiniteScrollingEnabled||(n.pageSize=25,this.$pageSize.length>0&&(n.pageSize=parseInt(this.$pageSize.selectlist("selectedItem").value,10)));var a=this.$search&&this.$search.find("input")&&this.$search.find("input").val();""!==a&&(n.search=a);var r=(e.fn.repeater.viewTypes[this.viewType]||{}).dataOptions;return r&&(n=r.call(this,n)),n=e.extend(n,s)},infiniteScrolling:function(e,t){var i=this.$element.find(".repeater-footer"),s=this.$element.find(".repeater-viewport"),n=t||{};if(e)this.infiniteScrollingEnabled=!0,this.infiniteScrollingEnd=n.end,delete n.dataSource,delete n.end,this.infiniteScrollingOptions=n,s.css({height:s.height()+i.outerHeight()}),i.hide();else{var a=this.infiniteScrollingCont;delete a.data().infinitescroll,a.off("scroll"),a.removeClass("infinitescroll"),this.infiniteScrollingCont=null,this.infiniteScrollingEnabled=!1,this.infiniteScrollingEnd=null,this.infiniteScrollingOptions={},s.css({height:s.height()-i.outerHeight()}),i.show()}},infiniteScrollPaging:function(e){var t=!0!==this.infiniteScrollingEnd?this.infiniteScrollingEnd:void 0,i=e.page,s=e.pages;this.currentPage=void 0!==i?i:NaN,(!0===e.end||this.currentPage+1>=s)&&this.infiniteScrollingCont.infinitescroll("end",t)},initInfiniteScrolling:function(){var t=this.$canvas.find('[data-infinite="true"]:first');if((t=t.length<1?this.$canvas:t).data("fu.infinitescroll"))t.infinitescroll("enable");else{var i=this,s=e.extend({},this.infiniteScrollingOptions);s.dataSource=function(e,t){i.infiniteScrollingCallback=t,i.render({pageIncrement:1})},t.infinitescroll(s),this.infiniteScrollingCont=t}},initViewTypes:function(t){var i=[];for(var s in e.fn.repeater.viewTypes)({}).hasOwnProperty.call(e.fn.repeater.viewTypes,s)&&i.push(e.fn.repeater.viewTypes[s]);i.length>0?l.call(this,0,i,t):t()},itemization:function(e){this.$count.html(void 0!==e.count?e.count:"?"),this.$end.html(void 0!==e.end?e.end:"?"),this.$start.html(void 0!==e.start?e.start:"?")},next:function(){this.$nextBtn.attr("disabled","disabled"),this.$prevBtn.attr("disabled","disabled"),this.pageIncrement=1,this.$element.trigger("nextClicked.fu.repeater"),this.render({pageIncrement:this.pageIncrement})},pageInputChange:function(e,t){var i;if(e!==this.lastPageInput){this.lastPageInput=e;var s=parseInt(e,10)-1;i=s-this.currentPage,this.$element.trigger("pageChanged.fu.repeater",[s,t]),this.render({pageIncrement:i})}},pagination:function(e){this.$primaryPaging.removeClass("active"),this.$secondaryPaging.removeClass("active");var t=e.pages;this.currentPage=void 0!==e.page?e.page:NaN;var i=0===t?0:this.currentPage+1;if(t<=this.viewOptions.dropPagingCap){this.$primaryPaging.addClass("active");var s=this.$primaryPaging.find(".dropdown-menu");s.empty();for(var n=0;n'+a+" ")}this.$primaryPaging.find("input.form-control").val(i)}else this.$secondaryPaging.addClass("active"),this.$secondaryPaging.val(i);this.lastPageInput=this.currentPage+1+"",this.$pages.html(""+t),this.currentPage+1=0?(this.$prevBtn.removeAttr("disabled"),this.$prevBtn.removeClass("page-end")):(this.$prevBtn.attr("disabled","disabled"),this.$prevBtn.addClass("page-end")),0!==this.pageIncrement&&(this.pageIncrement>0?this.$nextBtn.is(":disabled")?this.$prevBtn.focus():this.$nextBtn.focus():this.$prevBtn.is(":disabled")?this.$nextBtn.focus():this.$prevBtn.focus())},previous:function(){this.$nextBtn.attr("disabled","disabled"),this.$prevBtn.attr("disabled","disabled"),this.pageIncrement=-1,this.$element.trigger("previousClicked.fu.repeater"),this.render({pageIncrement:this.pageIncrement})},render:function(t){this.disable();var i=!1,s=e.fn.repeater.viewTypes[this.viewType]||{},n=t||{};if(n.changeView&&this.currentView!==n.changeView){var a=this.currentView;this.currentView=n.changeView,this.viewType=this.currentView.split(".")[0],this.setViewOptions(this.currentView),this.$element.attr("data-currentview",this.currentView),this.$element.attr("data-viewtype",this.viewType),i=!0,n.viewChanged=i,this.$element.trigger("viewChanged.fu.repeater",this.currentView),this.infiniteScrollingEnabled&&this.infiniteScrolling(!1),(s=e.fn.repeater.viewTypes[this.viewType]||{}).selected&&s.selected.call(this,{prevView:a})}this.syncViewButtonState(),n.preserve=void 0!==n.preserve?n.preserve:!i,this.clear(n),(!this.infiniteScrollingEnabled||this.infiniteScrollingEnabled&&i)&&this.$loader.show().loader("play");var r=this.getDataOptions(n),l=this;(0,this.viewOptions.dataSource)(r,function(e){d.call(l,{data:e,dataOptions:r,options:n,viewChanged:i,viewTypeObj:s})})},resize:function(){for(var t,i,s,n=-1===this.viewOptions.staticHeight?this.$element.attr("data-staticheight"):this.viewOptions.staticHeight,a={},r=[],l=[],o=this.$element.parentsUntil(":visible").addBack(),d=0;d0?r:this.$canvas;if(e.renderItem){var o,d=(e.repeat||"data.items").split("."),h=d[0];if("data"===h||"this"===h){o="this"===h?this:t;for(var c=d.slice(1),p=0;p0&&(e.prop("checked",!0),e.parents("label:first").addClass("active")),this.syncingViewButtonState=!1}}).runRenderer=i.prototype.renderItems,e.fn.repeater=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.repeater"),l="object"==typeof t&&t;r||a.data("fu.repeater",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.repeater.defaults={dataSource:function(e,t){t({count:0,end:0,items:[],page:0,pages:1,start:0})},defaultView:-1,dropPagingCap:10,staticHeight:-1,views:null,searchOnKeyPress:!1,allowCancel:!0},e.fn.repeater.viewTypes={},e.fn.repeater.Constructor=i,e.fn.repeater.noConflict=function(){return e.fn.repeater=t,this}}(e),function(e){e.fn.repeater&&(e.fn.repeater.Constructor.prototype.list_clearSelectedItems=function(){this.$canvas.find(".repeater-list-check").remove(),this.$canvas.find(".repeater-list table tbody tr.selected").removeClass("selected")},e.fn.repeater.Constructor.prototype.list_highlightColumn=function(t,i){var s=this.$canvas.find(".repeater-list-wrapper > table tbody");(this.viewOptions.list_highlightSortedColumn||i)&&(s.find("td.sorted").removeClass("sorted"),s.find("tr").each(function(){e(this).find("td:nth-child("+(t+1)+")").filter(function(){return!e(this).parent().hasClass("empty")}).addClass("sorted")}))},e.fn.repeater.Constructor.prototype.list_getSelectedItems=function(){var t=[];return this.$canvas.find(".repeater-list .repeater-list-wrapper > table tbody tr.selected").each(function(){var i=e(this);t.push({data:i.data("item_data"),element:i})}),t},e.fn.repeater.Constructor.prototype.getValue=e.fn.repeater.Constructor.prototype.list_getSelectedItems,e.fn.repeater.Constructor.prototype.list_positionHeadings=function(){var t=this.$element.find(".repeater-list-wrapper"),i=t.offset().left;t.scrollLeft()>0?t.find(".repeater-list-heading").each(function(){var t=e(this),s=t.parents("th:first").offset().left-i+"px";t.addClass("shifted").css("left",s)}):t.find(".repeater-list-heading").each(function(){e(this).removeClass("shifted").css("left","")})},e.fn.repeater.Constructor.prototype.list_setSelectedItems=function(t,i){var s,n,a,r,l=this.viewOptions.list_selectable,o=this,d=t;e.isArray(d)||(d=[d]);var h=function(e,t,s){var n;void 0===t||t?(i||"multi"===l||o.list_clearSelectedItems(),e.hasClass("selected")||(e.addClass("selected"),(o.viewOptions.list_frozenColumns||"multi"===o.viewOptions.list_selectable)&&((n=o.$element.find(".frozen-column-wrapper tr:nth-child("+(s+1)+")")).addClass("selected"),n.find(".repeater-select-checkbox").addClass("checked")),o.viewOptions.list_actions&&o.$element.find(".actions-column-wrapper tr:nth-child("+(s+1)+")").addClass("selected"),e.find("td:first").prepend('
'))):(o.viewOptions.list_frozenColumns&&((n=o.$element.find(".frozen-column-wrapper tr:nth-child("+(s+1)+")")).addClass("selected"),n.find(".repeater-select-checkbox").removeClass("checked")),o.viewOptions.list_actions&&o.$element.find(".actions-column-wrapper tr:nth-child("+(s+1)+")").removeClass("selected"),e.find(".repeater-list-check").remove(),e.removeClass("selected"))};for(r=!0===i||"multi"===l?d.length:l&&d.length>0?1:0,n=0;n table tbody tr:nth-child("+(d[n].index+1)+")")).length>0&&h(a,d[n].selected,d[n].index):void 0!==d[n].property&&void 0!==d[n].value&&this.$canvas.find(".repeater-list .repeater-list-wrapper > table tbody tr").each(function(t){a=e(this),(s=a.data("item_data")||{})[d[n].property]===d[n].value&&h(a,d[n].selected,t)})},e.fn.repeater.Constructor.prototype.list_sizeHeadings=function(){this.$element.find(".repeater-list table").find("thead th").each(function(){var t=e(this),i=t.find(".repeater-list-heading");i.css({height:t.outerHeight()}),i.outerWidth(i.data("forced-width")||t.outerWidth())})},e.fn.repeater.Constructor.prototype.list_setFrozenColumns=function(){var t=this.$canvas.find(".table-frozen"),i=this.$element.find(".repeater-canvas"),s=this.$element.find(".repeater-list .repeater-list-wrapper > table"),n=this.$element.find(".repeater-list"),a=this.viewOptions.list_frozenColumns,r=this;if("multi"===this.viewOptions.list_selectable&&(a+=1,i.addClass("multi-select-enabled")),t.length<1){var l=e('
').insertBefore(s),o=s.clone().addClass("table-frozen");o.find("th:not(:lt("+a+"))").remove(),o.find("td:not(:nth-child(n+0):nth-child(-n+"+a+"))").remove();var d=o.clone().removeClass("table-frozen");d.find("tbody").remove();var h=e('
').append(d),c=h.find("th label.checkbox-custom.checkbox-inline");c.attr("id",c.attr("id")+"_cloned"),l.append(o),n.append(h),this.$canvas.addClass("frozen-enabled")}this.list_sizeFrozenColumns(),e(".frozen-thead-wrapper .repeater-list-heading").on("click",function(){var t=e(this).parent("th").index();t+=1,r.$element.find(".repeater-list-wrapper > table thead th:nth-child("+t+") .repeater-list-heading")[0].click()})},e.fn.repeater.Constructor.prototype.list_positionColumns=function(){var e=this.$element.find(".repeater-canvas"),t=e.scrollTop(),i=e.scrollLeft(),s=this.viewOptions.list_frozenColumns||"multi"===this.viewOptions.list_selectable,n=this.viewOptions.list_actions,a=this.$element.find(".repeater-canvas").outerWidth(),r=this.$element.find(".repeater-list .repeater-list-wrapper > table").outerWidth()-(a-(this.$element.find(".table-actions")?this.$element.find(".table-actions").outerWidth():0))>=i;t>0?e.find(".repeater-list-heading").css("top",t):e.find(".repeater-list-heading").css("top","0"),i>0?(s&&(e.find(".frozen-thead-wrapper").css("left",i),e.find(".frozen-column-wrapper").css("left",i)),n&&r&&(e.find(".actions-thead-wrapper").css("right",-i),e.find(".actions-column-wrapper").css("right",-i))):(s&&(e.find(".frozen-thead-wrapper").css("left","0"),e.find(".frozen-column-wrapper").css("left","0")),n&&(e.find(".actions-thead-wrapper").css("right","0"),e.find(".actions-column-wrapper").css("right","0")))},e.fn.repeater.Constructor.prototype.list_createItemActions=function(){var t,i,s="",n=this,a=this.$element.find(".repeater-list .repeater-list-wrapper > table"),r=this.$canvas.find(".table-actions");for(t=0,i=this.viewOptions.list_actions.items.length;t '+o+" "}var d='
";if(r.length<1){var h=e('
').insertBefore(a),c=a.clone().addClass("table-actions");if(c.find("th:not(:last-child)").remove(),c.find("tr td:not(:last-child)").remove(),"multi"===this.viewOptions.list_selectable||"action"===this.viewOptions.list_selectable)c.find("thead tr").html(' '+d+"
"),"action"!==this.viewOptions.list_selectable&&c.find("thead .btn").attr("disabled","disabled");else{var p=this.viewOptions.list_actions.label||'a ';c.find("thead tr").addClass("empty-heading").html(""+p+''+p+"
")}c.find("td").each(function(t){e(this).html(d),e(this).find("a").attr("data-row",t+1)}),h.append(c),this.$canvas.addClass("actions-enabled")}this.list_sizeActionsTable(),this.$element.find(".table-actions tbody .action-item").on("click",function(t){if(!n.isDisabled){var i={actionName:e(this).data("action"),rows:[e(this).data("row")]};n.list_getActionItems(i,t)}}),this.$element.find(".table-actions thead .action-item").on("click",function(t){if(!n.isDisabled){var i={actionName:e(this).data("action"),rows:[]},s=".repeater-list-wrapper > table .selected";"action"===n.viewOptions.list_selectable&&(s=".repeater-list-wrapper > table tr"),n.$element.find(s).each(function(e){i.rows.push(e+1)}),n.list_getActionItems(i,t)}})},e.fn.repeater.Constructor.prototype.list_getActionItems=function(t,i){for(var s=[],n=e.grep(this.viewOptions.list_actions.items,function(e){return e.name===t.actionName})[0],a=0,r=t.rows.length;a table tbody tr:nth-child("+t.rows[a]+")");s.push({item:l,rowData:l.data("item_data")})}if(1===s.length&&(s=s[0]),n.clickAction){n.clickAction(s,function(){},i)}},e.fn.repeater.Constructor.prototype.list_sizeActionsTable=function(){var t=this.$element.find(".repeater-list table.table-actions"),i=t.find("thead tr th"),s=this.$element.find(".repeater-list-wrapper > table");i.outerHeight(s.find("thead tr th").outerHeight()),i.find(".repeater-list-heading").outerHeight(i.outerHeight()),t.find("tbody tr td:first-child").each(function(t){e(this).outerHeight(s.find("tbody tr:eq("+t+") td").outerHeight())})},e.fn.repeater.Constructor.prototype.list_sizeFrozenColumns=function(){var t=this.$element.find(".repeater-list .repeater-list-wrapper > table");this.$element.find(".repeater-list table.table-frozen tr").each(function(i){e(this).height(t.find("tr:eq("+i+")").height())});var i=t.find("td:eq(0)").outerWidth();this.$element.find(".frozen-column-wrapper, .frozen-thead-wrapper").width(i)},e.fn.repeater.Constructor.prototype.list_frozenOptionsInitialize=function(){function t(e){a.list_revertingCheckbox=!0,e.checkbox("toggle"),delete a.list_revertingCheckbox}var i=this.$element.find(".frozen-column-wrapper .checkbox-inline"),s=this.$element.find(".header-checkbox .checkbox-custom"),n=this.$element.find(".repeater-list table"),a=this;this.$element.find("tr.selectable").on("mouseover mouseleave",function(t){var i=e(this).index();i+=1,"mouseover"===t.type?n.find("tbody tr:nth-child("+i+")").addClass("hovered"):n.find("tbody tr:nth-child("+i+")").removeClass("hovered")}),s.checkbox(),i.checkbox();var r=this.$element.find(".table-frozen tbody .checkbox-inline"),l=this.$element.find(".frozen-thead-wrapper thead .checkbox-inline input");r.on("change",function(i){if(i.preventDefault(),!a.list_revertingCheckbox)if(a.isDisabled)t(e(i.currentTarget));else{var s=e(this).attr("data-row");s=parseInt(s,10)+1,a.$element.find(".repeater-list-wrapper > table tbody tr:nth-child("+s+")").click();var n=a.$element.find(".table-frozen tbody .checkbox-inline.checked").length;0===n?(l.prop("checked",!1),l.prop("indeterminate",!1)):n===r.length?(l.prop("checked",!0),l.prop("indeterminate",!1)):(l.prop("checked",!1),l.prop("indeterminate",!0))}}),l.on("change",function(s){a.list_revertingCheckbox||(a.isDisabled?t(e(s.currentTarget)):e(this).is(":checked")?(a.$element.find(".repeater-list-wrapper > table tbody tr:not(.selected)").click(),a.$element.trigger("selected.fu.repeaterList",i)):(a.$element.find(".repeater-list-wrapper > table tbody tr.selected").click(),a.$element.trigger("deselected.fu.repeaterList",i)))})},e.fn.repeater.defaults=e.extend({},e.fn.repeater.defaults,{list_columnRendered:null,list_columnSizing:!0,list_columnSyncing:!0,list_highlightSortedColumn:!0,list_infiniteScroll:!1,list_noItemsHTML:"no items found",list_selectable:!1,list_sortClearing:!1,list_rowRendered:null,list_frozenColumns:0,list_actions:!1}),e.fn.repeater.viewTypes.list={cleared:function(){this.viewOptions.list_columnSyncing&&this.list_sizeHeadings()},dataOptions:function(e){return this.list_sortDirection&&(e.sortDirection=this.list_sortDirection),this.list_sortProperty&&(e.sortProperty=this.list_sortProperty),e},enabled:function(e){this.viewOptions.list_actions&&(e.status?(this.$canvas.find(".repeater-actions-button").removeAttr("disabled"),h.call(this)):this.$canvas.find(".repeater-actions-button").attr("disabled","disabled"))},initialize:function(e,t){this.list_sortDirection=null,this.list_sortProperty=null,this.list_specialBrowserClass=d(),this.list_actions_width=void 0!==this.viewOptions.list_actions.width?this.viewOptions.list_actions.width:37,this.list_noItems=!1,t()},resize:function(){o.call(this,this.$element.find(".repeater-list-wrapper > table thead tr")),this.viewOptions.list_actions&&this.list_sizeActionsTable(),(this.viewOptions.list_frozenColumns||"multi"===this.viewOptions.list_selectable)&&this.list_sizeFrozenColumns(),this.viewOptions.list_columnSyncing&&this.list_sizeHeadings()},selected:function(){var e,t=this.viewOptions.list_infiniteScroll;this.list_firstRender=!0,this.$loader.addClass("noHeader"),t&&(e="object"==typeof t?t:{},this.infiniteScrolling(!0,e))},before:function(t){var i,s=t.container.find(".repeater-list"),n=this;return t.data.count>0?this.list_noItems=!1:this.list_noItems=!0,s.length<1&&((s=e('')).find(".repeater-list-wrapper").on("scroll.fu.repeaterList",function(){n.viewOptions.list_columnSyncing&&n.list_positionHeadings()}),(n.viewOptions.list_frozenColumns||n.viewOptions.list_actions||"multi"===n.viewOptions.list_selectable)&&t.container.on("scroll.fu.repeaterList",function(){n.list_positionColumns()}),t.container.append(s)),t.container.removeClass("actions-enabled actions-enabled multi-select-enabled"),i=s.find("table"),l.call(this,i,t.data),r.call(this,i,t.data),!1},renderItem:function(e){return a.call(this,e.container,e.subset,e.index),!1},after:function(){var e;return!this.viewOptions.list_frozenColumns&&"multi"!==this.viewOptions.list_selectable||this.list_noItems||this.list_setFrozenColumns(),this.viewOptions.list_actions&&!this.list_noItems&&(this.list_createItemActions(),this.list_sizeActionsTable()),!this.viewOptions.list_frozenColumns&&!this.viewOptions.list_actions&&"multi"!==this.viewOptions.list_selectable||this.list_noItems||(this.list_positionColumns(),this.list_frozenOptionsInitialize()),this.viewOptions.list_columnSyncing&&(this.list_sizeHeadings(),this.list_positionHeadings()),(e=this.$canvas.find(".repeater-list-wrapper > table .repeater-list-heading.sorted")).length>0&&this.list_highlightColumn(e.data("fu_item_index")),!1}});var t=function(e,t){if(!t)return!1;if(!e||t.length!==e.length)return!0;for(var i=0,s=t.length;i"),d=n[a]._auto_width,h=n[a].property;if(!1!==this.viewOptions.list_actions&&"@_ACTIONS_@"===h&&(l='
'),l=void 0!==l?l:"",o.addClass(void 0!==r?r:"").append(l),void 0!==d&&o.outerWidth(d),t.append(o),"multi"===this.viewOptions.list_selectable&&"@_CHECKBOX_@"===n[a].property){var c=' ';o.html(c)}return o},s=function(t,i,s){var n,a,r,l,o,d="glyphicon-chevron-down",h="glyphicon-chevron-up",c=e('
'),p='',u=e(" "),f=this;if(c.data("fu_item_index",s),c.prepend(i[s].label),u.html(c.html()).find("[id]").removeAttr("id"),"@_CHECKBOX_@"!==i[s].property?u.append(c):u.append(p),n=u.add(c),l=c.find(".glyphicon.rlc:first"),o=l.add(u.find(".glyphicon.rlc:first")),this.viewOptions.list_actions&&"@_ACTIONS_@"===i[s].property){var m=this.list_actions_width;u.css("width",m),c.css("width",m)}void 0!==(a=i[s].className)&&n.addClass(a),(r=i[s].sortable)&&(n.addClass("sortable"),c.on("click.fu.repeaterList",function(){f.isDisabled||(f.list_sortProperty="string"==typeof r?r:i[s].property,c.hasClass("sorted")?l.hasClass(h)?(o.removeClass(h).addClass(d),f.list_sortDirection="desc"):f.viewOptions.list_sortClearing?(n.removeClass("sorted"),o.removeClass(d),f.list_sortDirection=null,f.list_sortProperty=null):(o.removeClass(d).addClass(h),f.list_sortDirection="asc"):(t.find("th, .repeater-list-heading").removeClass("sorted"),o.removeClass(d).addClass(h),f.list_sortDirection="asc",n.addClass("sorted")),f.render({clearInfinite:!0,pageIncrement:null}))})),"asc"!==i[s].sortDirection&&"desc"!==i[s].sortDirection||(t.find("th, .repeater-list-heading").removeClass("sorted"),n.addClass("sortable sorted"),"asc"===i[s].sortDirection?(o.addClass(h),this.list_sortDirection="asc"):(o.addClass(d),this.list_sortDirection="desc"),this.list_sortProperty="string"==typeof r?r:i[s].property),t.append(u)},n=function(t){var i="multi"===t.viewOptions.list_selectable,s=t.viewOptions.list_actions,n=t.$element;if(!t.isDisabled){var a=e(this),r=e(this).index()+1,l=n.find(".frozen-column-wrapper tr:nth-child("+r+")"),o=n.find(".actions-column-wrapper tr:nth-child("+r+")"),d=n.find(".frozen-column-wrapper tr:nth-child("+r+") .checkbox-inline");a.is(".selected")?(a.removeClass("selected"),i?(d.click(),l.removeClass("selected"),s&&o.removeClass("selected")):a.find(".repeater-list-check").remove(),n.trigger("deselected.fu.repeaterList",a)):(i?(d.click(),a.addClass("selected"),l.addClass("selected"),s&&o.addClass("selected")):(t.$canvas.find(".repeater-list-check").remove(),t.$canvas.find(".repeater-list tbody tr.selected").each(function(){e(this).removeClass("selected"),n.trigger("deselected.fu.repeaterList",e(this))}),a.find("td:first").prepend('
'),a.addClass("selected"),l.addClass("selected")),n.trigger("selected.fu.repeaterList",a)),h.call(t)}},a=function(t,s,a){var r=e(" ");if(this.viewOptions.list_selectable&&(r.data("item_data",s[a]),"action"!==this.viewOptions.list_selectable)){r.addClass("selectable"),r.attr("tabindex",0);var l=this;r.on("click.fu.repeaterList",function(){n.call(this,l)}),r.keyup(function(e){13===e.keyCode&&r.trigger("click.fu.repeaterList")})}this.viewOptions.list_actions&&!this.viewOptions.list_selectable&&r.data("item_data",s[a]);for(var o=[],d=0,h=this.list_columns.length;d'),t.append(n)),"string"==typeof i.error&&i.error.length>0?((s=e(' ')).find("td").append(i.error),n.append(s)):i.items&&i.items.length<1&&((s=e(' ')).find("td").append(this.viewOptions.list_noItemsHTML),n.append(s))},l=function(i,n){var a,r,l,d=n.columns||[],h=i.find("thead");if(this.list_firstRender||t(this.list_columns,d)||0===h.length){if(h.remove(),"multi"===this.viewOptions.list_selectable&&!this.list_noItems){var c={label:"c",property:"@_CHECKBOX_@",sortable:!1};d.splice(0,0,c)}if(this.list_columns=d,this.list_firstRender=!1,this.$loader.removeClass("noHeader"),this.viewOptions.list_actions){var p={label:this.viewOptions.list_actions.label||'a ',property:"@_ACTIONS_@",sortable:!1,width:this.list_actions_width};d.push(p)}for(l=(h=e(' ')).find("tr"),a=0,r=d.length;a0)){var o=this.$canvas.find(".repeater-list-wrapper").outerWidth();for(n=Math.floor((o-a)/s),i=0;in&&(n=r[i].minWidth),r[i].col.outerWidth(n),this.list_columns[r[i].index]._auto_width=n}},d=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE "),i=e.indexOf("Firefox");return t>0?"ie-"+parseInt(e.substring(t+5,e.indexOf(".",t)),10):i>0?"firefox":""},h=function(){var e=".repeater-list-wrapper > table .selected",t=this.$element.find(".table-actions");"action"===this.viewOptions.list_selectable&&(e=".repeater-list-wrapper > table tr"),this.$canvas.find(e).length>0?t.find("thead .btn").removeAttr("disabled"):t.find("thead .btn").attr("disabled","disabled")}}(e),function(e){function t(t,i){for(var s=!1;!s&&i.search("{{")>=0;)!function(){var n,a,r;a=i.indexOf("{{"),n=i.indexOf("}}",a+2),a>-1&&n>-1?(r=e.trim(i.substring(a+2,n)),r=void 0!==t[r]?t[r]:"",i=i.substring(0,a)+r+i.substring(n+2)):s=!0}();return i}e.fn.repeater&&(e.fn.repeater.Constructor.prototype.thumbnail_clearSelectedItems=function(){this.$canvas.find(".repeater-thumbnail-cont .selectable.selected").removeClass("selected")},e.fn.repeater.Constructor.prototype.thumbnail_getSelectedItems=function(){var t=[];return this.$canvas.find(".repeater-thumbnail-cont .selectable.selected").each(function(){t.push(e(this))}),t},e.fn.repeater.Constructor.prototype.thumbnail_setSelectedItems=function(t,i){function s(e,t){(t=void 0===t||t)?(i||"multi"===o||d.thumbnail_clearSelectedItems(),e.addClass("selected")):e.removeClass("selected")}var n,a,r,l,o=this.viewOptions.thumbnail_selectable,d=this;for(e.isArray(t)||(t=[t]),r=!0===i||"multi"===o?t.length:o&&t.length>0?1:0,n=0;n0&&s(a,t[n].selected)):t[n].selector&&this.$canvas.find(".repeater-thumbnail-cont .selectable").each(function(){(a=e(this)).is(t[n].selector)&&s(a,t[n].selected)})},e.fn.repeater.defaults=e.extend({},e.fn.repeater.defaults,{thumbnail_alignment:"left",thumbnail_infiniteScroll:!1,thumbnail_itemRendered:null,thumbnail_noItemsHTML:"no items found",thumbnail_selectable:!1,thumbnail_template:'{{name}} '}),e.fn.repeater.viewTypes.thumbnail={selected:function(){var e,t=this.viewOptions.thumbnail_infiniteScroll;t&&(e="object"==typeof t?t:{},this.infiniteScrolling(!0,e))},before:function(t){var i,s=this.viewOptions.thumbnail_alignment,n=this.$canvas.find(".repeater-thumbnail-cont"),a=t.data,r={};return n.length<1?(n=e('
'),s&&"none"!==s?(s={center:1,justify:1,left:1,right:1}[s]?s:"justify",n.addClass("align-"+s),this.thumbnail_injectSpacers=!0):this.thumbnail_injectSpacers=!1,r.item=n):r.action="none",a.items&&a.items.length<1?((i=e('
')).append(this.viewOptions.thumbnail_noItemsHTML),n.append(i)):n.find(".empty:first").remove(),r},renderItem:function(i){var s=this.viewOptions.thumbnail_selectable,n=this,a=e(t(i.subset[i.index],this.viewOptions.thumbnail_template));return a.data("item_data",i.data.items[i.index]),s&&(a.addClass("selectable"),a.on("click",function(){n.isDisabled||(a.hasClass("selected")?(a.removeClass("selected"),n.$element.trigger("deselected.fu.repeaterThumbnail",a)):("multi"!==s&&n.$canvas.find(".repeater-thumbnail-cont .selectable.selected").each(function(){var t=e(this);t.removeClass("selected"),n.$element.trigger("deselected.fu.repeaterThumbnail",t)}),a.addClass("selected"),n.$element.trigger("selected.fu.repeaterThumbnail",a)))})),i.container.append(a),this.thumbnail_injectSpacers&&a.after(' '),this.viewOptions.thumbnail_itemRendered&&this.viewOptions.thumbnail_itemRendered({container:i.container,item:a,itemData:i.subset[i.index]},function(){}),!1}})}(e),function(e){var t=e.fn.scheduler,i=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.scheduler.defaults,i),this.$startDate=this.$element.find(".start-datetime .start-date"),this.$startTime=this.$element.find(".start-datetime .start-time"),this.$timeZone=this.$element.find(".timezone-container .timezone"),this.$repeatIntervalPanel=this.$element.find(".repeat-every-panel"),this.$repeatIntervalSelect=this.$element.find(".repeat-options"),this.$repeatIntervalSpinbox=this.$element.find(".repeat-every"),this.$repeatIntervalTxt=this.$element.find(".repeat-every-text"),this.$end=this.$element.find(".repeat-end"),this.$endSelect=this.$end.find(".end-options"),this.$endAfter=this.$end.find(".end-after"),this.$endDate=this.$end.find(".end-on-date"),this.$recurrencePanels=this.$element.find(".repeat-panel"),this.$repeatIntervalSelect.selectlist(),this.$element.find(".selectlist").selectlist(),this.$startDate.datepicker(this.options.startDateOptions);var n="function"==typeof this.options.startDateChanged?this.options.startDateChanged:this._guessEndDate;this.$startDate.on("change changed.fu.datepicker dateClicked.fu.datepicker",e.proxy(n,this)),this.$startTime.combobox(),""===this.$startTime.find("input").val()&&this.$startTime.combobox("selectByIndex",0),"0"===this.$repeatIntervalSpinbox.find("input").val()?this.$repeatIntervalSpinbox.spinbox({value:1,min:1,limitToStep:!0}):this.$repeatIntervalSpinbox.spinbox({min:1,limitToStep:!0}),this.$endAfter.spinbox({value:1,min:1,limitToStep:!0}),this.$endDate.datepicker(this.options.endDateOptions),this.$element.find(".radio-custom").radio(),this.$repeatIntervalSelect.on("changed.fu.selectlist",e.proxy(this.repeatIntervalSelectChanged,this)),this.$endSelect.on("changed.fu.selectlist",e.proxy(this.endSelectChanged,this)),this.$element.find(".repeat-days-of-the-week .btn-group .btn").on("change.fu.scheduler",function(e,t){s.changed(e,t,!0)}),this.$element.find(".combobox").on("changed.fu.combobox",e.proxy(this.changed,this)),this.$element.find(".datepicker").on("changed.fu.datepicker",e.proxy(this.changed,this)),this.$element.find(".datepicker").on("dateClicked.fu.datepicker",e.proxy(this.changed,this)),this.$element.find(".selectlist").on("changed.fu.selectlist",e.proxy(this.changed,this)),this.$element.find(".spinbox").on("changed.fu.spinbox",e.proxy(this.changed,this)),this.$element.find(".repeat-monthly .radio-custom, .repeat-yearly .radio-custom").on("change.fu.scheduler",e.proxy(this.changed,this))},s=function(e,t){var i,s="";return s+=e.getFullYear(),s+=t,i=e.getMonth()+1,s+=i<10?"0"+i:i,s+=t,i=e.getDate(),s+=i<10?"0"+i:i},n={secondly:1e3,minutely:6e4,hourly:36e5,daily:864e5,weekly:6048e5,monthly:3024e6,yearly:314496e5},a=function(e,t,i,s){return new Date(e.getTime()+n[i]*s)};i.prototype={constructor:i,destroy:function(){var t;return this.$element.find("input").each(function(){e(this).attr("value",e(this).val())}),this.$element.find(".datepicker .calendar").empty(),t=this.$element[0].outerHTML,this.$element.find(".combobox").combobox("destroy"),this.$element.find(".datepicker").datepicker("destroy"),this.$element.find(".selectlist").selectlist("destroy"),this.$element.find(".spinbox").spinbox("destroy"),this.$element.find(".radio-custom").radio("destroy"),this.$element.remove(),t},changed:function(t,i,s){s||t.stopPropagation(),this.$element.trigger("changed.fu.scheduler",{data:void 0!==i?i:e(t.currentTarget).data(),originalEvent:t,value:this.getValue()})},disable:function(){this.toggleState("disable")},enable:function(){this.toggleState("enable")},setUtcTime:function(e,t,i){var s=e.split("-"),n=t.split(":"),a=new Date(Date.UTC(s[0],s[1]-1,s[2],n[0],n[1],n[2]?n[2]:0));if("Z"===i)a.setUTCHours(a.getUTCHours()+0);else{var r=[];r[0]="(.)",r[1]=".*?",r[2]="\\d",r[3]=".*?",r[4]="(\\d)";var l=new RegExp(r.join(""),["i"]).exec(i);if(null!==l){var o=l[1],d=l[2],h="+"===o?1:-1;a.setUTCHours(a.getUTCHours()+h*parseInt(d,10))}}var c=a.getTimezoneOffset();return a.setMinutes(c),a},endSelectChanged:function(e,t){var i;i=t?t.value:this.$endSelect.selectlist("selectedItem").value,this.$endAfter.parent().addClass("hidden"),this.$endAfter.parent().attr("aria-hidden","true"),this.$endDate.parent().addClass("hidden"),this.$endDate.parent().attr("aria-hidden","true"),"after"===i?(this.$endAfter.parent().removeClass("hide hidden"),this.$endAfter.parent().attr("aria-hidden","false")):"date"===i&&(this.$endDate.parent().removeClass("hide hidden"),this.$endDate.parent().attr("aria-hidden","false"))},_guessEndDate:function(){var e=this.$repeatIntervalSelect.selectlist("selectedItem").value,t=new Date(this.$endDate.datepicker("getDate")),i=new Date(this.$startDate.datepicker("getDate")),s=this.$repeatIntervalSpinbox.find("input").val();"none"!==e&&t<=i&&(this.$repeatIntervalSpinbox.is(":visible")||(s=1),"weekdays"===e&&(s=1,e="weekly"),t=a(i,0,e,s),this.$endDate.datepicker("setDate",t))},getValue:function(){var t,i=this.$repeatIntervalSpinbox.spinbox("value"),n="",a=this.$repeatIntervalSelect.selectlist("selectedItem").value;t=this.$startTime.combobox("selectedItem").value?(t=this.$startTime.combobox("selectedItem").value).toLowerCase():this.$startTime.combobox("selectedItem").text.toLowerCase();var r,l,o,d,h,c,p,u=this.$timeZone.selectlist("selectedItem");c=""+s(this.$startDate.datepicker("getDate"),"-"),c+="T",l=t.search("am")>=0,o=t.search("pm")>=0,(t=e.trim(t.replace(/am/g,"").replace(/pm/g,"")).split(":"))[0]=parseInt(t[0],10),t[1]=parseInt(t[1],10),l&&t[0]>11?t[0]=0:o&&t[0]<12&&(t[0]+=12),c+=t[0]<10?"0"+t[0]:t[0],c+=":",c+=t[1]<10?"0"+t[1]:t[1],c+="+00:00"===u.offset?"Z":u.offset,"none"===a?n="FREQ=DAILY;INTERVAL=1;COUNT=1;":"secondly"===a?(n="FREQ=SECONDLY;",n+="INTERVAL="+i+";"):"minutely"===a?(n="FREQ=MINUTELY;",n+="INTERVAL="+i+";"):"hourly"===a?(n="FREQ=HOURLY;",n+="INTERVAL="+i+";"):"daily"===a?(n+="FREQ=DAILY;",n+="INTERVAL="+i+";"):"weekdays"===a?(n+="FREQ=WEEKLY;",n+="BYDAY=MO,TU,WE,TH,FR;",n+="INTERVAL=1;"):"weekly"===a?(r=[],this.$element.find(".repeat-days-of-the-week .btn-group input:checked").each(function(){r.push(e(this).data().value)}),n+="FREQ=WEEKLY;",n+="BYDAY="+r.join(",")+";",n+="INTERVAL="+i+";"):"monthly"===a?(n+="FREQ=MONTHLY;",n+="INTERVAL="+i+";","bymonthday"===(p=this.$element.find("input[name=repeat-monthly]:checked").val())?n+="BYMONTHDAY="+parseInt(this.$element.find(".repeat-monthly-date .selectlist").selectlist("selectedItem").text,10)+";":"bysetpos"===p&&(r=this.$element.find(".repeat-monthly-day .month-days").selectlist("selectedItem").value,h=this.$element.find(".repeat-monthly-day .month-day-pos").selectlist("selectedItem").value,n+="BYDAY="+r+";",n+="BYSETPOS="+h+";")):"yearly"===a&&(n+="FREQ=YEARLY;","bymonthday"===(p=this.$element.find("input[name=repeat-yearly]:checked").val())?(n+="BYMONTH="+(d=this.$element.find(".repeat-yearly-date .year-month").selectlist("selectedItem").value)+";",n+="BYMONTHDAY="+this.$element.find(".repeat-yearly-date .year-month-day").selectlist("selectedItem").text+";"):"bysetpos"===p&&(r=this.$element.find(".repeat-yearly-day .year-month-days").selectlist("selectedItem").value,h=this.$element.find(".repeat-yearly-day .year-month-day-pos").selectlist("selectedItem").value,d=this.$element.find(".repeat-yearly-day .year-month").selectlist("selectedItem").value,n+="BYDAY="+r+";",n+="BYSETPOS="+h+";",n+="BYMONTH="+d+";"));var f=this.$endSelect.selectlist("selectedItem").value,m="";return"none"!==a&&("after"===f?m="COUNT="+this.$endAfter.spinbox("value")+";":"date"===f&&(m="UNTIL="+s(this.$endDate.datepicker("getDate"),"")+";")),{startDateTime:c,timeZone:u,recurrencePattern:n=";"===(n+=m).substring(n.length-1)?n.substring(0,n.length-1):n}},repeatIntervalSelectChanged:function(e,t){var i,s,n;switch(t?(s=t.value,n=t.text):(s=(i=this.$repeatIntervalSelect.selectlist("selectedItem")).value||"",n=i.text||""),this.$repeatIntervalTxt.text(n),s.toLowerCase()){case"hourly":case"daily":case"weekly":case"monthly":this.$repeatIntervalPanel.removeClass("hide hidden"),this.$repeatIntervalPanel.attr("aria-hidden","false");break;default:this.$repeatIntervalPanel.addClass("hidden"),this.$repeatIntervalPanel.attr("aria-hidden","true")}this.$recurrencePanels.addClass("hidden"),this.$recurrencePanels.attr("aria-hidden","true"),this.$element.find(".repeat-"+s).removeClass("hide hidden"),this.$element.find(".repeat-"+s).attr("aria-hidden","false"),"none"===s?(this.$end.addClass("hidden"),this.$end.attr("aria-hidden","true")):(this.$end.removeClass("hide hidden"),this.$end.attr("aria-hidden","false")),this._guessEndDate()},_parseAndSetRecurrencePattern:function(e,t){var i,s,n,a,r={},l=0,o="",d=e.toUpperCase().split(";");for(l=0;l-1?a.timeZoneOffset="+"+e.trim(t.split("+")[1]):t.search(/\-/)>-1?a.timeZoneOffset="-"+e.trim(t.split("-")[1]):a.timeZoneOffset="+00:00",a.time24HourFormatSplit=a.time24HourFormat.split(":"),i=parseInt(a.time24HourFormatSplit[0],10),s=a.time24HourFormatSplit[1]?parseInt(a.time24HourFormatSplit[1].split("+")[0].split("-")[0].split("Z")[0],10):0,n=i<12?"AM":"PM",0===i?i=12:i>12&&(i-=12),s=s<10?"0"+s:s,a.time12HourFormat=i+":"+s,a.time12HourFormatWithPeriod=i+":"+s+" "+n,a},_parseTimeZone:function(t,i){return i.timeZoneQuerySelector="",t.timeZone?("string"==typeof t.timeZone?i.timeZoneQuerySelector+='li[data-name="'+t.timeZone+'"]':e.each(t.timeZone,function(e,t){i.timeZoneQuerySelector+="li[data-"+e+'="'+t+'"]'}),i.timeZoneOffset=t.timeZone.offset):t.startDateTime?(i.timeZoneOffset="+00:00"===i.timeZoneOffset?"Z":i.timeZoneOffset,i.timeZoneQuerySelector+='li[data-offset="'+i.timeZoneOffset+'"]'):i.timeZoneOffset="Z",i.timeZoneOffset},_setTimeUI:function(e){this.$startTime.find("input").val(e),this.$startTime.combobox("selectByText",e)},_setTimeZoneUI:function(e){this.$timeZone.selectlist("selectBySelector",e)},setValue:function(e){var t,i,s,n,a={};if(e.startDateTime)i=(t=e.startDateTime.split("T"))[0],(s=t[1])?(a=this._parseStartDateTime(s),this._setTimeUI(a.time12HourFormatWithPeriod)):(a.time12HourFormat="00:00",a.time24HourFormat="00:00");else{a.time12HourFormat="00:00",a.time24HourFormat="00:00";var r=this.$startDate.datepicker("getDate");i=r.getFullYear()+"-"+r.getMonth()+"-"+r.getDate()}this._parseTimeZone(e,a),a.timeZoneQuerySelector&&this._setTimeZoneUI(a.timeZoneQuerySelector),e.recurrencePattern&&this._parseAndSetRecurrencePattern(e.recurrencePattern,a),n=this.setUtcTime(i,a.time24HourFormat,a.timeZoneOffset),this.$startDate.datepicker("setDate",n)},toggleState:function(e){this.$element.find(".combobox").combobox(e),this.$element.find(".datepicker").datepicker(e),this.$element.find(".selectlist").selectlist(e),this.$element.find(".spinbox").spinbox(e),this.$element.find(".radio-custom").radio(e),e="disable"===e?"addClass":"removeClass",this.$element.find(".repeat-days-of-the-week .btn-group")[e]("disabled")},value:function(e){return e?this.setValue(e):this.getValue()}},e.fn.scheduler=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.scheduler"),l="object"==typeof t&&t;r||a.data("fu.scheduler",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.scheduler.defaults={},e.fn.scheduler.Constructor=i,e.fn.scheduler.noConflict=function(){return e.fn.scheduler=t,this},e(document).on("mousedown.fu.scheduler.data-api","[data-initialize=scheduler]",function(t){var i=e(t.target).closest(".scheduler");i.data("fu.scheduler")||i.scheduler(i.data())}),e(function(){e("[data-initialize=scheduler]").each(function(){var t=e(this);t.data("scheduler")||t.scheduler(t.data())})})}(e),function(e){var t=e.fn.picker,i=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.picker.defaults,i),this.$accept=this.$element.find(".picker-accept"),this.$cancel=this.$element.find(".picker-cancel"),this.$trigger=this.$element.find(".picker-trigger"),this.$footer=this.$element.find(".picker-footer"),this.$header=this.$element.find(".picker-header"),this.$popup=this.$element.find(".picker-popup"),this.$body=this.$element.find(".picker-body"),this.clickStamp="_",this.isInput=this.$trigger.is("input"),this.$trigger.on("keydown.fu.picker",e.proxy(this.keyComplete,this)),this.$trigger.on("focus.fu.picker",e.proxy(function(t){(void 0===t||e(t.target).is("input[type=text]"))&&e.proxy(this.show(),this)},this)),this.$trigger.on("click.fu.picker",e.proxy(function(t){e(t.target).is("input[type=text]")?e.proxy(this.show(),this):e.proxy(this.toggle(),this)},this)),this.$accept.on("click.fu.picker",e.proxy(this.complete,this,"accepted")),this.$cancel.on("click.fu.picker",function(e){e.preventDefault(),s.complete("cancelled")})},s=function(t){var i=Math.max(document.documentElement.clientHeight,window.innerHeight||0),s=e(document).scrollTop(),n=t.$popup.offset();return n.top+t.$popup.outerHeight(!0)>i+s||n.top0)return!1;return!0},show:function(){var t;if((t=e(document).find(".picker.showing")).length>0){if(t.data("fu.picker")&&t.data("fu.picker").options.explicit)return;t.picker("externalClickListener",{},!0)}this.$element.addClass("showing"),n(this),this.$element.trigger("shown.fu.picker"),this.clickStamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.options.explicit||e(document).on("click.fu.picker.externalClick."+this.clickStamp,e.proxy(this.externalClickListener,this))}},e.fn.picker=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data("fu.picker"),l="object"==typeof t&&t;r||a.data("fu.picker",r=new i(this,l)),"string"==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.picker.defaults={onAccept:void 0,onCancel:void 0,onExit:void 0,externalClickExceptions:[],explicit:!1},e.fn.picker.Constructor=i,e.fn.picker.noConflict=function(){return e.fn.picker=t,this},e(document).on("focus.fu.picker.data-api","[data-initialize=picker]",function(t){var i=e(t.target).closest(".picker");i.data("fu.picker")||i.picker(i.data())}),e(function(){e("[data-initialize=picker]").each(function(){var t=e(this);t.data("fu.picker")||t.picker(t.data())})})}(e)});
\ No newline at end of file
diff --git a/package.json b/package.json
index 6af091b00..b6048346b 100644
--- a/package.json
+++ b/package.json
@@ -102,7 +102,7 @@
"url": "git://github.com/ExactTarget/fuelux.git"
},
"title": "Fuel UX",
- "version": "3.16.1",
+ "version": "3.16.2",
"volo": {
"baseDir": "lib",
"dependencies": {