function browserDetect(){var n=navigator.userAgent,i=navigator.appName,t;i=(t=n.indexOf("OPR"))!=-1?" opera":(t=n.indexOf("Edg"))!=-1?" edge":(t=n.indexOf("Chrome"))!=-1?" chrome":(t=n.indexOf("Safari"))!=-1?" safari":(t=n.indexOf("Firefox"))!=-1?" firefox":"";document.documentElement.className+=i}if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(void 0!==i.style[n])return{end:t[n]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();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";function u(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)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,""));r=n(u);i&&i.preventDefault();r.length||(r=f.closest(".alert"));r.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;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.3.6";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,f=i.is("input")?"val":"html",u=i.data();t+="Text";null==u.resetText&&i.data("resetText",i[f]());setTimeout(n.proxy(function(){i[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},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);r.hasClass("btn")||(r=r.closest(".btn"));i.call(r,"toggle");n(t.target).is('input[type="radio"]')||n(t.target).is('input[type="checkbox"]')||t.preventDefault()}).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.3.6";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),f="prev"==n&&0===i||"next"==n&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r="prev"==n?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(0>n))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"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),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 o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),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(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.3.6";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"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&&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()))return 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?void this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION):u.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(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);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(o).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)))))}))}function e(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)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.6";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,h,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");h=" li:not(.disabled):visible a";f=o.find(".dropdown-menu"+h);f.length&&(u=f.index(t.target),38==t.which&&u>0&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;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.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.3.6";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){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){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(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 n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};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"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=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,e,this)})}(jQuery);+function(n){"use strict";function r(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]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return 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?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.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);return 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()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.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(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){"in"!=u.hoverState&&r.detach();u.$element.removeAttr("aria-describedby").trigger("hidden.bs."+u.type);i&&i()}var u=this,r=n(this.$tip),e=n.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),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){t=t||this.$element;var u=t[0],r="BODY"==u.tagName,i=u.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=r?{top:0,left:0}:t.offset(),e={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},o=r?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,e,o,f)};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){do n+=~~(1e6*Math.random());while(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||(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})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(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]())})}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.3.6";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);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;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(n(i).is(document.body)?window: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.3.6";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(),i>=e)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]&&(void 0===t[n+1]||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.3.6";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=t.attr("href"),i=i&&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(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 e(){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);o?(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"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();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);this.$target=n(this.options.target).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.3.6";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(),f=this.$element.offset(),e=this.$target.height();if(null!=i&&"top"==this.affixed)return i>u?"top":!1;if("bottom"==this.affixed)return null!=i?u+this.unpin<=f.top?!1:"bottom":n-r>=u+e?!1:"bottom";var o=null==this.affixed,s=o?u:f.top,h=o?e:t;return null!=i&&i>=u?"top":null!=r&&s+h>=n-r?"bottom":!1};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);window.Modernizr=function(n,t,i){function a(n){c.cssText=n}function vt(n,t){return a(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function lt(n,t){var u,r;for(u in n)if(r=n[u],!v(r,"-")&&c[r]!==i)return t=="pfx"?r:!0;return!1}function yt(n,t,r){var f,u;for(f in n)if(u=t[n[f]],u!==i)return r===!1?n[f]:h(u,"function")?u.bind(r||t):u;return!1}function f(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+ot.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?lt(u,t):(u=(n+" "+st.join(r+" ")+r).split(" "),yt(u,t,i))}function pt(){u.input=function(i){for(var r=0,u=i.length;r<u;r++)w[i[r]]=!!(i[r]in o);return w.list&&(w.list=!!(t.createElement("datalist")&&n.HTMLDataListElement)),w}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));u.inputtypes=function(n){for(var u=0,r,f,e,h=n.length;u<h;u++)o.setAttribute("type",f=n[u]),r=o.type!=="text",r&&(o.value=g,o.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&o.style.WebkitAppearance!==i?(s.appendChild(o),e=t.defaultView,r=e.getComputedStyle&&e.getComputedStyle(o,null).WebkitAppearance!=="textfield"&&o.offsetHeight!==0,s.removeChild(o)):/^(search|tel)$/.test(f)||(r=/^(url|email)$/.test(f)?o.checkValidity&&o.checkValidity()===!1:o.value!=g)),ht[n[u]]=!!r;return ht}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ut=t.createElement(e),c=ut.style,o=t.createElement("input"),g=":)",ft={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),et="Webkit Moz O ms",ot=et.split(" "),st=et.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ht={},w={},nt=[],tt=nt.slice,b,l=function(n,i,r,u){var l,a,c,v,f=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=u?u[r]:e+(r+1),f.appendChild(c);return l=["&#173;",'<style id="s',e,'">',n,"<\/style>"].join(""),f.id=e,(h?f:o).innerHTML+=l,o.appendChild(f),h||(o.style.background="",o.style.overflow="hidden",v=s.style.overflow,s.style.overflow="hidden",s.appendChild(o)),a=i(f,n),h?f.parentNode.removeChild(f):(o.parentNode.removeChild(o),s.style.overflow=v),!!a},at=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t)&&i(t).matches||!1:(l("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},ct=function(){function r(r,u){u=u||t.createElement(n[r]||"div");r="on"+r;var f=r in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(r,""),f=h(u[r],"function"),h(u[r],"undefined")||(u[r]=i),u.removeAttribute(r))),u=null,f}var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),it={}.hasOwnProperty,rt,k;rt=h(it,"undefined")||h(it.call,"undefined")?function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")}:function(n,t){return it.call(n,t)};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=tt.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(tt.call(arguments))),Object(u)===u)?u:e:t.apply(n,i.concat(tt.call(arguments)))},r});r.flexbox=function(){return f("flexWrap")};r.flexboxlegacy=function(){return f("boxDirection")};r.canvas=function(){var n=t.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))};r.canvastext=function(){return!!(u.canvas&&h(t.createElement("canvas").getContext("2d").fillText,"function"))};r.webgl=function(){return!!n.WebGLRenderingContext};r.touch=function(){var i;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:l(["@media (",y.join("touch-enabled),("),e,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(n){i=n.offsetTop===9}),i};r.geolocation=function(){return"geolocation"in navigator};r.postmessage=function(){return!!n.postMessage};r.websqldatabase=function(){return!!n.openDatabase};r.indexedDB=function(){return!!f("indexedDB",n)};r.hashchange=function(){return ct("hashchange",n)&&(t.documentMode===i||t.documentMode>7)};r.history=function(){return!!(n.history&&history.pushState)};r.draganddrop=function(){var n=t.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n};r.websockets=function(){return"WebSocket"in n||"MozWebSocket"in n};r.rgba=function(){return a("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return a("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return a("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(c.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){return f("borderImage")};r.borderradius=function(){return f("borderRadius")};r.boxshadow=function(){return f("boxShadow")};r.textshadow=function(){return t.createElement("div").style.textShadow===""};r.opacity=function(){return vt("opacity:.55"),/^0.55$/.test(c.opacity)};r.cssanimations=function(){return f("animationName")};r.csscolumns=function(){return f("columnCount")};r.cssgradients=function(){var n="background-image:";return a((n+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+n)+y.join("linear-gradient(left top,#9f9, white);"+n)).slice(0,-n.length)),v(c.backgroundImage,"gradient")};r.cssreflections=function(){return f("boxReflect")};r.csstransforms=function(){return!!f("transform")};r.csstransforms3d=function(){var n=!!f("perspective");return n&&"webkitPerspective"in s.style&&l("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){n=t.offsetLeft===9&&t.offsetHeight===3}),n};r.csstransitions=function(){return f("transition")};r.fontface=function(){var n;return l('@font-face {font-family:"font";src:url("https://")}',function(i,r){var f=t.getElementById("smodernizr"),u=f.sheet||f.styleSheet,e=u?u.cssRules&&u.cssRules[0]?u.cssRules[0].cssText:u.cssText||"":"";n=/src/i.test(e)&&e.indexOf(r.split(" ")[0])===0}),n};r.generatedcontent=function(){var n;return l(["#",e,"{font:0/0 a}#",e,':after{content:"',g,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){n=t.offsetHeight>=3}),n};r.video=function(){var i=t.createElement("video"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=i.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=i.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n};r.audio=function(){var i=t.createElement("audio"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=i.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=i.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n};r.localstorage=function(){try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(n){return!1}};r.sessionstorage=function(){try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(n){return!1}};r.webworkers=function(){return!!n.Worker};r.applicationcache=function(){return!!n.applicationCache};r.svg=function(){return!!t.createElementNS&&!!t.createElementNS(p.svg,"svg").createSVGRect};r.inlinesvg=function(){var n=t.createElement("div");return n.innerHTML="<svg/>",(n.firstChild&&n.firstChild.namespaceURI)==p.svg};r.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(ft.call(t.createElementNS(p.svg,"animate")))};r.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(ft.call(t.createElementNS(p.svg,"clipPath")))};for(k in r)rt(r,k)&&(b=k.toLowerCase(),u[b]=r[k](),nt.push((u[b]?"":"no-")+b));return u.input||pt(),u.addTest=function(n,t){if(typeof n=="object")for(var r in n)rt(n,r)&&u.addTest(r,n[r]);else{if(n=n.toLowerCase(),u[n]!==i)return u;t=typeof t=="function"?t():t;typeof d!="undefined"&&d&&(s.className+=" "+(t?"":"no-")+n);u[n]=t}return u},a(""),ut=o=null,function(n,t){function p(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function c(){var n=r.elements;return typeof n=="string"?n.split(" "):n}function o(n){var t=h[n[s]];return t||(t={},e++,n[s]=e,h[e]=t),t}function l(n,r,u){if(r||(r=t),i)return r.createElement(n);u||(u=o(r));var f;return f=u.cache[n]?u.cache[n].cloneNode():y.test(n)?(u.cache[n]=u.createElem(n)).cloneNode():u.createElem(n),f.canHaveChildren&&!v.test(n)&&!f.tagUrn?u.frag.appendChild(f):f}function w(n,r){if(n||(n=t),i)return n.createDocumentFragment();r=r||o(n);for(var f=r.frag.cloneNode(),u=0,e=c(),s=e.length;u<s;u++)f.createElement(e[u]);return f}function b(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(i){return r.shivMethods?l(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+c().join().replace(/[\w\-]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function a(n){n||(n=t);var u=o(n);return!r.shivCSS||f||u.hasCSS||(u.hasCSS=!!p(n,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),i||b(n,u),n}var u=n.html5||{},v=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,y=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,s="_html5shiv",e=0,h={},i,r;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";f="hidden"in n;i=n.childNodes.length==1||function(){t.createElement("a");var n=t.createDocumentFragment();return typeof n.cloneNode=="undefined"||typeof n.createDocumentFragment=="undefined"||typeof n.createElement=="undefined"}()}catch(r){f=!0;i=!0}})();r={elements:u.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:u.shivCSS!==!1,supportsUnknownElements:i,shivMethods:u.shivMethods!==!1,type:"default",shivDocument:a,createElement:l,createDocumentFragment:w};n.html5=r;a(t)}(this,t),u._version="2.8.3",u._prefixes=y,u._domPrefixes=st,u._cssomPrefixes=ot,u.mq=at,u.hasEvent=ct,u.testProp=function(n){return lt([n])},u.testAllProps=f,u.testStyles=l,u.prefixed=function(n,t,i){return t?f(n,t,i):f(n,"pfx")},s.className=s.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(d?" js "+nt.join(" "):""),u}(this,this.document);window.matchMedia=window.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=t.offsetWidth==42,i.removeChild(r),{matches:u,media:n}}}(document),function(n){function d(){a(!0)}if(n.respond={},respond.update=function(){},respond.mediaQueriesSupported=n.matchMedia&&n.matchMedia("only all").matches,!respond.mediaQueriesSupported){var t=n.document,i=t.documentElement,e=[],u=[],r=[],o={},v=30,f=t.getElementsByTagName("head")[0]||i,g=t.getElementsByTagName("base")[0],s=f.getElementsByTagName("link"),h=[],y=function(){for(var f=s,c=f.length,r=0,t,i,u,e;r<c;r++)t=f[r],i=t.href,u=t.media,e=t.rel&&t.rel.toLowerCase()==="stylesheet",!i||!e||o[i]||(t.styleSheet&&t.styleSheet.rawCssText?(w(t.styleSheet.rawCssText,i,u),o[i]=!0):(/^([a-zA-Z:]*\/\/)/.test(i)||g)&&i.replace(RegExp.$1,"").split("/")[0]!==n.location.host||h.push({href:i,media:u}));p()},p=function(){if(h.length){var n=h.shift();nt(n.href,function(t){w(t,n.href,n.media);o[n.href]=!0;p()})}},w=function(n,t,i){var o=n.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),s=o&&o.length||0,t=t.substring(0,t.lastIndexOf("/")),v=function(n){return n.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+t+"$2$3")},y=!s&&i,h=0,f,c,r,l,p;for(t.length&&(t+="/"),y&&(s=1);h<s;h++)for(f=0,y?(c=i,u.push(v(n))):(c=o[h].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,u.push(RegExp.$2&&v(RegExp.$2))),l=c.split(","),p=l.length;f<p;f++)r=l[f],e.push({media:r.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:u.length-1,hasquery:r.indexOf("(")>-1,minw:r.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});a()},c,b,k=function(){var u,r=t.createElement("div"),n=t.body,f=!1;return r.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=t.createElement("body"),n.style.background="none"),n.appendChild(r),i.insertBefore(n,i.firstChild),u=r.offsetWidth,f?i.removeChild(n):n.removeChild(r),l=parseFloat(u)},l,a=function(n){var nt="clientWidth",tt=i[nt],it=t.compatMode==="CSS1Compat"&&tt||t.body[nt]||tt,d={},ot=s[s.length-1],rt=(new Date).getTime(),o,h,g;if(n&&c&&rt-c<v){clearTimeout(b);b=setTimeout(a,v);return}c=rt;for(o in e){var y=e[o],p=y.minw,w=y.maxw,ut=p===null,ft=w===null,et="em";!p||(p=parseFloat(p)*(p.indexOf(et)>-1?l||k():1));!w||(w=parseFloat(w)*(w.indexOf(et)>-1?l||k():1));y.hasquery&&(ut&&ft||!(ut||it>=p)||!(ft||it<=w))||(d[y.media]||(d[y.media]=[]),d[y.media].push(u[y.rules]))}for(o in r)r[o]&&r[o].parentNode===f&&f.removeChild(r[o]);for(o in d)h=t.createElement("style"),g=d[o].join("\n"),h.type="text/css",h.media=o,f.insertBefore(h,ot.nextSibling),h.styleSheet?h.styleSheet.cssText=g:h.appendChild(t.createTextNode(g)),r.push(h)},nt=function(n,t){var i=tt();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){i.readyState==4&&(i.status==200||i.status==304)&&t(i.responseText)},i.readyState!=4)&&i.send(null)},tt=function(){var n=!1;try{n=new XMLHttpRequest}catch(t){n=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return n}}();y();respond.update=y;n.addEventListener?n.addEventListener("resize",d,!1):n.attachEvent&&n.attachEvent("onresize",d)}}(this);!function(n,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():n.EvEmitter=t()}(this,function(){function t(){}var n=t.prototype;return n.on=function(n,t){if(n&&t){var i=this._events=this._events||{},r=i[n]=i[n]||[];return-1==r.indexOf(t)&&r.push(t),this}},n.once=function(n,t){if(n&&t){this.on(n,t);var i=this._onceEvents=this._onceEvents||{},r=i[n]=i[n]||[];return r[t]=!0,this}},n.off=function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return r=i.indexOf(t),-1!=r&&i.splice(r,1),this},n.emitEvent=function(n,t){var r=this._events&&this._events[n],u,i,f,e;if(r&&r.length){for(u=0,i=r[u],t=t||[],f=this._onceEvents&&this._onceEvents[n];i;)e=f&&f[i],e&&(this.off(n,i),delete f[i]),i.apply(this,t),u+=e?0:1,i=r[u];return this}},t}),function(n,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("ev-emitter")):n.imagesLoaded=t(n,n.EvEmitter)}(window,function(n,t){function e(n,t){for(var i in t)n[i]=t[i];return n}function h(n){var t=[],i;if(Array.isArray(n))t=n;else if("number"==typeof n.length)for(i=0;i<n.length;i++)t.push(n[i]);else t.push(n);return t}function i(n,t,r){return this instanceof i?("string"==typeof n&&(n=document.querySelectorAll(n)),this.elements=h(n),this.options=e({},this.options),"function"==typeof t?r=t:e(this.options,t),r&&this.on("always",r),this.getImages(),f&&(this.jqDeferred=new f.Deferred),void setTimeout(function(){this.check()}.bind(this))):new i(n,t,r)}function r(n){this.img=n}function u(n,t){this.url=n;this.element=t;this.img=new Image}var f=n.jQuery,o=n.console,s;return i.prototype=Object.create(t.prototype),i.prototype.options={},i.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,this)},i.prototype.addElementImages=function(n){var i,r,t,f,u,e;if("IMG"==n.nodeName&&this.addImage(n),this.options.background===!0&&this.addElementBackgroundImages(n),i=n.nodeType,i&&s[i]){for(r=n.querySelectorAll("img"),t=0;t<r.length;t++)f=r[t],this.addImage(f);if("string"==typeof this.options.background)for(u=n.querySelectorAll(this.options.background),t=0;t<u.length;t++)e=u[t],this.addElementBackgroundImages(e)}},s={1:!0,9:!0,11:!0},i.prototype.addElementBackgroundImages=function(n){var i=getComputedStyle(n),r,t,u;if(i)for(r=/url\((['"])?(.*?)\1\)/gi,t=r.exec(i.backgroundImage);null!==t;)u=t&&t[2],u&&this.addBackground(u,n),t=r.exec(i.backgroundImage)},i.prototype.addImage=function(n){var t=new r(n);this.images.push(t)},i.prototype.addBackground=function(n,t){var i=new u(n,t);this.images.push(i)},i.prototype.check=function(){function n(n,i,r){setTimeout(function(){t.progress(n,i,r)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",n);t.check()}):void this.complete()},i.prototype.progress=function(n,t,i){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!n.isLoaded;this.emitEvent("progress",[this,n,t]);this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,n);this.progressedCount==this.images.length&&this.complete();this.options.debug&&o&&o.log("progress: "+i,n,t)},i.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done",n;(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred)&&(n=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[n](this))},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var n=this.getIsImageComplete();return n?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},r.prototype.onload=function(){this.confirm(!0,"onload");this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror");this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",this);this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},u.prototype=Object.create(r.prototype),u.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;var n=this.getIsImageComplete();n&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},u.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},u.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){t=t||n.jQuery;t&&(f=t,f.fn.imagesLoaded=function(n,t){var r=new i(this,n,t);return r.jqDeferred.promise(f(this))})},i.makeJQueryPlugin(),i});!function(){function i(){}function e(n){return r.retinaImageSuffix+n}function t(n,t){var i,r;(this.path=n||"","undefined"!=typeof t&&null!==t)?(this.at_2x_path=t,this.perform_check=!1):(void 0!==document.createElement?(i=document.createElement("a"),i.href=this.path,i.pathname=i.pathname.replace(f,e),this.at_2x_path=i.href):(r=this.path.split("?"),r[0]=r[0].replace(f,e),this.at_2x_path=r.join("?")),this.perform_check=!0)}function u(n){this.el=n;this.path=new t(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var i=this;this.path.check_2x_variant(function(n){n&&i.swap()})}var n="undefined"==typeof exports?window:exports,r={retinaImageSuffix:"@2x",check_mime_type:!0,force_original_dimensions:!0},f;n.Retina=i;i.configure=function(n){null===n&&(n={});for(var t in n)n.hasOwnProperty(t)&&(r[t]=n[t])};i.init=function(t){null===t&&(t=n);var i=t.onload||function(){};t.onload=function(){for(var t,r=document.getElementsByTagName("img"),f=[],n=0;n<r.length;n+=1)t=r[n],t.getAttributeNode("data-no-retina")||f.push(new u(t));i()}};i.isRetina=function(){return n.devicePixelRatio>1?!0:n.matchMedia&&n.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches?!0:!1};f=/\.\w+$/;n.RetinaImagePath=t;t.confirmed_paths=[];t.prototype.is_external=function(){return!(!this.path.match(/^https?\:/i)||this.path.match("//"+document.domain))};t.prototype.check_2x_variant=function(n){var i,u=this;return this.is_external()?n(!1):this.perform_check||"undefined"==typeof this.at_2x_path||null===this.at_2x_path?this.at_2x_path in t.confirmed_paths?n(!0):(i=new XMLHttpRequest,i.open("HEAD",this.at_2x_path),i.onreadystatechange=function(){if(4!==i.readyState)return n(!1);if(i.status>=200&&i.status<=399){if(r.check_mime_type){var f=i.getResponseHeader("Content-Type");if(null===f||!f.match(/^image/i))return n(!1)}return t.confirmed_paths.push(u.at_2x_path),n(!0)}return n(!1)},i.send(),void 0):n(!0)};n.RetinaImage=u;u.prototype.swap=function(n){function i(){t.el.complete?(r.force_original_dimensions&&(t.el.setAttribute("width",t.el.offsetWidth),t.el.setAttribute("height",t.el.offsetHeight)),t.el.setAttribute("src",n)):setTimeout(i,5)}"undefined"==typeof n&&(n=this.path.at_2x_path);var t=this;i()};i.isRetina()&&i.init(n)}(),function(){function r(n){return!!n.exifdata}function p(n,t){var i;t=t||n.match(/^data\:([^\;]+)\;base64,/mi)[1]||"";n=n.replace(/^data\:([^\;]+)\;base64,/gmi,"");var r=atob(n),u=r.length,f=new ArrayBuffer(u),e=new Uint8Array(f);for(i=0;i<u;i++)e[i]=r.charCodeAt(i);return f}function w(n,t){var i=new XMLHttpRequest;i.open("GET",n,!0);i.responseType="blob";i.onload=function(){(this.status==200||this.status===0)&&t(this.response)};i.send()}function b(n,r){function e(i){var e=h(i),u,f;n.exifdata=e||{};u=k(i);n.iptcdata=u||{};t.isXmpEnabled&&(f=rt(i),n.xmpdata=f||{});r&&r.call(n)}var o,f,u;n.src?/^data\:/i.test(n.src)?(o=p(n.src),e(o)):/^blob\:/i.test(n.src)?(u=new FileReader,u.onload=function(n){e(n.target.result)},w(n.src,function(n){u.readAsArrayBuffer(n)})):(f=new XMLHttpRequest,f.onload=function(){if(this.status==200||this.status===0)e(f.response);else throw"Could not load image";f=null},f.open("GET",n.src,!0),f.responseType="arraybuffer",f.send(null)):self.FileReader&&(n instanceof self.Blob||n instanceof self.File)&&(u=new FileReader,u.onload=function(n){i&&console.log("Got file of length "+n.target.result.byteLength);e(n.target.result)},u.readAsArrayBuffer(n))}function h(n){var r=new DataView(n),t,f,u;if(i&&console.log("Got file of length "+n.byteLength),r.getUint8(0)!=255||r.getUint8(1)!=216)return i&&console.log("Not a valid JPEG"),!1;for(t=2,f=n.byteLength;t<f;){if(r.getUint8(t)!=255)return i&&console.log("Not a valid marker at offset "+t+", found: "+r.getUint8(t)),!1;if(u=r.getUint8(t+1),i&&console.log(u),u==225)return i&&console.log("Found 0xFFE1 marker"),it(r,t+4,r.getUint16(t+2)-2);t+=2+r.getUint16(t+2)}}function k(n){var u=new DataView(n),t,f,e;if(i&&console.log("Got file of length "+n.byteLength),u.getUint8(0)!=255||u.getUint8(1)!=216)return i&&console.log("Not a valid JPEG"),!1;for(var r=2,o=n.byteLength,s=function(n,t){return n.getUint8(t)===56&&n.getUint8(t+1)===66&&n.getUint8(t+2)===73&&n.getUint8(t+3)===77&&n.getUint8(t+4)===4&&n.getUint8(t+5)===4};r<o;){if(s(u,r))return t=u.getUint8(r+7),t%2!=0&&(t+=1),t===0&&(t=4),f=r+8+t,e=u.getUint16(r+6+t),d(n,f,e);r++}}function d(n,t,i){for(var o=new DataView(n),r={},h,f,c,l,a,e=t;e<t+i;)o.getUint8(e)===28&&o.getUint8(e+1)===2&&(l=o.getUint8(e+2),l in s&&(c=o.getInt16(e+3),a=c+5,f=s[l],h=u(o,e+5,c),r.hasOwnProperty(f)?r[f]instanceof Array?r[f].push(h):r[f]=[r[f],h]:r[f]=h)),e++;return r}function e(n,t,r,u,f){for(var c=n.getUint16(r,!f),h={},e,s,o=0;o<c;o++)e=r+o*12+2,s=u[n.getUint16(e,!f)],!s&&i&&console.log("Unknown tag: "+n.getUint16(e,!f)),h[s]=g(n,e,t,r,f);return h}function g(n,t,i,r,f){var y=n.getUint16(t+2,!f),s=n.getUint32(t+4,!f),h=n.getUint32(t+8,!f)+i,c,o,v,e,l,a;switch(y){case 1:case 7:if(s==1)return n.getUint8(t+8,!f);for(c=s>4?h:t+8,o=[],e=0;e<s;e++)o[e]=n.getUint8(c+e);return o;case 2:return c=s>4?h:t+8,u(n,c,s-1);case 3:if(s==1)return n.getUint16(t+8,!f);for(c=s>2?h:t+8,o=[],e=0;e<s;e++)o[e]=n.getUint16(c+2*e,!f);return o;case 4:if(s==1)return n.getUint32(t+8,!f);for(o=[],e=0;e<s;e++)o[e]=n.getUint32(h+4*e,!f);return o;case 5:if(s==1)return l=n.getUint32(h,!f),a=n.getUint32(h+4,!f),v=new Number(l/a),v.numerator=l,v.denominator=a,v;for(o=[],e=0;e<s;e++)l=n.getUint32(h+8*e,!f),a=n.getUint32(h+4+8*e,!f),o[e]=new Number(l/a),o[e].numerator=l,o[e].denominator=a;return o;case 9:if(s==1)return n.getInt32(t+8,!f);for(o=[],e=0;e<s;e++)o[e]=n.getInt32(h+4*e,!f);return o;case 10:if(s==1)return n.getInt32(h,!f)/n.getInt32(h+4,!f);for(o=[],e=0;e<s;e++)o[e]=n.getInt32(h+8*e,!f)/n.getInt32(h+4+8*e,!f);return o}}function nt(n,t,i){var r=n.getUint16(t,!i);return n.getUint32(t+2+r*12,!i)}function tt(n,t,i,r){var f=nt(n,t+i,r),u,o,s;if(f){if(f>n.byteLength)return{}}else return{};if(u=e(n,t,t+f,y,r),u.Compression)switch(u.Compression){case 6:u.JpegIFOffset&&u.JpegIFByteCount&&(o=t+u.JpegIFOffset,s=u.JpegIFByteCount,u.blob=new Blob([new Uint8Array(n.buffer,o,s)],{type:"image/jpeg"}));break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",u.Compression)}else u.PhotometricInterpretation==2&&console.log("Thumbnail image format is RGB, which is not implemented.");return u}function u(t,i,r){var u="";for(n=i;n<i+r;n++)u+=String.fromCharCode(t.getUint8(n));return u}function it(n,t){var h,c,r,o,y,s,p;if(u(n,t,4)!="Exif")return i&&console.log("Not valid EXIF data! "+u(n,t,4)),!1;if(s=t+6,n.getUint16(s)==18761)h=!1;else if(n.getUint16(s)==19789)h=!0;else return i&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;if(n.getUint16(s+2,!h)!=42)return i&&console.log("Not valid TIFF data! (no 0x002A)"),!1;if(p=n.getUint32(s+4,!h),p<8)return i&&console.log("Not valid TIFF data! (First offset less than 8)",n.getUint32(s+4,!h)),!1;if(c=e(n,s,s+p,a,h),c.ExifIFDPointer){o=e(n,s,s+c.ExifIFDPointer,l,h);for(r in o){switch(r){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":o[r]=f[r][o[r]];break;case"ExifVersion":case"FlashpixVersion":o[r]=String.fromCharCode(o[r][0],o[r][1],o[r][2],o[r][3]);break;case"ComponentsConfiguration":o[r]=f.Components[o[r][0]]+f.Components[o[r][1]]+f.Components[o[r][2]]+f.Components[o[r][3]]}c[r]=o[r]}}if(c.GPSInfoIFDPointer){y=e(n,s,s+c.GPSInfoIFDPointer,v,h);for(r in y){switch(r){case"GPSVersionID":y[r]=y[r][0]+"."+y[r][1]+"."+y[r][2]+"."+y[r][3]}c[r]=y[r]}}return c.thumbnail=tt(n,s,p,h),c}function rt(n){var r,e,o;if("DOMParser"in self){if(r=new DataView(n),i&&console.log("Got file of length "+n.byteLength),r.getUint8(0)!=255||r.getUint8(1)!=216)return i&&console.log("Not a valid JPEG"),!1;for(var f=2,s=n.byteLength,h=new DOMParser;f<s-4;){if(u(r,f,4)=="http"){var c=f-1,l=r.getUint16(f-2)-1,t=u(r,c,l),a=t.indexOf("xmpmeta>")+8;return t=t.substring(t.indexOf("<x:xmpmeta"),a),e=t.indexOf("x:xmpmeta")+10,t=t.slice(0,e)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+t.slice(e),o=h.parseFromString(t,"text/xml"),ut(o)}f++}}}function o(n){var t={},r,e,u,f,i,s;if(n.nodeType==1){if(n.attributes.length>0)for(t["@attributes"]={},r=0;r<n.attributes.length;r++)e=n.attributes.item(r),t["@attributes"][e.nodeName]=e.nodeValue}else if(n.nodeType==3)return n.nodeValue;if(n.hasChildNodes())for(u=0;u<n.childNodes.length;u++)f=n.childNodes.item(u),i=f.nodeName,t[i]==null?t[i]=o(f):(t[i].push==null&&(s=t[i],t[i]=[],t[i].push(s)),t[i].push(o(f)));return t}function ut(n){var t,u,r,f,e,i,c;try{if(t={},n.children.length>0)for(u=0;u<n.children.length;u++){r=n.children.item(u);f=r.attributes;for(e in f){var s=f[e],h=s.nodeName,l=s.nodeValue;h!==undefined&&(t[h]=l)}i=r.nodeName;typeof t[i]=="undefined"?t[i]=o(r):(typeof t[i].push=="undefined"&&(c=t[i],t[i]=[],t[i].push(c)),t[i].push(o(r)))}else t=n.textContent;return t}catch(a){console.log(a.message)}}var i=!1,c=this,t=function(n){if(n instanceof t)return n;if(!(this instanceof t))return new t(n);this.EXIFwrapped=n},s;typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=t),exports.EXIF=t):c.EXIF=t;var l=t.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},a=t.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},v=t.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},y=t.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},f=t.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};s={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};t.enableXmp=function(){t.isXmpEnabled=!0};t.disableXmp=function(){t.isXmpEnabled=!1};t.getData=function(n,t){return(self.Image&&n instanceof self.Image||self.HTMLImageElement&&n instanceof self.HTMLImageElement)&&!n.complete?!1:(r(n)?t&&t.call(n):b(n,t),!0)};t.getTag=function(n,t){if(r(n))return n.exifdata[t]};t.getIptcTag=function(n,t){if(r(n))return n.iptcdata[t]};t.getAllTags=function(n){if(!r(n))return{};var t,i=n.exifdata,u={};for(t in i)i.hasOwnProperty(t)&&(u[t]=i[t]);return u};t.getAllIptcTags=function(n){if(!r(n))return{};var t,i=n.iptcdata,u={};for(t in i)i.hasOwnProperty(t)&&(u[t]=i[t]);return u};t.pretty=function(n){if(!r(n))return"";var t,i=n.exifdata,u="";for(t in i)i.hasOwnProperty(t)&&(u+=typeof i[t]=="object"?i[t]instanceof Number?t+" : "+i[t]+" ["+i[t].numerator+"/"+i[t].denominator+"]\r\n":t+" : ["+i[t].length+" values]\r\n":t+" : "+i[t]+"\r\n");return u};t.readFromBinaryFile=function(n){return h(n)};typeof define=="function"&&define.amd&&define("exif-js",[],function(){return t})}.call(this),function(n){n(["jquery"],function(n){return function(){function v(n,t,r){return f({type:u.error,iconClass:i().iconClasses.error,message:n,optionsOverride:r,title:t})}function r(r,u){return(r||(r=i()),t=n("#"+r.containerId),t.length)?t:(u&&(t=nt(r)),t)}function y(n,t,r){return f({type:u.info,iconClass:i().iconClasses.info,message:n,optionsOverride:r,title:t})}function p(n){e=n}function w(n,t,r){return f({type:u.success,iconClass:i().iconClasses.success,message:n,optionsOverride:r,title:t})}function b(n,t,r){return f({type:u.warning,iconClass:i().iconClasses.warning,message:n,optionsOverride:r,title:t})}function k(n,u){var f=i();t||r(f);l(n,f,u)||g(f)}function d(u){var f=i();if(t||r(f),u&&n(":focus",u).length===0){s(u);return}t.children().length&&t.remove()}function g(i){for(var u=t.children(),r=u.length-1;r>=0;r--)l(n(u[r]),i)}function l(t,i,r){var u=r&&r.force?r.force:!1;return t&&(u||n(":focus",t).length===0)?(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){s(t)}}),!0):!1}function nt(i){return t=n("<div/>").attr("id",i.containerId).addClass(i.positionClass).attr("aria-live","polite").attr("role","alert"),t.appendTo(n(i.target)),t}function tt(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:undefined,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:undefined,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;<\/button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function a(n){e&&e(n)}function f(u){function g(n){return n==null&&(n=""),new String(n).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function nt(){rt();ft();et();ot();st();ut()}function tt(){e.hover(lt,ct);!f.onclick&&f.tapToDismiss&&e.click(v);f.closeButton&&y&&y.click(function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble!==undefined&&n.cancelBubble!==!0&&(n.cancelBubble=!0);v(!0)});f.onclick&&e.click(function(n){f.onclick(n);v()})}function it(){e.hide();e[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown});f.timeOut>0&&(w=setTimeout(v,f.timeOut),c.maxHideTime=parseFloat(f.timeOut),c.hideEta=(new Date).getTime()+c.maxHideTime,f.progressBar&&(c.intervalId=setInterval(at,10)))}function rt(){u.iconClass&&e.addClass(f.toastClass).addClass(p)}function ut(){f.newestOnTop?t.prepend(e):t.append(e)}function ft(){u.title&&(k.append(f.escapeHtml?g(u.title):u.title).addClass(f.titleClass),e.append(k))}function et(){u.message&&(d.append(f.escapeHtml?g(u.message):u.message).addClass(f.messageClass),e.append(d))}function ot(){f.closeButton&&(y.addClass("toast-close-button").attr("role","button"),e.prepend(y))}function st(){f.progressBar&&(b.addClass("toast-progress"),e.prepend(b))}function ht(n,t){if(n.preventDuplicates){if(t.message===o)return!0;o=t.message}return!1}function v(t){var i=t&&f.closeMethod!==!1?f.closeMethod:f.hideMethod,r=t&&f.closeDuration!==!1?f.closeDuration:f.hideDuration,u=t&&f.closeEasing!==!1?f.closeEasing:f.hideEasing;if(!n(":focus",e).length||t)return clearTimeout(c.intervalId),e[i]({duration:r,easing:u,complete:function(){s(e);f.onHidden&&l.state!=="hidden"&&f.onHidden();l.state="hidden";l.endTime=new Date;a(l)}})}function ct(){(f.timeOut>0||f.extendedTimeOut>0)&&(w=setTimeout(v,f.extendedTimeOut),c.maxHideTime=parseFloat(f.extendedTimeOut),c.hideEta=(new Date).getTime()+c.maxHideTime)}function lt(){clearTimeout(w);c.hideEta=0;e.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}function at(){var n=(c.hideEta-(new Date).getTime())/c.maxHideTime*100;b.width(n+"%")}var f=i(),p=u.iconClass||f.iconClass;if(typeof u.optionsOverride!="undefined"&&(f=n.extend(f,u.optionsOverride),p=u.optionsOverride.iconClass||p),!ht(f,u)){h++;t=r(f,!0);var w=null,e=n("<div/>"),k=n("<div/>"),d=n("<div/>"),b=n("<div/>"),y=n(f.closeHtml),c={intervalId:null,hideEta:null,maxHideTime:null},l={toastId:h,state:"visible",startTime:new Date,options:f,map:u};return nt(),it(),tt(),a(l),f.debug&&console&&console.log(l),e}}function i(){return n.extend({},tt(),c.options)}function s(n){(t||(t=r()),n.is(":visible"))||(n.remove(),n=null,t.children().length===0&&(t.remove(),o=undefined))}var t,e,h=0,u={error:"error",info:"info",success:"success",warning:"warning"},c={clear:k,remove:d,error:v,getContainer:r,info:y,options:{},subscribe:p,success:w,version:"2.1.2",warning:b},o;return c}()})}(typeof define=="function"&&define.amd?define:function(n,t){typeof module!="undefined"&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});var EasyAutocomplete=function(n){return n.Configuration=function(n){function r(){var i,r;if("xml"===n.dataType&&(n.getValue||(n.getValue=function(n){return $(n).text()}),n.list||(n.list={}),n.list.sort||(n.list.sort={}),n.list.sort.method=function(t,i){return t=n.getValue(t),i=n.getValue(i),i>t?-1:t>i?1:0},n.list.match||(n.list.match={}),n.list.match.method=function(n,t){return n.search(t)>-1}),void 0!==n.categories&&n.categories instanceof Array){for(var f=[],u=0,e=n.categories.length;e>u;u+=1){i=n.categories[u];for(r in t.categories[0])void 0===i[r]&&(i[r]=t.categories[0][r]);f.push(i)}n.categories=f}}function u(){function i(n,t){var u=n||{},r;for(r in n)void 0!==t[r]&&null!==t[r]&&("object"!=typeof t[r]||t[r]instanceof Array?u[r]=t[r]:i(n[r],t[r]));return void 0!==t.data&&null!==t.data&&"object"==typeof t.data&&(u.data=t.data),u}t=i(t,n)}function f(){var i,r,u;"list-required"!==t.url&&"function"!=typeof t.url&&(i=t.url,t.url=function(){return i});void 0!==t.ajaxSettings.url&&"function"!=typeof t.ajaxSettings.url&&(i=t.ajaxSettings.url,t.ajaxSettings.url=function(){return i});"string"==typeof t.listLocation&&(r=t.listLocation,t.listLocation="XML"===t.dataType.toUpperCase()?function(n){return $(n).find(r)}:function(n){return n[r]});"string"==typeof t.getValue&&(u=t.getValue,t.getValue=function(n){return n[u]});void 0!==n.categories&&(t.categoriesAssigned=!0)}function e(){t.ajaxSettings=void 0!==n.ajaxSettings&&"object"==typeof n.ajaxSettings?n.ajaxSettings:{}}function o(n){return void 0!==t[n]&&null!==t[n]}function i(n,i){function r(t,i){for(var u in i)void 0===t[u]&&n.log("Property '"+u+"' does not exist in EasyAutocomplete options API."),"object"==typeof t[u]&&-1===$.inArray(u,s)&&r(t[u],i[u])}r(t,i)}var t={data:"list-required",url:"list-required",dataType:"json",listLocation:function(n){return n},xmlElementName:"",getValue:function(n){return n},autocompleteOff:!0,placeholder:!1,ajaxCallback:function(){},matchResponseProperty:!1,list:{sort:{enabled:!1,method:function(n,i){return n=t.getValue(n),i=t.getValue(i),i>n?-1:n>i?1:0}},maxNumberOfElements:6,hideOnEmptyPhrase:!0,match:{enabled:!1,caseSensitive:!1,method:function(n,t){return n.search(t)>-1}},showAnimation:{type:"normal",time:400,callback:function(){}},hideAnimation:{type:"normal",time:400,callback:function(){}},onClickEvent:function(){},onSelectItemEvent:function(){},onLoadEvent:function(){},onChooseEvent:function(){},onKeyEnterEvent:function(){},onMouseOverEvent:function(){},onMouseOutEvent:function(){},onShowListEvent:function(){},onHideListEvent:function(){}},highlightPhrase:!0,theme:"",cssClasses:"",minCharNumber:0,requestDelay:0,adjustWidth:!0,ajaxSettings:{},preparePostData:function(n){return n},loggerEnabled:!0,template:"",categoriesAssigned:!1,categories:[{maxNumberOfElements:4}]},s=["ajaxSettings","template"];this.get=function(n){return t[n]};this.equals=function(n,i){return!(!o(n)||t[n]!==i)};this.checkDataUrlProperties=function(){return"list-required"!==t.url||"list-required"!==t.data};this.checkRequiredProperties=function(){for(var n in t)if("required"===t[n])return logger.error("Option "+n+" must be defined"),!1;return!0};this.printPropertiesThatDoesntExist=function(n,t){i(n,t)};r();u();t.loggerEnabled===!0&&i(console,n);e();f()},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.Logger=function(){this.error=function(n){console.log("ERROR: "+n)};this.warning=function(n){console.log("WARNING: "+n)}},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.Constans=function(){var n={CONTAINER_CLASS:"easy-autocomplete-container",CONTAINER_ID:"eac-container-",WRAPPER_CSS_CLASS:"easy-autocomplete"};this.getValue=function(t){return n[t]}},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.ListBuilderService=function(n,t){function i(t,i){function f(){var r,u={};return void 0!==t.xmlElementName&&(u.xmlElementName=t.xmlElementName),void 0!==t.listLocation?r=t.listLocation:void 0!==n.get("listLocation")&&(r=n.get("listLocation")),void 0!==r?"string"==typeof r?u.data=$(i).find(r):"function"==typeof r&&(u.data=r(i)):u.data=i,u}function e(){var n={};return void 0!==t.listLocation?"string"==typeof t.listLocation?n.data=i[t.listLocation]:"function"==typeof t.listLocation&&(n.data=t.listLocation(i)):n.data=i,n}var r={},u;return(r="XML"===n.get("dataType").toUpperCase()?f():e(),void 0!==t.header&&(r.header=t.header),void 0!==t.maxNumberOfElements&&(r.maxNumberOfElements=t.maxNumberOfElements),void 0!==n.get("list").maxNumberOfElements&&(r.maxListSize=n.get("list").maxNumberOfElements),void 0!==t.getValue)?"string"==typeof t.getValue?(u=t.getValue,r.getValue=function(n){return n[u]}):"function"==typeof t.getValue&&(r.getValue=t.getValue):r.getValue=n.get("getValue"),r}function r(t){var i=[];return void 0===t.xmlElementName&&(t.xmlElementName=n.get("xmlElementName")),$(t.data).find(t.xmlElementName).each(function(){i.push(this)}),i}this.init=function(t){var r=[],i={};return i.data=n.get("listLocation")(t),i.getValue=n.get("getValue"),i.maxListSize=n.get("list").maxNumberOfElements,r.push(i),r};this.updateCategories=function(t,r){var u,f;if(n.get("categoriesAssigned"))for(t=[],u=0;u<n.get("categories").length;u+=1)f=i(n.get("categories")[u],r),t.push(f);return t};this.convertXml=function(t){if("XML"===n.get("dataType").toUpperCase())for(var i=0;i<t.length;i+=1)t[i].data=r(t[i]);return t};this.processData=function(i,r){for(var u=0,f=i.length;f>u;u+=1)i[u].data=t(n,i[u],r);return i};this.checkIfDataExists=function(n){for(var t=0,i=n.length;i>t;t+=1)if(void 0!==n[t].data&&n[t].data instanceof Array&&n[t].data.length>0)return!0;return!1}},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.proccess=function(t,i,r){function e(n,i){var u=[],e="",r,o;if(t.get("list").match.enabled)for(r=0,o=n.length;o>r;r+=1)e=t.get("getValue")(n[r]),f(e,i)&&u.push(n[r]);else u=n;return u}function f(n,i){return t.get("list").match.caseSensitive||("string"==typeof n&&(n=n.toLowerCase()),i=i.toLowerCase()),!!t.get("list").match.method(n,i)}function o(n){return void 0!==i.maxNumberOfElements&&n.length>i.maxNumberOfElements&&(n=n.slice(0,i.maxNumberOfElements)),n}function s(n){return t.get("list").sort.enabled&&n.sort(t.get("list").sort.method),n}n.proccess.match=f;var u=i.data,h=r;return u=e(u,h),u=o(u),u=s(u)},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.Template=function(n){var t={basic:{type:"basic",method:function(n){return n},cssClass:""},description:{type:"description",fields:{description:"description"},method:function(n){return n+" - description"},cssClass:"eac-description"},iconLeft:{type:"iconLeft",fields:{icon:""},method:function(n){return n},cssClass:"eac-icon-left"},iconRight:{type:"iconRight",fields:{iconSrc:""},method:function(n){return n},cssClass:"eac-icon-right"},links:{type:"links",fields:{link:""},method:function(n){return n},cssClass:""},custom:{type:"custom",method:function(){},cssClass:""}},i=function(n){var r,i=n.fields;return"description"===n.type?(r=t.description.method,"string"==typeof i.description?r=function(n,t){return n+" - <span>"+t[i.description]+"<\/span>"}:"function"==typeof i.description&&(r=function(n,t){return n+" - <span>"+i.description(t)+"<\/span>"}),r):"iconRight"===n.type?("string"==typeof i.iconSrc?r=function(n,t){return n+"<img class='eac-icon' src='"+t[i.iconSrc]+"' />"}:"function"==typeof i.iconSrc&&(r=function(n,t){return n+"<img class='eac-icon' src='"+i.iconSrc(t)+"' />"}),r):"iconLeft"===n.type?("string"==typeof i.iconSrc?r=function(n,t){return"<img class='eac-icon' src='"+t[i.iconSrc]+"' />"+n}:"function"==typeof i.iconSrc&&(r=function(n,t){return"<img class='eac-icon' src='"+i.iconSrc(t)+"' />"+n}),r):"links"===n.type?("string"==typeof i.link?r=function(n,t){return"<a href='"+t[i.link]+"' >"+n+"<\/a>"}:"function"==typeof i.link&&(r=function(n,t){return"<a href='"+i.link(t)+"' >"+n+"<\/a>"}),r):"custom"===n.type?n.method:t.basic.method},r=function(n){return n&&n.type&&n.type&&t[n.type]?i(n):t.basic.method},u=function(n){var i=function(){return""};return n&&n.type&&n.type&&t[n.type]?function(){var i=t[n.type].cssClass;return function(){return i}}():i};this.getTemplateClass=u(n);this.build=r(n)},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.main=function(t,i){function d(){return 0===u.length?void a.error("Input field doesn't exist."):r.checkDataUrlProperties()?r.checkRequiredProperties()?(w(),void g()):void a.error("Will not work without mentioned properties."):void a.error("One of options variables 'data' or 'url' must be defined.")}function w(){function n(){var i=$("<div>"),n=s.getValue("WRAPPER_CSS_CLASS");r.get("theme")&&""!==r.get("theme")&&(n+=" eac-"+r.get("theme"));r.get("cssClasses")&&""!==r.get("cssClasses")&&(n+=" "+r.get("cssClasses"));""!==p.getTemplateClass()&&(n+=" "+p.getTemplateClass());i.addClass(n);u.wrap(i);r.get("adjustWidth")===!0&&t()}function t(){var n=u.outerWidth();u.parent().css("width",n)}function i(){u.unwrap()}function o(){var n=$("<div>").addClass(s.getValue("CONTAINER_CLASS"));n.attr("id",b()).prepend($("<ul>")),function(){n.on("show.eac",function(){var t,i;switch(r.get("list").showAnimation.type){case"slide":t=r.get("list").showAnimation.time;i=r.get("list").showAnimation.callback;n.find("ul").slideDown(t,i);break;case"fade":t=r.get("list").showAnimation.time;i=r.get("list").showAnimation.callback;n.find("ul").fadeIn(t);i;break;default:n.find("ul").show()}r.get("list").onShowListEvent()}).on("hide.eac",function(){var t,i;switch(r.get("list").hideAnimation.type){case"slide":t=r.get("list").hideAnimation.time;i=r.get("list").hideAnimation.callback;n.find("ul").slideUp(t,i);break;case"fade":t=r.get("list").hideAnimation.time;i=r.get("list").hideAnimation.callback;n.find("ul").fadeOut(t,i);break;default:n.find("ul").hide()}r.get("list").onHideListEvent()}).on("selectElement.eac",function(){n.find("ul li").removeClass("selected");n.find("ul li").eq(f).addClass("selected");r.get("list").onSelectItemEvent()}).on("loadElements.eac",function(t,i,o){var y="",v=n.find("ul"),h,c,b;v.empty().detach();e=[];for(var w=0,s=0,k=i.length;k>s;s+=1)if(h=i[s].data,0!==h.length)for(void 0!==i[s].header&&i[s].header.length>0&&v.append("<div class='eac-category' >"+i[s].header+"<\/div>"),c=0,b=h.length;b>c&&w<i[s].maxListSize;c+=1)y=$("<li><div class='eac-item'><\/div><\/li>"),function(){var t=c,n=w,e=i[s].getValue(h[t]);y.find(" > div").on("click",function(){u.val(e).trigger("change");f=n;l(n);r.get("list").onClickEvent();r.get("list").onChooseEvent()}).mouseover(function(){f=n;l(n);r.get("list").onMouseOverEvent()}).mouseout(function(){r.get("list").onMouseOutEvent()}).html(p.build(a(e,o),h[t]))}(),v.append(y),e.push(h[c]),w+=1;n.append(v);r.get("list").onLoadEvent()})}();u.after(n)}function h(){u.next("."+s.getValue("CONTAINER_CLASS")).remove()}function a(n,t){return r.get("highlightPhrase")&&""!==t?y(n,t):n}function v(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function y(n,t){var i=v(t);return(n+"").replace(new RegExp("("+i+")","gi"),"<b>$1<\/b>")}u.parent().hasClass(s.getValue("WRAPPER_CSS_CLASS"))&&(h(),i());n();o();c=$("#"+b());r.get("placeholder")&&u.attr("placeholder",r.get("placeholder"))}function b(){var n=u.attr("id");return s.getValue("CONTAINER_ID")+n}function g(){function n(){tt("autocompleteOff",!0)&&b();t();i();s();c();p();w()}function t(){u.focusout(function(){var t,i=u.val(),n,o;for(r.get("list").match.caseSensitive||(i=i.toLowerCase()),n=0,o=e.length;o>n;n+=1)if(t=r.get("getValue")(e[n]),r.get("list").match.caseSensitive||(t=t.toLowerCase()),t===i)return f=n,void l(f)})}function i(){u.off("keyup").keyup(function(n){function i(n){function e(){var t={},i=r.get("ajaxSettings")||{},n;for(n in i)t[n]=i[n];return t}function s(n,t){return r.get("matchResponseProperty")!==!1?"string"==typeof r.get("matchResponseProperty")?t[r.get("matchResponseProperty")]===n:"function"==typeof r.get("matchResponseProperty")?r.get("matchResponseProperty")(t)===n:!0:!0}var f,i,t;n.length<r.get("minCharNumber")||("list-required"!==r.get("data")&&(f=r.get("data"),i=o.init(f),i=o.updateCategories(i,f),i=o.processData(i,n),k(i,n),u.parent().find("li").length>0?v():h()),t=e(),void 0!==t.url&&""!==t.url||(t.url=r.get("url")),void 0!==t.dataType&&""!==t.dataType||(t.dataType=r.get("dataType")),void 0!==t.url&&"list-required"!==t.url&&(t.url=t.url(n),t.data=r.get("preparePostData")(t.data,n),$.ajax(t).done(function(t){var i=o.init(t);i=o.updateCategories(i,t);i=o.convertXml(i);s(n,t)&&(i=o.processData(i,n),k(i,n));o.checkIfDataExists(i)&&u.parent().find("li").length>0?v():h();r.get("ajaxCallback")()}).fail(function(){a.warning("Fail to load response data")}).always(function(){})))}switch(n.keyCode){case 27:h();nt();break;case 38:n.preventDefault();e.length>0&&f>0&&(f-=1,u.val(r.get("getValue")(e[f])),l(f));break;case 40:n.preventDefault();e.length>0&&f<e.length-1&&(f+=1,u.val(r.get("getValue")(e[f])),l(f));break;default:if(n.keyCode>40||8===n.keyCode){var t=u.val();r.get("list").hideOnEmptyPhrase!==!0||8!==n.keyCode||""!==t?r.get("requestDelay")>0?(void 0!==y&&clearTimeout(y),y=setTimeout(function(){i(t)},r.get("requestDelay"))):i(t):h()}}})}function s(){u.on("keydown",function(n){n=n||window.event;var t=n.keyCode;if(38===t)return(suppressKeypress=!0,!1)}).keydown(function(n){13===n.keyCode&&f>-1&&(u.val(r.get("getValue")(e[f])),r.get("list").onKeyEnterEvent(),r.get("list").onChooseEvent(),f=-1,h(),n.preventDefault())})}function c(){u.off("keypress")}function p(){u.focus(function(){""!==u.val()&&e.length>0&&(f=-1,v())})}function w(){u.blur(function(){setTimeout(function(){f=-1;h()},250)})}function b(){u.attr("autocomplete","off")}n()}function v(){c.trigger("show.eac")}function h(){c.trigger("hide.eac")}function l(n){c.trigger("selectElement.eac",n)}function k(n,t){c.trigger("loadElements.eac",[n,t])}function nt(){u.trigger("blur")}var y,s=new n.Constans,r=new n.Configuration(i),a=new n.Logger,p=new n.Template(i.template),o=new n.ListBuilderService(r,n.proccess),tt=r.equals,u=t,c="",e=[],f=-1;n.consts=s;this.getConstants=function(){return s};this.getConfiguration=function(){return r};this.getContainer=function(){return c};this.getSelectedItemIndex=function(){return f};this.getItems=function(){return e};this.getItemData=function(n){return e.length<n||void 0===e[n]?-1:e[n]};this.getSelectedItemData=function(){return this.getItemData(f)};this.build=function(){w()};this.init=function(){d()}},n.eacHandles=[],n.getHandle=function(t){return n.eacHandles[t]},n.inputHasId=function(n){return void 0!==$(n).attr("id")&&$(n).attr("id").length>0},n.assignRandomId=function(t){var i="";do i="eac-"+Math.floor(1e4*Math.random());while(0!==$("#"+i).length);elementId=n.consts.getValue("CONTAINER_ID")+i;$(t).attr("id",i)},n.setHandle=function(t,i){n.eacHandles[i]=t},n}(EasyAutocomplete||{});!function(n){n.fn.easyAutocomplete=function(t){return this.each(function(){var i=n(this),r=new EasyAutocomplete.main(i,t);EasyAutocomplete.inputHasId(i)||EasyAutocomplete.assignRandomId(i);r.init();EasyAutocomplete.setHandle(r,i.attr("id"))})};n.fn.getSelectedItemIndex=function(){var t=n(this).attr("id");return void 0!==t?EasyAutocomplete.getHandle(t).getSelectedItemIndex():-1};n.fn.getItems=function(){var t=n(this).attr("id");return void 0!==t?EasyAutocomplete.getHandle(t).getItems():-1};n.fn.getItemData=function(t){var i=n(this).attr("id");return void 0!==i&&t>-1?EasyAutocomplete.getHandle(i).getItemData(t):-1};n.fn.getSelectedItemData=function(){var t=n(this).attr("id");return void 0!==t?EasyAutocomplete.getHandle(t).getSelectedItemData():-1}}(jQuery);!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),n(i),i}:n(jQuery)}(function(n){function u(n,t){return d.call(n,t)}function a(n,t){var o,s,e,f,v,h,y,i,c,p,u=t&&t.split("/"),l=r.map,a=l&&l["*"]||{};if(n){for(t=(n=n.split("/")).length-1,r.nodeIdCompat&&b.test(n[t])&&(n[t]=n[t].replace(b,"")),"."===n[0].charAt(0)&&u&&(n=u.slice(0,u.length-1).concat(n)),i=0;i<n.length;i++)"."===(p=n[i])?(n.splice(i,1),--i):".."===p&&(0===i||1===i&&".."===n[2]||".."===n[i-1]||0<i&&(n.splice(i-1,2),i-=2));n=n.join("/")}if((u||a)&&l){for(i=(o=n.split("/")).length;0<i;--i){if(s=o.slice(0,i).join("/"),u)for(c=u.length;0<c;--c)if(e=l[u.slice(0,c).join("/")],e=e&&e[s]){f=e;v=i;break}if(f)break;!h&&a&&a[s]&&(h=a[s],y=i)}!f&&h&&(f=h,v=y);f&&(o.splice(0,v,f),n=o.join("/"))}return n}function nt(n,t){return function(){var i=g.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),o.apply(f,i.concat([n,t]))}}function v(n){var t;if(u(e,n)&&(t=e[n],delete e[n],c[n]=!0,h.apply(f,t)),!u(i,n)&&!u(c,n))throw new Error("No "+n);return i[n]}function k(n){var i,t=n?n.indexOf("!"):-1;return-1<t&&(i=n.substring(0,t),n=n.substring(t+1,n.length)),[i,n]}function tt(n){return n?k(n):[]}var y,p,f,h,o,w,s,i,e,r,c,d,g,b,l=((t=n&&n.fn&&n.fn.select2&&n.fn.select2.amd?n.fn.select2.amd:t)&&t.requirejs||(t?p=t:t={},i={},e={},r={},c={},d=Object.prototype.hasOwnProperty,g=[].slice,b=/\.js$/,w=function(n,t){var r,f,u=k(n),i=u[0],t=t[1];return n=u[1],i&&(r=v(i=a(i,t))),i?n=r&&r.normalize?r.normalize(n,(f=t,function(n){return a(n,f)})):a(n,t):(i=(u=k(n=a(n,t)))[0],n=u[1],i&&(r=v(i))),{f:i?i+"!"+n:n,n:n,pr:i,p:r}},s={require:function(n){return nt(n)},exports:function(n){var t=i[n];return void 0!==t?t:i[n]={}},module:function(n){return{id:n,uri:"",exports:i[n],config:(t=n,function(){return r&&r.config&&r.config[t]||{}})};var t}},h=function(n,t,r,o){var y,h,b,l,k,a=[],p=typeof r,d=tt(o=o||n);if("undefined"==p||"function"==p){for(t=!t.length&&r.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(h=(b=w(t[l],d)).f))a[l]=s.require(n);else if("exports"===h)a[l]=s.exports(n),k=!0;else if("module"===h)y=a[l]=s.module(n);else if(u(i,h)||u(e,h)||u(c,h))a[l]=v(h);else{if(!b.p)throw new Error(n+" missing "+h);b.p.load(b.n,nt(o,!0),function(n){return function(t){i[n]=t}}(h),{});a[l]=i[h]}p=r?r.apply(i[n],a):void 0;n&&(y&&y.exports!==f&&y.exports!==i[n]?i[n]=y.exports:p===f&&k||(i[n]=p))}else n&&(i[n]=r)},y=p=o=function(n,t,i,u,e){if("string"==typeof n)return s[n]?s[n](t):v(w(n,tt(t)).f);if(!n.splice){if((r=n).deps&&o(r.deps,r.callback),!t)return;t.splice?(n=t,t=i,i=null):n=f}return t=t||function(){},"function"==typeof i&&(i=u,u=e),u?h(f,n,t,i):setTimeout(function(){h(f,n,t,i)},4),o},o.config=function(n){return o(n)},y._defined=i,(l=function(n,t,r){if("string"!=typeof n)throw new Error("See almond README: incorrect module build, no module name");t.splice||(r=t,t=[]);u(i,n)||u(e,n)||(e[n]=[n,t,r])}).amd={jQuery:!0},t.requirejs=y,t.require=p,t.define=l),t.define("almond",function(){}),t.define("jquery",[],function(){var t=n||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(n){function r(n){var t,i=n.prototype,r=[];for(t in i)"function"==typeof i[t]&&"constructor"!==t&&r.push(t);return r}function i(){this.listeners={}}var t={},u;return t.Extend=function(n,t){function r(){this.constructor=n}var i,u={}.hasOwnProperty;for(i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},t.Decorate=function(n,t){function i(){var r=Array.prototype.unshift,u=t.prototype.constructor.length,i=n.prototype.constructor;0<u&&(r.call(arguments,n.prototype.constructor),i=t.prototype.constructor);i.apply(this,arguments)}var s=r(t),h=r(n),u,e,f,o;for(t.displayName=n.displayName,i.prototype=new function(){this.constructor=i},u=0;u<h.length;u++)e=h[u],i.prototype[e]=n.prototype[e];for(f=0;f<s.length;f++)o=s[f],i.prototype[o]=function(n){var r=function(){},u;return n in i.prototype&&(r=i.prototype[n]),u=t.prototype[n],function(){return Array.prototype.unshift.call(arguments,r),u.apply(this,arguments)}}(o);return i},i.prototype.on=function(n,t){this.listeners=this.listeners||{};n in this.listeners?this.listeners[n].push(t):this.listeners[n]=[t]},i.prototype.trigger=function(n){var i=Array.prototype.slice,t=i.call(arguments,1);this.listeners=this.listeners||{};0===(t=null==t?[]:t).length&&t.push({});(t[0]._type=n)in this.listeners&&this.invoke(this.listeners[n],i.call(arguments,1));"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(n,t){for(var i=0,r=n.length;i<r;i++)n[i].apply(this,t)},t.Observable=i,t.generateChars=function(n){for(var t="",i=0;i<n;i++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(n,t){return function(){n.apply(t,arguments)}},t._convertData=function(n){var f,r,i,u,t;for(f in n)if(r=f.split("-"),i=n,1!==r.length){for(u=0;u<r.length;u++)t=r[u],(t=t.substring(0,1).toLowerCase()+t.substring(1))in i||(i[t]={}),u==r.length-1&&(i[t]=n[f]),i=i[t];delete n[f]}return n},t.hasScroll=function(t,i){var u=n(i),f=i.style.overflowX,r=i.style.overflowY;return(f!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===f||"scroll"===r||u.innerHeight()<i.scrollHeight||u.innerWidth()<i.scrollWidth)},t.escapeMarkup=function(n){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof n?n:String(n).replace(/[&<>"'\/\\]/g,function(n){return t[n]})},t.__cache={},u=0,t.GetUniqueElementId=function(n){var i=n.getAttribute("data-select2-id");return null!=i||(i=n.id?"select2-data-"+n.id:"select2-data-"+(++u).toString()+"-"+t.generateChars(4),n.setAttribute("data-select2-id",i)),i},t.StoreData=function(n,i,r){n=t.GetUniqueElementId(n);t.__cache[n]||(t.__cache[n]={});t.__cache[n][i]=r},t.GetData=function(i,r){var u=t.GetUniqueElementId(i);return r?t.__cache[u]&&null!=t.__cache[u][r]?t.__cache[u][r]:n(i).data(r):t.__cache[u]},t.RemoveData=function(n){var i=t.GetUniqueElementId(n);null!=t.__cache[i]&&delete t.__cache[i];n.removeAttribute("data-select2-id")},t.copyNonInternalCssClasses=function(n,t){var i=(i=n.getAttribute("class").trim().split(/\s+/)).filter(function(n){return 0===n.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(n){return 0!==n.indexOf("select2-")}),t=i.concat(t);n.setAttribute("class",t.join(" "))},t}),t.define("select2/results",["jquery","./utils"],function(n,t){function i(n,t,r){this.$element=n;this.data=r;this.options=t;i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=n('<ul class="select2-results__options" role="listbox"><\/ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(t){var u=this.options.get("escapeMarkup"),i,r;this.clear();this.hideLoading();i=n('<li role="alert" aria-live="assertive" class="select2-results__option"><\/li>');r=this.options.get("translations").get(t.message);i.append(u(r(t.args)));i[0].className+=" select2-results__message";this.$results.append(i)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(n){var r,i,t;if(this.hideLoading(),r=[],null!=n.results&&0!==n.results.length){for(n.results=this.sort(n.results),i=0;i<n.results.length;i++)t=n.results[i],t=this.option(t),r.push(t);this.$results.append(r)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(n,t){t.find(".select2-results").append(n)},i.prototype.sort=function(n){return this.options.get("sorter")(n)},i.prototype.highlightFirstItem=function(){var n=this.$results.find(".select2-results__option--selectable"),t=n.filter(".select2-results__option--selected");(0<t.length?t:n).first().trigger("mouseenter");this.ensureHighlightVisible()},i.prototype.setClasses=function(){var i=this;this.data.current(function(r){var u=r.map(function(n){return n.id.toString()});i.$results.find(".select2-results__option--selectable").each(function(){var r=n(this),i=t.GetData(this,"data"),f=""+i.id;null!=i.element&&i.element.selected||null==i.element&&-1<u.indexOf(f)?(this.classList.add("select2-results__option--selected"),r.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),r.attr("aria-selected","false"))})})},i.prototype.showLoading=function(n){this.hideLoading();n={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(n)};n=this.option(n);n.className+=" loading-results";this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(i){var r=document.createElement("li"),h,u,f,a,c,o,l,s,e;r.classList.add("select2-results__option");r.classList.add("select2-results__option--selectable");u={role:"option"};f=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(h in(null!=i.element&&f.call(i.element,":disabled")||null==i.element&&i.disabled)&&(u["aria-disabled"]="true",r.classList.remove("select2-results__option--selectable"),r.classList.add("select2-results__option--disabled")),null==i.id&&r.classList.remove("select2-results__option--selectable"),null!=i._resultId&&(r.id=i._resultId),i.title&&(r.title=i.title),i.children&&(u.role="group",u["aria-label"]=i.text,r.classList.remove("select2-results__option--selectable"),r.classList.add("select2-results__option--group")),u)a=u[h],r.setAttribute(h,a);if(i.children){for(c=n(r),o=document.createElement("strong"),o.className="select2-results__group",this.template(i,o),l=[],s=0;s<i.children.length;s++)e=i.children[s],e=this.option(e),l.push(e);f=n("<ul><\/ul>",{"class":"select2-results__options select2-results__options--nested",role:"none"});f.append(l);c.append(o);c.append(f)}else this.template(i,r);return t.StoreData(r,"data",i),r},i.prototype.bind=function(i){var r=this,u=i.id+"-results";this.$results.attr("id",u);i.on("results:all",function(n){r.clear();r.append(n.data);i.isOpen()&&(r.setClasses(),r.highlightFirstItem())});i.on("results:append",function(n){r.append(n.data);i.isOpen()&&r.setClasses()});i.on("query",function(n){r.hideMessages();r.showLoading(n)});i.on("select",function(){i.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())});i.on("unselect",function(){i.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())});i.on("open",function(){r.$results.attr("aria-expanded","true");r.$results.attr("aria-hidden","false");r.setClasses();r.ensureHighlightVisible()});i.on("close",function(){r.$results.attr("aria-expanded","false");r.$results.attr("aria-hidden","true");r.$results.removeAttr("aria-activedescendant")});i.on("results:toggle",function(){var n=r.getHighlightedResults();0!==n.length&&n.trigger("mouseup")});i.on("results:select",function(){var i,n=r.getHighlightedResults();0!==n.length&&(i=t.GetData(n[0],"data"),n.hasClass("select2-results__option--selected")?r.trigger("close",{}):r.trigger("select",{data:i}))});i.on("results:previous",function(){var u,t=r.getHighlightedResults(),i=r.$results.find(".select2-results__option--selectable"),n=i.index(t);n<=0||(u=n-1,0===t.length&&(u=0),(n=i.eq(u)).trigger("mouseenter"),t=r.$results.offset().top,i=n.offset().top,n=r.$results.scrollTop()+(i-t),0===u?r.$results.scrollTop(0):i-t<0&&r.$results.scrollTop(n))});i.on("results:next",function(){var t,i=r.getHighlightedResults(),n=r.$results.find(".select2-results__option--selectable"),u=n.index(i)+1;u>=n.length||((t=n.eq(u)).trigger("mouseenter"),i=r.$results.offset().top+r.$results.outerHeight(!1),n=t.offset().top+t.outerHeight(!1),t=r.$results.scrollTop()+n-i,0===u?r.$results.scrollTop(0):i<n&&r.$results.scrollTop(t))});i.on("results:focus",function(n){n.element[0].classList.add("select2-results__option--highlighted");n.element[0].setAttribute("aria-selected","true")});i.on("results:message",function(n){r.displayMessage(n)});n.fn.mousewheel&&this.$results.on("mousewheel",function(n){var t=r.$results.scrollTop(),i=r.$results.get(0).scrollHeight-t+n.deltaY,t=0<n.deltaY&&t-n.deltaY<=0,i=n.deltaY<0&&i<=r.$results.height();t?(r.$results.scrollTop(0),n.preventDefault(),n.stopPropagation()):i&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),n.preventDefault(),n.stopPropagation())});this.$results.on("mouseup",".select2-results__option--selectable",function(i){var f=n(this),u=t.GetData(this,"data");f.hasClass("select2-results__option--selected")?r.options.get("multiple")?r.trigger("unselect",{originalEvent:i,data:u}):r.trigger("close",{}):r.trigger("select",{originalEvent:i,data:u})});this.$results.on("mouseenter",".select2-results__option--selectable",function(){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false");r.trigger("results:focus",{data:i,element:n(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var u,i,r,n,t=this.getHighlightedResults();0!==t.length&&(u=this.$results.find(".select2-results__option--selectable").index(t),n=this.$results.offset().top,i=t.offset().top,r=this.$results.scrollTop()+(i-n),n=i-n,r-=2*t.outerHeight(!1),u<=2?this.$results.scrollTop(0):(n>this.$results.outerHeight()||n<0)&&this.$results.scrollTop(r))},i.prototype.template=function(t,i){var r=this.options.get("templateResult"),u=this.options.get("escapeMarkup"),t=r(t,i);null==t?i.style.display="none":"string"==typeof t?i.innerHTML=u(t):n(i).append(t)},i}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(n,t,i){function r(n,t){this.$element=n;this.options=t;r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var i=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"><\/span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),i.attr("title",this.$element.attr("title")),i.attr("tabindex",this._tabindex),i.attr("aria-disabled","false"),this.$selection=i},r.prototype.bind=function(n){var t=this,r=n.id+"-results";this.container=n;this.$selection.on("focus",function(n){t.trigger("focus",n)});this.$selection.on("blur",function(n){t._handleBlur(n)});this.$selection.on("keydown",function(n){t.trigger("keypress",n);n.which===i.SPACE&&n.preventDefault()});n.on("results:focus",function(n){t.$selection.attr("aria-activedescendant",n.data._resultId)});n.on("selection:update",function(n){t.update(n.data)});n.on("open",function(){t.$selection.attr("aria-expanded","true");t.$selection.attr("aria-owns",r);t._attachCloseHandler(n)});n.on("close",function(){t.$selection.attr("aria-expanded","false");t.$selection.removeAttr("aria-activedescendant");t.$selection.removeAttr("aria-owns");t.$selection.trigger("focus");t._detachCloseHandler(n)});n.on("enable",function(){t.$selection.attr("tabindex",t._tabindex);t.$selection.attr("aria-disabled","false")});n.on("disable",function(){t.$selection.attr("tabindex","-1");t.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(t){var i=this;window.setTimeout(function(){document.activeElement==i.$selection[0]||n.contains(i.$selection[0],document.activeElement)||i.trigger("blur",t)},1)},r.prototype._attachCloseHandler=function(i){n(document.body).on("mousedown.select2."+i.id,function(i){var r=n(i.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=r[0]&&t.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(t){n(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(n,t){t.find(".selection").append(n)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.");},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(n,t,i){function r(){r.__super__.constructor.apply(this,arguments)}return i.Extend(r,t),r.prototype.render=function(){var n=r.__super__.render.call(this);return n[0].classList.add("select2-selection--single"),n.html('<span class="select2-selection__rendered"><\/span><span class="select2-selection__arrow" role="presentation"><b role="presentation"><\/b><\/span>'),n},r.prototype.bind=function(n){var i=this,t;r.__super__.bind.apply(this,arguments);t=n.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",t).attr("role","textbox").attr("aria-readonly","true");this.$selection.attr("aria-labelledby",t);this.$selection.attr("aria-controls",t);this.$selection.on("mousedown",function(n){1===n.which&&i.trigger("toggle",{originalEvent:n})});this.$selection.on("focus",function(){});this.$selection.on("blur",function(){});n.on("focus",function(){n.isOpen()||i.$selection.trigger("focus")})},r.prototype.clear=function(){var n=this.$selection.find(".select2-selection__rendered");n.empty();n.removeAttr("title")},r.prototype.display=function(n,t){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(n,t))},r.prototype.selectionContainer=function(){return n("<span><\/span>")},r.prototype.update=function(n){var i,t;0!==n.length?(t=n[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(t,i),i.empty().append(n),(t=t.title||t.text)?i.attr("title",t):i.removeAttr("title")):this.clear()},r}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(n,t,i){function r(){r.__super__.constructor.apply(this,arguments)}return i.Extend(r,t),r.prototype.render=function(){var n=r.__super__.render.call(this);return n[0].classList.add("select2-selection--multiple"),n.html('<ul class="select2-selection__rendered"><\/ul>'),n},r.prototype.bind=function(t){var u=this,f;r.__super__.bind.apply(this,arguments);f=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",f);this.$selection.on("click",function(n){u.trigger("toggle",{originalEvent:n})});this.$selection.on("click",".select2-selection__choice__remove",function(t){var r;u.isDisabled()||(r=n(this).parent(),r=i.GetData(r[0],"data"),u.trigger("unselect",{originalEvent:t,data:r}))});this.$selection.on("keydown",".select2-selection__choice__remove",function(n){u.isDisabled()||n.stopPropagation()})},r.prototype.clear=function(){var n=this.$selection.find(".select2-selection__rendered");n.empty();n.removeAttr("title")},r.prototype.display=function(n,t){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(n,t))},r.prototype.selectionContainer=function(){return n('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;<\/span><\/button><span class="select2-selection__choice__display"><\/span><\/li>')},r.prototype.update=function(n){var t;if(this.clear(),0!==n.length){for(var s=[],h=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",e=0;e<n.length;e++){var r=n[e],u=this.selectionContainer(),f=this.display(r,u),o=h+i.generateChars(4)+"-";o+=r.id?r.id:i.generateChars(4);u.find(".select2-selection__choice__display").append(f).attr("id",o);t=r.title||r.text;t&&u.attr("title",t);f=this.options.get("translations").get("removeItem");t=u.find(".select2-selection__choice__remove");t.attr("title",f());t.attr("aria-label",f());t.attr("aria-describedby",o);i.StoreData(u[0],"data",r);s.push(u)}this.$selection.find(".select2-selection__rendered").append(s)}},r}),t.define("select2/selection/placeholder",[],function(){function n(n,t,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder"));n.call(this,t,i)}return n.prototype.normalizePlaceholder=function(n,t){return"string"==typeof t?{id:"",text:t}:t},n.prototype.createPlaceholder=function(n,t){var i=this.selectionContainer();return i.html(this.display(t)),i[0].classList.add("select2-selection__placeholder"),i[0].classList.remove("select2-selection__choice"),t=t.title||t.text||i.text(),this.$selection.find(".select2-selection__rendered").attr("title",t),i},n.prototype.update=function(n,t){var i=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||i)return n.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},n}),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(n,t,i){function r(){}return r.prototype.bind=function(n,t,i){var r=this;n.call(this,t,i);null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option.");this.$selection.on("mousedown",".select2-selection__clear",function(n){r._handleClear(n)});t.on("keypress",function(n){r._handleKeyboardClear(n,t)})},r.prototype._handleClear=function(n,t){var e,u,o,r,f;if(!this.isDisabled()&&(e=this.$selection.find(".select2-selection__clear"),0!==e.length))if(t.stopPropagation(),u=i.GetData(e[0],"data"),o=this.$element.val(),this.$element.val(this.placeholder.id),r={data:u},this.trigger("clear",r),r.prevented)this.$element.val(o);else{for(f=0;f<u.length;f++)if(r={data:u[f]},this.trigger("unselect",r),r.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change");this.trigger("toggle",{})}},r.prototype._handleKeyboardClear=function(n,i,r){r.isOpen()||i.which!=t.DELETE&&i.which!=t.BACKSPACE||this._handleClear(i)},r.prototype.update=function(t,r){var f,u;t.call(this,r);this.$selection.find(".select2-selection__clear").remove();this.$selection[0].classList.remove("select2-selection--clearable");0<this.$selection.find(".select2-selection__placeholder").length||0===r.length||(f=this.$selection.find(".select2-selection__rendered").attr("id"),u=this.options.get("translations").get("removeAllItems"),(t=n('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;<\/span><\/button>')).attr("title",u()),t.attr("aria-label",u()),t.attr("aria-describedby",f),i.StoreData(t[0],"data",r),this.$selection.prepend(t),this.$selection[0].classList.add("select2-selection--clearable"))},r}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(n,t,i){function r(n,t,i){n.call(this,t,i)}return r.prototype.render=function(t){var r=this.options.get("translations").get("search"),i=n('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ><\/textarea><\/span>');return this.$searchContainer=i,this.$search=i.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",r()),t=t.call(this),this._transferTabIndex(),t.append(this.$searchContainer),t},r.prototype.bind=function(n,r,u){var f=this,o=r.id+"-results",s=r.id+"-container",r,e;n.call(this,r,u);f.$search.attr("aria-describedby",s);r.on("open",function(){f.$search.attr("aria-controls",o);f.$search.trigger("focus")});r.on("close",function(){f.$search.val("");f.resizeSearch();f.$search.removeAttr("aria-controls");f.$search.removeAttr("aria-activedescendant");f.$search.trigger("focus")});r.on("enable",function(){f.$search.prop("disabled",!1);f._transferTabIndex()});r.on("disable",function(){f.$search.prop("disabled",!0)});r.on("focus",function(){f.$search.trigger("focus")});r.on("results:focus",function(n){n.data._resultId?f.$search.attr("aria-activedescendant",n.data._resultId):f.$search.removeAttr("aria-activedescendant")});this.$selection.on("focusin",".select2-search--inline",function(n){f.trigger("focus",n)});this.$selection.on("focusout",".select2-search--inline",function(n){f._handleBlur(n)});this.$selection.on("keydown",".select2-search--inline",function(n){var r;n.stopPropagation();f.trigger("keypress",n);f._keyUpPrevented=n.isDefaultPrevented();n.which!==i.BACKSPACE||""!==f.$search.val()||0<(r=f.$selection.find(".select2-selection__choice").last()).length&&(r=t.GetData(r[0],"data"),f.searchRemoveChoice(r),n.preventDefault())});this.$selection.on("click",".select2-search--inline",function(n){f.$search.val()&&n.stopPropagation()});r=document.documentMode;e=r&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(){e?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(n){var t;e&&"input"===n.type?f.$selection.off("input.search input.searchcheck"):(t=n.which)!=i.SHIFT&&t!=i.CTRL&&t!=i.ALT&&t!=i.TAB&&f.handleSearch(n)})},r.prototype._transferTabIndex=function(){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(n,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(n,t){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");n.call(this,t);this.resizeSearch();i&&this.$search.trigger("focus")},r.prototype.handleSearch=function(){var n;this.resizeSearch();this._keyUpPrevented||(n=this.$search.val(),this.trigger("query",{term:n}));this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(n,t){this.trigger("unselect",{data:t});this.$search.val(t.text);this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var n="100%";""===this.$search.attr("placeholder")&&(n=.75*(this.$search.val().length+1)+"em");this.$search.css("width",n)},r}),t.define("select2/selection/selectionCss",["../utils"],function(n){function t(){}return t.prototype.render=function(t){var i=t.call(this),t=this.options.get("selectionCssClass")||"";return-1!==t.indexOf(":all:")&&(t=t.replace(":all:",""),n.copyNonInternalCssClasses(i[0],this.$element[0])),i.addClass(t),i},t}),t.define("select2/selection/eventRelay",["jquery"],function(n){function t(){}return t.prototype.bind=function(t,i,r){var u=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],e=["opening","closing","selecting","unselecting","clearing"];t.call(this,i,r);i.on("*",function(t,i){var r;-1!==f.indexOf(t)&&(i=i||{},r=n.Event("select2:"+t,{params:i}),u.$element.trigger(r),-1!==e.indexOf(t)&&(i.prevented=r.isDefaultPrevented()))})},t}),t.define("select2/translation",["jquery","require"],function(n,t){function i(n){this.dict=n||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(n){return this.dict[n]},i.prototype.extend=function(t){this.dict=n.extend({},t.all(),this.dict)},i._cache={},i.loadPath=function(n){var r;return n in i._cache||(r=t(n),i._cache[n]=r),new i(i._cache[n])},i}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),t.define("select2/data/base",["../utils"],function(n){function t(){t.__super__.constructor.call(this)}return n.Extend(t,n.Observable),t.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.");},t.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.");},t.prototype.bind=function(){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,i){return t=t.id+"-result-",t+=n.generateChars(4),t+=null!=i.id?"-"+i.id.toString():"-"+n.generateChars(4),t},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(n,t,i){function r(n,t){this.$element=n;this.options=t;r.__super__.constructor.call(this)}return t.Extend(r,n),r.prototype.current=function(n){var t=this;n(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(n){return t.item(i(n))}))},r.prototype.select=function(n){var t,i=this;if(n.selected=!0,null!=n.element&&"option"===n.element.tagName.toLowerCase())return n.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(t){var u=[],r,f;for((n=[n]).push.apply(n,t),r=0;r<n.length;r++)f=n[r].id,-1===u.indexOf(f)&&u.push(f);i.$element.val(u);i.$element.trigger("input").trigger("change")}):(t=n.id,this.$element.val(t),this.$element.trigger("input").trigger("change"))},r.prototype.unselect=function(n){var t=this;if(this.$element.prop("multiple")){if(n.selected=!1,null!=n.element&&"option"===n.element.tagName.toLowerCase())return n.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(i){for(var f,r=[],u=0;u<i.length;u++)f=i[u].id,f!==n.id&&-1===r.indexOf(f)&&r.push(f);t.$element.val(r);t.$element.trigger("input").trigger("change")})}},r.prototype.bind=function(n){var t=this;(this.container=n).on("select",function(n){t.select(n.data)});n.on("unselect",function(n){t.unselect(n.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})},r.prototype.query=function(n,t){var r=[],u=this;this.$element.children().each(function(){var t;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(t=i(this),t=u.item(t),null!==(t=u.matches(n,t))&&r.push(t))});t({results:r})},r.prototype.addOptions=function(n){this.$element.append(n)},r.prototype.option=function(n){var r;return n.children?(r=document.createElement("optgroup")).label=n.text:void 0!==(r=document.createElement("option")).textContent?r.textContent=n.text:r.innerText=n.text,void 0!==n.id&&(r.value=n.id),n.disabled&&(r.disabled=!0),n.selected&&(r.selected=!0),n.title&&(r.title=n.title),n=this._normalizeItem(n),n.element=r,t.StoreData(r,"data",n),i(r)},r.prototype.item=function(n){var r={},f,u;if(null!=(r=t.GetData(n[0],"data")))return r;if(f=n[0],"option"===f.tagName.toLowerCase())r={id:n.val(),text:n.text(),disabled:n.prop("disabled"),selected:n.prop("selected"),title:n.prop("title")};else if("optgroup"===f.tagName.toLowerCase()){r={text:n.prop("label"),children:[],title:n.prop("title")};for(var o=n.children("option"),s=[],e=0;e<o.length;e++)u=i(o[e]),u=this.item(u),s.push(u);r.children=s}return(r=this._normalizeItem(r)).element=n[0],t.StoreData(n[0],"data",r),r},r.prototype._normalizeItem=function(n){return n!==Object(n)&&(n={id:n,text:n}),null!=(n=i.extend({},{text:""},n)).id&&(n.id=n.id.toString()),null!=n.text&&(n.text=n.text.toString()),null==n._resultId&&n.id&&null!=this.container&&(n._resultId=this.generateResultId(this.container,n)),i.extend({},{selected:!1,disabled:!1},n)},r.prototype.matches=function(n,t){return this.options.get("matcher")(n,t)},r}),t.define("select2/data/array",["./select","../utils","jquery"],function(n,t,i){function r(n,t){this._dataToConvert=t.get("data")||[];r.__super__.constructor.call(this,n,t)}return t.Extend(r,n),r.prototype.bind=function(n,t){r.__super__.bind.call(this,n,t);this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var t=this.$element.find("option").filter(function(t,i){return i.value==n.id.toString()});0===t.length&&(t=this.option(n),this.addOptions(t));r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(n){for(var s=this,e=this.$element.find("option"),h=e.map(function(){return s.item(i(this)).id}).get(),o=[],f,t,r,u=0;u<n.length;u++)r=this._normalizeItem(n[u]),0<=h.indexOf(r.id)?(f=e.filter(function(n){return function(){return i(this).val()==n.id}}(r)),t=this.item(f),t=i.extend(!0,{},r,t),t=this.option(t),f.replaceWith(t)):(t=this.option(r),r.children&&(r=this.convertToOptions(r.children),t.append(r)),o.push(t));return o},r}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(n,t,i){function r(n,t){this.ajaxOptions=this._applyDefaults(t.get("ajax"));null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults);r.__super__.constructor.call(this,n,t)}return t.Extend(r,n),r.prototype._applyDefaults=function(n){var t={data:function(n){return i.extend({},n,{q:n.term})},transport:function(n,t,r){return n=i.ajax(n),n.then(t),n.fail(r),n}};return i.extend({},t,n,!0)},r.prototype.processResults=function(n){return n},r.prototype.query=function(n,t){function f(){var i=r.transport(r,function(i){i=u.processResults(i,n);u.options.get("debug")&&window.console&&console.error&&(i&&i.results&&Array.isArray(i.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response."));t(i)},function(){"status"in i&&(0===i.status||"0"===i.status)||u.trigger("results:message",{message:"errorLoading"})});u._request=i}var u=this,r;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);r=i.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,n));"function"==typeof r.data&&(r.data=r.data.call(this.$element,n));this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(f,this.ajaxOptions.delay)):f()},r}),t.define("select2/data/tags",["jquery"],function(n){function t(n,t,i){var e=i.get("tags"),r=i.get("createTag"),f;if(void 0!==r&&(this.createTag=r),r=i.get("insertTag"),void 0!==r&&(this.insertTag=r),n.call(this,t,i),Array.isArray(e))for(f=0;f<e.length;f++){var u=e[f],u=this._normalizeItem(u),u=this.option(u);this.$element.append(u)}}return t.prototype.query=function(n,t,i){var r=this;this._removeOldTags();null!=t.term&&null==t.page?n.call(this,t,function n(u,f){for(var s,c,l,h,e=u.results,o=0;o<e.length;o++)if(s=e[o],c=null!=s.children&&!n({results:s.children},!0),(s.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!f&&(u.data=e,void i(u));if(f)return!0;h=r.createTag(t);null!=h&&((l=r.option(h)).attr("data-select2-tag","true"),r.addOptions([l]),r.insertTag(e,h));u.results=e;i(u)}):n.call(this,t,i)},t.prototype.createTag=function(n,t){return null==t.term?null:(t=t.term.trim(),""===t?null:{id:t,text:t})},t.prototype.insertTag=function(n,t,i){t.unshift(i)},t.prototype._removeOldTags=function(){this.$element.find("option[data-select2-tag]").each(function(){this.selected||n(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(n){function t(n,t,i){var r=i.get("tokenizer");void 0!==r&&(this.tokenizer=r);n.call(this,t,i)}return t.prototype.bind=function(n,t,i){n.call(this,t,i);this.$search=t.dropdown.$search||t.selection.$search||i.find(".select2-search__field")},t.prototype.query=function(t,i,r){var u=this,f;i.term=i.term||"";f=this.tokenizer(i,this.options,function(t){var i,r=u._normalizeItem(t);u.$element.find("option").filter(function(){return n(this).val()===r.id}).length||((i=u.option(r)).attr("data-select2-tag",!0),u._removeOldTags(),u.addOptions([i]));i=r;u.trigger("select",{data:i})});f.term!==i.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.trigger("focus")),i.term=f.term);t.call(this,i,r)},t.prototype.tokenizer=function(t,i,r,u){for(var o,s=r.get("tokenSeparators")||[],e=i.term,f=0,h=this.createTag||function(n){return{id:n.term,text:n.term}};f<e.length;)o=e[f],-1!==s.indexOf(o)?(o=e.substr(0,f),null!=(o=h(n.extend({},i,{term:o})))?(u(o),e=e.substr(f+1)||"",f=0):f++):f++;return{term:e}},t}),t.define("select2/data/minimumInputLength",[],function(){function n(n,t,i){this.minimumInputLength=i.get("minimumInputLength");n.call(this,t,i)}return n.prototype.query=function(n,t,i){t.term=t.term||"";t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):n.call(this,t,i)},n}),t.define("select2/data/maximumInputLength",[],function(){function n(n,t,i){this.maximumInputLength=i.get("maximumInputLength");n.call(this,t,i)}return n.prototype.query=function(n,t,i){t.term=t.term||"";0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):n.call(this,t,i)},n}),t.define("select2/data/maximumSelectionLength",[],function(){function n(n,t,i){this.maximumSelectionLength=i.get("maximumSelectionLength");n.call(this,t,i)}return n.prototype.bind=function(n,t,i){var r=this;n.call(this,t,i);t.on("select",function(){r._checkIfMaximumSelected()})},n.prototype.query=function(n,t,i){var r=this;this._checkIfMaximumSelected(function(){n.call(r,t,i)})},n.prototype._checkIfMaximumSelected=function(n,t){var i=this;this.current(function(n){n=null!=n?n.length:0;0<i.maximumSelectionLength&&n>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):t&&t()})},n}),t.define("select2/dropdown",["jquery","./utils"],function(n,t){function i(n,t){this.$element=n;this.options=t;i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=n('<span class="select2-dropdown"><span class="select2-results"><\/span><\/span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},i.prototype.bind=function(){},i.prototype.position=function(){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),t.define("select2/dropdown/search",["jquery"],function(n){function t(){}return t.prototype.render=function(t){var i=t.call(this),r=this.options.get("translations").get("search"),t=n('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /><\/span>');return this.$searchContainer=t,this.$search=t.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",r()),i.prepend(t),i},t.prototype.bind=function(t,i,r){var u=this,f=i.id+"-results";t.call(this,i,r);this.$search.on("keydown",function(n){u.trigger("keypress",n);u._keyUpPrevented=n.isDefaultPrevented()});this.$search.on("input",function(){n(this).off("keyup")});this.$search.on("keyup input",function(n){u.handleSearch(n)});i.on("open",function(){u.$search.attr("tabindex",0);u.$search.attr("aria-controls",f);u.$search.trigger("focus");window.setTimeout(function(){u.$search.trigger("focus")},0)});i.on("close",function(){u.$search.attr("tabindex",-1);u.$search.removeAttr("aria-controls");u.$search.removeAttr("aria-activedescendant");u.$search.val("");u.$search.trigger("blur")});i.on("focus",function(){i.isOpen()||u.$search.trigger("focus")});i.on("results:all",function(n){null!=n.query.term&&""!==n.query.term||(u.showSearch(n)?u.$searchContainer[0].classList.remove("select2-search--hide"):u.$searchContainer[0].classList.add("select2-search--hide"))});i.on("results:focus",function(n){n.data._resultId?u.$search.attr("aria-activedescendant",n.data._resultId):u.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(){var n;this._keyUpPrevented||(n=this.$search.val(),this.trigger("query",{term:n}));this._keyUpPrevented=!1},t.prototype.showSearch=function(){return!0},t}),t.define("select2/dropdown/hidePlaceholder",[],function(){function n(n,t,i,r){this.placeholder=this.normalizePlaceholder(i.get("placeholder"));n.call(this,t,i,r)}return n.prototype.append=function(n,t){t.results=this.removePlaceholder(t.results);n.call(this,t)},n.prototype.normalizePlaceholder=function(n,t){return"string"==typeof t?{id:"",text:t}:t},n.prototype.removePlaceholder=function(n,t){for(var u,r=t.slice(0),i=t.length-1;0<=i;i--)u=t[i],this.placeholder.id===u.id&&r.splice(i,1);return r},n}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function t(n,t,i,r){this.lastParams={};n.call(this,t,i,r);this.$loadingMore=this.createLoadingMore();this.loading=!1}return t.prototype.append=function(n,t){this.$loadingMore.remove();this.loading=!1;n.call(this,t);this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(n,t,i){var r=this;n.call(this,t,i);t.on("query",function(n){r.lastParams=n;r.loading=!0});t.on("query:append",function(n){r.lastParams=n;r.loading=!0});this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&t&&(t=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore())},t.prototype.loadMore=function(){this.loading=!0;var t=n.extend({},{page:1},this.lastParams);t.page++;this.trigger("query:append",t)},t.prototype.showLoadingMore=function(n,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"><\/li>'),i=this.options.get("translations").get("loadingMore");return t.html(i(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(n,t){function i(t,i,r){this.$dropdownParent=n(r.get("dropdownParent")||document.body);t.call(this,i,r)}return i.prototype.bind=function(n,t,i){var r=this;n.call(this,t,i);t.on("open",function(){r._showDropdown();r._attachPositioningHandler(t);r._bindContainerResultHandlers(t)});t.on("close",function(){r._hideDropdown();r._detachPositioningHandler(t)});this.$dropdownContainer.on("mousedown",function(n){n.stopPropagation()})},i.prototype.destroy=function(n){n.call(this);this.$dropdownContainer.remove()},i.prototype.position=function(n,t,i){t.attr("class",i.attr("class"));t[0].classList.remove("select2");t[0].classList.add("select2-container--open");t.css({position:"absolute",top:-999999});this.$container=i},i.prototype.render=function(t){var i=n("<span><\/span>"),t=t.call(this);return i.append(t),this.$dropdownContainer=i},i.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},i.prototype._bindContainerResultHandlers=function(n,t){var i;this._containerResultsHandlersBound||(i=this,t.on("results:all",function(){i._positionDropdown();i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown();i._resizeDropdown()}),t.on("results:message",function(){i._positionDropdown();i._resizeDropdown()}),t.on("select",function(){i._positionDropdown();i._resizeDropdown()}),t.on("unselect",function(){i._positionDropdown();i._resizeDropdown()}),this._containerResultsHandlersBound=!0)},i.prototype._attachPositioningHandler=function(i,r){var u=this,f="scroll.select2."+r.id,e="resize.select2."+r.id,o="orientationchange.select2."+r.id,r=this.$container.parents().filter(t.hasScroll);r.each(function(){t.StoreData(this,"select2-scroll-position",{x:n(this).scrollLeft(),y:n(this).scrollTop()})});r.on(f,function(){var i=t.GetData(this,"select2-scroll-position");n(this).scrollTop(i.y)});n(window).on(f+" "+e+" "+o,function(){u._positionDropdown();u._resizeDropdown()})},i.prototype._detachPositioningHandler=function(i,r){var u="scroll.select2."+r.id,f="resize.select2."+r.id,r="orientationchange.select2."+r.id;this.$container.parents().filter(t.hasScroll).off(u);n(window).off(u+" "+f+" "+r)},i.prototype._positionDropdown=function(){var u=n(window),o=this.$dropdown[0].classList.contains("select2-dropdown--above"),c=this.$dropdown[0].classList.contains("select2-dropdown--below"),i=null,t=this.$container.offset(),f;t.bottom=t.top+this.$container.outerHeight(!1);f={height:this.$container.outerHeight(!1)};f.top=t.top;f.bottom=t.top+f.height;var s=this.$dropdown.outerHeight(!1),e=u.scrollTop(),r=u.scrollTop()+u.height(),h=e<t.top-s,u=r>t.bottom+s,e={left:t.left,top:f.bottom},r=this.$dropdownParent;"static"===r.css("position")&&(r=r.offsetParent());t={top:0,left:0};(n.contains(document.body,r[0])||r[0].isConnected)&&(t=r.offset());e.top-=t.top;e.left-=t.left;o||c||(i="below");u||!h||o?!h&&u&&o&&(i="below"):i="above";("above"==i||o&&"below"!==i)&&(e.top=f.top-t.top-s);null!=i&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+i),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+i));this.$dropdownContainer.css(e)},i.prototype._resizeDropdown=function(){var n={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(n.minWidth=n.width,n.position="relative",n.width="auto");this.$dropdown.css(n)},i.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()},i}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function n(n,t,i,r){this.minimumResultsForSearch=i.get("minimumResultsForSearch");this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0);n.call(this,t,i,r)}return n.prototype.showSearch=function(n,t){return!(function n(t){for(var u,i=0,r=0;r<t.length;r++)u=t[r],u.children?i+=n(u.children):i++;return i}(t.data.results)<this.minimumResultsForSearch)&&n.call(this,t)},n}),t.define("select2/dropdown/selectOnClose",["../utils"],function(n){function t(){}return t.prototype.bind=function(n,t,i){var r=this;n.call(this,t,i);t.on("close",function(n){r._handleSelectOnClose(n)})},t.prototype._handleSelectOnClose=function(t,i){if(i&&null!=i.originalSelect2Event){var r=i.originalSelect2Event;if("select"===r._type||"unselect"===r._type)return}r=this.getHighlightedResults();r.length<1||null!=(r=n.GetData(r[0],"data")).element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function n(){}return n.prototype.bind=function(n,t,i){var r=this;n.call(this,t,i);t.on("select",function(n){r._selectTriggered(n)});t.on("unselect",function(n){r._selectTriggered(n)})},n.prototype._selectTriggered=function(n,t){var i=t.originalEvent;i&&(i.ctrlKey||i.metaKey)||this.trigger("close",{originalEvent:i,originalSelect2Event:t})},n}),t.define("select2/dropdown/dropdownCss",["../utils"],function(n){function t(){}return t.prototype.render=function(t){var i=t.call(this),t=this.options.get("dropdownCssClass")||"";return-1!==t.indexOf(":all:")&&(t=t.replace(":all:",""),n.copyNonInternalCssClasses(i[0],this.$element[0])),i.addClass(t),i},t}),t.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(n){function t(){}return t.prototype.highlightFirstItem=function(t){var i=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)"),r;if(0<i.length&&(r=i.first(),i=n.GetData(r[0],"data").element,i&&i.getAttribute&&"true"===i.getAttribute("data-select2-tag")))return void r.trigger("mouseenter");t.call(this)},t}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(n){var t=n.input.length-n.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(n){return"Please enter "+(n.minimum-n.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(n){var t="You can only select "+n.maximum+" item";return 1!=n.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),t.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st){function ht(){this.reset()}return ht.prototype.apply=function(c){var lt,l,ht,ct;for(null==(c=n.extend(!0,{},this.defaults,c)).dataAdapter&&(c.dataAdapter=null!=c.ajax?y:null!=c.data?v:a,0<c.minimumInputLength&&(c.dataAdapter=h.Decorate(c.dataAdapter,b)),0<c.maximumInputLength&&(c.dataAdapter=h.Decorate(c.dataAdapter,k)),0<c.maximumSelectionLength&&(c.dataAdapter=h.Decorate(c.dataAdapter,d)),c.tags&&(c.dataAdapter=h.Decorate(c.dataAdapter,p)),null==c.tokenSeparators&&null==c.tokenizer||(c.dataAdapter=h.Decorate(c.dataAdapter,w))),null==c.resultsAdapter&&(c.resultsAdapter=t,null!=c.ajax&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,it)),null!=c.placeholder&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,tt)),c.selectOnClose&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,ft)),c.tags&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,st))),null==c.dropdownAdapter&&(c.multiple?c.dropdownAdapter=g:(lt=h.Decorate(g,nt),c.dropdownAdapter=lt),0!==c.minimumResultsForSearch&&(c.dropdownAdapter=h.Decorate(c.dropdownAdapter,ut)),c.closeOnSelect&&(c.dropdownAdapter=h.Decorate(c.dropdownAdapter,et)),null!=c.dropdownCssClass&&(c.dropdownAdapter=h.Decorate(c.dropdownAdapter,ot)),c.dropdownAdapter=h.Decorate(c.dropdownAdapter,rt)),null==c.selectionAdapter&&(c.selectionAdapter=c.multiple?r:i,null!=c.placeholder&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,u)),c.allowClear&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,f)),c.multiple&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,e)),null!=c.selectionCssClass&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,o)),c.selectionAdapter=h.Decorate(c.selectionAdapter,s)),c.language=this._resolveLanguage(c.language),c.language.push("en"),l=[],ht=0;ht<c.language.length;ht++)ct=c.language[ht],-1===l.indexOf(ct)&&l.push(ct);return c.language=l,c.translations=this._processTranslations(c.language,c.debug),c},ht.prototype.reset=function(){function t(n){return n.replace(/[^\u0000-\u007E]/g,function(n){return l[n]||n})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:h.escapeMarkup,language:{},matcher:function i(r,u){var f,e,o,s;if(null==r.term||""===r.term.trim())return u;if(u.children&&0<u.children.length){for(f=n.extend(!0,{},u),e=u.children.length-1;0<=e;e--)null==i(r,u.children[e])&&f.children.splice(e,1);return 0<f.children.length?f:i(r,f)}return o=t(u.text).toUpperCase(),s=t(r.term).toUpperCase(),-1<o.indexOf(s)?u:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(n){return n},templateResult:function(n){return n.text},templateSelection:function(n){return n.text},theme:"default",width:"resolve"}},ht.prototype.applyFromElement=function(n,t){var i=n.language,r=this.defaults.language,u=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(u),this._resolveLanguage(i),this._resolveLanguage(r),this._resolveLanguage(t));return n.language=t,n},ht.prototype._resolveLanguage=function(t){if(!t)return[];if(n.isEmptyObject(t))return[];if(n.isPlainObject(t))return[t];for(var f,r=Array.isArray(t)?t:[t],u=[],i=0;i<r.length;i++)u.push(r[i]),"string"==typeof r[i]&&0<r[i].indexOf("-")&&(f=r[i].split("-")[0],u.push(f));return u},ht.prototype._processTranslations=function(t,i){for(var u,r,e=new c,f=0;f<t.length;f++){if(u=new c,r=t[f],"string"==typeof r)try{u=c.loadPath(r)}catch(t){try{r=this.defaults.amdLanguageBase+r;u=c.loadPath(r)}catch(t){i&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else u=n.isPlainObject(r)?new c(r):r;e.extend(u)}return e},ht.prototype.set=function(t,i){var r={};r[n.camelCase(t)]=i;r=h._convertData(r);n.extend(!0,this.defaults,r)},new ht}),t.define("select2/options",["jquery","./defaults","./utils"],function(n,t,i){function r(n,i){this.options=n;null!=i&&this.fromElement(i);null!=i&&(this.options=t.applyFromElement(this.options,i));this.options=t.apply(this.options)}return r.prototype.fromElement=function(t){function c(n,t){return t.toUpperCase()}var h=["select2"],e,s,u,f,r,o;for(null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.autocomplete&&t.prop("autocomplete")&&(this.options.autocomplete=t.prop("autocomplete")),null==this.options.dir&&(this.options.dir=t.prop("dir")?t.prop("dir"):t.closest("[dir]").prop("dir")?t.closest("[dir]").prop("dir"):"ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),i.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),i.StoreData(t[0],"data",i.GetData(t[0],"select2Tags")),i.StoreData(t[0],"tags",!0)),i.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",i.GetData(t[0],"ajaxUrl")),i.StoreData(t[0],"ajax-Url",i.GetData(t[0],"ajaxUrl"))),e={},s=0;s<t[0].attributes.length;s++)u=t[0].attributes[s].name,f="data-",u.substr(0,f.length)==f&&(u=u.substring(f.length),f=i.GetData(t[0],u),e[u.replace(/-([a-z])/g,c)]=f);n.fn.jquery&&"1."==n.fn.jquery.substr(0,2)&&t[0].dataset&&(e=n.extend(!0,{},t[0].dataset,e));o=n.extend(!0,{},i.GetData(t[0]),e);for(r in o=i._convertData(o))-1<h.indexOf(r)||(n.isPlainObject(this.options[r])?n.extend(this.options[r],o[r]):this.options[r]=o[r]);return this},r.prototype.get=function(n){return this.options[n]},r.prototype.set=function(n,t){this.options[n]=t},r}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(n,t,i,r){var u=function(n,r){var f,e;null!=i.GetData(n[0],"select2")&&i.GetData(n[0],"select2").destroy();this.$element=n;this.id=this._generateId(n);r=r||{};this.options=new t(r,n);u.__super__.constructor.call(this);f=n.attr("tabindex")||0;i.StoreData(n[0],"old-tabindex",f);n.attr("tabindex","-1");r=this.options.get("dataAdapter");this.dataAdapter=new r(n,this.options);f=this.render();this._placeContainer(f);r=this.options.get("selectionAdapter");this.selection=new r(n,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,f);r=this.options.get("dropdownAdapter");this.dropdown=new r(n,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,f);f=this.options.get("resultsAdapter");this.results=new f(n,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);e=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(n){e.trigger("selection:update",{data:n})});n[0].classList.add("select2-hidden-accessible");n.attr("aria-hidden","true");this._syncAttributes();i.StoreData(n[0],"select2",this);n.data("select2",this)};return i.Extend(u,i.Observable),u.prototype._generateId=function(n){return"select2-"+(null!=n.attr("id")?n.attr("id"):null!=n.attr("name")?n.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},u.prototype._placeContainer=function(n){n.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&n.css("width",t)},u.prototype._resolveWidth=function(n,t){var i,r;if("resolve"==t)return i=this._resolveWidth(n,"style"),null!=i?i:this._resolveWidth(n,"element");if("element"==t)return i=n.outerWidth(!1),i<=0?"auto":i+"px";if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(n[0]).width;if(n=n.attr("style"),"string"!=typeof n)return null;for(var f=n.split(";"),u=0,e=f.length;u<e;u+=1)if(r=f[u].replace(/\s/g,"").match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==r&&1<=r.length)return r[1];return null},u.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)},u.prototype._registerDomEvents=function(){var n=this;this.$element.on("change.select2",function(){n.dataAdapter.current(function(t){n.trigger("selection:update",{data:t})})});this.$element.on("focus.select2",function(t){n.trigger("focus",t)});this._syncA=i.bind(this._syncAttributes,this);this._syncS=i.bind(this._syncSubtree,this);this._observer=new window.MutationObserver(function(t){n._syncA();n._syncS(t)});this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},u.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(t,i){n.trigger(t,i)})},u.prototype._registerSelectionEvents=function(){var n=this,t=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()});this.selection.on("focus",function(t){n.focus(t)});this.selection.on("*",function(i,r){-1===t.indexOf(i)&&n.trigger(i,r)})},u.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(t,i){n.trigger(t,i)})},u.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(t,i){n.trigger(t,i)})},u.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")});this.on("close",function(){n.$container[0].classList.remove("select2-container--open")});this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")});this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")});this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")});this.on("query",function(t){n.isOpen()||n.trigger("open",{});this.dataAdapter.query(t,function(i){n.trigger("results:all",{data:i,query:t})})});this.on("query:append",function(t){this.dataAdapter.query(t,function(i){n.trigger("results:append",{data:i,query:t})})});this.on("keypress",function(t){var i=t.which;n.isOpen()?i===r.ESC||i===r.UP&&t.altKey?(n.close(t),t.preventDefault()):i===r.ENTER||i===r.TAB?(n.trigger("results:select",{}),t.preventDefault()):i===r.SPACE&&t.ctrlKey?(n.trigger("results:toggle",{}),t.preventDefault()):i===r.UP?(n.trigger("results:previous",{}),t.preventDefault()):i===r.DOWN&&(n.trigger("results:next",{}),t.preventDefault()):(i===r.ENTER||i===r.SPACE||i===r.DOWN&&t.altKey)&&(n.open(),t.preventDefault())})},u.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled"));this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},u.prototype._isChangeMutation=function(n){var i=this,t;if(n.addedNodes&&0<n.addedNodes.length){for(t=0;t<n.addedNodes.length;t++)if(n.addedNodes[t].selected)return!0}else{if(n.removedNodes&&0<n.removedNodes.length)return!0;if(Array.isArray(n))return n.some(function(n){return i._isChangeMutation(n)})}return!1},u.prototype._syncSubtree=function(n){var n=this._isChangeMutation(n),t=this;n&&this.dataAdapter.current(function(n){t.trigger("selection:update",{data:n})})},u.prototype.trigger=function(n,t){var r=u.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"},f;if((void 0===t&&(t={}),n in i)&&(f=i[n],i={prevented:!1,name:n,args:t},r.call(this,f,i),i.prevented))return void(t.prevented=!0);r.call(this,n,t)},u.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},u.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},u.prototype.close=function(n){this.isOpen()&&this.trigger("close",{originalEvent:n})},u.prototype.isEnabled=function(){return!this.isDisabled()},u.prototype.isDisabled=function(){return this.options.get("disabled")},u.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},u.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},u.prototype.focus=function(){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},u.prototype.enable=function(n){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.');n=!(n=null==n||0===n.length?[!0]:n)[0];this.$element.prop("disabled",n)},u.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var n=[];return this.dataAdapter.current(function(t){n=t}),n},u.prototype.val=function(n){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==n||0===n.length)return this.$element.val();n=n[0];Array.isArray(n)&&(n=n.map(function(n){return n.toString()}));this.$element.val(n).trigger("input").trigger("change")},u.prototype.destroy=function(){i.RemoveData(this.$container[0]);this.$container.remove();this._observer.disconnect();this._observer=null;this._syncA=null;this._syncS=null;this.$element.off(".select2");this.$element.attr("tabindex",i.GetData(this.$element[0],"old-tabindex"));this.$element[0].classList.remove("select2-hidden-accessible");this.$element.attr("aria-hidden","false");i.RemoveData(this.$element[0]);this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null},u.prototype.render=function(){var t=n('<span class="select2 select2-container"><span class="selection"><\/span><span class="dropdown-wrapper" aria-hidden="true"><\/span><\/span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),i.StoreData(t[0],"element",this.$element),t},u}),t.define("jquery-mousewheel",["jquery"],function(n){return n}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(n,t,i,r,u){var f;return null==n.fn.select2&&(f=["open","close","destroy"],n.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var r=n.extend(!0,{},t);new i(n(this),r)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var r,e=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=u.GetData(this,"select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2.");r=n[t].apply(n,e)}),-1<f.indexOf(t)?this:r}),null==n.fn.select2.defaults&&(n.fn.select2.defaults=r),i}),{define:t.define,require:t.require}),t=l.require("jquery.select2");return n.fn.select2.amd=l,t}),function(n){function nt(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function dt(n,t){return function(i){return u(n.call(this,i),t)}}function tr(n,t){return function(i){return this.lang().ordinal(n.call(this,i),t)}}function gt(){}function tt(n){fi(n);s(this,n)}function it(n){var t=ti(n),i=t.year||0,r=t.month||0,u=t.week||0,f=t.day||0,e=t.hour||0,o=t.minute||0,s=t.second||0,h=t.millisecond||0;this._milliseconds=+h+1e3*s+6e4*o+36e5*e;this._days=+f+7*u;this._months=+r+12*i;this._data={};this._bubble()}function s(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return t.hasOwnProperty("toString")&&(n.toString=t.toString),t.hasOwnProperty("valueOf")&&(n.valueOf=t.valueOf),n}function ir(n){var t,i={};for(t in n)n.hasOwnProperty(t)&&tu.hasOwnProperty(t)&&(i[t]=n[t]);return i}function a(n){return 0>n?Math.ceil(n):Math.floor(n)}function u(n,t,i){for(var r=""+Math.abs(n),u=n>=0;r.length<t;)r="0"+r;return(u?i?"+":"":"-")+r}function rt(n,i,r,u){var s,h,o=i._milliseconds,f=i._days,e=i._months;o&&n._d.setTime(+n._d+o*r);(f||e)&&(s=n.minute(),h=n.hour());f&&n.date(n.date()+f*r);e&&n.month(n.month()+e*r);o&&!u&&t.updateOffset(n);(f||e)&&(n.minute(s),n.hour(h))}function ut(n){return"[object Array]"===Object.prototype.toString.call(n)}function rr(n){return"[object Date]"===Object.prototype.toString.call(n)||n instanceof Date}function ni(n,t,r){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),f=0,u=0;e>u;u++)(r&&n[u]!==t[u]||!r&&i(n[u])!==i(t[u]))&&f++;return f+o}function h(n){if(n){var t=n.toLowerCase().replace(/(.)s$/,"$1");n=ku[n]||du[t]||t}return n}function ti(n){var i,t,r={};for(t in n)n.hasOwnProperty(t)&&(i=h(t),i&&(r[i]=n[t]));return r}function ur(i){var r,u;if(0===i.indexOf("week"))r=7,u="day";else{if(0!==i.indexOf("month"))return;r=12;u="month"}t[i]=function(f,e){var o,s,c=t.fn._lang[i],h=[];if("number"==typeof f&&(e=f,f=n),s=function(n){var i=t().utc().set(u,n);return c.call(t.fn._lang,i,f||"")},null!=e)return s(e);for(o=0;r>o;o++)h.push(s(o));return h}}function i(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function ii(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function ri(n){return ui(n)?366:365}function ui(n){return n%4==0&&n%100!=0||n%400==0}function fi(n){var t;n._a&&-2===n._pf.overflow&&(t=n._a[v]<0||n._a[v]>11?v:n._a[c]<1||n._a[c]>ii(n._a[e],n._a[v])?c:n._a[o]<0||n._a[o]>23?o:n._a[w]<0||n._a[w]>59?w:n._a[b]<0||n._a[b]>59?b:n._a[k]<0||n._a[k]>999?k:-1,n._pf._overflowDayOfYear&&(e>t||t>c)&&(t=c),n._pf.overflow=t)}function ei(n){return null==n._isValid&&(n._isValid=!isNaN(n._d.getTime())&&n._pf.overflow<0&&!n._pf.empty&&!n._pf.invalidMonth&&!n._pf.nullInput&&!n._pf.invalidFormat&&!n._pf.userInvalidated,n._strict&&(n._isValid=n._isValid&&0===n._pf.charsLeftOver&&0===n._pf.unusedTokens.length)),n._isValid}function ft(n){return n?n.toLowerCase().replace("_","-"):n}function et(n,i){return i._isUTC?t(n).zone(i._offset||0):t(n).local()}function fr(n,t){return t.abbr=n,y[n]||(y[n]=new gt),y[n].set(t),y[n]}function er(n){delete y[n]}function f(n){var r,u,i,f,e=0,o=function(n){if(!y[n]&&yi)try{require("./lang/"+n)}catch(t){}return y[n]};if(!n)return t.fn._lang;if(!ut(n)){if(u=o(n))return u;n=[n]}for(;e<n.length;){for(f=ft(n[e]).split("-"),r=f.length,i=ft(n[e+1]),i=i?i.split("-"):null;r>0;){if(u=o(f.slice(0,r).join("-")))return u;if(i&&i.length>=r&&ni(f,i,!0)>=r-1)break;r--}e++}return t.fn._lang}function or(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function sr(n){for(var i=n.match(pi),t=0,r=i.length;r>t;t++)i[t]=l[i[t]]?l[i[t]]:or(i[t]);return function(u){var f="";for(t=0;r>t;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function ot(n,t){return n.isValid()?(t=oi(t,n.lang()),kt[t]||(kt[t]=sr(t)),kt[t](n)):n.lang().invalidDate()}function oi(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(g.lastIndex=0;i>=0&&g.test(n);)n=n.replace(g,r),g.lastIndex=0,i-=1;return n}function hr(n,t){var i=t._strict;switch(n){case"DDDD":return ki;case"YYYY":case"GGGG":case"gggg":return i?vu:eu;case"Y":case"G":case"g":return pu;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?yu:ou;case"S":if(i)return au;case"SS":if(i)return bi;case"SSS":if(i)return ki;case"DDD":return fu;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return hu;case"a":case"A":return f(t._l)._meridiemParse;case"X":return lu;case"Z":case"ZZ":return vt;case"T":return cu;case"SSSS":return su;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?bi:wi;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return wi;default:return new RegExp(yr(vr(n.replace("\\","")),"i"))}}function si(n){n=n||"";var r=n.match(vt)||[],f=r[r.length-1]||[],t=(f+"").match(bu)||["-",0,0],u=+(60*t[1])+i(t[2]);return"+"===t[0]?-u:u}function cr(n,t,r){var s,u=r._a;switch(n){case"M":case"MM":null!=t&&(u[v]=i(t)-1);break;case"MMM":case"MMMM":s=f(r._l).monthsParse(t);null!=s?u[v]=s:r._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(u[c]=i(t));break;case"DDD":case"DDDD":null!=t&&(r._dayOfYear=i(t));break;case"YY":u[e]=i(t)+(i(t)>68?1900:2e3);break;case"YYYY":case"YYYYY":case"YYYYYY":u[e]=i(t);break;case"a":case"A":r._isPm=f(r._l).isPM(t);break;case"H":case"HH":case"h":case"hh":u[o]=i(t);break;case"m":case"mm":u[w]=i(t);break;case"s":case"ss":u[b]=i(t);break;case"S":case"SS":case"SSS":case"SSSS":u[k]=i(1e3*("0."+t));break;case"X":r._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":r._useUTC=!0;r._tzm=si(t);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":n=n.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":n=n.substr(0,2);t&&(r._w=r._w||{},r._w[n]=t)}}function st(n){var r,a,y,p,b,u,l,s,k,d,h=[];if(!n._d){for(y=ar(n),n._w&&null==n._a[c]&&null==n._a[v]&&(b=function(i){var r=parseInt(i,10);return i?i.length<3?r>68?1900+r:2e3+r:r:null==n._a[e]?t().weekYear():n._a[e]},u=n._w,null!=u.GG||null!=u.W||null!=u.E?l=ci(b(u.GG),u.W||1,u.E,4,1):(s=f(n._l),k=null!=u.d?hi(u.d,s):null!=u.e?parseInt(u.e,10)+s._week.dow:0,d=parseInt(u.w,10)||1,null!=u.d&&k<s._week.dow&&d++,l=ci(b(u.gg),d,k,s._week.doy,s._week.dow)),n._a[e]=l.year,n._dayOfYear=l.dayOfYear),n._dayOfYear&&(p=null==n._a[e]?y[e]:n._a[e],n._dayOfYear>ri(p)&&(n._pf._overflowDayOfYear=!0),a=ct(p,0,n._dayOfYear),n._a[v]=a.getUTCMonth(),n._a[c]=a.getUTCDate()),r=0;3>r&&null==n._a[r];++r)n._a[r]=h[r]=y[r];for(;7>r;r++)n._a[r]=h[r]=null==n._a[r]?2===r?1:0:n._a[r];h[o]+=i((n._tzm||0)/60);h[w]+=i((n._tzm||0)%60);n._d=(n._useUTC?ct:kr).apply(null,h)}}function lr(n){var t;n._d||(t=ti(n._i),n._a=[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond],st(n))}function ar(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ht(n){n._a=[];n._pf.empty=!0;for(var t,r,s,c=f(n._l),i=""+n._i,a=i.length,h=0,e=oi(n._f,c).match(pi)||[],u=0;u<e.length;u++)r=e[u],t=(i.match(hr(r,n))||[])[0],t&&(s=i.substr(0,i.indexOf(t)),s.length>0&&n._pf.unusedInput.push(s),i=i.slice(i.indexOf(t)+t.length),h+=t.length),l[r]?(t?n._pf.empty=!1:n._pf.unusedTokens.push(r),cr(r,t,n)):n._strict&&!t&&n._pf.unusedTokens.push(r);n._pf.charsLeftOver=a-h;i.length>0&&n._pf.unusedInput.push(i);n._isPm&&n._a[o]<12&&(n._a[o]+=12);n._isPm===!1&&12===n._a[o]&&(n._a[o]=0);st(n);fi(n)}function vr(n){return n.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u})}function yr(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function pr(n){var t,f,u,r,i;if(0===n._f.length)return n._pf.invalidFormat=!0,n._d=new Date(NaN),void 0;for(r=0;r<n._f.length;r++)i=0,t=s({},n),t._pf=nt(),t._f=n._f[r],ht(t),ei(t)&&(i+=t._pf.charsLeftOver,i+=10*t._pf.unusedTokens.length,t._pf.score=i,(null==u||u>i)&&(u=i,f=t));s(n,f||t)}function wr(n){var t,r,i=n._i,u=wu.exec(i);if(u){for(n._pf.iso=!0,t=0,r=yt.length;r>t;t++)if(yt[t][1].exec(i)){n._f=yt[t][0]+(u[6]||" ");break}for(t=0,r=pt.length;r>t;t++)if(pt[t][1].exec(i)){n._f+=pt[t][0];break}i.match(vt)&&(n._f+="Z");ht(n)}else n._d=new Date(i)}function br(t){var i=t._i,r=iu.exec(i);i===n?t._d=new Date:r?t._d=new Date(+r[1]):"string"==typeof i?wr(t):ut(i)?(t._a=i.slice(0),st(t)):rr(i)?t._d=new Date(+i):"object"==typeof i?lr(t):t._d=new Date(i)}function kr(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 1970>n&&o.setFullYear(n),o}function ct(n){var t=new Date(Date.UTC.apply(null,arguments));return 1970>n&&t.setUTCFullYear(n),t}function hi(n,t){if("string"==typeof n)if(isNaN(n)){if(n=t.weekdaysParse(n),"number"!=typeof n)return null}else n=parseInt(n,10);return n}function dr(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function gr(n,t,i){var o=p(Math.abs(n)/1e3),u=p(o/60),f=p(u/60),r=p(f/24),s=p(r/365),e=45>o&&["s",o]||1===u&&["m"]||45>u&&["mm",u]||1===f&&["h"]||22>f&&["hh",f]||1===r&&["d"]||25>=r&&["dd",r]||45>=r&&["M"]||345>r&&["MM",p(r/30)]||1===s&&["y"]||["yy",s];return e[2]=t,e[3]=n>0,e[4]=i,dr.apply({},e)}function d(n,i,r){var f,e=r-i,u=r-n.day();return u>e&&(u-=7),e-7>u&&(u+=7),f=t(n).add("d",u),{week:Math.ceil(f.dayOfYear()/7),year:f.year()}}function ci(n,t,i,r,u){var o,f,e=ct(n,0,1).getUTCDay();return i=null!=i?i:u,o=u-e+(e>r?7:0)-(u>e?7:0),f=7*(t-1)+(i-u)+o+1,{year:f>0?n:n-1,dayOfYear:f>0?f:ri(n-1)+f}}function li(n){var i=n._i,r=n._f;return null===i?t.invalid({nullInput:!0}):("string"==typeof i&&(n._i=i=f().preparse(i)),t.isMoment(i)?(n=ir(i),n._d=new Date(+i._d)):r?ut(r)?pr(n):ht(n):br(n),new tt(n))}function ai(n,i){t.fn[n]=t.fn[n+"s"]=function(n){var r=this._isUTC?"UTC":"";return null!=n?(this._d["set"+r+i](n),t.updateOffset(this),this):this._d["get"+r+i]()}}function nu(n){t.duration.fn[n]=function(){return this._data[n]}}function vi(n,i){t.duration.fn["as"+n]=function(){return+this/i}}function lt(n){var i=!1,r=t;"undefined"==typeof ender&&(n?(at.moment=function(){return!i&&console&&console.warn&&(i=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),r.apply(null,arguments)},s(at.moment,r)):at.moment=t)}for(var t,r,at=this,p=Math.round,e=0,v=1,c=2,o=3,w=4,b=5,k=6,y={},tu={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},yi="undefined"!=typeof module&&module.exports&&"undefined"!=typeof require,iu=/^\/?Date\((\-?\d+)/i,ru=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,uu=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,pi=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,g=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,wi=/\d\d?/,fu=/\d{1,3}/,eu=/\d{1,4}/,ou=/[+\-]?\d{1,6}/,su=/\d+/,hu=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,vt=/Z|[\+\-]\d\d:?\d\d/gi,cu=/T/i,lu=/[\+\-]?\d+(\.\d{1,3})?/,au=/\d/,bi=/\d\d/,ki=/\d{3}/,vu=/\d{4}/,yu=/[+-]?\d{6}/,pu=/[+-]?\d+/,wu=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],pt=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],bu=/([\+\-]|\d\d)/gi,wt="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),bt={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ku={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},du={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},kt={},di="DDD w W M D d".split(" "),gi="M D H h m s w W".split(" "),l={M:function(){return this.month()+1},MMM:function(n){return this.lang().monthsShort(this,n)},MMMM:function(n){return this.lang().months(this,n)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(n){return this.lang().weekdaysMin(this,n)},ddd:function(n){return this.lang().weekdaysShort(this,n)},dddd:function(n){return this.lang().weekdays(this,n)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},YYYYYY:function(){var n=this.year(),t=n>=0?"+":"-";return t+u(Math.abs(n),6)},gg:function(){return u(this.weekYear()%100,2)},gggg:function(){return u(this.weekYear(),4)},ggggg:function(){return u(this.weekYear(),5)},GG:function(){return u(this.isoWeekYear()%100,2)},GGGG:function(){return u(this.isoWeekYear(),4)},GGGGG:function(){return u(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return i(this.milliseconds()/100)},SS:function(){return u(i(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},SSSS:function(){return u(this.milliseconds(),3)},Z:function(){var n=-this.zone(),t="+";return 0>n&&(n=-n,t="-"),t+u(i(n/60),2)+":"+u(i(n)%60,2)},ZZ:function(){var n=-this.zone(),t="+";return 0>n&&(n=-n,t="-"),t+u(i(n/60),2)+u(i(n)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},nr=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];di.length;)r=di.pop(),l[r+"o"]=tr(l[r],r);for(;gi.length;)r=gi.pop(),l[r+r]=dt(l[r],2);for(l.DDDD=dt(l.DDD,3),s(gt.prototype,{set:function(n){var t,i;for(i in n)t=n[i],"function"==typeof t?this[i]=t:this["_"+i]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(n){return this._months[n.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(n){return this._monthsShort[n.month()]},monthsParse:function(n){var i,r,u;for(this._monthsParse||(this._monthsParse=[]),i=0;12>i;i++)if(this._monthsParse[i]||(r=t.utc([2e3,i]),u="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(u.replace(".",""),"i")),this._monthsParse[i].test(n))return i},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(n){return this._weekdays[n.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(n){return this._weekdaysShort[n.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(n){return this._weekdaysMin[n.day()]},weekdaysParse:function(n){var i,r,u;for(this._weekdaysParse||(this._weekdaysParse=[]),i=0;7>i;i++)if(this._weekdaysParse[i]||(r=t([2e3,1]).day(i),u="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(u.replace(".",""),"i")),this._weekdaysParse[i].test(n))return i},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(n){var t=this._longDateFormat[n];return!t&&this._longDateFormat[n.toUpperCase()]&&(t=this._longDateFormat[n.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n]=t),t},isPM:function(n){return"p"===(n+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(n,t){var i=this._calendar[n];return"function"==typeof i?i.apply(t):i},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(n,t,i,r){var u=this._relativeTime[i];return"function"==typeof u?u(n,t,i,r):u.replace(/%d/i,n)},pastFuture:function(n,t){var i=this._relativeTime[n>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)},ordinal:function(n){return this._ordinal.replace("%d",n)},_ordinal:"%d",preparse:function(n){return n},postformat:function(n){return n},week:function(n){return d(n,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),t=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._i=t,f._f=i,f._l=r,f._strict=u,f._isUTC=!1,f._pf=nt(),li(f)},t.utc=function(t,i,r,u){var f;return"boolean"==typeof r&&(u=r,r=n),f={},f._isAMomentObject=!0,f._useUTC=!0,f._isUTC=!0,f._l=r,f._i=t,f._f=i,f._strict=u,f._pf=nt(),li(f).utc()},t.unix=function(n){return t(1e3*n)},t.duration=function(n,r){var f,h,e,s=n,u=null;return t.isDuration(n)?s={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(s={},r?s[r]=n:s.milliseconds=n):(u=ru.exec(n))?(f="-"===u[1]?-1:1,s={y:0,d:i(u[c])*f,h:i(u[o])*f,m:i(u[w])*f,s:i(u[b])*f,ms:i(u[k])*f}):(u=uu.exec(n))&&(f="-"===u[1]?-1:1,e=function(n){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*f},s={y:e(u[2]),M:e(u[3]),d:e(u[4]),h:e(u[5]),m:e(u[6]),s:e(u[7]),w:e(u[8])}),h=new it(s),t.isDuration(n)&&n.hasOwnProperty("_lang")&&(h._lang=n._lang),h},t.version="2.5.1",t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.updateOffset=function(){},t.lang=function(n,i){var r;return n?(i?fr(ft(n),i):null===i?(er(n),n="en"):y[n]||f(n),r=t.duration.fn._lang=t.fn._lang=f(n),r._abbr):t.fn._lang._abbr},t.langData=function(n){return n&&n._lang&&n._lang._abbr&&(n=n._lang._abbr),f(n)},t.isMoment=function(n){return n instanceof tt||null!=n&&n.hasOwnProperty("_isAMomentObject")},t.isDuration=function(n){return n instanceof it},r=nr.length-1;r>=0;--r)ur(nr[r]);for(t.normalizeUnits=function(n){return h(n)},t.invalid=function(n){var i=t.utc(NaN);return null!=n?s(i._pf,n):i._pf.userInvalidated=!0,i},t.parseZone=function(n){return t(n).parseZone()},s(t.fn=tt.prototype,{clone:function(){return t(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var n=t(this).utc();return 0<n.year()&&n.year()<=9999?ot(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):ot(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var n=this;return[n.year(),n.month(),n.date(),n.hours(),n.minutes(),n.seconds(),n.milliseconds()]},isValid:function(){return ei(this)},isDSTShifted:function(){return this._a?this.isValid()&&ni(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray())>0:!1},parsingFlags:function(){return s({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(n){var i=ot(this,n||t.defaultFormat);return this.lang().postformat(i)},add:function(n,i){var r;return r="string"==typeof n?t.duration(+i,n):t.duration(n,i),rt(this,r,1),this},subtract:function(n,i){var r;return r="string"==typeof n?t.duration(+i,n):t.duration(n,i),rt(this,r,-1),this},diff:function(n,i,r){var u,e,f=et(n,this),o=6e4*(this.zone()-f.zone());return i=h(i),"year"===i||"month"===i?(u=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-t(this).startOf("month")-(f-t(f).startOf("month")))/u,e-=6e4*(this.zone()-t(this).startOf("month").zone()-(f.zone()-t(f).startOf("month").zone()))/u,"year"===i&&(e/=12)):(u=this-f,e="second"===i?u/1e3:"minute"===i?u/6e4:"hour"===i?u/36e5:"day"===i?(u-o)/864e5:"week"===i?(u-o)/6048e5:u),r?e:a(e)},from:function(n,i){return t.duration(this.diff(n)).lang(this.lang()._abbr).humanize(!i)},fromNow:function(n){return this.from(t(),n)},calendar:function(){var i=et(t(),this).startOf("day"),n=this.diff(i,"days",!0),r=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse";return this.format(this.lang().calendar(r,this))},isLeapYear:function(){return ui(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=hi(n,this.lang()),this.add({d:n-t})):t},month:function(n){var i,r=this._isUTC?"UTC":"";return null!=n?"string"==typeof n&&(n=this.lang().monthsParse(n),"number"!=typeof n)?this:(i=this.date(),this.date(1),this._d["set"+r+"Month"](n),this.date(Math.min(i,this.daysInMonth())),t.updateOffset(this),this):this._d["get"+r+"Month"]()},startOf:function(n){switch(n=h(n)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n?this.weekday(0):"isoWeek"===n&&this.isoWeekday(1),this},endOf:function(n){return n=h(n),this.startOf(n).add("isoWeek"===n?"week":n,1).subtract("ms",1)},isAfter:function(n,i){return i="undefined"!=typeof i?i:"millisecond",+this.clone().startOf(i)>+t(n).startOf(i)},isBefore:function(n,i){return i="undefined"!=typeof i?i:"millisecond",+this.clone().startOf(i)<+t(n).startOf(i)},isSame:function(n,t){return t=t||"ms",+this.clone().startOf(t)==+et(n,this).startOf(t)},min:function(n){return n=t.apply(null,arguments),this>n?this:n},max:function(n){return n=t.apply(null,arguments),n>this?this:n},zone:function(n){var i=this._offset||0;return null==n?this._isUTC?i:this._d.getTimezoneOffset():("string"==typeof n&&(n=si(n)),Math.abs(n)<16&&(n=60*n),this._offset=n,this._isUTC=!0,i!==n&&rt(this,t.duration(i-n,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(n){return n=n?t(n).zone():0,(this.zone()-n)%60==0},daysInMonth:function(){return ii(this.year(),this.month())},dayOfYear:function(n){var i=p((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return null==n?i:this.add("d",n-i)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(n){var t=d(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==n?t:this.add("y",n-t)},isoWeekYear:function(n){var t=d(this,1,4).year;return null==n?t:this.add("y",n-t)},week:function(n){var t=this.lang().week(this);return null==n?t:this.add("d",7*(n-t))},isoWeek:function(n){var t=d(this,1,4).week;return null==n?t:this.add("d",7*(n-t))},weekday:function(n){var t=(this.day()+7-this.lang()._week.dow)%7;return null==n?t:this.add("d",n-t)},isoWeekday:function(n){return null==n?this.day()||7:this.day(this.day()%7?n:n-7)},get:function(n){return n=h(n),this[n]()},set:function(n,t){return n=h(n),"function"==typeof this[n]&&this[n](t),this},lang:function(t){return t===n?this._lang:(this._lang=f(t),this)}}),r=0;r<wt.length;r++)ai(wt[r].toLowerCase().replace(/s$/,""),wt[r]);ai("year","FullYear");t.fn.days=t.fn.day;t.fn.months=t.fn.month;t.fn.weeks=t.fn.week;t.fn.isoWeeks=t.fn.isoWeek;t.fn.toJSON=t.fn.toISOString;s(t.duration.fn=it.prototype,{_bubble:function(){var t,i,r,e,o=this._milliseconds,u=this._days,f=this._months,n=this._data;n.milliseconds=o%1e3;t=a(o/1e3);n.seconds=t%60;i=a(t/60);n.minutes=i%60;r=a(i/60);n.hours=r%24;u+=a(r/24);n.days=u%30;f+=a(u/30);n.months=f%12;e=a(f/12);n.years=e},weeks:function(){return a(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*i(this._months/12)},humanize:function(n){var i=+this,t=gr(i,!n,this.lang());return n&&(t=this.lang().pastFuture(i,t)),this.lang().postformat(t)},add:function(n,i){var r=t.duration(n,i);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(n,i){var r=t.duration(n,i);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(n){return n=h(n),this[n.toLowerCase()+"s"]()},as:function(n){return n=h(n),this["as"+n.charAt(0).toUpperCase()+n.slice(1)+"s"]()},lang:t.fn.lang,toIsoString:function(){var r=Math.abs(this.years()),u=Math.abs(this.months()),f=Math.abs(this.days()),n=Math.abs(this.hours()),t=Math.abs(this.minutes()),i=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(r?r+"Y":"")+(u?u+"M":"")+(f?f+"D":"")+(n||t||i?"T":"")+(n?n+"H":"")+(t?t+"M":"")+(i?i+"S":""):"P0D"}});for(r in bt)bt.hasOwnProperty(r)&&(vi(r,bt[r]),nu(r.toLowerCase()));vi("Weeks",6048e5);t.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()};t.lang("en",{ordinal:function(n){var t=n%10,r=1===i(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+r}});yi?(module.exports=t,lt(!0)):"function"==typeof define&&define.amd?define("moment",function(i,r,u){return u.config&&u.config()&&u.config().noGlobal!==!0&&lt(u.config().noGlobal===n),t}):lt()}.call(this),function(n,t){"use strict";var i;if(typeof exports=="object"){try{i=require("moment")}catch(r){}module.exports=t(i)}else typeof define=="function"&&define.amd?define(function(n){try{i=n("moment")}catch(r){}return t(i)}):n.Pikaday=t(n.moment)}(this,function(n){"use strict";var o=typeof n=="function",l=!!window.addEventListener,t=window.document,a=window.setTimeout,u=function(n,t,i,r){l?n.addEventListener(t,i,!!r):n.attachEvent("on"+t,i)},e=function(n,t,i,r){l?n.removeEventListener(t,i,!!r):n.detachEvent("on"+t,i)},y=function(n,i,r){var u;t.createEvent?(u=t.createEvent("HTMLEvents"),u.initEvent(i,!0,!1),u=s(u,r),n.dispatchEvent(u)):t.createEventObject&&(u=t.createEventObject(),u=s(u,r),n.fireEvent("on"+i,u))},d=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},i=function(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")!==-1},g=function(n,t){i(n,t)||(n.className=n.className===""?t:n.className+" "+t)},nt=function(n,t){n.className=d((" "+n.className+" ").replace(" "+t+" "," "))},v=function(n){return/Array/.test(Object.prototype.toString.call(n))},r=function(n){return/Date/.test(Object.prototype.toString.call(n))&&!isNaN(n.getTime())},tt=function(n){var t=n.getDay();return t===0||t===6},it=function(n){return n%4==0&&n%100!=0||n%400==0},p=function(n,t){return[31,it(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(n){r(n)&&n.setHours(0,0,0,0)},c=function(n,t){return n.getTime()===t.getTime()},s=function(n,t,i){var u,f;for(u in t)f=n[u]!==undefined,f&&typeof t[u]=="object"&&t[u]!==null&&t[u].nodeName===undefined?r(t[u])?i&&(n[u]=new Date(t[u].getTime())):v(t[u])?i&&(n[u]=t[u].slice(0)):n[u]=s({},t[u],i):(i||!f)&&(n[u]=t[u]);return n},w=function(n){return n.month<0&&(n.year-=Math.ceil(Math.abs(n.month)/12),n.month+=12),n.month>11&&(n.year+=Math.floor(Math.abs(n.month)/12),n.month-=12),n},f={field:null,bound:undefined,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:undefined,maxMonth:undefined,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:undefined,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},b=function(n,t,i){for(t+=n.firstDay;t>=7;)t-=7;return i?n.i18n.weekdaysShort[t]:n.i18n.weekdays[t]},rt=function(n){var t=[],i="false";if(n.isEmpty)if(n.showDaysInNextAndPreviousMonths)t.push("is-outside-current-month");else return'<td class="is-empty"><\/td>';return n.isDisabled&&t.push("is-disabled"),n.isToday&&t.push("is-today"),n.isSelected&&(t.push("is-selected"),i="true"),n.isInRange&&t.push("is-inrange"),n.isStartRange&&t.push("is-startrange"),n.isEndRange&&t.push("is-endrange"),'<td data-day="'+n.day+'" class="'+t.join(" ")+'" aria-selected="'+i+'"><button class="pika-button pika-day" type="button" data-pika-year="'+n.year+'" data-pika-month="'+n.month+'" data-pika-day="'+n.day+'">'+n.day+"<\/button><\/td>"},ut=function(n,t,i){var r=new Date(i,0,1),u=Math.ceil(((new Date(i,t,n)-r)/864e5+r.getDay()+1)/7);return'<td class="pika-week">'+u+"<\/td>"},ft=function(n,t){return"<tr>"+(t?n.reverse():n).join("")+"<\/tr>"},et=function(n){return"<tbody>"+n.join("")+"<\/tbody>"},ot=function(n){var t,i=[];for(n.showWeekNumber&&i.push("<th><\/th>"),t=0;t<7;t++)i.push('<th scope="col"><abbr title="'+b(n,t)+'">'+b(n,t,!0)+"<\/abbr><\/th>");return"<thead><tr>"+(n.isRTL?i.reverse():i).join("")+"<\/tr><\/thead>"},st=function(n,t,i,r,u,f){for(var c,e=n._o,y=i===e.minYear,p=i===e.maxYear,h='<div id="'+f+'" class="pika-title" role="heading" aria-live="assertive">',l,a,w=!0,b=!0,s=[],o=0;o<12;o++)s.push('<option value="'+(i===u?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(y&&o<e.minMonth||p&&o>e.maxMonth?'disabled="disabled"':"")+">"+e.i18n.months[o]+"<\/option>");for(l='<div class="pika-label">'+e.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+s.join("")+"<\/select><\/div>",v(e.yearRange)?(o=e.yearRange[0],c=e.yearRange[1]+1):(o=i-e.yearRange,c=1+i+e.yearRange),s=[];o<c&&o<=e.maxYear;o++)o>=e.minYear&&s.push('<option value="'+o+'"'+(o===i?' selected="selected"':"")+">"+o+"<\/option>");return a='<div class="pika-label">'+i+e.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+s.join("")+"<\/select><\/div>",h+=e.showMonthAfterYear?a+l:l+a,y&&(r===0||e.minMonth>=r)&&(w=!1),p&&(r===11||e.maxMonth<=r)&&(b=!1),t===0&&(h+='<button class="pika-prev'+(w?"":" is-disabled")+'" type="button">'+e.i18n.previousMonth+"<\/button>"),t===n._o.numberOfMonths-1&&(h+='<button class="pika-next'+(b?"":" is-disabled")+'" type="button">'+e.i18n.nextMonth+"<\/button>"),h+"<\/div>"},ht=function(n,t,i){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+i+'">'+ot(n)+et(t)+"<\/table>"},k=function(f){var e=this,s=e.config(f),h;e._onMouseDown=function(n){if(e._v){n=n||window.event;var t=n.target||n.srcElement;if(t)if(i(t,"is-disabled")||(!i(t,"pika-button")||i(t,"is-empty")||i(t.parentNode,"is-disabled")?i(t,"pika-prev")?e.prevMonth():i(t,"pika-next")&&e.nextMonth():(e.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),s.bound&&a(function(){e.hide();s.field&&s.field.blur()},100))),i(t,"pika-select"))e._c=!0;else if(n.preventDefault)n.preventDefault();else return n.returnValue=!1,!1}};e._onChange=function(n){n=n||window.event;var t=n.target||n.srcElement;t&&(i(t,"pika-select-month")?e.gotoMonth(t.value):i(t,"pika-select-year")&&e.gotoYear(t.value))};e._onKeyChange=function(n){if(n=n||window.event,e.isVisible())switch(n.keyCode){case 13:case 27:s.field.blur();break;case 37:n.preventDefault();e.adjustDate("subtract",1);break;case 38:e.adjustDate("subtract",7);break;case 39:e.adjustDate("add",1);break;case 40:e.adjustDate("add",7)}};e._onInputChange=function(t){var i;t.firedBy!==e&&(o?(i=n(s.field.value,s.format,s.formatStrict),i=i&&i.isValid()?i.toDate():null):i=new Date(Date.parse(s.field.value)),r(i)&&e.setDate(i),e._v||e.show())};e._onInputFocus=function(){e.show()};e._onInputClick=function(){e.show()};e._onInputBlur=function(){var n=t.activeElement;do if(i(n,"pika-single"))return;while(n=n.parentNode);e._c||(e._b=a(function(){e.hide()},50));e._c=!1};e._onClick=function(n){n=n||window.event;var t=n.target||n.srcElement,r=t;if(t){!l&&i(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),u(t,"change",e._onChange)));do if(i(r,"pika-single")||r===s.trigger)return;while(r=r.parentNode);e._v&&t!==s.trigger&&r!==s.trigger&&e.hide()}};e.el=t.createElement("div");e.el.className="pika-single"+(s.isRTL?" is-rtl":"")+(s.theme?" "+s.theme:"");u(e.el,"mousedown",e._onMouseDown,!0);u(e.el,"touchend",e._onMouseDown,!0);u(e.el,"change",e._onChange);u(t,"keydown",e._onKeyChange);s.field&&(s.container?s.container.appendChild(e.el):s.bound?t.body.appendChild(e.el):s.field.parentNode.insertBefore(e.el,s.field.nextSibling),u(s.field,"change",e._onInputChange),s.defaultDate||(s.defaultDate=o&&s.field.value?n(s.field.value,s.format).toDate():new Date(Date.parse(s.field.value)),s.setDefaultDate=!0));h=s.defaultDate;r(h)?s.setDefaultDate?e.setDate(h,!0):e.gotoDate(h):e.gotoDate(new Date);s.bound?(this.hide(),e.el.className+=" is-bound",u(s.trigger,"click",e._onInputClick),u(s.trigger,"focus",e._onInputFocus),u(s.trigger,"blur",e._onInputBlur)):this.show()};return k.prototype={config:function(n){var t,i,u;return this._o||(this._o=s({},f,!0)),t=s(this._o,n,!0),t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme=typeof t.theme=="string"&&t.theme?t.theme:null,t.bound=!!(t.bound!==undefined?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn=typeof t.disableDayFn=="function"?t.disableDayFn:null,i=parseInt(t.numberOfMonths,10)||1,t.numberOfMonths=i>4?4:i,r(t.minDate)||(t.minDate=!1),r(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),v(t.yearRange)?(u=(new Date).getFullYear()-10,t.yearRange[0]=parseInt(t.yearRange[0],10)||u,t.yearRange[1]=parseInt(t.yearRange[1],10)||u):(t.yearRange=Math.abs(parseInt(t.yearRange,10))||f.yearRange,t.yearRange>100&&(t.yearRange=100)),t},toString:function(t){return r(this._d)?o?n(this._d).format(t||this._o.format):this._d.toDateString():""},getMoment:function(){return o?n(this._d):null},setMoment:function(t,i){o&&n.isMoment(t)&&this.setDate(t.toDate(),i)},getDate:function(){return r(this._d)?new Date(this._d.getTime()):new Date},setDate:function(n,t){if(!n)return this._d=null,this._o.field&&(this._o.field.value="",y(this._o.field,"change",{firedBy:this})),this.draw();if(typeof n=="string"&&(n=new Date(Date.parse(n))),r(n)){var i=this._o.minDate,u=this._o.maxDate;r(i)&&n<i?n=i:r(u)&&n>u&&(n=u);this._d=new Date(n.getTime());h(this._d);this.gotoDate(this._d);this._o.field&&(this._o.field.value=this.toString(),y(this._o.field,"change",{firedBy:this}));t||typeof this._o.onSelect!="function"||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(n){var i=!0;if(r(n)){if(this.calendars){var f=new Date(this.calendars[0].year,this.calendars[0].month,1),t=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),u=n.getTime();t.setMonth(t.getMonth()+1);t.setDate(t.getDate()-1);i=u<f.getTime()||t.getTime()<u}i&&(this.calendars=[{month:n.getMonth(),year:n.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths));this.adjustCalendars()}},adjustDate:function(t,i){var u=this.getDate(),f=parseInt(i)*864e5,r;t==="add"?r=new Date(u.valueOf()+f):t==="subtract"&&(r=new Date(u.valueOf()-f));o&&(t==="add"?r=n(u).add(i,"days").toDate():t==="subtract"&&(r=n(u).subtract(i,"days").toDate()));this.setDate(r)},adjustCalendars:function(){this.calendars[0]=w(this.calendars[0]);for(var n=1;n<this._o.numberOfMonths;n++)this.calendars[n]=w({month:this.calendars[0].month+n,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(n){isNaN(n)||(this.calendars[0].month=parseInt(n,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++;this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--;this.adjustCalendars()},gotoYear:function(n){isNaN(n)||(this.calendars[0].year=parseInt(n,10),this.adjustCalendars())},setMinDate:function(n){n instanceof Date?(h(n),this._o.minDate=n,this._o.minYear=n.getFullYear(),this._o.minMonth=n.getMonth()):(this._o.minDate=f.minDate,this._o.minYear=f.minYear,this._o.minMonth=f.minMonth,this._o.startRange=f.startRange);this.draw()},setMaxDate:function(n){n instanceof Date?(h(n),this._o.maxDate=n,this._o.maxYear=n.getFullYear(),this._o.maxMonth=n.getMonth()):(this._o.maxDate=f.maxDate,this._o.maxYear=f.maxYear,this._o.maxMonth=f.maxMonth,this._o.endRange=f.endRange);this.draw()},setStartRange:function(n){this._o.startRange=n},setEndRange:function(n){this._o.endRange=n},draw:function(n){var i;if(this._v||n){var t=this._o,e=t.minYear,o=t.maxYear,r=t.minMonth,u=t.maxMonth,s="",f;for(this._y<=e&&(this._y=e,!isNaN(r)&&this._m<r&&(this._m=r)),this._y>=o&&(this._y=o,!isNaN(u)&&this._m>u&&(this._m=u)),f="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),i=0;i<t.numberOfMonths;i++)s+='<div class="pika-lendar">'+st(this,i,this.calendars[i].year,this.calendars[i].month,this.calendars[0].year,f)+this.render(this.calendars[i].year,this.calendars[i].month,f)+"<\/div>";if(this.el.innerHTML=s,t.bound&&t.field.type!=="hidden"&&a(function(){t.trigger.focus()},1),typeof this._o.onDraw=="function")this._o.onDraw(this);this._o.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var n,i,f,e,s,h,c,r,u,o;if(!this._o.container){if(this.el.style.position="absolute",n=this._o.trigger,i=n,f=this.el.offsetWidth,e=this.el.offsetHeight,s=window.innerWidth||t.documentElement.clientWidth,h=window.innerHeight||t.documentElement.clientHeight,c=window.pageYOffset||t.body.scrollTop||t.documentElement.scrollTop,typeof n.getBoundingClientRect=="function")o=n.getBoundingClientRect(),r=o.left+window.pageXOffset,u=o.bottom+window.pageYOffset;else for(r=i.offsetLeft,u=i.offsetTop+i.offsetHeight;i=i.offsetParent;)r+=i.offsetLeft,u+=i.offsetTop;(this._o.reposition&&r+f>s||this._o.position.indexOf("right")>-1&&r-f+n.offsetWidth>0)&&(r=r-f+n.offsetWidth);(this._o.reposition&&u+e>h+c||this._o.position.indexOf("top")>-1&&u-e-n.offsetHeight>0)&&(u=u-e-n.offsetHeight);this.el.style.left=r+"px";this.el.style.top=u+"px"}},render:function(n,t,i){var u=this._o,d=new Date,a=p(n,t),f=new Date(n,t,1).getDay(),g=[],l=[],o,w,ot;h(d);u.firstDay>0&&(f-=u.firstDay,f<0&&(f+=7));for(var nt=t===0?11:t-1,st=t===11?0:t+1,it=t===0?n-1:n,ct=t===11?n+1:n,lt=p(it,nt),v=a+f,y=v;y>7;)y-=7;for(v+=7-y,o=0,w=0;o<v;o++){var e=new Date(n,t,1+(o-f)),at=r(this._d)?c(e,this._d):!1,vt=c(e,d),et=o<f||o>=a+f,s=1+(o-f),b=t,k=n,yt=u.startRange&&c(u.startRange,e),pt=u.endRange&&c(u.endRange,e),wt=u.startRange&&u.endRange&&u.startRange<e&&e<u.endRange,bt=u.minDate&&e<u.minDate||u.maxDate&&e>u.maxDate||u.disableWeekends&&tt(e)||u.disableDayFn&&u.disableDayFn(e);et&&(o<f?(s=lt+s,b=nt,k=it):(s=s-a,b=st,k=ct));ot={day:s,month:b,year:k,isSelected:at,isToday:vt,isDisabled:bt,isEmpty:et,isStartRange:yt,isEndRange:pt,isInRange:wt,showDaysInNextAndPreviousMonths:u.showDaysInNextAndPreviousMonths};l.push(rt(ot));++w==7&&(u.showWeekNumber&&l.unshift(ut(o-f,t,n)),g.push(ft(l,u.isRTL)),l=[],w=0)}return ht(u,g,i)},isVisible:function(){return this._v},show:function(){this.isVisible()||(nt(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(u(t,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var n=this._v;n!==!1&&(this._o.bound&&e(t,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",g(this.el,"is-hidden"),this._v=!1,n!==undefined&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){this.hide();e(this.el,"mousedown",this._onMouseDown,!0);e(this.el,"touchend",this._onMouseDown,!0);e(this.el,"change",this._onChange);this._o.field&&(e(this._o.field,"change",this._onInputChange),this._o.bound&&(e(this._o.trigger,"click",this._onInputClick),e(this._o.trigger,"focus",this._onInputFocus),e(this._o.trigger,"blur",this._onInputBlur)));this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).flatpickr=t()}(this,function(){"use strict";function tt(){for(var t,i,u=0,n=0,f=arguments.length;n<f;n++)u+=arguments[n].length;for(t=Array(u),i=0,n=0;n<f;n++)for(var e=arguments[n],r=0,o=e.length;r<o;r++,i++)t[i]=e[r];return t}function it(n,t){var i;return function(){var r=this,u=arguments;clearTimeout(i);i=setTimeout(function(){return n.apply(r,u)},t)}}function r(n,t,i){if(!0===i)return n.classList.add(t);n.classList.remove(t)}function n(n,t,i){var r=window.document.createElement(n);return t=t||"",i=i||"",r.className=t,void 0!==i&&(r.textContent=i),r}function v(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function rt(n,t){return t(n)?n:n.parentNode?rt(n.parentNode,t):void 0}function y(t,i){var u=n("div","numInputWrapper"),r=n("input","numInput "+t),e=n("span","arrowUp"),o=n("span","arrowDown"),f;if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==i)for(f in i)r.setAttribute(f,i[f]);return u.appendChild(r),u.appendChild(e),u.appendChild(o),u}function f(n){try{return"function"==typeof n.composedPath?n.composedPath()[0]:n.target}catch(t){return n.target}}function e(n,t,i){return void 0===i&&(i=!0),!1!==i?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}function nt(n){var t=n.defaultHour,i=n.defaultMinute,r=n.defaultSeconds,f,o;if(void 0!==n.minDate){var u=n.minDate.getHours(),e=n.minDate.getMinutes(),s=n.minDate.getSeconds();t<u&&(t=u);t===u&&i<e&&(i=e);t===u&&i===e&&r<s&&(r=n.minDate.getSeconds())}return void 0!==n.maxDate&&(f=n.maxDate.getHours(),o=n.maxDate.getMinutes(),(t=Math.min(t,f))===f&&(i=Math.min(o,i)),t===f&&i===o&&(r=n.maxDate.getSeconds())),{hours:t,minutes:i,seconds:r}}function ot(c,a){function yi(){var n;return(null===(n=k.calendarContainer)||void 0===n?void 0:n.getRootNode()).activeElement||document.activeElement}function pi(n){return n.bind(k)}function wi(){var n=k.config;!1===n.weekNumbers&&1===n.showMonths||!0!==n.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==k.calendarContainer&&(k.calendarContainer.style.visibility="hidden",k.calendarContainer.style.display="block"),void 0!==k.daysContainer){var t=(k.days.offsetWidth+1)*n.showMonths;k.daysContainer.style.width=t+"px";k.calendarContainer.style.width=t+(void 0!==k.weekWrapper?k.weekWrapper.offsetWidth:0)+"px";k.calendarContainer.style.removeProperty("visibility");k.calendarContainer.style.removeProperty("display")}})}function ct(n){var t,i,r;0===k.selectedDates.length&&(t=void 0===k.config.minDate||e(new Date,k.config.minDate)>=0?new Date:new Date(k.config.minDate.getTime()),i=nt(k.config),t.setHours(i.hours,i.minutes,i.seconds,t.getMilliseconds()),k.selectedDates=[t],k.latestSelectedDateObj=t);void 0!==n&&"blur"!==n.type&&function(n){var r,c;n.preventDefault();var v="keydown"===n.type,l=f(n),t=l;void 0!==k.amPM&&l===k.amPM&&(k.amPM.textContent=k.l10n.amPM[o(k.amPM.textContent===k.l10n.amPM[0])]);var a=parseFloat(t.getAttribute("min")),e=parseFloat(t.getAttribute("max")),s=parseFloat(t.getAttribute("step")),h=parseInt(t.value,10),y=n.delta||(v?38===n.which?1:-1:0),i=h+s*y;void 0!==t.value&&2===t.value.length&&(r=t===k.hourElement,c=t===k.minuteElement,i<a?(i=e+i+o(!r)+(o(r)&&o(!k.amPM)),c&&ei(void 0,-1,k.hourElement)):i>e&&(i=t===k.hourElement?i-e-o(!k.amPM):a,c&&ei(void 0,1,k.hourElement)),k.amPM&&r&&(1===s?i+h===23:Math.abs(i-h)>s)&&(k.amPM.textContent=k.l10n.amPM[o(k.amPM.textContent===k.l10n.amPM[0])]),t.value=u(i))}(n);r=k._input.value;pt();st();k._input.value!==r&&k._debouncedChange()}function pt(){var c,l,f,u,r;if(void 0!==k.hourElement&&void 0!==k.minuteElement){var s,h,n=(parseInt(k.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(k.minuteElement.value,10)||0)%60,i=void 0!==k.secondElement?(parseInt(k.secondElement.value,10)||0)%60:0;if(void 0!==k.amPM&&(s=n,h=k.amPM.textContent,n=s%12+12*o(h===k.l10n.amPM[1])),c=void 0!==k.config.minTime||k.config.minDate&&k.minDateHasTime&&k.latestSelectedDateObj&&0===e(k.latestSelectedDateObj,k.config.minDate,!0),l=void 0!==k.config.maxTime||k.config.maxDate&&k.maxDateHasTime&&k.latestSelectedDateObj&&0===e(k.latestSelectedDateObj,k.config.maxDate,!0),void 0!==k.config.maxTime&&void 0!==k.config.minTime&&k.config.minTime>k.config.maxTime){var a=g(k.config.minTime.getHours(),k.config.minTime.getMinutes(),k.config.minTime.getSeconds()),y=g(k.config.maxTime.getHours(),k.config.maxTime.getMinutes(),k.config.maxTime.getSeconds()),v=g(n,t,i);v>y&&v<a&&(f=function(n){var t=Math.floor(n/3600),i=(n-3600*t)/60;return[t,i,n-3600*t-60*i]}(a),n=f[0],t=f[1],i=f[2])}else l&&(u=void 0!==k.config.maxTime?k.config.maxTime:k.config.maxDate,(n=Math.min(n,u.getHours()))===u.getHours()&&(t=Math.min(t,u.getMinutes())),t===u.getMinutes()&&(i=Math.min(i,u.getSeconds()))),c&&(r=void 0!==k.config.minTime?k.config.minTime:k.config.minDate,(n=Math.max(n,r.getHours()))===r.getHours()&&t<r.getMinutes()&&(t=r.getMinutes()),t===r.getMinutes()&&(i=Math.max(i,r.getSeconds())));fi(n,t,i)}}function wt(n){var t=n||k.latestSelectedDateObj;t&&t instanceof Date&&fi(t.getHours(),t.getMinutes(),t.getSeconds())}function fi(n,t,i){void 0!==k.latestSelectedDateObj&&k.latestSelectedDateObj.setHours(n%24,t,i||0,0);k.hourElement&&k.minuteElement&&!k.isMobile&&(k.hourElement.value=u(k.config.time_24hr?n:(12+n)%12+12*o(n%12==0)),k.minuteElement.value=u(t),void 0!==k.amPM&&(k.amPM.textContent=k.l10n.amPM[o(n>=12)]),void 0!==k.secondElement&&(k.secondElement.value=u(i)))}function hr(n){var i=f(n),t=parseInt(i.value)+(n.delta||0);(t/1e3>1||"Enter"===n.key&&!/[^\d]/.test(t.toString()))&&ni(t)}function ft(n,t,i,r){return t instanceof Array?t.forEach(function(t){return ft(n,t,i,r)}):n instanceof Array?n.forEach(function(n){return ft(n,t,i,r)}):(n.addEventListener(t,i,r),void k._handlers.push({remove:function(){return n.removeEventListener(t,i,r)}}))}function bi(){ot("onChange")}function bt(n,t){var i=void 0!==n?k.parseDate(n):k.latestSelectedDateObj||(k.config.minDate&&k.config.minDate>k.now?k.config.minDate:k.config.maxDate&&k.config.maxDate<k.now?k.config.maxDate:k.now),r=k.currentYear,u=k.currentMonth;try{void 0!==i&&(k.currentYear=i.getFullYear(),k.currentMonth=i.getMonth())}catch(n){n.message="Invalid date supplied: "+i;k.config.errorHandler(n)}t&&k.currentYear!==r&&(ot("onYearChange"),lt());!t||k.currentYear===r&&k.currentMonth===u||ot("onMonthChange");k.redraw()}function cr(n){var t=f(n);~t.className.indexOf("arrow")&&ei(n,t.classList.contains("arrowUp")?1:-1)}function ei(n,t,i){var r=n&&f(n),u=i||r&&r.parentNode&&r.parentNode.firstChild,e=li("increment");e.delta=t;u&&u.dispatchEvent(e)}function kt(t,i,u,f){var s=ht(i,!0),o=n("span",t,i.getDate().toString());return o.dateObj=i,o.$i=f,o.setAttribute("aria-label",k.formatDate(i,k.config.ariaDateFormat)),-1===t.indexOf("hidden")&&0===e(i,k.now)&&(k.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),s?(o.tabIndex=-1,ai(i)&&(o.classList.add("selected"),k.selectedDateElem=o,"range"===k.config.mode&&(r(o,"startRange",k.selectedDates[0]&&0===e(i,k.selectedDates[0],!0)),r(o,"endRange",k.selectedDates[1]&&0===e(i,k.selectedDates[1],!0)),"nextMonthDay"===t&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===k.config.mode&&function(n){return!("range"!==k.config.mode||k.selectedDates.length<2)&&e(n,k.selectedDates[0])>=0&&e(n,k.selectedDates[1])<=0}(i)&&!ai(i)&&o.classList.add("inRange"),k.weekNumbers&&1===k.config.showMonths&&"prevMonthDay"!==t&&f%7==6&&k.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+k.config.getWeek(i)+"<\/span>"),ot("onDayCreate",o),o}function oi(n){n.focus();"range"===k.config.mode&&ii(n)}function dt(n){for(var t,f=n>0?0:k.config.showMonths-1,e=n>0?k.config.showMonths:-1,i=f;i!=e;i+=n)for(var r=k.daysContainer.children[i],o=n>0?0:r.children.length-1,s=n>0?r.children.length:-1,u=o;u!=s;u+=n)if(t=r.children[u],-1===t.className.indexOf("hidden")&&ht(t.dateObj))return t}function at(n,t){var r=yi(),u=ti(r||document.body),i=void 0!==n?n:u?r:void 0!==k.selectedDateElem&&ti(k.selectedDateElem)?k.selectedDateElem:void 0!==k.todayDateElem&&ti(k.todayDateElem)?k.todayDateElem:dt(t>0?1:-1);void 0===i?k._input.focus():u?function(n,t){for(var f,o=-1===n.className.indexOf("Month")?n.dateObj.getMonth():k.currentMonth,h=t>0?k.config.showMonths:-1,r=t>0?1:-1,u=o-k.currentMonth;u!=h;u+=r)for(var e=k.daysContainer.children[u],c=o-k.currentMonth===u?n.$i+t:t<0?e.children.length-1:0,s=e.children.length,i=c;i>=0&&i<s&&i!=(t>0?s:-1);i+=r)if(f=e.children[i],-1===f.className.indexOf("hidden")&&ht(f.dateObj)&&Math.abs(n.$i-i)>=Math.abs(t))return oi(f);k.changeMonth(r);at(dt(r),0)}(i,t):oi(i)}function lr(t,i){for(var e,s,h=(new Date(t,i,1).getDay()-k.l10n.firstDayOfWeek+7)%7,c=k.utils.getDaysInMonth((i- -11)%12,t),o=k.utils.getDaysInMonth(i,t),f=window.document.createDocumentFragment(),l=k.config.showMonths>1,a=l?"prevMonthDay hidden":"prevMonthDay",v=l?"nextMonthDay hidden":"nextMonthDay",r=c+1-h,u=0;r<=c;r++,u++)f.appendChild(kt("flatpickr-day "+a,new Date(t,i-1,r),0,u));for(r=1;r<=o;r++,u++)f.appendChild(kt("flatpickr-day",new Date(t,i,r),0,u));for(e=o+1;e<=42-h&&(1===k.config.showMonths||u%7!=0);e++,u++)f.appendChild(kt("flatpickr-day "+v,new Date(t,i+1,e%o),0,u));return s=n("div","dayContainer"),s.appendChild(f),s}function gt(){var i,n,t;if(void 0!==k.daysContainer){for(v(k.daysContainer),k.weekNumbers&&v(k.weekNumbers),i=document.createDocumentFragment(),n=0;n<k.config.showMonths;n++)t=new Date(k.currentYear,k.currentMonth,1),t.setMonth(k.currentMonth+n),i.appendChild(lr(t.getFullYear(),t.getMonth()));k.daysContainer.appendChild(i);k.days=k.daysContainer.firstChild;"range"===k.config.mode&&1===k.selectedDates.length&&ii()}}function lt(){var r,t,i;if(!(k.config.showMonths>1||"dropdown"!==k.config.monthSelectorType))for(r=function(n){return!(void 0!==k.config.minDate&&k.currentYear===k.config.minDate.getFullYear()&&n<k.config.minDate.getMonth())&&!(void 0!==k.config.maxDate&&k.currentYear===k.config.maxDate.getFullYear()&&n>k.config.maxDate.getMonth())},k.monthsDropdownContainer.tabIndex=-1,k.monthsDropdownContainer.innerHTML="",t=0;t<12;t++)r(t)&&(i=n("option","flatpickr-monthDropdown-month"),i.value=new Date(k.currentYear,t).getMonth().toString(),i.textContent=p(t,k.config.shorthandCurrentMonth,k.l10n),i.tabIndex=-1,k.currentMonth===t&&(i.selected=!0),k.monthsDropdownContainer.appendChild(i))}function ar(){var i,e=n("div","flatpickr-month"),o=window.document.createDocumentFragment(),u,t,r;return k.config.showMonths>1||"static"===k.config.monthSelectorType?i=n("span","cur-month"):(k.monthsDropdownContainer=n("select","flatpickr-monthDropdown-months"),k.monthsDropdownContainer.setAttribute("aria-label",k.l10n.monthAriaLabel),ft(k.monthsDropdownContainer,"change",function(n){var t=f(n),i=parseInt(t.value,10);k.changeMonth(i-k.currentMonth);ot("onMonthChange")}),lt(),i=k.monthsDropdownContainer),u=y("cur-year",{tabindex:"-1"}),t=u.getElementsByTagName("input")[0],t.setAttribute("aria-label",k.l10n.yearAriaLabel),k.config.minDate&&t.setAttribute("min",k.config.minDate.getFullYear().toString()),k.config.maxDate&&(t.setAttribute("max",k.config.maxDate.getFullYear().toString()),t.disabled=!!k.config.minDate&&k.config.minDate.getFullYear()===k.config.maxDate.getFullYear()),r=n("div","flatpickr-current-month"),r.appendChild(i),r.appendChild(u),o.appendChild(r),e.appendChild(o),{container:e,yearElement:t,monthElement:i}}function ki(){var t,n;for(v(k.monthNav),k.monthNav.appendChild(k.prevMonthNav),k.config.showMonths&&(k.yearElements=[],k.monthElements=[]),t=k.config.showMonths;t--;)n=ar(),k.yearElements.push(n.yearElement),k.monthElements.push(n.monthElement),k.monthNav.appendChild(n.container);k.monthNav.appendChild(k.nextMonthNav)}function di(){var t,i;for(k.weekdayContainer?v(k.weekdayContainer):k.weekdayContainer=n("div","flatpickr-weekdays"),t=k.config.showMonths;t--;)i=n("div","flatpickr-weekdaycontainer"),k.weekdayContainer.appendChild(i);return gi(),k.weekdayContainer}function gi(){var t,n,i;if(k.weekdayContainer)for(t=k.l10n.firstDayOfWeek,n=tt(k.l10n.weekdays.shorthand),t>0&&t<n.length&&(n=tt(n.splice(t,n.length),n.splice(0,t))),i=k.config.showMonths;i--;)k.weekdayContainer.children[i].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+n.join("<\/span><span class='flatpickr-weekday'>")+"\n      <\/span>\n      "}function si(n,t){void 0===t&&(t=!0);var i=t?n:n-k.currentMonth;i<0&&!0===k._hidePrevMonthArrow||i>0&&!0===k._hideNextMonthArrow||(k.currentMonth+=i,(k.currentMonth<0||k.currentMonth>11)&&(k.currentYear+=k.currentMonth>11?1:-1,k.currentMonth=(k.currentMonth+12)%12,ot("onYearChange"),lt()),gt(),ot("onMonthChange"),ui())}function vt(n){return k.calendarContainer.contains(n)}function hi(n){if(k.isOpen&&!k.config.inline){var t=f(n),i=vt(t),r=!(t===k.input||t===k.altInput||k.element.contains(t)||n.path&&n.path.indexOf&&(~n.path.indexOf(k.input)||~n.path.indexOf(k.altInput)))&&!i&&!vt(n.relatedTarget),u=!k.config.ignoredFocusElements.some(function(n){return n.contains(t)});r&&u&&(k.config.allowInput&&k.setDate(k._input.value,!1,k.config.altInput?k.config.altFormat:k.config.dateFormat),void 0!==k.timeContainer&&void 0!==k.minuteElement&&void 0!==k.hourElement&&""!==k.input.value&&void 0!==k.input.value&&ct(),k.close(),k.config&&"range"===k.config.mode&&1===k.selectedDates.length&&k.clear(!1))}}function ni(n){if(!(!n||k.config.minDate&&n<k.config.minDate.getFullYear()||k.config.maxDate&&n>k.config.maxDate.getFullYear())){var t=n,i=k.currentYear!==t;k.currentYear=t||k.currentYear;k.config.maxDate&&k.currentYear===k.config.maxDate.getFullYear()?k.currentMonth=Math.min(k.config.maxDate.getMonth(),k.currentMonth):k.config.minDate&&k.currentYear===k.config.minDate.getFullYear()&&(k.currentMonth=Math.max(k.config.minDate.getMonth(),k.currentMonth));i&&(k.redraw(),ot("onYearChange"),lt())}}function ht(n,t){var f,i,s;if(void 0===t&&(t=!0),i=k.parseDate(n,void 0,t),k.config.minDate&&i&&e(i,k.config.minDate,void 0!==t?t:!k.minDateHasTime)<0||k.config.maxDate&&i&&e(i,k.config.maxDate,void 0!==t?t:!k.maxDateHasTime)>0)return!1;if(!k.config.enable&&0===k.config.disable.length)return!0;if(void 0===i)return!1;for(var u=!!k.config.enable,h=null!==(f=k.config.enable)&&void 0!==f?f:k.config.disable,o=0,r=void 0;o<h.length;o++){if("function"==typeof(r=h[o])&&r(i)||r instanceof Date&&void 0!==i&&r.getTime()===i.getTime())return u;if("string"==typeof r)return s=k.parseDate(r,void 0,!0),s&&s.getTime()===i.getTime()?u:!u;if("object"==typeof r&&void 0!==i&&r.from&&r.to&&i.getTime()>=r.from.getTime()&&i.getTime()<=r.to.getTime())return u}return!u}function ti(n){return void 0!==k.daysContainer&&-1===n.className.indexOf("hidden")&&-1===n.className.indexOf("flatpickr-disabled")&&k.daysContainer.contains(n)}function vr(n){var t=n.target===k._input,i=k._input.value.trimEnd()!==vi();!t||!i||n.relatedTarget&&vt(n.relatedTarget)||k.setDate(k._input.value,!0,n.target===k.altInput?k.config.altFormat:k.config.dateFormat)}function nr(n){var t=f(n),i=k.config.wrap?c.contains(t):t===k._input,u=k.config.allowInput,v=k.isOpen&&(!u||!i),y=k.config.inline&&i&&!u,r,o,s,e,h,l,a;if(13===n.keyCode&&i){if(u)return k.setDate(k._input.value,!0,t===k.altInput?k.config.altFormat:k.config.dateFormat),k.close(),t.blur();k.open()}else if(vt(t)||v||y){r=!!k.timeContainer&&k.timeContainer.contains(t);switch(n.keyCode){case 13:r?(n.preventDefault(),ct(),ci()):fr(n);break;case 27:n.preventDefault();ci();break;case 8:case 46:i&&!k.config.allowInput&&(n.preventDefault(),k.clear());break;case 37:case 39:r||i?k.hourElement&&k.hourElement.focus():(n.preventDefault(),o=yi(),void 0!==k.daysContainer&&(!1===u||o&&ti(o))&&(s=39===n.keyCode?1:-1,n.ctrlKey?(n.stopPropagation(),si(s),at(dt(1),0)):at(void 0,s)));break;case 38:case 40:n.preventDefault();e=40===n.keyCode?1:-1;k.daysContainer&&void 0!==t.$i||t===k.input||t===k.altInput?n.ctrlKey?(n.stopPropagation(),ni(k.currentYear-e),at(dt(1),0)):r||at(void 0,7*e):t===k.currentYearElement?ni(k.currentYear-e):k.config.enableTime&&(!r&&k.hourElement&&k.hourElement.focus(),ct(n),k._debouncedChange());break;case 9:r?(h=[k.hourElement,k.minuteElement,k.secondElement,k.amPM].concat(k.pluginElements).filter(function(n){return n}),l=h.indexOf(t),-1!==l&&(a=h[l+(n.shiftKey?-1:1)],n.preventDefault(),(a||k._input).focus())):!k.config.noCalendar&&k.daysContainer&&k.daysContainer.contains(t)&&n.shiftKey&&(n.preventDefault(),k._input.focus())}}if(void 0!==k.amPM&&t===k.amPM)switch(n.key){case k.l10n.amPM[0].charAt(0):case k.l10n.amPM[0].charAt(0).toLowerCase():k.amPM.textContent=k.l10n.amPM[0];pt();st();break;case k.l10n.amPM[1].charAt(0):case k.l10n.amPM[1].charAt(0).toLowerCase():k.amPM.textContent=k.l10n.amPM[1];pt();st()}(i||vt(t))&&ot("onKeyDown",n)}function ii(n,t){if(void 0===t&&(t="flatpickr-day"),1===k.selectedDates.length&&(!n||n.classList.contains(t)&&!n.classList.contains("flatpickr-disabled"))){for(var f=n?n.dateObj.getTime():k.days.firstElementChild.dateObj.getTime(),r=k.parseDate(k.selectedDates[0],void 0,!0).getTime(),s=Math.min(f,k.selectedDates[0].getTime()),h=Math.max(f,k.selectedDates[0].getTime()),o=!1,e=0,u=0,i=s;i<h;i+=et)ht(new Date(i),!0)||(o=o||i>s&&i<h,i<r&&(!e||i>e)?e=i:i>r&&(!u||i<u)&&(u=i));Array.from(k.rContainer.querySelectorAll("*:nth-child(-n+"+k.config.showMonths+") > ."+t)).forEach(function(t){var c,s,h,i=t.dateObj.getTime(),l=e>0&&i<e||u>0&&i>u;if(l)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(n){t.classList.remove(n)});o&&!l||(["startRange","inRange","endRange","notAllowed"].forEach(function(n){t.classList.remove(n)}),void 0!==n&&(n.classList.add(f<=k.selectedDates[0].getTime()?"startRange":"endRange"),r<f&&i===r?t.classList.add("startRange"):r>f&&i===r&&t.classList.add("endRange"),i>=e&&(0===u||i<=u)&&(s=r,h=f,(c=i)>Math.min(s,h)&&c<Math.max(s,h))&&t.classList.add("inRange")))})}}function yr(){!k.isOpen||k.config.static||k.config.inline||ri()}function tr(n){return function(t){var i=k.config["_"+n+"Date"]=k.parseDate(t,k.config.dateFormat),r=k.config["_"+("min"===n?"max":"min")+"Date"];void 0!==i&&(k["min"===n?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0);k.selectedDates&&(k.selectedDates=k.selectedDates.filter(function(n){return ht(n)}),k.selectedDates.length||"min"!==n||wt(i),st());k.daysContainer&&(ur(),void 0!==i?k.currentYearElement[n]=i.getFullYear().toString():k.currentYearElement.removeAttribute(n),k.currentYearElement.disabled=!!r&&void 0!==i&&r.getFullYear()===i.getFullYear())}}function ir(){return k.config.wrap?c.querySelector("[data-input]"):c}function rr(){"object"!=typeof k.config.locale&&void 0===t.l10ns[k.config.locale]&&k.config.errorHandler(new Error("flatpickr: invalid locale "+k.config.locale));k.l10n=i(i({},t.l10ns.default),"object"==typeof k.config.locale?k.config.locale:"default"!==k.config.locale?t.l10ns[k.config.locale]:void 0);s.D="("+k.l10n.weekdays.shorthand.join("|")+")";s.l="("+k.l10n.weekdays.longhand.join("|")+")";s.M="("+k.l10n.months.shorthand.join("|")+")";s.F="("+k.l10n.months.longhand.join("|")+")";s.K="("+k.l10n.amPM[0]+"|"+k.l10n.amPM[1]+"|"+k.l10n.amPM[0].toLowerCase()+"|"+k.l10n.amPM[1].toLowerCase()+")";void 0===i(i({},a),JSON.parse(JSON.stringify(c.dataset||{}))).time_24hr&&void 0===t.defaultConfig.time_24hr&&(k.config.time_24hr=k.l10n.time_24hr);k.formatDate=ut(k);k.parseDate=d({config:k.config,l10n:k.l10n})}function ri(n){var f;if("function"!=typeof k.config.position){if(void 0!==k.calendarContainer){ot("onPreCalendarPosition");var l=n||k._positionElement,e=Array.prototype.reduce.call(k.calendarContainer.children,function(n,t){return n+t.offsetHeight},0),i=k.calendarContainer.offsetWidth,o=k.config.position.split(" "),a=o[0],v=o.length>1?o[1]:null,t=l.getBoundingClientRect(),w=window.innerHeight-t.bottom,s="above"===a||"below"!==a&&w<e&&t.top>e,b=window.pageYOffset+t.top+(s?-e-2:l.offsetHeight+2);if(r(k.calendarContainer,"arrowTop",!s),r(k.calendarContainer,"arrowBottom",s),!k.config.inline){var u=window.pageXOffset+t.left,h=!1,c=!1;"center"===v?(u-=(i-t.width)/2,h=!0):"right"===v&&(u-=i-t.width,c=!0);r(k.calendarContainer,"arrowLeft",!h&&!c);r(k.calendarContainer,"arrowCenter",h);r(k.calendarContainer,"arrowRight",c);var y=window.document.body.offsetWidth-(window.pageXOffset+t.right),p=u+i>window.document.body.offsetWidth,d=y+i>window.document.body.offsetWidth;if(r(k.calendarContainer,"rightMost",p),!k.config.static)if(k.calendarContainer.style.top=b+"px",p)if(d){if(f=function(){for(var i,r,n=null,t=0;t<document.styleSheets.length;t++)if(i=document.styleSheets[t],i.cssRules){try{i.cssRules}catch(n){continue}n=i;break}return null!=n?n:(r=document.createElement("style"),document.head.appendChild(r),r.sheet)}(),void 0===f)return;var g=window.document.body.offsetWidth,nt=Math.max(0,g/2-i/2),tt=f.cssRules.length,it="{left:"+t.left+"px;right:auto;}";r(k.calendarContainer,"rightMost",!1);r(k.calendarContainer,"centerMost",!0);f.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+it,tt);k.calendarContainer.style.left=nt+"px";k.calendarContainer.style.right="auto"}else k.calendarContainer.style.left="auto",k.calendarContainer.style.right=y+"px";else k.calendarContainer.style.left=u+"px",k.calendarContainer.style.right="auto"}}}else k.config.position(k,n)}function ur(){k.config.noCalendar||k.isMobile||(lt(),ui(),gt())}function ci(){k._input.focus();-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(k.close,0):k.close()}function fr(n){var i,u,s,h,c;if(n.preventDefault(),n.stopPropagation(),i=rt(f(n),function(n){return n.classList&&n.classList.contains("flatpickr-day")&&!n.classList.contains("flatpickr-disabled")&&!n.classList.contains("notAllowed")}),void 0!==i){var r=i,t=k.latestSelectedDateObj=new Date(r.dateObj.getTime()),o=(t.getMonth()<k.currentMonth||t.getMonth()>k.currentMonth+k.config.showMonths-1)&&"range"!==k.config.mode;(k.selectedDateElem=r,"single"===k.config.mode)?k.selectedDates=[t]:"multiple"===k.config.mode?(u=ai(t),u?k.selectedDates.splice(parseInt(u),1):k.selectedDates.push(t)):"range"===k.config.mode&&(2===k.selectedDates.length&&k.clear(!1,!1),k.latestSelectedDateObj=t,k.selectedDates.push(t),0!==e(t,k.selectedDates[0],!0)&&k.selectedDates.sort(function(n,t){return n.getTime()-t.getTime()}));(pt(),o)&&(s=k.currentYear!==t.getFullYear(),k.currentYear=t.getFullYear(),k.currentMonth=t.getMonth(),s&&(ot("onYearChange"),lt()),ot("onMonthChange"));(ui(),gt(),st(),o||"range"===k.config.mode||1!==k.config.showMonths?void 0!==k.selectedDateElem&&void 0===k.hourElement&&k.selectedDateElem&&k.selectedDateElem.focus():oi(r),void 0!==k.hourElement&&void 0!==k.hourElement&&k.hourElement.focus(),k.config.closeOnSelect)&&(h="single"===k.config.mode&&!k.config.enableTime,c="range"===k.config.mode&&2===k.selectedDates.length&&!k.config.enableTime,(h||c)&&ci());bi()}}function er(n,t){var i=[];if(n instanceof Array)i=n.map(function(n){return k.parseDate(n,t)});else if(n instanceof Date||"number"==typeof n)i=[k.parseDate(n,t)];else if("string"==typeof n)switch(k.config.mode){case"single":case"time":i=[k.parseDate(n,t)];break;case"multiple":i=n.split(k.config.conjunction).map(function(n){return k.parseDate(n,t)});break;case"range":i=n.split(k.l10n.rangeSeparator).map(function(n){return k.parseDate(n,t)})}else k.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(n)));k.selectedDates=k.config.allowInvalidPreload?i:i.filter(function(n){return n instanceof Date&&ht(n,!1)});"range"===k.config.mode&&k.selectedDates.sort(function(n,t){return n.getTime()-t.getTime()})}function or(n){return n.slice().map(function(n){return"string"==typeof n||"number"==typeof n||n instanceof Date?k.parseDate(n,void 0,!0):n&&"object"==typeof n&&n.from&&n.to?{from:k.parseDate(n.from,void 0),to:k.parseDate(n.to,void 0)}:n}).filter(function(n){return n})}function sr(){k._positionElement=k.config.positionElement||k._input}function ot(n,t){var i,r;if(void 0!==k.config){if(i=k.config[n],void 0!==i&&i.length>0)for(r=0;i[r]&&r<i.length;r++)i[r](k.selectedDates,k.input.value,k,t);"onChange"===n&&(k.input.dispatchEvent(li("change")),k.input.dispatchEvent(li("input")))}}function li(n){var t=document.createEvent("Event");return t.initEvent(n,!0,!0),t}function ai(n){for(var i,t=0;t<k.selectedDates.length;t++)if(i=k.selectedDates[t],i instanceof Date&&0===e(i,n))return""+t;return!1}function ui(){k.config.noCalendar||k.isMobile||!k.monthNav||(k.yearElements.forEach(function(n,t){var i=new Date(k.currentYear,k.currentMonth,1);i.setMonth(k.currentMonth+t);k.config.showMonths>1||"static"===k.config.monthSelectorType?k.monthElements[t].textContent=p(i.getMonth(),k.config.shorthandCurrentMonth,k.l10n)+" ":k.monthsDropdownContainer.value=i.getMonth().toString();n.value=i.getFullYear().toString()}),k._hidePrevMonthArrow=void 0!==k.config.minDate&&(k.currentYear===k.config.minDate.getFullYear()?k.currentMonth<=k.config.minDate.getMonth():k.currentYear<k.config.minDate.getFullYear()),k._hideNextMonthArrow=void 0!==k.config.maxDate&&(k.currentYear===k.config.maxDate.getFullYear()?k.currentMonth+1>k.config.maxDate.getMonth():k.currentYear>k.config.maxDate.getFullYear()))}function vi(n){var t=n||(k.config.altInput?k.config.altFormat:k.config.dateFormat);return k.selectedDates.map(function(n){return k.formatDate(n,t)}).filter(function(n,t,i){return"range"!==k.config.mode||k.config.enableTime||i.indexOf(n)===t}).join("range"!==k.config.mode?k.config.conjunction:k.l10n.rangeSeparator)}function st(n){void 0===n&&(n=!0);void 0!==k.mobileInput&&k.mobileFormatStr&&(k.mobileInput.value=void 0!==k.latestSelectedDateObj?k.formatDate(k.latestSelectedDateObj,k.mobileFormatStr):"");k.input.value=vi(k.config.dateFormat);void 0!==k.altInput&&(k.altInput.value=vi(k.config.altFormat));!1!==n&&ot("onValueUpdate")}function pr(n){var t=f(n),i=k.prevMonthNav.contains(t),r=k.nextMonthNav.contains(t);i||r?si(i?-1:1):k.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?k.changeYear(k.currentYear+1):t.classList.contains("arrowDown")&&k.changeYear(k.currentYear-1)}var k={config:i(i({},h),t.defaultConfig),l10n:l},yt;return k.parseDate=d({config:k.config,l10n:k.l10n}),k._handlers=[],k.pluginElements=[],k.loadedPlugins=[],k._bind=ft,k._setHoursFromDate=wt,k._positionCalendar=ri,k.changeMonth=si,k.changeYear=ni,k.clear=function(n,t){if(void 0===n&&(n=!0),void 0===t&&(t=!0),k.input.value="",void 0!==k.altInput&&(k.altInput.value=""),void 0!==k.mobileInput&&(k.mobileInput.value=""),k.selectedDates=[],k.latestSelectedDateObj=void 0,!0===t&&(k.currentYear=k._initialDate.getFullYear(),k.currentMonth=k._initialDate.getMonth()),!0===k.config.enableTime){var i=nt(k.config),r=i.hours,u=i.minutes,f=i.seconds;fi(r,u,f)}k.redraw();n&&ot("onChange")},k.close=function(){k.isOpen=!1;k.isMobile||(void 0!==k.calendarContainer&&k.calendarContainer.classList.remove("open"),void 0!==k._input&&k._input.classList.remove("active"));ot("onClose")},k.onMouseOver=ii,k._createElement=n,k.createDay=kt,k.destroy=function(){var t,n;for(void 0!==k.config&&ot("onDestroy"),t=k._handlers.length;t--;)k._handlers[t].remove();if(k._handlers=[],k.mobileInput)k.mobileInput.parentNode&&k.mobileInput.parentNode.removeChild(k.mobileInput),k.mobileInput=void 0;else if(k.calendarContainer&&k.calendarContainer.parentNode)if(k.config.static&&k.calendarContainer.parentNode){if(n=k.calendarContainer.parentNode,n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else k.calendarContainer.parentNode.removeChild(k.calendarContainer);k.altInput&&(k.input.type="text",k.altInput.parentNode&&k.altInput.parentNode.removeChild(k.altInput),delete k.altInput);k.input&&(k.input.type=k.input._type,k.input.classList.remove("flatpickr-input"),k.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(n){try{delete k[n]}catch(n){}})},k.isEnabled=ht,k.jumpToDate=bt,k.updateValue=st,k.open=function(n,t){var i,r;if(void 0===t&&(t=k._positionElement),!0===k.isMobile)return n&&(n.preventDefault(),i=f(n),i&&i.blur()),void 0!==k.mobileInput&&(k.mobileInput.focus(),k.mobileInput.click()),void ot("onOpen");k._input.disabled||k.config.inline||(r=k.isOpen,k.isOpen=!0,r||(k.calendarContainer.classList.add("open"),k._input.classList.add("active"),ot("onOpen"),ri(t)),!0===k.config.enableTime&&!0===k.config.noCalendar&&(!1!==k.config.allowInput||void 0!==n&&k.timeContainer.contains(n.relatedTarget)||setTimeout(function(){return k.hourElement.select()},50)))},k.redraw=ur,k.set=function(n,t){if(null!==n&&"object"==typeof n)for(var i in Object.assign(k.config,n),n)void 0!==yt[i]&&yt[i].forEach(function(n){return n()});else k.config[n]=t,void 0!==yt[n]?yt[n].forEach(function(n){return n()}):w.indexOf(n)>-1&&(k.config[n]=b(t));k.redraw();st(!0)},k.setDate=function(n,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=k.config.dateFormat),0!==n&&!n||n instanceof Array&&0===n.length)return k.clear(t);er(n,i);k.latestSelectedDateObj=k.selectedDates[k.selectedDates.length-1];k.redraw();bt(void 0,t);wt();0===k.selectedDates.length&&k.clear(!1);st(t);t&&ot("onChange")},k.toggle=function(n){if(!0===k.isOpen)return k.close();k.open(n)},yt={locale:[rr,gi],showMonths:[ki,wi,di],minDate:[bt],maxDate:[bt],positionElement:[sr],clickOpens:[function(){!0===k.config.clickOpens?(ft(k._input,"focus",k.open),ft(k._input,"click",k.open)):(k._input.removeEventListener("focus",k.open),k._input.removeEventListener("click",k.open))}]},function(){k.element=k.input=c;k.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],n=i(i({},JSON.parse(JSON.stringify(c.dataset||{}))),a),s={},f,v,y,l,r,o,u;for(k.config.parseDate=n.parseDate,k.config.formatDate=n.formatDate,Object.defineProperty(k.config,"enable",{get:function(){return k.config._enable},set:function(n){k.config._enable=or(n)}}),Object.defineProperty(k.config,"disable",{get:function(){return k.config._disable},set:function(n){k.config._disable=or(n)}}),f="time"===n.mode,!n.dateFormat&&(n.enableTime||f)&&(v=t.defaultConfig.dateFormat||h.dateFormat,s.dateFormat=n.noCalendar||f?"H:i"+(n.enableSeconds?":S":""):v+" H:i"+(n.enableSeconds?":S":"")),n.altInput&&(n.enableTime||f)&&!n.altFormat&&(y=t.defaultConfig.altFormat||h.altFormat,s.altFormat=n.noCalendar||f?"h:i"+(n.enableSeconds?":S K":" K"):y+" h:i"+(n.enableSeconds?":S":"")+" K"),Object.defineProperty(k.config,"minDate",{get:function(){return k.config._minDate},set:tr("min")}),Object.defineProperty(k.config,"maxDate",{get:function(){return k.config._maxDate},set:tr("max")}),l=function(n){return function(t){k.config["min"===n?"_minTime":"_maxTime"]=k.parseDate(t,"H:i:S")}},Object.defineProperty(k.config,"minTime",{get:function(){return k.config._minTime},set:l("min")}),Object.defineProperty(k.config,"maxTime",{get:function(){return k.config._maxTime},set:l("max")}),"time"===n.mode&&(k.config.noCalendar=!0,k.config.enableTime=!0),Object.assign(k.config,s,n),r=0;r<e.length;r++)k.config[e[r]]=!0===k.config[e[r]]||"true"===k.config[e[r]];for(w.filter(function(n){return void 0!==k.config[n]}).forEach(function(n){k.config[n]=b(k.config[n]||[]).map(pi)}),k.isMobile=!k.config.disableMobile&&!k.config.inline&&"single"===k.config.mode&&!k.config.disable.length&&!k.config.enable&&!k.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),r=0;r<k.config.plugins.length;r++){o=k.config.plugins[r](k)||{};for(u in o)w.indexOf(u)>-1?k.config[u]=b(o[u]).map(pi).concat(k.config[u]):void 0===n[u]&&(k.config[u]=o[u])}n.altInputClass||(k.config.altInputClass=ir().className+" "+k.config.altInputClass);ot("onParseConfig")}();rr(),function(){if(k.input=ir(),!k.input)return void k.config.errorHandler(new Error("Invalid input element specified"));k.input._type=k.input.type;k.input.type="text";k.input.classList.add("flatpickr-input");k._input=k.input;k.config.altInput&&(k.altInput=n(k.input.nodeName,k.config.altInputClass),k._input=k.altInput,k.altInput.placeholder=k.input.placeholder,k.altInput.disabled=k.input.disabled,k.altInput.required=k.input.required,k.altInput.tabIndex=k.input.tabIndex,k.altInput.type="text",k.input.setAttribute("type","hidden"),!k.config.static&&k.input.parentNode&&k.input.parentNode.insertBefore(k.altInput,k.input.nextSibling));k.config.allowInput||k._input.setAttribute("readonly","readonly");sr()}(),function(){k.selectedDates=[];k.now=k.parseDate(k.config.now)||new Date;var n=k.config.defaultDate||("INPUT"!==k.input.nodeName&&"TEXTAREA"!==k.input.nodeName||!k.input.placeholder||k.input.value!==k.input.placeholder?k.input.value:null);n&&er(n,k.config.dateFormat);k._initialDate=k.selectedDates.length>0?k.selectedDates[0]:k.config.minDate&&k.config.minDate.getTime()>k.now.getTime()?k.config.minDate:k.config.maxDate&&k.config.maxDate.getTime()<k.now.getTime()?k.config.maxDate:k.now;k.currentYear=k._initialDate.getFullYear();k.currentMonth=k._initialDate.getMonth();k.selectedDates.length>0&&(k.latestSelectedDateObj=k.selectedDates[0]);void 0!==k.config.minTime&&(k.config.minTime=k.parseDate(k.config.minTime,"H:i"));void 0!==k.config.maxTime&&(k.config.maxTime=k.parseDate(k.config.maxTime,"H:i"));k.minDateHasTime=!!k.config.minDate&&(k.config.minDate.getHours()>0||k.config.minDate.getMinutes()>0||k.config.minDate.getSeconds()>0);k.maxDateHasTime=!!k.config.maxDate&&(k.config.maxDate.getHours()>0||k.config.maxDate.getMinutes()>0||k.config.maxDate.getSeconds()>0)}();k.utils={getDaysInMonth:function(n,t){return void 0===n&&(n=k.currentMonth),void 0===t&&(t=k.currentYear),1===n&&(t%4==0&&t%100!=0||t%400==0)?29:k.l10n.daysInMonth[n]}};k.isMobile||function(){var i=window.document.createDocumentFragment(),s,t;if(k.calendarContainer=n("div","flatpickr-calendar"),k.calendarContainer.tabIndex=-1,!k.config.noCalendar){if(i.appendChild((k.monthNav=n("div","flatpickr-months"),k.yearElements=[],k.monthElements=[],k.prevMonthNav=n("span","flatpickr-prev-month"),k.prevMonthNav.innerHTML=k.config.prevArrow,k.nextMonthNav=n("span","flatpickr-next-month"),k.nextMonthNav.innerHTML=k.config.nextArrow,ki(),Object.defineProperty(k,"_hidePrevMonthArrow",{get:function(){return k.__hidePrevMonthArrow},set:function(n){k.__hidePrevMonthArrow!==n&&(r(k.prevMonthNav,"flatpickr-disabled",n),k.__hidePrevMonthArrow=n)}}),Object.defineProperty(k,"_hideNextMonthArrow",{get:function(){return k.__hideNextMonthArrow},set:function(n){k.__hideNextMonthArrow!==n&&(r(k.nextMonthNav,"flatpickr-disabled",n),k.__hideNextMonthArrow=n)}}),k.currentYearElement=k.yearElements[0],ui(),k.monthNav)),k.innerContainer=n("div","flatpickr-innerContainer"),k.config.weekNumbers){var f=function(){var t,i;return k.calendarContainer.classList.add("hasWeeks"),t=n("div","flatpickr-weekwrapper"),t.appendChild(n("span","flatpickr-weekday",k.l10n.weekAbbreviation)),i=n("div","flatpickr-weeks"),t.appendChild(i),{weekWrapper:t,weekNumbers:i}}(),e=f.weekWrapper,h=f.weekNumbers;k.innerContainer.appendChild(e);k.weekNumbers=h;k.weekWrapper=e}k.rContainer=n("div","flatpickr-rContainer");k.rContainer.appendChild(di());k.daysContainer||(k.daysContainer=n("div","flatpickr-days"),k.daysContainer.tabIndex=-1);gt();k.rContainer.appendChild(k.daysContainer);k.innerContainer.appendChild(k.rContainer);i.appendChild(k.innerContainer)}k.config.enableTime&&i.appendChild(function(){var t,e,i,r,f;return k.calendarContainer.classList.add("hasTime"),k.config.noCalendar&&k.calendarContainer.classList.add("noCalendar"),t=nt(k.config),k.timeContainer=n("div","flatpickr-time"),k.timeContainer.tabIndex=-1,e=n("span","flatpickr-time-separator",":"),i=y("flatpickr-hour",{"aria-label":k.l10n.hourAriaLabel}),k.hourElement=i.getElementsByTagName("input")[0],r=y("flatpickr-minute",{"aria-label":k.l10n.minuteAriaLabel}),k.minuteElement=r.getElementsByTagName("input")[0],k.hourElement.tabIndex=k.minuteElement.tabIndex=-1,k.hourElement.value=u(k.latestSelectedDateObj?k.latestSelectedDateObj.getHours():k.config.time_24hr?t.hours:function(n){switch(n%24){case 0:case 12:return 12;default:return n%12}}(t.hours)),k.minuteElement.value=u(k.latestSelectedDateObj?k.latestSelectedDateObj.getMinutes():t.minutes),k.hourElement.setAttribute("step",k.config.hourIncrement.toString()),k.minuteElement.setAttribute("step",k.config.minuteIncrement.toString()),k.hourElement.setAttribute("min",k.config.time_24hr?"0":"1"),k.hourElement.setAttribute("max",k.config.time_24hr?"23":"12"),k.hourElement.setAttribute("maxlength","2"),k.minuteElement.setAttribute("min","0"),k.minuteElement.setAttribute("max","59"),k.minuteElement.setAttribute("maxlength","2"),k.timeContainer.appendChild(i),k.timeContainer.appendChild(e),k.timeContainer.appendChild(r),k.config.time_24hr&&k.timeContainer.classList.add("time24hr"),k.config.enableSeconds&&(k.timeContainer.classList.add("hasSeconds"),f=y("flatpickr-second"),k.secondElement=f.getElementsByTagName("input")[0],k.secondElement.value=u(k.latestSelectedDateObj?k.latestSelectedDateObj.getSeconds():t.seconds),k.secondElement.setAttribute("step",k.minuteElement.getAttribute("step")),k.secondElement.setAttribute("min","0"),k.secondElement.setAttribute("max","59"),k.secondElement.setAttribute("maxlength","2"),k.timeContainer.appendChild(n("span","flatpickr-time-separator",":")),k.timeContainer.appendChild(f)),k.config.time_24hr||(k.amPM=n("span","flatpickr-am-pm",k.l10n.amPM[o((k.latestSelectedDateObj?k.hourElement.value:k.config.defaultHour)>11)]),k.amPM.title=k.l10n.toggleTitle,k.amPM.tabIndex=-1,k.timeContainer.appendChild(k.amPM)),k.timeContainer}());r(k.calendarContainer,"rangeMode","range"===k.config.mode);r(k.calendarContainer,"animate",!0===k.config.animate);r(k.calendarContainer,"multiMonth",k.config.showMonths>1);k.calendarContainer.appendChild(i);s=void 0!==k.config.appendTo&&void 0!==k.config.appendTo.nodeType;(k.config.inline||k.config.static)&&(k.calendarContainer.classList.add(k.config.inline?"inline":"static"),k.config.inline&&(!s&&k.element.parentNode?k.element.parentNode.insertBefore(k.calendarContainer,k._input.nextSibling):void 0!==k.config.appendTo&&k.config.appendTo.appendChild(k.calendarContainer)),k.config.static)&&(t=n("div","flatpickr-wrapper"),k.element.parentNode&&k.element.parentNode.insertBefore(t,k.element),t.appendChild(k.element),k.altInput&&t.appendChild(k.altInput),t.appendChild(k.calendarContainer));k.config.static||k.config.inline||(void 0!==k.config.appendTo?k.config.appendTo:window.document.body).appendChild(k.calendarContainer)}(),function(){var t,i;if(k.config.wrap&&["open","close","toggle","clear"].forEach(function(n){Array.prototype.forEach.call(k.element.querySelectorAll("[data-"+n+"]"),function(t){return ft(t,"click",k[n])})}),k.isMobile)return void function(){var t=k.config.enableTime?k.config.noCalendar?"time":"datetime-local":"date";k.mobileInput=n("input",k.input.className+" flatpickr-mobile");k.mobileInput.tabIndex=1;k.mobileInput.type=t;k.mobileInput.disabled=k.input.disabled;k.mobileInput.required=k.input.required;k.mobileInput.placeholder=k.input.placeholder;k.mobileFormatStr="datetime-local"===t?"Y-m-d\\TH:i:S":"date"===t?"Y-m-d":"H:i:S";k.selectedDates.length>0&&(k.mobileInput.defaultValue=k.mobileInput.value=k.formatDate(k.selectedDates[0],k.mobileFormatStr));k.config.minDate&&(k.mobileInput.min=k.formatDate(k.config.minDate,"Y-m-d"));k.config.maxDate&&(k.mobileInput.max=k.formatDate(k.config.maxDate,"Y-m-d"));k.input.getAttribute("step")&&(k.mobileInput.step=String(k.input.getAttribute("step")));k.input.type="hidden";void 0!==k.altInput&&(k.altInput.type="hidden");try{k.input.parentNode&&k.input.parentNode.insertBefore(k.mobileInput,k.input.nextSibling)}catch(t){}ft(k.mobileInput,"change",function(n){k.setDate(f(n).value,!1,k.mobileFormatStr);ot("onChange");ot("onClose")})}();t=it(yr,50);k._debouncedChange=it(bi,300);k.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&ft(k.daysContainer,"mouseover",function(n){"range"===k.config.mode&&ii(f(n))});ft(k._input,"keydown",nr);void 0!==k.calendarContainer&&ft(k.calendarContainer,"keydown",nr);k.config.inline||k.config.static||ft(window,"resize",t);void 0!==window.ontouchstart?ft(window.document,"touchstart",hi):ft(window.document,"mousedown",hi);ft(window.document,"focus",hi,{capture:!0});!0===k.config.clickOpens&&(ft(k._input,"focus",k.open),ft(k._input,"click",k.open));void 0!==k.daysContainer&&(ft(k.monthNav,"click",pr),ft(k.monthNav,["keyup","increment"],hr),ft(k.daysContainer,"click",fr));void 0!==k.timeContainer&&void 0!==k.minuteElement&&void 0!==k.hourElement&&(i=function(n){return f(n).select()},ft(k.timeContainer,["increment"],ct),ft(k.timeContainer,"blur",ct,{capture:!0}),ft(k.timeContainer,"click",cr),ft([k.hourElement,k.minuteElement],["focus","click"],i),void 0!==k.secondElement&&ft(k.secondElement,"focus",function(){return k.secondElement&&k.secondElement.select()}),void 0!==k.amPM&&ft(k.amPM,"click",function(n){ct(n)}));k.config.allowInput&&ft(k._input,"blur",vr)}();(k.selectedDates.length||k.config.noCalendar)&&(k.config.enableTime&&wt(k.config.noCalendar?k.latestSelectedDateObj:void 0),st(!1));wi();var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!k.isMobile&&e&&ri();ot("onReady")}(),k}function c(n,t){for(var i,f=Array.prototype.slice.call(n).filter(function(n){return n instanceof HTMLElement}),r=[],u=0;u<f.length;u++){i=f[u];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0);i._flatpickr=ot(i,t||{});r.push(i._flatpickr)}catch(n){console.error(n)}}return 1===r.length?r[0]:r}var i=function(){return(i=Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t<u;t++)for(i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n}).apply(this,arguments)},w=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],h={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return"undefined"!=typeof console&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime()),i;return t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7),i=new Date(t.getFullYear(),0,4),1+Math.round(((t.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g><\/g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /><\/svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g><\/g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /><\/svg>",shorthandCurrentMonth:!1,showMonths:1,"static":!1,time_24hr:!1,weekNumbers:!1,wrap:!1},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},u=function(n,t){return void 0===t&&(t=2),("000"+n).slice(-1*t)},o=function(n){return!0===n?1:0},b=function(n){return n instanceof Array?n:[n]},k=function(){},p=function(n,t,i){return i.months[t?"shorthand":"longhand"][n]},ft={D:k,F:function(n,t,i){n.setMonth(i.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,i){n.setHours(n.getHours()%12+12*o(new RegExp(i.amPM[1],"i").test(t)))},M:function(n,t,i){n.setMonth(i.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(1e3*parseFloat(t))},W:function(n,t,i){var u=parseInt(t),r=new Date(n.getFullYear(),0,2+7*(u-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek),r},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:k,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:k,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},s={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},a={Z:function(n){return n.toISOString()},D:function(n,t,i){return t.weekdays.shorthand[a.w(n,t,i)]},F:function(n,t,i){return p(a.n(n,t,i)-1,!1,t)},G:function(n,t,i){return u(a.h(n,t,i))},H:function(n){return u(n.getHours())},J:function(n,t){return void 0!==t.ordinal?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[o(n.getHours()>11)]},M:function(n,t){return p(n.getMonth(),!0,t)},S:function(n){return u(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,i){return i.getWeek(n)},Y:function(n){return u(n.getFullYear(),4)},d:function(n){return u(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return u(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return u(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},ut=function(n){var i=n.config,t=void 0===i?h:i,r=n.l10n,f=void 0===r?l:r,u=n.isMobile,e=void 0!==u&&u;return function(n,i,r){var u=r||f;return void 0===t.formatDate||e?i.split("").map(function(i,r,f){return a[i]&&"\\"!==f[r-1]?a[i](n,u,t):"\\"!==i?i:""}).join(""):t.formatDate(n,i,u)}},d=function(n){var i=n.config,t=void 0===i?h:i,r=n.l10n,u=void 0===r?l:r;return function(n,i,r,f){var e,p,w,o,l,y;if(0===n||n){if(p=f||u,w=n,n instanceof Date)e=new Date(n.getTime());else if("string"!=typeof n&&void 0!==n.toFixed)e=new Date(n);else if("string"==typeof n)if(o=i||(t||h).dateFormat,l=String(n).trim(),"today"===l)e=new Date,r=!0;else if(t&&t.parseDate)e=t.parseDate(n,o);else if(/Z$/.test(l)||/GMT$/.test(l))e=new Date(n);else{for(var b=void 0,k=[],a=0,g=0,v="";a<o.length;a++){var c=o[a],d="\\"===c,nt="\\"===o[a-1]||d;s[c]&&!nt?(v+=s[c],y=new RegExp(v).exec(n),y&&(b=!0)&&k["Y"!==c?"push":"unshift"]({fn:ft[c],val:y[++g]})):d||(v+=".")}e=t&&t.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);k.forEach(function(n){var t=n.fn,i=n.val;return e=t(e,i,p)||e});e=b?e:void 0}if(e instanceof Date&&!isNaN(e.getTime()))return!0===r&&e.setHours(0,0,0,0),e;t.errorHandler(new Error("Invalid date provided: "+w))}}},g=function(n,t,i){return 3600*n+60*t+i},et=864e5,t;return"function"!=typeof Object.assign&&(Object.assign=function(n){for(var f,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var e=function(t){t&&Object.keys(t).forEach(function(i){return n[i]=t[i]})},r=0,u=i;r<u.length;r++)f=u[r],e(f);return n}),"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return c(this,n)},HTMLElement.prototype.flatpickr=function(n){return c([this],n)}),t=function(n,t){return"string"==typeof n?c(window.document.querySelectorAll(n),t):n instanceof Node?c([n],t):c(n,t)},t.defaultConfig={},t.l10ns={en:i({},l),"default":i({},l)},t.localize=function(n){t.l10ns.default=i(i({},t.l10ns.default),n)},t.setDefaults=function(n){t.defaultConfig=i(i({},t.defaultConfig),n)},t.parseDate=d({}),t.formatDate=ut({}),t.compareDates=e,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(n){return c(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof n?parseInt(n,10):n))},"undefined"!=typeof window&&(window.flatpickr=t),t});$(function(){browserDetect()});!function(n,t){"use strict";function f(r,f,e,o,s){function it(){ut=n.devicePixelRatio>1;e=rt(e);f.delay>=0&&setTimeout(function(){p(!0)},f.delay);(f.delay<0||f.combined)&&(o.e=lt(f.throttle,function(n){"resize"===n.type&&(w=b=-1);p(n.all)}),o.a=function(n){n=rt(n);e.push.apply(e,n)},o.g=function(){return e=i(e).filter(function(){return!i(this).data(f.loadedName)})},o.f=function(n){for(var i,t=0;t<n.length;t++)i=e.filter(function(){return this===n[t]}),i.length&&p(!1,i)},p(),i(f.appendScroll).on("scroll."+s+" resize."+s,o.e))}function rt(n){var v=f.defaultImage,p=f.placeholder,k=f.imageBase,s=f.srcsetAttribute,c=f.loaderAttribute,a=f._f||{},e,w;for(n=i(n).filter(function(){var n=i(this),r=g(this);return!n.data(f.handledName)&&(n.attr(f.attribute)||n.attr(s)||n.attr(c)||a[r]!==t)}).data("plugin_"+f.name,r),e=0,w=n.length;e<w;e++){var u=i(n[e]),o=g(n[e]),b=u.attr(f.imageBaseAttribute)||k;o===l&&b&&u.attr(s)&&u.attr(s,ct(u.attr(s),b));a[o]===t||u.attr(c)||u.attr(c,a[o]);o===l&&v&&!u.attr(h)?u.attr(h,v):o===l||!p||u.css(y)&&"none"!==u.css(y)||u.css(y,"url('"+p+"')")}return n}function p(n,t){if(!e.length)return void(f.autoDestroy&&r.destroy());for(var s=t||e,w=!1,nt=f.imageBase||"",b=f.srcsetAttribute,c=f.handledName,o=0;o<s.length;o++)if(n||t||ot(s[o])){var u=i(s[o]),a=g(s[o]),v=u.attr(f.attribute),p=u.attr(f.imageBaseAttribute)||nt,d=u.attr(f.loaderAttribute);!u.data(c)&&(!f.visibleOnly||u.is(":visible"))&&((v||u.attr(b))&&(a===l&&(p+v!==u.attr(h)||u.attr(b)!==u.attr(k))||a!==l&&p+v!==u.css(y))||d)&&(w=!0,u.data(c,!0),et(u,a,p,d))}w&&(e=i(e).filter(function(){return!i(this).data(c)}))}function et(n,t,r,u){var o,s,e,w;++tt;o=function(){c("onError",n);nt();o=i.noop};c("beforeLoad",n);var b=f.attribute,g=f.srcsetAttribute,p=f.sizesAttribute,it=f.retinaAttribute,rt=f.removeAttribute,et=f.loadedName,ot=n.attr(it);if(u)s=function(){rt&&n.removeAttr(f.loaderAttribute);n.data(et,!0);c(ft,n);setTimeout(nt,1);s=i.noop},n.off(v).one(v,o).one(a,s),c(u,n,function(t){t?(n.off(a),s()):(n.off(v),o())})||n.trigger(v);else{e=i(new Image);e.one(v,o).one(a,function(){n.hide();t===l?n.attr(d,e.attr(d)).attr(k,e.attr(k)).attr(h,e.attr(h)):n.css(y,"url('"+e.attr(h)+"')");n[f.effect](f.effectTime);rt&&(n.removeAttr(b+" "+g+" "+it+" "+f.imageBaseAttribute),p!==d&&n.removeAttr(p));n.data(et,!0);c(ft,n);e.remove();nt()});w=(ut&&ot?ot:n.attr(b))||"";e.attr(d,n.attr(p)).attr(k,n.attr(g)).attr(h,w?r+w:null);e.complete&&e.trigger(a)}}function ot(n){var t=n.getBoundingClientRect(),r=f.scrollDirection,i=f.threshold,u=ht()+i>t.top&&-i<t.bottom,e=st()+i>t.left&&-i<t.right;return"vertical"===r?u:"horizontal"===r?e:u&&e}function st(){return w>=0?w:w=i(n).width()}function ht(){return b>=0?b:b=i(n).height()}function g(n){return n.tagName.toLowerCase()}function ct(n,t){var r,i,u;if(t)for(r=n.split(","),n="",i=0,u=r.length;i<u;i++)n+=t+r[i].trim()+(i!==u-1?",":"");return n}function lt(n,t){var i,u=0;return function(e,o){function s(){u=+new Date;t.call(r,e)}var h=+new Date-u;i&&clearTimeout(i);h>n||!f.enableThrottle||o?s():i=setTimeout(s,n-h)}}function nt(){--tt;e.length||tt||c("onFinishedAll")}function c(n){return!!(n=f[n])&&(n.apply(r,[].slice.call(arguments,1)),!0)}var tt=0,w=-1,b=-1,ut=!1,ft="afterLoad",a="load",v="error",l="img",h="src",k="srcset",d="sizes",y="background-image";"event"===f.bind||u?it():i(n).on(a+"."+s,it)}function r(r,u){var o=this,h=i.extend({},o.config,u),s={},c=h.name+"-"+ ++e;return o.config=function(n,i){return i===t?h[n]:(h[n]=i,o)},o.addItems=function(n){return s.a&&s.a("string"===i.type(n)?i(n):n),o},o.getItems=function(){return s.g?s.g():{}},o.update=function(n){return s.e&&s.e({},!n),o},o.force=function(n){return s.f&&s.f("string"===i.type(n)?i(n):n),o},o.loadAll=function(){return s.e&&s.e({all:!0},!0),o},o.destroy=function(){return i(h.appendScroll).off("."+c,s.e),i(n).off("."+c),s={},t},f(o,h,r,s,c),h.chainable?r:o}var i=n.jQuery||n.Zepto,e=0,u=!1;i.fn.Lazy=i.fn.lazy=function(n){return new r(this,n)};i.Lazy=i.lazy=function(n,u,f){var s,h;if(i.isFunction(u)&&(f=u,u=[]),i.isFunction(f)){n=i.isArray(n)?n:[n];u=i.isArray(u)?u:[u];for(var e=r.prototype.config,c=e._f||(e._f={}),o=0,l=n.length;o<l;o++)(e[n[o]]===t||i.isFunction(e[n[o]]))&&(e[n[o]]=f);for(s=0,h=u.length;s<h;s++)c[u[s]]=n[0]}};r.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:n,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:t,afterLoad:t,onError:t,onFinishedAll:t};i(n).on("load",function(){u=!0})}(window)