function showBusy(){$("body").addClass("loading")}function hideBusy(){$("body").removeClass("loading")}if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");if(!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){"use strict";function t(n){if("undefined"==typeof n.length)u(n,"click",r);else if("string"!=typeof n&&!(n instanceof String))for(var t=0;t<n.length;t++)u(n[t],"click",r)}function r(n){var i,r,u,e;return n=n||window.event,i=n.currentTarget||n.srcElement,u=i.getAttribute("href"),u&&(e=n.ctrlKey||n.shiftKey||n.metaKey,r=i.getAttribute("target"),e||r&&!f(r))?(t.open(u),n.preventDefault?n.preventDefault():n.returnValue=!1,!1):void 0}function u(n,t,i){var r,u;return n.addEventListener?n.addEventListener(t,i,!1):(r="on"+t,n.attachEvent?n.attachEvent(r,i):n[r]?(u=n[r],n[r]=function(){i();u()}):n[r]=i,void 0)}function o(n,t,i){var r,e,u,f,o;return r=document.createElement("iframe"),r.style.display="none",document.body.appendChild(r),e=r.contentDocument||r.contentWindow.document,f='"'+n+'"',t&&(f+=', "'+t+'"'),i&&(f+=', "'+i+'"'),u=e.createElement("script"),u.type="text/javascript",u.text="window.parent = null; window.top = null;window.frameElement = null; var child = window.open("+f+");if (child) { child.opener = null }",e.body.appendChild(u),o=r.contentWindow.child,document.body.removeChild(r),o}function f(n){return"_top"===n||"_self"===n||"_parent"===n}var e,i;"undefined"!=typeof window&&(e=-1!==window.navigator.userAgent.indexOf("MSIE"));"undefined"!=typeof window&&(i=window.open);t.open=function(n,t,r){var u;return f(t)?i.apply(window,arguments):e?(u=i.apply(window,arguments),u&&(u.opener=null),u):o(n,t,r)};t.patch=function(){window.open=function(){return t.open.apply(this,arguments)}};"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports?module.exports=t:exports.blankshield=t);"function"==typeof define&&"object"==typeof define.amd&&define("blankshield",[],function(){return t});n.blankshield=t}(this),typeof jQuery=="undefined")throw new Error("jQuery is required");+function(n){"use strict";n(document).on("reset",".modal form",function(t){var i=n(this);i.validate().resetForm();i.find(".validation-summary-errors").removeClass("validation-summary-errors").addClass("validation-summary-valid").find("ul").empty();i.find(".field-validation-error").removeClass("field-validation-error").addClass("field-validation-valid").empty();i.find("input:text, input:password, input:file, select, textarea").val("");i.find("input:radio, input:checkbox").removeAttr("checked").removeAttr("selected");t.preventDefault()});n(document).ajaxSuccess(function(t,i,r,u){if(u&&u.success===!0&&u.redirectUrl&&u.redirectUrl.length>0){var f=n(".modal.in");f.length>0&&f.modal("hide");document.location=u.redirectUrl}})}(jQuery);String.prototype.format||(String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})});blankshield.patch();$(document).ready(function(){$("a").each(function(){blankshield(this)})});+function(n){"use strict";n.ovs={utils:{htmlEncode:function(n){return document.createElement("a").appendChild(document.createTextNode(n)).parentNode.innerHTML},htmlEncodeObj:function(t){var r,i;if(t!=null)if(r=n.type(t),r==="object")for(i in t)n.type(t[i])==="string"&&(t[i]=n.ovs.utils.htmlEncode(t[i]));else r==="string"&&(t=n.ovs.utils.htmlEncode(t));return t},getElementPartialMatch:function(t,i){return i&&i.form?n(i.form).find("[name$='"+t+"']"):n("[name$='"+t+"']")},toBoolean:function(t){if(t==null)return!1;if(n.type(t)==="boolean")return t;if(n.type(t)==="string")switch(t.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(t)}return!1},toInt:function(t){if(t==null)return 0;if(n.type(t)==="number")return t;if(n.type(t)==="string"){var i=parseInt(t);if(!isNaN(i))return i}return 0},toFloat:function(t){if(t==null)return 0;if(n.type(t)==="number")return t;if(n.type(t)==="string"){var i=parseFloat(t);if(!isNaN(i))return i}return 0},parseXml:function(n){if(window.ActiveXObject){var t=new ActiveXObject("Microsoft.XMLDOM");return t.loadXML(n),t}return window.DOMParser?(new DOMParser).parseFromString(n,"text/xml"):""},getRootDomain:function(){for(var i=0,n=document.domain,r=n.split("."),t="_gd"+(new Date).getTime();i<r.length-1&&document.cookie.indexOf(t+"="+t)===-1;)n=r.slice(-1-++i).join("."),document.cookie=t+"="+t+";domain="+n+";";return document.cookie=t+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain="+n+";",n},getCookie:function(n){for(var t,r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1);if(t.indexOf(r)===0)return t.substring(r.length,t.length)}return""}},blocks:{},resources:{},dialog:{icon:{success:0,failed:1,question:2,information:3,warning:4},buttons:{ok:0,okCancel:1,yesNo:2},show:function(t,i){var r=n("#baseDialogModal"),s,h,o,f,u,e;if(r.length===0&&(s=t.className?" "+t.className:"",h='<div class="modal modal-mod base-dialog-modal'+s+'" id="baseDialogModal" tabindex="-1" role="dialog" aria-labelledby="baseDialogModal"><\/div>',n("body").append(n(h)),r=n("#baseDialogModal")),o='<div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="reset" class="close" data-dismiss="modal" aria-hidden="true"><img src="/static/svg/closebutton_mediumgrey.svg" alt="Close" class="img-responsive img-close" /><\/button><h3 class="modal-title base-dialog-modal-title"><\/h3><\/div><div class="modal-body base-dialog-modal-body"><div class="base-dialog-modal-body-icon"><i><\/i><\/div><div class="base-dialog-modal-body-content"><span class="modal-body-message base-dialog-modal-body-message"><\/span><\/div><\/div><div class="modal-footer base-dialog-modal-footer"><\/div><\/div><\/div>',t.layout!=null&&t.layout.length>0&&(o=t.layout),r.html(o),t.title&&r.find(".base-dialog-modal-title").html(t.title),r.find(".base-dialog-modal-body-message").html(t.message||""),r.find(".base-dialog-modal-footer").html(n.ovs.dialog._createButtons(t.buttons,t.confirmButtonText,t.yesButtonText,t.noButtonText)),typeof t.onConfirm=="function")r.find(".base-dialog-modal-confirm-button").on("click",function(){t.onConfirm({dialog:r})});if(typeof t.onCancel=="function")r.find(".base-dialog-modal-cancel-button, button.close").on("click",function(){t.onCancel({dialog:r})});if(f=n(".base-dialog-modal-body-icon"),t.icon!=null){u="";switch(t.icon){case n.ovs.dialog.icon.success:u="fa fa-check-circle";break;case n.ovs.dialog.icon.failed:u="fa fa-times-circle";break;case n.ovs.dialog.icon.question:u="fa fa-question-circle";break;case n.ovs.dialog.icon.information:u="fa fa-info-circle";break;case n.ovs.dialog.icon.warning:u="fa fa-exclamation-circle"}f.find("i").removeClass().addClass(u);f.show()}else f.hide();e=i||{};e.keyboard=!1;e.backdrop="static";r.modal(e)},_createButtons:function(n,t,i,r){var u="";t=t||"OK";i=i||"Yes";r=r||"No";switch(n){case 1:u+='<button type="button" class="btn btn-primary base-dialog-modal-confirm-button" data-dismiss="modal">'+t+"<\/button>";u+='<button type="button" class="btn base-dialog-modal-cancel-button" data-dismiss="modal">Cancel<\/button>';break;case 2:u+='<button type="button" class="btn btn-primary btn-rounded base-dialog-modal-confirm-button" data-dismiss="modal">'+i+"<\/button>";u+='<button type="button" class="btn bg-secondary btn-rounded base-dialog-modal-cancel-button" data-dismiss="modal">'+r+"<\/button>";break;default:u+='<button type="button" class="btn btn-primary base-dialog-modal-confirm-button" data-dismiss="modal">'+t+"<\/button>"}return u}},hounds:{createBloodhound:function(n,t,i,r,u,f,e){var o=n.data("datatype")||"jsonp",s=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:{url:(n.data("searchurl")||"")+t,ajax:{type:"GET",dataType:o,jsonp:o},prepare:function(t,i){var f,u,o;if(typeof n.ovsDefaultTypeaheadSetState=="function"){if(f=!0,u=n.ovsDefaultTypeaheadGetState(),u&&u.length>0)try{o=JSON.parse(u);o&&o.Query===t&&(f=!1)}catch(s){}f&&n.ovsDefaultTypeaheadSetState("")}return typeof e=="function"&&(i=e(t,i)),typeof r=="function"?r(n):n.addClass("typeahead-loading"),i.url=i.url.replace("%QUERY",encodeURIComponent(t)),i},transform:function(t){return typeof f=="function"&&(t=f(n,t)),typeof u=="function"?u(n):n.removeClass("typeahead-loading"),t}},limit:i||10});return s.initialize(),s},createAirBloodhound:function(t,i,r,u){return n.ovs.hounds.createBloodhound(t,n.ovs.utils.toBoolean(t.data("usenextgensearch"))?"/travel/AirSearch/GetAirportCodes/?callback=?&query=%QUERY&excludegroups=true":"/car/airportsearch?callback=?&airname=%QUERY&excludegroups=true",i,r,u,n.ovs.hounds.transformAirSearchResults)},createCarAirCityBloodhound:function(t){return n.ovs.hounds.createBloodhound(t,"/travel/CarSearch/AirportsAndCities/?callback=?&query=%QUERY")},createSorOptionsBloodhound:function(t){return n.ovs.hounds.createBloodhound(t,"/hybridtravel/HybridCarSearch/AirportsAndCities/?callback=?&query=%QUERY")},createSorOptionsActivitiesBloodhound:function(t){return n.ovs.hounds.createBloodhound(t,"/hybridtravel/HybridActivitiesSearch/Locations/?callback=?&query=%QUERY")},createCarAirOnlyBloodhound:function(t){return n.ovs.hounds.createBloodhound(t,"/travel/CarSearch/GetAirports/?callback=?&query=%QUERY")},createCityBloodhound:function(t,i,r,u){return n.ovs.hounds.createBloodhound(t,n.ovs.utils.toBoolean(t.data("usenextgensearch"))?"/travel/CarSearch/GetAirportCity/?callback=?&query=%QUERY":"/car/citysearch?callback=?&airname=%QUERY&searchType=car",i,r,u,n.ovs.hounds.transformCitySearchResults)},createHotelCityBloodhound:function(t,i,r,u){return n.ovs.hounds.createBloodhound(t,"/hotel/citysearch?callback=?&airname=%QUERY&searchType=hotel",i,r,u)},createHotelLandmarkBloodhound:function(t,i,r,u){return n.ovs.hounds.createBloodhound(t,"/hotel/lookuplandmark?callback=?&landmark=%QUERY",i,r,u)},createRentalBloodhound:function(t,i){return n.ovs.hounds.createBloodhound(t,"/travel/rentalsearch/autocompletesearch?callback=?&query=%QUERY&limit="+i,i)},transformAirSearchResults:function(t,i){if(n.ovs.utils.toBoolean(t.data("usenextgensearch"))&&i&&i.items&&i.items.length>0){var u=n.ovs.utils.parseXml(i.items[0].value),r=[];n(u).find("Location").each(function(){var i=n(this).attr("Type");if(i==="M"||i==="A"){var e=n("Name",this).text(),u=n("Code",this).text(),o=n("Country",this).text(),t=n("State",this).text(),f=o;t&&t.length>0&&(f+=" - "+t);r.push({AirportName:e+" ("+u+")",AirportCode:u,MiscName:f})}});i=r}return i},transformCitySearchResults:function(t,i){if(n.ovs.utils.toBoolean(t.data("usenextGenAirsearch"))&&i&&i.items&&i.items.length>0){var u=n.ovs.utils.parseXml(i.items[0].value),r=[];n(u).find("Location").each(function(){var o=n(this).attr("Type");if(o==="C"){var i=n("Name",this).text(),u=n("Code",this).text(),f=n("Country",this).text(),t=n("State",this).text(),e=f;t&&t.length>0&&(i+=", "+t,e+=" - "+i);r.push({CityName:i+" ("+u+")",CityCode:u,CountryName:f,StateName:t,MiscName:e})}});i=r}return i}}}}(jQuery);jQQ={setup:function(){},isolate:function(){}};+function(n){"use strict";n.fn.showLoadingPanel=function(){return this.html('<div class="section-loading"><i class="fa fa-spinner fa-spin"><\/i><\/div>'),this};n.fn.showErrorPanel=function(n){return n=n||"An error occurred while performing the requested operation.",this.html('<div class="error">'+n+"<\/div>"),this};n.fn.resetFormValidation=function(){return this.each(function(){var t=n(this);this.nodeName!=="FORM"&&(t=t.find("form"));t.each(function(){var t=n(this),i;t.find("input").resetValidation();i=t.find(".validation-summary-errors");i.each(function(){var t=n(this);t.data("valmsg-summary")===!0?(t.find("ul").empty(),t.removeClass("validation-summary-errors").addClass("validation-summary-valid")):t.empty()})})}),this};n.fn.resetValidation=function(){return this.each(function(){var t=n(this),i,r;t.hasClass("input-validation-error")&&(i=t.attr("name"),t.addClass("valid").removeClass("input-validation-error"),r=n("[data-valmsg-for='"+i+"']"),r.addClass("field-validation-valid").removeClass("field-validation-error").empty())}),this};n.fn.enableFormValidation=function(){return this.each(function(){var t=n(this);this.nodeName!=="FORM"&&(t=t.find("form"));t.each(function(){var t=n(this);t.removeData("validator unobtrusiveValidation");n.validator.unobtrusive.parse(t);t.submit(function(t){n(this).valid()||t.preventDefault()});typeof n().enableRecaptcha!="undefined"&&t.find(".recaptcha-content").enableRecaptcha()})}),this};n.fn.addValidationSummaryError=function(t,i){return this.each(function(){var r=n(this);this.nodeName!=="FORM"&&(r=r.find("form"));r.each(function(){var r=n(this).find(".validation-summary-errors, .validation-summary-active");r.length===0&&(r=n("<div class='validation-summary-errors'><ul><\/ul><\/div>"),i.append(r));r.each(function(){var i=n(this);i.data("valmsg-summary",!0);i.addClass("validation-summary-errors").removeClass("validation-summary-valid");i.find("ul").append("<li>"+t+"<\/li>")})})}),this};n.fn.enableCarouselPreload=function(){this.on("slide.bs.carousel",function(t){var i=n(t.relatedTarget),f=i.find("img[preload-src]"),r,u;f.each(function(){var t=n(this);t.attr("src",t.attr("preload-src")).removeAttr("preload-src")});r=t.direction==="left"?i.next():i.prev();r.length>0&&(u=r.find("img[preload-src]"),u.length>0&&u.each(function(){var t=n(this);t.attr("src",t.attr("preload-src")).removeAttr("preload-src")}))});return this};n.fn.toHiddenField=function(){return this.each(function(){var t=n(this),i,r;t.attr("type")!=="hidden"&&(i=n("<input type='hidden' />"),r=t.prop("attributes"),n.each(r,function(){this.name!=="type"&&i.attr(this.name,this.value)}),i.val(t.val()),t.replaceWith(i))}),this};n.fn.removeClassLike=function(t){return this.each(function(){var u=n(this),r=u.prop("classList"),i;if(r)for(i=0;i<r.length;i++)r[i].indexOf(t)>-1&&u.removeClass(r[i])}),this};n.fn.passReqs=function(){function t(n,t){t?n.addClass("fa-check-circle").removeClass("fa-times-circle").removeClass("fa-circle"):n.addClass("fa-times-circle").removeClass("fa-check-circle").removeClass("fa-circle");n.length>0&&n[0].className.includes("helper_line")&&n.addClass(t?"hide":"show").removeClass(t?"show":"hide").removeClass("fa-times-circle").removeClass("fa-check-circle").removeClass("fa-circle")}function i(){var u=n(this),i=u.next(".tooltip"),r;i.length===0&&(u.tooltip("show"),i=u.next(".tooltip"));r=n.ovs.validation.analayzePassword(u.val());t(i.find(".pass_reqs__lower i"),r.hasLower);t(i.find(".pass_reqs__upper i"),r.hasUpper);t(i.find(".pass_reqs__number i"),r.hasNumber);t(i.find(".pass_reqs__special i"),r.hasSpecial);t(i.find(".pass_reqs__allowed .helper_line"),!r.hasNotAllowed);t(i.find(".pass_reqs__length i"),r.minLength)}if(this.length===0)return this;this.each(function(){var r=n(this),u=n.ovs.utils.toBoolean(n(r).data("val-strongpassword-enforced")),t;if(u){t="<div class='pass-reqs'>";t+="<div class='title'>Password must:<\/div>";t+="<div class='pass_reqs__lower'><i class='fa fa-circle'><\/i> Have at least one lower case letter<\/div>";t+="<div class='pass_reqs__upper'><i class='fa fa-circle'><\/i> Have at least one upper case letter<\/div>";t+="<div class='pass_reqs__number'><i class='fa fa-circle'><\/i> Have at least one number<\/div>";t+="<div class='pass_reqs__special'><i class='fa fa-circle'><\/i> Have at least one special character <div class='pass_reqs__allowed'><div class='helper_line hide'>&nbsp;&nbsp;&nbsp;&nbsp;Allowed (~!@#$%^&*_-+=`|(){}[]:;\"'<>,.?/)<\/div><\/div><\/div>";t+="<div class='pass_reqs__length'><i class='fa fa-circle'><\/i> Be at least 8 characters<\/div>";t+="<\/div>";r.addClass("pass-reqs-trigger");r.tooltip({html:!0,placement:"top",trigger:"focus",title:t}).on("keyup",i).on("shown.bs.tooltip",i)}});n(window).on("resize",function(){n(".pass-reqs-trigger").tooltip("hide")});return this};n.fn.doFormValidation=function(){var r=new n.Deferred,t=this.closest("form"),i;return t.resetFormValidation(),t.validate(),i={},t.serializeArray().map(function(n){i[n.name]=n.value}),t.valid()?r.resolve({isFormValid:!0,form:i}):r.reject({isFormValid:!1,form:i}),r.promise()};n(document).ready(function(){n("input[data-val-strongpassword-enforced=True]").passReqs()})}(jQuery),function(n){"use strict";function u(i){n("select.state-list-for").each(function(){var u=n(this),o=u.data("countrylistid"),r,e,f;i===o&&(r=n("<input type='text'><\/input>"),e=u.prop("attributes"),n.each(e,function(){r.attr(this.name,this.value)}),f=n._data(this,"events"),f&&n.each(f,function(){n.each(this,function(){r.bind(this.type,this.handler)})}),u.replaceWith(r),t(r))})}function f(t){n("input.state-list-for").each(function(){var r=n(this),e=r.data("countrylistid"),i,f,u;t===e&&(i=n(document.createElement("select")),f=r.prop("attributes"),n.each(f,function(){this.name!=="type"&&i.attr(this.name,this.value)}),u=n._data(this,"events"),u&&n.each(u,function(){n.each(this,function(){i.bind(this.type,this.handler)})}),r.replaceWith(i))})}function e(i,r){var u="";n.each(r,function(){u+="<option value='"+this.Value+"'";this.Selected&&(u+=" selected='selected'");u+=">"+this.Text+"<\/option>"});n(".state-list-for").each(function(){var r=n(this),f=r.data("countrylistid");i===f&&(this.options.length=0,r.append(u),t(r))})}function t(t){var u=t.data("countrylistid"),i=n("#"+u),r=i.data("pre-select-state");r&&(t.val(r),i.data("pre-select-state",null))}function i(t,i){n(".zip-code-for").each(function(){var r=n(this),u=r.data("countrylistid");t===u&&r.maskZipCode({selectedCountry:i})})}function r(t,i){n(".phone-number-for").each(function(){var r=n(this),u=r.data("countrylistid");t===u&&(r.maskPhone({selectedCountry:i}),r.trigger("change"))})}n.fn.enableCountrySelection=function(){return this.change(function(){var t=this.id,h=n(this),o=h.val(),s;i(t,o);r(t,o);s=!1;n(".state-list-for").each(function(){var i=n(this),r=i.data("countrylistid");if(t===r){s=n.ovs.utils.toBoolean(i.data("abbr"));return}});n.ajax({type:"POST",url:"/api/location/GetStates?countryCode="+o+"&abbreviations="+s,contentType:"application/json",success:function(n){n?(f(t),e(t,n)):u(t)}})}),this.each(function(){var u=this.id,f=n(this),t=f.val();t.length===0&&(t="US");i(u,t);r(u,t)}),this}}(jQuery);$(document).ready(function(){$(".country-list-for").enableCountrySelection()});$.ovs.tracking={enabled:!1,track:function(n,t){$.ovs.tracking.enabled&&n!=null&&n.length!==0&&(t==null&&(t=!0),$.ajax({type:"POST",url:"/API/AgentTrackingAPI/TrackAgentEvent",contentType:"application/json",async:t,data:JSON.stringify({eventName:n})}))},trackPageEnterExit:function(){$(document).ready(function(){setTimeout(function(){var n="Page Enter";document.title&&document.title.length>0&&(n+=" ("+document.title+")");$.ovs.tracking.track(n)},250)});$(window).on("unload",function(){var n="Page Exit";document.title&&document.title.length>0&&(n+=" ("+document.title+")");$.ovs.tracking.track(n,!1)})}};+function(n){"use strict";n.validator.setDefaults({ignore:":hidden :not('.validation-include-hidden')"});var t=n.validator.methods.range;n.validator.methods.range=function(n,i,r){return i.type==="checkbox"?i.checked:t.call(this,n,i,r)};n.ovs.validation={register:function(t,i){n.validator.addMethod(t,i);n.validator.unobtrusive.adapters.addBool(t)},getOtherPropertyVal:function(t,i){var f=null,r=n(t).attr(i),u;return r&&r.length>0&&(u=n.ovs.utils.getElementPartialMatch(r,t),u.length>0&&(f=u.val())),f},isValidDate:function(n){return Object.prototype.toString.call(n)!=="[object Date]"?!1:!isNaN(n.getTime())},dateGreaterThan:function(t,i){var f,r,h,o,s;if(t==null||t.length===0)return!1;f=new Date;r=t.split("/");f=new Date(r[2],r[0]-1,r[1]);h=i.dataset.dformat;h=="dd/MM/yyyy"&&(f=new Date(r[2],r[1]-1,r[0]));var c=new Date,e=new Date(c.getFullYear(),c.getMonth(),c.getDate()),l=n.ovs.validation.getOtherPropertyVal(i,"data-val-dategreaterthan-element");if(l&&l.length>0){var u=l.split("/"),a=u[2],v=u[0]-1,y=u[1];h=="dd/MM/yyyy"&&(a=u[2],v=u[1]-1,y=u[0]);e=new Date(a,v,y)}return(o=n(i).attr("data-val-dategreaterthan-than"),o&&o.length>0&&(s=o.split("/"),e=new Date(s[2],s[0]-1,s[1])),n.ovs.validation.isValidDate(e)&&f<=e)?!1:!0},numLessThan:function(t,i){var f=+t,r=0,u=n.ovs.validation.getOtherPropertyVal(i,"data-val-numlessthan-element"),e,o;return u&&u.length>0&&(r=+u),e=n.ovs.utils.toBoolean(n(i).attr("data-val-numlessthan-orequal")),o=e?f<=r:f<r,o},numGreaterThan:function(t,i){var f=+t,r=0,u=n.ovs.validation.getOtherPropertyVal(i,"data-val-numgreaterthan-element"),e,o;return u&&u.length>0&&(r=+u),e=n.ovs.utils.toBoolean(n(i).attr("data-val-numgreaterthan-orequal")),o=e?f>=r:f>r,o},sumCannotExceed:function(t,i){var s=parseInt(t),h=0,f=n(i).attr("data-val-sumcannotexceed-elements"),e,r,o,u;if(f&&f.length>0)for(e=f.split(","),r=0;r<e.length;r++)o=n.ovs.utils.getElementPartialMatch(e[r],i),o.length>0&&(s+=parseInt(o.val()));return(u=n(i).attr("data-val-sumcannotexceed-sum"),u&&u.length>0&&(h=parseInt(u)),s>h)?!1:!0},requiredIfHasValue:function(t,i){var r=null,e=n.ovs.validation.getOtherPropertyVal(i,"data-val-requiredifhasvalue-element"),u,o,f;if(e&&e.length>0&&(r=e),u=n(i).attr("data-val-requiredifhasvalue-ifvalue"),u&&u.length>0){for(o=u.split(","),f=0;f<o.length;f++)if(o[f]===r&&(typeof t=="undefined"||t==null||t.length===0))return!1}else if(r!=null&&r.length>0&&t.length===0)return!1;return!0},noInfantsInternationally:function(t,i){var c=parseInt(t),f,h,r,e,u,o,s;if(c>0&&(f=n(i),h=n.ovs.utils.toBoolean(f.data("usenextgensearch")),!h&&(r=f.attr("data-val-noinfantsinternationally-elements"),r&&r.length>0)))for(e=r.split(","),u=0;u<e.length;u++)if(o=n.ovs.utils.getElementPartialMatch(e[u],i),o.length>0&&(s=o.val(),s.length>0&&s.indexOf("USA")===-1))return!1;return!0},couponCodeValid:function(t,i){var f=null,e=n.ovs.validation.getOtherPropertyVal(i,"data-val-couponcodevalid-element"),u,r;e&&e.length>0&&(f=e.toLowerCase());u=n(i).attr("data-val-couponcodevalid-company");u&&u.length>0&&(f=u.toLowerCase());r=!0;switch(f){case"avis":r=/^[a-zA-Z0-9]{7}$/.test(t);break;case"budget":r=/^[a-zA-Z]{4}[0-9]{3}$/.test(t);break;case"dollar":r=/^[a-zA-Z0-9]{7}$/.test(t);break;case"hertz":r=/^[0-9a-zA-Z]{1,20}$/.test(t);break;case"thrifty":r=/^[a-zA-Z0-9]{7}$/.test(t)}return r},starCardValid:function(n){return n==null||n.length!==16||n.substring(0,4)!=="6019"?!1:!0},stringDateValidtion:function(n){var t=new RegExp(/\b\d{1,2}[\/-]\d{1,2}[\/-]\d{4}\b/);return t.test(n)?!0:!1},typeAheadSelected:function(t,i){var r=n.ovs.validation.getOtherPropertyVal(i,"data-val-typeaheadselected-element");return r!=null&&r.length===0?!1:!0},equalTo:function(t,i){var r=n.ovs.validation.getOtherPropertyVal(i,"data-val-isequalto-element");return t===r},notEqualTo:function(t,i){var r=n.ovs.utils.toBoolean(n(i).attr("data-val-isnotequalto-validateempty")),u=n.ovs.validation.getOtherPropertyVal(i,"data-val-isnotequalto-element");return(t==null||t.length===0)&&!r?!0:t!==u},dateLessThan:function(t,i){var u,f;if(t==null||t.length===0)return!1;var e=t.split("/"),c=new Date(e[2],e[0]-1,e[1]),o=new Date,r=new Date(o.getFullYear(),o.getMonth(),o.getDate()),s=n.ovs.validation.getOtherPropertyVal(i,"data-val-datelessthan-element");if(s&&s.length>0){var h=s.split("/"),l=h[2],a=h[0]-1,v=h[1];r=new Date(l,a,v)}return u=n(i).attr("data-val-datelessthan-than"),u&&u.length>0&&(f=u.split("/"),r=new Date(f[2],f[0]-1,f[1])),n.ovs.validation.isValidDate(r)&&c<=r},clientValidationFunction:function(value,element,param){var funcName=n(element).attr("data-val-clientvalidationfunction-functionname"),func;return funcName!=null&&funcName.length>0&&(func=eval(funcName),typeof func=="function")?func(value,element,param):!0},analayzePassword:function(n){var i=/[a-z]/.test(n),r=/[A-Z]/.test(n),u=/\d/.test(n),f=/[~!@#$%^&*_\-+=`|\/\\(){}[\]:;"'<>,.?|<>]/g.test(n),t=/[^a-zA-Z0-9,~!@#$%^&*_\-+=`|\/\\(){}[\]:;"'<>,.?]+/g.test(n),e=n.length>=8;return{isValid:i&&r&&u&&f&&!t&&e,hasLower:i,hasUpper:r,hasNumber:u,hasSpecial:f&&!t,hasNotAllowed:t,minLength:e}},strongPassword:function(t,i){var r,u,f,e;return t==null||t.length===0?!0:(r=t.replace(/\*/g,""),r.length===0)?!0:(u=n.ovs.utils.toBoolean(n(i).data("val-strongpassword-enforced")),!u)?!0:(f=n.ovs.utils.toBoolean(n(i).data("val-strongpassword-requirespecial")),e=n.ovs.validation.analayzePassword(t,f),e.isValid)},creditCard:function(t,i){return t.length===0||n(i).data("jccv-isvalid")!==!1},dateOfBirth:function(t,i){var r,u,f,o=!1,s,e;if(i.type==="text"?(s=t.split("/"),r=parseInt(s[0]),u=parseInt(s[1]),f=parseInt(s[2])):(r=parseInt(n("#"+i.id+"Month").val()),u=parseInt(n("#"+i.id+"Day").val()),f=parseInt(n("#"+i.id+"Year").val()),o=!0),isNaN(r)||isNaN(u)||isNaN(f))return o&&(i.value=""),!1;var h=new Date(f,r-1,u),c=h.getMonth()+1,l=h.getDate(),a=h.getFullYear();return c!==r||l!==u||a!==f?(o&&(i.value=""),!1):(o&&(e=function(n,t){return n=n.toString(),n.length<t?e("0"+n,t):n},i.value=e(r,2)+"/"+e(u,2)+"/"+e(f,4)),!0)},mustBeTrue:function(t){return n.ovs.utils.toBoolean(t)},tcpaRequiredForMobile:function(t,i){var r=n.ovs.utils.toBoolean(n.ovs.validation.getOtherPropertyVal(i,"data-val-tcparequiredformobile-element"));return r&&(!t||t.length===0)?!1:!0}};n.ovs.validation.register("dategreaterthan",n.ovs.validation.dateGreaterThan);n.ovs.validation.register("numlessthan",n.ovs.validation.numLessThan);n.ovs.validation.register("numgreaterthan",n.ovs.validation.numGreaterThan);n.ovs.validation.register("sumcannotexceed",n.ovs.validation.sumCannotExceed);n.ovs.validation.register("requiredifhasvalue",n.ovs.validation.requiredIfHasValue);n.ovs.validation.register("noinfantsinternationally",n.ovs.validation.noInfantsInternationally);n.ovs.validation.register("couponcodevalid",n.ovs.validation.couponCodeValid);n.ovs.validation.register("starcardvalid",n.ovs.validation.starCardValid);n.ovs.validation.register("stringdatevalid",n.ovs.validation.stringDateValidtion);n.ovs.validation.register("typeaheadselected",n.ovs.validation.typeAheadSelected);n.ovs.validation.register("isequalto",n.ovs.validation.equalTo);n.ovs.validation.register("isnotequalto",n.ovs.validation.notEqualTo);n.ovs.validation.register("datelessthan",n.ovs.validation.dateLessThan);n.ovs.validation.register("clientvalidationfunction",n.ovs.validation.clientValidationFunction);n.ovs.validation.register("strongpassword",n.ovs.validation.strongPassword);n.ovs.validation.register("creditcard",n.ovs.validation.creditCard);n.ovs.validation.register("dateofbirth",n.ovs.validation.dateOfBirth);n.ovs.validation.register("mustbetrue",n.ovs.validation.mustBeTrue);n.ovs.validation.register("tcparequiredformobile",n.ovs.validation.tcpaRequiredForMobile)}(jQuery);$.ovs.dotnav={isScrolling:!1,init:function(){var i=$(".cd-nav"),n,t,r;if(i.length>0){n=document.createElement("nav");n.id="cd-vertical-nav";n.className="cd-menu";t=document.createElement("ul");n.appendChild(t);i.each(function(n){t.appendChild($.ovs.dotnav.createItem(n,$(this)))});$("#cd-vertical-nav").remove();$(document.body).append(n);r=$.ovs.dotnav.createMobileNav();$("#cd-vertical-nav-trigger").remove();$(document.body).append(r);$.ovs.dotnav.updateNavigation();$(window).off("scroll",$.ovs.dotnav.updateNavigation).on("scroll",$.ovs.dotnav.updateNavigation);$("#cd-vertical-nav").find("a").on("click",$.ovs.dotnav.events.onDotItemClicked);$("#cd-vertical-nav-trigger").on("click",$.ovs.dotnav.events.onNavTriggerClicked)}},createItem:function(n,t){var f=n+1,r=document.createElement("li"),i,e,o,u,s,h;return r.id="vert-nav-item-"+f,r.className="cd-item",i=document.createElement("a"),i.setAttribute("data-number",f),i.href="#nav",i.dotRef=t,r.appendChild(i),e=document.createElement("span"),e.className="cd-dot",i.appendChild(e),o=document.createElement("span"),o.className="cd-arrow",i.appendChild(o),u=document.createElement("span"),u.className="cd-label",s=t.data("nav-text"),h=s?document.createTextNode(s):document.createTextNode("Item "+f),u.appendChild(h),i.appendChild(u),r},createMobileNav:function(){var n=document.createElement("a"),t;return n.id="cd-vertical-nav-trigger",n.className="cd-nav-trigger cd-img-replace",t=document.createElement("span"),t.appendChild(document.createTextNode("More")),n.appendChild(t),n},updateNavigation:function(){var t=$(window),f=t.height(),i=t.scrollTop(),r=$("#cd-vertical-nav"),u=r.find(".is-selected"),n=null;r.find(".cd-item a").each(function(){var e=$(this),t=this.dotRef,r=t.offset().top,o=t.height(),u=f/2;r-u<i&&r+o-u>i&&(n=e)});n==null||n.hasClass("is-selected")||(u.removeClass("is-selected"),n.addClass("is-selected"),u.length>0&&!$.ovs.dotnav.isScrolling&&$.ovs.dotnav.trackNav(n))},smoothScroll:function(n){$.ovs.dotnav.isScrolling=!0;$("body,html").animate({scrollTop:n.offset().top},600,null,function(){$.ovs.dotnav.isScrolling&&($.ovs.dotnav.isScrolling=!1,$.ovs.dotnav.trackNav($("#cd-vertical-nav").find(".is-selected")))})},trackNav:function(n){if(n.length>0){var t=n.find(".cd-label").text();$.ovs.tracking.track("Dot Navigation ("+t+")")}},events:{onDotItemClicked:function(n){n.preventDefault();$(".touch #cd-vertical-nav").removeClass("open");$.ovs.dotnav.smoothScroll(this.dotRef)},onNavTriggerClicked:function(){$(".touch #cd-vertical-nav").toggleClass("open")}}};$(document).ready($.ovs.dotnav.init),function(n,t){typeof define=="function"&&define.amd?define("bloodhound",["jquery"],function(i){return n.Bloodhound=t(i)}):typeof exports=="object"?module.exports=t(require("jquery")):n.Bloodhound=t(jQuery)}(this,function(n){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return typeof n=="undefined"},isElement:function(n){return!!(n&&n.nodeType===1)},isJQuery:function(t){return t instanceof n},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if(r=i.call(null,u,n,t))return!1}),!!r):r},mixin:n.extend,identity:function(n){return n},clone:function(t){return n.extend(!0,{},t)},getIdGenerator:function(){var n=0;return function(){return n++}},templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f=this,e=arguments,o,s;return o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r,clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,h<=0?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},stringify:function(n){return t.isString(n)?n:JSON.stringify(n)},noop:function(){}}}(),u="0.11.1",f=function(){"use strict";function n(n){return n=t.toStr(n),n?n.split(/\s+/):[]}function i(n){return n=t.toStr(n),n?n.split(/\W+/):[]}function r(n){return function(i){return i=t.isArray(i)?i:[].slice.call(arguments,0),function(r){var u=[];return t.each(i,function(i){u=u.concat(n(t.toStr(r[i])))}),u}}}return{nonword:i,whitespace:n,obj:{nonword:r(i),whitespace:r(n)}}}(),i=function(){"use strict";function i(i){this.maxSize=t.isNumber(i)?i:100;this.reset();this.maxSize<=0&&(this.set=this.get=n.noop)}function r(){this.head=this.tail=null}function u(n,t){this.key=n;this.val=t;this.prev=this.next=null}return t.mixin(i.prototype,{set:function(n,t){var r=this.list.tail,i;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key],this.size--);(i=this.hash[n])?(i.val=t,this.list.moveToFront(i)):(i=new u(n,t),this.list.add(i),this.hash[n]=i,this.size++)},get:function(n){var t=this.hash[n];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0;this.hash={};this.list=new r}}),t.mixin(r.prototype,{add:function(n){this.head&&(n.next=this.head,this.head.prev=n);this.head=n;this.tail=this.tail||n},remove:function(n){n.prev?n.prev.next=n.next:this.head=n.next;n.next?n.next.prev=n.prev:this.tail=n.prev},moveToFront:function(n){this.remove(n);this.add(n)}}),i}(),e=function(){"use strict";function r(n,r){this.prefix=["__",n,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix));this.ls=r||i;this.ls||this._noop()}function u(){return(new Date).getTime()}function f(n){return JSON.stringify(t.isUndefined(n)?null:n)}function e(t){return n.parseJSON(t)}function o(n){for(var r,u=[],f=i.length,t=0;t<f;t++)(r=i.key(t)).match(n)&&u.push(r.replace(n,""));return u}var i;try{i=window.localStorage;i.setItem("~~~","!");i.removeItem("~~~")}catch(s){i=null}return t.mixin(r.prototype,{_prefix:function(n){return this.prefix+n},_ttlKey:function(n){return this._prefix(n)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=t.noop},_safeSet:function(n,t){try{this.ls.setItem(n,t)}catch(i){i.name==="QuotaExceededError"&&(this.clear(),this._noop())}},get:function(n){return this.isExpired(n)&&this.remove(n),e(this.ls.getItem(this._prefix(n)))},set:function(n,i,r){return t.isNumber(r)?this._safeSet(this._ttlKey(n),f(u()+r)):this.ls.removeItem(this._ttlKey(n)),this._safeSet(this._prefix(n),f(i))},remove:function(n){return this.ls.removeItem(this._ttlKey(n)),this.ls.removeItem(this._prefix(n)),this},clear:function(){for(var t=o(this.keyMatcher),n=t.length;n--;)this.remove(t[n]);return this},isExpired:function(n){var i=e(this.ls.getItem(this._ttlKey(n)));return t.isNumber(i)&&u()>i?!0:!1}}),r}(),r=function(){"use strict";function r(n){n=n||{};this.cancelled=!1;this.lastReq=null;this._send=n.transport;this._get=n.limiter?n.limiter(this._get):this._get;this._cache=n.cache===!1?new i(0):o}var u=0,f={},e=6,o=new i(10);return r.setMaxPendingRequests=function(n){e=n},r.resetCache=function(){o.reset()},t.mixin(r.prototype,{_fingerprint:function(t){return t=t||{},t.url+t.type+n.param(t.data||{})},_get:function(n,t){function s(n){t(null,n);i._cache.set(r,n)}function h(){t(!0)}function c(){u--;delete f[r];i.onDeckRequestArgs&&(i._get.apply(i,i.onDeckRequestArgs),i.onDeckRequestArgs=null)}var i=this,r,o;(r=this._fingerprint(n),this.cancelled||r!==this.lastReq)||((o=f[r])?o.done(s).fail(h):u<e?(u++,f[r]=this._send(n).done(s).fail(h).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(i,r){var f,u;r=r||n.noop;i=t.isString(i)?{url:i}:i||{};u=this._fingerprint(i);this.cancelled=!1;this.lastReq=u;(f=this._cache.get(u))?r(null,f):this._get(i,r)},cancel:function(){this.cancelled=!0}}),r}(),o=window.SearchIndex=function(){"use strict";function u(i){i=i||{};i.datumTokenizer&&i.queryTokenizer||n.error("datumTokenizer and queryTokenizer are both required");this.identify=i.identify||t.stringify;this.datumTokenizer=i.datumTokenizer;this.queryTokenizer=i.queryTokenizer;this.reset()}function f(n){return n=t.filter(n,function(n){return!!n}),t.map(n,function(n){return n.toLowerCase()})}function e(){var n={};return n[r]=[],n[i]={},n}function o(n){for(var i={},r=[],t=0,u=n.length;t<u;t++)i[n[t]]||(i[n[t]]=!0,r.push(n[t]));return r}function s(n,t){var i=0,r=0,u=[],f,e;for(n=n.sort(),t=t.sort(),f=n.length,e=t.length;i<f&&r<e;)n[i]<t[r]?i++:n[i]>t[r]?r++:(u.push(n[i]),i++,r++);return u}var i="c",r="i";return t.mixin(u.prototype,{bootstrap:function(n){this.datums=n.datums;this.trie=n.trie},add:function(n){var u=this;n=t.isArray(n)?n:[n];t.each(n,function(n){var o,s;u.datums[o=u.identify(n)]=n;s=f(u.datumTokenizer(n));t.each(s,function(n){for(var f,t=u.trie,s=n.split("");f=s.shift();)t=t[i][f]||(t[i][f]=e()),t[r].push(o)})})},get:function(n){var i=this;return t.map(n,function(n){return i.datums[n]})},search:function(n){var e=this,h,u;return h=f(this.queryTokenizer(n)),t.each(h,function(n){var t,f,h,o;if(u&&u.length===0)return!1;for(t=e.trie,f=n.split("");t&&(h=f.shift());)t=t[i][h];if(t&&f.length===0)o=t[r].slice(0),u=u?s(u,o):o;else return u=[],!1}),u?t.map(o(u),function(n){return e.datums[n]}):[]},all:function(){var n=[];for(var t in this.datums)n.push(this.datums[t]);return n},reset:function(){this.datums={};this.trie=e()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),u}(),s=function(){"use strict";function i(n){this.url=n.url;this.ttl=n.ttl;this.cache=n.cache;this.prepare=n.prepare;this.transform=n.transform;this.transport=n.transport;this.thumbprint=n.thumbprint;this.storage=new e(n.cacheKey)}var n;return n={data:"data",protocol:"protocol",thumbprint:"thumbprint"},t.mixin(i.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(t){this.cache&&(this.storage.set(n.data,t,this.ttl),this.storage.set(n.protocol,location.protocol,this.ttl),this.storage.set(n.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var t={},i;return this.cache?(t.data=this.storage.get(n.data),t.protocol=this.storage.get(n.protocol),t.thumbprint=this.storage.get(n.thumbprint),i=t.thumbprint!==this.thumbprint||t.protocol!==location.protocol,t.data&&!i?t.data:null):null},fromNetwork:function(n){function r(){n(!0)}function u(t){n(null,i.transform(t))}var i=this,t;n&&(t=this.prepare(this._settings()),this.transport(t).fail(r).done(u))},clear:function(){return this.storage.clear(),this}}),i}(),h=function(){"use strict";function n(n){this.url=n.url;this.prepare=n.prepare;this.transform=n.transform;this.transport=new r({cache:n.cache,limiter:n.limiter,transport:n.transport})}return t.mixin(n.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(n,t){function u(n,i){n?t([]):t(r.transform(i))}var r=this,i;if(t)return n=n||"",i=this.prepare(n,this._settings()),this.transport.get(i,u)},cancelLastRequest:function(){this.transport.cancel()}}),n}(),c=function(){"use strict";function r(r){var f;return r?(f={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:t.identity,transform:t.identity,transport:null},r=t.isString(r)?{url:r}:r,r=t.mixin(f,r),r.url||n.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=u+r.thumbprint,r.transport=r.transport?i(r.transport):n.ajax,r):null}function f(r){var u;if(r)return u={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:t.identity,transport:null},r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.url||n.error("remote requires url to be set"),r.transform=r.filter||r.transform,r.prepare=e(r),r.limiter=o(r),r.transport=r.transport?i(r.transport):n.ajax,delete r.replace,delete r.wildcard,delete r.rateLimitBy,delete r.rateLimitWait,r}function e(n){function u(n,t){return t.url=i(t.url,n),t}function f(n,t){return t.url=t.url.replace(r,encodeURIComponent(n)),t}function e(n,t){return t}var t,i,r;return(t=n.prepare,i=n.replace,r=n.wildcard,t)?t:i?u:n.wildcard?f:e}function o(n){function f(n){return function(i){return t.debounce(i,n)}}function e(n){return function(i){return t.throttle(i,n)}}var i,u,r;return i=n.limiter,u=n.rateLimitBy,r=n.rateLimitWait,i||(i=/^throttle$/i.test(u)?e(r):f(r)),i}function i(i){return function(r){function f(n){t.defer(function(){u.resolve(n)})}function e(n){t.defer(function(){u.reject(n)})}var u=n.Deferred();return i(r,f,e),u}}return function(i){var e,u;return e={initialize:!0,identify:t.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},i=t.mixin(e,i||{}),i.datumTokenizer||n.error("datumTokenizer is required"),i.queryTokenizer||n.error("queryTokenizer is required"),u=i.sorter,i.sorter=u?function(n){return n.sort(u)}:t.identity,i.local=t.isFunction(i.local)?i.local():i.local,i.prefetch=r(i.prefetch),i.remote=f(i.remote),i}}();return function(){"use strict";function i(n){n=c(n);this.sorter=n.sorter;this.identify=n.identify;this.sufficient=n.sufficient;this.local=n.local;this.remote=n.remote?new h(n.remote):null;this.prefetch=n.prefetch?new s(n.prefetch):null;this.index=new o({identify:this.identify,datumTokenizer:n.datumTokenizer,queryTokenizer:n.queryTokenizer});n.initialize!==!1&&this.initialize()}var u;return u=window&&window.Bloodhound,i.noConflict=function(){return window&&(window.Bloodhound=u),i},i.tokenizers=f,t.mixin(i.prototype,{__ttAdapter:function(){function t(t,i,r){return n.search(t,i,r)}function i(t,i){return n.search(t,i)}var n=this;return this.remote?t:i},_loadPrefetch:function(){function u(n,r){if(n)return t.reject();i.add(r);i.prefetch.store(i.index.serialize());t.resolve()}var i=this,t,r;return t=n.Deferred(),this.prefetch?(r=this.prefetch.fromCache())?(this.index.bootstrap(r),t.resolve()):this.prefetch.fromNetwork(u):t.resolve(),t.promise()},_initialize:function(){function t(){n.add(n.local)}var n=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(t),this.initPromise},initialize:function(n){return!this.initPromise||n?this._initialize():this.initPromise},add:function(n){return this.index.add(n),this},get:function(n){return n=t.isArray(n)?n:[].slice.call(arguments),this.index.get(n)},search:function(n,i,r){function e(n){var i=[];t.each(n,function(n){t.some(u,function(t){return f.identify(n)===f.identify(t)})||i.push(n)});r&&r(i)}var f=this,u;return u=this.sorter(this.index.search(n)),i(this.remote?u.slice():u),this.remote&&u.length<this.sufficient?this.remote.get(n,e):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return r.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),i}()}),function(n,t){typeof define=="function"&&define.amd?define("typeahead.js",["jquery"],function(n){return t(n)}):typeof exports=="object"?module.exports=t(require("jquery")):t(jQuery)}(this,function(n){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return typeof n=="undefined"},isElement:function(n){return!!(n&&n.nodeType===1)},isJQuery:function(t){return t instanceof n},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if(r=i.call(null,u,n,t))return!1}),!!r):r},mixin:n.extend,identity:function(n){return n},clone:function(t){return n.extend(!0,{},t)},getIdGenerator:function(){var n=0;return function(){return n++}},templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f=this,e=arguments,o,s;return o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r,clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,h<=0?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},stringify:function(n){return t.isString(n)?n:JSON.stringify(n)},noop:function(){}}}(),e=function(){"use strict";function i(i){var e,o;return o=t.mixin({},n,i),e={css:f(),classes:o,html:r(o),selectors:u(o)},{css:e.css,html:e.html,classes:e.classes,selectors:e.selectors,mixin:function(n){t.mixin(n,e)}}}function r(n){return{wrapper:'<span class="'+n.wrapper+'"><\/span>',menu:'<div class="'+n.menu+'"><\/div>'}}function u(n){var i={};return t.each(n,function(n,t){i[t]="."+n}),i}function f(){var n={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(n.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),n}var n={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return i}(),o=function(){"use strict";function u(t){t&&t.el||n.error("EventBus initialized without el");this.$el=n(t.el)}var i,r;return i="typeahead:",r={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},t.mixin(u.prototype,{_trigger:function(t,r){var u;return u=n.Event(i+t),(r=r||[]).unshift(u),this.$el.trigger.apply(this.$el,r),u},before:function(n){var t,i;return t=[].slice.call(arguments,1),i=this._trigger("before"+n,t),i.isDefaultPrevented()},trigger:function(n){var t;this._trigger(n,[].slice.call(arguments,1));(t=r[n])&&this._trigger(t,[].slice.call(arguments,1))}}),u}(),r=function(){"use strict";function t(t,i,r,u){var f;if(!r)return this;for(i=i.split(n),r=u?h(r,u):r,this._callbacks=this._callbacks||{};f=i.shift();)this._callbacks[f]=this._callbacks[f]||{sync:[],async:[]},this._callbacks[f][t].push(r);return this}function u(n,i,r){return t.call(this,"async",n,i,r)}function f(n,i,r){return t.call(this,"sync",n,i,r)}function e(t){var i;if(!this._callbacks)return this;for(t=t.split(n);i=t.shift();)delete this._callbacks[i];return this}function o(t){var u,f,e,o,s;if(!this._callbacks)return this;for(t=t.split(n),e=[].slice.call(arguments,1);(u=t.shift())&&(f=this._callbacks[u]);)o=i(f.sync,this,[u].concat(e)),s=i(f.async,this,[u].concat(e)),o()&&r(s);return this}function i(n,t,i){function r(){for(var r,u=0,f=n.length;!r&&u<f;u+=1)r=n[u].apply(t,i)===!1;return!r}return r}function s(){return window.setImmediate?function(n){setImmediate(function(){n()})}:function(n){setTimeout(function(){n()},0)}}function h(n,t){return n.bind?n.bind(t):function(){n.apply(t,[].slice.call(arguments,0))}}var n=/\s+/,r=s();return{onSync:f,onAsync:u,off:e,trigger:o}}(),s=function(n){"use strict";function r(n,i,r){for(var u=[],f,e=0,o=n.length;e<o;e++)u.push(t.escapeRegExChars(n[e]));return f=r?"\\b("+u.join("|")+")\\b":"("+u.join("|")+")",i?new RegExp(f):new RegExp(f,"i")}var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(u){function o(t){var i,r,e;return(i=f.exec(t.data))&&(e=n.createElement(u.tagName),u.className&&(e.className=u.className),r=t.splitText(i.index),r.splitText(i[0].length),e.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(e,r)),!!i}function e(n,t){for(var i,r=0;r<n.childNodes.length;r++)i=n.childNodes[r],i.nodeType===3?r+=t(i)?1:0:e(i,t)}var f;(u=t.mixin({},i,u),u.node&&u.pattern)&&(u.pattern=t.isArray(u.pattern)?u.pattern:[u.pattern],f=r(u.pattern,u.caseSensitive,u.wordsOnly),e(u.node,o))}}(window.document),u=function(){"use strict";function i(i,r){i=i||{};i.input||n.error("input is missing");r.mixin(this);this.$hint=n(i.hint);this.$input=n(i.input);this.query=this.$input.val();this.queryWhenFocused=this.hasFocus()?this.query:null;this.$overflowHelper=e(this.$input);this._checkLanguageDirection();this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop)}function e(t){return n('<pre aria-hidden="true"><\/pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function o(n,t){return i.normalizeQuery(n)===i.normalizeQuery(t)}function f(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}var u;return u={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(n){return t.toStr(n).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,r,{_onBlur:function(){this.resetInputValue();this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query;this.trigger("focused")},_onKeydown:function(n){var t=u[n.which||n.keyCode];this._managePreventDefault(t,n);t&&this._shouldTrigger(t,n)&&this.trigger(t+"Keyed",n)},_onInput:function(){this._setQuery(this.getInputValue());this.clearHintIfInvalid();this._checkLanguageDirection()},_managePreventDefault:function(n,t){var i;switch(n){case"up":case"down":i=!f(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(n,t){var i;switch(n){case"tab":i=!f(t);break;default:i=!0}return i},_checkLanguageDirection:function(){var n=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==n&&(this.dir=n,this.$hint.attr("dir",n),this.trigger("langDirChanged",n))},_setQuery:function(n,t){var i,r;i=o(n,this.query);r=i?this.query.length!==n.length:!1;this.query=n;t||i?!t&&r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var n=this,i,r,f,e;i=t.bind(this._onBlur,this);r=t.bind(this._onFocus,this);f=t.bind(this._onKeydown,this);e=t.bind(this._onInput,this);this.$input.on("blur.tt",i).on("focus.tt",r).on("keydown.tt",f);if(!t.isMsie()||t.isMsie()>9)this.$input.on("input.tt",e);else this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(i){u[i.which||i.keyCode]||t.defer(t.bind(n._onInput,n,i))});return this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(n,t){this.setInputValue(n);this._setQuery(n,t)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(n){this.$input.val(n);this.clearHintIfInvalid();this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(n){this.$hint.val(n)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var n,t,i,r;n=this.getInputValue();t=this.getHint();i=n!==t&&t.indexOf(n)===0;r=n!==""&&i&&!this.hasOverflow();r||this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var n=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=n},isCursorAtEnd:function(){var n,i,r;return(n=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i))?i===n:document.selection?(r=document.selection.createRange(),r.moveStart("character",-n),n===r.text.length):!0},destroy:function(){this.$hint.off(".tt");this.$input.off(".tt");this.$overflowHelper.remove();this.$hint=this.$input=this.$overflowHelper=n("<div>")}}),i}(),f=function(){"use strict";function u(i,r){i=i||{};i.templates=i.templates||{};i.templates.notFound=i.templates.notFound||i.templates.empty;i.source||n.error("missing source");i.node||n.error("missing node");i.name&&!h(i.name)&&n.error("invalid dataset name: "+i.name);r.mixin(this);this.highlight=!!i.highlight;this.name=i.name||f();this.limit=i.limit||5;this.displayFn=e(i.display||i.displayKey);this.templates=o(i.templates,this.displayFn);this.source=i.source.__ttAdapter?i.source.__ttAdapter():i.source;this.async=t.isUndefined(i.async)?this.source.length>2:!!i.async;this._resetLastSuggestion();this.$el=n(i.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function e(n){function i(t){return t[n]}return n=n||t.stringify,t.isFunction(n)?n:i}function o(i,r){function u(t){return n("<div>").text(r(t))}return{notFound:i.notFound&&t.templatify(i.notFound),pending:i.pending&&t.templatify(i.pending),header:i.header&&t.templatify(i.header),footer:i.footer&&t.templatify(i.footer),suggestion:i.suggestion||u}}function h(n){return/^[_a-zA-Z0-9-]+$/.test(n)}var i,f;return i={val:"tt-selectable-display",obj:"tt-selectable-object"},f=t.getIdGenerator(),u.extractData=function(t){var r=n(t);return r.data(i.obj)?{val:r.data(i.val)||"",obj:r.data(i.obj)||null}:null},t.mixin(u.prototype,r,{_overwrite:function(n,t){t=t||[];t.length?this._renderSuggestions(n,t):this.async&&this.templates.pending?this._renderPending(n):!this.async&&this.templates.notFound?this._renderNotFound(n):this._empty();this.trigger("rendered",this.name,t,!1)},_append:function(n,t){t=t||[];t.length&&this.$lastSuggestion.length?this._appendSuggestions(n,t):t.length?this._renderSuggestions(n,t):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(n);this.trigger("rendered",this.name,t,!0)},_renderSuggestions:function(n,t){var i;i=this._getSuggestionsFragment(n,t);this.$lastSuggestion=i.children().last();this.$el.html(i).prepend(this._getHeader(n,t)).append(this._getFooter(n,t))},_appendSuggestions:function(n,t){var i,r;i=this._getSuggestionsFragment(n,t);r=i.children().last();this.$lastSuggestion.after(i);this.$lastSuggestion=r},_renderPending:function(n){var t=this.templates.pending;this._resetLastSuggestion();t&&this.$el.html(t({query:n,dataset:this.name}))},_renderNotFound:function(n){var t=this.templates.notFound;this._resetLastSuggestion();t&&this.$el.html(t({query:n,dataset:this.name}))},_empty:function(){this.$el.empty();this._resetLastSuggestion()},_getSuggestionsFragment:function(r,u){var f=this,e;return e=document.createDocumentFragment(),t.each(u,function(t){var u,o;o=f._injectQuery(r,t);u=n(f.templates.suggestion(o)).data(i.obj,t).data(i.val,f.displayFn(t)).addClass(f.classes.suggestion+" "+f.classes.selectable);e.appendChild(u[0])}),this.highlight&&s({className:this.classes.highlight,node:e,pattern:r}),n(e)},_getFooter:function(n,t){return this.templates.footer?this.templates.footer({query:n,suggestions:t,dataset:this.name}):null},_getHeader:function(n,t){return this.templates.header?this.templates.header({query:n,suggestions:t,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=n()},_injectQuery:function(n,i){return t.isObject(i)?t.mixin({_query:n},i):i},update:function(t){function e(n){u||(u=!0,n=(n||[]).slice(0,i.limit),r=n.length,i._overwrite(t,n),r<i.limit&&i.async&&i.trigger("asyncRequested",t))}function o(u){u=u||[];!f&&r<i.limit&&(i.cancel=n.noop,i._append(t,u.slice(0,i.limit-r)),i.async&&i.trigger("asyncReceived",t))}var i=this,f=!1,u=!1,r=0;this.cancel();this.cancel=function(){f=!0;i.cancel=n.noop;i.async&&i.trigger("asyncCanceled",t)};this.source(t,e,o);u||e([])},cancel:n.noop,clear:function(){this._empty();this.cancel();this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=n("<div>")}}),u}(),i=function(){"use strict";function i(i,r){function e(t){var i=u.$node.find(t.node).first();return t.node=i.length?i:n("<div>").appendTo(u.$node),new f(t,r)}var u=this;i=i||{};i.node||n.error("node is required");r.mixin(this);this.$node=n(i.node);this.query=null;this.datasets=t.map(i.datasets,e)}return t.mixin(i.prototype,r,{_onSelectableClick:function(t){this.trigger("selectableClicked",n(t.currentTarget))},_onRendered:function(n,t,i,r){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetRendered",t,i,r)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){function n(n){return n.isEmpty()}return t.every(this.datasets,n)},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var n=this.getActiveSelectable();n&&n.removeClass(this.classes.cursor)},_ensureVisible:function(n){var t,i,r,u;t=n.position().top;i=t+n.outerHeight(!0);r=this.$node.scrollTop();u=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10);t<0?this.$node.scrollTop(r+t):u<i&&this.$node.scrollTop(r+(i-u))},bind:function(){var n=this,i=t.bind(this._onSelectableClick,this);this.$node.on("click.tt",this.selectors.selectable,i);return t.each(this.datasets,function(t){t.onSync("asyncRequested",n._propagate,n).onSync("asyncCanceled",n._propagate,n).onSync("asyncReceived",n._propagate,n).onSync("rendered",n._onRendered,n).onSync("cleared",n._onCleared,n)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open);this._removeCursor()},setLanguageDirection:function(n){this.$node.attr("dir",n)},selectableRelativeToCursor:function(n){var i,r,u,t;return r=this.getActiveSelectable(),i=this._getSelectables(),u=r?i.index(r):-1,t=u+n,t=(t+1)%(i.length+1)-1,t=t<-1?i.length-1:t,t===-1?null:i.eq(t)},setCursor:function(n){this._removeCursor();(n=n&&n.first())&&(n.addClass(this.classes.cursor),this._ensureVisible(n))},getSelectableData:function(n){return n&&n.length?f.extractData(n):null},getActiveSelectable:function(){var n=this._getSelectables().filter(this.selectors.cursor).first();return n.length?n:null},getTopSelectable:function(){var n=this._getSelectables().first();return n.length?n:null},update:function(n){function r(t){t.update(n)}var i=n!==this.query;return i&&(this.query=n,t.each(this.datasets,r)),i},empty:function(){function n(n){n.clear()}t.each(this.datasets,n);this.query=null;this.$node.addClass(this.classes.empty)},destroy:function(){function i(n){n.destroy()}this.$node.off(".tt");this.$node=n("<div>");t.each(this.datasets,i)}}),i}(),h=function(){"use strict";function r(){i.apply(this,[].slice.call(arguments,0))}var n=i.prototype;return t.mixin(r.prototype,i.prototype,{open:function(){return this._allDatasetsEmpty()||this._show(),n.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),n.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),n._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),n._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(t){return this.$node.css(t==="ltr"?this.css.ltr:this.css.rtl),n.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),r}(),c=function(){"use strict";function r(r,u){var f,e,o,s,h,c,l,a,v,y,p;r=r||{};r.input||n.error("missing input");r.menu||n.error("missing menu");r.eventBus||n.error("missing event bus");u.mixin(this);this.eventBus=r.eventBus;this.minLength=t.isNumber(r.minLength)?r.minLength:1;this.input=r.input;this.menu=r.menu;this.enabled=!0;this.active=!1;this.input.hasFocus()&&this.activate();this.dir=this.input.getLangDir();this._hacks();this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this);f=i(this,"activate","open","_onFocused");e=i(this,"deactivate","_onBlurred");o=i(this,"isActive","isOpen","_onEnterKeyed");s=i(this,"isActive","isOpen","_onTabKeyed");h=i(this,"isActive","_onEscKeyed");c=i(this,"isActive","open","_onUpKeyed");l=i(this,"isActive","open","_onDownKeyed");a=i(this,"isActive","isOpen","_onLeftKeyed");v=i(this,"isActive","isOpen","_onRightKeyed");y=i(this,"_openIfActive","_onQueryChanged");p=i(this,"_openIfActive","_onWhitespaceChanged");this.input.bind().onSync("focused",f,this).onSync("blurred",e,this).onSync("enterKeyed",o,this).onSync("tabKeyed",s,this).onSync("escKeyed",h,this).onSync("upKeyed",c,this).onSync("downKeyed",l,this).onSync("leftKeyed",a,this).onSync("rightKeyed",v,this).onSync("queryChanged",y,this).onSync("whitespaceChanged",p,this).onSync("langDirChanged",this._onLangDirChanged,this)}function i(n){var i=[].slice.call(arguments,1);return function(){var r=[].slice.call(arguments);t.each(i,function(t){return n[t].apply(n,r)})}}return t.mixin(r.prototype,{_hacks:function(){var r,i;r=this.input.$input||n("<div>");i=this.menu.$node||n("<div>");r.on("blur.tt",function(n){var u,f,e;u=document.activeElement;f=i.is(u);e=i.has(u).length>0;t.isMsie()&&(f||e)&&(n.preventDefault(),n.stopImmediatePropagation(),t.defer(function(){r.focus()}))});i.on("mousedown.tt",function(n){n.preventDefault()})},_onSelectableClicked:function(n,t){this.select(t)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(n,t,i,r){this._updateHint();this.eventBus.trigger("render",i,r,t)},_onAsyncRequested:function(n,t,i){this.eventBus.trigger("asyncrequest",i,t)},_onAsyncCanceled:function(n,t,i){this.eventBus.trigger("asynccancel",i,t)},_onAsyncReceived:function(n,t,i){this.eventBus.trigger("asyncreceive",i,t)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(n,t){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&t.preventDefault()},_onTabKeyed:function(n,t){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&t.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&t.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){this.dir==="rtl"&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){this.dir==="ltr"&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(n,t){this._minLengthMet(t)?this.menu.update(t):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(n,t){this.dir!==t&&(this.dir=t,this.menu.setLanguageDirection(t))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(n){return n=t.isString(n)?n:this.input.getQuery()||"",n.length>=this.minLength},_updateHint:function(){var f,i,n,e,o,s,r;f=this.menu.getTopSelectable();i=this.menu.getSelectableData(f);n=this.input.getInputValue();!i||t.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(e=u.normalizeQuery(n),o=t.escapeRegExChars(e),s=new RegExp("^(?:"+o+")(.+$)","i"),r=s.exec(i.val),r&&this.input.setHint(n+r[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return this.isActive()?!0:!this.isEnabled()||this.eventBus.before("active")?!1:(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return this.isActive()?this.eventBus.before("idle")?!1:(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0):!0},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(n){this.input.setQuery(t.toStr(n))},getVal:function(){return this.input.getQuery()},select:function(n){var t=this.menu.getSelectableData(n);return t&&!this.eventBus.before("select",t.obj)?(this.input.setQuery(t.val,!0),this.eventBus.trigger("select",t.obj),this.close(),!0):!1},autocomplete:function(n){var i,t,r;return(i=this.input.getQuery(),t=this.menu.getSelectableData(n),r=t&&i!==t.val,r&&!this.eventBus.before("autocomplete",t.obj))?(this.input.setQuery(t.val),this.eventBus.trigger("autocomplete",t.obj),!0):!1},moveCursor:function(n){var u,i,t,r,f;return(u=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(n),t=this.menu.getSelectableData(i),r=t?t.obj:null,f=this._minLengthMet()&&this.menu.update(u),!f&&!this.eventBus.before("cursorchange",r))?(this.menu.setCursor(i),t?this.input.setInputValue(t.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",r),!0):!1},destroy:function(){this.input.destroy();this.menu.destroy()}}),r}();(function(){"use strict";function r(t,i){t.each(function(){var t=n(this),r;(r=t.data(f.typeahead))&&i(r,t)})}function v(n,t){return n.clone().addClass(t.classes.hint).removeData().css(t.css.hint).css(p(n)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function y(n,t){n.data(f.attrs,{dir:n.attr("dir"),autocomplete:n.attr("autocomplete"),spellcheck:n.attr("spellcheck"),style:n.attr("style")});n.addClass(t.classes.input).attr({autocomplete:"off",spellcheck:!1});try{n.attr("dir")||n.attr("dir","auto")}catch(i){}return n}function p(n){return{backgroundAttachment:n.css("background-attachment"),backgroundClip:n.css("background-clip"),backgroundColor:n.css("background-color"),backgroundImage:n.css("background-image"),backgroundOrigin:n.css("background-origin"),backgroundPosition:n.css("background-position"),backgroundRepeat:n.css("background-repeat"),backgroundSize:n.css("background-size")}}function w(n){var r,i;r=n.data(f.www);i=n.parent().filter(r.selectors.wrapper);t.each(n.data(f.attrs),function(i,r){t.isUndefined(i)?n.removeAttr(r):n.attr(r,i)});n.removeData(f.typeahead).removeData(f.www).removeData(f.attr).removeClass(r.classes.input);i.length&&(n.detach().insertAfter(i),i.remove())}function a(i){var u,r;return u=t.isJQuery(i)||t.isElement(i),r=u?n(i).first():[],r.length?r:null}var l,f,s;l=n.fn.typeahead;f={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"};s={initialize:function(r,s){function p(){var e,d,p,w,b,k,g,nt,tt,it,rt;t.each(s,function(n){n.highlight=!!r.highlight});e=n(this);d=n(l.html.wrapper);p=a(r.hint);w=a(r.menu);b=r.hint!==!1&&!p;k=r.menu!==!1&&!w;b&&(p=v(e,l));k&&(w=n(l.html.menu).css(l.css.menu));p&&p.val("");e=y(e,l);(b||k)&&(d.css(l.css.wrapper),e.css(b?l.css.input:l.css.inputWithNoHint),e.wrap(d).parent().prepend(b?p:null).append(k?w:null));rt=k?h:i;g=new o({el:e});nt=new u({hint:p,input:e},l);tt=new rt({node:w,datasets:s},l);it=new c({input:nt,menu:tt,eventBus:g,minLength:r.minLength},l);e.data(f.www,l);e.data(f.typeahead,it)}var l;return s=t.isArray(s)?s:[].slice.call(arguments,1),r=r||{},l=e(r.classNames),this.each(p)},isEnabled:function(){var n;return r(this.first(),function(t){n=t.isEnabled()}),n},enable:function(){return r(this,function(n){n.enable()}),this},disable:function(){return r(this,function(n){n.disable()}),this},isActive:function(){var n;return r(this.first(),function(t){n=t.isActive()}),n},activate:function(){return r(this,function(n){n.activate()}),this},deactivate:function(){return r(this,function(n){n.deactivate()}),this},isOpen:function(){var n;return r(this.first(),function(t){n=t.isOpen()}),n},open:function(){return r(this,function(n){n.open()}),this},close:function(){return r(this,function(n){n.close()}),this},select:function(t){var i=!1,u=n(t);return r(this.first(),function(n){i=n.select(u)}),i},autocomplete:function(t){var i=!1,u=n(t);return r(this.first(),function(n){i=n.autocomplete(u)}),i},moveCursor:function(n){var t=!1;return r(this.first(),function(i){t=i.moveCursor(n)}),t},val:function(n){var t;return arguments.length?(r(this,function(t){t.setVal(n)}),this):(r(this.first(),function(n){t=n.getVal()}),t)},destroy:function(){return r(this,function(n,t){w(t);n.destroy()}),this}};n.fn.typeahead=function(n){return s[n]?s[n].apply(this,[].slice.call(arguments,1)):s.initialize.apply(this,arguments)};n.fn.typeahead.noConflict=function(){return n.fn.typeahead=l,this}})()});!function(n){var i=function(i,r){if(this.element=n(i),this.format=t.parseFormat(r.format||this.element.data("date-format")||"mm/dd/yyyy"),this.picker=n(t.template).appendTo("body").on({click:n.proxy(this.click,this)}),this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on"):!1,this.isInput)this.element.on({focus:n.proxy(this.show,this),keyup:n.proxy(this.update,this)});else if(this.component)this.component.on("click",n.proxy(this.show,this));else this.element.on("click",n.proxy(this.show,this));if(this.minViewMode=r.minViewMode||this.element.data("date-minviewmode")||0,typeof this.minViewMode=="string")switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0}if(this.viewMode=r.viewMode||this.element.data("date-viewmode")||0,typeof this.viewMode=="string")switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0}this.startViewMode=this.viewMode;this.weekStart=r.weekStart||this.element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.onRender=r.onRender;this.fillDow();this.fillMonths();this.update();this.showMode()},t;i.prototype={constructor:i,show:function(t){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();this.place();n(window).on("resize",n.proxy(this.place,this));t&&(t.stopPropagation(),t.preventDefault());!this.isInput;var i=this;n(document).on("mousedown",function(t){n(t.target).closest(".datepicker").length==0&&i.hide()});this.element.trigger({type:"show",date:this.date})},hide:function(){this.picker.hide();n(window).off("resize",this.place);this.viewMode=this.startViewMode;this.showMode();this.isInput||n(document).off("mousedown",this.hide);this.element.trigger({type:"hide",date:this.date})},set:function(){var n=t.formatDate(this.date,this.format);this.isInput?this.element.prop("value",n):(this.component&&this.element.find("input").prop("value",n),this.element.data("date",n))},setValue:function(n){this.date=typeof n=="string"?t.parseDate(n,this.format):new Date(n);this.set();this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),1,0,0,0,0);this.fill()},place:function(){var n=this.component?this.component.offset():this.element.offset();this.picker.css({top:n.top+this.height,left:n.left})},update:function(n){this.date=t.parseDate(typeof n=="string"?n:this.isInput?this.element.prop("value"):this.element.data("date"),this.format);this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),1,0,0,0,0);this.fill()},fillDow:function(){for(var i=this.weekStart,n="<tr>";i<this.weekStart+7;)n+='<th class="dow">'+t.dates.daysMin[i++%7]+"<\/th>";n+="<\/tr>";this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var n="",i=0;i<12;)n+='<span class="month">'+t.dates.monthsShort[i++]+"<\/span>";this.picker.find(".datepicker-months td").append(n)},fill:function(){var a=new Date(this.viewDate),i=a.getFullYear(),s=a.getMonth(),p=this.date.valueOf(),n,h,u,r,f,e,c,l,v,y,o;for(this.picker.find(".datepicker-days th:eq(1)").text(t.dates.months[s]+" "+i),n=new Date(i,s-1,28,0,0,0,0),h=t.getDaysInMonth(n.getFullYear(),n.getMonth()),n.setDate(h),n.setDate(h-(n.getDay()-this.weekStart+7)%7),u=new Date(n),u.setDate(u.getDate()+42),u=u.valueOf(),r=[];n.valueOf()<u;)n.getDay()===this.weekStart&&r.push("<tr>"),f=this.onRender(n),e=n.getFullYear(),c=n.getMonth(),c<s&&e===i||e<i?f+=" old":(c>s&&e===i||e>i)&&(f+=" new"),n.valueOf()===p&&(f+=" active"),r.push('<td class="day '+f+'">'+n.getDate()+"<\/td>"),n.getDay()===this.weekEnd&&r.push("<\/tr>"),n.setDate(n.getDate()+1);for(this.picker.find(".datepicker-days tbody").empty().append(r.join("")),l=this.date.getFullYear(),v=this.picker.find(".datepicker-months").find("th:eq(1)").text(i).end().find("span").removeClass("active"),l===i&&v.eq(this.date.getMonth()).addClass("active"),r="",i=parseInt(i/10,10)*10,y=this.picker.find(".datepicker-years").find("th:eq(1)").text(i+"-"+(i+9)).end().find("td"),i-=1,o=-1;o<11;o++)r+='<span class="year'+(o===-1||o===10?" old":"")+(l===i?" active":"")+'">'+i+"<\/span>",i+=1;y.html(r)},click:function(i){var r,e,u,f;if(i.stopPropagation(),i.preventDefault(),r=n(i.target).closest("span, td, th"),r.length===1)switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"switch":this.showMode(1);break;case"prev":case"next":this.viewDate["set"+t.modes[this.viewMode].navFnc].call(this.viewDate,this.viewDate["get"+t.modes[this.viewMode].navFnc].call(this.viewDate)+t.modes[this.viewMode].navStep*(r[0].className==="prev"?-1:1));this.fill();this.set()}break;case"span":r.is(".month")?(u=r.parent().find("span").index(r),this.viewDate.setMonth(u)):(f=parseInt(r.text(),10)||0,this.viewDate.setFullYear(f));this.viewMode!==0&&(this.date=new Date(this.viewDate),this.element.trigger({type:"changeDate",date:this.date,viewMode:t.modes[this.viewMode].clsName}));this.showMode(-1);this.fill();this.set();break;case"td":r.is(".day")&&!r.is(".disabled")&&(e=parseInt(r.text(),10)||1,u=this.viewDate.getMonth(),r.is(".old")?u-=1:r.is(".new")&&(u+=1),f=this.viewDate.getFullYear(),this.date=new Date(f,u,e,0,0,0,0),this.viewDate=new Date(f,u,Math.min(28,e),0,0,0,0),this.fill(),this.set(),this.element.trigger({type:"changeDate",date:this.date,viewMode:t.modes[this.viewMode].clsName}))}},mousedown:function(n){n.stopPropagation();n.preventDefault()},showMode:function(n){n&&(this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+n)));this.picker.find(">div").hide().filter(".datepicker-"+t.modes[this.viewMode].clsName).show()}};n.fn.datepicker=function(t,r){return this.each(function(){var f=n(this),u=f.data("datepicker"),e=typeof t=="object"&&t;u||f.data("datepicker",u=new i(this,n.extend({},n.fn.datepicker.defaults,e)));typeof t=="string"&&u[t](r)})};n.fn.datepicker.defaults={onRender:function(){return""}};n.fn.datepicker.Constructor=i;t={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],dates:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},getDaysInMonth:function(n,i){return[31,t.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][i]},parseFormat:function(n){var i=n.match(/[.\/\-\s].*?/),t=n.split(/\W+/);if(!i||!t||t.length===0)throw new Error("Invalid date format.");return{separator:i,parts:t}},parseDate:function(n,t){var f=n.split(t.separator),n=new Date,i,r,s;if(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),f.length===t.parts.length){var u=n.getFullYear(),e=n.getDate(),o=n.getMonth();for(r=0,s=t.parts.length;r<s;r++){i=parseInt(f[r],10)||1;switch(t.parts[r]){case"dd":case"d":e=i;n.setDate(i);break;case"mm":case"m":o=i-1;n.setMonth(i-1);break;case"yy":u=2e3+i;n.setFullYear(2e3+i);break;case"yyyy":u=i;n.setFullYear(i)}}n=new Date(u,o,e,0,0,0)}return n},formatDate:function(n,t){var i={d:n.getDate(),m:n.getMonth()+1,yy:n.getFullYear().toString().substring(2),yyyy:n.getFullYear()},n,r,u;for(i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m,n=[],r=0,u=t.parts.length;r<u;r++)n.push(i[t.parts[r]]);return n.join(t.separator)},headTemplate:'<thead><tr><th class="prev">&lsaquo;<\/th><th colspan="5" class="switch"><\/th><th class="next">&rsaquo;<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>'};t.template='<div class="datepicker dropdown-menu"><div class="datepicker-days"><table class=" table-condensed">'+t.headTemplate+'<tbody><\/tbody><\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+t.headTemplate+t.contTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+t.headTemplate+t.contTemplate+"<\/table><\/div><\/div>"}(window.jQuery);!function(n){"use strict";function r(n,t){return n+".touchspin_"+t}function i(t,i){return n.map(t,function(n){return r(n,i)})}var t=0;n.fn.TouchSpin=function(r){if("destroy"===r)return void this.each(function(){var t=n(this),r=t.data();n(document).off(i(["mouseup","touchend","touchcancel","mousemove","touchmove","scroll","scrollstart"],r.spinnerid).join(" "))});var u={min:0,max:100,initval:"",step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalupclass:"glyphicon glyphicon-chevron-up",verticaldownclass:"glyphicon glyphicon-chevron-down",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-default",buttonup_class:"btn btn-default",buttondown_txt:"-",buttonup_txt:"+"},f={min:"min",max:"max",initval:"init-val",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each(function(){function rt(){if(!o.data("alreadyinitialized")){if(o.data("alreadyinitialized",!0),t+=1,o.data("spinnerid",t),!o.is("input"))return void console.log("Must be an input.");et();ut();w();ht();at();vt();yt();pt();s.input.css("display","block")}}function ut(){""!==e.initval&&""===o.val()&&o.val(e.initval)}function ft(n){st(n);w();var t=s.input.val();""!==t&&(t=Number(s.input.val()),s.input.val(t.toFixed(e.decimals)))}function et(){e=n.extend({},u,bt,ot(),r)}function ot(){var t={};return n.each(f,function(n,i){var r="bts-"+i;o.is("[data-"+r+"]")&&(t[n]=o.data(r))}),t}function st(t){e=n.extend({},e,t)}function ht(){var n=o.val(),t=o.parent();""!==n&&(n=Number(n).toFixed(e.decimals));o.data("initvalue",n).val(n);o.addClass("form-control");t.hasClass("input-group")?ct(t):lt()}function ct(t){t.addClass("bootstrap-touchspin");var i,r,u=o.prev(),f=o.next(),s='<span class="input-group-addon bootstrap-touchspin-prefix">'+e.prefix+"<\/span>",h='<span class="input-group-addon bootstrap-touchspin-postfix">'+e.postfix+"<\/span>";u.hasClass("input-group-btn")?(i='<button class="'+e.buttondown_class+' bootstrap-touchspin-down" type="button">'+e.buttondown_txt+"<\/button>",u.append(i)):(i='<span class="input-group-btn"><button class="'+e.buttondown_class+' bootstrap-touchspin-down" type="button">'+e.buttondown_txt+"<\/button><\/span>",n(i).insertBefore(o));f.hasClass("input-group-btn")?(r='<button class="'+e.buttonup_class+' bootstrap-touchspin-up" type="button">'+e.buttonup_txt+"<\/button>",f.prepend(r)):(r='<span class="input-group-btn"><button class="'+e.buttonup_class+' bootstrap-touchspin-up" type="button">'+e.buttonup_txt+"<\/button><\/span>",n(r).insertAfter(o));n(s).insertBefore(o);n(h).insertAfter(o);a=t}function lt(){var t;t=e.verticalbuttons?'<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">'+e.prefix+'<\/span><span class="input-group-addon bootstrap-touchspin-postfix">'+e.postfix+'<\/span><span class="input-group-btn-vertical"><button class="'+e.buttondown_class+' bootstrap-touchspin-up" type="button"><i class="'+e.verticalupclass+'"><\/i><\/button><button class="'+e.buttonup_class+' bootstrap-touchspin-down" type="button"><i class="'+e.verticaldownclass+'"><\/i><\/button><\/span><\/div>':'<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="'+e.buttondown_class+' bootstrap-touchspin-down" type="button">'+e.buttondown_txt+'<\/button><\/span><span class="input-group-addon bootstrap-touchspin-prefix">'+e.prefix+'<\/span><span class="input-group-addon bootstrap-touchspin-postfix">'+e.postfix+'<\/span><span class="input-group-btn"><button class="'+e.buttonup_class+' bootstrap-touchspin-up" type="button">'+e.buttonup_txt+"<\/button><\/span><\/div>";a=n(t).insertBefore(o);n(".bootstrap-touchspin-prefix",a).after(o);o.hasClass("input-sm")?a.addClass("input-group-sm"):o.hasClass("input-lg")&&a.addClass("input-group-lg")}function at(){s={down:n(".bootstrap-touchspin-down",a),up:n(".bootstrap-touchspin-up",a),input:n("input",a),prefix:n(".bootstrap-touchspin-prefix",a).addClass(e.prefix_extraclass),postfix:n(".bootstrap-touchspin-postfix",a).addClass(e.postfix_extraclass)}}function vt(){""===e.prefix&&s.prefix.hide();""===e.postfix&&s.postfix.hide()}function yt(){o.on("keydown",function(n){var t=n.keyCode||n.which;38===t?("up"!==l&&(v(),k()),n.preventDefault()):40===t&&("down"!==l&&(y(),b()),n.preventDefault())});o.on("keyup",function(n){var t=n.keyCode||n.which;38===t?c():40===t&&c()});o.on("blur",function(){w()});s.down.on("keydown",function(n){var t=n.keyCode||n.which;(32===t||13===t)&&("down"!==l&&(y(),b()),n.preventDefault())});s.down.on("keyup",function(n){var t=n.keyCode||n.which;(32===t||13===t)&&c()});s.up.on("keydown",function(n){var t=n.keyCode||n.which;(32===t||13===t)&&("up"!==l&&(v(),k()),n.preventDefault())});s.up.on("keyup",function(n){var t=n.keyCode||n.which;(32===t||13===t)&&c()});s.down.on("mousedown.touchspin",function(n){s.down.off("touchstart.touchspin");o.is(":disabled")||(y(),b(),n.preventDefault(),n.stopPropagation())});s.down.on("touchstart.touchspin",function(n){s.down.off("mousedown.touchspin");o.is(":disabled")||(y(),b(),n.preventDefault(),n.stopPropagation())});s.up.on("mousedown.touchspin",function(n){s.up.off("touchstart.touchspin");o.is(":disabled")||(v(),k(),n.preventDefault(),n.stopPropagation())});s.up.on("touchstart.touchspin",function(n){s.up.off("mousedown.touchspin");o.is(":disabled")||(v(),k(),n.preventDefault(),n.stopPropagation())});s.up.on("mouseout touchleave touchend touchcancel",function(n){l&&(n.stopPropagation(),c())});s.down.on("mouseout touchleave touchend touchcancel",function(n){l&&(n.stopPropagation(),c())});s.down.on("mousemove touchmove",function(n){l&&(n.stopPropagation(),n.preventDefault())});s.up.on("mousemove touchmove",function(n){l&&(n.stopPropagation(),n.preventDefault())});n(document).on(i(["mouseup","touchend","touchcancel"],t).join(" "),function(n){l&&(n.preventDefault(),c())});n(document).on(i(["mousemove","touchmove","scroll","scrollstart"],t).join(" "),function(n){l&&(n.preventDefault(),c())});o.on("mousewheel DOMMouseScroll",function(n){if(e.mousewheel&&o.is(":focus")){var t=n.originalEvent.wheelDelta||-n.originalEvent.deltaY||-n.originalEvent.detail;n.stopPropagation();n.preventDefault();0>t?y():v()}})}function pt(){o.on("touchspin.uponce",function(){c();v()});o.on("touchspin.downonce",function(){c();y()});o.on("touchspin.startupspin",function(){k()});o.on("touchspin.startdownspin",function(){b()});o.on("touchspin.stopspin",function(){c()});o.on("touchspin.updatesettings",function(n,t){ft(t)})}function wt(n){switch(e.forcestepdivisibility){case"round":return(Math.round(n/e.step)*e.step).toFixed(e.decimals);case"floor":return(Math.floor(n/e.step)*e.step).toFixed(e.decimals);case"ceil":return(Math.ceil(n/e.step)*e.step).toFixed(e.decimals);default:return n}}function w(){var i,n,t;i=o.val();""!==i&&(e.decimals>0&&"."===i||(n=parseFloat(i),isNaN(n)&&(n=0),t=n,n.toString()!==i&&(t=n),n<e.min&&(t=e.min),n>e.max&&(t=e.max),t=wt(t),Number(i).toString()!==t.toString()&&(o.val(t),o.trigger("change"))))}function d(){if(e.booster){var n=Math.pow(2,Math.floor(p/e.boostat))*e.step;return e.maxboostedstep&&n>e.maxboostedstep&&(n=e.maxboostedstep,h=Math.round(h/n)*n),Math.max(e.step,n)}return e.step}function v(){w();h=parseFloat(s.input.val());isNaN(h)&&(h=0);var n=h,t=d();h+=t;h>e.max&&(h=e.max,o.trigger("touchspin.on.max"),c());s.input.val(Number(h).toFixed(e.decimals));n!==h&&o.trigger("change")}function y(){w();h=parseFloat(s.input.val());isNaN(h)&&(h=0);var n=h,t=d();h-=t;h<e.min&&(h=e.min,o.trigger("touchspin.on.min"),c());s.input.val(h.toFixed(e.decimals));n!==h&&o.trigger("change")}function b(){c();p=0;l="down";o.trigger("touchspin.on.startspin");o.trigger("touchspin.on.startdownspin");tt=setTimeout(function(){g=setInterval(function(){p++;y()},e.stepinterval)},e.stepintervaldelay)}function k(){c();p=0;l="up";o.trigger("touchspin.on.startspin");o.trigger("touchspin.on.startupspin");it=setTimeout(function(){nt=setInterval(function(){p++;v()},e.stepinterval)},e.stepintervaldelay)}function c(){switch(clearTimeout(tt),clearTimeout(it),clearInterval(g),clearInterval(nt),l){case"up":o.trigger("touchspin.on.stopupspin");o.trigger("touchspin.on.stopspin");break;case"down":o.trigger("touchspin.on.stopdownspin");o.trigger("touchspin.on.stopspin")}p=0;l=!1}var e,a,s,h,g,nt,tt,it,o=n(this),bt=o.data(),p=0,l=!1;rt()})}}(jQuery);!function(n,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(n)}):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(this,function(){!function(n){"use strict";function i(t){return n.each([{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}],function(){t=t.replace(this.re,this.ch)}),t}function r(n){var i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(i).join("|")+")",u=new RegExp(r),f=new RegExp(r,"g"),t=null==n?"":""+n;return u.test(t)?t.replace(f,function(n){return i[n]}):t}function u(i,r){var e=arguments,u=i,s=r,f,o;return[].shift.apply(e),o=this.each(function(){var o=n(this),i,r,h,c;if(o.is("select")){if(i=o.data("selectpicker"),r="object"==typeof u&&u,i){if(r)for(h in r)r.hasOwnProperty(h)&&(i.options[h]=r[h])}else c=n.extend({},t.DEFAULTS,n.fn.selectpicker.defaults||{},o.data(),r),o.data("selectpicker",i=new t(this,c,s));"string"==typeof u&&(f=i[u]instanceof Function?i[u].apply(i,e):i.options[u])}}),"undefined"!=typeof f?f:o}var t,f;String.prototype.includes||!function(){var i={}.toString,n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(r){}return i}(),r="".indexOf,t=function(n){var u,s;if(null==this)throw TypeError();if(u=String(this),n&&"[object RegExp]"==i.call(n))throw TypeError();var f=u.length,e=String(n),h=e.length,o=arguments.length>1?arguments[1]:void 0,t=o?Number(o):0;return t!=t&&(t=0),s=Math.min(Math.max(t,0),f),h+s>f?!1:-1!=r.call(u,e,t)};n?n(String.prototype,"includes",{value:t,configurable:!0,writable:!0}):String.prototype.includes=t}();String.prototype.startsWith||!function(){var n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(r){}return i}(),i={}.toString,t=function(n){var u,f,r;if(null==this)throw TypeError();if(u=String(this),n&&"[object RegExp]"==i.call(n))throw TypeError();var e=u.length,o=String(n),s=o.length,h=arguments.length>1?arguments[1]:void 0,t=h?Number(h):0;if(t!=t&&(t=0),f=Math.min(Math.max(t,0),e),s+f>e)return!1;for(r=-1;++r<s;)if(u.charCodeAt(f+r)!=o.charCodeAt(r))return!1;return!0};n?n(String.prototype,"startsWith",{value:t,configurable:!0,writable:!0}):String.prototype.startsWith=t}();Object.keys||(Object.keys=function(n,t,i){i=[];for(t in n)i.hasOwnProperty.call(n,t)&&i.push(t);return i});n.expr[":"].icontains=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.text()).toUpperCase();return f.includes(r[3].toUpperCase())};n.expr[":"].ibegins=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.text()).toUpperCase();return f.startsWith(r[3].toUpperCase())};n.expr[":"].aicontains=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toUpperCase();return f.includes(r[3].toUpperCase())};n.expr[":"].aibegins=function(t,i,r){var u=n(t),f=(u.data("tokens")||u.data("normalizedText")||u.text()).toUpperCase();return f.startsWith(r[3].toUpperCase())};t=function(i,r,u){u&&(u.stopPropagation(),u.preventDefault());this.$element=n(i);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=r;null===this.options.title&&(this.options.title=this.$element.attr("title"));this.val=t.prototype.val;this.render=t.prototype.render;this.refresh=t.prototype.refresh;this.setStyle=t.prototype.setStyle;this.selectAll=t.prototype.selectAll;this.deselectAll=t.prototype.deselectAll;this.destroy=t.prototype.remove;this.remove=t.prototype.remove;this.show=t.prototype.show;this.hide=t.prototype.hide;this.init()};t.VERSION="1.7.2";t.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:"btn-default",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",maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1};t.prototype={constructor:t,init:function(){var t=this,i=this.$element.attr("id");this.$element.addClass("bs-select-hidden");this.liObj={};this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement);this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(".dropdown-menu");this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right");"undefined"!=typeof i&&(this.$button.attr("data-id",i),n('label[for="'+i+'"]').click(function(n){n.preventDefault();t.$button.focus()}));this.checkDisabled();this.clickListener();this.options.liveSearch&&this.liveSearchListener();this.render();this.setStyle();this.setWidth();this.options.container&&this.selectPosition();this.$menu.data("this",this);this.$newElement.data("this",this);this.options.mobile&&this.mobile();this.$newElement.on("hide.bs.dropdown",function(n){t.$element.trigger("hide.bs.select",n)});this.$newElement.on("hidden.bs.dropdown",function(n){t.$element.trigger("hidden.bs.select",n)});this.$newElement.on("show.bs.dropdown",function(n){t.$element.trigger("show.bs.select",n)});this.$newElement.on("shown.bs.dropdown",function(n){t.$element.trigger("shown.bs.select",n)});setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple?" show-tick":"",i=this.$element.parent().hasClass("input-group")?" input-group-btn":"",u=this.autofocus?" autofocus":"",f=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>":"",e=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+r(this.options.liveSearchPlaceholder)+'"')+"><\/div>":"",o=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'<\/button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"<\/button><\/div><\/div>":"",s=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"<\/button><\/div><\/div>":"",h='<div class="btn-group bootstrap-select'+t+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+u+'><span class="filter-option pull-left"><\/span>&nbsp;<span class="caret"><\/span><\/button><div class="dropdown-menu open">'+f+e+o+'<ul class="dropdown-menu inner" role="menu"><\/ul>'+s+"<\/div><\/div>";return n(h)},createView:function(){var n=this.createDropdown(),t=this.createLi();return n.find("ul")[0].innerHTML=t,n},reloadLi:function(){this.destroyLi();var n=this.createLi();this.$menuInner[0].innerHTML=n},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var u=this,t=[],o=0,s=document.createElement("option"),f=-1,e=function(n,t,i,r){return"<li"+("undefined"!=typeof i&""!==i?' class="'+i+'"':"")+("undefined"!=typeof t&null!==t?' data-original-index="'+t+'"':"")+("undefined"!=typeof r&null!==r?'data-optgroup="'+r+'"':"")+">"+n+"<\/li>"},c=function(n,t,f,e){return'<a tabindex="0"'+("undefined"!=typeof t?' class="'+t+'"':"")+("undefined"!=typeof f?' style="'+f+'"':"")+(u.options.liveSearchNormalize?' data-normalized-text="'+i(r(n))+'"':"")+("undefined"!=typeof e||null!==e?' data-tokens="'+e+'"':"")+">"+n+'<span class="'+u.options.iconBase+" "+u.options.tickIcon+' check-mark"><\/span><\/a>'},h;return!this.options.title||this.multiple||(f--,this.$element.find(".bs-title-option").length)||(h=this.$element[0],s.className="bs-title-option",s.appendChild(document.createTextNode(this.options.title)),s.value="",h.insertBefore(s,h.firstChild),null===h.options[h.selectedIndex].getAttribute("selected")&&(s.selected=!0)),this.$element.find("option").each(function(i){var r=n(this);if(f++,!r.hasClass("bs-title-option")){var l=this.className||"",a=this.style.cssText,s=r.data("content")?r.data("content"):r.html(),v=r.data("tokens")?r.data("tokens"):null,b="undefined"!=typeof r.data("subtext")?'<small class="text-muted">'+r.data("subtext")+"<\/small>":"",h="undefined"!=typeof r.data("icon")?'<span class="'+u.options.iconBase+" "+r.data("icon")+'"><\/span> ':"",p=this.disabled||"OPTGROUP"===this.parentElement.tagName&&this.parentElement.disabled;if(""!==h&&p&&(h="<span>"+h+"<\/span>"),u.options.hideDisabled&&p)return void f--;if(r.data("content")||(s=h+'<span class="text">'+s+b+"<\/span>"),"OPTGROUP"===this.parentElement.tagName&&r.data("divider")!==!0){if(0===r.index()){o+=1;var y=this.parentElement.label,k="undefined"!=typeof r.parent().data("subtext")?'<small class="text-muted">'+r.parent().data("subtext")+"<\/small>":"",d=r.parent().data("icon")?'<span class="'+u.options.iconBase+" "+r.parent().data("icon")+'"><\/span> ':"",w=" "+this.parentElement.className||"";y=d+'<span class="text">'+y+k+"<\/span>";0!==i&&t.length>0&&(f++,t.push(e("",null,"divider",o+"div")));f++;t.push(e(y,null,"dropdown-header"+w,o))}t.push(e(c(s,"opt "+l+w,a,v),i,"",o))}else r.data("divider")===!0?t.push(e("",i,"divider")):r.data("hidden")===!0?t.push(e(c(s,l,a,v),i,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(f++,t.push(e("",null,"divider",o+"div"))),t.push(e(c(s,l,a,v),i)));u.liObj[i]=f}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),t.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(t){var o,i=this,r,u,f,e,s;t!==!1&&this.$element.find("option").each(function(n){var t=i.findLis().eq(i.liObj[n]);i.setDisabled(n,this.disabled||"OPTGROUP"===this.parentElement.tagName&&this.parentElement.disabled,t);i.setSelected(n,this.selected,t)});this.tabIndex();r=this.$element.find("option").map(function(){if(this.selected){if(i.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentElement.tagName&&this.parentElement.disabled))return!1;var r,t=n(this),u=t.data("icon")&&i.options.showIcon?'<i class="'+i.options.iconBase+" "+t.data("icon")+'"><\/i> ':"";return r=i.options.showSubtext&&t.data("subtext")&&!i.multiple?' <small class="text-muted">'+t.data("subtext")+"<\/small>":"","undefined"!=typeof t.attr("title")?t.attr("title"):t.data("content")&&i.options.showContent?t.data("content"):u+t.html()+r}}).toArray();u=this.multiple?r.join(this.options.multipleSeparator):r[0];this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1&&(f=this.options.selectedTextFormat.split(">"),(f.length>1&&r.length>f[1]||1==f.length&&r.length>=2)&&(o=this.options.hideDisabled?", [disabled]":"",e=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+o).length,s="function"==typeof this.options.countSelectedText?this.options.countSelectedText(r.length,e):this.options.countSelectedText,u=s.replace("{0}",r.length.toString()).replace("{1}",e.toString())));void 0==this.options.title&&(this.options.title=this.$element.attr("title"));"static"==this.options.selectedTextFormat&&(u=this.options.title);u||(u="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText);this.$button.attr("title",n.trim(u.replace(/<[^>]*>?/g,"")));this.$button.children(".filter-option").html(u);this.$element.trigger("rendered.bs.select")},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?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(t){var y;if(t||this.options.size!==!1&&!this.sizeInfo){var e=document.createElement("div"),r=document.createElement("div"),o=document.createElement("ul"),l=document.createElement("li"),p=document.createElement("li"),a=document.createElement("a"),v=document.createElement("span"),s=this.options.header?this.$menu.find(".popover-title")[0].cloneNode(!0):null,u=this.options.liveSearch?document.createElement("div"):null,h=this.options.actionsBox&&this.multiple?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,c=this.options.doneButton&&this.multiple?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;(v.className="text",e.className=this.$menu[0].parentNode.className+" open",r.className="dropdown-menu open",o.className="dropdown-menu inner",l.className="divider",v.appendChild(document.createTextNode("Inner text")),a.appendChild(v),p.appendChild(a),o.appendChild(p),o.appendChild(l),s&&r.appendChild(s),u)&&(y=document.createElement("span"),u.className="bs-searchbox",y.className="form-control",u.appendChild(y),r.appendChild(u));h&&r.appendChild(h);r.appendChild(o);c&&r.appendChild(c);e.appendChild(r);document.body.appendChild(e);var b=a.offsetHeight,k=s?s.offsetHeight:0,d=u?u.offsetHeight:0,g=h?h.offsetHeight:0,nt=c?c.offsetHeight:0,tt=n(l).outerHeight(!0),i=getComputedStyle?getComputedStyle(r):!1,f=i?n(r):null,w=parseInt(i?i.paddingTop:f.css("paddingTop"))+parseInt(i?i.paddingBottom:f.css("paddingBottom"))+parseInt(i?i.borderTopWidth:f.css("borderTopWidth"))+parseInt(i?i.borderBottomWidth:f.css("borderBottomWidth")),it=w+parseInt(i?i.marginTop:f.css("marginTop"))+parseInt(i?i.marginBottom:f.css("marginBottom"))+2;document.body.removeChild(e);this.sizeInfo={liHeight:b,headerHeight:k,searchHeight:d,actionsHeight:g,doneButtonHeight:nt,dividerHeight:tt,menuPadding:w,menuExtras:it}}},setSize:function(){var h,d,g;this.findLis();this.liHeight();var i,u,f,o,r=this,t=this.$menu,p=this.$menuInner,c=n(window),nt=this.$newElement[0].offsetHeight,w=this.sizeInfo.liHeight,l=this.sizeInfo.headerHeight,a=this.sizeInfo.searchHeight,v=this.sizeInfo.actionsHeight,y=this.sizeInfo.doneButtonHeight,tt=this.sizeInfo.dividerHeight,s=this.sizeInfo.menuPadding,e=this.sizeInfo.menuExtras,b=this.options.hideDisabled?".disabled":"",k=function(){f=r.$newElement.offset().top-c.scrollTop();o=c.height()-f-nt};(k(),this.options.header&&t.css("padding-top",0),"auto"===this.options.size)?(h=function(){var h,b=function(t,i){return function(r){return i?r.classList?r.classList.contains(t):n(r).hasClass(t):!(r.classList?r.classList.contains(t):n(r).hasClass(t))}},d=r.$menuInner[0].getElementsByTagName("li"),c=Array.prototype.filter?Array.prototype.filter.call(d,b("hidden",!1)):r.$lis.not(".hidden"),g=Array.prototype.filter?Array.prototype.filter.call(c,b("dropdown-header",!0)):c.filter(".dropdown-header");k();i=o-e;r.options.container?(t.data("height")||t.data("height",t.height()),u=t.data("height")):u=t.height();r.options.dropupAuto&&r.$newElement.toggleClass("dropup",f>o&&u>i-e);r.$newElement.hasClass("dropup")&&(i=f-e);h=c.length+g.length>3?3*w+e-2:0;t.css({"max-height":i+"px",overflow:"hidden","min-height":h+l+a+v+y+"px"});p.css({"max-height":i-l-a-v-y-s+"px","overflow-y":"auto","min-height":Math.max(h-s,0)+"px"})},h(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",h),c.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",h)):this.options.size&&"auto"!=this.options.size&&this.$lis.not(b).length>this.options.size&&(d=this.$lis.not(".divider").not(b).children().slice(0,this.options.size).last().parent().index(),g=this.$lis.slice(0,d+1).filter(".divider").length,i=w*this.options.size+g*tt+s,r.options.container?(t.data("height")||t.data("height",t.height()),u=t.data("height")):u=t.height(),r.options.dropupAuto&&this.$newElement.toggleClass("dropup",f>o&&u>i-e),t.css({"max-height":i+l+a+v+y+"px",overflow:"hidden","min-height":""}),p.css({"max-height":i-s+"px","overflow-y":"auto","min-height":""}))},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var n=this.$menu.parent().clone().appendTo("body"),t=this.options.container?this.$newElement.clone().appendTo("body"):n,i=n.children(".dropdown-menu").outerWidth(),r=t.css("width","auto").children("button").outerWidth();n.remove();t.remove();this.$newElement.css("width",Math.max(i,r)+"px")}else"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(){var r,u,t=this,i=n("<div />"),f=function(n){i.addClass(n.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",n.hasClass("dropup"));r=n.offset();u=n.hasClass("dropup")?0:n[0].offsetHeight;i.css({top:r.top+u,left:r.left,width:n[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){t.isDisabled()||(f(n(this)),i.appendTo(t.options.container),i.toggleClass("open",!n(this).hasClass("open")),i.append(t.$menu))});n(window).on("resize scroll",function(){f(t.$newElement)});this.$element.on("hide.bs.select",function(){t.$menu.data("height",t.$menu.height());i.detach()})},setSelected:function(n,t,i){if(!i)var i=this.findLis().eq(this.liObj[n]);i.toggleClass("selected",t)},setDisabled:function(n,t,i){if(!i)var i=this.findLis().eq(this.liObj[n]);t?i.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):i.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var n=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"));this.$button.click(function(){return!n.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var t=this,i=n(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(n){n.stopPropagation()});i.data("spaceSelect",!1);this.$button.on("keyup",function(n){/(32)/.test(n.keyCode.toString(10))&&i.data("spaceSelect")&&(n.preventDefault(),i.data("spaceSelect",!1))});this.$newElement.on("click",function(){t.setSize();t.$element.on("shown.bs.select",function(){var i,n;if(t.options.liveSearch||t.multiple){if(!t.multiple){if(i=t.liObj[t.$element[0].selectedIndex],"number"!=typeof i)return;n=t.$lis.eq(i)[0].offsetTop-t.$menuInner[0].offsetTop;n=n-t.$menuInner[0].offsetHeight/2+t.sizeInfo.liHeight/2;t.$menuInner[0].scrollTop=n}}else t.$menu.find(".selected a").focus()})});this.$menu.on("click","li a",function(i){var s=n(this),e=s.parent().data("originalIndex"),k=t.$element.val(),d=t.$element.prop("selectedIndex"),v,y,b;if(t.multiple&&i.stopPropagation(),i.preventDefault(),!t.isDisabled()&&!s.parent().hasClass("disabled")){var h=t.$element.find("option"),f=h.eq(e),l=f.prop("selected"),a=f.parent("optgroup"),r=t.options.maxOptions,u=a.data("maxOptions")||!1;if(t.multiple){if((f.prop("selected",!l),t.setSelected(e,!l),s.blur(),r!==!1||u!==!1)&&(v=r<h.filter(":selected").length,y=u<a.find("option:selected").length,r&&v||u&&y))if(r&&1==r)h.prop("selected",!1),f.prop("selected",!0),t.$menu.find(".selected").removeClass("selected"),t.setSelected(e,!0);else if(u&&1==u)a.find("option:selected").prop("selected",!1),f.prop("selected",!0),b=s.parent().data("optgroup"),t.$menu.find('[data-optgroup="'+b+'"]').removeClass("selected"),t.setSelected(e,!0);else{var o="function"==typeof t.options.maxOptionsText?t.options.maxOptionsText(r,u):t.options.maxOptionsText,p=o[0].replace("{n}",r),w=o[1].replace("{n}",u),c=n('<div class="notify"><\/div>');o[2]&&(p=p.replace("{var}",o[2][r>1?0:1]),w=w.replace("{var}",o[2][u>1?0:1]));f.prop("selected",!1);t.$menu.append(c);r&&v&&(c.append(n("<div>"+p+"<\/div>")),t.$element.trigger("maxReached.bs.select"));u&&y&&(c.append(n("<div>"+w+"<\/div>")),t.$element.trigger("maxReachedGrp.bs.select"));setTimeout(function(){t.setSelected(e,!1)},10);c.delay(750).fadeOut(300,function(){n(this).remove()})}}else h.prop("selected",!1),f.prop("selected",!0),t.$menu.find(".selected").removeClass("selected"),t.setSelected(e,!0);t.multiple?t.options.liveSearch&&t.$searchbox.focus():t.$button.focus();(k!=t.$element.val()&&t.multiple||d!=t.$element.prop("selectedIndex")&&!t.multiple)&&(t.$element.change(),t.$element.trigger("changed.bs.select",[e,f.prop("selected"),l]))}});this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),t.options.liveSearch&&!n(i.target).hasClass("close")?t.$searchbox.focus():t.$button.focus())});this.$menu.on("click","li.divider, li.dropdown-header",function(n){n.preventDefault();n.stopPropagation();t.options.liveSearch?t.$searchbox.focus():t.$button.focus()});this.$menu.on("click",".popover-title .close",function(){t.$button.click()});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$menu.on("click",".actions-btn",function(i){t.options.liveSearch?t.$searchbox.focus():t.$button.focus();i.preventDefault();i.stopPropagation();n(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll();t.$element.change()});this.$element.change(function(){t.render(!1)})},liveSearchListener:function(){var t=this,u=n('<li class="no-results"><\/li>');this.$newElement.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){t.$menuInner.find(".active").removeClass("active");t.$searchbox.val()&&(t.$searchbox.val(""),t.$lis.not(".is-hidden").removeClass("hidden"),u.parent().length&&u.remove());t.multiple||t.$menuInner.find(".selected").addClass("active");setTimeout(function(){t.$searchbox.focus()},10)});this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(n){n.stopPropagation()});this.$searchbox.on("input propertychange",function(){var f,e;t.$searchbox.val()?(f=t.$lis.not(".is-hidden").removeClass("hidden").children("a"),f=t.options.liveSearchNormalize?f.not(":a"+t._searchStyle()+"("+i(t.$searchbox.val())+")"):f.not(":"+t._searchStyle()+"("+t.$searchbox.val()+")"),f.parent().addClass("hidden"),t.$lis.filter(".dropdown-header").each(function(){var i=n(this),r=i.data("optgroup");0===t.$lis.filter("[data-optgroup="+r+"]").not(i).not(".hidden").length&&(i.addClass("hidden"),t.$lis.filter("[data-optgroup="+r+"div]").addClass("hidden"))}),e=t.$lis.not(".hidden"),e.each(function(t){var i=n(this);i.hasClass("divider")&&(i.index()===e.eq(0).index()||i.index()===e.last().index()||e.eq(t+1).hasClass("divider"))&&i.addClass("hidden")}),t.$lis.not(".hidden, .no-results").length?u.parent().length&&u.remove():(u.parent().length&&u.remove(),u.html(t.options.noneResultsText.replace("{0}",'"'+r(t.$searchbox.val())+'"')).show(),t.$menuInner.append(u))):(t.$lis.not(".is-hidden").removeClass("hidden"),u.parent().length&&u.remove());t.$lis.filter(".active").removeClass("active");t.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus();n(this).focus()})},_searchStyle:function(){var n="icontains";switch(this.options.liveSearchStyle){case"begins":case"startsWith":n="ibegins"}return n},val:function(n){return"undefined"!=typeof n?(this.$element.val(n),this.render(),this.$element):this.$element.val()},selectAll:function(){this.findLis();this.$element.find("option:enabled").not("[data-divider], [data-hidden]").prop("selected",!0);this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").addClass("selected");this.render(!1)},deselectAll:function(){this.findLis();this.$element.find("option:enabled").not("[data-divider], [data-hidden]").prop("selected",!1);this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").removeClass("selected");this.render(!1)},keydown:function(t){var u,f,h,c,l,p,w,k,s,e=n(this),a=e.is("input")?e.parent().parent():e.parent(),r=a.data("this"),v=":not(.disabled, .hidden, .dropdown-header, .divider)",b={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"},o,g,y,d;(r.options.liveSearch&&(a=e.parent().parent()),r.options.container&&(a=r.$menu),u=n("[role=menu] li a",a),s=r.$menu.parent().hasClass("open"),!s&&(t.keyCode>=48&&t.keyCode<=57||event.keyCode>=65&&event.keyCode<=90)&&(r.options.container?r.$newElement.trigger("click"):(r.setSize(),r.$menu.parent().addClass("open"),s=!0),r.$searchbox.focus()),r.options.liveSearch&&(/(^9$|27)/.test(t.keyCode.toString(10))&&s&&0===r.$menu.find(".active").length&&(t.preventDefault(),r.$menu.parent().removeClass("open"),r.options.container&&r.$newElement.removeClass("open"),r.$button.focus()),u=n("[role=menu] li:not(.disabled, .hidden, .dropdown-header, .divider)",a),e.val()||/(38|40)/.test(t.keyCode.toString(10))||0===u.filter(".active").length&&(u=r.$newElement.find("li"),u=r.options.liveSearchNormalize?u.filter(":a"+r._searchStyle()+"("+i(b[t.keyCode])+")"):u.filter(":"+r._searchStyle()+"("+b[t.keyCode]+")"))),u.length)&&(/(38|40)/.test(t.keyCode.toString(10))?(f=u.index(u.filter(":focus")),c=u.parent(v).first().data("originalIndex"),l=u.parent(v).last().data("originalIndex"),h=u.eq(f).parent().nextAll(v).eq(0).data("originalIndex"),p=u.eq(f).parent().prevAll(v).eq(0).data("originalIndex"),w=u.eq(h).parent().prevAll(v).eq(0).data("originalIndex"),r.options.liveSearch&&(u.each(function(t){n(this).hasClass("disabled")||n(this).data("index",t)}),f=u.index(u.filter(".active")),c=u.first().data("index"),l=u.last().data("index"),h=u.eq(f).nextAll().eq(0).data("index"),p=u.eq(f).prevAll().eq(0).data("index"),w=u.eq(h).prevAll().eq(0).data("index")),k=e.data("prevIndex"),38==t.keyCode?(r.options.liveSearch&&(f-=1),f!=w&&f>p&&(f=p),c>f&&(f=c),f==k&&(f=l)):40==t.keyCode&&(r.options.liveSearch&&(f+=1),-1==f&&(f=0),f!=w&&h>f&&(f=h),f>l&&(f=l),f==k&&(f=c)),e.data("prevIndex",f),r.options.liveSearch?(t.preventDefault(),e.hasClass("dropdown-toggle")||(u.removeClass("active").eq(f).addClass("active").children("a").focus(),e.focus())):u.eq(f).focus()):e.is("input")||(y=[],u.each(function(){n(this).parent().hasClass("disabled")||n.trim(n(this).text().toLowerCase()).substring(0,1)==b[t.keyCode]&&y.push(n(this).parent().index())}),o=n(document).data("keycount"),o++,n(document).data("keycount",o),g=n.trim(n(":focus").text().toLowerCase()).substring(0,1),g!=b[t.keyCode]?(o=1,n(document).data("keycount",o)):o>=y.length&&(n(document).data("keycount",0),o>y.length&&(o=1)),u.eq(y[o-1]).focus()),(/(13|32)/.test(t.keyCode.toString(10))||/(^9$)/.test(t.keyCode.toString(10))&&r.options.selectOnTab)&&s&&((/(32)/.test(t.keyCode.toString(10))||t.preventDefault(),r.options.liveSearch)?/(32)/.test(t.keyCode.toString(10))||(r.$menu.find(".active a").click(),e.focus()):(d=n(":focus"),d.click(),d.focus(),t.preventDefault(),n(document).data("spaceSelect",!0)),n(document).data("keycount",0)),(/(^9$|27)/.test(t.keyCode.toString(10))&&s&&(r.multiple||r.options.liveSearch)||/(27)/.test(t.keyCode.toString(10))&&!s)&&(r.$menu.parent().removeClass("open"),r.options.container&&r.$newElement.removeClass("open"),r.$button.focus()))},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement);this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null;this.reloadLi();this.render();this.checkDisabled();this.liHeight(!0);this.setStyle();this.setWidth();this.$lis&&this.$searchbox.trigger("propertychange");this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()}};f=n.fn.selectpicker;n.fn.selectpicker=u;n.fn.selectpicker.Constructor=t;n.fn.selectpicker.noConflict=function(){return n.fn.selectpicker=f,this};n(document).data("keycount",0).on("keydown",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',t.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(n){n.stopPropagation()});n(window).on("load.bs.select.data-api",function(){n(".selectpicker").each(function(){var t=n(this);u.call(t,t.data())})})}(jQuery)})