!function(G,b){function t(t,e){var i,s,o=this;e=e||{},this.$element=G(t),this.options=G.extend(!0,{},G.fn.ajaxSelectPicker.defaults,e),this.LOG_ERROR=1,this.LOG_WARNING=2,this.LOG_INFO=3,this.LOG_DEBUG=4,this.lastRequest=!1,this.previousQuery="",this.query="",this.request=!1;var l=[{from:"ajaxResultsPreHook",to:"preprocessData"},{from:"ajaxSearchUrl",to:{ajax:{url:"{{{value}}}"}}},{from:"ajaxOptions",to:"ajax"},{from:"debug",to:function(t){var e={};e.log=Boolean(o.options[t.from])?o.LOG_DEBUG:0,o.options=G.extend(!0,{},o.options,e),delete o.options[t.from],o.log(o.LOG_WARNING,'Deprecated option "'+t.from+'". Update code to use:',e)}},{from:"mixWithCurrents",to:"preserveSelected"},{from:"placeHolderOption",to:{locale:{emptyTitle:"{{{value}}}"}}}];l.length&&G.map(l,function(t){if(o.options[t.from])if(G.isPlainObject(t.to))o.replaceValue(t.to,"{{{value}}}",o.options[t.from]),o.options=G.extend(!0,{},o.options,t.to),o.log(o.LOG_WARNING,'Deprecated option "'+t.from+'". Update code to use:',t.to),delete o.options[t.from];else if(G.isFunction(t.to))t.to.apply(o,[t]);else{var e={};e[t.to]=o.options[t.from],o.options=G.extend(!0,{},o.options,e),o.log(o.LOG_WARNING,'Deprecated option "'+t.from+'". Update code to use:',e),delete o.options[t.from]}});var n=this.$element.data();function a(t,e){return e.toLowerCase()}n.searchUrl&&(o.log(o.LOG_WARNING,'Deprecated attribute name: "data-search-url". Update markup to use: \' data-abs-ajax-url="'+n.searchUrl+"\" '"),this.options.ajax.url=n.searchUrl);var r=function(t,e,i){var s=[].concat(t),o=s.length,l=i||{};if(o){var n=s.shift();l[n]=r(s,e,l[n])}return o?l:e},p=Object.keys(n).filter(/./.test.bind(new RegExp("^abs[A-Z]")));if(p.length){var c={},h=["locale"];for(i=0,s=p.length;i"),l=G("").attr("label",this.plugin.t("currentlySelected"));for(this.plugin.log(this.plugin.LOG_DEBUG,"Building the select list options from data:",t),i=0;i").appendTo(n.preserved?l:o);if(n.hasOwnProperty("divider"))a.attr("data-divider","true");else for(e in a.val(n.value).text(n.text).attr("title",n.text),n.class.length&&a.attr("class",n.class),n.disabled&&a.attr("disabled",!0),n.selected&&!this.plugin.selectpicker.multiple&&o.find(":selected").prop("selected",!1),n.selected&&a.attr("selected",!0),n.data)n.data.hasOwnProperty(e)&&a.attr("data-"+e,n.data[e])}l.find("option").length&&l["before"===this.plugin.options.preserveSelectedPosition?"prependTo":"appendTo"](o);var r=o.html();return this.plugin.log(this.plugin.LOG_DEBUG,r),r},e.prototype.cacheGet=function(t,e){var i=this.cache[t]||e;return this.plugin.log(this.LOG_DEBUG,"Retrieving cache:",t,i),i},e.prototype.cacheSet=function(t,e){this.cache[t]=e,this.plugin.log(this.LOG_DEBUG,"Saving to cache:",t,e)},e.prototype.destroy=function(){this.replaceOptions(),this.plugin.list.setStatus(),this.plugin.log(this.plugin.LOG_DEBUG,"Destroyed select list.")},e.prototype.refresh=function(t){this.plugin.selectpicker.$menu.css("minHeight",0),this.plugin.selectpicker.$menu.find("> .inner").css("minHeight",0);var e=this.plugin.t("emptyTitle");!this.plugin.$element.find("option").length&&e&&e.length?this.setTitle(e):(this.title||"static"!==this.selectedTextFormat&&this.selectedTextFormat!==this.plugin.selectpicker.options.selectedTextFormat)&&this.restoreTitle(),this.plugin.selectpicker.refresh(),this.plugin.selectpicker.findLis(),t&&(this.plugin.log(this.plugin.LOG_DEBUG,"Triggering Change"),this.plugin.$element.trigger("change.$")),this.plugin.log(this.plugin.LOG_DEBUG,"Refreshed select list.")},e.prototype.replaceOptions=function(t){var e,i,s,o="",l=[],n=[],a=[];if(t=t||[],this.selected&&this.selected.length){for(this.plugin.log(this.plugin.LOG_INFO,"Processing preserved selections:",this.selected),i=(n=[].concat(this.selected,t)).length,e=0;e'}},G.fn.ajaxSelectPicker.locale["en-US"]={currentlySelected:"Currently Selected",emptyTitle:"Select and begin typing",errorText:"Unable to retrieve results",searchPlaceholder:"Search...",statusInitialized:"Start typing a search query",statusNoResults:"No Results",statusSearching:"Searching...",statusTooShort:"Please enter more characters"},G.fn.ajaxSelectPicker.locale.en=G.fn.ajaxSelectPicker.locale["en-US"]}(jQuery,window);