function showTarget(n){for(var s,r,h,u,t={showClass:"display-block",hideClass:"display-none",showTarget:n.getAttribute("data-show-target"),hideTarget:n.getAttribute("data-hide-target")},f={hide:function(n){t.hideClass.length>0&&n.classList.add(t.hideClass);t.showClass.length>0&&n.classList.remove(t.showClass)},show:function(n){t.showClass.length>0&&n.classList.add(t.showClass);t.hideClass.length>0&&n.classList.remove(t.hideClass)}},e=t.showTarget.split(","),o=t.hideTarget.split(","),i=0;i<e.length;i++)(s=e[i],r=document.querySelectorAll(s),r.length<1)||r.forEach(function(n){f.show(n)});for(i=0;i<o.length;i++)(h=o[i],u=document.querySelectorAll(h),u.length<1)||u.forEach(function(n){f.hide(n)})}function validateMaskedDate(n){var t=n.val().split("-"),i=t[0];return i+=t.length>1&&t[1].length>0?"-"+t[1]:"-01",i+=t.length>2&&t[2].length>0?"-"+t[2]:"-01",parseDate(i)!==null}function parseDate(n){var t=n.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t!==null){var f=+t[3],r=+t[2],u=+t[1],i=new Date(u,r-1,f);if(i.getFullYear()===u&&i.getMonth()===r-1)return i}return null}function addErrorMessageToElement(n,t,i){var r,u,f,e;if(clearMessages(n),i!==undefined){for(typeof i=="string"&&(i=$.parseJSON(i)),t=t+"<ul>",r=0;r<i.length;r++)for(u=$("[name='"+i[r].key+"']"),u.length>0?u.addClass("input-validation-error"):(u=$("[name='"+i[r].key+".Id']"),u.length>0&&u.addClass("input-validation-error")),f=0;f<i[r].errors.length;f++)t=t+"<li>"+i[r].errors[f]+"<\/li>";t=t+"<\/ul>"}e='<div class="alert alert-danger alert-dismissible" role="alert"><i class="fa fa-fw fa-minus-circle"><\/i><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;<\/span><\/button>'+t+"<\/div>";$(e).prependTo(n)}function clearFormValues(n){var t=$(n);t.find("input[type=text], input[type=hidden], textarea, select").val("");t.find("input[type=checkbox]").prop("checked",!1);clearMessages(t)}function clearMessages(n){n.parent().find("input[type=text], input[type=hidden], input[type=checkbox], textarea, select").removeClass("input-validation-error");n.children(".alert").remove()}function addUrlLangTag(n){var t=window.location.href;return t.indexOf("?lang=")>=0?(langPosition=t.indexOf("?lang="),t=t.replace(t.substr(langPosition,8),"?lang="+n)):t.indexOf("&lang=")>=0?(langPosition=t.indexOf("&lang="),t=t.replace(t.substr(langPosition,8),"&lang="+n)):t=t.indexOf("?")>=0?t+"&lang="+n:t+"?lang="+n,t}function addUrlLoginTag(){var n,t;window.history&&window.history.pushState&&(n=replaceUrlTag("Login"),n===""&&(n=window.location.href,n.indexOf("Login")<0&&(n.indexOf("lang=")>=0?(t=n.substr(n.indexOf("lang="),7),n=n.replace(t,t+"&Login")):n=n+"?lang=en")),history.pushState(null,null,n))}function addUrlRegisterTag(){if(window.history&&window.history.pushState){var n=replaceUrlTag("Register");n===""&&(n=window.location.href+"?Register");history.pushState(null,null,n)}}function addUrlRecoverTag(){if(window.history&&window.history.pushState){var n=replaceUrlTag("Recover");n===""&&(n=window.location.href+"?Recover");history.pushState(null,null,n)}}function replaceUrlTag(n){var t=window.location.href,i="";return t.indexOf("Login")>=0?i=t.replace("Login",n):t.indexOf("Registered")>=0?i=t.replace("Registered",n):t.indexOf("Register")>=0?i=t.replace("Register",n):t.indexOf("Activated")>=0?i=t.replace("Activated",n):t.indexOf("RecoverMail")>=0?i=t.replace("RecoverMail",n):t.indexOf("Recover")>=0?i=t.replace("Recover",n):t.indexOf("PasswordChanged")>=0?i=t.replace("PasswordChanged",n):t.indexOf("ChangePassword")>=0&&(i=t.replace("ChangePassword",n)),i}function scrollToFirstFormValidationError(){var t=$(".field-validation-error").first(),n;t&&(n=t.offset().top,n=n-$("header").height()-85,$(window).scrollTop(n))}function applyWorkaroundForBootstrapModalNavigationBug(){$("html").on({"hidden.bs.modal":function(){$("body").removeClass("modal-open")},"shown.bs.modal":function(){$("body").addClass("modal-open")}})}function setCookie(n){var t=new Date;t.setYear(t.getFullYear()+10);docCookies.setItem(n,"yes",t,"/")}function hasCookie(n){return docCookies.hasItem(n)}var utilsApp,baseApp,homeApp,docCookies;if(function(n,t){function i(t,i){var u,f,e,o=t.nodeName.toLowerCase();return"area"===o?(u=t.parentNode,f=u.name,t.href&&f&&"map"===u.nodeName.toLowerCase()?(e=n("img[usemap=#"+f+"]")[0],!!e&&r(e)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&r(t)}function r(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return"hidden"===n.css(this,"visibility")}).length}var u=0,f=/^ui-id-\d+$/;n.ui=n.ui||{};n.extend(n.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});n.fn.extend({focus:function(t){return function(i,r){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){n(t).focus();r&&r.call(t)},i)}):t.apply(this,arguments)}}(n.fn.focus),scrollParent:function(){var t;return t=n.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(n.css(this,"position"))&&/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?n(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var u,f,r=n(this[0]);r.length&&r[0]!==document;){if(u=r.css("position"),("absolute"===u||"relative"===u||"fixed"===u)&&(f=parseInt(r.css("zIndex"),10),!isNaN(f)&&0!==f))return f;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})},removeUniqueId:function(){return this.each(function(){f.test(this.id)&&n(this).removeAttr("id")})}});n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},focusable:function(t){return i(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var r=n.attr(t,"tabindex"),u=isNaN(r);return(u||r>=0)&&i(t,!u)}});n("<a>").outerWidth(1).jquery||n.each(["Width","Height"],function(i,r){function u(t,i,r,u){return n.each(o,function(){i-=parseFloat(n.css(t,"padding"+this))||0;r&&(i-=parseFloat(n.css(t,"border"+this+"Width"))||0);u&&(i-=parseFloat(n.css(t,"margin"+this))||0)}),i}var o="Width"===r?["Left","Right"]:["Top","Bottom"],f=r.toLowerCase(),e={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+r]=function(i){return i===t?e["inner"+r].call(this):this.each(function(){n(this).css(f,u(this,i)+"px")})};n.fn["outer"+r]=function(t,i){return"number"!=typeof t?e["outer"+r].call(this,t):this.each(function(){n(this).css(f,u(this,t,!0,i)+"px")})}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))});n("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(n.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,n.camelCase(i)):t.call(this)}}(n.fn.removeData));n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());n.support.selectstart="onselectstart"in document.createElement("div");n.fn.extend({disableSelection:function(){return this.bind((n.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(n){n.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});n.extend(n.ui,{plugin:{add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i){var r,u=n.plugins[t];if(u&&n.element[0].parentNode&&11!==n.element[0].parentNode.nodeType)for(r=0;u.length>r;r++)n.options[u[r][0]]&&u[r][1].apply(n.element,i)}},hasScroll:function(t,i){if("hidden"===n(t).css("overflow"))return!1;var r=i&&"left"===i?"scrollLeft":"scrollTop",u=!1;return t[r]>0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)}})}(jQuery),function(n,t){var r=0,i=Array.prototype.slice,u=n.cleanData;n.cleanData=function(t){for(var i,r=0;null!=(i=t[r]);r++)try{n(i).triggerHandler("remove")}catch(f){}u(t)};n.widget=function(i,r,u){var h,e,f,s,c={},o=i.split(".")[0];i=i.split(".")[1];h=o+"-"+i;u||(u=r,r=n.Widget);n.expr[":"][h.toLowerCase()]=function(t){return!!n.data(t,h)};n[o]=n[o]||{};e=n[o][i];f=n[o][i]=function(n,i){return this._createWidget?(arguments.length&&this._createWidget(n,i),t):new f(n,i)};n.extend(f,e,{version:u.version,_proto:n.extend({},u),_childConstructors:[]});s=new r;s.options=n.widget.extend({},s.options);n.each(u,function(i,u){return n.isFunction(u)?(c[i]=function(){var n=function(){return r.prototype[i].apply(this,arguments)},t=function(n){return r.prototype[i].apply(this,n)};return function(){var i,r=this._super,f=this._superApply;return this._super=n,this._superApply=t,i=u.apply(this,arguments),this._super=r,this._superApply=f,i}}(),t):(c[i]=u,t)});f.prototype=n.widget.extend(s,{widgetEventPrefix:e?s.widgetEventPrefix||i:i},c,{constructor:f,namespace:o,widgetName:i,widgetFullName:h});e?(n.each(e._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,f,i._proto)}),delete e._childConstructors):r._childConstructors.push(f);n.widget.bridge(i,f)};n.widget.extend=function(r){for(var u,f,o=i.call(arguments,1),e=0,s=o.length;s>e;e++)for(u in o[e])f=o[e][u],o[e].hasOwnProperty(u)&&f!==t&&(r[u]=n.isPlainObject(f)?n.isPlainObject(r[u])?n.widget.extend({},r[u],f):n.widget.extend({},f):f);return r};n.widget.bridge=function(r,u){var f=u.prototype.widgetFullName||r;n.fn[r]=function(e){var h="string"==typeof e,o=i.call(arguments,1),s=this;return e=!h&&o.length?n.widget.extend.apply(null,[e].concat(o)):e,h?this.each(function(){var i,u=n.data(this,f);return u?n.isFunction(u[e])&&"_"!==e.charAt(0)?(i=u[e].apply(u,o),i!==u&&i!==t?(s=i&&i.jquery?s.pushStack(i.get()):i,!1):t):n.error("no such method '"+e+"' for "+r+" widget instance"):n.error("cannot call methods on "+r+" prior to initialization; attempted to call method '"+e+"'")}):this.each(function(){var t=n.data(this,f);t?t.option(e||{})._init():n.data(this,f,new u(e,this))}),s}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=r++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=n();this.hoverable=n();this.focusable=n();i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:n.noop,_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(n.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:n.noop,widget:function(){return this.element},option:function(i,r){var u,f,e,o=i;if(0===arguments.length)return n.widget.extend({},this.options);if("string"==typeof i)if(o={},u=i.split("."),i=u.shift(),u.length){for(f=o[i]=n.widget.extend({},this.options[i]),e=0;u.length-1>e;e++)f[u[e]]=f[u[e]]||{},f=f[u[e]];if(i=u.pop(),1===arguments.length)return f[i]===t?null:f[i];f[i]=r}else{if(1===arguments.length)return this.options[i]===t?null:this.options[i];o[i]=r}return this._setOptions(o),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return this.options[n]=t,"disabled"===n&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,r,u){var e,f=this;"boolean"!=typeof i&&(u=r,r=i,i=!1);u?(r=e=n(r),this.bindings=this.bindings.add(r)):(u=r,r=this.element,e=this.widget());n.each(u,function(u,o){function s(){return i||f.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled")?("string"==typeof o?f[o]:o).apply(f,arguments):t}"string"!=typeof o&&(s.guid=o.guid=o.guid||s.guid||n.guid++);var h=u.match(/^(\w+)\s*(.*)$/),c=h[1]+f.eventNamespace,l=h[2];l?e.delegate(l,c,s):r.bind(c,s)})},_off:function(n,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;n.unbind(t).undelegate(t)},_delay:function(n,t){function r(){return("string"==typeof n?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){n(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){n(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){n(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){n(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){"string"==typeof u&&(u={effect:u});var o,e=u?u===!0||"number"==typeof u?i:u.effect||i:t;u=u||{};"number"==typeof u&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}})}(jQuery),function(n){var t=!1;n(document).mouseup(function(){t=!1});n.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).bind("click."+this.widgetName,function(i){return!0===n.data(i.target,t.widgetName+".preventClickEvent")?(n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var r=this,u=1===i.which,f="string"==typeof this.options.cancel&&i.target.nodeName?n(i.target).closest(this.options.cancel).length:!1;return u&&!f&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===n.data(i.target,this.widgetName+".preventClickEvent")&&n.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},n(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return n.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(n,t){function e(n,t,i){return[parseFloat(n[0])*(a.test(n[0])?t/100:1),parseFloat(n[1])*(a.test(n[1])?i/100:1)]}function r(t,i){return parseInt(n.css(t,i),10)||0}function v(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:n.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}n.ui=n.ui||{};var f,u=Math.max,i=Math.abs,o=Math.round,s=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,y=n.fn.position;n.position={scrollbarWidth:function(){if(f!==t)return f;var u,r,i=n("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"),e=i.children()[0];return n("body").append(i),u=e.offsetWidth,i.css("overflow","scroll"),r=e.offsetWidth,u===r&&(r=i[0].clientWidth),i.remove(),f=u-r},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),u="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,f="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:f?n.position.scrollbarWidth():0,height:u?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=n.isWindow(i[0]),u=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:r,isDocument:u,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:r?i.width():i.outerWidth(),height:r?i.height():i.outerHeight()}}};n.fn.position=function(t){if(!t||!t.of)return y.apply(this,arguments);t=n.extend({},t);var b,f,a,w,p,d,g=n(t.of),tt=n.position.getWithinInfo(t.within),it=n.position.getScrollInfo(tt),k=(t.collision||"flip").split(" "),nt={};return d=v(g),g[0].preventDefault&&(t.at="left top"),f=d.width,a=d.height,w=d.offset,p=n.extend({},w),n.each(["my","at"],function(){var i,r,n=(t[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):h.test(n[0])?["center"].concat(n):["center","center"]);n[0]=s.test(n[0])?n[0]:"center";n[1]=h.test(n[1])?n[1]:"center";i=c.exec(n[0]);r=c.exec(n[1]);nt[this]=[i?i[0]:0,r?r[0]:0];t[this]=[l.exec(n[0])[0],l.exec(n[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===t.at[0]?p.left+=f:"center"===t.at[0]&&(p.left+=f/2),"bottom"===t.at[1]?p.top+=a:"center"===t.at[1]&&(p.top+=a/2),b=e(nt.at,f,a),p.left+=b[0],p.top+=b[1],this.each(function(){var y,d,h=n(this),c=h.outerWidth(),l=h.outerHeight(),rt=r(this,"marginLeft"),ut=r(this,"marginTop"),ft=c+rt+r(this,"marginRight")+it.width,et=l+ut+r(this,"marginBottom")+it.height,s=n.extend({},p),v=e(nt.my,h.outerWidth(),h.outerHeight());"right"===t.my[0]?s.left-=c:"center"===t.my[0]&&(s.left-=c/2);"bottom"===t.my[1]?s.top-=l:"center"===t.my[1]&&(s.top-=l/2);s.left+=v[0];s.top+=v[1];n.support.offsetFractions||(s.left=o(s.left),s.top=o(s.top));y={marginLeft:rt,marginTop:ut};n.each(["left","top"],function(i,r){n.ui.position[k[i]]&&n.ui.position[k[i]][r](s,{targetWidth:f,targetHeight:a,elemWidth:c,elemHeight:l,collisionPosition:y,collisionWidth:ft,collisionHeight:et,offset:[b[0]+v[0],b[1]+v[1]],my:t.my,at:t.at,within:tt,elem:h})});t.using&&(d=function(n){var r=w.left-s.left,v=r+f-c,e=w.top-s.top,y=e+a-l,o={target:{element:g,left:w.left,top:w.top,width:f,height:a},element:{element:h,left:s.left,top:s.top,width:c,height:l},horizontal:0>v?"left":r>0?"right":"center",vertical:0>y?"top":e>0?"bottom":"middle"};c>f&&f>i(r+v)&&(o.horizontal="center");l>a&&a>i(e+y)&&(o.vertical="middle");o.important=u(i(r),i(v))>u(i(e),i(y))?"horizontal":"vertical";t.using.call(this,n,o)});h.offset(n.extend(s,{using:d}))})};n.ui.position={fit:{left:function(n,t){var h,e=t.within,r=e.isWindow?e.scrollLeft:e.offset.left,o=e.width,s=n.left-t.collisionPosition.marginLeft,i=r-s,f=s+t.collisionWidth-o-r;t.collisionWidth>o?i>0&&0>=f?(h=n.left+i+t.collisionWidth-o-r,n.left+=i-h):n.left=f>0&&0>=i?r:i>f?r+o-t.collisionWidth:r:i>0?n.left+=i:f>0?n.left-=f:n.left=u(n.left-s,n.left)},top:function(n,t){var h,o=t.within,r=o.isWindow?o.scrollTop:o.offset.top,e=t.within.height,s=n.top-t.collisionPosition.marginTop,i=r-s,f=s+t.collisionHeight-e-r;t.collisionHeight>e?i>0&&0>=f?(h=n.top+i+t.collisionHeight-e-r,n.top+=i-h):n.top=f>0&&0>=i?r:i>f?r+e-t.collisionHeight:r:i>0?n.top+=i:f>0?n.top-=f:n.top=u(n.top-s,n.top)}},flip:{left:function(n,t){var o,s,r=t.within,y=r.offset.left+r.scrollLeft,c=r.width,h=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-t.collisionPosition.marginLeft,a=l-h,v=l+t.collisionWidth-c-h,u="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,e=-2*t.offset[0];0>a?(o=n.left+u+f+e+t.collisionWidth-c-y,(0>o||i(a)>o)&&(n.left+=u+f+e)):v>0&&(s=n.left-t.collisionPosition.marginLeft+u+f+e-h,(s>0||v>i(s))&&(n.left+=u+f+e))},top:function(n,t){var o,s,r=t.within,y=r.offset.top+r.scrollTop,a=r.height,h=r.isWindow?r.scrollTop:r.offset.top,v=n.top-t.collisionPosition.marginTop,c=v-h,l=v+t.collisionHeight-a-h,p="top"===t.my[1],u=p?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,e=-2*t.offset[1];0>c?(s=n.top+u+f+e+t.collisionHeight-a-y,n.top+u+f+e>c&&(0>s||i(c)>s)&&(n.top+=u+f+e)):l>0&&(o=n.top-t.collisionPosition.marginTop+u+f+e-h,n.top+u+f+e>l&&(o>0||l>i(o))&&(n.top+=u+f+e))}},flipfit:{left:function(){n.ui.position.flip.left.apply(this,arguments);n.ui.position.fit.left.apply(this,arguments)},top:function(){n.ui.position.flip.top.apply(this,arguments);n.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,r,u,f,e=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(e?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};e&&n.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in r)t.style[f]=r[f];t.appendChild(o);i=e||document.documentElement;i.insertBefore(t,i.firstChild);o.style.cssText="position: absolute; left: 10.7432222px;";u=n(o).offset().left;n.support.offsetFractions=u>10&&11>u;t.innerHTML="";i.removeChild(t)}()}(jQuery),function(n){var t,i="ui-button ui-widget ui-state-default ui-corner-all",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=n(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},u=function(t){var i=t.name,r=t.form,u=n([]);return i&&(i=i.replace(/'/g,"\\'"),u=r?n(r).find("[name='"+i+"']"):n("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),u};n.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f);"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var e=this,r=this.options,o="checkbox"===this.type||"radio"===this.type,s=o?"":"ui-state-active";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===t&&n(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||n(this).removeClass(s)}).bind("click"+this.eventNamespace,function(n){r.disabled&&(n.preventDefault(),n.stopImmediatePropagation())});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});o&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()});"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled)return!1;n(this).addClass("ui-state-active");e.buttonElement.attr("aria-pressed","true");var t=e.element[0];u(t).not(t).map(function(){return n(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(n(this).addClass("ui-state-active"),t=this,e.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(n(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return r.disabled?!1:((t.keyCode===n.ui.keyCode.SPACE||t.keyCode===n.ui.keyCode.ENTER)&&n(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){n(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===n.ui.keyCode.SPACE&&n(this).click()}));this._setOption("disabled",r.disabled);this._resetButton()},_determineButtonType:function(){var n,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button";"checkbox"===this.type||"radio"===this.type?(n=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=n.find(t),this.buttonElement.length||(n=n.length?n.siblings():this.element.siblings(),this.buttonElement=n.filter(t),this.buttonElement.length||(this.buttonElement=n.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(i+" ui-state-active "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(n,t){return this._super(n,t),"disabled"===n?(this.element.prop("disabled",!!t),t&&this.buttonElement.removeClass("ui-state-focus"),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t);"radio"===this.type?u(this.element[0]).each(function(){n(this).is(":checked")?n(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):n(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var i=this.buttonElement.removeClass(r),e=n("<span><\/span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(i.empty()).text(),t=this.options.icons,f=t.primary&&t.secondary,u=[];t.primary||t.secondary?(this.options.text&&u.push("ui-button-text-icon"+(f?"s":t.primary?"-primary":"-secondary")),t.primary&&i.prepend("<span class='ui-button-icon-primary ui-icon "+t.primary+"'><\/span>"),t.secondary&&i.append("<span class='ui-button-icon-secondary ui-icon "+t.secondary+"'><\/span>"),this.options.text||(u.push(f?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||i.attr("title",n.trim(e)))):u.push("ui-button-text-only");i.addClass(u.join(" "))}});n.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(n,t){"disabled"===n&&this.buttons.button("option",n,t);this._super(n,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(n){function t(n){return function(){var t=this.element.val();n.apply(this,arguments);this._refresh();t!==this.element.val()&&this._trigger("change")}}n.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);""!==this.value()&&this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return n.each(["min","max","step"],function(n,r){var u=i.attr(r);void 0!==u&&u.length&&(t[r]=u)}),t},_events:{keydown:function(n){this._start(n)&&this._keydown(n)&&n.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(n){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",n),void 0)},mousewheel:function(n,t){if(t){if(!this.spinning&&!this._start(n))return!1;this._spin((t>0?1:-1)*this.options.step,n);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(n)},100);n.preventDefault()}},"mousedown .ui-spinner-button":function(t){function r(){var n=this.element[0]===this.document[0].activeElement;n||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();t.preventDefault();r.call(this);this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;r.call(this)});this._start(t)!==!1&&this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(n(t.currentTarget).hasClass("ui-state-active"))return this._start(t)===!1?!1:(this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var n=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=n.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(.5*n.height())&&n.height()>0&&n.height(n.height());this.options.disabled&&this.disable()},_keydown:function(t){var r=this.options,i=n.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,r.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-r.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'><\/span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;<\/span><\/a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;<\/span><\/a>"},_start:function(n){return this.spinning||this._trigger("start",n)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(n,t,i){n=n||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,t,i)},n);this._spin(t*this.options.step,i)},_spin:function(n,t){var i=this.value()||0;this.counter||(this.counter=1);i=this._adjustValue(i+n*this._increment(this.counter));this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?n.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var n=this._precisionOf(this.options.step);return null!==this.options.min&&(n=Math.max(n,this._precisionOf(this.options.min))),n},_precisionOf:function(n){var t=""+n,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(n){var r,i,t=this.options;return r=null!==t.min?t.min:0,i=n-r,i=Math.round(i/t.step)*t.step,n=r+i,n=parseFloat(n.toFixed(this._precision())),null!==t.max&&n>t.max?t.max:null!==t.min&&t.min>n?t.min:n},_stop:function(n){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",n))},_setOption:function(n,t){if("culture"===n||"numberFormat"===n){var i=this._parse(this.element.val());return this.options[n]=t,this.element.val(this._format(i)),void 0}("max"===n||"min"===n||"step"===n)&&"string"==typeof t&&(t=this._parse(t));"icons"===n&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down));this._super(n,t);"disabled"===n&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(n){this._super(n);this._value(this.element.val())}),_parse:function(n){return"string"==typeof n&&""!==n&&(n=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(n,10,this.options.culture):+n),""===n||isNaN(n)?null:n},_format:function(n){return""===n?"":window.Globalize&&this.options.numberFormat?Globalize.format(n,this.options.numberFormat,this.options.culture):n},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(n,t){var i;""!==n&&(i=this._parse(n),null!==i&&(t||(i=this._adjustValue(i)),n=this._format(i)));this.element.val(n);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:t(function(n){this._stepUp(n)}),_stepUp:function(n){this._start()&&(this._spin((n||1)*this.options.step),this._stop())},stepDown:t(function(n){this._stepDown(n)}),_stepDown:function(n){this._start()&&(this._spin((n||1)*-this.options.step),this._stop())},pageUp:t(function(n){this._stepUp((n||1)*this.options.page)}),pageDown:t(function(n){this._stepDown((n||1)*this.options.page)}),value:function(n){return arguments.length?(t(this._value).call(this,n),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),!function(n){n(["jquery"],function(n){return function(){function v(n,t,r){return u({type:f.error,iconClass:i().iconClasses.error,message:n,optionsOverride:r,title:t})}function r(r,u){return r||(r=i()),t=n("#"+r.containerId),t.length?t:(u&&(t=nt(r)),t)}function y(n,t,r){return u({type:f.info,iconClass:i().iconClasses.info,message:n,optionsOverride:r,title:t})}function p(n){o=n}function w(n,t,r){return u({type:f.success,iconClass:i().iconClasses.success,message:n,optionsOverride:r,title:t})}function b(n,t,r){return u({type:f.warning,iconClass:i().iconClasses.warning,message:n,optionsOverride:r,title:t})}function k(n){var u=i();t||r(u);h(n,u)||g(u)}function d(u){var f=i();return t||r(f),u&&0===n(":focus",u).length?void e(u):void(t.children().length&&t.remove())}function g(i){for(var u=t.children(),r=u.length-1;r>=0;r--)h(n(u[r]),i)}function h(t,i){return t&&0===n(":focus",t).length?(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){e(t)}}),!0):!1}function nt(i){return t=n("<div/>").attr("id",i.containerId).addClass(i.positionClass).attr("aria-live","polite").attr("role","alert"),t.appendTo(n(i.target)),t}function tt(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'<button type="button">&times;<\/button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function c(n){o&&o(n)}function u(u){function v(t){if(!n(":focus",o).length||t)return(clearTimeout(h.intervalId),o[f.hideMethod]({duration:f.hideDuration,easing:f.hideEasing,complete:function(){e(o);f.onHidden&&"hidden"!==a.state&&f.onHidden();a.state="hidden";a.endTime=new Date;c(a)}}))}function g(){(f.timeOut>0||f.extendedTimeOut>0)&&(w=setTimeout(v,f.extendedTimeOut),h.maxHideTime=parseFloat(f.extendedTimeOut),h.hideEta=(new Date).getTime()+h.maxHideTime)}function nt(){clearTimeout(w);h.hideEta=0;o.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}function tt(){var n=(h.hideEta-(new Date).getTime())/h.maxHideTime*100;b.width(n+"%")}var f=i(),p=u.iconClass||f.iconClass;if("undefined"!=typeof u.optionsOverride&&(f=n.extend(f,u.optionsOverride),p=u.optionsOverride.iconClass||p),f.preventDuplicates){if(u.message===s)return;s=u.message}l++;t=r(f,!0);var w=null,o=n("<div/>"),k=n("<div/>"),d=n("<div/>"),b=n("<div/>"),y=n(f.closeHtml),h={intervalId:null,hideEta:null,maxHideTime:null},a={toastId:l,state:"visible",startTime:new Date,options:f,map:u};return u.iconClass&&o.addClass(f.toastClass).addClass(p),u.title&&(k.append(u.title).addClass(f.titleClass),o.append(k)),u.message&&(d.append(u.message).addClass(f.messageClass),o.append(d)),f.closeButton&&(y.addClass("toast-close-button").attr("role","button"),o.prepend(y)),f.progressBar&&(b.addClass("toast-progress"),o.prepend(b)),o.hide(),f.newestOnTop?t.prepend(o):t.append(o),o[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown}),f.timeOut>0&&(w=setTimeout(v,f.timeOut),h.maxHideTime=parseFloat(f.timeOut),h.hideEta=(new Date).getTime()+h.maxHideTime,f.progressBar&&(h.intervalId=setInterval(tt,10))),o.hover(nt,g),!f.onclick&&f.tapToDismiss&&o.click(v),f.closeButton&&y&&y.click(function(n){n.stopPropagation?n.stopPropagation():void 0!==n.cancelBubble&&n.cancelBubble!==!0&&(n.cancelBubble=!0);v(!0)}),f.onclick&&o.click(function(){f.onclick();v()}),c(a),f.debug&&console&&console.log(a),o}function i(){return n.extend({},tt(),a.options)}function e(n){t||(t=r());n.is(":visible")||(n.remove(),n=null,0===t.children().length&&(t.remove(),s=void 0))}var t,o,s,l=0,f={error:"error",info:"info",success:"success",warning:"warning"},a={clear:k,remove:d,error:v,getContainer:r,info:y,options:{},subscribe:p,success:w,version:"2.1.0",warning:b};return a}()})}("function"==typeof define&&define.amd?define:function(n,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}),!function(n){"use strict";n.expr[":"].icontains=function(t,i,r){return n(t).text().toUpperCase().indexOf(r[3].toUpperCase())>=0};var t=function(i,r,u){u&&(u.stopPropagation(),u.preventDefault());this.$element=n(i);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=n.extend({},n.fn.selectpicker.defaults,this.$element.data(),"object"==typeof r&&r);null===this.options.title&&(this.options.title=this.$element.attr("title"));this.val=t.prototype.val;this.render=t.prototype.render;this.refresh=t.prototype.refresh;this.setStyle=t.prototype.setStyle;this.selectAll=t.prototype.selectAll;this.deselectAll=t.prototype.deselectAll;this.init()};t.prototype={constructor:t,init:function(){var i=this,t=this.$element.attr("id");this.$element.hide();this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement);this.$menu=this.$newElement.find("> .dropdown-menu");this.$button=this.$newElement.find("> button");this.$searchbox=this.$newElement.find("input");void 0!==t&&(this.$button.attr("data-id",t),n('label[for="'+t+'"]').click(function(n){n.preventDefault();i.$button.focus()}));this.checkDisabled();this.clickListener();this.options.liveSearch&&this.liveSearchListener();this.render();this.liHeight();this.setStyle();this.setWidth();this.options.container&&this.selectPosition();this.$menu.data("this",this);this.$newElement.data("this",this)},createDropdown:function(){var t=this.multiple?" show-tick":"",i=this.autofocus?" autofocus":"",r=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;<\/button>'+this.options.header+"<\/div>":"",u=this.options.liveSearch?'<div class="bootstrap-select-searchbox"><input type="text" class="input-block-level form-control" /><\/div>':"",f='<div class="btn-group bootstrap-select'+t+'"><button type="button" class="btn dropdown-toggle selectpicker" data-toggle="dropdown"'+i+'><span class="filter-option pull-left"><\/span>&nbsp;<span class="caret"><\/span><\/button><div class="dropdown-menu open">'+r+u+'<ul class="dropdown-menu inner selectpicker" role="menu"><\/ul><\/div><\/div>';return n(f)},createView:function(){var n=this.createDropdown(),t=this.createLi();return n.find("ul").append(t),n},reloadLi:function(){this.destroyLi();var n=this.createLi();this.$menu.find("ul").append(n)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var i=this,t=[],r="";return this.$element.find("option").each(function(){var r=n(this),f=r.attr("class")||"",e=r.attr("style")||"",u=r.data("content")?r.data("content"):r.html(),h=void 0!==r.data("subtext")?'<small class="muted text-muted">'+r.data("subtext")+"<\/small>":"",o=void 0!==r.data("icon")?'<i class="'+i.options.iconBase+" "+r.data("icon")+'"><\/i> ':"";if(""!==o&&(r.is(":disabled")||r.parent().is(":disabled"))&&(o="<span>"+o+"<\/span>"),r.data("content")||(u=o+'<span class="text">'+u+h+"<\/span>"),i.options.hideDisabled&&(r.is(":disabled")||r.parent().is(":disabled")))t.push('<a style="min-height: 0; padding: 0"><\/a>');else if(r.parent().is("optgroup")&&r.data("divider")!==!0)if(0===r.index()){var s=r.parent().attr("label"),c=void 0!==r.parent().data("subtext")?'<small class="muted text-muted">'+r.parent().data("subtext")+"<\/small>":"",l=r.parent().data("icon")?'<i class="'+r.parent().data("icon")+'"><\/i> ':"";s=l+'<span class="text">'+s+c+"<\/span>";0!==r[0].index?t.push('<div class="div-contain"><div class="divider"><\/div><\/div><dt>'+s+"<\/dt>"+i.createA(u,"opt "+f,e)):t.push("<dt>"+s+"<\/dt>"+i.createA(u,"opt "+f,e))}else t.push(i.createA(u,"opt "+f,e));else r.data("divider")===!0?t.push('<div class="div-contain"><div class="divider"><\/div><\/div>'):n(this).data("hidden")===!0?t.push(""):t.push(i.createA(u,f,e))}),n.each(t,function(n,t){r+="<li rel="+n+">"+t+"<\/li>"}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),n(r)},createA:function(n,t,i){return'<a tabindex="0" class="'+t+'" style="'+i+'">'+n+'<i class="'+this.options.iconBase+" "+this.options.tickIcon+' icon-ok check-mark"><\/i><\/a>'},render:function(t){var i=this,r,u,f,e;t!==!1&&this.$element.find("option").each(function(t){i.setDisabled(t,n(this).is(":disabled")||n(this).parent().is(":disabled"));i.setSelected(t,n(this).is(":selected"))});this.tabIndex();r=this.$element.find("option:selected").map(function(){var r,t=n(this),u=t.data("icon")&&i.options.showIcon?'<i class="'+i.options.iconBase+" "+t.data("icon")+'"><\/i> ':"";return r=i.options.showSubtext&&t.attr("data-subtext")&&!i.multiple?' <small class="muted text-muted">'+t.data("subtext")+"<\/small>":"",t.data("content")&&i.options.showContent?t.data("content"):void 0!==t.attr("title")?t.attr("title"):u+t.html()+r}).toArray();u=this.multiple?r.join(this.options.multipleSeparator):r[0];this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1&&(f=this.options.selectedTextFormat.split(">"),e=this.options.hideDisabled?":not([disabled])":"",(f.length>1&&r.length>f[1]||1==f.length&&r.length>=2)&&(u=this.options.countSelectedText.replace("{0}",r.length).replace("{1}",this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+e).length)));u||(u=void 0!==this.options.title?this.options.title:this.options.noneSelectedText);this.$button.attr("title",n.trim(u));this.$newElement.find(".filter-option").html(u)},setStyle:function(n,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi,""));var i=n?n:this.options.style;"add"==t?this.$button.addClass(i):"remove"==t?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(){var t=this.$menu.parent().clone().find("> .dropdown-toggle").prop("autofocus",!1).end().appendTo("body"),n=t.addClass("open").find("> .dropdown-menu"),i=n.find("li > a").outerHeight(),r=this.options.header?n.find(".popover-title").outerHeight():0,u=this.options.liveSearch?n.find(".bootstrap-select-searchbox").outerHeight():0;t.remove();this.$newElement.data("liHeight",i).data("headerHeight",r).data("searchHeight",u)},setSize:function(){var i,r,e,u=this,t=this.$menu,h=t.find(".inner"),k=this.$newElement.outerHeight(),c=this.$newElement.data("liHeight"),l=this.$newElement.data("headerHeight"),a=this.$newElement.data("searchHeight"),d=t.find("li .divider").outerHeight(!0),f=parseInt(t.css("padding-top"))+parseInt(t.css("padding-bottom"))+parseInt(t.css("border-top-width"))+parseInt(t.css("border-bottom-width")),v=this.options.hideDisabled?":not(.disabled)":"",y=n(window),o=f+parseInt(t.css("margin-top"))+parseInt(t.css("margin-bottom"))+2,p=function(){r=u.$newElement.offset().top-y.scrollTop();e=y.height()-r-k},s,w,b;(p(),this.options.header&&t.css("padding-top",0),"auto"==this.options.size)?(s=function(){var n;p();i=e-o;u.options.dropupAuto&&u.$newElement.toggleClass("dropup",r>e&&i-o<t.height());u.$newElement.hasClass("dropup")&&(i=r-o);n=t.find("li").length+t.find("dt").length>3?3*c+o-2:0;t.css({"max-height":i+"px",overflow:"hidden","min-height":n+"px"});h.css({"max-height":i-l-a-f+"px","overflow-y":"auto","min-height":n-f+"px"})},s(),n(window).resize(s),n(window).scroll(s)):this.options.size&&"auto"!=this.options.size&&t.find("li"+v).length>this.options.size&&(w=t.find("li"+v+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index(),b=t.find("li").slice(0,w+1).find(".div-contain").length,i=c*this.options.size+b*d+f,u.options.dropupAuto&&this.$newElement.toggleClass("dropup",r>e&&i<t.height()),t.css({"max-height":i+l+a+"px",overflow:"hidden"}),h.css({"max-height":i-f+"px","overflow-y":"auto"}))},setWidth:function(){if("auto"==this.options.width){this.$menu.css("min-width","0");var n=this.$newElement.clone().appendTo("body"),t=n.find("> .dropdown-menu").css("width");n.remove();this.$newElement.css("width",t)}else"fit"==this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var r,f,i=this,t=n("<div />"),u=function(n){t.addClass(n.attr("class")).toggleClass("dropup",n.hasClass("dropup"));r=n.offset();f=n.hasClass("dropup")?0:n[0].offsetHeight;t.css({top:r.top+f,left:r.left,width:n[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){u(n(this));t.appendTo(i.options.container);t.toggleClass("open",!n(this).hasClass("open"));t.append(i.$menu)});n(window).resize(function(){u(i.$newElement)});n(window).on("scroll",function(){u(i.$newElement)});n("html").on("click",function(r){n(r.target).closest(i.$newElement).length<1&&t.removeClass("open")})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement);this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null;this.reloadLi();this.render();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},update:function(){this.reloadLi();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},setSelected:function(t,i){null==this.$lis&&(this.$lis=this.$menu.find("li"));n(this.$lis[t]).toggleClass("selected",i)},setDisabled:function(t,i){null==this.$lis&&(this.$lis=this.$menu.find("li"));i?n(this.$lis[t]).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1):n(this.$lis[t]).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element.is(":disabled")},checkDisabled:function(){var n=this;this.isDisabled()?this.$button.addClass("disabled").attr("tabindex",-1):(this.$button.hasClass("disabled")&&this.$button.removeClass("disabled"),-1==this.$button.attr("tabindex")&&(this.$element.data("tabindex")||this.$button.removeAttr("tabindex")));this.$button.click(function(){return!n.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var t=this;n("body").on("touchstart.dropdown",".dropdown-menu",function(n){n.stopPropagation()});this.$newElement.on("click",function(){t.setSize();t.options.liveSearch||t.multiple||setTimeout(function(){t.$menu.find(".selected a").focus()},10)});this.$menu.on("click","li a",function(i){var r=n(this).parent().index(),o=t.$element.val(),s=t.$element.prop("selectedIndex");if(t.multiple&&i.stopPropagation(),i.preventDefault(),!t.isDisabled()&&!n(this).parent().hasClass("disabled")){var f=t.$element.find("option"),u=f.eq(r),e=u.prop("selected");t.multiple?(u.prop("selected",!e),t.setSelected(r,!e)):(f.prop("selected",!1),u.prop("selected",!0),t.$menu.find(".selected").removeClass("selected"),t.setSelected(r,!0));t.multiple?t.options.liveSearch&&t.$searchbox.focus():t.$button.focus();(o!=t.$element.val()&&t.multiple||s!=t.$element.prop("selectedIndex")&&!t.multiple)&&t.$element.change()}});this.$menu.on("click","li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)",function(n){n.target==this&&(n.preventDefault(),n.stopPropagation(),t.options.liveSearch?t.$searchbox.focus():t.$button.focus())});this.$menu.on("click",".popover-title .close",function(){t.$button.focus()});this.$searchbox.on("click",function(n){n.stopPropagation()});this.$element.change(function(){t.render(!1)})},liveSearchListener:function(){var t=this,i=n('<li class="no-results"><\/li>');this.$newElement.on("click.dropdown.data-api",function(){t.$menu.find(".active").removeClass("active");t.$searchbox.val()&&(t.$searchbox.val(""),t.$menu.find("li").show(),i.parent().length&&i.remove());t.multiple||t.$menu.find(".selected").addClass("active");setTimeout(function(){t.$searchbox.focus()},10)});this.$searchbox.on("input propertychange",function(){t.$searchbox.val()?(t.$menu.find("li").show().not(":icontains("+t.$searchbox.val()+")").hide(),t.$menu.find("li").filter(":visible:not(.no-results)").length?i.parent().length&&i.remove():(i.parent().length&&i.remove(),i.html(t.options.noneResultsText+' "'+t.$searchbox.val()+'"').show(),t.$menu.find("li").last().after(i))):(t.$menu.find("li").show(),i.parent().length&&i.remove());t.$menu.find("li.active").removeClass("active");t.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus();n(this).focus()});this.$menu.on("mouseenter","a",function(i){t.$menu.find(".active").removeClass("active");n(i.currentTarget).parent().not(".disabled").addClass("active")});this.$menu.on("mouseleave","a",function(){t.$menu.find(".active").removeClass("active")})},val:function(n){return void 0!==n?(this.$element.val(n),this.$element.change(),this.$element):this.$element.val()},selectAll:function(){this.$element.find("option").prop("selected",!0).attr("selected","selected");this.render()},deselectAll:function(){this.$element.find("option").prop("selected",!1).removeAttr("selected");this.render()},keydown:function(t){var f,r,o,i,h,c,l,v,y,u,p,s,w={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},e,b,a;(f=n(this),o=f.parent(),f.is("input")&&(o=f.parent().parent()),u=o.data("this"),u.options.liveSearch&&(o=f.parent().parent()),u.options.container&&(o=u.$menu),r=n("[role=menu] li:not(.divider) a",o),s=u.$menu.parent().hasClass("open"),!s&&/([0-9]|[A-z])/.test(String.fromCharCode(t.keyCode))&&(u.setSize(),u.$menu.parent().addClass("open"),s=u.$menu.parent().hasClass("open"),u.$searchbox.focus()),u.options.liveSearch&&(/(^9$|27)/.test(t.keyCode)&&s&&0===u.$menu.find(".active").length&&(t.preventDefault(),u.$menu.parent().removeClass("open"),u.$button.focus()),r=n("[role=menu] li:not(.divider):visible",o),f.val()||/(38|40)/.test(t.keyCode)||0===r.filter(".active").length&&(r=u.$newElement.find("li").filter(":icontains("+w[t.keyCode]+")"))),r.length)&&(/(38|40)/.test(t.keyCode)?(i=r.index(r.filter(":focus")),c=r.parent(":not(.disabled):visible").first().index(),l=r.parent(":not(.disabled):visible").last().index(),h=r.eq(i).parent().nextAll(":not(.disabled):visible").eq(0).index(),v=r.eq(i).parent().prevAll(":not(.disabled):visible").eq(0).index(),y=r.eq(h).parent().prevAll(":not(.disabled):visible").eq(0).index(),u.options.liveSearch&&(r.each(function(t){n(this).is(":not(.disabled)")&&n(this).data("index",t)}),i=r.index(r.filter(".active")),c=r.filter(":not(.disabled):visible").first().data("index"),l=r.filter(":not(.disabled):visible").last().data("index"),h=r.eq(i).nextAll(":not(.disabled):visible").eq(0).data("index"),v=r.eq(i).prevAll(":not(.disabled):visible").eq(0).data("index"),y=r.eq(h).prevAll(":not(.disabled):visible").eq(0).data("index")),p=f.data("prevIndex"),38==t.keyCode&&(u.options.liveSearch&&(i-=1),i!=y&&i>v&&(i=v),c>i&&(i=c),i==p&&(i=l)),40==t.keyCode&&(u.options.liveSearch&&(i+=1),-1==i&&(i=0),i!=y&&h>i&&(i=h),i>l&&(i=l),i==p&&(i=c)),f.data("prevIndex",i),u.options.liveSearch?(t.preventDefault(),f.is(".dropdown-toggle")||(r.removeClass("active"),r.eq(i).addClass("active").find("a").focus(),f.focus())):r.eq(i).focus()):f.is("input")||(a=[],r.each(function(){n(this).parent().is(":not(.disabled)")&&n.trim(n(this).text().toLowerCase()).substring(0,1)==w[t.keyCode]&&a.push(n(this).parent().index())}),e=n(document).data("keycount"),e++,n(document).data("keycount",e),b=n.trim(n(":focus").text().toLowerCase()).substring(0,1),b!=w[t.keyCode]?(e=1,n(document).data("keycount",e)):e>=a.length&&(n(document).data("keycount",0),e>a.length&&(e=1)),r.eq(a[e-1]).focus()),/(13|32|^9$)/.test(t.keyCode)&&s&&(/(32)/.test(t.keyCode)||t.preventDefault(),u.options.liveSearch?/(32)/.test(t.keyCode)||(u.$menu.find(".active a").click(),f.focus()):n(":focus").click(),n(document).data("keycount",0)),(/(^9$|27)/.test(t.keyCode)&&s&&(u.multiple||u.options.liveSearch)||/(27)/.test(t.keyCode)&&!s)&&(u.$menu.parent().removeClass("open"),u.$button.focus()))},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},destroy:function(){this.$newElement.remove();this.$element.remove()}};n.fn.selectpicker=function(i,r){var u,f=arguments,e=this.each(function(){var h,s;if(n(this).is("select")){var c=n(this),e=c.data("selectpicker"),o="object"==typeof i&&i;if(e){if(o)for(h in o)e.options[h]=o[h]}else c.data("selectpicker",e=new t(this,o,r));"string"==typeof i&&(s=i,e[s]instanceof Function?([].shift.apply(f),u=e[s].apply(e,f)):u=e.options[s])}});return void 0!==u?u:e};n.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",noneResultsText:"No results match",countSelectedText:"{0} of {1} selected",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"};n(document).data("keycount",0).on("keydown",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",t.prototype.keydown).on("focusin.modal",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",function(n){n.stopPropagation()})}(window.jQuery),function(n){"use strict";function t(n,t,i){return n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent?n.attachEvent("on"+t,i):void 0}function i(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i]===t)return!0;return!1}function r(n,t){var i;n.createTextRange?(i=n.createTextRange(),i.move("character",t),i.select()):n.selectionStart&&(n.focus(),n.setSelectionRange(t,t))}function u(n,t){try{return n.type=t,!0}catch(i){return!1}}n.Placeholders={Utils:{addEventListener:t,inArray:i,moveCaret:r,changeType:u}}}(this),function(n){"use strict";function nt(){}function tt(){try{return document.activeElement}catch(n){}}function v(n,t){var i,r,u=!!t&&n.value!==t,e=n.value===n.getAttribute(f);return(u||e)&&"true"===n.getAttribute(h)?(n.removeAttribute(h),n.value=n.value.replace(n.getAttribute(f),""),n.className=n.className.replace(gt,""),r=n.getAttribute(w),parseInt(r,10)>=0&&(n.setAttribute("maxLength",r),n.removeAttribute(w)),i=n.getAttribute(a),i&&(n.type=i),!0):!1}function b(n){var t,r,u=n.getAttribute(f);return""===n.value&&u?(n.setAttribute(h,"true"),n.value=u,n.className+=" "+g,r=n.getAttribute(w),r||(n.setAttribute(w,n.maxLength),n.removeAttribute("maxLength")),t=n.getAttribute(a),t?n.type="text":"password"===n.type&&i.changeType(n,"text")&&n.setAttribute(a,"password"),!0):!1}function it(n,t){var r,s,u,o,h,l,i;if(n&&n.getAttribute(f))t(n);else for(u=n?n.getElementsByTagName("input"):e,o=n?n.getElementsByTagName("textarea"):c,r=u?u.length:0,s=o?o.length:0,i=0,l=r+s;l>i;i++)h=r>i?u[i]:o[i-r],t(h)}function rt(n){it(n,v)}function at(n){it(n,b)}function vt(n){return function(){y&&n.value===n.getAttribute(f)&&"true"===n.getAttribute(h)?i.moveCaret(n,0):v(n)}}function yt(n){return function(){b(n)}}function pt(n){return function(t){return k=n.value,"true"===n.getAttribute(h)&&k===n.getAttribute(f)&&i.inArray(dt,t.keyCode)?(t.preventDefault&&t.preventDefault(),!1):void 0}}function wt(n){return function(){v(n,k);""===n.value&&(n.blur(),i.moveCaret(n,0))}}function bt(n){return function(){n===tt()&&n.value===n.getAttribute(f)&&"true"===n.getAttribute(h)&&i.moveCaret(n,0)}}function kt(n){return function(){rt(n)}}function ut(n){n.form&&(o=n.form,"string"==typeof o&&(o=document.getElementById(o)),o.getAttribute(st)||(i.addEventListener(o,"submit",kt(o)),o.setAttribute(st,"true")));i.addEventListener(n,"focus",vt(n));i.addEventListener(n,"blur",yt(n));y&&(i.addEventListener(n,"keydown",pt(n)),i.addEventListener(n,"keyup",wt(n)),i.addEventListener(n,"click",bt(n)));n.setAttribute(ht,"true");n.setAttribute(f,r);(y||n!==tt())&&b(n)}var e,c,y,ft,k,l,d,r,et,o,t,p,u,ot=["text","search","url","tel","email","password","number","textarea"],dt=[27,33,34,35,36,37,38,39,40,8,46],g="placeholdersjs",gt=RegExp("(?:^|\\s)"+g+"(?!\\S)"),f="data-placeholder-value",h="data-placeholder-active",a="data-placeholder-type",st="data-placeholder-submit",ht="data-placeholder-bound",w="data-placeholder-maxlength",ni=document.createElement("input"),ct=document.getElementsByTagName("head")[0],lt=document.documentElement,s=n.Placeholders,i=s.Utils;if(s.nativeSupport=void 0!==ni.placeholder,!s.nativeSupport){for(e=document.getElementsByTagName("input"),c=document.getElementsByTagName("textarea"),y="false"===lt.getAttribute("data-placeholder-focus"),ft="false"!==lt.getAttribute("data-placeholder-live"),l=document.createElement("style"),l.type="text/css",d=document.createTextNode("."+g+" { color:#ccc; }"),l.styleSheet?l.styleSheet.cssText=d.nodeValue:l.appendChild(d),ct.insertBefore(l,ct.firstChild),u=0,p=e.length+c.length;p>u;u++)t=e.length>u?e[u]:c[u-e.length],r=t.attributes.placeholder,r&&(r=r.nodeValue,r&&i.inArray(ot,t.type)&&ut(t));et=setInterval(function(){for(u=0,p=e.length+c.length;p>u;u++)t=e.length>u?e[u]:c[u-e.length],r=t.attributes.placeholder,r?(r=r.nodeValue,r&&i.inArray(ot,t.type)&&(t.getAttribute(ht)||ut(t),(r!==t.getAttribute(f)||"password"===t.type&&!t.getAttribute(a))&&("password"===t.type&&!t.getAttribute(a)&&i.changeType(t,"text")&&t.setAttribute(a,"password"),t.value===t.getAttribute(f)&&(t.value=r),t.setAttribute(f,r)))):t.getAttribute(h)&&(v(t),t.removeAttribute(f));ft||clearInterval(et)},100)}i.addEventListener(n,"beforeunload",function(){s.disable()});s.disable=s.nativeSupport?nt:rt;s.enable=s.nativeSupport?nt:at}(this),!function(n){function o(n){var i=n.length,r=t.type(n);return"function"===r||t.isWindow(n)?!1:1===n.nodeType&&i?!0:"array"===r||0===i||"number"==typeof i&&i>0&&i-1 in n}var t,i;if(!n.jQuery){t=function(n,i){return new t.fn.init(n,i)};t.isWindow=function(n){return null!=n&&n==n.window};t.type=function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?r[s.call(n)]||"object":typeof n};t.isArray=Array.isArray||function(n){return"array"===t.type(n)};t.isPlainObject=function(n){var i;if(!n||"object"!==t.type(n)||n.nodeType||t.isWindow(n))return!1;try{if(n.constructor&&!f.call(n,"constructor")&&!f.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}for(i in n);return void 0===i||f.call(n,i)};t.each=function(n,t,i){var u,r=0,f=n.length,e=o(n);if(i){if(e)for(;f>r&&(u=t.apply(n[r],i),u!==!1);r++);else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e)for(;f>r&&(u=t.call(n[r],r,n[r]),u!==!1);r++);else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n};t.data=function(n,r,u){var e,f;if(void 0===u){if(f=n[t.expando],e=f&&i[f],void 0===r)return e;if(e&&r in e)return e[r]}else if(void 0!==r)return f=n[t.expando]||(n[t.expando]=++t.uuid),i[f]=i[f]||{},i[f][r]=u,u};t.removeData=function(n,r){var u=n[t.expando],f=u&&i[u];f&&t.each(r,function(n,t){delete f[t]})};t.extend=function(){var r,e,i,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"!=typeof n&&"function"!==t.type(n)&&(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],i=o[f],n!==i&&(h&&i&&(t.isPlainObject(i)||(e=t.isArray(i)))?(e?(e=!1,s=r&&t.isArray(r)?r:[]):s=r&&t.isPlainObject(r)?r:{},n[f]=t.extend(h,s,i)):void 0!==i&&(n[f]=i));return n};t.queue=function(n,i,r){function f(n,t){var i=t||[];return null!=n&&(o(Object(n))?!function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)for(;void 0!==t[i];)n[u++]=t[i++];return n.length=u,n}(i,"string"==typeof n?[n]:n):[].push.call(i,n)),i}if(n){i=(i||"fx")+"queue";var u=t.data(n,i);return r?(!u||t.isArray(r)?u=t.data(n,i,f(r)):u.push(r),u):u||[]}};t.dequeue=function(n,i){t.each(n.nodeType?[n]:n,function(n,r){i=i||"fx";var f=t.queue(r,i),u=f.shift();"inprogress"===u&&(u=f.shift());u&&("fx"===i&&f.unshift("inprogress"),u.call(r,function(){t.dequeue(r,i)}))})};t.fn=t.prototype={init:function(n){if(n.nodeType)return this[0]=n,this;throw new Error("Not a DOM node.");},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(n.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(n.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function n(){for(var n=this.offsetParent||document;n&&!1&&"static"===n.style.position;)n=n.offsetParent;return n||document}var u=this[0],n=n.apply(u),i=this.offset(),r=/^(?:body|html)$/i.test(n.nodeName)?{top:0,left:0}:t(n).offset();return i.top-=parseFloat(u.style.marginTop)||0,i.left-=parseFloat(u.style.marginLeft)||0,n.style&&(r.top+=parseFloat(n.style.borderTopWidth)||0,r.left+=parseFloat(n.style.borderLeftWidth)||0),{top:i.top-r.top,left:i.left-r.left}}};i={};t.expando="velocity"+(new Date).getTime();t.uuid=0;for(var r={},f=r.hasOwnProperty,s=r.toString,e="Boolean Number String Function Array Date RegExp Object Error".split(" "),u=0;u<e.length;u++)r["[object "+e[u]+"]"]=e[u].toLowerCase();t.fn.init.prototype=t.fn;n.Velocity={Utilities:t}}}(window),function(n){"object"==typeof module&&"object"==typeof module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):n()}(function(){return function(n,t,i,r){function tt(n){for(var t,i=-1,u=n?n.length:0,r=[];++i<u;)t=n[i],t&&r.push(t);return r}function y(n){return s.isWrapped(n)?n=[].slice.call(n):s.isNode(n)&&(n=[n]),n}function e(n){var t=o.data(n,"velocity");return null===t?r:t}function it(n){return function(t){return Math.round(t*n)*(1/n)}}function p(n,i,r,u){function l(n,t){return 1-3*t+3*n}function a(n,t){return 3*t-6*n}function v(n){return 3*n}function s(n,t,i){return((l(t,i)*n+a(t,i))*n+v(t))*n}function y(n,t,i){return 3*l(t,i)*n*n+2*a(t,i)*n+v(t)}function b(t,i){for(var f,e,u=0;tt>u;++u){if(f=y(i,n,r),0===f)return i;e=s(i,n,r)-t;i-=e/f}return i}function k(){for(var t=0;e>t;++t)o[t]=s(t*h,n,r)}function d(t,i,u){var e,f,o=0;do f=i+(u-i)/2,e=s(f,n,r)-t,e>0?u=f:i=f;while(Math.abs(e)>rt&&++o<ut);return f}function g(t){for(var u=0,i=1,c=e-1;i!=c&&o[i]<=t;++i)u+=h;--i;var l=(t-o[i])/(o[i+1]-o[i]),f=u+l*h,s=y(f,n,r);return s>=it?b(t,f):0==s?f:d(t,u,u+h)}function nt(){p=!0;(n!=i||r!=u)&&k()}var tt=4,it=.001,rt=1e-7,ut=10,e=11,h=1/(e-1),ft="Float32Array"in t,f,w;if(4!==arguments.length)return!1;for(f=0;4>f;++f)if("number"!=typeof arguments[f]||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;n=Math.min(n,1);r=Math.min(r,1);n=Math.max(n,0);r=Math.max(r,0);var o=ft?new Float32Array(e):new Array(e),p=!1,c=function(t){return p||nt(),n===i&&r===u?t:0===t?0:1===t?1:s(g(t),i,u)};return c.getControlPoints=function(){return[{x:n,y:i},{x:r,y:u}]},w="generateBezier("+[n,i,r,u]+")",c.toString=function(){return w},c}function w(n,t){var i=n;return s.isString(n)?f.Easings[n]||(i=!1):i=s.isArray(n)&&1===n.length?it.apply(null,n):s.isArray(n)&&2===n.length?nt.apply(null,n.concat([t])):s.isArray(n)&&4===n.length?p.apply(null,n):!1,i===!1&&(i=f.Easings[f.defaults.easing]?f.defaults.easing:g),i}function a(n){var d,ut,c,nt,h,it,ct,v,p,i,lt,et,k,ot,rt;if(n)for(d=(new Date).getTime(),ut=f.State.calls.length,ut>1e4&&(f.State.calls=tt(f.State.calls)),c=0;ut>c;c++)if(f.State.calls[c]){var w=f.State.calls[c],st=w[0],t=w[2],y=w[3],at=!!y,ht=null;y||(y=f.State.calls[c][3]=d-16);for(var g=Math.min((d-y)/t.duration,1),ft=0,vt=st.length;vt>ft;ft++)if(nt=st[ft],h=nt.element,e(h)){it=!1;t.display!==r&&null!==t.display&&"none"!==t.display&&("flex"===t.display&&(ct=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"],o.each(ct,function(n,t){u.setPropertyValue(h,"display",t)})),u.setPropertyValue(h,"display",t.display));t.visibility!==r&&"hidden"!==t.visibility&&u.setPropertyValue(h,"visibility",t.visibility);for(v in nt)if("element"!==v){if(i=nt[v],lt=s.isString(i.easing)?f.Easings[i.easing]:i.easing,1===g)p=i.endValue;else if(et=i.endValue-i.startValue,p=i.startValue+et*lt(g,t,et),!at&&p===i.currentValue)continue;(i.currentValue=p,"tween"===v)?ht=p:(u.Hooks.registered[v]&&(k=u.Hooks.getRoot(v),ot=e(h).rootPropertyValueCache[k],ot&&(i.rootPropertyValue=ot)),rt=u.setPropertyValue(h,v,i.currentValue+(0===parseFloat(p)?"":i.unitType),i.rootPropertyValue,i.scrollData),u.Hooks.registered[v]&&(e(h).rootPropertyValueCache[k]=u.Normalizations.registered[k]?u.Normalizations.registered[k]("extract",null,rt[1]):rt[1]),"transform"===rt[0]&&(it=!0))}t.mobileHA&&e(h).transformCache.translate3d===r&&(e(h).transformCache.translate3d="(0px, 0px, 0px)",it=!0);it&&u.flushTransformCache(h)}t.display!==r&&"none"!==t.display&&(f.State.calls[c][2].display=!1);t.visibility!==r&&"hidden"!==t.visibility&&(f.State.calls[c][2].visibility=!1);t.progress&&t.progress.call(w[1],w[1],g,Math.max(0,y+t.duration-d),y,ht);1===g&&b(c)}f.State.isTicking&&l(a)}function b(n,t){var i,c,l,b;if(!f.State.calls[n])return!1;for(var v=f.State.calls[n][0],a=f.State.calls[n][1],s=f.State.calls[n][2],y=f.State.calls[n][4],p=!1,h=0,w=v.length;w>h;h++){if(i=v[h].element,(t||s.loop||("none"===s.display&&u.setPropertyValue(i,"display",s.display),"hidden"===s.visibility&&u.setPropertyValue(i,"visibility",s.visibility)),s.loop!==!0&&(o.queue(i)[1]===r||!/\.velocityQueueEntryFlag/i.test(o.queue(i)[1]))&&e(i))&&(e(i).isAnimating=!1,e(i).rootPropertyValueCache={},c=!1,o.each(u.Lists.transforms3D,function(n,t){var u=/^scale/.test(t)?1:0,f=e(i).transformCache[t];e(i).transformCache[t]!==r&&new RegExp("^\\("+u+"[^.]").test(f)&&(c=!0,delete e(i).transformCache[t])}),s.mobileHA&&(c=!0,delete e(i).transformCache.translate3d),c&&u.flushTransformCache(i),u.Values.removeClass(i,"velocity-animating")),!t&&s.complete&&!s.loop&&h===w-1)try{s.complete.call(a,a)}catch(k){setTimeout(function(){throw k;},1)}y&&s.loop!==!0&&y(a);e(i)&&s.loop===!0&&!t&&(o.each(e(i).tweensContainer,function(n,t){/^rotate/.test(n)&&360===parseFloat(t.endValue)&&(t.endValue=0,t.startValue=360);/^backgroundPosition/.test(n)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)}),f(i,"reverse",{loop:!0,delay:s.delay}));s.queue!==!1&&o.dequeue(i,s.queue)}for(f.State.calls[n]=!1,l=0,b=f.State.calls.length;b>l;l++)if(f.State.calls[l]!==!1){p=!0;break}p===!1&&(f.State.isTicking=!1,delete f.State.calls,f.State.calls=[])}var o,h=function(){var n,t;if(i.documentMode)return i.documentMode;for(n=7;n>4;n--)if(t=i.createElement("div"),t.innerHTML="<!--[if IE "+n+"]><span><\/span><![endif]-->",t.getElementsByTagName("span").length)return t=null,n;return r}(),k=function(){var n=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var i,r=(new Date).getTime();return i=Math.max(0,16-(r-n)),n=r+i,setTimeout(function(){t(r+i)},i)}}(),s={isString:function(n){return"string"==typeof n},isArray:Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},isFunction:function(n){return"[object Function]"===Object.prototype.toString.call(n)},isNode:function(n){return n&&n.nodeType},isNodeList:function(n){return"object"==typeof n&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(n))&&n.length!==r&&(0===n.length||"object"==typeof n[0]&&n[0].nodeType>0)},isWrapped:function(n){return n&&(n.jquery||t.Zepto&&t.Zepto.zepto.isZ(n))},isSVG:function(n){return t.SVGElement&&n instanceof t.SVGElement},isEmptyObject:function(n){for(var t in n)return!1;return!0}},d=!1,nt,u,c,l;if(n.fn&&n.fn.jquery?(o=n,d=!0):o=t.Velocity.Utilities,8>=h&&!d)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=h)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,g="swing",f={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:i.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:o,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:v,easing:g,begin:r,complete:r,progress:r,display:r,visibility:r,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(n){o.data(n,"velocity",{isSVG:s.isSVG(n),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};return t.pageYOffset!==r?(f.State.scrollAnchor=t,f.State.scrollPropertyLeft="pageXOffset",f.State.scrollPropertyTop="pageYOffset"):(f.State.scrollAnchor=i.documentElement||i.body.parentNode||i.body,f.State.scrollPropertyLeft="scrollLeft",f.State.scrollPropertyTop="scrollTop"),nt=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function n(n,i,r){var u={x:n.x+r.dx*i,v:n.v+r.dv*i,tension:n.tension,friction:n.friction};return{dx:u.v,dv:t(u)}}function i(i,r){var u={dx:i.v,dv:t(i)},f=n(i,.5*r,u),e=n(i,.5*r,f),o=n(i,r,e),s=1/6*(u.dx+2*(f.dx+e.dx)+o.dx),h=1/6*(u.dv+2*(f.dv+e.dv)+o.dv);return i.x=i.x+s*r,i.v=i.v+h*r,i}return function r(n,t,u){var o,s,f,h={x:-1,v:0,tension:null,friction:null},c=[0],e=0,l=.0001,a=.016;for(n=parseFloat(n)||500,t=parseFloat(t)||20,u=u||null,h.tension=n,h.friction=t,o=null!==u,o?(e=r(n,t),s=e/u*a):s=a;;)if(f=i(f||h,s),c.push(1+f.x),e+=16,!(Math.abs(f.x)>l&&Math.abs(f.v)>l))break;return o?function(n){return c[n*(c.length-1)|0]}:e}}(),f.Easings={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},spring:function(n){return 1-Math.cos(4.5*n*Math.PI)*Math.exp(6*-n)}},o.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(n,t){f.Easings[t[0]]=p.apply(null,t[1])}),u=f.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e,i,r,t,f,o,s,n=0;n<u.Lists.colors.length;n++)e="color"===u.Lists.colors[n]?"0 0 0 1":"255 255 255 1",u.Hooks.templates[u.Lists.colors[n]]=["Red Green Blue Alpha",e];if(h)for(i in u.Hooks.templates)r=u.Hooks.templates[i],t=r[0].split(" "),f=r[1].match(u.RegEx.valueSplit),"Color"===t[0]&&(t.push(t.shift()),f.push(f.shift()),u.Hooks.templates[i]=[t.join(" "),f.join(" ")]);for(i in u.Hooks.templates){r=u.Hooks.templates[i];t=r[0].split(" ");for(n in t)o=i+t[n],s=n,u.Hooks.registered[o]=[i,s]}},getRoot:function(n){var t=u.Hooks.registered[n];return t?t[0]:n},cleanRootPropertyValue:function(n,t){return u.RegEx.valueUnwrap.test(t)&&(t=t.match(u.RegEx.valueUnwrap)[1]),u.Values.isCSSNullValue(t)&&(t=u.Hooks.templates[n][1]),t},extractValue:function(n,t){var i=u.Hooks.registered[n],r,f;return i?(r=i[0],f=i[1],t=u.Hooks.cleanRootPropertyValue(r,t),t.toString().match(u.RegEx.valueSplit)[f]):t},injectValue:function(n,t,i){var r=u.Hooks.registered[n],f,s,e,o;return r?(e=r[0],o=r[1],i=u.Hooks.cleanRootPropertyValue(e,i),f=i.toString().match(u.RegEx.valueSplit),f[o]=t,s=f.join(" ")):i}},Normalizations:{registered:{clip:function(n,t,i){switch(n){case"name":return"clip";case"extract":var r;return u.RegEx.wrappedValueAlreadyExtracted.test(i)?r=i:(r=i.toString().match(u.RegEx.valueUnwrap),r=r?r[1].replace(/,(\s+)?/g," "):i),r;case"inject":return"rect("+i+")"}},blur:function(n,t,i){var r,u;switch(n){case"name":return f.State.isFirefox?"filter":"-webkit-filter";case"extract":return r=parseFloat(i),r||0===r||(u=i.toString().match(/blur\(([0-9]+[A-z]+)\)/i),r=u?u[1]:0),r;case"inject":return parseFloat(i)?"blur("+i+")":"none"}},opacity:function(n,t,i){if(8>=h)switch(n){case"name":return"filter";case"extract":var r=i.toString().match(/alpha\(opacity=(.*)\)/i);return r?r[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(i)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(i),10)+")"}else switch(n){case"name":return"opacity";case"extract":return i;case"inject":return i}}},register:function(){var n;for(9>=h||f.State.isGingerbread||(u.Lists.transformsBase=u.Lists.transformsBase.concat(u.Lists.transforms3D)),n=0;n<u.Lists.transformsBase.length;n++)!function(){var t=u.Lists.transformsBase[n];u.Normalizations.registered[t]=function(n,i,u){switch(n){case"name":return"transform";case"extract":return e(i)===r||e(i).transformCache[t]===r?/^scale/i.test(t)?1:0:e(i).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(u);break;case"scal":case"scale":f.State.isAndroid&&e(i).transformCache[t]===r&&1>u&&(u=1);o=!/(\d)$/i.test(u);break;case"skew":o=!/(deg|\d)$/i.test(u);break;case"rotate":o=!/(deg|\d)$/i.test(u)}return o||(e(i).transformCache[t]="("+u+")"),e(i).transformCache[t]}}}();for(n=0;n<u.Lists.colors.length;n++)!function(){var t=u.Lists.colors[n];u.Normalizations.registered[t]=function(n,i,f){var e,s,o;switch(n){case"name":return t;case"extract":return u.RegEx.wrappedValueAlreadyExtracted.test(f)?e=f:(o={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"},/^[A-z]+$/i.test(f)?s=o[f]!==r?o[f]:o.black:u.RegEx.isHex.test(f)?s="rgb("+u.Values.hexToRgb(f).join(" ")+")":/^rgba?\(/i.test(f)||(s=o.black),e=(s||f).toString().match(u.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")),8>=h||3!==e.split(" ").length||(e+=" 1"),e;case"inject":return 8>=h?4===f.split(" ").length&&(f=f.split(/\s+/).slice(0,3).join(" ")):3===f.split(" ").length&&(f+=" 1"),(8>=h?"rgb":"rgba")+"("+f.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(n){return n.replace(/-(\w)/g,function(n,t){return t.toUpperCase()})},SVGAttribute:function(n){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(h||f.State.isAndroid&&!f.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(n)},prefixCheck:function(n){var i;if(f.State.prefixMatches[n])return[f.State.prefixMatches[n],!0];for(var r=["","Webkit","Moz","ms","O"],t=0,u=r.length;u>t;t++)if(i=0===t?n:r[t]+n.replace(/^\w/,function(n){return n.toUpperCase()}),s.isString(f.State.prefixElement.style[i]))return f.State.prefixMatches[n]=i,[i,!0];return[n,!1]}},Values:{hexToRgb:function(n){var t;return n=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(n,t,i,r){return t+t+i+i+r+r}),t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(n){return 0==n||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(n)},getUnitType:function(n){return/^(rotate|skew)/i.test(n)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(n)?"":"px"},getDisplayType:function(n){var t=n&&n.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(n,t){n.classList?n.classList.add(t):n.className+=(n.className.length?" ":"")+t},removeClass:function(n,t){n.classList?n.classList.remove(t):n.className=n.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(n,i,s,c){function y(n,i){function s(){l&&u.setPropertyValue(n,"display","none")}var f=0,l,p,w,a,v;if(8>=h)f=o.css(n,i);else{if(l=!1,/^(width|height)$/.test(i)&&0===u.getPropertyValue(n,"display")&&(l=!0,u.setPropertyValue(n,"display",u.Values.getDisplayType(n))),!c){if("height"===i&&"border-box"!==u.getPropertyValue(n,"boxSizing").toString().toLowerCase())return p=n.offsetHeight-(parseFloat(u.getPropertyValue(n,"borderTopWidth"))||0)-(parseFloat(u.getPropertyValue(n,"borderBottomWidth"))||0)-(parseFloat(u.getPropertyValue(n,"paddingTop"))||0)-(parseFloat(u.getPropertyValue(n,"paddingBottom"))||0),s(),p;if("width"===i&&"border-box"!==u.getPropertyValue(n,"boxSizing").toString().toLowerCase())return w=n.offsetWidth-(parseFloat(u.getPropertyValue(n,"borderLeftWidth"))||0)-(parseFloat(u.getPropertyValue(n,"borderRightWidth"))||0)-(parseFloat(u.getPropertyValue(n,"paddingLeft"))||0)-(parseFloat(u.getPropertyValue(n,"paddingRight"))||0),s(),w}a=e(n)===r?t.getComputedStyle(n,null):e(n).computedStyle?e(n).computedStyle:e(n).computedStyle=t.getComputedStyle(n,null);"borderColor"===i&&(i="borderTopColor");f=9===h&&"filter"===i?a.getPropertyValue(i):a[i];(""===f||null===f)&&(f=n.style[i]);s()}return"auto"===f&&/^(top|right|bottom|left)$/i.test(i)&&(v=y(n,"position"),("fixed"===v||"absolute"===v&&/top|left/i.test(i))&&(f=o(n).position()[i]+"px")),f}var l,p,a,w,v;if(u.Hooks.registered[i]?(p=i,a=u.Hooks.getRoot(p),s===r&&(s=u.getPropertyValue(n,u.Names.prefixCheck(a)[0])),u.Normalizations.registered[a]&&(s=u.Normalizations.registered[a]("extract",n,s)),l=u.Hooks.extractValue(p,s)):u.Normalizations.registered[i]&&(w=u.Normalizations.registered[i]("name",n),"transform"!==w&&(v=y(n,u.Names.prefixCheck(w)[0]),u.Values.isCSSNullValue(v)&&u.Hooks.templates[i]&&(v=u.Hooks.templates[i][1])),l=u.Normalizations.registered[i]("extract",n,v)),!/^[\d-]/.test(l))if(e(n)&&e(n).isSVG&&u.Names.SVGAttribute(i))if(/^(height|width)$/i.test(i))try{l=n.getBBox()[i]}catch(b){l=0}else l=n.getAttribute(i);else l=y(n,u.Names.prefixCheck(i)[0]);return u.Values.isCSSNullValue(l)&&(l=0),f.debug>=2&&console.log("Get "+i+": "+l),l},setPropertyValue:function(n,i,r,o,s){var c=i,a,l;if("scroll"===i)s.container?s.container["scroll"+s.direction]=r:"Left"===s.direction?t.scrollTo(r,s.alternateValue):t.scrollTo(s.alternateValue,r);else if(u.Normalizations.registered[i]&&"transform"===u.Normalizations.registered[i]("name",n))u.Normalizations.registered[i]("inject",n,r),c="transform",r=e(n).transformCache[i];else{if(u.Hooks.registered[i]&&(a=i,l=u.Hooks.getRoot(i),o=o||u.getPropertyValue(n,l),r=u.Hooks.injectValue(a,r,o),i=l),u.Normalizations.registered[i]&&(r=u.Normalizations.registered[i]("inject",n,r),i=u.Normalizations.registered[i]("name",n)),c=u.Names.prefixCheck(i)[0],8>=h)try{n.style[c]=r}catch(v){f.debug&&console.log("Browser does not support ["+r+"] for ["+c+"]")}else e(n)&&e(n).isSVG&&u.Names.SVGAttribute(i)?n.setAttribute(i,r):n.style[c]=r;f.debug>=2&&console.log("Set "+i+" ("+c+"): "+r)}return[c,r]},flushTransformCache:function(n){function t(t){return parseFloat(u.getPropertyValue(n,t))}var i="",r,s,c;(h||f.State.isAndroid&&!f.State.isChrome)&&e(n).isSVG?(r={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]},o.each(e(n).transformCache,function(n){/^translate/i.test(n)?n="translate":/^scale/i.test(n)?n="scale":/^rotate/i.test(n)&&(n="rotate");r[n]&&(i+=n+"("+r[n].join(" ")+") ",delete r[n])})):(o.each(e(n).transformCache,function(t){return s=e(n).transformCache[t],"transformPerspective"===t?(c=s,!0):(9===h&&"rotateZ"===t&&(t="rotate"),void(i+=t+s+" "))}),c&&(i="perspective"+c+" "+i));u.setPropertyValue(n,"transform",i)}},u.Hooks.register(),u.Normalizations.register(),f.hook=function(n,t,i){var u=r;return n=y(n),o.each(n,function(n,o){if(e(o)===r&&f.init(o),i===r)u===r&&(u=f.CSS.getPropertyValue(o,t));else{var s=f.CSS.setPropertyValue(o,t,i);"transform"===s[0]&&f.CSS.flushTransformCache(o);u=s}}),u},c=function(){function ft(){return et?d.promise||null:at}function wt(){function g(){function dt(n,t){var i=r,e=r,f=r;return s.isArray(n)?(i=n[0],!s.isArray(n[1])&&/^[\d-]/.test(n[1])||s.isFunction(n[1])||u.RegEx.isHex.test(n[1])?f=n[1]:(s.isString(n[1])&&!u.RegEx.isHex.test(n[1])||s.isArray(n[1]))&&(e=t?n[1]:w(n[1],h.duration),n[2]!==r&&(f=n[2]))):i=n,t||(e=e||h.easing),s.isFunction(i)&&(i=i.call(c,tt,nt)),s.isFunction(f)&&(f=f.call(c,tt,nt)),[i||0,e,f]}function gt(n,t){var i,r;return r=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(n){return i=n,""}),i||(i=u.Values.getUnitType(n)),[r,i]}function ii(){var s={myParent:c.parentNode||i.body,position:u.getPropertyValue(c,"position"),fontSize:u.getPropertyValue(c,"fontSize")},l=s.position===p.lastPosition&&s.myParent===p.lastParent,a=s.fontSize===p.lastFontSize,h,r,n;return p.lastParent=s.myParent,p.lastPosition=s.position,p.lastFontSize=s.fontSize,h=100,r={},a&&l?(r.emToPx=p.lastEmToPx,r.percentToPxWidth=p.lastPercentToPxWidth,r.percentToPxHeight=p.lastPercentToPxHeight):(n=e(c).isSVG?i.createElementNS("http://www.w3.org/2000/svg","rect"):i.createElement("div"),f.init(n),s.myParent.appendChild(n),o.each(["overflow","overflowX","overflowY"],function(t,i){f.CSS.setPropertyValue(n,i,"hidden")}),f.CSS.setPropertyValue(n,"position",s.position),f.CSS.setPropertyValue(n,"fontSize",s.fontSize),f.CSS.setPropertyValue(n,"boxSizing","content-box"),o.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,i){f.CSS.setPropertyValue(n,i,h+"%")}),f.CSS.setPropertyValue(n,"paddingLeft",h+"em"),r.percentToPxWidth=p.lastPercentToPxWidth=(parseFloat(u.getPropertyValue(n,"width",null,!0))||1)/h,r.percentToPxHeight=p.lastPercentToPxHeight=(parseFloat(u.getPropertyValue(n,"height",null,!0))||1)/h,r.emToPx=p.lastEmToPx=(parseFloat(u.getPropertyValue(n,"paddingLeft"))||1)/h,s.myParent.removeChild(n)),null===p.remToPx&&(p.remToPx=parseFloat(u.getPropertyValue(i.body,"fontSize"))||16),null===p.vwToPx&&(p.vwToPx=parseFloat(t.innerWidth)/100,p.vhToPx=parseFloat(t.innerHeight)/100),r.remToPx=p.remToPx,r.vwToPx=p.vwToPx,r.vhToPx=p.vhToPx,f.debug>=1&&console.log("Unit ratios: "+JSON.stringify(r),c),r}var vt,ni,pt,st,wt,et,ti,ut,v,ot,ht,lt,ft,at,yt,kt;if(h.begin&&0===tt)try{h.begin.call(k,k)}catch(ri){setTimeout(function(){throw ri;},1)}if("scroll"===it)st=/^x$/i.test(h.axis)?"Left":"Top",wt=parseFloat(h.offset)||0,h.container?s.isWrapped(h.container)||s.isNode(h.container)?(h.container=h.container[0]||h.container,vt=h.container["scroll"+st],pt=vt+o(c).position()[st.toLowerCase()]+wt):h.container=null:(vt=f.State.scrollAnchor[f.State["scrollProperty"+st]],ni=f.State.scrollAnchor[f.State["scrollProperty"+("Left"===st?"Top":"Left")]],pt=o(c).offset()[st.toLowerCase()]+wt),y={scroll:{rootPropertyValue:!1,startValue:vt,currentValue:vt,endValue:pt,unitType:"",easing:h.easing,scrollData:{container:h.container,direction:st,alternateValue:ni}},element:c},f.debug&&console.log("tweensContainer (scroll): ",y.scroll,c);else if("reverse"===it){if(!e(c).tweensContainer)return void o.dequeue(c,h.queue);"none"===e(c).opts.display&&(e(c).opts.display="auto");"hidden"===e(c).opts.visibility&&(e(c).opts.visibility="visible");e(c).opts.loop=!1;e(c).opts.begin=null;e(c).opts.complete=null;n.easing||delete h.easing;n.duration||delete h.duration;h=o.extend({},e(c).opts,h);ut=o.extend(!0,{},e(c).tweensContainer);for(et in ut)"element"!==et&&(ti=ut[et].startValue,ut[et].startValue=ut[et].currentValue=ut[et].endValue,ut[et].endValue=ti,s.isEmptyObject(n)||(ut[et].easing=h.easing),f.debug&&console.log("reverse tweensContainer ("+et+"): "+JSON.stringify(ut[et]),c));y=ut}else if("start"===it){e(c).tweensContainer&&e(c).isAnimating===!0&&(ut=e(c).tweensContainer);o.each(l,function(n,t){var f;if(RegExp("^"+u.Lists.colors.join("$|^")+"$").test(n)){var e=dt(t,!0),o=e[0],s=e[1],h=e[2];if(u.RegEx.isHex.test(o)){for(var c=["Red","Green","Blue"],v=u.Values.hexToRgb(o),a=h?u.Values.hexToRgb(h):r,i=0;i<c.length;i++)f=[v[i]],s&&f.push(s),a!==r&&f.push(a[i]),l[n+c[i]]=f;delete l[n]}}});for(v in l){var bt=dt(l[v]),rt=bt[0],ui=bt[1],g=bt[2];if(v=u.Names.camelCase(v),ot=u.Hooks.getRoot(v),ht=!1,e(c).isSVG||"tween"===ot||u.Names.prefixCheck(ot)[1]!==!1||u.Normalizations.registered[ot]!==r){if((h.display!==r&&null!==h.display&&"none"!==h.display||h.visibility!==r&&"hidden"!==h.visibility)&&/opacity|filter/.test(v)&&!g&&0!==rt&&(g=0),h._cacheValues&&ut&&ut[v]?(g===r&&(g=ut[v].endValue+ut[v].unitType),ht=e(c).rootPropertyValueCache[ot]):u.Hooks.registered[v]?g===r?(ht=u.getPropertyValue(c,ot),g=u.getPropertyValue(c,v,ht)):ht=u.Hooks.templates[ot][1]:g===r&&(g=u.getPropertyValue(c,v)),yt=!1,lt=gt(v,g),g=lt[0],at=lt[1],lt=gt(v,rt),rt=lt[0].replace(/^([+-\/*])=/,function(n,t){return yt=t,""}),ft=lt[1],g=parseFloat(g)||0,rt=parseFloat(rt)||0,"%"===ft&&(/^(fontSize|lineHeight)$/.test(v)?(rt/=100,ft="em"):/^scale/.test(v)?(rt/=100,ft=""):/(Red|Green|Blue)$/i.test(v)&&(rt=rt/100*255,ft="")),/[\/*]/.test(yt))ft=at;else if(at!==ft&&0!==g)if(0===rt)ft=at;else{b=b||ii();kt=/margin|padding|left|right|width|text|word|letter/i.test(v)||/X$/.test(v)||"x"===v?"x":"y";switch(at){case"%":g*="x"===kt?b.percentToPxWidth:b.percentToPxHeight;break;case"px":break;default:g*=b[at+"ToPx"]}switch(ft){case"%":g*=1/("x"===kt?b.percentToPxWidth:b.percentToPxHeight);break;case"px":break;default:g*=1/b[ft+"ToPx"]}}switch(yt){case"+":rt=g+rt;break;case"-":rt=g-rt;break;case"*":rt=g*rt;break;case"/":rt=g/rt}y[v]={rootPropertyValue:ht,startValue:g,currentValue:g,endValue:rt,unitType:ft,easing:ui};f.debug&&console.log("tweensContainer ("+v+"): "+JSON.stringify(y[v]),c)}else f.debug&&console.log("Skipping ["+ot+"] due to a lack of browser support.")}y.element=c}y.element&&(u.Values.addClass(c,"velocity-animating"),ct.push(y),""===h.queue&&(e(c).tweensContainer=y,e(c).opts=h),e(c).isAnimating=!0,tt===nt-1?(f.State.calls.push([ct,k,h,null,d.resolver]),f.State.isTicking===!1&&(f.State.isTicking=!0,a())):tt++)}var b,c=this,h=o.extend({},f.defaults,n),y={};switch(e(c)===r&&f.init(c),parseFloat(h.delay)&&h.queue!==!1&&o.queue(c,h.queue,function(n){f.velocityQueueEntryFlag=!0;e(c).delayTimer={setTimeout:setTimeout(n,parseFloat(h.delay)),next:n}}),h.duration.toString().toLowerCase()){case"fast":h.duration=200;break;case"normal":h.duration=v;break;case"slow":h.duration=600;break;default:h.duration=parseFloat(h.duration)||1}f.mock!==!1&&(f.mock===!0?h.duration=h.delay=1:(h.duration*=parseFloat(f.mock)||1,h.delay*=parseFloat(f.mock)||1));h.easing=w(h.easing,h.duration);h.begin&&!s.isFunction(h.begin)&&(h.begin=null);h.progress&&!s.isFunction(h.progress)&&(h.progress=null);h.complete&&!s.isFunction(h.complete)&&(h.complete=null);h.display!==r&&null!==h.display&&(h.display=h.display.toString().toLowerCase(),"auto"===h.display&&(h.display=f.CSS.Values.getDisplayType(c)));h.visibility!==r&&null!==h.visibility&&(h.visibility=h.visibility.toString().toLowerCase());h.mobileHA=h.mobileHA&&f.State.isMobile&&!f.State.isGingerbread;h.queue===!1?h.delay?setTimeout(g,h.delay):g():o.queue(c,h.queue,function(n,t){return t===!0?(d.promise&&d.resolver(k),!0):(f.velocityQueueEntryFlag=!0,void g(n))});""!==h.queue&&"fx"!==h.queue||"inprogress"===o.queue(c)[0]||o.dequeue(c)}var et,at,rt,k,l,n,vt=arguments[0]&&(arguments[0].p||o.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||s.isString(arguments[0].properties)),nt,tt,yt,g,d,it,st,ht,p,ct,lt,h,ot,ut;if(s.isWrapped(this)?(et=!1,rt=0,k=this,at=this):(et=!0,rt=1,k=vt?arguments[0].elements||arguments[0].e:arguments[0]),k=y(k)){if(vt?(l=arguments[0].properties||arguments[0].p,n=arguments[0].options||arguments[0].o):(l=arguments[rt],n=arguments[rt+1]),nt=k.length,tt=0,!/^(stop|finish|finishAll)$/i.test(l)&&!o.isPlainObject(n))for(yt=rt+1,n={},g=yt;g<arguments.length;g++)s.isArray(arguments[g])||!/^(fast|normal|slow)$/i.test(arguments[g])&&!/^\d/.test(arguments[g])?s.isString(arguments[g])||s.isArray(arguments[g])?n.easing=arguments[g]:s.isFunction(arguments[g])&&(n.complete=arguments[g]):n.duration=arguments[g];d={promise:null,resolver:null,rejecter:null};et&&f.Promise&&(d.promise=new f.Promise(function(n,t){d.resolver=n;d.rejecter=t}));switch(l){case"scroll":it="scroll";break;case"reverse":it="reverse";break;case"finish":case"finishAll":case"stop":return o.each(k,function(t,i){e(i)&&e(i).delayTimer&&(clearTimeout(e(i).delayTimer.setTimeout),e(i).delayTimer.next&&e(i).delayTimer.next(),delete e(i).delayTimer);"finishAll"===l&&(n===!0||s.isString(n))&&(o.each(o.queue(i,s.isString(n)?n:""),function(n,t){s.isFunction(t)&&t()}),o.queue(i,s.isString(n)?n:"",[]))}),st=[],o.each(f.State.calls,function(t,i){i&&o.each(i[1],function(u,f){var h=n===r?"":n;return h===!0||i[2].queue===h||n===r&&i[2].queue===!1?void o.each(k,function(r,u){u===f&&((n===!0||s.isString(n))&&(o.each(o.queue(u,s.isString(n)?n:""),function(n,t){s.isFunction(t)&&t(null,!0)}),o.queue(u,s.isString(n)?n:"",[])),"stop"===l?(e(u)&&e(u).tweensContainer&&h!==!1&&o.each(e(u).tweensContainer,function(n,t){t.endValue=t.currentValue}),st.push(t)):("finish"===l||"finishAll"===l)&&(i[2].duration=1))}):!0})}),"stop"===l&&(o.each(st,function(n,t){b(t,!0)}),d.promise&&d.resolver(k)),ft();default:if(!o.isPlainObject(l)||s.isEmptyObject(l)){if(s.isString(l)&&f.Redirects[l]){var h=o.extend({},n),bt=h.duration,pt=h.delay||0;return h.backwards===!0&&(k=o.extend(!0,[],k).reverse()),o.each(k,function(n,t){parseFloat(h.stagger)?h.delay=pt+parseFloat(h.stagger)*n:s.isFunction(h.stagger)&&(h.delay=pt+h.stagger.call(t,n,nt));h.drag&&(h.duration=parseFloat(bt)||(/^(callout|transition)/.test(l)?1e3:v),h.duration=Math.max(h.duration*(h.backwards?1-n/nt:(n+1)/nt),.75*h.duration,200));f.Redirects[l].call(t,t,h||{},n,nt,k,d.promise?d:r)}),ft()}return ht="Velocity: First argument ("+l+") was not a property map, a known action, or a registered redirect. Aborting.",d.promise?d.rejecter(new Error(ht)):console.log(ht),ft()}it="start"}if(p={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},ct=[],o.each(k,function(n,t){s.isNode(t)&&wt.call(t)}),h=o.extend({},f.defaults,n),h.loop=parseInt(h.loop),lt=2*h.loop-1,h.loop)for(ot=0;lt>ot;ot++)ut={delay:h.delay,progress:h.progress},ot===lt-1&&(ut.display=h.display,ut.visibility=h.visibility,ut.complete=h.complete),c(k,"reverse",ut);return ft()}},f=o.extend(c,f),f.animate=c,l=t.requestAnimationFrame||k,f.State.isMobile||i.hidden===r||i.addEventListener("visibilitychange",function(){i.hidden?(l=function(n){return setTimeout(function(){n(!0)},16)},a()):l=t.requestAnimationFrame||k}),n.Velocity=f,n!==t&&(n.fn.velocity=c,n.fn.velocity.defaults=f.defaults),o.each(["Down","Up"],function(n,t){f.Redirects["slide"+t]=function(n,i,u,e,s,h){var c=o.extend({},i),v=c.begin,y=c.complete,a={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},l={};c.display===r&&(c.display="Down"===t?"inline"===f.CSS.Values.getDisplayType(n)?"inline-block":"block":"none");c.begin=function(){var i,r;v&&v.call(s,s);for(i in a)l[i]=n.style[i],r=f.CSS.getPropertyValue(n,i),a[i]="Down"===t?[r,0]:[0,r];l.overflow=n.style.overflow;n.style.overflow="hidden"};c.complete=function(){for(var t in l)n.style[t]=l[t];y&&y.call(s,s);h&&h.resolver(s)};f(n,a,c)}}),o.each(["In","Out"],function(n,t){f.Redirects["fade"+t]=function(n,i,u,e,s,h){var c=o.extend({},i),a={opacity:"In"===t?1:0},l=c.complete;c.complete=u!==e-1?c.begin=null:function(){l&&l.call(s,s);h&&h.resolver(s)};c.display===r&&(c.display="In"===t?"auto":"none");f(this,a,c)}}),f}(window.jQuery||window.Zepto||window,window,document)}),function(n,t){"use strict";typeof define=="function"&&define.amd?define(["jquery"],t):typeof exports=="object"?module.exports=t(require("jquery")):n.bootbox=t(n.jQuery)}(this,function init(n,t){"use strict";function a(n){var t=o[f.locale];return t?t[n]:o.en[n]}function e(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(typeof t!="object")throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return t=n.extend({},f,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}),n.type(r)!=="object")throw new Error("button with key "+t+" must be an object");r.label||(r.label=t);r.className||(r.className=u<=2&&f===u-1?"btn-primary":"btn-default")}),t}function p(n,t){var r=n.length,i={};if(r<1||r>2)throw new Error("Invalid argument length");return r===2||typeof n[0]=="string"?(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;n<r;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' />"}},f={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");e=n(u.inputs[f.inputType]);switch(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)})}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()});return 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="",f={onEscape:t.onEscape};r(c,function(n,t){s+="<button data-bb-handler='"+n+"' type='button' class='btn "+t.className+"'>"+t.label+"<\/button>";f[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){f.onEscape&&e(n,i,f.onEscape)});i.on("click",".modal-footer button",function(t){var r=n(this).data("bb-handler");e(t,i,f[r])});i.on("click",".bootbox-close-button",function(n){e(n,i,f.onEscape)});i.on("keyup",function(n){n.which===27&&i.trigger("escape.close.bb")});return 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={};arguments.length===2?t[arguments[0]]=arguments[1]:t=arguments[0];n.extend(f,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 init(t||n)},i}),Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}},Date.getMonthNumberFromName=function(n){for(var i=Date.CultureInfo.monthNames,u=Date.CultureInfo.abbreviatedMonthNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1},Date.getDayNumberFromName=function(n){for(var i=Date.CultureInfo.dayNames,u=Date.CultureInfo.abbreviatedDayNames,f=Date.CultureInfo.shortestDayNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1},Date.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},Date.getDaysInMonth=function(n,t){return[31,Date.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},Date.getTimezoneOffset=function(n,t){return t||!1?Date.CultureInfo.abbreviatedTimeZoneDST[n.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[n.toUpperCase()]},Date.getTimezoneAbbreviation=function(n,t){var i=t||!1?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard;for(var r in i)if(i[r]===n)return r;return null},Date.prototype.clone=function(){return new Date(this.getTime())},Date.prototype.compareTo=function(n){if(isNaN(this))throw new Error(this);if(n instanceof Date&&!isNaN(n))return this>n?1:this<n?-1:0;throw new TypeError(n);},Date.prototype.equals=function(n){return this.compareTo(n)===0},Date.prototype.between=function(n,t){var i=this.getTime();return i>=n.getTime()&&i<=t.getTime()},Date.prototype.addMilliseconds=function(n){return this.setMilliseconds(this.getMilliseconds()+n),this},Date.prototype.addSeconds=function(n){return this.addMilliseconds(n*1e3)},Date.prototype.addMinutes=function(n){return this.addMilliseconds(n*6e4)},Date.prototype.addHours=function(n){return this.addMilliseconds(n*36e5)},Date.prototype.addDays=function(n){return this.addMilliseconds(n*864e5)},Date.prototype.addWeeks=function(n){return this.addMilliseconds(n*6048e5)},Date.prototype.addMonths=function(n){var t=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+n),this.setDate(Math.min(t,this.getDaysInMonth())),this},Date.prototype.addYears=function(n){return this.addMonths(n*12)},Date.prototype.add=function(n){if(typeof n=="number")return this._orient=n,this;var t=n;return(t.millisecond||t.milliseconds)&&this.addMilliseconds(t.millisecond||t.milliseconds),(t.second||t.seconds)&&this.addSeconds(t.second||t.seconds),(t.minute||t.minutes)&&this.addMinutes(t.minute||t.minutes),(t.hour||t.hours)&&this.addHours(t.hour||t.hours),(t.month||t.months)&&this.addMonths(t.month||t.months),(t.year||t.years)&&this.addYears(t.year||t.years),(t.day||t.days)&&this.addDays(t.day||t.days),this},Date._validate=function(n,t,i,r){if(typeof n!="number")throw new TypeError(n+" is not a Number.");else if(n<t||n>i)throw new RangeError(n+" is not a valid value for "+r+".");return!0},Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds")},Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds")},Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes")},Date.validateHour=function(n){return Date._validate(n,0,23,"hours")},Date.validateDay=function(n,t,i){return Date._validate(n,1,Date.getDaysInMonth(t,i),"days")},Date.validateMonth=function(n){return Date._validate(n,0,11,"months")},Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds")},Date.prototype.set=function(n){var t=n;return t.millisecond||t.millisecond===0||(t.millisecond=-1),t.second||t.second===0||(t.second=-1),t.minute||t.minute===0||(t.minute=-1),t.hour||t.hour===0||(t.hour=-1),t.day||t.day===0||(t.day=-1),t.month||t.month===0||(t.month=-1),t.year||t.year===0||(t.year=-1),t.millisecond!=-1&&Date.validateMillisecond(t.millisecond)&&this.addMilliseconds(t.millisecond-this.getMilliseconds()),t.second!=-1&&Date.validateSecond(t.second)&&this.addSeconds(t.second-this.getSeconds()),t.minute!=-1&&Date.validateMinute(t.minute)&&this.addMinutes(t.minute-this.getMinutes()),t.hour!=-1&&Date.validateHour(t.hour)&&this.addHours(t.hour-this.getHours()),t.month!==-1&&Date.validateMonth(t.month)&&this.addMonths(t.month-this.getMonth()),t.year!=-1&&Date.validateYear(t.year)&&this.addYears(t.year-this.getFullYear()),t.day!=-1&&Date.validateDay(t.day,this.getFullYear(),this.getMonth())&&this.addDays(t.day-this.getDate()),t.timezone&&this.setTimezone(t.timezone),t.timezoneOffset&&this.setTimezoneOffset(t.timezoneOffset),this},Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},Date.prototype.isLeapYear=function(){var n=this.getFullYear();return n%4==0&&n%100!=0||n%400==0},Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun())},Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())},Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})},Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})},Date.prototype.moveToDayOfWeek=function(n,t){var i=(n-this.getDay()+7*(t||1))%7;return this.addDays(i===0?i+=7*(t||1):i)},Date.prototype.moveToMonth=function(n,t){var i=(n-this.getMonth()+12*(t||1))%12;return this.addMonths(i===0?i+=12*(t||1):i)},Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/864e5)},Date.prototype.getWeekOfYear=function(n){var t=this.getFullYear(),e=this.getMonth(),o=this.getDate(),s=n||Date.CultureInfo.firstDayOfWeek,r=8-new Date(t,0,1).getDay(),f,i,u;return r==8&&(r=1),f=(Date.UTC(t,e,o,0,0,0)-Date.UTC(t,0,1,0,0,0))/864e5+1,i=Math.floor((f-r+7)/7),i===s&&(t--,u=8-new Date(t,0,1).getDay(),i=u==2||u==8?53:52),i},Date.prototype.isDST=function(){return console.log("isDST"),this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"},Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())},Date.prototype.setTimezoneOffset=function(n){var t=this.getTimezoneOffset(),i=Number(n)*-6/10;return this.addMinutes(i-t),this},Date.prototype.setTimezone=function(n){return this.setTimezoneOffset(Date.getTimezoneOffset(n))},Date.prototype.getUTCOffset=function(){var t=this.getTimezoneOffset()*-10/6,n;return t<0?(n=(t-1e4).toString(),n[0]+n.substr(2)):(n=(t+1e4).toString(),"+"+n.substr(1))},Date.prototype.getDayName=function(n){return n?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]},Date.prototype.getMonthName=function(n){return n?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]},Date.prototype._toString=Date.prototype.toString,Date.prototype.toString=function(n){var t=this,i=function(n){return n.toString().length==1?"0"+n:n};return n?n.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(n){switch(n){case"hh":return i(t.getHours()<13?t.getHours():t.getHours()-12);case"h":return t.getHours()<13?t.getHours():t.getHours()-12;case"HH":return i(t.getHours());case"H":return t.getHours();case"mm":return i(t.getMinutes());case"m":return t.getMinutes();case"ss":return i(t.getSeconds());case"s":return t.getSeconds();case"yyyy":return t.getFullYear();case"yy":return t.getFullYear().toString().substring(2,4);case"dddd":return t.getDayName();case"ddd":return t.getDayName(!0);case"dd":return i(t.getDate());case"d":return t.getDate().toString();case"MMMM":return t.getMonthName();case"MMM":return t.getMonthName(!0);case"MM":return i(t.getMonth()+1);case"M":return t.getMonth()+1;case"t":return t.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return t.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return""}}):this._toString()},Date.now=function(){return new Date},Date.today=function(){return Date.now().clearTime()},Date.prototype._orient=1,Date.prototype.next=function(){return this._orient=1,this},Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){return this._orient=-1,this},Date.prototype._is=!1,Date.prototype.is=function(){return this._is=!0,this},Number.prototype._dateElement="day",Number.prototype.fromNow=function(){var n={};return n[this._dateElement]=this,Date.now().add(n)},Number.prototype.ago=function(){var n={};return n[this._dateElement]=this*-1,Date.now().add(n)},function(){for(var h,i,c,l,u,n=Date.prototype,s=Number.prototype,f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),e="january february march april may june july august september october november december".split(/\s/),o="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),t,a=function(n){return function(){return this._is?(this._is=!1,this.getDay()==n):this.moveToDayOfWeek(n,this._orient)}},r=0;r<f.length;r++)n[f[r]]=n[f[r].substring(0,3)]=a(r);for(h=function(n){return function(){return this._is?(this._is=!1,this.getMonth()===n):this.moveToMonth(n,this._orient)}},i=0;i<e.length;i++)n[e[i]]=n[e[i].substring(0,3)]=h(i);for(c=function(n){return function(){return n.substring(n.length-1)!="s"&&(n+="s"),this["add"+n](this._orient)}},l=function(n){return function(){return this._dateElement=n,this}},u=0;u<o.length;u++)t=o[u].toLowerCase(),n[t]=n[t+"s"]=c(o[u]),s[t]=s[t+"s"]=l(t)}(),Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")},Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)},Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)},Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)},Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)},Date.prototype.getOrdinal=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"}},function(){var i,o,f,u;Date.Parsing={Exception:function(n){this.message="Parse error at '"+n.substring(0,10)+" ...'"}};var t=Date.Parsing,n=t.Operators={rtoken:function(n){return function(i){var r=i.match(n);if(r)return[r[0],i.substring(r[0].length)];throw new t.Exception(i);}},token:function(){return function(t){return n.rtoken(new RegExp("^s*"+t+"s*"))(t)}},stoken:function(t){return n.rtoken(new RegExp("^"+t))},until:function(n){return function(t){for(var r=[],i=null;t.length;){try{i=n.call(this,t)}catch(u){r.push(i[0]);t=i[1];continue}break}return[r,t]}},many:function(n){return function(t){for(var i=[],r=null;t.length;){try{r=n.call(this,t)}catch(u){return[i,t]}i.push(r[0]);t=r[1]}return[i,t]}},optional:function(n){return function(t){var i=null;try{i=n.call(this,t)}catch(r){return[null,t]}return[i[0],i[1]]}},not:function(n){return function(i){try{n.call(this,i)}catch(r){return[null,i]}throw new t.Exception(i);}},ignore:function(n){return n?function(t){var i=null;return i=n.call(this,t),[null,i[1]]}:null},product:function(){for(var i=arguments[0],u=Array.prototype.slice.call(arguments,1),r=[],t=0;t<i.length;t++)r.push(n.each(i[t],u));return r},cache:function(n){var r={},i=null;return function(u){try{i=r[u]=r[u]||n.call(this,u)}catch(f){i=r[u]=f}if(i instanceof t.Exception)throw i;else return i}},any:function(){var n=arguments;return function(i){for(var r=null,u=0;u<n.length;u++)if(n[u]!=null){try{r=n[u].call(this,i)}catch(f){r=null}if(r)return r}throw new t.Exception(i);}},each:function(){var n=arguments;return function(i){for(var f=[],u=null,r=0;r<n.length;r++)if(n[r]!=null){try{u=n[r].call(this,i)}catch(e){throw new t.Exception(i);}f.push(u[0]);i=u[1]}return[f,i]}},all:function(){var t=arguments,n=n;return n.each(n.optional(t))},sequence:function(i,r,u){return(r=r||n.rtoken(/^\s*/),u=u||null,i.length==1)?i[0]:function(n){for(var f=null,e=null,s=[],o=0;o<i.length;o++){try{f=i[o].call(this,n)}catch(h){break}s.push(f[0]);try{e=r.call(this,f[1])}catch(c){e=null;break}n=e[1]}if(!f)throw new t.Exception(n);if(e)throw new t.Exception(e[1]);if(u)try{f=u.call(this,f[1])}catch(l){throw new t.Exception(f[1]);}return[s,f?f[1]:n]}},between:function(t,i,u){u=u||t;var f=n.each(n.ignore(t),i,n.ignore(u));return function(n){var t=f.call(this,n);return[[t[0][0],r[0][2]],t[1]]}},list:function(t,i,r){return i=i||n.rtoken(/^\s*/),r=r||null,t instanceof Array?n.each(n.product(t.slice(0,-1),n.ignore(i)),t.slice(-1),n.ignore(r)):n.each(n.many(n.each(t,n.ignore(i))),px,n.ignore(r))},set:function(i,r,u){return r=r||n.rtoken(/^\s*/),u=u||null,function(f){for(var y,a,s=null,l=null,h=null,c=null,e=[[],f],o=!1,v=0;v<i.length;v++){h=null;l=null;s=null;o=i.length==1;try{s=i[v].call(this,f)}catch(p){continue}if(c=[[s[0]],s[1]],s[1].length>0&&!o)try{h=r.call(this,s[1])}catch(w){o=!0}else o=!0;if(o||h[1].length!==0||(o=!0),!o){for(y=[],a=0;a<i.length;a++)v!=a&&y.push(i[a]);l=n.set(y,r).call(this,h[1]);l[0].length>0&&(c[0]=c[0].concat(l[0]),c[1]=l[1])}if(c[1].length<e[1].length&&(e=c),e[1].length===0)break}if(e[0].length===0)return e;if(u){try{h=u.call(this,e[1])}catch(b){throw new t.Exception(e[1]);}e[1]=h[1]}return e}},forward:function(n,t){return function(i){return n[t].call(this,i)}},replace:function(n,t){return function(i){var r=n.call(this,i);return[t,r[1]]}},process:function(n,t){return function(i){var r=n.call(this,i);return[t.call(this,r[0]),r[1]]}},min:function(n,i){return function(r){var u=i.call(this,r);if(u[0].length<n)throw new t.Exception(r);return u}}},s=function(n){return function(){var t=null,u=[],i,r;if(arguments.length>1?t=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(t=arguments[0]),t)for(i=0,r=t.shift();i<r.length;i++)return t.unshift(r[i]),u.push(n.apply(null,t)),t.shift(),u;else return n.apply(null,arguments)}},e="optional not ignore cache".split(/\s/);for(i=0;i<e.length;i++)n[e[i]]=s(n[e[i]]);for(o=function(n){return function(){return arguments[0]instanceof Array?n.apply(null,arguments[0]):n.apply(null,arguments)}},f="each any all".split(/\s/),u=0;u<f.length;u++)n[f[u]]=o(n[f[u]])}(),function(){var o=function(n){for(var i=[],t=0;t<n.length;t++)n[t]instanceof Array?i=i.concat(o(n[t])):n[t]&&i.push(n[t]);return i},u,f,e;Date.Grammar={};Date.Translator={hour:function(n){return function(){this.hour=Number(n)}},minute:function(n){return function(){this.minute=Number(n)}},second:function(n){return function(){this.second=Number(n)}},meridian:function(n){return function(){this.meridian=n.slice(0,1).toLowerCase()}},timezone:function(n){return function(){var t=n.replace(/[^\d\+\-]/g,"");t.length?this.timezoneOffset=Number(t):this.timezone=n.toLowerCase()}},day:function(n){var t=n[0];return function(){this.day=Number(t.match(/\d+/)[0])}},month:function(n){return function(){this.month=n.length==3?Date.getMonthNumberFromName(n):Number(n)-1}},year:function(n){return function(){var t=Number(n);this.year=n.length>2?t:t+(t+2e3<Date.CultureInfo.twoDigitYearMax?2e3:1900)}},rday:function(n){return function(){switch(n){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=!0}}},finishExact:function(n){var r,t,i;for(n=n instanceof Array?n:[n],r=new Date,this.year=r.getFullYear(),this.month=r.getMonth(),this.day=1,this.hour=0,this.minute=0,this.second=0,t=0;t<n.length;t++)n[t]&&n[t].call(this);if(this.hour=this.meridian=="p"&&this.hour<13?this.hour+12:this.hour,this.day>Date.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return i=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second),this.timezone?i.set({timezone:this.timezone}):this.timezoneOffset&&i.set({timezoneOffset:this.timezoneOffset}),i},finish:function(n){var f,r,t,u;if(n=n instanceof Array?o(n):[n],n.length===0)return null;for(f=0;f<n.length;f++)typeof n[f]=="function"&&n[f].call(this);if(this.now)return new Date;var i=Date.today(),e=!!(this.days!=null||this.orient||this.operator);return e?(u=this.orient=="past"||this.operator=="subtract"?-1:1,this.weekday&&(this.unit="day",r=Date.getDayNumberFromName(this.weekday)-i.getDay(),t=7,this.days=r?(r+u*t)%t:u*t),this.month&&(this.unit="month",r=this.month-i.getMonth(),t=12,this.months=r?(r+u*t)%t:u*t,this.month=null),this.unit||(this.unit="day"),(this[this.unit+"s"]==null||this.operator!=null)&&(this.value||(this.value=1),this.unit=="week"&&(this.unit="day",this.value=this.value*7),this[this.unit+"s"]=this.value*u),i.add(this)):(this.meridian&&this.hour&&(this.hour=this.hour<13&&this.meridian=="p"?this.hour+12:this.hour),this.weekday&&!this.day&&(this.day=i.addDays(Date.getDayNumberFromName(this.weekday)-i.getDay()).getDate()),this.month&&!this.day&&(this.day=1),i.set(this))}};var t=Date.Parsing.Operators,n=Date.Grammar,i=Date.Translator,r;n.datePartDelimiter=t.rtoken(/^([\s\-\.\,\/\x27]+)/);n.timePartDelimiter=t.stoken(":");n.whiteSpace=t.rtoken(/^\s*/);n.generalDelimiter=t.rtoken(/^(([\s\,]|at|on)+)/);u={};n.ctoken=function(n){var r=u[n],i;if(!r){var o=Date.CultureInfo.regexPatterns,f=n.split(/\s+/),e=[];for(i=0;i<f.length;i++)e.push(t.replace(t.rtoken(o[f[i]]),f[i]));r=u[n]=t.any.apply(null,e)}return r};n.ctoken2=function(n){return t.rtoken(Date.CultureInfo.regexPatterns[n])};n.h=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),i.hour));n.hh=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2])/),i.hour));n.H=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),i.hour));n.HH=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3])/),i.hour));n.m=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.minute));n.mm=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.minute));n.s=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.second));n.ss=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.second));n.hms=t.cache(t.sequence([n.H,n.mm,n.ss],n.timePartDelimiter));n.t=t.cache(t.process(n.ctoken2("shortMeridian"),i.meridian));n.tt=t.cache(t.process(n.ctoken2("longMeridian"),i.meridian));n.z=t.cache(t.process(t.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),i.timezone));n.zz=t.cache(t.process(t.rtoken(/^(\+|\-)\s*\d\d\d\d/),i.timezone));n.zzz=t.cache(t.process(n.ctoken2("timezone"),i.timezone));n.timeSuffix=t.each(t.ignore(n.whiteSpace),t.set([n.tt,n.zzz]));n.time=t.each(t.optional(t.ignore(t.stoken("T"))),n.hms,n.timeSuffix);n.d=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1]|\d)/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.dd=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1])/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.ddd=n.dddd=t.cache(t.process(n.ctoken("sun mon tue wed thu fri sat"),function(n){return function(){this.weekday=n}}));n.M=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d|\d)/),i.month));n.MM=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d)/),i.month));n.MMM=n.MMMM=t.cache(t.process(n.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),i.month));n.y=t.cache(t.process(t.rtoken(/^(\d\d?)/),i.year));n.yy=t.cache(t.process(t.rtoken(/^(\d\d)/),i.year));n.yyy=t.cache(t.process(t.rtoken(/^(\d\d?\d?\d?)/),i.year));n.yyyy=t.cache(t.process(t.rtoken(/^(\d\d\d\d)/),i.year));r=function(){return t.each(t.any.apply(null,arguments),t.not(n.ctoken2("timeContext")))};n.day=r(n.d,n.dd);n.month=r(n.M,n.MMM);n.year=r(n.yyyy,n.yy);n.orientation=t.process(n.ctoken("past future"),function(n){return function(){this.orient=n}});n.operator=t.process(n.ctoken("add subtract"),function(n){return function(){this.operator=n}});n.rday=t.process(n.ctoken("yesterday tomorrow today now"),i.rday);n.unit=t.process(n.ctoken("minute hour day week month year"),function(n){return function(){this.unit=n}});n.value=t.process(t.rtoken(/^\d\d?(st|nd|rd|th)?/),function(n){return function(){this.value=n.replace(/\D/g,"")}});n.expression=t.set([n.rday,n.operator,n.value,n.unit,n.orientation,n.ddd,n.MMM]);r=function(){return t.set(arguments,n.datePartDelimiter)};n.mdy=r(n.ddd,n.month,n.day,n.year);n.ymd=r(n.ddd,n.year,n.month,n.day);n.dmy=r(n.ddd,n.day,n.month,n.year);n.date=function(t){return(n[Date.CultureInfo.dateElementOrder]||n.mdy).call(this,t)};n.format=t.process(t.many(t.any(t.process(t.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(t){if(n[t])return n[t];throw Date.Parsing.Exception(t);}),t.process(t.rtoken(/^[^dMyhHmstz]+/),function(n){return t.ignore(t.stoken(n))}))),function(n){return t.process(t.each.apply(null,n),i.finishExact)});f={};e=function(t){return f[t]=f[t]||n.format(t)[0]};n.formats=function(n){var r,i;if(n instanceof Array){for(r=[],i=0;i<n.length;i++)r.push(e(n[i]));return t.any.apply(null,r)}return e(n)};n._formats=n.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);n._start=t.process(t.set([n.date,n.time,n.expression],n.generalDelimiter,n.whiteSpace),i.finish);n.start=function(t){try{var i=n._formats.call({},t);if(i[1].length===0)return i}catch(r){}return n._start.call({},t)}}(),Date._parse=Date.parse,Date.parse=function(n){var t=null;if(!n)return null;try{t=Date.Grammar.start.call({},n)}catch(i){return null}return t[1].length===0?t[0]:null},Date.getParseFunction=function(n){var t=Date.Grammar.formats(n);return function(n){var i=null;try{i=t.call({},n)}catch(r){return null}return i[1].length===0?i[0]:null}},Date.parseExact=function(n,t){return Date.getParseFunction(t)(n)},!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n("object"==typeof exports?require("jquery"):jQuery)}(function(n,t){function u(){return new Date(Date.UTC.apply(Date,arguments))}function h(){var n=new Date;return u(n.getFullYear(),n.getMonth(),n.getDate())}function y(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function c(n){return function(){return this[n].apply(this,arguments)}}function p(n){return n&&!isNaN(n.getTime())}function w(t,i){function o(n,t){return t.toLowerCase()}var u,f=n(t).data(),e={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])"),r;i=new RegExp("^"+i.toLowerCase());for(r in f)i.test(r)&&(u=r.replace(s,o),e[u]=f[r]);return e}function b(t){var u={},i;if(r[t]||(t=t.split("-")[0],r[t]))return i=r[t],n.each(v,function(n,t){t in i&&(u[t]=i[t])}),u}var l=function(){var t={get:function(n){return this.slice(n)[0]},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;r>t;t++)if(this[t].valueOf()===i)return t;return-1},remove:function(n){this.splice(n,1)},replace:function(t){t&&(n.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var n=new l;return n.replace(this),n}};return function(){var i=[];return i.push.apply(i,arguments),n.extend(i,t),i}}(),f=function(t,r){n(t).data("datepicker",this);this._process_options(r);this.dates=new l;this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=n(t);this.isInline=!1;this.isInput=this.element.is("input");this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1;this.hasInput=this.component&&this.element.find("input").length;this.component&&0===this.component.length&&(this.component=!1);this.picker=n(i.template);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&this.picker.addClass("datepicker-rtl");this.viewMode=this.o.startView;this.o.calendarWeeks&&this.picker.find("thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(n,t){return parseInt(t)+1});this._allow_update=!1;this.setStartDate(this._o.startDate);this.setEndDate(this._o.endDate);this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted);this.setDatesDisabled(this.o.datesDisabled);this.fillDow();this.fillMonths();this._allow_update=!0;this.update();this.showMode();this.isInline&&this.show()},o,a,e,s,v,r,i;f.prototype={constructor:f,_process_options:function(t){var f,o,l,a,e,c;this._o=n.extend({},this._o,t);f=this.o=n.extend({},this._o);o=f.language;switch(r[o]||(o=o.split("-")[0],r[o]||(o=s.language)),f.language=o,f.startView){case 2:case"decade":f.startView=2;break;case 1:case"year":f.startView=1;break;default:f.startView=0}switch(f.minViewMode){case 1:case"months":f.minViewMode=1;break;case 2:case"years":f.minViewMode=2;break;default:f.minViewMode=0}switch(f.maxViewMode){case 0:case"days":f.maxViewMode=0;break;case 1:case"months":f.maxViewMode=1;break;default:f.maxViewMode=2}if(f.startView=Math.min(f.startView,f.maxViewMode),f.startView=Math.max(f.startView,f.minViewMode),f.multidate!==!0&&(f.multidate=Number(f.multidate)||!1,f.multidate!==!1&&(f.multidate=Math.max(0,f.multidate))),f.multidateSeparator=String(f.multidateSeparator),f.weekStart%=7,f.weekEnd=(f.weekStart+6)%7,l=i.parseFormat(f.format),(f.startDate!==-(1/0)&&(f.startDate=f.startDate?f.startDate instanceof Date?this._local_to_utc(this._zero_time(f.startDate)):i.parseDate(f.startDate,l,f.language):-(1/0)),f.endDate!==1/0&&(f.endDate=f.endDate?f.endDate instanceof Date?this._local_to_utc(this._zero_time(f.endDate)):i.parseDate(f.endDate,l,f.language):1/0),f.daysOfWeekDisabled=f.daysOfWeekDisabled||[],n.isArray(f.daysOfWeekDisabled)||(f.daysOfWeekDisabled=f.daysOfWeekDisabled.split(/[,\s]*/)),f.daysOfWeekDisabled=n.map(f.daysOfWeekDisabled,function(n){return parseInt(n,10)}),f.daysOfWeekHighlighted=f.daysOfWeekHighlighted||[],n.isArray(f.daysOfWeekHighlighted)||(f.daysOfWeekHighlighted=f.daysOfWeekHighlighted.split(/[,\s]*/)),f.daysOfWeekHighlighted=n.map(f.daysOfWeekHighlighted,function(n){return parseInt(n,10)}),f.datesDisabled=f.datesDisabled||[],n.isArray(f.datesDisabled))||(a=[],a.push(i.parseDate(f.datesDisabled,l,f.language)),f.datesDisabled=a),f.datesDisabled=n.map(f.datesDisabled,function(n){return i.parseDate(n,l,f.language)}),e=String(f.orientation).toLowerCase().split(/\s+/g),c=f.orientation.toLowerCase(),e=n.grep(e,function(n){return/^auto|left|right|top|bottom$/.test(n)}),f.orientation={x:"auto",y:"auto"},c&&"auto"!==c)if(1===e.length)switch(e[0]){case"top":case"bottom":f.orientation.y=e[0];break;case"left":case"right":f.orientation.x=e[0]}else c=n.grep(e,function(n){return/^left|right$/.test(n)}),f.orientation.x=c[0]||"auto",c=n.grep(e,function(n){return/^top|bottom$/.test(n)}),f.orientation.y=c[0]||"auto";if(f.defaultViewDate){var v=f.defaultViewDate.year||(new Date).getFullYear(),y=f.defaultViewDate.month||0,p=f.defaultViewDate.day||1;f.defaultViewDate=u(v,y,p)}else f.defaultViewDate=h()},_events:[],_secondaryEvents:[],_applyEvents:function(n){for(var f,r,u,i=0;i<n.length;i++)f=n[i][0],2===n[i].length?(r=t,u=n[i][1]):3===n[i].length&&(r=n[i][1],u=n[i][2]),f.on(u,r)},_unapplyEvents:function(n){for(var f,r,u,i=0;i<n.length;i++)f=n[i][0],2===n[i].length?(u=t,r=n[i][1]):3===n[i].length&&(u=n[i][1],r=n[i][2]),f.off(r,u)},_buildEvents:function(){var t={keyup:n.proxy(function(t){-1===n.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:n.proxy(this.keydown,this),paste:n.proxy(this.paste,this)};this.o.showOnFocus===!0&&(t.focus=n.proxy(this.show,this));this.isInput?this._events=[[this.element,t]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),t],[this.component,{click:n.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:n.proxy(this.show,this)}]];this._events.push([this.element,"*",{blur:n.proxy(function(n){this._focused_from=n.target},this)}],[this.element,{blur:n.proxy(function(n){this._focused_from=n.target},this)}]);this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":n.proxy(function(n){this.update(n.date)},this)}]);this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{mousedown:n.proxy(function(n){this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||this.picker.hasClass("datepicker-inline")||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,r){var u=r||this.dates.get(-1),f=this._utc_to_local(u);this.element.trigger({type:t,date:f,dates:n.map(this.dates,this._utc_to_local),format:n.proxy(function(n,t){0===arguments.length?(n=this.dates.length-1,t=this.o.format):"string"==typeof n&&(t=n,n=this.dates.length-1);t=t||this.o.format;var r=this.dates.get(n);return i.formatDate(r,t,this.o.language)},this)})},show:function(){var t=this.component?this.element.find("input"):this.element;if(!t.attr("readonly")||this.o.enableOnReadonly!==!1)return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&n(this.element).blur(),this},hide:function(){return this.isInline?this:this.picker.is(":visible")?(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"),this):this},remove:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var i;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==n.inArray("text/plain",t.originalEvent.clipboardData.types))i=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i);this.update();t.preventDefault()},_utc_to_local:function(n){return n&&new Date(n.getTime()+6e4*n.getTimezoneOffset())},_local_to_utc:function(n){return n&&new Date(n.getTime()-6e4*n.getTimezoneOffset())},_zero_time:function(n){return n&&new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return n&&new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))},getDates:function(){return n.map(this.dates,this._utc_to_local)},getUTCDates:function(){return n.map(this.dates,function(n){return new Date(n)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var n=this.dates.get(-1);return"undefined"!=typeof n?new Date(n):null},clearDates:function(){var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input"));n&&n.val("");this.update();this._trigger("changeDate");this.o.autoclose&&this.hide()},setDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,n.map(t,this._utc_to_local)),this._trigger("changeDate"),this.setValue(),this},setDate:c("setDates"),setUTCDate:c("setUTCDates"),setValue:function(){var n=this.getFormattedDate();return this.isInput?this.element.val(n):this.component&&this.element.find("input").val(n),this},getFormattedDate:function(r){r===t&&(r=this.o.format);var u=this.o.language;return n.map(this.dates,function(n){return i.formatDate(n,r,u)}).join(this.o.multidateSeparator)},setStartDate:function(n){return this._process_options({startDate:n}),this.update(),this.updateNavArrows(),this},setEndDate:function(n){return this._process_options({endDate:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(n){return this._process_options({daysOfWeekDisabled:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekHighlighted:function(n){return this._process_options({daysOfWeekHighlighted:n}),this.update(),this},setDatesDisabled:function(n){this._process_options({datesDisabled:n});this.update();this.updateNavArrows()},place:function(){var y,r,p;if(this.isInline)return this;var f=this.picker.outerWidth(),s=this.picker.outerHeight(),e=n(this.o.container),h=e.width(),c="body"===this.o.container?n(document).scrollTop():e.scrollTop(),l=e.offset(),a=[];this.element.parents().each(function(){var t=n(this).css("z-index");"auto"!==t&&0!==t&&a.push(parseInt(t))});var v=Math.max.apply(Math,a)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),w=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),o=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),t=u.left-l.left,i=u.top-l.top;return"body"!==this.o.container&&(i+=c),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(t-=f-o)):u.left<0?(this.picker.addClass("datepicker-orient-left"),t-=u.left-10):t+f>h?(this.picker.addClass("datepicker-orient-right"),t+=o-f):this.picker.addClass("datepicker-orient-left"),r=this.o.orientation.y,("auto"===r&&(y=-c+i-s,r=0>y?"bottom":"top"),this.picker.addClass("datepicker-orient-"+r),"top"===r?i-=s+parseInt(this.picker.css("padding-top")):i+=w,this.o.rtl)?(p=h-(t+o),this.picker.css({top:i,right:p,zIndex:v})):this.picker.css({top:i,left:t,zIndex:v}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var r=this.dates.copy(),t=[],u=!1;return arguments.length?(n.each(arguments,n.proxy(function(n,i){i instanceof Date&&(i=this._local_to_utc(i));t.push(i)},this)),u=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),t=t&&this.o.multidate?t.split(this.o.multidateSeparator):[t],delete this.element.data().date),t=n.map(t,n.proxy(function(n){return i.parseDate(n,this.o.format,this.o.language)},this)),t=n.grep(t,n.proxy(function(n){return!this.dateWithinRange(n)||!n},this),!0),this.dates.replace(t),this.viewDate=this.dates.length?new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?new Date(this.o.startDate):this.viewDate>this.o.endDate?new Date(this.o.endDate):this.o.defaultViewDate,u?this.setValue():t.length&&String(r)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&r.length&&this._trigger("clearDate"),this.fill(),this.element.change(),this},fillDow:function(){var t=this.o.weekStart,n="<tr>";for(this.o.calendarWeeks&&(this.picker.find(".datepicker-days .datepicker-switch").attr("colspan",function(n,t){return parseInt(t)+1}),n+='<th class="cw">&#160;<\/th>');t<this.o.weekStart+7;)n+='<th class="dow">'+r[this.o.language].daysMin[t++%7]+"<\/th>";n+="<\/tr>";this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var n="",t=0;12>t;)n+='<span class="month">'+r[this.o.language].monthsShort[t++]+"<\/span>";this.picker.find(".datepicker-months td").html(n)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),u=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()===r&&t.getUTCMonth()<f?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()===r&&t.getUTCMonth()>f)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&t.getUTCFullYear()===u.getFullYear()&&t.getUTCMonth()===u.getMonth()&&t.getUTCDate()===u.getDate()&&i.push("today"),-1!==this.dates.contains(t)&&i.push("active"),(!this.dateWithinRange(t)||this.dateIsDisabled(t))&&i.push("disabled"),-1!==n.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),-1!==n.inArray(t.valueOf(),this.range)&&i.push("selected"),t.valueOf()===this.range[0]&&i.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},fill:function(){var l,nt=new Date(this.viewDate),f=nt.getUTCFullYear(),w=nt.getUTCMonth(),b=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),ot=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,st=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,ht=r[this.o.language].today||r.en.today||"",ct=r[this.o.language].clear||r.en.clear||"",lt=r[this.o.language].titleFormat||r.en.titleFormat,e,d,v,a,h,o,rt,y,ut,ft,c,et,p,s;if(!isNaN(f)&&!isNaN(w)){for(this.picker.find(".datepicker-days thead .datepicker-switch").text(i.formatDate(new u(f,w),lt,this.o.language)),this.picker.find("tfoot .today").text(ht).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot .clear").text(ct).toggle(this.o.clearBtn!==!1),this.picker.find("thead .datepicker-title").text(this.o.title).toggle(""!==this.o.title),this.updateNavArrows(),this.fillMonths(),e=u(f,w-1,28),d=i.getDaysInMonth(e.getUTCFullYear(),e.getUTCMonth()),e.setUTCDate(d),e.setUTCDate(d-(e.getUTCDay()-this.o.weekStart+7)%7),v=new Date(e),e.getUTCFullYear()<100&&v.setUTCFullYear(e.getUTCFullYear()),v.setUTCDate(v.getUTCDate()+42),v=v.valueOf(),h=[];e.valueOf()<v;){if(e.getUTCDay()===this.o.weekStart&&(h.push("<tr>"),this.o.calendarWeeks)){var tt=new Date(+e+(this.o.weekStart-e.getUTCDay()-7)%7*864e5),it=new Date(Number(tt)+(11-tt.getUTCDay())%7*864e5),g=new Date(Number(g=u(it.getUTCFullYear(),0,1))+(11-g.getUTCDay())%7*864e5),at=(it-g)/6048e5+1;h.push('<td class="cw">'+at+"<\/td>")}(a=this.getClassNames(e),a.push("day"),this.o.beforeShowDay!==n.noop)&&(o=this.o.beforeShowDay(this._utc_to_local(e)),o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),o.enabled===!1&&a.push("disabled"),o.classes&&(a=a.concat(o.classes.split(/\s+/))),o.tooltip&&(l=o.tooltip));a=n.unique(a);h.push('<td class="'+a.join(" ")+'"'+(l?' title="'+l+'"':"")+">"+e.getUTCDate()+"<\/td>");l=null;e.getUTCDay()===this.o.weekEnd&&h.push("<\/tr>");e.setUTCDate(e.getUTCDate()+1)}for(this.picker.find(".datepicker-days tbody").empty().append(h.join("")),rt=r[this.o.language].monthsTitle||r.en.monthsTitle||"Months",y=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?rt:f).end().find("span").removeClass("active"),(n.each(this.dates,function(n,t){t.getUTCFullYear()===f&&y.eq(t.getUTCMonth()).addClass("active")}),(b>f||f>k)&&y.addClass("disabled"),f===b&&y.slice(0,ot).addClass("disabled"),f===k&&y.slice(st+1).addClass("disabled"),this.o.beforeShowMonth!==n.noop)&&(ut=this,n.each(y,function(t,i){if(!n(i).hasClass("disabled")){var r=new Date(f,t,1),u=ut.o.beforeShowMonth(r);u===!1&&n(i).addClass("disabled")}})),h="",f=10*parseInt(f/10,10),ft=this.picker.find(".datepicker-years").find(".datepicker-switch").text(f+"-"+(f+9)).end().find("td"),f-=1,et=n.map(this.dates,function(n){return n.getUTCFullYear()}),p=-1;11>p;p++)(c=["year"],l=null,-1===p?c.push("old"):10===p&&c.push("new"),-1!==n.inArray(f,et)&&c.push("active"),(b>f||f>k)&&c.push("disabled"),this.o.beforeShowYear!==n.noop)&&(s=this.o.beforeShowYear(new Date(f,0,1)),s===t?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),s.enabled===!1&&c.push("disabled"),s.classes&&(c=c.concat(s.classes.split(/\s+/))),s.tooltip&&(l=s.tooltip)),h+='<span class="'+c.join(" ")+'"'+(l?' title="'+l+'"':"")+">"+f+"<\/span>",f+=1;ft.html(h)}},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-(1/0)&&n<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==1/0&&n>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-(1/0)&&n<=this.o.startDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"});this.o.endDate!==1/0&&n>=this.o.endDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){var e,f,o,r,s,c;if(t.preventDefault(),t.stopPropagation(),r=n(t.target).closest("span, td, th"),1===r.length)switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":s=i.modes[this.viewMode].navStep*("prev"===r[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,s);this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,s);1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":this.showMode(-2);c="linked"===this.o.todayBtn?null:"view";this._setDate(h(),c);break;case"clear":this.clearDates()}break;case"span":r.hasClass("disabled")||(this.viewDate.setUTCDate(1),r.hasClass("month")?(o=1,f=r.parent().find("span").index(r),e=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(f),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode?(this._setDate(u(e,f,o)),this.showMode()):this.showMode(-1)):(o=1,f=0,e=parseInt(r.text(),10)||0,this.viewDate.setUTCFullYear(e),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(u(e,f,o)),this.showMode(-1)),this.fill());break;case"td":r.hasClass("day")&&!r.hasClass("disabled")&&(o=parseInt(r.text(),10)||1,e=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),r.hasClass("old")?0===f?(f=11,e-=1):f-=1:r.hasClass("new")&&(11===f?(f=0,e+=1):f+=1),this._setDate(u(e,f,o)))}this.picker.is(":visible")&&this._focused_from&&n(this._focused_from).focus();delete this._focused_from},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),-1!==t?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):this.o.multidate===!1?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(n,t){t&&"date"!==t||this._toggle_multidate(n&&new Date(n));t&&"view"!==t||(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&"view"===t||this._trigger("changeDate");var i;this.isInput?i=this.element:this.component&&(i=this.element.find("input"));i&&i.change();!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(n,t){var i=new Date(n);return i.setUTCDate(n.getUTCDate()+t),i},moveWeek:function(n,t){return this.moveDay(n,7*t)},moveMonth:function(n,t){var f;if(!p(n))return this.o.defaultViewDate;if(!t)return n;var r,u,i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t);if(t=t>0?1:-1,1===s)u=-1===t?function(){return i.getUTCMonth()===o}:function(){return i.getUTCMonth()!==r},r=o+t,i.setUTCMonth(r),(0>r||r>11)&&(r=(r+12)%12);else{for(f=0;s>f;f++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);u=function(){return r!==i.getUTCMonth()}}for(;u();)i.setUTCDate(--e),i.setUTCMonth(r);return i},moveYear:function(n,t){return this.moveMonth(n,12*t)},moveAvailableDate:function(n,t,i){do{if(n=this[i](n,t),!this.dateWithinRange(n))return!1;i="moveDay"}while(this.dateIsDisabled(n));return n},weekOfDateIsDisabled:function(t){return-1!==n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||n.grep(this.o.datesDisabled,function(n){return y(t,n)}).length>0},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){var r,t,f,i,u;if(!this.picker.is(":visible"))return void((40===n.keyCode||27===n.keyCode)&&(this.show(),n.stopPropagation()));f=!1;i=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();n.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;r=37===n.keyCode||38===n.keyCode?-1:1;n.ctrlKey?(t=this.moveAvailableDate(i,r,"moveYear"),t&&this._trigger("changeYear",this.viewDate)):n.shiftKey?(t=this.moveAvailableDate(i,r,"moveMonth"),t&&this._trigger("changeMonth",this.viewDate)):37===n.keyCode||39===n.keyCode?t=this.moveAvailableDate(i,r,"moveDay"):this.weekOfDateIsDisabled(i)||(t=this.moveAvailableDate(i,r,"moveWeek"));t&&(this.focusDate=this.viewDate=t,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;i=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate(i),f=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(":visible")&&(n.preventDefault(),n.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}f&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change())},showMode:function(n){n&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,this.viewMode+n)));this.picker.children("div").hide().filter(".datepicker-"+i.modes[this.viewMode].clsName).show();this.updateNavArrows()}};o=function(t,i){n(t).data("datepicker",this);this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;e.call(n(this.inputs),i).on("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n(t).data("datepicker")});this.updateDates()};o.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},dateUpdated:function(t){var f;if(!this.updating&&(this.updating=!0,f=n(t.target).data("datepicker"),"undefined"!=typeof f)){var i=f.getUTCDate(),e=n.inArray(t.target,this.inputs),r=e-1,u=e+1,o=this.inputs.length;if(-1!==e){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t.setUTCDate(i)}),i<this.dates[r])for(;r>=0&&i<this.dates[r];)this.pickers[r--].setUTCDate(i);else if(i>this.dates[u])for(;o>u&&i>this.dates[u];)this.pickers[u++].setUTCDate(i);this.updateDates();delete this.updating}}},remove:function(){n.map(this.pickers,function(n){n.remove()});delete this.element.data().datepicker}};a=n.fn.datepicker;e=function(i){var u=Array.apply(null,arguments),r;if(u.shift(),this.each(function(){var h=n(this),t=h.data("datepicker"),c="object"==typeof i&&i;if(!t){var l=w(this,"date"),a=n.extend({},s,l,c),v=b(a.language),e=n.extend({},s,v,l,c);h.hasClass("input-daterange")||e.inputs?(n.extend(e,{inputs:e.inputs||h.find("input").toArray()}),t=new o(this,e)):t=new f(this,e);h.data("datepicker",t)}"string"==typeof i&&"function"==typeof t[i]&&(r=t[i].apply(t,u))}),r===t||r instanceof f||r instanceof o)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return r};n.fn.datepicker=e;s=n.fn.datepicker.defaults={autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,beforeShowYear:n.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:2,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:""};v=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=f;r=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}};i={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},getDaysInMonth:function(n,t){return[31,i.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(n){if("function"==typeof n.toValue&&"function"==typeof n.toDisplay)return n;var t=n.replace(this.validParts,"\x00").split("\x00"),i=n.match(this.validParts);if(!t||!t.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(e,o,s){function nt(){var n=this.slice(0,l[c].length),t=l[c].slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var v,rt,d,w;if(!e)return t;if(e instanceof Date)return e;if("string"==typeof o&&(o=i.parseFormat(o)),o.toValue)return o.toValue(e,o,s);var y,tt,c,it,l=e.match(/([\-+]\d+)([dmwy])/g),ut={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"};if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e)){for(e=new Date,c=0;c<l.length;c++)y=/([\-+]\d+)([dmwy])/.exec(l[c]),tt=parseInt(y[1]),it=ut[y[2]],e=f.prototype[it](e,tt);return u(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}l=e&&e.match(this.nonpunctuation)||[];e=new Date;var p,b,k={},g=["yyyy","yy","M","MM","m","mm","d","dd"],a={yyyy:function(n,t){return n.setUTCFullYear(t)},yy:function(n,t){return n.setUTCFullYear(2e3+t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;0>t;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!==t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}};if(a.M=a.MM=a.mm=a.m,a.dd=a.d,e=h(),v=o.parts.slice(),l.length!==v.length&&(v=n(v).filter(function(t,i){return-1!==n.inArray(i,g)}).toArray()),l.length===v.length){for(c=0,rt=v.length;rt>c;c++){if(p=parseInt(l[c],10),y=v[c],isNaN(p))switch(y){case"MM":b=n(r[s].months).filter(nt);p=n.inArray(b[0],r[s].months)+1;break;case"M":b=n(r[s].monthsShort).filter(nt);p=n.inArray(b[0],r[s].monthsShort)+1}k[y]=p}for(c=0;c<g.length;c++)w=g[c],w in k&&!isNaN(k[w])&&(d=new Date(e),a[w](d,k[w]),isNaN(d)||(e=d))}return e},formatDate:function(t,u,f){var e;if(!t)return"";if("string"==typeof u&&(u=i.parseFormat(u)),u.toDisplay)return u.toDisplay(t,u,f);e={d:t.getUTCDate(),D:r[f].daysShort[t.getUTCDay()],DD:r[f].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:r[f].monthsShort[t.getUTCMonth()],MM:r[f].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d;e.mm=(e.m<10?"0":"")+e.m;t=[];for(var s=n.extend([],u.separators),o=0,h=u.parts.length;h>=o;o++)s.length&&t.push(s.shift()),t.push(e[u.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"><\/th><\/tr><tr><th class="prev">&#171;<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">&#187;<\/th><\/tr><\/thead>',contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};i.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+i.headTemplate+"<tbody><\/tbody>"+i.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=a,this};n.fn.datepicker.version="1.5.1";n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),e.call(i,"show"))});n(function(){e.call(n('[data-provide="datepicker-inline"]'))})}),utilsApp=function(){return{init:function(){}}}(),baseApp=function(){var n=function(n){var t=null,i=null;t=n||$(this);i=t.find(".modal-dialog");t.css("display","block");i.css("margin-top",Math.max(0,($(window).height()-i.height())/2))},t=function(){var n=$("#navigation"),i=$(".main-navbar",n),r=$("#main-search-form",n),t=$(".mobile-navbar",n),u=$("#mobile-search-form",n),f=$("#back-navigation-item",n),e=$("#account-navigation-item",n),o=$(".mobile-navbar > li",n).not("#back-navigation-item,#account-navigation-item");$("#search-button",i).on("click",function(){i.hide();r.show();$("#main-search-input",r).focus()});$("#search-close").on("click",function(){r.hide();i.css("display","")});$("#mobile-search-button").on("click",function(){try{$(".main-navbar-action-button.collapsed").click()}catch(n){}u.show();t.hide();$("#main-search-input",u).focus()});$("#mobile-search-close").on("click",function(){u.hide();t.show()});$("#account-button",t).on("click",function(){f.show();e.show();o.hide()});$("#account-back-button",t).on("click",function(){f.hide();e.hide();o.show()})},i=function(){typeof toastr!="undefined"&&(toastr.options.timeOut=3e3,toastr.options.extendedTimeOut=6e3,toastr.options.progressBar=!0,toastr.options.showEasing="swing",toastr.options.hideEasing="linear",toastr.options.closeButton=!1,toastr.options.positionClass="toast-top-right")},r=function(){$("#notifications li").each(function(){var n=$(".description",this);n.css("margin-top",$(this).height()/2-n.height()/2+"px")})},l=function(){$.each($("input, textarea"),function(){$(this).data("holder",$(this).attr("placeholder"))});$("input, textarea").focusin(function(){$(this).attr("placeholder","")});$("input, textarea").focusout(function(){$(this).attr("placeholder",$(this).data("holder"))})},u=function(){$(window).load(function(){var n=$("#filters .bootstrap-select");$(n).each(function(){var t=$(this),n=$(this).siblings("select");$(".dropdown-menu li:first-child .text",this).text($(n).data("empty"))})})},f=function(){var n=$("#grid");$("li",n).mouseenter(function(){$(".color",this).animate({height:35},250,function(){$(this).addClass("opened")});$(".color > i",this).show()}).mouseleave(function(){$(".color",this).animate({height:15},150,function(){$(this).removeClass("opened")});$(".color > i",this).hide()})},e=function(){$(document).on("click","[data-bb][data-confirm]",function(t){t.preventDefault();var i=$(this);bootbox.dialog({message:$(this).data("message"),title:$(this).data("title"),buttons:{cancel:{label:'<i class="fa fa-times"><\/i>&nbsp;Cancel',className:"btn-secondary",callback:function(){}},confirm:{label:"Ok",className:"btn-primary",callback:function(){window.location.href=i.attr("href")}}}}).init(function(){var t=$(".bootbox"),r,i;t.removeClass("fade");n(t);r=$(".modal-dialog .modal-content .modal-header .bootbox-close-button",t);i=$("<i/>");i.addClass("sf-close");r.html(i)})});$(document).on("click","[data-bb][data-alert]",function(){bootbox.alert($(this).data("message"),function(){})})},o=function(){$(".modal").on({"show.bs.modal":function(){$(".modal-dialog").velocity("fadeIn",{duration:750})},"shown.bs.modal":function(){n($(this))}});$(window).on("resize",function(){$(".modal:visible").each(n)})},s=function(){if(jQuery.fn.selectpicker){var n=null;$("select").not(".keepnative").each(function(){var n=$(this),t=$(this).data("noneselectedtext");n.selectpicker({noneSelectedText:t})});n=$(".bootstrap-select.btn-group .btn .caret");n.after('<i class="icon-dropdown fa fa-sort"><\/i>');n.removeClass("caret");$('select[data-multiselect-first-item-check-all="true"]').change(function(){var t=$(this).data("previous")||[],n=$(this).val(),i=n.indexOf("")!==-1,r=t.indexOf("")!==-1;i&&(n=r?n.filter(function(n){return n!==""}):[""],$(this).val(n),$(this).selectpicker("refresh"));$(this).data("previous",n)})}},h=function(){$(".bootstrap-select.btn-group .btn .caret").after('<i class="icon-dropdown fa fa-chevron-circle-down"><\/i>');$(".filters .colorFilter.bootstrap-select .text").before('<span class="color img-circle"><\/span>')},c=function(){var n=null;n=$("body");$("#main-navbar","#navigation").on({"show.bs.collapse":function(){n.addClass("mobile-menu-visible")},"hide.bs.collapse":function(){n.removeClass("mobile-menu-visible")}})};return{init:function(){o();e();u();s();h();i();r();c()},initGrid:function(){f()},initSearch:function(){t()}}}(),$().ready(function(){baseApp.init()}),homeApp=function(){function n(){$("#login-modal #UserName").after('<i class="sf-username"><\/i>');$("#login-modal #Password").after('<i class="sf-password"><\/i>')}return{init:function(){n();baseApp.initGrid();baseApp.initSearch()}}}(),$().ready(function(){homeApp.init()}),document.querySelectorAll(".show-target").forEach(function(n){n.addEventListener("click",function(n){showTarget(this,n)})}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),$.fn.serializeObject=function(){var n={},t=this.serializeArray();return $.each(t,function(){n[this.name]!==undefined?(n[this.name].push||(n[this.name]=[n[this.name]]),n[this.name].push(this.value||"")):n[this.name]=this.value||""}),n},$(document).ready(function(){$(".nav .login").click(function(){addUrlLoginTag()});$(".nav .register").click(function(){addUrlRegisterTag()});$(".nav .recover").click(function(){addUrlRecoverTag()});$(".nav .return-login").click(function(){addUrlLoginTag()});applyWorkaroundForBootstrapModalNavigationBug()}),$(document).ready(function(){var t=$("html").prop("lang"),n=function(){};$(".decimal").spinner({culture:t,step:$(this).data("step"),min:$(this).data("min"),max:$(this).data("max"),create:n,stop:n,change:n})}),docCookies={getItem:function(n){return unescape(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(n,t,i,r,u,f){if(!n||/^(?:expires|max\-age|path|domain|secure)$/i.test(n))return!1;var e="";if(i)switch(i.constructor){case Number:e=i===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+i;break;case String:e="; expires="+i;break;case Date:e="; expires="+i.toGMTString()}return document.cookie=escape(n)+"="+escape(t)+e+(u?"; domain="+u:"")+(r?"; path="+r:"")+(f?"; secure":""),!0},removeItem:function(n,t){return!n||!this.hasItem(n)?!1:(document.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(t?"; path="+t:""),!0)},hasItem:function(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var n=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),t=0;t<n.length;t++)n[t]=unescape(n[t]);return n}},!function(n){if("object"==typeof exports)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self);t.ShareButton=n()}}(function(){return function n(t,i,r){function u(f,o){var h,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);throw new Error("Cannot find module '"+f+"'");}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i?i:n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){n("../../modules/es6.array.iterator");t.exports=n("../../modules/$.core").Array.values},{"../../modules/$.core":6,"../../modules/es6.array.iterator":34}],2:[function(n,t){n("../../modules/es6.math.trunc");t.exports=n("../../modules/$.core").Math.trunc},{"../../modules/$.core":6,"../../modules/es6.math.trunc":35}],3:[function(n,t){n("../../modules/es6.symbol");t.exports=n("../../modules/$.core").Symbol},{"../../modules/$.core":6,"../../modules/es6.symbol":36}],4:[function(n,t){var i=n("./$.is-object");t.exports=function(n){if(!i(n))throw TypeError(n+" is not an object!");return n}},{"./$.is-object":17}],5:[function(n,t){var i={}.toString;t.exports=function(n){return i.call(n).slice(8,-1)}},{}],6:[function(n,t){var i=t.exports={version:"1.2.3"};"number"==typeof __e&&(__e=i)},{}],7:[function(n,t){var r=n("./$.global"),u=n("./$.core"),o=n("./$.hide"),s=n("./$.redef"),f="prototype",e=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t,h){var l,v,c,w,p=n&i.G,b=n&i.P,a=p?r:n&i.S?r[t]||(r[t]={}):(r[t]||{})[f],y=p?u:u[t]||(u[t]={});p&&(h=t);for(l in h)v=!(n&i.F)&&a&&l in a,c=(v?a:h)[l],w=n&i.B&&v?e(c,r):b&&"function"==typeof c?e(Function.call,c):c,a&&!v&&s(a,l,c),y[l]!=c&&o(y,l,w),b&&((y[f]||(y[f]={}))[l]=c)};r.core=u;i.F=1;i.G=2;i.S=4;i.P=8;i.B=16;i.W=32;t.exports=i},{"./$.core":6,"./$.global":12,"./$.hide":14,"./$.redef":26}],8:[function(n,t){t.exports=function(n){if(void 0==n)throw TypeError("Can't call method on  "+n);return n}},{}],9:[function(n,t){var i=n("./$");t.exports=function(n){var t=i.getKeys(n),r=i.getSymbols;if(r)for(var u,f=r(n),o=i.isEnum,e=0;f.length>e;)o.call(n,u=f[e++])&&t.push(u);return t}},{"./$":22}],10:[function(n,t){t.exports=function(n){try{return!!n()}catch(t){return!0}}},{}],11:[function(n,t){var u={}.toString,f=n("./$.to-iobject"),i=n("./$").getNames,r="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],e=function(n){try{return i(n)}catch(t){return r.slice()}};t.exports.get=function(n){return r&&"[object Window]"==u.call(n)?e(n):i(f(n))}},{"./$":22,"./$.to-iobject":30}],12:[function(n,t){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},{}],13:[function(n,t){var i={}.hasOwnProperty;t.exports=function(n,t){return i.call(n,t)}},{}],14:[function(n,t){var i=n("./$"),r=n("./$.property-desc");t.exports=n("./$.support-desc")?function(n,t,u){return i.setDesc(n,t,r(1,u))}:function(n,t,i){return n[t]=i,n}},{"./$":22,"./$.property-desc":25,"./$.support-desc":28}],15:[function(n,t){var i=n("./$.cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(n){return"String"==i(n)?n.split(""):Object(n)}},{"./$.cof":5}],16:[function(n,t){var i=n("./$.cof");t.exports=Array.isArray||function(n){return"Array"==i(n)}},{"./$.cof":5}],17:[function(n,t){t.exports=function(n){return"object"==typeof n?null!==n:"function"==typeof n}},{}],18:[function(n,t){"use strict";var r=n("./$"),i={};n("./$.hide")(i,n("./$.wks")("iterator"),function(){return this});t.exports=function(t,u,f){t.prototype=r.create(i,{next:n("./$.property-desc")(1,f)});n("./$.tag")(t,u+" Iterator")}},{"./$":22,"./$.hide":14,"./$.property-desc":25,"./$.tag":29,"./$.wks":33}],19:[function(n,t){"use strict";var f=n("./$.library"),r=n("./$.def"),l=n("./$.redef"),e=n("./$.hide"),a=n("./$.has"),u=n("./$.wks")("iterator"),o=n("./$.iterators"),v=!([].keys&&"next"in[].keys()),s="@@iterator",h="keys",i="values",c=function(){return this};t.exports=function(t,y,p,w,b,k,d){var ut;n("./$.iter-create")(p,y,w);var tt,it,rt=function(n){switch(n){case h:return function(){return new p(this,n)};case i:return function(){return new p(this,n)}}return function(){return new p(this,n)}},ft=y+" Iterator",g=t.prototype,et=g[u]||g[s]||b&&g[b],nt=et||rt(b);if(et&&(ut=n("./$").getProto(nt.call(new t)),n("./$.tag")(ut,ft,!0),!f&&a(g,s)&&e(ut,u,c)),(!f||d)&&e(g,u,nt),o[y]=nt,o[ft]=c,b)if(tt={values:b==i?nt:rt(i),keys:k?nt:rt(h),entries:b!=i?nt:rt("entries")},d)for(it in tt)it in g||l(g,it,tt[it]);else r(r.P+r.F*v,y,tt)}},{"./$":22,"./$.def":7,"./$.has":13,"./$.hide":14,"./$.iter-create":18,"./$.iterators":21,"./$.library":24,"./$.redef":26,"./$.tag":29,"./$.wks":33}],20:[function(n,t){t.exports=function(n,t){return{value:t,done:!!n}}},{}],21:[function(n,t){t.exports={}},{}],22:[function(n,t){var i=Object;t.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},{}],23:[function(n,t){var i=n("./$"),r=n("./$.to-iobject");t.exports=function(n,t){for(var u,f=r(n),e=i.getKeys(f),s=e.length,o=0;s>o;)if(f[u=e[o++]]===t)return u}},{"./$":22,"./$.to-iobject":30}],24:[function(n,t){t.exports=!1},{}],25:[function(n,t){t.exports=function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}},{}],26:[function(n,t){var e=n("./$.global"),i=n("./$.hide"),r=n("./$.uid")("src"),u="toString",f=Function[u],o=(""+f).split(u);n("./$.core").inspectSource=function(n){return f.call(n)};(t.exports=function(n,t,u,f){"function"==typeof u&&(u.hasOwnProperty(r)||i(u,r,n[t]?""+n[t]:o.join(String(t))),u.hasOwnProperty("name")||i(u,"name",t));n===e?n[t]=u:(f||delete n[t],i(n,t,u))})(Function.prototype,u,function(){return"function"==typeof this&&this[r]||f.call(this)})},{"./$.core":6,"./$.global":12,"./$.hide":14,"./$.uid":31}],27:[function(n,t){var i=n("./$.global"),r="__core-js_shared__",u=i[r]||(i[r]={});t.exports=function(n){return u[n]||(u[n]={})}},{"./$.global":12}],28:[function(n,t){t.exports=!n("./$.fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./$.fails":10}],29:[function(n,t){var r=n("./$").setDesc,u=n("./$.has"),i=n("./$.wks")("toStringTag");t.exports=function(n,t,f){n&&!u(n=f?n:n.prototype,i)&&r(n,i,{configurable:!0,value:t})}},{"./$":22,"./$.has":13,"./$.wks":33}],30:[function(n,t){var i=n("./$.iobject"),r=n("./$.defined");t.exports=function(n){return i(r(n))}},{"./$.defined":8,"./$.iobject":15}],31:[function(n,t){var i=0,r=Math.random();t.exports=function(n){return"Symbol(".concat(void 0===n?"":n,")_",(++i+r).toString(36))}},{}],32:[function(n,t){var i=n("./$.wks")("unscopables");void 0==[][i]&&n("./$.hide")(Array.prototype,i,{});t.exports=function(n){[][i][n]=!0}},{"./$.hide":14,"./$.wks":33}],33:[function(n,t){var r=n("./$.shared")("wks"),i=n("./$.global").Symbol;t.exports=function(t){return r[t]||(r[t]=i&&i[t]||(i||n("./$.uid"))("Symbol."+t))}},{"./$.global":12,"./$.shared":27,"./$.uid":31}],34:[function(n){"use strict";var i=n("./$.unscope"),t=n("./$.iter-step"),r=n("./$.iterators"),u=n("./$.to-iobject");n("./$.iter-define")(Array,"Array",function(n,t){this._t=u(n);this._i=0;this._k=t},function(){var i=this._t,r=this._k,n=this._i++;return!i||n>=i.length?(this._t=void 0,t(1)):"keys"==r?t(0,n):"values"==r?t(0,i[n]):t(0,[n,i[n]])},"values");r.Arguments=r.Array;i("keys");i("values");i("entries")},{"./$.iter-define":19,"./$.iter-step":20,"./$.iterators":21,"./$.to-iobject":30,"./$.unscope":32}],35:[function(n){var t=n("./$.def");t(t.S,"Math",{trunc:function(n){return(n>0?Math.floor:Math.ceil)(n)}})},{"./$.def":7}],36:[function(n){"use strict";var r=n("./$"),w=n("./$.global"),i=n("./$.has"),b=n("./$.support-desc"),u=n("./$.def"),ut=n("./$.redef"),ft=n("./$.fails"),et=n("./$.shared"),k=n("./$.tag"),bt=n("./$.uid"),ot=n("./$.wks"),kt=n("./$.keyof"),st=n("./$.get-names"),dt=n("./$.enum-keys"),gt=n("./$.is-array"),ni=n("./$.an-object"),c=n("./$.to-iobject"),d=n("./$.property-desc"),ht=r.getDesc,e=r.setDesc,h=r.create,ct=st.get,f=w.Symbol,l=w.JSON,a=l&&l.stringify,v=!1,t=ot("_hidden"),ti=r.isEnum,y=et("symbol-registry"),o=et("symbols"),p="function"==typeof f,s=Object.prototype,g=b&&ft(function(){return 7!=h(e({},"a",{get:function(){return e(this,"a",{value:7}).a}})).a})?function(n,t,i){var r=ht(s,t);r&&delete s[t];e(n,t,i);r&&n!==s&&e(s,t,r)}:e,lt=function(n){var r=o[n]=h(f.prototype);return r._k=n,b&&v&&g(s,n,{configurable:!0,set:function(r){i(this,t)&&i(this[t],n)&&(this[t][n]=!1);g(this,n,d(1,r))}}),r},nt=function(n){return"symbol"==typeof n},tt=function(n,r,u){return u&&i(o,r)?(u.enumerable?(i(n,t)&&n[t][r]&&(n[t][r]=!1),u=h(u,{enumerable:d(0,!1)})):(i(n,t)||e(n,t,d(1,{})),n[t][r]=!0),g(n,r,u)):e(n,r,u)},it=function(n,t){ni(n);for(var i,r=dt(t=c(t)),u=0,f=r.length;f>u;)tt(n,i=r[u++],t[i]);return n},at=function(n,t){return void 0===t?h(n):it(h(n),t)},vt=function(n){var r=ti.call(this,n);return r||!i(this,n)||!i(o,n)||i(this,t)&&this[t][n]?r:!0},yt=function(n,r){var u=ht(n=c(n),r);return!u||!i(o,r)||i(n,t)&&n[t][r]||(u.enumerable=!0),u},pt=function(n){for(var r,u=ct(c(n)),f=[],e=0;u.length>e;)i(o,r=u[e++])||r==t||f.push(r);return f},wt=function(n){for(var t,r=ct(c(n)),u=[],f=0;r.length>f;)i(o,t=r[f++])&&u.push(o[t]);return u},ii=function(n){for(var t,i,r=[n],u=1,f=arguments;f.length>u;)r.push(f[u++]);return t=r[1],"function"==typeof t&&(i=t),(i||!gt(t))&&(t=function(n,t){return i&&(t=i.call(this,n,t)),nt(t)?void 0:t}),r[1]=t,a.apply(l,r)},ri=ft(function(){var n=f();return"[null]"!=a([n])||"{}"!=a({a:n})||"{}"!=a(Object(n))}),rt;p||(f=function(){if(nt(this))throw TypeError("Symbol is not a constructor");return lt(bt(arguments.length>0?arguments[0]:void 0))},ut(f.prototype,"toString",function(){return this._k}),nt=function(n){return n instanceof f},r.create=at,r.isEnum=vt,r.getDesc=yt,r.setDesc=tt,r.setDescs=it,r.getNames=st.get=pt,r.getSymbols=wt,b&&!n("./$.library")&&ut(s,"propertyIsEnumerable",vt,!0));rt={"for":function(n){return i(y,n+="")?y[n]:y[n]=f(n)},keyFor:function(n){return kt(y,n)},useSetter:function(){v=!0},useSimple:function(){v=!1}};r.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(n){var t=ot(n);rt[n]=p?t:lt(t)});v=!0;u(u.G+u.W,{Symbol:f});u(u.S,"Symbol",rt);u(u.S+u.F*!p,"Object",{create:at,defineProperty:tt,defineProperties:it,getOwnPropertyDescriptor:yt,getOwnPropertyNames:pt,getOwnPropertySymbols:wt});l&&u(u.S+u.F*(!p||ri),"JSON",{stringify:ii});k(f,"Symbol");k(Math,"Math",!0);k(w.JSON,"JSON",!0)},{"./$":22,"./$.an-object":4,"./$.def":7,"./$.enum-keys":9,"./$.fails":10,"./$.get-names":11,"./$.global":12,"./$.has":13,"./$.is-array":16,"./$.keyof":23,"./$.library":24,"./$.property-desc":25,"./$.redef":26,"./$.shared":27,"./$.support-desc":28,"./$.tag":29,"./$.to-iobject":30,"./$.uid":31,"./$.wks":33}],37:[function(n,t){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(n,t,i){for(var r,o,e,u=!0;u;){var f=n,s=t,h=i;if(u=!1,null===f&&(f=Function.prototype),r=Object.getOwnPropertyDescriptor(f,s),void 0!==r)return"value"in r?r.value:(o=r.get,void 0===o?void 0:o.call(h));if(e=Object.getPrototypeOf(f),null===e)return void 0;n=e;t=s;i=h;u=!0;r=e=void 0}},s=n("./share-utils"),h=u(s),r;n("core-js/fn/symbol");n("core-js/fn/array/iterator");n("core-js/fn/math/trunc");r=function(n){function t(n,r){f(this,t);i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);"object"==typeof n?(this.element=void 0,r=n):this.element=n;this.el={head:document.getElementsByTagName("head")[0],body:document.getElementsByTagName("body")[0]};this.config={enabledNetworks:0,protocol:"//",url:window.location.href,caption:null,title:this._defaultTitle(),image:this._defaultImage(),description:this._defaultDescription(),ui:{flyout:"sb-top sb-center",buttonText:"Share",namespace:"sb-",networkOrder:[],collision:!1},networks:{googlePlus:{enabled:!0,url:null},twitter:{enabled:!0,url:null,description:null},facebook:{enabled:!0,loadSdk:!0,url:null,appId:null,title:null,caption:null,description:null,image:null},pinterest:{enabled:!0,url:null,image:null,description:null},reddit:{enabled:!0,url:null,title:null},linkedin:{enabled:!0,url:null,title:null,description:null},whatsapp:{enabled:!0,description:null,url:null},email:{enabled:!0,title:null,description:null}}};this.listener=null;this._setup(this.element,r)}return e(t,n),o(t,[{key:"open",value:function(){this._public("Open")}},{key:"close",value:function(){this._public("Close")}},{key:"toggle",value:function(){this._public("Toggle")}},{key:"toggleListen",value:function(){this._public("Listen")}},{key:"_public",value:function(n){var e=void 0,h,r,f,c;e="undefined"==typeof element?i(Object.getPrototypeOf(t.prototype),"_objToArray",this).call(this,document.getElementsByTagName("share-button")):document.querySelectorAll(element);var u=!0,o=!1,s=void 0;try{for(r=e[Symbol.iterator]();!(u=(h=r.next()).done);u=!0)f=h.value,c=f.getElementsByClassName(this.config.ui.namespace+"social")[0],this["_event"+n](f,c)}catch(l){o=!0;s=l}finally{try{!u&&r["return"]&&r["return"]()}finally{if(o)throw s;}}}},{key:"_setup",value:function(n,r){var u=void 0,a,f,e,w,o,b;"undefined"==typeof n?u=i(Object.getPrototypeOf(t.prototype),"_objToArray",this).call(this,document.getElementsByTagName("share-button")):(u=document.querySelectorAll("share-button"+n),"object"==typeof u&&(u=i(Object.getPrototypeOf(t.prototype),"_objToArray",this).call(this,u)));this._merge(this.config,r);this.config.networks.whatsapp.enabled&&!this._isMobile()&&(this.config.networks.whatsapp.enabled=!1);0===this.config.ui.networkOrder.length&&(this.config.ui.networkOrder=["pinterest","twitter","facebook","whatsapp","googlePlus","reddit","linkedin","email"]);var s=!0,c=!1,l=void 0;try{for(f=Object.keys(this.config.networks)[Symbol.iterator]();!(s=(a=f.next()).done);s=!0)e=a.value,this.config.ui.networkOrder.indexOf(e.toString())<0&&(this.config.networks[e].enabled=!1,this.config.ui.networkOrder.push(e))}catch(v){c=!0;l=v}finally{try{!s&&f["return"]&&f["return"]()}finally{if(c)throw l;}}this._fixFlyout();this._detectNetworks();this._normalizeNetworkConfiguration();this.config.networks.facebook.enabled&&this.config.networks.facebook.loadSdk&&this._injectFacebookSdk();var k=0,h=!0,y=!1,p=void 0;try{for(o=u[Symbol.iterator]();!(h=(w=o.next()).done);h=!0)b=w.value,this._setupInstance(b,k++)}catch(v){y=!0;p=v}finally{try{!h&&o["return"]&&o["return"]()}finally{if(y)throw p;}}}},{key:"_setupInstance",value:function(n,t){var i=this,r,u,f,e;this._hide(n);this._addClass(n,"sharer-"+t);this._injectHtml(n);this._show(n);r=n.getElementsByClassName(this.config.ui.namespace+"social")[0];u=n.getElementsByTagName("li");this._addClass(r,"networks-"+this.config.enabledNetworks);n.addEventListener("click",function(){return i._eventToggle(n,r)});f=function(t){var r=u[t];"undefined"!=typeof r&&!function(){var t=r.getAttribute("data-network"),u=r.getElementsByTagName("a")[0];i._addClass(r,i.config.networks[t]["class"]);"email"!==r.className&&u.setAttribute("onclick","return false");u.addEventListener("mousedown",function(){i._hook("before",t,n)});u.addEventListener("mouseup",function(){i["_network"+t.capFLetter()](r)});u.addEventListener("click",function(){i._hook("after",t,n)})}()};for(e in Object.keys(u))f(e)}},{key:"_eventToggle",value:function(n,t){this._hasClass(t,"active")?this._eventClose(t):this._eventOpen(n,t)}},{key:"_eventOpen",value:function(n,t){this._hasClass(t,"load")&&this._removeClass(t,"load");this.collision&&this._collisionDetection(n,t);this._addClass(t,"active")}},{key:"_eventClose",value:function(n){this._removeClass(n,"active")}},{key:"_eventListen",value:function(n,t){var i=this,r=this._getDimensions(n,t);null===this.listener?this.listener=window.setInterval(function(){return i._adjustClasses(n,t,r)},100):(window.clearInterval(this.listener),this.listener=null)}},{key:"_fixFlyout",value:function(){var n=this.config.ui.flyout.split(" ");n[0].substring(0,this.config.ui.namespace.length)!==this.config.ui.namespace&&(n[0]=""+this.config.ui.namespace+n[0]);n[1].substring(0,this.config.ui.namespace.length)!==this.config.ui.namespace&&(n[1]=""+this.config.ui.namespace+n[1]);this.config.ui.flyout=n.join(" ")}},{key:"_collisionDetection",value:function(n,t){var r=this,i=this._getDimensions(n,t);this._adjustClasses(n,t,i);n.classList.contains("clicked")||(window.addEventListener("scroll",function(){return r._adjustClasses(n,i)}),window.addEventListener("resize",function(){return r._adjustClasses(n,i)}),n.classList.add("clicked"))}},{key:"_getDimensions",value:function(n,t){return{networksWidth:t.offsetWidth,buttonHeight:n.offsetHeight,buttonWidth:n.offsetWidth}}},{key:"_adjustClasses",value:function(n,t,i){var u=window.innerWidth,e=window.innerHeight,f=n.getBoundingClientRect().left+i.buttonWidth/2,o=u-f,s=n.getBoundingClientRect().top+i.buttonHeight/2,r=this._findLocation(f,s,u,e);if("middle"===r[1]&&"center"!==r[0]&&("left"===r[0]&&u<=f+220+i.buttonWidth/2||"right"===r[0]&&u<=o+220+i.buttonWidth/2))t.classList.add(this.config.ui.namespace+"top"),t.classList.remove(this.config.ui.namespace+"middle"),t.classList.remove(this.config.ui.namespace+"bottom");else{switch(r[0]){case"left":t.classList.add(this.config.ui.namespace+"right");t.classList.remove(this.config.ui.namespace+"center");t.classList.remove(this.config.ui.namespace+"left");break;case"center":"top"!==r[1]&&t.classList.add(this.config.ui.namespace+"top");t.classList.add(this.config.ui.namespace+"center");t.classList.remove(this.config.ui.namespace+"left");t.classList.remove(this.config.ui.namespace+"right");t.classList.remove(this.config.ui.namespace+"middle");break;case"right":t.classList.add(this.config.ui.namespace+"left");t.classList.remove(this.config.ui.namespace+"center");t.classList.remove(this.config.ui.namespace+"right")}switch(r[1]){case"top":t.classList.add(this.config.ui.namespace+"bottom");t.classList.remove(this.config.ui.namespace+"middle");"center"!==r[0]&&t.classList.remove(this.config.ui.namespace+"top");break;case"middle":"center"!==r[0]&&(t.classList.add(this.config.ui.namespace+"middle"),t.classList.remove(this.config.ui.namespace+"top"));t.classList.remove(this.config.ui.namespace+"bottom");break;case"bottom":t.classList.add(this.config.ui.namespace+"top");t.classList.remove(this.config.ui.namespace+"middle");t.classList.remove(this.config.ui.namespace+"bottom")}}}},{key:"_findLocation",value:function(n,t,i,r){var u=Math.trunc(3*(1-(i-n)/i)),f=Math.trunc(3*(1-(r-t)/r));return u>=3?u=2:-1>=u&&(u=0),f>=3?f=2:-1>=f&&(f=0),[["left","center","right"][u],["top","middle","bottom"][f]]}},{key:"_networkFacebook",value:function(n){return this.config.networks.facebook.loadSdk?window.FB?(this._updateHref(n,"https://www.facebook.com/sharer/sharer.php",{u:this.config.networks.facebook.url}),FB.ui({method:"feed",name:this.config.networks.facebook.title,link:this.config.networks.facebook.url,picture:this.config.networks.facebook.image,caption:this.config.networks.facebook.caption,description:this.config.networks.facebook.description})):console.error("The Facebook JS SDK hasn't loaded yet."):this._updateHref(n,"https://www.facebook.com/sharer/sharer.php",{u:this.config.networks.facebook.url})}},{key:"_networkTwitter",value:function(n){this._updateHref(n,"https://twitter.com/intent/tweet",{text:this.config.networks.twitter.description,url:this.config.networks.twitter.url})}},{key:"_networkGooglePlus",value:function(n){this._updateHref(n,"https://plus.google.com/share",{url:this.config.networks.googlePlus.url})}},{key:"_networkPinterest",value:function(n){this._updateHref(n,"https://www.pinterest.com/pin/create/button",{url:this.config.networks.pinterest.url,media:this.config.networks.pinterest.image,description:this.config.networks.pinterest.description})}},{key:"_networkLinkedin",value:function(n){this._updateHref(n,"https://www.linkedin.com/shareArticle",{mini:"true",url:this.config.networks.linkedin.url,title:this.config.networks.linkedin.title,summary:this.config.networks.linkedin.description})}},{key:"_networkEmail",value:function(n){this._updateHref(n,"mailto:",{subject:this.config.networks.email.title,body:this.config.networks.email.description})}},{key:"_networkReddit",value:function(n){this._updateHref(n,"http://www.reddit.com/submit",{url:this.config.networks.reddit.url,title:this.config.networks.reddit.title})}},{key:"_networkWhatsapp",value:function(n){this._updateHref(n,"whatsapp://send",{text:this.config.networks.whatsapp.description+" "+this.config.networks.whatsapp.url})}},{key:"_injectStylesheet",value:function(n){if(!this.el.head.querySelector("link[href='"+n+"']")){var t=document.createElement("link");t.setAttribute("rel","stylesheet");t.setAttribute("href",n);this.el.head.appendChild(t)}}},{key:"_injectHtml",value:function(n){var s=this.config.ui.networkOrder,u="",i=!0,f=!1,e=void 0,o,t,r;try{for(t=s[Symbol.iterator]();!(i=(o=t.next()).done);i=!0)r=o.value,u+="<li class='"+r+"' data-network='"+r+"'><a><\/a><\/li>"}catch(h){f=!0;e=h}finally{try{!i&&t["return"]&&t["return"]()}finally{if(f)throw e;}}n.innerHTML=this.config.ui.buttonText+"<div class='"+this.config.ui.namespace+"social load "+this.config.ui.flyout+"'><ul>"+u+"<\/ul><\/div>"}},{key:"_injectFacebookSdk",value:function(){var n,t;window.FB||!this.config.networks.facebook.appId||this.el.body.querySelector("#fb-root")||(n=document.createElement("script"),n.text="window.fbAsyncInit=function(){FB.init({appId:'"+this.config.networks.facebook.appId+"',status:true,xfbml:true})};(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if (e.getElementById(n)){return}r=e.createElement(t);r.id=n;r.src='//connect.facebook.net/en_US/all.js';i.parentNode.insertBefore(r,i)})(document,'script','facebook-jssdk');",t=document.createElement("div"),t.id="fb-root",this.el.body.appendChild(t),this.el.body.appendChild(n))}},{key:"_hook",value:function(n,t,i){var u=this.config.networks[t][n],r;"function"==typeof u&&(r=u.call(this.config.networks[t],i),void 0!==r&&(r=this._normalizeFilterConfigUpdates(r),this.extend(this.config.networks[t],r,!0),this._normalizeNetworkConfiguration()))}},{key:"_defaultTitle",value:function(){var n=void 0;return(n=document.querySelector('meta[property="og:title"]')||document.querySelector('meta[name="twitter:title"]'))?n.getAttribute("content"):(n=document.querySelector("title"))?n.textContent||n.innerText:void 0}},{key:"_defaultImage",value:function(){var n=void 0;if((n=document.querySelector('meta[property="og:image"]')||document.querySelector('meta[name="twitter:image"]')))return n.getAttribute("content")}},{key:"_defaultDescription",value:function(){var n=void 0;return(n=document.querySelector('meta[property="og:description"]')||document.querySelector('meta[name="twitter:description"]')||document.querySelector('meta[name="description"]'))?n.getAttribute("content"):""}},{key:"_detectNetworks",value:function(){var u=!0,e=!1,o=void 0,s,t,l,i,r;try{for(t=Object.keys(this.config.networks)[Symbol.iterator]();!(u=(s=t.next()).done);u=!0){var n=s.value,f=!0,h=!1,c=void 0;try{for(i=Object.keys(this.config.networks[n])[Symbol.iterator]();!(f=(l=i.next()).done);f=!0)r=l.value,null===this.config.networks[n][r]&&(this.config.networks[n][r]=this.config[r])}catch(a){h=!0;c=a}finally{try{!f&&i["return"]&&i["return"]()}finally{if(h)throw c;}}this.config.networks[n].enabled?(this["class"]="enabled",this.config.enabledNetworks+=1):this["class"]="disabled";this.config.networks[n]["class"]=this["class"]}}catch(a){e=!0;o=a}finally{try{!u&&t["return"]&&t["return"]()}finally{if(e)throw o;}}}},{key:"_normalizeNetworkConfiguration",value:function(){this.config.networks.facebook.appId||(this.config.networks.facebook.loadSdk=!1);this.config.networks.twitter.description&&(this._isEncoded(this.config.networks.twitter.description)||(this.config.networks.twitter.description=encodeURIComponent(this.config.networks.twitter.description)));"number"==typeof this.config.networks.facebook.appId&&(this.config.networks.facebook.appId=this.config.networks.facebook.appId.toString())}},{key:"_normalizeFilterConfigUpdates",value:function(n){return this.config.networks.facebook.appId!==n.appId&&(console.warn("You are unable to change the Facebook appId after the button has been initialized. Please update your Facebook filters accordingly."),delete n.appId),this.config.networks.facebook.loadSdk!==n.loadSdk&&(console.warn("You are unable to change the Facebook loadSdk option after the button has been initialized. Please update your Facebook filters accordingly."),delete n.appId),n}}]),t}(h["default"]);t.exports=r},{"./share-utils":38,"core-js/fn/array/iterator":1,"core-js/fn/math/trunc":2,"core-js/fn/symbol":3}],38:[function(n,t,i){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(i,"__esModule",{value:!0});var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),f=function(){function n(){r(this,n)}return u(n,[{key:"_getStyle",value:function(n,t){var i="";return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(n,"").getPropertyValue(t):n.currentStyle&&(t=t.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),i=n.currentStyle[t]),i}},{key:"_hide",value:function(n){n.style.display="none"}},{key:"_show",value:function(n){n.style.display="initial"}},{key:"_hasClass",value:function(n,t){return n.classList.contains(t)}},{key:"_addClass",value:function(n,t){n.classList.add(t)}},{key:"_removeClass",value:function(n,t){n.classList.remove(t)}},{key:"_isEncoded",value:function(n){return n=n.toRFC3986(),decodeURIComponent(n)!==n}},{key:"_encode",value:function(n){return"undefined"==typeof n||null===n||this._isEncoded(n)?encodeURIComponent(n):n.toRFC3986()}},{key:"_getUrl",value:function(n){var r=this,i=(arguments.length<=1||void 0===arguments[1]?!1:arguments[1],arguments.length<=2||void 0===arguments[2]?{}:arguments[2]),t=function(){var f=[],t=!0,e=!1,o=void 0,s,n,u,h;try{for(n=Object.keys(i)[Symbol.iterator]();!(t=(s=n.next()).done);t=!0)u=s.value,h=i[u],f.push(u+"="+r._encode(h))}catch(c){e=!0;o=c}finally{try{!t&&n["return"]&&n["return"]()}finally{if(e)throw o;}}return f.join("&")}();return t&&(t="?"+t),n+t}},{key:"_updateHref",value:function(n,t,i){var u=t.indexOf("mailto:")>=0,f=n.getElementsByTagName("a")[0],r;(f.setAttribute("href",this._getUrl(t,!u,i)),u||this.config.networks.facebook.loadSdk&&"facebook"===n.getAttribute("class"))||(r={width:500,height:350},r.top=screen.height/2-r.height/2,r.left=screen.width/2-r.width/2,window.open(f.href,"targetWindow","\n          toolbar=no,\n          location=no,\n          status=no,\n          menubar=no,\n          scrollbars=yes,\n          resizable=yes,\n          left="+r.left+",\n          top="+r.top+",\n          width="+r.width+",\n          height="+r.height+"\n        "))}},{key:"popup",value:function(n){var u=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],t={width:500,height:350},i;t.top=screen.height/2-t.height/2;t.left=screen.width/2-t.width/2;i=function(){var f=[],t=!0,e=!1,o=void 0,s,n,i,h;try{for(n=Object.keys(r)[Symbol.iterator]();!(t=(s=n.next()).done);t=!0)i=s.value,h=r[i],f.push(i+"="+u._encode(h))}catch(c){e=!0;o=c}finally{try{!t&&n["return"]&&n["return"]()}finally{if(e)throw o;}}return f.join("&")}();i&&(i="?"+i);window.open(n+i,"targetWindow","\n        toolbar=no,\n        location=no,\n        status=no,\n        menubar=no,\n        scrollbars=yes,\n        resizable=yes,\n        left="+t.left+",\n        top="+t.top+",\n        width="+t.width+",\n        height="+t.height+"\n      ")}},{key:"_merge",value:function(n){function t(){return n.apply(this,arguments)}return t.toString=function(){return n.toString()},t}(function(n,t){var i,r,u,f;"object"!=typeof n&&(n={});for(i in t)if(t.hasOwnProperty(i)){if(r=t[i],"object"==typeof r){n[i]=this._merge(n[i],r);continue}n[i]=r}for(u=2,f=arguments.length;f>u;u++)_merge(n,arguments[u]);return n})},{key:"_objToArray",value:function(n){var t=[];for(var i in n)"object"==typeof n[i]&&t.push(n[i]);return t}},{key:"_isMobile",value:function(){return navigator.userAgent.match(/Android|iPhone|PhantomJS/i)&&!navigator.userAgent.match(/iPod|iPad/i)?!0:!1}}]),n}();String.prototype.toRFC3986=function(){var n=encodeURIComponent(this);n.replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16)})};String.prototype.capFLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)};i["default"]=f;t.exports=i["default"]},{}]},{},[37])(37)}),typeof jQuery=="undefined")throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||t[0]==1&&t[1]==9&&t[2]<1||t[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){(n.support.transition=t(),n.support.transition)&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));typeof i=="string"&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;(u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,"")),r=n(u),i&&i.preventDefault(),r.length||(r=f.closest(".alert")),r.trigger(i=n.Event("close.bs.alert")),i.isDefaultPrevented())||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f=typeof i=="object"&&i;r||u.data("bs.button",r=new t(this,f));i=="toggle"?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.3.6";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,f=i.is("input")?"val":"html",u=i.data();t+="Text";u.resetText==null&&i.data("resetText",i[f]());setTimeout(n.proxy(function(){i[f](u[t]==null?this.options[t]:u[t]);t=="loadingText"?(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"),n.prop("type")=="radio"?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):n.prop("type")=="checkbox"&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target);r.hasClass("btn")||(r=r.closest(".btn"));i.call(r,"toggle");n(t.target).is('input[type="radio"]')||n(t.target).is('input[type="checkbox"]')||t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i),e=typeof i=="string"?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));typeof i=="number"?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));this.options.pause!="hover"||"ontouchstart"in document.documentElement||this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.3.6";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f=n=="prev"&&i===0||n=="next"&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r=n=="prev"?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f=i=="next"?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),this.$element.trigger(s),s.isDefaultPrevented())?void 0:(this.sliding=!0,l&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));typeof i=="string"&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.3.6";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!r||!r.length||(f=r.data("bs.collapse"),!f||!f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented())){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented())){if(i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},!n.support.transition)return u.call(this);this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&t.which===3||(n(o).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&t.type=="click"&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented())||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f))))}))}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));typeof i=="string"&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.6";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length)n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u);if(e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&t.which!=27||s&&t.which==27)return t.which==27&&o.find(i).trigger("focus"),e.trigger("click");(h=" li:not(.disabled):visible a",f=o.find(".dropdown-menu"+h),f.length)&&(u=f.index(t.target),t.which==38&&u>0&&u--,t.which==40&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),typeof i=="object"&&i);u||f.data("bs.modal",u=new t(this,e));typeof i=="string"?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.3.6";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});if(this.$element.trigger(u),!this.isShown&&!u.isDefaultPrevented()){this.isShown=!0;this.checkScrollbar();this.setScrollbar();this.$body.addClass("modal-open");this.escape();this.resize();this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this));this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})});this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)})}};t.prototype.hide=function(i){(i&&i.preventDefault(),i=n.Event("hide.bs.modal"),this.$element.trigger(i),this.isShown&&!i.isDefaultPrevented())&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){if(this.isShown&&this.options.keyboard)this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){n.which==27&&this.hide()},this));else this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){if(this.isShown)n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this));else n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){r=n.support.transition&&f;this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){if(this.ignoreBackdropClick){this.ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(this.options.backdrop=="static"?this.$element[0].focus():this.hide())},this));if(r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){if(!n.isDefaultPrevented())u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focusin";s=u=="hover"?"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&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusin"?"focus":"hover"]=!0),i.tip().hasClass("in")||i.hoverState=="in"){i.hoverState="in";return}if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusout"?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,a,f,v,o;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),y=this.getUID(this.type);this.setContent();r.attr("id",y);this.$element.attr("aria-describedby",y);this.options.animation&&r.addClass("fade");var i=typeof this.options.placement=="function"?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,p=/\s?auto?\s?/i,w=p.test(i);w&&(i=i.replace(p,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var e=this.getPosition(),s=r[0].offsetWidth,h=r[0].offsetHeight;w&&(a=i,f=this.getPosition(this.$viewport),i=i=="bottom"&&e.bottom+h>f.bottom?"top":i=="top"&&e.top-h<f.top?"bottom":i=="right"&&e.right+s>f.width?"left":i=="left"&&e.left-s<f.left?"right":i,r.removeClass(a).addClass(i));v=this.getCalculatedOffset(i,e,s,h);this.applyPlacement(v,i);o=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;n=="out"&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;i=="top"&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?u.left*2-l+h:u.top*2-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){u.hoverState!="in"&&r.detach();u.$element.removeAttr("aria-describedby").trigger("hidden.bs."+u.type);i&&i()}var u=this,r=n(this.$tip),e=n.Event("hide.bs."+this.type);if(this.$element.trigger(e),!e.isDefaultPrevented())return r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var u=t[0],r=u.tagName=="BODY",i=u.getBoundingClientRect();i.width==null&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=r?{top:0,left:0}:t.offset(),e={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},o=r?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,e,o,f)};t.prototype.getCalculatedOffset=function(n,t,i,r){return n=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-i/2}:n=="top"?{top:t.top-r,left:t.left+t.width/2-i/2}:n=="left"?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.6";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?typeof t=="string"?"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")||(typeof n.content=="function"?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(i).is(document.body)?n(window):n(i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f=typeof i=="object"&&i;r||u.data("bs.scrollspy",r=new t(this,f));typeof i=="string"&&r[i]()})}t.VERSION="3.3.6";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget,n;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(t[n+1]===undefined||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));typeof i=="string"&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.3.6";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);o?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f=typeof i=="object"&&i;r||u.data("bs.affix",r=new t(this,f));typeof i=="string"&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.3.6";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(i!=null&&this.affixed=="top")return u<i?"top":!1;if(this.affixed=="bottom")return i!=null?u+this.unpin<=f.top?!1:"bottom":u+e<=n-r?!1:"bottom";var o=this.affixed==null,s=o?u:f.top,h=o?e:t;return i!=null&&u<=i?"top":r!=null&&s+h>=n-r?"bottom":!1};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,f,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,e=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if(typeof r!="object"&&(u=e=r),typeof e=="function"&&(e=r.top(this.$element)),typeof u=="function"&&(u=r.bottom(this.$element)),i=this.getState(h,s,e,u),this.affixed!=i){if(this.unpin!=null&&this.$element.css("top",""),f="affix"+(i?"-"+i:""),o=n.Event(f+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin=i=="bottom"?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(f).trigger(f.replace("affix","affixed")+".bs.affix")}i=="bottom"&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};t.offsetBottom!=null&&(t.offset.bottom=t.offsetBottom);t.offsetTop!=null&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery)