/*! * bootstrap-select v1.13.14 (https://developer.snapappointments.com/bootstrap-select) * * copyright 2012-2020 snapappointments, llc * licensed under mit (https://github.com/snapappointments/bootstrap-select/blob/master/license) */ !function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jquery)}(this,function(e){!function(z){"use strict";var d=["sanitize","whitelist","sanitizefn"],r=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["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:[]},l=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,a=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function v(e,t){var i=e.nodename.tolowercase();if(-1!==z.inarray(i,t))return-1===z.inarray(i,r)||boolean(e.nodevalue.match(l)||e.nodevalue.match(a));for(var s=z(t).filter(function(e,t){return t instanceof regexp}),n=0,o=s.length;n]+>/g,"")),s&&(a=w(a)),a=a.touppercase(),o="contains"===i?0<=a.indexof(t):a.startswith(t)))break}return o}function l(e){return parseint(e,10)||0}z.fn.triggernative=function(e){var t,i=this[0];i.dispatchevent?(u?t=new event(e,{bubbles:!0}):(t=document.createevent("event")).initevent(e,!0,!1),i.dispatchevent(t)):i.fireevent?((t=document.createeventobject()).eventtype=e,i.fireevent("on"+e,t)):this.trigger(e)};var f={"\xc0":"a","\xc1":"a","\xc2":"a","\xc3":"a","\xc4":"a","\xc5":"a","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"c","\xe7":"c","\xd0":"d","\xf0":"d","\xc8":"e","\xc9":"e","\xca":"e","\xcb":"e","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"i","\xcd":"i","\xce":"i","\xcf":"i","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"n","\xf1":"n","\xd2":"o","\xd3":"o","\xd4":"o","\xd5":"o","\xd6":"o","\xd8":"o","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"u","\xda":"u","\xdb":"u","\xdc":"u","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"y","\xfd":"y","\xff":"y","\xc6":"ae","\xe6":"ae","\xde":"th","\xfe":"th","\xdf":"ss","\u0100":"a","\u0102":"a","\u0104":"a","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"c","\u0108":"c","\u010a":"c","\u010c":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"d","\u0110":"d","\u010f":"d","\u0111":"d","\u0112":"e","\u0114":"e","\u0116":"e","\u0118":"e","\u011a":"e","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"g","\u011e":"g","\u0120":"g","\u0122":"g","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"h","\u0126":"h","\u0125":"h","\u0127":"h","\u0128":"i","\u012a":"i","\u012c":"i","\u012e":"i","\u0130":"i","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"j","\u0135":"j","\u0136":"k","\u0137":"k","\u0138":"k","\u0139":"l","\u013b":"l","\u013d":"l","\u013f":"l","\u0141":"l","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"n","\u0145":"n","\u0147":"n","\u014a":"n","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"o","\u014e":"o","\u0150":"o","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"r","\u0156":"r","\u0158":"r","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"s","\u015c":"s","\u015e":"s","\u0160":"s","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"t","\u0164":"t","\u0166":"t","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"u","\u016a":"u","\u016c":"u","\u016e":"u","\u0170":"u","\u0172":"u","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"w","\u0175":"w","\u0176":"y","\u0177":"y","\u0178":"y","\u0179":"z","\u017b":"z","\u017d":"z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"ij","\u0133":"ij","\u0152":"oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g=regexp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function b(e){return f[e]}function w(e){return(e=e.tostring())&&e.replace(m,b).replace(g,"")}var i,x,y,$,s=(i={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},x="(?:"+object.keys(i).join("|")+")",y=regexp(x),$=regexp(x,"g"),function(e){return e=null==e?"":""+e,y.test(e)?e.replace($,e):e});function e(e){return i[e]}var c={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"},n=27,d=13,h=32,w=9,b=38,m=40,r={success:!1,major:"3"};try{r.full=(z.fn.dropdown.constructor.version||"").split(" ")[0].split("."),r.major=r.full[0],r.success=!0}catch(e){}var u=0,j=".bs.select",v={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"},f={menu:"."+v.menu},_={span:document.createelement("span"),i:document.createelement("i"),subtext:document.createelement("small"),a:document.createelement("a"),li:document.createelement("li"),whitespace:document.createtextnode("\xa0"),fragment:document.createdocumentfragment()};_.a.setattribute("role","option"),"4"===r.major&&(_.a.classname="dropdown-item"),_.subtext.classname="text-muted",_.text=_.span.clonenode(!1),_.text.classname="text",_.checkmark=_.span.clonenode(!1);var g=new regexp(b+"|"+m),q=new regexp("^"+w+"$|"+n),k={li:function(e,t,i){var s=_.li.clonenode(!1);return e&&(1===e.nodetype||11===e.nodetype?s.appendchild(e):s.innerhtml=e),void 0!==t&&""!==t&&(s.classname=t),null!=i&&s.classlist.add("optgroup-"+i),s},a:function(e,t,i){var s=_.a.clonenode(!0);return e&&(11===e.nodetype?s.appendchild(e):s.insertadjacenthtml("beforeend",e)),void 0!==t&&""!==t&&s.classlist.add.apply(s.classlist,t.split(" ")),i&&s.setattribute("style",i),s},text:function(e,t){var i,s,n=_.text.clonenode(!1);if(e.content)n.innerhtml=e.content;else{if(n.textcontent=e.text,e.icon){var o=_.whitespace.clonenode(!1);(s=(!0===t?_.i:_.span).clonenode(!1)).classname=this.options.iconbase+" "+e.icon,_.fragment.appendchild(s),_.fragment.appendchild(o)}e.subtext&&((i=_.subtext.clonenode(!1)).textcontent=e.subtext,n.appendchild(i))}if(!0===t)for(;0'},maxoptions:!1,mobile:!1,selectontab:!1,dropdownalignright:!1,windowpadding:0,virtualscroll:600,display:!1,sanitize:!0,sanitizefn:null,whitelist:e},y.prototype={constructor:y,init:function(){var i=this,e=this.$element.attr("id");u++,this.selectid="bs-select-"+u,this.$element[0].classlist.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$element[0].classlist.contains("show-tick")&&(this.options.showtick=!0),this.$newelement=this.createdropdown(),this.builddata(),this.$element.after(this.$newelement).prependto(this.$newelement),this.$button=this.$newelement.children("button"),this.$menu=this.$newelement.children(f.menu),this.$menuinner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classlist.remove("bs-select-hidden"),!0===this.options.dropdownalignright&&this.$menu[0].classlist.add(v.menuright),void 0!==e&&this.$button.attr("data-id",e),this.checkdisabled(),this.clicklistener(),this.options.livesearch?(this.livesearchlistener(),this.focusedparent=this.$searchbox[0]):this.focusedparent=this.$menuinner[0],this.setstyle(),this.render(),this.setwidth(),this.options.container?this.selectposition():this.$element.on("hide"+j,function(){if(i.isvirtual()){var e=i.$menuinner[0],t=e.firstchild.clonenode(!1);e.replacechild(t,e.firstchild),e.scrolltop=0}}),this.$menu.data("this",this),this.$newelement.data("this",this),this.options.mobile&&this.mobile(),this.$newelement.on({"hide.bs.dropdown":function(e){i.$element.trigger("hide"+j,e)},"hidden.bs.dropdown":function(e){i.$element.trigger("hidden"+j,e)},"show.bs.dropdown":function(e){i.$element.trigger("show"+j,e)},"shown.bs.dropdown":function(e){i.$element.trigger("shown"+j,e)}}),i.$element[0].hasattribute("required")&&this.$element.on("invalid"+j,function(){i.$button[0].classlist.add("bs-invalid"),i.$element.on("shown"+j+".invalid",function(){i.$element.val(i.$element.val()).off("shown"+j+".invalid")}).on("rendered"+j,function(){this.validity.valid&&i.$button[0].classlist.remove("bs-invalid"),i.$element.off("rendered"+j)}),i.$button.on("blur"+j,function(){i.$element.trigger("focus").trigger("blur"),i.$button.off("blur"+j)})}),settimeout(function(){i.buildlist(),i.$element.trigger("loaded"+j)})},createdropdown:function(){var e=this.multiple||this.options.showtick?" show-tick":"",t=this.multiple?' aria-multiselectable="true"':"",i="",s=this.autofocus?" autofocus":"";r.major<4&&this.$element.parent().hasclass("input-group")&&(i=" input-group-btn");var n,o="",r="",l="",a="";return this.options.header&&(o='
'+this.options.header+"
"),this.options.livesearch&&(r=''),this.multiple&&this.options.actionsbox&&(l='
"),this.multiple&&this.options.donebutton&&(a='
"),n='",z(n)},setpositiondata:function(){this.selectpicker.view.canhighlight=[];for(var e=this.selectpicker.view.size=0;e=this.options.virtualscroll||!0===this.options.virtualscroll},createview:function(a,e,t){var l,n,d=this,i=0,h=[];if(this.selectpicker.issearching=a,this.selectpicker.current=a?this.selectpicker.search:this.selectpicker.main,this.setpositiondata(),e)if(t)i=this.$menuinner[0].scrolltop;else if(!d.multiple){var s=d.$element[0],n=(s.options[s.selectedindex]||{}).liindex;if("number"==typeof n&&!1!==d.options.size){var o=d.selectpicker.main.data[n],r=o&&o.position;r&&(i=r-(d.sizeinfo.menuinnerheight+d.sizeinfo.liheight)/2)}}function l(e,t){var i,s,n,o,r,l,a,c,d=d.selectpicker.current.elements.length,h=[],p=!0,u=d.isvirtual();d.selectpicker.view.scrolltop=e,i=math.ceil(d.sizeinfo.menuinnerheight/d.sizeinfo.liheight*1.5),s=math.round(d/i)||1;for(var f=0;fd-1?0:d.selectpicker.current.data[d-1].position-d.selectpicker.current.data[d.selectpicker.view.position1-1].position,b.firstchild.style.margintop=v+"px",b.firstchild.style.marginbottom=g+"px"):(b.firstchild.style.margintop=0,b.firstchild.style.marginbottom=0),b.firstchild.appendchild(w),!0===u&&d.sizeinfo.hasscrollbar){var c=b.firstchild.offsetwidth;if(t&&cd.sizeinfo.selectwidth)b.firstchild.style.minwidth=d.sizeinfo.menuinnerinnerwidth+"px";else if(c>d.sizeinfo.menuinnerinnerwidth){d.$menu[0].style.minwidth=0;var o=b.firstchild.offsetwidth;o>d.sizeinfo.menuinnerinnerwidth&&(d.sizeinfo.menuinnerinnerwidth=o,b.firstchild.style.minwidth=d.sizeinfo.menuinnerinnerwidth+"px"),d.$menu[0].style.minwidth=""}}}if(d.prevactiveindex=d.activeindex,d.options.livesearch){if(a&&t){var z,t=0;d.selectpicker.view.canhighlight[t]||(t=1+d.selectpicker.view.canhighlight.slice(1).indexof(!0)),z=d.selectpicker.view.visibleelements[t],d.defocusitem(d.selectpicker.view.currentactive),d.activeindex=(d.selectpicker.current.data[t]||{}).index,d.focusitem(z)}}else d.$menuinner.trigger("focus")}l(i,!0),this.$menuinner.off("scroll.createview").on("scroll.createview",function(e,t){d.noscroll||l(this.scrolltop,t),d.noscroll=!1}),z(window).off("resize"+j+"."+this.selectid+".createview").on("resize"+j+"."+this.selectid+".createview",function(){d.$newelement.hasclass(v.show)&&l(d.$menuinner[0].scrolltop)})},focusitem:function(e,t,i){if(e){t=t||this.selectpicker.main.data[this.activeindex];var s=e.firstchild;s&&(s.setattribute("aria-setsize",this.selectpicker.view.size),s.setattribute("aria-posinset",t.posinset),!0!==i&&(this.focusedparent.setattribute("aria-activedescendant",s.id),e.classlist.add("active"),s.classlist.add("active")))}},defocusitem:function(e){e&&(e.classlist.remove("active"),e.firstchild&&e.firstchild.classlist.remove("active"))},setplaceholder:function(){var e=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleoption||(this.selectpicker.view.titleoption=document.createelement("option")),e=!0;var t=this.$element[0],i=!1,s=!this.selectpicker.view.titleoption.parentnode;if(s)this.selectpicker.view.titleoption.classname="bs-title-option",this.selectpicker.view.titleoption.value="",i=void 0===z(t.options[t.selectedindex]).attr("selected")&&void 0===this.$element.data("selected");!s&&0===this.selectpicker.view.titleoption.index||t.insertbefore(this.selectpicker.view.titleoption,t.firstchild),i&&(t.selectedindex=0)}return e},builddata:function(){var p=':not([hidden]):not([data-hidden="true"])',u=[],f=0,e=this.setplaceholder()?1:0;this.options.hidedisabled&&(p+=":not(:disabled)");var t=this.$element[0].queryselectorall("select > *"+p);function m(e){var t=u[u.length-1];t&&"divider"===t.type&&(t.optid||e.optid)||((e=e||{}).type="divider",u.push(e))}function v(e,t){if((t=t||{}).divider="true"===e.getattribute("data-divider"),t.divider)m({optid:t.optid});else{var i=u.length,s=e.style.csstext,n=s?s(s):"",o=(e.classname||"")+(t.optgroupclass||"");t.optid&&(o="opt "+o),t.optionclass=o.trim(),t.inlinestyle=n,t.text=e.textcontent,t.content=e.getattribute("data-content"),t.tokens=e.getattribute("data-tokens"),t.subtext=e.getattribute("data-subtext"),t.icon=e.getattribute("data-icon"),e.liindex=i,t.display=t.content||t.text,t.type="option",t.index=i,t.option=e,t.selected=!!e.selected,t.disabled=t.disabled||!!e.disabled,u.push(t)}}function i(e,t){var i=t[e],s=t[e-1],n=t[e+1],o=i.queryselectorall("option"+p);if(o.length){var r,l,a={display:s(i.label),subtext:i.getattribute("data-subtext"),icon:i.getattribute("data-icon"),type:"optgroup-label",optgroupclass:" "+(i.classname||"")};f++,s&&m({optid:f}),a.optid=f,u.push(a);for(var c=0,d=o.length;c li")},render:function(){var e,t=this,i=this.$element[0],s=this.setplaceholder()&&0===i.selectedindex,n=o(i,this.options.hidedisabled),o=n.length,r=this.$button[0],l=r.queryselector(".filter-option-inner-inner"),a=document.createtextnode(this.options.multipleseparator),c=_.fragment.clonenode(!1),d=!1;if(r.classlist.toggle("bs-placeholder",t.multiple?!o:!t(i,n)),this.tabindex(),"static"===this.options.selectedtextformat)c=k.text.call(this,{text:this.options.title},!0);else if(!1===(this.multiple&&-1!==this.options.selectedtextformat.indexof("count")&&1")).length&&o>e[1]||1===e.length&&2<=o))){if(!s){for(var h=0;h option"+m+", optgroup"+m+" option"+m).length,g="function"==typeof this.options.countselectedtext?this.options.countselectedtext(o,v):this.options.countselectedtext;c=k.text.call(this,{text:g.replace("{0}",o.tostring()).replace("{1}",v.tostring())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),c.childnodes.length||(c=k.text.call(this,{text:void 0!==this.options.title?this.options.title:this.options.noneselectedtext},!0)),r.title=c.textcontent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&d&&p([c],t.options.whitelist,t.options.sanitizefn),l.innerhtml="",l.appendchild(c),r.major<4&&this.$newelement[0].classlist.contains("bs3-has-addon")){var b=r.queryselector(".filter-expand"),w=l.clonenode(!0);w.classname="filter-expand",b?r.replacechild(w,b):r.appendchild(w)}this.$element.trigger("rendered"+j)},setstyle:function(e,t){var i,s=this.$button[0],n=this.$newelement[0],o=this.options.style.trim();this.$element.attr("class")&&this.$newelement.addclass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),r.major<4&&(n.classlist.add("bs3"),n.parentnode.classlist.contains("input-group")&&(n.previouselementsibling||n.nextelementsibling)&&(n.previouselementsibling||n.nextelementsibling).classlist.contains("input-group-addon")&&n.classlist.add("bs3-has-addon")),i=e?e.trim():o,"add"==t?i&&s.classlist.add.apply(s.classlist,i.split(" ")):"remove"==t?i&&s.classlist.remove.apply(s.classlist,i.split(" ")):(o&&s.classlist.remove.apply(s.classlist,o.split(" ")),i&&s.classlist.add.apply(s.classlist,i.split(" ")))},liheight:function(e){if(e||!1!==this.options.size&&!object.keys(this.sizeinfo).length){var t=document.createelement("div"),i=document.createelement("div"),s=document.createelement("div"),n=document.createelement("ul"),o=document.createelement("li"),r=document.createelement("li"),l=document.createelement("li"),a=document.createelement("a"),c=document.createelement("span"),d=this.options.header&&0this.sizeinfo.menuextras.vert&&l+this.sizeinfo.menuextras.vert+50>this.sizeinfo.selectoffsetbot,!0===this.selectpicker.issearching&&(a=this.selectpicker.dropup),this.$newelement.toggleclass(v.dropup,a),this.selectpicker.dropup=a),"auto"===this.options.size)n=3this.options.size){for(var b=0;bthis.sizeinfo.menuinnerheight&&(this.sizeinfo.hasscrollbar=!0,this.sizeinfo.totalmenuwidth=this.sizeinfo.menuwidth+this.sizeinfo.scrollbarwidth),"auto"===this.options.dropdownalignright&&this.$menu.toggleclass(v.menuright,this.sizeinfo.selectoffsetleft>this.sizeinfo.selectoffsetright&&this.sizeinfo.selectoffsetrightthis.options.size&&i.off("resize"+j+"."+this.selectid+".setmenusize scroll"+j+"."+this.selectid+".setmenusize")}this.createview(!1,!0,e)},setwidth:function(){var i=this;"auto"===this.options.width?requestanimationframe(function(){i.$menu.css("min-width","0"),i.$element.on("loaded"+j,function(){i.liheight(),i.setmenusize();var e=i.$newelement.clone().appendto("body"),t=e.css("width","auto").children("button").outerwidth();e.remove(),i.sizeinfo.selectwidth=math.max(i.sizeinfo.totalmenuwidth,t),i.$newelement.css("width",i.sizeinfo.selectwidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newelement.css("width","").addclass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newelement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newelement.css("width","")),this.$newelement.hasclass("fit-width")&&"fit"!==this.options.width&&this.$newelement[0].classlist.remove("fit-width")},selectposition:function(){this.$bscontainer=z('
');function e(e){var t={},i=r.options.display||!!z.fn.dropdown.constructor.default&&z.fn.dropdown.constructor.default.display;r.$bscontainer.addclass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleclass(v.dropup,e.hasclass(v.dropup)),s=e.offset(),l.is("body")?n={top:0,left:0}:((n=l.offset()).top+=parseint(l.css("bordertopwidth"))-l.scrolltop(),n.left+=parseint(l.css("borderleftwidth"))-l.scrollleft()),o=e.hasclass(v.dropup)?0:e[0].offsetheight,(r.major<4||"static"===i)&&(t.top=s.top-n.top+o,t.left=s.left-n.left),t.width=e[0].offsetwidth,r.$bscontainer.css(t)}var s,n,o,r=this,l=z(this.options.container);this.$button.on("click.bs.dropdown.data-api",function(){r.isdisabled()||(e(r.$newelement),r.$bscontainer.appendto(r.options.container).toggleclass(v.show,!r.$button.hasclass(v.show)).append(r.$menu))}),z(window).off("resize"+j+"."+this.selectid+" scroll"+j+"."+this.selectid).on("resize"+j+"."+this.selectid+" scroll"+j+"."+this.selectid,function(){r.$newelement.hasclass(v.show)&&e(r.$newelement)}),this.$element.on("hide"+j,function(){r.$menu.data("height",r.$menu.height()),r.$bscontainer.detach()})},setoptionstatus:function(e){var t=this;if(t.noscroll=!1,t.selectpicker.view.visibleelements&&t.selectpicker.view.visibleelements.length)for(var i=0;i
');y[2]&&($=$.replace("{var}",y[2][1"+$+"")),d=!1,c.$element.trigger("maxreached"+j)),g&&w&&(e.append(z("
"+s+"
")),d=!1,c.$element.trigger("maxreachedgrp"+j)),settimeout(function(){c.setselected(r,!1)},10),e[0].classlist.add("fadeout"),settimeout(function(){e.remove()},1050)}}}else c&&(c.selected=!1),h.selected=!0,c.setselected(r,!0);!c.multiple||c.multiple&&1===c.options.maxoptions?c.$button.trigger("focus"):c.options.livesearch&&c.$searchbox.trigger("focus"),d&&(!c.multiple&&a===s.selectedindex||(a=[h.index,p.prop("selected"),l],c.$element.triggernative("change")))}}),this.$menu.on("click","li."+v.disabled+" a, ."+v.popoverheader+", ."+v.popoverheader+" :not(.close)",function(e){e.currenttarget==this&&(e.preventdefault(),e.stoppropagation(),c.options.livesearch&&!z(e.target).hasclass("close")?c.$searchbox.trigger("focus"):c.$button.trigger("focus"))}),this.$menuinner.on("click",".divider, .dropdown-header",function(e){e.preventdefault(),e.stoppropagation(),c.options.livesearch?c.$searchbox.trigger("focus"):c.$button.trigger("focus")}),this.$menu.on("click","."+v.popoverheader+" .close",function(){c.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stoppropagation()}),this.$menu.on("click",".actions-btn",function(e){c.options.livesearch?c.$searchbox.trigger("focus"):c.$button.trigger("focus"),e.preventdefault(),e.stoppropagation(),z(this).hasclass("bs-select-all")?c.selectall():c.deselectall()}),this.$element.on("change"+j,function(){c.render(),c.$element.trigger("changed"+j,a),a=null}).on("focus"+j,function(){c.options.mobile||c.$button.trigger("focus")})},livesearchlistener:function(){var u=this,f=document.createelement("li");this.$button.on("click.bs.dropdown.data-api",function(){u.$searchbox.val()&&u.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stoppropagation()}),this.$searchbox.on("input propertychange",function(){var e=u.$searchbox.val();if(u.selectpicker.search.elements=[],u.selectpicker.search.data=[],e){var t=[],i=e.touppercase(),s={},n=[],o=u._searchstyle(),r=u.options.livesearchnormalize;r&&(i=w(i));for(var l=0;l=a.selectpicker.view.canhighlight.length&&(t=0),a.selectpicker.view.canhighlight[t+f]||(t=t+1+a.selectpicker.view.canhighlight.slice(t+f+1).indexof(!0))),e.preventdefault();var m=f+t;e.which===b?0===f&&t===c.length-1?(a.$menuinner[0].scrolltop=a.$menuinner[0].scrollheight,m=a.selectpicker.current.elements.length-1):d=(o=(n=a.selectpicker.current.data[m]).position-n.height)u+a.sizeinfo.menuinnerheight),s=a.selectpicker.main.elements[v],a.activeindex=b[x],a.focusitem(s),s&&s.firstchild.focus(),d&&(a.$menuinner[0].scrolltop=o),r.trigger("focus")}}i&&(e.which===h&&!a.selectpicker.keydown.keyhistory||e.which===d||e.which===w&&a.options.selectontab)&&(e.which!==h&&e.preventdefault(),a.options.livesearch&&e.which===h||(a.$menuinner.find(".active a").trigger("click",!0),r.trigger("focus"),a.options.livesearch||(e.preventdefault(),z(document).data("spaceselect",!0))))}},mobile:function(){this.$element[0].classlist.add("mobile-device")},refresh:function(){var e=z.extend({},this.options,this.$element.data());this.options=e,this.checkdisabled(),this.setstyle(),this.render(),this.builddata(),this.buildlist(),this.setwidth(),this.setsize(!0),this.$element.trigger("refreshed"+j)},hide:function(){this.$newelement.hide()},show:function(){this.$newelement.show()},remove:function(){this.$newelement.remove(),this.$element.remove()},destroy:function(){this.$newelement.before(this.$element).remove(),this.$bscontainer?this.$bscontainer.remove():this.$menu.remove(),this.$element.off(j).removedata("selectpicker").removeclass("bs-select-hidden selectpicker"),z(window).off(j+"."+this.selectid)}};var j=z.fn.selectpicker;z.fn.selectpicker=z,z.fn.selectpicker.constructor=y,z.fn.selectpicker.noconflict=function(){return z.fn.selectpicker=j,this};var q=z.fn.dropdown.constructor._dataapikeydownhandler||z.fn.dropdown.constructor.prototype.keydown;z(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",':not(.bootstrap-select) > [data-toggle="dropdown"]',q).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",q).on("keydown"+j,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',y.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stoppropagation()}),z(window).on("load"+j+".data-api",function(){z(".selectpicker").each(function(){var e=z(this);z.call(e,e.data())})})}(e)}); //# sourcemappingurl=bootstrap-select.min.js.map