if(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){function i(i,r,u){var r={content:{message:typeof r=="object"?r.message:r,title:r.title?r.title:"",icon:r.icon?r.icon:"",url:r.url?r.url:"#",target:r.target?r.target:"-"}};u=n.extend(!0,{},r,u);this.settings=n.extend(!0,{},t,u);this._defaults=t;this.settings.content.target=="-"&&(this.settings.content.target=this.settings.url_target);this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"};typeof this.settings.offset=="number"&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset});this.init()}var t={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:2031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-11 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;<\/button><span data-notify="icon"><\/span> <span data-notify="title">{1}<\/span> <span data-notify="message">{2}<\/span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"><\/div><\/div><a href="{3}" target="{4}" data-notify="url"><\/a><\/div>'};String.format=function(){for(var t=arguments[0],n=1;n<arguments.length;n++)t=t.replace(RegExp("\\{"+(n-1)+"\\}","gm"),arguments[n]);return t};n.extend(i.prototype,{init:function(){var n=this;this.buildNotify();this.settings.content.icon&&this.setIcon();this.settings.content.url!="#"&&this.styleURL();this.styleDismiss();this.placement();this.bind();this.notify={$ele:this.$ele,update:function(t,i){var r={},t,u,f,e;typeof t=="string"?r[t]=i:r=t;for(t in r)switch(t){case"type":this.$ele.removeClass("alert-"+n.settings.type);this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+n.settings.type);n.settings.type=r[t];this.$ele.addClass("alert-"+r[t]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+r[t]);break;case"icon":u=this.$ele.find('[data-notify="icon"]');n.settings.icon_type.toLowerCase()=="class"?u.removeClass(n.settings.content.icon).addClass(r[t]):(u.is("img")||u.find("img"),u.attr("src",r[t]));break;case"progress":f=n.settings.delay-n.settings.delay*(r[t]/100);this.$ele.data("notify-delay",f);this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",r[t]).css("width",r[t]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",r[t]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",r[t]);break;default:this.$ele.find('[data-notify="'+t+'"]').html(r[t])}e=this.$ele.outerHeight()+parseInt(n.settings.spacing)+parseInt(n.settings.offset.y);n.reposition(e)},close:function(){n.close()}}},buildNotify:function(){var t=this.settings.content;this.$ele=n(String.format(this.settings.template,this.settings.type,t.title,t.message,t.url,t.target));this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align);this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none");(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){this.settings.icon_type.toLowerCase()=="class"?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1})},placement:function(){var t=this,i=this.settings.offset.y,r={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:this.settings.element==="body"?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},u=!1,f=this.settings;n('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return i=Math.max(i,parseInt(n(this).css(f.placement.from))+parseInt(n(this).outerHeight())+parseInt(f.spacing))});this.settings.newest_on_top==!0&&(i=this.settings.offset.y);r[this.settings.placement.from]=i+"px";switch(this.settings.placement.align){case"left":case"right":r[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":r.left=0;r.right=0}this.$ele.css(r).addClass(this.settings.animate.enter);n.each(Array("webkit-","moz-","o-","ms-",""),function(n,i){t.$ele[0].style[i+"AnimationIterationCount"]=1});n(this.settings.element).append(this.$ele);this.settings.newest_on_top==!0&&(i=parseInt(i)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(i));n.isFunction(t.settings.onShow)&&t.settings.onShow.call(this.$ele);this.$ele.one(this.animations.start,function(){u=!0}).one(this.animations.end,function(){n.isFunction(t.settings.onShown)&&t.settings.onShown.call(this)});setTimeout(function(){u||n.isFunction(t.settings.onShown)&&t.settings.onShown.call(this)},600)},bind:function(){var t=this,i;this.$ele.find('[data-notify="dismiss"]').on("click",function(){t.close()});this.$ele.mouseover(function(){n(this).data("data-hover","true")}).mouseout(function(){n(this).data("data-hover","false")});this.$ele.data("data-hover","false");this.settings.delay>0&&(t.$ele.data("notify-delay",t.settings.delay),i=setInterval(function(){var n=parseInt(t.$ele.data("notify-delay"))-t.settings.timer,r;(t.$ele.data("data-hover")==="false"&&t.settings.mouse_over=="pause"||t.settings.mouse_over!="pause")&&(r=(t.settings.delay-n)/t.settings.delay*100,t.$ele.data("notify-delay",n),t.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",r).css("width",r+"%"));n<=-t.settings.timer&&(clearInterval(i),t.close())},t.settings.timer))},close:function(){var t=this,r=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit);t.reposition(r);n.isFunction(t.settings.onClose)&&t.settings.onClose.call(this.$ele);this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){n(this).remove();n.isFunction(t.settings.onClosed)&&t.settings.onClosed.call(this)});setTimeout(function(){if(!i&&(t.$ele.remove(),t.settings.onClosed))t.settings.onClosed(t.$ele)},600)},reposition:function(t){var i=this,r='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',u=this.$ele.nextAll(r);this.settings.newest_on_top==!0&&(u=this.$ele.prevAll(r));u.each(function(){n(this).css(i.settings.placement.from,t);t=parseInt(t)+parseInt(i.settings.spacing)+n(this).outerHeight()})}});n.notify=function(n,t){var r=new i(this,n,t);return r.notify};n.notifyDefaults=function(i){return t=n.extend(!0,{},t,i)};n.notifyClose=function(t){typeof t=="undefined"||t=="all"?n("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):n('[data-notify-position="'+t+'"]').find('[data-notify="dismiss"]').trigger("click")}}),!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 v(n){var i,r=[],u=n&&n.options,t,f;if(n.multiple)for(t=0,f=u.length;t<f;t++)(i=u[t]).selected&&r.push(i.value||i.text);else r=n.value;return r}function g(n,t,i,r){for(var e,u,o=["content","subtext","tokens"],s=!1,f=0;f<o.length;f++)if(e=o[f],u=n[e],u&&(u=u.toString(),"content"===e&&(u=u.replace(/<[^>]+>/g,"")),r&&(u=nt(u)),u=u.toUpperCase(),s="contains"===i?0<=u.indexOf(t):u.startsWith(t)))break;return s}function f(n){return parseInt(n,10)||0}function ht(n){return et[n]}function nt(n){return(n=n.toString())&&n.replace(ot,ht).replace(st,"")}function ut(i){var e,o=arguments,f=i,s;if([].shift.apply(o),!u.success){try{u.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(i){u.full=r.BootstrapVersion.split(" ")[0].split(".")}u.major=u.full[0];u.success=!0;"4"===u.major&&(t.DIVIDER="dropdown-divider",t.SHOW="show",t.BUTTONCLASS="btn-light",r.DEFAULTS.style=t.BUTTONCLASS="btn-light",t.POPOVERHEADER="popover-header")}return s=this.each(function(){var u=n(this),t,i,s,h;if(u.is("select")){if(t=u.data("selectpicker"),i="object"==typeof f&&f,t){if(i)for(s in i)i.hasOwnProperty(s)&&(t.options[s]=i[s])}else h=n.extend({},r.DEFAULTS,n.fn.selectpicker.defaults||{},u.data(),i),h.template=n.extend({},r.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},u.data().template,i.template),u.data("selectpicker",t=new r(this,h));"string"==typeof f&&(e=t[f]instanceof Function?t[f].apply(t,o):t.options[f])}}),void 0!==e?e:s}var s,b,a,h,k,e,o,d,ft;"classList"in document.createElement("_")||function(t){var r;if("Element"in t){var u="classList",e="prototype",f=t.Element[e],i=Object,o=function(){var t=n(this);return{add:function(n){return t.addClass(n)},remove:function(n){return t.removeClass(n)},toggle:function(n,i){return t.toggleClass(n,i)},contains:function(n){return t.hasClass(n)}}};if(i.defineProperty){r={get:o,enumerable:!0,configurable:!0};try{i.defineProperty(f,u,r)}catch(t){void 0!==t.number&&-2146823252!==t.number||(r.enumerable=!1,i.defineProperty(f,u,r))}}else i[e].__defineGetter__&&f.__defineGetter__(u,o)}}(window);h=document.createElement("_");(h.classList.toggle("c3",!1),h.classList.contains("c3"))&&(k=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(n,t){return 1 in arguments&&!this.contains(n)==!t?t:k.call(this,n)});h=null;String.prototype.startsWith||(s=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),b={}.toString,a=function(n){var r,u,i;if(null==this)throw new TypeError;if(r=String(this),n&&"[object RegExp]"==b.call(n))throw new TypeError;var f=r.length,e=String(n),o=e.length,s=1<arguments.length?arguments[1]:void 0,t=s?Number(s):0;if(t!=t&&(t=0),u=Math.min(Math.max(t,0),f),f<o+u)return!1;for(i=-1;++i<o;)if(r.charCodeAt(u+i)!=e.charCodeAt(i))return!1;return!0},s?s(String.prototype,"startsWith",{value:a,configurable:!0,writable:!0}):String.prototype.startsWith=a);Object.keys||(Object.keys=function(n,t,i){for(t in i=[],n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});e={useDefault:!1,_set:n.valHooks.select.set};n.valHooks.select.set=function(t,i){return i&&!e.useDefault&&n(t).data("selected",!0),e._set.apply(this,arguments)};o=null;d=function(){try{return new Event("change"),!0}catch(n){return!1}}();n.fn.triggerNative=function(n){var t,i=this[0];i.dispatchEvent?(d?t=new Event(n,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(n,!0,!1),i.dispatchEvent(t)):i.fireEvent?((t=document.createEventObject()).eventType=n,i.fireEvent("on"+n,t)):this.trigger(n)};var et={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,st=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");var tt=function(n){var i=function(t){return n[t]},t="(?:"+Object.keys(n).join("|")+")",r=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,r.test(n)?n.replace(u,i):n}},c=tt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}),ct=tt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"}),lt={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"},it=27,at=13,l=32,y=9,p=38,w=40,u={success:!1,major:"3"};try{u.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".");u.major=u.full[0];u.success=!0}catch(s){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.",s)}var vt=0,i=".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"},rt={MENU:"."+t.MENU};"4"===u.major&&(t.DIVIDER="dropdown-divider",t.SHOW="show",t.BUTTONCLASS="btn-light",t.POPOVERHEADER="popover-header");var yt=new RegExp(p+"|"+w),pt=new RegExp("^"+y+"$|"+it),r=function(t,i){var f=this,u;e.useDefault||(n.valHooks.select.set=e._set,e.useDefault=!0);this.$element=n(t);this.$newElement=null;this.$button=null;this.$menu=null;this.options=i;this.selectpicker={main:{map:{newIndex:{},originalIndex:{}}},current:{map:{}},search:{map:{}},view:{},keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){f.selectpicker.keydown.keyHistory=""},800)}}}};null===this.options.title&&(this.options.title=this.$element.attr("title"));u=this.options.windowPadding;"number"==typeof u&&(this.options.windowPadding=[u,u,u,u]);this.val=r.prototype.val;this.render=r.prototype.render;this.refresh=r.prototype.refresh;this.setStyle=r.prototype.setStyle;this.selectAll=r.prototype.selectAll;this.deselectAll=r.prototype.deselectAll;this.destroy=r.prototype.destroy;this.remove=r.prototype.remove;this.show=r.prototype.show;this.hide=r.prototype.hide;this.init()};r.VERSION="1.13.5";r.BootstrapVersion=u.major;r.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(n){return 1==n?"{0} item selected":"{0} items selected"},maxOptionsText:function(n,t){return[1==n?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:t.BUTTONCLASS,size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1};"4"===u.major&&(r.DEFAULTS.style="btn-light",r.DEFAULTS.iconBase="",r.DEFAULTS.tickIcon="bs-ok-default");r.prototype={constructor:r,init:function(){var n=this,r=this.$element.attr("id");this.selectId=vt++;this.$element.addClass("bs-select-hidden");this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createDropdown();this.createLi();this.$element.after(this.$newElement).prependTo(this.$newElement);this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(rt.MENU);this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");this.$element.removeClass("bs-select-hidden");!0===this.options.dropdownAlignRight&&this.$menu.addClass(t.MENURIGHT);void 0!==r&&this.$button.attr("data-id",r);this.checkDisabled();this.clickListener();this.options.liveSearch&&this.liveSearchListener();this.render();this.setStyle();this.setWidth();this.options.container?this.selectPosition():this.$element.on("hide"+i,function(){if(n.isVirtual()){var t=n.$menuInner[0],i=t.firstChild.cloneNode(!1);t.replaceChild(i,t.firstChild);t.scrollTop=0}});this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on({"hide.bs.dropdown":function(t){n.$menuInner.attr("aria-expanded",!1);n.$element.trigger("hide"+i,t)},"hidden.bs.dropdown":function(t){n.$element.trigger("hidden"+i,t)},"show.bs.dropdown":function(t){n.$menuInner.attr("aria-expanded",!0);n.$element.trigger("show"+i,t)},"shown.bs.dropdown":function(t){n.$element.trigger("shown"+i,t)}});n.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){n.$button.addClass("bs-invalid");n.$element.on("shown"+i+".invalid",function(){n.$element.val(n.$element.val()).off("shown"+i+".invalid")}).on("rendered"+i,function(){this.validity.valid&&n.$button.removeClass("bs-invalid");n.$element.off("rendered"+i)});n.$button.on("blur"+i,function(){n.$element.focus().blur();n.$button.off("blur"+i)})});setTimeout(function(){n.$element.trigger("loaded"+i)})},createDropdown:function(){var i,s=this.multiple||this.options.showTick?" show-tick":"",h=this.autofocus?" autofocus":"",r="",f="",e="",o="";return this.options.header&&(r='<div class="'+t.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>"),this.options.liveSearch&&(f='<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+c(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"><\/div>'),this.multiple&&this.options.actionsBox&&(e='<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+t.BUTTONCLASS+'">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn '+t.BUTTONCLASS+'">'+this.options.deselectAllText+"<\/button><\/div><\/div>"),this.multiple&&this.options.doneButton&&(o='<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+t.BUTTONCLASS+'">'+this.options.doneButtonText+"<\/button><\/div><\/div>"),i='<div class="dropdown bootstrap-select'+s+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" '+("static"===this.options.display?'data-display="static"':"")+'data-toggle="dropdown"'+h+' role="button"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"><\/div><\/div> <\/div>'+("4"===u.major?"":'<span class="bs-caret">'+this.options.template.caret+"<\/span>")+'<\/button><div class="'+t.MENU+" "+("4"===u.major?"":t.SHOW)+'" role="combobox">'+r+f+e+'<div class="inner '+t.SHOW+'" role="listbox" aria-expanded="false" tabindex="-1"><ul class="'+t.MENU+" inner "+("4"===u.major?t.SHOW:"")+'"><\/ul><\/div>'+o+"<\/div><\/div>",n(i)},setPositionData:function(){var t,n,i;for(this.selectpicker.view.canHighlight=[],t=0;t<this.selectpicker.current.data.length;t++)n=this.selectpicker.current.data[t],i=!0,"divider"===n.type?(i=!1,n.height=this.sizeInfo.dividerHeight):"optgroup-label"===n.type?(i=!1,n.height=this.sizeInfo.dropdownHeaderHeight):n.height=this.sizeInfo.liHeight,n.disabled&&(i=!1),this.selectpicker.view.canHighlight.push(i),n.position=(0===t?0:this.selectpicker.current.data[t-1].position)+n.height},isVirtual:function(){return!1!==this.options.virtualScroll&&this.selectpicker.main.elements.length>=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(r,u){function h(n,t){var y,p,nt,tt,u,b,it,rt,k,d,h=f.selectpicker.current.elements.length,g=[],ut=!0,l=f.isVirtual(),i,w,ht,a,v;for(f.selectpicker.view.scrollTop=n,!0===l&&f.sizeInfo.hasScrollBar&&f.$menu[0].offsetWidth>f.sizeInfo.totalMenuWidth&&(f.sizeInfo.menuWidth=f.$menu[0].offsetWidth,f.sizeInfo.totalMenuWidth=f.sizeInfo.menuWidth+f.sizeInfo.scrollBarWidth,f.$menu.css("min-width",f.sizeInfo.menuWidth)),y=Math.ceil(f.sizeInfo.menuInnerHeight/f.sizeInfo.liHeight*1.5),p=Math.round(h/y)||1,i=0;i<p;i++){if(w=(i+1)*y,i===p-1&&(w=h),g[i]=[i*y+(i?1:0),w],!h)break;void 0===u&&n<=f.selectpicker.current.data[w-1].position-f.sizeInfo.menuInnerHeight&&(u=i)}if(void 0===u&&(u=0),b=[f.selectpicker.view.position0,f.selectpicker.view.position1],nt=Math.max(0,u-1),tt=Math.min(p-1,u+1),f.selectpicker.view.position0=Math.max(0,g[nt][0])||0,f.selectpicker.view.position1=Math.min(h,g[tt][1])||0,it=b[0]!==f.selectpicker.view.position0||b[1]!==f.selectpicker.view.position1,void 0!==f.activeIndex&&(o=f.selectpicker.current.elements[f.selectpicker.current.map.newIndex[f.prevActiveIndex]],s=f.selectpicker.current.elements[f.selectpicker.current.map.newIndex[f.activeIndex]],e=f.selectpicker.current.elements[f.selectpicker.current.map.newIndex[f.selectedIndex]],t&&(f.activeIndex!==f.selectedIndex&&(s.classList.remove("active"),s.firstChild&&s.firstChild.classList.remove("active")),f.activeIndex=void 0),f.activeIndex&&f.activeIndex!==f.selectedIndex&&e&&e.length&&(e.classList.remove("active"),e.firstChild&&e.firstChild.classList.remove("active"))),void 0!==f.prevActiveIndex&&f.prevActiveIndex!==f.activeIndex&&f.prevActiveIndex!==f.selectedIndex&&o&&o.length&&(o.classList.remove("active"),o.firstChild&&o.firstChild.classList.remove("active")),(t||it)&&(rt=f.selectpicker.view.visibleElements?f.selectpicker.view.visibleElements.slice():[],f.selectpicker.view.visibleElements=f.selectpicker.current.elements.slice(f.selectpicker.view.position0,f.selectpicker.view.position1),f.setOptionStatus(),(r||!1===l&&t)&&(k=rt,d=f.selectpicker.view.visibleElements,ut=!(k.length===d.length&&k.every(function(n,t){return n===d[t]}))),(t||!0===l)&&ut)){var ft,et,c=f.$menuInner[0],ot=document.createDocumentFragment(),ct=c.firstChild.cloneNode(!1),st=!0===l?f.selectpicker.view.visibleElements:f.selectpicker.current.elements;for(c.replaceChild(ct,c.firstChild),i=0,ht=st.length;i<ht;i++)ot.appendChild(st[i]);!0===l&&(ft=0===f.selectpicker.view.position0?0:f.selectpicker.current.data[f.selectpicker.view.position0-1].position,et=f.selectpicker.view.position1>h-1?0:f.selectpicker.current.data[h-1].position-f.selectpicker.current.data[f.selectpicker.view.position1-1].position,c.firstChild.style.marginTop=ft+"px",c.firstChild.style.marginBottom=et+"px");c.firstChild.appendChild(ot)}(f.prevActiveIndex=f.activeIndex,f.options.liveSearch)?r&&t&&(v=0,f.selectpicker.view.canHighlight[v]||(v=1+f.selectpicker.view.canHighlight.slice(1).indexOf(!0)),a=f.selectpicker.view.visibleElements[v],f.selectpicker.view.currentActive&&(f.selectpicker.view.currentActive.classList.remove("active"),f.selectpicker.view.currentActive.firstChild&&f.selectpicker.view.currentActive.firstChild.classList.remove("active")),a&&(a.classList.add("active"),a.firstChild&&a.firstChild.classList.add("active")),f.activeIndex=f.selectpicker.current.map.originalIndex[v]):f.$menuInner.focus()}var f,e,o,s;u=u||0;f=this;this.selectpicker.current=r?this.selectpicker.search:this.selectpicker.main;s=[];this.setPositionData();h(u,!0);this.$menuInner.off("scroll.createView").on("scroll.createView",function(n,t){f.noScroll||h(this.scrollTop,t);f.noScroll=!1});n(window).off("resize"+i+"."+this.selectId+".createView").on("resize"+i+"."+this.selectId+".createView",function(){f.$newElement.hasClass(t.SHOW)&&h(f.$menuInner[0].scrollTop)})},createLi:function(){var w,f=this,e=[],b={},y=0,k=0,r=[],o=0,p=0,s=-1,d,i,h,v;this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option"));i={span:document.createElement("span"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" ")};h=document.createDocumentFragment();(f.options.showTick||f.multiple)&&((d=i.span.cloneNode(!1)).className=f.options.iconBase+" "+f.options.tickIcon+" check-mark",i.a.appendChild(d));i.a.setAttribute("role","option");i.subtext.className="text-muted";i.text=i.span.cloneNode(!1);i.text.className="text";var l=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},g=function(n,t,r){var f=i.a.cloneNode(!0);return n&&(11===n.nodeType?f.appendChild(n):f.insertAdjacentHTML("beforeend",n)),void 0!==t&&""!==t&&(f.className=t),"4"===u.major&&f.classList.add("dropdown-item"),r&&f.setAttribute("style",r),f},nt=function(n){var r,u,t=i.text.cloneNode(!1),e;return n.optionContent?t.innerHTML=n.optionContent:((t.textContent=n.text,n.optionIcon)&&(e=i.whitespace.cloneNode(!1),(u=i.span.cloneNode(!1)).className=f.options.iconBase+" "+n.optionIcon,h.appendChild(u),h.appendChild(e)),n.optionSubtext&&((r=i.subtext.cloneNode(!1)).innerHTML=n.optionSubtext,t.appendChild(r))),h.appendChild(t),h};if(this.options.title&&!this.multiple){s--;var a=this.$element[0],tt=!1,it=!this.selectpicker.view.titleOption.parentNode;it&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",tt=void 0===n(a.options[a.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected"));(it||0!==this.selectpicker.view.titleOption.index)&&a.insertBefore(this.selectpicker.view.titleOption,a.firstChild);tt&&(a.selectedIndex=0)}v=this.$element.find("option");v.each(function(u){var ot=n(this),pt,wt,bt,rt,ut;if(s++,!ot.hasClass("bs-title-option")){var d,st,kt,tt,a=ot.data(),dt=this.className||"",gt=c(this.style.cssText),ht=a.content,ct=this.textContent,ni=a.tokens,lt=a.subtext,at=a.icon,ft=ot.parent(),et=ft[0],ti="OPTGROUP"===et.tagName,ii=ti&&et.disabled,vt=this.disabled||ii,it=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName,yt=ft.data();if(!0===a.hidden||this.hidden||f.options.hideDisabled&&(vt||ii))return d=a.prevHiddenIndex,ot.next().data("prevHiddenIndex",void 0!==d?d:u),s--,b[u]={type:"hidden",data:a},it||void 0!==d&&(tt=v[d].previousElementSibling)&&"OPTGROUP"===tt.tagName&&!tt.disabled&&(it=!0),void(it&&"divider"!==r[r.length-1].type&&(s++,e.push(l(!1,t.DIVIDER,o+"div")),r.push({type:"divider",optID:o})));if(ti&&!0!==a.divider){if(f.options.hideDisabled&&vt&&(void 0===yt.allOptionsDisabled&&(pt=ft.children(),ft.data("allOptionsDisabled",pt.filter(":disabled").length===pt.length)),ft.data("allOptionsDisabled")))return void s--;if(wt=" "+et.className||"",bt=this.previousElementSibling,void 0!==(d=a.prevHiddenIndex)&&(bt=v[d].previousElementSibling),!bt){o+=1;var fi=et.label,ri=c(fi),ui=yt.subtext,ei=yt.icon;0!==u&&0<e.length&&(s++,e.push(l(!1,t.DIVIDER,o+"div")),r.push({type:"divider",optID:o}));s++;kt=function(n){var r,u,t=i.text.cloneNode(!1),e;return(t.innerHTML=n.labelEscaped,n.labelIcon)&&(e=i.whitespace.cloneNode(!1),(u=i.span.cloneNode(!1)).className=f.options.iconBase+" "+n.labelIcon,h.appendChild(u),h.appendChild(e)),n.labelSubtext&&((r=i.subtext.cloneNode(!1)).textContent=n.labelSubtext,t.appendChild(r)),h.appendChild(t),h}({labelEscaped:ri,labelSubtext:ui,labelIcon:ei});e.push(l(kt,"dropdown-header"+wt,o));r.push({content:ri,subtext:ui,type:"optgroup-label",optID:o});p=s-1}st=nt({text:ct,optionContent:ht,optionSubtext:lt,optionIcon:at});e.push(l(g(st,"opt "+dt+wt,gt),"",o));r.push({content:ht||ct,subtext:lt,tokens:ni,type:"option",optID:o,headerIndex:p,lastIndex:p+et.childElementCount,originalIndex:u,data:a});y++}else!0===a.divider?(e.push(l(!1,t.DIVIDER)),r.push({type:"divider",originalIndex:u,data:a})):(!it&&f.options.hideDisabled&&void 0!==(d=a.prevHiddenIndex)&&(tt=v[d].previousElementSibling)&&"OPTGROUP"===tt.tagName&&!tt.disabled&&(it=!0),it&&"divider"!==r[r.length-1].type&&(s++,e.push(l(!1,t.DIVIDER,o+"div")),r.push({type:"divider",optID:o})),st=nt({text:ct,optionContent:ht,optionSubtext:lt,optionIcon:at}),e.push(l(g(st,dt,gt))),r.push({content:ht||ct,subtext:lt,tokens:ni,type:"option",originalIndex:u,data:a}),y++);f.selectpicker.main.map.newIndex[u]=s;f.selectpicker.main.map.originalIndex[s]=u;rt=r[r.length-1];rt.disabled=vt;ut=0;rt.content&&(ut+=rt.content.length);rt.subtext&&(ut+=rt.subtext.length);at&&(ut+=1);k<ut&&(k=ut,w=e[e.length-1])}});this.selectpicker.main.elements=e;this.selectpicker.main.data=r;this.selectpicker.main.hidden=b;this.selectpicker.current=this.selectpicker.main;this.selectpicker.view.widestOption=w;this.selectpicker.view.availableOptionsCount=y},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){var n=this,c=this.$element.find("option"),r=[],o=[],f,l,v,y,u,p,t,s,h;for(this.togglePlaceholder(),this.tabIndex(),f=0,l=c.length;f<l;f++){var w=n.selectpicker.main.map.newIndex[f],e=c[f],a=n.selectpicker.main.data[w]||n.selectpicker.main.hidden[f];e&&e.selected&&a&&(r.push(e),o.length<100&&"count"!==n.options.selectedTextFormat||1===r.length)&&(u=a.data,p=u.icon&&n.options.showIcon?'<i class="'+n.options.iconBase+" "+u.icon+'"><\/i> ':"",v=n.options.showSubtext&&u.subtext&&!n.multiple?' <small class="text-muted">'+u.subtext+"<\/small>":"",y=e.title?e.title:u.content&&n.options.showContent?u.content.toString():p+e.innerHTML.trim()+v,o.push(y))}t=this.multiple?o.join(this.options.multipleSeparator):o[0];(50<r.length&&(t+="..."),this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count"))&&(s=this.options.selectedTextFormat.split(">"),(1<s.length&&r.length>s[1]||1===s.length&&2<=r.length)&&(h=this.selectpicker.view.availableOptionsCount,t=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(r.length,h):this.options.countSelectedText).replace("{0}",r.length.toString()).replace("{1}",h.toString())));null==this.options.title&&(this.options.title=this.$element.attr("title"));"static"==this.options.selectedTextFormat&&(t=this.options.title);t||(t=void 0!==this.options.title?this.options.title:this.options.noneSelectedText);this.$button[0].title=ct(t.replace(/<[^>]*>?/g,"").trim());this.$button.find(".filter-option-inner-inner")[0].innerHTML=t;this.$element.trigger("rendered"+i)},setStyle:function(n,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=n||this.options.style;"add"==t?this.$button.addClass(i):"remove"==t?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(i){var d;if(i||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var c=document.createElement("div"),e=document.createElement("div"),a=document.createElement("div"),s=document.createElement("ul"),k=document.createElement("li"),l=document.createElement("li"),nt=document.createElement("li"),v=document.createElement("a"),y=document.createElement("span"),p=this.options.header&&0<this.$menu.find("."+t.POPOVERHEADER).length?this.$menu.find("."+t.POPOVERHEADER)[0].cloneNode(!0):null,h=this.options.liveSearch?document.createElement("div"):null,w=this.options.actionsBox&&this.multiple&&0<this.$menu.find(".bs-actionsbox").length?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,b=this.options.doneButton&&this.multiple&&0<this.$menu.find(".bs-donebutton").length?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,tt=this.$element.find("option")[0];(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,y.className="text",v.className="dropdown-item "+(tt?tt.className:""),c.className=this.$menu[0].parentNode.className+" "+t.SHOW,c.style.width=this.sizeInfo.selectWidth+"px","auto"===this.options.width&&(e.style.minWidth=0),e.className=t.MENU+" "+t.SHOW,a.className="inner "+t.SHOW,s.className=t.MENU+" inner "+("4"===u.major?t.SHOW:""),k.className=t.DIVIDER,l.className="dropdown-header",y.appendChild(document.createTextNode("​")),v.appendChild(y),nt.appendChild(v),l.appendChild(y.cloneNode(!0)),this.selectpicker.view.widestOption&&s.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),s.appendChild(nt),s.appendChild(k),s.appendChild(l),p&&e.appendChild(p),h)&&(d=document.createElement("input"),h.className="bs-searchbox",d.className="form-control",h.appendChild(d),e.appendChild(h));w&&e.appendChild(w);a.appendChild(s);e.appendChild(a);b&&e.appendChild(b);c.appendChild(e);document.body.appendChild(c);var it,ut=v.offsetHeight,ft=l?l.offsetHeight:0,et=p?p.offsetHeight:0,ot=h?h.offsetHeight:0,st=w?w.offsetHeight:0,ht=b?b.offsetHeight:0,ct=n(k).outerHeight(!0),r=!!window.getComputedStyle&&window.getComputedStyle(e),rt=e.offsetWidth,o=r?null:n(e),g={vert:f(r?r.paddingTop:o.css("paddingTop"))+f(r?r.paddingBottom:o.css("paddingBottom"))+f(r?r.borderTopWidth:o.css("borderTopWidth"))+f(r?r.borderBottomWidth:o.css("borderBottomWidth")),horiz:f(r?r.paddingLeft:o.css("paddingLeft"))+f(r?r.paddingRight:o.css("paddingRight"))+f(r?r.borderLeftWidth:o.css("borderLeftWidth"))+f(r?r.borderRightWidth:o.css("borderRightWidth"))},lt={vert:g.vert+f(r?r.marginTop:o.css("marginTop"))+f(r?r.marginBottom:o.css("marginBottom"))+2,horiz:g.horiz+f(r?r.marginLeft:o.css("marginLeft"))+f(r?r.marginRight:o.css("marginRight"))+2};a.style.overflowY="scroll";it=e.offsetWidth-rt;document.body.removeChild(c);this.sizeInfo.liHeight=ut;this.sizeInfo.dropdownHeaderHeight=ft;this.sizeInfo.headerHeight=et;this.sizeInfo.searchHeight=ot;this.sizeInfo.actionsHeight=st;this.sizeInfo.doneButtonHeight=ht;this.sizeInfo.dividerHeight=ct;this.sizeInfo.menuPadding=g;this.sizeInfo.menuExtras=lt;this.sizeInfo.menuWidth=rt;this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth;this.sizeInfo.scrollBarWidth=it;this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight;this.setPositionData()}},getSelectPosition:function(){var t,r=n(window),f=this.$newElement.offset(),u=n(this.options.container),i;this.options.container&&!u.is("body")?((t=u.offset()).top+=parseInt(u.css("borderTopWidth")),t.left+=parseInt(u.css("borderLeftWidth"))):t={top:0,left:0};i=this.options.windowPadding;this.sizeInfo.selectOffsetTop=f.top-t.top-r.scrollTop();this.sizeInfo.selectOffsetBot=r.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-t.top-i[2];this.sizeInfo.selectOffsetLeft=f.left-t.left-r.scrollLeft();this.sizeInfo.selectOffsetRight=r.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-t.left-i[1];this.sizeInfo.selectOffsetTop-=i[0];this.sizeInfo.selectOffsetLeft-=i[3]},setMenuSize:function(){var u;this.getSelectPosition();var r,n,f,e,o,s,v,w=this.sizeInfo.selectWidth,y=this.sizeInfo.liHeight,h=this.sizeInfo.headerHeight,c=this.sizeInfo.searchHeight,l=this.sizeInfo.actionsHeight,a=this.sizeInfo.doneButtonHeight,b=this.sizeInfo.dividerHeight,i=this.sizeInfo.menuPadding,p=0;if(this.options.dropupAuto&&(v=y*this.selectpicker.current.elements.length+i.vert,this.$newElement.toggleClass(t.DROPUP,this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&v+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)e=3<this.selectpicker.current.elements.length?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,n=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,f=e+h+c+l+a,s=Math.max(e-i.vert,0),this.$newElement.hasClass(t.DROPUP)&&(n=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),r=(o=n)-h-c-l-a-i.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(u=0;u<this.options.size;u++)"divider"===this.selectpicker.current.data[u].type&&p++;r=(n=y*this.options.size+p*b+i.vert)-i.vert;o=n+h+c+l+a;f=s=""}"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(t.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-w);this.$menu.css({"max-height":o+"px",overflow:"hidden","min-height":f+"px"});this.$menuInner.css({"max-height":r+"px","overflow-y":"auto","min-height":s+"px"});this.sizeInfo.menuInnerHeight=r;this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth));this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(t){if(this.liHeight(t),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var f,r=this,e=n(window),u=0;this.setMenuSize();"auto"===this.options.size?(this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return r.setMenuSize()}),e.off("resize"+i+"."+this.selectId+".setMenuSize scroll"+i+"."+this.selectId+".setMenuSize").on("resize"+i+"."+this.selectId+".setMenuSize scroll"+i+"."+this.selectId+".setMenuSize",function(){return r.setMenuSize()})):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&(this.$searchbox.off("input.setMenuSize propertychange.setMenuSize"),e.off("resize"+i+"."+this.selectId+".setMenuSize scroll"+i+"."+this.selectId+".setMenuSize"));t?u=this.$menuInner[0].scrollTop:r.multiple||"number"==typeof(f=r.selectpicker.main.map.newIndex[r.$element[0].selectedIndex])&&!1!==r.options.size&&(u=(u=r.sizeInfo.liHeight*f)-r.sizeInfo.menuInnerHeight/2+r.sizeInfo.liHeight/2);r.createView(!1,u)}},setWidth:function(){var n=this;"auto"===this.options.width?requestAnimationFrame(function(){n.$menu.css("min-width","0");n.liHeight();n.setMenuSize();var t=n.$newElement.clone().appendTo("body"),i=t.css("width","auto").children("button").outerWidth();t.remove();n.sizeInfo.selectWidth=Math.max(n.sizeInfo.totalMenuWidth,i);n.$newElement.css("width",n.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.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=n('<div class="bs-container" />');var o,e,s,r=this,f=n(this.options.container),h=function(i){var h={},c=r.options.display||!!n.fn.dropdown.Constructor.Default&&n.fn.dropdown.Constructor.Default.display;r.$bsContainer.addClass(i.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(t.DROPUP,i.hasClass(t.DROPUP));o=i.offset();f.is("body")?e={top:0,left:0}:((e=f.offset()).top+=parseInt(f.css("borderTopWidth"))-f.scrollTop(),e.left+=parseInt(f.css("borderLeftWidth"))-f.scrollLeft());s=i.hasClass(t.DROPUP)?0:i[0].offsetHeight;(u.major<4||"static"===c)&&(h.top=o.top-e.top+s,h.left=o.left-e.left);h.width=i[0].offsetWidth;r.$bsContainer.css(h)};this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(h(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(t.SHOW,!r.$button.hasClass(t.SHOW)).append(r.$menu))});n(window).off("resize"+i+"."+this.selectId+" scroll"+i+"."+this.selectId).on("resize"+i+"."+this.selectId+" scroll"+i+"."+this.selectId,function(){r.$newElement.hasClass(t.SHOW)&&h(r.$newElement)});this.$element.on("hide"+i,function(){r.$menu.data("height",r.$menu.height());r.$bsContainer.detach()})},setOptionStatus:function(){var n=this,e=this.$element.find("option"),r,i,t,u,f;if(n.noScroll=!1,n.selectpicker.view.visibleElements&&n.selectpicker.view.visibleElements.length)for(r=0;r<n.selectpicker.view.visibleElements.length;r++)i=n.selectpicker.current.map.originalIndex[r+n.selectpicker.view.position0],t=e[i],t&&(u=this.selectpicker.main.map.newIndex[i],f=this.selectpicker.main.elements[u],n.setDisabled(i,t.disabled||"OPTGROUP"===t.parentNode.tagName&&t.parentNode.disabled,u,f),n.setSelected(i,t.selected,u,f))},setSelected:function(n,t,i,r){var o,e,u,s=void 0!==this.activeIndex,f=this.activeIndex===n||t&&!this.multiple&&!s;i||(i=this.selectpicker.main.map.newIndex[n]);r||(r=this.selectpicker.main.elements[i]);u=r.firstChild;t&&(this.selectedIndex=n);r.classList.toggle("selected",t);r.classList.toggle("active",f);f&&(this.selectpicker.view.currentActive=r,this.activeIndex=n);u&&(u.classList.toggle("selected",t),u.classList.toggle("active",f),u.setAttribute("aria-selected",t));f||!s&&t&&void 0!==this.prevActiveIndex&&(o=this.selectpicker.main.map.newIndex[this.prevActiveIndex],(e=this.selectpicker.main.elements[o]).classList.remove("active"),e.firstChild&&e.firstChild.classList.remove("active"))},setDisabled:function(n,i,r,f){var e;r||(r=this.selectpicker.main.map.newIndex[n]);f||(f=this.selectpicker.main.elements[r]);e=f.firstChild;f.classList.toggle(t.DISABLED,i);e&&("4"===u.major&&e.classList.toggle(t.DISABLED,i),e.setAttribute("aria-disabled",i),i?e.setAttribute("tabindex",-1):e.setAttribute("tabindex",0))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var n=this;this.isDisabled()?(this.$newElement.addClass(t.DISABLED),this.$button.addClass(t.DISABLED).attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button.hasClass(t.DISABLED)&&(this.$newElement.removeClass(t.DISABLED),this.$button.removeClass(t.DISABLED).attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"));this.$button.click(function(){return!n.isDisabled()})},togglePlaceholder:function(){var t=this.$element[0],i=t.selectedIndex,n=-1===i;n||t.options[i].value||(n=!0);this.$button.toggleClass("bs-placeholder",n)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")));this.$element.attr("tabindex",-98)},clickListener:function(){function e(){r.options.liveSearch?r.$searchbox.focus():r.$menuInner.focus()}function s(){r.dropdown&&r.dropdown._popper&&r.dropdown._popper.state.isCreated?e():requestAnimationFrame(s)}var r=this,f=n(document);f.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&f.data("spaceSelect")&&(n.preventDefault(),f.data("spaceSelect",!1))});this.$newElement.on("show.bs.dropdown",function(){3<u.major&&!r.dropdown&&(r.dropdown=r.$button.data("bs.dropdown"),r.dropdown._menu=r.$menu[0])});this.$button.on("click.bs.dropdown.data-api",function(){r.$newElement.hasClass(t.SHOW)||r.setSize()});this.$element.on("shown"+i,function(){r.$menuInner[0].scrollTop!==r.selectpicker.view.scrollTop&&(r.$menuInner[0].scrollTop=r.selectpicker.view.scrollTop);3<u.major?requestAnimationFrame(s):e()});this.$menuInner.on("click","li a",function(u,f){var b=n(this),ot=r.isVirtual()?r.selectpicker.view.position0:0,h=r.selectpicker.current.map.originalIndex[b.parent().index()+ot],rt=v(r.$element[0]),st=r.$element.prop("selectedIndex"),k=!0,d,g,l,et;if(r.multiple&&1!==r.options.maxOptions&&u.stopPropagation(),u.preventDefault(),!r.isDisabled()&&!b.parent().hasClass(t.DISABLED)){var a=r.$element.find("option"),c=a.eq(h),ut=c.prop("selected"),p=c.parent("optgroup"),ft=p.find("option"),e=r.options.maxOptions,s=p.data("maxOptions")||!1;if(h===r.activeIndex&&(f=!0),f||(r.prevActiveIndex=r.activeIndex,r.activeIndex=void 0),r.multiple){if((c.prop("selected",!ut),r.setSelected(h,!ut),b.blur(),!1!==e||!1!==s)&&(d=e<a.filter(":selected").length,g=s<p.find("option:selected").length,e&&d||s&&g))if(e&&1==e){for(a.prop("selected",!1),c.prop("selected",!0),l=0;l<a.length;l++)r.setSelected(l,!1);r.setSelected(h,!0)}else if(s&&1==s){for(p.find("option:selected").prop("selected",!1),c.prop("selected",!0),l=0;l<ft.length;l++)et=ft[l],r.setSelected(a.index(et),!1);r.setSelected(h,!0)}else{var nt="string"==typeof r.options.maxOptionsText?[r.options.maxOptionsText,r.options.maxOptionsText]:r.options.maxOptionsText,y="function"==typeof nt?nt(e,s):nt,tt=y[0].replace("{n}",e),it=y[1].replace("{n}",s),w=n('<div class="notify"><\/div>');y[2]&&(tt=tt.replace("{var}",y[2][1<e?0:1]),it=it.replace("{var}",y[2][1<s?0:1]));c.prop("selected",!1);r.$menu.append(w);e&&d&&(w.append(n("<div>"+tt+"<\/div>")),k=!1,r.$element.trigger("maxReached"+i));s&&g&&(w.append(n("<div>"+it+"<\/div>")),k=!1,r.$element.trigger("maxReachedGrp"+i));setTimeout(function(){r.setSelected(h,!1)},10);w.delay(750).fadeOut(300,function(){n(this).remove()})}}else a.prop("selected",!1),c.prop("selected",!0),r.setSelected(h,!0);!r.multiple||r.multiple&&1===r.options.maxOptions?r.$button.focus():r.options.liveSearch&&r.$searchbox.focus();k&&(rt!=v(r.$element[0])&&r.multiple||st!=r.$element.prop("selectedIndex")&&!r.multiple)&&(o=[h,c.prop("selected"),rt],r.$element.triggerNative("change"))}});this.$menu.on("click","li."+t.DISABLED+" a, ."+t.POPOVERHEADER+", ."+t.POPOVERHEADER+" :not(.close)",function(t){t.currentTarget==this&&(t.preventDefault(),t.stopPropagation(),r.options.liveSearch&&!n(t.target).hasClass("close")?r.$searchbox.focus():r.$button.focus())});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();r.options.liveSearch?r.$searchbox.focus():r.$button.focus()});this.$menu.on("click","."+t.POPOVERHEADER+" .close",function(){r.$button.click()});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(t){r.options.liveSearch?r.$searchbox.focus():r.$button.focus();t.preventDefault();t.stopPropagation();n(this).hasClass("bs-select-all")?r.selectAll():r.deselectAll()});this.$element.on({change:function(){r.render();r.$element.trigger("changed"+i,o);o=null},focus:function(){r.options.mobile||r.$button.focus()}})},liveSearchListener:function(){var n=this,t=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){n.$searchbox.val()&&n.$searchbox.val("")});this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var o=n.$searchbox.val(),r,i,h;if(n.selectpicker.search.map.newIndex={},n.selectpicker.search.map.originalIndex={},n.selectpicker.search.elements=[],n.selectpicker.search.data=[],o){var e=[],s=o.toUpperCase(),u={},f=[],y=n._searchStyle(),l=n.options.liveSearchNormalize;for(l&&(s=nt(s)),n._$lisSelected=n.$menuInner.find(".selected"),r=0;r<n.selectpicker.main.data.length;r++)i=n.selectpicker.main.data[r],u[r]||(u[r]=g(i,s,y,l)),u[r]&&void 0!==i.headerIndex&&-1===f.indexOf(i.headerIndex)&&(0<i.headerIndex&&(u[i.headerIndex-1]=!0,f.push(i.headerIndex-1)),u[i.headerIndex]=!0,f.push(i.headerIndex),u[i.lastIndex+1]=!0),u[r]&&"optgroup-label"!==i.type&&f.push(r);for(r=0,h=f.length;r<h;r++){var a=f[r],p=f[r-1],v=(i=n.selectpicker.main.data[a],n.selectpicker.main.data[p]);("divider"!==i.type||"divider"===i.type&&v&&"divider"!==v.type&&h-1!==r)&&(n.selectpicker.search.data.push(i),e.push(n.selectpicker.main.elements[a]),i.hasOwnProperty("originalIndex")&&(n.selectpicker.search.map.newIndex[i.originalIndex]=e.length-1,n.selectpicker.search.map.originalIndex[e.length-1]=i.originalIndex))}n.activeIndex=void 0;n.noScroll=!0;n.$menuInner.scrollTop(0);n.selectpicker.search.elements=e;n.createView(!0);e.length||(t.className="no-results",t.innerHTML=n.options.noneResultsText.replace("{0}",'"'+c(o)+'"'),n.$menuInner[0].firstChild.appendChild(t))}else n.$menuInner.scrollTop(0),n.createView(!1)})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(n){return void 0!==n?(this.$element.val(n).triggerNative("change"),this.$element):this.$element.val()},changeAll:function(n){var i,f,t;if(this.multiple){void 0===n&&(n=!0);var e=this.$element.find("option"),r=0,u=0,s=v(this.$element[0]);for(this.$element.addClass("bs-select-hidden"),i=0;i<this.selectpicker.current.elements.length;i++)f=this.selectpicker.current.data[i],t=e[this.selectpicker.current.map.originalIndex[i]],t&&!t.disabled&&"divider"!==f.type&&(t.selected&&r++,t.selected=n,t.selected&&u++);this.$element.removeClass("bs-select-hidden");r!==u&&(this.setOptionStatus(),this.togglePlaceholder(),o=[null,null,s],this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(n){(n=n||window.event)&&n.stopPropagation();this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(i){var u,ft,f,o,b,s=n(this),st=s.hasClass("dropdown-toggle"),r=(st?s.closest(".dropdown"):s.closest(rt.MENU)).data("this"),h=r.findLis(),k=!1,et=i.which===y&&!st&&!r.options.selectOnTab,ht=yt.test(i.which)||et,tt=r.$menuInner[0].scrollTop,ct=r.isVirtual(),e=!0===ct?r.selectpicker.view.position0:0,c,ot,d,a,nt,ut,v;if(!(ft=r.$newElement.hasClass(t.SHOW))&&(ht||48<=i.which&&i.which<=57||96<=i.which&&i.which<=105||65<=i.which&&i.which<=90)&&r.$button.trigger("click.bs.dropdown.data-api"),i.which===it&&ft&&(i.preventDefault(),r.$button.trigger("click.bs.dropdown.data-api").focus()),ht){if(!h.length)return;void 0===(u=!0===ct?h.index(h.filter(".active")):r.selectpicker.current.map.newIndex[r.activeIndex])&&(u=-1);-1!==u&&((f=r.selectpicker.current.elements[u+e]).classList.remove("active"),f.firstChild&&f.firstChild.classList.remove("active"));i.which===p?(-1!==u&&u--,u+e<0&&(u+=h.length),r.selectpicker.view.canHighlight[u+e]||-1==(u=r.selectpicker.view.canHighlight.slice(0,u+e).lastIndexOf(!0)-e)&&(u=h.length-1)):(i.which===w||et)&&(++u+e>=r.selectpicker.view.canHighlight.length&&(u=0),r.selectpicker.view.canHighlight[u+e]||(u=u+1+r.selectpicker.view.canHighlight.slice(u+e+1).indexOf(!0)));i.preventDefault();c=e+u;i.which===p?0===e&&u===h.length-1?(r.$menuInner[0].scrollTop=r.$menuInner[0].scrollHeight,c=r.selectpicker.current.elements.length-1):k=(b=(o=r.selectpicker.current.data[c]).position-o.height)<tt:(i.which===w||et)&&(0===u?c=r.$menuInner[0].scrollTop=0:k=tt<(b=(o=r.selectpicker.current.data[c]).position-r.sizeInfo.menuInnerHeight));(f=r.selectpicker.current.elements[c])&&(f.classList.add("active"),f.firstChild&&f.firstChild.classList.add("active"));r.activeIndex=r.selectpicker.current.map.originalIndex[c];r.selectpicker.view.currentActive=f;k&&(r.$menuInner[0].scrollTop=b);r.options.liveSearch?r.$searchbox.focus():s.focus()}else if(!s.is("input")&&!pt.test(i.which)||i.which===l&&r.selectpicker.keydown.keyHistory){for(a=[],i.preventDefault(),r.selectpicker.keydown.keyHistory+=lt[i.which],r.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(r.selectpicker.keydown.resetKeyHistory.cancel),r.selectpicker.keydown.resetKeyHistory.cancel=r.selectpicker.keydown.resetKeyHistory.start(),d=r.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(d)&&(d=d.charAt(0)),nt=0;nt<r.selectpicker.current.data.length;nt++)ut=r.selectpicker.current.data[nt],g(ut,d,"startsWith",!0)&&r.selectpicker.view.canHighlight[nt]&&(ut.index=nt,a.push(ut.originalIndex));a.length&&(v=0,h.removeClass("active").find("a").removeClass("active"),1===d.length&&(-1===(v=a.indexOf(r.activeIndex))||v===a.length-1?v=0:v++),ot=r.selectpicker.current.map.newIndex[a[v]],0<tt-(o=r.selectpicker.current.data[ot]).position?(b=o.position-o.height,k=!0):(b=o.position-r.sizeInfo.menuInnerHeight,k=o.position>tt+r.sizeInfo.menuInnerHeight),(f=r.selectpicker.current.elements[ot]).classList.add("active"),f.firstChild&&f.firstChild.classList.add("active"),r.activeIndex=a[v],f.firstChild.focus(),k&&(r.$menuInner[0].scrollTop=b),s.focus())}ft&&(i.which===l&&!r.selectpicker.keydown.keyHistory||i.which===at||i.which===y&&r.options.selectOnTab)&&(i.which!==l&&i.preventDefault(),r.options.liveSearch&&i.which===l||(r.$menuInner.find(".active a").trigger("click",!0),s.focus(),r.options.liveSearch||(i.preventDefault(),n(document).data("spaceSelect",!0))))},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){var t=n.extend({},this.options,this.$element.data());this.options=t;this.selectpicker.main.map.newIndex={};this.selectpicker.main.map.originalIndex={};this.createLi();this.checkDisabled();this.render();this.setStyle();this.setWidth();this.setSize(!0);this.$element.trigger("refreshed"+i)},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(i).removeData("selectpicker").removeClass("bs-select-hidden selectpicker");n(window).off(i+"."+this.selectId)}};ft=n.fn.selectpicker;n.fn.selectpicker=ut;n.fn.selectpicker.Constructor=r;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=ft,this};n(document).off("keydown.bs.dropdown.data-api").on("keydown"+i,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',r.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(n){n.stopPropagation()});n(window).on("load"+i+".data-api",function(){n(".selectpicker").each(function(){var t=n(this);ut.call(t,t.data())})})}(n)}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var n=jQuery.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1==n[0]&&9==n[1]&&n[2]<1||3<n[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var i=!1,r=this;n(this).one("bsTransitionEnd",function(){i=!0});return setTimeout(function(){i||n(r).trigger(n.support.transition.end)},t),this};n(function(){n.support.transition=function(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.4.0";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){u.detach().trigger("closed.bs.alert").remove()}var f=n(this),r=f.attr("data-target"),u;r||(r=(r=f.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,""));r="#"===r?[]:r;u=n(document).find(r);i&&i.preventDefault();u.length||(u=f.closest(".alert"));u.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.4.0";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var i="disabled",r=this.$element,f=r.is("input")?"val":"html",u=r.data();t+="Text";null==u.resetText&&r.data("resetText",r[f]());setTimeout(n.proxy(function(){r[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,r.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(i).removeAttr(i).prop(i,!1))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target).closest(".btn");i.call(r,"toggle");n(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.4.0";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),r;return("prev"==n&&0===i||"next"==n&&i==this.$items.length-1)&&!this.options.wrap?t:(r=(i+("prev"==n?-1:1))%this.$items.length,this.$items.eq(r))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1||n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(t<n?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),"object"==typeof u&&u.length&&u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var u=n(this),f=u.attr("href"),s,r,o,e;f&&(f=f.replace(/.*(?=#[^\s]+$)/,""));s=u.attr("data-target")||f;r=n(document).find(s);r.hasClass("carousel")&&(o=n.extend({},r.data(),u.data()),e=u.attr("data-slide-to"),e&&(o.interval=!1),i.call(r,o),e&&r.data("bs.carousel").to(e),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery),function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(document).find(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.4.0";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"))&&f.transitioning)&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented())){if(i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},!n.support.transition)return u.call(this);this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this),f,e;u.attr("data-target")||t.preventDefault();f=r(u);e=f.data("bs.collapse")?"toggle":u.data();i.call(f,e)})}(jQuery),function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=(i=t.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(document).find(i),r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(".dropdown-backdrop").remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f)))))}))}var i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.4.0";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");f=o.find(".dropdown-menu li:not(.disabled):visible a");f.length&&(u=f.index(t.target),38==t.which&&0<u&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery),function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.4.0";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var i=parseInt(this.$body.css("padding-right")||0,10),t;this.originalBodyPad=document.body.style.paddingRight||"";t=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",i+t),n(this.fixedContent).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t+"px")}))};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);n(this.fixedContent).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r||""})};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),e=r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,""),u=n(document).find(e),o=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,o,this)})}(jQuery),function(n){"use strict";var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.4.0";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(document).find(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return(t=n.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState)i.hoverState="in";else{if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)}};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(n(document).find(this.options.container)):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){var r=(t=t||this.$element)[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&((i=n(t.currentTarget).data("bs."+this.type))||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery),function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.0";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});((t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=t).prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery),function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(i).is(document.body)?n(window):n(i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.4.0";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),e<=i)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(t[n+1]===undefined||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery),function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.4.0";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(document).find(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function o(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);e?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),e=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&e?f.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);var u=this.options.target===t.DEFAULTS.target?n(this.options.target):n(document).find(this.options.target);this.$target=u.on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.4.0";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),e=this.$element.offset(),o=this.$target.height(),f,s;return null!=i&&"top"==this.affixed?u<i&&"top":"bottom"==this.affixed?null!=i?!(u+this.unpin<=e.top)&&"bottom":!(u+o<=n-r)&&"bottom":(f=null==this.affixed,s=f?u:e.top,null!=i&&u<=i?"top":null!=r&&n-r<=s+(f?o:t)&&"bottom")};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery)