function bindAddressEvents(){$("input[data-geo]:visible").off("change").on("change",function(){var n=[],t=[],s;$(this).parents(".geocomplete-details").find(".form-group").removeClass("has-error");var e=$(this).parents(".geocomplete-details").find("input[data-geo=street_number]").val(),o=$(this).parents(".geocomplete-details").find("input[data-geo=route]").val(),i=$(this).parents(".geocomplete-details").find("input[data-geo=locality]").val(),r=$(this).parents(".geocomplete-details").find("input[data-geo=administrative_area_level_1]").val(),u=$(this).parents(".geocomplete-details").find("input[data-geo=country]").val(),f=$(this).parents(".geocomplete-details").find("input[data-geo=postal_code]").val();if(e!="")n.push(e);else{$(this).parents(".geocomplete-details").find("input[data-geo=formatted_address]").val("");$(this).parents(".geocomplete-details").prev().find("input").val("");return}if(o!=""&&n.push(o),i!="")n.push(i);else{$(this).parents(".geocomplete-details").find("input[data-geo=formatted_address]").val("");$(this).parents(".geocomplete-details").prev().find("input").val("");return}if(r!="")n.push(r);else{$(this).parents(".geocomplete-details").find("input[data-geo=formatted_address]").val("");$(this).parents(".geocomplete-details").prev().find("input").val("");return}if(u!=""&&n.push(u),f!="")n.push(f);else{$(this).parents(".geocomplete-details").find("input[data-geo=formatted_address]").val("");$(this).parents(".geocomplete-details").prev().find("input").val("");return}i!=""&&t.push(i);r!=""&&t.push(r);u!=""&&t.push(u);f!=""&&t.push(f);s=t.join(", ");$(this).parents(".geocomplete-details").find("input[data-geo=formatted_address]").val(n.join(", "));$(this).parents(".geocomplete-details").prev().find("input").val(n.join(", "));var h=new google.maps.Geocoder,c=$(this).parents(".geocomplete-details").find("input[data-geo=lat]"),l=$(this).parents(".geocomplete-details").find("input[data-geo=lng]");h.geocode({address:s,region:"au"},function(n,t){if(t==google.maps.GeocoderStatus.OK){var i=n[0].geometry.location.lat(),r=n[0].geometry.location.lng();c.val(i);l.val(r);typeof searchPharmacies!="undefined"&&searchPharmacies()}})})}function showManualAddress(n){return $("."+n+"-geo").hide(),$("."+n+"-manual").show(),bindAddressEvents(),!1}function hideManualAddress(n){return $("."+n+"-geo").show(),$("."+n+"-manual").hide(),!1}function validateAddress(){}if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t()})}(jQuery);+function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));i=n(r);t&&t.preventDefault();i.length||(i=u.hasClass("alert")?u:u.parent());i.trigger(t=n.Event("close.bs.alert"));t.isDefaultPrevented()||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one(n.support.transition.end,f).emulateTransitionEnd(150):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},i;t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,u=i.is("input")?"val":"html",f=i.data();t+="Text";f.resetText||i.data("resetText",i[u]());i[u](f[t]||this.options[t]);setTimeout(n.proxy(function(){"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")&&this.$element.hasClass("active")?t=!1:i.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change"));t&&this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(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)})};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle");t.preventDefault()})}(jQuery);+function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};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.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)};t.prototype.to=function(t){var r=this,i=this.getActiveIndex();if(!(t>this.$items.length-1)&&!(0>t))return this.sliding?this.$element.one("slid.bs.carousel",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))};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(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),s=this.interval,f="next"==t?"left":"right",h="next"==t?"first":"last",e=this,o;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[h]()}return r.hasClass("active")?this.sliding=!1:(o=n.Event("slide.bs.carousel",{relatedTarget:r[0],direction:f}),this.$element.trigger(o),o.isDefaultPrevented()?void 0:(this.sliding=!0,s&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=n(e.$indicators.children()[e.getActiveIndex()]);t&&t.addClass("active")})),n.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,u.addClass(f),r.addClass(f),u.one(n.support.transition.end,function(){r.removeClass([t,f].join(" ")).addClass("active");u.removeClass(["active",f].join(" "));e.sliding=!1;setTimeout(function(){e.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*u.css("transition-duration").slice(0,-1))):(u.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),s&&this.cycle(),this))};i=n.fn.carousel;n.fn.carousel=function(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()})};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var f,i=n(this),r=n(i.attr("data-target")||(f=i.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),u=i.attr("data-slide-to");u&&(e.interval=!1);r.carousel(e);(u=i.attr("data-slide-to"))&&r.data("bs.carousel").to(u);t.preventDefault()});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);t.carousel(t.data())})})}(jQuery);+function(n){"use strict";var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var u,t,r,i,f,e;if(!this.transitioning&&!this.$element.hasClass("in")&&(u=n.Event("show.bs.collapse"),this.$element.trigger(u),!u.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(r=t.data("bs.collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("bs.collapse",null)}if(i=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1,f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return f.call(this);e=n.camelCase(["scroll",i].join("-"));this.$element.one(n.support.transition.end,n.proxy(f,this)).emulateTransitionEnd(350)[i](this.$element[0][e])}};t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented()))return t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")},n.support.transition?void this.$element[t](0).one(n.support.transition.end,n.proxy(r,this)).emulateTransitionEnd(350):r.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};i=n.fn.collapse;n.fn.collapse=function(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"==i&&(i=!i);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=n(this),s=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),r=n(s),u=r.data("bs.collapse"),h=u?"toggle":i.data(),f=i.attr("data-parent"),o=f&&n(f);u&&u.transitioning||(o&&o.find('[data-toggle=collapse][data-parent="'+f+'"]').not(i).addClass("collapsed"),i[r.hasClass("in")?"addClass":"removeClass"]("collapsed"));r.collapse(h)})}(jQuery);+function(n){"use strict";function r(t){n(e).remove();n(i).each(function(){var i=u(n(this)),r={relatedTarget:this};i.hasClass("open")&&(i.trigger(t=n.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",r))})}function u(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()}var e=".dropdown-backdrop",i="[data-toggle=dropdown]",t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=u(f),o=i.hasClass("open"),r(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown",e);f.focus()}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&o.find(i).focus(),e.click();h=" li:not(.divider):visible a";f=o.find("[role=menu]"+h+", [role=listbox]"+h);f.length&&(r=f.index(f.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&r<f.length-1&&r++,~r||(r=0),f.eq(r).focus())}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).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+", [role=menu], [role=listbox]",t.prototype.keydown)}(jQuery);+function(n){"use strict";var t=function(t,i){this.options=i;this.$element=n(t);this.$backdrop=this.isShown=null;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},i;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this[this.isShown?"hide":"show"](n)};t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(document.body);i.$element.show().scrollTop(0);u&&i.$element[0].offsetWidth;i.$element.addClass("in").attr("aria-hidden",!1);i.enforceFocus();r=n.Event("shown.bs.modal",{relatedTarget:t});u?i.$element.find(".modal-dialog").one(n.support.transition.end,function(){i.$element.focus().trigger(r)}).emulateTransitionEnd(300):i.$element.focus().trigger(r)}))};t.prototype.hide=function(t){t&&t.preventDefault();t=n.Event("hide.bs.modal");this.$element.trigger(t);this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):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.focus()},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};i=n.fn.modal;n.fn.modal=function(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)})};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());i.is("a")&&t.preventDefault();u.modal(f,this).one("hide",function(){i.is(":visible")&&i.focus()})});n(document).on("show.bs.modal",".modal",function(){n(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){n(document.body).removeClass("modal-open")})}(jQuery);+function(n){"use strict";var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",n,t)},i;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),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)[this.type](this.getDelegateOptions()).data("bs."+this.type);return 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.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return 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 h=n.Event("show.bs."+this.type),u,i,v,s;if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;u=this;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");var t="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,c=/\s?auto?\s?/i,l=c.test(t);l&&(t=t.replace(c,"")||"top");i.detach().css({top:0,left:0,display:"block"}).addClass(t);this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),f=i[0].offsetWidth,e=i[0].offsetHeight;if(l){var o=this.$element.parent(),y=t,a=document.documentElement.scrollTop||document.body.scrollTop,p="body"==this.options.container?window.innerWidth:o.outerWidth(),w="body"==this.options.container?window.innerHeight:o.outerHeight(),b="body"==this.options.container?0:o.offset().left;t="bottom"==t&&r.top+r.height+e-a>w?"top":"top"==t&&r.top-a-e<0?"bottom":"right"==t&&r.right+f>p?"left":"left"==t&&r.left-f<b?"right":t;i.removeClass(y).addClass(t)}v=this.getCalculatedOffset(t,r,f,e);this.applyPlacement(v,t);this.hoverState=null;s=function(){u.$element.trigger("shown.bs."+u.type)};n.support.transition&&this.$tip.hasClass("fade")?i.one(n.support.transition.end,s).emulateTransitionEnd(150):s()}};t.prototype.applyPlacement=function(t,i){var c,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),f,u,h;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top=t.top+o;t.left=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");f=r[0].offsetWidth;u=r[0].offsetHeight;("top"==i&&u!=e&&(c=!0,t.top=t.top+e-u),/bottom|top/.test(i))?(h=0,t.left<0&&(h=-2*t.left,t.left=0,r.offset(t),f=r[0].offsetWidth,u=r[0].offsetHeight),this.replaceArrow(h-l+f,f,"left")):this.replaceArrow(u-e,u,"top");c&&r.offset(t)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")};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(){function r(){"in"!=t.hoverState&&i.detach();t.$element.trigger("hidden.bs."+t.type)}var t=this,i=this.tip(),u=n.Event("hide.bs."+this.type);return this.$element.trigger(u),u.isDefaultPrevented()?void 0:(i.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?i.one(n.support.transition.end,r).emulateTransitionEnd(150):r(),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(){var t=this.$element[0];return n.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())};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.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.tip=function(){return this.$tip=this.$tip||n(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};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=t?n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><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")[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")};t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){var u,f=n.proxy(this.process,this);this.$element=n(n(i).is("body")?window:i);this.$body=n("body");this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||(u=n(i).attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=n([]);this.targets=n([]);this.activeTarget=null;this.refresh();this.process()}t.DEFAULTS={offset:10};t.prototype.refresh=function(){var i=this.$element[0]==window?"offset":"position",t;this.offsets=n([]);this.targets=n([]);t=this;this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),r=/^#./.test(u)&&n(u);return r&&r.length&&r.is(":visible")&&[[r[i]().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),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.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);if(u&&i<=t[0])return u!=(n=r[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;n(this.selector).parentsUntil(this.options.target,".active").removeClass("active");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")};var i=n.fn.scrollspy;n.fn.scrollspy=function(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]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(jQuery);+function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),(t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.parent("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})))};t.prototype.activate=function(t,i,r){function f(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");e?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),e=r&&n.support.transition&&u.hasClass("fade");e?u.one(n.support.transition.end,f).emulateTransitionEnd(150):f();u.removeClass("in")};i=n.fn.tab;n.fn.tab=function(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]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(jQuery);+function(n){"use strict";var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$window=n(window).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=this.unpin=this.pinnedOffset=null;this.checkPosition()},i;t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$window.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,h;if(this.$element.is(":visible")){var c=n(document).height(),o=this.$window.scrollTop(),s=this.$element.offset(),r=this.options.offset,f=r.top,u=r.bottom;"top"==this.affixed&&(s.top+=o);"object"!=typeof r&&(u=f=r);"function"==typeof f&&(f=r.top(this.$element));"function"==typeof u&&(u=r.bottom(this.$element));i=null!=this.unpin&&o+this.unpin<=s.top?!1:null!=u&&s.top+this.$element.height()>=c-u?"bottom":null!=f&&f>=o?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),h=n.Event(e+".bs.affix"),this.$element.trigger(h),h.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(e).trigger(n.Event(e.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-u-this.$element.height()})))}};i=n.fn.affix;n.fn.affix=function(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]()})};n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(jQuery);typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t}),function(n){var i={init:function(t){return this.options=n.extend({},n.noty.defaults,t),this.options.layout=this.options.custom?n.noty.layouts.inline:n.noty.layouts[this.options.layout],this.options.theme=n.noty.themes[this.options.theme],delete t.layout,delete t.theme,this.options=n.extend({},this.options,this.options.layout.options),this.options.id="noty_"+(new Date).getTime()*Math.floor(Math.random()*1e6),this.options=n.extend({},this.options,t),this._build(),this},_build:function(){var t=n('<div class="noty_bar"><\/div>').attr("id",this.options.id),i,r;t.append(this.options.template).find(".noty_text").html(this.options.text);this.$bar=this.options.layout.parent.object!==null?n(this.options.layout.parent.object).css(this.options.layout.parent.css).append(t):t;this.options.buttons&&(this.options.closeWith=[],this.options.timeout=!1,i=n("<div/>").addClass("noty_buttons"),this.options.layout.parent.object!==null?this.$bar.find(".noty_bar").append(i):this.$bar.append(i),r=this,n.each(this.options.buttons,function(t,i){var u=n("<button/>").addClass(i.addClass?i.addClass:"gray").html(i.text).appendTo(r.$bar.find(".noty_buttons")).bind("click",function(){n.isFunction(i.onClick)&&i.onClick.call(u,r)})}));this.$message=this.$bar.find(".noty_message");this.$closeButton=this.$bar.find(".noty_close");this.$buttons=this.$bar.find(".noty_buttons");n.noty.store[this.options.id]=this},show:function(){var t=this;if(n(t.options.layout.container.selector).append(t.$bar),t.options.theme.style.apply(t),n.type(t.options.layout.css)==="function"?this.options.layout.css.apply(t.$bar):t.$bar.css(this.options.layout.css||{}),t.$bar.addClass(t.options.layout.addClass),t.options.layout.container.style.apply(n(t.options.layout.container.selector)),t.options.theme.callback.onShow.apply(this),n.inArray("click",t.options.closeWith)>-1)t.$bar.css("cursor","pointer").one("click",function(n){t.stopPropagation(n);t.options.callback.onCloseClick&&t.options.callback.onCloseClick.apply(t);t.close()});if(n.inArray("hover",t.options.closeWith)>-1)t.$bar.one("mouseenter",function(){t.close()});if(n.inArray("button",t.options.closeWith)>-1)t.$closeButton.one("click",function(n){t.stopPropagation(n);t.close()});return n.inArray("button",t.options.closeWith)==-1&&t.$closeButton.remove(),t.options.callback.onShow&&t.options.callback.onShow.apply(t),t.$bar.animate(t.options.animation.open,t.options.animation.speed,t.options.animation.easing,function(){t.options.callback.afterShow&&t.options.callback.afterShow.apply(t);t.shown=!0}),t.options.timeout&&t.$bar.delay(t.options.timeout).promise().done(function(){t.close()}),this},close:function(){var t,i;if(!this.closed&&(!this.$bar||!this.$bar.hasClass("i-am-closing-now"))){if(t=this,!this.shown){i=[];n.each(n.noty.queue,function(n,r){r.options.id!=t.options.id&&i.push(r)});n.noty.queue=i;return}t.$bar.addClass("i-am-closing-now");t.options.callback.onClose&&t.options.callback.onClose.apply(t);t.$bar.clearQueue().stop().animate(t.options.animation.close,t.options.animation.speed,t.options.animation.easing,function(){t.options.callback.afterClose&&t.options.callback.afterClose.apply(t)}).promise().done(function(){t.options.modal&&(n.notyRenderer.setModalCount(-1),n.notyRenderer.getModalCount()==0&&n(".noty_modal").fadeOut("fast",function(){n(this).remove()}));n.notyRenderer.setLayoutCountFor(t,-1);n.notyRenderer.getLayoutCountFor(t)==0&&n(t.options.layout.container.selector).remove();typeof t.$bar!="undefined"&&t.$bar!==null&&(t.$bar.remove(),t.$bar=null,t.closed=!0);delete n.noty.store[t.options.id];t.options.theme.callback.onClose.apply(t);t.options.dismissQueue||(n.noty.ontap=!0,n.notyRenderer.render());t.options.maxVisible>0&&t.options.dismissQueue&&n.notyRenderer.render()})}},setText:function(n){return this.closed||(this.options.text=n,this.$bar.find(".noty_text").html(n)),this},setType:function(n){return this.closed||(this.options.type=n,this.options.theme.style.apply(this),this.options.theme.callback.onShow.apply(this)),this},setTimeout:function(n){if(!this.closed){var t=this;this.options.timeout=n;t.$bar.delay(t.options.timeout).promise().done(function(){t.close()})}return this},stopPropagation:function(n){n=n||window.event;typeof n.stopPropagation!="undefined"?n.stopPropagation():n.cancelBubble=!0},closed:!1,shown:!1},t;n.notyRenderer={};n.notyRenderer.init=function(t){var r=Object.create(i).init(t);return r.options.force?n.noty.queue.unshift(r):n.noty.queue.push(r),n.notyRenderer.render(),n.noty.returns=="object"?r:r.options.id};n.notyRenderer.render=function(){var t=n.noty.queue[0];n.type(t)==="object"?t.options.dismissQueue?t.options.maxVisible>0?n(t.options.layout.container.selector+" li").length<t.options.maxVisible&&n.notyRenderer.show(n.noty.queue.shift()):n.notyRenderer.show(n.noty.queue.shift()):n.noty.ontap&&(n.notyRenderer.show(n.noty.queue.shift()),n.noty.ontap=!1):n.noty.ontap=!0};n.notyRenderer.show=function(t){t.options.modal&&(n.notyRenderer.createModalFor(t),n.notyRenderer.setModalCount(1));n(t.options.layout.container.selector).length==0?t.options.custom?t.options.custom.append(n(t.options.layout.container.object).addClass("i-am-new")):n("body").append(n(t.options.layout.container.object).addClass("i-am-new")):n(t.options.layout.container.selector).removeClass("i-am-new");n.notyRenderer.setLayoutCountFor(t,1);t.show()};n.notyRenderer.createModalFor=function(t){n(".noty_modal").length==0&&n("<div/>").addClass("noty_modal").data("noty_modal_count",0).css(t.options.theme.modal.css).prependTo(n("body")).fadeIn("fast")};n.notyRenderer.getLayoutCountFor=function(t){return n(t.options.layout.container.selector).data("noty_layout_count")||0};n.notyRenderer.setLayoutCountFor=function(t,i){return n(t.options.layout.container.selector).data("noty_layout_count",n.notyRenderer.getLayoutCountFor(t)+i)};n.notyRenderer.getModalCount=function(){return n(".noty_modal").data("noty_modal_count")||0};n.notyRenderer.setModalCount=function(t){return n(".noty_modal").data("noty_modal_count",n.notyRenderer.getModalCount()+t)};n.fn.noty=function(t){return t.custom=n(this),n.notyRenderer.init(t)};n.noty={};n.noty.queue=[];n.noty.ontap=!0;n.noty.layouts={};n.noty.themes={};n.noty.returns="object";n.noty.store={};n.noty.get=function(t){return n.noty.store.hasOwnProperty(t)?n.noty.store[t]:!1};n.noty.close=function(t){return n.noty.get(t)?n.noty.get(t).close():!1};n.noty.setText=function(t,i){return n.noty.get(t)?n.noty.get(t).setText(i):!1};n.noty.setType=function(t,i){return n.noty.get(t)?n.noty.get(t).setType(i):!1};n.noty.clearQueue=function(){n.noty.queue=[]};n.noty.closeAll=function(){n.noty.clearQueue();n.each(n.noty.store,function(n,t){t.close()})};t=window.alert;n.noty.consumeAlert=function(t){window.alert=function(i){t?t.text=i:t={text:i};n.notyRenderer.init(t)}};n.noty.stopConsumeAlert=function(){window.alert=t};n.noty.defaults={layout:"top",theme:"defaultTheme",type:"alert",text:"",dismissQueue:!0,template:'<div class="noty_message"><span class="noty_text"><\/span><div class="noty_close"><\/div><\/div>',animation:{open:{height:"toggle"},close:{height:"toggle"},easing:"swing",speed:500},timeout:!1,force:!1,modal:!1,maxVisible:5,closeWith:["click"],callback:{onShow:function(){},afterShow:function(){},onClose:function(){},afterClose:function(){},onCloseClick:function(){}},buttons:!1};n(window).resize(function(){n.each(n.noty.layouts,function(t,i){i.container.style.apply(n(i.container.selector))})})}(jQuery);window.noty=function(n){var t=0,i={animateOpen:"animation.open",animateClose:"animation.close",easing:"animation.easing",speed:"animation.speed",onShow:"callback.onShow",onShown:"callback.afterShow",onClose:"callback.onClose",onCloseClick:"callback.onCloseClick",onClosed:"callback.afterClose"};return jQuery.each(n,function(r,u){if(i[r]){t++;var f=i[r].split(".");n[f[0]]||(n[f[0]]={});n[f[0]][f[1]]=u?u:function(){};delete n[r]}}),n.closeWith||(n.closeWith=jQuery.noty.defaults.closeWith),n.hasOwnProperty("closeButton")&&(t++,n.closeButton&&n.closeWith.push("button"),delete n.closeButton),n.hasOwnProperty("closeOnSelfClick")&&(t++,n.closeOnSelfClick&&n.closeWith.push("click"),delete n.closeOnSelfClick),n.hasOwnProperty("closeOnSelfOver")&&(t++,n.closeOnSelfOver&&n.closeWith.push("hover"),delete n.closeOnSelfOver),n.hasOwnProperty("custom")&&(t++,n.custom.container!="null"&&(n.custom=n.custom.container)),n.hasOwnProperty("cssPrefix")&&(t++,delete n.cssPrefix),n.theme=="noty_theme_default"&&(t++,n.theme="defaultTheme"),n.hasOwnProperty("dismissQueue")||(n.dismissQueue=jQuery.noty.defaults.dismissQueue),n.hasOwnProperty("maxVisible")||(n.maxVisible=jQuery.noty.defaults.maxVisible),n.buttons&&jQuery.each(n.buttons,function(n,i){i.click&&(t++,i.onClick=i.click,delete i.click);i.type&&(t++,i.addClass=i.type,delete i.type)}),t&&typeof console!="undefined"&&console.warn&&console.warn("You are using noty v2 with v1.x.x options. @deprecated until v2.2.0 - Please update your options."),jQuery.notyRenderer.init(n)},function(n){n.noty.layouts.top={name:"top",options:{},container:{object:'<ul id="noty_top_layout_container" />',selector:"ul#noty_top_layout_container",style:function(){n(this).css({top:0,left:"5%",position:"fixed",width:"90%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""}}(jQuery),function(n){n.noty.layouts.bottom={name:"bottom",options:{},container:{object:'<ul id="noty_bottom_layout_container" />',selector:"ul#noty_bottom_layout_container",style:function(){n(this).css({bottom:0,left:"0%",position:"fixed",width:"100%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""}}(jQuery),function(n){n.noty.layouts.topRight={name:"topRight",options:{},container:{object:'<ul id="noty_topRight_layout_container" />',selector:"ul#noty_topRight_layout_container",style:function(){n(this).css({top:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});window.innerWidth<600&&n(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(n){n.noty.layouts.bottomLeft={name:"bottomLeft",options:{},container:{object:'<ul id="noty_bottomLeft_layout_container" />',selector:"ul#noty_bottomLeft_layout_container",style:function(){n(this).css({bottom:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});window.innerWidth<600&&n(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""}}(jQuery),function(n){n.noty.themes.defaultTheme={name:"defaultTheme",helpers:{borderFix:function(){if(this.options.dismissQueue){var t=this.options.layout.container.selector+" "+this.options.layout.parent.selector;switch(this.options.layout.name){case"top":n(t).css({borderRadius:"0px 0px 0px 0px"});n(t).last().css({borderRadius:"0px 0px 2px 2px"});break;case"topCenter":case"topLeft":case"topRight":case"bottomCenter":case"bottomLeft":case"bottomRight":case"center":case"centerLeft":case"centerRight":case"inline":n(t).css({borderRadius:"0px 0px 0px 0px"});n(t).first().css({"border-top-left-radius":"5px","border-top-right-radius":"5px"});n(t).last().css({"border-bottom-left-radius":"5px","border-bottom-right-radius":"5px"});break;case"bottom":n(t).css({borderRadius:"0px 0px 0px 0px"});n(t).first().css({borderRadius:"5px 5px 0px 0px"})}}}},modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:15e3,opacity:.6,display:"none",left:0,top:0}},style:function(){this.$bar.css({overflow:"hidden",background:"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"});this.$message.css({fontSize:"13px",lineHeight:"16px",textAlign:"center",padding:"8px 10px 9px",width:"auto",position:"relative"});this.$closeButton.css({position:"absolute",top:4,right:4,width:10,height:10,background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuOWwzfk4AAACnSURBVChTdY89CgIxEIVzmpxlL7WFNt7CRrTyIqJYrGIheAOXTSAJ5I/4JhvSJH4Q3szw5icspcSFEG9oklJeKGcAOlKtMDKYPiXJhBBOkAFNz7WSB7yos8EY8y1hhSbeSvwXeKZ8I9Yd11ILTHdIvpvMQ28dEWPcQzjz3m+WZamH97DWnruf6dEYMf3qnDuUtMIwdjvP84MS6ATh9GDOH1RKGa317gcTFHVIlADY5QAAAABJRU5ErkJggg==)",display:"none",cursor:"pointer"});this.$buttons.css({padding:5,textAlign:"right",borderTop:"1px solid #ccc",backgroundColor:"#fff"});this.$buttons.find("button").css({marginLeft:5});this.$buttons.find("button:first").css({marginLeft:0});this.$bar.bind({mouseenter:function(){n(this).find(".noty_close").stop().fadeTo("normal",1)},mouseleave:function(){n(this).find(".noty_close").stop().fadeTo("normal",0)}});switch(this.options.layout.name){case"top":this.$bar.css({borderRadius:"0",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break;case"topCenter":case"center":case"bottomCenter":case"inline":this.$bar.css({borderRadius:"2px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});this.$message.css({fontSize:"13px",textAlign:"center"});break;case"topLeft":case"topRight":case"bottomLeft":case"bottomRight":case"centerLeft":case"centerRight":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});this.$message.css({fontSize:"13px",textAlign:"left"});break;case"bottom":this.$bar.css({borderRadius:"2px 2px 0px 0px",borderTop:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 -2px 4px rgba(0, 0, 0, 0.1)"});break;default:this.$bar.css({border:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"})}switch(this.options.type){case"alert":case"notification":this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"});break;case"warning":this.$bar.css({backgroundColor:"#FAA732",borderColor:"rgb(95, 66, 0)",color:"rgb(77, 53, 3)","text-shadow":"0 1px 0 rgba(255, 255, 255, 0.41)"});this.$buttons.css({borderTop:"1px solid #FFC237"});break;case"error":this.$bar.css({backgroundColor:"rgb(158, 48, 48)",borderColor:"darkred",color:"#FFF"});this.$message.css({fontWeight:"bold"});this.$buttons.css({borderTop:"1px solid darkred"});break;case"information":this.$bar.css({background:""});this.$bar.css({backgroundColor:"rgb(50,59,63,0.8)",borderColor:"#999999",color:"#FFF"});this.$buttons.css({borderTop:"1px solid #0B90C4",color:"#ffffff"});break;case"success":this.$bar.css({backgroundColor:"rgb(74, 162, 52)",borderColor:"rgb(9, 73, 0)",color:"#fff","text-shadow":"0 1px 0 rgba(0, 0, 0, 0.44)"});this.$buttons.css({borderTop:"1px solid #50C24E"});break;default:this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"})}},callback:{onShow:function(){n.noty.themes.defaultTheme.helpers.borderFix.apply(this)},onClose:function(){n.noty.themes.defaultTheme.helpers.borderFix.apply(this)}}}}(jQuery);!function(n,t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):n.bootbox=t(n.jQuery)}(this,function a(n,t){"use strict";function a(n){var t=o[e.locale];return t?t[n]:o.en[n]}function f(t,i,r){t.stopPropagation();t.preventDefault();var u=n.isFunction(r)&&r(t)===!1;u||i.modal("hide")}function v(n){var i,t=0;for(i in n)t++;return t}function r(t,i){var r=0;n.each(t,function(n,t){i(n,t,r++)})}function y(t){var i,u;if("object"!=typeof t)throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return t=n.extend({},e,t),t.buttons||(t.buttons={}),t.backdrop=t.backdrop?"static":!1,i=t.buttons,u=v(i),r(i,function(t,r,f){if(n.isFunction(r)&&(r=i[t]={callback:r}),"object"!==n.type(r))throw new Error("button with key "+t+" must be an object");r.label||(r.label=t);r.className||(r.className=2>=u&&f===u-1?"btn-primary":"btn-default")}),t}function p(n,t){var r=n.length,i={};if(1>r||r>2)throw new Error("Invalid argument length");return 2===r||"string"==typeof n[0]?(i[t[0]]=n[0],i[t[1]]=n[1]):i=n[0],i}function s(t,i,r){return n.extend(!0,{},t,p(i,r))}function h(n,t,i,r){var u={className:"bootbox-"+n,buttons:c.apply(null,t)};return l(s(u,r,i),t)}function c(){for(var t={},n=0,r=arguments.length;r>n;n++){var i=arguments[n],u=i.toLowerCase(),f=i.toUpperCase();t[u]={label:a(f)}}return t}function l(n,i){var u={};return r(i,function(n,t){u[t]=!0}),r(n.buttons,function(n){if(u[n]===t)throw new Error("button key "+n+" is not allowed (options are "+i.join("\n")+")");}),n}var u={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'><\/div><\/div><\/div><\/div><\/div>",header:"<div class='modal-header'><h4 class='modal-title'><\/h4><\/div>",footer:"<div class='modal-footer'><\/div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;<\/button>",form:"<form class='bootbox-form'><\/form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'><\/textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'><\/select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /><\/label><\/div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},e={locale:"en",backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},i={},o;return i.alert=function(){var t;if(t=h("alert",["ok"],["message","callback"],arguments),t.callback&&!n.isFunction(t.callback))throw new Error("alert requires callback property to be a function when provided");return t.buttons.ok.callback=t.onEscape=function(){return n.isFunction(t.callback)?t.callback():!0},i.dialog(t)},i.confirm=function(){var t;if(t=h("confirm",["cancel","confirm"],["message","callback"],arguments),t.buttons.cancel.callback=t.onEscape=function(){return t.callback(!1)},t.buttons.confirm.callback=function(){return t.callback(!0)},!n.isFunction(t.callback))throw new Error("confirm requires a callback");return i.dialog(t)},i.prompt=function(){var f,p,h,v,e,w,o,b,y,a,k;if(v=n(u.form),p={className:"bootbox-prompt",buttons:c("cancel","confirm"),value:"",inputType:"text"},f=l(s(p,arguments,["title","callback"]),["cancel","confirm"]),w=f.show===t?!0:f.show,b=["date","time","number"],y=document.createElement("input"),y.setAttribute("type",f.inputType),b[f.inputType]&&(f.inputType=y.type),f.message=v,f.buttons.cancel.callback=f.onEscape=function(){return f.callback(null)},f.buttons.confirm.callback=function(){var t,i;switch(f.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":t=e.val();break;case"checkbox":i=e.find("input:checked");t=[];r(i,function(i,r){t.push(n(r).val())})}return f.callback(t)},f.show=!1,!f.title)throw new Error("prompt requires a title");if(!n.isFunction(f.callback))throw new Error("prompt requires a callback");if(!u.inputs[f.inputType])throw new Error("invalid prompt type");switch(e=n(u.inputs[f.inputType]),f.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":e.val(f.value);break;case"select":if(a={},o=f.inputOptions||[],!o.length)throw new Error("prompt with select requires options");r(o,function(i,r){var u=e;if(r.value===t||r.text===t)throw new Error("given options in wrong format");r.group&&(a[r.group]||(a[r.group]=n("<optgroup/>").attr("label",r.group)),u=a[r.group]);u.append("<option value='"+r.value+"'>"+r.text+"<\/option>")});r(a,function(n,t){e.append(t)});e.val(f.value);break;case"checkbox":if(k=n.isArray(f.value)?f.value:[f.value],o=f.inputOptions||[],!o.length)throw new Error("prompt with checkbox requires options");if(!o[0].value||!o[0].text)throw new Error("given options in wrong format");e=n("<div/>");r(o,function(t,i){var o=n(u.inputs[f.inputType]);o.find("input").attr("value",i.value);o.find("label").append(i.text);r(k,function(n,t){t===i.value&&o.find("input").prop("checked",!0)});e.append(o)})}return f.placeholder&&e.attr("placeholder",f.placeholder),f.pattern&&e.attr("pattern",f.pattern),v.append(e),v.on("submit",function(n){n.preventDefault();h.find(".btn-primary").click()}),h=i.dialog(f),h.off("shown.bs.modal"),h.on("shown.bs.modal",function(){e.focus()}),w===!0&&h.modal("show"),h},i.dialog=function(t){var h;t=y(t);var i=n(u.dialog),o=i.find(".modal-body"),c=t.buttons,s="",e={onEscape:t.onEscape};return(r(c,function(n,t){s+="<button data-bb-handler='"+n+"' type='button' class='btn "+t.className+"'>"+t.label+"<\/button>";e[n]=t.callback}),o.find(".bootbox-body").html(t.message),t.animate===!0&&i.addClass("fade"),t.className&&i.addClass(t.className),t.title&&o.before(u.header),t.closeButton)&&(h=n(u.closeButton),t.title?i.find(".modal-header").prepend(h):h.css("margin-top","-10px").prependTo(o)),t.title&&i.find(".modal-title").html(t.title),s.length&&(o.after(u.footer),i.find(".modal-footer").html(s)),i.on("hidden.bs.modal",function(n){n.target===this&&i.remove()}),i.on("shown.bs.modal",function(){i.find(".btn-primary:first").focus()}),i.on("escape.close.bb",function(n){e.onEscape&&f(n,i,e.onEscape)}),i.on("click",".modal-footer button",function(t){var r=n(this).data("bb-handler");f(t,i,e[r])}),i.on("click",".bootbox-close-button",function(n){f(n,i,e.onEscape)}),i.on("keyup",function(n){27===n.which&&i.trigger("escape.close.bb")}),n(t.container).append(i),i.modal({backdrop:t.backdrop,keyboard:!1,show:!1}),t.show&&i.modal("show"),i},i.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0];n.extend(e,t)},i.hideAll=function(){n(".bootbox").modal("hide")},o={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}},i.init=function(t){return a(t||n)},i}),function(n,t,r,u){function o(t,i){this.options=n.extend(!0,{},f,i);this.input=t;this.$input=n(t);this.$input.addClass("geocomplete-input");this._defaults=f;this._name="geocomplete";this.init()}var f={bounds:!0,country:null,map:!1,details:!1,detailsAttribute:"name",autoselect:!1,location:!1,mapOptions:{zoom:14,scrollwheel:!1,mapTypeId:"roadmap"},markerOptions:{draggable:!1},maxZoom:16,types:["geocode"],blur:!1,clearonblur:!1},s="street_address route intersection political country administrative_area_level_1 administrative_area_level_2 administrative_area_level_3 colloquial_area locality sublocality neighborhood premise subpremise postal_code natural_feature airport park point_of_interest post_box street_number floor room lat lng viewport location formatted_address location_type bounds".split(" "),e="id place_id url website vicinity reference name rating international_phone_number icon formatted_phone_number".split(" ");n.extend(o.prototype,{init:function(){this.initMap();this.initMarker();this.initGeocoder();this.initDetails();this.initLocation()},initMap:function(){if(this.options.map){if(typeof this.options.map.setCenter=="function"){this.map=this.options.map;return}this.map=new google.maps.Map(n(this.options.map)[0],this.options.mapOptions);google.maps.event.addListener(this.map,"click",n.proxy(this.mapClicked,this));google.maps.event.addListener(this.map,"zoom_changed",n.proxy(this.mapZoomed,this))}},initMarker:function(){if(this.map){var t=n.extend(this.options.markerOptions,{map:this.map});t.disabled||(this.marker=new google.maps.Marker(t),google.maps.event.addListener(this.marker,"dragend",n.proxy(this.markerDragged,this)))}},initGeocoder:function(){var t={types:this.options.types,bounds:this.options.bounds===!0?null:this.options.bounds,componentRestrictions:this.options.componentRestrictions};this.options.country&&(t.componentRestrictions={country:this.options.country});this.autocomplete=new google.maps.places.Autocomplete(this.input,t);this.geocoder=new google.maps.Geocoder;this.map&&this.options.bounds===!0&&this.autocomplete.bindTo("bounds",this.map);google.maps.event.addListener(this.autocomplete,"place_changed",n.proxy(this.placeChanged,this));this.$input.keypress(function(n){if(n.keyCode===13)return!1});this.$input.bind("geocode",n.proxy(function(){this.find()},this));this.options.blur===!0&&this.$input.blur(n.proxy(function(){this.find()},this));this.options.clearonblur===!0&&this.$input.blur(n.proxy(function(){var t=n("input.geocomplete-input");for(i=0;i<t.length;i++)if(this.$input.prop("id")==n(t[i]).prop("id")){n(n(".pac-container")[i]).css("display")=="none"&&(n(this.options.details+" input["+this.options.detailsAttribute+"]").val(""),this.trigger("geocode:noresults",null));break}},this))},initDetails:function(){function t(n){r[n]=i.find("["+u+"="+n+"]")}if(this.options.details){var i=n(this.options.details),u=this.options.detailsAttribute,r={};n.each(s,function(n,i){t(i);t(i+"_short")});n.each(e,function(n,i){t(i)});this.$details=i;this.details=r}},initLocation:function(){var n=this.options.location,t;if(n){if(typeof n=="string"){this.find(n);return}n instanceof Array&&(t=new google.maps.LatLng(n[0],n[1]));n instanceof google.maps.LatLng&&(t=n);t&&(this.map&&this.map.setCenter(t),this.marker&&this.marker.setPosition(t))}},find:function(n){this.geocode({address:n||this.$input.val()})},geocode:function(t){this.options.bounds&&!t.bounds&&(t.bounds=this.options.bounds===!0?this.map&&this.map.getBounds():this.options.bounds);this.options.country&&(t.region=this.options.country);this.geocoder.geocode(t,n.proxy(this.handleGeocode,this))},selectFirstResult:function(){return""},handleGeocode:function(n,t){if(t===google.maps.GeocoderStatus.OK){var i=n[0];this.$input.val(i.formatted_address);this.update(i);n.length>1?this.trigger("geocode:multiple",n):n.length==0&&this.trigger("geocode:noresults",n)}else this.trigger("geocode:error",t)},trigger:function(n,t){this.$input.trigger(n,[t])},center:function(n){n.viewport?(this.map.fitBounds(n.viewport),this.map.getZoom()>this.options.maxZoom&&this.map.setZoom(this.options.maxZoom)):(this.map.setZoom(this.options.maxZoom),this.map.setCenter(n.location));this.marker&&(this.marker.setPosition(n.location),this.marker.setAnimation(this.options.markerOptions.animation))},update:function(n){this.map&&this.center(n.geometry);this.$details&&this.fillDetails(n);this.trigger("geocode:result",n)},fillDetails:function(t){var i={},r=t.geometry,u=r.viewport,f=r.bounds;n.each(t.address_components,function(t,r){var u=r.types[0];n.each(r.types,function(n,t){i[t]=r.long_name;i[t+"_short"]=r.short_name})});n.each(e,function(n,r){i[r]=t[r]});n.extend(i,{formatted_address:t.formatted_address,location_type:r.location_type||"PLACES",viewport:u,bounds:f,location:r.location,lat:r.location.lat(),lng:r.location.lng()});n.each(this.details,n.proxy(function(n,t){var r=i[n];this.setDetail(t,r)},this));this.data=i},setDetail:function(n,t){t===u?t="":typeof t.toUrlValue=="function"&&(t=t.toUrlValue());n.is(":input")?n.val(t):n.text(t)},markerDragged:function(n){this.trigger("geocode:dragged",n.latLng)},mapClicked:function(n){this.trigger("geocode:click",n.latLng)},mapZoomed:function(){this.trigger("geocode:zoom",this.map.getZoom())},resetMarker:function(){this.marker.setPosition(this.data.location);this.setDetail(this.details.lat,this.data.location.lat());this.setDetail(this.details.lng,this.data.location.lng())},placeChanged:function(){var n=this.autocomplete.getPlace(),t;n&&n.geometry?this.update(n):this.options.autoselect&&(t=this.selectFirstResult(),this.find(t))}});n.fn.geocomplete=function(t){var r="plugin_geocomplete",u,i;return typeof t=="string"?(u=n(this).data(r)||n(this).geocomplete().data(r),i=u[t],typeof i=="function"?(i.apply(u,Array.prototype.slice.call(arguments,1)),n(this)):(arguments.length==2&&(i=arguments[1]),i)):this.each(function(){var i=n.data(this,r);i||(i=new o(this,t),n.data(this,r,i))})}}(jQuery,window,document);!function(n){"use strict";var t={i18n:{ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:0,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){for(var i=t||0,r=this.length;i<r;i++)if(this[i]===n)return i;return-1});n.fn.xdsoftScroller=function(t){return this.each(function(){var i=n(this);if(!n(this).hasClass("xdsoft_scroller_box")){var c=function(n){var t={x:0,y:0},i;return"touchstart"==n.type||"touchmove"==n.type||"touchend"==n.type||"touchcancel"==n.type?(i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0],t.x=i.pageX,t.y=i.pageY):"mousedown"!=n.type&&"mouseup"!=n.type&&"mousemove"!=n.type&&"mouseover"!=n.type&&"mouseout"!=n.type&&"mouseenter"!=n.type&&"mouseleave"!=n.type||(t.x=n.pageX,t.y=n.pageY),t},l=0,f=i.children().eq(0),u=i[0].clientHeight,e=f[0].offsetHeight,o=n('<div class="xdsoft_scrollbar"><\/div>'),r=n('<div class="xdsoft_scroller"><\/div>'),s=100,h=!1;o.append(r);i.addClass("xdsoft_scroller_box").append(o);r.on("mousedown.xdsoft_scroller",function(f){u||i.trigger("resize_scroll.xdsoft_scroller",[t]);var h=f.pageY,c=parseInt(r.css("margin-top")),e=o[0].offsetHeight;n(document.body).addClass("xdsoft_noselect");n([document.body,window]).on("mouseup.xdsoft_scroller",function t(){n([document.body,window]).off("mouseup.xdsoft_scroller",t).off("mousemove.xdsoft_scroller",l).removeClass("xdsoft_noselect")});n(document.body).on("mousemove.xdsoft_scroller",l=function(n){var t=n.pageY-h+c;t<0&&(t=0);t+r[0].offsetHeight>e&&(t=e-r[0].offsetHeight);i.trigger("scroll_element.xdsoft_scroller",[s?t/s:0])})});i.on("scroll_element.xdsoft_scroller",function(n,t){u||i.trigger("resize_scroll.xdsoft_scroller",[t,!0]);t=t>1?1:t<0||isNaN(t)?0:t;r.css("margin-top",s*t);f.css("marginTop",-parseInt((e-u)*t))}).on("resize_scroll.xdsoft_scroller",function(n,t,h){u=i[0].clientHeight;e=f[0].offsetHeight;var c=u/e,l=c*o[0].offsetHeight;c>1?r.hide():(r.show(),r.css("height",parseInt(l>10?l:10)),s=o[0].offsetHeight-r[0].offsetHeight,h!==!0&&i.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(f.css("marginTop")))/(e-u)]))});i.mousewheel&&i.mousewheel(function(n,t){var r=Math.abs(parseInt(f.css("marginTop")));return i.trigger("scroll_element.xdsoft_scroller",[(r-20*t)/(e-u)]),n.stopPropagation(),!1});i.on("touchstart",function(n){h=c(n)});i.on("touchmove",function(n){if(h){var t=c(n),r=Math.abs(parseInt(f.css("marginTop")));i.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-h.y))/(e-u)]);n.stopPropagation();n.preventDefault()}});i.on("touchend touchcancel",function(){h=!1})}i.trigger("resize_scroll.xdsoft_scroller",[t])})};n.fn.datetimepicker=function(i){var s=48,p=57,h=96,c=105,e=17,u=46,l=13,w=27,f=8,b=37,k=38,d=39,g=40,a=9,nt=116,tt=65,it=67,rt=86,ut=90,ft=89,o=!1,r=n.isPlainObject(i)||!i?n.extend(!0,{},t,i):n.extend({},t),v=0,et=function(n){n.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(){n.is(":disabled")||n.is(":hidden")||!n.is(":visible")||n.data("xdsoft_datetimepicker")||(clearTimeout(v),v=setTimeout(function(){n.data("xdsoft_datetimepicker")||y(n);n.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},y=function(t){function kt(){var n=r.value?r.value:t&&t.val&&t.val()?t.val():"";return n&&v.isValidDate(n=Date.parseDate(n,r.format))?i.data("changed",!0):n="",n||r.startDate===!1||(n=v.strToDateTime(r.startDate)),n?n:0}var i=n("<div "+(r.id?'id="'+r.id+'"':"")+" "+(r.style?'style="'+r.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+r.className+'"><\/div>'),dt=n('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net<\/a><\/div>'),ht=n('<div class="xdsoft_datepicker active"><\/div>'),et=n('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"><\/button><button type="button" class="xdsoft_today_button"><\/button><div class="xdsoft_label xdsoft_month"><span><\/span><\/div><div class="xdsoft_label xdsoft_year"><span><\/span><\/div><button type="button" class="xdsoft_next"><\/button><\/div>'),yt=n('<div class="xdsoft_calendar"><\/div>'),ct=n('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"><\/button><div class="xdsoft_time_box"><\/div><button type="button" class="xdsoft_next"><\/button><\/div>'),ot=ct.find(".xdsoft_time_box").eq(0),y=n('<div class="xdsoft_time_variant"><\/div>'),gt=n('<div class="xdsoft_scrollbar"><\/div>'),pt=(n('<div class="xdsoft_scroller"><\/div>'),n('<div class="xdsoft_select xdsoft_monthselect"><div><\/div><\/div>')),wt=n('<div class="xdsoft_select xdsoft_yearselect"><div><\/div><\/div>'),lt,v,at,st,vt,bt;et.find(".xdsoft_month span").after(pt);et.find(".xdsoft_year span").after(wt);et.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){var r,u;et.find(".xdsoft_select").hide();var i=n(this).find(".xdsoft_select").eq(0),f=0,e=0;for(v.currentTime&&(f=v.currentTime[n(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),i.show(),r=i.find("div.xdsoft_option"),u=0;u<r.length&&r.eq(u).data("value")!=f;u++)e+=r[0].offsetHeight;return i.xdsoftScroller(e/(i.children()[0].offsetHeight-i[0].clientHeight)),t.stopPropagation(),!1});et.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(n){n.stopPropagation();n.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(){v&&v.currentTime&&v.currentTime[n(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](n(this).data("value"));n(this).parent().parent().hide();i.trigger("xchange.xdsoft");r.onChangeMonth&&r.onChangeMonth.call&&r.onChangeMonth.call(i,v.currentTime,i.data("input"))});i.setOptions=function(y){if(r=n.extend(!0,{},r,y),y.allowTimes&&n.isArray(y.allowTimes)&&y.allowTimes.length&&(r.allowTimes=n.extend(!0,[],y.allowTimes)),y.weekends&&n.isArray(y.weekends)&&y.weekends.length&&(r.weekends=n.extend(!0,[],y.weekends)),!r.open&&!r.opened||r.inline||t.trigger("open.xdsoft"),r.inline&&(i.addClass("xdsoft_inline"),t.after(i).hide(),i.trigger("afterOpen.xdsoft")),r.inverseButton&&(r.next="xdsoft_prev",r.prev="xdsoft_next"),r.datepicker?ht.addClass("active"):ht.removeClass("active"),r.timepicker?ct.addClass("active"):ct.removeClass("active"),r.value&&(t&&t.val&&t.val(r.value),v.setCurrentTime(r.value)),r.dayOfWeekStart=isNaN(r.dayOfWeekStart)||parseInt(r.dayOfWeekStart)<0||parseInt(r.dayOfWeekStart)>6?0:parseInt(r.dayOfWeekStart),r.timepickerScrollbar||gt.hide(),r.minDate&&/^-(.*)$/.test(r.minDate)&&(r.minDate=v.strToDateTime(r.minDate).dateFormat(r.formatDate)),r.maxDate&&/^\+(.*)$/.test(r.maxDate)&&(r.maxDate=v.strToDateTime(r.maxDate).dateFormat(r.formatDate)),et.find(".xdsoft_today_button").css("visibility",r.todayButton?"visible":"hidden"),r.mask){var st=function(n){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(n.setSelectionRange)return n.selectionStart}catch(n){return 0}},lt=function(n,t){var n="string"==typeof n||n instanceof String?document.getElementById(n):n,i;return n?n.createTextRange?(i=n.createTextRange(),i.collapse(!0),i.moveEnd(t),i.moveStart(t),i.select(),!0):!!n.setSelectionRange&&(n.setSelectionRange(t,t),!0):!1},ot=function(n,t){var i=n.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(i).test(t)};switch(t.off("keydown.xdsoft"),!0){case r.mask===!0:r.mask=r.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==n.type(r.mask):ot(r.mask,t.val())||t.val(r.mask.replace(/[0-9]/g,"_"));t.on("keydown.xdsoft",function(i){var et=this.value,v=i.which,y,ht;switch(!0){case v>=s&&v<=p||v>=h&&v<=c||v==f||v==u:for(y=st(this),ht=v!=f&&v!=u?String.fromCharCode(h<=v&&v<=c?v-s:v):"_",v!=f&&v!=u||!y||(y--,ht="_");/[^0-9_]/.test(r.mask.substr(y,1))&&y<r.mask.length&&y>0;)y+=v==f||v==u?-1:1;if(et=et.substr(0,y)+ht+et.substr(y+1),""==n.trim(et))et=r.mask.replace(/[0-9]/g,"_");else if(y==r.mask.length)break;for(y+=v==f||v==u?0:1;/[^0-9_]/.test(r.mask.substr(y,1))&&y<r.mask.length&&y>0;)y+=v==f||v==u?-1:1;ot(r.mask,et)?(this.value=et,lt(this,y)):""==n.trim(et)?this.value=r.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[tt,it,rt,ut,ft].indexOf(v)&&o:case!!~[w,k,g,b,d,nt,e,a,l].indexOf(v):return!0}return i.preventDefault(),!1})}}r.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){r.allowBlank&&!n.trim(n(this).val()).length?(n(this).val(null),i.data("xdsoft_datetime").empty()):Date.parseDate(n(this).val(),r.format)?i.data("xdsoft_datetime").setCurrentTime(n(this).val()):(n(this).val(v.now().dateFormat(r.format)),i.data("xdsoft_datetime").setCurrentTime(n(this).val()));i.trigger("changedatetime.xdsoft")});r.dayOfWeekStartPrev=0==r.dayOfWeekStart?6:r.dayOfWeekStart-1;i.trigger("xchange.xdsoft")};i.data("options",r).on("mousedown.xdsoft",function(n){return n.stopPropagation(),n.preventDefault(),wt.hide(),pt.hide(),!1});lt=ct.find(".xdsoft_time_box");lt.append(y);lt.xdsoftScroller();i.on("afterOpen.xdsoft",function(){lt.xdsoftScroller()});i.append(ht).append(ct);r.withoutCopyright!==!0&&i.append(dt);ht.append(et).append(yt);n("body").append(i);v=new function(){var n=this;n.now=function(){var n=new Date;return r.yearOffset&&n.setFullYear(n.getFullYear()+r.yearOffset),n};n.currentTime=this.now();n.isValidDate=function(n){return"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n.getTime())};n.setCurrentTime=function(t){n.currentTime="string"==typeof t?n.strToDateTime(t):n.isValidDate(t)?t:n.now();i.trigger("xchange.xdsoft")};n.empty=function(){n.currentTime=null};n.getCurrentTime=function(){return n.currentTime};n.nextMonth=function(){var t=n.currentTime.getMonth()+1;return 12==t&&(n.currentTime.setFullYear(n.currentTime.getFullYear()+1),t=0),n.currentTime.setDate(Math.min(Date.daysInMonth[t],n.currentTime.getDate())),n.currentTime.setMonth(t),r.onChangeMonth&&r.onChangeMonth.call&&r.onChangeMonth.call(i,v.currentTime,i.data("input")),i.trigger("xchange.xdsoft"),t};n.prevMonth=function(){var t=n.currentTime.getMonth()-1;return t==-1&&(n.currentTime.setFullYear(n.currentTime.getFullYear()-1),t=11),n.currentTime.setDate(Math.min(Date.daysInMonth[t],n.currentTime.getDate())),n.currentTime.setMonth(t),r.onChangeMonth&&r.onChangeMonth.call&&r.onChangeMonth.call(i,v.currentTime,i.data("input")),i.trigger("xchange.xdsoft"),t};n.strToDateTime=function(t){var f,u,i=[];return(i=/^(\+|\-)(.*)$/.exec(t))&&(i[2]=Date.parseDate(i[2],r.formatDate))?(f=i[2].getTime()-6e4*i[2].getTimezoneOffset(),u=new Date(v.now().getTime()+parseInt(i[1]+"1")*f)):u=t?Date.parseDate(t,r.format):n.now(),n.isValidDate(u)||(u=n.now()),u};n.strtodate=function(t){var i=t?Date.parseDate(t,r.formatDate):n.now();return n.isValidDate(i)||(i=n.now()),i};n.strtotime=function(t){var i=t?Date.parseDate(t,r.formatTime):n.now();return n.isValidDate(i)||(i=n.now()),i};n.str=function(){return n.currentTime.dateFormat(r.format)}};et.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){i.data("changed",!0);v.setCurrentTime(0);i.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(v.str());i.trigger("close.xdsoft")});et.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=n(this),i=0,u=!1;!function n(f){v.currentTime.getMonth();t.hasClass(r.next)?v.nextMonth():t.hasClass(r.prev)&&v.prevMonth();u||(i=setTimeout(n,f?f:100))}(500);n([document.body,window]).on("mouseup.xdsoft",function t(){clearTimeout(i);u=!0;n([document.body,window]).off("mouseup.xdsoft",t)})});ct.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var i=n(this),u=0,f=!1,t=110;!function n(e){var s=ot[0].clientHeight,h=y[0].offsetHeight,o=Math.abs(parseInt(y.css("marginTop")));i.hasClass(r.next)&&h-s-r.timeHeightInTimePicker>=o?y.css("marginTop","-"+(o+r.timeHeightInTimePicker)+"px"):i.hasClass(r.prev)&&o-r.timeHeightInTimePicker>=0&&y.css("marginTop","-"+(o-r.timeHeightInTimePicker)+"px");ot.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(y.css("marginTop"))/(h-s))]);t=t>10?10:t-10;!f&&(u=setTimeout(n,e?e:t))}(500);n([document.body,window]).on("mouseup.xdsoft",function i(){clearTimeout(u);f=!0;n([document.body,window]).off("mouseup.xdsoft",i)})});i.on("xchange.xdsoft",function(t){for(var h,c,p,k,l,e,o,a,s="",f=new Date(v.currentTime.getFullYear(),v.currentTime.getMonth(),1,12,0,0),u=0,b=v.now();f.getDay()!=r.dayOfWeekStart;)f.setDate(f.getDate()-1);for(s+="<table><thead><tr>",o=0;o<7;o++)s+="<th>"+r.i18n[r.lang].dayOfWeek[o+r.dayOfWeekStart>6?0:o+r.dayOfWeekStart]+"<\/th>";for(s+="<\/tr><\/thead>",s+="<tbody><tr>",h=!1,c=!1,r.maxDate!==!1&&(h=v.strtodate(r.maxDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate(),23,59,59,999)),r.minDate!==!1&&(c=v.strtodate(r.minDate),c=new Date(c.getFullYear(),c.getMonth(),c.getDate())),e=[];u<v.currentTime.getDaysInMonth()||f.getDay()!=r.dayOfWeekStart||v.currentTime.getMonth()==f.getMonth();)e=[],u++,p=f.getDate(),k=f.getFullYear(),l=f.getMonth(),e.push("xdsoft_date"),(h!==!1&&f>h||c!==!1&&f<c)&&e.push("xdsoft_disabled"),v.currentTime.getMonth()!=l&&e.push("xdsoft_other_month"),(r.defaultSelect||i.data("changed"))&&v.currentTime.dateFormat("d.m.Y")==f.dateFormat("d.m.Y")&&e.push("xdsoft_current"),b.dateFormat("d.m.Y")==f.dateFormat("d.m.Y")&&e.push("xdsoft_today"),(0==f.getDay()||6==f.getDay()||~r.weekends.indexOf(f.dateFormat("d.m.Y")))&&e.push("xdsoft_weekend"),s+='<td data-date="'+p+'" data-month="'+l+'" data-year="'+k+'" class="xdsoft_date xdsoft_day_of_week'+f.getDay()+" "+e.join(" ")+'"><div>'+p+"<\/div><\/td>",f.getDay()==r.dayOfWeekStartPrev&&(s+="<\/tr>"),f.setDate(p+1);s+="<\/tbody><\/table>";yt.html(s);et.find(".xdsoft_label span").eq(0).text(r.i18n[r.lang].months[v.currentTime.getMonth()]);et.find(".xdsoft_label span").eq(1).text(v.currentTime.getFullYear());var d="",w="",l="",g=function(n,t){var u=v.now();u.setHours(n);n=parseInt(u.getHours());u.setMinutes(t);t=parseInt(u.getMinutes());e=[];(r.maxTime!==!1&&v.strtotime(r.maxTime).getTime()<u.getTime()||r.minTime!==!1&&v.strtotime(r.minTime).getTime()>u.getTime())&&e.push("xdsoft_disabled");(r.initTime||r.defaultSelect||i.data("changed"))&&parseInt(v.currentTime.getHours())==parseInt(n)&&(r.step>59||Math[r.roundTime](v.currentTime.getMinutes()/r.step)*r.step==parseInt(t))&&(r.defaultSelect||i.data("changed")?e.push("xdsoft_current"):r.initTime&&e.push("xdsoft_init_time"));parseInt(b.getHours())==parseInt(n)&&parseInt(b.getMinutes())==parseInt(t)&&e.push("xdsoft_today");d+='<div class="xdsoft_time '+e.join(" ")+'" data-hour="'+n+'" data-minute="'+t+'">'+u.dateFormat(r.formatTime)+"<\/div>"};if(r.allowTimes&&n.isArray(r.allowTimes)&&r.allowTimes.length)for(u=0;u<r.allowTimes.length;u++)w=v.strtotime(r.allowTimes[u]).getHours(),l=v.strtotime(r.allowTimes[u]).getMinutes(),g(w,l);else for(u=0,o=0;u<(r.hours12?12:24);u++)for(o=0;o<60;o+=r.step)w=(u<10?"0":"")+u,l=(o<10?"0":"")+o,g(w,l);for(y.html(d),a="",u=0,u=parseInt(r.yearStart,10)+r.yearOffset;u<=parseInt(r.yearEnd,10)+r.yearOffset;u++)a+='<div class="xdsoft_option '+(v.currentTime.getFullYear()==u?"xdsoft_current":"")+'" data-value="'+u+'">'+u+"<\/div>";for(wt.children().eq(0).html(a),u=0,a="";u<=11;u++)a+='<div class="xdsoft_option '+(v.currentTime.getMonth()==u?"xdsoft_current":"")+'" data-value="'+u+'">'+r.i18n[r.lang].months[u]+"<\/div>";pt.children().eq(0).html(a);n(this).trigger("generate.xdsoft");t.stopPropagation()}).on("afterOpen.xdsoft",function(){var n;if(r.timepicker&&(y.find(".xdsoft_current").length?n=".xdsoft_current":y.find(".xdsoft_init_time").length&&(n=".xdsoft_init_time"),n)){var i=ot[0].clientHeight,u=y[0].offsetHeight,t=y.find(n).index()*r.timeHeightInTimePicker+1;u-i<t&&(t=u-i);y.css("marginTop","-"+parseInt(t)+"px");ot.trigger("scroll_element.xdsoft_scroller",[parseInt(t)/(u-i)])}});at=0;yt.on("click.xdsoft","td",function(){at++;var u=n(this),f=v.currentTime;return!u.hasClass("xdsoft_disabled")&&(f.setFullYear(u.data("year")),f.setMonth(u.data("month")),f.setDate(u.data("date")),i.trigger("select.xdsoft",[f]),t.val(v.str()),(at>1||r.closeOnDateSelect===!0||0===r.closeOnDateSelect&&!r.timepicker)&&!r.inline&&i.trigger("close.xdsoft"),r.onSelectDate&&r.onSelectDate.call&&r.onSelectDate.call(i,v.currentTime,i.data("input")),i.data("changed",!0),i.trigger("xchange.xdsoft"),i.trigger("changedatetime.xdsoft"),void setTimeout(function(){at=0},200))});y.on("click.xdsoft","div",function(){var t=n(this),u=v.currentTime;return!t.hasClass("xdsoft_disabled")&&(u.setHours(t.data("hour")),u.setMinutes(t.data("minute")),i.trigger("select.xdsoft",[u]),i.data("input").val(v.str()),!r.inline&&i.trigger("close.xdsoft"),r.onSelectTime&&r.onSelectTime.call&&r.onSelectTime.call(i,v.currentTime,i.data("input")),i.data("changed",!0),i.trigger("xchange.xdsoft"),void i.trigger("changedatetime.xdsoft"))});i.mousewheel&&ht.mousewheel(function(n,t){return!r.scrollMonth||(t<0?v.nextMonth():v.prevMonth(),!1)});i.mousewheel&&ot.unmousewheel().mousewheel(function(n,t){if(!r.scrollTime)return!0;var f=ot[0].clientHeight,e=y[0].offsetHeight,i=Math.abs(parseInt(y.css("marginTop"))),u=!0;return t<0&&e-f-r.timeHeightInTimePicker>=i?(y.css("marginTop","-"+(i+r.timeHeightInTimePicker)+"px"),u=!1):t>0&&i-r.timeHeightInTimePicker>=0&&(y.css("marginTop","-"+(i-r.timeHeightInTimePicker)+"px"),u=!1),ot.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(y.css("marginTop"))/(e-f))]),n.stopPropagation(),u});i.on("changedatetime.xdsoft",function(){if(r.onChangeDateTime&&r.onChangeDateTime.call){var n=i.data("input");r.onChangeDateTime.call(i,v.currentTime,n);n.trigger("change")}}).on("generate.xdsoft",function(){r.onGenerate&&r.onGenerate.call&&r.onGenerate.call(i,v.currentTime,i.data("input"))});st=0;t.mousewheel&&t.mousewheel(function(n,u,f,e){return!r.scrollInput||(!r.datepicker&&r.timepicker?(st=y.find(".xdsoft_current").length?y.find(".xdsoft_current").eq(0).index():0,st+u>=0&&st+u<y.children().length&&(st+=u),y.children().eq(st).length&&y.children().eq(st).trigger("mousedown"),!1):r.datepicker&&!r.timepicker?(ht.trigger(n,[u,f,e]),t.val&&t.val(v.str()),i.trigger("changedatetime.xdsoft"),!1):void 0)});vt=function(){var r=i.data("input").offset(),t=r.top+i.data("input")[0].offsetHeight-1,u=r.left;t+i[0].offsetHeight>n(window).height()+n(window).scrollTop()&&(t=r.top-i[0].offsetHeight+1);t<0&&(t=0);u+i[0].offsetWidth>n(window).width()&&(u=r.left-i[0].offsetWidth+i.data("input")[0].offsetWidth);i.css({left:u,top:t})};i.on("open.xdsoft",function(){var t=!0;r.onShow&&r.onShow.call&&(t=r.onShow.call(i,v.currentTime,i.data("input")));t!==!1&&(i.show(),i.trigger("afterOpen.xdsoft"),vt(),n(window).off("resize.xdsoft",vt).on("resize.xdsoft",vt),r.closeOnWithoutClick&&n([document.body,window]).on("mousedown.xdsoft",function t(){i.trigger("close.xdsoft");n([document.body,window]).off("mousedown.xdsoft",t)}))}).on("close.xdsoft",function(n){var t=!0;r.onClose&&r.onClose.call&&(t=r.onClose.call(i,v.currentTime,i.data("input")));t===!1||r.opened||r.inline||i.hide();n.stopPropagation()}).data("input",t);bt=0;i.data("xdsoft_datetime",v);i.setOptions(r);v.setCurrentTime(kt());i.trigger("afterOpen.xdsoft");t.data("xdsoft_datetimepicker",i).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(bt),bt=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(v.setCurrentTime(kt()),i.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var u=(this.value,t.which),r;switch(!0){case!!~[l].indexOf(u):return r=n("input:visible,textarea:visible"),i.trigger("close.xdsoft"),r.eq(r.index(this)+1).focus(),!1;case!!~[a].indexOf(u):return i.trigger("close.xdsoft"),!0}})},ot=function(t){var i=t.data("xdsoft_datetimepicker");i&&(i.data("xdsoft_datetime",null),i.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),n(window).off("resize.xdsoft"),n([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return n(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(n){n.keyCode==e&&(o=!0)}).on("keyup.xdsoftctrl",function(n){n.keyCode==e&&(o=!1)}),this.each(function(){var t;if(t=n(this).data("xdsoft_datetimepicker")){if("string"===n.type(i))switch(i){case"show":n(this).select().focus();t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":ot(n(this));break;case"reset":this.value=this.defaultValue;this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,r.format))||t.data("changed",!1);t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(i);return 0}"string"!==n.type(i)&&(!r.lazyInit||r.open||r.inline?y(n(this)):et(n(this)))})}}(jQuery);Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(n){if("unixtime"==n)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[n]&&Date.createNewFormat(n);var t=Date.formatFunctions[n];return this[t]()};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")};Date.getFormatCode=function(n){switch(n){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(n)+"' + "}};Date.parseDate=function(n,t){if("unixtime"==t)return new Date(isNaN(parseInt(n))?0:1e3*parseInt(n));null==Date.parseFunctions[t]&&Date.createParser(t);var i=Date.parseFunctions[t];return Date[i](n)};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code)};Date.formatCodeToRegex=function(n,t){switch(n){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:0,c:null,s:"(?:\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(n)}}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")};Date.prototype.getDayOfYear=function(){var t=0,n;for(Date.daysInMonth[1]=this.isLeapYear()?29:28,n=0;n<this.getMonth();++n)t+=Date.daysInMonth[n];return t+this.getDate()-1};Date.prototype.getWeekOfYear=function(){var t=this.getDayOfYear()+(4-this.getDay()),i=new Date(this.getFullYear(),0,1),n=11-i.getDay();return document.write(n),String.leftPad((t-n)/7+1,2,"0")};Date.prototype.isLeapYear=function(){var n=this.getFullYear();return 0==(3&n)&&(n%100||n%400==0&&n)};Date.prototype.getFirstDayOfMonth=function(){var n=(this.getDay()-(this.getDate()-1))%7;return n<0?n+7:n};Date.prototype.getLastDayOfMonth=function(){var n=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return n<0?n+7:n};Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};String.escape=function(n){return n.replace(/('|\\)/g,"\\$1")};String.leftPad=function(n,t,i){var r=new String(n);for(null==i&&(i=" ");r.length<t;)r=i+r;return r};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n:n(jQuery)}(function(n){function u(r){var s,u=r||window.event,l=[].slice.call(arguments,1),f=0,e=0,o=0,h=0,c=0;return r=n.event.fix(u),r.type="mousewheel",u.wheelDelta&&(f=u.wheelDelta),u.detail&&(f=u.detail*-1),u.deltaY&&(o=u.deltaY*-1,f=o),u.deltaX&&(e=u.deltaX,f=e*-1),void 0!==u.wheelDeltaY&&(o=u.wheelDeltaY),void 0!==u.wheelDeltaX&&(e=u.wheelDeltaX*-1),h=Math.abs(f),(!i||h<i)&&(i=h),c=Math.max(Math.abs(o),Math.abs(e)),(!t||c<t)&&(t=c),s=f>0?"floor":"ceil",f=Math[s](f/i),e=Math[s](e/t),o=Math[s](o/t),l.unshift(r,f,e,o),(n.event.dispatch||n.event.handle).apply(this,l)}var i,t,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],f;if(n.event.fixHooks)for(f=e.length;f;)n.event.fixHooks[e[--f]]=n.event.mouseHooks;n.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var n=r.length;n;)this.addEventListener(r[--n],u,!1);else this.onmousewheel=u},teardown:function(){if(this.removeEventListener)for(var n=r.length;n;)this.removeEventListener(r[--n],u,!1);else this.onmousewheel=null}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})}),function(n,t,i){function v(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function y(n){return n==="http:"?80:n==="https:"?443:void 0}function h(n,t){return t.match(/:\d+$/)?t:t+":"+y(n)}function p(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorDuringStartRequest:"Error during start request. Stopping the connection.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server.  Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."};if(typeof n!="function")throw new Error(f.nojQuery);var r,c,o=t.document.readyState==="complete",e=n(t),l="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},w=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},s=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},b=function(n){return n.state===r.connectionState.disconnected},a=function(n){return n._.keepAliveData.activated&&n.transport.supportsKeepAlive(n)},k=function(i){var f,e;i._.configuredStopReconnectingTimeout||(e=function(t){var i=r._.format(r.resources.reconnectTimeout,t.disconnectTimeout);t.log(i);n(t).triggerHandler(u.onError,[r._.error(i,"TimeoutException")]);t.stop(!1,!1)},i.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(f=t.setTimeout(function(){e(n)},n.disconnectTimeout))}),i.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(f)}),i._.configuredStopReconnectingTimeout=!0)};if(r=function(n,t,i){return new r.fn.init(n,t,i)},r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.onError,[t])};f&&!i._.pingIntervalId&&f.pingInterval&&(i._.pingIntervalId=t.setInterval(function(){r.transports._logic.pingServer(i).fail(e)},f.pingInterval))}},r.events=u,r.resources=f,r.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1},r.changeState=s,r.isDisconnecting=b,r.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},r.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");}},typeof e.on=="function")e.on("load",function(){o=!0});else e.load(function(){o=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this.lastError=null;this._={keepAliveData:{},connectingMessageBuffer:new p(this,function(n){f.triggerHandler(u.onReceived,[n])}),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0};typeof r=="boolean"&&(this.logging=r)},_parseResponse:function(n){var t=this;return n?typeof n=="string"?t.json.parse(n):n:n},_originalJson:t.JSON,json:t.JSON,isCrossDomain:function(i,r){var u;return(i=n.trim(i),r=r||t.location,i.indexOf("http")!==0)?!1:(u=t.document.createElement("a"),u.href=i,u.protocol+h(u.protocol,u.host)!==r.protocol+h(r.protocol,r.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:r.connectionState.disconnected,clientProtocol:"1.5",reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,h){var c=this,y={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},d,p=c._deferral||n.Deferred(),w=t.document.createElement("a"),b,g;if(c.lastError=null,c._deferral=p,!c.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if(n.type(i)==="function"?h=i:n.type(i)==="object"&&(n.extend(y,i),n.type(y.callback)==="function"&&(h=y.callback)),y.transport=v(y.transport,c),!y.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");return(c._.config=y,!o&&y.waitForPageLoad===!0)?(c._.deferredStartHandler=function(){c.start(i,h)},e.bind("load",c._.deferredStartHandler),p.promise()):c.state===r.connectionState.connecting?p.promise():s(c,r.connectionState.disconnected,r.connectionState.connecting)===!1?(p.resolve(c),p.promise()):(k(c),w.href=c.url,w.protocol&&w.protocol!==":"?(c.protocol=w.protocol,c.host=w.host):(c.protocol=t.document.location.protocol,c.host=w.host||t.document.location.host),c.baseUrl=c.protocol+"//"+c.host,c.wsProtocol=c.protocol==="https:"?"wss://":"ws://",y.transport==="auto"&&y.jsonp===!0&&(y.transport="longPolling"),c.url.indexOf("//")===0&&(c.url=t.location.protocol+c.url,c.log("Protocol relative URL detected, normalizing it to '"+c.url+"'.")),this.isCrossDomain(c.url)&&(c.log("Auto detected cross domain url."),y.transport==="auto"&&(y.transport=["webSockets","serverSentEvents","longPolling"]),typeof y.withCredentials=="undefined"&&(y.withCredentials=!0),y.jsonp||(y.jsonp=!n.support.cors,y.jsonp&&c.log("Using jsonp because this browser doesn't support CORS.")),c.contentType=r._.defaultContentType),c.withCredentials=y.withCredentials,c.ajaxDataType=y.jsonp?"jsonp":"text",n(c).bind(u.onStart,function(){n.type(h)==="function"&&h.call(c);p.resolve(c)}),c._.initHandler=r.transports._logic.initHandler(c),d=function(i,o){var l=r._.error(f.noTransportOnInit);if(o=o||0,o>=i.length){o===0?c.log("No transports supported by the server were selected."):o===1?c.log("No fallback transports were selected."):c.log("Fallback transports exhausted.");n(c).triggerHandler(u.onError,[l]);p.reject(l);c.stop();return}if(c.state!==r.connectionState.disconnected){var y=i[o],h=r.transports[y],v=function(){d(i,o+1)};c.transport=h;try{c._.initHandler.start(h,function(){var i=r._.firefoxMajorVersion(t.navigator.userAgent)>=11,f=!!c.withCredentials&&i;c.log("The start request succeeded. Transitioning to the connected state.");a(c)&&r.transports._logic.monitorKeepAlive(c);r.transports._logic.startHeartbeat(c);r._.configurePingInterval(c);s(c,r.connectionState.connecting,r.connectionState.connected)||c.log("WARNING! The connection was not in the connecting state.");c._.connectingMessageBuffer.drain();n(c).triggerHandler(u.onStart);e.bind("unload",function(){c.log("Window unloading, stopping the connection.");c.stop(f)});i&&e.bind("beforeunload",function(){t.setTimeout(function(){c.stop(f)},0)})},v)}catch(w){c.log(h.name+" transport threw '"+w.message+"' when attempting to start.");v()}}},b=c.url+"/negotiate",g=function(t,i){var e=r._.error(f.errorOnNegotiate,t,i._.negotiateRequest);n(i).triggerHandler(u.onError,e);p.reject(e);i.stop()},n(c).triggerHandler(u.onStarting),b=r.transports._logic.prepareQueryString(c,b),c.log("Negotiating with '"+b+"'."),c._.negotiateRequest=r.transports._logic.ajax(c,{url:b,error:function(n,t){t!==l?g(n,c):p.reject(r._.error(f.stoppedWhileNegotiating,null,c._.negotiateRequest))},success:function(t){var i,e,h,o=[],s=[];try{i=c._parseResponse(t)}catch(l){g(r._.error(f.errorParsingNegotiateResponse,l),c);return}if(e=c._.keepAliveData,c.appRelativeUrl=i.Url,c.id=i.ConnectionId,c.token=i.ConnectionToken,c.webSocketServerUrl=i.WebSocketServerUrl,c._.pollTimeout=i.ConnectionTimeout*1e3+1e4,c.disconnectTimeout=i.DisconnectTimeout*1e3,c._.totalTransportConnectTimeout=c.transportConnectTimeout+i.TransportConnectTimeout*1e3,i.KeepAliveTimeout?(e.activated=!0,e.timeout=i.KeepAliveTimeout*1e3,e.timeoutWarning=e.timeout*c.keepAliveWarnAt,c._.beatInterval=(e.timeout-e.timeoutWarning)/3):e.activated=!1,c.reconnectWindow=c.disconnectTimeout+(e.timeout||0),!i.ProtocolVersion||i.ProtocolVersion!==c.clientProtocol){h=r._.error(r._.format(f.protocolIncompatible,c.clientProtocol,i.ProtocolVersion));n(c).triggerHandler(u.onError,[h]);p.reject(h);return}n.each(r.transports,function(n){if(n.indexOf("_")===0||n==="webSockets"&&!i.TryWebSockets)return!0;s.push(n)});n.isArray(y.transport)?n.each(y.transport,function(t,i){n.inArray(i,s)>=0&&o.push(i)}):y.transport==="auto"?o=s:n.inArray(y.transport,s)>=0&&o.push(y.transport);d(o)}}),p.promise())},starting:function(t){var i=this;return n(i).bind(u.onStarting,function(){t.call(i)}),i},send:function(n){var t=this;if(t.state===r.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(t.state===r.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return t.transport.send(t,n),t},received:function(t){var i=this;return n(i).bind(u.onReceived,function(n,r){t.call(i,r)}),i},stateChanged:function(t){var i=this;return n(i).bind(u.onStateChanged,function(n,r){t.call(i,r)}),i},error:function(t){var i=this;return n(i).bind(u.onError,function(n,r,u){i.lastError=r;t.call(i,r,u)}),i},disconnected:function(t){var i=this;return n(i).bind(u.onDisconnect,function(){t.call(i)}),i},connectionSlow:function(t){var i=this;return n(i).bind(u.onConnectionSlow,function(){t.call(i)}),i},reconnecting:function(t){var i=this;return n(i).bind(u.onReconnecting,function(){t.call(i)}),i},reconnected:function(t){var i=this;return n(i).bind(u.onReconnect,function(){t.call(i)}),i},stop:function(i,h){var c=this,v=c._deferral;if(c._.deferredStartHandler&&e.unbind("load",c._.deferredStartHandler),delete c._.config,delete c._.deferredStartHandler,!o&&(!c._.config||c._.config.waitForPageLoad===!0)){c.log("Stopping connection prior to negotiate.");v&&v.reject(r._.error(f.stoppedWhileLoading));return}if(c.state!==r.connectionState.disconnected)return c.log("Stopping connection."),t.clearTimeout(c._.beatHandle),t.clearInterval(c._.pingIntervalId),c.transport&&(c.transport.stop(c),h!==!1&&c.transport.abort(c,i),a(c)&&r.transports._logic.stopMonitoringKeepAlive(c),c.transport=null),c._.negotiateRequest&&(c._.negotiateRequest.abort(l),delete c._.negotiateRequest),c._.initHandler&&c._.initHandler.stop(),delete c._deferral,delete c.messageId,delete c.groupsToken,delete c.id,delete c._.pingIntervalId,delete c._.lastMessageAt,delete c._.lastActiveAt,c._.connectingMessageBuffer.clear(),s(c,c.state,r.connectionState.disconnected),n(c).triggerHandler(u.onDisconnect),c},log:function(n){w(n,this.logging)}};r.fn.init.prototype=r.fn;r.noConflict=function(){return n.connection===r&&(n.connection=c),r};n.connection&&(c=n.connection);n.connection=n.signalR=r}(window.jQuery,window),function(n,t,i){function o(n){n._.keepAliveData.monitoring&&c(n);u.markActive(n)&&(n._.beatHandle=t.setTimeout(function(){o(n)},n._.beatInterval))}function c(t){var i=t._.keepAliveData,u;t.state===r.connectionState.connected&&(u=(new Date).getTime()-t._.lastMessageAt,u>=i.timeout?(t.log("Keep alive timed out.  Notifying transport that connection has been lost."),t.transport.lostConnection(t)):u>=i.timeoutWarning?i.userNotified||(t.log("Keep alive has been missed, connection may be dead/slow."),n(t).triggerHandler(f.onConnectionSlow),i.userNotified=!0):i.userNotified=!1)}function e(n,t){var i=n.url+t;return n.transport&&(i+="?transport="+n.transport.name),u.prepareQueryString(n,i)}function s(n){this.connection=n;this.startRequested=!1;this.startCompleted=!1;this.connectionStopped=!1}var r=n.signalR,f=n.signalR.events,l=n.signalR.changeState,h="__Start Aborted__",u;r.transports={};s.prototype={start:function(n,r,u){var f=this,e=f.connection,o=!1;if(f.startRequested||f.connectionStopped){e.log("WARNING! "+n.name+" transport cannot be started. Initialization ongoing or completed.");return}e.log(n.name+" transport starting.");n.start(e,function(){o||f.initReceived(n,r)},function(t){return o||(o=!0,f.transportFailed(n,t,u)),!f.startCompleted||f.connectionStopped});f.transportTimeoutHandle=t.setTimeout(function(){o||(o=!0,e.log(n.name+" transport timed out when trying to connect."),f.transportFailed(n,i,u))},e._.totalTransportConnectTimeout)},stop:function(){this.connectionStopped=!0;t.clearTimeout(this.transportTimeoutHandle);r.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(n,i){var u=this,f=u.connection;if(u.startRequested){f.log("WARNING! The client received multiple init messages.");return}u.connectionStopped||(u.startRequested=!0,t.clearTimeout(u.transportTimeoutHandle),f.log(n.name+" transport connected. Initiating start request."),r.transports._logic.ajaxStart(f,function(){u.startCompleted=!0;i()}))},transportFailed:function(i,u,e){var o=this.connection,h=o._deferral,s;this.connectionStopped||(t.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(s=r._.error(r.resources.errorDuringStartRequest,u),o.log(i.name+" transport failed during the start request. Stopping the connection."),n(o).triggerHandler(f.onError,[s]),h&&h.reject(s),o.stop()):(i.stop(o),o.log(i.name+" transport failed to connect. Attempting to fall back."),e()))}};u=r.transports._logic={ajax:function(t,i){return n.ajax(n.extend(!0,{},n.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:t.withCredentials},contentType:t.contentType,dataType:t.ajaxDataType},i))},pingServer:function(t){var e,f,i=n.Deferred();return t.transport?(e=t.url+"/ping",e=u.addQs(e,t.qs),f=u.ajax(t,{url:e,success:function(n){var u;try{u=t._parseResponse(n)}catch(e){i.reject(r._.transportError(r.resources.pingServerFailedParse,t.transport,e,f));t.stop();return}u.Response==="pong"?i.resolve():i.reject(r._.transportError(r._.format(r.resources.pingServerFailedInvalidResponse,n),t.transport,null,f))},error:function(n){n.status===401||n.status===403?(i.reject(r._.transportError(r._.format(r.resources.pingServerFailedStatusCode,n.status),t.transport,n,f)),t.stop()):i.reject(r._.transportError(r.resources.pingServerFailed,t.transport,n,f))}})):i.reject(r._.transportError(r.resources.noConnectionTransport,t.transport)),i.promise()},prepareQueryString:function(n,i){var r;return r=u.addQs(i,"clientProtocol="+n.clientProtocol),r=u.addQs(r,n.qs),n.token&&(r+="&connectionToken="+t.encodeURIComponent(n.token)),n.data&&(r+="&connectionData="+t.encodeURIComponent(n.data)),r},addQs:function(t,i){var r=t.indexOf("?")!==-1?"&":"?",u;if(!i)return t;if(typeof i=="object")return t+r+n.param(i);if(typeof i=="string")return u=i.charAt(0),(u==="?"||u==="&")&&(r=""),t+r+i;throw new Error("Query string property must be either a string or object.");},getUrl:function(n,i,r,f,e){var h=i==="webSockets"?"":n.baseUrl,o=h+n.appRelativeUrl,s="transport="+i;return!e&&n.groupsToken&&(s+="&groupsToken="+t.encodeURIComponent(n.groupsToken)),r?(o+=f?"/poll":"/reconnect",!e&&n.messageId&&(s+="&messageId="+t.encodeURIComponent(n.messageId))):o+="/connect",o+="?"+s,o=u.prepareQueryString(n,o),e||(o+="&tid="+Math.floor(Math.random()*11)),o},maximizePersistentResponse:function(n){return{MessageId:n.C,Messages:n.M,Initialized:typeof n.S!="undefined"?!0:!1,ShouldReconnect:typeof n.T!="undefined"?!0:!1,LongPollDelay:n.L,GroupsToken:n.G}},updateGroups:function(n,t){t&&(n.groupsToken=t)},stringifySend:function(n,t){return typeof t=="string"||typeof t=="undefined"||t===null?t:n.json.stringify(t)},ajaxSend:function(t,i){var h=u.stringifySend(t,i),c=e(t,"/send"),o,s=function(t,u){n(u).triggerHandler(f.onError,[r._.transportError(r.resources.sendFailed,u.transport,t,o),i])};return o=u.ajax(t,{url:c,type:t.ajaxDataType==="jsonp"?"GET":"POST",contentType:r._.defaultContentType,data:{data:h},success:function(n){var i;if(n){try{i=t._parseResponse(n)}catch(r){s(r,t);t.stop();return}u.triggerReceived(t,i)}},error:function(n,i){i!=="abort"&&i!=="parsererror"&&s(n,t)}})},ajaxAbort:function(n,t){if(typeof n.transport!="undefined"){t=typeof t=="undefined"?!0:t;var i=e(n,"/abort");u.ajax(n,{url:i,async:t,timeout:1e3,type:"POST"});n.log("Fired ajax abort async = "+t+".")}},ajaxStart:function(t,i){var s=function(n){var i=t._deferral;i&&i.reject(n)},o=function(i){t.log("The start request failed. Stopping the connection.");n(t).triggerHandler(f.onError,[i]);s(i);t.stop()};t._.startRequest=u.ajax(t,{url:e(t,"/start"),success:function(n,u,f){var e;try{e=t._parseResponse(n)}catch(s){o(r._.error(r._.format(r.resources.errorParsingStartResponse,n),s,f));return}e.Response==="started"?i():o(r._.error(r._.format(r.resources.invalidStartResponse,n),null,f))},error:function(n,i,u){i!==h?o(r._.error(r.resources.errorDuringStartRequest,u,n)):(t.log("The start request aborted because connection.stop() was called."),s(r._.error(r.resources.stoppedDuringStartRequest,null,n)))}})},tryAbortStartRequest:function(n){n._.startRequest&&(n._.startRequest.abort(h),delete n._.startRequest)},tryInitialize:function(n,t,i){t.Initialized&&i?i():t.Initialized&&n.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(t,i){t._.connectingMessageBuffer.tryBuffer(i)||n(t).triggerHandler(f.onReceived,[i])},processMessages:function(t,i,r){var f;u.markLastMessage(t);i&&(f=u.maximizePersistentResponse(i),u.updateGroups(t,f.GroupsToken),f.MessageId&&(t.messageId=f.MessageId),f.Messages&&(n.each(f.Messages,function(n,i){u.triggerReceived(t,i)}),u.tryInitialize(t,f,r)))},monitorKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring?t.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,u.markLastMessage(t),t._.keepAliveData.reconnectKeepAliveUpdate=function(){u.markLastMessage(t)},n(t).bind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+", keep alive timeout of "+i.timeout+" and disconnecting timeout of "+t.disconnectTimeout))},stopMonitoringKeepAlive:function(t){var i=t._.keepAliveData;i.monitoring&&(i.monitoring=!1,n(t).unbind(f.onReconnect,t._.keepAliveData.reconnectKeepAliveUpdate),t._.keepAliveData={},t.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(n){n._.lastActiveAt=(new Date).getTime();o(n)},markLastMessage:function(n){n._.lastMessageAt=(new Date).getTime()},markActive:function(n){return u.verifyLastActive(n)?(n._.lastActiveAt=(new Date).getTime(),!0):!1},isConnectedOrReconnecting:function(n){return n.state===r.connectionState.connected||n.state===r.connectionState.reconnecting},ensureReconnectingState:function(t){return l(t,r.connectionState.connected,r.connectionState.reconnecting)===!0&&n(t).triggerHandler(f.onReconnecting),t.state===r.connectionState.reconnecting},clearReconnectTimeout:function(n){n&&n._.reconnectTimeout&&(t.clearTimeout(n._.reconnectTimeout),delete n._.reconnectTimeout)},verifyLastActive:function(t){if((new Date).getTime()-t._.lastActiveAt>=t.reconnectWindow){var i=r._.format(r.resources.reconnectWindowTimeout,new Date(t._.lastActiveAt),t.reconnectWindow);return t.log(i),n(t).triggerHandler(f.onError,[r._.error(i,"TimeoutException")]),t.stop(!1,!1),!1}return!0},reconnect:function(n,i){var f=r.transports[i];if(u.isConnectedOrReconnecting(n)&&!n._.reconnectTimeout){if(!u.verifyLastActive(n))return;n._.reconnectTimeout=t.setTimeout(function(){u.verifyLastActive(n)&&(f.stop(n),u.ensureReconnectingState(n)&&(n.log(i+" reconnecting."),f.start(n)))},n.reconnectDelay)}},handleParseFailure:function(t,i,u,e,o){var s=r._.transportError(r._.format(r.resources.parseFailed,i),t.transport,u,o);e&&e(s)?t.log("Failed to parse server response while attempting to connect."):(n(t).triggerHandler(f.onError,[s]),t.stop())},initHandler:function(n){return new s(n)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,f=n.signalR.changeState,i=r.transports._logic;r.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(t,f){var e=i.stringifySend(t,f);try{t.socket.send(e)}catch(o){n(t).triggerHandler(u.onError,[r._.transportError(r.resources.webSocketsInvalidState,t.transport,o,t.socket),f])}},start:function(e,o,s){var h,c=!1,l=this,a=!o,v=n(e);if(!t.WebSocket){s();return}e.socket||(h=e.webSocketServerUrl?e.webSocketServerUrl:e.wsProtocol+e.host,h+=i.getUrl(e,this.name,a),e.log("Connecting to websocket endpoint '"+h+"'."),e.socket=new t.WebSocket(h),e.socket.onopen=function(){c=!0;e.log("Websocket opened.");i.clearReconnectTimeout(e);f(e,r.connectionState.reconnecting,r.connectionState.connected)===!0&&v.triggerHandler(u.onReconnect)},e.socket.onclose=function(t){var i;this===e.socket&&(c&&typeof t.wasClean!="undefined"&&t.wasClean===!1?(i=r._.transportError(r.resources.webSocketClosed,e.transport,t),e.log("Unclean disconnect from websocket: "+(t.reason||"[no reason given]."))):e.log("Websocket closed."),s&&s(i)||(i&&n(e).triggerHandler(u.onError,[i]),l.reconnect(e)))},e.socket.onmessage=function(t){var r;try{r=e._parseResponse(t.data)}catch(u){i.handleParseFailure(e,t.data,u,s,t);return}r&&(n.isEmptyObject(r)||r.M?i.processMessages(e,r,o):i.triggerReceived(e,r))})},reconnect:function(n){i.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},stop:function(n){i.clearReconnectTimeout(n);n.socket&&(n.log("Closing the Websocket."),n.socket.close(),n.socket=null)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var i=n.signalR,u=n.signalR.events,e=n.signalR.changeState,r=i.transports._logic,f=function(n){t.clearTimeout(n._.reconnectAttemptTimeoutHandle);delete n._.reconnectAttemptTimeoutHandle};i.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(o,s,h){var c=this,l=!1,a=n(o),v=!s,y;if(o.eventSource&&(o.log("The connection already has an event source. Stopping it."),o.stop()),!t.EventSource){h&&(o.log("This browser doesn't support SSE."),h());return}y=r.getUrl(o,this.name,v);try{o.log("Attempting to connect to SSE endpoint '"+y+"'.");o.eventSource=new t.EventSource(y,{withCredentials:o.withCredentials})}catch(p){o.log("EventSource failed trying to connect with error "+p.Message+".");h?h():(a.triggerHandler(u.onError,[i._.transportError(i.resources.eventSourceFailedToConnect,o.transport,p)]),v&&c.reconnect(o));return}v&&(o._.reconnectAttemptTimeoutHandle=t.setTimeout(function(){l===!1&&o.eventSource.readyState!==t.EventSource.OPEN&&c.reconnect(o)},c.timeOut));o.eventSource.addEventListener("open",function(){o.log("EventSource connected.");f(o);r.clearReconnectTimeout(o);l===!1&&(l=!0,e(o,i.connectionState.reconnecting,i.connectionState.connected)===!0&&a.triggerHandler(u.onReconnect))},!1);o.eventSource.addEventListener("message",function(n){var t;if(n.data!=="initialized"){try{t=o._parseResponse(n.data)}catch(i){r.handleParseFailure(o,n.data,i,h,n);return}r.processMessages(o,t,s)}},!1);o.eventSource.addEventListener("error",function(n){var r=i._.transportError(i.resources.eventSourceError,o.transport,n);this===o.eventSource&&(h&&h(r)||(o.log("EventSource readyState: "+o.eventSource.readyState+"."),n.eventPhase===t.EventSource.CLOSED?(o.log("EventSource reconnecting due to the server connection ending."),c.reconnect(o)):(o.log("EventSource error."),a.triggerHandler(u.onError,[r]))))},!1)},reconnect:function(n){r.reconnect(n,this.name)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){r.ajaxSend(n,t)},stop:function(n){f(n);r.clearReconnectTimeout(n);n&&n.eventSource&&(n.log("EventSource calling close()."),n.eventSource.close(),n.eventSource=null,delete n.eventSource)},abort:function(n,t){r.ajaxAbort(n,t)}}}(window.jQuery,window),function(n,t){var r=n.signalR,e=n.signalR.events,o=n.signalR.changeState,i=r.transports._logic,u=function(){var n=t.document.createElement("iframe");return n.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),n},f=function(){var i=null,f=1e3,n=0;return{prevent:function(){r._.ieVersion<=8&&(n===0&&(i=t.setInterval(function(){var n=u();t.document.body.appendChild(n);t.document.body.removeChild(n);n=null},f)),n++)},cancel:function(){n===1&&t.clearInterval(i);n>0&&n--}}}();r.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(n,r,e){var l=this,s=i.foreverFrame.count+=1,h,o=u(),c=function(){n.log("Forever frame iframe finished loading and is no longer receiving messages.");e&&e()||l.reconnect(n)};if(t.EventSource){e&&(n.log("Forever Frame is not supported by SignalR on browsers with SSE support."),e());return}o.setAttribute("data-signalr-connection-id",n.id);f.prevent();h=i.getUrl(n,this.name);h+="&frameId="+s;t.document.documentElement.appendChild(o);n.log("Binding to iframe's load event.");o.addEventListener?o.addEventListener("load",c,!1):o.attachEvent&&o.attachEvent("onload",c);o.src=h;i.foreverFrame.connections[s]=n;n.frame=o;n.frameId=s;r&&(n.onSuccess=function(){n.log("Iframe transport started.");r()})},reconnect:function(n){var r=this;i.isConnectedOrReconnecting(n)&&i.verifyLastActive(n)&&t.setTimeout(function(){if(i.verifyLastActive(n)&&n.frame&&i.ensureReconnectingState(n)){var u=n.frame,t=i.getUrl(n,r.name,!0)+"&frameId="+n.frameId;n.log("Updating iframe src to '"+t+"'.");u.src=t}},n.reconnectDelay)},lostConnection:function(n){this.reconnect(n)},send:function(n,t){i.ajaxSend(n,t)},receive:function(t,u){var f,e,o;if(t.json!==t._originalJson&&(u=t._originalJson.stringify(u)),o=t._parseResponse(u),i.processMessages(t,o,t.onSuccess),t.state===n.signalR.connectionState.connected&&(t.frameMessageCount=(t.frameMessageCount||0)+1,t.frameMessageCount>r.transports.foreverFrame.iframeClearThreshold&&(t.frameMessageCount=0,f=t.frame.contentWindow||t.frame.contentDocument,f&&f.document&&f.document.body)))for(e=f.document.body;e.firstChild;)e.removeChild(e.firstChild)},stop:function(n){var r=null;if(f.cancel(),n.frame){if(n.frame.stop)n.frame.stop();else try{r=n.frame.contentWindow||n.frame.contentDocument;r.document&&r.document.execCommand&&r.document.execCommand("Stop")}catch(u){n.log("Error occurred when stopping foreverFrame transport. Message = "+u.message+".")}n.frame.parentNode===t.document.body&&t.document.body.removeChild(n.frame);delete i.foreverFrame.connections[n.frameId];n.frame=null;n.frameId=null;delete n.frame;delete n.frameId;delete n.onSuccess;delete n.frameMessageCount;n.log("Stopping forever frame.")}},abort:function(n,t){i.ajaxAbort(n,t)},getConnection:function(n){return i.foreverFrame.connections[n]},started:function(t){o(t,r.connectionState.reconnecting,r.connectionState.connected)===!0&&n(t).triggerHandler(e.onReconnect)}}}(window.jQuery,window),function(n,t){var r=n.signalR,u=n.signalR.events,e=n.signalR.changeState,f=n.signalR.isDisconnecting,i=r.transports._logic;r.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(o,s,h){var a=this,v=function(){v=n.noop;o.log("LongPolling connected.");s?s():o.log("WARNING! The client received an init message after reconnecting.")},y=function(n){return h(n)?(o.log("LongPolling failed to connect."),!0):!1},c=o._,l=0,p=function(i){t.clearTimeout(c.reconnectTimeoutId);c.reconnectTimeoutId=null;e(i,r.connectionState.reconnecting,r.connectionState.connected)===!0&&(i.log("Raising the reconnect event"),n(i).triggerHandler(u.onReconnect))},w=36e5;o.pollXhr&&(o.log("Polling xhr requests already exists, aborting."),o.stop());o.messageId=null;c.reconnectTimeoutId=null;c.pollTimeoutId=t.setTimeout(function(){(function e(s,h){var g=s.messageId,nt=g===null,k=!nt,tt=!h,d=i.getUrl(s,a.name,k,tt,!0),b={};(s.messageId&&(b.messageId=s.messageId),s.groupsToken&&(b.groupsToken=s.groupsToken),f(s)!==!0)&&(o.log("Opening long polling request to '"+d+"'."),s.pollXhr=i.ajax(o,{xhrFields:{onprogress:function(){i.markLastMessage(o)}},url:d,type:"POST",contentType:r._.defaultContentType,data:b,timeout:o._.pollTimeout,success:function(r){var h,w=0,u,a;o.log("Long poll complete.");l=0;try{h=o._parseResponse(r)}catch(b){i.handleParseFailure(s,r,b,y,s.pollXhr);return}(c.reconnectTimeoutId!==null&&p(s),h&&(u=i.maximizePersistentResponse(h)),i.processMessages(s,h,v),u&&n.type(u.LongPollDelay)==="number"&&(w=u.LongPollDelay),f(s)!==!0)&&(a=u&&u.ShouldReconnect,!a||i.ensureReconnectingState(s))&&(w>0?c.pollTimeoutId=t.setTimeout(function(){e(s,a)},w):e(s,a))},error:function(f,h){var v=r._.transportError(r.resources.longPollFailed,o.transport,f,s.pollXhr);if(t.clearTimeout(c.reconnectTimeoutId),c.reconnectTimeoutId=null,h==="abort"){o.log("Aborted xhr request.");return}if(!y(v)){if(l++,o.state!==r.connectionState.reconnecting&&(o.log("An error occurred using longPolling. Status = "+h+".  Response = "+f.responseText+"."),n(s).triggerHandler(u.onError,[v])),(o.state===r.connectionState.connected||o.state===r.connectionState.reconnecting)&&!i.verifyLastActive(o))return;if(!i.ensureReconnectingState(s))return;c.pollTimeoutId=t.setTimeout(function(){e(s,!0)},a.reconnectDelay)}}}),k&&h===!0&&(c.reconnectTimeoutId=t.setTimeout(function(){p(s)},Math.min(1e3*(Math.pow(2,l)-1),w))))})(o)},250)},lostConnection:function(n){n.pollXhr&&n.pollXhr.abort("lostConnection")},send:function(n,t){i.ajaxSend(n,t)},stop:function(n){t.clearTimeout(n._.pollTimeoutId);t.clearTimeout(n._.reconnectTimeoutId);delete n._.pollTimeoutId;delete n._.reconnectTimeoutId;n.pollXhr&&(n.pollXhr.abort(),n.pollXhr=null,delete n.pollXhr)},abort:function(n,t){i.ajaxAbort(n,t)}}}(window.jQuery,window),function(n){function r(n){return n+s}function e(n,t,i){for(var f=n.length,u=[],r=0;r<f;r+=1)n.hasOwnProperty(r)&&(u[r]=t.call(i,n[r],r,n));return u}function o(t){return n.isFunction(t)?null:n.type(t)==="undefined"?null:t}function u(n){for(var t in n)if(n.hasOwnProperty(t))return!0;return!1}function f(n,t){var i=n._.invocationCallbacks,r,f;u(i)&&n.log("Clearing hub invocation callbacks with error: "+t+".");n._.invocationCallbackId=0;delete n._.invocationCallbacks;n._.invocationCallbacks={};for(f in i)r=i[f],r.method.call(r.scope,{E:t})}function i(n,t){return new i.fn.init(n,t)}function t(i,r){var u={qs:null,logging:!1,useDefaultPath:!0};return n.extend(u,r),(!i||u.useDefaultPath)&&(i=(i||"")+"/signalr"),new t.fn.init(i,u)}var s=".hubProxy",h=n.signalR;i.fn=i.prototype={init:function(n,t){this.state={};this.connection=n;this.hubName=t;this._={callbackMap:{}}},constructor:i,hasSubscriptions:function(){return u(this._.callbackMap)},on:function(t,i){var u=this,f=u._.callbackMap;return t=t.toLowerCase(),f[t]||(f[t]={}),f[t][i]=function(n,t){i.apply(u,t)},n(u).bind(r(t),f[t][i]),u},off:function(t,i){var e=this,o=e._.callbackMap,f;return t=t.toLowerCase(),f=o[t],f&&(f[i]?(n(e).unbind(r(t),f[i]),delete f[i],u(f)||delete o[t]):i||(n(e).unbind(r(t)),delete o[t])),e},invoke:function(t){var i=this,r=i.connection,s=n.makeArray(arguments).slice(1),c=e(s,o),f={H:i.hubName,M:t,A:c,I:r._.invocationCallbackId},u=n.Deferred(),l=function(f){var e=i._maximizeHubResponse(f),s,o;n.extend(i.state,e.State);e.Progress?u.notifyWith?u.notifyWith(i,[e.Progress.Data]):r._.progressjQueryVersionLogged||(r.log("A hub method invocation progress update was received but the version of jQuery in use ("+n.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),r._.progressjQueryVersionLogged=!0):e.Error?(e.StackTrace&&r.log(e.Error+"\n"+e.StackTrace+"."),s=e.IsHubException?"HubException":"Exception",o=h._.error(e.Error,s),o.data=e.ErrorData,r.log(i.hubName+"."+t+" failed to execute. Error: "+o.message),u.rejectWith(i,[o])):(r.log("Invoked "+i.hubName+"."+t),u.resolveWith(i,[e.Result]))};return r._.invocationCallbacks[r._.invocationCallbackId.toString()]={scope:i,method:l},r._.invocationCallbackId+=1,n.isEmptyObject(i.state)||(f.S=i.state),r.log("Invoking "+i.hubName+"."+t),r.send(f),u.promise()},_maximizeHubResponse:function(n){return{State:n.S,Result:n.R,Progress:n.P?{Id:n.P.I,Data:n.P.D}:null,Id:n.I,IsHubException:n.H,Error:n.E,StackTrace:n.T,ErrorData:n.D}}};i.fn.init.prototype=i.fn;t.fn=t.prototype=n.connection();t.fn.init=function(t,i){var e={qs:null,logging:!1,useDefaultPath:!0},u=this;n.extend(e,i);n.signalR.fn.init.call(u,t,e.qs,e.logging);u.proxies={};u._.invocationCallbackId=0;u._.invocationCallbacks={};u.received(function(t){var f,o,e,i,s,h;t&&(typeof t.P!="undefined"?(e=t.P.I.toString(),i=u._.invocationCallbacks[e],i&&i.method.call(i.scope,t)):typeof t.I!="undefined"?(e=t.I.toString(),i=u._.invocationCallbacks[e],i&&(u._.invocationCallbacks[e]=null,delete u._.invocationCallbacks[e],i.method.call(i.scope,t))):(f=this._maximizeClientHubInvocation(t),u.log("Triggering client hub event '"+f.Method+"' on hub '"+f.Hub+"'."),s=f.Hub.toLowerCase(),h=f.Method.toLowerCase(),o=this.proxies[s],n.extend(o.state,f.State),n(o).triggerHandler(r(h),[f.Args])))});u.error(function(n,t){var i,r;t&&(i=t.I,r=u._.invocationCallbacks[i],r&&(u._.invocationCallbacks[i]=null,delete u._.invocationCallbacks[i],r.method.call(r.scope,{E:n})))});u.reconnecting(function(){u.transport&&u.transport.name==="webSockets"&&f(u,"Connection started reconnecting before invocation result was received.")});u.disconnected(function(){f(u,"Connection was disconnected before invocation result was received.")})};t.fn._maximizeClientHubInvocation=function(n){return{Hub:n.H,Method:n.M,Args:n.A,State:n.S}};t.fn._registerSubscribedHubs=function(){var t=this;t._subscribedToHubs||(t._subscribedToHubs=!0,t.starting(function(){var i=[];n.each(t.proxies,function(n){this.hasSubscriptions()&&(i.push({name:n}),t.log("Client subscribed to hub '"+n+"'."))});i.length===0&&t.log("No hubs have been subscribed to.  The client will not receive data from hubs.  To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to.");t.data=t.json.stringify(i)}))};t.fn.createHubProxy=function(n){n=n.toLowerCase();var t=this.proxies[n];return t||(t=i(this,n),this.proxies[n]=t),this._registerSubscribedHubs(),t};t.fn.init.prototype=t.fn;n.hubConnection=t}(window.jQuery,window),function(n){n.signalR.version="2.2.1"}(window.jQuery),function(n){function t(t,i,r,u){var f=t.text(),e=f.split(i),o="";e.length&&(n(e).each(function(n,t){o+='<span class="'+r+(n+1)+'" aria-hidden="true">'+t+"<\/span>"+u}),t.attr("aria-label",f).empty().append(o))}var i={init:function(){return this.each(function(){t(n(this),"","char","")})},words:function(){return this.each(function(){t(n(this)," ","word"," ")})},lines:function(){return this.each(function(){var i="eefec303079ad17405c889e092e105b0";t(n(this).children("br").replaceWith(i).end(),i,"line","")})}};n.fn.lettering=function(t){return t&&i[t]?i[t].apply(this,[].slice.call(arguments,1)):t==="letters"||!t?i.init.apply(this,[].slice.call(arguments,0)):(n.error("Method "+t+" does not exist on jQuery.lettering"),this)}}(jQuery),function(n){"use strict";function t(t){return/In/.test(t)||n.inArray(t,n.fn.textillate.defaults.inEffects)>=0}function i(t){return/Out/.test(t)||n.inArray(t,n.fn.textillate.defaults.outEffects)>=0}function r(n){return n!=="true"&&n!=="false"?n:n==="true"}function u(t){var u=t.attributes||[],i={};return u.length?(n.each(u,function(n,t){var u=t.nodeName.replace(/delayscale/,"delayScale");/^data-in-*/.test(u)?(i.in=i.in||{},i.in[u.replace(/data-in-/,"")]=r(t.nodeValue)):/^data-out-*/.test(u)?(i.out=i.out||{},i.out[u.replace(/data-out-/,"")]=r(t.nodeValue)):/^data-*/.test(u)&&(i[u.replace(/data-/,"")]=r(t.nodeValue))}),i):i}function e(n){for(var i,r,t=n.length;t;i=parseInt(Math.random()*t),r=n[--t],n[t]=n[i],n[i]=r);return n}function o(n,t,i){n.addClass("animated "+t).css("visibility","visible").show();n.one("animationend webkitAnimationEnd oAnimationEnd",function(){n.removeClass("animated "+t);i&&i()})}function f(r,u,f){var h=this,s=r.length;if(!s){f&&f();return}u.shuffle&&(r=e(r));u.reverse&&(r=r.toArray().reverse());n.each(r,function(r,e){function c(){t(u.effect)?h.css("visibility","visible"):i(u.effect)&&h.css("visibility","hidden");s-=1;!s&&f&&f()}var h=n(e),l=u.sync?u.delay:u.delay*r*u.delayScale;h.text()?setTimeout(function(){o(h,u.effect,c)},l):c()})}var s=function(r,e){var o=this,s=n(r);o.init=function(){o.$texts=s.find(e.selector);o.$texts.length||(o.$texts=n('<ul class="texts"><li>'+s.html()+"<\/li><\/ul>"),s.html(o.$texts));o.$texts.hide();o.$current=n("<span>").html(o.$texts.find(":first-child").html()).prependTo(s);t(e.in.effect)?o.$current.css("visibility","hidden"):i(e.out.effect)&&o.$current.css("visibility","visible");o.setOptions(e);o.timeoutRun=null;setTimeout(function(){o.options.autoStart&&o.start()},o.options.initialDelay)};o.setOptions=function(n){o.options=n};o.triggerEvent=function(t){var i=n.Event(t+".tlt");return s.trigger(i,o),i};o.in=function(r,e){r=r||0;var h=o.$texts.find(":nth-child("+((r||0)+1)+")"),s=n.extend(!0,{},o.options,h.length?u(h[0]):{}),c;h.addClass("current");o.triggerEvent("inAnimationBegin");o.$current.html(h.html()).lettering("words");o.options.type=="char"&&o.$current.find('[class^="word"]').css({display:"inline-block","-webkit-transform":"translate3d(0,0,0)","-moz-transform":"translate3d(0,0,0)","-o-transform":"translate3d(0,0,0)",transform:"translate3d(0,0,0)"}).each(function(){n(this).lettering()});c=o.$current.find('[class^="'+o.options.type+'"]').css("display","inline-block");t(s.in.effect)?c.css("visibility","hidden"):i(s.in.effect)&&c.css("visibility","visible");o.currentIndex=r;f(c,s.in,function(){o.triggerEvent("inAnimationEnd");s.in.callback&&s.in.callback();e&&e(o)})};o.out=function(t){var i=o.$texts.find(":nth-child("+((o.currentIndex||0)+1)+")"),e=o.$current.find('[class^="'+o.options.type+'"]'),r=n.extend(!0,{},o.options,i.length?u(i[0]):{});o.triggerEvent("outAnimationBegin");f(e,r.out,function(){i.removeClass("current");o.triggerEvent("outAnimationEnd");r.out.callback&&r.out.callback();t&&t(o)})};o.start=function(n){setTimeout(function(){o.triggerEvent("start"),function t(n){o.in(n,function(){var i=o.$texts.children().length;n+=1;!o.options.loop&&n>=i?(o.options.callback&&o.options.callback(),o.triggerEvent("end")):(n=n%i,o.timeoutRun=setTimeout(function(){o.out(function(){t(n)})},o.options.minDisplayTime))})}(n||0)},o.options.initialDelay)};o.stop=function(){o.timeoutRun&&(clearInterval(o.timeoutRun),o.timeoutRun=null)};o.init()};n.fn.textillate=function(t,i){return this.each(function(){var f=n(this),r=f.data("textillate"),e=n.extend(!0,{},n.fn.textillate.defaults,u(this),typeof t=="object"&&t);r?typeof t=="string"?r[t].apply(r,[].concat(i)):r.setOptions.call(r,e):f.data("textillate",r=new s(this,e))})};n.fn.textillate.defaults={selector:".texts",loop:!1,minDisplayTime:2e3,initialDelay:0,"in":{effect:"fadeInLeftBig",delayScale:1.5,delay:50,sync:!1,reverse:!1,shuffle:!1,callback:function(){}},out:{effect:"hinge",delayScale:1.5,delay:50,sync:!1,reverse:!1,shuffle:!1,callback:function(){}},autoStart:!0,inEffects:[],outEffects:["hinge"],callback:function(){},type:"char"}}(jQuery);!function(n){function i(){var i=document.createElement("smartbanner"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}var t=function(t){var f,i,r,u;if((this.origHtmlMargin=parseFloat(n("html").css("margin-top")),this.options=n.extend({},n.smartbanner.defaults,t),f=navigator.standalone,i=navigator.userAgent,this.options.force?this.type=this.options.force:i.match(/Windows Phone 8/i)!=null&&i.match(/Touch/i)!==null?this.type="windows":i.match(/iPhone|iPod/i)!=null||i.match(/iPad/)&&this.options.iOSUniversalApp?i.match(/Safari/i)!=null&&(i.match(/CriOS/i)!=null||window.Number(i.substr(i.indexOf("OS ")+3,3).replace("_","."))<6)&&(this.type="ios"):i.match(/\bSilk\/(.*\bMobile Safari\b)?/)||i.match(/\bKF\w/)||i.match("Kindle Fire")?this.type="kindle":i.match(/Android/i)!=null&&(this.type="android"),this.type&&!f&&!this.getCookie("sb-closed")&&!this.getCookie("sb-installed"))&&(this.scale=this.options.scale=="auto"?n(window).width()/window.screen.width:this.options.scale,this.scale<1&&(this.scale=1),r=n(this.type=="android"?'meta[name="google-play-app"]':this.type=="ios"?'meta[name="apple-itunes-app"]':this.type=="kindle"?'meta[name="kindle-fire-app"]':'meta[name="msApplication-ID"]'),r.length!=0)){if(this.type=="windows")this.appId=n('meta[name="msApplication-PackageFamilyName"]').attr("content");else if(u=/app-id=([^\s,]+)/.exec(r.attr("content")),u)this.appId=u[1];else return;this.title=this.options.title?this.options.title:r.data("title")||n("title").text().replace(/\s*[|\-·].*$/,"");this.author=this.options.author?this.options.author:r.data("author")||(n('meta[name="author"]').length?n('meta[name="author"]').attr("content"):window.location.hostname);this.iconUrl=r.data("icon-url");this.price=r.data("price");this.options.onInstall=typeof this.options.onInstall=="function"?this.options.onInstall:function(){};this.options.onClose=typeof this.options.onClose=="function"?this.options.onClose:function(){};this.create();this.show();this.listen()}};(t.prototype={constructor:t,create:function(){var t,i=this.options.url?this.options.url:(this.type=="windows"?"ms-windows-store:navigate?appid=":this.type=="android"?"market://details?id=":this.type=="kindle"?"amzn://apps/android?asin=":"https://itunes.apple.com/"+this.options.appStoreLanguage+"/app/id")+this.appId,u=this.price||this.options.price,e=u?u+" - "+(this.type=="android"?this.options.inGooglePlay:this.type=="kindle"?this.options.inAmazonAppStore:this.type=="ios"?this.options.inAppStore:this.options.inWindowsStore):"",f=this.options.iconGloss===null?this.type=="ios":this.options.iconGloss,r;this.type=="android"&&this.options.GooglePlayParams&&(i=i+"&referrer="+this.options.GooglePlayParams);r='<div id="smartbanner" class="'+this.type+'"><div class="sb-container"><a href="#" class="sb-close">&times;<\/a><span class="sb-icon"><\/span><div class="sb-info"><strong>'+this.title+"<\/strong><span>"+this.author+"<\/span><span>"+e+'<\/span><\/div><a href="'+i+'" class="sb-button"><span>'+this.options.button+"<\/span><\/a><\/div><\/div>";this.options.layer?n(this.options.appendToSelector).append(r):n(this.options.appendToSelector).prepend(r);this.options.icon?t=this.options.icon:this.iconUrl?t=this.iconUrl:n('link[rel="apple-touch-icon-precomposed"]').length>0?(t=n('link[rel="apple-touch-icon-precomposed"]').attr("href"),this.options.iconGloss===null&&(f=!1)):n('link[rel="apple-touch-icon"]').length>0?t=n('link[rel="apple-touch-icon"]').attr("href"):n('meta[name="msApplication-TileImage"]').length>0?t=n('meta[name="msApplication-TileImage"]').attr("content"):n('meta[name="msapplication-TileImage"]').length>0&&(t=n('meta[name="msapplication-TileImage"]').attr("content"));t?(n("#smartbanner .sb-icon").css("background-image","url("+t+")"),f&&n("#smartbanner .sb-icon").addClass("gloss")):n("#smartbanner").addClass("no-icon");this.bannerHeight=n("#smartbanner").outerHeight()+2;this.scale>1&&(n("#smartbanner").css("top",parseFloat(n("#smartbanner").css("top"))*this.scale).css("height",parseFloat(n("#smartbanner").css("height"))*this.scale).hide(),n("#smartbanner .sb-container").css("-webkit-transform","scale("+this.scale+")").css("-msie-transform","scale("+this.scale+")").css("-moz-transform","scale("+this.scale+")").css("width",n(window).width()/this.scale));n("#smartbanner").css("position",this.options.layer?"absolute":"static")},listen:function(){n("#smartbanner .sb-close").on("click",n.proxy(this.close,this));n("#smartbanner .sb-button").on("click",n.proxy(this.install,this))},show:function(t){var i=n("#smartbanner"),r;i.stop();this.options.layer?(i.animate({top:0,display:"block"},this.options.speedIn).addClass("shown").show(),n(this.pushSelector).animate({paddingTop:this.origHtmlMargin+this.bannerHeight*this.scale},this.options.speedIn,"swing",t)):n.support.transition?(i.animate({top:0},this.options.speedIn).addClass("shown"),r=function(){n("html").removeClass("sb-animation");t&&t()},n(this.pushSelector).addClass("sb-animation").one(n.support.transition.end,r).emulateTransitionEnd(this.options.speedIn).css("margin-top",this.origHtmlMargin+this.bannerHeight*this.scale)):i.slideDown(this.options.speedIn).addClass("shown")},hide:function(t){var i=n("#smartbanner"),r;i.stop();this.options.layer?(i.animate({top:-1*this.bannerHeight*this.scale,display:"block"},this.options.speedIn).removeClass("shown"),n(this.pushSelector).animate({paddingTop:this.origHtmlMargin},this.options.speedIn,"swing",t)):n.support.transition?(this.type!=="android"?i.css("top",-1*this.bannerHeight*this.scale).removeClass("shown"):i.css({display:"none"}).removeClass("shown"),r=function(){n("html").removeClass("sb-animation");t&&t()},n(this.pushSelector).addClass("sb-animation").one(n.support.transition.end,r).emulateTransitionEnd(this.options.speedOut).css("margin-top",this.origHtmlMargin)):i.slideUp(this.options.speedOut).removeClass("shown")},close:function(n){n.preventDefault();this.hide();this.setCookie("sb-closed","true",this.options.daysHidden);this.options.onClose(n)},install:function(n){this.options.hideOnInstall&&this.hide();this.setCookie("sb-installed","true",this.options.daysReminder);this.options.onInstall(n)},setCookie:function(n,t,i){var r=new Date;r.setDate(r.getDate()+i);t=encodeURI(t)+(i==null?"":"; expires="+r.toUTCString());document.cookie=n+"="+t+"; path=/;"},getCookie:function(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return decodeURI(u);return null},switchType:function(){var t=this;this.hide(function(){t.type=t.type=="android"?"ios":"android";var i=n(t.type=="android"?'meta[name="google-play-app"]':'meta[name="apple-itunes-app"]').attr("content");t.appId=/app-id=([^\s,]+)/.exec(i)[1];n("#smartbanner").detach();t.create();t.show()})}},n.smartbanner=function(i){var u=n(window),r=u.data("smartbanner"),f=typeof i=="object"&&i;r||u.data("smartbanner",r=new t(f));typeof i=="string"&&r[i]()},n.smartbanner.defaults={title:null,author:null,price:"FREE",appStoreLanguage:"us",inAppStore:"On the App Store",inGooglePlay:"In Google Play",inAmazonAppStore:"In the Amazon Appstore",inWindowsStore:"In the Windows Store",GooglePlayParams:null,icon:null,iconGloss:null,button:"VIEW",url:null,scale:"auto",speedIn:300,speedOut:400,daysHidden:15,daysReminder:90,force:null,hideOnInstall:!0,layer:!1,iOSUniversalApp:!0,appendToSelector:"body",pushSelector:"html"},n.smartbanner.Constructor=t,n.support.transition===undefined)&&(n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this},n(function(){n.support.transition=i()}))}(window.jQuery),function(){"use strict";function it(){var u=!1,n;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","tmpval");u=!0;window.localStorage.removeItem("_tmptest")}catch(f){}if(u)try{window.localStorage&&(i=window.localStorage,r="localStorage",o=i.jStorage_update)}catch(e){}else if("globalStorage"in window)try{window.globalStorage&&(i=window.location.hostname=="localhost"?window.globalStorage["localhost.localdomain"]:window.globalStorage[window.location.hostname],r="globalStorage",o=i.jStorage_update)}catch(s){}else if(t=document.createElement("link"),t.addBehavior){t.style.behavior="url(#default#userData)";document.getElementsByTagName("head")[0].appendChild(t);try{t.load("jStorage")}catch(h){t.setAttribute("jStorage","{}");t.save("jStorage");t.load("jStorage")}n="{}";try{n=t.getAttribute("jStorage")}catch(l){}try{o=t.getAttribute("jStorage_update")}catch(a){}i.jStorage=n;r="userDataBehavior"}else{t=null;return}nt();y();rt();tt();"addEventListener"in window&&window.addEventListener("pageshow",function(n){n.persisted&&c()},!1)}function g(){var n="{}";if(r=="userDataBehavior"){t.load("jStorage");try{n=t.getAttribute("jStorage")}catch(u){}try{o=t.getAttribute("jStorage_update")}catch(f){}i.jStorage=n}nt();y();tt()}function rt(){r=="localStorage"||r=="globalStorage"?"addEventListener"in window?window.addEventListener("storage",c,!1):document.attachEvent("onstorage",c):r=="userDataBehavior"&&setInterval(c,1e3)}function c(){var n;clearTimeout(k);k=setTimeout(function(){if(r=="localStorage"||r=="globalStorage")n=i.jStorage_update;else if(r=="userDataBehavior"){t.load("jStorage");try{n=t.getAttribute("jStorage_update")}catch(u){}}n&&n!=o&&(o=n,ut())},25)}function ut(){var i=f.parse(f.stringify(n.__jstorage_meta.CRC32)),r,t,u,e;g();r=f.parse(f.stringify(n.__jstorage_meta.CRC32));u=[];e=[];for(t in i)if(i.hasOwnProperty(t)){if(!r[t]){e.push(t);continue}i[t]!=r[t]&&String(i[t]).substr(0,2)=="2."&&u.push(t)}for(t in r)r.hasOwnProperty(t)&&(i[t]||u.push(t));h(u,"updated");h(e,"deleted")}function h(n,t){var i,r,o,f,e;if(n=[].concat(n||[]),t=="flushed"){n=[];for(e in u)u.hasOwnProperty(e)&&n.push(e);t="deleted"}for(i=0,o=n.length;i<o;i++){if(u[n[i]])for(r=0,f=u[n[i]].length;r<f;r++)u[n[i]][r](n[i],t);if(u["*"])for(r=0,f=u["*"].length;r<f;r++)u["*"][r](n[i],t)}}function l(){var n=(+new Date).toString();if(r=="localStorage"||r=="globalStorage")try{i.jStorage_update=n}catch(u){r=!1}else r=="userDataBehavior"&&(t.setAttribute("jStorage_update",n),t.save("jStorage"));c()}function nt(){if(i.jStorage)try{n=f.parse(String(i.jStorage))}catch(t){i.jStorage="{}"}else i.jStorage="{}";p=i.jStorage?String(i.jStorage).length:0;n.__jstorage_meta||(n.__jstorage_meta={});n.__jstorage_meta.CRC32||(n.__jstorage_meta.CRC32={})}function a(){et();try{i.jStorage=f.stringify(n);t&&(t.setAttribute("jStorage",i.jStorage),t.save("jStorage"));p=i.jStorage?String(i.jStorage).length:0}catch(r){}}function e(n){if(typeof n!="string"&&typeof n!="number")throw new TypeError("Key name must be string or numeric");if(n=="__jstorage_meta")throw new TypeError("Reserved key name");return!0}function y(){var u,t,i,f,r=Infinity,e=!1,o=[];if(clearTimeout(d),n.__jstorage_meta&&typeof n.__jstorage_meta.TTL=="object"){u=+new Date;i=n.__jstorage_meta.TTL;f=n.__jstorage_meta.CRC32;for(t in i)i.hasOwnProperty(t)&&(i[t]<=u?(delete i[t],delete f[t],delete n[t],e=!0,o.push(t)):i[t]<r&&(r=i[t]));r!=Infinity&&(d=setTimeout(y,Math.min(r-u,2147483647)));e&&(a(),l(),h(o,"deleted"))}}function tt(){var t,f,r,u,i;if(n.__jstorage_meta.PubSub){for(u=w,i=[],t=f=n.__jstorage_meta.PubSub.length-1;t>=0;t--)r=n.__jstorage_meta.PubSub[t],r[0]>w&&(u=r[0],i.unshift(r));for(t=i.length-1;t>=0;t--)ft(i[t][1],i[t][2]);w=u}}function ft(n,t){if(s[n])for(var i=0,r=s[n].length;i<r;i++)try{s[n][i](n,f.parse(f.stringify(t)))}catch(u){}}function et(){var i,t,r;if(n.__jstorage_meta.PubSub){for(i=+new Date-2e3,t=0,r=n.__jstorage_meta.PubSub.length;t<r;t++)if(n.__jstorage_meta.PubSub[t][0]<=i){n.__jstorage_meta.PubSub.splice(t,n.__jstorage_meta.PubSub.length-t);break}n.__jstorage_meta.PubSub.length||delete n.__jstorage_meta.PubSub}}function ot(t,i){n.__jstorage_meta||(n.__jstorage_meta={});n.__jstorage_meta.PubSub||(n.__jstorage_meta.PubSub=[]);n.__jstorage_meta.PubSub.unshift([+new Date,t,i]);a();l()}function st(n,t){for(var f=n.length,i=t^f,u=0,r;f>=4;)r=n.charCodeAt(u)&255|(n.charCodeAt(++u)&255)<<8|(n.charCodeAt(++u)&255)<<16|(n.charCodeAt(++u)&255)<<24,r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16),r^=r>>>24,r=(r&65535)*1540483477+(((r>>>16)*1540483477&65535)<<16),i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16)^r,f-=4,++u;switch(f){case 3:i^=(n.charCodeAt(u+2)&255)<<16;case 2:i^=(n.charCodeAt(u+1)&255)<<8;case 1:i^=n.charCodeAt(u)&255;i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16)}return i^=i>>>13,i=(i&65535)*1540483477+(((i>>>16)*1540483477&65535)<<16),i^=i>>>15,i>>>0}var v=window.jQuery||window.$||(window.$={}),f={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(n){return String(n).evalJSON()}||v.parseJSON||v.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||v.toJSON};if(typeof f.parse!="function"||typeof f.stringify!="function")throw new Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");var n={__jstorage_meta:{CRC32:{}}},i={jStorage:"{}"},t=null,p=0,r=!1,u={},k=!1,o=0,s={},w=+new Date,d,b={isXML:function(n){var t=(n?n.ownerDocument||n:0).documentElement;return t?t.nodeName!=="HTML":!1},encode:function(n){if(!this.isXML(n))return!1;try{return(new XMLSerializer).serializeToString(n)}catch(t){try{return n.xml}catch(i){}}return!1},decode:function(n){var i="DOMParser"in window&&(new DOMParser).parseFromString||window.ActiveXObject&&function(n){var t=new ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(n),t},t;return i?(t=i.call("DOMParser"in window&&new DOMParser||window,n,"text/xml"),this.isXML(t)?t:!1):!1}};v.jStorage={version:"0.4.12",set:function(t,i,r){if(e(t),r=r||{},typeof i=="undefined")return this.deleteKey(t),i;if(b.isXML(i))i={_is_xml:!0,xml:b.encode(i)};else{if(typeof i=="function")return undefined;i&&typeof i=="object"&&(i=f.parse(f.stringify(i)))}return n[t]=i,n.__jstorage_meta.CRC32[t]="2."+st(f.stringify(i),2538058380),this.setTTL(t,r.TTL||0),h(t,"updated"),i},get:function(t,i){return(e(t),t in n)?n[t]&&typeof n[t]=="object"&&n[t]._is_xml?b.decode(n[t].xml):n[t]:typeof i=="undefined"?null:i},deleteKey:function(t){return(e(t),t in n)?(delete n[t],typeof n.__jstorage_meta.TTL=="object"&&t in n.__jstorage_meta.TTL&&delete n.__jstorage_meta.TTL[t],delete n.__jstorage_meta.CRC32[t],a(),l(),h(t,"deleted"),!0):!1},setTTL:function(t,i){var r=+new Date;return(e(t),i=Number(i)||0,t in n)?(n.__jstorage_meta.TTL||(n.__jstorage_meta.TTL={}),i>0?n.__jstorage_meta.TTL[t]=r+i:delete n.__jstorage_meta.TTL[t],a(),y(),l(),!0):!1},getTTL:function(t){var r=+new Date,i;return(e(t),t in n&&n.__jstorage_meta.TTL&&n.__jstorage_meta.TTL[t])?(i=n.__jstorage_meta.TTL[t]-r,i||0):0},flush:function(){return n={__jstorage_meta:{CRC32:{}}},a(),l(),h(null,"flushed"),!0},storageObj:function(){function t(){}return t.prototype=n,new t},index:function(){var i=[];for(var t in n)n.hasOwnProperty(t)&&t!="__jstorage_meta"&&i.push(t);return i},storageSize:function(){return p},currentBackend:function(){return r},storageAvailable:function(){return!!r},listenKeyChange:function(n,t){e(n);u[n]||(u[n]=[]);u[n].push(t)},stopListening:function(n,t){if(e(n),u[n]){if(!t){delete u[n];return}for(var i=u[n].length-1;i>=0;i--)u[n][i]==t&&u[n].splice(i,1)}},subscribe:function(n,t){if(n=(n||"").toString(),!n)throw new TypeError("Channel not defined");s[n]||(s[n]=[]);s[n].push(t)},publish:function(n,t){if(n=(n||"").toString(),!n)throw new TypeError("Channel not defined");ot(n,t)},reInit:function(){g()},noConflict:function(n){return delete window.$.jStorage,n&&(window.jStorage=this),this}};it()}()