!function(n,t){void 0===n&&void 0!==window&&(n=window);"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(n)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(n.jQuery)}(this,function(n){!function(n){"use strict";function ei(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1===n.inArray(r,ii)||Boolean(t.nodeValue.match(ri)||t.nodeValue.match(ui));for(var f=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,e=f.length;u]+>/g,"")),r&&(u=ct(u)),u=u.toUpperCase(),s="function"==typeof i?i(u,t):"contains"===i?0<=u.indexOf(t):u.startsWith(t)))break;return s}function e(n){return parseInt(n,10)||0}function ci(n){return oi[n]}function ct(n){return(n=n.toString())&&n.replace(si,ci).replace(hi,"")}function li(n){return w[n]}function yt(){var t;try{t=n.fn.dropdown.Constructor.VERSION}catch(i){t=nt.VERSION}return t}function bt(n,t){n.length||(i.noResults.innerHTML=this.options.noneResultsText.replace("{0}",'"'+a(t)+'"'),this.$menuInner[0].firstChild.appendChild(i.noResults))}function kt(n){return!(n.hidden||this.options.hideDisabled&&n.disabled)}function dt(i){var s,c=arguments,r=i,e,o,l;if([].shift.apply(c),!u.success){try{u.full=(yt()||"").split(" ")[0].split(".")}catch(i){f.BootstrapVersion?u.full=f.BootstrapVersion.split(" ")[0].split("."):(u.full=[u.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",i))}u.major=u.full[0];u.success=!0}if("4"<=u.major)for(e=[],f.DEFAULTS.style===t.BUTTONCLASS&&e.push({name:"style",className:"BUTTONCLASS"}),f.DEFAULTS.iconBase===t.ICONBASE&&e.push({name:"iconBase",className:"ICONBASE"}),f.DEFAULTS.tickIcon===t.TICKICON&&e.push({name:"tickIcon",className:"TICKICON"}),t.DIVIDER="dropdown-divider",t.SHOW="show",t.BUTTONCLASS="btn-light",t.POPOVERHEADER="popover-header",t.ICONBASE="",t.TICKICON="bs-ok-default",o=0;o":">",'"':""","'":"'","`":"`"},b="(?:"+Object.keys(w).join("|")+")",lt=RegExp(b),at=RegExp(b,"g"),function(n){return n=null==n?"":""+n,lt.test(n)?n.replace(at,li):n});var ai={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},vt=27,vi=13,p=32,k=9,d=38,g=40,nt=window.Dropdown||bootstrap.Dropdown;u={success:!1,major:"3"};try{u.full=(yt()||"").split(" ")[0].split(".");u.major=u.full[0];u.success=!0}catch(e){}var pt=0,r=".bs.select",t={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},h={MENU:"."+t.MENU,DATA_TOGGLE:'data-toggle="dropdown"'},i={div:document.createElement("div"),span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment(),option:document.createElement("option")};i.selectedOption=i.option.cloneNode(!1);i.selectedOption.setAttribute("selected",!0);i.noResults=i.li.cloneNode(!1);i.noResults.className="no-results";i.a.setAttribute("role","option");i.a.className="dropdown-item";i.subtext.className="text-muted";i.text=i.span.cloneNode(!1);i.text.className="text";i.checkMark=i.span.cloneNode(!1);var yi=new RegExp(d+"|"+g),pi=new RegExp("^"+k+"$|"+vt),o={li:function(n,t,r){var u=i.li.cloneNode(!1);return n&&(1===n.nodeType||11===n.nodeType?u.appendChild(n):u.innerHTML=n),void 0!==t&&""!==t&&(u.className=t),null!=r&&u.classList.add("optgroup-"+r),u},a:function(n,t,r){var u=i.a.cloneNode(!0);return n&&(11===n.nodeType?u.appendChild(n):u.insertAdjacentHTML("beforeend",n)),void 0!==t&&""!==t&&u.classList.add.apply(u.classList,t.split(/\s+/)),r&&u.setAttribute("style",r),u},text:function(n,t){var u,f,r=i.text.cloneNode(!1),e;if(n.content?r.innerHTML=n.content:((r.textContent=n.text,n.icon)&&(e=i.whitespace.cloneNode(!1),(f=(!0===t?i.i:i.span).cloneNode(!1)).className=this.options.iconBase+" "+n.icon,i.fragment.appendChild(f),i.fragment.appendChild(e)),n.subtext&&((u=i.subtext.cloneNode(!1)).textContent=n.subtext,r.appendChild(u))),!0===t)for(;0<\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};f.prototype={constructor:f,init:function(){var i=this,o=this.$element.attr("id"),f=this.$element[0],e=f.form;pt++;this.selectId="bs-select-"+pt;f.classList.add("bs-select-hidden");this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");f.classList.contains("show-tick")&&(this.options.showTick=!0);this.$newElement=this.createDropdown();this.$element.after(this.$newElement).prependTo(this.$newElement);e&&null===f.form&&(e.id||(e.id="form-"+this.selectId),f.setAttribute("form",e.id));this.$button=this.$newElement.children("button");this.options.allowClear&&(this.$clearButton=this.$button.children(".bs-select-clear-selected"));this.$menu=this.$newElement.children(h.MENU);this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");f.classList.remove("bs-select-hidden");this.fetchData(function(){i.render(!0);i.buildList();requestAnimationFrame(function(){i.$element.trigger("loaded"+r)})});this.fetchData(function(){i.render(!0);i.buildList();requestAnimationFrame(function(){i.$element.trigger("loaded"+r)})});!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(t.MENURIGHT);void 0!==o&&this.$button.attr("data-id",o);this.checkDisabled();this.clickListener();4