if("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.1";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.1";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.1";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.1";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):null,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.1";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.1";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";function s(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1===n.inArray(r,f)||Boolean(t.nodeValue.match(e)||t.nodeValue.match(o));for(var s=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,h=s.length;u<h;u++)if(r.match(s[u]))return!0;return!1}function i(t,i,r){var f,u,h;if(0===t.length)return t;if(r&&"function"==typeof r)return r(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;f=document.implementation.createHTMLDocument("sanitization");f.body.innerHTML=t;for(var a=n.map(i,function(n,t){return t}),l=n(f.body).find("*"),o=0,v=l.length;o<v;o++)if(u=l[o],h=u.nodeName.toLowerCase(),-1!==n.inArray(h,a))for(var c=n.map(u.attributes,function(n){return n}),y=[].concat(i["*"]||[],i[h]||[]),e=0,p=c.length;e<p;e++)s(c[e],y)||u.removeAttribute(c[e].nodeName);else u.parentNode.removeChild(u);return f.body.innerHTML}var u=["sanitize","whiteList","sanitizeFn"],f=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,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)},r;t.VERSION="3.4.1";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},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};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){var r=this.$element.data();for(var f in r)r.hasOwnProperty(f)&&-1!==n.inArray(f,u)&&delete r[f];return(t=n.extend({},this.getDefaults(),r,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=i(t.template,t.whiteList,t.sanitizeFn)),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 t=this.tip(),n=this.getTitle();this.options.html?(this.options.sanitize&&(n=i(n,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(n)):t.find(".tooltip-inner").text(n);t.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})};t.prototype.sanitizeHtml=function(n){return i(n,this.options.whiteList,this.options.sanitizeFn)};r=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=r,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.1";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(),r;this.options.html?(r=typeof t,this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===r&&(t=this.sanitizeHtml(t))),n.find(".popover-title").html(i),n.find(".popover-content").children().detach().end()["string"===r?"html":"append"](t)):(n.find(".popover-title").text(i),n.find(".popover-content").children().detach().end().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.1";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.1";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.1";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);!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 ni(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1===n.inArray(r,kt)||Boolean(t.nodeValue.match(dt)||t.nodeValue.match(gt));for(var f=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,e=f.length;u<e;u++)if(r.match(f[u]))return!0;return!1}function g(n,t,i){var r,e,s;if(i&&"function"==typeof i)return i(n);for(var l=Object.keys(t),u=0,a=n.length;u<a;u++)for(var h=n[u].querySelectorAll("*"),f=0,v=h.length;f<v;f++)if(r=h[f],e=r.nodeName.toLowerCase(),-1!==l.indexOf(e))for(var c=[].slice.call(r.attributes),y=[].concat(t["*"]||[],t[e]||[]),o=0,p=c.length;o<p;o++)s=c[o],ni(s,y)||r.removeAttribute(s.nodeName);else r.parentNode.removeChild(r)}function ut(n){var r,u,i;if(null==this)throw new TypeError;if(r=String(this),n&&"[object RegExp]"==nt.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}function ft(n,t){var i,u=n.selectedOptions,f=[],r,e;if(t){for(r=0,e=u.length;r<e;r++)(i=u[r]).disabled||"OPTGROUP"===i.parentNode.tagName&&i.parentNode.disabled||f.push(i);return f}return u}function l(n,t){for(var i,r=[],f=t||n.selectedOptions,u=0,e=f.length;u<e;u++)(i=f[u]).disabled||"OPTGROUP"===i.parentNode.tagName&&i.parentNode.disabled||r.push(i.value);return n.multiple?r:r.length?r[0]:null}function ot(n,t,i,r){for(var e,u,o=["display","subtext","tokens"],s=!1,f=0;f<o.length;f++)if(e=o[f],u=n[e],u&&(u=u.toString(),"display"===e&&(u=u.replace(/<[^>]+>/g,"")),r&&(u=st(u)),u=u.toUpperCase(),s="contains"===i?0<=u.indexOf(t):u.startsWith(t)))break;return s}function e(n){return parseInt(n,10)||0}function ui(n){return ti[n]}function st(n){return(n=n.toString())&&n.replace(ii,ui).replace(ri,"")}function fi(n){return p[n]}function yt(i){var s,h=arguments,r=i,e,o,c;if([].shift.apply(h),!f.success){try{f.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(i){u.BootstrapVersion?f.full=u.BootstrapVersion.split(" ")[0].split("."):(f.full=[f.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",i))}f.major=f.full[0];f.success=!0}if("4"===f.major)for(e=[],u.DEFAULTS.style===t.BUTTONCLASS&&e.push({name:"style",className:"BUTTONCLASS"}),u.DEFAULTS.iconBase===t.ICONBASE&&e.push({name:"iconBase",className:"ICONBASE"}),u.DEFAULTS.tickIcon===t.TICKICON&&e.push({name:"tickIcon",className:"TICKICON"}),t.DIVIDER="dropdown-divider",t.SHOW="show",t.BUTTONCLASS="btn-light",t.POPOVERHEADER="popover-header",t.ICONBASE="",t.TICKICON="bs-ok-default",o=0;o<e.length;o++)i=e[o],u.DEFAULTS[i.name]=t[i.className];return c=this.each(function(){var e=n(this),t,i,o,f,c,l;if(e.is("select")){if(t=e.data("selectpicker"),i="object"==typeof r&&r,t){if(i)for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t.options[o]=i[o])}else{f=e.data();for(c in f)Object.prototype.hasOwnProperty.call(f,c)&&-1!==n.inArray(c,bt)&&delete f[c];l=n.extend({},u.DEFAULTS,n.fn.selectpicker.defaults||{},f,i);l.template=n.extend({},u.DEFAULTS.template,n.fn.selectpicker.defaults?n.fn.selectpicker.defaults.template:{},f.template,i.template);e.data("selectpicker",t=new u(this,l))}"string"==typeof r&&(s=t[r]instanceof Function?t[r].apply(t,h):t.options[r])}}),void 0!==s?s:c}function wt(){if(n.fn.dropdown)return(n.fn.dropdown.Constructor._dataApiKeydownHandler||n.fn.dropdown.Constructor.prototype.keydown).apply(this,arguments)}var bt=["sanitize","whiteList","sanitizeFn"],kt=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],dt=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,gt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,y,nt,h,tt,it,rt,c,s,et,p,w,ht,ct,a,pt;"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 n=Array.prototype.slice.call(arguments).join(" "),t.addClass(n)},remove:function(n){return n=Array.prototype.slice.call(arguments).join(" "),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.add("c1","c2"),h.classList.contains("c2"))||(tt=DOMTokenList.prototype.add,it=DOMTokenList.prototype.remove,DOMTokenList.prototype.add=function(){Array.prototype.forEach.call(arguments,tt.bind(this))},DOMTokenList.prototype.remove=function(){Array.prototype.forEach.call(arguments,it.bind(this))});(h.classList.toggle("c3",!1),h.classList.contains("c3"))&&(rt=DOMTokenList.prototype.toggle,DOMTokenList.prototype.toggle=function(n,t){return 1 in arguments&&!this.contains(n)==!t?t:rt.call(this,n)});h=null;String.prototype.startsWith||(y=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(n){}return i}(),nt={}.toString,y?y(String.prototype,"startsWith",{value:ut,configurable:!0,writable:!0}):String.prototype.startsWith=ut);Object.keys||(Object.keys=function(n,t,i){for(t in i=[],n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});HTMLSelectElement&&!HTMLSelectElement.prototype.hasOwnProperty("selectedOptions")&&Object.defineProperty(HTMLSelectElement.prototype,"selectedOptions",{get:function(){return this.querySelectorAll(":checked")}});c={useDefault:!1,_set:n.valHooks.select.set};n.valHooks.select.set=function(t,i){return i&&!c.useDefault&&n(t).data("selected",!0),c._set.apply(this,arguments)};s=null;et=function(){try{return new Event("change"),!0}catch(n){return!1}}();n.fn.triggerNative=function(n){var t,i=this[0];i.dispatchEvent?(et?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 ti={"À":"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"},ii=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ri=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");a=(p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w="(?:"+Object.keys(p).join("|")+")",ht=RegExp(w),ct=RegExp(w,"g"),function(n){return n=null==n?"":""+n,ht.test(n)?n.replace(ct,fi):n});var ei={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"},lt=27,oi=13,v=32,b=9,k=38,d=40,f={success:!1,major:"3"};try{f.full=(n.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".");f.major=f.full[0];f.success=!0}catch(e){}var at=0,r=".bs.select",t={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},vt={MENU:"."+t.MENU},i={div:document.createElement("div"),span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};i.noResults=i.li.cloneNode(!1);i.noResults.className="no-results";i.a.setAttribute("role","option");i.a.className="dropdown-item";i.subtext.className="text-muted";i.text=i.span.cloneNode(!1);i.text.className="text";i.checkMark=i.span.cloneNode(!1);var si=new RegExp(k+"|"+d),hi=new RegExp("^"+b+"$|"+lt),o={li:function(n,t,r){var u=i.li.cloneNode(!1);return n&&(1===n.nodeType||11===n.nodeType?u.appendChild(n):u.innerHTML=n),void 0!==t&&""!==t&&(u.className=t),null!=r&&u.classList.add("optgroup-"+r),u},a:function(n,t,r){var u=i.a.cloneNode(!0);return n&&(11===n.nodeType?u.appendChild(n):u.insertAdjacentHTML("beforeend",n)),void 0!==t&&""!==t&&u.classList.add.apply(u.classList,t.split(/\s+/)),r&&u.setAttribute("style",r),u},text:function(n,t){var u,f,r=i.text.cloneNode(!1),e;if(n.content?r.innerHTML=n.content:((r.textContent=n.text,n.icon)&&(e=i.whitespace.cloneNode(!1),(f=(!0===t?i.i:i.span).cloneNode(!1)).className=this.options.iconBase+" "+n.icon,i.fragment.appendChild(f),i.fragment.appendChild(e)),n.subtext&&((u=i.subtext.cloneNode(!1)).textContent=n.subtext,r.appendChild(u))),!0===t)for(;0<r.childNodes.length;)i.fragment.appendChild(r.childNodes[0]);else i.fragment.appendChild(r);return i.fragment},label:function(n){var r,u,t=i.text.cloneNode(!1),f;return(t.innerHTML=n.display,n.icon)&&(f=i.whitespace.cloneNode(!1),(u=i.span.cloneNode(!1)).className=this.options.iconBase+" "+n.icon,i.fragment.appendChild(u),i.fragment.appendChild(f)),n.subtext&&((r=i.subtext.cloneNode(!1)).textContent=n.subtext,t.appendChild(r)),i.fragment.appendChild(t),i.fragment}},u=function(t,i){var f=this,r;c.useDefault||(n.valHooks.select.set=c._set,c.useDefault=!0);this.$element=n(t);this.$newElement=null;this.$button=null;this.$menu=null;this.options=i;this.selectpicker={main:{},search:{},current:{},view:{},isSearching:!1,keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){f.selectpicker.keydown.keyHistory=""},800)}}}};this.sizeInfo={};null===this.options.title&&(this.options.title=this.$element.attr("title"));r=this.options.windowPadding;"number"==typeof r&&(this.options.windowPadding=[r,r,r,r]);this.val=u.prototype.val;this.render=u.prototype.render;this.refresh=u.prototype.refresh;this.setStyle=u.prototype.setStyle;this.selectAll=u.prototype.selectAll;this.deselectAll=u.prototype.deselectAll;this.destroy=u.prototype.destroy;this.remove=u.prototype.remove;this.show=u.prototype.show;this.hide=u.prototype.hide;this.init()};u.VERSION="1.13.18";u.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:t.ICONBASE,tickIcon:t.TICKICON,showTick:!1,template:{caret:'<span class="caret"><\/span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};u.prototype={constructor:u,init:function(){var n=this,f=this.$element.attr("id"),i=this.$element[0],u=i.form;at++;this.selectId="bs-select-"+at;i.classList.add("bs-select-hidden");this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");i.classList.contains("show-tick")&&(this.options.showTick=!0);this.$newElement=this.createDropdown();this.buildData();this.$element.after(this.$newElement).prependTo(this.$newElement);u&&null===i.form&&(u.id||(u.id="form-"+this.selectId),i.setAttribute("form",u.id));this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(vt.MENU);this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");i.classList.remove("bs-select-hidden");!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(t.MENURIGHT);void 0!==f&&this.$button.attr("data-id",f);this.checkDisabled();this.clickListener();this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0];this.setStyle();this.render();this.setWidth();this.options.container?this.selectPosition():this.$element.on("hide"+r,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.$element.trigger("hide"+r,t)},"hidden.bs.dropdown":function(t){n.$element.trigger("hidden"+r,t)},"show.bs.dropdown":function(t){n.$element.trigger("show"+r,t)},"shown.bs.dropdown":function(t){n.$element.trigger("shown"+r,t)}});i.hasAttribute("required")&&this.$element.on("invalid"+r,function(){n.$button[0].classList.add("bs-invalid");n.$element.on("shown"+r+".invalid",function(){n.$element.val(n.$element.val()).off("shown"+r+".invalid")}).on("rendered"+r,function(){this.validity.valid&&n.$button[0].classList.remove("bs-invalid");n.$element.off("rendered"+r)});n.$button.on("blur"+r,function(){n.$element.trigger("focus").trigger("blur");n.$button.off("blur"+r)})});setTimeout(function(){n.buildList();n.$element.trigger("loaded"+r)})},createDropdown:function(){var h=this.multiple||this.options.showTick?" show-tick":"",c=this.multiple?' aria-multiselectable="true"':"",i="",l=this.autofocus?" autofocus":"";f.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var r,u="",e="",o="",s="";return this.options.header&&(u='<div class="'+t.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>"),this.options.liveSearch&&(e='<div class="bs-searchbox"><input type="search" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+a(this.options.liveSearchPlaceholder)+'"')+' role="combobox" aria-label="Search" aria-controls="'+this.selectId+'" aria-autocomplete="list"><\/div>'),this.multiple&&this.options.actionsBox&&(o='<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&&(s='<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>"),r='<div class="dropdown bootstrap-select'+h+i+'"><button type="button" tabindex="-1" class="'+this.options.styleBase+' dropdown-toggle" '+("static"===this.options.display?'data-display="static"':"")+'data-toggle="dropdown"'+l+' role="combobox" aria-owns="'+this.selectId+'" aria-haspopup="listbox" aria-expanded="false"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"><\/div><\/div> <\/div>'+("4"===f.major?"":'<span class="bs-caret">'+this.options.template.caret+"<\/span>")+'<\/button><div class="'+t.MENU+" "+("4"===f.major?"":t.SHOW)+'">'+u+e+o+'<div class="inner '+t.SHOW+'" role="listbox" id="'+this.selectId+'" tabindex="-1" '+c+'><ul class="'+t.MENU+" inner "+("4"===f.major?t.SHOW:"")+'" role="presentation"><\/ul><\/div>'+s+"<\/div><\/div>",n(r)},setPositionData:function(){var t,n,i;for(this.selectpicker.view.canHighlight=[],this.selectpicker.view.size=0,this.selectpicker.view.firstHighlightIndex=!1,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),i&&(this.selectpicker.view.size++,n.posinset=this.selectpicker.view.size,!1===this.selectpicker.view.firstHighlightIndex&&(this.selectpicker.view.firstHighlightIndex=t)),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(i,u,f){function a(n,t){var c,l,rt,ut,s,b,ft,et,f=e.selectpicker.current.elements.length,k=[],ot=!0,o=e.isVirtual(),r,a,at,vt,w,nt,tt,it,yt,h;for(e.selectpicker.view.scrollTop=n,c=Math.ceil(e.sizeInfo.menuInnerHeight/e.sizeInfo.liHeight*1.5),l=Math.round(f/c)||1,r=0;r<l;r++){if(a=(r+1)*c,r===l-1&&(a=f),k[r]=[r*c+(r?1:0),a],!f)break;void 0===s&&n-1<=e.selectpicker.current.data[a-1].position-e.sizeInfo.menuInnerHeight&&(s=r)}if(void 0===s&&(s=0),b=[e.selectpicker.view.position0,e.selectpicker.view.position1],rt=Math.max(0,s-1),ut=Math.min(l-1,s+1),e.selectpicker.view.position0=!1===o?0:Math.max(0,k[rt][0])||0,e.selectpicker.view.position1=!1===o?f:Math.min(f,k[ut][1])||0,ft=b[0]!==e.selectpicker.view.position0||b[1]!==e.selectpicker.view.position1,void 0!==e.activeIndex&&(y=e.selectpicker.main.elements[e.prevActiveIndex],p=e.selectpicker.main.elements[e.activeIndex],v=e.selectpicker.main.elements[e.selectedIndex],t&&(e.activeIndex!==e.selectedIndex&&e.defocusItem(p),e.activeIndex=void 0),e.activeIndex&&e.activeIndex!==e.selectedIndex&&e.defocusItem(v)),void 0!==e.prevActiveIndex&&e.prevActiveIndex!==e.activeIndex&&e.prevActiveIndex!==e.selectedIndex&&e.defocusItem(y),(t||ft)&&(et=e.selectpicker.view.visibleElements?e.selectpicker.view.visibleElements.slice():[],e.selectpicker.view.visibleElements=!1===o?e.selectpicker.current.elements:e.selectpicker.current.elements.slice(e.selectpicker.view.position0,e.selectpicker.view.position1),e.setOptionStatus(),(i||!1===o&&t)&&(ot=!function(n,t){return n.length===t.length&&n.every(function(n,i){return n===t[i]})}(et,e.selectpicker.view.visibleElements)),(t||!0===o)&&ot)){var st,ht,u=e.$menuInner[0],ct=document.createDocumentFragment(),pt=u.firstChild.cloneNode(!1),lt=e.selectpicker.view.visibleElements,d=[];for(u.replaceChild(pt,u.firstChild),r=0,at=lt.length;r<at;r++)nt=lt[r],e.options.sanitize&&(vt=nt.lastChild)&&(w=e.selectpicker.current.data[r+e.selectpicker.view.position0])&&w.content&&!w.sanitized&&(d.push(vt),w.sanitized=!0),ct.appendChild(nt);(e.options.sanitize&&d.length&&g(d,e.options.whiteList,e.options.sanitizeFn),!0===o?(st=0===e.selectpicker.view.position0?0:e.selectpicker.current.data[e.selectpicker.view.position0-1].position,ht=e.selectpicker.view.position1>f-1?0:e.selectpicker.current.data[f-1].position-e.selectpicker.current.data[e.selectpicker.view.position1-1].position,u.firstChild.style.marginTop=st+"px",u.firstChild.style.marginBottom=ht+"px"):(u.firstChild.style.marginTop=0,u.firstChild.style.marginBottom=0),u.firstChild.appendChild(ct),!0===o&&e.sizeInfo.hasScrollBar)&&(tt=u.firstChild.offsetWidth,t&&tt<e.sizeInfo.menuInnerInnerWidth&&e.sizeInfo.totalMenuWidth>e.sizeInfo.selectWidth?u.firstChild.style.minWidth=e.sizeInfo.menuInnerInnerWidth+"px":tt>e.sizeInfo.menuInnerInnerWidth&&(e.$menu[0].style.minWidth=0,it=u.firstChild.offsetWidth,it>e.sizeInfo.menuInnerInnerWidth&&(e.sizeInfo.menuInnerInnerWidth=it,u.firstChild.style.minWidth=e.sizeInfo.menuInnerInnerWidth+"px"),e.$menu[0].style.minWidth=""))}(e.prevActiveIndex=e.activeIndex,e.options.liveSearch)?i&&t&&(h=0,e.selectpicker.view.canHighlight[h]||(h=1+e.selectpicker.view.canHighlight.slice(1).indexOf(!0)),yt=e.selectpicker.view.visibleElements[h],e.defocusItem(e.selectpicker.view.currentActive),e.activeIndex=(e.selectpicker.current.data[h]||{}).index,e.focusItem(yt)):e.$menuInner.trigger("focus")}var v,y,e=this,o=0,p=[],s,h,c,l;(this.selectpicker.isSearching=i,this.selectpicker.current=i?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),u)&&(f?o=this.$menuInner[0].scrollTop:e.multiple||(s=e.$element[0],h=(s.options[s.selectedIndex]||{}).liIndex,"number"==typeof h&&!1!==e.options.size&&(c=e.selectpicker.main.data[h],l=c&&c.position,l&&(o=l-(e.sizeInfo.menuInnerHeight+e.sizeInfo.liHeight)/2))));a(o,!0);this.$menuInner.off("scroll.createView").on("scroll.createView",function(n,t){e.noScroll||a(this.scrollTop,t);e.noScroll=!1});n(window).off("resize"+r+"."+this.selectId+".createView").on("resize"+r+"."+this.selectId+".createView",function(){e.$newElement.hasClass(t.SHOW)&&a(e.$menuInner[0].scrollTop)})},focusItem:function(n,t,i){if(n){t=t||this.selectpicker.main.data[this.activeIndex];var r=n.firstChild;r&&(r.setAttribute("aria-setsize",this.selectpicker.view.size),r.setAttribute("aria-posinset",t.posinset),!0!==i&&(this.focusedParent.setAttribute("aria-activedescendant",r.id),n.classList.add("active"),r.classList.add("active")))}},defocusItem:function(n){n&&(n.classList.remove("active"),n.firstChild&&n.firstChild.classList.remove("active"))},setPlaceholder:function(){var i=this,r=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option"));r=!0;var n=this.$element[0],u=!1,f=!this.selectpicker.view.titleOption.parentNode,e=n.selectedIndex,o=n.options[e],t=window.performance&&window.performance.getEntriesByType("navigation"),s=t&&t.length?"back_forward"!==t[0].type:2!==window.performance.navigation.type;f&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",u=!o||0===e&&!1===o.defaultSelected&&void 0===this.$element.data("selected"));!f&&0===this.selectpicker.view.titleOption.index||n.insertBefore(this.selectpicker.view.titleOption,n.firstChild);u&&s?n.selectedIndex=0:"complete"!==document.readyState&&window.addEventListener("pageshow",function(){i.selectpicker.view.displayedValue!==n.value&&i.render()})}return r},buildData:function(){function f(t){var i=n[n.length-1];i&&"divider"===i.type&&(i.optID||t.optID)||((t=t||{}).type="divider",n.push(t))}function s(t,i){if((i=i||{}).divider="true"===t.getAttribute("data-divider"),i.divider)f({optID:i.optID});else{var u=n.length,e=t.style.cssText,o=e?a(e):"",r=(t.className||"")+(i.optgroupClass||"");i.optID&&(r="opt "+r);i.optionClass=r.trim();i.inlineStyle=o;i.text=t.textContent;i.content=t.getAttribute("data-content");i.tokens=t.getAttribute("data-tokens");i.subtext=t.getAttribute("data-subtext");i.icon=t.getAttribute("data-icon");t.liIndex=u;i.display=i.content||i.text;i.type="option";i.index=u;i.option=t;i.selected=!!t.selected;i.disabled=i.disabled||!!t.disabled;n.push(i)}}function c(t,r){var e=r[t],b=!(t-1<o)&&r[t-1],k=r[t+1],l=e.querySelectorAll("option"+u),y,p,h,c,v,w;if(l.length){for(h={display:a(e.label),subtext:e.getAttribute("data-subtext"),icon:e.getAttribute("data-icon"),type:"optgroup-label",optgroupClass:" "+(e.className||"")},i++,b&&f({optID:i}),h.optID=i,n.push(h),c=0,v=l.length;c<v;c++)w=l[c],0===c&&(p=(y=n.length-1)+v),s(w,{headerIndex:y,lastIndex:p,optID:h.optID,optgroupClass:h.optgroupClass,disabled:e.disabled});k&&f({optID:i})}}var u=':not([hidden]):not([data-hidden="true"])',n=[],i=0,o=this.setPlaceholder()?1:0,r,h,t,e;for(this.options.hideDisabled&&(u+=":not(:disabled)"),r=this.$element[0].querySelectorAll("select > *"+u),h=r.length,t=o;t<h;t++)e=r[t],"OPTGROUP"!==e.tagName?s(e,{}):c(t,r);this.selectpicker.main.data=this.selectpicker.current.data=n},buildList:function(){function h(i){var u,f=0;switch(i.type){case"divider":u=o.li(!1,t.DIVIDER,i.optID?i.optID+"div":void 0);break;case"option":(u=o.li(o.a(o.text.call(n,i),i.optionClass,i.inlineStyle),"",i.optID)).firstChild&&(u.firstChild.id=n.selectId+"-"+i.index);break;case"optgroup-label":u=o.li(o.label.call(n,i),"dropdown-header"+i.optgroupClass,i.optID)}i.element=u;r.push(u);i.display&&(f+=i.display.length);i.subtext&&(f+=i.subtext.length);i.icon&&(f+=1);e<f&&(e=f,n.selectpicker.view.widestOption=r[r.length-1])}var n=this,f=this.selectpicker.main.data,r=[],e=0,s,u;for((n.options.showTick||n.multiple)&&!i.checkMark.parentNode&&(i.checkMark.className=this.options.iconBase+" "+n.options.tickIcon+" check-mark",i.a.appendChild(i.checkMark)),s=f.length,u=0;u<s;u++)h(f[u]);this.selectpicker.main.elements=this.selectpicker.current.elements=r},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){var b,t=this,y=this.$element[0],rt=this.setPlaceholder()&&0===y.selectedIndex,a=ft(y,this.options.hideDisabled),u=a.length,e=this.$button[0],k=e.querySelector(".filter-option-inner-inner"),ut=document.createTextNode(this.options.multipleSeparator),n=i.fragment.cloneNode(!1),tt=!1,s,v,d,it,nt,w;if(e.classList.toggle("bs-placeholder",t.multiple?!u:!l(y,a)),t.multiple||1!==a.length||(t.selectpicker.view.displayedValue=l(y,a)),"static"===this.options.selectedTextFormat)n=o.text.call(this,{text:this.options.title},!0);else if(!1===(this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&1<u&&(1<(b=this.options.selectedTextFormat.split(">")).length&&u>b[1]||1===b.length&&2<=u))){if(!rt){for(s=0;s<u&&s<50;s++){var p=a[s],h=this.selectpicker.main.data[p.liIndex],c={};this.multiple&&0<s&&n.appendChild(ut.cloneNode(!1));p.title?c.text=p.title:h&&(h.content&&t.options.showContent?(c.content=h.content.toString(),tt=!0):(t.options.showIcon&&(c.icon=h.icon),t.options.showSubtext&&!t.multiple&&h.subtext&&(c.subtext=" "+h.subtext),c.text=p.textContent.trim()));n.appendChild(o.text.call(this,c,!0))}49<u&&n.appendChild(document.createTextNode("..."))}}else v=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])',this.options.hideDisabled&&(v+=":not(:disabled)"),d=this.$element[0].querySelectorAll("select > option"+v+", optgroup"+v+" option"+v).length,it="function"==typeof this.options.countSelectedText?this.options.countSelectedText(u,d):this.options.countSelectedText,n=o.text.call(this,{text:it.replace("{0}",u.toString()).replace("{1}",d.toString())},!0);(null==this.options.title&&(this.options.title=this.$element.attr("title")),n.childNodes.length||(n=o.text.call(this,{text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),e.title=n.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&tt&&g([n],t.options.whiteList,t.options.sanitizeFn),k.innerHTML="",k.appendChild(n),f.major<4&&this.$newElement[0].classList.contains("bs3-has-addon"))&&(nt=e.querySelector(".filter-expand"),w=k.cloneNode(!0),w.className="filter-expand",nt?e.replaceChild(w,nt):e.appendChild(w));this.$element.trigger("rendered"+r)},setStyle:function(n,t){var u,i=this.$button[0],r=this.$newElement[0],e=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));f.major<4&&(r.classList.add("bs3"),r.parentNode.classList&&r.parentNode.classList.contains("input-group")&&(r.previousElementSibling||r.nextElementSibling)&&(r.previousElementSibling||r.nextElementSibling).classList.contains("input-group-addon")&&r.classList.add("bs3-has-addon"));u=n?n.trim():e;"add"==t?u&&i.classList.add.apply(i.classList,u.split(" ")):"remove"==t?u&&i.classList.remove.apply(i.classList,u.split(" ")):(e&&i.classList.remove.apply(i.classList,e.split(" ")),u&&i.classList.add.apply(i.classList,u.split(" ")))},liHeight:function(r){var d,it,rt;if(r||!1!==this.options.size&&!Object.keys(this.sizeInfo).length){var l,a=i.div.cloneNode(!1),o=i.div.cloneNode(!1),y=i.div.cloneNode(!1),h=document.createElement("ul"),nt=i.li.cloneNode(!1),v=i.li.cloneNode(!1),tt=i.a.cloneNode(!1),p=i.span.cloneNode(!1),w=this.options.header&&0<this.$menu.find("."+t.POPOVERHEADER).length?this.$menu.find("."+t.POPOVERHEADER)[0].cloneNode(!0):null,c=this.options.liveSearch?i.div.cloneNode(!1):null,b=this.options.actionsBox&&this.multiple&&0<this.$menu.find(".bs-actionsbox").length?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,k=this.options.doneButton&&this.multiple&&0<this.$menu.find(".bs-donebutton").length?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,ft=this.$element.find("option")[0];if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,p.className="text",tt.className="dropdown-item "+(ft?ft.className:""),a.className=this.$menu[0].parentNode.className+" "+t.SHOW,a.style.width=0,"auto"===this.options.width&&(o.style.minWidth=0),o.className=t.MENU+" "+t.SHOW,y.className="inner "+t.SHOW,h.className=t.MENU+" inner "+("4"===f.major?t.SHOW:""),nt.className=t.DIVIDER,v.className="dropdown-header",p.appendChild(document.createTextNode("​")),this.selectpicker.current.data.length){for(d=0;d<this.selectpicker.current.data.length;d++)if(it=this.selectpicker.current.data[d],"option"===it.type){l=it.element;break}}else l=i.li.cloneNode(!1),tt.appendChild(p),l.appendChild(tt);(v.appendChild(p.cloneNode(!0)),this.selectpicker.view.widestOption&&h.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),h.appendChild(l),h.appendChild(nt),h.appendChild(v),w&&o.appendChild(w),c)&&(rt=document.createElement("input"),c.className="bs-searchbox",rt.className="form-control",c.appendChild(rt),o.appendChild(c));b&&o.appendChild(b);y.appendChild(h);o.appendChild(y);k&&o.appendChild(k);a.appendChild(o);document.body.appendChild(a);var et,ot=l.offsetHeight,st=v?v.offsetHeight:0,ht=w?w.offsetHeight:0,ct=c?c.offsetHeight:0,lt=b?b.offsetHeight:0,at=k?k.offsetHeight:0,vt=n(nt).outerHeight(!0),u=!!window.getComputedStyle&&window.getComputedStyle(o),ut=o.offsetWidth,s=u?null:n(o),g={vert:e(u?u.paddingTop:s.css("paddingTop"))+e(u?u.paddingBottom:s.css("paddingBottom"))+e(u?u.borderTopWidth:s.css("borderTopWidth"))+e(u?u.borderBottomWidth:s.css("borderBottomWidth")),horiz:e(u?u.paddingLeft:s.css("paddingLeft"))+e(u?u.paddingRight:s.css("paddingRight"))+e(u?u.borderLeftWidth:s.css("borderLeftWidth"))+e(u?u.borderRightWidth:s.css("borderRightWidth"))},yt={vert:g.vert+e(u?u.marginTop:s.css("marginTop"))+e(u?u.marginBottom:s.css("marginBottom"))+2,horiz:g.horiz+e(u?u.marginLeft:s.css("marginLeft"))+e(u?u.marginRight:s.css("marginRight"))+2};y.style.overflowY="scroll";et=o.offsetWidth-ut;document.body.removeChild(a);this.sizeInfo.liHeight=ot;this.sizeInfo.dropdownHeaderHeight=st;this.sizeInfo.headerHeight=ht;this.sizeInfo.searchHeight=ct;this.sizeInfo.actionsHeight=lt;this.sizeInfo.doneButtonHeight=at;this.sizeInfo.dividerHeight=vt;this.sizeInfo.menuPadding=g;this.sizeInfo.menuExtras=yt;this.sizeInfo.menuWidth=ut;this.sizeInfo.menuInnerInnerWidth=ut-g.horiz;this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth;this.sizeInfo.scrollBarWidth=et;this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight;this.setPositionData()}},getSelectPosition:function(){var t,u=n(window),f=this.$newElement.offset(),i=n(this.options.container),r;this.options.container&&i.length&&!i.is("body")?((t=i.offset()).top+=parseInt(i.css("borderTopWidth")),t.left+=parseInt(i.css("borderLeftWidth"))):t={top:0,left:0};r=this.options.windowPadding;this.sizeInfo.selectOffsetTop=f.top-t.top-u.scrollTop();this.sizeInfo.selectOffsetBot=u.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-t.top-r[2];this.sizeInfo.selectOffsetLeft=f.left-t.left-u.scrollLeft();this.sizeInfo.selectOffsetRight=u.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-t.left-r[1];this.sizeInfo.selectOffsetTop-=r[0];this.sizeInfo.selectOffsetLeft-=r[3]},setMenuSize:function(){var f;this.getSelectPosition();var r,n,e,o,s,h,y,u,b=this.sizeInfo.selectWidth,p=this.sizeInfo.liHeight,c=this.sizeInfo.headerHeight,l=this.sizeInfo.searchHeight,a=this.sizeInfo.actionsHeight,v=this.sizeInfo.doneButtonHeight,k=this.sizeInfo.dividerHeight,i=this.sizeInfo.menuPadding,w=0;if(this.options.dropupAuto&&(y=p*this.selectpicker.current.elements.length+i.vert,u=this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&y+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot,!0===this.selectpicker.isSearching&&(u=this.selectpicker.dropup),this.$newElement.toggleClass(t.DROPUP,u),this.selectpicker.dropup=u),"auto"===this.options.size)o=3<this.selectpicker.current.elements.length?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,n=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,e=o+c+l+a+v,h=Math.max(o-i.vert,0),this.$newElement.hasClass(t.DROPUP)&&(n=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),r=(s=n)-c-l-a-v-i.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(f=0;f<this.options.size;f++)"divider"===this.selectpicker.current.data[f].type&&w++;r=(n=p*this.options.size+w*k+i.vert)-i.vert;s=n+c+l+a+v;e=h=""}this.$menu.css({"max-height":s+"px",overflow:"hidden","min-height":e+"px"});this.$menuInner.css({"max-height":r+"px","overflow-y":"auto","min-height":h+"px"});this.sizeInfo.menuInnerHeight=Math.max(r,1);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);"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(t.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-b);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 i=this,u=n(window);this.setMenuSize();this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return i.setMenuSize()});"auto"===this.options.size?u.off("resize"+r+"."+this.selectId+".setMenuSize scroll"+r+"."+this.selectId+".setMenuSize").on("resize"+r+"."+this.selectId+".setMenuSize scroll"+r+"."+this.selectId+".setMenuSize",function(){return i.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&u.off("resize"+r+"."+this.selectId+".setMenuSize scroll"+r+"."+this.selectId+".setMenuSize")}this.createView(!1,!0,t)},setWidth:function(){var n=this;"auto"===this.options.width?requestAnimationFrame(function(){n.$menu.css("min-width","0");n.$element.on("loaded"+r,function(){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[0].classList.remove("fit-width")},selectPosition:function(){function s(r){var s={},c=i.options.display||!!n.fn.dropdown.Constructor.Default&&n.fn.dropdown.Constructor.Default.display;i.$bsContainer.addClass(r.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(t.DROPUP,r.hasClass(t.DROPUP));o=r.offset();u.is("body")?e={top:0,left:0}:((e=u.offset()).top+=parseInt(u.css("borderTopWidth"))-u.scrollTop(),e.left+=parseInt(u.css("borderLeftWidth"))-u.scrollLeft());h=r.hasClass(t.DROPUP)?0:r[0].offsetHeight;(f.major<4||"static"===c)&&(s.top=o.top-e.top+h,s.left=o.left-e.left);s.width=r[0].offsetWidth;i.$bsContainer.css(s)}this.$bsContainer=n('<div class="bs-container" />');var o,e,h,i=this,u=n(this.options.container);this.$button.on("click.bs.dropdown.data-api",function(){i.isDisabled()||(s(i.$newElement),i.$bsContainer.appendTo(i.options.container).toggleClass(t.SHOW,!i.$button.hasClass(t.SHOW)).append(i.$menu))});n(window).off("resize"+r+"."+this.selectId+" scroll"+r+"."+this.selectId).on("resize"+r+"."+this.selectId+" scroll"+r+"."+this.selectId,function(){i.$newElement.hasClass(t.SHOW)&&s(i.$newElement)});this.$element.on("hide"+r,function(){i.$menu.data("height",i.$menu.height());i.$bsContainer.detach()})},setOptionStatus:function(n){var t=this,r,i,u;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(r=0;r<t.selectpicker.view.visibleElements.length;r++)i=t.selectpicker.current.data[r+t.selectpicker.view.position0],u=i.option,u&&(!0!==n&&t.setDisabled(i.index,i.disabled),t.setSelected(i.index,u.selected))},setSelected:function(n,t){var u,i,r=this.selectpicker.main.elements[n],f=this.selectpicker.main.data[n],e=void 0!==this.activeIndex,o=this.activeIndex===n||t&&!this.multiple&&!e;f.selected=t;i=r.firstChild;t&&(this.selectedIndex=n);r.classList.toggle("selected",t);o?(this.focusItem(r,f),this.selectpicker.view.currentActive=r,this.activeIndex=n):this.defocusItem(r);i&&(i.classList.toggle("selected",t),t?i.setAttribute("aria-selected",!0):this.multiple?i.setAttribute("aria-selected",!1):i.removeAttribute("aria-selected"));o||e||!t||void 0===this.prevActiveIndex||(u=this.selectpicker.main.elements[this.prevActiveIndex],this.defocusItem(u))},setDisabled:function(n,i){var r,u=this.selectpicker.main.elements[n];this.selectpicker.main.data[n].disabled=i;r=u.firstChild;u.classList.toggle(t.DISABLED,i);r&&("4"===f.major&&r.classList.toggle(t.DISABLED,i),i?(r.setAttribute("aria-disabled",i),r.setAttribute("tabindex",-1)):(r.removeAttribute("aria-disabled"),r.setAttribute("tabindex",0)))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){this.isDisabled()?(this.$newElement[0].classList.add(t.DISABLED),this.$button.addClass(t.DISABLED).attr("aria-disabled",!0)):this.$button[0].classList.contains(t.DISABLED)&&(this.$newElement[0].classList.remove(t.DISABLED),this.$button.removeClass(t.DISABLED).attr("aria-disabled",!1))},clickListener:function(){function e(){i.options.liveSearch?i.$searchbox.trigger("focus"):i.$menuInner.trigger("focus")}function o(){i.dropdown&&i.dropdown._popper&&i.dropdown._popper.state.isCreated?e():requestAnimationFrame(o)}var i=this,u=n(document);u.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&u.data("spaceSelect")&&(n.preventDefault(),u.data("spaceSelect",!1))});this.$newElement.on("show.bs.dropdown",function(){3<f.major&&!i.dropdown&&(i.dropdown=i.$button.data("bs.dropdown"),i.dropdown._menu=i.$menu[0])});this.$button.on("click.bs.dropdown.data-api",function(){i.$newElement.hasClass(t.SHOW)||i.setSize()});this.$element.on("shown"+r,function(){i.$menuInner[0].scrollTop!==i.selectpicker.view.scrollTop&&(i.$menuInner[0].scrollTop=i.selectpicker.view.scrollTop);3<f.major?requestAnimationFrame(o):e()});this.$menuInner.on("mouseenter","li a",function(){var n=this.parentElement,t=i.isVirtual()?i.selectpicker.view.position0:0,r=Array.prototype.indexOf.call(n.parentElement.children,n),u=i.selectpicker.current.data[r+t];i.focusItem(n,u,!0)});this.$menuInner.on("click","li a",function(u,f){var rt=n(this),c=i.$element[0],lt=i.isVirtual()?i.selectpicker.view.position0:0,ut=i.selectpicker.current.data[rt.parent().index()+lt],a=ut.index,at=l(c),et=c.selectedIndex,ot=c.options[et],w=!0,k,d,p,g;if(i.multiple&&1!==i.options.maxOptions&&u.stopPropagation(),u.preventDefault(),!i.isDisabled()&&!rt.parent().hasClass(t.DISABLED)){var h=ut.option,st=n(h),ht=h.selected,b=st.parent("optgroup"),ct=b.find("option"),e=i.options.maxOptions,o=b.data("maxOptions")||!1;if(a===i.activeIndex&&(f=!0),f||(i.prevActiveIndex=i.activeIndex,i.activeIndex=void 0),i.multiple){if((h.selected=!ht,i.setSelected(a,!ht),i.focusedParent.focus(),!1!==e||!1!==o)&&(k=e<ft(c).length,d=o<b.find("option:selected").length,e&&k||o&&d))if(e&&1==e)c.selectedIndex=-1,h.selected=!0,i.setOptionStatus(!0);else if(o&&1==o){for(p=0;p<ct.length;p++)g=ct[p],g.selected=!1,i.setSelected(g.liIndex,!1);h.selected=!0;i.setSelected(a,!0)}else{var nt="string"==typeof i.options.maxOptionsText?[i.options.maxOptionsText,i.options.maxOptionsText]:i.options.maxOptionsText,v="function"==typeof nt?nt(e,o):nt,tt=v[0].replace("{n}",e),it=v[1].replace("{n}",o),y=n('<div class="notify"><\/div>');v[2]&&(tt=tt.replace("{var}",v[2][1<e?0:1]),it=it.replace("{var}",v[2][1<o?0:1]));h.selected=!1;i.$menu.append(y);e&&k&&(y.append(n("<div>"+tt+"<\/div>")),w=!1,i.$element.trigger("maxReached"+r));o&&d&&(y.append(n("<div>"+it+"<\/div>")),w=!1,i.$element.trigger("maxReachedGrp"+r));setTimeout(function(){i.setSelected(a,!1)},10);y[0].classList.add("fadeOut");setTimeout(function(){y.remove()},1050)}}else ot&&(ot.selected=!1),h.selected=!0,i.setSelected(a,!0);!i.multiple||i.multiple&&1===i.options.maxOptions?i.$button.trigger("focus"):i.options.liveSearch&&i.$searchbox.trigger("focus");w&&(!i.multiple&&et===c.selectedIndex||(s=[h.index,st.prop("selected"),at],i.$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(),i.options.liveSearch&&!n(t.target).hasClass("close")?i.$searchbox.trigger("focus"):i.$button.trigger("focus"))});this.$menuInner.on("click",".divider, .dropdown-header",function(n){n.preventDefault();n.stopPropagation();i.options.liveSearch?i.$searchbox.trigger("focus"):i.$button.trigger("focus")});this.$menu.on("click","."+t.POPOVERHEADER+" .close",function(){i.$button.trigger("click")});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(t){i.options.liveSearch?i.$searchbox.trigger("focus"):i.$button.trigger("focus");t.preventDefault();t.stopPropagation();n(this).hasClass("bs-select-all")?i.selectAll():i.deselectAll()});this.$button.on("focus"+r,function(n){var t=i.$element[0].getAttribute("tabindex");void 0!==t&&n.originalEvent&&n.originalEvent.isTrusted&&(this.setAttribute("tabindex",t),i.$element[0].setAttribute("tabindex",-1),i.selectpicker.view.tabindex=t)}).on("blur"+r,function(n){void 0!==i.selectpicker.view.tabindex&&n.originalEvent&&n.originalEvent.isTrusted&&(i.$element[0].setAttribute("tabindex",i.selectpicker.view.tabindex),this.setAttribute("tabindex",-1),i.selectpicker.view.tabindex=void 0)});this.$element.on("change"+r,function(){i.render();i.$element.trigger("changed"+r,s);s=null}).on("focus"+r,function(){i.options.mobile||i.$button[0].focus()})},liveSearchListener:function(){var n=this;this.$button.on("click.bs.dropdown.data-api",function(){n.$searchbox.val()&&(n.$searchbox.val(""),n.selectpicker.search.previousValue=void 0)});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 e=n.$searchbox[0].value,t,r,h;if(n.selectpicker.search.elements=[],n.selectpicker.search.data=[],e){var o=[],s=e.toUpperCase(),u={},f=[],y=n._searchStyle(),c=n.options.liveSearchNormalize;for(c&&(s=st(s)),t=0;t<n.selectpicker.main.data.length;t++)r=n.selectpicker.main.data[t],u[t]||(u[t]=ot(r,s,y,c)),u[t]&&void 0!==r.headerIndex&&-1===f.indexOf(r.headerIndex)&&(0<r.headerIndex&&(u[r.headerIndex-1]=!0,f.push(r.headerIndex-1)),u[r.headerIndex]=!0,f.push(r.headerIndex),u[r.lastIndex+1]=!0),u[t]&&"optgroup-label"!==r.type&&f.push(t);for(t=0,h=f.length;t<h;t++){var l=f[t],p=f[t-1],v=(r=n.selectpicker.main.data[l],n.selectpicker.main.data[p]);("divider"!==r.type||"divider"===r.type&&v&&"divider"!==v.type&&h-1!==t)&&(n.selectpicker.search.data.push(r),o.push(n.selectpicker.main.elements[l]))}n.activeIndex=void 0;n.noScroll=!0;n.$menuInner.scrollTop(0);n.selectpicker.search.elements=o;n.createView(!0),function(n,t){n.length||(i.noResults.innerHTML=this.options.noneResultsText.replace("{0}",'"'+a(t)+'"'),this.$menuInner[0].firstChild.appendChild(i.noResults))}.call(n,o,e)}else n.selectpicker.search.previousValue&&(n.$menuInner.scrollTop(0),n.createView(!1));n.selectpicker.search.previousValue=e})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(n){var i=this.$element[0],f,u;return void 0===n?this.$element.val():(f=l(i),(s=[null,null,f],this.$element.val(n).trigger("changed"+r,s),this.$newElement.hasClass(t.SHOW))&&(this.multiple?this.setOptionStatus(!0):(u=(i.options[i.selectedIndex]||{}).liIndex,"number"==typeof u&&(this.setSelected(this.selectedIndex,!1),this.setSelected(u,!0)))),this.render(),s=null,this.$element)},changeAll:function(n){var t,u;if(this.multiple){void 0===n&&(n=!0);var i=this.$element[0],f=0,e=0,h=l(i);i.classList.add("bs-select-hidden");for(var r=0,o=this.selectpicker.current.data,c=o.length;r<c;r++)t=o[r],u=t.option,u&&!t.disabled&&"divider"!==t.type&&(t.selected&&f++,!0===(u.selected=n)&&e++);i.classList.remove("bs-select-hidden");f!==e&&(this.setOptionStatus(),s=[null,null,h],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,tt,f,o,a,s=n(this),ft=s.hasClass("dropdown-toggle"),r=(ft?s.closest(".dropdown"):s.closest(vt.MENU)).data("this"),p=r.findLis(),w=!1,it=i.which===b&&!ft&&!r.options.selectOnTab,et=si.test(i.which)||it,nt=r.$menuInner[0].scrollTop,e=!0===r.isVirtual()?r.selectpicker.view.position0:0,h,rt,y,c,g,ut,l;if(!(112<=i.which&&i.which<=123))if((tt=r.$newElement.hasClass(t.SHOW))||!(et||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"),!r.options.liveSearch)){if(i.which===lt&&tt&&(i.preventDefault(),r.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),et){if(!p.length)return;-1!==(u=(f=r.selectpicker.main.elements[r.activeIndex])?Array.prototype.indexOf.call(f.parentElement.children,f):-1)&&r.defocusItem(f);i.which===k?(-1!==u&&u--,u+e<0&&(u+=p.length),r.selectpicker.view.canHighlight[u+e]||-1==(u=r.selectpicker.view.canHighlight.slice(0,u+e).lastIndexOf(!0)-e)&&(u=p.length-1)):i.which!==d&&!it||(++u+e>=r.selectpicker.view.canHighlight.length&&(u=r.selectpicker.view.firstHighlightIndex),r.selectpicker.view.canHighlight[u+e]||(u=u+1+r.selectpicker.view.canHighlight.slice(u+e+1).indexOf(!0)));i.preventDefault();h=e+u;i.which===k?0===e&&u===p.length-1?(r.$menuInner[0].scrollTop=r.$menuInner[0].scrollHeight,h=r.selectpicker.current.elements.length-1):w=(a=(o=r.selectpicker.current.data[h]).position-o.height)<nt:i.which!==d&&!it||(u===r.selectpicker.view.firstHighlightIndex?(r.$menuInner[0].scrollTop=0,h=r.selectpicker.view.firstHighlightIndex):w=nt<(a=(o=r.selectpicker.current.data[h]).position-r.sizeInfo.menuInnerHeight));f=r.selectpicker.current.elements[h];r.activeIndex=r.selectpicker.current.data[h].index;r.focusItem(f);r.selectpicker.view.currentActive=f;w&&(r.$menuInner[0].scrollTop=a);r.options.liveSearch?r.$searchbox.trigger("focus"):s.trigger("focus")}else if(!s.is("input")&&!hi.test(i.which)||i.which===v&&r.selectpicker.keydown.keyHistory){for(c=[],i.preventDefault(),r.selectpicker.keydown.keyHistory+=ei[i.which],r.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(r.selectpicker.keydown.resetKeyHistory.cancel),r.selectpicker.keydown.resetKeyHistory.cancel=r.selectpicker.keydown.resetKeyHistory.start(),y=r.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(y)&&(y=y.charAt(0)),g=0;g<r.selectpicker.current.data.length;g++)ut=r.selectpicker.current.data[g],ot(ut,y,"startsWith",!0)&&r.selectpicker.view.canHighlight[g]&&c.push(ut.index);c.length&&(l=0,p.removeClass("active").find("a").removeClass("active"),1===y.length&&(-1===(l=c.indexOf(r.activeIndex))||l===c.length-1?l=0:l++),rt=c[l],w=0<nt-(o=r.selectpicker.main.data[rt]).position?(a=o.position-o.height,!0):(a=o.position-r.sizeInfo.menuInnerHeight,o.position>nt+r.sizeInfo.menuInnerHeight),f=r.selectpicker.main.elements[rt],r.activeIndex=c[l],r.focusItem(f),f&&f.firstChild.focus(),w&&(r.$menuInner[0].scrollTop=a),s.trigger("focus"))}tt&&(i.which===v&&!r.selectpicker.keydown.keyHistory||i.which===oi||i.which===b&&r.options.selectOnTab)&&(i.which!==v&&i.preventDefault(),r.options.liveSearch&&i.which===v||(r.$menuInner.find(".active a").trigger("click",!0),s.trigger("focus"),r.options.liveSearch||(i.preventDefault(),n(document).data("spaceSelect",!0))))}else r.$searchbox.trigger("focus")},mobile:function(){this.options.mobile=!0;this.$element[0].classList.add("mobile-device")},refresh:function(){var t=n.extend({},this.options,this.$element.data());this.options=t;this.checkDisabled();this.buildData();this.setStyle();this.render();this.buildList();this.setWidth();this.setSize(!0);this.$element.trigger("refreshed"+r)},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.selectpicker.view.titleOption&&this.selectpicker.view.titleOption.parentNode&&this.selectpicker.view.titleOption.parentNode.removeChild(this.selectpicker.view.titleOption);this.$element.off(r).removeData("selectpicker").removeClass("bs-select-hidden selectpicker");n(window).off(r+"."+this.selectId)}};pt=n.fn.selectpicker;n.fn.selectpicker=yt;n.fn.selectpicker.Constructor=u;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=pt,this};n(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",':not(.bootstrap-select) > [data-toggle="dropdown"]',wt).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",wt).on("keydown"+r,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',u.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"+r+".data-api",function(){n(".selectpicker").each(function(){var t=n(this);yt.call(t,t.data())})})}(n)})