function getColor(n,t,i,r,u){var c,y,e,w,b,k,d,s,h,g,p,l,a,v,r=r||u.length>0,f,o;if(u.length>0)for(f=0;f<u.length;f++)if(n>u[f].lo&&n<=u[f].hi)return u[f].color;if(c=i.length,c===1)return i[0];for(y=r?1/c:1/(c-1),e=[],f=0;f<i.length;f++)w=r?y*(f+1):y*f,b=parseInt(cutHex(i[f]).substring(0,2),16),k=parseInt(cutHex(i[f]).substring(2,4),16),d=parseInt(cutHex(i[f]).substring(4,6),16),e[f]={pct:w,color:{r:b,g:k,b:d}};if(t===0)return"rgb("+[e[0].color.r,e[0].color.g,e[0].color.b].join(",")+")";for(o=0;o<e.length;o++)if(t<=e[o].pct)return r?"rgb("+[e[o].color.r,e[o].color.g,e[o].color.b].join(",")+")":(s=e[o-1],h=e[o],g=h.pct-s.pct,p=(t-s.pct)/g,l=1-p,a=p,v={r:Math.floor(s.color.r*l+h.color.r*a),g:Math.floor(s.color.g*l+h.color.g*a),b:Math.floor(s.color.b*l+h.color.b*a)},"rgb("+[v.r,v.g,v.b].join(",")+")")}function setDy(n){(!ie||ie>9)&&n.node.firstChild.attributes.dy&&(n.node.firstChild.attributes.dy.value=0)}function getRandomInt(n,t){return Math.floor(Math.random()*(t-n+1))+n}function cutHex(n){return n.charAt(0)=="#"?n.substring(1,7):n}function humanFriendlyNumber(n,t){var r,u,i,f;for(r=Math.pow,u=r(10,t),i=7;i;)f=r(10,i--*3),f<=n&&(n=Math.round(n*u/f)/u+"KMGTPE"[i]);return n}function formatNumber(n){var t=n.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}function getStyle(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}function onCreateElementNsReady(n){document.createElementNS!==undefined?n():setTimeout(function(){onCreateElementNsReady(n)},100)}var querystring,ie;(function(n,t){function gt(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||"function"!==r&&(0===t||"number"==typeof t&&t>0&&t-1 in n)}function te(n){var t=ni[n]={};return i.each(n.match(s)||[],function(n,i){t[i]=!0}),t}function ur(n,r,u,f){if(i.acceptData(n)){var h,o,c=i.expando,l=n.nodeType,s=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&s[e]&&(f||s[e].data)||u!==t||"string"!=typeof r)return e||(e=l?n[c]=b.pop()||i.guid++:c),s[e]||(s[e]=l?{}:{toJSON:i.noop}),("object"==typeof r||"function"==typeof r)&&(f?s[e]=i.extend(s[e],r):s[e].data=i.extend(s[e].data,r)),o=s[e],f||(o.data||(o.data={}),o=o.data),u!==t&&(o[i.camelCase(r)]=u),"string"==typeof r?(h=o[r],null==h&&(h=o[i.camelCase(r)])):h=o,h}}function fr(n,t,r){if(i.acceptData(n)){var e,o,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in e)?t=[t]:(t=i.camelCase(t),t=t in e?[t]:t.split(" ")),o=t.length;o--;)delete e[t[o]];if(r?!ti(e):!i.isEmptyObject(e))return}(r||(delete u[f].data,ti(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}}function er(n,r,u){if(u===t&&1===n.nodeType){var f="data-"+r.replace(rr,"-$1").toLowerCase();if(u=n.getAttribute(f),"string"==typeof u){try{u="true"===u?!0:"false"===u?!1:"null"===u?null:+u+""===u?+u:ir.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function ti(n){var t;for(t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function ct(){return!0}function g(){return!1}function cr(){try{return r.activeElement}catch(n){}}function ar(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function fi(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(oe.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}function vr(n){var i=yr.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function gr(n,t){return i.nodeName(n,"table")&&i.nodeName(1===t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function nu(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function tu(n){var t=ye.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function hi(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function iu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle,r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function be(n,t){var r,f,u;if(1===t.nodeType){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}"script"===r&&t.text!==n.text?(nu(t).text=n.text,tu(t)):"object"===r?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===r&&oi.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===r?t.defaultSelected=t.selected=n.defaultSelected:("input"===r||"textarea"===r)&&(t.defaultValue=n.defaultValue)}}function u(n,r){var s,e,h=0,f=typeof n.getElementsByTagName!==o?n.getElementsByTagName(r||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],s=n.childNodes||n;null!=(e=s[h]);h++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function ke(n){oi.test(n.type)&&(n.defaultChecked=n.checked)}function ou(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=eu.length;i--;)if(t=eu[i]+r,t in n)return t;return u}function ut(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)}function su(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&ut(r)&&(e[u]=i._data(r,"olddisplay",au(r.nodeName)))):e[u]||(o=ut(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function hu(n,t,i){var r=to.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+p[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+p[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function lu(n,t,r){var e=!0,u="width"===t?n.offsetWidth:n.offsetHeight,f=v(n),o=i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f);if(0>=u||null==u){if(u=y(n,t,f),(0>u||null==u)&&(u=n.style[t]),lt.test(u))return u;e=o&&(i.support.boxSizingReliable||u===n.style[t]),u=parseFloat(u)||0}return u+cu(n,t,r||(o?"border":"content"),e,f)+"px"}function au(n){var u=r,t=uu[n];return t||(t=vu(n,u),"none"!==t&&t||(rt=(rt||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(rt[0].contentWindow||rt[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=vu(n,u),rt.detach()),uu[n]=t),t}function vu(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function li(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||fo.test(n)?u(n,i):li(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)li(n+"["+f+"]",t[f],r,u)}function gu(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(s)||[];if(i.isFunction(r))while(u=e[f++])"+"===u[0]?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function nf(n,r,u,f){function o(h){var c;return e[h]=!0,i.each(n[h]||[],function(n,i){var h=i(r,u,f);return"string"!=typeof h||s||e[h]?s?!(c=h):t:(r.dataTypes.unshift(h),o(h),!1)}),c}var e={},s=n===yi;return o(r.dataTypes[0])||!e["*"]&&o("*")}function pi(n,r){var f,u,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function vo(n,i,r){for(var s,o,f,e,h=n.contents,u=n.dataTypes;"*"===u[0];)u.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(e in h)if(h[e]&&h[e].test(o)){u.unshift(e);break}if(u[0]in r)f=u[0];else{for(e in r){if(!u[0]||n.converters[e+" "+u[0]]){f=e;break}s||(s=e)}f=f||s}return f?(f!==u[0]&&u.unshift(f),r[f]):t}function yo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function rf(){try{return new n.XMLHttpRequest}catch(t){}}function po(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function ff(){return setTimeout(function(){it=t}),it=i.now()}function ef(n,t,i){for(var u,f=(ft[t]||[]).concat(ft["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function of(n,t,r){var h,e,o=0,l=pt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=it||ff(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:it||ff(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(ko(s,u.opts.specialEasing);l>o;o++)if(h=pt[o].call(u,n,s,u.opts))return h;return i.map(s,ef,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function ko(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u),delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function go(n,t,r){var u,a,v,c,e,y,s=this,l={},o=n.style,h=n.nodeType&&ut(n),f=i._data(n,"fxshow");r.queue||(e=i._queueHooks(n,"fx"),null==e.unqueued&&(e.unqueued=0,y=e.empty.fire,e.empty.fire=function(){e.unqueued||y()}),e.unqueued++,s.always(function(){s.always(function(){e.unqueued--,i.queue(n,"fx").length||e.empty.fire()})})),1===n.nodeType&&("height"in t||"width"in t)&&(r.overflow=[o.overflow,o.overflowX,o.overflowY],"inline"===i.css(n,"display")&&"none"===i.css(n,"float")&&(i.support.inlineBlockNeedsLayout&&"inline"!==au(n.nodeName)?o.zoom=1:o.display="inline-block")),r.overflow&&(o.overflow="hidden",i.support.shrinkWrapBlocks||s.always(function(){o.overflow=r.overflow[0],o.overflowX=r.overflow[1],o.overflowY=r.overflow[2]}));for(u in t)if(a=t[u],wo.exec(a)){if(delete t[u],v=v||"toggle"===a,a===(h?"hide":"show"))continue;l[u]=f&&f[u]||i.style(n,u)}if(!i.isEmptyObject(l)){f?"hidden"in f&&(h=f.hidden):f=i._data(n,"fxshow",{}),v&&(f.hidden=!h),h?i(n).show():s.done(function(){i(n).hide()}),s.done(function(){var t;i._removeData(n,"fxshow");for(t in l)i.style(n,t,l[t])});for(u in l)c=ef(h?f[u]:0,u,s),u in f||(f[u]=c.start,h&&(c.end=c.start,c.start="width"===u||"height"===u?1:0))}}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function wt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function sf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var et,bi,o=typeof t,hf=n.location,r=n.document,ki=r.documentElement,cf=n.jQuery,lf=n.$,ot={},b=[],bt="1.10.2",di=b.concat,kt=b.push,l=b.slice,gi=b.indexOf,af=ot.toString,k=ot.hasOwnProperty,dt=bt.trim,i=function(n,t){return new i.fn.init(n,t,bi)},st=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,s=/\S+/g,vf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,yf=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,nr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pf=/^[\],:{}\s]*$/,wf=/(?:^|:|,)(?:\s*\[)+/g,bf=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,kf=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,df=/^-ms-/,gf=/-([\da-z])/gi,ne=function(n,t){return t.toUpperCase()},h=function(n){(r.addEventListener||"load"===n.type||"complete"===r.readyState)&&(tr(),i.ready())},tr=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",h,!1),n.removeEventListener("load",h,!1)):(r.detachEvent("onreadystatechange",h),n.detachEvent("onload",h))},ni,ir,rr,wi,at,nt,tt,tf,vt;i.fn=i.prototype={jquery:bt,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if("string"==typeof n){if(e="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:yf.exec(n),!e||!e[1]&&u)return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n);if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),nr.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1,this[0]=o}return this.context=r,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null==n?this.toArray():0>n?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:kt,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var u,o,r,e,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for("boolean"==typeof n&&(c=n,n=arguments[1]||{},f=2),"object"==typeof n||i.isFunction(n)||(n={}),l===f&&(n=this,--f);l>f;f++)if(null!=(s=arguments[f]))for(e in s)u=n[e],r=s[e],n!==r&&(c&&r&&(i.isPlainObject(r)||(o=i.isArray(r)))?(o?(o=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n},i.extend({expando:"jQuery"+(bt+Math.random()).replace(/\D/g,""),noConflict:function(t){return n.$===i&&(n.$=lf),t&&n.jQuery===i&&(n.jQuery=cf),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);i.isReady=!0,n!==!0&&--i.readyWait>0||(et.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ot[af.call(n)]||"object":typeof n},isPlainObject:function(n){var r;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!k.call(n,"constructor")&&!k.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(i.support.ownLast)for(r in n)return k.call(n,r);for(r in n);return r===t||k.call(n,r)},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},error:function(n){throw Error(n);},parseHTML:function(n,t,u){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(u=t,t=!1),t=t||r;var f=nr.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(r){return n.JSON&&n.JSON.parse?n.JSON.parse(r):null===r?r:"string"==typeof r&&(r=i.trim(r),r&&pf.test(r.replace(bf,"@").replace(kf,"]").replace(wf,"")))?Function("return "+r)():(i.error("Invalid JSON: "+r),t)},parseXML:function(r){var u,f;if(!r||"string"!=typeof r)return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(df,"ms-").replace(gf,ne)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=gt(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:dt&&!dt.call("﻿ ")?function(n){return null==n?"":dt.call(n)}:function(n){return null==n?"":(n+"").replace(vf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(gt(Object(n))?i.merge(r,"string"==typeof n?[n]:n):kt.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(gi)return gi.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if("number"==typeof f)for(;f>r;r++)n[u++]=i[r];else while(i[r]!==t)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;e>r;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=gt(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),null!=u&&(f[f.length]=u);return di.apply([],f)},guid:1,proxy:function(n,r){var f,u,e;return"string"==typeof r&&(e=n[r],r=n,n=e),i.isFunction(n)?(f=l.call(arguments,2),u=function(){return n.apply(r||this,f.concat(l.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u):t},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=null==u;if("object"===i.type(u)){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;l>h;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return+new Date},swap:function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f}}),i.ready.promise=function(t){if(!et)if(et=i.Deferred(),"complete"===r.readyState)setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",h,!1),n.addEventListener("load",h,!1);else{r.attachEvent("onreadystatechange",h),n.attachEvent("onload",h);var u=!1;try{u=null==n.frameElement&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}tr(),i.ready()}}()}return et.promise(t)},i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ot["[object "+t+"]"]=t.toLowerCase()}),bi=i(r),function(n,t){function u(n,t,i,r){var p,u,f,l,w,a,k,c,g,d;if((t?t.ownerDocument||t:y)!==s&&nt(t),t=t||s,i=i||[],!n||"string"!=typeof n)return i;if(1!==(l=t.nodeType)&&9!==l)return[];if(v&&!r){if(p=or.exec(n))if(f=p[1]){if(9===l){if(u=t.getElementById(f),!u||!u.parentNode)return i;if(u.id===f)return i.push(u),i}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&ot(t,u)&&u.id===f)return i.push(u),i}else{if(p[2])return b.apply(i,t.getElementsByTagName(n)),i;if((f=p[3])&&e.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(f)),i}if(e.qsa&&(!h||!h.test(n))){if(c=k=o,g=t,d=9===l&&n,1===l&&"object"!==t.nodeName.toLowerCase()){for(a=pt(n),(k=t.getAttribute("id"))?c=k.replace(cr,"\\$&"):t.setAttribute("id",c),c="[id='"+c+"'] ",w=a.length;w--;)a[w]=c+wt(a[w]);g=ti.test(n)&&t.parentNode||t,d=a.join(",")}if(d)try{return b.apply(i,g.querySelectorAll(d)),i}catch(tt){}finally{k||t.removeAttribute("id")}}}return pr(n.replace(vt,"$1"),t,i,r)}function ri(){function n(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}var t=[];return n}function c(n){return n[o]=!0,n}function l(n){var t=s.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ui(n,t){for(var u=n.split("|"),i=n.length;i--;)r.attrHandle[u[i]]=t}function bi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||vi)-(~n.sourceIndex||vi);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function rt(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ki(){}function pt(n,t){var e,f,s,o,i,h,c,l=li[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],c=r.preFilter;i;){(!e||(f=ir.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(s=[])),e=!1,(f=rr.exec(i))&&(e=f.shift(),s.push({value:e,type:f[0].replace(vt," ")}),i=i.slice(e.length));for(o in r.filter)(f=yt[o].exec(i))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):li(n,h).slice(0)}function wt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function fi(n,t,i){var r=t.dir,u=i&&"parentNode"===r,f=di++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,e){var h,s,c,l=p+" "+f;if(e){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,e))return!0}else while(t=t[r])if(1===t.nodeType||u)if(c=t[o]||(t[o]={}),(s=c[r])&&s[0]===l){if((h=s[1])===!0||h===ht)return h===!0}else if(s=c[r]=[l],s[1]=n(t,i,e)||ht,s[1]===!0)return!0}}function ei(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function bt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function oi(n,t,i,r,u,f){return r&&!r[o]&&(r=oi(r)),u&&!u[o]&&(u=oi(u,f)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||yr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:bt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=bt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?it.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=bt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function si(n){for(var s,u,i,e=n.length,h=r.relative[n[0].type],c=h||r.relative[" "],t=h?1:0,l=fi(function(n){return n===s},c,!0),a=fi(function(n){return it.call(s,n)>-1},c,!0),f=[function(n,t,i){return!h&&(i||t!==lt)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];e>t;t++)if(u=r.relative[n[t].type])f=[fi(ei(f),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[o]){for(i=++t;e>i;i++)if(r.relative[n[i].type])break;return oi(t>1&&ei(f),t>1&&wt(n.slice(0,t-1).concat({value:" "===n[t-2].type?"*":""})).replace(vt,"$1"),u,i>t&&si(n.slice(t,i)),e>i&&si(n=n.slice(i)),e>i&&wt(n))}f.push(u)}return ei(f)}function vr(n,t){var f=0,i=t.length>0,e=n.length>0,o=function(o,h,c,l,a){var y,g,k,w=[],d=0,v="0",nt=o&&[],tt=null!=a,it=lt,ut=o||e&&r.find.TAG("*",a&&h.parentNode||h),rt=p+=null==it?1:Math.random()||.1;for(tt&&(lt=h!==s&&h,ht=f);null!=(y=ut[v]);v++){if(e&&y){for(g=0;k=n[g++];)if(k(y,h,c)){l.push(y);break}tt&&(p=rt,ht=++f)}i&&((y=!k&&y)&&d--,o&&nt.push(y))}if(d+=v,i&&v!==d){for(g=0;k=t[g++];)k(nt,w,h,c);if(o){if(d>0)while(v--)nt[v]||w[v]||(w[v]=nr.call(l));w=bt(w)}b.apply(l,w),tt&&!o&&w.length>0&&d+t.length>1&&u.uniqueSort(l)}return tt&&(p=rt,lt=it),nt};return i?c(o):o}function yr(n,t,i){for(var r=0,f=t.length;f>r;r++)u(n,t[r],i);return i}function pr(n,t,i,u){var s,f,o,c,l,h=pt(n);if(!u&&1===h.length){if(f=h[0]=h[0].slice(0),f.length>2&&"ID"===(o=f[0]).type&&e.getById&&9===t.nodeType&&v&&r.relative[f[1].type]){if(t=(r.find.ID(o.matches[0].replace(k,d),t)||[])[0],!t)return i;n=n.slice(f.shift().value.length)}for(s=yt.needsContext.test(n)?0:f.length;s--;){if(o=f[s],r.relative[c=o.type])break;if((l=r.find[c])&&(u=l(o.matches[0].replace(k,d),ti.test(f[0].type)&&t.parentNode||t))){if(f.splice(s,1),n=u.length&&wt(f),!n)return b.apply(i,u),i;break}}}return kt(n,h)(u,t,!v,i,ti.test(n)),i}var ut,e,ht,r,ct,hi,kt,lt,g,nt,s,a,v,h,tt,at,ot,o="sizzle"+-new Date,y=n.document,p=0,di=0,ci=ri(),li=ri(),ai=ri(),ft=!1,dt=function(n,t){return n===t?(ft=!0,0):0},st=typeof t,vi=-2147483648,gi={}.hasOwnProperty,w=[],nr=w.pop,tr=w.push,b=w.push,yi=w.slice,it=w.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},gt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",f="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",pi=et.replace("w","w#"),wi="\\["+f+"*("+et+")"+f+"*(?:([*^$|!~]?=)"+f+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+pi+")|)|)"+f+"*\\]",ni=":("+et+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+wi.replace(3,8)+")*)|.*)\\)|)",vt=RegExp("^"+f+"+|((?:^|[^\\\\])(?:\\\\.)*)"+f+"+$","g"),ir=RegExp("^"+f+"*,"+f+"*"),rr=RegExp("^"+f+"*([>+~]|"+f+")"+f+"*"),ti=RegExp(f+"*[+~]"),ur=RegExp("="+f+"*([^\\]'\"]*)"+f+"*\\]","g"),fr=RegExp(ni),er=RegExp("^"+pi+"$"),yt={ID:RegExp("^#("+et+")"),CLASS:RegExp("^\\.("+et+")"),TAG:RegExp("^("+et.replace("w","w*")+")"),ATTR:RegExp("^"+wi),PSEUDO:RegExp("^"+ni),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+f+"*(even|odd|(([+-]|)(\\d*)n|)"+f+"*(?:([+-]|)"+f+"*(\\d+)|))"+f+"*\\)|)","i"),bool:RegExp("^(?:"+gt+")$","i"),needsContext:RegExp("^"+f+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+f+"*((?:-\\d)?\\d*)"+f+"*\\)|)(?=[^-]|$)","i")},ii=/^[^{]+\{\s*\[native \w/,or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,cr=/'|\\/g,k=RegExp("\\\\([\\da-f]{1,6}"+f+"?|("+f+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{b.apply(w=yi.call(y.childNodes),y.childNodes),w[y.childNodes.length].nodeType}catch(wr){b={apply:w.length?function(n,t){tr.apply(n,yi.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}hi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1},e=u.support={},nt=u.setDocument=function(n){var i=n?n.ownerDocument||n:y,u=i.defaultView;return i!==s&&9===i.nodeType&&i.documentElement?(s=i,a=i.documentElement,v=!hi(i),u&&u.attachEvent&&u!==u.top&&u.attachEvent("onbeforeunload",function(){nt()}),e.attributes=l(function(n){return n.className="i",!n.getAttribute("className")}),e.getElementsByTagName=l(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),e.getElementsByClassName=l(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",2===n.getElementsByClassName("i").length}),e.getById=l(function(n){return a.appendChild(n).id=o,!i.getElementsByName||!i.getElementsByName(o).length}),e.getById?(r.find.ID=function(n,t){if(typeof t.getElementById!==st&&v){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==st&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=e.getElementsByTagName?function(n,i){return typeof i.getElementsByTagName!==st?i.getElementsByTagName(n):t}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},r.find.CLASS=e.getElementsByClassName&&function(n,i){return typeof i.getElementsByClassName!==st&&v?i.getElementsByClassName(n):t},tt=[],h=[],(e.qsa=ii.test(i.querySelectorAll))&&(l(function(n){n.innerHTML="<select><option selected=''><\/option><\/select>",n.querySelectorAll("[selected]").length||h.push("\\["+f+"*(?:value|"+gt+")"),n.querySelectorAll(":checked").length||h.push(":checked")}),l(function(n){var t=i.createElement("input");t.setAttribute("type","hidden"),n.appendChild(t).setAttribute("t",""),n.querySelectorAll("[t^='']").length&&h.push("[*^$]="+f+"*(?:''|\"\")"),n.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),n.querySelectorAll("*,:x"),h.push(",.*:")})),(e.matchesSelector=ii.test(at=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&l(function(n){e.disconnectedMatch=at.call(n,"div"),at.call(n,"[s!='']:x"),tt.push("!=",ni)}),h=h.length&&RegExp(h.join("|")),tt=tt.length&&RegExp(tt.join("|")),ot=ii.test(a.contains)||a.compareDocumentPosition?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},dt=a.compareDocumentPosition?function(n,t){if(n===t)return ft=!0,0;var r=t.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(t);return r?1&r||!e.sortDetached&&t.compareDocumentPosition(n)===r?n===i||ot(y,n)?-1:t===i||ot(y,t)?1:g?it.call(g,n)-it.call(g,t):0:4&r?-1:1:n.compareDocumentPosition?-1:1}:function(n,t){var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(n===t)return ft=!0,0;if(!o||!s)return n===i?-1:t===i?1:o?-1:s?1:g?it.call(g,n)-it.call(g,t):0;if(o===s)return bi(n,t);for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?bi(f[u],e[u]):f[u]===y?-1:e[u]===y?1:0},i):s},u.matches=function(n,t){return u(n,null,null,t)},u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&nt(n),t=t.replace(ur,"='$1']"),!(!e.matchesSelector||!v||tt&&tt.test(t)||h&&h.test(t)))try{var i=at.call(n,t);if(i||e.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(r){}return u(t,s,null,[n]).length>0},u.contains=function(n,t){return(n.ownerDocument||n)!==s&&nt(n),ot(n,t)},u.attr=function(n,i){(n.ownerDocument||n)!==s&&nt(n);var f=r.attrHandle[i.toLowerCase()],u=f&&gi.call(r.attrHandle,i.toLowerCase())?f(n,i,!v):t;return u===t?e.attributes||!v?n.getAttribute(i):(u=n.getAttributeNode(i))&&u.specified?u.value:null:u},u.error=function(n){throw Error("Syntax error, unrecognized expression: "+n);},u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ft=!e.detectDuplicates,g=!e.sortStable&&n.slice(0),n.sort(dt),ft){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return n},ct=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ct(n)}else if(3===t||4===t)return n.nodeValue}else for(;r=n[u];u++)i+=ct(r);return i},r=u.selectors={cacheLength:50,createPseudo:c,match:yt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[4]||n[5]||"").replace(k,d),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var r,i=!n[5]&&n[2];return yt.CHILD.test(n[0])?null:(n[3]&&n[4]!==t?n[2]=n[4]:i&&fr.test(i)&&(r=pt(i,!0))&&(r=i.indexOf(")",i.length-r)-i.length)&&(n[0]=n[0].slice(0,r),n[2]=i.slice(0,r)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=ci[n+" "];return t||(t=RegExp("(^|"+f+")"+n+"("+f+"|$)"))&&ci(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!==st&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),e="last"!==n.slice(-4),f="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,v,w,b=s!==e?"nextSibling":"previousSibling",y=t.parentNode,g=f&&t.nodeName.toLowerCase(),d=!h&&!f;if(y){if(s){while(b){for(c=t;c=c[b];)if(f?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[e?y.firstChild:y.lastChild],e&&d){for(k=y[o]||(y[o]={}),a=k[n]||[],v=a[0]===p&&a[1],l=a[0]===p&&a[2],c=v&&y.childNodes[v];c=++v&&c&&c[b]||(l=v=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[p,v,l];break}}else if(d&&(a=(t[o]||(t[o]={}))[n])&&a[0]===p)l=a[1];else while(c=++v&&c&&c[b]||(l=v=0)||w.pop())if((f?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[o]||(c[o]={}))[n]=[p,l]),c===t))break;return l-=u,l===r||0==l%r&&l/r>=0}}},PSEUDO:function(n,t){var f,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[o]?i(t):i.length>1?(f=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=it.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,f)}):i}},pseudos:{not:c(function(n){var i=[],r=[],t=kt(n.replace(vt,"$1"));return t[o]?c(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:c(function(n){return function(t){return u(n,t).length>0}}),contains:c(function(n){return function(t){return(t.textContent||t.innerText||ct(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===a},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||3===n.nodeType||4===n.nodeType)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||t.toLowerCase()===n.type)},first:rt(function(){return[0]}),last:rt(function(n,t){return[t-1]}),eq:rt(function(n,t,i){return[0>i?i+t:i]}),even:rt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:rt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:rt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:rt(function(n,t,i){for(var r=0>i?i+t:i;t>++r;)n.push(r);return n})}},r.pseudos.nth=r.pseudos.eq;for(ut in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[ut]=lr(ut);for(ut in{submit:!0,reset:!0})r.pseudos[ut]=ar(ut);ki.prototype=r.filters=r.pseudos,r.setFilters=new ki,kt=u.compile=function(n,t){var r,u=[],f=[],i=ai[n+" "];if(!i){for(t||(t=pt(n)),r=t.length;r--;)i=si(t[r]),i[o]?u.push(i):f.push(i);i=ai(n,vr(f,u))}return i},e.sortStable=o.split("").sort(dt).join("")===o,e.detectDuplicates=ft,nt(),e.sortDetached=l(function(n){return 1&n.compareDocumentPosition(s.createElement("div"))}),l(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ui("type|href|height|width",function(n,i,r){return r?t:n.getAttribute(i,"type"===i.toLowerCase()?1:2)}),e.attributes&&l(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ui("value",function(n,i,r){return r||"input"!==n.nodeName.toLowerCase()?t:n.defaultValue}),l(function(n){return null==n.getAttribute("disabled")})||ui(gt,function(n,i,r){var u;return r?t:(u=n.getAttributeNode(i))&&u.specified?u.value:n[i]===!0?i.toLowerCase():null}),i.find=u,i.expr=u.selectors,i.expr[":"]=i.expr.pseudos,i.unique=u.uniqueSort,i.text=u.getText,i.isXMLDoc=u.isXML,i.contains=u.contains}(n),ni={},i.Callbacks=function(n){n="string"==typeof n?ni[n]||te(n):i.extend({},n);var s,f,c,e,o,l,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,o=l||0,l=0,e=r.length,s=!0;r&&e>o;o++)if(r[o].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}s=!1,r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);"function"===e?n.unique&&h.has(f)||r.push(f):f&&f.length&&"string"!==e&&u(f)})})(arguments),s?e=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),s&&(e>=u&&e--,o>=u&&o--)}),this},has:function(n){return n?i.inArray(n,r)>-1:!(!r||!r.length)},empty:function(){return r=[],e=0,this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return!r||c&&!u||(t=t||[],t=[n,t.slice?t.slice():t],s?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h},i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})}),n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add,o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock),t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this},t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this,i[n]=arguments.length>1?l.call(arguments):r,i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=Array(r),c=Array(r),s=Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}}),i.support=function(t){var a,e,f,h,c,l,v,y,s,u=r.createElement("div");if(u.setAttribute("className","t"),u.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",a=u.getElementsByTagName("*")||[],e=u.getElementsByTagName("a")[0],!e||!e.style||!a.length)return t;h=r.createElement("select"),l=h.appendChild(r.createElement("option")),f=u.getElementsByTagName("input")[0],e.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==u.className,t.leadingWhitespace=3===u.firstChild.nodeType,t.tbody=!u.getElementsByTagName("tbody").length,t.htmlSerialize=!!u.getElementsByTagName("link").length,t.style=/top/.test(e.getAttribute("style")),t.hrefNormalized="/a"===e.getAttribute("href"),t.opacity=/^0.5/.test(e.style.opacity),t.cssFloat=!!e.style.cssFloat,t.checkOn=!!f.value,t.optSelected=l.selected,t.enctype=!!r.createElement("form").enctype,t.html5Clone="<:nav><\/:nav>"!==r.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,f.checked=!0,t.noCloneChecked=f.cloneNode(!0).checked,h.disabled=!0,t.optDisabled=!l.disabled;try{delete u.test}catch(p){t.deleteExpando=!1}f=r.createElement("input"),f.setAttribute("value",""),t.input=""===f.getAttribute("value"),f.value="t",f.setAttribute("type","radio"),t.radioValue="t"===f.value,f.setAttribute("checked","t"),f.setAttribute("name","t"),c=r.createDocumentFragment(),c.appendChild(f),t.appendChecked=f.checked,t.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){t.noCloneEvent=!1}),u.cloneNode(!0).click());for(s in{submit:!0,change:!0,focusin:!0})u.setAttribute(v="on"+s,"t"),t[s+"Bubbles"]=v in n||u.attributes[v].expando===!1;u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===u.style.backgroundClip;for(s in i(t))break;return t.ownLast="0"!==s,i(function(){var h,e,f,c="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=r.getElementsByTagName("body")[0];s&&(h=r.createElement("div"),h.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(h).appendChild(u),u.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",f=u.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",y=0===f[0].offsetHeight,f[0].style.display="",f[1].style.display="none",t.reliableHiddenOffsets=y&&0===f[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",i.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===u.offsetWidth}),n.getComputedStyle&&(t.pixelPosition="1%"!==(n.getComputedStyle(u,null)||{}).top,t.boxSizingReliable="4px"===(n.getComputedStyle(u,null)||{width:"4px"}).width,e=u.appendChild(r.createElement("div")),e.style.cssText=u.style.cssText=c,e.style.marginRight=e.style.width="0",u.style.width="1px",t.reliableMarginRight=!parseFloat((n.getComputedStyle(e,null)||{}).marginRight)),typeof u.style.zoom!==o&&(u.innerHTML="",u.style.cssText=c+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="<div><\/div>",u.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==u.offsetWidth,t.inlineBlockNeedsLayout&&(s.style.zoom=1)),s.removeChild(h),h=u=f=e=null)}),a=h=c=l=e=f=null,t}({}),ir=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,rr=/([A-Z])/g,i.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ti(n)},data:function(n,t,i){return ur(n,t,i)},removeData:function(n,t){return fr(n,t)},_data:function(n,t,i){return ur(n,t,i,!0)},_removeData:function(n,t){return fr(n,t,!0)},acceptData:function(n){if(n.nodeType&&1!==n.nodeType&&9!==n.nodeType)return!1;var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}}),i.fn.extend({data:function(n,r){var e,f,o=null,s=0,u=this[0];if(n===t){if(this.length&&(o=i.data(u),1===u.nodeType&&!i._data(u,"parsedAttrs"))){for(e=u.attributes;e.length>s;s++)f=e[s].name,0===f.indexOf("data-")&&(f=i.camelCase(f.slice(5)),er(u,f,o[f]));i._data(u,"parsedAttrs",!0)}return o}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,r)}):u?er(u,n,i.data(u,n)):null},removeData:function(n){return this.each(function(){i.removeData(this,n)})}}),i.extend({queue:function(n,r,u){var f;return n?(r=(r||"fx")+"queue",f=i._data(n,r),u&&(!f||i.isArray(u)?f=i._data(n,r,i.makeArray(u)):f.push(u)),f||[]):t},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--),u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f)),!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue"),i._removeData(n,r)})})}}),i.fn.extend({queue:function(n,r){var u=2;return"string"!=typeof n&&(r=n,n="fx",u--),u>arguments.length?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n),"fx"===n&&"inprogress"!==t[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var d,or,ii=/[\t\r\n\f]/g,ie=/\r/g,re=/^(?:input|select|textarea|button|object)$/i,ue=/^(?:a|area)$/i,ri=/^(?:checked|selected)$/i,a=i.support.getSetAttribute,ht=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t,delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,u,o,f=0,h=this.length,c="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];h>f;f++)if(t=this[f],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(ii," "):" ")){for(o=0;u=e[o++];)0>r.indexOf(" "+u+" ")&&(r+=u+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,t,r,u,o,f=0,h=this.length,c=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];h>f;f++)if(t=this[f],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(ii," "):"")){for(o=0;u=e[o++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");t.className=n?i.trim(r):""}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(s)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===o||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(ii," ").indexOf(i)>=0)return!0;return!1},val:function(n){var u,r,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f;1===this.nodeType&&(f=e?n.call(this,u,i(this).val()):n,null==f?f="":"number"==typeof f?f+="":i.isArray(f)&&(f=i.map(f,function(n){return null==n?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t?u:(u=f.value,"string"==typeof u?u.replace(ie,""):null==u?"":u)):void 0}}),i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,u="select-one"===n.type||0>r,s=u?null:[],h=u?r+1:o.length,f=0>r?h:u?r:0;h>f;f++)if(t=o[f],!(!t.selected&&f!==r||(i.support.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),u)return e;s.push(e)}return s},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(i(r).val(),e)>=0)&&(u=!0);return u||(n.selectedIndex=-1),e}}},attr:function(n,r,u){var f,e,s=n.nodeType;if(n&&3!==s&&8!==s&&2!==s)return typeof n.getAttribute===o?i.prop(n,r,u):(1===s&&i.isXMLDoc(n)||(r=r.toLowerCase(),f=i.attrHooks[r]||(i.expr.match.bool.test(r)?or:d)),u===t?f&&"get"in f&&null!==(e=f.get(n,r))?e:(e=i.find.attr(n,r),null==e?t:e):null!==u?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:(n.setAttribute(r,u+""),u):(i.removeAttr(n,r),t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(s);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?ht&&a||!ri.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(a?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&"radio"===t&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&3!==o&&8!==o&&2!==o)return s=1!==o||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&null!==(e=f.get(n,r))?e:n[r]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):re.test(n.nodeName)||ue.test(n.nodeName)&&n.href?0:-1}}}}),or={set:function(n,t,r){return t===!1?i.removeAttr(n,r):ht&&a||!ri.test(r)?n.setAttribute(!a&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}},i.each(i.expr.match.bool.source.match(/\w+/g),function(n,r){var u=i.expr.attrHandle[r]||i.find.attr;i.expr.attrHandle[r]=ht&&a||!ri.test(r)?function(n,r,f){var e=i.expr.attrHandle[r],o=f?t:(i.expr.attrHandle[r]=t)!=u(n,r,f)?r.toLowerCase():null;return i.expr.attrHandle[r]=e,o}:function(n,r,u){return u?t:n[i.camelCase("default-"+r)]?r.toLowerCase():null}}),ht&&a||(i.attrHooks.value={set:function(n,r,u){return i.nodeName(n,"input")?(n.defaultValue=r,t):d&&d.set(n,r,u)}}),a||(d={set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="","value"===r||i===n.getAttribute(r)?i:t}},i.expr.attrHandle.id=i.expr.attrHandle.name=i.expr.attrHandle.coords=function(n,i,r){var u;return r?t:(u=n.getAttributeNode(i))&&""!==u.value?u.value:null},i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&r.specified?r.value:t},set:d.set},i.attrHooks.contenteditable={set:function(n,t,i){d.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,r){i.attrHooks[r]={set:function(n,i){return""===i?(n.setAttribute(r,"auto"),i):t}}})),i.support.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}}),i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}}),i.support.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this}),i.support.enctype||(i.propFix.enctype="encoding"),i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,r){return i.isArray(r)?n.checked=i.inArray(i(n).val(),r)>=0:t}},i.support.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ui=/^(?:input|select|textarea)$/i,fe=/^key/,ee=/^(?:mouse|contextmenu)|click/,sr=/^(?:focusinfocus|focusoutblur)$/,hr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var b,p,k,w,c,l,a,v,h,d,g,y=i._data(n);if(y){for(u.handler&&(w=u,u=w.handler,e=w.selector),u.guid||(u.guid=i.guid++),(p=y.events)||(p=y.events={}),(l=y.handle)||(l=y.handle=function(n){return typeof i===o||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(l.elem,arguments)},l.elem=n),r=(r||"").match(s)||[""],k=r.length;k--;)b=hr.exec(r[k])||[],h=g=b[1],d=(b[2]||"").split(".").sort(),h&&(c=i.event.special[h]||{},h=(e?c.delegateType:c.bindType)||h,c=i.event.special[h]||{},a=i.extend({type:h,origType:g,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:d.join(".")},w),(v=p[h])||(v=p[h]=[],v.delegateCount=0,c.setup&&c.setup.call(n,f,d,l)!==!1||(n.addEventListener?n.addEventListener(h,l,!1):n.attachEvent&&n.attachEvent("on"+h,l))),c.add&&(c.add.call(n,a),a.handler.guid||(a.handler.guid=u.guid)),e?v.splice(v.delegateCount++,0,a):v.push(a),i.event.global[h]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,h,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(s)||[""],p=t.length;p--;)if(h=hr.exec(t[p])||[],e=k=h[1],w=(h[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],h=h[2]&&RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||h&&!h.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var a,v,s,w,l,c,b,p=[e||r],h=k.call(u,"type")?u.type:u,y=k.call(u,"namespace")?u.namespace.split("."):[];if(s=c=e=e||r,3!==e.nodeType&&8!==e.nodeType&&!sr.test(h+i.event.triggered)&&(h.indexOf(".")>=0&&(y=h.split("."),h=y.shift(),y.sort()),v=0>h.indexOf(":")&&"on"+h,u=u[i.expando]?u:new i.Event(h,"object"==typeof u&&u),u.isTrigger=o?2:3,u.namespace=y.join("."),u.namespace_re=u.namespace?RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=null==f?[u]:i.makeArray(f,[u]),l=i.event.special[h]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(w=l.delegateType||h,sr.test(w+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(e.ownerDocument||r)&&p.push(c.defaultView||c.parentWindow||n)}for(b=0;(s=p[b++])&&!u.isPropagationStopped();)u.type=b>1?w:l.bindType||h,a=(i._data(s,"events")||{})[u.type]&&i._data(s,"handle"),a&&a.apply(s,f),a=v&&s[v],a&&i.acceptData(s)&&a.apply&&a.apply(s,f)===!1&&u.preventDefault();if(u.type=h,!o&&!u.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),f)===!1)&&i.acceptData(e)&&v&&e[h]&&!i.isWindow(e)){c=e[v],c&&(e[v]=null),i.event.triggered=h;try{e[h]()}catch(d){}i.event.triggered=t,c&&(e[v]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var o,e,r,u,s,h=[],c=l.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,a),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(r=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(u.elem,c),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,r){var e,o,f,s,c=[],h=r.delegateCount,u=n.target;if(h&&u.nodeType&&(!n.button||"click"!==n.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==n.type)){for(f=[],s=0;h>s;s++)o=r[s],e=o.selector+" ",f[e]===t&&(f[e]=o.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(o);f.length&&c.push({elem:u,handlers:f})}return r.length>h&&c.push({elem:this,handlers:r.slice(h)}),c},fix:function(n){if(n[i.expando])return n;var e,o,s,u=n.type,f=n,t=this.fixHooks[u];for(t||(this.fixHooks[u]=t=ee.test(u)?this.mouseHooks:fe.test(u)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||r),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var u,o,f,e=i.button,s=i.fromElement;return null==n.pageX&&null!=i.clientX&&(o=n.target.ownerDocument||r,f=o.documentElement,u=o.body,n.pageX=i.clientX+(f&&f.scrollLeft||u&&u.scrollLeft||0)-(f&&f.clientLeft||u&&u.clientLeft||0),n.pageY=i.clientY+(f&&f.scrollTop||u&&u.scrollTop||0)-(f&&f.clientTop||u&&u.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=1&e?1:2&e?3:4&e?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){return this===cr()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return i.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f),f.isDefaultPrevented()&&r.preventDefault()}},i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))},i.Event=function(n,r){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?ct:g):this.type=n,r&&i.extend(this,r),this.timeStamp=n&&n.timeStamp||i.now(),this[i.expando]=!0,t):new i.Event(n,r)},i.Event.prototype={isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=ct,n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=ct,n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ct,this.stopPropagation()}},i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}}),i.support.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:(i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))}),t)},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:(i.event.remove(this,"._submit"),t)}}),i.support.changeBubbles||(i.event.special.change={setup:function(){return ui.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1),i.event.simulate("change",this,n,!0)})),!1):(i.event.add(this,"beforeactivate._change",function(n){var t=n.target;ui.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))}),t)},handle:function(n){var i=n.target;return this!==i||n.isSimulated||n.isTrigger||"radio"!==i.type&&"checkbox"!==i.type?n.handleObj.handler.apply(this,arguments):t},teardown:function(){return i.event.remove(this,"._change"),!ui.test(this.nodeName)}}),i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){0==u++&&r.addEventListener(n,f,!0)},teardown:function(){0==--u&&r.removeEventListener(n,f,!0)}}}),i.fn.extend({on:function(n,r,u,f,e){var s,o;if("object"==typeof n){"string"!=typeof r&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(null==u&&null==f?(f=r,u=r=t):null==f&&("string"==typeof r?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=g;else if(!f)return this;return 1===e&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if("object"==typeof n){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||"function"==typeof r)&&(u=r,r=t),u===!1&&(u=g),this.each(function(){i.event.remove(this,n,u,r)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,r){var u=this[0];return u?i.event.trigger(n,r,u,!0):t}});var oe=/^.[^:#\[\.,]*$/,se=/^(?:parents|prev(?:Until|All))/,lr=i.expr.match.needsContext,he={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(fi(this,n||[],!0))},filter:function(n){return this.pushStack(fi(this,n||[],!1))},is:function(n){return!!fi(this,"string"==typeof n&&lr.test(n)?i(n):n||[],!1).length},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=lr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(11>r.nodeType&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){r=u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var r="string"==typeof n?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),u=i.merge(this.get(),r);return this.pushStack(i.unique(u))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}}),i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ar(n,"nextSibling")},prev:function(n){return ar(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(he[n]||(f=i.unique(f)),se.test(n)&&(f=f.reverse())),this.pushStack(f)}}),i.extend({filter:function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))},dir:function(n,r,u){for(var e=[],f=n[r];f&&9!==f.nodeType&&(u===t||1!==f.nodeType||!i(f).is(u));)1===f.nodeType&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});var yr="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ce=/ jQuery\d+="(?:null|\d+)"/g,pr=RegExp("<(?:"+yr+")[\\s/>]","i"),ei=/^\s+/,wr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,br=/<([\w:]+)/,kr=/<tbody/i,le=/<|&#?\w+;/,ae=/<(?:script|style|link)/i,oi=/^(?:checkbox|radio)$/i,ve=/checked\s*(?:[^=]|=\s*.checked.)/i,dr=/^$|\/(?:java|ecma)script/i,ye=/^true\/(.*)/,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},we=vr(r),si=we.appendChild(r.createElement("div"));e.optgroup=e.option,e.tbody=e.tfoot=e.colgroup=e.caption=e.thead,e.th=e.td,i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=gr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=gr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,f=0;null!=(r=e[f]);f++)t||1!==r.nodeType||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&hi(u(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return 1===r.nodeType?r.innerHTML.replace(ce,""):t;if(!("string"!=typeof n||ae.test(n)||!i.support.htmlSerialize&&pr.test(n)||!i.support.leadingWhitespace&&ei.test(n)||e[(br.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(wr,"<$1><\/$2>");try{for(;o>f;f++)r=this[f]||{},1===r.nodeType&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var t=i.map(this,function(n){return[n.nextSibling,n.parentNode]}),n=0;return this.domManip(arguments,function(r){var u=t[n++],f=t[n++];f&&(u&&u.parentNode!==f&&(u=this.nextSibling),i(this).remove(),f.insertBefore(r,u))},!0),n?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t,r){n=di.apply([],n);var h,f,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||!(1>=l||"string"!=typeof a||i.support.checkClone)&&ve.test(a))return this.each(function(i){var u=p.eq(i);y&&(n[0]=a.call(this,i,u.html())),u.domManip(n,t,r)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,!r&&this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(u(s,"script"),nu),c=o.length;l>e;e++)f=s,e!==w&&(f=i.clone(f,!0,!0),c&&i.merge(o,u(f,"script"))),t.call(this[e],f,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,tu),e=0;c>e;e++)f=o[e],dr.test(f.type||"")&&!i._data(f,"globalEval")&&i.contains(v,f)&&(f.src?i._evalUrl(f.src):i.globalEval((f.text||f.textContent||f.innerHTML||"").replace(pe,"")));s=h=null}return this}}),i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),kt.apply(f,u.get());return this.pushStack(f)}}),i.extend({clone:function(n,t,r){var f,h,o,e,s,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!pr.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(si.innerHTML=n.outerHTML,si.removeChild(o=si.firstChild)),!(i.support.noCloneEvent&&i.support.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(f=u(o),s=u(n),e=0;null!=(h=s[e]);++e)f[e]&&be(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;null!=(h=s[e]);e++)iu(h,f[e]);else iu(n,o);return f=u(o,"script"),f.length>0&&hi(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var h,o,w,s,y,p,l,b=n.length,a=vr(t),c=[],v=0;b>v;v++)if(o=n[v],o||0===o)if("object"===i.type(o))i.merge(c,o.nodeType?[o]:o);else if(le.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(br.exec(o)||["",""])[1].toLowerCase(),l=e[y]||e._default,s.innerHTML=l[1]+o.replace(wr,"<$1><\/$2>")+l[2],h=l[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&ei.test(o)&&c.push(t.createTextNode(ei.exec(o)[0])),!i.support.tbody)for(o="table"!==y||kr.test(o)?"<table>"!==l[1]||kr.test(o)?0:s:s.firstChild,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),ke),v=0;o=c[v++];)if((!f||-1===i.inArray(o,f))&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&hi(s),r))for(h=0;o=s[h++];)dr.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,t){for(var r,f,u,e,c=0,s=i.expando,h=i.cache,l=i.support.deleteExpando,a=i.event.special;null!=(r=n[c]);c++)if((t||i.acceptData(r))&&(u=r[s],e=u&&h[u])){if(e.events)for(f in e.events)a[f]?i.event.remove(r,f):i.removeEvent(r,f,e.handle);h[u]&&(delete h[u],l?delete r[s]:typeof r.removeAttribute!==o?r.removeAttribute(s):r[s]=null,b.push(u))}},_evalUrl:function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})}}),i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});var rt,v,y,ci=/alpha\([^)]*\)/i,de=/opacity\s*=\s*([^)]*)/,ge=/^(top|right|bottom|left)$/,no=/^(none|table(?!-c[ea]).+)/,ru=/^margin/,to=RegExp("^("+st+")(.*)$","i"),lt=RegExp("^("+st+")(?!px)[a-z%]+$","i"),io=RegExp("^([+-])=("+st+")","i"),uu={BODY:"block"},ro={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:0,fontWeight:400},p=["Top","Right","Bottom","Left"],eu=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,o,s={},f=0;if(i.isArray(r)){for(o=v(n),e=r.length;e>f;f++)s[r[f]]=i.css(n,r[f],!1,o);return s}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return su(this,!0)},hide:function(){return su(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){ut(this)?i(this).show():i(this).hide()})}}),i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=y(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=ou(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u===t)return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r];if(s=typeof u,"string"===s&&(o=io.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),!(null==u||"number"===s&&isNaN(u)||("number"!==s||i.cssNumber[h]||(u+="px"),i.support.clearCloneStyle||""!==u||0!==r.indexOf("background")||(c[r]="inherit"),e&&"set"in e&&(u=e.set(n,u,f))===t)))try{c[r]=u}catch(l){}}},css:function(n,r,u,f){var h,e,o,s=i.camelCase(r);return r=i.cssProps[s]||(i.cssProps[s]=ou(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=y(n,r,f)),"normal"===e&&r in fu&&(e=fu[r]),""===u||u?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e}}),n.getComputedStyle?(v=function(t){return n.getComputedStyle(t,null)},y=function(n,r,u){var s,h,c,o=u||v(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(""!==e||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),lt.test(e)&&ru.test(r)&&(s=f.width,h=f.minWidth,c=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=s,f.minWidth=h,f.maxWidth=c)),e}):r.documentElement.currentStyle&&(v=function(n){return n.currentStyle},y=function(n,i,r){var s,e,o,h=r||v(n),u=h?h[i]:t,f=n.style;return null==u&&f&&f[i]&&(u=f[i]),lt.test(u)&&!ge.test(i)&&(s=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left="fontSize"===i?"1em":u,u=f.pixelLeft+"px",f.left=s,o&&(e.left=o)),""===u?"auto":u}),i.each(["height","width"],function(n,r){i.cssHooks[r]={get:function(n,u,f){return u?0===n.offsetWidth&&no.test(i.css(n,"display"))?i.swap(n,ro,function(){return lu(n,r,f)}):lu(n,r,f):t},set:function(n,t,u){var f=u&&v(n);return hu(n,t,u?cu(n,r,u,i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f),f):0)}}}),i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return de.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1,(t>=1||""===t)&&""===i.trim(f.replace(ci,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=ci.test(f)?f.replace(ci,e):f+" "+e)}}),i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,r){return r?i.swap(n,{display:"inline-block"},y,[n,"marginRight"]):t}}),!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,r){i.cssHooks[r]={get:function(n,u){return u?(u=y(n,r),lt.test(u)?i(n).position()[r]+"px":u):t}}})}),i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return 0>=n.offsetWidth&&0>=n.offsetHeight||!i.support.reliableHiddenOffsets&&"none"===(n.style&&n.style.display||i.css(n,"display"))},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)}),i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}},ru.test(n)||(i.cssHooks[n+t].set=hu)});var uo=/%20/g,fo=/\[\]$/,yu=/\r?\n/g,eo=/^(?:submit|button|image|reset|file)$/i,oo=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&oo.test(this.nodeName)&&!eo.test(n)&&(this.checked||!oi.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(yu,"\r\n")}}):{name:t.name,value:r.replace(yu,"\r\n")}}).get()}}),i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():null==t?"":t,f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)li(u,n[u],r,e);return f.join("&").replace(uo,"+")},i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}}),i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var w,c,ai=i.now(),vi=/\?/,so=/#.*$/,pu=/([?&])_=[^&]*/,ho=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,co=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,lo=/^(?:GET|HEAD)$/,ao=/^\/\//,wu=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,bu=i.fn.load,ku={},yi={},du="*/".concat("*");try{c=hf.href}catch(ns){c=r.createElement("a"),c.href="",c=c.href}w=wu.exec(c.toLowerCase())||[],i.fn.load=function(n,r,u){if("string"!=typeof n&&bu)return bu.apply(this,arguments);var f,s,h,e=this,o=n.indexOf(" ");return o>=0&&(f=n.slice(o,n.length),n=n.slice(0,o)),i.isFunction(r)?(u=r,r=t):r&&"object"==typeof r&&(h="POST"),e.length>0&&i.ajax({url:n,type:h,dataType:"html",data:r}).done(function(n){s=arguments,e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).complete(u&&function(n,t){e.each(u,s||[n.responseText,t,n])}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:c,type:"GET",isLocal:co.test(w[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":du,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?pi(pi(n,i.ajaxSettings),t):pi(i.ajaxSettings,n)},ajaxPrefilter:gu(ku),ajaxTransport:gu(yi),ajax:function(n,r){function k(n,r,s,c){var a,rt,k,p,w,l=r;2!==o&&(o=2,g&&clearTimeout(g),y=t,d=c||"",f.readyState=n>0?4:0,a=n>=200&&300>n||304===n,s&&(p=vo(u,f,s)),p=yo(u,p,f,a),a?(u.ifModified&&(w=f.getResponseHeader("Last-Modified"),w&&(i.lastModified[e]=w),w=f.getResponseHeader("etag"),w&&(i.etag[e]=w)),204===n||"HEAD"===u.type?l="nocontent":304===n?l="notmodified":(l=p.state,rt=p.data,k=p.error,a=!k)):(k=l,(n||!l)&&(l="error",0>n&&(n=0))),f.status=n,f.statusText=(r||l)+"",a?tt.resolveWith(h,[rt,l,f]):tt.rejectWith(h,[f,l,k]),f.statusCode(b),b=t,v&&nt.trigger(a?"ajaxSuccess":"ajaxError",[f,u,a?rt:k]),it.fireWith(h,[f,l]),v&&(nt.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(r=n,n=t),r=r||{};var l,a,e,d,g,v,y,p,u=i.ajaxSetup({},r),h=u.context||u,nt=u.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),b=u.statusCode||{},rt={},ut={},o=0,ft="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(2===o){if(!p)for(p={};t=ho.exec(d);)p[t[1].toLowerCase()]=t[2];t=p[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===o?d:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return o||(n=ut[i]=ut[i]||n,rt[n]=t),this},overrideMimeType:function(n){return o||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>o)for(t in n)b[t]=[b[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||ft;return y&&y.abort(t),k(0,t),this}};if(tt.promise(f).complete=it.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||c)+"").replace(so,"").replace(ao,w[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(s)||[""],null==u.crossDomain&&(l=wu.exec(u.url.toLowerCase()),u.crossDomain=!(!l||l[1]===w[1]&&l[2]===w[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(w[3]||("http:"===w[1]?"80":"443")))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=i.param(u.data,u.traditional)),nf(ku,u,r,f),2===o)return f;v=u.global,v&&0==i.active++&&i.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!lo.test(u.type),e=u.url,u.hasContent||(u.data&&(e=u.url+=(vi.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=pu.test(e)?e.replace(pu,"$1_="+ai++):e+(vi.test(e)?"&":"?")+"_="+ai++)),u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e])),(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType),f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+du+"; q=0.01":""):u.accepts["*"]);for(a in u.headers)f.setRequestHeader(a,u.headers[a]);if(u.beforeSend&&(u.beforeSend.call(h,f,u)===!1||2===o))return f.abort();ft="abort";for(a in{success:1,error:1,complete:1})f[a](u[a]);if(y=nf(yi,u,r,f)){f.readyState=1,v&&nt.trigger("ajaxSend",[f,u]),u.async&&u.timeout>0&&(g=setTimeout(function(){f.abort("timeout")},u.timeout));try{o=1,y.send(rt,k)}catch(et){if(!(2>o))throw et;k(-1,et)}}else k(-1,"No Transport");return f},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,r){return i.get(n,t,r,"script")}}),i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1),n.crossDomain&&(n.type="GET",n.global=!1)}),i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script"),u.async=!0,n.scriptCharset&&(u.charset=n.scriptCharset),u.src=n.url,u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))},f.insertBefore(u,f.firstChild)},abort:function(){u&&u.onload(t,!0)}}}}),wi=[],at=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=wi.pop()||i.expando+"_"+ai++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(at.test(r.url)?"url":"string"==typeof r.data&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&at.test(r.data)&&"data");return h||"jsonp"===r.dataTypes[0]?(e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(at,"$1"+e):r.jsonp!==!1&&(r.url+=(vi.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s,r[e]&&(r.jsonpCallback=u.jsonpCallback,wi.push(e)),o&&i.isFunction(s)&&s(o[0]),o=s=t}),"script"):t}),tf=0,vt=n.ActiveXObject&&function(){var n;for(n in nt)nt[n](t,!0)},i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&rf()||po()}:rf,tt=i.ajaxSettings.xhr(),i.support.cors=!!tt&&"withCredentials"in tt,tt=i.support.ajax=!!tt,tt&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType),r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null),u=function(n,f){var s,a,l,c;try{if(u&&(f||4===o.readyState))if(u=t,h&&(o.onreadystatechange=i.noop,vt&&delete nt[h]),f)4!==o.readyState&&o.abort();else{c={},s=o.status,a=o.getAllResponseHeaders(),"string"==typeof o.responseText&&(c.text=o.responseText);try{l=o.statusText}catch(v){l=""}s||!r.isLocal||r.crossDomain?1223===s&&(s=204):s=c.text?200:404}}catch(y){f||e(-1,y)}c&&e(s,l,c,a)},r.async?4===o.readyState?setTimeout(u):(h=++tf,vt&&(nt||(nt={},i(n).unload(vt)),nt[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var it,yt,wo=/^(?:toggle|show|hide)$/,uf=RegExp("^(?:([+-])=|)("+st+")([a-z%]*)$","i"),bo=/queueHooks$/,pt=[go],ft={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=uf.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&uf.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3],r=r||[],u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};i.Animation=i.extend(of,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],ft[r]=ft[r]||[],ft[r].unshift(t)},prefilter:function(n,t){t?pt.unshift(n):pt.push(n)}}),i.Tween=f,f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n,this.prop=r,this.easing=f||"swing",this.options=t,this.start=this.now=this.cur(),this.end=u,this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var r,t=f.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):f.propHooks._default.set(this),this}},f.prototype.init.prototype=f.prototype,f.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}},f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}},i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(wt(t,!0),n,i,u)}}),i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ut).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=of(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop,t(u)};return"string"!=typeof n&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&bo.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}}),i.each({slideDown:wt("show"),slideUp:wt("hide"),slideToggle:wt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}}),i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this),u.queue&&i.dequeue(this,u.queue)},u},i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}},i.timers=[],i.fx=f.prototype.init,i.fx.tick=function(){var u,n=i.timers,r=0;for(it=i.now();n.length>r;r++)u=n[r],u()||n[r]!==u||n.splice(r--,1);n.length||i.fx.stop(),it=t},i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()},i.fx.interval=13,i.fx.start=function(){yt||(yt=setInterval(i.fx.tick,i.fx.interval))},i.fx.stop=function(){clearInterval(yt),yt=null},i.fx.speeds={slow:600,fast:200,_default:400},i.fx.step={},i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length}),i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,e,f={top:0,left:0},u=this[0],s=u&&u.ownerDocument;if(s)return r=s.documentElement,i.contains(r,u)?(typeof u.getBoundingClientRect!==o&&(f=u.getBoundingClientRect()),e=sf(s),{top:f.top+(e.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(e.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}):f},i.offset={setOffset:function(n,t,r){var f=i.css(n,"position");"static"===f&&(n.style.position="relative");var e=i(n),o=e.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=("absolute"===f||"fixed"===f)&&i.inArray("auto",[l,a])>-1,u={},s={},h,c;v?(s=e.position(),h=s.top,c=s.left):(h=parseFloat(l)||0,c=parseFloat(a)||0),i.isFunction(t)&&(t=t.call(n,r,o)),null!=t.top&&(u.top=t.top-o.top+h),null!=t.left&&(u.left=t.left-o.left+c),"using"in t?t.using.call(n,u):e.css(u)}},i.fn.extend({position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||ki;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||ki})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=sf(n);return e===t?o?r in o?o[r]:o.document.documentElement[f]:n[f]:(o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e,t)},n,f,arguments.length,null)}}),i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||"boolean"!=typeof f),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:9===r.nodeType?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})}),i.fn.size=function(){return this.length},i.fn.andSelf=i.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=i:(n.jQuery=n.$=i,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}))})(window),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof module=="object"&&typeof module.exports=="object"?module.exports=n(require("jquery")):n(jQuery)}(function(n){function i(t,i){return t&&t.trim()[0]===">"?(t=t.trim().replace(/^>\s*/,""),i.find(t)):t?n(t):i}n.fn.resizable||(n.fn.resizable=function(t){var r={handleSelector:null,resizeWidth:!0,resizeHeight:!0,resizeWidthFrom:"right",resizeHeightFrom:"bottom",onDragStart:null,onDragEnd:null,onDrag:null,touchActionNone:!0};return typeof t=="object"&&(r=n.extend(r,t)),this.each(function(){function s(n){n.stopPropagation(),n.preventDefault()}function c(i){(i.preventDefault&&i.preventDefault(),u=h(i),u.width=parseInt(t.width(),10),u.height=parseInt(t.height(),10),e=t.css("transition"),t.css("transition","none"),r.onDragStart&&r.onDragStart(i,t,r)===!1)||(r.dragFunc=l,n(document).bind("mousemove.rsz",r.dragFunc),n(document).bind("mouseup.rsz",f),(window.Touch||navigator.maxTouchPoints)&&(n(document).bind("touchmove.rsz",r.dragFunc),n(document).bind("touchend.rsz",f)),n(document).bind("selectstart.rsz",s))}function l(n){var i=h(n),f,e;f=r.resizeWidthFrom==="left"?u.width-i.x+u.x:u.width+i.x-u.x,e=r.resizeHeightFrom==="top"?u.height-i.y+u.y:u.height+i.y-u.y,r.onDrag&&r.onDrag(n,t,f,e,r)===!1||(r.resizeHeight&&t.height(e),r.resizeWidth&&t.width(f))}function f(i){if(i.stopPropagation(),i.preventDefault(),n(document).unbind("mousemove.rsz",r.dragFunc),n(document).unbind("mouseup.rsz",f),(window.Touch||navigator.maxTouchPoints)&&(n(document).unbind("touchmove.rsz",r.dragFunc),n(document).unbind("touchend.rsz",f)),n(document).unbind("selectstart.rsz",s),t.css("transition",e),r.onDragEnd)r.onDragEnd(i,t,r);return!1}function h(n){var t={x:0,y:0,width:0,height:0};if(typeof n.clientX=="number")t.x=n.clientX,t.y=n.clientY;else if(n.originalEvent.touches)t.x=n.originalEvent.touches[0].clientX,t.y=n.originalEvent.touches[0].clientY;else return null;return t}var u,e,t=n(this),o=i(r.handleSelector,t);r.touchActionNone&&o.css("touch-action","none"),t.addClass("resizable"),o.bind("mousedown.rsz touchstart.rsz",c)})})}),function(n){n.extend(n.fn,{validate:function(t){if(!this.length){t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.");return}var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target),n(t.target).hasClass("cancel")&&(i.cancelSubmit=!0),n(t.target).attr("formnovalidate")!==undefined&&(i.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return i.settings.submitHandler?(i.submitButton&&(r=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(n(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,t),i.submitButton&&r.remove(),!1):!0}return(i.settings.debug&&t.preventDefault(),i.cancelSubmit)?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t=t&&i.element(this)}),t},removeAttrs:function(t){var i={},r=this;return n.each(t.split(/\s/),function(n,t){i[t]=r.attr(t),r.removeAttr(t)}),i},rules:function(t,i){var r=this[0],o,u,h;if(t){var e=n.data(r.form,"validator").settings,s=e.rules,f=n.validator.staticRules(r);switch(t){case"add":n.extend(f,n.validator.normalizeRule(i)),delete f.messages,s[r.name]=f,i.messages&&(e.messages[r.name]=n.extend(e.messages[r.name],i.messages));break;case"remove":return i?(o={},n.each(i.split(/\s/),function(n,t){o[t]=f[t],delete f[t]}),o):(delete s[r.name],f)}}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(h=u.required,delete u.required,u=n.extend({required:h},u)),u}}),n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+n(t).val())},filled:function(t){return!!n.trim(""+n(t).val())},unchecked:function(t){return!n(t).prop("checked")}}),n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t),this.currentForm=i,this.init()},n.validator.format=function(t,i){return arguments.length===1?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(new RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)},n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(n,t){(t.which!==9||this.elementValue(n)!=="")&&(n.name in this.submitted||n===this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function r(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var i,t;this.labelContainer=n(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm),this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset(),i=this.groups={},n.each(this.settings.groups,function(t,r){typeof r=="string"&&(r=r.split(/\s/)),n.each(r,function(n,r){i[r]=t})}),t=this.settings.rules,n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)}),n(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",r).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",r),this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t)),this.lastElement=t,this.prepareElement(t),this.currentElements=n(t);var i=this.check(t)!==!1;return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t),this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0,i;for(i in n)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&n.grep(this.errorList,function(n){return n.element.name===t.name}).length===1&&t},elements:function(){var t=this,i={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return(!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!t.objectLength(n(this).rules()))?!1:(i[this.name]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return n(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=n([]),this.toHide=n([]),this.currentElements=n([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset(),this.toHide=this.errorsFor(n)},elementValue:function(t){var r=n(t).attr("type"),i=n(t).val();return r==="radio"||r==="checkbox"?n("input[name='"+n(t).attr("name")+"']:checked").val():typeof i=="string"?i.replace(/\r/g,""):i},check:function(t){var r,u;t=this.validationTargetFor(this.clean(t));var f=n(t).rules(),e=!1,o=this.elementValue(t),i;for(r in f){u={method:r,parameters:f[r]};try{if(i=n.validator.methods[r].call(this,o,t,u.parameters),i==="dependency-mismatch"){e=!0;continue}if(e=!1,i==="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!i)return this.formatAndAdd(t,u),!1}catch(s){this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+u.method+"' method.",s);throw s;}}if(!e)return this.objectLength(f)&&this.successList.push(t),!0},customDataMessage:function(t,i){return n(t).data("msg-"+i.toLowerCase())||t.attributes&&n(t).attr("data-msg-"+i.toLowerCase())},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;n<arguments.length;n++)if(arguments[n]!==undefined)return arguments[n];return undefined},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customDataMessage(t,i),!this.settings.ignoreTitle&&t.title||undefined,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"<\/strong>")},formatAndAdd:function(t,i){var r=this.defaultMessage(t,i.method),u=/\$?\{(\d+)\}/g;typeof r=="function"?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters)),this.errorList.push({message:r,element:t}),this.errorMap[t.name]=r,this.submitted[t.name]=r},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var i,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,i=this.validElements();i[n];n++)this.settings.unhighlight.call(this,i[n],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(i)):(r=n("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t))),!i&&this.settings.success&&(r.text(""),typeof this.settings.success=="string"?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")===i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){return n(this.currentForm).find("[name='"+t+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){var i=this.elementValue(t);return!n.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],i&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&this.pendingRequest===0&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor===String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var i={},r=n(t).attr("class");return r&&n.each(r.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(i,n.validator.classRuleSettings[this])}),i},attributeRules:function(t){var u={},e=n(t),f=e[0].getAttribute("type"),r,i;for(r in n.validator.methods)r==="required"?(i=e.get(0).getAttribute(r),i===""&&(i=!0),i=!!i):i=e.attr(r),/min|max/.test(r)&&(f===null||/number|range|text/.test(f))&&(i=Number(i)),i?u[r]=i:f===r&&f!=="range"&&(u[r]=!0);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var i,r,u={},f=n(t);for(i in n.validator.methods)r=f.data("rule-"+i.toLowerCase()),r!==undefined&&(u[i]=r);return u},staticRules:function(t){var i={},r=n.data(t.form,"validator");return r.settings.rules&&(i=n.validator.normalizeRule(r.settings.rules[t.name])||{}),i},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1){delete t[r];return}if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=u.param!==undefined?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength","range"],function(){var i;t[this]&&(n.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:typeof t[this]=="string"&&(i=t[this].split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if(typeof t=="string"){var i={};n.each(t.split(/\s/),function(){i[this]=!0}),t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i,n.validator.messages[t]=r!==undefined?r:n.validator.messages[t],i.length<3&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";if(i.nodeName.toLowerCase()==="select"){var u=n(i).val();return u&&u.length>0}return this.checkable(i)?this.getLength(t,i)>0:n.trim(t).length>0},email:function(n,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)},url:function(n,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(n).toString())},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var r,e;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(n))return!1;var f=0,i=0,u=!1;for(n=n.replace(/\D/g,""),r=n.length-1;r>=0;r--)e=n.charAt(r),i=parseInt(e,10),u&&(i*=2)>9&&(i-=9),f+=i,u=!u;return f%10==0},minlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r},maxlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u<=r},rangelength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r[0]&&u<=r[1]},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||n<=i},range:function(n,t,i){return this.optional(t)||n>=i[0]&&n<=i[1]},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()},remote:function(t,i,r){var f,u,e;return this.optional(i)?"dependency-mismatch":(f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r=typeof r=="string"&&{url:r}||r,f.old===t)?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var e,h,s,o;u.settings.messages[i.name].remote=f.originalMessage,e=r===!0||r==="true",e?(h=u.formSubmitted,u.prepareElement(i),u.formSubmitted=h,u.successList.push(i),delete u.invalid[i.name],u.showErrors()):(s={},o=r||u.defaultMessage(i,"remote"),s[i.name]=f.message=n.isFunction(o)?o(t):o,u.invalid[i.name]=!0,u.showErrors(s)),f.valid=e,u.stopRequest(i,e)}},r)),"pending")}}}),n.format=n.validator.format}(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){var u=n.port;n.mode==="abort"&&(t[u]&&t[u].abort(),t[u]=r)}):(i=n.ajax,n.ajax=function(r){var f=("mode"in r?r:n.ajaxSettings).mode,u=("port"in r?r:n.ajaxSettings).port;return f==="abort"?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments)):i.apply(this,arguments)})}(jQuery),function(n){n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery),$.validator.addMethod("regex",function(n,t,i){var r=new RegExp(i);return this.optional(t)||r.test(n)},"Please check your input."),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(n){var i,u,f,t,r;if(this==null)throw new TypeError('"this" is null or not defined');if(i=Object(this),u=i.length>>>0,typeof n!="function")throw new TypeError("predicate must be a function");for(f=arguments[1],t=0;t<u;){if(r=i[t],n.call(f,r,t,i))return r;t++}return undefined},configurable:!0,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(n){var i,r,u,t,f;if(this==null)throw new TypeError('"this" is null or not defined');if(i=Object(this),r=i.length>>>0,typeof n!="function")throw new TypeError("predicate must be a function");for(u=arguments[1],t=0;t<r;){if(f=i[t],n.call(u,f,t,i))return t;t++}return-1},configurable:!0,writable:!0}),typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(n){"use strict";var f,r,i,u;if(n===null||n===undefined)throw new TypeError("Cannot convert undefined or null to object");for(f=Object(n),r=1;r<arguments.length;r++)if(i=arguments[r],i!==null&&i!==undefined)for(u in i)Object.prototype.hasOwnProperty.call(i,u)&&(f[u]=i[u]);return f},writable:!0,configurable:!0}),function(n){n.fn.serializeForm=function(){if(this.length<1)return!1;var i={},t=i,r=':input[type!="checkbox"][type!="radio"], input:checked',u=function(){var r=this.name.replace(/\[([^\]]+)?\]/g,",$1").split(","),f=r.length-1,e=n(this),u;if(r[0]){for(u=0;u<f;u++)t=t[r[u]]=t[r[u]]||(r[u+1]===""?[]:{});t.length!==undefined?t.push(e.val()):t[r[f]]=e.val(),t=i}};return this.filter(r).each(u),this.find(r).each(u),i}}(jQuery),function(){var v=this,lt=v._,e={},r=Array.prototype,nt=Object.prototype,at=Function.prototype,y=r.push,t=r.slice,o=r.concat,f=nt.toString,vt=nt.hasOwnProperty,tt=r.forEach,it=r.map,rt=r.reduce,ut=r.reduceRight,ft=r.filter,et=r.every,ot=r.some,s=r.indexOf,st=r.lastIndexOf,yt=Array.isArray,pt=Object.keys,p=at.bind,n=function(t){if(t instanceof n)return t;if(!(this instanceof n))return new n(t);this._wrapped=t},i,w,b,h,k,d,c,l,u,ht,ct,a;typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=n),exports._=n):v._=n,n.VERSION="1.5.1",i=n.each=n.forEach=function(t,i,r){var u,o,f;if(t!=null)if(tt&&t.forEach===tt)t.forEach(i,r);else if(t.length===+t.length){for(u=0,o=t.length;u<o;u++)if(i.call(r,t[u],u,t)===e)return}else for(f in t)if(n.has(t,f)&&i.call(r,t[f],f,t)===e)return},n.map=n.collect=function(n,t,r){var u=[];return n==null?u:it&&n.map===it?n.map(t,r):(i(n,function(n,i,f){u.push(t.call(r,n,i,f))}),u)},w="Reduce of empty array with no initial value",n.reduce=n.foldl=n.inject=function(t,r,u,f){var e=arguments.length>2;if(t==null&&(t=[]),rt&&t.reduce===rt)return f&&(r=n.bind(r,f)),e?t.reduce(r,u):t.reduce(r);if(i(t,function(n,t,i){e?u=r.call(f,u,n,t,i):(u=n,e=!0)}),!e)throw new TypeError(w);return u},n.reduceRight=n.foldr=function(t,r,u,f){var o=arguments.length>2,e,s;if(t==null&&(t=[]),ut&&t.reduceRight===ut)return f&&(r=n.bind(r,f)),o?t.reduceRight(r,u):t.reduceRight(r);if(e=t.length,e!==+e&&(s=n.keys(t),e=s.length),i(t,function(n,i,h){i=s?s[--e]:--e,o?u=r.call(f,u,t[i],i,h):(u=t[i],o=!0)}),!o)throw new TypeError(w);return u},n.find=n.detect=function(n,t,i){var r;return b(n,function(n,u,f){if(t.call(i,n,u,f))return r=n,!0}),r},n.filter=n.select=function(n,t,r){var u=[];return n==null?u:ft&&n.filter===ft?n.filter(t,r):(i(n,function(n,i,f){t.call(r,n,i,f)&&u.push(n)}),u)},n.reject=function(t,i,r){return n.filter(t,function(n,t,u){return!i.call(r,n,t,u)},r)},n.every=n.all=function(t,r,u){r||(r=n.identity);var f=!0;return t==null?f:et&&t.every===et?t.every(r,u):(i(t,function(n,t,i){if(!(f=f&&r.call(u,n,t,i)))return e}),!!f)},b=n.some=n.any=function(t,r,u){r||(r=n.identity);var f=!1;return t==null?f:ot&&t.some===ot?t.some(r,u):(i(t,function(n,t,i){if(f||(f=r.call(u,n,t,i)))return e}),!!f)},n.contains=n.include=function(n,t){return n==null?!1:s&&n.indexOf===s?n.indexOf(t)!=-1:b(n,function(n){return n===t})},n.invoke=function(i,r){var u=t.call(arguments,2),f=n.isFunction(r);return n.map(i,function(n){return(f?r:n[r]).apply(n,u)})},n.pluck=function(t,i){return n.map(t,function(n){return n[i]})},n.where=function(t,i,r){return n.isEmpty(i)?r?void 0:[]:n[r?"find":"filter"](t,function(n){for(var t in i)if(i[t]!==n[t])return!1;return!0})},n.findWhere=function(t,i){return n.where(t,i,!0)},n.max=function(t,r,u){if(!r&&n.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.max.apply(Math,t);if(!r&&n.isEmpty(t))return-Infinity;var f={computed:-Infinity,value:-Infinity};return i(t,function(n,t,i){var e=r?r.call(u,n,t,i):n;e>f.computed&&(f={value:n,computed:e})}),f.value},n.min=function(t,r,u){if(!r&&n.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.min.apply(Math,t);if(!r&&n.isEmpty(t))return Infinity;var f={computed:Infinity,value:Infinity};return i(t,function(n,t,i){var e=r?r.call(u,n,t,i):n;e<f.computed&&(f={value:n,computed:e})}),f.value},n.shuffle=function(t){var u,f=0,r=[];return i(t,function(t){u=n.random(f++),r[f-1]=r[u],r[u]=t}),r},h=function(t){return n.isFunction(t)?t:function(n){return n[t]}},n.sortBy=function(t,i,r){var u=h(i);return n.pluck(n.map(t,function(n,t,i){return{value:n,index:t,criteria:u.call(r,n,t,i)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(i<r||r===void 0)return-1}return n.index<t.index?-1:1}),"value")},k=function(t,r,u,f){var e={},o=h(r==null?n.identity:r);return i(t,function(n,i){var r=o.call(u,n,i,t);f(e,r,n)}),e},n.groupBy=function(t,i,r){return k(t,i,r,function(t,i,r){(n.has(t,i)?t[i]:t[i]=[]).push(r)})},n.countBy=function(t,i,r){return k(t,i,r,function(t,i){n.has(t,i)||(t[i]=0),t[i]++})},n.sortedIndex=function(t,i,r,u){var e;r=r==null?n.identity:h(r);for(var s=r.call(u,i),f=0,o=t.length;f<o;)e=f+o>>>1,r.call(u,t[e])<s?f=e+1:o=e;return f},n.toArray=function(i){return i?n.isArray(i)?t.call(i):i.length===+i.length?n.map(i,n.identity):n.values(i):[]},n.size=function(t){return t==null?0:t.length===+t.length?t.length:n.keys(t).length},n.first=n.head=n.take=function(n,i,r){if(n!=null)return i!=null&&!r?t.call(n,0,i):n[0]},n.initial=function(n,i,r){return t.call(n,0,n.length-(i==null||r?1:i))},n.last=function(n,i,r){if(n!=null)return i==null||r?n[n.length-1]:t.call(n,Math.max(n.length-i,0))},n.rest=n.tail=n.drop=function(n,i,r){return t.call(n,i==null||r?1:i)},n.compact=function(t){return n.filter(t,n.identity)},d=function(t,r,u){return r&&n.every(t,n.isArray)?o.apply(u,t):(i(t,function(t){n.isArray(t)||n.isArguments(t)?r?y.apply(u,t):d(t,r,u):u.push(t)}),u)},n.flatten=function(n,t){return d(n,t,[])},n.without=function(i){return n.difference(i,t.call(arguments,1))},n.uniq=n.unique=function(t,r,u,f){n.isFunction(r)&&(f=u,u=r,r=!1);var s=u?n.map(t,u,f):t,o=[],e=[];return i(s,function(i,u){(r?u&&e[e.length-1]===i:n.contains(e,i))||(e.push(i),o.push(t[u]))}),o},n.union=function(){return n.uniq(n.flatten(arguments,!0))},n.intersection=function(i){var r=t.call(arguments,1);return n.filter(n.uniq(i),function(t){return n.every(r,function(i){return n.indexOf(i,t)>=0})})},n.difference=function(i){var u=o.apply(r,t.call(arguments,1));return n.filter(i,function(t){return!n.contains(u,t)})},n.zip=function(){for(var i=n.max(n.pluck(arguments,"length").concat(0)),r=new Array(i),t=0;t<i;t++)r[t]=n.pluck(arguments,""+t);return r},n.object=function(n,t){var r,i,u;if(n==null)return{};for(r={},i=0,u=n.length;i<u;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r},n.indexOf=function(t,i,r){if(t==null)return-1;var u=0,f=t.length;if(r)if(typeof r=="number")u=r<0?Math.max(0,f+r):r;else return u=n.sortedIndex(t,i),t[u]===i?u:-1;if(s&&t.indexOf===s)return t.indexOf(i,r);for(;u<f;u++)if(t[u]===i)return u;return-1},n.lastIndexOf=function(n,t,i){var u,r;if(n==null)return-1;if(u=i!=null,st&&n.lastIndexOf===st)return u?n.lastIndexOf(t,i):n.lastIndexOf(t);for(r=u?i:n.length;r--;)if(n[r]===t)return r;return-1},n.range=function(n,t,i){arguments.length<=1&&(t=n||0,n=0),i=arguments[2]||1;for(var r=Math.max(Math.ceil((t-n)/i),0),u=0,f=new Array(r);u<r;)f[u++]=n,n+=i;return f},c=function(){},n.bind=function(i,r){var u,f;if(p&&i.bind===p)return p.apply(i,t.call(arguments,1));if(!n.isFunction(i))throw new TypeError;return u=t.call(arguments,2),f=function(){var e,n;return this instanceof f?(c.prototype=i.prototype,e=new c,c.prototype=null,n=i.apply(e,u.concat(t.call(arguments))),Object(n)===n)?n:e:i.apply(r,u.concat(t.call(arguments)))}},n.partial=function(n){var i=t.call(arguments,1);return function(){return n.apply(this,i.concat(t.call(arguments)))}},n.bindAll=function(r){var u=t.call(arguments,1);if(u.length===0)throw new Error("bindAll must be passed function names");return i(u,function(t){r[t]=n.bind(r[t],r)}),r},n.memoize=function(t,i){var r={};return i||(i=n.identity),function(){var u=i.apply(this,arguments);return n.has(r,u)?r[u]:r[u]=t.apply(this,arguments)}},n.delay=function(n,i){var r=t.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},i)},n.defer=function(i){return n.delay.apply(n,[i,1].concat(t.call(arguments,1)))},n.throttle=function(n,t,i){var f,e,o,r=null,u=0,s;return i||(i={}),s=function(){u=i.leading===!1?0:new Date,r=null,o=n.apply(f,e)},function(){var h=new Date,c;return u||i.leading!==!1||(u=h),c=t-(h-u),f=this,e=arguments,c<=0?(clearTimeout(r),r=null,u=h,o=n.apply(f,e)):r||i.trailing===!1||(r=setTimeout(s,c)),o}},n.debounce=function(n,t,i){var u,r=null;return function(){var f=this,e=arguments,o=function(){r=null,i||(u=n.apply(f,e))},s=i&&!r;return clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},n.once=function(n){var i=!1,t;return function(){return i?t:(i=!0,t=n.apply(this,arguments),n=null,t)}},n.wrap=function(n,t){return function(){var i=[n];return y.apply(i,arguments),t.apply(this,i)}},n.compose=function(){var n=arguments;return function(){for(var i=arguments,t=n.length-1;t>=0;t--)i=[n[t].apply(this,i)];return i[0]}},n.after=function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},n.keys=pt||function(t){var i,r;if(t!==Object(t))throw new TypeError("Invalid object");i=[];for(r in t)n.has(t,r)&&i.push(r);return i},n.values=function(t){var r=[],i;for(i in t)n.has(t,i)&&r.push(t[i]);return r},n.pairs=function(t){var r=[],i;for(i in t)n.has(t,i)&&r.push([i,t[i]]);return r},n.invert=function(t){var r={},i;for(i in t)n.has(t,i)&&(r[t[i]]=i);return r},n.functions=n.methods=function(t){var r=[],i;for(i in t)n.isFunction(t[i])&&r.push(i);return r.sort()},n.extend=function(n){return i(t.call(arguments,1),function(t){if(t)for(var i in t)n[i]=t[i]}),n},n.pick=function(n){var u={},f=o.apply(r,t.call(arguments,1));return i(f,function(t){t in n&&(u[t]=n[t])}),u},n.omit=function(i){var f={},e=o.apply(r,t.call(arguments,1)),u;for(u in i)n.contains(e,u)||(f[u]=i[u]);return f},n.defaults=function(n){return i(t.call(arguments,1),function(t){if(t)for(var i in t)n[i]===void 0&&(n[i]=t[i])}),n},n.clone=function(t){return n.isObject(t)?n.isArray(t)?t.slice():n.extend({},t):t},n.tap=function(n,t){return t(n),n},l=function(t,i,r,u){var a,v,h,c,e,o,s;if(t===i)return t!==0||1/t==1/i;if(t==null||i==null)return t===i;if(t instanceof n&&(t=t._wrapped),i instanceof n&&(i=i._wrapped),a=f.call(t),a!=f.call(i))return!1;switch(a){case"[object String]":return t==String(i);case"[object Number]":return t!=+t?i!=+i:t==0?1/t==1/i:t==+i;case"[object Date]":case"[object Boolean]":return+t==+i;case"[object RegExp]":return t.source==i.source&&t.global==i.global&&t.multiline==i.multiline&&t.ignoreCase==i.ignoreCase}if(typeof t!="object"||typeof i!="object")return!1;for(v=r.length;v--;)if(r[v]==t)return u[v]==i;if(h=t.constructor,c=i.constructor,h!==c&&!(n.isFunction(h)&&h instanceof h&&n.isFunction(c)&&c instanceof c))return!1;if(r.push(t),u.push(i),e=0,o=!0,a=="[object Array]"){if(e=t.length,o=e==i.length,o)while(e--)if(!(o=l(t[e],i[e],r,u)))break}else{for(s in t)if(n.has(t,s)&&(e++,!(o=n.has(i,s)&&l(t[s],i[s],r,u))))break;if(o){for(s in i)if(n.has(i,s)&&!e--)break;o=!e}}return r.pop(),u.pop(),o},n.isEqual=function(n,t){return l(n,t,[],[])},n.isEmpty=function(t){if(t==null)return!0;if(n.isArray(t)||n.isString(t))return t.length===0;for(var i in t)if(n.has(t,i))return!1;return!0},n.isElement=function(n){return!!(n&&n.nodeType===1)},n.isArray=yt||function(n){return f.call(n)=="[object Array]"},n.isObject=function(n){return n===Object(n)},i(["Arguments","Function","String","Number","Date","RegExp"],function(t){n["is"+t]=function(n){return f.call(n)=="[object "+t+"]"}}),n.isArguments(arguments)||(n.isArguments=function(t){return!!(t&&n.has(t,"callee"))}),typeof/./!="function"&&(n.isFunction=function(n){return typeof n=="function"}),n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},n.isNaN=function(t){return n.isNumber(t)&&t!=+t},n.isBoolean=function(n){return n===!0||n===!1||f.call(n)=="[object Boolean]"},n.isNull=function(n){return n===null},n.isUndefined=function(n){return n===void 0},n.has=function(n,t){return vt.call(n,t)},n.noConflict=function(){return v._=lt,this},n.identity=function(n){return n},n.times=function(n,t,i){for(var u=Array(Math.max(0,n)),r=0;r<n;r++)u[r]=t.call(i,r);return u},n.random=function(n,t){return t==null&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},u={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}},u.unescape=n.invert(u.escape),ht={escape:new RegExp("["+n.keys(u.escape).join("")+"]","g"),unescape:new RegExp("("+n.keys(u.unescape).join("|")+")","g")},n.each(["escape","unescape"],function(t){n[t]=function(n){return n==null?"":(""+n).replace(ht[t],function(n){return u[t][n]})}}),n.result=function(t,i){if(t==null)return void 0;var r=t[i];return n.isFunction(r)?r.call(t):r},n.mixin=function(t){i(n.functions(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return y.apply(t,arguments),a.call(this,r.apply(n,t))}})},ct=0,n.uniqueId=function(n){var t=++ct+"";return n?n+t:t},n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var g=/(.)^/,wt={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},bt=/\\|'|\r|\n|\t|\u2028|\u2029/g;n.template=function(t,i,r){var f,e;r=n.defaults({},r,n.templateSettings);var s=new RegExp([(r.escape||g).source,(r.interpolate||g).source,(r.evaluate||g).source].join("|")+"|$","g"),o=0,u="__p+='";t.replace(s,function(n,i,r,f,e){return u+=t.slice(o,e).replace(bt,function(n){return"\\"+wt[n]}),i&&(u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),r&&(u+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),f&&(u+="';\n"+f+"\n__p+='"),o=e+n.length,n}),u+="';\n",r.variable||(u="with(obj||{}){\n"+u+"}\n"),u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{f=new Function(r.variable||"obj","_",u)}catch(h){h.source=u;throw h;}return i?f(i,n):(e=function(t){return f.call(this,t,n)},e.source="function("+(r.variable||"obj")+"){\n"+u+"}",e)},n.chain=function(t){return n(t).chain()},a=function(t){return this._chain?n(t).chain():t},n.mixin(n),i(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=r[t];n.prototype[t]=function(){var n=this._wrapped;return i.apply(n,arguments),(t=="shift"||t=="splice")&&n.length===0&&delete n[0],a.call(this,n)}}),i(["concat","join","slice"],function(t){var i=r[t];n.prototype[t]=function(){return a.call(this,i.apply(this._wrapped,arguments))}}),n.extend(n.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),function(n){var t=n.bindAll;n.bindAll=function(){var i=Array.prototype.slice.apply(arguments),r;return i.length===1?(r=i[0],t.apply(n,[r].concat(n.functions(r)))):t.apply(n,i)}}(_),function(){var r=this,it=r.Backbone,h=[],rt=h.push,c=h.slice,ut=h.splice,t,n,f,y,p,w,b,d,tt,l,e;t=typeof exports!="undefined"?exports:r.Backbone={},t.VERSION="1.0.0",n=r._,n||typeof require=="undefined"||(n=require("underscore")),t.$=r.jQuery||r.Zepto||r.ender||r.$,t.noConflict=function(){return r.Backbone=it,this},t.emulateHTTP=!1,t.emulateJSON=!1;var i=t.Events={on:function(n,t,i){if(!o(this,"on",n,[t,i])||!t)return this;this._events||(this._events={});var r=this._events[n]||(this._events[n]=[]);return r.push({callback:t,context:i,ctx:i||this}),this},once:function(t,i,r){if(!o(this,"once",t,[i,r])||!i)return this;var f=this,u=n.once(function(){f.off(t,u),i.apply(this,arguments)});u._callback=i;return this.on(t,u,r)},off:function(t,i,r){var s,u,h,c,f,l,e,a;if(!this._events||!o(this,"off",t,[i,r]))return this;if(!t&&!i&&!r)return this._events={},this;for(c=t?[t]:n.keys(this._events),f=0,l=c.length;f<l;f++)if(t=c[f],h=this._events[t]){if(this._events[t]=s=[],i||r)for(e=0,a=h.length;e<a;e++)u=h[e],(i&&i!==u.callback&&i!==u.callback._callback||r&&r!==u.context)&&s.push(u);s.length||delete this._events[t]}return this},trigger:function(n){var t,i,r;return this._events?(t=c.call(arguments,1),!o(this,"trigger",n,t))?this:(i=this._events[n],r=this._events.all,i&&v(i,t),r&&v(r,arguments),this):this},stopListening:function(n,t,i){var r=this._listeners,f,u;if(!r)return this;f=!t&&!i,typeof t=="object"&&(i=this),n&&((r={})[n._listenerId]=n);for(u in r)r[u].off(t,i,this),f&&delete this._listeners[u];return this}},a=/\s+/,o=function(n,t,i,r){var f,e,u,o;if(!i)return!0;if(typeof i=="object"){for(f in i)n[t].apply(n,[f,i[f]].concat(r));return!1}if(a.test(i)){for(e=i.split(a),u=0,o=e.length;u<o;u++)n[t].apply(n,[e[u]].concat(r));return!1}return!0},v=function(n,t){var i,r=-1,u=n.length,f=t[0],e=t[1],o=t[2];switch(t.length){case 0:while(++r<u)(i=n[r]).callback.call(i.ctx);return;case 1:while(++r<u)(i=n[r]).callback.call(i.ctx,f);return;case 2:while(++r<u)(i=n[r]).callback.call(i.ctx,f,e);return;case 3:while(++r<u)(i=n[r]).callback.call(i.ctx,f,e,o);return;default:while(++r<u)(i=n[r]).callback.apply(i.ctx,t)}},ft={listenTo:"on",listenToOnce:"once"};n.each(ft,function(t,r){i[r]=function(i,r,u){var f=this._listeners||(this._listeners={}),e=i._listenerId||(i._listenerId=n.uniqueId("l"));return f[e]=i,typeof r=="object"&&(u=this),i[t](r,u,this),this}}),i.bind=i.on,i.unbind=i.off,n.extend(t,i),f=t.Model=function(t,i){var u,r=t||{};i||(i={}),this.cid=n.uniqueId("c"),this.attributes={},n.extend(this,n.pick(i,y)),i.parse&&(r=this.parse(r,i)||{}),(u=n.result(this,"defaults"))&&(r=n.defaults({},r,u)),this.set(r,i),this.changed={},this.initialize.apply(this,arguments)},y=["url","urlRoot","collection"],n.extend(f.prototype,i,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(n){return this.attributes[n]},escape:function(t){return n.escape(this.get(t))},has:function(n){return this.get(n)!=null},set:function(t,i,r){var u,f,l,e,h,c,a,o,s,v;if(t==null)return this;if(typeof t=="object"?(f=t,r=i):(f={})[t]=i,r||(r={}),!this._validate(f,r))return!1;l=r.unset,h=r.silent,e=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=n.clone(this.attributes),this.changed={}),o=this.attributes,a=this._previousAttributes,this.idAttribute in f&&(this.id=f[this.idAttribute]);for(u in f)i=f[u],n.isEqual(o[u],i)||e.push(u),n.isEqual(a[u],i)?delete this.changed[u]:this.changed[u]=i,l?delete o[u]:o[u]=i;if(!h)for(e.length&&(this._pending=!0),s=0,v=e.length;s<v;s++)this.trigger("change:"+e[s],this,o[e[s]],r);if(c)return this;if(!h)while(this._pending)this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,i){return this.set(t,void 0,n.extend({},i,{unset:!0}))},clear:function(t){var i={},r;for(r in this.attributes)i[r]=void 0;return this.set(i,n.extend({},t,{unset:!0}))},hasChanged:function(t){return t==null?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){var u,i,f,r;if(!t)return this.hasChanged()?n.clone(this.changed):!1;i=!1,f=this._changing?this._previousAttributes:this.attributes;for(r in t)n.isEqual(f[r],u=t[r])||((i||(i={}))[r]=u);return i},previous:function(n){return n==null||!this._previousAttributes?null:this._previousAttributes[n]},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=t?n.clone(t):{},t.parse===void 0&&(t.parse=!0);var i=this,r=t.success;return t.success=function(n){if(!i.set(i.parse(n,t),t))return!1;r&&r(i,n,t),i.trigger("sync",i,n,t)},e(this,t),this.sync("read",this,t)},save:function(t,i,r){var u,o,c,s=this.attributes,f,h;return(t==null||typeof t=="object"?(u=t,r=i):(u={})[t]=i,u&&(!r||!r.wait)&&!this.set(u,r))?!1:(r=n.extend({validate:!0},r),!this._validate(u,r))?!1:(u&&r.wait&&(this.attributes=n.extend({},s,u)),r.parse===void 0&&(r.parse=!0),f=this,h=r.success,r.success=function(t){f.attributes=s;var i=f.parse(t,r);if(r.wait&&(i=n.extend(u||{},i)),n.isObject(i)&&!f.set(i,r))return!1;h&&h(f,t,r),f.trigger("sync",f,t,r)},e(this,r),o=this.isNew()?"create":r.patch?"patch":"update",o==="patch"&&(r.attrs=u),c=this.sync(o,this,r),u&&r.wait&&(this.attributes=s),c)},destroy:function(t){var f;t=t?n.clone(t):{};var i=this,r=t.success,u=function(){i.trigger("destroy",i,i.collection,t)};return(t.success=function(n){(t.wait||i.isNew())&&u(),r&&r(i,n,t),i.isNew()||i.trigger("sync",i,n,t)},this.isNew())?(t.success(),!1):(e(this,t),f=this.sync("delete",this,t),t.wait||u(),f)},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||l();return this.isNew()?t:t+(t.charAt(t.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(n){return n},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},isValid:function(t){return this._validate({},n.extend(t||{},{validate:!0}))},_validate:function(t,i){if(!i.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,i)||null;return r?(this.trigger("invalid",this,r,n.extend(i||{},{validationError:r})),!1):!0}}),p=["keys","values","pairs","invert","pick","omit"],n.each(p,function(t){f.prototype[t]=function(){var i=c.call(arguments);return i.unshift(this.attributes),n[t].apply(n,i)}});var s=t.Collection=function(t,i){i||(i={}),i.url&&(this.url=i.url),i.model&&(this.model=i.model),i.comparator!==void 0&&(this.comparator=i.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},i))},et={add:!0,remove:!0,merge:!0},ot={add:!0,merge:!1,remove:!1};n.extend(s.prototype,i,{model:f,initialize:function(){},toJSON:function(n){return this.map(function(t){return t.toJSON(n)})},sync:function(){return t.sync.apply(this,arguments)},add:function(t,i){return this.set(t,n.defaults(i||{},ot))},remove:function(t,i){t=n.isArray(t)?t.slice():[t],i||(i={});for(var f,r,u=0,e=t.length;u<e;u++)(r=this.get(t[u]),r)&&(delete this._byId[r.id],delete this._byId[r.cid],f=this.indexOf(r),this.models.splice(f,1),this.length--,i.silent||(i.index=f,r.trigger("remove",r,this,i)),this._removeReference(r));return this},set:function(t,i){i=n.defaults(i||{},et),i.parse&&(t=this.parse(t,i)),n.isArray(t)||(t=t?[t]:[]);for(var r,y,s,o,h=i.at,l=this.comparator&&h==null&&i.sort!==!1,v=n.isString(this.comparator)?this.comparator:null,f=[],c=[],a={},u=0,e=t.length;u<e;u++)if(r=this._prepareModel(t[u],i))if(s=this.get(r))i.remove&&(a[s.cid]=!0),i.merge&&(s.set(r.attributes,i),l&&!o&&s.hasChanged(v)&&(o=!0));else if(i.add){f.push(r);r.on("all",this._onModelEvent,this);this._byId[r.cid]=r,r.id!=null&&(this._byId[r.id]=r)}if(i.remove){for(u=0,e=this.length;u<e;++u)a[(r=this.models[u]).cid]||c.push(r);c.length&&this.remove(c,i)}if(f.length&&(l&&(o=!0),this.length+=f.length,h!=null?ut.apply(this.models,[h,0].concat(f)):rt.apply(this.models,f)),o&&this.sort({silent:!0}),i.silent)return this;for(u=0,e=f.length;u<e;u++)(r=f[u]).trigger("add",r,this,i);return o&&this.trigger("sort",this,i),this},reset:function(t,i){i||(i={});for(var r=0,u=this.models.length;r<u;r++)this._removeReference(this.models[r]);return i.previousModels=this.models,this._reset(),this.add(t,n.extend({silent:!0},i)),i.silent||this.trigger("reset",this,i),this},push:function(t,i){return t=this._prepareModel(t,i),this.add(t,n.extend({at:this.length},i)),t},pop:function(n){var t=this.at(this.length-1);return this.remove(t,n),t},unshift:function(t,i){return t=this._prepareModel(t,i),this.add(t,n.extend({at:0},i)),t},shift:function(n){var t=this.at(0);return this.remove(t,n),t},slice:function(n,t){return this.models.slice(n,t)},get:function(n){if(n!=null)return this._byId[n.id!=null?n.id:n.cid||n]},at:function(n){return this.models[n]},where:function(t,i){return n.isEmpty(t)?i?void 0:[]:this[i?"find":"filter"](function(n){for(var i in t)if(t[i]!==n.get(i))return!1;return!0})},findWhere:function(n){return this.where(n,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),n.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},sortedIndex:function(t,i,r){i||(i=this.comparator);var u=n.isFunction(i)?i:function(n){return n.get(i)};return n.sortedIndex(this.models,t,u,r)},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=t?n.clone(t):{},t.parse===void 0&&(t.parse=!0);var r=t.success,i=this;return t.success=function(n){var u=t.reset?"reset":"set";i[u](n,t),r&&r(i,n,t),i.trigger("sync",i,n,t)},e(this,t),this.sync("read",this,t)},create:function(t,i){if(i=i?n.clone(i):{},!(t=this._prepareModel(t,i)))return!1;i.wait||this.add(t,i);var u=this,r=i.success;return i.success=function(n){i.wait&&u.add(t,i),r&&r(t,n,i)},t.save(null,i),t},parse:function(n){return n},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(n,t){if(n instanceof f)return n.collection||(n.collection=this),n;t||(t={}),t.collection=this;var i=new this.model(n,t);return i._validate(n,t)?i:(this.trigger("invalid",this,n,t),!1)},_removeReference:function(n){this===n.collection&&delete n.collection,n.off("all",this._onModelEvent,this)},_onModelEvent:function(n,t,i,r){(n!=="add"&&n!=="remove"||i===this)&&(n==="destroy"&&this.remove(t,r),t&&n==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}}),w=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"],n.each(w,function(t){s.prototype[t]=function(){var i=c.call(arguments);return i.unshift(this.models),n[t].apply(n,i)}}),b=["groupBy","countBy","sortBy"],n.each(b,function(t){s.prototype[t]=function(i,r){var u=n.isFunction(i)?i:function(n){return n.get(i)};return n[t](this.models,u,r)}});var k=t.View=function(t){this.cid=n.uniqueId("view"),this._configure(t||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},st=/^(\S+)\s*(.*)$/,ht=["model","collection","el","id","attributes","className","tagName","events"];n.extend(k.prototype,i,{tagName:"div",$:function(n){return this.$el.find(n)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(n,i){return this.$el&&this.undelegateEvents(),this.$el=n instanceof t.$?n:t.$(n),this.el=this.$el[0],i!==!1&&this.delegateEvents(),this},delegateEvents:function(t){var r,i;if(!(t||(t=n.result(this,"events"))))return this;this.undelegateEvents();for(r in t)if(i=t[r],n.isFunction(i)||(i=this[t[r]]),i){var f=r.match(st),u=f[1],e=f[2];if(i=n.bind(i,this),u+=".delegateEvents"+this.cid,e==="")this.$el.on(u,i);else this.$el.on(u,e,i)}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(t){this.options&&(t=n.extend({},n.result(this,"options"),t)),n.extend(this,n.pick(t,ht)),this.options=t},_ensureElement:function(){var i,r;this.el?this.setElement(n.result(this,"el"),!1):(i=n.extend({},n.result(this,"attributes")),this.id&&(i.id=n.result(this,"id")),this.className&&(i["class"]=n.result(this,"className")),r=t.$("<"+n.result(this,"tagName")+">").attr(i),this.setElement(r,!1))}}),t.sync=function(i,r,u){var e=d[i],f,o,s;return n.defaults(u||(u={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON}),f={type:e,dataType:"json"},u.url||(f.url=n.result(r,"url")||l()),u.data==null&&r&&(i==="create"||i==="update"||i==="patch")&&(f.contentType="application/json",f.data=JSON.stringify(u.attrs||r.toJSON(u))),u.emulateJSON&&(f.contentType="application/x-www-form-urlencoded",f.data=f.data?{model:f.data}:{}),u.emulateHTTP&&(e==="PUT"||e==="DELETE"||e==="PATCH")&&(f.type="POST",u.emulateJSON&&(f.data._method=e),o=u.beforeSend,u.beforeSend=function(n){return n.setRequestHeader("X-HTTP-Method-Override",e),o?o.apply(this,arguments):void 0}),f.type==="GET"||u.emulateJSON||(f.processData=!1),f.type!=="PATCH"||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(f.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}),s=u.xhr=t.ajax(n.extend(f,u)),r.trigger("request",r,s,u),s},d={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"},t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var g=t.Router=function(n){n||(n={}),n.routes&&(this.routes=n.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},ct=/\((.*?)\)/g,lt=/(\(\?)?:\w+/g,at=/\*\w+/g,vt=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(g.prototype,i,{initialize:function(){},route:function(i,r,u){n.isRegExp(i)||(i=this._routeToRegExp(i)),n.isFunction(r)&&(u=r,r=""),u||(u=this[r]);var f=this;return t.history.route(i,function(n){var e=f._extractParameters(i,n);u&&u.apply(f,e),f.trigger.apply(f,["route:"+r].concat(e)),f.trigger("route",r,e),t.history.trigger("route",f,r,e)}),this},navigate:function(n,i){return t.history.navigate(n,i),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,i=n.keys(this.routes);(t=i.pop())!=null;)this.route(t,this.routes[t])}},_routeToRegExp:function(n){return n=n.replace(vt,"\\$&").replace(ct,"(?:$1)?").replace(lt,function(n,t){return t?n:"([^/]+)"}).replace(at,"(.*?)"),new RegExp("^"+n+"$")},_extractParameters:function(t,i){var r=t.exec(i).slice(1);return n.map(r,function(n){return n?decodeURIComponent(n):null})}});var u=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},nt=/^[#\/]|\s+$/g,yt=/^\/+|\/+$/g,pt=/msie [\w.]+/,wt=/\/$/;u.started=!1,n.extend(u.prototype,i,{interval:50,getHash:function(n){var t=(n||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(n,t){if(n==null)if(this._hasPushState||!this._wantsHashChange||t){n=this.location.pathname;var i=this.root.replace(wt,"");n.indexOf(i)||(n=n.substr(i.length))}else n=this.getHash();return n.replace(nt,"")},start:function(i){var r,f;if(u.started)throw new Error("Backbone.history has already been started");u.started=!0,this.options=n.extend({},{root:"/"},this.options,i),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment(),o=document.documentMode,s=pt.exec(navigator.userAgent.toLowerCase())&&(!o||o<=7);if(this.root=("/"+this.root+"/").replace(yt,"/"),s&&this._wantsHashChange&&(this.iframe=t.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(e)),this._hasPushState)t.$(window).on("popstate",this.checkUrl);else if(this._wantsHashChange&&"onhashchange"in window&&!s)t.$(window).on("hashchange",this.checkUrl);else this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval));return(this.fragment=e,r=this.location,f=r.pathname.replace(/[^\/]$/,"$&/")===this.root,this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!f)?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&f&&r.hash&&(this.fragment=this.getHash().replace(nt,""),this.history.replaceState({},document.title,this.root+this.fragment+r.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),u.started=!1},route:function(n,t){this.handlers.unshift({route:n,callback:t})},checkUrl:function(){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(t){var i=this.fragment=this.getFragment(t);return n.any(this.handlers,function(n){if(n.route.test(i))return n.callback(i),!0})},navigate:function(n,t){if(!u.started)return!1;if(t&&t!==!0||(t={trigger:t}),n=this.getFragment(n||""),this.fragment!==n){this.fragment=n;var i=this.root+n;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,i);else if(this._wantsHashChange)this._updateHash(this.location,n,t.replace),this.iframe&&n!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,n,t.replace));else return this.location.assign(i);t.trigger&&this.loadUrl(n)}},_updateHash:function(n,t,i){if(i){var r=n.href.replace(/(javascript:|#).*$/,"");n.replace(r+"#"+t)}else n.hash="#"+t}}),t.history=new u,tt=function(t,i){var u=this,r,f;return r=t&&n.has(t,"constructor")?t.constructor:function(){return u.apply(this,arguments)},n.extend(r,u,i),f=function(){this.constructor=r},f.prototype=u.prototype,r.prototype=new f,t&&n.extend(r.prototype,t),r.__super__=u.prototype,r},f.extend=s.extend=g.extend=k.extend=u.extend=tt,l=function(){throw new Error('A "url" property or function must be specified');},e=function(n,t){var i=t.error;t.error=function(r){i&&i(n,r,t),n.trigger("error",n,r,t)}}}.call(this),+function(n){"use strict";var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",n,t)},i;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur";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)[this.type](this.getDelegateOptions()).data("bs."+this.type);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.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);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 o=n.Event("show.bs."+this.type),i,l;if(this.hasContent()&&this.enabled){if(this.$element.trigger(o),o.isDefaultPrevented())return;i=this.tip(),this.setContent(),this.options.animation&&i.addClass("fade");var t=typeof this.options.placement=="function"?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,h=s.test(t);h&&(t=t.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(t),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),u=i[0].offsetWidth,f=i[0].offsetHeight;if(h){var e=this.$element.parent(),a=t,c=document.documentElement.scrollTop||document.body.scrollTop,v=this.options.container=="body"?window.innerWidth:e.outerWidth(),y=this.options.container=="body"?window.innerHeight:e.outerHeight(),p=this.options.container=="body"?0:e.offset().left;t=t=="bottom"&&r.top+r.height+f-c>y?"top":t=="top"&&r.top-c-f<0?"bottom":t=="right"&&r.right+u>v?"left":t=="left"&&r.left-u<p?"right":t,i.removeClass(a).addClass(t)}l=this.getCalculatedOffset(t,r,u,f),this.applyPlacement(l,t),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(n,t){var h,i=this.tip(),c=i[0].offsetWidth,f=i[0].offsetHeight,e=parseInt(i.css("margin-top"),10),o=parseInt(i.css("margin-left"),10),u,r,s;isNaN(e)&&(e=0),isNaN(o)&&(o=0),n.top=n.top+e,n.left=n.left+o,i.offset(n).addClass("in"),u=i[0].offsetWidth,r=i[0].offsetHeight,t=="top"&&r!=f&&(h=!0,n.top=n.top+f-r),/bottom|top/.test(t)?(s=0,n.left<0&&(s=n.left*-2,n.left=0,i.offset(n),u=i[0].offsetWidth,r=i[0].offsetHeight),this.replaceArrow(s-c+u,u,"left")):this.replaceArrow(r-f,r,"top"),h&&i.offset(n)},t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")},t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t),n.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function r(){u.hoverState!="in"&&t.detach()}var u=this,t=this.tip(),i=n.Event("hide.bs."+this.type);if(this.$element.trigger(i),!i.isDefaultPrevented())return t.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?t.one(n.support.transition.end,r).emulateTransitionEnd(150):r(),this.$element.trigger("hidden.bs."+this.type),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(){var t=this.$element[0];return n.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},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.getTitle=function(){var t,i=this.$element,n=this.options;return t=i.attr("data-original-title")||(typeof n.title=="function"?n.title.call(i[0]):n.title)},t.prototype.tip=function(){return this.$tip=this.$tip||n(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var i=t?n(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)},i=n.fn.tooltip,n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f=typeof i=="object"&&i;r||u.data("bs.tooltip",r=new t(this,f)),typeof i=="string"&&r[i]()})},n.fn.tooltip.Constructor=t,n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(window.jQuery),+function(n){"use strict";var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r),this.$window=n(window).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this)),this.$element=n(i),this.affixed=this.unpin=null,this.checkPosition()},i;t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0},t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){var i;if(this.$element.is(":visible")){var s=n(document).height(),e=this.$window.scrollTop(),o=this.$element.offset(),r=this.options.offset,f=r.top,u=r.bottom;(typeof r!="object"&&(u=f=r),typeof f=="function"&&(f=r.top()),typeof u=="function"&&(u=r.bottom()),i=this.unpin!=null&&e+this.unpin<=o.top?!1:u!=null&&o.top+this.$element.height()>=s-u?"bottom":f!=null&&e<=f?"top":!1,this.affixed!==i)&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin=i=="bottom"?o.top-e:null,this.$element.removeClass(t.RESET).addClass("affix"+(i?"-"+i:"")),i=="bottom"&&this.$element.offset({top:document.body.offsetHeight-u-this.$element.height()}))}},i=n.fn.affix,n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f=typeof i=="object"&&i;r||u.data("bs.affix",r=new t(this,f)),typeof i=="string"&&r[i]()})},n.fn.affix.Constructor=t,n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{},t.offsetBottom&&(t.offset.bottom=t.offsetBottom),t.offsetTop&&(t.offset.top=t.offsetTop),i.affix(t)})})}(window.jQuery),+function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;(r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=n(r),t&&t.preventDefault(),i.length||(i=u.hasClass("alert")?u:u.parent()),i.trigger(t=n.Event("close.bs.alert")),t.isDefaultPrevented())||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one(n.support.transition.end,f).emulateTransitionEnd(150):f())},r=n.fn.alert,n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this)),typeof i=="string"&&u[i].call(r)})},n.fn.alert.Constructor=t,n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(window.jQuery),+function(n){"use strict";var t=function(i,r){this.$element=n(i),this.options=n.extend({},t.DEFAULTS,r)},i;t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(n){var i="disabled",t=this.$element,r=t.is("input")?"val":"html",u=t.data();n=n+"Text",u.resetText||t.data("resetText",t[r]()),t[r](u[n]||this.options[n]),setTimeout(function(){n=="loadingText"?t.addClass(i).attr(i,i):t.removeClass(i).removeAttr(i)},0)},t.prototype.toggle=function(){var n=this.$element.closest('[data-toggle="buttons"]'),t;n.length&&(t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change"),t.prop("type")==="radio"&&n.find(".active").removeClass("active")),this.$element.toggleClass("active")},i=n.fn.button,n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f=typeof i=="object"&&i;r||u.data("bs.button",r=new t(this,f)),i=="toggle"?r.toggle():i&&r.setState(i)})},n.fn.button.Constructor=t,n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle"),t.preventDefault()})}(window.jQuery),+function(n){"use strict";var t=function(t,i){this.$element=n(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.pause=="hover"&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this},t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},t.prototype.to=function(t){var r=this,i=this.getActiveIndex();if(!(t>this.$items.length-1)&&!(t<0))return this.sliding?this.$element.one("slid",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition.end&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),s=this.interval,f=t=="next"?"left":"right",h=t=="next"?"first":"last",o=this,e;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[h]()}if(this.sliding=!0,s&&this.pause(),e=n.Event("slide.bs.carousel",{relatedTarget:r[0],direction:f}),!r.hasClass("active")){if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");this.$element.one("slid",function(){var t=n(o.$indicators.children()[o.getActiveIndex()]);t&&t.addClass("active")})}if(n.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;r.addClass(t),r[0].offsetWidth,u.addClass(f),r.addClass(f),u.one(n.support.transition.end,function(){r.removeClass([t,f].join(" ")).addClass("active"),u.removeClass(["active",f].join(" ")),o.sliding=!1,setTimeout(function(){o.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;u.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},i=n.fn.carousel,n.fn.carousel=function(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),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()})},n.fn.carousel.Constructor=t,n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var i=n(this),f,r=n(i.attr("data-target")||(f=i.attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),u=i.attr("data-slide-to");u&&(e.interval=!1),r.carousel(e),(u=i.attr("data-slide-to"))&&r.data("bs.carousel").to(u),t.preventDefault()});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);t.carousel(t.data())})})}(window.jQuery),+function(n){"use strict";var t=function(i,r){this.$element=n(i),this.options=n.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=n(this.options.parent)),this.options.toggle&&this.toggle()},i;t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"},t.prototype.show=function(){var u,t,r,i,f,e;if(!this.transitioning&&!this.$element.hasClass("in")&&(u=n.Event("show.bs.collapse"),this.$element.trigger(u),!u.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(r=t.data("bs.collapse"),r&&r.transitioning)return;t.collapse("hide"),r||t.data("bs.collapse",null)}if(i=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1,f=function(){this.$element.removeClass("collapsing").addClass("in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")},!n.support.transition)return f.call(this);e=n.camelCase(["scroll",i].join("-")),this.$element.one(n.support.transition.end,n.proxy(f,this)).emulateTransitionEnd(350)[i](this.$element[0][e])}},t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented())){if(t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")},!n.support.transition)return r.call(this);this.$element[t](0).one(n.support.transition.end,n.proxy(r,this)).emulateTransitionEnd(350)}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i=n.fn.collapse,n.fn.collapse=function(i){return this.each(function(){var r=n(this),u=r.data("bs.collapse"),f=n.extend({},t.DEFAULTS,r.data(),typeof i=="object"&&i);u||r.data("bs.collapse",u=new t(this,f)),typeof i=="string"&&u[i]()})},n.fn.collapse.Constructor=t,n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var i=n(this),e,s=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),r=n(s),u=r.data("bs.collapse"),h=u?"toggle":i.data(),f=i.attr("data-parent"),o=f&&n(f);u&&u.transitioning||(o&&o.find('[data-toggle=collapse][data-parent="'+f+'"]').not(i).addClass("collapsed"),i[r.hasClass("in")?"addClass":"removeClass"]("collapsed")),r.collapse(h)})}(window.jQuery),+function(n){"use strict";function r(){n(e).remove(),n(i).each(function(t){var i=u(n(this));i.hasClass("open")&&((i.trigger(t=n.Event("hide.bs.dropdown")),t.isDefaultPrevented())||i.removeClass("open").trigger("hidden.bs.dropdown"))})}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}var e=".dropdown-backdrop",i="[data-toggle=dropdown]",t=function(t){var i=n(t).on("click.bs.dropdown",this.toggle)},f;t.prototype.toggle=function(t){var f=n(this),i,e;if(!f.is(".disabled, :disabled")){if(i=u(f),e=i.hasClass("open"),r(),!e){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length)n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r);if(i.trigger(t=n.Event("show.bs.dropdown")),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown"),f.focus()}return!1}},t.prototype.keydown=function(t){var e,o,s,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&t.keyCode==27)return t.which==27&&o.find(i).focus(),e.click();(f=n("[role=menu] li:not(.divider):visible a",o),f.length)&&(r=f.index(f.filter(":focus")),t.keyCode==38&&r>0&&r--,t.keyCode==40&&r<f.length-1&&r++,~r||(r=0),f.eq(r).focus())}},f=n.fn.dropdown,n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("dropdown");u||r.data("dropdown",u=new t(this)),typeof i=="string"&&u[i].call(r)})},n.fn.dropdown.Constructor=t,n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i+", [role=menu]",t.prototype.keydown)}(window.jQuery),+function(n){"use strict";var t=function(t,i){this.options=i,this.$element=n(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)},i;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(n){return this[this.isShown?"hide":"show"](n)},t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});if(this.$element.trigger(r),!this.isShown&&!r.isDefaultPrevented()){this.isShown=!0,this.escape();this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this));this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(document.body),i.$element.show(),u&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus(),r=n.Event("shown.bs.modal",{relatedTarget:t}),u?i.$element.find(".modal-dialog").one(n.support.transition.end,function(){i.$element.focus().trigger(r)}).emulateTransitionEnd(300):i.$element.focus().trigger(r)})}},t.prototype.hide=function(t){(t&&t.preventDefault(),t=n.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented())&&(this.isShown=!1,this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.focus()},this))},t.prototype.escape=function(){if(this.isShown&&this.options.keyboard)this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){n.which==27&&this.hide()},this));else this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var n=this;this.$element.hide(),this.backdrop(function(){n.removeBackdrop(),n.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var u=this,r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body);this.$element.on("click.dismiss.modal",n.proxy(function(n){n.target===n.currentTarget&&(this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this));if(i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()},i=n.fn.modal,n.fn.modal=function(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),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)})},n.fn.modal.Constructor=t,n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());t.preventDefault();u.modal(f,this).one("hide",function(){i.is(":visible")&&i.focus()})});n(document).on("show.bs.modal",".modal",function(){n(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){n(document.body).removeClass("modal-open")})}(window.jQuery),+function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'}),t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle(),i=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](t),n.find(".popover-content")[this.options.html?"html":"text"](i),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")},t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip},i=n.fn.popover,n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f=typeof i=="object"&&i;r||u.data("bs.popover",r=new t(this,f)),typeof i=="string"&&r[i]()})},n.fn.popover.Constructor=t,n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(window.jQuery),+function(n){"use strict";function t(i,r){var u,f=n.proxy(this.process,this);this.$element=n(i).is("body")?n(window):n(i),this.$body=n("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=n.extend({},t.DEFAULTS,r),this.selector=(this.options.target||(u=n(i).attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=n([]),this.targets=n([]),this.activeTarget=null,this.refresh(),this.process()}t.DEFAULTS={offset:10},t.prototype.refresh=function(){var i=this.$element[0]==window?"offset":"position",t,r;this.offsets=n([]),this.targets=n([]),t=this,r=this.$body.find(this.selector).map(function(){var f=n(this),r=f.data("target")||f.attr("href"),u=/^#\w/.test(r)&&n(r);return u&&u.length&&[[u[i]().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||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.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget,n;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])},t.prototype.activate=function(t){this.activeTarget=t,n(this.selector).parents(".active").removeClass("active");var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")};var i=n.fn.scrollspy;n.fn.scrollspy=function(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]()})},n.fn.scrollspy.Constructor=t,n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(window.jQuery),+function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.attr("data-target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.parent("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})}))},t.prototype.activate=function(t,i,r){function e(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),f?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var u=i.find("> .active"),f=r&&n.support.transition&&u.hasClass("fade");f?u.one(n.support.transition.end,e).emulateTransitionEnd(150):e(),u.removeClass("in")},i=n.fn.tab,n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this)),typeof i=="string"&&r[i]()})},n.fn.tab.Constructor=t,n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),n(this).tab("show")})}(window.jQuery),+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(i.style[n]!==undefined)return{end:t[n]}}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one(n.support.transition.end,function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this},n(function(){n.support.transition=t()})}(window.jQuery),function(n){function g(t,i,r){var u=this;return this.on("click.pjax",t,function(t){var e=n.extend({},f(i,r));e.container||(e.container=n(this).attr("data-pjax")||u),a(t,e)})}function a(i,r,u){var e;if(u=f(r,u),e=i.currentTarget,e.tagName.toUpperCase()!=="A")throw"$.fn.pjax or $.pjax.click requires an anchor element";if(!(i.which>1)&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&!i.altKey&&location.protocol===e.protocol&&location.hostname===e.hostname&&(!e.hash||e.href.replace(e.hash,"")!==location.href.replace(location.hash,""))&&e.href!==location.href+"#"){var h={url:e.href,container:n(e).attr("data-pjax"),target:e},o=n.extend({},h,u),s=n.Event("pjax:click");n(e).trigger(s,[o]),s.isDefaultPrevented()||(t(o),i.preventDefault())}}function nt(i,r,u){var e,o;if(u=f(r,u),e=i.currentTarget,e.tagName.toUpperCase()!=="FORM")throw"$.pjax.submit requires a form element";o={type:e.method.toUpperCase(),url:e.action,data:n(e).serializeArray(),container:n(e).attr("data-pjax"),target:e},t(n.extend({},o,u)),i.preventDefault()}function t(i){function r(t,i){var r=n.Event(t,{relatedTarget:c});return e.trigger(r,i),!r.isDefaultPrevented()}var o,f;i=n.extend(!0,{},n.ajaxSettings,t.defaults,i),n.isFunction(i.url)&&(i.url=i.url());var c=i.target,s=h(i.url).hash,e=i.context=w(i.container);return i.data||(i.data={}),i.data._pjax=e.selector,i.beforeSend=function(n,t){if(t.type!=="GET"&&(t.timeout=0),n.setRequestHeader("X-PJAX","true"),n.setRequestHeader("X-PJAX-Container",e.selector),!r("pjax:beforeSend",[n,t]))return!1;t.timeout>0&&(o=setTimeout(function(){r("pjax:timeout",[n,i])&&n.abort("timeout")},t.timeout),t.timeout=0),i.requestUrl=h(t.url).href},i.complete=function(n,t){o&&clearTimeout(o),r("pjax:complete",[n,t,i]),r("pjax:end",[n,i])},i.error=function(n,t,f){var e=b("",n,i),o=r("pjax:error",[n,t,f,i]);i.type=="GET"&&t!=="abort"&&o&&u(e.url)},i.success=function(f,o,c){var w=typeof n.pjax.defaults.version=="function"?n.pjax.defaults.version():n.pjax.defaults.version,k=c.getResponseHeader("X-PJAX-Version"),l=b(f,c,i),v,a,p;if(w&&k&&w!==k){u(l.url);return}if(!l.contents){u(l.url);return}t.state={id:i.id||y(),url:l.url,title:l.title,container:e.selector,fragment:i.fragment,timeout:i.timeout},(i.push||i.replace)&&window.history.replaceState(t.state,l.title,l.url),document.activeElement.blur(),r("pjax:beforeReplace",[l.contents,i]),l.title&&(document.title=l.title),e.html(l.contents),v=e.find("input[autofocus], textarea[autofocus]").last()[0],v&&document.activeElement!==v&&v.focus(),ut(l.scripts),typeof i.scrollTo=="number"&&n(window).scrollTop(i.scrollTo),s!==""&&(a=h(l.url),a.hash=s,t.state.url=a.href,window.history.replaceState(t.state,l.title,a.href),p=n(a.hash),p.length&&n(window).scrollTop(p.offset().top)),r("pjax:success",[f,o,c,i])},t.state||(t.state={id:y(),url:window.location.href,title:document.title,container:e.selector,fragment:i.fragment,timeout:i.timeout},window.history.replaceState(t.state,document.title)),f=t.xhr,f&&f.readyState<4&&(f.onreadystatechange=n.noop,f.abort()),t.options=i,f=t.xhr=n.ajax(i),f.readyState>0&&(i.push&&!i.replace&&window.history.pushState(null,"",p(i.requestUrl)),r("pjax:start",[f,i]),r("pjax:send",[f,i])),t.xhr}function tt(i,r){var u={url:window.location.href,push:!1,replace:!0,scrollTo:!1};return t(n.extend(u,f(i,r)))}function u(n){window.history.replaceState(null,"","#"),window.location.replace(n)}function v(r){var f=r.state,e,c,h,l,s;if(f&&f.container){if(o&&it==f.url)return;if(t.state.id===f.id)return;e=n(f.container),e.length?(h=i[f.id],t.state&&(c=t.state.id<f.id?"forward":"back"),l=n.Event("pjax:popstate",{state:f,direction:c}),e.trigger(l),s={id:f.id,url:f.url,container:e,push:!1,fragment:f.fragment,timeout:f.timeout,scrollTo:!1},h?(e.trigger("pjax:start",[null,s]),f.title&&(document.title=f.title),e.html(h),t.state=f,e.trigger("pjax:end",[null,s])):t(s),e[0].offsetHeight):u(location.href)}o=!1}function rt(t){var f=n.isFunction(t.url)?t.url():t.url,u=t.type?t.type.toUpperCase():"GET",r=n("<form>",{method:u==="GET"?"GET":"POST",action:f,style:"display:none"}),i;if(u!=="GET"&&u!=="POST"&&r.append(n("<input>",{type:"hidden",name:"_method",value:u.toLowerCase()})),i=t.data,typeof i=="string")n.each(i.split("&"),function(t,i){var u=i.split("=");r.append(n("<input>",{type:"hidden",name:u[0],value:u[1]}))});else if(typeof i=="object")for(key in i)r.append(n("<input>",{type:"hidden",name:key,value:i[key]}));n(document.body).append(r),r.submit()}function y(){return+new Date}function p(n){return n.replace(/\?_pjax=[^&]+&?/,"?").replace(/_pjax=[^&]+&?/,"").replace(/[\?&]$/,"")}function h(n){var t=document.createElement("a");return t.href=n,t}function f(t,i){return t&&i?i.container=t:i=n.isPlainObject(t)?t:{container:t},i.container&&(i.container=w(i.container)),i}function w(t){if(t=n(t),t.length){if(t.selector!==""&&t.context===document)return t;if(t.attr("id"))return n("#"+t.attr("id"));throw"cant get selector for pjax container!";}else throw"no pjax container for "+t.selector;}function c(n,t){return n.filter(t).add(n.find(t))}function l(t){return n.parseHTML(t,document,!0)}function b(t,i,r){var u={},f,o,e;return(u.url=p(i.getResponseHeader("X-PJAX-URL")||r.requestUrl),/<html/i.test(t)?(o=n(l(t.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0])),f=n(l(t.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]))):o=f=n(l(t)),f.length===0)?u:(u.title=c(o,"title").last().text(),r.fragment?(e=r.fragment==="body"?f:c(f,r.fragment).first(),e.length&&(u.contents=e.contents(),u.title||(u.title=e.attr("title")||e.data("title")))):/<html/i.test(t)||(u.contents=f),u.contents&&(u.contents=u.contents.not(function(){return n(this).is("title")}),u.contents.find("title").remove(),u.scripts=c(u.contents,"script[src]").remove(),u.contents=u.contents.not(u.scripts)),u.title&&(u.title=n.trim(u.title)),u)}function ut(t){if(t){var i=n("script[src]");t.each(function(){var r=this.src,u=i.filter(function(){return this.src===r}),t;u.length||(t=document.createElement("script"),t.type=n(this).attr("type"),t.src=n(this).attr("src"),document.head.appendChild(t))})}}function ft(){return n("meta").filter(function(){var t=n(this).attr("http-equiv");return t&&t.toUpperCase()==="X-PJAX-VERSION"}).attr("content")}function k(){n.fn.pjax=g,n.pjax=t,n.pjax.enable=n.noop,n.pjax.disable=d,n.pjax.click=a,n.pjax.submit=nt,n.pjax.reload=tt,n.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:ft};n(window).on("popstate.pjax",v)}function d(){n.fn.pjax=function(){return this},n.pjax=rt,n.pjax.enable=k,n.pjax.disable=n.noop,n.pjax.click=n.noop,n.pjax.submit=n.noop,n.pjax.reload=function(){window.location.reload()},n(window).off("popstate.pjax",v)}var o=!0,it=window.location.href,s=window.history.state;s&&s.container&&(t.state=s),"state"in window.history&&(o=!1);var i={},e=[],r=[];n.inArray("state",n.event.props)<0&&n.event.props.push("state"),n.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),n.support.pjax?k():d()}(jQuery),function(n){n.color={},n.color.make=function(t,i,r,u){var f={};return f.r=t||0,f.g=i||0,f.b=r||0,f.a=u!=null?u:1,f.add=function(n,t){for(var i=0;i<n.length;++i)f[n.charAt(i)]+=t;return f.normalize()},f.scale=function(n,t){for(var i=0;i<n.length;++i)f[n.charAt(i)]*=t;return f.normalize()},f.toString=function(){return f.a>=1?"rgb("+[f.r,f.g,f.b].join(",")+")":"rgba("+[f.r,f.g,f.b,f.a].join(",")+")"},f.normalize=function(){function n(n,t,i){return t<n?n:t>i?i:t}return f.r=n(0,parseInt(f.r),255),f.g=n(0,parseInt(f.g),255),f.b=n(0,parseInt(f.b),255),f.a=n(0,f.a,1),f},f.clone=function(){return n.color.make(f.r,f.b,f.g,f.a)},f.normalize()},n.color.extract=function(t,i){var r;do{if(r=t.css(i).toLowerCase(),r!=""&&r!="transparent")break;t=t.parent()}while(t.length&&!n.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&(r="transparent"),n.color.parse(r)},n.color.parse=function(i){var r,u=n.color.make,f;return(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))?u(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)):(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))?u(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4])):(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(i))?u(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55):(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))?u(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4])):(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))?u(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)):(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(i))?u(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)):(f=n.trim(i).toLowerCase(),f=="transparent"?u(255,255,255,0):(r=t[f]||[0,0,0],u(r[0],r[1],r[2])))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(n){function t(t,i){var r=i.children("."+t)[0];if(r==null&&(r=document.createElement("canvas"),r.className=t,n(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(i),!r.getContext))if(window.G_vmlCanvasManager)r=window.G_vmlCanvasManager.initElement(r);else throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");this.element=r;var u=this.context=r.getContext("2d"),f=window.devicePixelRatio||1,e=u.webkitBackingStorePixelRatio||u.mozBackingStorePixelRatio||u.msBackingStorePixelRatio||u.oBackingStorePixelRatio||u.backingStorePixelRatio||1;this.pixelRatio=f/e,this.resize(i.width(),i.height()),this.textContainer=null,this.text={},this._textCache={}}function r(i,r,f,e){function nt(n,t){t=[l].concat(t);for(var i=0;i<n.length;++i)n[i].apply(this,t)}function ui(){for(var u={Canvas:t},r,i=0;i<e.length;++i)r=e[i],r.init(l,u),r.options&&n.extend(!0,o,r.options)}function fi(t){var f;n.extend(!0,o,t),t&&t.colors&&(o.colors=t.colors),o.xaxis.color==null&&(o.xaxis.color=n.color.parse(o.grid.color).scale("a",.22).toString()),o.yaxis.color==null&&(o.yaxis.color=n.color.parse(o.grid.color).scale("a",.22).toString()),o.xaxis.tickColor==null&&(o.xaxis.tickColor=o.grid.tickColor||o.xaxis.color),o.yaxis.tickColor==null&&(o.yaxis.tickColor=o.grid.tickColor||o.yaxis.color),o.grid.borderColor==null&&(o.grid.borderColor=o.grid.color),o.grid.tickColor==null&&(o.grid.tickColor=n.color.parse(o.grid.color).scale("a",.22).toString());for(var r,s=i.css("font-size"),c=s?+s.replace("px",""):13,h={style:i.css("font-style"),size:Math.round(.8*c),variant:i.css("font-variant"),weight:i.css("font-weight"),family:i.css("font-family")},e=o.xaxes.length||1,u=0;u<e;++u)r=o.xaxes[u],r&&!r.tickColor&&(r.tickColor=r.color),r=n.extend(!0,{},o.xaxis,r),o.xaxes[u]=r,r.font&&(r.font=n.extend({},h,r.font),r.font.color||(r.font.color=r.color),r.font.lineHeight||(r.font.lineHeight=Math.round(r.font.size*1.15)));for(e=o.yaxes.length||1,u=0;u<e;++u)r=o.yaxes[u],r&&!r.tickColor&&(r.tickColor=r.color),r=n.extend(!0,{},o.yaxis,r),o.yaxes[u]=r,r.font&&(r.font=n.extend({},h,r.font),r.font.color||(r.font.color=r.color),r.font.lineHeight||(r.font.lineHeight=Math.round(r.font.size*1.15)));for(o.xaxis.noTicks&&o.xaxis.ticks==null&&(o.xaxis.ticks=o.xaxis.noTicks),o.yaxis.noTicks&&o.yaxis.ticks==null&&(o.yaxis.ticks=o.yaxis.noTicks),o.x2axis&&(o.xaxes[1]=n.extend(!0,{},o.xaxis,o.x2axis),o.xaxes[1].position="top",o.x2axis.min==null&&(o.xaxes[1].min=null),o.x2axis.max==null&&(o.xaxes[1].max=null)),o.y2axis&&(o.yaxes[1]=n.extend(!0,{},o.yaxis,o.y2axis),o.yaxes[1].position="right",o.y2axis.min==null&&(o.yaxes[1].min=null),o.y2axis.max==null&&(o.yaxes[1].max=null)),o.grid.coloredAreas&&(o.grid.markings=o.grid.coloredAreas),o.grid.coloredAreasColor&&(o.grid.markingsColor=o.grid.coloredAreasColor),o.lines&&n.extend(!0,o.series.lines,o.lines),o.points&&n.extend(!0,o.series.points,o.points),o.bars&&n.extend(!0,o.series.bars,o.bars),o.shadowSize!=null&&(o.series.shadowSize=o.shadowSize),o.highlightColor!=null&&(o.series.highlightColor=o.highlightColor),u=0;u<o.xaxes.length;++u)et(y,u+1).options=o.xaxes[u];for(u=0;u<o.yaxes.length;++u)et(w,u+1).options=o.yaxes[u];for(f in p)o.hooks[f]&&o.hooks[f].length&&(p[f]=p[f].concat(o.hooks[f]));nt(p.processOptions,[o])}function ht(n){c=ei(n),si(),hi()}function ei(t){for(var u=[],r,i=0;i<t.length;++i)r=n.extend(!0,{},o.series),t[i].data!=null?(r.data=t[i].data,delete t[i].data,n.extend(!0,r,t[i]),t[i].data=r.data):r.data=t[i],u.push(r);return u}function ft(n,t){var i=n[t+"axis"];return typeof i=="object"&&(i=i.n),typeof i!="number"&&(i=1),i}function it(){return n.grep(y.concat(w),function(n){return n})}function ct(n){for(var i={},t,r=0;r<y.length;++r)t=y[r],t&&t.used&&(i["x"+t.n]=t.c2p(n.left));for(r=0;r<w.length;++r)t=w[r],t&&t.used&&(i["y"+t.n]=t.c2p(n.top));return i.x1!==undefined&&(i.x=i.x1),i.y1!==undefined&&(i.y=i.y1),i}function oi(n){for(var u={},t,i,r=0;r<y.length;++r)if(t=y[r],t&&t.used&&(i="x"+t.n,n[i]==null&&t.n==1&&(i="x"),n[i]!=null)){u.left=t.p2c(n[i]);break}for(r=0;r<w.length;++r)if(t=w[r],t&&t.used&&(i="y"+t.n,n[i]==null&&t.n==1&&(i="y"),n[i]!=null)){u.top=t.p2c(n[i]);break}return u}function et(t,i){return t[i-1]||(t[i-1]={n:i,direction:t==y?"x":"y",options:n.extend(!0,{},t==y?o.xaxis:o.yaxis)}),t[i-1]}function si(){for(var f=c.length,e=-1,u,h,t,l,a,i=0;i<c.length;++i)u=c[i].color,u!=null&&(f--,typeof u=="number"&&u>e&&(e=u));f<=e&&(f=e+1);var v,s=[],p=o.colors,b=p.length,r=0;for(i=0;i<f;i++)v=n.color.parse(p[i%b]||"#666"),i%b==0&&i&&(r=r>=0?r<.5?-r-.2:0:-r),s[i]=v.scale("rgb",1+r);for(h=0,i=0;i<c.length;++i){if(t=c[i],t.color==null?(t.color=s[h].toString(),++h):typeof t.color=="number"&&(t.color=s[t.color].toString()),t.lines.show==null){a=!0;for(l in t)if(t[l]&&t[l].show){a=!1;break}a&&(t.lines.show=!0)}t.lines.zero==null&&(t.lines.zero=!!t.lines.fill),t.xaxis=et(y,ft(t,"x")),t.yaxis=et(w,ft(t,"y"))}}function hi(){function b(n,t,i){t<n.datamin&&t!=-v&&(n.datamin=t),i>n.datamax&&i!=v&&(n.datamax=i)}var y=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,v=Number.MAX_VALUE,f,l,e,r,st,t,u,h,ht,ct,lt,i,s,ut,ft,o,et,ot,k,a;for(n.each(it(),function(n,t){t.datamin=y,t.datamax=w,t.used=!1}),f=0;f<c.length;++f)t=c[f],t.datapoints={points:[]},nt(p.processRawData,[t,t.data,t.datapoints]);for(f=0;f<c.length;++f)if(t=c[f],ft=t.data,o=t.datapoints.format,o||(o=[],o.push({x:!0,number:!0,required:!0}),o.push({y:!0,number:!0,required:!0}),(t.bars.show||t.lines.show&&t.lines.fill)&&(et=!!(t.bars.show&&t.bars.zero||t.lines.show&&t.lines.zero),o.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:et}),t.bars.horizontal&&(delete o[o.length-1].y,o[o.length-1].x=!0)),t.datapoints.format=o),t.datapoints.pointsize==null)for(t.datapoints.pointsize=o.length,h=t.datapoints.pointsize,u=t.datapoints.points,ot=t.lines.show&&t.lines.steps,t.xaxis.used=t.yaxis.used=!0,l=e=0;l<ft.length;++l,e+=h){if(ut=ft[l],k=ut==null,!k)for(r=0;r<h;++r)i=ut[r],s=o[r],s&&(s.number&&i!=null&&(i=+i,isNaN(i)?i=null:i==Infinity?i=v:i==-Infinity&&(i=-v)),i==null&&(s.required&&(k=!0),s.defaultValue!=null&&(i=s.defaultValue))),u[e+r]=i;if(k)for(r=0;r<h;++r)i=u[e+r],i!=null&&(s=o[r],s.autoscale!==!1&&(s.x&&b(t.xaxis,i,i),s.y&&b(t.yaxis,i,i))),u[e+r]=null;else if(ot&&e>0&&u[e-h]!=null&&u[e-h]!=u[e]&&u[e-h+1]!=u[e+1]){for(r=0;r<h;++r)u[e+h+r]=u[e+r];u[e+1]=u[e-h+1],e+=h}}for(f=0;f<c.length;++f)t=c[f],nt(p.processDatapoints,[t,t.datapoints]);for(f=0;f<c.length;++f){t=c[f],u=t.datapoints.points,h=t.datapoints.pointsize,o=t.datapoints.format;var d=y,g=y,tt=w,rt=w;for(l=0;l<u.length;l+=h)if(u[l]!=null)for(r=0;r<h;++r)(i=u[l+r],s=o[r],s&&s.autoscale!==!1&&i!=v&&i!=-v)&&(s.x&&(i<d&&(d=i),i>tt&&(tt=i)),s.y&&(i<g&&(g=i),i>rt&&(rt=i)));if(t.bars.show){switch(t.bars.align){case"left":a=0;break;case"right":a=-t.bars.barWidth;break;default:a=-t.bars.barWidth/2}t.bars.horizontal?(g+=a,rt+=a+t.bars.barWidth):(d+=a,tt+=a+t.bars.barWidth)}b(t.xaxis,d,tt),b(t.yaxis,g,rt)}n.each(it(),function(n,t){t.datamin==y&&(t.datamin=null),t.datamax==w&&(t.datamax=null)})}function ci(){i.css("padding",0).children().filter(function(){return!n(this).hasClass("flot-overlay")&&!n(this).hasClass("flot-base")}).remove(),i.css("position")=="static"&&i.css("position","relative"),a=new t("flot-base",i),tt=new t("flot-overlay",i),s=a.context,v=tt.context,k=n(tt.element).unbind();var r=i.data("plot");r&&(r.shutdown(),tt.clear()),i.data("plot",l)}function li(){o.grid.hoverable&&(k.mousemove(bt),k.bind("mouseleave",kt)),o.grid.clickable&&k.click(dt),nt(p.bindEvents,[k])}function lt(){rt&&clearTimeout(rt),k.unbind("mousemove",bt),k.unbind("mouseleave",kt),k.unbind("click",dt),nt(p.shutdown,[k])}function ai(n){function u(n){return n}var i,r,t=n.options.transform||u,f=n.options.inverseTransform;n.direction=="x"?(i=n.scale=d/Math.abs(t(n.max)-t(n.min)),r=Math.min(t(n.max),t(n.min))):(i=n.scale=b/Math.abs(t(n.max)-t(n.min)),i=-i,r=Math.max(t(n.max),t(n.min))),n.p2c=t==u?function(n){return(n-r)*i}:function(n){return(t(n)-r)*i},n.c2p=f?function(n){return f(r+n/i)}:function(n){return r+n/i}}function vi(n){for(var t=n.options,u=n.ticks||[],i=t.labelWidth||0,f=t.labelHeight||0,s=i||(n.direction=="x"?Math.floor(a.width/(u.length||1)):null),h=n.direction+"Axis "+n.direction+n.n+"Axis",c="flot-"+n.direction+"-axis flot-"+n.direction+n.n+"-axis "+h,l=t.font||"flot-tick-label tickLabel",e,o,r=0;r<u.length;++r)(e=u[r],e.label)&&(o=a.getTextInfo(c,e.label,l,null,s),i=Math.max(i,o.width),f=Math.max(f,o.height));n.labelWidth=t.labelWidth||i,n.labelHeight=t.labelHeight||f}function yi(t){var r=t.labelWidth,u=t.labelHeight,e=t.options.position,l=t.direction==="x",f=t.options.tickLength,i=o.grid.axisMargin,s=o.grid.labelMargin,v=!0,p=!0,b=!0,c=!1;n.each(l?y:w,function(n,i){i&&(i.show||i.reserveSpace)&&(i===t?c=!0:i.options.position===e&&(c?p=!1:v=!1),c||(b=!1))}),p&&(i=0),f==null&&(f=b?"full":5),isNaN(+f)||(s+=+f),l?(u+=s,e=="bottom"?(h.bottom+=u+i,t.box={top:a.height-h.bottom,height:u}):(t.box={top:h.top+i,height:u},h.top+=u+i)):(r+=s,e=="left"?(t.box={left:h.left+i,width:r},h.left+=r+i):(h.right+=r+i,t.box={left:a.width-h.right,width:r})),t.position=e,t.tickLength=f,t.box.padding=s,t.innermost=v}function pi(n){n.direction=="x"?(n.box.left=h.left-n.labelWidth/2,n.box.width=a.width-h.left-h.right+n.labelWidth):(n.box.top=h.top-n.labelHeight/2,n.box.height=a.height-h.bottom-h.top+n.labelHeight)}function wi(){var i=o.grid.minBorderMargin,u,r,t;if(i==null)for(i=0,r=0;r<c.length;++r)i=Math.max(i,2*(c[r].points.radius+c[r].points.lineWidth/2));t={left:i,right:i,top:i,bottom:i},n.each(it(),function(n,i){i.reserveSpace&&i.ticks&&i.ticks.length&&(i.direction==="x"?(t.left=Math.max(t.left,i.labelWidth/2),t.right=Math.max(t.right,i.labelWidth/2)):(t.bottom=Math.max(t.bottom,i.labelHeight/2),t.top=Math.max(t.top,i.labelHeight/2)))}),h.left=Math.ceil(Math.max(t.left,h.left)),h.right=Math.ceil(Math.max(t.right,h.right)),h.top=Math.ceil(Math.max(t.top,h.top)),h.bottom=Math.ceil(Math.max(t.bottom,h.bottom))}function at(){var r,e=it(),u=o.grid.show,f,t,i;for(t in h)f=o.grid.margin||0,h[t]=typeof f=="number"?f:f[t]||0;nt(p.processOffset,[h]);for(t in h)h[t]+=typeof o.grid.borderWidth=="object"?u?o.grid.borderWidth[t]:0:u?o.grid.borderWidth:0;if(n.each(e,function(n,t){var i=t.options;t.show=i.show==null?t.used:i.show,t.reserveSpace=i.reserveSpace==null?t.show:i.reserveSpace,bi(t)}),u){for(i=n.grep(e,function(n){return n.show||n.reserveSpace}),n.each(i,function(n,t){ki(t),di(t),gi(t,t.ticks),vi(t)}),r=i.length-1;r>=0;--r)yi(i[r]);wi(),n.each(i,function(n,t){pi(t)})}d=a.width-h.left-h.right,b=a.height-h.bottom-h.top,n.each(e,function(n,t){ai(t)}),u&&tr(),er()}function bi(n){var t=n.options,r=+(t.min!=null?t.min:n.datamin),i=+(t.max!=null?t.max:n.datamax),f=i-r,e,u;f==0?(e=i==0?1:.01,t.min==null&&(r-=e),(t.max==null||t.min!=null)&&(i+=e)):(u=t.autoscaleMargin,u!=null&&(t.min==null&&(r-=f*u,r<0&&n.datamin!=null&&n.datamin>=0&&(r=0)),t.max==null&&(i+=f*u,i>0&&n.datamax!=null&&n.datamax<=0&&(i=0)))),n.min=r,n.max=i}function ki(t){var i=t.options,l,p,h,r,f,s,b,c;l=typeof i.ticks=="number"&&i.ticks>0?i.ticks:.3*Math.sqrt(t.direction=="x"?a.width:a.height);var v=(t.max-t.min)/l,o=-Math.floor(Math.log(v)/Math.LN10),e=i.tickDecimals;if(e!=null&&o>e&&(o=e),p=Math.pow(10,-o),h=v/p,h<1.5?r=1:h<3?(r=2,h>2.25&&(e==null||o+1<=e)&&(r=2.5,++o)):r=h<7.5?5:10,r*=p,i.minTickSize!=null&&r<i.minTickSize&&(r=i.minTickSize),t.delta=v,t.tickDecimals=Math.max(0,e!=null?e:o),t.tickSize=i.tickSize||r,i.mode=="time"&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");t.tickGenerator||(t.tickGenerator=function(n){var i=[],e=u(n.min,n.tickSize),r=0,t=Number.NaN,f;do f=t,t=e+r*n.tickSize,i.push(t),++r;while(t<n.max&&t!=f);return i},t.tickFormatter=function(n,t){var u=t.tickDecimals?Math.pow(10,t.tickDecimals):1,i=""+Math.round(n*u)/u,f,r;return t.tickDecimals!=null&&(f=i.indexOf("."),r=f==-1?0:i.length-f-1,r<t.tickDecimals)?(r?i:i+".")+(""+u).substr(1,t.tickDecimals-r):i}),n.isFunction(i.tickFormatter)&&(t.tickFormatter=function(n,t){return""+i.tickFormatter(n,t)}),i.alignTicksWithAxis!=null&&(f=(t.direction=="x"?y:w)[i.alignTicksWithAxis-1],f&&f.used&&f!=t&&(s=t.tickGenerator(t),s.length>0&&(i.min==null&&(t.min=Math.min(t.min,s[0])),i.max==null&&s.length>1&&(t.max=Math.max(t.max,s[s.length-1]))),t.tickGenerator=function(n){for(var r=[],t,i=0;i<f.ticks.length;++i)t=(f.ticks[i].v-f.min)/(f.max-f.min),t=n.min+t*(n.max-n.min),r.push(t);return r},t.mode||i.tickDecimals!=null||(b=Math.max(0,-Math.floor(Math.log(t.delta)/Math.LN10)+1),c=t.tickGenerator(t),c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(b))||(t.tickDecimals=b))))}function di(t){var i=t.options.ticks,u=[],o,f,e,r;for(i==null||typeof i=="number"&&i>0?u=t.tickGenerator(t):i&&(u=n.isFunction(i)?i(t):i),t.ticks=[],o=0;o<u.length;++o)e=null,r=u[o],typeof r=="object"?(f=+r[0],r.length>1&&(e=r[1])):f=+r,e==null&&(e=t.tickFormatter(f,t)),isNaN(f)||t.ticks.push({v:f,label:e})}function gi(n,t){n.options.autoscaleMargin&&t.length>0&&(n.options.min==null&&(n.min=Math.min(n.min,t[0].v)),n.options.max==null&&t.length>1&&(n.max=Math.max(n.max,t[t.length-1].v)))}function vt(){var n,t;for(a.clear(),nt(p.drawBackground,[s]),n=o.grid,n.show&&n.backgroundColor&&nr(),n.show&&!n.aboveData&&pt(),t=0;t<c.length;++t)nt(p.drawSeries,[s,c[t]]),ir(c[t]);nt(p.draw,[s]),n.show&&n.aboveData&&pt(),a.render(),ut()}function yt(n,t){for(var f,i,r,u,o=it(),s,e=0;e<o.length;++e)if(f=o[e],f.direction==t&&(u=t+f.n+"axis",n[u]||f.n!=1||(u=t+"axis"),n[u])){i=n[u].from,r=n[u].to;break}return n[u]||(f=t=="x"?y[0]:w[0],i=n[t+"1"],r=n[t+"2"]),i!=null&&r!=null&&i>r&&(s=i,i=r,r=s),{from:i,to:r,axis:f}}function nr(){s.save(),s.translate(h.left,h.top),s.fillStyle=ri(o.grid.backgroundColor,b,0,"rgba(255, 255, 255, 0)"),s.fillRect(0,0,d,b),s.restore()}function pt(){var v,f,t,e,k,rt,et,ot,tt,ut,w;if(s.save(),s.translate(h.left,h.top),k=o.grid.markings,k)for(n.isFunction(k)&&(f=l.getAxes(),f.xmin=f.xaxis.min,f.xmax=f.xaxis.max,f.ymin=f.yaxis.min,f.ymax=f.yaxis.max,k=k(f)),v=0;v<k.length;++v){var nt=k[v],i=yt(nt,"x"),r=yt(nt,"y");(i.from==null&&(i.from=i.axis.min),i.to==null&&(i.to=i.axis.max),r.from==null&&(r.from=r.axis.min),r.to==null&&(r.to=r.axis.max),i.to<i.axis.min||i.from>i.axis.max||r.to<r.axis.min||r.from>r.axis.max)||(i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max),r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max),rt=i.from===i.to,et=r.from===r.to,rt&&et)||(i.from=Math.floor(i.axis.p2c(i.from)),i.to=Math.floor(i.axis.p2c(i.to)),r.from=Math.floor(r.axis.p2c(r.from)),r.to=Math.floor(r.axis.p2c(r.to)),rt||et?(ot=nt.lineWidth||o.grid.markingsLineWidth,tt=ot%2?.5:0,s.beginPath(),s.strokeStyle=nt.color||o.grid.markingsColor,s.lineWidth=ot,rt?(s.moveTo(i.to+tt,r.from),s.lineTo(i.to+tt,r.to)):(s.moveTo(i.from,r.to+tt),s.lineTo(i.to,r.to+tt)),s.stroke()):(s.fillStyle=nt.color||o.grid.markingsColor,s.fillRect(i.from,r.to,i.to-i.from,r.from-r.to)))}for(f=it(),t=o.grid.borderWidth,ut=0;ut<f.length;++ut){var u=f[ut],ft=u.box,g=u.tickLength,c,a,y,p;if(u.show&&u.ticks.length!=0){for(s.lineWidth=1,u.direction=="x"?(c=0,a=g=="full"?u.position=="top"?0:b:ft.top-h.top+(u.position=="top"?ft.height:0)):(a=0,c=g=="full"?u.position=="left"?0:d:ft.left-h.left+(u.position=="left"?ft.width:0)),u.innermost||(s.strokeStyle=u.options.color,s.beginPath(),y=p=0,u.direction=="x"?y=d+1:p=b+1,s.lineWidth==1&&(u.direction=="x"?a=Math.floor(a)+.5:c=Math.floor(c)+.5),s.moveTo(c,a),s.lineTo(c+y,a+p),s.stroke()),s.strokeStyle=u.options.tickColor,s.beginPath(),v=0;v<u.ticks.length;++v)(w=u.ticks[v].v,y=p=0,isNaN(w)||w<u.min||w>u.max||g=="full"&&(typeof t=="object"&&t[u.position]>0||t>0)&&(w==u.min||w==u.max))||(u.direction=="x"?(c=u.p2c(w),p=g=="full"?-b:g,u.position=="top"&&(p=-p)):(a=u.p2c(w),y=g=="full"?-d:g,u.position=="left"&&(y=-y)),s.lineWidth==1&&(u.direction=="x"?c=Math.floor(c)+.5:a=Math.floor(a)+.5),s.moveTo(c,a),s.lineTo(c+y,a+p));s.stroke()}}t&&(e=o.grid.borderColor,typeof t=="object"||typeof e=="object"?(typeof t!="object"&&(t={top:t,right:t,bottom:t,left:t}),typeof e!="object"&&(e={top:e,right:e,bottom:e,left:e}),t.top>0&&(s.strokeStyle=e.top,s.lineWidth=t.top,s.beginPath(),s.moveTo(0-t.left,0-t.top/2),s.lineTo(d,0-t.top/2),s.stroke()),t.right>0&&(s.strokeStyle=e.right,s.lineWidth=t.right,s.beginPath(),s.moveTo(d+t.right/2,0-t.top),s.lineTo(d+t.right/2,b),s.stroke()),t.bottom>0&&(s.strokeStyle=e.bottom,s.lineWidth=t.bottom,s.beginPath(),s.moveTo(d+t.right,b+t.bottom/2),s.lineTo(0,b+t.bottom/2),s.stroke()),t.left>0&&(s.strokeStyle=e.left,s.lineWidth=t.left,s.beginPath(),s.moveTo(0-t.left/2,b+t.bottom),s.lineTo(0-t.left/2,0),s.stroke())):(s.lineWidth=t,s.strokeStyle=o.grid.borderColor,s.strokeRect(-t/2,-t/2,d+t,b+t))),s.restore()}function tr(){n.each(it(),function(n,t){var i=t.box,l=t.direction+"Axis "+t.direction+t.n+"Axis",c="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+l,v=t.options.font||"flot-tick-label tickLabel",r,u,f,o,s,e;if(a.removeText(c),t.show&&t.ticks.length!=0)for(e=0;e<t.ticks.length;++e)(r=t.ticks[e],!r.label||r.v<t.min||r.v>t.max)||(t.direction=="x"?(o="center",u=h.left+t.p2c(r.v),t.position=="bottom"?f=i.top+i.padding:(f=i.top+i.height-i.padding,s="bottom")):(s="middle",f=h.top+t.p2c(r.v),t.position=="left"?(u=i.left+i.width-i.padding,o="right"):u=i.left+i.padding),a.addText(c,u,f,r.label,v,null,null,o,s))})}function ir(n){n.lines.show&&rr(n),n.bars.show&&fr(n),n.points.show&&ur(n)}function rr(n){function u(n,t,i,r,u){var l=n.points,a=n.pointsize,v=null,y=null,c;for(s.beginPath(),c=a;c<l.length;c+=a){var f=l[c-a],e=l[c-a+1],o=l[c],h=l[c+1];if(f!=null&&o!=null){if(e<=h&&e<u.min){if(h<u.min)continue;f=(u.min-e)/(h-e)*(o-f)+f,e=u.min}else if(h<=e&&h<u.min){if(e<u.min)continue;o=(u.min-e)/(h-e)*(o-f)+f,h=u.min}if(e>=h&&e>u.max){if(h>u.max)continue;f=(u.max-e)/(h-e)*(o-f)+f,e=u.max}else if(h>=e&&h>u.max){if(e>u.max)continue;o=(u.max-e)/(h-e)*(o-f)+f,h=u.max}if(f<=o&&f<r.min){if(o<r.min)continue;e=(r.min-f)/(o-f)*(h-e)+e,f=r.min}else if(o<=f&&o<r.min){if(f<r.min)continue;h=(r.min-f)/(o-f)*(h-e)+e,o=r.min}if(f>=o&&f>r.max){if(o>r.max)continue;e=(r.max-f)/(o-f)*(h-e)+e,f=r.max}else if(o>=f&&o>r.max){if(f>r.max)continue;h=(r.max-f)/(o-f)*(h-e)+e,o=r.max}(f!=v||e!=y)&&s.moveTo(r.p2c(f)+t,u.p2c(e)+i),v=o,y=h,s.lineTo(r.p2c(o)+t,u.p2c(h)+i)}}s.stroke()}function e(n,t,i){for(var c=n.points,o=n.pointsize,b=Math.min(Math.max(0,i.min),i.max),h=0,k,l=!1,a=1,p=0,w=0,v,y;;){if(o>0&&h>c.length+o)break;h+=o;var r=c[h-o],u=c[h-o+a],f=c[h],e=c[h+a];if(l){if(o>0&&r!=null&&f==null){w=h,o=-o,a=2;continue}if(o<0&&h==p+o){s.fill(),l=!1,o=-o,a=1,h=p=w+o;continue}}if(r!=null&&f!=null){if(r<=f&&r<t.min){if(f<t.min)continue;u=(t.min-r)/(f-r)*(e-u)+u,r=t.min}else if(f<=r&&f<t.min){if(r<t.min)continue;e=(t.min-r)/(f-r)*(e-u)+u,f=t.min}if(r>=f&&r>t.max){if(f>t.max)continue;u=(t.max-r)/(f-r)*(e-u)+u,r=t.max}else if(f>=r&&f>t.max){if(r>t.max)continue;e=(t.max-r)/(f-r)*(e-u)+u,f=t.max}if(l||(s.beginPath(),s.moveTo(t.p2c(r),i.p2c(b)),l=!0),u>=i.max&&e>=i.max){s.lineTo(t.p2c(r),i.p2c(i.max)),s.lineTo(t.p2c(f),i.p2c(i.max));continue}else if(u<=i.min&&e<=i.min){s.lineTo(t.p2c(r),i.p2c(i.min)),s.lineTo(t.p2c(f),i.p2c(i.min));continue}v=r,y=f,u<=e&&u<i.min&&e>=i.min?(r=(i.min-u)/(e-u)*(f-r)+r,u=i.min):e<=u&&e<i.min&&u>=i.min&&(f=(i.min-u)/(e-u)*(f-r)+r,e=i.min),u>=e&&u>i.max&&e<=i.max?(r=(i.max-u)/(e-u)*(f-r)+r,u=i.max):e>=u&&e>i.max&&u<=i.max&&(f=(i.max-u)/(e-u)*(f-r)+r,e=i.max),r!=v&&s.lineTo(t.p2c(v),i.p2c(u)),s.lineTo(t.p2c(r),i.p2c(u)),s.lineTo(t.p2c(f),i.p2c(e)),f!=y&&(s.lineTo(t.p2c(f),i.p2c(e)),s.lineTo(t.p2c(y),i.p2c(e)))}}}var t,i,r,f;s.save(),s.translate(h.left,h.top),s.lineJoin="round",t=n.lines.lineWidth,i=n.shadowSize,t>0&&i>0&&(s.lineWidth=i,s.strokeStyle="rgba(0,0,0,0.1)",r=Math.PI/18,u(n.datapoints,Math.sin(r)*(t/2+i/2),Math.cos(r)*(t/2+i/2),n.xaxis,n.yaxis),s.lineWidth=i/2,u(n.datapoints,Math.sin(r)*(t/2+i/4),Math.cos(r)*(t/2+i/4),n.xaxis,n.yaxis)),s.lineWidth=t,s.strokeStyle=n.color,f=ot(n.lines,n.color,0,b),f&&(s.fillStyle=f,e(n.datapoints,n.xaxis,n.yaxis)),t>0&&u(n.datapoints,0,0,n.xaxis,n.yaxis),s.restore()}function ur(n){function r(n,t,i,r,u,f,e,o){for(var a=n.points,v=n.pointsize,h,c,l=0;l<a.length;l+=v)(h=a[l],c=a[l+1],h==null||h<f.min||h>f.max||c<e.min||c>e.max)||(s.beginPath(),h=f.p2c(h),c=e.p2c(c)+r,o=="circle"?s.arc(h,c,t,0,u?Math.PI:Math.PI*2,!1):o(s,h,c,t,u),s.closePath(),i&&(s.fillStyle=i,s.fill()),s.stroke())}var t;s.save(),s.translate(h.left,h.top);var i=n.points.lineWidth,e=n.shadowSize,u=n.points.radius,f=n.points.symbol;i==0&&(i=.0001),i>0&&e>0&&(t=e/2,s.lineWidth=t,s.strokeStyle="rgba(0,0,0,0.1)",r(n.datapoints,u,null,t+t/2,!0,n.xaxis,n.yaxis,f),s.strokeStyle="rgba(0,0,0,0.2)",r(n.datapoints,u,null,t/2,!0,n.xaxis,n.yaxis,f)),s.lineWidth=i,s.strokeStyle=n.color,r(n.datapoints,u,ot(n.points,n.color),0,!1,n.xaxis,n.yaxis,f),s.restore()}function wt(n,t,i,r,u,f,e,o,s,h,c){var l,y,a,v,p,w,b,k,d;(h?(k=w=b=!0,p=!1,l=i,y=n,v=t+r,a=t+u,y<l&&(d=y,y=l,l=d,p=!0,w=!1)):(p=w=b=!0,k=!1,l=n+r,y=n+u,a=i,v=t,v<a&&(d=v,v=a,a=d,k=!0,b=!1)),y<e.min||l>e.max||v<o.min||a>o.max)||(l<e.min&&(l=e.min,p=!1),y>e.max&&(y=e.max,w=!1),a<o.min&&(a=o.min,k=!1),v>o.max&&(v=o.max,b=!1),l=e.p2c(l),a=o.p2c(a),y=e.p2c(y),v=o.p2c(v),f&&(s.fillStyle=f(a,v),s.fillRect(l,v,y-l,a-v)),c>0&&(p||w||b||k)&&(s.beginPath(),s.moveTo(l,a),p?s.lineTo(l,v):s.moveTo(l,v),b?s.lineTo(y,v):s.moveTo(y,v),w?s.lineTo(y,a):s.moveTo(y,a),k?s.lineTo(l,a):s.moveTo(l,a),s.stroke()))}function fr(n){function r(t,i,r,u,f,e){for(var h=t.points,c=t.pointsize,o=0;o<h.length;o+=c)h[o]!=null&&wt(h[o],h[o+1],h[o+2],i,r,u,f,e,s,n.bars.horizontal,n.bars.lineWidth)}var t,i;s.save(),s.translate(h.left,h.top),s.lineWidth=n.bars.lineWidth,s.strokeStyle=n.color;switch(n.bars.align){case"left":t=0;break;case"right":t=-n.bars.barWidth;break;default:t=-n.bars.barWidth/2}i=n.bars.fill?function(t,i){return ot(n.bars,n.color,t,i)}:null,r(n.datapoints,t,t+n.bars.barWidth,i,n.xaxis,n.yaxis),s.restore()}function ot(t,i,r,u){var e=t.fill,f;return e?t.fillColor?ri(t.fillColor,r,u,i):(f=n.color.parse(i),f.a=typeof e=="number"?e:.4,f.normalize(),f.toString()):null}function er(){var g,r,w,b,v,t,k;if(o.legend.container!=null?n(o.legend.container).html(""):i.find(".legend").remove(),o.legend.show){var f=[],e=[],y=!1,d=o.legend.labelFormatter,s,p;for(r=0;r<c.length;++r)s=c[r],s.label&&(p=d?d(s.label,s):s.label,p&&e.push({label:p,color:s.color}));for(o.legend.sorted&&(n.isFunction(o.legend.sorted)?e.sort(o.legend.sorted):o.legend.sorted=="reverse"?e.reverse():(g=o.legend.sorted!="descending",e.sort(function(n,t){return n.label==t.label?0:n.label<t.label!=g?1:-1}))),r=0;r<e.length;++r)w=e[r],r%o.legend.noColumns==0&&(y&&f.push("<\/tr>"),f.push("<tr>"),y=!0),f.push('<td class="legendColorBox"><div style="border:1px solid '+o.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+w.color+';overflow:hidden"><\/div><\/div><\/td><td class="legendLabel">'+w.label+"<\/td>");if(y&&f.push("<\/tr>"),f.length!=0)if(b='<table style="font-size:smaller;color:'+o.grid.color+'">'+f.join("")+"<\/table>",o.legend.container!=null)n(o.legend.container).html(b);else{var l="",a=o.legend.position,u=o.legend.margin;u[0]==null&&(u=[u,u]),a.charAt(0)=="n"?l+="top:"+(u[1]+h.top)+"px;":a.charAt(0)=="s"&&(l+="bottom:"+(u[1]+h.bottom)+"px;"),a.charAt(1)=="e"?l+="right:"+(u[0]+h.right)+"px;":a.charAt(1)=="w"&&(l+="left:"+(u[0]+h.left)+"px;"),v=n('<div class="legend">'+b.replace('style="','style="position:absolute;'+l+";")+"<\/div>").appendTo(i),o.legend.backgroundOpacity!=0&&(t=o.legend.backgroundColor,t==null&&(t=o.grid.backgroundColor,t=t&&typeof t=="string"?n.color.parse(t):n.color.extract(v,"background-color"),t.a=1,t=t.toString()),k=v.children(),n('<div style="position:absolute;width:'+k.width()+"px;height:"+k.height()+"px;"+l+"background-color:"+t+';"> <\/div>').prependTo(v).css("opacity",o.legend.backgroundOpacity))}}}function or(n,t,i){for(var w=o.grid.mouseActiveRadius,it=w*w+1,a=null,et=!1,r,s,e,h,p,tt,u=c.length-1;u>=0;--u)if(i(c[u])){var f=c[u],b=f.xaxis,k=f.yaxis,l=f.datapoints.points,v=b.c2p(n),y=k.c2p(t),g=w/b.scale,nt=w/k.scale;if(s=f.datapoints.pointsize,b.options.inverseTransform&&(g=Number.MAX_VALUE),k.options.inverseTransform&&(nt=Number.MAX_VALUE),f.lines.show||f.points.show)for(r=0;r<l.length;r+=s)if((e=l[r],h=l[r+1],e!=null)&&!(e-v>g)&&!(e-v<-g)&&!(h-y>nt)&&!(h-y<-nt)){var rt=Math.abs(b.p2c(e)-n),ut=Math.abs(k.p2c(h)-t),ft=rt*rt+ut*ut;ft<it&&(it=ft,a=[u,r/s])}if(f.bars.show&&!a){switch(f.bars.align){case"left":p=0;break;case"right":p=-f.bars.barWidth;break;default:p=-f.bars.barWidth/2}for(tt=p+f.bars.barWidth,r=0;r<l.length;r+=s){var e=l[r],h=l[r+1],d=l[r+2];e!=null&&(c[u].bars.horizontal?v<=Math.max(d,e)&&v>=Math.min(d,e)&&y>=h+p&&y<=h+tt:v>=e+p&&v<=e+tt&&y>=Math.min(d,h)&&y<=Math.max(d,h))&&(a=[u,r/s])}}}return a?(u=a[0],r=a[1],s=c[u].datapoints.pointsize,{datapoint:c[u].datapoints.points.slice(r*s,(r+1)*s),dataIndex:r,series:c[u],seriesIndex:u}):null}function bt(n){o.grid.hoverable&&st("plothover",n,function(n){return n.hoverable!=!1})}function kt(n){o.grid.hoverable&&st("plothover",n,function(){return!1})}function dt(n){st("plotclick",n,function(n){return n.clickable!=!1})}function st(n,t,r){var e=k.offset(),l=t.pageX-e.left-h.left,a=t.pageY-e.top-h.top,c=ct({left:l,top:a}),u,s,f;if(c.pageX=t.pageX,c.pageY=t.pageY,u=or(l,a,r),u&&(u.pageX=parseInt(u.series.xaxis.p2c(u.datapoint[0])+e.left+h.left,10),u.pageY=parseInt(u.series.yaxis.p2c(u.datapoint[1])+e.top+h.top,10)),o.grid.autoHighlight){for(s=0;s<g.length;++s)f=g[s],f.auto!=n||u&&f.series==u.series&&f.point[0]==u.datapoint[0]&&f.point[1]==u.datapoint[1]||ti(f.series,f.point);u&&ni(u.series,u.datapoint,n)}i.trigger(n,[c,u])}function ut(){var n=o.interaction.redrawOverlayInterval;if(n==-1){gt();return}rt||(rt=setTimeout(gt,n))}function gt(){rt=null,v.save(),tt.clear(),v.translate(h.left,h.top);for(var n,t=0;t<g.length;++t)n=g[t],n.series.bars.show?hr(n.series,n.point):sr(n.series,n.point);v.restore(),nt(p.drawOverlay,[v])}function ni(n,t,i){var r,u;typeof n=="number"&&(n=c[n]),typeof t=="number"&&(r=n.datapoints.pointsize,t=n.datapoints.points.slice(r*t,r*(t+1))),u=ii(n,t),u==-1?(g.push({series:n,point:t,auto:i}),ut()):i||(g[u].auto=!1)}function ti(n,t){var i,r;if(n==null&&t==null){g=[],ut();return}typeof n=="number"&&(n=c[n]),typeof t=="number"&&(i=n.datapoints.pointsize,t=n.datapoints.points.slice(i*t,i*(t+1))),r=ii(n,t),r!=-1&&(g.splice(r,1),ut())}function ii(n,t){for(var r,i=0;i<g.length;++i)if(r=g[i],r.series==n&&r.point[0]==t[0]&&r.point[1]==t[1])return i;return-1}function sr(t,i){var r=i[0],u=i[1],f=t.xaxis,e=t.yaxis,h=typeof t.highlightColor=="string"?t.highlightColor:n.color.parse(t.color).scale("a",.5).toString(),o,s;r<f.min||r>f.max||u<e.min||u>e.max||(o=t.points.radius+t.points.lineWidth/2,v.lineWidth=o,v.strokeStyle=h,s=1.5*o,r=f.p2c(r),u=e.p2c(u),v.beginPath(),t.points.symbol=="circle"?v.arc(r,u,s,0,2*Math.PI,!1):t.points.symbol(v,r,u,s,!1),v.closePath(),v.stroke())}function hr(t,i){var u=typeof t.highlightColor=="string"?t.highlightColor:n.color.parse(t.color).scale("a",.5).toString(),f=u,r;switch(t.bars.align){case"left":r=0;break;case"right":r=-t.bars.barWidth;break;default:r=-t.bars.barWidth/2}v.lineWidth=t.bars.lineWidth,v.strokeStyle=u,wt(i[0],i[1],i[2]||0,r,r+t.bars.barWidth,function(){return f},t.xaxis,t.yaxis,v,t.bars.horizontal,t.bars.lineWidth)}function ri(t,i,r,u){var h,e,c,f,o;if(typeof t=="string")return t;for(h=s.createLinearGradient(0,r,0,i),e=0,c=t.colors.length;e<c;++e)f=t.colors[e],typeof f!="string"&&(o=n.color.parse(u),f.brightness!=null&&(o=o.scale("rgb",f.brightness)),f.opacity!=null&&(o.a*=f.opacity),f=o.toString()),h.addColorStop(e/(c-1),f);return h}var c=[],o={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},a=null,tt=null,k=null,s=null,v=null,y=[],w=[],h={left:0,right:0,top:0,bottom:0},d=0,b=0,p={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},l=this,g,rt;l.setData=ht,l.setupGrid=at,l.draw=vt,l.getPlaceholder=function(){return i},l.getCanvas=function(){return a.element},l.getPlotOffset=function(){return h},l.width=function(){return d},l.height=function(){return b},l.offset=function(){var n=k.offset();return n.left+=h.left,n.top+=h.top,n},l.getData=function(){return c},l.getAxes=function(){var t={},i;return n.each(y.concat(w),function(n,i){i&&(t[i.direction+(i.n!=1?i.n:"")+"axis"]=i)}),t},l.getXAxes=function(){return y},l.getYAxes=function(){return w},l.c2p=ct,l.p2c=oi,l.getOptions=function(){return o},l.highlight=ni,l.unhighlight=ti,l.triggerRedrawOverlay=ut,l.pointOffset=function(n){return{left:parseInt(y[ft(n,"x")-1].p2c(+n.x)+h.left,10),top:parseInt(w[ft(n,"y")-1].p2c(+n.y)+h.top,10)}},l.shutdown=lt,l.destroy=function(){lt(),i.removeData("plot").empty(),c=[],o=null,a=null,tt=null,k=null,s=null,v=null,y=[],w=[],p=null,g=[],l=null},l.resize=function(){var n=i.width(),t=i.height();a.resize(n,t),tt.resize(n,t)},l.hooks=p,ui(l),fi(f),ci(),ht(r),at(),vt(),li(),g=[],rt=null}function u(n,t){return t*Math.floor(n/t)}var i=Object.prototype.hasOwnProperty;n.fn.detach||(n.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),t.prototype.resize=function(n,t){if(n<=0||t<=0)throw new Error("Invalid dimensions for plot, width = "+n+", height = "+t);var i=this.element,u=this.context,r=this.pixelRatio;this.width!=n&&(i.width=n*r,i.style.width=n+"px",this.width=n),this.height!=t&&(i.height=t*r,i.style.height=t+"px",this.height=t),u.restore(),u.save(),u.scale(r,r)},t.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},t.prototype.render=function(){var h=this._textCache,r,u,f,c,t,e,o,s,n;for(r in h)if(i.call(h,r)){u=this.getTextLayer(r),f=h[r],u.hide();for(c in f)if(i.call(f,c)){t=f[c];for(e in t)if(i.call(t,e)){for(o=t[e].positions,s=0;n=o[s];s++)n.active?n.rendered||(u.append(n.element),n.rendered=!0):(o.splice(s--,1),n.rendered&&n.element.detach());o.length==0&&delete t[e]}}u.show()}},t.prototype.getTextLayer=function(t){var i=this.text[t];return i==null&&(this.textContainer==null&&(this.textContainer=n("<div class='flot-text'><\/div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),i=this.text[t]=n("<div><\/div>").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),i},t.prototype.getTextInfo=function(t,i,r,u,f){var o,s,h,c,e;return i=""+i,o=typeof r=="object"?r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:r,s=this._textCache[t],s==null&&(s=this._textCache[t]={}),h=s[o],h==null&&(h=s[o]={}),c=h[i],c==null&&(e=n("<div><\/div>").html(i).css({position:"absolute","max-width":f,top:-9999}).appendTo(this.getTextLayer(t)),typeof r=="object"?e.css({font:o,color:r.color}):typeof r=="string"&&e.addClass(r),c=h[i]={width:e.outerWidth(!0),height:e.outerHeight(!0),element:e,positions:[]},e.detach()),c},t.prototype.addText=function(n,t,i,r,u,f,e,o,s){var h=this.getTextInfo(n,r,u,f,e),l=h.positions,a,c;for(o=="center"?t-=h.width/2:o=="right"&&(t-=h.width),s=="middle"?i-=h.height/2:s=="bottom"&&(i-=h.height),a=0;c=l[a];a++)if(c.x==t&&c.y==i){c.active=!0;return}c={active:!0,rendered:!1,element:l.length?h.element.clone():h.element,x:t,y:i},l.push(c),c.element.css({top:Math.round(i),left:Math.round(t),"text-align":o})},t.prototype.removeText=function(n,t,r,u,f,e){var h,a,c,v,l,o,s;if(u==null){if(h=this._textCache[n],h!=null)for(a in h)if(i.call(h,a)){c=h[a];for(v in c)if(i.call(c,v))for(l=c[v].positions,o=0;s=l[o];o++)s.active=!1}}else for(l=this.getTextInfo(n,u,f,e).positions,o=0;s=l[o];o++)s.x==t&&s.y==r&&(s.active=!1)},n.plot=function(t,i,u){return new r(n(t),i,u,n.plot.plugins)},n.plot.version="0.8.3",n.plot.plugins=[],n.fn.plot=function(t,i){return this.each(function(){n.plot(this,t,i)})}}(jQuery),function(n){function i(n,t){return t*Math.floor(n/t)}function r(n,t,i,r){var o,s,u;if(typeof n.strftime=="function")return n.strftime(t);var f=function(n,t){return n=""+n,t=""+(t==null?"0":t),n.length==1?t+n:n},h=[],c=!1,e=n.getHours(),l=e<12;for(i==null&&(i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),r==null&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),o=e>12?e-12:e==0?12:e,s=0;s<t.length;++s)if(u=t.charAt(s),c){switch(u){case"a":u=""+r[n.getDay()];break;case"b":u=""+i[n.getMonth()];break;case"d":u=f(n.getDate());break;case"e":u=f(n.getDate()," ");break;case"h":case"H":u=f(e);break;case"I":u=f(o);break;case"l":u=f(o," ");break;case"m":u=f(n.getMonth()+1);break;case"M":u=f(n.getMinutes());break;case"q":u=""+(Math.floor(n.getMonth()/3)+1);break;case"S":u=f(n.getSeconds());break;case"y":u=f(n.getFullYear()%100);break;case"Y":u=""+n.getFullYear();break;case"p":u=l?"am":"pm";break;case"P":u=l?"AM":"PM";break;case"w":u=""+n.getDay()}h.push(u),c=!1}else u=="%"?c=!0:h.push(u);return h.join("")}function f(n){function u(n,t,i,r){n[t]=function(){return i[r].apply(i,arguments)}}var i={date:n},r,t;for(n.strftime!=undefined&&u(i,"strftime",n,"strftime"),u(i,"getTime",n,"getTime"),u(i,"setTime",n,"setTime"),r=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],t=0;t<r.length;t++)u(i,"get"+r[t],n,"getUTC"+r[t]),u(i,"set"+r[t],n,"setUTC"+r[t]);return i}function u(n,t){if(t.timezone=="browser")return new Date(n);if(t.timezone&&t.timezone!="utc"){if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var i=new timezoneJS.Date;return i.setTimezone(t.timezone),i.setTime(n),i}return f(new Date(n))}return f(new Date(n))}function c(f){f.hooks.processOptions.push(function(f){n.each(f.getAxes(),function(n,f){var e=f.options;e.mode=="time"&&(f.tickGenerator=function(n){var d=[],r=u(n.min,e),w=0,a=e.tickSize&&e.tickSize[1]==="quarter"||e.minTickSize&&e.minTickSize[1]==="quarter"?h:s,c,l,f,b,p,o,v,k,y,g,nt,tt;for(e.minTickSize!=null&&(w=typeof e.tickSize=="number"?e.tickSize:e.minTickSize[0]*t[e.minTickSize[1]]),c=0;c<a.length-1;++c)if(n.delta<(a[c][0]*t[a[c][1]]+a[c+1][0]*t[a[c+1][1]])/2&&a[c][0]*t[a[c][1]]>=w)break;l=a[c][0],f=a[c][1],f=="year"&&(e.minTickSize!=null&&e.minTickSize[1]=="year"?l=Math.floor(e.minTickSize[0]):(b=Math.pow(10,Math.floor(Math.log(n.delta/t.year)/Math.LN10)),p=n.delta/t.year/b,l=p<1.5?1:p<3?2:p<7.5?5:10,l*=b),l<1&&(l=1)),n.tickSize=e.tickSize||[l,f],o=n.tickSize[0],f=n.tickSize[1],v=o*t[f],f=="second"?r.setSeconds(i(r.getSeconds(),o)):f=="minute"?r.setMinutes(i(r.getMinutes(),o)):f=="hour"?r.setHours(i(r.getHours(),o)):f=="month"?r.setMonth(i(r.getMonth(),o)):f=="quarter"?r.setMonth(3*i(r.getMonth()/3,o)):f=="year"&&r.setFullYear(i(r.getFullYear(),o)),r.setMilliseconds(0),v>=t.minute&&r.setSeconds(0),v>=t.hour&&r.setMinutes(0),v>=t.day&&r.setHours(0),v>=t.day*4&&r.setDate(1),v>=t.month*2&&r.setMonth(i(r.getMonth(),3)),v>=t.quarter*2&&r.setMonth(i(r.getMonth(),6)),v>=t.year&&r.setMonth(0),k=0,y=Number.NaN;do g=y,y=r.getTime(),d.push(y),f=="month"||f=="quarter"?o<1?(r.setDate(1),nt=r.getTime(),r.setMonth(r.getMonth()+(f=="quarter"?3:1)),tt=r.getTime(),r.setTime(y+k*t.hour+(tt-nt)*o),k=r.getHours(),r.setHours(0)):r.setMonth(r.getMonth()+o*(f=="quarter"?3:1)):f=="year"?r.setFullYear(r.getFullYear()+o):r.setTime(y+v);while(y<n.max&&y!=g);return d},f.tickFormatter=function(n,i){var a=u(n,i.options),v;if(e.timeformat!=null)return r(a,e.timeformat,e.monthNames,e.dayNames);var s=i.options.tickSize&&i.options.tickSize[1]=="quarter"||i.options.minTickSize&&i.options.minTickSize[1]=="quarter",o=i.tickSize[0]*t[i.tickSize[1]],h=i.max-i.min,c=e.twelveHourClock?" %p":"",l=e.twelveHourClock?"%I":"%H",f;return f=o<t.minute?l+":%M:%S"+c:o<t.day?h<2*t.day?l+":%M"+c:"%b %d "+l+":%M"+c:o<t.month?"%b %d":s&&o<t.quarter||!s&&o<t.year?h<t.year?"%b":"%b %Y":s&&o<t.year?h<t.year?"Q%q":"Q%q %Y":"%Y",v=r(a,f,e.monthNames,e.dayNames)})})})}var o={xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},t={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:365.2425*864e5},e=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],s=e.concat([[3,"month"],[6,"month"],[1,"year"]]),h=e.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);n.plot.plugins.push({init:c,options:o,name:"time",version:"1.0"}),n.plot.formatDate=r,n.plot.dateGenerator=u}(jQuery),function(n){function t(t){function o(n){i.active&&(a(n),t.getPlaceholder().trigger("plotselecting",[e()]))}function s(t){if(t.which==1){document.body.focus(),document.onselectstart!==undefined&&r.onselectstart==null&&(r.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),document.ondrag!==undefined&&r.ondrag==null&&(r.ondrag=document.ondrag,document.ondrag=function(){return!1}),l(i.first,t),i.active=!0,u=function(n){p(n)};n(document).one("mouseup",u)}}function p(n){return u=null,document.onselectstart!==undefined&&(document.onselectstart=r.onselectstart),document.ondrag!==undefined&&(document.ondrag=r.ondrag),i.active=!1,a(n),f()?h():(t.getPlaceholder().trigger("plotunselected",[]),t.getPlaceholder().trigger("plotselecting",[null])),!1}function e(){if(!f()||!i.show)return null;var r={},u=i.first,e=i.second;return n.each(t.getAxes(),function(n,t){if(t.used){var i=t.c2p(u[t.direction]),f=t.c2p(e[t.direction]);r[n]={from:Math.min(i,f),to:Math.max(i,f)}}}),r}function h(){var n=e();t.getPlaceholder().trigger("plotselected",[n]),n.xaxis&&n.yaxis&&t.getPlaceholder().trigger("selected",[{x1:n.xaxis.from,y1:n.yaxis.from,x2:n.xaxis.to,y2:n.yaxis.to}])}function c(n,t,i){return t<n?n:t>i?i:t}function l(n,r){var u=t.getOptions(),f=t.getPlaceholder().offset(),e=t.getPlotOffset();n.x=c(0,r.pageX-f.left-e.left,t.width()),n.y=c(0,r.pageY-f.top-e.top,t.height()),u.selection.mode=="y"&&(n.x=n==i.first?0:t.width()),u.selection.mode=="x"&&(n.y=n==i.first?0:t.height())}function a(n){n.pageX!=null&&(l(i.second,n),f()?(i.show=!0,t.triggerRedrawOverlay()):v(!0))}function v(n){i.show&&(i.show=!1,t.triggerRedrawOverlay(),n||t.getPlaceholder().trigger("plotunselected",[]))}function y(n,i){var e,r,u,f,o=t.getAxes(),s,h;for(s in o)if(e=o[s],e.direction==i&&(f=i+e.n+"axis",n[f]||e.n!=1||(f=i+"axis"),n[f])){r=n[f].from,u=n[f].to;break}return n[f]||(e=i=="x"?t.getXAxes()[0]:t.getYAxes()[0],r=n[i+"1"],u=n[i+"2"]),r!=null&&u!=null&&r>u&&(h=r,r=u,u=h),{from:r,to:u,axis:e}}function w(n,r){var o,u,e=t.getOptions();e.selection.mode=="y"?(i.first.x=0,i.second.x=t.width()):(u=y(n,"x"),i.first.x=u.axis.p2c(u.from),i.second.x=u.axis.p2c(u.to)),e.selection.mode=="x"?(i.first.y=0,i.second.y=t.height()):(u=y(n,"y"),i.first.y=u.axis.p2c(u.from),i.second.y=u.axis.p2c(u.to)),i.show=!0,t.triggerRedrawOverlay(),!r&&f()&&h()}function f(){var n=t.getOptions().selection.minSize;return Math.abs(i.second.x-i.first.x)>=n&&Math.abs(i.second.y-i.first.y)>=n}var i={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,active:!1},r={},u=null;t.clearSelection=v,t.setSelection=w,t.getSelection=e,t.hooks.bindEvents.push(function(n,t){var i=n.getOptions();i.selection.mode!=null&&(t.mousemove(o),t.mousedown(s))}),t.hooks.drawOverlay.push(function(t,r){var u,e,o;if(i.show&&f()){u=t.getPlotOffset(),e=t.getOptions(),r.save(),r.translate(u.left,u.top),o=n.color.parse(e.selection.color),r.strokeStyle=o.scale("a",.8).toString(),r.lineWidth=1,r.lineJoin=e.selection.shape,r.fillStyle=o.scale("a",.4).toString();var s=Math.min(i.first.x,i.second.x)+.5,h=Math.min(i.first.y,i.second.y)+.5,c=Math.abs(i.second.x-i.first.x)-1,l=Math.abs(i.second.y-i.first.y)-1;r.fillRect(s,h,c,l),r.strokeRect(s,h,c,l),r.restore()}}),t.hooks.shutdown.push(function(t,i){i.unbind("mousemove",o),i.unbind("mousedown",s),u&&n(document).unbind("mouseup",u)})}n.plot.plugins.push({init:t,options:{selection:{mode:null,color:"#e8cfac",shape:"round",minSize:5}},name:"selection",version:"1.1"})}(jQuery),function(n){var r={tooltip:!1,tooltipOpts:{id:"flotTip",content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,monthNames:null,dayNames:null,shifts:{x:10,y:20},defaultTheme:!0,lines:!1,onHover:function(){},$compat:!1}},t=function(n){this.tipPosition={x:0,y:0},this.init(n)},i;t.prototype.init=function(t){function f(n){var i={};i.x=n.pageX,i.y=n.pageY,t.setTooltipPosition(i)}function e(r,u,f){var o=function(n,t,i,r){return Math.sqrt((i-n)*(i-n)+(r-t)*(r-t))},h=function(n,t,i,r,u,f,e){var s,h;if(!e||(e=function(n,t,i,r,u,f){if(typeof i!="undefined")return{x:i,y:t};if(typeof r!="undefined")return{x:n,y:r};var o,e=-1/((f-r)/(u-i));return{x:o=(u*(n*e-t+r)+i*(n*-e+t-f))/(e*(u-i)+r-f),y:e*o-e*n+t}}(n,t,i,r,u,f),e.x>=Math.min(i,u)&&e.x<=Math.max(i,u)&&e.y>=Math.min(r,f)&&e.y<=Math.max(r,f))){var c=r-f,l=u-i,a=i*f-r*u;return Math.abs(c*n+l*t+a)/Math.sqrt(c*c+l*l)}return s=o(n,t,i,r),h=o(n,t,u,f),s>h?h:s},s,e;f?t.showTooltip(f,u):i.plotOptions.series.lines.show&&i.tooltipOptions.lines===!0?(s=i.plotOptions.grid.mouseActiveRadius,e={distance:s+1},n.each(t.getData(),function(n,i){for(var l=0,c=-1,f=1;f<i.data.length;f++)i.data[f-1][0]<=u.x&&i.data[f][0]>=u.x&&(l=f-1,c=f);if(c===-1){t.hideTooltip();return}var r={x:i.data[l][0],y:i.data[l][1]},s={x:i.data[c][0],y:i.data[c][1]},a=h(i.xaxis.p2c(u.x),i.yaxis.p2c(u.y),i.xaxis.p2c(r.x),i.yaxis.p2c(r.y),i.xaxis.p2c(s.x),i.yaxis.p2c(s.y),!1);if(a<e.distance){var v=o(r.x,r.y,u.x,u.y)<o(u.x,u.y,s.x,s.y)?l:c,w=i.datapoints.pointsize,y=[u.x,r.y+(s.y-r.y)*((u.x-r.x)/(s.x-r.x))],p={datapoint:y,dataIndex:v,series:i,seriesIndex:n};e={distance:a,item:p}}}),e.distance<s+1?t.showTooltip(e.item,u):t.hideTooltip()):t.hideTooltip()}var i=this,u=n.plot.plugins.length,r;if(this.plotPlugins=[],u)for(r=0;r<u;r++)this.plotPlugins.push(n.plot.plugins[r].name);t.hooks.bindEvents.push(function(t,r){if(i.plotOptions=t.getOptions(),i.plotOptions.tooltip!==!1&&typeof i.plotOptions.tooltip!="undefined"){i.tooltipOptions=i.plotOptions.tooltipOpts,i.tooltipOptions.$compat?(i.wfunc="width",i.hfunc="height"):(i.wfunc="innerWidth",i.hfunc="innerHeight");var u=i.getDomElement();n(t.getPlaceholder()).bind("plothover",e),n(r).bind("mousemove",f)}}),t.hooks.shutdown.push(function(t,i){n(t.getPlaceholder()).unbind("plothover",e),n(i).unbind("mousemove",f)}),t.setTooltipPosition=function(t){var r=i.getDomElement(),u=r.outerWidth()+i.tooltipOptions.shifts.x,f=r.outerHeight()+i.tooltipOptions.shifts.y;t.x-n(window).scrollLeft()>n(window)[i.wfunc]()-u&&(t.x-=u),t.y-n(window).scrollTop()>n(window)[i.hfunc]()-f&&(t.y-=f),i.tipPosition.x=t.x,i.tipPosition.y=t.y},t.showTooltip=function(n,r){var u=i.getDomElement(),f=i.stringFormat(i.tooltipOptions.content,n);if(u.html(f),t.setTooltipPosition({x:r.pageX,y:r.pageY}),u.css({left:i.tipPosition.x+i.tooltipOptions.shifts.x,top:i.tipPosition.y+i.tooltipOptions.shifts.y}).show(),typeof i.tooltipOptions.onHover=="function")i.tooltipOptions.onHover(n,u)},t.hideTooltip=function(){i.getDomElement().hide().html("")}},t.prototype.getDomElement=function(){var t=n("#"+this.tooltipOptions.id);return t.length===0&&(t=n("<div />").attr("id",this.tooltipOptions.id),t.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&t.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),t},t.prototype.stringFormat=function(n,t){var w=/%p\.{0,1}(\d{0,})/,l=/%s/,a=/%lx/,v=/%ly/,h=/%x\.{0,1}(\d{0,})/,c=/%y\.{0,1}(\d{0,})/,b="%x",k="%y",d="%ct",i,r,f,s,u,e,y,o,p;if(typeof t.series.threshold!="undefined"?(i=t.datapoint[0],r=t.datapoint[1],f=t.datapoint[2]):typeof t.series.lines!="undefined"&&t.series.lines.steps?(i=t.series.datapoints.points[t.dataIndex*2],r=t.series.datapoints.points[t.dataIndex*2+1],f=""):(i=t.series.data[t.dataIndex][0],r=t.series.data[t.dataIndex][1],f=t.series.data[t.dataIndex][2]),t.series.label===null&&t.series.originSeries&&(t.series.label=t.series.originSeries.label),typeof n=="function"&&(n=n(t.series.label,i,r,t)),typeof t.series.percent!="undefined"?s=t.series.percent:typeof t.series.percents!="undefined"&&(s=t.series.percents[t.dataIndex]),typeof s=="number"&&(n=this.adjustValPrecision(w,n,s)),n=typeof t.series.label!="undefined"?n.replace(l,t.series.label):n.replace(l,""),n=this.hasAxisLabel("xaxis",t)?n.replace(a,t.series.xaxis.options.axisLabel):n.replace(a,""),n=this.hasAxisLabel("yaxis",t)?n.replace(v,t.series.yaxis.options.axisLabel):n.replace(v,""),this.isTimeMode("xaxis",t)&&this.isXDateFormat(t)&&(n=n.replace(h,this.timestampToDate(i,this.tooltipOptions.xDateFormat,t.series.xaxis.options))),this.isTimeMode("yaxis",t)&&this.isYDateFormat(t)&&(n=n.replace(c,this.timestampToDate(r,this.tooltipOptions.yDateFormat,t.series.yaxis.options))),typeof i=="number"&&(n=this.adjustValPrecision(h,n,i)),typeof r=="number"&&(n=this.adjustValPrecision(c,n,r)),typeof t.series.xaxis.ticks!="undefined"&&(u=this.hasRotatedXAxisTicks(t)?"rotatedTicks":"ticks",e=t.dataIndex+t.seriesIndex,t.series.xaxis[u].length>e&&!this.isTimeMode("xaxis",t)&&(y=this.isCategoriesMode("xaxis",t)?t.series.xaxis[u][e].label:t.series.xaxis[u][e].v,y===i&&(n=n.replace(h,t.series.xaxis[u][e].label)))),typeof t.series.yaxis.ticks!="undefined")for(o in t.series.yaxis.ticks)t.series.yaxis.ticks.hasOwnProperty(o)&&(p=this.isCategoriesMode("yaxis",t)?t.series.yaxis.ticks[o].label:t.series.yaxis.ticks[o].v,p===r&&(n=n.replace(c,t.series.yaxis.ticks[o].label)));return typeof t.series.xaxis.tickFormatter!="undefined"&&(n=n.replace(b,t.series.xaxis.tickFormatter(i,t.series.xaxis).replace(/\$/g,"$$"))),typeof t.series.yaxis.tickFormatter!="undefined"&&(n=n.replace(k,t.series.yaxis.tickFormatter(r,t.series.yaxis).replace(/\$/g,"$$"))),f&&(n=n.replace(d,f)),n},t.prototype.isTimeMode=function(n,t){return typeof t.series[n].options.mode!="undefined"&&t.series[n].options.mode==="time"},t.prototype.isXDateFormat=function(){return typeof this.tooltipOptions.xDateFormat!="undefined"&&this.tooltipOptions.xDateFormat!==null},t.prototype.isYDateFormat=function(){return typeof this.tooltipOptions.yDateFormat!="undefined"&&this.tooltipOptions.yDateFormat!==null},t.prototype.isCategoriesMode=function(n,t){return typeof t.series[n].options.mode!="undefined"&&t.series[n].options.mode==="categories"},t.prototype.timestampToDate=function(t,i,r){var u=n.plot.dateGenerator(t,r);return n.plot.formatDate(u,i,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},t.prototype.adjustValPrecision=function(n,t,i){var r,u=t.match(n);return u!==null&&RegExp.$1!==""&&(r=RegExp.$1,i=i.toFixed(r),t=t.replace(n,i)),t},t.prototype.hasAxisLabel=function(t,i){return n.inArray(this.plotPlugins,"axisLabels")!==-1&&typeof i.series[t].options.axisLabel!="undefined"&&i.series[t].options.axisLabel.length>0},t.prototype.hasRotatedXAxisTicks=function(t){return n.inArray(this.plotPlugins,"tickRotor")!==-1&&typeof t.series.xaxis.rotatedTicks!="undefined"},i=function(n){new t(n)},n.plot.plugins.push({init:i,options:r,name:"tooltip",version:"0.8.4"})}(jQuery),function(n,t,i){"$:nomunge";function l(i){var v,s;for(e===!0&&(e=i||1),v=r.length-1;v>=0;v--)if(s=n(r[v]),s[0]==t||s.is(":visible")){var y=s.width(),p=s.height(),h=s.data(o);h&&(y!==h.w||p!==h.h)&&(s.trigger(c,[h.w=y,h.h=p]),e=i||!0)}else h=s.data(o),h.w=0,h.h=0;f!==null&&(e&&(i==null||i-e<1e3)?f=t.requestAnimationFrame(l):(f=setTimeout(l,u[a]),e=!1))}var r=[],u=n.resize=n.extend(n.resize,{}),f,e=!1,h="setTimeout",c="resize",o=c+"-special-event",a="pendingDelay",v="activeDelay",s="throttleWindow";u[a]=200,u[v]=20,u[s]=!0,n.event.special[c]={setup:function(){if(!u[s]&&this[h])return!1;var t=n(this);r.push(this),t.data(o,{w:t.width(),h:t.height()}),r.length===1&&(f=i,l())},teardown:function(){var i,t;if(!u[s]&&this[h])return!1;for(i=n(this),t=r.length-1;t>=0;t--)if(r[t]==this){r.splice(t,1);break}i.removeData(o),r.length||(e?cancelAnimationFrame(f):clearTimeout(f),f=null)},add:function(t){function f(t,u,f){var e=n(this),s=e.data(o)||{};s.w=u!==i?u:e.width(),s.h=f!==i?f:e.height(),r.apply(this,arguments)}if(!u[s]&&this[h])return!1;var r;if(n.isFunction(t))return r=t,f;r=t.handler,t.handler=f}},t.requestAnimationFrame||(t.requestAnimationFrame=function(){return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(n){return t.setTimeout(function(){n(+new Date)},u[v])}}()),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(){return t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout}())}(jQuery,this),function(n){function i(n){function t(){var t=n.getPlaceholder();t.width()!=0&&t.height()!=0&&(n.resize(),n.setupGrid(),n.draw())}function i(n){n.getPlaceholder().resize(t)}function r(n){n.getPlaceholder().unbind("resize",t)}n.hooks.bindEvents.push(i),n.hooks.shutdown.push(r)}var t={};n.plot.plugins.push({init:i,options:t,name:"resize",version:"1.0"})}(jQuery),function(n){function r(r){function k(t){l||(l=!0,a=t.getCanvas(),h=n(a).parent(),u=t.getOptions(),t.setData(d(t.getData())))}function d(t){for(var f=0,e=0,o=0,s=u.series.pie.combine.color,h=[],i,r=0;r<t.length;++r)i=t[r].data,n.isArray(i)&&i.length==1&&(i=i[0]),n.isArray(i)?i[1]=!isNaN(parseFloat(i[1]))&&isFinite(i[1])?+i[1]:0:i=!isNaN(parseFloat(i))&&isFinite(i)?[1,+i]:[1,0],t[r].data=[i];for(r=0;r<t.length;++r)f+=t[r].data[0][1];for(r=0;r<t.length;++r)i=t[r].data[0][1],i/f<=u.series.pie.combine.threshold&&(e+=i,o++,s||(s=t[r].color));for(r=0;r<t.length;++r)i=t[r].data[0][1],(o<2||i/f>u.series.pie.combine.threshold)&&h.push(n.extend(t[r],{data:[[1,i]],color:t[r].color,label:t[r].label,angle:i*Math.PI*2/f,percent:i/(f/100)}));return o>1&&h.push({data:[[1,e]],color:s,label:u.series.pie.combine.label,angle:e*Math.PI*2/f,percent:e/(f/100)}),h}function g(r,s){function k(){f.clearRect(0,0,y,p),h.children().filter(".pieLabel, .pieLabelBackground").remove()}function d(){var i=u.series.pie.shadow.left,r=u.series.pie.shadow.top,s=10,h=u.series.pie.shadow.alpha,n=u.series.pie.radius>1?u.series.pie.radius:o*u.series.pie.radius,t;if(!(n>=y/2-i)&&!(n*u.series.pie.tilt>=p/2-r)&&!(n<=s)){for(f.save(),f.translate(i,r),f.globalAlpha=h,f.fillStyle="#000",f.translate(e,c),f.scale(1,u.series.pie.tilt),t=1;t<=s;t++)f.beginPath(),f.arc(0,0,n,0,Math.PI*2,!1),f.fill(),n-=t;f.restore()}}function g(){function l(n,t,r){n<=0||isNaN(n)||(r?f.fillStyle=t:(f.strokeStyle=t,f.lineJoin="round"),f.beginPath(),Math.abs(n-Math.PI*2)>1e-9&&f.moveTo(0,0),f.arc(0,0,s,i,i+n/2,!1),f.arc(0,0,s,i+n/2,i+n,!1),f.closePath(),i+=n,r?f.fill():f.stroke())}function w(){function s(t,i,r){var w,s,b,v,nt;if(t.data[0][1]==0)return!0;w=u.legend.labelFormatter,b=u.series.pie.label.formatter,s=w?w(t.label,t):t.label,b&&(s=b(s,t));var k=(i+t.angle+i)/2,d=e+Math.round(Math.cos(k)*f),g=c+Math.round(Math.sin(k)*f)*u.series.pie.tilt,tt="<span class='pieLabel' id='pieLabel"+r+"' style='position:absolute;top:"+g+"px;left:"+d+"px;'>"+s+"<\/span>";h.append(tt);var o=h.children("#pieLabel"+r),l=g-o.height()/2,a=d-o.width()/2;return(o.css("top",l),o.css("left",a),0-l>0||0-a>0||p-(l+o.height())<0||y-(a+o.width())<0)?!1:(u.series.pie.label.background.opacity!=0&&(v=u.series.pie.label.background.color,v==null&&(v=t.color),nt="top:"+l+"px;left:"+a+"px;",n("<div class='pieLabelBackground' style='position:absolute;width:"+o.width()+"px;height:"+o.height()+"px;"+nt+"background-color:"+v+";'><\/div>").css("opacity",u.series.pie.label.background.opacity).insertBefore(o)),!0)}for(var i=r,f=u.series.pie.label.radius>1?u.series.pie.label.radius:o*u.series.pie.label.radius,t=0;t<a.length;++t){if(a[t].percent>=u.series.pie.label.threshold*100&&!s(a[t],i,t))return!1;i+=a[t].angle}return!0}var r=Math.PI*u.series.pie.startAngle,s=u.series.pie.radius>1?u.series.pie.radius:o*u.series.pie.radius,i,t;for(f.save(),f.translate(e,c),f.scale(1,u.series.pie.tilt),f.save(),i=r,t=0;t<a.length;++t)a[t].startAngle=i,l(a[t].angle,a[t].color,!0);if(f.restore(),u.series.pie.stroke.width>0){for(f.save(),f.lineWidth=u.series.pie.stroke.width,i=r,t=0;t<a.length;++t)l(a[t].angle,u.series.pie.stroke.color,!1);f.restore()}return v(f),f.restore(),u.series.pie.label.show?w():!0}var a,w;if(h){var y=r.getPlaceholder().width(),p=r.getPlaceholder().height(),b=h.children().filter(".legend").children().width()||0;f=s,l=!1,o=Math.min(y,p/u.series.pie.tilt)/2,c=p/2+u.series.pie.offset.top,e=y/2,u.series.pie.offset.left=="auto"?(u.legend.position.match("w")?e+=b/2:e-=b/2,e<o?e=o:e>y-o&&(e=y-o)):e+=u.series.pie.offset.left,a=r.getData(),w=0;do w>0&&(o*=i),w+=1,k(),u.series.pie.tilt<=.8&&d();while(!g()&&w<t);w>=t&&(k(),h.prepend("<div class='error'>Could not draw pie with labels contained inside canvas<\/div>")),r.setSeries&&r.insertLegend&&(r.setSeries(a),r.insertLegend())}}function v(n){if(u.series.pie.innerRadius>0){n.save();var t=u.series.pie.innerRadius>1?u.series.pie.innerRadius:o*u.series.pie.innerRadius;n.globalCompositeOperation="destination-out",n.beginPath(),n.fillStyle=u.series.pie.stroke.color,n.arc(0,0,t,0,Math.PI*2,!1),n.fill(),n.closePath(),n.restore(),n.save(),n.beginPath(),n.strokeStyle=u.series.pie.stroke.color,n.arc(0,0,t,0,Math.PI*2,!1),n.stroke(),n.closePath(),n.restore()}}function nt(n,t){for(var u=!1,i=-1,f=n.length,r=f-1;++i<f;r=i)(n[i][1]<=t[1]&&t[1]<n[r][1]||n[r][1]<=t[1]&&t[1]<n[i][1])&&t[0]<(n[r][0]-n[i][0])*(t[1]-n[i][1])/(n[r][1]-n[i][1])+n[i][0]&&(u=!u);return u}function tt(n,t){for(var l=r.getData(),h=r.getOptions(),u=h.series.pie.radius>1?h.series.pie.radius:o*h.series.pie.radius,a,v,i,s=0;s<l.length;++s)if(i=l[s],i.pie.show){if(f.save(),f.beginPath(),f.moveTo(0,0),f.arc(0,0,u,i.startAngle,i.startAngle+i.angle/2,!1),f.arc(0,0,u,i.startAngle+i.angle/2,i.startAngle+i.angle,!1),f.closePath(),a=n-e,v=t-c,f.isPointInPath){if(f.isPointInPath(n-e,t-c))return f.restore(),{datapoint:[i.percent,i.data],dataIndex:0,series:i,seriesIndex:s}}else{var y=u*Math.cos(i.startAngle),p=u*Math.sin(i.startAngle),w=u*Math.cos(i.startAngle+i.angle/4),b=u*Math.sin(i.startAngle+i.angle/4),k=u*Math.cos(i.startAngle+i.angle/2),d=u*Math.sin(i.startAngle+i.angle/2),g=u*Math.cos(i.startAngle+i.angle/1.5),tt=u*Math.sin(i.startAngle+i.angle/1.5),it=u*Math.cos(i.startAngle+i.angle),rt=u*Math.sin(i.startAngle+i.angle),ut=[[0,0],[y,p],[w,b],[k,d],[g,tt],[it,rt]],ft=[a,v];if(nt(ut,ft))return f.restore(),{datapoint:[i.percent,i.data],dataIndex:0,series:i,seriesIndex:s}}f.restore()}return null}function it(n){y("plothover",n)}function rt(n){y("plotclick",n)}function y(n,t){var o=r.offset(),l=parseInt(t.pageX-o.left),a=parseInt(t.pageY-o.top),i=tt(l,a),f,e,c;if(u.grid.autoHighlight)for(f=0;f<s.length;++f)e=s[f],e.auto!=n||i&&e.series==i.series||w(e.series);i&&p(i.series,n),c={pageX:t.pageX,pageY:t.pageY},h.trigger(n,[c,i])}function p(n,t){var i=b(n);i==-1?(s.push({series:n,auto:t}),r.triggerRedrawOverlay()):t||(s[i].auto=!1)}function w(n){n==null&&(s=[],r.triggerRedrawOverlay());var t=b(n);t!=-1&&(s.splice(t,1),r.triggerRedrawOverlay())}function b(n){for(var i,t=0;t<s.length;++t)if(i=s[t],i.series==n)return t;return-1}function ut(n,t){function f(n){n.angle<=0||isNaN(n.angle)||(t.fillStyle=n.highlightColor?n.highlightColor:"rgba(255, 255, 255, "+i.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(n.angle-Math.PI*2)>1e-9&&t.moveTo(0,0),t.arc(0,0,u,n.startAngle,n.startAngle+n.angle/2,!1),t.arc(0,0,u,n.startAngle+n.angle/2,n.startAngle+n.angle,!1),t.closePath(),t.fill())}var i=n.getOptions(),u=i.series.pie.radius>1?i.series.pie.radius:o*i.series.pie.radius,r;for(t.save(),t.translate(e,c),t.scale(1,i.series.pie.tilt),r=0;r<s.length;++r)f(s[r].series);v(t),t.restore()}var a=null,h=null,u=null,o=null,e=null,c=null,l=!1,f=null,s=[];r.hooks.processOptions.push(function(n,t){t.series.pie.show&&(t.grid.show=!1,t.series.pie.label.show=="auto"&&(t.series.pie.label.show=t.legend.show?!1:!0),t.series.pie.radius=="auto"&&(t.series.pie.radius=t.series.pie.label.show?3/4:1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),r.hooks.bindEvents.push(function(n,t){var i=n.getOptions();i.series.pie.show&&(i.grid.hoverable&&t.unbind("mousemove").mousemove(it),i.grid.clickable&&t.unbind("click").click(rt))}),r.hooks.processDatapoints.push(function(n,t,i,r){var u=n.getOptions();u.series.pie.show&&k(n,t,i,r)}),r.hooks.drawOverlay.push(function(n,t){var i=n.getOptions();i.series.pie.show&&ut(n,t)}),r.hooks.draw.push(function(n,t){var i=n.getOptions();i.series.pie.show&&g(n,t)}),r.pieHighlight=p,r.pieUnhighlight=w}var t=10,i=.95,u={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(n,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+n+"<br/>"+Math.round(t.percent)+"%<\/div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};n.plot.plugins.push({init:r,options:u,name:"pie",version:"1.1"})}(jQuery),function(n){function i(n){function t(n,t){for(var r=null,i=0;i<t.length;++i){if(n==t[i])break;t[i].stack==n.stack&&(r=t[i])}return r}function i(n,i,r){var d;if(i.stack!=null&&i.stack!==!1&&(d=t(i,n.getData()),d)){for(var e=r.pointsize,h=r.points,y=d.datapoints.pointsize,l=d.datapoints.points,f=[],p,nt,rt,a,v,w,k=i.lines.show,tt=i.bars.horizontal,ut=e>2&&(tt?r.format[2].x:r.format[2].y),ft=k&&i.lines.steps,it=!0,g=tt?1:0,b=tt?0:1,o=0,c=0,s,u;;){if(o>=h.length)break;if(s=f.length,h[o]==null){for(u=0;u<e;++u)f.push(h[o+u]);o+=e}else if(c>=l.length){if(!k)for(u=0;u<e;++u)f.push(h[o+u]);o+=e}else if(l[c]==null){for(u=0;u<e;++u)f.push(null);it=!0,c+=y}else{if(p=h[o+g],nt=h[o+b],a=l[c+g],v=l[c+b],w=0,p==a){for(u=0;u<e;++u)f.push(h[o+u]);f[s+b]+=v,w=v,o+=e,c+=y}else if(p>a){if(k&&o>0&&h[o-e]!=null){for(rt=nt+(h[o-e+b]-nt)*(a-p)/(h[o-e+g]-p),f.push(a),f.push(rt+v),u=2;u<e;++u)f.push(h[o+u]);w=v}c+=y}else{if(it&&k){o+=e;continue}for(u=0;u<e;++u)f.push(h[o+u]);k&&c>0&&l[c-y]!=null&&(w=v+(l[c-y+b]-v)*(p-a)/(l[c-y+g]-a)),f[s+b]+=w,o+=e}it=!1,s!=f.length&&ut&&(f[s+2]+=w)}if(ft&&s!=f.length&&s>0&&f[s]!=null&&f[s]!=f[s-e]&&f[s+1]!=f[s-e+1]){for(u=0;u<e;++u)f[s+e+u]=f[s+u];f[s+1]=f[s-e+1]}}r.points=f}}n.hasStackPlugin||(n.hooks.processDatapoints.push(i),n.hasStackPlugin=!0)}var t={series:{stack:null}};n.plot.plugins.push({init:i,options:t,name:"stack",version:"1.2"})}(jQuery),function(n){typeof module=="function"?module.exports=n(this.jQuery||require("jquery")):this.NProgress=n(this.jQuery)}(function(n){function u(n,t,i){return n<t?t:n>i?i:n}function r(n){return(-1+n)*100}function f(n,t,u){var f;return f=i.positionUsing==="translate3d"?{transform:"translate3d("+r(n)+"%,0,0)"}:i.positionUsing==="translate"?{transform:"translate("+r(n)+"%,0)"}:{"margin-left":r(n)+"%"},f.transition="all "+t+"ms "+u,f}var t={},i;return t.version="0.1.2",i=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,template:'<div class="bar" role="bar"><div class="peg"><\/div><\/div><div class="spinner" role="spinner"><div class="spinner-icon"><\/div><\/div>'},t.configure=function(t){return n.extend(i,t),this},t.status=null,t.set=function(n){var o=t.isStarted();n=u(n,i.minimum,1),t.status=n===1?null:n;var r=t.render(!o),s=r.find('[role="bar"]'),e=i.speed,h=i.easing;return r[0].offsetWidth,r.queue(function(u){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),s.css(f(n,e,h)),n===1?(r.css({transition:"none",opacity:1}),r[0].offsetWidth,setTimeout(function(){r.css({transition:"all "+e+"ms linear",opacity:0}),setTimeout(function(){t.remove(),u()},e)},e)):setTimeout(u,e)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var n=function(){setTimeout(function(){t.status&&(t.trickle(),n())},i.trickleSpeed)};return i.trickle&&n(),this},t.done=function(n){return!n&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(n){var i=t.status;return i?(typeof n!="number"&&(n=(1-i)*u(Math.random()*i,.1,.95)),i=u(i+n,0,.994),t.set(i)):t.start()},t.trickle=function(){return t.inc(Math.random()*i.trickleRate)},t.render=function(u){if(t.isRendered())return n("#nprogress");n("html").addClass("nprogress-busy");var f=n("<div id='nprogress'>").html(i.template),e=u?"-100":r(t.status||0);return f.find('[role="bar"]').css({transition:"all 0 linear",transform:"translate3d("+e+"%,0,0)"}),i.showSpinner||f.find('[role="spinner"]').remove(),f.appendTo(document.body),f},t.remove=function(){n("html").removeClass("nprogress-busy"),n("#nprogress").remove()},t.isRendered=function(){return n("#nprogress").length>0},t.getPositioningCSS=function(){var n=document.body.style,t="WebkitTransform"in n?"Webkit":"MozTransform"in n?"Moz":"msTransform"in n?"ms":"OTransform"in n?"O":"";return t+"Perspective"in n?"translate3d":t+"Transform"in n?"translate":"margin"},t}),function(n){var o="0.3.4",f="hasOwnProperty",e=/[\.\/]/,s="*",h=function(){},c=function(n,t){return n-t},r,i,u={n:{}},t=function(n,f){var k=u,w=i,v=Array.prototype.slice.call(arguments,2),s=t.listeners(n),a=0,d=!1,e,l=[],y={},h=[],b=r,g=[],o,p;for(r=n,i=0,o=0,p=s.length;o<p;o++)"zIndex"in s[o]&&(l.push(s[o].zIndex),s[o].zIndex<0&&(y[s[o].zIndex]=s[o]));for(l.sort(c);l[a]<0;)if(e=y[l[a++]],h.push(e.apply(f,v)),i)return i=w,h;for(o=0;o<p;o++)if(e=s[o],"zIndex"in e)if(e.zIndex==l[a]){if(h.push(e.apply(f,v)),i)break;do if(a++,e=y[l[a]],e&&h.push(e.apply(f,v)),i)break;while(e)}else y[e.zIndex]=e;else if(h.push(e.apply(f,v)),i)break;return i=w,r=b,h.length?h:null};t.listeners=function(n){for(var a=n.split(e),t=u,i,v,o,r,y,h,c=[t],l=[],f=0,p=a.length;f<p;f++){for(h=[],r=0,y=c.length;r<y;r++)for(t=c[r].n,v=[t[a[f]],t[s]],o=2;o--;)i=v[o],i&&(h.push(i),l=l.concat(i.f||[]));c=h}return l},t.on=function(n,t){for(var f=n.split(e),i=u,r=0,o=f.length;r<o;r++)i=i.n,!i[f[r]]&&(i[f[r]]={n:{}}),i=i[f[r]];for(i.f=i.f||[],r=0,o=i.f.length;r<o;r++)if(i.f[r]==t)return h;return i.f.push(t),function(n){+n==+n&&(t.zIndex=+n)}},t.stop=function(){i=1},t.nt=function(n){return n?new RegExp("(?:\\.|\\/|^)"+n+"(?:\\.|\\/|$)").test(r):r},t.off=t.unbind=function(n,t){for(var v=n.split(e),i,o,l,r,y,c=[u],a,h=0,p=v.length;h<p;h++)for(r=0;r<c.length;r+=l.length-2){if(l=[r,1],i=c[r].n,v[h]!=s)i[v[h]]&&l.push(i[v[h]]);else for(o in i)i[f](o)&&l.push(i[o]);c.splice.apply(c,l)}for(h=0,p=c.length;h<p;h++)for(i=c[h];i.n;){if(t){if(i.f){for(r=0,y=i.f.length;r<y;r++)if(i.f[r]==t){i.f.splice(r,1);break}i.f.length||delete i.f}for(o in i.n)if(i.n[f](o)&&i.n[o].f){for(a=i.n[o].f,r=0,y=a.length;r<y;r++)if(a[r]==t){a.splice(r,1);break}a.length||delete i.n[o].f}}else{delete i.f;for(o in i.n)i.n[f](o)&&i.n[o].f&&delete i.n[o].f}i=i.n}},t.once=function(n,i){var r=function(){var u=i.apply(this,arguments);return t.unbind(n,r),u};return t.on(n,r)},t.version=o,t.toString=function(){return"You are running Eve "+o},typeof module!="undefined"&&module.exports?module.exports=t:typeof define!="undefined"?define("eve",[],function(){return t}):n.eve=t}(this),function(){function or(n){for(var t=0;t<r.length;t++)r[t].el.paper==n&&r.splice(t--,1)}function at(t,i,u,e,s,c){var g,a,et,l,lt,kt,ti,nt,at,dt,vt,k,rt,st,ht,gt,ut,ct;u=o(u);var tt,ot,pt,ii=[],ni,wt,bt,w=t.ms,p={},d={},b={};if(e){for(a=0,et=r.length;a<et;a++)if(g=r[a],g.el.id==i.id&&g.anim==t){g.percent!=u?(r.splice(a,1),pt=1):ot=g,i.attr(g.totalOrigin);break}}else e=+d;for(a=0,et=t.percents.length;a<et;a++){if(t.percents[a]==u||t.percents[a]>e*t.top){u=t.percents[a],wt=t.percents[a-1]||0,w=w/t.top*(u-wt),ni=t.percents[a+1],tt=t.anim[u];break}e&&i.attr(t.anim[t.percents[a]])}if(!!tt){if(ot)ot.initstatus=e,ot.start=new Date-ot.ms*e;else{for(l in tt)if(tt[h](l)&&(pi[h](l)||i.paper.customAttributes[h](l))){p[l]=i.attr(l),p[l]==null&&(p[l]=ku[l]),d[l]=tt[l];switch(pi[l]){case v:b[l]=(d[l]-p[l])/w;break;case"colour":p[l]=n.getRGB(p[l]),lt=n.getRGB(d[l]),b[l]={r:(lt.r-p[l].r)/w,g:(lt.g-p[l].g)/w,b:(lt.b-p[l].b)/w};break;case"path":for(kt=yt(p[l],d[l]),ti=kt[1],p[l]=kt[0],b[l]=[],a=0,et=p[l].length;a<et;a++)for(b[l][a]=[0],nt=1,at=p[l][a].length;nt<at;nt++)b[l][a][nt]=(ti[a][nt]-p[l][a][nt])/w;break;case"transform":if(dt=i._,vt=af(dt[l],d[l]),vt)for(p[l]=vt.from,d[l]=vt.to,b[l]=[],b[l].real=!0,a=0,et=p[l].length;a<et;a++)for(b[l][a]=[p[l][a][0]],nt=1,at=p[l][a].length;nt<at;nt++)b[l][a][nt]=(d[l][a][nt]-p[l][a][nt])/w;else k=i.matrix||new ft,rt={_:{transform:dt.transform},getBBox:function(){return i.getBBox(1)}},p[l]=[k.a,k.b,k.c,k.d,k.e,k.f],iu(rt,d[l]),d[l]=rt._.transform,b[l]=[(rt.matrix.a-k.a)/w,(rt.matrix.b-k.b)/w,(rt.matrix.c-k.c)/w,(rt.matrix.d-k.d)/w,(rt.matrix.e-k.e)/w,(rt.matrix.f-k.f)/w];break;case"csv":if(st=y(tt[l])[it](ci),ht=y(p[l])[it](ci),l=="clip-rect")for(p[l]=ht,b[l]=[],a=ht.length;a--;)b[l][a]=(st[a]-p[l][a])/w;d[l]=st;break;default:for(st=[][f](tt[l]),ht=[][f](p[l]),b[l]=[],a=i.paper.customAttributes[l].length;a--;)b[l][a]=((st[a]||0)-(ht[a]||0))/w}}if(gt=tt.easing,ut=n.easing_formulas[gt],ut||(ut=y(gt).match(bu),ut&&ut.length==5?(ct=ut,ut=function(n){return su(n,+ct[1],+ct[2],+ct[3],+ct[4],w)}):ut=ff),bt=tt.start||t.start||+new Date,g={anim:t,percent:u,timestamp:bt,start:bt+(t.del||0),status:0,initstatus:e||0,stop:!1,ms:w,easing:ut,from:p,diff:b,to:d,el:i,callback:tt.callback,prev:wt,next:ni,repeat:c||t.times,origin:i.attr(),totalOrigin:s},r.push(g),e&&!ot&&!pt&&(g.stop=!0,g.start=new Date-w*e,r.length==1))return fr();pt&&(g.start=new Date-g.ms*e),r.length==1&&ou(fr)}eve("raphael.anim.start."+i.id,i,t)}}function rt(n,t){var i=[],u={},r;if(this.ms=t,this.times=1,n){for(r in n)n[h](r)&&(u[o(r)]=n[r],i.push(o(r)));i.sort(rf)}this.anim=u,this.top=i[i.length-1],this.percents=i}function su(n,t,i,r,u,f){function v(n,t){for(var r,u,f,s,i=n,l=0;l<8;l++){if(f=h(i)-n,a(f)<t)return i;if(s=(3*c*i+2*o)*i+e,a(s)<1e-6)break;i=i-f/s}if(r=0,u=1,i=n,i<r)return r;if(i>u)return u;while(r<u){if(f=h(i),a(f-n)<t)return i;n>f?r=i:u=i,i=(u-r)/2+r}return i}function y(n,t){var i=v(n,t);return((p*i+l)*i+s)*i}function h(n){return((c*n+o)*n+e)*n}var e=3*t,o=3*(r-t)-e,c=1-e-o,s=3*i,l=3*(u-i)-s,p=1-s-l;return y(n,1/(200*f))}function sr(){return this.x+lt+this.y+lt+this.width+" × "+this.height}function ft(n,t,i,r,u,f){n!=null?(this.a=+n,this.b=+t,this.c=+i,this.d=+r,this.e=+u,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function ei(t,i,r){var e,o,s,h,b,k,d,g,c,l,y,p,nt,a,w,tt,v,u,f,it;for(t=n._path2curve(t),i=n._path2curve(i),y=r?0:[],p=0,nt=t.length;p<nt;p++)if(a=t[p],a[0]=="M")e=b=a[1],o=k=a[2];else for(a[0]=="C"?(c=[e,o].concat(a.slice(1)),e=c[6],o=c[7]):(c=[e,o,e,o,b,k,b,k],e=b,o=k),w=0,tt=i.length;w<tt;w++)if(v=i[w],v[0]=="M")s=d=v[1],h=g=v[2];else if(v[0]=="C"?(l=[s,h].concat(v.slice(1)),s=l[6],h=l[7]):(l=[s,h,s,h,d,g,d,g],s=d,h=g),u=oi(c,l,r),r)y+=u;else{for(f=0,it=u.length;f<it;f++)u[f].segment1=p,u[f].segment2=w,u[f].bez1=c,u[f].bez2=l;y=y.concat(u)}return y}function oi(t,i,r){var it=n.bezierBBox(t),rt=n.bezierBBox(i),u,s,h,b,k;if(!n.isBBoxIntersect(it,rt))return r?0:[];var ut=ct.apply(0,t),ft=ct.apply(0,i),v=~~(ut/5),y=~~(ft/5),d=[],g=[],tt={},nt=r?0:[];for(u=0;u<v+1;u++)s=n.findDotsAtSegment.apply(n,t.concat(u/v)),d.push({x:s.x,y:s.y,t:u/v});for(u=0;u<y+1;u++)s=n.findDotsAtSegment.apply(n,i.concat(u/y)),g.push({x:s.x,y:s.y,t:u/y});for(u=0;u<v;u++)for(h=0;h<y;h++){var e=d[u],c=d[u+1],o=g[h],l=g[h+1],p=a(c.x-e.x)<.001?"y":"x",w=a(l.x-o.x)<.001?"y":"x",f=hu(e.x,e.y,c.x,c.y,o.x,o.y,l.x,l.y);if(f){if(tt[f.x.toFixed(4)]==f.y.toFixed(4))continue;tt[f.x.toFixed(4)]=f.y.toFixed(4),b=e.t+a((f[p]-e[p])/(c[p]-e[p]))*(c.t-e.t),k=o.t+a((f[w]-o[w])/(l[w]-o[w]))*(l.t-o.t),b>=0&&b<=1&&k>=0&&k<=1&&(r?nt++:nt.push({x:f.x,y:f.y,t1:b,t2:k}))}}return nt}function hu(n,t,i,r,u,f,o,s){if(!(e(n,i)<l(u,o)||l(n,i)>e(u,o)||e(t,r)<l(f,s)||l(t,r)>e(f,s))){var p=(n*r-t*i)*(u-o)-(n-i)*(u*s-f*o),w=(n*r-t*i)*(f-s)-(t-r)*(u*s-f*o),a=(n-i)*(f-s)-(t-r)*(u-o);if(!a)return;var v=p/a,y=w/a,h=+v.toFixed(2),c=+y.toFixed(2);return h<+l(n,i).toFixed(2)||h>+e(n,i).toFixed(2)||h<+l(u,o).toFixed(2)||h>+e(u,o).toFixed(2)||c<+l(t,r).toFixed(2)||c>+e(t,r).toFixed(2)||c<+l(f,s).toFixed(2)||c>+e(f,s).toFixed(2)?void 0:{x:v,y:y}}}function cu(n,t,i,r,u,f,e,o,s){if(!(s<0||ct(n,t,i,r,u,f,e,o)<s)){for(var v=1,l=v/2,h=v-l,y=.01,c=ct(n,t,i,r,u,f,e,o,h);a(c-s)>y;)l/=2,h+=(c<s?1:-1)*l,c=ct(n,t,i,r,u,f,e,o,h);return h}}function ct(n,t,r,u,f,e,o,s,h){var c;h==null&&(h=1),h=h>1?1:h<0?0:h;var l=h/2,w=12,b=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],k=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],a=0;for(c=0;c<w;c++){var v=l*b[c]+l,y=hr(v,n,r,f,o),p=hr(v,t,u,e,s),d=y*y+p*p;a+=k[c]*i.sqrt(d)}return l*a}function hr(n,t,i,r,u){var f=-3*t+9*i-9*r+3*u,e=n*f+6*t-12*i+6*r;return n*e-3*t+3*i}function cr(n,t){for(var f=[],i,r=0,u=n.length;u-2*!t>r;r+=2)i=[{x:+n[r-2],y:+n[r-1]},{x:+n[r],y:+n[r+1]},{x:+n[r+2],y:+n[r+3]},{x:+n[r+4],y:+n[r+5]}],t?r?u-4==r?i[3]={x:+n[0],y:+n[1]}:u-2==r&&(i[2]={x:+n[0],y:+n[1]},i[3]={x:+n[2],y:+n[3]}):i[0]={x:+n[u-2],y:+n[u-1]}:u-4==r?i[3]=i[2]:r||(i[0]={x:+n[r],y:+n[r+1]}),f.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y]);return f}function wt(){return this.hex}function nt(n,t,i){function r(){var o=Array.prototype.slice.call(arguments,0),u=o.join("␀"),f=r.cache=r.cache||{},e=r.count=r.count||[];return f[h](u)?(lu(e,u),i?i(f[u]):f[u]):(e.length>=1e3&&delete f[e.shift()],e.push(u),f[u]=n[c](t,o),i?i(f[u]):f[u])}return r}function lu(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return n.push(n.splice(i,1)[0])}function si(n){var i,t;if(Object(n)!==n)return n;i=new n.constructor;for(t in n)n[h](t)&&(i[t]=si(n[t]));return i}function n(t){var i,r;return n.is(t,"function")?hi?t():eve.on("raphael.DOMload",t):n.is(t,g)?n._engine.create[c](n,t.splice(0,3+n.is(t[0],v))).add(t):(i=Array.prototype.slice.call(arguments,0),n.is(i[i.length-1],"function"))?(r=i.pop(),hi?r.call(n._engine.create[c](n,i)):eve.on("raphael.DOMload",function(){r.call(n._engine.create[c](n,i))})):n._engine.create[c](n,arguments)}var gt,ni,ef,hf,ut,pt,tr,st,uu,k,ht,w,fi;n.version="2.1.0",n.eve=eve;var hi,ci=/[, ]+/,au={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},vu=/\{(\d+)\}/g,kf="prototype",h="hasOwnProperty",t={doc:document,win:window},li={was:Object.prototype[h].call(t.win,"Raphael"),is:t.win.Raphael},lr=function(){this.ca=this.customAttributes={}},s,df="appendChild",c="apply",f="concat",ai="createTouch"in t.doc,b="",lt=" ",y=String,it="split",ar="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[it](lt),vi={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},bt=y.prototype.toLowerCase,i=Math,e=i.max,l=i.min,a=i.abs,d=i.pow,p=i.PI,v="number",kt="string",g="array",gf="toString",ne="fill",yu=Object.prototype.toString,te={},ie="push",re=n._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,pu=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,wu={NaN:1,Infinity:1,"-Infinity":1},bu=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,yi=i.round,ue="setAttribute",o=parseFloat,et=parseInt,vr=y.prototype.toUpperCase,ku=n._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},pi=n._availableAnimAttrs={blur:v,"clip-rect":"csv",cx:v,cy:v,fill:"colour","fill-opacity":v,"font-size":v,height:v,opacity:v,path:"path",r:v,rx:v,ry:v,stroke:"colour","stroke-opacity":v,"stroke-width":v,transform:"transform",width:v,x:v,y:v},fe=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,wi=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,du={hs:1,rg:1},gu=/,?([achlmqrstvxz]),?/gi,nf=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,tf=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,yr=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,ee=n._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,vt={},oe=function(n,t){return n.key-t.key},rf=function(n,t){return o(n)-o(t)},uf=function(){},ff=function(n){return n},bi=n._rectPath=function(n,t,i,r,u){return u?[["M",n+u,t],["l",i-u*2,0],["a",u,u,0,0,1,u,u],["l",0,r-u*2],["a",u,u,0,0,1,-u,u],["l",u*2-i,0],["a",u,u,0,0,1,-u,-u],["l",0,u*2-r],["a",u,u,0,0,1,u,-u],["z"]]:[["M",n,t],["l",i,0],["l",0,r],["l",-i,0],["z"]]},pr=function(n,t,i,r){return r==null&&(r=i),[["M",n,t],["m",0,-r],["a",i,r,0,1,1,0,2*r],["a",i,r,0,1,1,0,-2*r],["z"]]},dt=n._getPath={path:function(n){return n.attr("path")},circle:function(n){var t=n.attrs;return pr(t.cx,t.cy,t.r)},ellipse:function(n){var t=n.attrs;return pr(t.cx,t.cy,t.rx,t.ry)},rect:function(n){var t=n.attrs;return bi(t.x,t.y,t.width,t.height,t.r)},image:function(n){var t=n.attrs;return bi(t.x,t.y,t.width,t.height)},text:function(n){var t=n._getBBox();return bi(t.x,t.y,t.width,t.height)}},ki=n.mapPath=function(n,t){if(!t)return n;var f,e,u,i,o,s,r;for(n=yt(n),u=0,o=n.length;u<o;u++)for(r=n[u],i=1,s=r.length;i<s;i+=2)f=t.x(r[i],r[i+1]),e=t.y(r[i],r[i+1]),r[i]=f,r[i+1]=e;return n};if(n._g=t,n.type=t.win.SVGAngle||t.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",n.type=="VML"){if(gt=t.doc.createElement("div"),gt.innerHTML='<v:shape adj="1"/>',ni=gt.firstChild,ni.style.behavior="url(#default#VML)",!ni||typeof ni.adj!="object")return n.type=b;gt=null}n.svg=!(n.vml=n.type=="VML"),n._Paper=lr,n.fn=s=lr.prototype=n.prototype,n._id=0,n._oid=0,n.is=function(n,t){return(t=bt.call(t),t=="finite")?!wu[h](+n):t=="array"?n instanceof Array:t=="null"&&n===null||t==typeof n&&n!==null||t=="object"&&n===Object(n)||t=="array"&&Array.isArray&&Array.isArray(n)||yu.call(n).slice(8,-1).toLowerCase()==t},n.angle=function(t,r,u,f,e,o){if(e==null){var s=t-u,h=r-f;return!s&&!h?0:(180+i.atan2(-h,-s)*180/p+360)%360}return n.angle(t,r,e,o)-n.angle(u,f,e,o)},n.rad=function(n){return n%360*p/180},n.deg=function(n){return n*180/p%360},n.snapTo=function(t,i,r){var f,u;if(r=n.is(r,"finite")?r:10,n.is(t,g)){for(f=t.length;f--;)if(a(t[f]-i)<=r)return t[f]}else{if(t=+t,u=i%t,u<r)return i-u;if(u>t-r)return i-u+t}return i},ef=n.createUUID=function(n,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,t).toUpperCase()}}(/[xy]/g,function(n){var t=i.random()*16|0,r=n=="x"?t:t&3|8;return r.toString(16)}),n.setWindow=function(i){eve("raphael.setWindow",n,t.win,i),t.win=i,t.doc=t.win.document,n._engine.initWin&&n._engine.initWin(t.win)};var ti=function(i){var e,u,f,o,r;if(n.vml){e=/^\s+|\s+$/g;try{f=new ActiveXObject("htmlfile"),f.write("<body>"),f.close(),u=f.body}catch(s){u=createPopup().document.body}o=u.createTextRange(),ti=nt(function(n){try{u.style.color=y(n).replace(e,b);var t=o.queryCommandValue("ForeColor");return t=(t&255)<<16|t&65280|(t&16711680)>>>16,"#"+("000000"+t.toString(16)).slice(-6)}catch(i){return"none"}})}else r=t.doc.createElement("i"),r.title="Raphaël Colour Picker",r.style.display="none",t.doc.body.appendChild(r),ti=nt(function(n){return r.style.color=n,t.doc.defaultView.getComputedStyle(r,b).getPropertyValue("color")});return ti(i)},of=function(){return"hsb("+[this.h,this.s,this.b]+")"},sf=function(){return"hsl("+[this.h,this.s,this.l]+")"},wr=function(){return this.hex},br=function(t,i,r){if(i==null&&n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,i=t.g,t=t.r),i==null&&n.is(t,kt)){var u=n.getRGB(t);t=u.r,i=u.g,r=u.b}return(t>1||i>1||r>1)&&(t/=255,i/=255,r/=255),[t,i,r]},kr=function(t,i,r,u){t*=255,i*=255,r*=255;var f={r:t,g:i,b:r,hex:n.rgb(t,i,r),toString:wr};return n.is(u,"finite")&&(f.opacity=u),f};n.color=function(t){var i;return n.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(i=n.hsb2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):n.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(i=n.hsl2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):(n.is(t,"string")&&(t=n.getRGB(t)),n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(i=n.rgb2hsl(t),t.h=i.h,t.s=i.s,t.l=i.l,i=n.rgb2hsb(t),t.v=i.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=wr,t},n.hsb2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"b"in n&&(i=n.b,t=n.s,n=n.h,r=n.o),n*=360;var e,o,s,f,u;return n=n%360/60,u=i*t,f=u*(1-a(n%2-1)),e=o=s=i-u,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],kr(e,o,s,r)},n.hsl2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"l"in n&&(i=n.l,t=n.s,n=n.h),(n>1||t>1||i>1)&&(n/=360,t/=100,i/=100),n*=360;var e,o,s,f,u;return n=n%360/60,u=2*t*(i<.5?i:1-i),f=u*(1-a(n%2-1)),e=o=s=i-u/2,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],kr(e,o,s,r)},n.rgb2hsb=function(n,t,i){i=br(n,t,i),n=i[0],t=i[1],i=i[2];var f,o,u,r;return u=e(n,t,i),r=u-l(n,t,i),f=r==0?null:u==n?(t-i)/r:u==t?(i-n)/r+2:(n-t)/r+4,f=(f+360)%6/6,o=r==0?0:r/u,{h:f,s:o,b:u,toString:of}},n.rgb2hsl=function(n,t,i){i=br(n,t,i),n=i[0],t=i[1],i=i[2];var o,h,u,f,s,r;return f=e(n,t,i),s=l(n,t,i),r=f-s,o=r==0?null:f==n?(t-i)/r:f==t?(i-n)/r+2:(n-t)/r+4,o=(o+360)%6/6,u=(f+s)/2,h=r==0?0:u<.5?r/(2*u):r/(2-2*u),{h:o,s:h,l:u,toString:sf}},n._path2string=function(){return this.join(",").replace(gu,"$1")},hf=n._preload=function(n,i){var r=t.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){i.call(this),this.onload=null,t.doc.body.removeChild(this)},r.onerror=function(){t.doc.body.removeChild(this)},t.doc.body.appendChild(r),r.src=n},n.getRGB=nt(function(t){if(!t||!!((t=y(t)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:wt};if(t=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:wt};du[h](t.toLowerCase().substring(0,2))||t.charAt()=="#"||(t=ti(t));var l,u,f,e,s,c,i,r=t.match(pu);return r?(r[2]&&(e=et(r[2].substring(5),16),f=et(r[2].substring(3,5),16),u=et(r[2].substring(1,3),16)),r[3]&&(e=et((c=r[3].charAt(3))+c,16),f=et((c=r[3].charAt(2))+c,16),u=et((c=r[3].charAt(1))+c,16)),r[4]&&(i=r[4][it](wi),u=o(i[0]),i[0].slice(-1)=="%"&&(u*=2.55),f=o(i[1]),i[1].slice(-1)=="%"&&(f*=2.55),e=o(i[2]),i[2].slice(-1)=="%"&&(e*=2.55),r[1].toLowerCase().slice(0,4)=="rgba"&&(s=o(i[3])),i[3]&&i[3].slice(-1)=="%"&&(s/=100)),r[5])?(i=r[5][it](wi),u=o(i[0]),i[0].slice(-1)=="%"&&(u*=2.55),f=o(i[1]),i[1].slice(-1)=="%"&&(f*=2.55),e=o(i[2]),i[2].slice(-1)=="%"&&(e*=2.55),(i[0].slice(-3)=="deg"||i[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsba"&&(s=o(i[3])),i[3]&&i[3].slice(-1)=="%"&&(s/=100),n.hsb2rgb(u,f,e,s)):r[6]?(i=r[6][it](wi),u=o(i[0]),i[0].slice(-1)=="%"&&(u*=2.55),f=o(i[1]),i[1].slice(-1)=="%"&&(f*=2.55),e=o(i[2]),i[2].slice(-1)=="%"&&(e*=2.55),(i[0].slice(-3)=="deg"||i[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsla"&&(s=o(i[3])),i[3]&&i[3].slice(-1)=="%"&&(s/=100),n.hsl2rgb(u,f,e,s)):(r={r:u,g:f,b:e,toString:wt},r.hex="#"+(16777216|e|f<<8|u<<16).toString(16).slice(1),n.is(s,"finite")&&(r.opacity=s),r):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:wt}},n),n.hsb=nt(function(t,i,r){return n.hsb2rgb(t,i,r).hex}),n.hsl=nt(function(t,i,r){return n.hsl2rgb(t,i,r).hex}),n.rgb=nt(function(n,t,i){return"#"+(16777216|i|t<<8|n<<16).toString(16).slice(1)}),n.getColor=function(n){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:n||.75},i=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),i.hex},n.getColor.reset=function(){delete this.start},n.parsePathString=function(t){var r,u,i;return t?(r=ut(t),r.arr)?tt(r.arr):(u={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[],n.is(t,g)&&n.is(t[0],g)&&(i=tt(t)),i.length||y(t).replace(nf,function(n,t,r){var e=[],o=t.toLowerCase();if(r.replace(yr,function(n,t){t&&e.push(+t)}),o=="m"&&e.length>2&&(i.push([t][f](e.splice(0,2))),o="l",t=t=="m"?"l":"L"),o=="r")i.push([t][f](e));else while(e.length>=u[o])if(i.push([t][f](e.splice(0,u[o]))),!u[o])break}),i.toString=n._path2string,r.arr=tt(i),i):null},n.parseTransformString=nt(function(t){if(!t)return null;var r={r:3,s:4,t:2,m:6},i=[];return n.is(t,g)&&n.is(t[0],g)&&(i=tt(t)),i.length||y(t).replace(tf,function(n,t,r){var u=[],e=bt.call(t);r.replace(yr,function(n,t){t&&u.push(+t)}),i.push([t][f](u))}),i.toString=n._path2string,i}),ut=function(n){var t=ut.ps=ut.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(function(){for(var i in t)t[h](i)&&i!=n&&(t[i].sleep--,!t[i].sleep&&delete t[i])}),t[n]},n.findDotsAtSegment=function(n,t,r,u,f,e,o,s,h){var c=1-h,b=d(c,3),k=d(c,2),l=h*h,g=l*h,tt=b*n+k*3*h*r+c*3*h*h*f+g*o,it=b*t+k*3*h*u+c*3*h*h*e+g*s,a=n+2*h*(r-n)+l*(f-2*r+n),v=t+2*h*(u-t)+l*(e-2*u+t),y=r+2*h*(f-r)+l*(o-2*f+r),w=u+2*h*(e-u)+l*(s-2*e+u),rt=c*n+h*r,ut=c*t+h*u,ft=c*f+h*o,et=c*e+h*s,nt=90-i.atan2(a-y,v-w)*180/p;return(a>y||v<w)&&(nt+=180),{x:tt,y:it,m:{x:a,y:v},n:{x:y,y:w},start:{x:rt,y:ut},end:{x:ft,y:et},alpha:nt}},n.bezierBBox=function(t,i,r,u,f,e,o,s){n.is(t,"array")||(t=[t,i,r,u,f,e,o,s]);var h=tu.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},n.isPointInsideBBox=function(n,t,i){return t>=n.x&&t<=n.x2&&i>=n.y&&i<=n.y2},n.isBBoxIntersect=function(t,i){var r=n.isPointInsideBBox;return r(i,t.x,t.y)||r(i,t.x2,t.y)||r(i,t.x,t.y2)||r(i,t.x2,t.y2)||r(t,i.x,i.y)||r(t,i.x2,i.y)||r(t,i.x,i.y2)||r(t,i.x2,i.y2)||(t.x<i.x2&&t.x>i.x||i.x<t.x2&&i.x>t.x)&&(t.y<i.y2&&t.y>i.y||i.y<t.y2&&i.y>t.y)},n.pathIntersection=function(n,t){return ei(n,t)},n.pathIntersectionNumber=function(n,t){return ei(n,t,1)},n.isPointInsidePath=function(t,i,r){var u=n.pathBBox(t);return n.isPointInsideBBox(u,i,r)&&ei(t,[["M",i,r],["H",u.x2+10]],1)%2==1},n._removedFactory=function(n){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+n+"” of removed object",n)}};var di=n.pathBBox=function(n){var a=ut(n),h,v,u;if(a.bbox)return a.bbox;if(!n)return{x:0,y:0,width:0,height:0,x2:0,y2:0};n=yt(n);var o=0,s=0,i=[],r=[],t;for(h=0,v=n.length;h<v;h++)t=n[h],t[0]=="M"?(o=t[1],s=t[2],i.push(o),r.push(s)):(u=tu(o,s,t[1],t[2],t[3],t[4],t[5],t[6]),i=i[f](u.min.x,u.max.x),r=r[f](u.min.y,u.max.y),o=t[5],s=t[6]);var y=l[c](0,i),p=l[c](0,r),w=e[c](0,i),b=e[c](0,r),k={x:y,y:p,x2:w,y2:b,width:w-y,height:b-p};return a.bbox=si(k),k},tt=function(t){var i=si(t);return i.toString=n._path2string,i},cf=n._pathToRelative=function(t){var v=ut(t),u,p,f,i,s,w,h,b,c;if(v.rel)return tt(v.rel);n.is(t,g)&&n.is(t&&t[0],g)||(t=n.parsePathString(t));var r=[],o=0,e=0,l=0,a=0,y=0;for(t[0][0]=="M"&&(o=t[0][1],e=t[0][2],l=o,a=e,y++,r.push(["M",o,e])),u=y,p=t.length;u<p;u++){if(f=r[u]=[],i=t[u],i[0]!=bt.call(i[0])){f[0]=bt.call(i[0]);switch(f[0]){case"a":f[1]=i[1],f[2]=i[2],f[3]=i[3],f[4]=i[4],f[5]=i[5],f[6]=+(i[6]-o).toFixed(3),f[7]=+(i[7]-e).toFixed(3);break;case"v":f[1]=+(i[1]-e).toFixed(3);break;case"m":l=i[1],a=i[2];default:for(s=1,w=i.length;s<w;s++)f[s]=+(i[s]-(s%2?o:e)).toFixed(3)}}else for(f=r[u]=[],i[0]=="m"&&(l=i[1]+o,a=i[2]+e),h=0,b=i.length;h<b;h++)r[u][h]=i[h];c=r[u].length;switch(r[u][0]){case"z":o=l,e=a;break;case"h":o+=+r[u][c-1];break;case"v":e+=+r[u][c-1];break;default:o+=+r[u][c-2],e+=+r[u][c-1]}}return r.toString=n._path2string,v.rel=tt(r),r},dr=n._pathToAbsolute=function(t){var p=ut(t),w,i,r,v,k,h,o,y,c,d;if(p.abs)return tt(p.abs);if(n.is(t,g)&&n.is(t&&t[0],g)||(t=n.parsePathString(t)),!t||!t.length)return[["M",0,0]];var s=[],u=0,e=0,l=0,a=0,b=0;for(t[0][0]=="M"&&(u=+t[0][1],e=+t[0][2],l=u,a=e,b++,s[0]=["M",u,e]),w=t.length==3&&t[0][0]=="M"&&t[1][0].toUpperCase()=="R"&&t[2][0].toUpperCase()=="Z",v=b,k=t.length;v<k;v++){if(s.push(i=[]),r=t[v],r[0]!=vr.call(r[0])){i[0]=vr.call(r[0]);switch(i[0]){case"A":i[1]=r[1],i[2]=r[2],i[3]=r[3],i[4]=r[4],i[5]=r[5],i[6]=+(r[6]+u),i[7]=+(r[7]+e);break;case"V":i[1]=+r[1]+e;break;case"H":i[1]=+r[1]+u;break;case"R":for(h=[u,e][f](r.slice(1)),o=2,y=h.length;o<y;o++)h[o]=+h[o]+u,h[++o]=+h[o]+e;s.pop(),s=s[f](cr(h,w));break;case"M":l=+r[1]+u,a=+r[2]+e;default:for(o=1,y=r.length;o<y;o++)i[o]=+r[o]+(o%2?u:e)}}else if(r[0]=="R")h=[u,e][f](r.slice(1)),s.pop(),s=s[f](cr(h,w)),i=["R"][f](r.slice(-2));else for(c=0,d=r.length;c<d;c++)i[c]=r[c];switch(i[0]){case"Z":u=l,e=a;break;case"H":u=i[1];break;case"V":e=i[1];break;case"M":l=i[i.length-2],a=i[i.length-1];default:u=i[i.length-2],e=i[i.length-1]}}return s.toString=n._path2string,p.abs=tt(s),s},ii=function(n,t,i,r){return[n,t,i,r,i,r]},gr=function(n,t,i,r,u,f){var e=1/3,o=2/3;return[e*n+o*i,e*t+o*r,e*u+o*i,e*f+o*r,u,f]},nu=function(n,t,r,u,e,o,s,h,c,l){var at=p*120/180,et=p/180*(+e||0),w=[],g,ot=nt(function(n,t,r){var u=n*i.cos(r)-t*i.sin(r),f=n*i.sin(r)+t*i.cos(r);return{x:u,y:f}}),st,lt,b,gt;if(l)y=l[0],v=l[1],ut=l[2],ft=l[3];else{g=ot(n,t,-et),n=g.x,t=g.y,g=ot(h,c,-et),h=g.x,c=g.y;var oi=i.cos(p/180*e),si=i.sin(p/180*e),k=(n-h)/2,d=(t-c)/2,rt=k*k/(r*r)+d*d/(u*u);rt>1&&(rt=i.sqrt(rt),r=rt*r,u=rt*u);var ht=r*r,ct=u*u,vt=(o==s?-1:1)*i.sqrt(a((ht*ct-ht*d*d-ct*k*k)/(ht*d*d+ct*k*k))),ut=vt*r*d/u+(n+h)/2,ft=vt*-u*k/r+(t+c)/2,y=i.asin(((t-ft)/u).toFixed(9)),v=i.asin(((c-ft)/u).toFixed(9));y=n<ut?p-y:y,v=h<ut?p-v:v,y<0&&(y=p*2+y),v<0&&(v=p*2+v),s&&y>v&&(y=y-p*2),!s&&v>y&&(v=v-p*2)}if(st=v-y,a(st)>at){var ni=v,ti=h,ii=c;v=y+at*(s&&v>y?1:-1),h=ut+r*i.cos(v),c=ft+u*i.sin(v),w=nu(h,c,r,u,e,0,s,ti,ii,[v,ni,ut,ft])}st=v-y;var ri=i.cos(y),ui=i.sin(y),fi=i.cos(v),ei=i.sin(v),yt=i.tan(st/4),pt=4/3*r*yt,wt=4/3*u*yt,bt=[n,t],tt=[n+pt*ui,t-wt*ri],kt=[h+pt*ei,c-wt*fi],dt=[h,c];if(tt[0]=2*bt[0]-tt[0],tt[1]=2*bt[1]-tt[1],l)return[tt,kt,dt][f](w);for(w=[tt,kt,dt][f](w).join()[it](","),lt=[],b=0,gt=w.length;b<gt;b++)lt[b]=b%2?ot(w[b-1],w[b],et).y:ot(w[b],w[b+1],et).x;return lt},ri=function(n,t,i,r,u,f,e,o,s){var h=1-s;return{x:d(h,3)*n+d(h,2)*3*s*i+h*3*s*s*u+d(s,3)*e,y:d(h,3)*t+d(h,2)*3*s*r+h*3*s*s*f+d(s,3)*o}},tu=nt(function(n,t,r,u,f,o,s,h){var b=f-2*r+n-(s-2*f+r),v=2*(r-n)-2*(f-r),g=n-r,p=(-v+i.sqrt(v*v-4*b*g))/2/b,w=(-v-i.sqrt(v*v-4*b*g))/2/b,k=[t,h],d=[n,s],y;return a(p)>"1e12"&&(p=.5),a(w)>"1e12"&&(w=.5),p>0&&p<1&&(y=ri(n,t,r,u,f,o,s,h,p),d.push(y.x),k.push(y.y)),w>0&&w<1&&(y=ri(n,t,r,u,f,o,s,h,w),d.push(y.x),k.push(y.y)),b=o-2*u+t-(h-2*o+u),v=2*(u-t)-2*(o-u),g=t-u,p=(-v+i.sqrt(v*v-4*b*g))/2/b,w=(-v-i.sqrt(v*v-4*b*g))/2/b,a(p)>"1e12"&&(p=.5),a(w)>"1e12"&&(w=.5),p>0&&p<1&&(y=ri(n,t,r,u,f,o,s,h,p),d.push(y.x),k.push(y.y)),w>0&&w<1&&(y=ri(n,t,r,u,f,o,s,h,w),d.push(y.x),k.push(y.y)),{min:{x:l[c](0,d),y:l[c](0,k)},max:{x:e[c](0,d),y:e[c](0,k)}}}),yt=n._path2curve=nt(function(n,t){var w=!t&&ut(n),r,v;if(!t&&w.curve)return tt(w.curve);var u=dr(n),i=t&&dr(t),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(n,t){var i,r;if(!n)return["C",t.x,t.y,t.x,t.y,t.x,t.y];n[0]in{T:1,Q:1}||(t.qx=t.qy=null);switch(n[0]){case"M":t.X=n[1],t.Y=n[2];break;case"A":n=["C"][f](nu[c](0,[t.x,t.y][f](n.slice(1))));break;case"S":i=t.x+(t.x-(t.bx||t.x)),r=t.y+(t.y-(t.by||t.y)),n=["C",i,r][f](n.slice(1));break;case"T":t.qx=t.x+(t.x-(t.qx||t.x)),t.qy=t.y+(t.y-(t.qy||t.y)),n=["C"][f](gr(t.x,t.y,t.qx,t.qy,n[1],n[2]));break;case"Q":t.qx=n[1],t.qy=n[2],n=["C"][f](gr(t.x,t.y,n[1],n[2],n[3],n[4]));break;case"L":n=["C"][f](ii(t.x,t.y,n[1],n[2]));break;case"H":n=["C"][f](ii(t.x,t.y,n[1],t.y));break;case"V":n=["C"][f](ii(t.x,t.y,t.x,n[1]));break;case"Z":n=["C"][f](ii(t.x,t.y,t.X,t.Y))}return n},k=function(n,t){if(n[t].length>7){n[t].shift();for(var r=n[t];r.length;)n.splice(t++,0,["C"][f](r.splice(0,6)));n.splice(t,1),v=e(u.length,i&&i.length||0)}},d=function(n,t,r,f,o){n&&t&&n[o][0]=="M"&&t[o][0]!="M"&&(t.splice(o,0,["M",f.x,f.y]),r.bx=0,r.by=0,r.x=n[o][1],r.y=n[o][2],v=e(u.length,i&&i.length||0))};for(r=0,v=e(u.length,i&&i.length||0);r<v;r++){u[r]=b(u[r],s),k(u,r),i&&(i[r]=b(i[r],h)),i&&k(i,r),d(u,i,s,h,r),d(i,u,h,s,r);var l=u[r],a=i&&i[r],y=l.length,p=i&&a.length;s.x=l[y-2],s.y=l[y-1],s.bx=o(l[y-4])||s.x,s.by=o(l[y-3])||s.y,h.bx=i&&(o(a[p-4])||h.x),h.by=i&&(o(a[p-3])||h.y),h.x=i&&a[p-2],h.y=i&&a[p-1]}return i||(w.curve=tt(u)),i?[u,i]:u},null,tt),se=n._parseDots=nt(function(t){for(var r=[],f,h,c,e,u,l,i=0,s=t.length;i<s;i++){if(f={},h=t[i].match(/^([^:]*):?([\d\.]*)/),f.color=n.getRGB(h[1]),f.color.error)return null;f.color=f.color.hex,h[2]&&(f.offset=h[2]+"%"),r.push(f)}for(i=1,s=r.length-1;i<s;i++)if(!r[i].offset){for(c=o(r[i-1].offset||0),e=0,u=i+1;u<s;u++)if(r[u].offset){e=r[u].offset;break}for(e||(e=100,u=s),e=o(e),l=(e-c)/(u-i+1);i<u;i++)c+=l,r[i].offset=c+"%"}return r}),ui=n._tear=function(n,t){n==t.top&&(t.top=n.prev),n==t.bottom&&(t.bottom=n.next),n.next&&(n.next.prev=n.prev),n.prev&&(n.prev.next=n.next)},he=n._tofront=function(n,t){t.top!==n&&(ui(n,t),n.next=null,n.prev=t.top,t.top.next=n,t.top=n)},ce=n._toback=function(n,t){t.bottom!==n&&(ui(n,t),n.next=t.bottom,n.prev=null,t.bottom.prev=n,t.bottom=n)},le=n._insertafter=function(n,t,i){ui(n,i),t==i.top&&(i.top=n),t.next&&(t.next.prev=n),n.next=t.next,n.prev=t,t.next=n},ae=n._insertbefore=function(n,t,i){ui(n,i),t==i.bottom&&(i.bottom=n),t.prev&&(t.prev.next=n),n.prev=t.prev,t.prev=n,n.next=t},lf=n.toMatrix=function(n,t){var r=di(n),i={_:{transform:b},getBBox:function(){return r}};return iu(i,t),i.matrix},ve=n.transformPath=function(n,t){return ki(n,lf(n,t))},iu=n._extractTransform=function(t,i){var k,tt;if(i==null)return t._.transform;i=y(i).replace(/\.{3}|\u2026/g,t._.transform||b);var a=n.parseTransformString(i),v=0,g=0,nt=0,p=1,w=1,e=t._,u=new ft;if(e.transform=a||[],a)for(k=0,tt=a.length;k<tt;k++){var r=a[k],o=r.length,l=y(r[0]).toLowerCase(),d=r[0]!=l,s=d?u.invert():0,it,rt,h,c,f;l=="t"&&o==3?d?(it=s.x(0,0),rt=s.y(0,0),h=s.x(r[1],r[2]),c=s.y(r[1],r[2]),u.translate(h-it,c-rt)):u.translate(r[1],r[2]):l=="r"?o==2?(f=f||t.getBBox(1),u.rotate(r[1],f.x+f.width/2,f.y+f.height/2),v+=r[1]):o==4&&(d?(h=s.x(r[2],r[3]),c=s.y(r[2],r[3]),u.rotate(r[1],h,c)):u.rotate(r[1],r[2],r[3]),v+=r[1]):l=="s"?o==2||o==3?(f=f||t.getBBox(1),u.scale(r[1],r[o-1],f.x+f.width/2,f.y+f.height/2),p*=r[1],w*=r[o-1]):o==5&&(d?(h=s.x(r[3],r[4]),c=s.y(r[3],r[4]),u.scale(r[1],r[2],h,c)):u.scale(r[1],r[2],r[3],r[4]),p*=r[1],w*=r[2]):l=="m"&&o==7&&u.add(r[1],r[2],r[3],r[4],r[5],r[6]),e.dirtyT=1,t.matrix=u}t.matrix=u,e.sx=p,e.sy=w,e.deg=v,e.dx=g=u.e,e.dy=nt=u.f,p==1&&w==1&&!v&&e.bbox?(e.bbox.x+=+g,e.bbox.y+=+nt):e.dirtyT=1},ru=function(n){var t=n[0];switch(t.toLowerCase()){case"t":return[t,0,0];case"m":return[t,1,0,0,1,0,0];case"r":return n.length==4?[t,0,n[2],n[3]]:[t,0];case"s":return n.length==5?[t,1,1,n[3],n[4]]:n.length==3?[t,1,1]:[t,1]}},af=n._equaliseTransform=function(t,i){i=y(i).replace(/\.{3}|\u2026/g,t),t=n.parseTransformString(t)||[],i=n.parseTransformString(i)||[];for(var l=e(t.length,i.length),s=[],h=[],u=0,f,c,r,o;u<l;u++){if(r=t[u]||ru(i[u]),o=i[u]||ru(r),r[0]!=o[0]||r[0].toLowerCase()=="r"&&(r[2]!=o[2]||r[3]!=o[3])||r[0].toLowerCase()=="s"&&(r[3]!=o[3]||r[4]!=o[4]))return;for(s[u]=[],h[u]=[],f=0,c=e(r.length,o.length);f<c;f++)f in r&&(s[u][f]=r[f]),f in o&&(h[u][f]=o[f])}return{from:s,to:h}};n._getContainer=function(i,r,u,f){var e;return e=f==null&&!n.is(i,"object")?t.doc.getElementById(i):i,e!=null?e.tagName?r==null?{container:e,width:e.style.pixelWidth||e.offsetWidth,height:e.style.pixelHeight||e.offsetHeight}:{container:e,width:r,height:u}:{container:1,x:i,y:r,width:u,height:f}:void 0},n.pathToRelative=cf,n._engine={},n.path2curve=yt,n.matrix=function(n,t,i,r,u,f){return new ft(n,t,i,r,u,f)},function(t){function u(n){var t=i.sqrt(r(n));n[0]&&(n[0]/=t),n[1]&&(n[1]/=t)}function r(n){return n[0]*n[0]+n[1]*n[1]}t.add=function(n,t,i,r,u,f){var e=[[],[],[]],a=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],l=[[n,i,u],[t,r,f],[0,0,1]],o,s,h,c;for(n&&n instanceof ft&&(l=[[n.a,n.c,n.e],[n.b,n.d,n.f],[0,0,1]]),o=0;o<3;o++)for(s=0;s<3;s++){for(c=0,h=0;h<3;h++)c+=a[o][h]*l[h][s];e[o][s]=c}this.a=e[0][0],this.b=e[1][0],this.c=e[0][1],this.d=e[1][1],this.e=e[0][2],this.f=e[1][2]},t.invert=function(){var n=this,t=n.a*n.d-n.b*n.c;return new ft(n.d/t,-n.b/t,-n.c/t,n.a/t,(n.c*n.f-n.d*n.e)/t,(n.b*n.e-n.a*n.f)/t)},t.clone=function(){return new ft(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(n,t){this.add(1,0,0,1,n,t)},t.scale=function(n,t,i,r){t==null&&(t=n),(i||r)&&this.add(1,0,0,1,i,r),this.add(n,0,0,t,0,0),(i||r)&&this.add(1,0,0,1,-i,-r)},t.rotate=function(t,r,u){t=n.rad(t),r=r||0,u=u||0;var f=+i.cos(t).toFixed(9),e=+i.sin(t).toFixed(9);this.add(f,e,-e,f,r,u),this.add(1,0,0,1,-r,-u)},t.x=function(n,t){return n*this.a+t*this.c+this.e},t.y=function(n,t){return n*this.b+t*this.d+this.f},t.get=function(n){return+this[y.fromCharCode(97+n)].toFixed(4)},t.toString=function(){return n.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={},f,e,o;return t.dx=this.e,t.dy=this.f,f=[[this.a,this.c],[this.b,this.d]],t.scalex=i.sqrt(r(f[0])),u(f[0]),t.shear=f[0][0]*f[1][0]+f[0][1]*f[1][1],f[1]=[f[1][0]-f[0][0]*t.shear,f[1][1]-f[0][1]*t.shear],t.scaley=i.sqrt(r(f[1])),u(f[1]),t.shear/=t.scaley,e=-f[0][1],o=f[1][1],o<0?(t.rotate=n.deg(i.acos(o)),e<0&&(t.rotate=360-t.rotate)):t.rotate=n.deg(i.asin(e)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(n){var t=n||this[it]();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx||t.dy?"t"+[t.dx,t.dy]:b)+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:b)+(t.rotate?"r"+[t.rotate,0,0]:b)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(ft.prototype),pt=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/),s.safari=navigator.vendor=="Apple Computer, Inc."&&(pt&&pt[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&pt&&pt[1]<8?function(){var n=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){n.remove()})}:uf;var vf=function(){this.returnValue=!1},yf=function(){return this.originalEvent.preventDefault()},pf=function(){this.cancelBubble=!0},wf=function(){return this.originalEvent.stopPropagation()},bf=function(){return t.doc.addEventListener?function(n,i,r,u){var f=ai&&vi[i]?vi[i]:i,e=function(f){var c=t.doc.documentElement.scrollTop||t.doc.body.scrollTop,l=t.doc.documentElement.scrollLeft||t.doc.body.scrollLeft,a=f.clientX+l,v=f.clientY+c,e,o,s;if(ai&&vi[h](i))for(e=0,o=f.targetTouches&&f.targetTouches.length;e<o;e++)if(f.targetTouches[e].target==n){s=f,f=f.targetTouches[e],f.originalEvent=s,f.preventDefault=yf,f.stopPropagation=wf;break}return r.call(u,f,a,v)};return n.addEventListener(f,e,!1),function(){return n.removeEventListener(f,e,!1),!0}}:t.doc.attachEvent?function(n,i,r,u){var f=function(n){n=n||t.win.event;var i=t.doc.documentElement.scrollTop||t.doc.body.scrollTop,f=t.doc.documentElement.scrollLeft||t.doc.body.scrollLeft,e=n.clientX+f,o=n.clientY+i;return n.preventDefault=n.preventDefault||vf,n.stopPropagation=n.stopPropagation||pf,r.call(u,n,e,o)},e;return n.attachEvent("on"+i,f),e=function(){return n.detachEvent("on"+i,f),!0}}:void 0}(),ot=[],gi=function(n){for(var u=n.clientX,f=n.clientY,a=t.doc.documentElement.scrollTop||t.doc.body.scrollTop,v=t.doc.documentElement.scrollLeft||t.doc.body.scrollLeft,i,c=ot.length,o,e;c--;){if(i=ot[c],ai){for(o=n.touches.length;o--;)if(e=n.touches[o],e.identifier==i.el._drag.id){u=e.clientX,f=e.clientY,(n.originalEvent?n.originalEvent:n).preventDefault();break}}else n.preventDefault();var r=i.el.node,s,l=r.nextSibling,h=r.parentNode,y=r.style.display;t.win.opera&&h.removeChild(r),r.style.display="none",s=i.el.paper.getElementByPoint(u,f),r.style.display=y,t.win.opera&&(l?h.insertBefore(r,l):h.appendChild(r)),s&&eve("raphael.drag.over."+i.el.id,i.el,s),u+=v,f+=a,eve("raphael.drag.move."+i.el.id,i.move_scope||i.el,u-i.el._drag.x,f-i.el._drag.y,u,f,n)}},nr=function(t){n.unmousemove(gi).unmouseup(nr);for(var r=ot.length,i;r--;)i=ot[r],i.el._drag={},eve("raphael.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,t);ot=[]},u=n.el={};for(tr=ar.length;tr--;)(function(i){n[i]=u[i]=function(r,u){return n.is(r,"function")&&(this.events=this.events||[],this.events.push({name:i,f:r,unbind:bf(this.shape||this.node||t.doc,i,r,u||this)})),this},n["un"+i]=u["un"+i]=function(n){for(var t=this.events||[],r=t.length;r--;)if(t[r].name==i&&t[r].f==n)return t[r].unbind(),t.splice(r,1),!t.length&&delete this.events,this;return this}})(ar[tr]);u.data=function(t,i){var u=vt[this.id]=vt[this.id]||{},r;if(arguments.length==1){if(n.is(t,"object")){for(r in t)t[h](r)&&this.data(r,t[r]);return this}return eve("raphael.data.get."+this.id,this,u[t],t),u[t]}return u[t]=i,eve("raphael.data.set."+this.id,this,i,t),this},u.removeData=function(n){return n==null?vt[this.id]={}:vt[this.id]&&delete vt[this.id][n],this},u.hover=function(n,t,i,r){return this.mouseover(n,i).mouseout(t,r||i)},u.unhover=function(n,t){return this.unmouseover(n).unmouseout(t)},st=[],u.drag=function(i,r,u,f,e,o){function s(s){(s.originalEvent||s).preventDefault();var h=t.doc.documentElement.scrollTop||t.doc.body.scrollTop,c=t.doc.documentElement.scrollLeft||t.doc.body.scrollLeft;this._drag.x=s.clientX+c,this._drag.y=s.clientY+h,this._drag.id=s.identifier,!ot.length&&n.mousemove(gi).mouseup(nr),ot.push({el:this,move_scope:f,start_scope:e,end_scope:o}),r&&eve.on("raphael.drag.start."+this.id,r),i&&eve.on("raphael.drag.move."+this.id,i),u&&eve.on("raphael.drag.end."+this.id,u),eve("raphael.drag.start."+this.id,e||f||this,s.clientX+c,s.clientY+h,s)}return this._drag={},st.push({el:this,start:s}),this.mousedown(s),this},u.onDragOver=function(n){n?eve.on("raphael.drag.over."+this.id,n):eve.unbind("raphael.drag.over."+this.id)},u.undrag=function(){for(var t=st.length;t--;)st[t].el==this&&(this.unmousedown(st[t].start),st.splice(t,1),eve.unbind("raphael.drag.*."+this.id));st.length||n.unmousemove(gi).unmouseup(nr)},s.circle=function(t,i,r){var u=n._engine.circle(this,t||0,i||0,r||0);return this.__set__&&this.__set__.push(u),u},s.rect=function(t,i,r,u,f){var e=n._engine.rect(this,t||0,i||0,r||0,u||0,f||0);return this.__set__&&this.__set__.push(e),e},s.ellipse=function(t,i,r,u){var f=n._engine.ellipse(this,t||0,i||0,r||0,u||0);return this.__set__&&this.__set__.push(f),f},s.path=function(t){!t||n.is(t,kt)||n.is(t[0],g)||(t+=b);var i=n._engine.path(n.format[c](n,arguments),this);return this.__set__&&this.__set__.push(i),i},s.image=function(t,i,r,u,f){var e=n._engine.image(this,t||"about:blank",i||0,r||0,u||0,f||0);return this.__set__&&this.__set__.push(e),e},s.text=function(t,i,r){var u=n._engine.text(this,t||0,i||0,y(r));return this.__set__&&this.__set__.push(u),u},s.set=function(t){n.is(t,"array")||(t=Array.prototype.splice.call(arguments,0,arguments.length));var i=new ht(t);return this.__set__&&this.__set__.push(i),i},s.setStart=function(n){this.__set__=n||this.set()},s.setFinish=function(){var t=this.__set__;return delete this.__set__,t},s.setSize=function(t,i){return n._engine.setSize.call(this,t,i)},s.setViewBox=function(t,i,r,u,f){return n._engine.setViewBox.call(this,t,i,r,u,f)},s.top=s.bottom=null,s.raphael=n,uu=function(n){var u=n.getBoundingClientRect(),f=n.ownerDocument,i=f.body,r=f.documentElement,e=r.clientTop||i.clientTop||0,o=r.clientLeft||i.clientLeft||0,s=u.top+(t.win.pageYOffset||r.scrollTop||i.scrollTop)-e,h=u.left+(t.win.pageXOffset||r.scrollLeft||i.scrollLeft)-o;return{y:s,x:h}},s.getElementByPoint=function(n,i){var o=this,f=o.canvas,r=t.doc.elementFromPoint(n,i),s,u,e;if(t.win.opera&&r.tagName=="svg"&&(s=uu(f),u=f.createSVGRect(),u.x=n-s.x,u.y=i-s.y,u.width=u.height=1,e=f.getIntersectionList(u,null),e.length&&(r=e[e.length-1])),!r)return null;while(r.parentNode&&r!=f.parentNode&&!r.raphael)r=r.parentNode;return r==o.canvas.parentNode&&(r=f),r=r&&r.raphael?o.getById(r.raphaelid):null,r},s.getById=function(n){for(var t=this.bottom;t;){if(t.id==n)return t;t=t.next}return null},s.forEach=function(n,t){for(var i=this.bottom;i;){if(n.call(t,i)===!1)return this;i=i.next}return this},s.getElementsByPoint=function(n,t){var i=this.set();return this.forEach(function(r){r.isPointInside(n,t)&&i.push(r)}),i},u.isPointInside=function(t,i){var r=this.realPath=this.realPath||dt[this.type](this);return n.isPointInsidePath(r,t,i)},u.getBBox=function(n){if(this.removed)return{};var t=this._;return n?((t.dirty||!t.bboxwt)&&(this.realPath=dt[this.type](this),t.bboxwt=di(this.realPath),t.bboxwt.toString=sr,t.dirty=0),t.bboxwt):((t.dirty||t.dirtyT||!t.bbox)&&((t.dirty||!this.realPath)&&(t.bboxwt=0,this.realPath=dt[this.type](this)),t.bbox=di(ki(this.realPath,this.matrix)),t.bbox.toString=sr,t.dirty=t.dirtyT=0),t.bbox)},u.clone=function(){if(this.removed)return null;var n=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(n),n},u.glow=function(n){var r;if(this.type=="text")return null;n=n||{};var t={width:(n.width||10)+(+this.attr("stroke-width")||1),fill:n.fill||!1,opacity:n.opacity||.5,offsetx:n.offsetx||0,offsety:n.offsety||0,color:n.color||"#000"},u=t.width/2,f=this.paper,e=f.set(),i=this.realPath||dt[this.type](this);for(i=this.matrix?ki(i,this.matrix):i,r=1;r<u+1;r++)e.push(f.path(i).attr({stroke:t.color,fill:t.fill?t.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/u*r).toFixed(3),opacity:+(t.opacity/u).toFixed(3)}));return e.insertBefore(this).translate(t.offsetx,t.offsety)};var ye={},ir=function(t,i,r,u,f,e,o,s,h){return h==null?ct(t,i,r,u,f,e,o,s):n.findDotsAtSegment(t,i,r,u,f,e,o,s,cu(t,i,r,u,f,e,o,s,h))},rr=function(t,i){return function(r,u,f){var y,p;r=yt(r);var s,h,e,a,c="",v={},o,l=0;for(y=0,p=r.length;y<p;y++){if(e=r[y],e[0]=="M")s=+e[1],h=+e[2];else{if(a=ir(s,h,e[1],e[2],e[3],e[4],e[5],e[6]),l+a>u){if(i&&!v.start){if(o=ir(s,h,e[1],e[2],e[3],e[4],e[5],e[6],u-l),c+=["C"+o.start.x,o.start.y,o.m.x,o.m.y,o.x,o.y],f)return c;v.start=c,c=["M"+o.x,o.y+"C"+o.n.x,o.n.y,o.end.x,o.end.y,e[5],e[6]].join(),l+=a,s=+e[5],h=+e[6];continue}if(!t&&!i)return o=ir(s,h,e[1],e[2],e[3],e[4],e[5],e[6],u-l),{x:o.x,y:o.y,alpha:o.alpha}}l+=a,s=+e[5],h=+e[6]}c+=e.shift()+e}return v.end=c,o=t?l:i?v:n.findDotsAtSegment(s,h,e[0],e[1],e[2],e[3],e[4],e[5],1),o.alpha&&(o={x:o.x,y:o.y,alpha:o.alpha}),o}},fu=rr(1),eu=rr(),ur=rr(0,1);n.getTotalLength=fu,n.getPointAtLength=eu,n.getSubpath=function(n,t,i){if(this.getTotalLength(n)-i<1e-6)return ur(n,t).end;var r=ur(n,i,1);return t?ur(r,t).end:r},u.getTotalLength=function(){if(this.type=="path")return this.node.getTotalLength?this.node.getTotalLength():fu(this.attrs.path)},u.getPointAtLength=function(n){if(this.type=="path")return eu(this.attrs.path,n)},u.getSubpath=function(t,i){if(this.type=="path")return n.getSubpath(this.attrs.path,t,i)},k=n.easing_formulas={linear:function(n){return n},"<":function(n){return d(n,1.7)},">":function(n){return d(n,.48)},"<>":function(n){var r=.48-n/1.04,u=i.sqrt(.1734+r*r),f=u-r,o=d(a(f),1/3)*(f<0?-1:1),e=-u-r,s=d(a(e),1/3)*(e<0?-1:1),t=o+s+.5;return(1-t)*3*t*t+t*t*t},backIn:function(n){var t=1.70158;return n*n*((t+1)*n-t)},backOut:function(n){n=n-1;var t=1.70158;return n*n*((t+1)*n+t)+1},elastic:function(n){return n==!!n?n:d(2,-10*n)*i.sin((n-.075)*2*p/.3)+1},bounce:function(n){var r=7.5625,t=2.75,i;return n<1/t?i=r*n*n:n<2/t?(n-=1.5/t,i=r*n*n+.75):n<2.5/t?(n-=2.25/t,i=r*n*n+.9375):(n-=2.625/t,i=r*n*n+.984375),i}},k.easeIn=k["ease-in"]=k["<"],k.easeOut=k["ease-out"]=k[">"],k.easeInOut=k["ease-in-out"]=k["<>"],k["back-in"]=k.backIn,k["back-out"]=k.backOut;var r=[],ou=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){setTimeout(n,16)},fr=function(){for(var ut=+new Date,w=0,t,a,i,u,d,c,g,p,rt;w<r.length;w++)if(t=r[w],!t.el.removed&&!t.paused){var b=ut-t.start,s=t.ms,ft=t.easing,o=t.from,l=t.diff,nt=t.to,et=t.t,y=t.el,tt={},e,it={},k;if(t.initstatus?(b=(t.initstatus*t.anim.top-t.prev)/(t.percent-t.prev)*s,t.status=t.initstatus,delete t.initstatus,t.stop&&r.splice(w--,1)):t.status=(t.prev+(t.percent-t.prev)*(b/s))/t.anim.top,!(b<0))if(b<s){a=ft(b/s);for(i in o)if(o[h](i)){switch(pi[i]){case v:e=+o[i]+a*s*l[i];break;case"colour":e="rgb("+[er(yi(o[i].r+a*s*l[i].r)),er(yi(o[i].g+a*s*l[i].g)),er(yi(o[i].b+a*s*l[i].b))].join(",")+")";break;case"path":for(e=[],u=0,d=o[i].length;u<d;u++){for(e[u]=[o[i][u][0]],c=1,g=o[i][u].length;c<g;c++)e[u][c]=+o[i][u][c]+a*s*l[i][u][c];e[u]=e[u].join(lt)}e=e.join(lt);break;case"transform":if(l[i].real)for(e=[],u=0,d=o[i].length;u<d;u++)for(e[u]=[o[i][u][0]],c=1,g=o[i][u].length;c<g;c++)e[u][c]=o[i][u][c]+a*s*l[i][u][c];else p=function(n){return+o[i][n]+a*s*l[i][n]},e=[["m",p(0),p(1),p(2),p(3),p(4),p(5)]];break;case"csv":if(i=="clip-rect")for(e=[],u=4;u--;)e[u]=+o[i][u]+a*s*l[i][u];break;default:for(rt=[][f](o[i]),e=[],u=y.paper.customAttributes[i].length;u--;)e[u]=+rt[u]+a*s*l[i][u]}tt[i]=e}y.attr(tt),function(n,t,i){setTimeout(function(){eve("raphael.anim.frame."+n,t,i)})}(y.id,y,t.anim)}else{if(function(t,i,r){setTimeout(function(){eve("raphael.anim.frame."+i.id,i,r),eve("raphael.anim.finish."+i.id,i,r),n.is(t,"function")&&t.call(i)})}(t.callback,y,t.anim),y.attr(nt),r.splice(w--,1),t.repeat>1&&!t.next){for(k in nt)nt[h](k)&&(it[k]=t.totalOrigin[k]);t.el.attr(it),at(t.anim,t.el,t.anim.percents[0],null,t.totalOrigin,t.repeat-1)}t.next&&!t.stop&&at(t.anim,t.el,t.next,null,t.totalOrigin,t.repeat)}}n.svg&&y&&y.paper&&y.paper.safari(),r.length&&ou(fr)},er=function(n){return n>255?255:n<0?0:n};u.animateWith=function(t,i,u,f,e,o){var s=this,c,a,v,h,l;if(s.removed)return o&&o.call(s),s;for(c=u instanceof rt?u:n.animation(u,f,e,o),at(c,s,c.percents[0],null,s.attr()),h=0,l=r.length;h<l;h++)if(r[h].anim==i&&r[h].el==t){r[l-1].start=r[h].start;break}return s},u.onAnimation=function(n){return n?eve.on("raphael.anim.frame."+this.id,n):eve.unbind("raphael.anim.frame."+this.id),this},rt.prototype.delay=function(n){var t=new rt(this.anim,this.ms);return t.times=this.times,t.del=+n||0,t},rt.prototype.repeat=function(n){var t=new rt(this.anim,this.ms);return t.del=this.del,t.times=i.floor(e(n,0))||1,t},n.animation=function(t,i,r,u){if(t instanceof rt)return t;(n.is(r,"function")||!r)&&(u=u||r||null,r=null),t=Object(t),i=+i||0;var e={},s,f;for(f in t)t[h](f)&&o(f)!=f&&o(f)+"%"!=f&&(s=!0,e[f]=t[f]);return s?(r&&(e.easing=r),u&&(e.callback=u),new rt({100:e},i)):new rt(t,i)},u.animate=function(t,i,r,u){var f=this,e;return f.removed?(u&&u.call(f),f):(e=t instanceof rt?t:n.animation(t,i,r,u),at(e,f,e.percents[0],null,f.attr()),f)},u.setTime=function(n,t){return n&&t!=null&&this.status(n,l(t,n.ms)/n.ms),this},u.status=function(n,t){var f=[],u=0,e,i;if(t!=null)return at(n,this,-1,l(t,1)),this;for(e=r.length;u<e;u++)if(i=r[u],i.el.id==this.id&&(!n||i.anim==n)){if(n)return i.status;f.push({anim:i.anim,status:i.status})}return n?0:f},u.pause=function(n){for(var t=0;t<r.length;t++)r[t].el.id!=this.id||n&&r[t].anim!=n||eve("raphael.anim.pause."+this.id,this,r[t].anim)===!1||(r[t].paused=!0);return this},u.resume=function(n){for(var i,t=0;t<r.length;t++)r[t].el.id!=this.id||n&&r[t].anim!=n||(i=r[t],eve("raphael.anim.resume."+this.id,this,i.anim)!==!1&&(delete i.paused,this.status(i.anim,i.status)));return this},u.stop=function(n){for(var t=0;t<r.length;t++)r[t].el.id!=this.id||n&&r[t].anim!=n||eve("raphael.anim.stop."+this.id,this,r[t].anim)===!1||r.splice(t--,1);return this},eve.on("raphael.remove",or),eve.on("raphael.clear",or),u.toString=function(){return"Raphaël’s object"},ht=function(n){if(this.items=[],this.length=0,this.type="set",n)for(var t=0,i=n.length;t<i;t++)n[t]&&(n[t].constructor==u.constructor||n[t].constructor==ht)&&(this[this.items.length]=this.items[this.items.length]=n[t],this.length++)},w=ht.prototype,w.push=function(){for(var n,i,t=0,r=arguments.length;t<r;t++)n=arguments[t],n&&(n.constructor==u.constructor||n.constructor==ht)&&(i=this.items.length,this[i]=this.items[i]=n,this.length++);return this},w.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},w.forEach=function(n,t){for(var i=0,r=this.items.length;i<r;i++)if(n.call(t,this.items[i],i)===!1)return this;return this};for(fi in u)u[h](fi)&&(w[fi]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n][c](i,t)})}}(fi));w.attr=function(t,i){var r,f,u,e;if(t&&n.is(t,g)&&n.is(t[0],"object"))for(r=0,f=t.length;r<f;r++)this.items[r].attr(t[r]);else for(u=0,e=this.items.length;u<e;u++)this.items[u].attr(t,i);return this},w.clear=function(){while(this.length)this.pop()},w.splice=function(n,t){var u;n=n<0?e(this.length+n,0):n,t=e(0,l(this.length-n,t));for(var f=[],s=[],o=[],r=2;r<arguments.length;r++)o.push(arguments[r]);for(r=0;r<t;r++)s.push(this[n+r]);for(;r<this.length-n;r++)f.push(this[n+r]);for(u=o.length,r=0;r<u+f.length;r++)this.items[n+r]=this[n+r]=r<u?o[r]:f[r-u];for(r=this.items.length=this.length-=t-u;this[r];)delete this[r++];return new ht(s)},w.exclude=function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]==n)return this.splice(t,1),!0},w.animate=function(t,i,r,u){var e;(n.is(r,"function")||!r)&&(u=r||null);var o=this.items.length,f=o,h,c=this,s;if(!o)return this;for(u&&(s=function(){--o||u.call(c)}),r=n.is(r,kt)?r:s,e=n.animation(t,i,r,s),h=this.items[--f].animate(e);f--;)this.items[f]&&!this.items[f].removed&&this.items[f].animateWith(h,e,e);return this},w.insertAfter=function(n){for(var t=this.items.length;t--;)this.items[t].insertAfter(n);return this},w.getBBox=function(){for(var t=[],i=[],r=[],u=[],n,f=this.items.length;f--;)this.items[f].removed||(n=this.items[f].getBBox(),t.push(n.x),i.push(n.y),r.push(n.x+n.width),u.push(n.y+n.height));return t=l[c](0,t),i=l[c](0,i),r=e[c](0,r),u=e[c](0,u),{x:t,y:i,x2:r,y2:u,width:r-t,height:u-i}},w.clone=function(n){n=new ht;for(var t=0,i=this.items.length;t<i;t++)n.push(this.items[t].clone());return n},w.toString=function(){return"Raphaël‘s set"},n.registerFont=function(n){var i,u,f,r,t,e;if(!n.face)return n;this.fonts=this.fonts||{},i={w:n.w,face:{},glyphs:{}},u=n.face["font-family"];for(f in n.face)n.face[h](f)&&(i.face[f]=n.face[f]);if(this.fonts[u]?this.fonts[u].push(i):this.fonts[u]=[i],!n.svg){i.face["units-per-em"]=et(n.face["units-per-em"],10);for(r in n.glyphs)if(n.glyphs[h](r)&&(t=n.glyphs[r],i.glyphs[r]={w:t.w,k:{},d:t.d&&"M"+t.d.replace(/[mlcxtrv]/g,function(n){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[n]||"M"})+"z"},t.k))for(e in t.k)t[h](e)&&(i.glyphs[r].k[e]=t.k[e])}return n},s.getFont=function(t,i,r,u){var f,c,o,e,s,l;if(u=u||"normal",r=r||"normal",i=+i||{normal:400,bold:700,lighter:300,bolder:800}[i]||400,!!n.fonts){if(f=n.fonts[t],!f){c=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,b)+"(\\s|$)","i");for(o in n.fonts)if(n.fonts[h](o)&&c.test(o)){f=n.fonts[o];break}}if(f)for(s=0,l=f.length;s<l;s++)if(e=f[s],e.face["font-weight"]==i&&(e.face["font-style"]==r||!e.face["font-style"])&&e.face["font-stretch"]==u)break;return e}},s.print=function(t,i,r,u,f,o,s){var c,ft,k,v;o=o||"middle",s=e(l(s||0,1),-1);var a=y(r)[it](b),d=0,p=0,nt=b,h;if(n.is(u,r)&&(u=this.getFont(u)),u){h=(f||16)/u.face["units-per-em"];var w=u.face.bbox[it](ci),tt=+w[0],g=w[3]-w[1],rt=0,ut=+w[1]+(o=="baseline"?g+ +u.face.descent:g/2);for(c=0,ft=a.length;c<ft;c++)a[c]=="\n"?(d=0,v=0,p=0,rt+=g):(k=p&&u.glyphs[a[c-1]]||{},v=u.glyphs[a[c]],d+=p?(k.w||u.w)+(k.k&&k.k[a[c]]||0)+u.w*s:0,p=1),v&&v.d&&(nt+=n.transformPath(v.d,["t",d*h,rt*h,"s",h,h,tt,ut,"t",(t-tt)/h,(i-ut)/h]))}return this.path(nt).attr({fill:"#000",stroke:"none"})},s.add=function(t){if(n.is(t,"array"))for(var u=this.set(),r=0,f=t.length,i;r<f;r++)i=t[r]||{},au[h](i.type)&&u.push(this[i.type]().attr(i));return u},n.format=function(t,i){var r=n.is(i,g)?[0][f](i):arguments;return t&&n.is(t,kt)&&r.length-1&&(t=t.replace(vu,function(n,t){return r[++t]==null?b:r[t]})),t||b},n.fullfill=function(){var n=/\{([^\}]+)\}/g,t=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,i=function(n,i,r){var u=r;return i.replace(t,function(n,t,i,r,f){t=t||r,u&&(t in u&&(u=u[t]),typeof u=="function"&&f&&(u=u()))}),u=(u==null||u==r?n:u)+"",u};return function(t,r){return String(t).replace(n,function(n,t){return i(n,t,r)})}}(),n.ninja=function(){return li.was?t.win.Raphael=li.is:delete Raphael,n},n.st=w,function(t,i,r){function u(){/in/.test(t.readyState)?setTimeout(u,9):n.eve("raphael.DOMload")}t.readyState==null&&t.addEventListener&&(t.addEventListener(i,r=function(){t.removeEventListener(i,r,!1),t.readyState="complete"},!1),t.readyState="loading"),u()}(document,"DOMContentLoaded"),li.was?t.win.Raphael=n:Raphael=n,eve.on("raphael.DOMload",function(){hi=!0})}(),window.Raphael.svg&&function(n){var i="hasOwnProperty",u=String,f=parseFloat,tt=parseInt,c=Math,k=c.max,y=c.abs,d=c.pow,l=/[, ]+/,p=n.eve,o="",w=" ",a="http://www.w3.org/1999/xlink",ft={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},e={},nt,v;n.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var t=function(r,f){if(f){typeof r=="string"&&(r=t(r));for(var e in f)f[i](e)&&(e.substring(0,6)=="xlink:"?r.setAttributeNS(a,e.substring(6),u(f[e])):r.setAttribute(e,u(f[e])))}else r=n._g.doc.createElementNS("http://www.w3.org/2000/svg",r),r.style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},it=function(i,r){var w="linear",l=i.id+r,b=.5,s=.5,tt=i.node,it=i.paper,g=tt.style,a=n._g.doc.getElementById(l),v,e,nt,p,h,rt;if(!a){if(r=u(r).replace(n._radial_gradient,function(n,t,i){if(w="radial",t&&i){b=f(t),s=f(i);var r=(s>.5)*2-1;d(b-.5,2)+d(s-.5,2)>.25&&(s=c.sqrt(.25-d(b-.5,2))*r+.5)&&s!=.5&&(s=s.toFixed(5)-1e-5*r)}return o}),r=r.split(/\s*\-\s*/),w=="linear"){if(v=r.shift(),v=-f(v),isNaN(v))return null;e=[0,0,c.cos(n.rad(v)),c.sin(n.rad(v))],nt=1/(k(y(e[2]),y(e[3]))||1),e[2]*=nt,e[3]*=nt,e[2]<0&&(e[0]=-e[2],e[2]=0),e[3]<0&&(e[1]=-e[3],e[3]=0)}if(p=n._parseDots(r),!p)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),i.gradient&&l!=i.gradient.id&&(it.defs.removeChild(i.gradient),delete i.gradient),!i.gradient)for(a=t(w+"Gradient",{id:l}),i.gradient=a,t(a,w=="radial"?{fx:b,fy:s}:{x1:e[0],y1:e[1],x2:e[2],y2:e[3],gradientTransform:i.matrix.invert()}),it.defs.appendChild(a),h=0,rt=p.length;h<rt;h++)a.appendChild(t("stop",{offset:p[h].offset?p[h].offset:h?"100%":"0%","stop-color":p[h].color||"#fff"}))}return t(tt,{fill:"url(#"+l+")",opacity:1,"fill-opacity":1}),g.fill=o,g.opacity=1,g.fillOpacity=1,1},b=function(n){var i=n.getBBox(1);t(n.pattern,{patternTransform:n.matrix.invert()+" translate("+i.x+","+i.y+")"})},s=function(r,f,s){var b,k,g,tt,it,rt;if(r.type=="path"){for(var ut=u(f).toLowerCase().split("-"),ht=r.paper,h=s?"end":"start",ct=r.node,l=r.attrs,d=l["stroke-width"],et=ut.length,a="classic",p,w,ot,st,c,v=3,y=3,nt=5;et--;)switch(ut[et]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=ut[et];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":v=5;break;case"short":v=2}a=="open"?(v+=2,y+=2,nt+=2,ot=1,st=s?4:1,c={fill:"none",stroke:l.stroke}):(st=ot=v/2,c={fill:l.stroke,stroke:"none"}),r._.arrows?s?(r._.arrows.endPath&&e[r._.arrows.endPath]--,r._.arrows.endMarker&&e[r._.arrows.endMarker]--):(r._.arrows.startPath&&e[r._.arrows.startPath]--,r._.arrows.startMarker&&e[r._.arrows.startMarker]--):r._.arrows={},a!="none"?(b="raphael-marker-"+a,k="raphael-marker-"+h+a+v+y,n._g.doc.getElementById(b)?e[b]++:(ht.defs.appendChild(t(t("path"),{"stroke-linecap":"round",d:ft[a],id:b})),e[b]=1),g=n._g.doc.getElementById(k),g?(e[k]++,tt=g.getElementsByTagName("use")[0]):(g=t(t("marker"),{id:k,markerHeight:y,markerWidth:v,orient:"auto",refX:st,refY:y/2}),tt=t(t("use"),{"xlink:href":"#"+b,transform:(s?"rotate(180 "+v/2+" "+y/2+") ":o)+"scale("+v/nt+","+y/nt+")","stroke-width":(2/(v/nt+y/nt)).toFixed(4)}),g.appendChild(tt),ht.defs.appendChild(g),e[k]=1),t(tt,c),it=ot*(a!="diamond"&&a!="oval"),s?(p=r._.arrows.startdx*d||0,w=n.getTotalLength(l.path)-it*d):(p=it*d,w=n.getTotalLength(l.path)-(r._.arrows.enddx*d||0)),c={},c["marker-"+h]="url(#"+k+")",(w||p)&&(c.d=Raphael.getSubpath(l.path,p,w)),t(ct,c),r._.arrows[h+"Path"]=b,r._.arrows[h+"Marker"]=k,r._.arrows[h+"dx"]=it,r._.arrows[h+"Type"]=a,r._.arrows[h+"String"]=f):(s?(p=r._.arrows.startdx*d||0,w=n.getTotalLength(l.path)-p):(p=0,w=n.getTotalLength(l.path)-(r._.arrows.enddx*d||0)),r._.arrows[h+"Path"]&&t(ct,{d:Raphael.getSubpath(l.path,p,w)}),delete r._.arrows[h+"Path"],delete r._.arrows[h+"Marker"],delete r._.arrows[h+"dx"],delete r._.arrows[h+"Type"],delete r._.arrows[h+"String"]);for(c in e)e[i](c)&&!e[c]&&(rt=n._g.doc.getElementById(c),rt&&rt.parentNode.removeChild(rt))}},et={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},rt=function(n,i,r){if(i=et[u(i).toLowerCase()],i){for(var e=n.attrs["stroke-width"]||"1",s={round:e,square:e,butt:0}[n.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,o=[],f=i.length;f--;)o[f]=i[f]*e+(f%2?1:-1)*s;t(n.node,{"stroke-dasharray":o.join(",")})}},g=function(r,f){var h=r.node,c=r.attrs,vt=h.style.visibility,v,e,d,ft,g,p,et,lt,st,ht,ct,w,nt,ut,at;h.style.visibility="hidden";for(v in f)if(f[i](v)){if(!n._availableAttrs[i](v))continue;e=f[v],c[v]=e;switch(v){case"blur":r.blur(e);break;case"href":case"title":case"target":d=h.parentNode,d.tagName.toLowerCase()!="a"&&(ft=t("a"),d.insertBefore(ft,h),ft.appendChild(h),d=ft),v=="target"?d.setAttributeNS(a,"show",e=="blank"?"new":e):d.setAttributeNS(a,v,e);break;case"cursor":h.style.cursor=e;break;case"transform":r.transform(e);break;case"arrow-start":s(r,e);break;case"arrow-end":s(r,e,1);break;case"clip-rect":g=u(e).split(l),g.length==4&&(r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode),p=t("clipPath"),et=t("rect"),p.id=n.createUUID(),t(et,{x:g[0],y:g[1],width:g[2],height:g[3]}),p.appendChild(et),r.paper.defs.appendChild(p),t(h,{"clip-path":"url(#"+p.id+")"}),r.clip=et),e||(lt=h.getAttribute("clip-path"),lt&&(st=n._g.doc.getElementById(lt.replace(/(^url\(#|\)$)/g,o)),st&&st.parentNode.removeChild(st),t(h,{"clip-path":o}),delete r.clip));break;case"path":r.type=="path"&&(t(h,{d:e?c.path=n._pathToAbsolute(e):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1)));break;case"width":if(h.setAttribute(v,e),r._.dirty=1,c.fx)v="x",e=c.x;else break;case"x":c.fx&&(e=-c.x-(c.width||0));case"rx":if(v=="rx"&&r.type=="rect")break;case"cx":h.setAttribute(v,e),r.pattern&&b(r),r._.dirty=1;break;case"height":if(h.setAttribute(v,e),r._.dirty=1,c.fy)v="y",e=c.y;else break;case"y":c.fy&&(e=-c.y-(c.height||0));case"ry":if(v=="ry"&&r.type=="rect")break;case"cy":h.setAttribute(v,e),r.pattern&&b(r),r._.dirty=1;break;case"r":r.type=="rect"?t(h,{rx:e,ry:e}):h.setAttribute(v,e),r._.dirty=1;break;case"src":r.type=="image"&&h.setAttributeNS(a,"href",e);break;case"stroke-width":(r._.sx!=1||r._.sy!=1)&&(e/=k(y(r._.sx),y(r._.sy))||1),r.paper._vbSize&&(e*=r.paper._vbSize),h.setAttribute(v,e),c["stroke-dasharray"]&&rt(r,c["stroke-dasharray"],f),r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1));break;case"stroke-dasharray":rt(r,e,f);break;case"fill":if(ht=u(e).match(n._ISURL),ht){p=t("pattern"),ct=t("image"),p.id=n.createUUID(),t(p,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),t(ct,{x:0,y:0,"xlink:href":ht[1]}),p.appendChild(ct),function(i){n._preload(ht[1],function(){var n=this.offsetWidth,u=this.offsetHeight;t(i,{width:n,height:u}),t(ct,{width:n,height:u}),r.paper.safari()})}(p),r.paper.defs.appendChild(p),t(h,{fill:"url(#"+p.id+")"}),r.pattern=p,r.pattern&&b(r);break}if(w=n.getRGB(e),w.error){if((r.type=="circle"||r.type=="ellipse"||u(e).charAt()!="r")&&it(r,e)){("opacity"in c||"fill-opacity"in c)&&(nt=n._g.doc.getElementById(h.getAttribute("fill").replace(/^url\(#|\)$/g,o)),nt&&(ut=nt.getElementsByTagName("stop"),t(ut[ut.length-1],{"stop-opacity":("opacity"in c?c.opacity:1)*("fill-opacity"in c?c["fill-opacity"]:1)}))),c.gradient=e,c.fill="none";break}}else delete f.gradient,delete c.gradient,!n.is(c.opacity,"undefined")&&n.is(f.opacity,"undefined")&&t(h,{opacity:c.opacity}),!n.is(c["fill-opacity"],"undefined")&&n.is(f["fill-opacity"],"undefined")&&t(h,{"fill-opacity":c["fill-opacity"]});w[i]("opacity")&&t(h,{"fill-opacity":w.opacity>1?w.opacity/100:w.opacity});case"stroke":w=n.getRGB(e),h.setAttribute(v,w.hex),v=="stroke"&&w[i]("opacity")&&t(h,{"stroke-opacity":w.opacity>1?w.opacity/100:w.opacity}),v=="stroke"&&r._.arrows&&("startString"in r._.arrows&&s(r,r._.arrows.startString),"endString"in r._.arrows&&s(r,r._.arrows.endString,1));break;case"gradient":(r.type=="circle"||r.type=="ellipse"||u(e).charAt()!="r")&&it(r,e);break;case"opacity":c.gradient&&!c[i]("stroke-opacity")&&t(h,{"stroke-opacity":e>1?e/100:e});case"fill-opacity":if(c.gradient){nt=n._g.doc.getElementById(h.getAttribute("fill").replace(/^url\(#|\)$/g,o)),nt&&(ut=nt.getElementsByTagName("stop"),t(ut[ut.length-1],{"stop-opacity":e}));break}default:v=="font-size"&&(e=tt(e,10)+"px"),at=v.replace(/(\-.)/g,function(n){return n.substring(1).toUpperCase()}),h.style[at]=e,r._.dirty=1,h.setAttribute(v,e)}}ot(r,f),h.style.visibility=vt},ut=1.2,ot=function(r,f){var y,h,l,e,a,p,v;if(r.type=="text"&&!!(f[i]("text")||f[i]("font")||f[i]("font-size")||f[i]("x")||f[i]("y"))){var c=r.attrs,s=r.node,w=s.firstChild?tt(n._g.doc.defaultView.getComputedStyle(s.firstChild,o).getPropertyValue("font-size"),10):10;if(f[i]("text")){for(c.text=f.text;s.firstChild;)s.removeChild(s.firstChild);for(y=u(f.text).split("\n"),h=[],e=0,a=y.length;e<a;e++)l=t("tspan"),e&&t(l,{dy:w*ut,x:c.x}),l.appendChild(n._g.doc.createTextNode(y[e])),s.appendChild(l),h[e]=l}else for(h=s.getElementsByTagName("tspan"),e=0,a=h.length;e<a;e++)e?t(h[e],{dy:w*ut,x:c.x}):t(h[0],{dy:0});t(s,{x:c.x,y:c.y}),r._.dirty=1,p=r._getBBox(),v=c.y-(p.y+p.height/2),v&&n.is(v,"finite")&&t(h[0],{dy:v})}},h=function(t,i){var r=0,u=0;this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.matrix=n.matrix(),this.realPath=null,this.paper=i,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},r=n.el;h.prototype=r,r.constructor=h,n._engine.path=function(n,i){var u=t("path"),r;return i.canvas&&i.canvas.appendChild(u),r=new h(u,i),r.type="path",g(r,{fill:"none",stroke:"#000",path:n}),r},r.rotate=function(n,t,i){if(this.removed)return this;if(n=u(n).split(l),n.length-1&&(t=f(n[1]),i=f(n[2])),n=f(n[0]),i==null&&(t=i),t==null||i==null){var r=this.getBBox(1);t=r.x+r.width/2,i=r.y+r.height/2}return this.transform(this._.transform.concat([["r",n,t,i]])),this},r.scale=function(n,t,i,r){if(this.removed)return this;if(n=u(n).split(l),n.length-1&&(t=f(n[1]),i=f(n[2]),r=f(n[3])),n=f(n[0]),t==null&&(t=n),r==null&&(i=r),i==null||r==null)var e=this.getBBox(1);return i=i==null?e.x+e.width/2:i,r=r==null?e.y+e.height/2:r,this.transform(this._.transform.concat([["s",n,t,i,r]])),this},r.translate=function(n,t){return this.removed?this:(n=u(n).split(l),n.length-1&&(t=f(n[1])),n=f(n[0])||0,t=+t||0,this.transform(this._.transform.concat([["t",n,t]])),this)},r.transform=function(r){var u=this._,f;return r==null?u.transform:(n._extractTransform(this,r),this.clip&&t(this.clip,{transform:this.matrix.invert()}),this.pattern&&b(this),this.node&&t(this.node,{transform:this.matrix}),(u.sx!=1||u.sy!=1)&&(f=this.attrs[i]("stroke-width")?this.attrs["stroke-width"]:1,this.attr({"stroke-width":f})),this)},r.hide=function(){return this.removed||this.paper.safari(this.node.style.display="none"),this},r.show=function(){return this.removed||this.paper.safari(this.node.style.display=""),this},r.remove=function(){var t,i;if(!this.removed&&!!this.node.parentNode){t=this.paper,t.__set__&&t.__set__.exclude(this),p.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),n._tear(this,t),this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(i in this)this[i]=typeof this[i]=="function"?n._removedFactory(i):null;this.removed=!0}},r._getBBox=function(){var t,n;this.node.style.display=="none"&&(this.show(),t=!0),n={};try{n=this.node.getBBox()}catch(i){}finally{n=n||{}}return t&&this.hide(),n},r.attr=function(t,r){var e,c,a,o,s,h,f,u,v,y;if(this.removed)return this;if(t==null){e={};for(c in this.attrs)this.attrs[i](c)&&(e[c]=this.attrs[c]);return e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(r==null&&n.is(t,"string")){if(t=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(t=="transform")return this._.transform;for(a=t.split(l),o={},s=0,h=a.length;s<h;s++)t=a[s],o[t]=t in this.attrs?this.attrs[t]:n.is(this.paper.customAttributes[t],"function")?this.paper.customAttributes[t].def:n._availableAttrs[t];return h-1?o:o[a[0]]}if(r==null&&n.is(t,"array")){for(o={},s=0,h=t.length;s<h;s++)o[t[s]]=this.attr(t[s]);return o}r!=null?(f={},f[t]=r):t!=null&&n.is(t,"object")&&(f=t);for(u in f)p("raphael.attr."+u+"."+this.id,this,f[u]);for(u in this.paper.customAttributes)if(this.paper.customAttributes[i](u)&&f[i](u)&&n.is(this.paper.customAttributes[u],"function")){v=this.paper.customAttributes[u].apply(this,[].concat(f[u])),this.attrs[u]=f[u];for(y in v)v[i](y)&&(f[y]=v[y])}return g(this,f),this},r.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&n._tofront(this,t),this},r.toBack=function(){var t,i;return this.removed?this:(t=this.node.parentNode,t.tagName.toLowerCase()=="a"?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper),i=this.paper,this)},r.insertAfter=function(t){if(this.removed)return this;var i=t.node||t[t.length-1].node;return i.nextSibling?i.parentNode.insertBefore(this.node,i.nextSibling):i.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this},r.insertBefore=function(t){if(this.removed)return this;var i=t.node||t[0].node;return i.parentNode.insertBefore(this.node,i),n._insertbefore(this,t,this.paper),this},r.blur=function(i){var r=this,u,f;+i!=0?(u=t("filter"),f=t("feGaussianBlur"),r.attrs.blur=i,u.id=n.createUUID(),t(f,{stdDeviation:+i||1.5}),u.appendChild(f),r.paper.defs.appendChild(u),r._blur=u,t(r.node,{filter:"url(#"+u.id+")"})):(r._blur&&(r._blur.parentNode.removeChild(r._blur),delete r._blur,delete r.attrs.blur),r.node.removeAttribute("filter"))},n._engine.circle=function(n,i,r,u){var e=t("circle"),f;return n.canvas&&n.canvas.appendChild(e),f=new h(e,n),f.attrs={cx:i,cy:r,r:u,fill:"none",stroke:"#000"},f.type="circle",t(e,f.attrs),f},n._engine.rect=function(n,i,r,u,f,e){var s=t("rect"),o;return n.canvas&&n.canvas.appendChild(s),o=new h(s,n),o.attrs={x:i,y:r,width:u,height:f,r:e||0,rx:e||0,ry:e||0,fill:"none",stroke:"#000"},o.type="rect",t(s,o.attrs),o},n._engine.ellipse=function(n,i,r,u,f){var o=t("ellipse"),e;return n.canvas&&n.canvas.appendChild(o),e=new h(o,n),e.attrs={cx:i,cy:r,rx:u,ry:f,fill:"none",stroke:"#000"},e.type="ellipse",t(o,e.attrs),e},n._engine.image=function(n,i,r,u,f,e){var o=t("image"),s;return t(o,{x:r,y:u,width:f,height:e,preserveAspectRatio:"none"}),o.setAttributeNS(a,"href",i),n.canvas&&n.canvas.appendChild(o),s=new h(o,n),s.attrs={x:r,y:u,width:f,height:e,src:i},s.type="image",s},n._engine.text=function(i,r,u,f){var o=t("text"),e;return i.canvas&&i.canvas.appendChild(o),e=new h(o,i),e.attrs={x:r,y:u,"text-anchor":"middle",text:f,font:n._availableAttrs.font,stroke:"none",fill:"#000"},e.type="text",g(e,e.attrs),e},n._engine.setSize=function(n,t){return this.width=n||this.width,this.height=t||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},n._engine.create=function(){var u=n._getContainer.apply(0,arguments),i=u&&u.container,o=u.x,s=u.y,f=u.width,e=u.height,r,h,c;if(!i)throw new Error("SVG container not found.");return r=t("svg"),h="overflow:hidden;",o=o||0,s=s||0,f=f||512,e=e||342,t(r,{height:e,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),i==1?(r.style.cssText=h+"position:absolute;left:"+o+"px;top:"+s+"px",n._g.doc.body.appendChild(r),c=1):(r.style.cssText=h+"position:relative",i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r)),i=new n._Paper,i.width=f,i.height=e,i.canvas=r,i.clear(),i._left=i._top=0,c&&(i.renderfix=function(){}),i.renderfix(),i},n._engine.setViewBox=function(n,i,r,u,f){p("raphael.setViewBox",this,this._viewBox,[n,i,r,u,f]);var o=k(r/this.width,u/this.height),e=this.top,c=f?"meet":"xMinYMin",s,h;for(n==null?(this._vbSize&&(o=1),delete this._vbSize,s="0 0 "+this.width+w+this.height):(this._vbSize=o,s=n+w+i+w+r+w+u),t(this.canvas,{viewBox:s,preserveAspectRatio:c});o&&e;)h="stroke-width"in e.attrs?e.attrs["stroke-width"]:1,e.attr({"stroke-width":h}),e._.dirty=1,e._.dirtyT=1,e=e.prev;return this._viewBox=[n,i,r,u,!!f],this},n.prototype.renderfix=function(){var n=this.canvas,u=n.style,t,i,r;try{t=n.getScreenCTM()||n.createSVGMatrix()}catch(f){t=n.createSVGMatrix()}i=-t.e%1,r=-t.f%1,(i||r)&&(i&&(this._left=(this._left+i)%1,u.left=this._left+"px"),r&&(this._top=(this._top+r)%1,u.top=this._top+"px"))},n.prototype.clear=function(){n.eve("raphael.clear",this);for(var i=this.canvas;i.firstChild;)i.removeChild(i.firstChild);this.bottom=this.top=null,(this.desc=t("desc")).appendChild(n._g.doc.createTextNode("Created with Raphaël "+n.version)),i.appendChild(this.desc),i.appendChild(this.defs=t("defs"))},n.prototype.remove=function(){p("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?n._removedFactory(t):null},nt=n.st;for(v in r)r[i](v)&&!nt[i](v)&&(nt[v]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n].apply(i,t)})}}(v))}(window.Raphael),window.Raphael.vml&&function(n){var h="hasOwnProperty",i=String,f=parseFloat,c=Math,e=c.round,k=c.max,g=c.min,p=c.abs,l="fill",a=/[, ]+/,ut=n.eve,ft=" progid:DXImageTransform.Microsoft",o=" ",u="",nt={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},et=/([clmz]),?([^clmz]*)/gi,ot=/ progid:\S+Blur\([^\)]+\)/g,st=/-?[^,\s-]+/g,tt="position:absolute;left:0;top:0;width:1px;height:1px",t=21600,ht={path:1,rect:1,image:1},ct={circle:1,ellipse:1},lt=function(r){var a=/[ahqstv]/ig,v=n._pathToAbsolute,f,l,y,s,h,w,c,p;if(i(r).match(a)&&(v=n._path2curve),a=/[clmz]/g,v==n._pathToAbsolute&&!i(r).match(a))return f=i(r).replace(et,function(n,i,r){var u=[],o=i.toLowerCase()=="m",f=nt[i];return r.replace(st,function(n){o&&u.length==2&&(f+=u+nt[i=="m"?"l":"L"],u=[]),u.push(e(n*t))}),f+u});for(l=v(r),f=[],h=0,w=l.length;h<w;h++){for(y=l[h],s=l[h][0].toLowerCase(),s=="z"&&(s="x"),c=1,p=y.length;c<p;c++)s+=e(y[c]*t)+(c!=p-1?",":u);f.push(s)}return f.join(o)},it=function(t,i,r){var u=n.matrix();return u.rotate(-t,.5,.5),{dx:u.x(i,r),dy:u.y(i,r)}},w=function(n,i,r,u,f,e){var v=n._,k=n.matrix,h=v.fillpos,c=n.node,y=c.style,w=1,b="",nt,d=t/i,g=t/r,a,s;y.visibility="hidden",!i||!r||(c.coordsize=p(d)+o+p(g),y.rotation=e*(i*r<0?-1:1),e&&(a=it(e,u,f),u=a.dx,f=a.dy),i<0&&(b+="x"),r<0&&(b+=" y")&&(w=-1),y.flip=b,c.coordorigin=u*-d+o+f*-g,(h||v.fillsize)&&(s=c.getElementsByTagName(l),s=s&&s[0],c.removeChild(s),h&&(a=it(e,k.x(h[0],h[1]),k.y(h[0],h[1])),s.position=a.dx*w+o+a.dy*w),v.fillsize&&(s.size=v.fillsize[0]*p(i)+o+v.fillsize[1]*p(r)),c.appendChild(s)),y.visibility="visible")},s,d,y;n.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var rt=function(n,t,r){for(var u=i(t).toLowerCase().split("-"),o=r?"end":"start",f=u.length,s="classic",h="medium",c="medium",e;f--;)switch(u[f]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":s=u[f];break;case"wide":case"narrow":c=u[f];break;case"long":case"short":h=u[f]}e=n.node.getElementsByTagName("stroke")[0],e[o+"arrow"]=s,e[o+"arrowlength"]=h,e[o+"arrowwidth"]=c},v=function(r,c){var yt,nt,ot,ut,ft,y,si,pt,st,tt,d,dt,gt,et,ni,vt,ri,bt,hi;r.attrs=r.attrs||{};var b=r.node,v=r.attrs,it=b.style,li,ui=ht[r.type]&&(c.x!=v.x||c.y!=v.y||c.width!=v.width||c.height!=v.height||c.cx!=v.cx||c.cy!=v.cy||c.rx!=v.rx||c.ry!=v.ry||c.r!=v.r),ci=ct[r.type]&&(v.cx!=c.cx||v.cy!=c.cy||v.r!=c.r||v.rx!=c.rx||v.ry!=c.ry),p=r;for(yt in c)c[h](yt)&&(v[yt]=c[yt]);if(ui&&(v.path=n._getPath[r.type](r),r._.dirty=1),c.href&&(b.href=c.href),c.title&&(b.title=c.title),c.target&&(b.target=c.target),c.cursor&&(it.cursor=c.cursor),"blur"in c&&r.blur(c.blur),(c.path&&r.type=="path"||ui)&&(b.path=lt(~i(v.path).toLowerCase().indexOf("r")?n._pathToAbsolute(v.path):v.path),r.type=="image"&&(r._.fillpos=[v.x,v.y],r._.fillsize=[v.width,v.height],w(r,1,1,0,0,0))),"transform"in c&&r.transform(c.transform),ci){var kt=+v.cx,fi=+v.cy,ei=+v.rx||+v.r||0,oi=+v.ry||+v.r||0;b.path=n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",e((kt-ei)*t),e((fi-oi)*t),e((kt+ei)*t),e((fi+oi)*t),e(kt*t))}if("clip-rect"in c&&(nt=i(c["clip-rect"]).split(a),nt.length==4&&(nt[2]=+nt[2]+ +nt[0],nt[3]=+nt[3]+ +nt[1],ot=b.clipRect||n._g.doc.createElement("div"),ut=ot.style,ut.clip=n.format("rect({1}px {2}px {3}px {0}px)",nt),b.clipRect||(ut.position="absolute",ut.top=0,ut.left=0,ut.width=r.paper.width+"px",ut.height=r.paper.height+"px",b.parentNode.insertBefore(ot,b),ot.appendChild(b),b.clipRect=ot)),c["clip-rect"]||b.clipRect&&(b.clipRect.style.clip="auto")),r.textpath&&(ft=r.textpath.style,c.font&&(ft.font=c.font),c["font-family"]&&(ft.fontFamily='"'+c["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,u)+'"'),c["font-size"]&&(ft.fontSize=c["font-size"]),c["font-weight"]&&(ft.fontWeight=c["font-weight"]),c["font-style"]&&(ft.fontStyle=c["font-style"])),"arrow-start"in c&&rt(p,c["arrow-start"]),"arrow-end"in c&&rt(p,c["arrow-end"],1),(c.opacity!=null||c["stroke-width"]!=null||c.fill!=null||c.src!=null||c.stroke!=null||c["stroke-width"]!=null||c["stroke-opacity"]!=null||c["fill-opacity"]!=null||c["stroke-dasharray"]!=null||c["stroke-miterlimit"]!=null||c["stroke-linejoin"]!=null||c["stroke-linecap"]!=null)&&(y=b.getElementsByTagName(l),si=!1,y=y&&y[0],!y&&(si=y=s(l)),r.type=="image"&&c.src&&(y.src=c.src),c.fill&&(y.on=!0),(y.on==null||c.fill=="none"||c.fill===null)&&(y.on=!1),y.on&&c.fill&&(pt=i(c.fill).match(n._ISURL),pt?(y.parentNode==b&&b.removeChild(y),y.rotate=!0,y.src=pt[1],y.type="tile",st=r.getBBox(1),y.position=st.x+o+st.y,r._.fillpos=[st.x,st.y],n._preload(pt[1],function(){r._.fillsize=[this.offsetWidth,this.offsetHeight]})):(y.color=n.getRGB(c.fill).hex,y.src=u,y.type="solid",n.getRGB(c.fill).error&&(p.type in{circle:1,ellipse:1}||i(c.fill).charAt()!="r")&&at(p,c.fill,y)&&(v.fill="none",v.gradient=c.fill,y.rotate=!1))),("fill-opacity"in c||"opacity"in c)&&(tt=((+v["fill-opacity"]+1||2)-1)*((+v.opacity+1||2)-1)*((+n.getRGB(c.fill).o+1||2)-1),tt=g(k(tt,0),1),y.opacity=tt,y.src&&(y.color="none")),b.appendChild(y),d=b.getElementsByTagName("stroke")&&b.getElementsByTagName("stroke")[0],dt=!1,d||(dt=d=s("stroke")),(c.stroke&&c.stroke!="none"||c["stroke-width"]||c["stroke-opacity"]!=null||c["stroke-dasharray"]||c["stroke-miterlimit"]||c["stroke-linejoin"]||c["stroke-linecap"])&&(d.on=!0),(c.stroke=="none"||c.stroke===null||d.on==null||c.stroke==0||c["stroke-width"]==0)&&(d.on=!1),gt=n.getRGB(c.stroke),d.on&&c.stroke&&(d.color=gt.hex),tt=((+v["stroke-opacity"]+1||2)-1)*((+v.opacity+1||2)-1)*((+gt.o+1||2)-1),et=(f(c["stroke-width"])||1)*.75,tt=g(k(tt,0),1),c["stroke-width"]==null&&(et=v["stroke-width"]),c["stroke-width"]&&(d.weight=et),et&&et<1&&(tt*=et)&&(d.weight=1),d.opacity=tt,c["stroke-linejoin"]&&(d.joinstyle=c["stroke-linejoin"]||"miter"),d.miterlimit=c["stroke-miterlimit"]||8,c["stroke-linecap"]&&(d.endcap=c["stroke-linecap"]=="butt"?"flat":c["stroke-linecap"]=="square"?"square":"round"),c["stroke-dasharray"]&&(ni={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},d.dashstyle=ni[h](c["stroke-dasharray"])?ni[c["stroke-dasharray"]]:u),dt&&b.appendChild(d)),p.type=="text"){p.paper.canvas.style.display=u;var ti=p.paper.span,ii=100,wt=v.font&&v.font.match(/\d+(?:\.\d*)?(?=px)/);for(it=ti.style,v.font&&(it.font=v.font),v["font-family"]&&(it.fontFamily=v["font-family"]),v["font-weight"]&&(it.fontWeight=v["font-weight"]),v["font-style"]&&(it.fontStyle=v["font-style"]),wt=f(v["font-size"]||wt&&wt[0])||10,it.fontSize=wt*ii+"px",p.textpath.string&&(ti.innerHTML=i(p.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>")),vt=ti.getBoundingClientRect(),p.W=v.w=(vt.right-vt.left)/ii,p.H=v.h=(vt.bottom-vt.top)/ii,p.X=v.x,p.Y=v.y+p.H/2,("x"in c||"y"in c)&&(p.path.v=n.format("m{0},{1}l{2},{1}",e(v.x*t),e(v.y*t),e(v.x*t)+1)),ri=["x","y","text","font","font-family","font-weight","font-style","font-size"],bt=0,hi=ri.length;bt<hi;bt++)if(ri[bt]in c){p._.dirty=1;break}switch(v["text-anchor"]){case"start":p.textpath.style["v-text-align"]="left",p.bbx=p.W/2;break;case"end":p.textpath.style["v-text-align"]="right",p.bbx=-p.W/2;break;default:p.textpath.style["v-text-align"]="center",p.bbx=0}p.textpath.style["v-text-kern"]=!0}},at=function(t,r,e){var l,s,a,h,w;t.attrs=t.attrs||{};var b=t.attrs,v=Math.pow,k,d,y="linear",p=".5 .5";if((t.attrs.gradient=r,r=i(r).replace(n._radial_gradient,function(n,t,i){return y="radial",t&&i&&(t=f(t),i=f(i),v(t-.5,2)+v(i-.5,2)>.25&&(i=c.sqrt(.25-v(t-.5,2))*((i>.5)*2-1)+.5),p=t+o+i),u}),r=r.split(/\s*\-\s*/),y=="linear"&&(l=r.shift(),l=-f(l),isNaN(l)))||(s=n._parseDots(r),!s))return null;if(t=t.shape||t.node,s.length){for(t.removeChild(e),e.on=!0,e.method="none",e.color=s[0].color,e.color2=s[s.length-1].color,a=[],h=0,w=s.length;h<w;h++)s[h].offset&&a.push(s[h].offset+o+s[h].color);e.colors=a.length?a.join():"0% "+e.color,y=="radial"?(e.type="gradientTitle",e.focus="100%",e.focussize="0 0",e.focusposition=p,e.angle=0):(e.type="gradient",e.angle=(270-l)%360),t.appendChild(e)}return 1},b=function(t,i){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=i,this.matrix=n.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},r=n.el;b.prototype=r,r.constructor=b,r.transform=function(r){var e,a,l;if(r==null)return this._.transform;e=this.paper._viewBoxShift,a=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:u,e&&(l=r=i(r).replace(/\.{3}|\u2026/g,this._.transform||u)),n._extractTransform(this,a+r);var s=this.matrix.clone(),h=this.skew,c=this.node,f,v=~i(this.attrs.fill).indexOf("-"),d=!i(this.attrs.fill).indexOf("url(");if(s.translate(-.5,-.5),d||v||this.type=="image")if(h.matrix="1 0 0 1",h.offset="0 0",f=s.split(),v&&f.noRotation||!f.isSimple){c.style.filter=s.toFilter();var y=this.getBBox(),p=this.getBBox(1),b=y.x-p.x,k=y.y-p.y;c.coordorigin=b*-t+o+k*-t,w(this,1,1,b,k,0)}else c.style.filter=u,w(this,f.scalex,f.scaley,f.dx,f.dy,f.rotate);else c.style.filter=u,h.matrix=i(s),h.offset=s.offset();return l&&(this._.transform=l),this},r.rotate=function(n,t,r){if(this.removed)return this;if(n!=null){if(n=i(n).split(a),n.length-1&&(t=f(n[1]),r=f(n[2])),n=f(n[0]),r==null&&(t=r),t==null||r==null){var u=this.getBBox(1);t=u.x+u.width/2,r=u.y+u.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",n,t,r]])),this}},r.translate=function(n,t){return this.removed?this:(n=i(n).split(a),n.length-1&&(t=f(n[1])),n=f(n[0])||0,t=+t||0,this._.bbox&&(this._.bbox.x+=n,this._.bbox.y+=t),this.transform(this._.transform.concat([["t",n,t]])),this)},r.scale=function(n,t,r,u){if(this.removed)return this;if(n=i(n).split(a),n.length-1&&(t=f(n[1]),r=f(n[2]),u=f(n[3]),isNaN(r)&&(r=null),isNaN(u)&&(u=null)),n=f(n[0]),t==null&&(t=n),u==null&&(r=u),r==null||u==null)var e=this.getBBox(1);return r=r==null?e.x+e.width/2:r,u=u==null?e.y+e.height/2:u,this.transform(this._.transform.concat([["s",n,t,r,u]])),this._.dirtyT=1,this},r.hide=function(){return this.removed||(this.node.style.display="none"),this},r.show=function(){return this.removed||(this.node.style.display=u),this},r._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},r.remove=function(){if(!this.removed&&!!this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),n.eve.unbind("raphael.*.*."+this.id),n._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]=typeof this[t]=="function"?n._removedFactory(t):null;this.removed=!0}},r.attr=function(t,i){var f,c,y,e,o,s,r,u,p,w;if(this.removed)return this;if(t==null){f={};for(c in this.attrs)this.attrs[h](c)&&(f[c]=this.attrs[c]);return f.gradient&&f.fill=="none"&&(f.fill=f.gradient)&&delete f.gradient,f.transform=this._.transform,f}if(i==null&&n.is(t,"string")){if(t==l&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(y=t.split(a),e={},o=0,s=y.length;o<s;o++)t=y[o],e[t]=t in this.attrs?this.attrs[t]:n.is(this.paper.customAttributes[t],"function")?this.paper.customAttributes[t].def:n._availableAttrs[t];return s-1?e:e[y[0]]}if(this.attrs&&i==null&&n.is(t,"array")){for(e={},o=0,s=t.length;o<s;o++)e[t[o]]=this.attr(t[o]);return e}i!=null&&(r={},r[t]=i),i==null&&n.is(t,"object")&&(r=t);for(u in r)ut("raphael.attr."+u+"."+this.id,this,r[u]);if(r){for(u in this.paper.customAttributes)if(this.paper.customAttributes[h](u)&&r[h](u)&&n.is(this.paper.customAttributes[u],"function")){p=this.paper.customAttributes[u].apply(this,[].concat(r[u])),this.attrs[u]=r[u];for(w in p)p[h](w)&&(r[w]=p[w])}r.text&&this.type=="text"&&(this.textpath.string=r.text),v(this,r)}return this},r.toFront=function(){return this.removed||this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&n._tofront(this,this.paper),this},r.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper)),this)},r.insertAfter=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this)},r.insertBefore=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),n._insertbefore(this,t,this.paper),this)},r.blur=function(t){var i=this.node.runtimeStyle,r=i.filter;r=r.replace(ot,u),+t!=0?(this.attrs.blur=t,i.filter=r+o+ft+".Blur(pixelradius="+(+t||1.5)+")",i.margin=n.format("-{0}px 0 0 -{0}px",e(+t||1.5))):(i.filter=r,i.margin=0,delete this.attrs.blur)},n._engine.path=function(n,i){var f=s("shape"),r,h,e;return f.style.cssText=tt,f.coordsize=t+o+t,f.coordorigin=i.coordorigin,r=new b(f,i),h={fill:"none",stroke:"#000"},n&&(h.path=n),r.type="path",r.path=[],r.Path=u,v(r,h),i.canvas.appendChild(f),e=s("skew"),e.on=!0,f.appendChild(e),r.skew=e,r.transform(u),r},n._engine.rect=function(t,i,r,u,f,e){var h=n._rectPath(i,r,u,f,e),o=t.path(h),s=o.attrs;return o.X=s.x=i,o.Y=s.y=r,o.W=s.width=u,o.H=s.height=f,s.r=e,s.path=h,o.type="rect",o},n._engine.ellipse=function(n,t,i,r,u){var f=n.path(),e=f.attrs;return f.X=t-r,f.Y=i-u,f.W=r*2,f.H=u*2,f.type="ellipse",v(f,{cx:t,cy:i,rx:r,ry:u}),f},n._engine.circle=function(n,t,i,r){var u=n.path(),f=u.attrs;return u.X=t-r,u.Y=i-r,u.W=u.H=r*2,u.type="circle",v(u,{cx:t,cy:i,r:r}),u},n._engine.image=function(t,i,r,u,f,e){var a=n._rectPath(r,u,f,e),o=t.path(a).attr({stroke:"none"}),s=o.attrs,c=o.node,h=c.getElementsByTagName(l)[0];return s.src=i,o.X=s.x=r,o.Y=s.y=u,o.W=s.width=f,o.H=s.height=e,s.path=a,o.type="image",h.parentNode==c&&c.removeChild(h),h.rotate=!0,h.src=i,h.type="tile",o._.fillpos=[r,u],o._.fillsize=[f,e],c.appendChild(h),w(o,1,1,0,0,0),o},n._engine.text=function(r,f,h,c){var a=s("shape"),y=s("path"),p=s("textpath"),l,k,w;return f=f||0,h=h||0,c=c||"",y.v=n.format("m{0},{1}l{2},{1}",e(f*t),e(h*t),e(f*t)+1),y.textpathok=!0,p.string=i(c),p.on=!0,a.style.cssText=tt,a.coordsize=t+o+t,a.coordorigin="0 0",l=new b(a,r),k={fill:"#000",stroke:"none",font:n._availableAttrs.font,text:c},l.shape=a,l.path=y,l.textpath=p,l.type="text",l.attrs.text=i(c),l.attrs.x=f,l.attrs.y=h,l.attrs.w=1,l.attrs.h=1,v(l,k),a.appendChild(p),a.appendChild(y),r.canvas.appendChild(a),w=s("skew"),w.on=!0,a.appendChild(w),l.skew=w,l.transform(u),l},n._engine.setSize=function(t,i){var r=this.canvas.style;return this.width=t,this.height=i,t==+t&&(t+="px"),i==+i&&(i+="px"),r.width=t,r.height=i,r.clip="rect(0 "+t+" "+i+" 0)",this._viewBox&&n._engine.setViewBox.apply(this,this._viewBox),this},n._engine.setViewBox=function(t,i,r,u,f){n.eve("raphael.setViewBox",this,this._viewBox,[t,i,r,u,f]);var e=this.width,o=this.height,c=1/k(r/e,u/o),s,h;return f&&(s=o/u,h=e/r,r*s<e&&(t-=(e-r*s)/2/s),u*h<o&&(i-=(o-u*h)/2/h)),this._viewBox=[t,i,r,u,!!f],this._viewBoxShift={dx:-t,dy:-i,scale:c},this.forEach(function(n){n.transform("...")}),this},n._engine.initWin=function(n){var t=n.document;t.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{t.namespaces.rvml||t.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),s=function(n){return t.createElement("<rvml:"+n+' class="rvml">')}}catch(i){s=function(n){return t.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},n._engine.initWin(n._g.win),n._engine.create=function(){var e=n._getContainer.apply(0,arguments),f=e.container,r=e.height,a,u=e.width,c=e.x,l=e.y;if(!f)throw new Error("VML container not found.");var i=new n._Paper,s=i.canvas=n._g.doc.createElement("div"),h=s.style;return c=c||0,l=l||0,u=u||512,r=r||342,i.width=u,i.height=r,u==+u&&(u+="px"),r==+r&&(r+="px"),i.coordsize=t*1e3+o+t*1e3,i.coordorigin="0 0",i.span=n._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(i.span),h.cssText=n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",u,r),f==1?(n._g.doc.body.appendChild(s),h.left=c+"px",h.top=l+"px",h.position="absolute"):f.firstChild?f.insertBefore(s,f.firstChild):f.appendChild(s),i.renderfix=function(){},i},n.prototype.clear=function(){n.eve("raphael.clear",this),this.canvas.innerHTML=u,this.span=n._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},n.prototype.remove=function(){n.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?n._removedFactory(t):null;return!0},d=n.st;for(y in r)r[h](y)&&!d[h](y)&&(d[y]=function(n){return function(){var t=arguments;return this.forEach(function(i){i[n].apply(i,t)})}}(y))}(window.Raphael),function(){var t,n,r,u,e=[].slice,o={}.hasOwnProperty,f=function(n,t){function r(){this.constructor=n}for(var i in t)o.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},i=function(n,t){return function(){return n.apply(t,arguments)}},s=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};n=window.Morris={},t=jQuery,n.EventEmitter=function(){function n(){}return n.prototype.on=function(n,t){return this.handlers==null&&(this.handlers={}),this.handlers[n]==null&&(this.handlers[n]=[]),this.handlers[n].push(t),this},n.prototype.fire=function(){var u,f,t,n,o,i,r;if(t=arguments[0],u=2<=arguments.length?e.call(arguments,1):[],this.handlers!=null&&this.handlers[t]!=null){for(i=this.handlers[t],r=[],n=0,o=i.length;n<o;n++)f=i[n],r.push(f.apply(null,u));return r}},n}(),n.commas=function(n){var r,t,i,u;return n!=null?(i=n<0?"-":"",r=Math.abs(n),t=Math.floor(r).toFixed(0),i+=t.replace(/(?=(?:\d{3})+$)(?!^)/g,","),u=r.toString(),u.length>t.length&&(i+=u.slice(t.length)),i):"-"},n.pad2=function(n){return(n<10?"0":"")+n},n.Grid=function(i){function r(n){var i=this;if(this.el=typeof n.element=="string"?t(document.getElementById(n.element)):t(n.element),this.el==null||this.el.length===0)throw new Error("Graph container element not found");this.el.css("position")==="static"&&this.el.css("position","relative"),this.options=t.extend({},this.gridDefaults,this.defaults||{},n),typeof this.options.units=="string"&&(this.options.postUnits=n.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(n){var t;return t=i.el.offset(),i.fire("hovermove",n.pageX-t.left,n.pageY-t.top)}),this.el.bind("mouseout",function(){return i.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(n){var r,t;return t=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0],r=i.el.offset(),i.fire("hover",t.pageX-r.left,t.pageY-r.top),t}),this.el.bind("click",function(n){var t;return t=i.el.offset(),i.fire("gridclick",n.pageX-t.left,n.pageY-t.top)}),this.postInit&&this.postInit()}return f(r,i),r.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"]},r.prototype.setData=function(t,i){var y,h,s,c,l,r,a,p,o,v,w,f,e,u;if(i==null&&(i=!0),this.options.data=t,t==null||t.length===0){this.data=[],this.raphael.clear(),this.hover!=null&&this.hover.hide();return}return f=this.cumulative?0:null,e=this.cumulative?0:null,this.options.goals.length>0&&(l=Math.min.apply(null,this.options.goals),c=Math.max.apply(null,this.options.goals),e=e!=null?Math.min(e,l):l,f=f!=null?Math.max(f,c):c),this.data=function(){var i,l,c;for(c=[],s=i=0,l=t.length;i<l;s=++i)a=t[s],r={},r.label=a[this.options.xkey],this.options.parseTime?(r.x=n.parseDate(r.label),this.options.dateFormat?r.label=this.options.dateFormat(r.x):typeof r.label=="number"&&(r.label=new Date(r.label).toString())):(r.x=s,this.options.xLabelFormat&&(r.label=this.options.xLabelFormat(r))),o=0,r.y=function(){var n,r,t,i;for(t=this.options.ykeys,i=[],h=n=0,r=t.length;n<r;h=++n)w=t[h],u=a[w],typeof u=="string"&&(u=parseFloat(u)),u!=null&&typeof u!="number"&&(u=null),u!=null&&(this.cumulative?o+=u:f!=null?(f=Math.max(u,f),e=Math.min(u,e)):f=e=u),this.cumulative&&o!=null&&(f=Math.max(o,f),e=Math.min(o,e)),i.push(u);return i}.call(this),c.push(r);return c}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(n,t){return(n.x>t.x)-(t.x>n.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.parseTime&&this.options.events.length>0&&(this.events=function(){var t,u,i,r;for(i=this.options.events,r=[],t=0,u=i.length;t<u;t++)y=i[t],r.push(n.parseDate(y));return r}.call(this),this.xmax=Math.max(this.xmax,Math.max.apply(null,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(null,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",e),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(e&&(this.ymin-=1),this.ymax+=1),(this.options.axes===!0||this.options.grid===!0)&&(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(p=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var n,r,t,i;for(i=[],v=n=r=this.ymin,t=this.ymax;r<=t?n<=t:n>=t;v=n+=p)i.push(v);return i}.call(this))),this.dirty=!0,i?this.redraw():void 0},r.prototype.yboundary=function(n,t){var i,r;return i=this.options["y"+n],typeof i=="string"?i.slice(0,4)==="auto"?i.length>5?(r=parseInt(i.slice(5),10),t==null?r:Math[n](t,r)):t!=null?t:0:parseInt(i,10):i},r.prototype.autoGridLines=function(n,t,i){var u,f,s,h,c,r,e,o,l;return c=t-n,l=Math.floor(Math.log(c)/Math.log(10)),e=Math.pow(10,l),f=Math.floor(n/e)*e,u=Math.ceil(t/e)*e,r=(u-f)/(i-1),e===1&&r>1&&Math.ceil(r)!==r&&(r=Math.ceil(r),u=f+r*(i-1)),f<0&&u>0&&(f=Math.floor(n/r)*r,u=Math.ceil(t/r)*r),r<1?(h=Math.floor(Math.log(r)/Math.log(10)),s=function(){var n,t;for(t=[],o=n=f;f<=u?n<=u:n>=u;o=n+=r)t.push(parseFloat(o.toFixed(1-h)));return t}()):s=function(){var n,t;for(t=[],o=n=f;f<=u?n<=u:n>=u;o=n+=r)t.push(o);return t}(),s},r.prototype._calc=function(){var r,u,n,t,i,f;return i=this.el.width(),n=this.el.height(),(this.elementWidth!==i||this.elementHeight!==n||this.dirty)&&(this.elementWidth=i,this.elementHeight=n,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,this.options.axes&&(f=function(){var n,r,t,i;for(t=this.grid,i=[],n=0,r=t.length;n<r;n++)u=t[n],i.push(this.measureText(this.yAxisFormat(u)).width);return i}.call(this),this.left+=Math.max.apply(Math,f),r=function(){var n,i,r;for(r=[],t=n=0,i=this.data.length;0<=i?n<i:n>i;t=0<=i?++n:--n)r.push(this.measureText(this.data[t].text,-this.options.xLabelAngle).height);return r}.call(this),this.bottom-=Math.max.apply(Math,r)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc)?this.calc():void 0},r.prototype.transY=function(n){return this.bottom-(n-this.ymin)*this.dy},r.prototype.transX=function(n){return this.data.length===1?(this.left+this.right)/2:this.left+(n-this.xmin)*this.dx},r.prototype.redraw=function(){return this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw?this.draw():void 0},r.prototype.measureText=function(n,t){var r,i;return t==null&&(t=0),i=this.raphael.text(100,100,n).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(t),r=i.getBBox(),i.remove(),r},r.prototype.yAxisFormat=function(n){return this.yLabelFormat(n)},r.prototype.yLabelFormat=function(t){return typeof this.options.yLabelFormat=="function"?this.options.yLabelFormat(t):""+this.options.preUnits+n.commas(t)+this.options.postUnits},r.prototype.updateHover=function(n,t){var i,r;return i=this.hitTest(n,t),i!=null?(r=this.hover).update.apply(r,i):void 0},r.prototype.drawGrid=function(){var i,r,n,f,u,t;if(this.options.grid!==!1||this.options.axes!==!1){for(u=this.grid,t=[],n=0,f=u.length;n<f;n++)i=u[n],r=this.transY(i),this.options.axes&&this.drawYAxisLabel(this.left-this.options.padding/2,r,this.yAxisFormat(i)),this.options.grid?t.push(this.drawGridLine("M"+this.left+","+r+"H"+(this.left+this.width))):t.push(void 0);return t}},r.prototype.drawGoals=function(){var u,f,n,t,e,i,r;for(i=this.options.goals,r=[],n=t=0,e=i.length;t<e;n=++t)f=i[n],u=this.options.goalLineColors[n%this.options.goalLineColors.length],r.push(this.drawGoal(f,u));return r},r.prototype.drawEvents=function(){var u,f,n,t,e,i,r;for(i=this.events,r=[],n=t=0,e=i.length;t<e;n=++t)f=i[n],u=this.options.eventLineColors[n%this.options.eventLineColors.length],r.push(this.drawEvent(f,u));return r},r.prototype.drawGoal=function(n,t){return this.raphael.path("M"+this.left+","+this.transY(n)+"H"+this.right).attr("stroke",t).attr("stroke-width",this.options.goalStrokeWidth)},r.prototype.drawEvent=function(n,t){return this.raphael.path("M"+this.transX(n)+","+this.bottom+"V"+this.top).attr("stroke",t).attr("stroke-width",this.options.eventStrokeWidth)},r.prototype.drawYAxisLabel=function(n,t,i){return this.raphael.text(n,t,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},r.prototype.drawGridLine=function(n){return this.raphael.path(n).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},r}(n.EventEmitter),n.parseDate=function(n){var e,o,c,s,u,r,h,i,t,f,l;return typeof n=="number"?n:(o=n.match(/^(\d+) Q(\d)$/),s=n.match(/^(\d+)-(\d+)$/),u=n.match(/^(\d+)-(\d+)-(\d+)$/),h=n.match(/^(\d+) W(\d+)$/),i=n.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),t=n.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),o?+new Date(parseInt(o[1],10),parseInt(o[2],10)*3-1,1):s?+new Date(parseInt(s[1],10),parseInt(s[2],10)-1,1):u?+new Date(parseInt(u[1],10),parseInt(u[2],10)-1,parseInt(u[3],10)):h?(f=new Date(parseInt(h[1],10),0,1),f.getDay()!==4&&f.setMonth(0,1+(11-f.getDay())%7),f.getTime()+parseInt(h[2],10)*6048e5):i?i[6]?(r=0,i[6]!=="Z"&&(r=parseInt(i[8],10)*60+parseInt(i[9],10),i[7]==="+"&&(r=0-r)),Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)+r)):+new Date(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)):t?(l=parseFloat(t[6]),e=Math.floor(l),c=Math.round((l-e)*1e3),t[8]?(r=0,t[8]!=="Z"&&(r=parseInt(t[10],10)*60+parseInt(t[11],10),t[9]==="+"&&(r=0-r)),Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10)+r,e,c)):+new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),e,c)):+new Date(parseInt(n,10),0,1))},n.Hover=function(){function i(i){i==null&&(i={}),this.options=t.extend({},n.Hover.defaults,i),this.el=t("<div class='"+this.options["class"]+"'><\/div>"),this.el.hide(),this.options.parent.append(this.el)}return i.defaults={"class":"morris-hover morris-default-style"},i.prototype.update=function(n,t,i){return this.html(n),this.show(),this.moveTo(t,i)},i.prototype.html=function(n){return this.el.html(n)},i.prototype.moveTo=function(n,t){var r,f,e,u,o,i;return o=this.options.parent.innerWidth(),u=this.options.parent.innerHeight(),f=this.el.outerWidth(),r=this.el.outerHeight(),e=Math.min(Math.max(0,n-f/2),o-f),t!=null?(i=t-r-10,i<0&&(i=t+10,i+r>u&&(i=u/2-r/2))):i=u/2-r/2,this.el.css({left:e+"px",top:parseInt(i)+"px"})},i.prototype.show=function(){return this.el.show()},i.prototype.hide=function(){return this.el.hide()},i}(),n.Line=function(t){function r(t){if(this.hilight=i(this.hilight,this),this.onHoverOut=i(this.onHoverOut,this),this.onHoverMove=i(this.onHoverMove,this),this.onGridClick=i(this.onGridClick,this),!(this instanceof n.Line))return new n.Line(t);r.__super__.constructor.call(this,t)}return f(r,t),r.prototype.init=function(){return this.pointGrow=Raphael.animation({r:this.options.pointSize+3},25,"linear"),this.pointShrink=Raphael.animation({r:this.options.pointSize},25,"linear"),this.options.hideHover!=="always"?(this.hover=new n.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)):void 0},r.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,continuousLine:!0,hideHover:!1},r.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},r.prototype.calcPoints=function(){var n,t,i,f,r,u;for(r=this.data,u=[],i=0,f=r.length;i<f;i++)n=r[i],n._x=this.transX(n.x),n._y=function(){var i,f,u,r;for(u=n.y,r=[],i=0,f=u.length;i<f;i++)t=u[i],t!=null?r.push(this.transY(t)):r.push(t);return r}.call(this),u.push(n._ymax=Math.min.apply(null,[this.bottom].concat(function(){var i,f,r,u;for(r=n._y,u=[],i=0,f=r.length;i<f;i++)t=r[i],t!=null&&u.push(t);return u}())));return u},r.prototype.hitTest=function(n){var i,f,r,e,u;if(this.data.length===0)return null;for(u=this.data.slice(1),i=r=0,e=u.length;r<e;i=++r)if(f=u[i],n<(f._x+this.data[i]._x)/2)break;return i},r.prototype.onGridClick=function(n,t){var i;return i=this.hitTest(n,t),this.fire("click",i,this.options.data[i],n,t)},r.prototype.onHoverMove=function(n,t){var i;return i=this.hitTest(n,t),this.displayHoverForRow(i)},r.prototype.onHoverOut=function(){if(this.options.hideHover!==!1)return this.displayHoverForRow(null)},r.prototype.displayHoverForRow=function(n){var t;return n!=null?((t=this.hover).update.apply(t,this.hoverContentForRow(n)),this.hilight(n)):(this.hover.hide(),this.hilight())},r.prototype.hoverContentForRow=function(n){var i,r,t,e,u,o,f;for(t=this.data[n],i="<div class='morris-hover-row-label'>"+t.label+"<\/div>",f=t.y,r=u=0,o=f.length;u<o;r=++u)e=f[r],i+="<div class='morris-hover-point' style='color: "+this.colorFor(t,r,"label")+"'>\n  "+this.options.labels[r]+":\n  "+this.yLabelFormat(e)+"\n<\/div>";return typeof this.options.hoverCallback=="function"&&(i=this.options.hoverCallback(n,this.options,i)),[i,t._x,t._ymax]},r.prototype.generatePaths=function(){var u,t,i,r,f;return this.paths=function(){var e,o,c,h;for(h=[],i=e=0,o=this.options.ykeys.length;0<=o?e<o:e>o;i=0<=o?++e:--e)f=this.options.smooth===!0||(c=this.options.ykeys[i],s.call(this.options.smooth,c)>=0),t=function(){var n,f,t,u;for(t=this.data,u=[],n=0,f=t.length;n<f;n++)r=t[n],r._y[i]!==void 0&&u.push({x:r._x,y:r._y[i]});return u}.call(this),this.options.continuousLine&&(t=function(){var n,r,i;for(i=[],n=0,r=t.length;n<r;n++)u=t[n],u.y!==null&&i.push(u);return i}()),t.length>1?h.push(n.Line.createPath(t,f,this.bottom)):h.push(null);return h}.call(this)},r.prototype.draw=function(){return this.options.axes&&this.drawXAxis(),this.drawSeries(),this.options.hideHover===!1?this.displayHoverForRow(this.data.length-1):void 0},r.prototype.drawXAxis=function(){var h,e,i,r,u,o,c,f,l,s,t=this;for(c=this.bottom+this.options.padding/2,u=null,r=null,h=function(n,i){var e,f,o,s,h;return e=t.drawXAxisLabel(t.transX(i),c,n),h=e.getBBox(),e.transform("r"+-t.options.xLabelAngle),f=e.getBBox(),e.transform("t0,"+f.height/2+"..."),t.options.xLabelAngle!==0&&(s=-.5*h.width*Math.cos(t.options.xLabelAngle*Math.PI/180),e.transform("t"+s+",0...")),f=e.getBBox(),(u==null||u>=f.x+f.width||r!=null&&r>=f.x)&&f.x>=0&&f.x+f.width<t.el.width()?(t.options.xLabelAngle!==0&&(o=1.25*t.options.gridTextSize/Math.sin(t.options.xLabelAngle*Math.PI/180),r=f.x-o),u=f.x-t.options.xLabelMargin):e.remove()},i=this.options.parseTime?this.data.length===1&&this.options.xLabels==="auto"?[[this.data[0].label,this.data[0].x]]:n.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var n,r,t,i;for(t=this.data,i=[],n=0,r=t.length;n<r;n++)o=t[n],i.push([o.label,o.x]);return i}.call(this),i.reverse(),s=[],f=0,l=i.length;f<l;f++)e=i[f],s.push(h(e[0],e[1]));return s},r.prototype.drawSeries=function(){var n,t,i,r,u,f;for(this.seriesPoints=[],n=t=r=this.options.ykeys.length-1;r<=0?t<=0:t>=0;n=r<=0?++t:--t)this._drawLineFor(n);for(f=[],n=i=u=this.options.ykeys.length-1;u<=0?i<=0:i>=0;n=u<=0?++i:--i)f.push(this._drawPointFor(n));return f},r.prototype._drawPointFor=function(n){var r,t,i,e,u,f;for(this.seriesPoints[n]=[],u=this.data,f=[],i=0,e=u.length;i<e;i++)t=u[i],r=null,t._y[n]!=null&&(r=this.drawLinePoint(t._x,t._y[n],this.options.pointSize,this.colorFor(t,n,"point"),n)),f.push(this.seriesPoints[n].push(r));return f},r.prototype._drawLineFor=function(n){var t;return t=this.paths[n],t!==null?this.drawLinePath(t,this.colorFor(null,n,"line")):void 0},r.createPath=function(t,i,r){var u,l,h,f,o,a,s,e,v,y,p,w,c,b;for(s="",i&&(h=n.Line.gradients(t)),e={y:null},f=c=0,b=t.length;c<b;f=++c)u=t[f],u.y!=null&&(e.y!=null?i?(l=h[f],a=h[f-1],o=(u.x-e.x)/4,v=e.x+o,p=Math.min(r,e.y+o*a),y=u.x-o,w=Math.min(r,u.y-o*l),s+="C"+v+","+p+","+y+","+w+","+u.x+","+u.y):s+="L"+u.x+","+u.y:i&&h[f]==null||(s+="M"+u.x+","+u.y)),e=u;return s},r.gradients=function(n){var f,e,i,r,u,o,s,t;for(e=function(n,t){return(n.y-t.y)/(n.x-t.x)},t=[],i=o=0,s=n.length;o<s;i=++o)f=n[i],f.y!=null?(r=n[i+1]||{y:null},u=n[i-1]||{y:null},u.y!=null&&r.y!=null?t.push(e(u,r)):u.y!=null?t.push(e(u,f)):r.y!=null?t.push(e(f,r)):t.push(null)):t.push(null);return t},r.prototype.hilight=function(n){var t,i,r,u,f;if(this.prevHilight!==null&&this.prevHilight!==n)for(t=i=0,u=this.seriesPoints.length-1;0<=u?i<=u:i>=u;t=0<=u?++i:--i)this.seriesPoints[t][this.prevHilight]&&this.seriesPoints[t][this.prevHilight].animate(this.pointShrink);if(n!==null&&this.prevHilight!==n)for(t=r=0,f=this.seriesPoints.length-1;0<=f?r<=f:r>=f;t=0<=f?++r:--r)this.seriesPoints[t][n]&&this.seriesPoints[t][n].animate(this.pointGrow);return this.prevHilight=n},r.prototype.colorFor=function(n,t,i){return typeof this.options.lineColors=="function"?this.options.lineColors.call(this,n,t,i):i==="point"?this.options.pointFillColors[t%this.options.pointFillColors.length]||this.options.lineColors[t%this.options.lineColors.length]:this.options.lineColors[t%this.options.lineColors.length]},r.prototype.drawXAxisLabel=function(n,t,i){return this.raphael.text(n,t,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},r.prototype.drawLinePath=function(n,t){return this.raphael.path(n).attr("stroke",t).attr("stroke-width",this.options.lineWidth)},r.prototype.drawLinePoint=function(n,t,i,r,u){return this.raphael.circle(n,t,i).attr("fill",r).attr("stroke-width",this.strokeWidthForSeries(u)).attr("stroke",this.strokeForSeries(u))},r.prototype.strokeWidthForSeries=function(n){return this.options.pointWidths[n%this.options.pointWidths.length]},r.prototype.strokeForSeries=function(n){return this.options.pointStrokeColors[n%this.options.pointStrokeColors.length]},r}(n.Grid),n.labelSeries=function(i,r,u,f,e){var s,y,p,w,c,l,o,a,h,b,v;if(p=200*(r-i)/u,y=new Date(i),o=n.LABEL_SPECS[f],o===void 0)for(v=n.AUTO_LABEL_ORDER,h=0,b=v.length;h<b;h++)if(w=v[h],l=n.LABEL_SPECS[w],p>=l.span){o=l;break}for(o===void 0&&(o=n.LABEL_SPECS.second),e&&(o=t.extend({},o,{fmt:e})),s=o.start(y),c=[];(a=s.getTime())<=r;)a>=i&&c.push([o.fmt(s),a]),o.incr(s);return c},r=function(t){return{span:t*6e4,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours())},fmt:function(t){return""+n.pad2(t.getHours())+":"+n.pad2(t.getMinutes())},incr:function(n){return n.setUTCMinutes(n.getUTCMinutes()+t)}}},u=function(t){return{span:t*1e3,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes())},fmt:function(t){return""+n.pad2(t.getHours())+":"+n.pad2(t.getMinutes())+":"+n.pad2(t.getSeconds())},incr:function(n){return n.setUTCSeconds(n.getUTCSeconds()+t)}}},n.LABEL_SPECS={decade:{span:1728e8,start:function(n){return new Date(n.getFullYear()-n.getFullYear()%10,0,1)},fmt:function(n){return""+n.getFullYear()},incr:function(n){return n.setFullYear(n.getFullYear()+10)}},year:{span:1728e7,start:function(n){return new Date(n.getFullYear(),0,1)},fmt:function(n){return""+n.getFullYear()},incr:function(n){return n.setFullYear(n.getFullYear()+1)}},month:{span:24192e5,start:function(n){return new Date(n.getFullYear(),n.getMonth(),1)},fmt:function(t){return""+t.getFullYear()+"-"+n.pad2(t.getMonth()+1)},incr:function(n){return n.setMonth(n.getMonth()+1)}},day:{span:864e5,start:function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate())},fmt:function(t){return""+t.getFullYear()+"-"+n.pad2(t.getMonth()+1)+"-"+n.pad2(t.getDate())},incr:function(n){return n.setDate(n.getDate()+1)}},hour:r(60),"30min":r(30),"15min":r(15),"10min":r(10),"5min":r(5),minute:r(1),"30sec":u(30),"15sec":u(15),"10sec":u(10),"5sec":u(5),second:u(1)},n.AUTO_LABEL_ORDER=["decade","year","month","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],n.Area=function(i){function r(i){var f;if(!(this instanceof n.Area))return new n.Area(i);f=t.extend({},u,i),this.cumulative=!f.behaveLikeLine,f.fillOpacity==="auto"&&(f.fillOpacity=f.behaveLikeLine?.8:1),r.__super__.constructor.call(this,f)}var u;return f(r,i),u={fillOpacity:"auto",behaveLikeLine:!1},r.prototype.calcPoints=function(){var n,i,r,t,e,u,f;for(u=this.data,f=[],t=0,e=u.length;t<e;t++)n=u[t],n._x=this.transX(n.x),i=0,n._y=function(){var t,e,f,u;for(f=n.y,u=[],t=0,e=f.length;t<e;t++)r=f[t],this.options.behaveLikeLine?u.push(this.transY(r)):(i+=r||0,u.push(this.transY(i)));return u}.call(this),f.push(n._ymax=Math.max.apply(Math,n._y));return f},r.prototype.drawSeries=function(){var n,t,s,h,i,o,c,r,u,f,e;for(this.seriesPoints=[],t=this.options.behaveLikeLine?function(){u=[];for(var n=0,t=this.options.ykeys.length-1;0<=t?n<=t:n>=t;0<=t?n++:n--)u.push(n);return u}.apply(this):function(){f=[];for(var n=r=this.options.ykeys.length-1;r<=0?n<=0:n>=0;r<=0?n++:n--)f.push(n);return f}.apply(this),e=[],i=0,o=t.length;i<o;i++)n=t[i],this._drawFillFor(n),this._drawLineFor(n),e.push(this._drawPointFor(n));return e},r.prototype._drawFillFor=function(n){var t;return t=this.paths[n],t!==null?(t+="L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(t,this.fillForSeries(n))):void 0},r.prototype.fillForSeries=function(n){var t;return t=Raphael.rgb2hsl(this.colorFor(this.data[n],n,"line")),Raphael.hsl(t.h,this.options.behaveLikeLine?t.s*.9:t.s*.75,Math.min(.98,this.options.behaveLikeLine?t.l*1.2:t.l*1.25))},r.prototype.drawFilledPath=function(n,t){return this.raphael.path(n).attr("fill",t).attr("fill-opacity",this.options.fillOpacity).attr("stroke-width",0)},r}(n.Line),n.Bar=function(r){function u(r){if(this.onHoverOut=i(this.onHoverOut,this),this.onHoverMove=i(this.onHoverMove,this),this.onGridClick=i(this.onGridClick,this),!(this instanceof n.Bar))return new n.Bar(r);u.__super__.constructor.call(this,t.extend({},r,{parseTime:!1}))}return f(u,r),u.prototype.init=function(){return this.cumulative=this.options.stacked,this.options.hideHover!=="always"?(this.hover=new n.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)):void 0},u.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],xLabelMargin:50},u.prototype.calc=function(){var n;return this.calcBars(),this.options.hideHover===!1?(n=this.hover).update.apply(n,this.hoverContentForRow(this.data.length-1)):void 0},u.prototype.calcBars=function(){var n,t,i,r,e,u,f;for(u=this.data,f=[],n=r=0,e=u.length;r<e;n=++r)t=u[n],t._x=this.left+this.width*(n+.5)/this.data.length,f.push(t._y=function(){var n,f,u,r;for(u=t.y,r=[],n=0,f=u.length;n<f;n++)i=u[n],i!=null?r.push(this.transY(i)):r.push(null);return r}.call(this));return f},u.prototype.draw=function(){return this.options.axes&&this.drawXAxis(),this.drawSeries()},u.prototype.drawXAxis=function(){var o,t,n,h,c,u,f,s,l,a,i,r,e;for(a=this.bottom+this.options.padding/2,f=null,u=null,e=[],o=i=0,r=this.data.length;0<=r?i<r:i>r;o=0<=r?++i:--i)s=this.data[this.data.length-1-o],t=this.drawXAxisLabel(s._x,a,s.label),l=t.getBBox(),t.transform("r"+-this.options.xLabelAngle),n=t.getBBox(),t.transform("t0,"+n.height/2+"..."),this.options.xLabelAngle!==0&&(c=-.5*l.width*Math.cos(this.options.xLabelAngle*Math.PI/180),t.transform("t"+c+",0...")),(f==null||f>=n.x+n.width||u!=null&&u>=n.x)&&n.x>=0&&n.x+n.width<this.el.width()?(this.options.xLabelAngle!==0&&(h=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),u=n.x-h),e.push(f=n.x-this.options.xLabelMargin)):e.push(t.remove());return e},u.prototype.drawSeries=function(){var e,o,r,u,s,h,v,c,l,n,a,t,i,f;return r=this.width/this.options.data.length,c=this.options.stacked!=null?1:this.options.ykeys.length,e=(r*this.options.barSizeRatio-this.options.barGap*(c-1))/c,v=r*(1-this.options.barSizeRatio)/2,f=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var c,w,y,p;for(y=this.data,p=[],u=c=0,w=y.length;c<w;u=++c)l=y[u],s=0,p.push(function(){var y,w,p,c;for(p=l._y,c=[],n=y=0,w=p.length;y<w;n=++y)i=p[n],i!==null?(f?(t=Math.min(i,f),o=Math.max(i,f)):(t=i,o=this.bottom),h=this.left+u*r+v,this.options.stacked||(h+=n*(e+this.options.barGap)),a=o-t,this.options.stacked&&(t-=s),this.drawBar(h,t,e,a,this.colorFor(l,n,"bar")),c.push(s+=a)):c.push(null);return c}.call(this));return p}.call(this)},u.prototype.colorFor=function(n,t,i){var r,u;return typeof this.options.barColors=="function"?(r={x:n.x,y:n.y[t],label:n.label},u={index:t,key:this.options.ykeys[t],label:this.options.labels[t]},this.options.barColors.call(this,r,u,i)):this.options.barColors[t%this.options.barColors.length]},u.prototype.hitTest=function(n){return this.data.length===0?null:(n=Math.max(Math.min(n,this.right),this.left),Math.min(this.data.length-1,Math.floor((n-this.left)/(this.width/this.data.length))))},u.prototype.onGridClick=function(n,t){var i;return i=this.hitTest(n,t),this.fire("click",i,this.options.data[i],n,t)},u.prototype.onHoverMove=function(n,t){var i,r;return i=this.hitTest(n,t),(r=this.hover).update.apply(r,this.hoverContentForRow(i))},u.prototype.onHoverOut=function(){if(this.options.hideHover!==!1)return this.hover.hide()},u.prototype.hoverContentForRow=function(n){var t,i,r,e,o,u,s,f;for(r=this.data[n],t="<div class='morris-hover-row-label'>"+r.label+"<\/div>",f=r.y,i=u=0,s=f.length;u<s;i=++u)o=f[i],t+="<div class='morris-hover-point' style='color: "+this.colorFor(r,i,"label")+"'>\n  "+this.options.labels[i]+":\n  "+this.yLabelFormat(o)+"\n<\/div>";return typeof this.options.hoverCallback=="function"&&(t=this.options.hoverCallback(n,this.options,t)),e=this.left+(n+.5)*this.width/this.data.length,[t,e]},u.prototype.drawXAxisLabel=function(n,t,i){var r;return r=this.raphael.text(n,t,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},u.prototype.drawBar=function(n,t,i,r,u){return this.raphael.rect(n,t,i,r).attr("fill",u).attr("stroke-width",0)},u}(n.Grid),n.Donut=function(r){function u(r){this.select=i(this.select,this),this.click=i(this.click,this);var u;if(!(this instanceof n.Donut))return new n.Donut(r);if(this.el=typeof r.element=="string"?t(document.getElementById(r.element)):t(r.element),this.options=t.extend({},this.defaults,r),this.el===null||this.el.length===0)throw new Error("Graph placeholder not found.");r.data!==void 0&&r.data.length!==0&&(this.data=r.data,this.values=function(){var n,r,t,i;for(t=this.data,i=[],n=0,r=t.length;n<r;n++)u=t[n],i.push(parseFloat(u.value));return i}.call(this),this.redraw())}return f(u,r),u.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:n.commas},u.prototype.redraw=function(){var d,r,u,c,i,e,g,l,a,f,v,t,o,s,y,h,nt,tt,it,p,w,b,k;for(this.el.empty(),this.raphael=new Raphael(this.el[0]),r=this.el.width()/2,u=this.el.height()/2,o=(Math.min(r,u)-10)/3,v=0,p=this.values,s=0,nt=p.length;s<nt;s++)t=p[s],v+=t;for(l=5/(2*o),d=1.9999*Math.PI-l*this.data.length,e=0,i=0,this.segments=[],w=this.values,c=y=0,tt=w.length;y<tt;c=++y)t=w[c],a=e+l+d*(t/v),f=new n.DonutSegment(r,u,o*2,o,e,a,this.options.colors[i%this.options.colors.length],this.options.backgroundColor,i,this.raphael),f.render(),this.segments.push(f),f.on("hover",this.select),f.on("click",this.click),e=a,i+=1;for(this.text1=this.drawEmptyDonutLabel(r,u-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(r,u+10,this.options.labelColor,14),g=Math.max.apply(null,function(){var n,u,i,r;for(i=this.values,r=[],n=0,u=i.length;n<u;n++)t=i[n],r.push(t);return r}.call(this)),i=0,b=this.values,k=[],h=0,it=b.length;h<it;h++){if(t=b[h],t===g){this.select(i);break}k.push(i+=1)}return k},u.prototype.click=function(n){return this.fire("click",n,this.data[n])},u.prototype.select=function(n){var t,u,f,i,e,r;for(r=this.segments,i=0,e=r.length;i<e;i++)u=r[i],u.deselect();return f=this.segments[n],f.select(),t=this.data[n],this.setLabels(t.label,this.options.formatter(t.value,t))},u.prototype.setLabels=function(n,t){var u,s,h,f,i,e,r,o;return u=(Math.min(this.el.width()/2,this.el.height()/2)-10)*2/3,f=1.8*u,h=u/2,s=u/3,this.text1.attr({text:n,transform:""}),i=this.text1.getBBox(),e=Math.min(f/i.width,h/i.height),this.text1.attr({transform:"S"+e+","+e+","+(i.x+i.width/2)+","+(i.y+i.height)}),this.text2.attr({text:t,transform:""}),r=this.text2.getBBox(),o=Math.min(f/r.width,s/r.height),this.text2.attr({transform:"S"+o+","+o+","+(r.x+r.width/2)+","+r.y})},u.prototype.drawEmptyDonutLabel=function(n,t,i,r,u){var f;return f=this.raphael.text(n,t,"").attr("font-size",r).attr("fill",i),u!=null&&f.attr("font-weight",u),f},u}(n.EventEmitter),n.DonutSegment=function(n){function t(n,t,r,u,f,e,o,s,h,c){this.cx=n,this.cy=t,this.inner=r,this.outer=u,this.color=o,this.backgroundColor=s,this.index=h,this.raphael=c,this.deselect=i(this.deselect,this),this.select=i(this.select,this),this.sin_p0=Math.sin(f),this.cos_p0=Math.cos(f),this.sin_p1=Math.sin(e),this.cos_p1=Math.cos(e),this.is_long=e-f>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return f(t,n),t.prototype.calcArcPoints=function(n){return[this.cx+n*this.sin_p0,this.cy+n*this.cos_p0,this.cx+n*this.sin_p1,this.cy+n*this.cos_p1]},t.prototype.calcSegment=function(n,t){var u,f,e,o,s,h,c,l,i,r;return i=this.calcArcPoints(n),u=i[0],e=i[1],f=i[2],o=i[3],r=this.calcArcPoints(t),s=r[0],c=r[1],h=r[2],l=r[3],"M"+u+","+e+("A"+n+","+n+",0,"+this.is_long+",0,"+f+","+o)+("L"+h+","+l)+("A"+t+","+t+",0,"+this.is_long+",1,"+s+","+c)+"Z"},t.prototype.calcArc=function(n){var i,r,u,f,t;return t=this.calcArcPoints(n),i=t[0],u=t[1],r=t[2],f=t[3],"M"+i+","+u+("A"+n+","+n+",0,"+this.is_long+",0,"+r+","+f)},t.prototype.render=function(){var n=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return n.fire("hover",n.index)},function(){return n.fire("click",n.index)})},t.prototype.drawDonutArc=function(n,t){return this.raphael.path(n).attr({stroke:t,"stroke-width":2,opacity:0})},t.prototype.drawDonutSegment=function(n,t,i,r,u){return this.raphael.path(n).attr({fill:t,stroke:i,"stroke-width":3}).hover(r).click(u)},t.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},t.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},t}(n.EventEmitter)}.call(this),!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function i(){return kf.apply(null,arguments)}function we(n){kf=n}function ui(n){return"[object Array]"===Object.prototype.toString.call(n)}function fi(n){return n instanceof Date||"[object Date]"===Object.prototype.toString.call(n)}function be(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function ft(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function ei(n,t){for(var i in t)ft(t,i)&&(n[i]=t[i]);return ft(t,"toString")&&(n.toString=t.toString),ft(t,"valueOf")&&(n.valueOf=t.valueOf),n}function kt(n,t,i,r){return gu(n,t,i,r,!0).utc()}function ke(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(n){return null==n._pf&&(n._pf=ke()),n._pf}function iu(n){if(null==n._isValid){var t=e(n);n._isValid=!(isNaN(n._d.getTime())||!(t.overflow<0)||t.empty||t.invalidMonth||t.invalidWeekday||t.nullInput||t.invalidFormat||t.userInvalidated),n._strict&&(n._isValid=n._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return n._isValid}function ru(n){var t=kt(NaN);return null!=n?ei(e(t),n):e(t).userInvalidated=!0,t}function ki(n,t){var u,i,r;if("undefined"!=typeof t._isAMomentObject&&(n._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(n._i=t._i),"undefined"!=typeof t._f&&(n._f=t._f),"undefined"!=typeof t._l&&(n._l=t._l),"undefined"!=typeof t._strict&&(n._strict=t._strict),"undefined"!=typeof t._tzm&&(n._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(n._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(n._offset=t._offset),"undefined"!=typeof t._pf&&(n._pf=e(t)),"undefined"!=typeof t._locale&&(n._locale=t._locale),cr.length>0)for(u in cr)i=cr[u],r=t[i],"undefined"!=typeof r&&(n[i]=r);return n}function dt(n){ki(this,n),this._d=new Date(null!=n._d?n._d.getTime():NaN),lr===!1&&(lr=!0,i.updateOffset(this),lr=!1)}function nt(n){return n instanceof dt||null!=n&&null!=n._isAMomentObject}function v(n){return 0>n?Math.ceil(n):Math.floor(n)}function s(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=v(t)),i}function uu(n,t,i){for(var f=Math.min(n.length,t.length),e=Math.abs(n.length-t.length),u=0,r=0;f>r;r++)(i&&n[r]!==t[r]||!i&&s(n[r])!==s(t[r]))&&u++;return u+e}function fu(){}function eu(n){return n?n.toLowerCase().replace("_","-"):n}function de(n){for(var i,t,f,r,u=0;u<n.length;){for(r=eu(n[u]).split("-"),i=r.length,t=eu(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=ou(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&uu(r,t,!0)>=i-1)break;i--}u++}return null}function ou(n){var t=null;if(!ct[n]&&"undefined"!=typeof module&&module&&module.exports)try{t=li._abbr,require("./locale/"+n),gt(t)}catch(i){}return ct[n]}function gt(n,t){var i;return n&&(i="undefined"==typeof t?et(n):su(n,t),i&&(li=i)),li._abbr}function su(n,t){return null!==t?(t.abbr=n,ct[n]=ct[n]||new fu,ct[n].set(t),gt(n),ct[n]):(delete ct[n],null)}function et(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return li;if(!ui(n)){if(t=ou(n))return t;n=[n]}return de(n)}function l(n,t){var i=n.toLowerCase();ii[i]=ii[i+"s"]=ii[t]=n}function p(n){if("string"==typeof n)return ii[n]||ii[n.toLowerCase()]}function hu(n){var i,t,r={};for(t in n)ft(n,t)&&(i=p(t),i&&(r[i]=n[t]));return r}function yt(n,t){return function(r){return null!=r?(cu(this,n,r),i.updateOffset(this,t),this):oi(this,n)}}function oi(n,t){return n._d["get"+(n._isUTC?"UTC":"")+t]()}function cu(n,t,i){return n._d["set"+(n._isUTC?"UTC":"")+t](i)}function lu(n,t){var i;if("object"==typeof n)for(i in n)this.set(i,n[i]);else if(n=p(n),"function"==typeof this[n])return this[n](t);return this}function di(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function r(n,t,i,r){var u=r;"string"==typeof r&&(u=function(){return this[r]()}),n&&(wt[n]=u),t&&(wt[t[0]]=function(){return di(u.apply(this,arguments),t[1],t[2])}),i&&(wt[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function ge(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function no(n){for(var i=n.match(df),t=0,r=i.length;r>t;t++)i[t]=wt[i[t]]?wt[i[t]]:ge(i[t]);return function(u){var f="";for(t=0;r>t;t++)f+=i[t]instanceof Function?i[t].call(u,n):i[t];return f}}function gi(n,t){return n.isValid()?(t=au(t,n.localeData()),ar[t]=ar[t]||no(t),ar[t](n)):n.localeData().invalidDate()}function au(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(ai.lastIndex=0;i>=0&&ai.test(n);)n=n.replace(ai,r),ai.lastIndex=0,i-=1;return n}function to(n){return"function"==typeof n&&"[object Function]"===Object.prototype.toString.call(n)}function t(n,t,i){pr[n]=to(t)?t:function(n){return n&&i?i:t}}function io(n,t){return ft(pr,n)?pr[n](t._strict,t._locale):new RegExp(ro(n))}function ro(n){return n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function c(n,t){var i,r=t;for("string"==typeof n&&(n=[n]),"number"==typeof t&&(r=function(n,i){i[t]=s(n)}),i=0;i<n.length;i++)wr[n[i]]=r}function ni(n,t){c(n,function(n,i,r,u){r._w=r._w||{},t(n,r._w,r,u)})}function uo(n,t,i){null!=t&&ft(wr,n)&&wr[n](t,i._a,i,n)}function nr(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function fo(n){return this._months[n.month()]}function eo(n){return this._monthsShort[n.month()]}function oo(n,t,i){var r,u,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++)if((u=kt([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[r].test(n))||i&&"MMM"===t&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function vu(n,t){var i;return"string"==typeof t&&(t=n.localeData().monthsParse(t),"number"!=typeof t)?n:(i=Math.min(n.date(),nr(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n)}function yu(n){return null!=n?(vu(this,n),i.updateOffset(this,!0),this):oi(this,"Month")}function so(){return nr(this.year(),this.month())}function tr(n){var i,t=n._a;return t&&-2===e(n).overflow&&(i=t[d]<0||t[d]>11?d:t[k]<1||t[k]>nr(t[b],t[d])?k:t[a]<0||t[a]>24||24===t[a]&&(0!==t[lt]||0!==t[at]||0!==t[vt])?a:t[lt]<0||t[lt]>59?lt:t[at]<0||t[at]>59?at:t[vt]<0||t[vt]>999?vt:-1,e(n)._overflowDayOfYear&&(b>i||i>k)&&(i=k),e(n).overflow=i),n}function pu(n){i.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function w(n,t){var i=!0;return ei(function(){return i&&(pu(n+"\n"+(new Error).stack),i=!1),t.apply(this,arguments)},t)}function ho(n,t){te[n]||(pu(t),te[n]=!0)}function wu(n){var t,i,r=n._i,u=sa.exec(r);if(u){for(e(n).iso=!0,t=0,i=br.length;i>t;t++)if(br[t][1].exec(r)){n._f=br[t][0];break}for(t=0,i=kr.length;i>t;t++)if(kr[t][1].exec(r)){n._f+=(u[6]||" ")+kr[t][0];break}r.match(bi)&&(n._f+="Z"),ur(n)}else n._isValid=!1}function co(n){var t=ha.exec(n._i);return null!==t?void(n._d=new Date(+t[1])):(wu(n),void(n._isValid===!1&&(delete n._isValid,i.createFromInputFallback(n))))}function lo(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 1970>n&&o.setFullYear(n),o}function ir(n){var t=new Date(Date.UTC.apply(null,arguments));return 1970>n&&t.setUTCFullYear(n),t}function bu(n){return ku(n)?366:365}function ku(n){return n%4==0&&n%100!=0||n%400==0}function ao(){return ku(this.year())}function ot(n,t,i){var u,f=i-t,r=i-n.day();return r>f&&(r-=7),f-7>r&&(r+=7),u=o(n).add(r,"d"),{week:Math.ceil(u.dayOfYear()/7),year:u.year()}}function vo(n){return ot(n,this._week.dow,this._week.doy).week}function yo(){return this._week.dow}function po(){return this._week.doy}function wo(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")}function bo(n){var t=ot(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")}function ko(n,t,i,r,u){var f,o=6+u-r,s=ir(n,0,1+o),e=s.getUTCDay();return u>e&&(e+=7),i=null!=i?1*i:u,f=1+o+7*(t-1)-e+i,{year:f>0?n:n-1,dayOfYear:f>0?f:bu(n-1)+f}}function go(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==n?t:this.add(n-t,"d")}function pt(n,t,i){return null!=n?n:null!=t?t:i}function ns(n){var t=new Date;return n._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function rr(n){var t,i,r,u,f=[];if(!n._d){for(r=ns(n),n._w&&null==n._a[k]&&null==n._a[d]&&ts(n),n._dayOfYear&&(u=pt(n._a[b],r[b]),n._dayOfYear>bu(u)&&(e(n)._overflowDayOfYear=!0),i=ir(u,0,n._dayOfYear),n._a[d]=i.getUTCMonth(),n._a[k]=i.getUTCDate()),t=0;3>t&&null==n._a[t];++t)n._a[t]=f[t]=r[t];for(;7>t;t++)n._a[t]=f[t]=null==n._a[t]?2===t?1:0:n._a[t];24===n._a[a]&&0===n._a[lt]&&0===n._a[at]&&0===n._a[vt]&&(n._nextDay=!0,n._a[a]=0),n._d=(n._useUTC?ir:lo).apply(null,f),null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),n._nextDay&&(n._a[a]=24)}}function ts(n){var t,e,u,r,i,f,s;t=n._w,null!=t.GG||null!=t.W||null!=t.E?(i=1,f=4,e=pt(t.GG,n._a[b],ot(o(),1,4).year),u=pt(t.W,1),r=pt(t.E,1)):(i=n._locale._week.dow,f=n._locale._week.doy,e=pt(t.gg,n._a[b],ot(o(),i,f).year),u=pt(t.w,1),null!=t.d?(r=t.d,i>r&&++u):r=null!=t.e?t.e+i:i),s=ko(e,u,r,f,i),n._a[b]=s.year,n._dayOfYear=s.dayOfYear}function ur(n){if(n._f===i.ISO_8601)return void wu(n);n._a=[],e(n).empty=!0;for(var t,u,o,r=""+n._i,c=r.length,h=0,s=au(n._f,n._locale).match(df)||[],f=0;f<s.length;f++)u=s[f],t=(r.match(io(u,n))||[])[0],t&&(o=r.substr(0,r.indexOf(t)),o.length>0&&e(n).unusedInput.push(o),r=r.slice(r.indexOf(t)+t.length),h+=t.length),wt[u]?(t?e(n).empty=!1:e(n).unusedTokens.push(u),uo(u,t,n)):n._strict&&!t&&e(n).unusedTokens.push(u);e(n).charsLeftOver=c-h,r.length>0&&e(n).unusedInput.push(r),e(n).bigHour===!0&&n._a[a]<=12&&n._a[a]>0&&(e(n).bigHour=void 0),n._a[a]=is(n._locale,n._a[a],n._meridiem),rr(n),tr(n)}function is(n,t,i){var r;return null==i?t:null!=n.meridiemHour?n.meridiemHour(t,i):null!=n.isPM?(r=n.isPM(i),r&&12>t&&(t+=12),r||12!==t||(t=0),t):t}function rs(n){var t,f,u,r,i;if(0===n._f.length)return e(n).invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=ki({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._f=n._f[r],ur(t),iu(t)&&(i+=e(t).charsLeftOver,i+=10*e(t).unusedTokens.length,e(t).score=i,(null==u||u>i)&&(u=i,f=t));ei(n,f||t)}function us(n){if(!n._d){var t=hu(n._i);n._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],rr(n)}}function fs(n){var t=new dt(tr(du(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function du(n){var t=n._i,i=n._f;return n._locale=n._locale||et(n._l),null===t||void 0===i&&""===t?ru({nullInput:!0}):("string"==typeof t&&(n._i=t=n._locale.preparse(t)),nt(t)?new dt(tr(t)):(ui(i)?rs(n):i?ur(n):fi(t)?n._d=t:es(n),n))}function es(n){var t=n._i;void 0===t?n._d=new Date:fi(t)?n._d=new Date(+t):"string"==typeof t?co(n):ui(t)?(n._a=be(t.slice(0),function(n){return parseInt(n,10)}),rr(n)):"object"==typeof t?us(n):"number"==typeof t?n._d=new Date(t):i.createFromInputFallback(n)}function gu(n,t,i,r,u){var f={};return"boolean"==typeof i&&(r=i,i=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,fs(f)}function o(n,t,i,r){return gu(n,t,i,r,!1)}function nf(n,t){var r,i;if(1===t.length&&ui(t[0])&&(t=t[0]),!t.length)return o();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][n](r))&&(r=t[i]);return r}function os(){var n=[].slice.call(arguments,0);return nf("isBefore",n)}function ss(){var n=[].slice.call(arguments,0);return nf("isAfter",n)}function si(n){var t=hu(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*h+6e4*s+36e5*o,this._days=+e+7*f,this._months=+u+3*r+12*i,this._data={},this._locale=et(),this._bubble()}function fr(n){return n instanceof si}function tf(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return 0>n&&(n=-n,i="-"),i+di(~~(n/60),2)+t+di(~~n%60,2)})}function er(n){var i=(n||"").match(bi)||[],u=i[i.length-1]||[],t=(u+"").match(fe)||["-",0,0],r=+(60*t[1])+s(t[2]);return"+"===t[0]?r:-r}function or(n,t){var r,u;return t._isUTC?(r=t.clone(),u=(nt(n)||fi(n)?+n:+o(n))-+r,r._d.setTime(+r._d+u),i.updateOffset(r,!1),r):o(n).local()}function sr(n){return 15*-Math.round(n._d.getTimezoneOffset()/15)}function hs(n,t){var r,u=this._offset||0;return null!=n?("string"==typeof n&&(n=er(n)),Math.abs(n)<16&&(n=60*n),!this._isUTC&&t&&(r=sr(this)),this._offset=n,this._isUTC=!0,null!=r&&this.add(r,"m"),u!==n&&(!t||this._changeInProgress?ef(this,tt(n-u,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?u:sr(this)}function cs(n,t){return null!=n?("string"!=typeof n&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function ls(n){return this.utcOffset(0,n)}function as(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(sr(this),"m")),this}function vs(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(er(this._i)),this}function ys(n){return n=n?o(n).utcOffset():0,(this.utcOffset()-n)%60==0}function ps(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ws(){var n,t;return"undefined"!=typeof this._isDSTShifted?this._isDSTShifted:(n={},(ki(n,this),n=du(n),n._a)?(t=n._isUTC?kt(n._a):o(n._a),this._isDSTShifted=this.isValid()&&uu(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted)}function bs(){return!this._isUTC}function ks(){return this._isUTC}function rf(){return this._isUTC&&0===this._offset}function tt(n,t){var u,f,e,i=n,r=null;return fr(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(i={},t?i[t]=n:i.milliseconds=n):(r=ee.exec(n))?(u="-"===r[1]?-1:1,i={y:0,d:s(r[k])*u,h:s(r[a])*u,m:s(r[lt])*u,s:s(r[at])*u,ms:s(r[vt])*u}):(r=oe.exec(n))?(u="-"===r[1]?-1:1,i={y:st(r[2],u),M:st(r[3],u),d:st(r[4],u),h:st(r[5],u),m:st(r[6],u),s:st(r[7],u),w:st(r[8],u)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(e=ds(o(i.from),o(i.to)),i={},i.ms=e.milliseconds,i.M=e.months),f=new si(i),fr(n)&&ft(n,"_locale")&&(f._locale=n._locale),f}function st(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function uf(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function ds(n,t){var i;return t=or(t,n),n.isBefore(t)?i=uf(n,t):(i=uf(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function ff(n,t){return function(i,r){var u,f;return null===r||isNaN(+r)||(ho(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),f=i,i=r,r=f),i="string"==typeof i?+i:i,u=tt(i,r),ef(this,u,n),this}}function ef(n,t,r,u){var o=t._milliseconds,f=t._days,e=t._months;u=null==u?!0:u,o&&n._d.setTime(+n._d+o*r),f&&cu(n,"Date",oi(n,"Date")+f*r),e&&vu(n,oi(n,"Month")+e*r),u&&i.updateOffset(n,f||e)}function gs(n,t){var r=n||o(),f=or(r,this).startOf("day"),i=this.diff(f,"days",!0),u=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(t&&t[u]||this.localeData().calendar(u,this,o(r)))}function nh(){return new dt(this)}function th(n,t){var i;return t=p("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(n=nt(n)?n:o(n),+this>+n):(i=nt(n)?+n:+o(n),i<+this.clone().startOf(t))}function ih(n,t){var i;return t=p("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(n=nt(n)?n:o(n),+n>+this):(i=nt(n)?+n:+o(n),+this.clone().endOf(t)<i)}function rh(n,t,i){return this.isAfter(n,i)&&this.isBefore(t,i)}function uh(n,t){var i;return t=p(t||"millisecond"),"millisecond"===t?(n=nt(n)?n:o(n),+this==+n):(i=+o(n),+this.clone().startOf(t)<=i&&i<=+this.clone().endOf(t))}function fh(n,t,i){var r,u,f=or(n,this),e=6e4*(f.utcOffset()-this.utcOffset());return t=p(t),"year"===t||"month"===t||"quarter"===t?(u=eh(this,f),"quarter"===t?u/=3:"year"===t&&(u/=12)):(r=this-f,u="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-e)/864e5:"week"===t?(r-e)/6048e5:r),i?u:v(u)}function eh(n,t){var r,f,u=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(u,"months");return 0>t-i?(r=n.clone().add(u-1,"months"),f=(t-i)/(i-r)):(r=n.clone().add(u+1,"months"),f=(t-i)/(r-i)),-(u+f)}function oh(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function of(){var n=this.clone().utc();return 0<n.year()&&n.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():gi(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):gi(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function sh(n){var t=gi(this,n||i.defaultFormat);return this.localeData().postformat(t)}function hh(n,t){return this.isValid()?tt({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ch(n){return this.from(o(),n)}function lh(n,t){return this.isValid()?tt({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ah(n){return this.to(o(),n)}function sf(n){var t;return void 0===n?this._locale._abbr:(t=et(n),null!=t&&(this._locale=t),this)}function hf(){return this._locale}function vh(n){switch(n=p(n)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n&&this.weekday(0),"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this}function yh(n){return n=p(n),void 0===n||"millisecond"===n?this:this.startOf(n).add(1,"isoWeek"===n?"week":n).subtract(1,"ms")}function ph(){return+this._d-6e4*(this._offset||0)}function wh(){return Math.floor(+this/1e3)}function bh(){return this._offset?new Date(+this):this._d}function kh(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function dh(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function gh(){return iu(this)}function nc(){return ei({},e(this))}function tc(){return e(this).overflow}function hi(n,t){r(0,[n,n.length],0,t)}function cf(n,t,i){return ot(o([n,11,31+t-i]),t,i).week}function ic(n){var t=ot(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==n?t:this.add(n-t,"y")}function rc(n){var t=ot(this,1,4).year;return null==n?t:this.add(n-t,"y")}function uc(){return cf(this.year(),1,4)}function fc(){var n=this.localeData()._week;return cf(this.year(),n.dow,n.doy)}function ec(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)}function oc(n,t){return"string"!=typeof n?n:isNaN(n)?(n=t.weekdaysParse(n),"number"==typeof n?n:null):parseInt(n,10)}function sc(n){return this._weekdays[n.day()]}function hc(n){return this._weekdaysShort[n.day()]}function cc(n){return this._weekdaysMin[n.day()]}function lc(n){var t,i,r;for(this._weekdaysParse=this._weekdaysParse||[],t=0;7>t;t++)if(this._weekdaysParse[t]||(i=o([2e3,1]).day(t),r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[t].test(n))return t}function ac(n){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=oc(n,this.localeData()),this.add(n-t,"d")):t}function vc(n){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")}function yc(n){return null==n?this.day()||7:this.day(this.day()%7?n:n-7)}function lf(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function af(n,t){return t._meridiemParse}function pc(n){return"p"===(n+"").toLowerCase().charAt(0)}function wc(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function bc(n,t){t[vt]=s(1e3*("0."+n))}function kc(){return this._isUTC?"UTC":""}function dc(){return this._isUTC?"Coordinated Universal Time":""}function gc(n){return o(1e3*n)}function nl(){return o.apply(null,arguments).parseZone()}function tl(n,t,i){var r=this._calendar[n];return"function"==typeof r?r.call(t,i):r}function il(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n])}function rl(){return this._invalidDate}function ul(n){return this._ordinal.replace("%d",n)}function vf(n){return n}function fl(n,t,i,r){var u=this._relativeTime[i];return"function"==typeof u?u(n,t,i,r):u.replace(/%d/i,n)}function el(n,t){var i=this._relativeTime[n>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)}function ol(n){var t,i;for(i in n)t=n[i],"function"==typeof t?this[i]=t:this["_"+i]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function yf(n,t,i,r){var u=et(),f=kt().set(r,t);return u[i](f,n)}function ti(n,t,i,r,u){if("number"==typeof n&&(t=n,n=void 0),n=n||"",null!=t)return yf(n,t,i,u);for(var e=[],f=0;r>f;f++)e[f]=yf(n,f,i,u);return e}function sl(n,t){return ti(n,t,"months",12,"month")}function hl(n,t){return ti(n,t,"monthsShort",12,"month")}function cl(n,t){return ti(n,t,"weekdays",7,"day")}function ll(n,t){return ti(n,t,"weekdaysShort",7,"day")}function al(n,t){return ti(n,t,"weekdaysMin",7,"day")}function vl(){var n=this._data;return this._milliseconds=g(this._milliseconds),this._days=g(this._days),this._months=g(this._months),n.milliseconds=g(n.milliseconds),n.seconds=g(n.seconds),n.minutes=g(n.minutes),n.hours=g(n.hours),n.months=g(n.months),n.years=g(n.years),this}function pf(n,t,i,r){var u=tt(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function yl(n,t){return pf(this,n,t,1)}function pl(n,t){return pf(this,n,t,-1)}function wf(n){return 0>n?Math.floor(n):Math.ceil(n)}function wl(){var u,f,e,s,o,r=this._milliseconds,n=this._days,t=this._months,i=this._data;return r>=0&&n>=0&&t>=0||0>=r&&0>=n&&0>=t||(r+=864e5*wf(hr(t)+n),n=0,t=0),i.milliseconds=r%1e3,u=v(r/1e3),i.seconds=u%60,f=v(u/60),i.minutes=f%60,e=v(f/60),i.hours=e%24,n+=v(e/24),o=v(bf(n)),t+=o,n-=wf(hr(o)),s=v(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function bf(n){return 4800*n/146097}function hr(n){return 146097*n/4800}function bl(n){var t,r,i=this._milliseconds;if(n=p(n),"month"===n||"year"===n)return t=this._days+i/864e5,r=this._months+bf(t),"month"===n?r:r/12;switch(t=this._days+Math.round(hr(this._months)),n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+n);}}function kl(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)}function it(n){return function(){return this.as(n)}}function dl(n){return n=p(n),this[n+"s"]()}function ht(n){return function(){return this._data[n]}}function gl(){return v(this.days()/7)}function na(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function ta(n,t,i){var r=tt(n).abs(),h=bt(r.as("s")),f=bt(r.as("m")),e=bt(r.as("h")),o=bt(r.as("d")),s=bt(r.as("M")),c=bt(r.as("y")),u=h<ut.s&&["s",h]||1===f&&["m"]||f<ut.m&&["mm",f]||1===e&&["h"]||e<ut.h&&["hh",e]||1===o&&["d"]||o<ut.d&&["dd",o]||1===s&&["M"]||s<ut.M&&["MM",s]||1===c&&["y"]||["yy",c];return u[2]=t,u[3]=+n>0,u[4]=i,na.apply(null,u)}function ia(n,t){return void 0===ut[n]?!1:void 0===t?ut[n]:(ut[n]=t,!0)}function ra(n){var t=this.localeData(),i=ta(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function ci(){var n,e,o,t=tu(this._milliseconds)/1e3,a=tu(this._days),i=tu(this._months);n=v(t/60),e=v(n/60),t%=60,n%=60,o=v(i/12),i%=12;var s=o,h=i,c=a,r=e,u=n,f=t,l=this.asSeconds();return l?(0>l?"-":"")+"P"+(s?s+"Y":"")+(h?h+"M":"")+(c?c+"D":"")+(r||u||f?"T":"")+(r?r+"H":"")+(u?u+"M":"")+(f?f+"S":""):"P0D"}var kf,li,cr=i.momentProperties=[],lr=!1,ct={},ii={},df=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ai=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ar={},wt={},gf=/\d/,y=/\d\d/,ne=/\d{3}/,vr=/\d{4}/,vi=/[+-]?\d{6}/,h=/\d\d?/,yi=/\d{1,3}/,yr=/\d{1,4}/,pi=/[+-]?\d{1,6}/,ua=/\d+/,wi=/[+-]?\d+/,bi=/Z|[+-]\d\d:?\d\d/gi,fa=/[+-]?\d+(\.\d{1,3})?/,ri=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,pr={},wr={},b=0,d=1,k=2,a=3,lt=4,at=5,vt=6,dr,ie,re,ue,fe,ee,oe,se,he,gr,nu,ce,le,ae,ve,rt,ye,n,pe;r("M",["MM",2],"Mo",function(){return this.month()+1}),r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),r("MMMM",0,0,function(n){return this.localeData().months(this,n)}),l("month","M"),t("M",h),t("MM",h,y),t("MMM",ri),t("MMMM",ri),c(["M","MM"],function(n,t){t[d]=s(n)-1}),c(["MMM","MMMM"],function(n,t,i,r){var u=i._locale.monthsParse(n,r,i._strict);null!=u?t[d]=u:e(i).invalidMonth=n});var ea="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),oa="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),te={};i.suppressDeprecationWarnings=!1;var sa=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,br=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],kr=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ha=/^\/?Date\((\-?\d+)/i;i.createFromInputFallback=w("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))}),r(0,["YY",2],0,function(){return this.year()%100}),r(0,["YYYY",4],0,"year"),r(0,["YYYYY",5],0,"year"),r(0,["YYYYYY",6,!0],0,"year"),l("year","y"),t("Y",wi),t("YY",h,y),t("YYYY",yr,vr),t("YYYYY",pi,vi),t("YYYYYY",pi,vi),c(["YYYYY","YYYYYY"],b),c("YYYY",function(n,t){t[b]=2===n.length?i.parseTwoDigitYear(n):s(n)}),c("YY",function(n,t){t[b]=i.parseTwoDigitYear(n)}),i.parseTwoDigitYear=function(n){return s(n)+(s(n)>68?1900:2e3)},dr=yt("FullYear",!1),r("w",["ww",2],"wo","week"),r("W",["WW",2],"Wo","isoWeek"),l("week","w"),l("isoWeek","W"),t("w",h),t("ww",h,y),t("W",h),t("WW",h,y),ni(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=s(n)}),ie={dow:0,doy:6},r("DDD",["DDDD",3],"DDDo","dayOfYear"),l("dayOfYear","DDD"),t("DDD",yi),t("DDDD",ne),c(["DDD","DDDD"],function(n,t,i){i._dayOfYear=s(n)}),i.ISO_8601=function(){},re=w("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var n=o.apply(null,arguments);return this>n?this:n}),ue=w("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var n=o.apply(null,arguments);return n>this?this:n}),tf("Z",":"),tf("ZZ",""),t("Z",bi),t("ZZ",bi),c(["Z","ZZ"],function(n,t,i){i._useUTC=!0,i._tzm=er(n)}),fe=/([\+\-]|\d\d)/gi,i.updateOffset=function(){},ee=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,oe=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,tt.fn=si.prototype,se=ff(1,"add"),he=ff(-1,"subtract"),i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",gr=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return void 0===n?this.localeData():this.locale(n)}),r(0,["gg",2],0,function(){return this.weekYear()%100}),r(0,["GG",2],0,function(){return this.isoWeekYear()%100}),hi("gggg","weekYear"),hi("ggggg","weekYear"),hi("GGGG","isoWeekYear"),hi("GGGGG","isoWeekYear"),l("weekYear","gg"),l("isoWeekYear","GG"),t("G",wi),t("g",wi),t("GG",h,y),t("gg",h,y),t("GGGG",yr,vr),t("gggg",yr,vr),t("GGGGG",pi,vi),t("ggggg",pi,vi),ni(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=s(n)}),ni(["gg","GG"],function(n,t,r,u){t[u]=i.parseTwoDigitYear(n)}),r("Q",0,0,"quarter"),l("quarter","Q"),t("Q",gf),c("Q",function(n,t){t[d]=3*(s(n)-1)}),r("D",["DD",2],"Do","date"),l("date","D"),t("D",h),t("DD",h,y),t("Do",function(n,t){return n?t._ordinalParse:t._ordinalParseLenient}),c(["D","DD"],k),c("Do",function(n,t){t[k]=s(n.match(h)[0],10)}),nu=yt("Date",!0),r("d",0,"do","day"),r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),r("e",0,0,"weekday"),r("E",0,0,"isoWeekday"),l("day","d"),l("weekday","e"),l("isoWeekday","E"),t("d",h),t("e",h),t("E",h),t("dd",ri),t("ddd",ri),t("dddd",ri),ni(["dd","ddd","dddd"],function(n,t,i){var r=i._locale.weekdaysParse(n);null!=r?t.d=r:e(i).invalidWeekday=n}),ni(["d","e","E"],function(n,t,i,r){t[r]=s(n)});var ca="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),la="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),aa="Su_Mo_Tu_We_Th_Fr_Sa".split("_");for(r("H",["HH",2],0,"hour"),r("h",["hh",2],0,function(){return this.hours()%12||12}),lf("a",!0),lf("A",!1),l("hour","h"),t("a",af),t("A",af),t("H",h),t("h",h),t("HH",h,y),t("hh",h,y),c(["H","HH"],a),c(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n),i._meridiem=n}),c(["h","hh"],function(n,t,i){t[a]=s(n),e(i).bigHour=!0}),ce=/[ap]\.?m?\.?/i,le=yt("Hours",!0),r("m",["mm",2],0,"minute"),l("minute","m"),t("m",h),t("mm",h,y),c(["m","mm"],lt),ae=yt("Minutes",!1),r("s",["ss",2],0,"second"),l("second","s"),t("s",h),t("ss",h,y),c(["s","ss"],at),ve=yt("Seconds",!1),r("S",0,0,function(){return~~(this.millisecond()/100)}),r(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),r(0,["SSS",3],0,"millisecond"),r(0,["SSSS",4],0,function(){return 10*this.millisecond()}),r(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),r(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),r(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),r(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),r(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),l("millisecond","ms"),t("S",yi,gf),t("SS",yi,y),t("SSS",yi,ne),rt="SSSS";rt.length<=9;rt+="S")t(rt,ua);for(rt="S";rt.length<=9;rt+="S")c(rt,bc);ye=yt("Milliseconds",!1),r("z",0,0,"zoneAbbr"),r("zz",0,0,"zoneName"),n=dt.prototype,n.add=se,n.calendar=gs,n.clone=nh,n.diff=fh,n.endOf=yh,n.format=sh,n.from=hh,n.fromNow=ch,n.to=lh,n.toNow=ah,n.get=lu,n.invalidAt=tc,n.isAfter=th,n.isBefore=ih,n.isBetween=rh,n.isSame=uh,n.isValid=gh,n.lang=gr,n.locale=sf,n.localeData=hf,n.max=ue,n.min=re,n.parsingFlags=nc,n.set=lu,n.startOf=vh,n.subtract=he,n.toArray=kh,n.toObject=dh,n.toDate=bh,n.toISOString=of,n.toJSON=of,n.toString=oh,n.unix=wh,n.valueOf=ph,n.year=dr,n.isLeapYear=ao,n.weekYear=ic,n.isoWeekYear=rc,n.quarter=n.quarters=ec,n.month=yu,n.daysInMonth=so,n.week=n.weeks=wo,n.isoWeek=n.isoWeeks=bo,n.weeksInYear=fc,n.isoWeeksInYear=uc,n.date=nu,n.day=n.days=ac,n.weekday=vc,n.isoWeekday=yc,n.dayOfYear=go,n.hour=n.hours=le,n.minute=n.minutes=ae,n.second=n.seconds=ve,n.millisecond=n.milliseconds=ye,n.utcOffset=hs,n.utc=ls,n.local=as,n.parseZone=vs,n.hasAlignedHourOffset=ys,n.isDST=ps,n.isDSTShifted=ws,n.isLocal=bs,n.isUtcOffset=ks,n.isUtc=rf,n.isUTC=rf,n.zoneAbbr=kc,n.zoneName=dc,n.dates=w("dates accessor is deprecated. Use date instead.",nu),n.months=w("months accessor is deprecated. Use month instead",yu),n.years=w("years accessor is deprecated. Use year instead",dr),n.zone=w("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",cs);var va=n,ya={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},pa={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},wa="Invalid date",ba="%d",ka=/\d{1,2}/,da={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},u=fu.prototype;u._calendar=ya,u.calendar=tl,u._longDateFormat=pa,u.longDateFormat=il,u._invalidDate=wa,u.invalidDate=rl,u._ordinal=ba,u.ordinal=ul,u._ordinalParse=ka,u.preparse=vf,u.postformat=vf,u._relativeTime=da,u.relativeTime=fl,u.pastFuture=el,u.set=ol,u.months=fo,u._months=ea,u.monthsShort=eo,u._monthsShort=oa,u.monthsParse=oo,u.week=vo,u._week=ie,u.firstDayOfYear=po,u.firstDayOfWeek=yo,u.weekdays=sc,u._weekdays=ca,u.weekdaysMin=cc,u._weekdaysMin=aa,u.weekdaysShort=hc,u._weekdaysShort=la,u.weekdaysParse=lc,u.isPM=pc,u._meridiemParse=ce,u.meridiem=wc,gt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=1===s(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i}}),i.lang=w("moment.lang is deprecated. Use moment.locale instead.",gt),i.langData=w("moment.langData is deprecated. Use moment.localeData instead.",et);var g=Math.abs,ga=it("ms"),nv=it("s"),tv=it("m"),iv=it("h"),rv=it("d"),uv=it("w"),fv=it("M"),ev=it("y"),ov=ht("milliseconds"),sv=ht("seconds"),hv=ht("minutes"),cv=ht("hours"),lv=ht("days"),av=ht("months"),vv=ht("years"),bt=Math.round,ut={s:45,m:45,h:22,d:26,M:11},tu=Math.abs,f=si.prototype;return f.abs=vl,f.add=yl,f.subtract=pl,f.as=bl,f.asMilliseconds=ga,f.asSeconds=nv,f.asMinutes=tv,f.asHours=iv,f.asDays=rv,f.asWeeks=uv,f.asMonths=fv,f.asYears=ev,f.valueOf=kl,f._bubble=wl,f.get=dl,f.milliseconds=ov,f.seconds=sv,f.minutes=hv,f.hours=cv,f.days=lv,f.weeks=gl,f.months=av,f.years=vv,f.humanize=ra,f.toISOString=ci,f.toString=ci,f.toJSON=ci,f.locale=sf,f.localeData=hf,f.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ci),f.lang=gr,r("X",0,0,"unix"),r("x",0,0,"valueOf"),t("x",wi),t("X",fa),c("X",function(n,t,i){i._d=new Date(1e3*parseFloat(n,10))}),c("x",function(n,t,i){i._d=new Date(s(n))}),i.version="2.10.6",we(o),i.fn=va,i.min=os,i.max=ss,i.utc=kt,i.unix=gc,i.months=sl,i.isDate=fi,i.locale=gt,i.invalid=ru,i.duration=tt,i.isMoment=nt,i.weekdays=cl,i.parseZone=nl,i.localeData=et,i.isDuration=fr,i.monthsShort=hl,i.weekdaysMin=al,i.defineLocale=su,i.weekdaysShort=ll,i.normalizeUnits=p,i.relativeTimeThreshold=ia,pe=i}),querystring={parse:function(n){var i={},f,o,u,e,t,r;if(n=n!==undefined?n:window.location.search,typeof n=="string"&&n.length>0)for(n[0]==="?"&&(n=n.substring(1)),n=n.split("&"),f=0,o=n.length;f<o;f++)u=n[f],e=u.indexOf("="),e>=0?(t=u.substr(0,e),r=u.substr(e+1)):(t=u,r=""),r=decodeURIComponent(r),i[t]===undefined?i[t]=r:i[t]instanceof Array?i[t].push(r):i[t]=[i[t],r];return i},stringify:function(n){var r=[],t,i,u;if(!!n&&n.constructor===Object)for(t in n)if(n[t]instanceof Array)for(i=0,u=n[t].length;i<u;i++)r.push([encodeURIComponent(t),encodeURIComponent(n[t][i])].join("="));else r.push([encodeURIComponent(t),encodeURIComponent(n[t])].join("="));return r.join("&")}},JustGage=function(n){var t=this,a,r,f,e,u,i,s,o,h,p,w,b,v,k,l,y,d,c,g,nt,tt,it,rt,ut,ft,et;if(n===null||n===undefined)return console.log("* justgage: Make sure to pass options to the constructor!"),!1;if(n.id!==null&&n.id!==undefined){if(a=document.getElementById(n.id),!a)return console.log("* justgage: No element with id : %s found",n.id),!1}else if(n.parentNode!==null&&n.parentNode!==undefined)a=n.parentNode;else return console.log("* justgage: Make sure to pass the existing element id or parentNode to the constructor."),!1;if(r=a.dataset?a.dataset:{},t.config={id:n.id,parentNode:t.kvLookup("parentNode",n,r,null),width:t.kvLookup("width",n,r,null),height:t.kvLookup("height",n,r,null),title:t.kvLookup("title",n,r,""),titleFontColor:t.kvLookup("titleFontColor",n,r,"#999999"),value:t.kvLookup("value",n,r,0,"float"),valueFontColor:t.kvLookup("valueFontColor",n,r,"#010101"),symbol:t.kvLookup("symbol",n,r,""),min:t.kvLookup("min",n,r,0,"float"),max:t.kvLookup("max",n,r,100,"float"),humanFriendlyDecimal:t.kvLookup("humanFriendlyDecimal",n,r,0),textRenderer:t.kvLookup("textRenderer",n,r,null),gaugeWidthScale:t.kvLookup("gaugeWidthScale",n,r,1),gaugeColor:t.kvLookup("gaugeColor",n,r,"#edebeb"),label:t.kvLookup("label",n,r,""),labelFontColor:t.kvLookup("labelFontColor",n,r,"#b3b3b3"),shadowOpacity:t.kvLookup("shadowOpacity",n,r,.2),shadowSize:t.kvLookup("shadowSize",n,r,5),shadowVerticalOffset:t.kvLookup("shadowVerticalOffset",n,r,3),levelColors:t.kvLookup("levelColors",n,r,["#a9d70b","#f9c802","#ff0000"],"array",","),startAnimationTime:t.kvLookup("startAnimationTime",n,r,700),startAnimationType:t.kvLookup("startAnimationType",n,r,">"),refreshAnimationTime:t.kvLookup("refreshAnimationTime",n,r,700),refreshAnimationType:t.kvLookup("refreshAnimationType",n,r,">"),donutStartAngle:t.kvLookup("donutStartAngle",n,r,90),valueMinFontSize:t.kvLookup("valueMinFontSize",n,r,16),titleMinFontSize:t.kvLookup("titleMinFontSize",n,r,10),labelMinFontSize:t.kvLookup("labelMinFontSize",n,r,10),minLabelMinFontSize:t.kvLookup("minLabelMinFontSize",n,r,10),maxLabelMinFontSize:t.kvLookup("maxLabelMinFontSize",n,r,10),hideValue:t.kvLookup("hideValue",n,r,!1),hideMinMax:t.kvLookup("hideMinMax",n,r,!1),hideInnerShadow:t.kvLookup("hideInnerShadow",n,r,!1),humanFriendly:t.kvLookup("humanFriendly",n,r,!1),noGradient:t.kvLookup("noGradient",n,r,!1),donut:t.kvLookup("donut",n,r,!1),relativeGaugeSize:t.kvLookup("relativeGaugeSize",n,r,!1),counter:t.kvLookup("counter",n,r,!1),decimals:t.kvLookup("decimals",n,r,0),customSectors:t.kvLookup("customSectors",n,r,[]),formatNumber:t.kvLookup("formatNumber",n,r,!1)},t.config.value>t.config.max&&(t.config.value=t.config.max),t.config.value<t.config.min&&(t.config.value=t.config.min),t.originalValue=t.kvLookup("value",n,r,-1,"float"),t.config.id!==null&&document.getElementById(t.config.id)!==null?t.canvas=Raphael(t.config.id,"100%","100%"):t.config.parentNode!==null&&(t.canvas=Raphael(t.config.parentNode,"100%","100%")),t.config.relativeGaugeSize===!0&&t.canvas.setViewBox(0,0,200,150,!0),t.config.relativeGaugeSize===!0?(f=200,e=150):t.config.width!==null&&t.config.height!==null?(f=t.config.width,e=t.config.height):t.config.parentNode!==null?(t.canvas.setViewBox(0,0,200,150,!0),f=200,e=150):(f=getStyle(document.getElementById(t.config.id),"width").slice(0,-2)*1,e=getStyle(document.getElementById(t.config.id),"height").slice(0,-2)*1),t.config.donut===!0?(f>e?(i=e,u=i):f<e?(u=f,i=u,i>e&&(s=i/e,i=i/s,u=i/s)):(u=f,i=u),o=(f-u)/2,h=(e-i)/2,p=i/8>10?i/10:10,w=o+u/2,b=h+i/11,v=i/6.4>16?i/5.4:18,k=o+u/2,l=t.config.label!==""?h+i/1.85:h+i/1.7,y=i/16>10?i/16:10,d=o+u/2,c=l+y,g=i/16>10?i/16:10,nt=o+u/10+u/6.666666666666667*t.config.gaugeWidthScale/2,tt=c,it=i/16>10?i/16:10,rt=o+u-u/10-u/6.666666666666667*t.config.gaugeWidthScale/2,ut=c):(f>e?(i=e,u=i*1.25,u>f&&(s=u/f,u=u/s,i=i/s)):f<e?(u=f,i=u/1.25,i>e&&(s=i/e,i=i/s,u=i/s)):(u=f,i=u*.75),o=(f-u)/2,h=(e-i)/2,p=i/8>t.config.titleMinFontSize?i/10:t.config.titleMinFontSize,w=o+u/2,b=h+i/6.4,v=i/6.5>t.config.valueMinFontSize?i/6.5:t.config.valueMinFontSize,k=o+u/2,l=h+i/1.275,y=i/16>t.config.labelMinFontSize?i/16:t.config.labelMinFontSize,d=o+u/2,c=l+v/2+5,g=i/16>t.config.minLabelMinFontSize?i/16:t.config.minLabelMinFontSize,nt=o+u/10+u/6.666666666666667*t.config.gaugeWidthScale/2,tt=c,it=i/16>t.config.maxLabelMinFontSize?i/16:t.config.maxLabelMinFontSize,rt=o+u-u/10-u/6.666666666666667*t.config.gaugeWidthScale/2,ut=c),t.params={canvasW:f,canvasH:e,widgetW:u,widgetH:i,dx:o,dy:h,titleFontSize:p,titleX:w,titleY:b,valueFontSize:v,valueX:k,valueY:l,labelFontSize:y,labelX:d,labelY:c,minFontSize:g,minX:nt,minY:tt,maxFontSize:it,maxX:rt,maxY:ut},f,e,u,i,s,o,h,p,w,b,v,k,l,y,d,c,g,nt,tt,it,rt,ut=null,t.canvas.customAttributes.pki=function(n,t,i,r,u,f,e,o,s){var v,h,c,y,a,p,w,b,k,l;return s?(v=(1-2*(n-t)/(i-t))*Math.PI,h=r/2-r/7,c=h-r/6.666666666666667*o,y=r/2+f,a=u/1.95+e,p=r/2+f+h*Math.cos(v),w=u-(u-a)-h*Math.sin(v),b=r/2+f+c*Math.cos(v),k=u-(u-a)-c*Math.sin(v),l="M"+(y-c)+","+a+" ",l+="L"+(y-h)+","+a+" ",n>(i-t)/2&&(l+="A"+h+","+h+" 0 0 1 "+(y+h)+","+a+" "),l+="A"+h+","+h+" 0 0 1 "+p+","+w+" ",l+="L"+b+","+k+" ",n>(i-t)/2&&(l+="A"+c+","+c+" 0 0 0 "+(y+c)+","+a+" "),l+="A"+c+","+c+" 0 0 0 "+(y-c)+","+a+" ",l+="Z ",{path:l}):(v=(1-(n-t)/(i-t))*Math.PI,h=r/2-r/10,c=h-r/6.666666666666667*o,y=r/2+f,a=u/1.25+e,p=r/2+f+h*Math.cos(v),w=u-(u-a)-h*Math.sin(v),b=r/2+f+c*Math.cos(v),k=u-(u-a)-c*Math.sin(v),l="M"+(y-c)+","+a+" ",l+="L"+(y-h)+","+a+" ",l+="A"+h+","+h+" 0 0 1 "+p+","+w+" ",l+="L"+b+","+k+" ",l+="A"+c+","+c+" 0 0 0 "+(y-c)+","+a+" ",l+="Z ",{path:l})},t.gauge=t.canvas.path().attr({stroke:"none",fill:t.config.gaugeColor,pki:[t.config.max,t.config.min,t.config.max,t.params.widgetW,t.params.widgetH,t.params.dx,t.params.dy,t.config.gaugeWidthScale,t.config.donut]}),t.level=t.canvas.path().attr({stroke:"none",fill:getColor(t.config.value,(t.config.value-t.config.min)/(t.config.max-t.config.min),t.config.levelColors,t.config.noGradient,t.config.customSectors),pki:[t.config.min,t.config.min,t.config.max,t.params.widgetW,t.params.widgetH,t.params.dx,t.params.dy,t.config.gaugeWidthScale,t.config.donut]}),t.config.donut&&t.level.transform("r"+t.config.donutStartAngle+", "+(t.params.widgetW/2+t.params.dx)+", "+(t.params.widgetH/1.95+t.params.dy)),t.txtTitle=t.canvas.text(t.params.titleX,t.params.titleY,t.config.title),t.txtTitle.attr({"font-size":t.params.titleFontSize,"font-weight":"bold","font-family":"Arial",fill:t.config.titleFontColor,"fill-opacity":"1"}),setDy(t.txtTitle,t.params.titleFontSize,t.params.titleY),t.txtValue=t.canvas.text(t.params.valueX,t.params.valueY,0),t.txtValue.attr({"font-size":t.params.valueFontSize,"font-weight":"bold","font-family":"Arial",fill:t.config.valueFontColor,"fill-opacity":"0"}),setDy(t.txtValue,t.params.valueFontSize,t.params.valueY),t.txtLabel=t.canvas.text(t.params.labelX,t.params.labelY,t.config.label),t.txtLabel.attr({"font-size":t.params.labelFontSize,"font-weight":"normal","font-family":"Arial",fill:t.config.labelFontColor,"fill-opacity":"0"}),setDy(t.txtLabel,t.params.labelFontSize,t.params.labelY),t.txtMinimum=t.config.min,t.config.humanFriendly?t.txtMinimum=humanFriendlyNumber(t.config.min,t.config.humanFriendlyDecimal):t.config.formatNumber&&(t.txtMinimum=formatNumber(t.config.min)),t.txtMin=t.canvas.text(t.params.minX,t.params.minY,t.txtMinimum),t.txtMin.attr({"font-size":t.params.minFontSize,"font-weight":"normal","font-family":"Arial",fill:t.config.labelFontColor,"fill-opacity":t.config.hideMinMax||t.config.donut?"0":"1"}),setDy(t.txtMin,t.params.minFontSize,t.params.minY),t.txtMaximum=t.config.max,t.config.formatNumber?t.txtMaximum=formatNumber(t.txtMaximum):t.config.humanFriendly&&(t.txtMaximum=humanFriendlyNumber(t.config.max,t.config.humanFriendlyDecimal)),t.txtMax=t.canvas.text(t.params.maxX,t.params.maxY,t.txtMaximum),t.txtMax.attr({"font-size":t.params.maxFontSize,"font-weight":"normal","font-family":"Arial",fill:t.config.labelFontColor,"fill-opacity":t.config.hideMinMax||t.config.donut?"0":"1"}),setDy(t.txtMax,t.params.maxFontSize,t.params.maxY),ft=t.canvas.canvas.childNodes[1],et="http://www.w3.org/2000/svg",ie!=="undefined"&&ie<9||(ie!=="undefined"?onCreateElementNsReady(function(){t.generateShadow(et,ft)}):t.generateShadow(et,ft)),ft,et=null,t.originalValue=t.config.textRenderer?t.config.textRenderer(t.originalValue):t.config.humanFriendly?humanFriendlyNumber(t.originalValue,t.config.humanFriendlyDecimal)+t.config.symbol:t.config.formatNumber?formatNumber(t.originalValue)+t.config.symbol:(t.originalValue*1).toFixed(t.config.decimals)+t.config.symbol,t.config.counter===!0){eve.on("raphael.anim.frame."+t.level.id,function(){var n=t.level.attr("pki");t.config.textRenderer?t.txtValue.attr("text",t.config.textRenderer(Math.floor(n[0]))):t.config.humanFriendly?t.txtValue.attr("text",humanFriendlyNumber(Math.floor(n[0]),t.config.humanFriendlyDecimal)+t.config.symbol):t.config.formatNumber?t.txtValue.attr("text",formatNumber(Math.floor(n[0]))+t.config.symbol):t.txtValue.attr("text",(n[0]*1).toFixed(t.config.decimals)+t.config.symbol),setDy(t.txtValue,t.params.valueFontSize,t.params.valueY),n=null});eve.on("raphael.anim.finish."+t.level.id,function(){t.txtValue.attr({text:t.originalValue}),setDy(t.txtValue,t.params.valueFontSize,t.params.valueY)})}else eve.on("raphael.anim.start."+t.level.id,function(){t.txtValue.attr({text:t.originalValue}),setDy(t.txtValue,t.params.valueFontSize,t.params.valueY)});t.level.animate({pki:[t.config.value,t.config.min,t.config.max,t.params.widgetW,t.params.widgetH,t.params.dx,t.params.dy,t.config.gaugeWidthScale,t.config.donut]},t.config.startAnimationTime,t.config.startAnimationType),t.txtValue.animate({"fill-opacity":t.config.hideValue?"0":"1"},t.config.startAnimationTime,t.config.startAnimationType),t.txtLabel.animate({"fill-opacity":"1"},t.config.startAnimationTime,t.config.startAnimationType)},JustGage.prototype.kvLookup=function(n,t,i,r,u){var e=r,o=!1;if(!(n===null||n===undefined)&&(i!==null&&i!==undefined&&typeof i=="object"&&n in i?(e=i[n],o=!0):t!==null&&t!==undefined&&typeof t=="object"&&n in t?(e=t[n],o=!0):e=r,o===!0&&u!==null&&u!==undefined))switch(u){case"int":e=parseInt(e,10);break;case"float":e=parseFloat(e)}return e},JustGage.prototype.refresh=function(n,t){var i=this,r,u,t=t||null;t!==null&&(i.config.max=t,i.txtMaximum=i.config.max,i.config.humanFriendly?i.txtMaximum=humanFriendlyNumber(i.config.max,i.config.humanFriendlyDecimal):i.config.formatNumber&&(i.txtMaximum=formatNumber(i.config.max)),i.txtMax.attr({text:i.txtMaximum}),setDy(i.txtMax,i.params.maxFontSize,i.params.maxY)),r=n,n*1>i.config.max*1&&(n=i.config.max*1),n*1<i.config.min*1&&(n=i.config.min*1),u=getColor(n,(n-i.config.min)/(i.config.max-i.config.min),i.config.levelColors,i.config.noGradient,i.config.customSectors),r=i.config.textRenderer?i.config.textRenderer(r):i.config.humanFriendly?humanFriendlyNumber(r,i.config.humanFriendlyDecimal)+i.config.symbol:i.config.formatNumber?formatNumber((r*1).toFixed(i.config.decimals))+i.config.symbol:(r*1).toFixed(i.config.decimals)+i.config.symbol,i.originalValue=r,i.config.value=n*1,i.config.counter||(i.txtValue.attr({text:r}),setDy(i.txtValue,i.params.valueFontSize,i.params.valueY)),i.level.animate({pki:[i.config.value,i.config.min,i.config.max,i.params.widgetW,i.params.widgetH,i.params.dx,i.params.dy,i.config.gaugeWidthScale,i.config.donut],fill:u},i.config.refreshAnimationTime,i.config.refreshAnimationType),i,r,u,t=null},JustGage.prototype.generateShadow=function(n,t){var f=this,i,s,h,r,e,u,o;i=document.createElementNS(n,"filter"),i.setAttribute("id","inner-shadow"),t.appendChild(i),s=document.createElementNS(n,"feOffset"),s.setAttribute("dx",0),s.setAttribute("dy",f.config.shadowVerticalOffset),i.appendChild(s),h=document.createElementNS(n,"feGaussianBlur"),h.setAttribute("result","offset-blur"),h.setAttribute("stdDeviation",f.config.shadowSize),i.appendChild(h),r=document.createElementNS(n,"feComposite"),r.setAttribute("operator","out"),r.setAttribute("in","SourceGraphic"),r.setAttribute("in2","offset-blur"),r.setAttribute("result","inverse"),i.appendChild(r),e=document.createElementNS(n,"feFlood"),e.setAttribute("flood-color","black"),e.setAttribute("flood-opacity",f.config.shadowOpacity),e.setAttribute("result","color"),i.appendChild(e),u=document.createElementNS(n,"feComposite"),u.setAttribute("operator","in"),u.setAttribute("in","color"),u.setAttribute("in2","inverse"),u.setAttribute("result","shadow"),i.appendChild(u),o=document.createElementNS(n,"feComposite"),o.setAttribute("operator","over"),o.setAttribute("in","shadow"),o.setAttribute("in2","SourceGraphic"),i.appendChild(o),f.config.hideInnerShadow||(f.canvas.canvas.childNodes[2].setAttribute("filter","url(#inner-shadow)"),f.canvas.canvas.childNodes[3].setAttribute("filter","url(#inner-shadow)")),i,s,h,r,e,u,o=null},ie=function(){for(var i,n=3,t=document.createElement("div"),r=t.getElementsByTagName("i");t.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->",r[0];);return n>4?n:i}(),!function(n){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],n);else if("object"==typeof exports)n(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";n(jQuery,moment)}}(function(n,t){"use strict";if(!t)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var i=function(i,r){var s,k,y,tt,b,u={},e=t().startOf("d"),o=e.clone(),d=!0,l=!1,f=!1,g=0,et=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],at=["days","months","years","decades"],pt=["top","bottom","auto"],wt=["left","right","auto"],bt=["default","top","bottom"],kt={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t","delete":46,46:"delete"},ot={},p=function(n){if("string"!=typeof n||n.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(n){case"y":return-1!==y.indexOf("Y");case"M":return-1!==y.indexOf("M");case"d":return-1!==y.toLowerCase().indexOf("d");case"h":case"H":return-1!==y.toLowerCase().indexOf("h");case"m":return-1!==y.indexOf("m");case"s":return-1!==y.indexOf("s");default:return!1}},st=function(){return p("h")||p("m")||p("s")},ht=function(){return p("y")||p("M")||p("d")},ui=function(){var t=n("<thead>").append(n("<tr>").append(n("<th>").addClass("prev").attr("data-action","previous").append(n("<span>").addClass(r.icons.previous))).append(n("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",r.calendarWeeks?"6":"5")).append(n("<th>").addClass("next").attr("data-action","next").append(n("<span>").addClass(r.icons.next)))),i=n("<tbody>").append(n("<tr>").append(n("<td>").attr("colspan",r.calendarWeeks?"8":"7")));return[n("<div>").addClass("datepicker-days").append(n("<table>").addClass("table-condensed").append(t).append(n("<tbody>"))),n("<div>").addClass("datepicker-months").append(n("<table>").addClass("table-condensed").append(t.clone()).append(i.clone())),n("<div>").addClass("datepicker-years").append(n("<table>").addClass("table-condensed").append(t.clone()).append(i.clone())),n("<div>").addClass("datepicker-decades").append(n("<table>").addClass("table-condensed").append(t.clone()).append(i.clone()))]},fi=function(){var t=n("<tr>"),i=n("<tr>"),u=n("<tr>");return p("h")&&(t.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Increment Hour"}).addClass("btn").attr("data-action","incrementHours").append(n("<span>").addClass(r.icons.up)))),i.append(n("<td>").append(n("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:"Pick Hour"}).attr("data-action","showHours"))),u.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Hour"}).addClass("btn").attr("data-action","decrementHours").append(n("<span>").addClass(r.icons.down))))),p("m")&&(p("h")&&(t.append(n("<td>").addClass("separator")),i.append(n("<td>").addClass("separator").html(":")),u.append(n("<td>").addClass("separator"))),t.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Increment Minute"}).addClass("btn").attr("data-action","incrementMinutes").append(n("<span>").addClass(r.icons.up)))),i.append(n("<td>").append(n("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:"Pick Minute"}).attr("data-action","showMinutes"))),u.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Minute"}).addClass("btn").attr("data-action","decrementMinutes").append(n("<span>").addClass(r.icons.down))))),p("s")&&(p("m")&&(t.append(n("<td>").addClass("separator")),i.append(n("<td>").addClass("separator").html(":")),u.append(n("<td>").addClass("separator"))),t.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Increment Second"}).addClass("btn").attr("data-action","incrementSeconds").append(n("<span>").addClass(r.icons.up)))),i.append(n("<td>").append(n("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:"Pick Second"}).attr("data-action","showSeconds"))),u.append(n("<td>").append(n("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Second"}).addClass("btn").attr("data-action","decrementSeconds").append(n("<span>").addClass(r.icons.down))))),k||(t.append(n("<td>").addClass("separator")),i.append(n("<td>").append(n("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:"Toggle Period"}))),u.append(n("<td>").addClass("separator"))),n("<div>").addClass("timepicker-picker").append(n("<table>").addClass("table-condensed").append([t,i,u]))},ei=function(){var i=n("<div>").addClass("timepicker-hours").append(n("<table>").addClass("table-condensed")),r=n("<div>").addClass("timepicker-minutes").append(n("<table>").addClass("table-condensed")),u=n("<div>").addClass("timepicker-seconds").append(n("<table>").addClass("table-condensed")),t=[fi()];return p("h")&&t.push(i),p("m")&&t.push(r),p("s")&&t.push(u),t},oi=function(){var t=[];return r.showTodayButton&&t.push(n("<td>").append(n("<a>").attr({"data-action":"today",title:r.tooltips.today}).append(n("<span>").addClass(r.icons.today)))),!r.sideBySide&&ht()&&st()&&t.push(n("<td>").append(n("<a>").attr({"data-action":"togglePicker",title:"Select Time"}).append(n("<span>").addClass(r.icons.time)))),r.showClear&&t.push(n("<td>").append(n("<a>").attr({"data-action":"clear",title:r.tooltips.clear}).append(n("<span>").addClass(r.icons.clear)))),r.showClose&&t.push(n("<td>").append(n("<a>").attr({"data-action":"close",title:r.tooltips.close}).append(n("<span>").addClass(r.icons.close)))),n("<table>").addClass("table-condensed").append(n("<tbody>").append(n("<tr>").append(t)))},si=function(){var t=n("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),f=n("<div>").addClass("datepicker").append(ui()),e=n("<div>").addClass("timepicker").append(ei()),i=n("<ul>").addClass("list-unstyled"),u=n("<li>").addClass("picker-switch"+(r.collapse?" accordion-toggle":"")).append(oi());return r.inline&&t.removeClass("dropdown-menu"),k&&t.addClass("usetwentyfour"),p("s")&&!k&&t.addClass("wider"),r.sideBySide&&ht()&&st()?(t.addClass("timepicker-sbs"),"top"===r.toolbarPlacement&&t.append(u),t.append(n("<div>").addClass("row").append(f.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===r.toolbarPlacement&&t.append(u),t):("top"===r.toolbarPlacement&&i.append(u),ht()&&i.append(n("<li>").addClass(r.collapse&&st()?"collapse in":"").append(f)),"default"===r.toolbarPlacement&&i.append(u),st()&&i.append(n("<li>").addClass(r.collapse&&ht()?"collapse":"").append(e)),"bottom"===r.toolbarPlacement&&i.append(u),t.append(i))},hi=function(){var t,u={};return t=i.is("input")||r.inline?i.data():i.find("input").data(),t.dateOptions&&t.dateOptions instanceof Object&&(u=n.extend(!0,u,t.dateOptions)),n.each(r,function(n){var i="date"+n.charAt(0).toUpperCase()+n.slice(1);void 0!==t[i]&&(u[n]=t[i])}),u},vt=function(){var t,o=(l||i).position(),s=(l||i).offset(),u=r.widgetPositioning.vertical,e=r.widgetPositioning.horizontal;if(r.widgetParent)t=r.widgetParent.append(f);else if(i.is("input"))t=i.after(f).parent();else{if(r.inline)return void(t=i.append(f));t=i,i.children().first().after(f)}if("auto"===u&&(u=s.top+1.5*f.height()>=n(window).height()+n(window).scrollTop()&&f.height()+i.outerHeight()<s.top?"top":"bottom"),"auto"===e&&(e=t.width()<s.left+f.outerWidth()/2&&s.left+f.outerWidth()>n(window).width()?"right":"left"),"top"===u?f.addClass("top").removeClass("bottom"):f.addClass("bottom").removeClass("top"),"right"===e?f.addClass("pull-right"):f.removeClass("pull-right"),"relative"!==t.css("position")&&(t=t.parents().filter(function(){return"relative"===n(this).css("position")}).first()),0===t.length)throw new Error("datetimepicker component should be placed within a relative positioned container");f.css({top:"top"===u?"auto":o.top+i.outerHeight(),bottom:"top"===u?o.top+i.outerHeight():"auto",left:"left"===e?t===i?0:o.left:"auto",right:"left"===e?"auto":t.outerWidth()-i.outerWidth()-(t===i?0:o.left)})},it=function(n){"dp.change"===n.type&&(n.date&&n.date.isSame(n.oldDate)||!n.date&&!n.oldDate)||i.trigger(n)},rt=function(n){"y"===n&&(n="YYYY"),it({type:"dp.update",change:n,viewDate:o.clone()})},ut=function(n){f&&(n&&(b=Math.max(g,Math.min(3,b+n))),f.find(".datepicker > div").hide().filter(".datepicker-"+et[b].clsName).show())},ci=function(){var t=n("<tr>"),i=o.clone().startOf("w").startOf("d");for(r.calendarWeeks===!0&&t.append(n("<th>").addClass("cw").text("#"));i.isBefore(o.clone().endOf("w"));)t.append(n("<th>").addClass("dow").text(i.format("dd"))),i.add(1,"d");f.find(".datepicker-days thead").append(t)},li=function(n){return r.disabledDates[n.format("YYYY-MM-DD")]===!0},ai=function(n){return r.enabledDates[n.format("YYYY-MM-DD")]===!0},vi=function(n){return r.disabledHours[n.format("H")]===!0},yi=function(n){return r.enabledHours[n.format("H")]===!0},c=function(t,i){if(!t.isValid()||r.disabledDates&&"d"===i&&li(t)||r.enabledDates&&"d"===i&&!ai(t)||r.minDate&&t.isBefore(r.minDate,i)||r.maxDate&&t.isAfter(r.maxDate,i)||r.daysOfWeekDisabled&&"d"===i&&-1!==r.daysOfWeekDisabled.indexOf(t.day())||r.disabledHours&&("h"===i||"m"===i||"s"===i)&&vi(t)||r.enabledHours&&("h"===i||"m"===i||"s"===i)&&!yi(t))return!1;if(r.disabledTimeIntervals&&("h"===i||"m"===i||"s"===i)){var u=!1;if(n.each(r.disabledTimeIntervals,function(){if(t.isBetween(this[0],this[1]))return u=!0,!1}),u)return!1}return!0},pi=function(){for(var i=[],t=o.clone().startOf("y").startOf("d");t.isSame(o,"y");)i.push(n("<span>").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");f.find(".datepicker-months td").empty().append(i)},wi=function(){var i=f.find(".datepicker-months"),t=i.find("th"),u=i.find("tbody").find("span");t.eq(0).find("span").attr("title",r.tooltips.prevYear),t.eq(1).attr("title",r.tooltips.selectYear),t.eq(2).find("span").attr("title",r.tooltips.nextYear),i.find(".disabled").removeClass("disabled"),c(o.clone().subtract(1,"y"),"y")||t.eq(0).addClass("disabled"),t.eq(1).text(o.year()),c(o.clone().add(1,"y"),"y")||t.eq(2).addClass("disabled"),u.removeClass("active"),e.isSame(o,"y")&&!d&&u.eq(e.month()).addClass("active"),u.each(function(t){c(o.clone().month(t),"M")||n(this).addClass("disabled")})},bi=function(){var i=f.find(".datepicker-years"),t=i.find("th"),n=o.clone().subtract(5,"y"),u=o.clone().add(6,"y"),s="";for(t.eq(0).find("span").attr("title",r.tooltips.nextDecade),t.eq(1).attr("title",r.tooltips.selectDecade),t.eq(2).find("span").attr("title",r.tooltips.prevDecade),i.find(".disabled").removeClass("disabled"),r.minDate&&r.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+u.year()),r.maxDate&&r.maxDate.isBefore(u,"y")&&t.eq(2).addClass("disabled");!n.isAfter(u,"y");)s+='<span data-action="selectYear" class="year'+(n.isSame(e,"y")&&!d?" active":"")+(c(n,"y")?"":" disabled")+'">'+n.year()+"<\/span>",n.add(1,"y");i.find("td").html(s)},ki=function(){var u=f.find(".datepicker-decades"),i=u.find("th"),n=t(o.isBefore(t({y:1999}))?{y:1899}:{y:1999}),s=n.clone().add(100,"y"),h="";for(i.eq(0).find("span").attr("title",r.tooltips.prevCentury),i.eq(2).find("span").attr("title",r.tooltips.nextCentury),u.find(".disabled").removeClass("disabled"),(n.isSame(t({y:1900}))||r.minDate&&r.minDate.isAfter(n,"y"))&&i.eq(0).addClass("disabled"),i.eq(1).text(n.year()+"-"+s.year()),(n.isSame(t({y:2e3}))||r.maxDate&&r.maxDate.isBefore(s,"y"))&&i.eq(2).addClass("disabled");!n.isAfter(s,"y");)h+='<span data-action="selectDecade" class="decade'+(n.isSame(e,"y")?" active":"")+(c(n,"y")?"":" disabled")+'" data-selection="'+(n.year()+6)+'">'+(n.year()+1)+" - "+(n.year()+12)+"<\/span>",n.add(12,"y");h+="<span><\/span><span><\/span><span><\/span>",u.find("td").html(h)},ft=function(){var i,h,u,l,a=f.find(".datepicker-days"),s=a.find("th"),v=[];if(ht()){for(s.eq(0).find("span").attr("title",r.tooltips.prevMonth),s.eq(1).attr("title",r.tooltips.selectMonth),s.eq(2).find("span").attr("title",r.tooltips.nextMonth),a.find(".disabled").removeClass("disabled"),s.eq(1).text(o.format(r.dayViewHeaderFormat)),c(o.clone().subtract(1,"M"),"M")||s.eq(0).addClass("disabled"),c(o.clone().add(1,"M"),"M")||s.eq(2).addClass("disabled"),i=o.clone().startOf("M").startOf("w").startOf("d"),l=0;42>l;l++)0===i.weekday()&&(h=n("<tr>"),r.calendarWeeks&&h.append('<td class="cw">'+i.week()+"<\/td>"),v.push(h)),u="",i.isBefore(o,"M")&&(u+=" old"),i.isAfter(o,"M")&&(u+=" new"),i.isSame(e,"d")&&!d&&(u+=" active"),c(i,"d")||(u+=" disabled"),i.isSame(t(),"d")&&(u+=" today"),(0===i.day()||6===i.day())&&(u+=" weekend"),h.append('<td data-action="selectDay" data-day="'+i.format("L")+'" class="day'+u+'">'+i.date()+"<\/td>"),i.add(1,"d");a.find("tbody").empty().append(v),wi(),bi(),ki()}},di=function(){var u=f.find(".timepicker-hours table"),t=o.clone().startOf("d"),r=[],i=n("<tr>");for(o.hour()>11&&!k&&t.hour(12);t.isSame(o,"d")&&(k||o.hour()<12&&t.hour()<12||o.hour()>11);)t.hour()%4==0&&(i=n("<tr>"),r.push(i)),i.append('<td data-action="selectHour" class="hour'+(c(t,"h")?"":" disabled")+'">'+t.format(k?"HH":"hh")+"<\/td>"),t.add(1,"h");u.empty().append(r)},gi=function(){for(var s=f.find(".timepicker-minutes table"),t=o.clone().startOf("h"),u=[],i=n("<tr>"),e=1===r.stepping?5:r.stepping;o.isSame(t,"h");)t.minute()%(4*e)==0&&(i=n("<tr>"),u.push(i)),i.append('<td data-action="selectMinute" class="minute'+(c(t,"m")?"":" disabled")+'">'+t.format("mm")+"<\/td>"),t.add(e,"m");s.empty().append(u)},nr=function(){for(var u=f.find(".timepicker-seconds table"),t=o.clone().startOf("m"),r=[],i=n("<tr>");o.isSame(t,"m");)t.second()%20==0&&(i=n("<tr>"),r.push(i)),i.append('<td data-action="selectSecond" class="second'+(c(t,"s")?"":" disabled")+'">'+t.format("ss")+"<\/td>"),t.add(5,"s");u.empty().append(r)},tr=function(){var n,i,t=f.find(".timepicker span[data-time-component]");k||(n=f.find(".timepicker [data-action=togglePeriod]"),i=e.clone().add(e.hours()>=12?-12:12,"h"),n.text(e.format("A")),c(i,"h")?n.removeClass("disabled"):n.addClass("disabled")),t.filter("[data-time-component=hours]").text(e.format(k?"HH":"hh")),t.filter("[data-time-component=minutes]").text(e.format("mm")),t.filter("[data-time-component=seconds]").text(e.format("ss")),di(),gi(),nr()},a=function(){f&&(ft(),tr())},h=function(n){var t=d?null:e;return n?(n=n.clone().locale(r.locale),1!==r.stepping&&n.minutes(Math.round(n.minutes()/r.stepping)*r.stepping%60).seconds(0),void(c(n)?(e=n,o=e.clone(),s.val(e.format(y)),i.data("date",e.format(y)),d=!1,a(),it({type:"dp.change",date:e.clone(),oldDate:t})):(r.keepInvalid||s.val(d?"":e.format(y)),it({type:"dp.error",date:n})))):(d=!0,s.val(""),i.data("date",""),it({type:"dp.change",date:!1,oldDate:t}),void a())},v=function(){var t=!1;return f?(f.find(".collapse").each(function(){var i=n(this).data("collapse");return i&&i.transitioning?(t=!0,!1):!0}),t?u:(l&&l.hasClass("btn")&&l.toggleClass("active"),f.hide(),n(window).off("resize",vt),f.off("click","[data-action]"),f.off("mousedown",!1),f.remove(),f=!1,it({type:"dp.hide",date:e.clone()}),s.blur(),u)):u},dt=function(){h(null)},ct={next:function(){var n=et[b].navFnc;o.add(et[b].navStep,n),ft(),rt(n)},previous:function(){var n=et[b].navFnc;o.subtract(et[b].navStep,n),ft(),rt(n)},pickerSwitch:function(){ut(1)},selectMonth:function(t){var i=n(t.target).closest("tbody").find("span").index(n(t.target));o.month(i),b===g?(h(e.clone().year(o.year()).month(o.month())),r.inline||v()):(ut(-1),ft()),rt("M")},selectYear:function(t){var i=parseInt(n(t.target).text(),10)||0;o.year(i),b===g?(h(e.clone().year(o.year())),r.inline||v()):(ut(-1),ft()),rt("YYYY")},selectDecade:function(t){var i=parseInt(n(t.target).data("selection"),10)||0;o.year(i),b===g?(h(e.clone().year(o.year())),r.inline||v()):(ut(-1),ft()),rt("YYYY")},selectDay:function(t){var i=o.clone();n(t.target).is(".old")&&i.subtract(1,"M"),n(t.target).is(".new")&&i.add(1,"M"),h(i.date(parseInt(n(t.target).text(),10))),st()||r.keepOpen||r.inline||v()},incrementHours:function(){var n=e.clone().add(1,"h");c(n,"h")&&h(n)},incrementMinutes:function(){var n=e.clone().add(r.stepping,"m");c(n,"m")&&h(n)},incrementSeconds:function(){var n=e.clone().add(1,"s");c(n,"s")&&h(n)},decrementHours:function(){var n=e.clone().subtract(1,"h");c(n,"h")&&h(n)},decrementMinutes:function(){var n=e.clone().subtract(r.stepping,"m");c(n,"m")&&h(n)},decrementSeconds:function(){var n=e.clone().subtract(1,"s");c(n,"s")&&h(n)},togglePeriod:function(){h(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(t){var f,u=n(t.target),e=u.closest("ul"),i=e.find(".in"),o=e.find(".collapse:not(.in)");if(i&&i.length){if(f=i.data("collapse"),f&&f.transitioning)return;i.collapse?(i.collapse("hide"),o.collapse("show")):(i.removeClass("in"),o.addClass("in")),u.is("span")?u.toggleClass(r.icons.time+" "+r.icons.date):u.find("span").toggleClass(r.icons.time+" "+r.icons.date)}},showPicker:function(){f.find(".timepicker > div:not(.timepicker-picker)").hide(),f.find(".timepicker .timepicker-picker").show()},showHours:function(){f.find(".timepicker .timepicker-picker").hide(),f.find(".timepicker .timepicker-hours").show()},showMinutes:function(){f.find(".timepicker .timepicker-picker").hide(),f.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){f.find(".timepicker .timepicker-picker").hide(),f.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var i=parseInt(n(t.target).text(),10);k||(e.hours()>=12?12!==i&&(i+=12):12===i&&(i=0)),h(e.clone().hours(i)),ct.showPicker.call(u)},selectMinute:function(t){h(e.clone().minutes(parseInt(n(t.target).text(),10))),ct.showPicker.call(u)},selectSecond:function(t){h(e.clone().seconds(parseInt(n(t.target).text(),10))),ct.showPicker.call(u)},clear:dt,today:function(){c(t(),"d")&&h(t())},close:v},ir=function(t){return n(t.currentTarget).is(".disabled")?!1:(ct[n(t.currentTarget).data("action")].apply(u,arguments),!1)},w=function(){var i,e={year:function(n){return n.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(n){return n.date(1).hours(0).seconds(0).minutes(0)},day:function(n){return n.hours(0).seconds(0).minutes(0)},hour:function(n){return n.seconds(0).minutes(0)},minute:function(n){return n.seconds(0)}};return s.prop("disabled")||!r.ignoreReadonly&&s.prop("readonly")||f?u:(void 0!==s.val()&&0!==s.val().trim().length?h(nt(s.val().trim())):r.useCurrent&&d&&(s.is("input")&&0===s.val().trim().length||r.inline)&&(i=t(),"string"==typeof r.useCurrent&&(i=e[r.useCurrent](i)),h(i)),f=si(),ci(),pi(),f.find(".timepicker-hours").hide(),f.find(".timepicker-minutes").hide(),f.find(".timepicker-seconds").hide(),a(),ut(),n(window).on("resize",vt),f.on("click","[data-action]",ir),f.on("mousedown",!1),l&&l.hasClass("btn")&&l.toggleClass("active"),f.show(),vt(),r.focusOnShow&&!s.is(":focus")&&s.focus(),it({type:"dp.show"}),u)},yt=function(){return f?v():w()},nt=function(n){return n=void 0===r.parseInputDate?t.isMoment(n)||n instanceof Date?t(n):t(n,tt,r.useStrict):r.parseInputDate(n),n.locale(r.locale),n},gt=function(n){var t,e,i,o,s=null,c=[],l={},h=n.which,a="p";ot[h]=a;for(t in ot)ot.hasOwnProperty(t)&&ot[t]===a&&(c.push(t),parseInt(t,10)!==h&&(l[t]=!0));for(t in r.keyBinds)if(r.keyBinds.hasOwnProperty(t)&&"function"==typeof r.keyBinds[t]&&(i=t.split(" "),i.length===c.length&&kt[h]===i[i.length-1])){for(o=!0,e=i.length-2;e>=0;e--)if(!(kt[i[e]]in l)){o=!1;break}if(o){s=r.keyBinds[t];break}}s&&(s.call(u,f),n.stopPropagation(),n.preventDefault())},ni=function(n){ot[n.which]="r",n.stopPropagation(),n.preventDefault()},ti=function(t){var i=n(t.target).val().trim(),r=i?nt(i):null;return h(r),t.stopImmediatePropagation(),!1},rr=function(){s.on({change:ti,blur:r.debug?"":v,keydown:gt,keyup:ni,focus:r.allowInputToggle?w:""}),i.is("input")?s.on({focus:w}):l&&(l.on("click",yt),l.on("mousedown",!1))},ur=function(){s.off({change:ti,blur:blur,keydown:gt,keyup:ni,focus:r.allowInputToggle?v:""}),i.is("input")?s.off({focus:w}):l&&(l.off("click",yt),l.off("mousedown",!1))},ii=function(t){var i={};return n.each(t,function(){var n=nt(this);n.isValid()&&(i[n.format("YYYY-MM-DD")]=!0)}),Object.keys(i).length?i:!1},ri=function(t){var i={};return n.each(t,function(){i[this]=!0}),Object.keys(i).length?i:!1},lt=function(){var n=r.format||"L LT";y=n.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(n){var t=e.localeData().longDateFormat(n)||n;return t.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(n){return e.localeData().longDateFormat(n)||n})}),tt=r.extraFormats?r.extraFormats.slice():[],tt.indexOf(n)<0&&tt.indexOf(y)<0&&tt.push(y),k=y.toLowerCase().indexOf("a")<1&&y.replace(/\[.*?\]/g,"").indexOf("h")<1,p("y")&&(g=2),p("M")&&(g=1),p("d")&&(g=0),b=Math.max(g,b),d||h(e)};if(u.destroy=function(){v(),ur(),i.removeData("DateTimePicker"),i.removeData("date")},u.toggle=yt,u.show=w,u.hide=v,u.disable=function(){return v(),l&&l.hasClass("btn")&&l.addClass("disabled"),s.prop("disabled",!0),u},u.enable=function(){return l&&l.hasClass("btn")&&l.removeClass("disabled"),s.prop("disabled",!1),u},u.ignoreReadonly=function(n){if(0===arguments.length)return r.ignoreReadonly;if("boolean"!=typeof n)throw new TypeError("ignoreReadonly () expects a boolean parameter");return r.ignoreReadonly=n,u},u.options=function(t){if(0===arguments.length)return n.extend(!0,{},r);if(!(t instanceof Object))throw new TypeError("options() options parameter should be an object");return n.extend(!0,r,t),n.each(r,function(n,t){if(void 0===u[n])throw new TypeError("option "+n+" is not recognized!");u[n](t)}),u},u.date=function(n){if(0===arguments.length)return d?null:e.clone();if(!(null===n||"string"==typeof n||t.isMoment(n)||n instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return h(null===n?null:nt(n)),u},u.format=function(n){if(0===arguments.length)return r.format;if("string"!=typeof n&&("boolean"!=typeof n||n!==!1))throw new TypeError("format() expects a sting or boolean:false parameter "+n);return r.format=n,y&&lt(),u},u.dayViewHeaderFormat=function(n){if(0===arguments.length)return r.dayViewHeaderFormat;if("string"!=typeof n)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return r.dayViewHeaderFormat=n,u},u.extraFormats=function(n){if(0===arguments.length)return r.extraFormats;if(n!==!1&&!(n instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return r.extraFormats=n,tt&&lt(),u},u.disabledDates=function(t){if(0===arguments.length)return r.disabledDates?n.extend({},r.disabledDates):r.disabledDates;if(!t)return r.disabledDates=!1,a(),u;if(!(t instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return r.disabledDates=ii(t),r.enabledDates=!1,a(),u},u.enabledDates=function(t){if(0===arguments.length)return r.enabledDates?n.extend({},r.enabledDates):r.enabledDates;if(!t)return r.enabledDates=!1,a(),u;if(!(t instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return r.enabledDates=ii(t),r.disabledDates=!1,a(),u},u.daysOfWeekDisabled=function(n){if(0===arguments.length)return r.daysOfWeekDisabled.splice(0);if("boolean"==typeof n&&!n)return r.daysOfWeekDisabled=!1,a(),u;if(!(n instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(r.daysOfWeekDisabled=n.reduce(function(n,t){return t=parseInt(t,10),t>6||0>t||isNaN(t)?n:(-1===n.indexOf(t)&&n.push(t),n)},[]).sort(),r.useCurrent&&!r.keepInvalid){for(var t=0;!c(e,"d");){if(e.add(1,"d"),7===t)throw"Tried 7 times to find a valid date";t++}h(e)}return a(),u},u.maxDate=function(n){if(0===arguments.length)return r.maxDate?r.maxDate.clone():r.maxDate;if("boolean"==typeof n&&n===!1)return r.maxDate=!1,a(),u;"string"==typeof n&&("now"===n||"moment"===n)&&(n=t());var i=nt(n);if(!i.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+n);if(r.minDate&&i.isBefore(r.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+i.format(y));return r.maxDate=i,r.useCurrent&&!r.keepInvalid&&e.isAfter(n)&&h(r.maxDate),o.isAfter(i)&&(o=i.clone().subtract(r.stepping,"m")),a(),u},u.minDate=function(n){if(0===arguments.length)return r.minDate?r.minDate.clone():r.minDate;if("boolean"==typeof n&&n===!1)return r.minDate=!1,a(),u;"string"==typeof n&&("now"===n||"moment"===n)&&(n=t());var i=nt(n);if(!i.isValid())throw new TypeError("minDate() Could not parse date parameter: "+n);if(r.maxDate&&i.isAfter(r.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+i.format(y));return r.minDate=i,r.useCurrent&&!r.keepInvalid&&e.isBefore(n)&&h(r.minDate),o.isBefore(i)&&(o=i.clone().add(r.stepping,"m")),a(),u},u.defaultDate=function(n){if(0===arguments.length)return r.defaultDate?r.defaultDate.clone():r.defaultDate;if(!n)return r.defaultDate=!1,u;"string"==typeof n&&("now"===n||"moment"===n)&&(n=t());var i=nt(n);if(!i.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+n);if(!c(i))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return r.defaultDate=i,(r.defaultDate&&r.inline||""===s.val().trim()&&void 0===s.attr("placeholder"))&&h(r.defaultDate),u},u.locale=function(n){if(0===arguments.length)return r.locale;if(!t.localeData(n))throw new TypeError("locale() locale "+n+" is not loaded from moment locales!");return r.locale=n,e.locale(r.locale),o.locale(r.locale),y&&lt(),f&&(v(),w()),u},u.stepping=function(n){return 0===arguments.length?r.stepping:(n=parseInt(n,10),(isNaN(n)||1>n)&&(n=1),r.stepping=n,u)},u.useCurrent=function(n){var t=["year","month","day","hour","minute"];if(0===arguments.length)return r.useCurrent;if("boolean"!=typeof n&&"string"!=typeof n)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof n&&-1===t.indexOf(n.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return r.useCurrent=n,u},u.collapse=function(n){if(0===arguments.length)return r.collapse;if("boolean"!=typeof n)throw new TypeError("collapse() expects a boolean parameter");return r.collapse===n?u:(r.collapse=n,f&&(v(),w()),u)},u.icons=function(t){if(0===arguments.length)return n.extend({},r.icons);if(!(t instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return n.extend(r.icons,t),f&&(v(),w()),u},u.tooltips=function(t){if(0===arguments.length)return n.extend({},r.tooltips);if(!(t instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return n.extend(r.tooltips,t),f&&(v(),w()),u},u.useStrict=function(n){if(0===arguments.length)return r.useStrict;if("boolean"!=typeof n)throw new TypeError("useStrict() expects a boolean parameter");return r.useStrict=n,u},u.sideBySide=function(n){if(0===arguments.length)return r.sideBySide;if("boolean"!=typeof n)throw new TypeError("sideBySide() expects a boolean parameter");return r.sideBySide=n,f&&(v(),w()),u},u.viewMode=function(n){if(0===arguments.length)return r.viewMode;if("string"!=typeof n)throw new TypeError("viewMode() expects a string parameter");if(-1===at.indexOf(n))throw new TypeError("viewMode() parameter must be one of ("+at.join(", ")+") value");return r.viewMode=n,b=Math.max(at.indexOf(n),g),ut(),u},u.toolbarPlacement=function(n){if(0===arguments.length)return r.toolbarPlacement;if("string"!=typeof n)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===bt.indexOf(n))throw new TypeError("toolbarPlacement() parameter must be one of ("+bt.join(", ")+") value");return r.toolbarPlacement=n,f&&(v(),w()),u},u.widgetPositioning=function(t){if(0===arguments.length)return n.extend({},r.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===wt.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+wt.join(", ")+")");r.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===pt.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+pt.join(", ")+")");r.widgetPositioning.vertical=t.vertical}return a(),u},u.calendarWeeks=function(n){if(0===arguments.length)return r.calendarWeeks;if("boolean"!=typeof n)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return r.calendarWeeks=n,a(),u},u.showTodayButton=function(n){if(0===arguments.length)return r.showTodayButton;if("boolean"!=typeof n)throw new TypeError("showTodayButton() expects a boolean parameter");return r.showTodayButton=n,f&&(v(),w()),u},u.showClear=function(n){if(0===arguments.length)return r.showClear;if("boolean"!=typeof n)throw new TypeError("showClear() expects a boolean parameter");return r.showClear=n,f&&(v(),w()),u},u.widgetParent=function(t){if(0===arguments.length)return r.widgetParent;if("string"==typeof t&&(t=n(t)),null!==t&&"string"!=typeof t&&!(t instanceof n))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return r.widgetParent=t,f&&(v(),w()),u},u.keepOpen=function(n){if(0===arguments.length)return r.keepOpen;if("boolean"!=typeof n)throw new TypeError("keepOpen() expects a boolean parameter");return r.keepOpen=n,u},u.focusOnShow=function(n){if(0===arguments.length)return r.focusOnShow;if("boolean"!=typeof n)throw new TypeError("focusOnShow() expects a boolean parameter");return r.focusOnShow=n,u},u.inline=function(n){if(0===arguments.length)return r.inline;if("boolean"!=typeof n)throw new TypeError("inline() expects a boolean parameter");return r.inline=n,u},u.clear=function(){return dt(),u},u.keyBinds=function(n){return r.keyBinds=n,u},u.debug=function(n){if("boolean"!=typeof n)throw new TypeError("debug() expects a boolean parameter");return r.debug=n,u},u.allowInputToggle=function(n){if(0===arguments.length)return r.allowInputToggle;if("boolean"!=typeof n)throw new TypeError("allowInputToggle() expects a boolean parameter");return r.allowInputToggle=n,u},u.showClose=function(n){if(0===arguments.length)return r.showClose;if("boolean"!=typeof n)throw new TypeError("showClose() expects a boolean parameter");return r.showClose=n,u},u.keepInvalid=function(n){if(0===arguments.length)return r.keepInvalid;if("boolean"!=typeof n)throw new TypeError("keepInvalid() expects a boolean parameter");return r.keepInvalid=n,u},u.datepickerInput=function(n){if(0===arguments.length)return r.datepickerInput;if("string"!=typeof n)throw new TypeError("datepickerInput() expects a string parameter");return r.datepickerInput=n,u},u.parseInputDate=function(n){if(0===arguments.length)return r.parseInputDate;if("function"!=typeof n)throw new TypeError("parseInputDate() sholud be as function");return r.parseInputDate=n,u},u.disabledTimeIntervals=function(t){if(0===arguments.length)return r.disabledTimeIntervals?n.extend({},r.disabledTimeIntervals):r.disabledTimeIntervals;if(!t)return r.disabledTimeIntervals=!1,a(),u;if(!(t instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return r.disabledTimeIntervals=t,a(),u},u.disabledHours=function(t){if(0===arguments.length)return r.disabledHours?n.extend({},r.disabledHours):r.disabledHours;if(!t)return r.disabledHours=!1,a(),u;if(!(t instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(r.disabledHours=ri(t),r.enabledHours=!1,r.useCurrent&&!r.keepInvalid){for(var i=0;!c(e,"h");){if(e.add(1,"h"),24===i)throw"Tried 24 times to find a valid date";i++}h(e)}return a(),u},u.enabledHours=function(t){if(0===arguments.length)return r.enabledHours?n.extend({},r.enabledHours):r.enabledHours;if(!t)return r.enabledHours=!1,a(),u;if(!(t instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(r.enabledHours=ri(t),r.disabledHours=!1,r.useCurrent&&!r.keepInvalid){for(var i=0;!c(e,"h");){if(e.add(1,"h"),24===i)throw"Tried 24 times to find a valid date";i++}h(e)}return a(),u},u.viewDate=function(n){if(0===arguments.length)return o.clone();if(!n)return o=e.clone(),u;if(!("string"==typeof n||t.isMoment(n)||n instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return o=nt(n),rt(),u},i.is("input"))s=i;else if(s=i.find(r.datepickerInput),0===s.size())s=i.find("input");else if(!s.is("input"))throw new Error('CSS class "'+r.datepickerInput+'" cannot be applied to non input element');if(i.hasClass("input-group")&&(l=0===i.find(".datepickerbutton").size()?i.find(".input-group-addon"):i.find(".datepickerbutton")),!r.inline&&!s.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return n.extend(!0,r,hi()),u.options(r),lt(),rr(),s.prop("disabled")&&u.disable(),s.is("input")&&0!==s.val().trim().length?h(nt(s.val().trim())):r.defaultDate&&void 0===s.attr("placeholder")&&h(r.defaultDate),r.inline&&w(),u};n.fn.datetimepicker=function(t){return this.each(function(){var r=n(this);r.data("DateTimePicker")||(t=n.extend(!0,{},n.fn.datetimepicker.defaults,t),r.data("DateTimePicker",i(r,t)))})},n.fn.datetimepicker.defaults={format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:t.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().subtract(7,"d")):this.date(i.clone().add(this.stepping(),"m"))}},down:function(n){if(!n)return void this.show();var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().add(7,"d")):this.date(i.clone().subtract(this.stepping(),"m"))},"control up":function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().subtract(1,"y")):this.date(i.clone().add(1,"h"))}},"control down":function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")?this.date(i.clone().add(1,"y")):this.date(i.clone().subtract(1,"h"))}},left:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().subtract(1,"d"))}},right:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().add(1,"d"))}},pageUp:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().subtract(1,"M"))}},pageDown:function(n){if(n){var i=this.date()||t();n.find(".datepicker").is(":visible")&&this.date(i.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(n){n.find(".timepicker").is(":visible")&&n.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(t())},"delete":function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}}),!function(){var n=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function d(n){function f(n){var i=n.charCodeAt(0),t;return i!==92?i:(t=n.charAt(1),(i=a[t])?i:"0"<=t&&t<="7"?parseInt(n.substring(1),8):t==="u"||t==="x"?parseInt(n.substring(2),16):n.charCodeAt(1))}function r(n){return n<32?(n<16?"\\x0":"\\x")+n.toString(16):(n=String.fromCharCode(n),n==="\\"||n==="-"||n==="]"||n==="^"?"\\"+n:n)}function h(n){var u=n.substring(1,n.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),n=[],i=u[0]==="^",s=["["],e,t,o;for(i&&s.push("^"),i=i?1:0,e=u.length;i<e;++i)t=u[i],/\\[bdsw]/i.test(t)?s.push(t):(t=f(t),i+2<e&&"-"===u[i+1]?(o=f(u[i+2]),i+=2):o=t,n.push([t,o]),o<65||t>122||(o<65||t>90||n.push([Math.max(65,t)|32,Math.min(o,90)|32]),o<97||t>122||n.push([Math.max(97,t)&-33,Math.min(o,122)&-33])));for(n.sort(function(n,t){return n[0]-t[0]||t[1]-n[1]}),u=[],e=[],i=0;i<n.length;++i)t=n[i],t[0]<=e[1]+1?e[1]=Math.max(e[1],t[1]):u.push(e=t);for(i=0;i<u.length;++i)t=u[i],s.push(r(t[0])),t[1]>t[0]&&(t[1]+1>t[0]&&s.push("-"),s.push(r(t[1])));return s.push("]"),s.join("")}function c(n){for(var i,u=n.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),s=u.length,f=[],t=0,o=0;t<s;++t)i=u[t],i==="("?++o:"\\"===i.charAt(0)&&(i=+i.substring(1))&&(i<=o?f[i]=-1:u[t]=r(i));for(t=1;t<f.length;++t)-1===f[t]&&(f[t]=++l);for(o=t=0;t<s;++t)i=u[t],i==="("?(++o,f[o]||(u[t]="(?:")):"\\"===i.charAt(0)&&(i=+i.substring(1))&&i<=o&&(u[t]="\\"+f[i]);for(t=0;t<s;++t)"^"===u[t]&&"^"!==u[t+1]&&(u[t]="");if(n.ignoreCase&&e)for(t=0;t<s;++t)i=u[t],n=i.charAt(0),i.length>=2&&n==="["?u[t]=h(i):n!=="\\"&&(u[t]=i.replace(/[A-Za-z]/g,function(n){return n=n.charCodeAt(0),"["+String.fromCharCode(n&-33,n|32)+"]"}));return u.join("")}for(var t,l=0,e=!1,u=!1,i=0,s=n.length;i<s;++i)if(t=n[i],t.ignoreCase)u=!0;else if(/[a-z]/i.test(t.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){e=!0,u=!1;break}for(var a={b:8,t:9,n:10,v:11,f:12,r:13},o=[],i=0,s=n.length;i<s;++i){if(t=n[i],t.global||t.multiline)throw Error(""+t);o.push("(?:"+c(t)+")")}return RegExp(o.join("|"),u?"gi":"g")}function g(n,t){function e(n){var s=n.nodeType;if(s==1){if(!o.test(n.className)){for(s=n.firstChild;s;s=s.nextSibling)e(s);s=n.nodeName.toLowerCase(),("br"===s||"li"===s)&&(u[i]="\n",r[i<<1]=f++,r[i++<<1|1]=n)}}else(s==3||s==4)&&(s=n.nodeValue,s.length&&(s=t?s.replace(/\r\n?/g,"\n"):s.replace(/[\t\n\r ]+/g," "),u[i]=s,r[i<<1]=f,f+=s.length,r[i++<<1|1]=n))}var o=/(?:^|\s)nocode(?:\s|$)/,u=[],f=0,r=[],i=0;return e(n),{a:u.join("").replace(/\n$/,""),d:r}}function s(n,t,i,r){t&&(n={a:t,e:n},i(n),r.push.apply(r,n.g))}function nt(n){for(var r,i=void 0,t=n.firstChild;t;t=t.nextSibling)r=t.nodeType,i=r===1?i?n:t:r===3?it.test(t.nodeValue)?n:i:i;if(i!==n)return i}function u(t,i){function r(n){for(var h,p,w,v=n.e,y=[v,"pln"],k=0,d=n.a.match(f)||[],g={},b=0,nt=d.length;b<nt;++b){var l=d[b],o=g[l],a=void 0,t;if(typeof o=="string")t=!1;else{if(h=u[l.charAt(0)],h)a=l.match(h[1]),o=h[0];else{for(t=0;t<e;++t)if(h=i[t],a=l.match(h[1])){o=h[0];break}a||(o="pln")}(t=o.length>=5&&"lang-"===o.substring(0,5))&&!(a&&typeof a[1]=="string")&&(t=!1,o="src"),t||(g[l]=o)}h=k,k+=l.length,t?(t=a[1],p=l.indexOf(t),w=p+t.length,a[2]&&(w=l.length-a[2].length,p=w-t.length),o=o.substring(5),s(v+h,l.substring(0,p),r,y),s(v+h+p,t,c(o,t),y),s(v+h+w,l.substring(w),r,y)):y.push(v+h,o)}n.g=y}var u={},f,e;return function(){for(var r,e,h,c=t.concat(i),o=[],l={},s=0,a=c.length;s<a;++s){if(r=c[s],e=r[3],e)for(h=e.length;--h>=0;)u[e.charAt(h)]=r;r=r[1],e=""+r,l.hasOwnProperty(e)||(o.push(r),l[e]=n)}o.push(/[\S\s]/),f=d(o)}(),e=i.length,r}function i(t){var f=[],r=[],i,e;return t.tripleQuotedStrings?f.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,n,"'\""]):t.multiLineStrings?f.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,n,"'\"`"]):f.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,n,"\"'"]),t.verbatimStrings&&r.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,n]),i=t.hashComments,i&&(t.cStyleComments?(i>1?f.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,n,"#"]):f.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,n,"#"]),r.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,n])):f.push(["com",/^#[^\n\r]*/,n,"#"])),t.cStyleComments&&(r.push(["com",/^\/\/[^\n\r]*/,n]),r.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,n])),(i=t.regexLiterals)&&(e=(i=i>1?"":"\n\r")?".":"[\\S\\s]",r.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+i+"])(?:[^/\\x5B\\x5C"+i+"]|\\x5C"+e+"|\\x5B(?:[^\\x5C\\x5D"+i+"]|\\x5C"+e+")*(?:\\x5D|$))+/")+")")])),(i=t.types)&&r.push(["typ",i]),i=(""+t.keywords).replace(/^ | $/g,""),i.length&&r.push(["kwd",RegExp("^(?:"+i.replace(/[\s,]+/g,"|")+")\\b"),n]),f.push(["pln",/^\s+/,n," \r\n\t "]),i="^.[^\\s\\w.$@'\"`/\\\\]*",t.regexLiterals&&(i+="(?!s*/)"),r.push(["lit",/^@[$_a-z][\w$@]*/i,n],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,n],["pln",/^[$_a-z][\w$@]*/i,n],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,n,"0123456789"],["pln",/^\\[\S\s]?/,n],["pun",RegExp(i),n]),u(f,r)}function h(n,t,i){function s(n){var t=n.nodeType,r,u;if(t!=1||c.test(n.className))(t==3||t==4)&&i&&(r=n.nodeValue,u=r.match(l),u&&(t=r.substring(0,u.index),n.nodeValue=t,(r=r.substring(u.index+u[0].length))&&n.parentNode.insertBefore(e.createTextNode(r),n.nextSibling),h(n),t||n.parentNode.removeChild(n)));else if("br"===n.nodeName)h(n),n.parentNode&&n.parentNode.removeChild(n);else for(n=n.firstChild;n;n=n.nextSibling)s(n)}function h(n){function i(n,t){var e=t?n.cloneNode(!1):n,r=n.parentNode,f,u;if(r)for(r=i(r,1),f=n.nextSibling,r.appendChild(e),u=f;u;u=f)f=u.nextSibling,r.appendChild(u);return e}for(;!n.nextSibling;)if(n=n.parentNode,!n)return;for(var n=i(n.nextSibling,0),t;(t=n.parentNode)&&t.nodeType===1;)n=t;f.push(n)}for(var f,r,o,c=/(?:^|\s)nocode(?:\s|$)/,l=/\r\n?|\n/,e=n.ownerDocument,u=e.createElement("li");n.firstChild;)u.appendChild(n.firstChild);for(f=[u],r=0;r<f.length;++r)s(f[r]);t===(t|0)&&f[0].setAttribute("value",t),o=e.createElement("ol"),o.className="linenums";for(var t=Math.max(0,t-1|0)||0,r=0,a=f.length;r<a;++r)u=f[r],u.className="L"+(r+t)%10,u.firstChild||u.appendChild(e.createTextNode(" ")),o.appendChild(u);n.appendChild(o)}function t(n,t){for(var i,r=t.length;--r>=0;)i=t[r],o.hasOwnProperty(i)?f.console&&console.warn("cannot override language handler %s",i):o[i]=n}function c(n,t){return n&&o.hasOwnProperty(n)||(n=/^\s*</.test(t)?"default-markup":"default-code"),o[n]}function l(n){var it=n.h,r,u,e,i,h,ut,nt,a,tt;try{r=g(n.c,n.i),u=r.a,n.a=u,n.d=r.d,n.e=0,c(it,u)(n);var w=/\bMSIE\s(\d+)/.exec(navigator.userAgent),w=w&&+w[1]<=8,it=/\n/g,b=n.a,k=b.length,r=0,v=n.d,et=v.length,u=0,t=n.g,l=t.length,d=0;for(t[l]=k,i=e=0;i<l;)t[i]!==t[i+2]?(t[e++]=t[i++],t[e++]=t[i++]):i+=2;for(l=e,i=e=0;i<l;){for(var ot=t[i],rt=t[i+1],s=i+2;s+2<=l&&t[s+1]===rt;)s+=2;t[e++]=ot,t[e++]=rt,i=s}t.length=e,h=n.c,h&&(ut=h.style.display,h.style.display="none");try{for(;u<et;){var y=v[u+2]||k,ft=t[d+2]||k,s=Math.min(y,ft),o=v[u+1],p;o.nodeType!==1&&(p=b.substring(r,s))&&(w&&(p=p.replace(it,"\r")),o.nodeValue=p,nt=o.ownerDocument,a=nt.createElement("span"),a.className=t[d+1],tt=o.parentNode,tt.replaceChild(a,o),a.appendChild(o),r<y&&(v[u+1]=o=nt.createTextNode(b.substring(s,y)),tt.insertBefore(o,a.nextSibling))),r=s,r>=y&&(u+=2),r>=ft&&(d+=2)}}finally{h&&(h.style.display=ut)}}catch(st){f.console&&console.log(st&&st.stack||st)}}var f=window,r=["break,continue,do,else,for,if,return,while"],e=[[r,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],a=[e,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],v=[e,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],y=[v,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],e=[e,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],p=[r,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],w=[r,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],tt=[r,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],r=[r,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],b=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,it=/\S/,rt=i({keywords:[a,y,e,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",p,w,r],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),o={},k;t(rt,["default-code"]),t(u([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),t(u([["pln",/^\s+/,n," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,n,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),t(u([],[["atv",/^[\S\s]+/]]),["uq.val"]),t(i({keywords:a,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),t(i({keywords:"null,true,false"}),["json"]),t(i({keywords:y,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),t(i({keywords:v,cStyleComments:!0}),["java"]),t(i({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),t(i({keywords:p,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),t(i({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),t(i({keywords:w,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),t(i({keywords:e,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]),t(i({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),t(i({keywords:tt,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]),t(u([],[["str",/^[\S\s]+/]]),["regex"]),k=f.PR={createSimpleLexer:u,registerLangHandler:t,sourceDecorator:i,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:f.prettyPrintOne=function(n,t,i){var r=document.createElement("div");return r.innerHTML="<pre>"+n+"<\/pre>",r=r.firstChild,i&&h(r,i,!0),l({h:t,j:i,c:r,i:1}),r.innerHTML},prettyPrint:f.prettyPrint=function(t,i){function a(){for(var i,r,ut,ft=f.PR_SHOULD_USE_CONTINUATION?u.now()+250:Infinity;c<e.length&&u.now()<ft;c++){for(var s=e[c],rt=b,v=s;v=v.previousSibling;){if(r=v.nodeType,i=(r===7||r===8)&&v.nodeValue,i?!/^\??prettify\b/.test(i):r!==3||/\S/.test(v.nodeValue))break;if(i){rt={},i.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(n,t,i){rt[t]=i});break}}if(v=s.className,(rt!==b||w.test(v))&&!d.test(v)){for(r=!1,i=s.parentNode;i;i=i.parentNode)if(it.test(i.tagName)&&i.className&&w.test(i.className)){r=!0;break}if(!r){if(s.className+=" prettyprinted",r=rt.lang,r||(r=v.match(p),!r&&(ut=nt(s))&&tt.test(ut.tagName)&&(r=ut.className.match(p)),r&&(r=r[1])),g.test(s.tagName))i=1;else var i=s.currentStyle,o=k.defaultView,i=(i=i?i.whiteSpace:o&&o.getComputedStyle?o.getComputedStyle(s,n).getPropertyValue("white-space"):0)&&"pre"===i.substring(0,3);o=rt.linenums,(o=o==="true"||+o)||(o=(o=v.match(/\blinenums\b(?::(\d+))?/))?o[1]&&o[1].length?+o[1]:!0:!1),o&&h(s,o,i),y={h:r,c:s,j:o,i:i},l(y)}}}c<e.length?setTimeout(a,250):"function"==typeof t&&t()}for(var s,v,u,r=i||document.body,k=r.ownerDocument||document,r=[r.getElementsByTagName("pre"),r.getElementsByTagName("code"),r.getElementsByTagName("xmp")],e=[],o=0;o<r.length;++o)for(s=0,v=r[o].length;s<v;++s)e.push(r[o][s]);r=n,u=Date,u.now||(u={now:function(){return+new Date}});var c=0,y,p=/\blang(?:uage)?-([\w.]+)(?!\S)/,w=/\bprettyprint\b/,d=/\bprettyprinted\b/,g=/pre|xmp/i,tt=/^code$/i,it=/^(?:pre|code|xmp)$/i,b={};a()}},typeof define=="function"&&define.amd&&define("google-code-prettify",[],function(){return k})}()}(),function(){function n(t,i,r){if(typeof t!="string")throw new TypeError("Expected string, got: "+t);if(arguments.length==2&&(r=i),t in n.modules)throw new Error("Module already defined: "+t);n.modules[t]=r}function t(){this.modules={},this._currentModule=null}n.modules={},function(){function i(n){for(var t=n.split("/"),i=1;i<t.length;)t[i]===".."?t.splice(i-1,1):t[i]==="."?t.splice(i,1):i++;return t.join("/")}function r(n,t){return n=n.trim(),t=t.trim(),/^\//.test(t)?t:n.replace(/\/*$/,"/")+t}function u(n){var t=n.split("/");return t.pop(),t.join("/")}t.prototype.require=function(n,t){if(Array.isArray(n)){var i=n.map(function(n){return this.lookup(n)},this);return t&&t.apply(null,i),undefined}return this.lookup(n)},t.prototype.lookup=function(t){var f,e,o;if(/^\./.test(t)&&(t=i(r(u(this._currentModule),t))),t in this.modules)return f=this.modules[t];if(t in n.modules)return f=n.modules[t],typeof f=="function"&&(e={},o=this._currentModule,this._currentModule=t,f(this.require.bind(this),e,{id:t,uri:""}),this._currentModule=o,f=e),this.modules[t]=f,f;throw new Error("Module not defined: "+t);}}(),n.Domain=t,n.globalDomain=new t;var i=n.globalDomain.require.bind(n.globalDomain);n("source-map/source-map-consumer",["require","exports","module","source-map/util","source-map/binary-search","source-map/array-set","source-map/base64-vlq"],function(n,t){function u(n){var t=n;typeof n=="string"&&(t=JSON.parse(n.replace(/^\)\]\}'/,"")));var i=r.getArg(t,"version"),u=r.getArg(t,"sources"),f=r.getArg(t,"names",[]),o=r.getArg(t,"sourceRoot",null),s=r.getArg(t,"sourcesContent",null),h=r.getArg(t,"mappings"),c=r.getArg(t,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);this._names=e.fromArray(f,!0),this._sources=e.fromArray(u,!0),this.sourceRoot=o,this.sourcesContent=s,this._mappings=h,this.file=c}var r=n("./util"),o=n("./binary-search"),e=n("./array-set").ArraySet,f=n("./base64-vlq");u.fromSourceMap=function(n){var t=Object.create(u.prototype);return t._names=e.fromArray(n._names.toArray(),!0),t._sources=e.fromArray(n._sources.toArray(),!0),t.sourceRoot=n._sourceRoot,t.sourcesContent=n._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=n._file,t.__generatedMappings=n._mappings.slice().sort(r.compareByGeneratedPositions),t.__originalMappings=n._mappings.slice().sort(r.compareByOriginalPositions),t},u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._sources.toArray().map(function(n){return this.sourceRoot!=null?r.join(this.sourceRoot,n):n},this)}}),u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),u.prototype._nextCharIsMappingSeparator=function(n){var t=n.charAt(0);return t===";"||t===","},u.prototype._parseMappings=function(n){for(var s=1,o=0,h=0,c=0,l=0,a=0,i=n,u={},e;i.length>0;)if(i.charAt(0)===";")s++,i=i.slice(1),o=0;else if(i.charAt(0)===",")i=i.slice(1);else{if(e={},e.generatedLine=s,f.decode(i,u),e.generatedColumn=o+u.value,o=e.generatedColumn,i=u.rest,i.length>0&&!this._nextCharIsMappingSeparator(i)){if(f.decode(i,u),e.source=this._sources.at(l+u.value),l+=u.value,i=u.rest,i.length===0||this._nextCharIsMappingSeparator(i))throw new Error("Found a source, but no line and column");if(f.decode(i,u),e.originalLine=h+u.value,h=e.originalLine,e.originalLine+=1,i=u.rest,i.length===0||this._nextCharIsMappingSeparator(i))throw new Error("Found a source and line, but no column");f.decode(i,u),e.originalColumn=c+u.value,c=e.originalColumn,i=u.rest,i.length>0&&!this._nextCharIsMappingSeparator(i)&&(f.decode(i,u),e.name=this._names.at(a+u.value),a+=u.value,i=u.rest)}this.__generatedMappings.push(e),typeof e.originalLine=="number"&&this.__originalMappings.push(e)}this.__generatedMappings.sort(r.compareByGeneratedPositions),this.__originalMappings.sort(r.compareByOriginalPositions)},u.prototype._findMapping=function(n,t,i,r,u){if(n[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[i]);if(n[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[r]);return o.search(n,t,u)},u.prototype.originalPositionFor=function(n){var u={generatedLine:r.getArg(n,"line"),generatedColumn:r.getArg(n,"column")},t=this._findMapping(u,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositions),i;return t&&t.generatedLine===u.generatedLine?(i=r.getArg(t,"source",null),i!=null&&this.sourceRoot!=null&&(i=r.join(this.sourceRoot,i)),{source:i,line:r.getArg(t,"originalLine",null),column:r.getArg(t,"originalColumn",null),name:r.getArg(t,"name",null)}):{source:null,line:null,column:null,name:null}},u.prototype.sourceContentFor=function(n){var t,i;if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if(this.sourceRoot!=null&&(t=r.urlParse(this.sourceRoot))){if(i=n.replace(/^file:\/\//,""),t.scheme=="file"&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!t.path||t.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}throw new Error('"'+n+'" is not in the SourceMap.');},u.prototype.generatedPositionFor=function(n){var i={source:r.getArg(n,"source"),originalLine:r.getArg(n,"line"),originalColumn:r.getArg(n,"column")},t;return this.sourceRoot!=null&&(i.source=r.relative(this.sourceRoot,i.source)),t=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions),t?{line:r.getArg(t,"generatedLine",null),column:r.getArg(t,"generatedColumn",null)}:{line:null,column:null}},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.prototype.eachMapping=function(n,t,i){var o=t||null,s=i||u.GENERATED_ORDER,f,e;switch(s){case u.GENERATED_ORDER:f=this._generatedMappings;break;case u.ORIGINAL_ORDER:f=this._originalMappings;break;default:throw new Error("Unknown order of iteration.");}e=this.sourceRoot,f.map(function(n){var t=n.source;return t!=null&&e!=null&&(t=r.join(e,t)),{source:t,generatedLine:n.generatedLine,generatedColumn:n.generatedColumn,originalLine:n.originalLine,originalColumn:n.originalColumn,name:n.name}}).forEach(n,o)},t.SourceMapConsumer=u}),n("source-map/util",["require","exports","module"],function(n,t){function o(n,t,i){if(t in n)return n[t];if(arguments.length===3)return i;throw new Error('"'+t+'" is a required argument.');}function r(n){var t=n.match(y);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function u(n){var t="";return n.scheme&&(t+=n.scheme+":"),t+="//",n.auth&&(t+=n.auth+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port),n.path&&(t+=n.path),t}function e(n){var t=n,e=r(n),h,i,s,o,f;if(e){if(!e.path)return n;t=e.path}for(h=t.charAt(0)==="/",i=t.split(/\/+/),o=0,f=i.length-1;f>=0;f--)s=i[f],s==="."?i.splice(f,1):s===".."?o++:o>0&&(s===""?(i.splice(f+1,o),o=0):(i.splice(f,2),o--));return t=i.join("/"),t===""&&(t=h?"/":"."),e?(e.path=t,u(e)):t}function s(n,t){var f,i,o;return(n===""&&(n="."),t===""&&(t="."),f=r(t),i=r(n),i&&(n=i.path||"/"),f&&!f.scheme)?(i&&(f.scheme=i.scheme),u(f)):f||t.match(p)?t:i&&!i.host&&!i.path?(i.host=t,u(i)):(o=t.charAt(0)==="/"?t:e(n.replace(/\/+$/,"")+"/"+t),i?(i.path=o,u(i)):o)}function h(n,t){n===""&&(n="."),n=n.replace(/\/$/,"");var i=r(n);return t.charAt(0)=="/"&&i&&i.path=="/"?t.slice(1):t.indexOf(n+"/")===0?t.substr(n.length+1):t}function c(n){return"$"+n}function l(n){return n.substr(1)}function f(n,t){var i=n||"",r=t||"";return(i>r)-(i<r)}function a(n,t,i){var r;return r=f(n.source,t.source),r?r:(r=n.originalLine-t.originalLine,r?r:(r=n.originalColumn-t.originalColumn,r||i?r:(r=f(n.name,t.name),r?r:(r=n.generatedLine-t.generatedLine,r?r:n.generatedColumn-t.generatedColumn))))}function v(n,t,i){var r;return r=n.generatedLine-t.generatedLine,r?r:(r=n.generatedColumn-t.generatedColumn,r||i?r:(r=f(n.source,t.source),r?r:(r=n.originalLine-t.originalLine,r?r:(r=n.originalColumn-t.originalColumn,r?r:f(n.name,t.name)))))}t.getArg=o;var y=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,p=/^data:.+\,.+$/;t.urlParse=r,t.urlGenerate=u,t.normalize=e,t.join=s,t.relative=h,t.toSetString=c,t.fromSetString=l,t.compareByOriginalPositions=a,t.compareByGeneratedPositions=v}),n("source-map/binary-search",["require","exports","module"],function(n,t){function r(n,t,i,u,f){var e=Math.floor((t-n)/2)+n,o=f(i,u[e],!0);return o===0?u[e]:o>0?t-e>1?r(e,t,i,u,f):u[e]:e-n>1?r(n,e,i,u,f):n<0?null:u[n]}t.search=function(n,t,i){return t.length>0?r(-1,t.length,n,t,i):null}}),n("source-map/array-set",["require","exports","module","source-map/util"],function(n,t){function r(){this._array=[],this._set={}}var u=n("./util");r.fromArray=function(n,t){for(var u=new r,i=0,f=n.length;i<f;i++)u.add(n[i],t);return u},r.prototype.add=function(n,t){var i=this.has(n),r=this._array.length;(!i||t)&&this._array.push(n),i||(this._set[u.toSetString(n)]=r)},r.prototype.has=function(n){return Object.prototype.hasOwnProperty.call(this._set,u.toSetString(n))},r.prototype.indexOf=function(n){if(this.has(n))return this._set[u.toSetString(n)];throw new Error('"'+n+'" is not in the set.');},r.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n);},r.prototype.toArray=function(){return this._array.slice()},t.ArraySet=r}),n("source-map/base64-vlq",["require","exports","module","source-map/base64"],function(n,t){function s(n){return n<0?(-n<<1)+1:(n<<1)+0}function h(n){var i=(n&1)==1,t=n>>1;return i?-t:t}var u=n("./base64"),r=5,f=1<<r,e=f-1,o=f;t.encode=function(n){var f="",i,t=s(n);do i=t&e,t>>>=r,t>0&&(i|=o),f+=u.encode(i);while(t>0);return f},t.decode=function(n,t){var f=0,a=n.length,s=0,c=0,l,i;do{if(f>=a)throw new Error("Expected more digits in base 64 VLQ value.");i=u.decode(n.charAt(f++)),l=!!(i&o),i&=e,s+=i<<c,c+=r}while(l);t.value=h(s),t.rest=n.slice(f)}}),n("source-map/base64",["require","exports","module"],function(n,t){var r={},u={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(n,t){r[n]=t,u[t]=n}),t.encode=function(n){if(n in u)return u[n];throw new TypeError("Must be between 0 and 63: "+n);},t.decode=function(n){if(n in r)return r[n];throw new TypeError("Not a valid base 64 digit: "+n);}}),this.sourceMap={SourceMapConsumer:i("source-map/source-map-consumer").SourceMapConsumer}}(),function(){var t=function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})},t.r=function(n){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,i){var r,u;if((i&1&&(n=t(n)),i&8)||i&4&&typeof n=="object"&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),i&2&&typeof n!="string")for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)}([function(n,t,i){"use strict";function u(n,t){var i=new r(n,t);return i.beautify()}var r=i(1).Beautifier;n.exports=u},function(n,t,i){"use strict";function b(n,t){t.multiline_frame||t.mode===u.ForInitializer||t.mode===u.Conditional||n.remove_indent(t.start_line_index)}function f(n,t){return t.indexOf(n)!==-1}function it(n){return n.replace(/^\s+/g,"")}function rt(n){for(var i={},t=0;t<n.length;t++)i[n[t].replace(/-/g,"_")]=n[t];return i}function s(n,t){return n&&n.type===r.RESERVED&&n.text===t}function o(n,t){return n&&n.type===r.RESERVED&&f(n.text,t)}function ft(n){n=n.replace(y.allLineBreaks,"\n");for(var i=[],t=n.indexOf("\n");t!==-1;)i.push(n.substring(0,t)),n=n.substring(t+1),t=n.indexOf("\n");return n.length&&i.push(n),i}function h(n){return n===u.ArrayLiteral}function v(n){return f(n,[u.Expression,u.ForInitializer,u.Conditional])}function et(n,t){for(var r,i=0;i<n.length;i++)if(r=n[i].trim(),r.charAt(0)!==t)return!1;return!0}function ot(n,t){for(var i=0,u=n.length,r;i<u;i++)if(r=n[i],r&&r.indexOf(t)!==0)return!1;return!0}function e(n,t){t=t||{},this._source_text=n||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new nt(t)}var d=i(2).Output,g=i(3).Token,y=i(4),nt=i(5).Options,tt=i(7).Tokenizer,c=i(7).line_starters,l=i(7).positionable_operators,r=i(7).TOKEN,p=["case","return","do","if","throw","else","await","break","continue","async"],ut=["before-newline","after-newline","preserve-newline"],a=rt(ut),k=[a.before_newline,a.preserve_newline],u={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"},w;e.prototype.create_flags=function(n,t){var i=0,u;return n&&(i=n.indentation_level,!this._output.just_added_newline()&&n.line_indent_level>i&&(i=n.line_indent_level)),u={mode:t,parent:n,last_token:n?n.last_token:new g(r.START_BLOCK,""),last_word:n?n.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:i,line_indent_level:n?n.line_indent_level:i,start_line_index:this._output.get_line_number(),ternary_depth:0}},e.prototype._reset=function(n){var i=n.match(/^[\t ]*/)[0],t;return this._last_last_text="",this._output=new d(this._options,i),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(u.BlockStatement),t=new tt(n,this._options),this._tokens=t.tokenize(),n},e.prototype.beautify=function(){var r,t,i,n;if(this._options.disabled)return this._source_text;for(t=this._reset(this._source_text),i=this._options.eol,this._options.eol==="auto"&&(i="\n",t&&y.lineBreak.test(t||"")&&(i=t.match(y.lineBreak)[0])),n=this._tokens.next();n;)this.handle_token(n),this._last_last_text=this._flags.last_token.text,this._flags.last_token=n,n=this._tokens.next();return r=this._output.get_code(i)},e.prototype.handle_token=function(n,t){n.type===r.START_EXPR?this.handle_start_expr(n):n.type===r.END_EXPR?this.handle_end_expr(n):n.type===r.START_BLOCK?this.handle_start_block(n):n.type===r.END_BLOCK?this.handle_end_block(n):n.type===r.WORD?this.handle_word(n):n.type===r.RESERVED?this.handle_word(n):n.type===r.SEMICOLON?this.handle_semicolon(n):n.type===r.STRING?this.handle_string(n):n.type===r.EQUALS?this.handle_equals(n):n.type===r.OPERATOR?this.handle_operator(n):n.type===r.COMMA?this.handle_comma(n):n.type===r.BLOCK_COMMENT?this.handle_block_comment(n,t):n.type===r.COMMENT?this.handle_comment(n,t):n.type===r.DOT?this.handle_dot(n):n.type===r.EOF?this.handle_eof(n):n.type===r.UNKNOWN?this.handle_unknown(n,t):this.handle_unknown(n,t)},e.prototype.handle_whitespace_and_comments=function(n,t){var i=n.newlines,e=this._options.keep_array_indentation&&h(this._flags.mode),r,u,f;if(n.comments_before)for(r=n.comments_before.next();r;)this.handle_whitespace_and_comments(r,t),this.handle_token(r,t),r=n.comments_before.next();if(e)for(u=0;u<i;u+=1)this.print_newline(u>0,t);else if(this._options.max_preserve_newlines&&i>this._options.max_preserve_newlines&&(i=this._options.max_preserve_newlines),this._options.preserve_newlines&&i>1)for(this.print_newline(!1,t),f=1;f<i;f+=1)this.print_newline(!0,t)},w=["async","break","continue","return","throw","yield"],e.prototype.allow_wrap_or_preserved_newline=function(n,t){var i,r,u,e;if(t=t===undefined?!1:t,!this._output.just_added_newline())if(i=this._options.preserve_newlines&&n.newlines||t,r=f(this._flags.last_token.text,l)||f(n.text,l),r&&(u=f(this._flags.last_token.text,l)&&f(this._options.operator_position,k)||f(n.text,l),i=i&&u),i)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(o(this._flags.last_token,w))return;e=this._output.current_line.get_character_count()+n.text.length+(this._output.space_before_token?1:0),e>=this._options.wrap_line_length&&this.print_newline(!1,!0)}},e.prototype.print_newline=function(n,t){if(!t&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var i=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&s(i,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(n)&&(this._flags.multiline_frame=!0)},e.prototype.print_token_line_indentation=function(n){this._output.just_added_newline()&&(this._options.keep_array_indentation&&h(this._flags.mode)&&n.newlines?(this._output.current_line.push(n.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level)&&(this._flags.line_indent_level=this._flags.indentation_level))},e.prototype.print_token=function(n,t){if(this._output.raw){this._output.add_raw_token(n);return}if(this._options.comma_first&&n.previous&&n.previous.type===r.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var i=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(i),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(n),this._output.add_token(","),this._output.space_before_token=!0}t=t||n.text,this.print_token_line_indentation(n),this._output.add_token(t)},e.prototype.indent=function(){this._flags.indentation_level+=1},e.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1)},e.prototype.set_mode=function(n){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,n),this._flags=this.create_flags(this._previous_flags,n)},e.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===u.Statement&&b(this._output,this._previous_flags))},e.prototype.start_of_object_property=function(){return this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||o(this._flags.last_token,["get","set"]))},e.prototype.start_of_statement=function(n){var t=!1;return(t=t||o(this._flags.last_token,["var","let","const"])&&n.type===r.WORD,t=t||s(this._flags.last_token,"do"),t=t||!(this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement)&&o(this._flags.last_token,w)&&!n.newlines,t=t||s(this._flags.last_token,"else")&&!(s(n,"if")&&!n.comments_before),t=t||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===u.ForInitializer||this._previous_flags.mode===u.Conditional),t=t||this._flags.last_token.type===r.WORD&&this._flags.mode===u.BlockStatement&&!this._flags.in_case&&!(n.text==="--"||n.text==="++")&&this._last_last_text!=="function"&&n.type!==r.WORD&&n.type!==r.RESERVED,t=t||this._flags.mode===u.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||o(this._flags.last_token,["get","set"])),t)?(this.set_mode(u.Statement),this.indent(),this.handle_whitespace_and_comments(n,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(n,o(n,["do","for","if","while"])),!0):!1},e.prototype.handle_start_expr=function(n){var t,e,i;if(this.start_of_statement(n)||this.handle_whitespace_and_comments(n),t=u.Expression,n.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){o(this._flags.last_token,c)&&(this._output.space_before_token=!0),this.set_mode(t),this.print_token(n),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}t=u.ArrayLiteral,h(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),f(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR])||(this._output.space_before_token=!0)}else this._flags.last_token.type===r.RESERVED?this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,t=u.ForInitializer):f(this._flags.last_token.text,["if","while"])?(this._output.space_before_token=this._options.space_before_conditional,t=u.Conditional):f(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&n.whitespace_before===""?this._output.space_before_token=!1:(f(this._flags.last_token.text,c)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0):this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(n):this._flags.last_token.type===r.WORD?(this._output.space_before_token=!1,this._options.space_after_named_function&&(e=this._tokens.peek(-4),i=this._tokens.peek(-3),(o(i,["async","function"])||o(e,["async","function"])&&i.text==="*")&&(this._output.space_before_token=!0))):this.allow_wrap_or_preserved_newline(n),(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&f(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function);this._flags.last_token.text===";"||this._flags.last_token.type===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(n,n.newlines),this.set_mode(t),this.print_token(n),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},e.prototype.handle_end_expr=function(n){while(this._flags.mode===u.Statement)this.restore_mode();this.handle_whitespace_and_comments(n),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(n,n.text==="]"&&h(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==r.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),n.text==="]"&&this._options.keep_array_indentation?(this.print_token(n),this.restore_mode()):(this.restore_mode(),this.print_token(n)),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===u.Conditional&&(this._previous_flags.mode=u.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},e.prototype.handle_start_block=function(n){var i,e,c,l,s,t;if(this.handle_whitespace_and_comments(n),i=this._tokens.peek(),e=this._tokens.peek(1),this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(u.BlockStatement),this._flags.in_case_statement=!0):e&&(f(e.text,[":",","])&&f(i.type,[r.STRING,r.WORD,r.RESERVED])||f(i.text,["get","set","..."])&&f(e.type,[r.WORD,r.RESERVED]))?f(this._last_last_text,["class","interface"])?this.set_mode(u.BlockStatement):this.set_mode(u.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(u.BlockStatement):f(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||o(this._flags.last_token,["return","throw","import","default"])?this.set_mode(u.ObjectLiteral):this.set_mode(u.BlockStatement),c=!i.comments_before&&i.text==="}",l=c&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR,this._options.brace_preserve_inline){s=0,t=null,this._flags.inline_frame=!0;do if(s+=1,t=this._tokens.peek(s-1),t.newlines){this._flags.inline_frame=!1;break}while(t.type!==r.EOF&&!(t.type===r.END_BLOCK&&t.opened===n))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&n.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(l||this._flags.last_token.type===r.EQUALS||o(this._flags.last_token,p)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(h(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(n),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type!==r.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),this.print_token(n),this.indent()},e.prototype.handle_end_block=function(n){for(this.handle_whitespace_and_comments(n);this._flags.mode===u.Statement;)this.restore_mode();var t=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:this._options.brace_style==="expand"?t||this.print_newline():t||(h(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(n)},e.prototype.handle_word=function(n){var i,t,e;if(n.type===r.RESERVED&&(f(n.text,["set","get"])&&this._flags.mode!==u.ObjectLiteral?n.type=r.WORD:n.text==="import"&&this._tokens.peek().text==="("?n.type=r.WORD:f(n.text,["as","from"])&&!this._flags.import_block?n.type=r.WORD:this._flags.mode===u.ObjectLiteral&&(i=this._tokens.peek(),i.text===":"&&(n.type=r.WORD))),this.start_of_statement(n)?o(this._flags.last_token,["var","let","const"])&&n.type===r.WORD&&(this._flags.declaration_statement=!0):n.newlines&&!v(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!o(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(n),this.print_newline()):this.handle_whitespace_and_comments(n),this._flags.do_block&&!this._flags.do_while){if(s(n,"while")){this._output.space_before_token=!0,this.print_token(n),this._output.space_before_token=!0,this._flags.do_while=!0;return}this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&s(n,"else"))this._flags.else_block=!0;else{while(this._flags.mode===u.Statement)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&o(n,["case","default"])){this.print_newline(),(this._flags.case_body||this._options.jslint_happy)&&(this.deindent(),this._flags.case_body=!1),this.print_token(n),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(n)),s(n,"function")){!f(this._flags.last_token.text,["}",";"])&&(!this._output.just_added_newline()||f(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR)||this._output.just_added_blankline()||n.comments_before||(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?o(this._flags.last_token,["get","set","new","export"])||o(this._flags.last_token,w)?this._output.space_before_token=!0:s(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(v(this._flags.mode)||h(this._flags.mode))||this.print_newline(),this.print_token(n),this._flags.last_word=n.text;return}t="NONE",this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?t="SPACE":o(n,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&n.newlines?t="NEWLINE":(t="SPACE",this._output.space_before_token=!0):t="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===u.BlockStatement?t="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&v(this._flags.mode)?t="SPACE":this._flags.last_token.type===r.STRING?t="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&f(this._last_last_text,["{",","]))?t="SPACE":this._flags.last_token.type===r.START_BLOCK?t=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,t="NEWLINE"),o(n,c)&&this._flags.last_token.text!==")"&&(t=this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?"SPACE":"NEWLINE"),o(n,["else","catch","finally"])?this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===u.BlockStatement&&this._options.brace_style!=="expand"&&this._options.brace_style!=="end-expand"&&(this._options.brace_style!=="none"||!n.newlines)||this._flags.inline_frame?(this._output.trim(!0),e=this._output.current_line,e.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0):this.print_newline():t==="NEWLINE"?o(this._flags.last_token,p)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&o(n,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?this._flags.last_token.type===r.START_EXPR&&o(n,["var","let","const"])||this._flags.last_token.text===":"||(s(n,"if")&&s(n.previous,"else")?this._output.space_before_token=!0:this.print_newline()):o(n,c)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&h(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():t==="SPACE"&&(this._output.space_before_token=!0),n.previous&&(n.previous.type===r.WORD||n.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(n),this._flags.last_word=n.text,n.type===r.RESERVED&&(n.text==="do"?this._flags.do_block=!0:n.text==="if"?this._flags.if_block=!0:n.text==="import"?this._flags.import_block=!0:this._flags.import_block&&s(n,"from")&&(this._flags.import_block=!1))},e.prototype.handle_semicolon=function(n){this.start_of_statement(n)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(n);for(var t=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&s(t,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(n)},e.prototype.handle_string=function(n){this.start_of_statement(n)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(n),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(n):this.print_newline()),this.print_token(n)},e.prototype.handle_equals=function(n){this.start_of_statement(n)||this.handle_whitespace_and_comments(n),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(n),this._output.space_before_token=!0},e.prototype.handle_comma=function(n){this.handle_whitespace_and_comments(n,!0),this.print_token(n),this._output.space_before_token=!0,this._flags.declaration_statement?(v(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(n)):this._flags.mode===u.ObjectLiteral||this._flags.mode===u.Statement&&this._flags.parent.mode===u.ObjectLiteral?(this._flags.mode===u.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(n)},e.prototype.handle_operator=function(n){var s=n.text==="*"&&(o(this._flags.last_token,["function","yield"])||f(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),b=f(n.text,["-","+"])&&(f(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||f(this._flags.last_token.text,c)||this._flags.last_token.text===","),d,w;if(this.start_of_statement(n)||(d=!s,this.handle_whitespace_and_comments(n,d)),o(this._flags.last_token,p)){this._output.space_before_token=!0,this.print_token(n);return}if(n.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(n);return}if(n.text==="::"){this.print_token(n);return}if(this._flags.last_token.type===r.OPERATOR&&f(this._options.operator_position,k)&&this.allow_wrap_or_preserved_newline(n),n.text===":"&&this._flags.in_case){this._flags.case_body=!0,this.indent(),this.print_token(n),this.print_newline(),this._flags.in_case=!1;return}var t=!0,i=!0,h=!1;if(n.text===":"?this._flags.ternary_depth===0?t=!1:(this._flags.ternary_depth-=1,h=!0):n.text==="?"&&(this._flags.ternary_depth+=1),!b&&!s&&this._options.preserve_newlines&&f(n.text,l)){var e=n.text===":",g=e&&h,y=e&&!h;switch(this._options.operator_position){case a.before_newline:this._output.space_before_token=!y,this.print_token(n),(!e||g)&&this.allow_wrap_or_preserved_newline(n),this._output.space_before_token=!0;return;case a.after_newline:this._output.space_before_token=!0,!e||g?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(n):this._output.space_before_token=!1,this.print_token(n),this._output.space_before_token=!0;return;case a.preserve_newline:y||this.allow_wrap_or_preserved_newline(n),t=!(this._output.just_added_newline()||y),this._output.space_before_token=t,this.print_token(n),this._output.space_before_token=!0;return}}s?(this.allow_wrap_or_preserved_newline(n),t=!1,w=this._tokens.peek(),i=w&&f(w.type,[r.WORD,r.RESERVED])):n.text==="..."?(this.allow_wrap_or_preserved_newline(n),t=this._flags.last_token.type===r.START_BLOCK,i=!1):(f(n.text,["--","++","!","~"])||b)&&((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(n),t=!1,i=!1,n.newlines&&(n.text==="--"||n.text==="++")&&this.print_newline(!1,!0),this._flags.last_token.text===";"&&v(this._flags.mode)&&(t=!0),this._flags.last_token.type===r.RESERVED?t=!0:this._flags.last_token.type===r.END_EXPR?t=!(this._flags.last_token.text==="]"&&(n.text==="--"||n.text==="++")):this._flags.last_token.type===r.OPERATOR&&(t=f(n.text,["--","-","++","+"])&&f(this._flags.last_token.text,["--","-","++","+"]),f(n.text,["+","-"])&&f(this._flags.last_token.text,["--","++"])&&(i=!0)),(this._flags.mode!==u.BlockStatement||this._flags.inline_frame)&&this._flags.mode!==u.Statement||this._flags.last_token.text!=="{"&&this._flags.last_token.text!==";"||this.print_newline()),this._output.space_before_token=this._output.space_before_token||t,this.print_token(n),this._output.space_before_token=i},e.prototype.handle_block_comment=function(n,t){if(this._output.raw){this._output.add_raw_token(n),n.directives&&n.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(n.directives){this.print_newline(!1,t),this.print_token(n),n.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!y.newline.test(n.text)&&!n.newlines){this._output.space_before_token=!0,this.print_token(n),this._output.space_before_token=!0;return}var i=ft(n.text),r,u=!1,f=!1,e=n.whitespace_before,o=e.length;for(this.print_newline(!1,t),i.length>1&&(u=et(i.slice(1),"*"),f=ot(i.slice(1),e)),this.print_token(n,i[0]),r=1;r<i.length;r++)this.print_newline(!1,!0),u?this.print_token(n," "+it(i[r])):f&&i[r].length>o?this.print_token(n,i[r].substring(o)):this._output.add_token(i[r]);this.print_newline(!1,t)},e.prototype.handle_comment=function(n,t){n.newlines?this.print_newline(!1,t):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(n),this.print_newline(!1,t)},e.prototype.handle_dot=function(n){this.start_of_statement(n)||this.handle_whitespace_and_comments(n,!0),o(this._flags.last_token,p)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(n,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(n)},e.prototype.handle_unknown=function(n,t){this.print_token(n),n.text[n.text.length-1]==="\n"&&this.print_newline(!1,t)},e.prototype.handle_eof=function(n){while(this._flags.mode===u.Statement)this.restore_mode();this.handle_whitespace_and_comments(n)},n.exports.Beautifier=e},function(n){"use strict";function u(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__items=[]}function f(n,t){this.__cache=[n],this.__level_string=t}function r(n,t){var i=n.indent_char;n.indent_size>1&&(i=new Array(n.indent_size+1).join(n.indent_char)),t=t||"",n.indent_level>0&&(t=new Array(n.indent_level+1).join(i)),this.__indent_cache=new f(t,i),this.__alignment_cache=new f(""," "),this.baseIndentLength=t.length,this.indent_length=i.length,this.raw=!1,this._end_with_newline=n.end_with_newline,this.__lines=[],this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.__add_outputline()}u.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},u.prototype.has_match=function(n){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(n))return!0;return!1},u.prototype.set_indent=function(n,t){this.__indent_count=n||0,this.__alignment_count=t||0,this.__character_count=this.__parent.baseIndentLength+this.__alignment_count+this.__indent_count*this.__parent.indent_length},u.prototype.get_character_count=function(){return this.__character_count},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(n){this.__items.push(n),this.__character_count+=n.length},u.prototype.push_raw=function(n){this.push(n);var t=n.lastIndexOf("\n");t!==-1&&(this.__character_count=n.length-t)},u.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},u.prototype.remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_length)},u.prototype.trim=function(){while(this.last()===" ")this.__items.pop(),this.__character_count-=1},u.prototype.toString=function(){var n="";return this.is_empty()||(this.__indent_count>=0&&(n=this.__parent.get_indent_string(this.__indent_count)),this.__alignment_count>=0&&(n+=this.__parent.get_alignment_string(this.__alignment_count)),n+=this.__items.join("")),n},f.prototype.__ensure_cache=function(n){while(n>=this.__cache.length)this.__cache.push(this.__cache[this.__cache.length-1]+this.__level_string)},f.prototype.get_level_string=function(n){return this.__ensure_cache(n),this.__cache[n]},r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=new u(this),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(n){return this.__indent_cache.get_level_string(n)},r.prototype.get_alignment_string=function(n){return this.__alignment_cache.get_level_string(n)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(n){var t=this.__lines.join("\n").replace(/[\r\n\t ]+$/,"");return this._end_with_newline&&(t+="\n"),n!=="\n"&&(t=t.replace(/[\n]/g,n)),t},r.prototype.set_indent=function(n,t){return(n=n||0,t=t||0,this.__lines.length>1)?(this.current_line.set_indent(n,t),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(n){for(var t=0;t<n.newlines;t++)this.__add_outputline();this.current_line.push(n.whitespace_before),this.current_line.push_raw(n.text),this.space_before_token=!1},r.prototype.add_token=function(n){this.add_space_before_token(),this.current_line.push(n)},r.prototype.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},r.prototype.remove_indent=function(n){for(var t=this.__lines.length;n<t;)this.__lines[n].remove_indent(),n++},r.prototype.trim=function(n){for(n=n===undefined?!1:n,this.current_line.trim(this.indent_string,this.baseIndentString);n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(n,t){for(var i=this.__lines.length-2,r;i>=0;){if(r=this.__lines[i],r.is_empty())break;else if(r.item(0).indexOf(n)!==0&&r.item(-1)!==t){this.__lines.splice(i+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},n.exports.Output=r},function(n){"use strict";function r(n,t,i,r){this.type=n,this.text=t,this.comments_before=null,this.newlines=i||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=r},function(n,t){"use strict";var u="$@A-Z_a-z",f="$0-9A-Z_a-z",r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ",e="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏０-９＿",o="["+u+r+"]",s="["+f+r+e+"]*",h;t.identifier=new RegExp(o+s,"g"),h=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g")},function(n,t,i){"use strict";function u(n){var u,i,t;for(r.call(this,n,"js"),u=this.raw_options.brace_style||null,u==="expand-strict"?this.raw_options.brace_style="expand":u==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==undefined&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse"),i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]),this.brace_preserve_inline=!1,this.brace_style="collapse",t=0;t<i.length;t++)i[t]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=i[t];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",f),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}var r=i(6).Options,f=["before-newline","after-newline","preserve-newline"];u.prototype=new r,n.exports.Options=u},function(n){"use strict";function r(n,t){this.raw_options=u(n,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs"),this.indent_with_tabs&&(this.indent_char="\t",this.indent_size=1),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char"))}function u(n,t){var r={},i;n=f(n);for(i in n)i!==t&&(r[i]=n[i]);if(t&&n[t])for(i in n[t])r[i]=n[t][i];return r}function f(n){var i={},t,r;for(t in n)r=t.replace(/-/g,"_"),i[r]=n[t];return i}r.prototype._get_array=function(n,t){var i=this.raw_options[n],r=t||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(r=i.concat()):typeof i=="string"&&(r=i.split(/[^a-zA-Z0-9_\/\-]+/)),r},r.prototype._get_boolean=function(n,t){var i=this.raw_options[n];return i===undefined?!!t:!!i},r.prototype._get_characters=function(n,t){var i=this.raw_options[n],r=t||"";return typeof i=="string"&&(r=i.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},r.prototype._get_number=function(n,t){var r=this.raw_options[n],i;return t=parseInt(t,10),isNaN(t)&&(t=0),i=parseInt(r,10),isNaN(i)&&(i=t),i},r.prototype._get_selection=function(n,t,i){var r=this._get_selection_list(n,t,i);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+n+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[n]+"'");return r[0]},r.prototype._get_selection_list=function(n,t,i){if(!t||t.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[t[0]],!this._is_valid_selection(i,t))throw new Error("Invalid Default Value!");var r=this._get_array(n,i);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+n+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[n]+"'");return r},r.prototype._is_valid_selection=function(n,t){return n.length&&t.length&&!n.some(function(n){return t.indexOf(n)===-1})},n.exports.Options=r,n.exports.normalizeOpts=f,n.exports.mergeOpts=u},function(n,t,i){"use strict";function h(n,t){return t.indexOf(n)!==-1}function st(n){for(var u="",t=0,i=new p(n),r=null;i.hasNext();)if(r=i.match(/([\s]|[^\\]|\\\\)+/g),r&&(u+=r[0]),i.peek()==="\\"){if(i.next(),i.peek()==="x")r=i.match(/x([0-9A-Fa-f]{2})/g);else if(i.peek()==="u")r=i.match(/u([0-9A-Fa-f]{4})/g);else{u+="\\",i.hasNext()&&(u+=i.next());continue}if(!r||(t=parseInt(r[1],16),t>126&&t<=255&&r[0].indexOf("x")===0))return n;if(t>=0&&t<32){u+="\\"+r[0];continue}else u+=t===34||t===39||t===92?"\\"+String.fromCharCode(t):String.fromCharCode(t)}return u}var p=i(8).InputScanner,l=i(9).Tokenizer,s=i(9).TOKEN,w=i(11).Directives,f=i(4),r={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},a=new w(/\/\*/,/\*\//),b=/0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/g,k=/[0-9]/,d=/[^\d\.]/,g=">>> === !== << && >= ** != == <= >> || < / - + > : & % ? ^ | *".split(" "),e=">>>= ... >>= <<= === >>> !== **= => ^= :: /= << <= == && -= >= >> != -- += ** || ++ %= &= *= |= = ! ? > < : / ^ - + * & % ~ |",c,y;e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),e=e.replace(/ /g,"|");var nt=new RegExp(e,"g"),tt=/#![^\n\r\u2028\u2029]*(?:\r\n|[\n\r\u2028\u2029])?/g,it=/#include[^\n\r\u2028\u2029]*(?:\r\n|[\n\r\u2028\u2029])?/g,v="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),rt=v.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),ut=new RegExp("^(?:"+rt.join("|")+")$"),ft=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,et=/\/\/(?:[^\n\r\u2028\u2029]*)/g,ot=/(?:(?:<\?php|<\?=)[\s\S]*?\?>)|(?:<%[\s\S]*?%>)/g,o,u=function(n,t){l.call(this,n,t),this._whitespace_pattern=/[\n\r\u2028\u2029\t\u000B\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff ]+/g,this._newline_pattern=/([^\n\r\u2028\u2029]*)(\r\n|[\n\r\u2028\u2029])?/g};u.prototype=new l,u.prototype._is_comment=function(n){return n.type===r.COMMENT||n.type===r.BLOCK_COMMENT||n.type===r.UNKNOWN},u.prototype._is_opening=function(n){return n.type===r.START_BLOCK||n.type===r.START_EXPR},u.prototype._is_closing=function(n,t){return(n.type===r.END_BLOCK||n.type===r.END_EXPR)&&t&&(n.text==="]"&&t.text==="["||n.text===")"&&t.text==="("||n.text==="}"&&t.text==="{")},u.prototype._reset=function(){o=!1},u.prototype._get_next_token=function(n){this._readWhitespace();var i=null,u=this._input.peek();return i=i||this._read_singles(u),i=i||this._read_word(n),i=i||this._read_comment(u),i=i||this._read_string(u),i=i||this._read_regexp(u,n),i=i||this._read_xml(u,n),i=i||this._read_non_javascript(u),i=i||this._read_punctuation(),i=i||this._create_token(r.UNKNOWN,this._input.next())},u.prototype._read_word=function(n){var t;return(t=this._input.read(f.identifier),t!=="")?!(n.type===r.DOT||n.type===r.RESERVED&&(n.text==="set"||n.text==="get"))&&ut.test(t)?t==="in"||t==="of"?this._create_token(r.OPERATOR,t):this._create_token(r.RESERVED,t):this._create_token(r.WORD,t):(t=this._input.read(b),t!==""?this._create_token(r.WORD,t):void 0)},u.prototype._read_singles=function(n){var t=null;return n===null?t=this._create_token(r.EOF,""):n==="("||n==="["?t=this._create_token(r.START_EXPR,n):n===")"||n==="]"?t=this._create_token(r.END_EXPR,n):n==="{"?t=this._create_token(r.START_BLOCK,n):n==="}"?t=this._create_token(r.END_BLOCK,n):n===";"?t=this._create_token(r.SEMICOLON,n):n==="."&&d.test(this._input.peek(1))?t=this._create_token(r.DOT,n):n===","&&(t=this._create_token(r.COMMA,n)),t&&this._input.next(),t},u.prototype._read_punctuation=function(){var n=this._input.read(nt);if(n!=="")return n==="="?this._create_token(r.EQUALS,n):this._create_token(r.OPERATOR,n)},u.prototype._read_non_javascript=function(n){var t="",i;if(n==="#"){if(this._is_first_token()&&(t=this._input.read(tt),t)||(t=this._input.read(it),t))return this._create_token(r.UNKNOWN,t.trim()+"\n");if(n=this._input.next(),i="#",this._input.hasNext()&&this._input.testChar(k)){do n=this._input.next(),i+=n;while(this._input.hasNext()&&n!=="#"&&n!=="=");return n==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(i+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(i+="{}",this._input.next(),this._input.next())),this._create_token(r.WORD,i)}this._input.back()}else if(n==="<"){if(this._input.peek(1)==="?"||this._input.peek(1)==="%"){if(t=this._input.read(ot),t)return t=t.replace(f.allLineBreaks,"\n"),this._create_token(r.STRING,t)}else if(this._input.match(/<\!--/g)){for(n="<!--";this._input.hasNext()&&!this._input.testChar(f.newline);)n+=this._input.next();return o=!0,this._create_token(r.COMMENT,n)}}else if(n==="-"&&o&&this._input.match(/-->/g))return o=!1,this._create_token(r.COMMENT,"-->");return null},u.prototype._read_comment=function(n){var i=null,t,u;return n==="/"&&(t="",this._input.peek(1)==="*"?(t=this._input.read(ft),u=a.get_directives(t),u&&u.ignore==="start"&&(t+=a.readIgnored(this._input)),t=t.replace(f.allLineBreaks,"\n"),i=this._create_token(r.BLOCK_COMMENT,t),i.directives=u):this._input.peek(1)==="/"&&(t=this._input.read(et),i=this._create_token(r.COMMENT,t))),i},u.prototype._read_string=function(n){if(n==="`"||n==="'"||n==='"'){var t=this._input.next();return this.has_char_escapes=!1,t+=n==="`"?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(n),this.has_char_escapes&&this._options.unescape_strings&&(t=st(t)),this._input.peek()===n&&(t+=this._input.next()),this._create_token(r.STRING,t)}return null},u.prototype._allow_regexp_or_xml=function(n){return n.type===r.RESERVED&&h(n.text,["return","case","throw","else","do","typeof","yield"])||n.type===r.END_EXPR&&n.text===")"&&n.opened&&n.opened.previous.type===r.RESERVED&&h(n.opened.previous.text,["if","while","for"])||h(n.type,[r.COMMENT,r.START_EXPR,r.START_BLOCK,r.START,r.END_BLOCK,r.OPERATOR,r.EQUALS,r.EOF,r.SEMICOLON,r.COMMA])},u.prototype._read_regexp=function(n,t){if(n==="/"&&this._allow_regexp_or_xml(t)){for(var i=this._input.next(),u=!1,e=!1;this._input.hasNext()&&(u||e||this._input.peek()!==n)&&!this._input.testChar(f.newline);)i+=this._input.peek(),u?u=!1:(u=this._input.peek()==="\\",this._input.peek()==="["?e=!0:this._input.peek()==="]"&&(e=!1)),this._input.next();return this._input.peek()===n&&(i+=this._input.next(),i+=this._input.read(f.identifier)),this._create_token(r.STRING,i)}return null},c=/<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g,y=/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g,u.prototype._read_xml=function(n,t){var u,i;if(this._options.e4x&&n==="<"&&this._input.test(c)&&this._allow_regexp_or_xml(t)&&(u="",i=this._input.match(c),i)){for(var s=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),h=s.indexOf("{")===0,e=0;i;){var l=!!i[1],o=i[2],a=!!i[i.length-1]||o.slice(0,8)==="![CDATA[";if(!a&&(o===s||h&&o.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(l?--e:++e),u+=i[0],e<=0)break;i=this._input.match(y)}return i||(u+=this._input.match(/[\s\S]*/g)[0]),u=u.replace(f.allLineBreaks,"\n"),this._create_token(r.STRING,u)}return null},u.prototype._read_string_recursive=function(n,t,i){for(var r,u="",e=!1;this._input.hasNext();){if(r=this._input.peek(),!(e||r!==n&&(t||!f.newline.test(r))))break;(e||t)&&f.newline.test(r)?(r==="\r"&&this._input.peek(1)==="\n"&&(this._input.next(),r=this._input.peek()),u+="\n"):u+=r,e?((r==="x"||r==="u")&&(this.has_char_escapes=!0),e=!1):e=r==="\\",this._input.next(),i&&u.indexOf(i,u.length-i.length)!==-1&&(u+=n==="`"?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(u+=this._input.next()))}return u},n.exports.Tokenizer=u,n.exports.TOKEN=r,n.exports.positionable_operators=g.slice(),n.exports.line_starters=v.slice()},function(n){"use strict";function r(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},r.prototype.peek=function(n){var t=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(t=this.__input.charAt(n)),t},r.prototype.test=function(n,t){if(t=t||0,t+=this.__position,n.lastIndex=t,t>=0&&t<this.__input_length){var i=n.exec(this.__input);return i&&i.index===t}return!1},r.prototype.testChar=function(n,t){var i=this.peek(t);return i!==null&&n.test(i)},r.prototype.match=function(n){n.lastIndex=this.__position;var t=n.exec(this.__input);return t&&t.index===this.__position?this.__position+=t[0].length:t=null,t},r.prototype.read=function(n){var t="",i=this.match(n);return i&&(t=i[0]),t},r.prototype.readUntil=function(n,t){var u="",i=this.__position,r;return n.lastIndex=this.__position,r=n.exec(this.__input),i=r?t?r.index+r[0].length:r.index:this.__input_length,u=this.__input.substring(this.__position,i),this.__position=i,u},r.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},r.prototype.peekUntilAfter=function(n){var t=this.__position,i=this.readUntilAfter(n);return this.__position=t,i},r.prototype.lookBack=function(n){var t=this.__position-1;return t>=n.length&&this.__input.substring(t-n.length,t).toLowerCase()===n},n.exports.InputScanner=r},function(n,t,i){"use strict";var o=i(8).InputScanner,e=i(3).Token,f=i(10).TokenStream,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(n,t){this._input=new o(n),this._options=t||{},this.__tokens=null,this.__newline_count=0,this.__whitespace_before_token="",this._whitespace_pattern=/[\n\r\t ]+/g,this._newline_pattern=/([^\n\r]*)(\r\n|[\n\r])?/g};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var n,i=new e(u.START,""),t=null,o=[],r=new f;i.type!==u.EOF;){for(n=this._get_next_token(i,t);this._is_comment(n);)r.add(n),n=this._get_next_token(i,t);r.isEmpty()||(n.comments_before=r,r=new f),n.parent=t,this._is_opening(n)?(o.push(t),t=n):t&&this._is_closing(n,t)&&(n.opened=t,t.closed=n,t=o.pop(),n.parent=t),n.previous=i,i.next=n,this.__tokens.add(n),i=n}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(u.RAW,i):this._create_token(u.EOF,"")},r.prototype._is_comment=function(){return!1},r.prototype._is_opening=function(){return!1},r.prototype._is_closing=function(){return!1},r.prototype._create_token=function(n,t){var i=new e(n,t,this.__newline_count,this.__whitespace_before_token);return this.__newline_count=0,this.__whitespace_before_token="",i},r.prototype._readWhitespace=function(){var n=this._input.read(this._whitespace_pattern),t;if(n===" ")this.__whitespace_before_token=n;else if(n!==""){for(this._newline_pattern.lastIndex=0,t=this._newline_pattern.exec(n);t[2];)this.__newline_count+=1,t=this._newline_pattern.exec(n);this.__whitespace_before_token=t[1]}},n.exports.Tokenizer=r,n.exports.TOKEN=u},function(n){"use strict";function r(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}r.prototype.restart=function(){this.__position=0},r.prototype.isEmpty=function(){return this.__tokens_length===0},r.prototype.hasNext=function(){return this.__position<this.__tokens_length},r.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},r.prototype.peek=function(n){var t=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(t=this.__tokens[n]),t},r.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},n.exports.TokenStream=r},function(n){"use strict";function r(n,t){n=typeof n=="string"?n:n.source,t=typeof t=="string"?t:t.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp("(?:[\\s\\S]*?)((?:"+n+/\sbeautify\signore:end\s/.source+t+")|$)","g")}r.prototype.get_directives=function(n){var i,t;if(!n.match(this.__directives_block_pattern))return null;for(i={},this.__directive_pattern.lastIndex=0,t=this.__directive_pattern.exec(n);t;)i[t[1]]=t[2],t=this.__directive_pattern.exec(n);return i},r.prototype.readIgnored=function(n){return n.read(this.__directives_end_ignore_pattern)},n.exports.Directives=r}]),n=t;typeof define=="function"&&define.amd?define([],function(){return{js_beautify:n}}):typeof exports!="undefined"?exports.js_beautify=n:typeof window!="undefined"?window.js_beautify=n:typeof global!="undefined"&&(global.js_beautify=n)}(),function(n){"use strict";function s(n){var t={path:!0,query:!0,hash:!0};return n?(/^[a-z]+:/.test(n)&&(t.protocol=!0,t.host=!0,/[-a-z0-9]+(\.[-a-z0-9])*:\d+/i.test(n)&&(t.port=!0),/\/\/(.*?)(?::(.*?))?@/.test(n)&&(t.user=!0,t.pass=!0)),t):t}function c(n,i,c){var a,l,y,k=u?"file://"+(process.platform.match(/^win/i)?"/":"")+f("fs").realpathSync("."):document.location.href,v;i||(i=k),u?a=f("url").parse(i):(a=document.createElement("a"),a.href=i),v=s(i),y=i.match(/\/\/(.*?)(?::(.*?))?@/)||[];for(l in e)n[l]=v[l]?a[e[l]]||"":"";if(n.protocol=n.protocol.replace(/:$/,""),n.query=n.query.replace(/^\?/,""),n.hash=r(n.hash.replace(/^#/,"")),n.user=r(y[1]||""),n.pass=r(y[2]||""),n.port=h[n.protocol]==n.port||n.port==0?"":n.port,!v.protocol&&/[^/#?]/.test(i.charAt(0))&&(n.path=i.split("?")[0].split("#")[0]),!v.protocol&&c){var d=new t(k.match(/(.*\/)/)[0]),p=d.path.split("/"),w=n.path.split("/"),b=["protocol","user","pass","host","port"],g=b.length;for(p.pop(),l=0;l<g;l++)n[b[l]]=d[b[l]];while(w[0]==="..")p.pop(),w.shift();n.path=(i.charAt(0)!=="/"?p.join("/"):"")+"/"+w.join("/")}n.path=n.path.replace(/^\/{2,}/,"/"),n.paths((n.path.charAt(0)==="/"?n.path.slice(1):n.path).split("/")),n.query=new o(n.query)}function i(n){return encodeURIComponent(n).replace(/'/g,"%27")}function r(n){return n=n.replace(/\+/g," "),n=n.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi,function(n,t,i,r){var f=parseInt(t,16)-224,e=parseInt(i,16)-128,o,u;return f===0&&e<32?n:(o=parseInt(r,16)-128,u=(f<<12)+(e<<6)+o,u>65535)?n:String.fromCharCode(u)}),n=n.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi,function(n,t,i){var r=parseInt(t,16)-192,u;return r<2?n:(u=parseInt(i,16)-128,String.fromCharCode((r<<6)+u))}),n.replace(/%([0-7][0-9a-f])/gi,function(n,t){return String.fromCharCode(parseInt(t,16))})}function o(n){for(var f=/([^=&]+)(=([^&]*))?/g,i,t,u;i=f.exec(n);)t=decodeURIComponent(i[1].replace(/\+/g," ")),u=i[3]?r(i[3]):"",this[t]===undefined||this[t]===null?this[t]=u:(this[t]instanceof Array||(this[t]=[this[t]]),this[t].push(u))}function t(n,t){c(this,n,!t)}var u=typeof window=="undefined"&&typeof global!="undefined"&&typeof require=="function",f=u?n.require:null,e={protocol:"protocol",host:"hostname",port:"port",path:"pathname",query:"search",hash:"hash"},h={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};o.prototype.toString=function(){var t="",r=i,n,u,f;for(n in this)if(!(this[n]instanceof Function)&&this[n]!==null)if(this[n]instanceof Array)if(f=this[n].length,f)for(u=0;u<f;u++)t+=t?"&":"",t+=r(n)+"="+r(this[n][u]);else t+=(t?"&":"")+r(n)+"=";else t+=t?"&":"",t+=r(n)+"="+r(this[n]);return t},t.prototype.clearQuery=function(){for(var n in this.query)this.query[n]instanceof Function||delete this.query[n];return this},t.prototype.queryLength=function(){var n=0,t;for(t in this)this[t]instanceof Function||n++;return n},t.prototype.isEmptyQuery=function(){return this.queryLength()===0},t.prototype.paths=function(n){var f="",t=0,u;if(n&&n.length&&n+""!==n){for(this.isAbsolute()&&(f="/"),u=n.length;t<u;t++)n[t]=!t&&n[t].match(/^\w:$/)?n[t]:i(n[t]);this.path=f+n.join("/")}for(n=(this.path.charAt(0)==="/"?this.path.slice(1):this.path).split("/"),t=0,u=n.length;t<u;t++)n[t]=r(n[t]);return n},t.prototype.encode=i,t.prototype.decode=r,t.prototype.isAbsolute=function(){return this.protocol||this.path.charAt(0)==="/"},t.prototype.toString=function(){return(this.protocol&&this.protocol+"://")+(this.user&&i(this.user)+(this.pass&&":"+i(this.pass))+"@")+(this.host&&this.host)+(this.port&&":"+this.port)+(this.path&&this.path)+(this.query.toString()&&"?"+this.query)+(this.hash&&"#"+i(this.hash))},n[n.exports?"exports":"Url"]=t}(typeof module!="undefined"&&module.exports?module:window),function e(n,t,i){function u(r,o){var h,c,s;if(!t[r]){if(!n[r]){if(h=typeof require=="function"&&require,!o&&h)return h(r,!0);if(f)return f(r,!0);c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c;}s=t[r]={exports:{}},n[r][0].call(s.exports,function(t){var i=n[r][1][t];return u(i?i:t)},s,s.exports,e,n,t,i)}return t[r].exports}for(var f=typeof require=="function"&&require,r=0;r<i.length;r++)u(i[r]);return u}({1:[function(n,t){function u(){}var r=t.exports={};r.nextTick=function(){var t=typeof window!="undefined"&&window.setImmediate,i=typeof window!="undefined"&&window.postMessage&&window.addEventListener,n;return t?function(n){return window.setImmediate(n)}:i?(n=[],window.addEventListener("message",function(t){var i=t.source,r;(i===window||i===null)&&t.data==="process-tick"&&(t.stopPropagation(),n.length>0&&(r=n.shift(),r()))},!0),function(t){n.push(t),window.postMessage("process-tick","*")}):function(n){setTimeout(n,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=u,r.addListener=u,r.once=u,r.off=u,r.removeListener=u,r.removeAllListeners=u,r.emit=u,r.binding=function(){throw new Error("process.binding is not supported");},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported");}},{}],2:[function(n,t){"use strict";function f(n){function h(n){if(t===null){f.push(n);return}u(function(){var r=t?n.onFulfilled:n.onRejected,u;if(r===null){(t?n.resolve:n.reject)(i);return}try{u=r(i)}catch(f){n.reject(f);return}n.resolve(u)})}function c(n){try{if(n===s)throw new TypeError("A promise cannot be resolved with itself.");if(n&&(typeof n=="object"||typeof n=="function")){var u=n.then;if(typeof u=="function"){r(u.bind(n),c,o);return}}t=!0,i=n,l()}catch(f){o(f)}}function o(n){t=!1,i=n,l()}function l(){for(var n=0,t=f.length;n<t;n++)h(f[n]);f=null}if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof n!="function")throw new TypeError("not a function");var t=null,i=null,f=[],s=this;this.then=function(n,t){return new s.constructor(function(i,r){h(new e(n,t,i,r))})},r(n,c,o)}function e(n,t,i,r){this.onFulfilled=typeof n=="function"?n:null,this.onRejected=typeof t=="function"?t:null,this.resolve=i,this.reject=r}function r(n,t,i){var r=!1;try{n(function(n){r||(r=!0,t(n))},function(n){r||(r=!0,i(n))})}catch(u){if(r)return;r=!0,i(u)}}var u=n("asap");t.exports=f},{asap:4}],3:[function(n,t){"use strict";function u(n){this.then=function(t){return typeof t!="function"?this:new r(function(i,r){f(function(){try{i(t(n))}catch(u){r(u)}})})}}var r=n("./core.js"),f=n("asap");t.exports=r,u.prototype=r.prototype;var e=new u(!0),o=new u(!1),s=new u(null),h=new u(undefined),c=new u(0),l=new u("");r.resolve=function(n){if(n instanceof r)return n;if(n===null)return s;if(n===undefined)return h;if(n===!0)return e;if(n===!1)return o;if(n===0)return c;if(n==="")return l;if(typeof n=="object"||typeof n=="function")try{var t=n.then;if(typeof t=="function")return new r(t.bind(n))}catch(i){return new r(function(n,t){t(i)})}return new u(n)},r.all=function(n){var t=Array.prototype.slice.call(n);return new r(function(n,i){function f(r,e){try{if(e&&(typeof e=="object"||typeof e=="function")){var o=e.then;if(typeof o=="function"){o.call(e,function(n){f(r,n)},i);return}}t[r]=e,--u==0&&n(t)}catch(s){i(s)}}var u,r;if(t.length===0)return n([]);for(u=t.length,r=0;r<t.length;r++)f(r,t[r])})},r.reject=function(n){return new r(function(t,i){i(n)})},r.race=function(n){return new r(function(t,i){n.forEach(function(n){r.resolve(n).then(t,i)})})},r.prototype["catch"]=function(n){return this.then(null,n)}},{"./core.js":2,asap:4}],4:[function(n,t){(function(n){function u(){for(var t,n;i.next;){i=i.next,t=i.task,i.task=void 0,n=i.domain,n&&(i.domain=void 0,n.enter());try{t()}catch(r){if(e){n&&n.exit(),setTimeout(u,0),n&&n.enter();throw r;}else setTimeout(function(){throw r;},0)}n&&n.exit()}f=!1}function h(t){s=s.next={task:t,domain:e&&n.domain,next:null},f||(f=!0,r())}var i={task:void 0,next:null},s=i,f=!1,r=void 0,e=!1,o;typeof n!="undefined"&&n.nextTick?(e=!0,r=function(){n.nextTick(u)}):typeof setImmediate=="function"?r=typeof window!="undefined"?setImmediate.bind(window,u):function(){setImmediate(u)}:typeof MessageChannel!="undefined"?(o=new MessageChannel,o.port1.onmessage=u,r=function(){o.port2.postMessage(0)}):r=function(){setTimeout(u,0)},t.exports=h}).call(this,n("_process"))},{_process:1}],5:[function(){typeof Promise.prototype.done!="function"&&(Promise.prototype.done=function(){var i=arguments.length?this.then.apply(this,arguments):this;i.then(null,function(n){setTimeout(function(){throw n;},0)})})},{}],6:[function(n){var r=n("asap");typeof Promise=="undefined"&&(Promise=n("./lib/core.js"),n("./lib/es6-extensions.js")),n("./polyfill-done.js")},{"./lib/core.js":2,"./lib/es6-extensions.js":3,"./polyfill-done.js":5,asap:4}]},{},[6]),function(n){"use strict";var t=function(n){function a(n,t){return n<<t|n>>>32-t}function o(n,t){var f,e,r,u,i;return(r=n&2147483648,u=t&2147483648,f=n&1073741824,e=t&1073741824,i=(n&1073741823)+(t&1073741823),f&e)?i^2147483648^r^u:f|e?i&1073741824?i^3221225472^r^u:i^1073741824^r^u:i^r^u}function yt(n,t,i){return n&t|~n&i}function pt(n,t,i){return n&i|t&~i}function wt(n,t,i){return n^t^i}function bt(n,t,i){return t^(n|~i)}function s(n,t,i,r,u,f,e){return n=o(n,o(o(yt(t,i,r),u),e)),o(a(n,f),t)}function h(n,t,i,r,u,f,e){return n=o(n,o(o(pt(t,i,r),u),e)),o(a(n,f),t)}function c(n,t,i,r,u,f,e){return n=o(n,o(o(wt(t,i,r),u),e)),o(a(n,f),t)}function l(n,t,i,r,u,f,e){return n=o(n,o(o(bt(t,i,r),u),e)),o(a(n,f),t)}function kt(n){for(var r,u=n.length,o=u+8,s=(o-o%64)/64,e=(s+1)*16,i=Array(e-1),f=0,t=0;t<u;)r=(t-t%4)/4,f=t%4*8,i[r]=i[r]|n.charCodeAt(t)<<f,t++;return r=(t-t%4)/4,f=t%4*8,i[r]=i[r]|128<<f,i[e-2]=u<<3,i[e-1]=u>>>29,i}function v(n){for(var i="",r="",u,t=0;t<=3;t++)u=n>>>t*8&255,r="0"+u.toString(16),i=i+r.substr(r.length-2,2);return i}function dt(n){var i,r,t;for(n=n.replace(/\r\n/g,"\n"),i="",r=0;r<n.length;r++)t=n.charCodeAt(r),t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128));return i}var e=Array(),f,ht,ct,lt,at,t,i,r,u,y=7,p=12,w=17,b=22,k=5,d=9,g=14,nt=20,tt=4,it=11,rt=16,ut=23,ft=6,et=10,ot=15,st=21,vt;for(n=dt(n),e=kt(n),t=1732584193,i=4023233417,r=2562383102,u=271733878,f=0;f<e.length;f+=16)ht=t,ct=i,lt=r,at=u,t=s(t,i,r,u,e[f+0],y,3614090360),u=s(u,t,i,r,e[f+1],p,3905402710),r=s(r,u,t,i,e[f+2],w,606105819),i=s(i,r,u,t,e[f+3],b,3250441966),t=s(t,i,r,u,e[f+4],y,4118548399),u=s(u,t,i,r,e[f+5],p,1200080426),r=s(r,u,t,i,e[f+6],w,2821735955),i=s(i,r,u,t,e[f+7],b,4249261313),t=s(t,i,r,u,e[f+8],y,1770035416),u=s(u,t,i,r,e[f+9],p,2336552879),r=s(r,u,t,i,e[f+10],w,4294925233),i=s(i,r,u,t,e[f+11],b,2304563134),t=s(t,i,r,u,e[f+12],y,1804603682),u=s(u,t,i,r,e[f+13],p,4254626195),r=s(r,u,t,i,e[f+14],w,2792965006),i=s(i,r,u,t,e[f+15],b,1236535329),t=h(t,i,r,u,e[f+1],k,4129170786),u=h(u,t,i,r,e[f+6],d,3225465664),r=h(r,u,t,i,e[f+11],g,643717713),i=h(i,r,u,t,e[f+0],nt,3921069994),t=h(t,i,r,u,e[f+5],k,3593408605),u=h(u,t,i,r,e[f+10],d,38016083),r=h(r,u,t,i,e[f+15],g,3634488961),i=h(i,r,u,t,e[f+4],nt,3889429448),t=h(t,i,r,u,e[f+9],k,568446438),u=h(u,t,i,r,e[f+14],d,3275163606),r=h(r,u,t,i,e[f+3],g,4107603335),i=h(i,r,u,t,e[f+8],nt,1163531501),t=h(t,i,r,u,e[f+13],k,2850285829),u=h(u,t,i,r,e[f+2],d,4243563512),r=h(r,u,t,i,e[f+7],g,1735328473),i=h(i,r,u,t,e[f+12],nt,2368359562),t=c(t,i,r,u,e[f+5],tt,4294588738),u=c(u,t,i,r,e[f+8],it,2272392833),r=c(r,u,t,i,e[f+11],rt,1839030562),i=c(i,r,u,t,e[f+14],ut,4259657740),t=c(t,i,r,u,e[f+1],tt,2763975236),u=c(u,t,i,r,e[f+4],it,1272893353),r=c(r,u,t,i,e[f+7],rt,4139469664),i=c(i,r,u,t,e[f+10],ut,3200236656),t=c(t,i,r,u,e[f+13],tt,681279174),u=c(u,t,i,r,e[f+0],it,3936430074),r=c(r,u,t,i,e[f+3],rt,3572445317),i=c(i,r,u,t,e[f+6],ut,76029189),t=c(t,i,r,u,e[f+9],tt,3654602809),u=c(u,t,i,r,e[f+12],it,3873151461),r=c(r,u,t,i,e[f+15],rt,530742520),i=c(i,r,u,t,e[f+2],ut,3299628645),t=l(t,i,r,u,e[f+0],ft,4096336452),u=l(u,t,i,r,e[f+7],et,1126891415),r=l(r,u,t,i,e[f+14],ot,2878612391),i=l(i,r,u,t,e[f+5],st,4237533241),t=l(t,i,r,u,e[f+12],ft,1700485571),u=l(u,t,i,r,e[f+3],et,2399980690),r=l(r,u,t,i,e[f+10],ot,4293915773),i=l(i,r,u,t,e[f+1],st,2240044497),t=l(t,i,r,u,e[f+8],ft,1873313359),u=l(u,t,i,r,e[f+15],et,4264355552),r=l(r,u,t,i,e[f+6],ot,2734768916),i=l(i,r,u,t,e[f+13],st,1309151649),t=l(t,i,r,u,e[f+4],ft,4149444226),u=l(u,t,i,r,e[f+11],et,3174756917),r=l(r,u,t,i,e[f+2],ot,718787259),i=l(i,r,u,t,e[f+9],st,3951481745),t=o(t,ht),i=o(i,ct),r=o(r,lt),u=o(u,at);return vt=v(t)+v(i)+v(r)+v(u),vt.toLowerCase()};typeof define=="function"&&define.amd?define(function(){return t}):typeof module=="object"&&module.exports?module.exports=t:n.MD5=t}(this),window.trackUi=window.trackUi||{},window.trackUi.onCodeSwitch=function(n){var r=$(".code-tabs [data-code]"),t=$(n.target),i;t.hasClass("selected")||(i=t.attr("data-code"),r.each(function(n,t){var r=$(t);r.attr("data-code")===i?r.addClass("selected"):r.removeClass("selected")}))},window.trackUi.onCodeCopy=function(n){var t=$(n.target).closest(".copy-button"),i=t.find("span"),r=t.closest(".code-content").find(".code.selected pre").text();window.trackUi.copyToClipboard(r),r&&(i.text("Copied"),setTimeout(function(){i.text("Copy")},5e3))},window.trackUi.copyToClipboard=function(n){var t=document.createElement("textarea"),i;t.value=n,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),i=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1,t.select(),document.execCommand("copy"),document.body.removeChild(t),i&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(i))},window.getSessionStorageItem=function(n){try{return sessionStorage.getItem(n)}catch(t){return null}},window.setSessionStorageItem=function(n,t){try{sessionStorage.setItem(n,t)}catch(i){return}},$(function(){if(!(document.documentElement.className.indexOf("ieold")>=0)){window.PJAX_CONTAINER="#pjax-container",$.pjax.defaults.maxCacheLength=0,window.EventBus=_.extend({},Backbone.Events),$(document).pjax("a:not([data-no-ajax],[data-pjax-keep-scroll])",PJAX_CONTAINER);$(document).on("click","a[data-pjax-keep-scroll]",function(n){$.pjax.click(n,{scrollTo:!1,container:PJAX_CONTAINER})});$(document).on("pjax:timeout",function(n){n.preventDefault()});$(document).on("pjax:start",function(){window.EventBus.trigger("dispose")});$(document).on("pjax:send",function(){NProgress.start(),$(".pjax-loading").show()});$(document).on("pjax:beforeReplace",function(){window.unmountGlobalFilter(),window.unmountResolveModal(),window.unmountIgnoreBuilder()});$(document).on("pjax:complete",function(){NProgress.done(),$(".pjax-loading").hide(),gtag("config",trackUi.googleAnalyticsId,{page_location:window.location.href})});$(document).on("pjax:end",function(){setTimeout(function(){NProgress.remove()},400)});window.pjaxReload=function(){$.pjax.reload(window.PJAX_CONTAINER)},window.pjaxLoad=function(n){$.pjax({url:n,container:window.PJAX_CONTAINER})},window.pjaxReplace=function(n){window.history.replaceState($.pjax.state,"",n)},document.cookie="tzoffset="+(new Date).getTimezoneOffset()*-1+"; path=/; sameSite=strict";var n=!1;window.onresize=function(){(window.outerHeight-window.innerHeight>100||window.outerWidth-window.innerWidth>100)&&(n||(n=!0,window.onresize=undefined,console.log(" _   _      _ _       _ \n | | | | ___| | | ___ | |\n | |_| |/ _ \\ | |/ _ \\| |\n |  _  |  __/ | | (_) |_|\n |_| |_|\\___|_|_|\\___/(_)\n                         \nHey "+(window.trackUi.user?window.trackUi.user.name:"Console User")+"!\n\nThanks for checking in on us, feel free to have a look around. The UI uses a combination of PJAX loaded server side pages with BackboneJS enhancements. Send us a feedback if you want to know more.\n\nIf you're trying to get TrackJS installed, you need to point your browser at your application first. You need to be sure to load it through a webserver, as some things won't work right through the file system.\n\nVisit https://docs.trackjs.com to learn about the API and how you can customize TrackJS\nVisit https://trackjs.com/blog to keep updated with what we're doing.\n\n---\nThe TrackJS Team")))}}}),function(){window.trackUi.BillingView=Backbone.View.extend({events:{"click .edit-invoice-options":"editInvoiceOptions","click .cancel-edit-invoice":"editInvoiceOptions","click .change-card":"changeCard","click .change-card-cta":"changeCard","submit .pjax-post-form":"pjaxPost"},initialize:function(n){if(_.bindAll(this),!window.StripeCheckout){window.TrackJS.track("Stripe did not load for change card");return}this.stripeHandler=window.StripeCheckout.configure({key:n.stripeKey})},editInvoiceOptions:function(){this.$(".invoice-to .info-text").toggle(),this.$(".invoice-to .invoice-info-input").toggle(),this.$(".invoice-to .form-button-small").toggle()},changeCard:function(n){if(this.getTokenInput().val()){window.TrackJS.track("User tried to change card twice in one page view");return}return this.stripeHandler.open({image:"/images/brand/logo_icon_white_charcoal_onred_500.png",email:window.trackUi.user.email,panelLabel:"Change Card ",name:"TrackJS",allowRememberMe:!1,token:this.onStripeComplete}),n.preventDefault(),!1},onStripeComplete:function(n){this.getTokenInput().val(n.id),this.$(".change-card img").hide(),this.$(".change-card i").show(),this.$(".change-card-cta").hide(),this.$(".change-card-form").submit()},getTokenInput:function(){return this.$("input[name=StripeToken]")},pjaxPost:function(n){return n.preventDefault(),$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1}),!1}})}(),function(){window.trackUi.ErrorGroupingView=Backbone.View.extend({events:{"click #tell-me-more-toggle":"showTellMeMore","click #ok-got-it":"hideTellMeMore","keydown #message-grouping":"autosizeTextarea","keyup #message-grouping":function(){this.fetchMatchingMessages(),this.testMessage()},"keydown #test-message":"autosizeTextarea","keyup #test-message":"testMessage","change select[name='application']":"fetchMatchingMessages","change select[name='field']":"fetchMatchingMessages","shown.bs.modal #js-create-group-modal":"onModalShow","hidden.bs.modal #js-create-group-modal":"clearForm","click .js-create-rule-from-suggestion":"createRuleFromSuggestion","click .js-show-all-matches":"showAllMatches"},initialize:function(n){var t=this;n.shouldShowCreateDialog&&_.defer(function(){$("#js-create-group-modal").modal("show")}),n.shouldTestAndFetchOnLoad&&_.defer(function(){t.testMessage(),t.fetchMatchingMessages()}),this.$testMessage=this.$("#test-message"),this.$messageGrouping=this.$("#message-grouping"),this.fetchMatchingMessagesNoDelay=this.fetchMatchingMessages,this.fetchMatchingMessages=_.debounce(this.fetchMatchingMessages,500),this.testMessage=_.debounce(this.testMessage,250)},onModalShow:function(){this.autosizeTextarea({currentTarget:this.$messageGrouping.get(0)}),this.autosizeTextarea({currentTarget:this.$testMessage.get(0)}),this.removeHashFromQuerystring()},removeHashFromQuerystring:function(){var n=new Url(window.location.toString());delete n.query.hash,delete n.query.field,window.pjaxReplace(n.toString())},autosizeTextarea:function(n){for(var t=n.currentTarget;$(t).outerHeight()<Math.min(200,t.scrollHeight+parseFloat($(t).css("borderTopWidth"))+parseFloat($(t).css("borderBottomWidth")));)$(t).height($(t).height()+1)},showTellMeMore:function(n){n.preventDefault(),$(n.currentTarget).hide(),$("#tell-me-more").show()},hideTellMeMore:function(n){n.preventDefault(),$("#tell-me-more").hide(),$("#tell-me-more-toggle").show()},fetchMatchingMessages:function(){this.$(".js-messages-loading").css({display:"inline"}),this.clearMatchingMessages();var t=this.$messageGrouping.val(),i=this.$("select[name='application'] option:selected").val(),r=this.$("select[name='field'] option:selected").val();$.ajax({url:"/Account/ErrorGrouping/MatchingValues",method:"post",contentType:"application/json",dataType:"json",data:JSON.stringify({pattern:t,applicationKey:i,field:r})}).then(this.receiveMatchingMessages.bind(this))},receiveMatchingMessages:function(n){var t=n.MatchingValues,i=n.HasMorePossibleMatches,r;this.clearMatchingMessages(),t.length!==0||i?t.length===0&&i?this.$(".js-more-possible-messages").show():(r=t.map(function(n){return $("<div/>").append($("<div class='matching-message' />").text(n)).html()}).join(""),this.$(".js-matching-messages-list").html(r)):this.$(".js-no-matching-messages").show(),this.$(".js-messages-loading").hide()},clearMatchingMessages:function(){this.$(".js-matching-messages-list").empty(),this.$(".js-no-matching-messages").hide(),this.$(".js-more-possible-messages").hide()},testMessage:function(){if(!this.$testMessage.val()){this.clearTestResult();return}var n=this.$messageGrouping.val(),t=this.$testMessage.val();$.ajax({url:"/Account/ErrorGrouping/IsMatch",method:"post",dataType:"json",data:{pattern:n,testValue:t}}).then(this.receiveTestMessageResult.bind(this))},receiveTestMessageResult:function(n){this.clearTestResult();var t=n.IsMatch;t?(this.$(".js-test-is-match").show(),this.$testMessage.addClass("match")):(this.$(".js-test-no-match").show(),this.$testMessage.addClass("no-match"))},clearTestResult:function(){this.$(".js-test-is-match").hide(),this.$(".js-test-no-match").hide(),this.$testMessage.removeClass("match").removeClass("no-match")},createRuleFromSuggestion:function(n){var t=$(n.currentTarget).attr("data-rule-text"),i=$(n.currentTarget).attr("data-rule-field");this.$messageGrouping.val(t),this.$("select[name='field']").val(i),this.fetchMatchingMessagesNoDelay(),$("#js-create-group-modal").modal("show")},clearForm:function(){this.clearTestResult(),this.$testMessage.val(""),this.$messageGrouping.val(""),this.$(".js-proposed-grouping").hide(),this.$messageGrouping.removeClass("info").removeClass("match")},showAllMatches:function(n){n.preventDefault(),$(n.currentTarget).closest(".matched-messages").find(".matched-message").show(),$(n.currentTarget).closest(".matched-message").remove()}})}(),function(){window.trackUi.IgnoreSuggestionsView=Backbone.View.extend({events:{"click .close-suggestions-modal":"closeSuggestionsModal","click .add-suggested-rule":"addSuggestedRule"},initialize:function(n){this.suggestedRules=n.suggestedRules,this.configureSuggestionButton()},configureSuggestionButton:function(){var t=this.suggestedRules==null?0:this.suggestedRules.length,n=$(".show-suggested-rules");if(n.find(".suggested-rule-count").text(t),t>0){n.attr("disabled",null);n.on("click",this.showSuggestionsModal)}},showSuggestionsModal:function(){window.trackUi.modal.show(".ignore-suggestions-modal")},closeSuggestionsModal:function(){window.trackUi.modal.hide()},addSuggestedRule:function(n){var r=$(n.currentTarget).parents(".ignore-rule-suggestion").attr("data-suggested-rule-id"),t=Object.assign({},this.suggestedRules.find(function(n){return n.ignoreRuleId===r})),i;t.ignoreRuleId=null,this.closeSuggestionsModal(),i=this,window.renderIgnoreBuilder(window.globalFilterData,t,function(){i.showSuggestionsModal()})}})}(),function(){var n="ignoreView_ignore_search";window.trackUi.IgnoreView=Backbone.View.extend({events:{"keyup .ignore-search":"doSearch","click .add-ignore-rule":"addIgnoreRule","click .edit-ignore-rule":"editIgnoreRule","submit .ignore-rule-actions form":"postIgnoreRuleAction","click .ignore-result-id":"goToIgnoreRule"},initialize:function(n){this.rules=n.rules,this.restoreIgnoreSearchQuery(),this.queryForSuggestions(),this.doSearch=_.debounce(this.doSearch,300)},doSearch:function(){var n=this.$(".ignore-search").val();$(".ignore-rule .searchable").removeHighlight(),$(".ignore-rule").show(),n&&($(".ignore-rule .searchable").highlight(n),$(".ignore-rule").each(function(){$(this).find(".highlight").length===0?$(this).hide():$(this).show()}))},addIgnoreRule:function(){window.renderIgnoreBuilder(window.globalFilterData)},editIgnoreRule:function(n){var t=this,i=$(n.currentTarget).attr("data-ignore-rule-id"),r=this.rules[i];window.renderIgnoreBuilder(window.globalFilterData,r,null,function(){t.saveIgnoreSearchQuery(),window.pjaxReload()})},queryForSuggestions:function(){$.ajax({url:"/account/ignore/ignoresuggestions",method:"GET",dataType:"html"}).then(function(n){$("#ignore-suggestions-root").html(n)})},postIgnoreRuleAction:function(n){n.preventDefault(),this.saveIgnoreSearchQuery(),$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1})},goToIgnoreRule:function(n){var i=this,t="#ignore-"+$(n.currentTarget).attr("data-ignore-id");$(t).removeClass("ignore-rule-highlight"),$(document.documentElement).animate({scrollTop:$(t).offset().top-20},300,"swing",function(){i.highlightIgnoreRule(t)})},highlightIgnoreRule:function(n){$(n).addClass("ignore-rule-highlight")},saveIgnoreSearchQuery:function(){var t=this.$(".ignore-search").val();t&&setSessionStorageItem(n,t)},restoreIgnoreSearchQuery:function(){var t=getSessionStorageItem(n);t&&(this.$(".ignore-search").val(t),this.doSearch(),sessionStorage.removeItem(n))}}),jQuery.fn.highlight=function(n){function t(n,i){var o=0,e,u,r;if(n.nodeType===3){if(e=n.data.toUpperCase().indexOf(i),e>=0){u=document.createElement("span"),u.className="highlight";var f=n.splitText(e),h=f.splitText(i.length),s=f.cloneNode(!0);u.appendChild(s),f.parentNode.replaceChild(u,f),o=1}}else if(n.nodeType===1&&n.childNodes&&!/(script|style)/i.test(n.tagName))for(r=0;r<n.childNodes.length;++r)r+=t(n.childNodes[r],i);return o}return this.each(function(){t(this,n.toUpperCase())})},jQuery.fn.removeHighlight=function(){function n(t){for(var i,r,o,u=0,f=t.childNodes,e=f.length;u<e;u++){if(i=f[u],i.nodeType===1){n(i);continue}i.nodeType===3&&(r=i.nextSibling,r!==null&&r.nodeType===3)&&(o=i.nodeValue+r.nodeValue,new_node=t.ownerDocument.createTextNode(o),t.insertBefore(new_node,i),t.removeChild(i),t.removeChild(r),u--,e--)}}return this.find("span.highlight").each(function(){var t=this.parentNode;t.replaceChild(this.firstChild,this),n(t)}).end()}}(),function(){window.trackUi.NotificationsView=Backbone.View.extend({events:{"click .js-add-slack":"showSlackModal","click .js-add-email":"showEmailModal","click .js-add-teams":"showAddTeamsModal","click .js-edit-daily-summary-settings":"showDailySummarySettings","click .js-edit-weekly-summary-settings":"showWeeklySummarySettings","click .js-edit-new-error-settings":"showNewErrorSettings","click .js-edit-trend-settings":"showTrendSettings","click .js-edit-error-rate-settings":"showErrorRateSettings","click .delete-channel":"confirmDeleteChannel","click .additional-applications a":"showAdditionalApplications"},initialize:function(){_.bindAll(this),this.initializeValidation()},initializeValidation:function(){this.$(".js-add-slack-channel-form").validate(),this.$(".js-add-email-channel-form").validate()},showSlackModal:function(){this.$(".js-add-slack-modal").modal("show")},showEmailModal:function(){this.$(".js-add-email-modal").modal("show")},showAddTeamsModal:function(){this.$(".js-add-teams-modal").modal("show")},showDailySummarySettings:function(n){n.preventDefault(),this.$(".js-daily-summary-notification-settings").modal("show")},showWeeklySummarySettings:function(n){n.preventDefault(),this.$(".js-weekly-summary-notification-settings").modal("show")},showNewErrorSettings:function(n){n.preventDefault(),this.$(".js-new-error-notification-settings").modal("show")},showTrendSettings:function(n){n.preventDefault(),this.$(".js-trend-notification-settings").modal("show")},showErrorRateSettings:function(n){n.preventDefault(),this.$(".js-error-rate-notification-settings").modal("show")},confirmDeleteChannel:function(){return confirm("Are you sure you want to delete this notification channel?")},showAdditionalApplications:function(n){$(n.target).closest(".additional-applications").find(".additional-applications-list").show(),$(n.target).closest(".additional-applications").find(".selected-applications").text("the selected applications"),$(n.target).hide()}})}(),function(n,t){"use strict";n.trackUi=n.trackUi||{},n.trackUi.ButtonRadioView=t.View.extend({initialize:function(){var n=this.$(".button-radio");n.each(function(t,i){var r=$(i),u=r.find("input[type=radio]");u.is(":checked")&&(n.removeClass("active"),r.addClass("active"));u.on("click",function(){u.is(":checked")&&(n.removeClass("active"),r.addClass("active"))})})}})}(window,Backbone,_),function(){"use strict";function t(n){return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}var n="Business 100";window.trackUi=window.trackUi||{},window.trackUi.StripeCheckoutView=Backbone.View.extend({stripeHandler:null,existingPayment:!1,events:{"click .sub-button":"onSubscribe","click #confirm-subscription-modal .update-subscription":"confirmSubscriptionUpdate","change .business-plan-dropdown":"updateBusinessCheckoutValues"},initialize:function(n){if(_.bindAll(this),!window.StripeCheckout){window.TrackJS.track("Stripe did not load for checkout");return}this.existingPayment=n.existingPayment,this.businessSubscriptionData=n.businessSubscriptionData,this.pageViewsLast30=n.pageViewsLast30,this.selectLowestAllowedBusinessPlan(this.pageViewsLast30),this.stripeHandler=window.StripeCheckout.configure({key:n.stripeKey})},showLoading:function(n){$(".sub-button").attr("disabled",!0).addClass("disabled"),$(n).html("<i class='fa fa-spinner fa-pulse'><\/i>").css("width","175px")},onSubscribe:function(n){var t,i,r,u;return(n.preventDefault(),t=$(n.currentTarget).data(),i=this.$el.find("form"),i.find("input[name='SubscriptionId']").val(t.subscriptionId),i.find("input[name='StripeToken']").val())?(this.showLoading(),!0):this.existingPayment?(r=this.$("#confirm-subscription-modal"),r.modal("show"),r.find(".new-subscription").text(t.name),!1):(u=this,this.stripeHandler.open({image:"/images/brand/logo_icon_white_charcoal_onred_500.png",email:window.trackUi.user.email,panelLabel:"Subscribe at ",name:"TrackJS",description:t.name,allowRememberMe:!1,amount:t.amount,token:function(t){u.showLoading(n.currentTarget),i.find("input[name='StripeToken']").val(t.id),i.submit()}}),!1)},confirmSubscriptionUpdate:function(){this.showLoading($(".update-subscription"));var n=this.$el.find("form").submit()},updateBusinessCheckoutValues:function(){var u=$(".business-plan-dropdown").val(),i=this.businessSubscriptionData.filter(function(n){return n.DisplayName===u&&n.BillingCycle==="Monthly"})[0],r=this.businessSubscriptionData.filter(function(n){return n.DisplayName===u&&n.BillingCycle==="Yearly"})[0],l=$(".business-price-block .sub-button.monthly"),e,o,s,h,c,f;l.data({subscriptionId:i.Id,amount:i.Amount,name:i.DisplayName}),e=$(".business-price-block .sub-button.yearly"),e.data({subscriptionId:r.Id,amount:r.Amount,name:r.DisplayName+" (Annual)"}),o=$(".business-price-block .price-display.monthly .price-value"),o.text("$"+i.Amount/100),s=$(".business-price-block .price-display.yearly .price-value"),s.text("$"+t(r.Amount/100)),h="$"+t((i.Amount+100+r.Amount)/100),c=$(".business-price-block .price-display.yearly .original-price"),c.text(h),f=$(".business-price-block .application-count"),i.UnlimitedApplications?f.text("Unlimited"):f.text(i.MaxApplications),i.MaxHits*1.25<this.pageViewsLast30&&u!==n?$(".business-price-block .overage-overlay").show():$(".business-price-block .overage-overlay").hide()},selectLowestAllowedBusinessPlan:function(t){for(var f=_.sortBy(this.businessSubscriptionData,"MaxHits"),i,u,r=0;r<f.length;r++)if(u=f[r],u.MaxHits>t){i=u.DisplayName;break}i||(i=n),$(".business-plan-dropdown").val(i),this.updateBusinessCheckoutValues()}})}(),function(){"use strict";window.trackUi.ApplicationsView=Backbone.View.extend({events:{"click .add-application":"createNewApplication","click .add-ghost-application":"createGhostApplication","click .close-application-modal":"closeApplicationModal","click .edit-application":"editApplication","click .delete-application":"showDeleteOptions","submit form.delete-application-and-errors":"deleteApplicationAndErrors","submit form.delete-application-only":"deleteApplicationOnly","submit form.delete-ghost-data":"deleteGhostData","keyup .js-app-key":"applicationKeyChanged","keyup .js-app-name":"applicationNameChanged","click .code-nav a[data-code]":"onCodeSwitch","click .js-application-name-link":"switchApplicationAndLoadDashboard","keyup .application-search":"doSearch","click .copy-button":"onCodeCopy"},initialize:function(n){_.bindAll(this),this.$createModal=this.$("#js-create-application-modal"),this.$editModal=this.$("#js-edit-application-modal"),this.$upgradeModal=this.$("#js-upgrade-application-modal"),this.initializeValidation(),this.updateAppKeyExample=_.debounce(this.updateAppKeyExample,50),this.doSearch=_.debounce(this.doSearch,100),this.canCreateApplications=n.canCreateApplications;$("body").on("click.applicationsView",this.hideDeleteOptionsWhenClickOutside);window.EventBus.on("dispose",this.dispose,this);prettyPrint()},initializeValidation:function(){this.$(".js-app-form").each(function(){$(this).validate({rules:{name:{required:!0,minlength:1,maxlength:50},slug:{required:!0,minlength:1,maxlength:25,regex:"^[a-zA-Z0-9_-]*$"}},messages:{slug:{regex:"The application key may only contain letters, numbers and hyphens"}}})})},showCreateApplicationModal:function(){this.canCreateApplications?window.trackUi.modal.show(this.$createModal):window.trackUi.modal.show(this.$upgradeModal)},createNewApplication:function(){this.$createModal.find("input.js-app-key").val(""),this.$currentApplicationKey().attr("readonly",!1),this.$currentApplicationKey().data("dirty",!1),this.updateAppKeyExample(),this.showCreateApplicationModal()},createGhostApplication:function(n){var t=$(n.currentTarget).attr("data-application-key");this.$currentApplicationKey().val(t),this.$currentApplicationKey().attr("readonly",!0),this.applicationKeyChanged(),this.showCreateApplicationModal()},editApplication:function(n){var i=$(n.currentTarget).attr("data-application-id"),r=$(n.currentTarget).attr("data-application-name"),t=$(n.currentTarget).attr("data-application-key");$(".js-app-key",this.$editModal).val(t),$("input[name='slug']",this.$editModal).val(t),$(".js-app-key-example",this.$editModal).text(t),$(".js-app-name",this.$editModal).val(r),$(".js-app-id",this.$editModal).val(i),$(".js-ignore-rules",this.$editModal).attr("href","/account/ignore?forApplication="+t),$(".js-notifications",this.$editModal).attr("href","/account/notifications?applicationKey="+t),window.trackUi.modal.show(this.$editModal)},showDeleteOptions:function(n){this.$(".delete-application-options").hide();var t=$(n.currentTarget).siblings(".delete-application-options");t.show()},hideDeleteOptionsWhenClickOutside:function(n){!document.body.contains(n.target)||this.$(".application-actions").find(n.target).length>0||this.$(".delete-application-options").hide()},deleteApplicationAndErrors:function(n){n.preventDefault();var t=confirm("Are you sure you want to delete this application AND all errors associated with the application?");t&&$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1})},deleteApplicationOnly:function(n){n.preventDefault();var t=confirm("Are you sure you want to delete this application?\nErrors associated with the application will not be deleted.");t&&$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1})},deleteGhostData:function(n){n.preventDefault();var t=confirm("Are you sure you want to delete all errors with this application key?");t&&$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1})},closeApplicationModal:function(){window.trackUi.modal.hide()},applicationNameChanged:function(){if(!this.$currentApplicationKey().data("dirty")){var n=(this.$currentApplicationName().val()||"").replace(/[^a-zA-Z0-9_\- ]+/g,"").replace(/[ ]+/g,"-").toLowerCase();n.length<=25&&this.$currentApplicationKey().val(n)}this.updateAppKeyExample()},applicationKeyChanged:function(){this.$currentApplicationKey().data("dirty",!0),this.updateAppKeyExample()},updateAppKeyExample:function(){var n=this.$currentApplicationKey(),t=n.val();n.closest(".js-app-form").find(".js-app-key-example").text(t)},$currentApplicationKey:function(){return $(".create-application-modal .js-app-key")},$currentApplicationName:function(){return $(".create-application-modal .js-app-name")},onCodeSwitch:window.trackUi.onCodeSwitch,switchApplicationAndLoadDashboard:function(n){var t=$(n.currentTarget).attr("data-application-id")||"";console.log("Activated application",t),$.post("/Account/Applications/switch/"+t,{}).then(window.pjaxLoad.bind(window,"/"))},doSearch:function(){var n=this.$(".application-search").val();$(".application .searchable").removeHighlight(),$(".application").show(),n&&($(".application .searchable").highlight(n),$(".application").each(function(){$(this).find(".highlight").length===0?$(this).hide():$(this).show()}))},dispose:function(){$("body").off("click.applicationsView"),window.EventBus.off("dispose",this.dispose,this)},onCodeCopy:window.trackUi.onCodeCopy})}(),function(){"use strict";var f=Backbone.Model.extend({deleteIndividual:function(){return this.destroy({url:"/details/delete/"+this.get("id")})},toggleStar:function(){return this.save(null,{url:"/details/star/"+this.get("id")})},shareErrorLink:function(){return this.save(null,{url:"/shared/create-error-link/"+this.get("id")})},unshareErrorLink:function(){return this.save(null,{url:"/shared/delete-error-link/"+this.get("id")})}}),r="details_timeline_width",u="details_general_info_height",t="details_general_info_collapsed",n="details_general_info_last_tab",i="details_timeline_sort";window.trackUi.DetailsView2=Backbone.View.extend({events:{"click .js-delete-this-error":"deleteError","click .delete-by-message":"deleteByMessage","click .ignore-by-message":"ignoreByMessage","click .star-this-error":"toggleStar","click .js-solutions-tab":"showSolutionsTab","click .share-this-error":"shareError","click .unshare-this-error":"unshareError","click .shared-link":function(n){n.currentTarget.select()},"click .event-filter":function(n){var t=$(n.currentTarget).data().eventType;this.filterTimelineEvents(t)},"click .timeline-sort":"reverseTimelineSort","click .event-timestamp":"toggleFullTimestamp","click .show-message-group":"showMessageGroup","click .raw-user-agent":"showRawUserAgent","click .parsed-user-agent":"showParsedUserAgent","click .information-tab":"showInfoTab","click .entry-info-icon":"toggleEntryInfo","submit #add-comment-form":"addComment","submit .delete-comment-form":"deleteComment"},initialize:function(n){_.bindAll(this),this.model=new f({id:n.errorId,messageHash:n.messageHash,message:n.message}),this.$(".js-tooltip").tooltip(),this.initializeTimelineResizer(),this.initializeGeneralInfoResizer(),this.initializeTimelineSort(),this.initializeNetworkRequestCorrelationLinks(),this.applyQueryStringParams(),this.formatJson()},initializeTimelineResizer:function(){var n=getSessionStorageItem(r);n&&this.$(".telemetry-timeline").css("flex","0 0 "+n+"px"),this.$(".telemetry-timeline").resizable({handleSelector:".column-drag-handle",resizeHeight:!1,onDrag:function(t,i,r){t.preventDefault(),$(i).css("flex","0 0 "+r+"px"),n=r},onDragEnd:function(){n&&setSessionStorageItem(r,n)}})},initializeGeneralInfoResizer:function(){var i=getSessionStorageItem(u),r=getSessionStorageItem(t)==="true",f=getSessionStorageItem(n)||"general-information";i&&this.$(".bottom-section").addClass("resized").css("flex","0 0 "+i+"px"),r?this.collapseAllTabs():this.showTabByName(f),this.$(".bottom-section").resizable({handleSelector:".row-drag-handle",resizeWidth:!1,resizeHeightFrom:"top",onDrag:function(n,t,r,u){if(!this.generalInfoResizerEnabled)return!1;n.preventDefault(),$(t).css("flex","0 0 "+u+"px").addClass("resized"),i=u}.bind(this),onDragEnd:function(){i&&setSessionStorageItem(u,i)}}),this.generalInfoResizerEnabled=!0,setTimeout(function(){this.$(".bottom-section").addClass("animate")}.bind(this),10)},initializeTimelineSort:function(){var n=getSessionStorageItem(i)||"descending",t=$(".timeline-sort i").hasClass("icon-sort-by-numeric-order");n==="ascending"&&t&&this.reverseTimelineSort()},initializeNetworkRequestCorrelationLinks:function(){var n=this.$(".network-event-server-correlation"),t;n.length!==0&&(t=_.map(n,function(n){return $(n).attr("data-server-correlation-id")}),$.ajax({url:"/details/correlationidcounts/get",data:JSON.stringify({correlationIds:t}),type:"POST",contentType:"application/json",dataType:"json"}).then(this.showNetworkRequestCorrelationLinks.bind(this)))},showNetworkRequestCorrelationLinks:function(n){_.each(n.correlationIdCounts,function(n){if(n.Value>0){var t=this.$(".network-event-server-correlation[data-server-correlation-id="+n.Key+"]");t.show()}},this)},applyQueryStringParams:function(){var t=new Url(window.location.toString()),r=$(".timeline-sort i").hasClass("icon-sort-by-numeric-order"),n,i;t.query.timelineSort==="ascending"&&r&&this.reverseTimelineSort(),n=t.query.filter,n&&(i=n.split(","),i.forEach(function(n){this.filterTimelineEvents(n)},this))},deleteError:function(){var n=confirm("Are you sure you want to delete this error?  This action is not recoverable.");n&&(gtag("event","error_delete",{event_category:"engagement"}),this.model.deleteIndividual().then(function(){window.history.back()}))},deleteByMessage:function(){var n=confirm("Are you sure you want to delete all un-saved errors that have this message?  This action is not recoverable.");n&&(gtag("event","error_delete",{event_category:"engagement"}),$.ajax({url:"/errors/delete",data:JSON.stringify({hash:this.model.get("messageHash")}),type:"POST",contentType:"application/json",dataType:"json"}).then(function(){window.history.back()}))},ignoreByMessage:function(){gtag("event","error_ignore",{event_category:"engagement"});var n=this.model.get("message"),t={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:[{field:"Message",matchType:"Exact",conditionValue:n}]};window.renderIgnoreBuilder(window.globalFilterData,t,null,function(){window.pjaxLoad("/errors")})},toggleStar:function(){gtag("event","error_star",{event_category:"effectiveness"}),this.model.toggleStar();var n=this.$(".star-this-error"),t=n.hasClass("error-is-saved");t?(n.removeClass("error-is-saved").removeClass("fa-star").addClass("fa-star-o"),n.attr("title","Save this error")):(n.addClass("error-is-saved").removeClass("fa-star-o").addClass("fa-star"),n.attr("title","This error is saved"))},shareError:function(){gtag("event","error_share",{event_category:"effectiveness"}),this.model.shareErrorLink().then(function(){window.pjaxReload()}.bind(this))},unshareError:function(){this.model.unshareErrorLink().then(function(){window.pjaxReload()}.bind(this))},formatJson:function(){var n=this.$("pre.js-format-json");n.each(function(n,t){var i=$(t),u=i.text(),r=js_beautify(u,{indent_size:2,preserve_newlines:!1});r=r.replace(/\\n/gi,"\n").replace(/\\r/gi,""),i.text(r),i.removeClass("js-format-json"),i.addClass("prettyprint")})},filterTimelineEvents:function(n){var t,u;if(gtag("event","error_timeline",{event_category:"engagement"}),t=$(".event-filter[data-event-type='"+n+"']"),!t.hasClass("none")){var r=new Url(window.location.toString()),f=r.query.filter,i=[];f&&(i=f.split(",")),u=i.indexOf(n),u>=0&&i.splice(u,1),t.hasClass("off")?(t.removeClass("off"),$(".entire-timeline").find(".timeline-event."+n).show()):(t.addClass("off"),$(".entire-timeline").find(".timeline-event."+n).hide(),i.push(n)),r.query.filter=i.toString(),window.pjaxReplace(r.toString()),this.applyTimelineFirstAndLastStyles()}},reverseTimelineSort:function(){var r,u,t,n;gtag("event","error_timeline",{event_category:"engagement"}),r=$(".entire-timeline"),u=r.children(".timeline-event"),r.append(u.get().reverse()),this.applyTimelineFirstAndLastStyles(),t=new Url(window.location.toString()),n=$(".timeline-sort i"),n.hasClass("icon-sort-by-numeric-order")?(n.removeClass("icon-sort-by-numeric-order"),n.addClass("icon-sort-by-numeric-order-opposites"),t.query.timelineSort="ascending",setSessionStorageItem(i,"ascending")):(n.removeClass("icon-sort-by-numeric-order-opposites"),n.addClass("icon-sort-by-numeric-order"),t.query.timelineSort="descending",setSessionStorageItem(i,"descending")),window.pjaxReplace(t.toString())},applyTimelineFirstAndLastStyles:function(){$(".timeline-event.first").removeClass("first"),$(".timeline-event.last").removeClass("last"),$(".timeline-event:visible:first").addClass("first"),$(".timeline-event:visible:last").addClass("last")},toggleFullTimestamp:function(){gtag("event","error_timeline",{event_category:"engagement"}),this.$(".event-timestamp").each(function(){var n=$(this),t=n.text();n.text(n.attr("title")),n.attr("title",t)})},showMessageGroup:function(n){$(n.currentTarget).hide(),$(".message-group-container").show()},showRawUserAgent:function(){this.$(".raw-user-agent-container").show(),this.$(".parsed-user-agent-container").hide()},showParsedUserAgent:function(){this.$(".raw-user-agent-container").hide(),this.$(".parsed-user-agent-container").show()},showInfoTab:function(n){var t=$(n.currentTarget),i;if(t.hasClass("selected")){this.collapseAllTabs();return}i=t.data("tab"),this.showTabByName(i)},showTabByName:function(n){switch(n){case"general-information":default:this.showGeneralInformation();break;case"application-information":this.showApplicationInformation();break;case"library-information":this.showLibraryInformation();break;case"comment-information":this.showCommentInformation()}},collapseAllTabs:function(){this.$(".information-tab").removeClass("selected"),this.$(".info-tab-content").hide(),this.disableGeneralInfoResizer(),setSessionStorageItem(t,!0)},showGeneralInformation:function(){this.$(".information-tab").removeClass("selected"),this.$(".information-tab[data-tab='general-information']").addClass("selected"),this.$(".info-tab-content").hide(),this.$(".general-information").show(),setSessionStorageItem(n,"general-information"),this.enableGeneralInfoResizer()},showApplicationInformation:function(){this.$(".information-tab").removeClass("selected"),this.$(".information-tab[data-tab='application-information']").addClass("selected"),this.$(".info-tab-content").hide(),this.$(".application-information").show(),setSessionStorageItem(n,"application-information"),this.enableGeneralInfoResizer()},showLibraryInformation:function(){this.$(".information-tab").removeClass("selected"),this.$(".information-tab[data-tab='library-information']").addClass("selected"),this.$(".info-tab-content").hide(),this.$(".library-information").show(),setSessionStorageItem(n,"library-information"),this.enableGeneralInfoResizer()},showCommentInformation:function(){this.$(".information-tab").removeClass("selected"),this.$(".information-tab[data-tab='comment-information']").addClass("selected"),this.$(".info-tab-content").hide(),this.$(".comment-information").show(),setSessionStorageItem(n,"comment-information"),this.enableGeneralInfoResizer()},disableGeneralInfoResizer:function(){this.generalInfoResizerEnabled=!1,this.bottomSectionStyles=this.$(".bottom-section").attr("style"),this.$(".bottom-section").attr("style","").addClass("collapsed"),this.$(".row-drag-handle").addClass("no-drag")},enableGeneralInfoResizer:function(){this.generalInfoResizerEnabled=!0,this.$(".bottom-section").removeClass("collapsed"),this.bottomSectionStyles&&(this.$(".bottom-section").attr("style",this.bottomSectionStyles),this.bottomSectionStyles=null),this.$(".row-drag-handle").removeClass("no-drag"),setSessionStorageItem(t,!1)},toggleEntryInfo:function(){this.$(".entry-info-message").toggle()},addComment:function(n){n.preventDefault(),$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1})},deleteComment:function(n){n.preventDefault();var t=confirm("Are you sure you want to delete this comment?");t&&$.pjax.submit(n,"#pjax-container",{push:!1,replace:!1,scrollTo:!1})}})}(),function(){window.trackUi.StacktraceView=Backbone.View.extend({events:{"click .toggle-source":"toggleRawSource","click .toggle-raw":"toggleRawStack","click .toggle-raw-bind":"toggleRawBindStack","click .toggle-why-no-stack":"toggleWhy","click .toggle-why-tracker":"toggleWhyTracker","click .file-url":"toggleFullUrl","click .sourcemap-toggle":"toggleSourcemapOnOrOff"},sourcemapCount:1,finishedRetrievingMaps:!1,initialize:function(n){_.bindAll(this),n.disableSourcemaps||(this.initializeFileDragAndDrop(),this.initializeFileUpload(),this.autoRetrieveSourcemaps())},initializeFileDragAndDrop:function(){var n=this.$(".js-file-target"),t=$("body"),i=this;n.on("dragover.filetarget",function(t){return t.preventDefault(),n.addClass("file-target"),!1});n.on("dragleave.filetarget",function(t){return t.preventDefault(),n.removeClass("file-target"),!1});t.on("dragover.filetarget",function(n){return n.preventDefault(),!1});t.on("drop.filetarget",function(t){return t.preventDefault(),n.removeClass("file-target"),!1});n.on("drop.filetarget",this.handleSourcemapDrop);window.EventBus.on("dispose",this.dispose,this)},initializeFileUpload:function(){this.$("#upload-sourcemap").on("change",this.handleSourcemapUpload)},autoRetrieveSourcemaps:function(){var r={},n,i,t;if(this.$(".valid-frame").each(function(){r[$(this).data("url")]=!0}),n=_.keys(r),n.length!==0){for(i=[],t=0;t<n.length;t++)i.push($.ajax({url:"/details/sourcemap-single/retrieve",type:"get",dataType:"json",data:{jsFile:n[t]}}));Promise.all(i).then(this.autoApplySourcemaps.bind(this),this.hideRetrievalInProgressMessage.bind(this)),setTimeout(function(){this.finishedRetrievingMaps||this.showRetrievalInProgressMessage()}.bind(this),350)}},showRetrievalInProgressMessage:function(){this.showSourcemapLoading(),this.setSourcemapToggleSwitchText("ANALYZING...")},hideRetrievalInProgressMessage:function(){this.finishedRetrievingMaps=!0,this.hideSourcemapLoading()},autoApplySourcemaps:function(n){var t,i,r,u;for(this.finishedRetrievingMaps=!0,t={Results:[]},i=0;i<n.length;i++)(r=n[i].Result,r.IsTracker)||t.Results.push(r);this.showSourcemapStatusInformation(t.Results),u=_.filter(t.Results,function(n){return n.HasSourcemap}),u.length===0&&(this.disableSourcemapToggle(),this.hideSourcemapLoading()),_.each(u,function(n){this.parseSourcemap(n.SourcemapContent,n.OriginalFile)},this)},showSourcemapStatusInformation:function(n){var t=!1;_.each(n,function(n){var i=$(".found-sourcemap-template").clone().find(".found-sourcemap");n.HasSourcemap?(i.attr("js-file",n.OriginalFile),i.attr("map-file",n.SourcemapUri),i.find(".sourcemap-header-text").text("Sourcemap #"+this.sourcemapCount),i.find(".sourcemap-status-text").text("(Automatic)"),i.find(".sourcemap-js-file").text(n.OriginalFile).attr("href",n.OriginalFile),i.find(".sourcemap-map-file").text(n.SourcemapUri).attr("href",n.SourcemapUri),$(".sourcemap-information-container").append(i),t=!0):!n.Successful||n.HasSourcemap||n.HasSourcemapUri?n.Successful||n.HasSourcemap||n.HasSourcemapUri?n.HasSourcemapUri&&(i.attr("js-file",n.OriginalFile),i.attr("map-file",n.SourcemapUri),i.find(".sourcemap-header-text").text("Sourcemap #"+this.sourcemapCount),i.find(".sourcemap-status-text").text("(Failed to Retrieve Sourcemap)"),i.find(".sourcemap-js-file").text(n.OriginalFile).attr("href",n.OriginalFile),i.find(".sourcemap-map-file").text(n.SourcemapUri).attr("href",n.SourcemapUri),i.find(".sourcemap-error-message").show().html(n.Message.replace(/\n/g,"<br/>")),$(".sourcemap-information-container").append(i)):(i.attr("js-file",n.OriginalFile),i.find(".sourcemap-header-text").text("Script #"+this.sourcemapCount),i.find(".sourcemap-status-text").text("(Could not retrieve script file to check for sourcemap directive)"),i.find(".sourcemap-js-file").text(n.OriginalFile).attr("href",n.OriginalFile),i.find(".sourcemap-map-file-row").hide(),i.find(".sourcemap-error-message").show().html(n.Message.replace(/\n/g,"<br/>")),$(".sourcemap-information-container").append(i)):(i.attr("js-file",n.OriginalFile),i.find(".sourcemap-header-text").text("Script #"+this.sourcemapCount),i.find(".sourcemap-status-text").text("(No map file found)"),i.find(".sourcemap-js-file").text(n.OriginalFile).attr("href",n.OriginalFile),i.find(".sourcemap-map-file-row").hide(),i.find(".sourcemap-error-message").show().text("No sourcemap directive found in this JavaScript file.  If you include one, we'll automatically retrieve the map and apply it."),$(".sourcemap-information-container").append(i)),this.sourcemapCount++},this),t&&(TrackJS.track("Found and applied sourcemap"),gtag("event","sourcemap_applied",{event_category:"effectiveness"}))},showManualSourcemapStatusInformation:function(n,t){var i=$(".found-sourcemap-template").clone().find(".found-sourcemap");i.attr("map-file",n),i.attr("js-file",t),i.find(".sourcemap-header-text").text("Sourcemap #"+this.sourcemapCount),i.find(".sourcemap-status-text").text("(Manually Applied)"),i.find(".sourcemap-js-file-row").hide(),i.find(".sourcemap-map-file").text(n).attr("href","#"),$(".sourcemap-information-container").append(i),this.sourcemapCount++},handleSourcemapDrop:function(n){this.showSourcemapLoading(),gtag("event","sourcemap_manual",{event_category:"effectiveness"});var t=n.originalEvent.dataTransfer.files[0];this.readSourcemap(t)},handleSourcemapUpload:function(n){n.originalEvent.target.files.length>0&&(this.showSourcemapLoading(),this.readSourcemap(n.originalEvent.target.files[0]))},readSourcemap:function(n){var i=new FileReader,r=this,t=n.name;t&&t.indexOf(".map")===t.length-4&&(t=t.replace(".map",""),t.indexOf(".js")!==t.length-3&&(t+=".js")),i.addEventListener("load",function(i){var u=i.target.result;r.showManualSourcemapStatusInformation(n.name,t),r.parseSourcemap(u,t)}),i.readAsText(n)},parseSourcemap:function(n,t){try{n.slice(0,3)===")]}"&&(n=n.substring(n.indexOf("\n")));var i=new sourceMap.SourceMapConsumer(JSON.parse(n));t&&(i.sourceFilename=t)}catch(r){this.showSourcemapMessage(t,t,r),this.disableSourcemapToggle();return}this.applySourcemap(i)},applySourcemap:function(n){var t=this,i=!1;this.$(".stack .valid-frame").each(function(){var r=$(this);t.shouldProcessStackFrame(n,r.data("file"))&&(t.processStackFrame(r,n),i=!0)}),i?this.toggleSourcemapOn():(console.log("Sourcemap file",n.file),console.log("Original JS File Name",n.sourceFilename),window.TrackJS&&TrackJS.track("Found sourcemap but did not match any lines!"),gtag("event","sourcemap_invalid",{event_category:"effectiveness"}),this.showSourcemapMessage(n.file,n.sourceFilename,"The sourcemap you supplied did not match any lines in the stack trace"),this.disableSourcemapToggle()),this.hideSourcemapLoading()},shouldProcessStackFrame:function(n,t){var i=n.file||"",r=n.sourceFilename||"";return(i=this.getFilenameOnly(i),r=this.getFilenameOnly(r),i.match(new RegExp("^"+t+"$","gi")))?!0:r.match(new RegExp("^"+t+"$","gi"))?!0:!1},getFilenameOnly:function(n){var t=n.split("/"),i=t[t.length-1];return i.split("?")[0]},processStackFrame:function(n,t){var r=n.clone(),f,u;r.addClass("sourcemap-applied-stack-frame"),n.hide().addClass("original-stack-frame"),n.closest(".stack-frame").append(r);var y=r.find(".line-column-numbers"),p=r.find(".file-url"),c=r.find(".function"),i=t.originalPositionFor({line:r.data("line"),column:r.data("column")});i.source&&(y.text(i.line+":"+i.column),p.text(i.source),i.name&&c.text(i.name),c.addClass("bold"),r.find(".toggle-source").remove(),r.find(".stack-frame-information-message").text("(Sourcemap applied)").css({display:"inline"}),this.incrementStackFrameProcessedCount(t.sourceFilename)),f=null;try{f=t.sourceContentFor(i.source)}catch(d){}if((!i.source||!/tracker\.js$/.test(i.source))&&f){var s=f.split("\n"),e=i.line-1,o=s[e];o=o.slice(0,i.column)+"~~~"+o.slice(i.column);var h=8,w=Math.max(e-h,0),v=Math.min(e+h,s.length),l=s.slice(w,v),b=Math.min(h,e);if(l[b]=o,u=l.join("\n").replace(/\s+/," "),u.length>1e3){var a=u.indexOf("~~~"),k=Math.max(0,a-500),v=Math.min(u.length-1,a+500);u=u.substring(k,v)}this.showSnippet(r,{Result:{Successful:!0,Source:u}},!0),r.find(".stack-frame-information-message").text("Showing original source content from sourcemap").css({display:"block"})}},showSourcemapMessage:function(n,t,i){var r=this.$(".found-sourcemap[map-file='"+n+"']");r.length===0&&(r=this.$(".found-sourcemap[js-file='"+t+"']")),r.length>0&&r.find(".sourcemap-error-message").show().text(i),this.hideSourcemapLoading()},showSourcemapLoading:function(){this.$("#js-sourcemap-loading").show()},hideSourcemapLoading:function(){this.$("#js-sourcemap-loading").hide()},dispose:function(){$("body").off("dragover.filetarget").off("drop.filetarget"),window.EventBus.off("dispose",this.dispose,this)},toggleRawSource:function(n){var i=$(n.currentTarget),t=i.closest(".valid-frame"),r=i.find("i"),u=i.find(".source-toggle-message"),f=t.find(".js-snippet-container"),o=r.hasClass("fa-caret-up"),e;o?(u.text("View Raw Source"),r.removeClass("fa-caret-up").addClass("fa-caret-down"),f.hide(),t.removeClass("frame-showing-snippet")):(u.text("Hide Raw Source"),r.removeClass("fa-caret-down").addClass("fa-caret-up"),f.show(),e=t.find(".stack-frame-information-message").text()=="",e?this.retrieveSnippet(n):t.addClass("frame-showing-snippet"))},retrieveSnippet:function(n){var t=$(n.currentTarget).closest(".valid-frame");t.find(".js-snippet-loading").show();var i=t.data(),r="/details/snippet/show",u=this;return $.getJSON(r,i).then(function(n){u.showSnippet(t,n,!1),n.Result.Successful&&t.find(".stack-frame-information-message").text("Showing raw JS source")})},showSnippet:function(n,t,i){var r=document.createElement("pre"),f,s,o,e,u;if(r.className="snippet linenums",n.find(".js-snippet-container").append(r),t.Result.Successful){f=js_beautify(t.Result.Source,{indent_size:2,preserve_newlines:i,break_chained_methods:!i,wrap_line_length:i?0:80,e4x:!0}),s=!1;try{for(o=f.split("\n"),e=-1,u=0;u<o.length;u++)if(o[u].indexOf("~~~")>=0){e=u+1;break}(e>=0||f.length<3)&&(r.innerHTML=f.replace(/< script/gi,"&lt;script").replace(/< \/script/gi,"&lt;/script").replace(/< style/gi,"&lt;style").replace(/< \/style/gi,"&lt;/style").replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/~~~(\s)*/gi,"<span class='stack-position'><i class='fa fa-long-arrow-up'><\/i><\/span>"),$(r).addClass("prettyprint"),prettyPrint(),$(r).find("ol.linenums li:nth-child("+e+")").addClass("highlight"),n.addClass("frame-showing-snippet"),s=!0)}catch(h){TrackJS.track(h),r.innerHTML="Error Occurred"}}else r.innerHTML=t.Result.Message;n.find(".js-snippet-loading").hide()},incrementStackFrameProcessedCount:function(n){var t=$(".found-sourcemap[js-file='"+n+"']").find(".sourcemap-applied-count-message"),i;t&&(i=parseInt(t.find(".stack-frame-count").text()),i++,t.find(".stack-frame-count").text(i),t.show())},toggleRawStack:function(){this.$(".show-raw-container").toggle(),this.$(".show-raw-container + .raw-stack").toggle()},toggleRawBindStack:function(){this.$(".show-raw-bind-container").toggle(),this.$(".show-raw-bind-container + .raw-stack").toggle()},toggleWhy:function(){this.$(".why-no-stack").toggle()},toggleWhyTracker:function(n){var t=$(n.currentTarget).closest(".valid-frame"),i=t.find(".why-tracker-container");i.toggle()},toggleFullUrl:function(n){var t=$(n.target),i=t.closest(".valid-frame");i.find(".file-url").toggle()},enableSourcemapToggle:function(){this.$(".sourcemap-toggle").removeClass("disabled").attr("title","Sourcemap processing is enabled")},disableSourcemapToggle:function(){this.$(".sourcemap-applied-stack-frame").length===0&&(this.$(".sourcemap-toggle").addClass("disabled").attr("title","We were unable to find and apply sourcemaps for this stack trace.  See the bottom of the stack trace for more information."),this.setSourcemapToggleSwitchText("UNAVAILABLE"))},setSourcemapToggleSwitchText:function(n){this.$(".sourcemap-toggle .switch-text").text(n)},toggleSourcemapOff:function(){this.enableSourcemapToggle(),this.$(".sourcemap-toggle").removeClass("switch-on").attr("title","Sourcemaps are turned off"),this.setSourcemapToggleSwitchText("OFF"),this.$(".sourcemap-applied-stack-frame").hide(),this.$(".original-stack-frame").show()},toggleSourcemapOn:function(){this.enableSourcemapToggle(),this.$(".sourcemap-toggle").addClass("switch-on").attr("title","Sourcemap processing is enabled"),this.setSourcemapToggleSwitchText("ON"),this.$(".sourcemap-applied-stack-frame").show(),this.$(".original-stack-frame").hide()},toggleSourcemapOnOrOff:function(){this.$(".sourcemap-toggle").hasClass("disabled")||(this.$(".sourcemap-toggle").hasClass("switch-on")?this.toggleSourcemapOff():this.toggleSourcemapOn())}})}(),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}window.trackUi.MessageGroupingsView=Backbone.View.extend({events:{"click .js-ignore-selected":"ignoreSelectedErrorsByMessage","click .js-delete-selected":"deleteSelectedErrorsByMessage","change .error-select-checkbox":"selectedErrorsChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged"},initialize:function(n){_.bindAll(this),this.selectedErrorsChanged(),$(".charts").length>0&&(this.initErrorsChart(n.errorData),this.initUserImpactChart(n.userImpactData))},selectedErrorsChanged:function(n){var r=this.$(".error-select-checkbox:checked"),u=_.map(r,function(n){return $(n).data("message-hash")}),t,i;window.ErrorStatusChooser&&window.ErrorStatusChooser.setErrorMessageHashes(u),n&&(t=$(n.currentTarget),i=t.closest(".grouped-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?(this.$(".grouping-actions > button").addClass("disabled"),this.$(".error-status-dropdown .action-button").addClass("disabled")):(this.$(".grouping-actions > button").removeClass("disabled"),this.$(".error-status-dropdown .action-button").removeClass("disabled"))},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedErrorsChanged(),this.$(".error-select-checkbox:checked").closest(".grouped-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".grouped-error").removeClass("selected")},ignoreSelectedErrorsByMessage:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).attr("data-message")}),r={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:i.map(function(n){return{field:"Message",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,r)}},deleteSelectedErrorsByMessage:function(n){var i,r,t;if(!$(n.currentTarget).hasClass("disabled")&&(i=confirm("Are you sure you want to delete these errors?  This action is not recoverable."),i)){if(r=this.$(".error-select-checkbox:checked"),t=_.map(r,function(n){return $(n).data("message-hash")}),!t||t.length===0)return;$.ajax({url:"/errors/delete-by-hash",data:JSON.stringify({messageHashes:t}),type:"POST",contentType:"application/json",dataType:"json"}).then(window.pjaxReload)}},initErrorsChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.hash?$("<a class='pie-legend-label' />").text(t.label).attr("href","/errors/filtered?hash="+t.hash).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})},initUserImpactChart:function(t){var i=$.plot(".bar-chart",t,{series:{bars:{show:!0,horizontal:!0,fill:1,barWidth:.95,lineWidth:0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".bar-legend"),labelFormatter:function(n,t){return $("<a class='bar-legend-label' />").text(t.label).attr("href","/errors/filtered?hash="+t.hash).attr("data-index",t.index).prop("outerHTML")},sorted:function(n,t){var i=parseInt($(n).data("index")),r=parseInt($(t).data("index"));return i<r}},yaxis:{show:!1,min:0,max:5.95},xaxis:{tickColor:"#eee",max:100,tickFormatter:function(){return""}},grid:{hoverable:!0,clickable:!0,borderWidth:1,borderColor:"#eee"},tooltip:!1});i.getData().forEach(function(t){t.barLabel||(t.highlightColor=n(t.color))}),i.getData().forEach(function(n){var r=n.data[0],u=Math.round(r[0]),t=i.pointOffset({x:r[0],y:r[1]}),f=i.pointOffset({x:0,y:r[1]});u<20?$("<div class='bar-label-overlay'>").css({left:t.left+10,top:t.top-22,color:"#666"}).text(u+"%").attr("title","Users Impacted: "+n.rawValue).appendTo($(".bar-chart")):u!==100||n.label?$("<div class='bar-label-overlay'>").css({left:t.left-35,top:t.top-22,color:"#fff"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):$("<div class='bar-label-overlay'>").css({top:t.top-22,color:"#333",fontFamily:"Ubuntu, san-serif",fontWeight:"bold",width:"250px",textAlign:"center"}).text(n.barLabel).appendTo($(".bar-chart"))}),$(".bar-chart").bind("plothover",function(n,t,r){$(".bar-legend-label").removeClass("highlight"),r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").addClass("highlight")}),$(".bar-chart").bind("plotclick",function(n,t,r){r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").click()}),$(".bar-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData().find(function(n){return n.index===t});i.highlight(n,n.datapoints.points)},function(){i.unhighlight()})}})}(),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}window.trackUi.UserGroupingsView=Backbone.View.extend({events:{"click .js-ignore-selected":"ignoreSelectedUserIds","click .js-delete-selected":"deleteErrorsBySelectedUserIds","change .error-select-checkbox":"selectedErrorsChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged"},initialize:function(n){_.bindAll(this),this.selectedErrorsChanged(),$(".charts").length>0&&this.initErrorsChart(n.errorData)},selectedErrorsChanged:function(n){var r=this.$(".error-select-checkbox:checked"),t,i;n&&(t=$(n.currentTarget),i=t.closest(".grouped-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?this.$(".grouping-actions > button").addClass("disabled"):this.$(".grouping-actions > button").removeClass("disabled")},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedErrorsChanged(),this.$(".error-select-checkbox:checked").closest(".grouped-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".grouped-error").removeClass("selected")},ignoreSelectedUserIds:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).data("user-id")}),r={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:i.map(function(n){return{field:"UserId",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,r)}},deleteErrorsBySelectedUserIds:function(n){var i,r,t;if(!$(n.currentTarget).hasClass("disabled")&&(i=confirm("Are you sure you want to delete these errors?  This action is not recoverable."),i)){if(r=this.$(".error-select-checkbox:checked"),t=_.map(r,function(n){return $(n).data("user-id")}),!t||t.length===0)return;$.ajax({url:"/users/delete-multiple",data:JSON.stringify({userIds:t}),type:"POST",contentType:"application/json",dataType:"json"}).then(window.pjaxReload)}},initErrorsChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.label&&t.label!=="All Others"?$("<a class='pie-legend-label' />").text(t.label).attr("href","/users/filtered?userId="+encodeURIComponent(t.label)).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})}})}(),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}window.trackUi.UrlGroupingsView=Backbone.View.extend({events:{"click .js-ignore-selected":"ignoreSelectedUrls","click .js-delete-selected":"deleteSelectedUrls","change .error-select-checkbox":"selectedUrlsChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged"},initialize:function(n){_.bindAll(this),this.selectedUrlsChanged(),$(".charts").length>0&&(this.initUrlsChart(n.errorData),this.initUserImpactChart(n.userImpactData))},selectedUrlsChanged:function(n){var r=this.$(".error-select-checkbox:checked"),t,i;n&&(t=$(n.currentTarget),i=t.closest(".grouped-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?this.$(".grouping-actions > button").addClass("disabled"):this.$(".grouping-actions > button").removeClass("disabled")},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedUrlsChanged(),this.$(".error-select-checkbox:checked").closest(".grouped-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".grouped-error").removeClass("selected")},ignoreSelectedUrls:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).attr("data-url")}),r={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:i.map(function(n){return{field:"Url",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,r)}},deleteSelectedUrls:function(n){var i,r,t;if(!$(n.currentTarget).hasClass("disabled")&&(i=confirm("Are you sure you want to delete all errors with these URLs?  This action is not recoverable."),i)){if(r=this.$(".error-select-checkbox:checked"),t=_.map(r,function(n){return $(n).data("url-hash")}),!t||t.length===0)return;$.ajax({url:"/urls/delete-by-hash",data:JSON.stringify({urlHashes:t}),type:"POST",contentType:"application/json",dataType:"json"}).then(window.pjaxReload)}},initUrlsChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.hash?$("<a class='pie-legend-label' />").text(t.label).attr("href","/urls/filtered?hash="+t.hash).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})},initUserImpactChart:function(t){var i=$.plot(".bar-chart",t,{series:{bars:{show:!0,horizontal:!0,fill:1,barWidth:.95,lineWidth:0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".bar-legend"),labelFormatter:function(n,t){return $("<a class='bar-legend-label' />").text(t.label).attr("href","/urls/filtered?hash="+t.hash).attr("data-index",t.index).prop("outerHTML")},sorted:function(n,t){var i=parseInt($(n).data("index")),r=parseInt($(t).data("index"));return i<r}},yaxis:{show:!1,min:0,max:5.95},xaxis:{tickColor:"#eee",max:100,tickFormatter:function(){return""}},grid:{hoverable:!0,clickable:!0,borderWidth:1,borderColor:"#eee"},tooltip:!1});i.getData().forEach(function(t){t.barLabel||(t.highlightColor=n(t.color))}),i.getData().forEach(function(n){var r=n.data[0],u=Math.round(r[0]),t=i.pointOffset({x:r[0],y:r[1]}),f=i.pointOffset({x:0,y:r[1]});u<20?$("<div class='bar-label-overlay'>").css({left:t.left+10,top:t.top-22,color:"#666"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):u!==100||n.label?$("<div class='bar-label-overlay'>").css({left:t.left-35,top:t.top-22,color:"#fff"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):$("<div class='bar-label-overlay'>").css({top:t.top-22,color:"#333",fontFamily:"Ubuntu, san-serif",fontWeight:"bold",width:"250px",textAlign:"center"}).text(n.barLabel).appendTo($(".bar-chart"))}),$(".bar-chart").bind("plothover",function(n,t,r){$(".bar-legend-label").removeClass("highlight"),r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").addClass("highlight")}),$(".bar-chart").bind("plotclick",function(n,t,r){r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").click()}),$(".bar-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData().find(function(n){return n.index===t});i.highlight(n,n.datapoints.points)},function(){i.unhighlight()})}})}(),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}window.trackUi.BrowserGroupingsView=Backbone.View.extend({events:{"click .js-ignore-selected":"ignoreSelectedBrowsers","click .js-delete-selected":"deleteSelectedBrowsers","change .error-select-checkbox":"selectedBrowsersChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged"},initialize:function(n){_.bindAll(this),this.selectedBrowsersChanged(),$(".charts").length>0&&(this.initBrowsersChart(n.errorData),this.initUserImpactChart(n.userImpactData))},selectedBrowsersChanged:function(n){var r=this.$(".error-select-checkbox:checked"),t,i;n&&(t=$(n.currentTarget),i=t.closest(".grouped-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?this.$(".grouping-actions > button").addClass("disabled"):this.$(".grouping-actions > button").removeClass("disabled")},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedBrowsersChanged(),this.$(".error-select-checkbox:checked").closest(".grouped-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".grouped-error").removeClass("selected")},ignoreSelectedBrowsers:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).data("browser")}),r={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:i.map(function(n){return{field:"Browser",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,r)}},deleteSelectedBrowsers:function(n){var i,r,t;if(!$(n.currentTarget).hasClass("disabled")&&(i=confirm("Are you sure you want to delete all errors from these browsers?  This action is not recoverable."),i)){if(r=this.$(".error-select-checkbox:checked"),t=_.map(r,function(n){return $(n).data("browser")}),!t||t.length===0)return;$.ajax({url:"/browsers/delete-multiple",data:JSON.stringify({browsers:t}),type:"POST",contentType:"application/json",dataType:"json"}).then(window.pjaxReload)}},initBrowsersChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.browser?$("<a class='pie-legend-label' />").text(t.label).attr("href","/browsers/filtered?name="+t.browser.name+"&version="+t.browser.version).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})},initUserImpactChart:function(t){var i=$.plot(".bar-chart",t,{series:{bars:{show:!0,horizontal:!0,fill:1,barWidth:.95,lineWidth:0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".bar-legend"),labelFormatter:function(n,t){return $("<a class='bar-legend-label' />").text(t.label).attr("href","/browsers/filtered?name="+t.browser.name+"&version="+t.browser.version).attr("data-index",t.index).prop("outerHTML")},sorted:function(n,t){var i=parseInt($(n).data("index")),r=parseInt($(t).data("index"));return i<r}},yaxis:{show:!1,min:0,max:5.95},xaxis:{tickColor:"#eee",max:100,tickFormatter:function(){return""}},grid:{hoverable:!0,clickable:!0,borderWidth:1,borderColor:"#eee"},tooltip:!1});i.getData().forEach(function(t){t.barLabel||(t.highlightColor=n(t.color))}),i.getData().forEach(function(n){var r=n.data[0],u=Math.round(r[0]),t=i.pointOffset({x:r[0],y:r[1]}),f=i.pointOffset({x:0,y:r[1]});u<20?$("<div class='bar-label-overlay'>").css({left:t.left+10,top:t.top-22,color:"#666"}).text(u+"%").attr("title","Users Impacted: "+n.rawValue).appendTo($(".bar-chart")):u!==100||n.label?$("<div class='bar-label-overlay'>").css({left:t.left-35,top:t.top-22,color:"#fff"}).text(u+"%").attr("title","Users Impacted: "+n.rawValue).appendTo($(".bar-chart")):$("<div class='bar-label-overlay'>").css({top:t.top-22,color:"#333",fontFamily:"Ubuntu, san-serif",fontWeight:"bold",width:"250px",textAlign:"center"}).text(n.barLabel).appendTo($(".bar-chart"))}),$(".bar-chart").bind("plothover",function(n,t,r){$(".bar-legend-label").removeClass("highlight"),r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").addClass("highlight")}),$(".bar-chart").bind("plotclick",function(n,t,r){r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").click()}),$(".bar-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData().find(function(n){return n.index===t});i.highlight(n,n.datapoints.points)},function(){i.unhighlight()})}})}(),function(){var n=Backbone.Model.extend({url:"/usage/feedback"});window.trackUi.FeedbackView=Backbone.View.extend({events:{"click #feedback-tab":"toggle","click .cancel-feedback":"cancelFeedback","click #more-feedback":"resetFeedback","click #submit-feedback":"submitFeedback"},initialize:function(){_.bindAll(this);$(".feedback-link").on("click",this.toggle)},toggle:function(){$("#feedbackModal").modal("show")},resetFeedback:function(){this.hideErrorMessage(),this.hideProgress(),this.$("#feedback-message").val(""),this.$("#feedback-type").val("Feedback"),this.$("#feedback-message-container").show(),this.$("#feedback-success-container").hide()},cancelFeedback:function(){$("#feedbackModal").modal("hide"),this.resetFeedback()},submitFeedback:function(){var t,i;if(this.hideErrorMessage(),t={feedbackType:this.$("#feedback-type option:selected").val(),feedbackMessage:this.$("#feedback-message").val()},!t.feedbackMessage){this.showErrorMessage("Please enter a message");return}this.showProgress(),i=new n(t),i.save().then(this.onFeedbackSuccess)},onFeedbackSuccess:function(){this.$("#feedback-success-container").show(),this.$("#feedback-message-container").hide(),this.hideProgress()},showErrorMessage:function(n){this.$("#feedback-error-message").text(n).show()},hideErrorMessage:function(){this.$("#feedback-error-message").text("").hide()},showProgress:function(){this.$("#feedback-progress").show()},hideProgress:function(){this.$("#feedback-progress").hide()}})}(),function(){function t(n){var t=n,i,u,e;if(n>=1e3){var o=["","k","m","b","t"],f=(""+n).length,r=0;for(f>3&&(r=1),f>6&&(r=2),i="",u=2;u>=1;u--)if(i=parseFloat((r!=0?n/Math.pow(1e3,r):n).toPrecision(u)),e=(i+"").replace(/[^a-zA-Z 0-9]+/g,""),e.length<=2)break;i%1!=0&&(shortNum=i.toFixed(1)),t=i+o[r]}return _.isNumber(t)&&t.toString().indexOf(".")>=0&&(t=t>=1?t.toFixed(1):t.toFixed(2)),t}function f(t){var i=Math.round(t);return Math.round(i/n)*n}var i=0,r=1,e=2,c=0,o=1,n=36e5,s=n*72,h=n*24,u=25;window.trackUi.ErrorsAndHitsChart=Backbone.View.extend({events:{"plotselected .chart":"onPlotSelected","plotselected .overview":"onOverviewSelected","plothover .chart":"onPlotHover","resize .chart":"onPlotResize","change #toggle-ratio":"toggleRatio","change #toggle-errors":"toggleErrors","change #toggle-page-views":"togglePageViews","mouseenter .error-page-view-chart-legend":"clear","mouseenter .errors-page-views-label":"clear","mouseleave .chart":"clear"},initialize:function(n){this.errorData=n.errorData,this.hitData=n.hitData,this.ratioData=n.ratioData,this.startDate=n.startDate,this.endDate=n.endDate,_.bindAll(this),this.showingRatio=!1,this.showingErrors=!0,this.showingPageViews=!0,this.$el.find(".chart").length>0&&this.$el.find(".overview").length>0&&this.drawChart()},drawChart:function(){var n=this.getChartOptions();this.plot=$.plot(this.$el.find(".chart"),[],n),this.overview=$.plot(this.$el.find(".overview"),this.getOverviewChartData(),this.getOverviewOptions()),this.setInitialChartSelections()},setMinTickSize:function(n){var t=n.getXAxes()[0];!t.datamax||!t.datamin||t.datamax-t.datamin>s?(t.options.timeformat="%b %e",t.options.minTickSize=[1,"day"]):t.datamax-t.datamin<=h?(t.options.timeformat="%b %e %h:00",t.options.minTickSize=[1,"hour"]):(t.options.timeformat="%b %e %h:00",t.options.minTickSize=[4,"hour"])},toggleRatio:function(n){var t=$(n.currentTarget).is(":checked");this.showingRatio=t,this.plot.getData()[e].lines.show=t,this.plot.getAxes().y3axis.options.show=t,this.plot.getOptions().tooltipOpts.shifts.y=t?-130:-100,this.plot.setupGrid(),this.plot.draw()},toggleErrors:function(n){var t=$(n.currentTarget).is(":checked");this.showingErrors=t,this.plot.getData()[i].lines.show=t,this.plot.getAxes().yaxis.options.show=t,this.plot.setupGrid(),this.plot.draw()},togglePageViews:function(n){var t=$(n.currentTarget).is(":checked");this.showingPageViews=t,this.plot.getData()[r].lines.show=t,this.plot.getAxes().y2axis.options.show=t,this.plot.setupGrid(),this.plot.draw()},onPlotSelected:function(t,i){i.xaxis.from=f(i.xaxis.from),i.xaxis.to=f(i.xaxis.to)+(n-1),this.plot.setData(this.getChartDataForRange(i.xaxis.from,i.xaxis.to)),this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.overview.setSelection(i,!0),this.pjaxLoadPageToSpecificTimeInterval(i)},onOverviewSelected:function(t,i){i.xaxis.from=f(i.xaxis.from),i.xaxis.to=f(i.xaxis.to)+(n-1),this.plot.setData(this.getChartDataForRange(i.xaxis.from,i.xaxis.to)),this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.pjaxLoadPageToSpecificTimeInterval(i)},setInitialChartSelections:function(){this.plot.setData(this.getChartDataForRange(this.startDate,this.endDate));var n={xaxis:{from:this.startDate,to:this.endDate}};this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.overview.setSelection(n,!0);window.EventBus.on("dispose",this.dispose,this)},pjaxLoadPageToSpecificTimeInterval:function(n){var i=moment(n.xaxis.from).utc().toISOString(),t=null;n.xaxis.to&&n.xaxis.to!==this.getOverviewXAxis().datamax&&(t=moment(n.xaxis.to).utc().toISOString()),$.ajax({url:"/filter/fixedRange",method:"POST",dataType:"json",contentType:"application/json",data:JSON.stringify({minDate:i,maxDate:t})}).then(window.pjaxReload)},clear:function(){this.plot.unhighlight(),this.plot.hideTooltip()},highlightIndex:function(n){this.showingErrors&&this.plot.highlight(i,n),this.showingPageViews&&this.plot.highlight(r,n),this.showingRatio&&this.plot.highlight(e,n)},getOverviewXAxis:function(){return this.overview.getXAxes()[0]},getXAxis:function(){return this.plot.getXAxes()[0]},getYAxis:function(n){return this.plot.getYAxes()[n]},getErrorSeries:function(){return this.plot.getData()[i]},getHitSeries:function(){return this.plot.getData()[r]},getChartOptions:function(){var n=this;return{legend:{show:!1},grid:{show:!0,borderColor:"#f3f3f3",backgroundColor:"#f6f6f6",color:"#ccc",hoverable:!0,labelMargin:5},xaxis:{show:!0,mode:"time",timezone:"browser",font:{family:"sans-serif",color:"#666"},timeformat:"%a %m/%d",minTickSize:[1,"day"]},yaxes:[{ticks:4,font:{color:"#B40404",family:"sans-serif",size:14,weight:"bold"},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0},{ticks:4,tickLength:0,position:"right",font:{color:"#2ca3c0",family:"sans-serif",size:14,weight:"bold"},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0},{show:!1,ticks:4,position:"right",font:{color:"#7B61BA",family:"sans-serif",size:14,weight:"bold"},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0}],selection:{mode:"x",color:"#A0D8F1",shape:"miter"},tooltip:!0,tooltipOpts:{show:!0,xDateFormat:"%a %m/%d",lines:!0,shifts:{x:-80,y:-100},content:function(u,f,s,h){var a=new Date(f).getHours(),c=h.dataIndex,l=n.plot.getData(),v=t(l[i].data[c][o]),y=t(l[r].data[c][o]),p=t(l[e].data[c][o]),w=n.showingErrors?"":"display: none;",b=n.showingPageViews?"":"display: none;",k=n.showingRatio?"":"display: none;";return['<div class="main-graph-tooltip">','<div class="header">%x '+a+":00<\/div>",'<div class="body">','<div class="error-count" style="'+w+'">Error Count: <span>'+v+"<\/span><\/div>",'<div class="page-view-count" style="'+b+'">Page Views: <span>'+y+"<\/span><\/div>",'<div class="ratio" style="'+k+'">Errors/Page View: <span>'+p+"<\/span><\/div>","<\/div>","<\/div>"].join("")}},hooks:{processOffset:[this.setMinTickSize]}}},getOverviewOptions:function(){var i=this;return{legend:{show:!1},grid:{show:!0,borderColor:"#eeeeee",backgroundColor:"#f6f6f6",color:"#bbb",hoverable:!1,labelMargin:5},xaxis:{show:!1},yaxes:[{ticks:4,tickLength:0,font:{color:"#fff",family:"sans-serif",size:14},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0},{ticks:4,position:"right",tickLength:0,font:{color:"#fff",family:"sans-serif",size:14},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0},{show:!1,ticks:1,font:{color:"#eee",family:"sans-serif",size:14},min:0}],selection:{mode:"x",color:"#A0D8F1",shape:"miter",minSize:2}}},getChartData:function(){return[{label:"Errors Per Day",data:this.errorData,color:"#B40404",shadowSize:0,lines:{fill:!0,lineWidth:3,fillColor:{colors:["#E19A9A","#B40404"]}},yaxis:1},{label:"Page Views Per Day",data:this.hitData,color:"#2ca3c0",lines:{show:!0,lineWidth:3},shadowSize:0,yaxis:2,highlightColor:"#2ca3c0"},{label:"Errors Per Page View",data:this.ratioData,color:"#7B61BA",lines:{show:!1,lineWidth:3},shadowSize:0,yaxis:3,highlightColor:"#7B61BA"}]},getChartDataForRange:function(n,t){var i=this.getChartData();return _.each(i,function(i){i.data=_.filter(i.data,function(i){return i[0]>=n&&i[0]<=t})}),i},getOverviewChartData:function(){var n=this.getChartData();return n[0].lines.lineWidth=1.5,n[1].lines.lineWidth=1.5,n},onPlotHover:function(t,u,f){var y,p,o;if(this.clear(),!this.disposing||window.location.pathname==="/"){if(f){this.highlightIndex(f.dataIndex),this.plot.showTooltip(f,u);return}var s=this.getXAxis(),c=this.getYAxis(i),l=this.getYAxis(r),e=u.x,a=u.y1,v=u.y2,g=e>s.datamin&&e<s.datamax;if(g&&(y=a>c.min&&a<c.max,p=v>l.min&&v<l.max,y||p)){var w=n/2,b=this.getErrorSeries().data,h=Math.floor((e-s.datamin)/n)-1;for(h=Math.max(h,0),o=h;o<b.length;o++){var k=b[o],nt=k[0]-w,d=k[0]+w;if(e>nt&&e<d){this.plot.showTooltip({dataIndex:o,series:this.plot.getData()[0]},u),this.highlightIndex(o);return}if(e<d)break}this.clear()}}},onPlotResize:function(){this.setInitialChartSelections()},dispose:function(){this.disposing=!0,this.plot.hideTooltip(),window.EventBus.off("dispose",this.dispose,this)}})}(),function(){var t=3e4,n=null;window.trackUi.WallboardView=Backbone.View.extend({events:{click:"handleWallboardClick"},initialize:function(){this.$body=$("body"),window.location.hash==="#wallboard"&&this.startWallboardMode()},handleWallboardClick:function(){this.$body.hasClass("wallboard")?this.stopWallboardMode():this.startWallboardMode()},stopWallboardMode:function(){this.$body.removeClass("wallboard"),window.location.hash="",this.clearInterval()},startWallboardMode:function(){this.clearInterval(),this.$body.addClass("wallboard"),window.location.hash="#wallboard",n=setInterval(function(){window.pjaxReload()},t)},clearInterval:function(){n&&(clearInterval(n),n=null)}})}(),function(){window.trackUi.UsageStatisticsView=Backbone.View.extend({initialize:function(){this.currentHits=parseInt(this.$("#current-hits-used").val()),this.maxHits=parseInt(this.$("#subscription-max-hits").val()),this.drawCurrentUsageGauge(),this.$("#projected-hits-used").length>0&&(this.projectedHits=parseInt(this.$("#projected-hits-used").val()),this.drawProjectedHitsGauge())},drawCurrentUsageGauge:function(){this.currentUsageGauge=new JustGage({parentNode:$("#current-usage-gauge").get(0),value:this.currentHits,min:0,max:this.maxHits,label:"Hits",humanFriendly:!0,humanFriendlyDecimal:1})},drawProjectedHitsGauge:function(){this.projectedUsageGauge=new JustGage({parentNode:$("#projected-usage-gauge").get(0),value:this.projectedHits,min:0,max:this.maxHits,label:"Hits",humanFriendly:!0,humanFriendlyDecimal:1})}})}(),function(n,t,i,r,u,f){"use strict";n.trackUi.ProcessorTimingsChartView=r.View.extend({data:null,chartArea:null,initialize:function(r){i.bindAll(this),this.data=r.data,t(n).off("resize.graph");t(n).on("resize.graph",i.debounce(this.render,100));n.EventBus.on("dispose",this.dispose,this)},render:function(){this.$el.html(""),this.chartArea=new u.Area({element:this.$el,data:this.data,xkey:"ReportTimestamp",ykeys:["GetCustomersTime","DequeueTime","IgnoreTime","GroupingTime","StatusTime","SaveTime"],labels:["Get Customers","Dequeue","Ignore","Grouping","Status","Save"],xLabels:"60min",xLabelFormat:this.formatDate,yLabelFormat:this.formatMilliseconds,lineColors:["#2ca3c0","#B40404","#888888","#8EAC8E","#ac8eac","#efb74b"],dateFormat:this.formatDate})},formatDate:function(n){var t=new f(n);return t.utc().format("HH:mm")},formatMilliseconds:function(n){return Math.round(parseFloat(n),10)+" ms"},dispose:function(){t(n).off("resize.graph"),n.EventBus.off("dispose",this.dispose,this)}})}(window,jQuery,_,Backbone,Morris,moment),function(n){var t,i,u,r,f;return f=["object","array","number","string","boolean","null"],u=function(){function t(n){n==null&&(n={}),this.options=n}return t.prototype.htmlEncode=function(n){return n!==null?n.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""},t.prototype.jsString=function(n){return n=JSON.stringify(n).slice(1,-1),this.htmlEncode(n)},t.prototype.decorateWithSpan=function(n,t){return'<span class="'+t+'">'+this.htmlEncode(n)+"<\/span>"},t.prototype.valueToHTML=function(t,i){var r;if(i==null&&(i=0),r=Object.prototype.toString.call(t).match(/\s(.+)]/)[1].toLowerCase(),this.options.strict&&!n.inArray(r,f))throw new Error(""+r+" is not a valid JSON value type");return this[""+r+"ToHTML"].call(this,t,i)},t.prototype.nullToHTML=function(){return this.decorateWithSpan("null","null")},t.prototype.undefinedToHTML=function(){return this.decorateWithSpan("undefined","undefined")},t.prototype.numberToHTML=function(n){return this.decorateWithSpan(n,"num")},t.prototype.stringToHTML=function(n){var t,i;return/^(http|https|file):\/\/[^\s]+$/i.test(n)?'<a href="'+this.htmlEncode(n)+'"><span class="q">"<\/span>'+this.jsString(n)+'<span class="q">"<\/span><\/a>':(t="",n=this.jsString(n),this.options.nl2br&&(i=/([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g,i.test(n)&&(t=" multiline",n=(n+"").replace(i,"$1<br />"))),'<span class="string'+t+'">"'+n+'"<\/span>')},t.prototype.booleanToHTML=function(n){return this.decorateWithSpan(n,"bool")},t.prototype.arrayToHTML=function(n,t){var o,r,u,f,i,s,e,h;for(t==null&&(t=0),r=!1,i="",f=n.length,u=e=0,h=n.length;e<h;u=++e)s=n[u],r=!0,i+="<li>"+this.valueToHTML(s,t+1),f>1&&(i+=","),i+="<\/li>",f--;return r?(o=t===0?"":" collapsible",'[<ul class="array level'+t+o+'">'+i+"<\/ul>]"):"[ ]"},t.prototype.objectToHTML=function(n,t){var e,f,o,u,i,r,s;t==null&&(t=0),f=!1,i="",u=0;for(r in n)u++;for(r in n)s=n[r],f=!0,o=this.options.escape?this.jsString(r):r,i+='<li><a class="prop" href="javascript:;"><span class="q">"<\/span>'+o+'<span class="q">"<\/span><\/a>: '+this.valueToHTML(s,t+1),u>1&&(i+=","),i+="<\/li>",u--;return f?(e=t===0?"":" collapsible",'{<ul class="obj level'+t+e+'">'+i+"<\/ul>}"):"{ }"},t.prototype.jsonToHTML=function(n){return'<div class="jsonview">'+this.valueToHTML(n)+"<\/div>"},t}(),typeof module!="undefined"&&module!==null&&(module.exports=u),i=function(){function n(){}return n.bindEvent=function(n,t){var i;return n.firstChild.addEventListener("click",function(n){return function(i){return n.toggle(i.target.parentNode.firstChild,t)}}(this)),i=document.createElement("div"),i.className="collapser",i.innerHTML=t.collapsed?"+":"-",i.addEventListener("click",function(n){return function(i){return n.toggle(i.target,t)}}(this)),n.insertBefore(i,n.firstChild),t.collapsed?this.collapse(i):void 0},n.expand=function(n){var i,t;if(t=this.collapseTarget(n),t.style.display!=="")return i=t.parentNode.getElementsByClassName("ellipsis")[0],t.parentNode.removeChild(i),t.style.display="",n.innerHTML="-"},n.collapse=function(n){var i,t;if(t=this.collapseTarget(n),t.style.display!=="none")return t.style.display="none",i=document.createElement("span"),i.className="ellipsis",i.innerHTML=" &hellip; ",t.parentNode.insertBefore(i,t),n.innerHTML="+"},n.toggle=function(n,t){var r,u,e,i,o,f;if(t==null&&(t={}),e=this.collapseTarget(n),r=e.style.display==="none"?"expand":"collapse",t.recursive_collapser){for(u=n.parentNode.getElementsByClassName("collapser"),f=[],i=0,o=u.length;i<o;i++)n=u[i],f.push(this[r](n));return f}return this[r](n)},n.collapseTarget=function(n){var i,t;if(t=n.parentNode.getElementsByClassName("collapsible"),t.length)return i=t[0]},n}(),t=n,r={collapse:function(n){if(n.innerHTML==="-")return i.collapse(n)},expand:function(n){if(n.innerHTML==="+")return i.expand(n)},toggle:function(n){return i.toggle(n)}},t.fn.JSONView=function(){var n,s,h,f,o,e,c;return n=arguments,r[n[0]]!=null?(o=n[0],this.each(function(){var i,u;return i=t(this),n[1]!=null?(u=n[1],i.find(".jsonview .collapsible.level"+u).siblings(".collapser").each(function(){return r[o](this)})):i.find(".jsonview > ul > li .collapsible").siblings(".collapser").each(function(){return r[o](this)})})):(f=n[0],e=n[1]||{},s={collapsed:!1,nl2br:!1,recursive_collapser:!1,escape:!0,strict:!1},e=t.extend(s,e),h=new u(e),Object.prototype.toString.call(f)==="[object String]"&&(f=JSON.parse(f)),c=h.jsonToHTML(f),this.each(function(){var u,f,o,n,s,r;for(u=t(this),u.html(c),o=u[0].getElementsByClassName("collapsible"),r=[],n=0,s=o.length;n<s;n++)f=o[n],f.parentNode.nodeName==="LI"?r.push(i.bindEvent(f.parentNode,e)):r.push(void 0);return r}))}}(jQuery),function(){"use strict";window.NewErrorsModel=Backbone.Model.extend({url:function(){return"/recent/new?newerThan="+encodeURIComponent(this.get("newerThan"))},defaults:{errorCount:0}}),window.RecentView=Backbone.View.extend({events:{"click .recent-load-more":"showNewErrors","click .js-ignore-selected":"ignoreSelectedErrorsByMessage","click .js-delete-selected":"deleteSelectedErrorIds","change .error-select-checkbox":"selectedErrorsChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged"},initialize:function(n){_.bindAll(this),this.selectedErrorsChanged(),this.model=new NewErrorsModel({newerThan:n.mostRecentErrorTime});this.model.on("change",this.onNewErrors);this.shouldCheck=n.shouldCheck,this.startCheckForNew();window.EventBus.on("dispose",this.dispose,this)},startCheckForNew:function(){this.shouldCheck&&(this.model.get("errorCount")===0&&this.$(".recent-listening").show(),setTimeout(this.checkForNew,15e3))},checkForNew:function(){this.shouldCheck&&this.model.fetch().done(this.startCheckForNew)},onNewErrors:function(){this.shouldCheck&&(this.$(".recent-listening").hide(),this.$(".recent-load-more").text(this.buildErrorText(this.model.get("errorCount"))),this.$(".recent-load-more").show())},errorTextTemplate:_.template("Load <%= count %> more error<%= count === 1 ? '' : 's'%>"),buildErrorText:function(n){return this.errorTextTemplate({count:n})},showNewErrors:function(){window.pjaxReload()},selectedErrorsChanged:function(n){var r=this.$(".error-select-checkbox:checked"),u=_.map(r,function(n){return $(n).data("error-id")}),t,i;window.ErrorStatusChooser&&window.ErrorStatusChooser.setErrorIds(u),n&&(t=$(n.currentTarget),i=t.closest(".filtered-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?(this.$(".filter-actions > button").addClass("disabled"),this.$(".error-status-dropdown .action-button").addClass("disabled")):(this.$(".filter-actions > button").removeClass("disabled"),this.$(".error-status-dropdown .action-button").removeClass("disabled"))},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedErrorsChanged(),this.$(".error-select-checkbox:checked").closest(".filtered-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".filtered-error").removeClass("selected")},deleteSelectedErrorIds:function(n){var i,r,t;if(!$(n.currentTarget).hasClass("disabled")&&(i=confirm("Are you sure you want to delete these errors?  This action is not recoverable."),i)){if(r=this.$(".error-select-checkbox:checked"),t=_.map(r,function(n){return $(n).data("error-id")}),!t||t.length===0)return;$.ajax({url:"/errors/delete-by-id",data:JSON.stringify({errorIds:t}),type:"POST",contentType:"application/json",dataType:"json"}).then(window.pjaxReload)}},ignoreSelectedErrorsByMessage:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).attr("data-message")}),r=_.unique(i),u={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:r.map(function(n){return{field:"Message",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,u)}},dispose:function(){this.shouldCheck=!1,window.EventBus.off("dispose",this.dispose,this)}})}(),function(){function r(n){var t=n,i,u,e;if(n>=1e3){var o=["","k","m","b","t"],f=(""+n).length,r=0;for(f>3&&(r=1),f>6&&(r=2),i="",u=2;u>=1;u--)if(i=parseFloat((r!=0?n/Math.pow(1e3,r):n).toPrecision(u)),e=(i+"").replace(/[^a-zA-Z 0-9]+/g,""),e.length<=2)break;i%1!=0&&(shortNum=i.toFixed(1)),t=i+o[r]}return _.isNumber(t)&&t.toString().indexOf(".")>=0&&(t=t>=1?t.toFixed(1):t.toFixed(2)),t}var t=0,i=1,n=36e5,u=n*72,f=n*24,e=25;window.trackUi.SimpleChart=Backbone.View.extend({events:{plothover:"onPlotHover"},initialize:function(n){this.errorData=n.errorData,this.errorAnnotations=n.errorAnnotations,_.bindAll(this),this.drawChart()},drawChart:function(){var n=this.getChartOptions(),t=this.getChartData();this.plot=$.plot(this.$el,t,n),this.insertAnnotations()},setInitialChartSelections:function(){var n=this,t;$.each(this.plot.getXAxes(),function(t,i){var r=i.options;r.min=n.startDate,r.max=n.endDate}),t={xaxis:{from:this.startDate,to:this.endDate}},this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.overview.setSelection(t,!0),this.highlightCorrectRangeButton();window.EventBus.on("dispose",this.dispose,this)},insertAnnotations:function(){var t,u,f;if(this.errorAnnotations)for(t=0;t<this.errorAnnotations.length;t++){var r=this.errorAnnotations[t],e=this.plot.pointOffset({x:r.date,y:0}),i=r.label.length*5.75,n=e.left-i/2;n+i>this.$el.width()&&(n=this.$el.width()-i),n<0&&(n=0),u=_.template("<div style='position:absolute;left:<%= x %>px;top:-13px;color:#666;font-size:10px;font-weight:bold;text-align:center;width:<%= width %>px;'><%- label %><\/div>"),f=u({x:n,width:i,label:r.label}),this.$el.append(f)}},clear:function(){this.plot.unhighlight(),this.plot.hideTooltip()},getXAxis:function(){return this.plot.getXAxes()[0]},getYAxis:function(n){return this.plot.getYAxes()[n]},getChartOptions:function(){var n=this,u=_.map(this.errorAnnotations,function(n){return{color:"#efb74b",lineWidth:3,xaxis:{from:n.date,to:n.date}}}),f=_.template(['<div class="main-graph-tooltip">','<div class="header">%x <%- hours %>:00<\/div>','<div class="body">','<div class="error-count">Error Count: <span><%- errorCount %><\/span><\/div>',"<\/div>","<\/div>"].join(""));return{legend:{show:!1},grid:{show:!0,borderColor:"#f6f6f6",borderWidth:0,backgroundColor:{colors:["#fff","#f3f3f3"]},color:"#ccc",hoverable:!0,labelMargin:1,minBorderMargin:1,markings:u},xaxis:{mode:"time",timezone:"browser",font:{family:"sans-serif",color:"#aaa",size:10,weight:"bold"},timeformat:"%m/%d",minTickSize:[1,"day"]},yaxes:[{ticks:2,font:{color:"#B40404",family:"sans-serif",size:1},tickFormatter:function(){return""},panRange:!1,zoomRange:!1}],tooltip:!0,tooltipOpts:{show:!0,xDateFormat:"%a %m/%d",lines:!0,shifts:{x:-80,y:-70},content:function(u,e,o,s){var h=new Date(e).getHours(),c=s.dataIndex,l=n.plot.getData(),a=r(l[t].data[c][i]);return f({hours:h,errorCount:a})}}}},getChartData:function(){return[{data:this.errorData,color:"#B40404",shadowSize:0,lines:{fill:!0,lineWidth:2,fillColor:{colors:["#E19A9A","#B40404"]}},yaxis:1}]},highlightIndex:function(n){this.plot.highlight(t,n)},clear:function(){this.plot.unhighlight(),this.plot.hideTooltip()},onPlotHover:function(i,r,u){var l,e;if(this.clear(),u){this.highlightIndex(u.dataIndex),this.plot.showTooltip(u,r);return}var o=this.getXAxis(),h=this.getYAxis(0),f=r.x,c=r.y1,w=f>o.datamin&&f<o.datamax;if(w&&(l=c>h.min&&c<h.max,l)){var a=n/2,v=this.plot.getData()[t].data,s=Math.floor((f-o.datamin)/n)-1;for(s=Math.max(s,0),e=s;e<v.length;e++){var y=v[e],b=y[0]-a,p=y[0]+a;if(f>b&&f<p){this.plot.showTooltip({dataIndex:e,series:this.plot.getData()[0]},r),this.highlightIndex(e);return}if(f<p)break}this.clear()}}})}(),function(){function t(n){var t=n,i,u,e;if(n>=1e3){var o=["","k","m","b","t"],f=(""+n).length,r=0;for(f>3&&(r=1),f>6&&(r=2),i="",u=2;u>=1;u--)if(i=parseFloat((r!=0?n/Math.pow(1e3,r):n).toPrecision(u)),e=(i+"").replace(/[^a-zA-Z 0-9]+/g,""),e.length<=2)break;i%1!=0&&(shortNum=i.toFixed(1)),t=i+o[r]}return _.isNumber(t)&&t.toString().indexOf(".")>=0&&(t=t.toFixed(1)),t}function f(t){var i=Math.round(t);return Math.round(i/n)*n}var i=0,r=1,o=0,e=1,n=36e5,s=n*72,h=n*24,u=25;window.trackUi.ErrorsAndUsersChart=Backbone.View.extend({events:{"plotselected .chart":"onPlotSelected","plotselected .overview":"onOverviewSelected","plothover .chart":"onPlotHover","resize .chart":"onPlotResize","change #toggle-errors":"toggleErrors","change #toggle-users":"toggleUsers","mouseenter .error-user-chart-legend":"clear","mouseenter .total-counts":"clear","mouseleave .chart":"clear"},initialize:function(n){this.errorData=n.errorData,this.userData=n.userData,this.startDate=n.startDate,this.endDate=n.endDate,_.bindAll(this),this.showingErrors=!0,this.showingUsers="showingUsers"in n?n.showingUsers:!0,this.$el.find(".chart").length>0&&this.$el.find(".overview").length>0&&this.drawChart()},drawChart:function(){var n=this.getChartOptions();this.plot=$.plot(this.$el.find(".chart"),[],n),this.overview=$.plot(this.$el.find(".overview"),this.getOverviewChartData(),this.getOverviewOptions()),this.setInitialChartSelections()},setMinTickSize:function(n){var t=n.getXAxes()[o];!t.datamax||!t.datamin||t.datamax-t.datamin>s?(t.options.timeformat="%b %e",t.options.minTickSize=[1,"day"]):t.datamax-t.datamin<=h?(t.options.timeformat="%b %e %h:00",t.options.minTickSize=[1,"hour"]):(t.options.timeformat="%b %e %h:00",t.options.minTickSize=[4,"hour"])},toggleErrors:function(n){var t=$(n.currentTarget).is(":checked");this.showingErrors=t,this.plot.getData()[i].bars.show=t,this.plot.getAxes().yaxis.options.show=t,this.plot.setupGrid(),this.plot.draw()},toggleUsers:function(n){var t=$(n.currentTarget).is(":checked");this.showingUsers=t,this.plot.getData()[r].lines.show=t,this.plot.getAxes().y2axis.options.show=t,this.plot.setupGrid(),this.plot.draw()},onPlotSelected:function(t,i){i.xaxis.from=f(i.xaxis.from),i.xaxis.to=f(i.xaxis.to)+(n-1),this.plot.setData(this.getChartDataForRange(i.xaxis.from,i.xaxis.to)),this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.overview.setSelection(i,!0),this.pjaxLoadPageToSpecificTimeInterval(i)},onOverviewSelected:function(t,i){i.xaxis.from=f(i.xaxis.from),i.xaxis.to=f(i.xaxis.to)+(n-1),this.plot.setData(this.getChartDataForRange(i.xaxis.from,i.xaxis.to)),this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.pjaxLoadPageToSpecificTimeInterval(i)},setInitialChartSelections:function(){this.plot.setData(this.getChartDataForRange(this.startDate,this.endDate));var n={xaxis:{from:this.startDate,to:this.endDate}};this.setMinTickSize(this.plot),this.plot.setupGrid(),this.plot.draw(),this.plot.clearSelection(),this.overview.setSelection(n,!0);window.EventBus.on("dispose",this.dispose,this)},pjaxLoadPageToSpecificTimeInterval:function(n){var i=moment(n.xaxis.from).utc().toISOString(),t=null;n.xaxis.to&&n.xaxis.to!==this.getOverviewXAxis().datamax&&(t=moment(n.xaxis.to).utc().toISOString()),$.ajax({url:"/filter/fixedRange",method:"POST",dataType:"json",contentType:"application/json",data:JSON.stringify({minDate:i,maxDate:t})}).then(function(){var n=new Url(window.location.toString());delete n.query.page,window.pjaxReplace(n.toString()),window.pjaxReload()})},clear:function(){this.plot.unhighlight(),this.plot.hideTooltip()},highlightIndex:function(n){this.showingErrors&&this.plot.highlight(i,n),this.showingUsers&&this.plot.highlight(r,n)},getOverviewXAxis:function(){return this.overview.getXAxes()[0]},getXAxis:function(){return this.plot.getXAxes()[0]},getYAxis:function(n){return this.plot.getYAxes()[n]},getErrorSeries:function(){return this.plot.getData()[i]},getUserSeries:function(){return this.plot.getData()[r]},getChartOptions:function(){var n=this;return{legend:{show:!1},grid:{show:!0,borderColor:"#f3f3f3",backgroundColor:"#f6f6f6",color:"#ccc",hoverable:!0,labelMargin:5},xaxis:{show:!0,mode:"time",timezone:"browser",font:{family:"sans-serif",color:"#666"},timeformat:"%a %m/%d",minTickSize:[1,"day"]},yaxes:[{ticks:4,font:{color:"#B40404",family:"sans-serif",size:14,weight:"bold"},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0},{ticks:4,tickLength:0,position:"right",font:{color:"#f0bc6c",family:"sans-serif",size:14,weight:"bold"},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0,show:n.showingUsers}],selection:{mode:"x",color:"#A0D8F1",shape:"miter"},tooltip:!0,tooltipOpts:{show:!0,xDateFormat:"%a %m/%d",lines:!0,shifts:{x:-80,y:-100},content:function(u,f,o,s){var y=new Date(f).getHours(),h=s.dataIndex,c=n.plot.getData(),p=t(c[i].data[h][e]),l=0,a,v;return n.showingUsers&&(l=t(c[r].data[h][e])),a=n.showingErrors?"":"display: none;",v=n.showingUsers?"":"display: none;",['<div class="main-graph-tooltip">','<div class="header">%x '+y+":00<\/div>",'<div class="body">','<div class="error-count" style="'+a+'">Error Count: <span>'+p+"<\/span><\/div>",'<div class="user-count" style="'+v+'">Users Impacted: <span>'+l+"<\/span><\/div>","<\/div>","<\/div>"].join("")}},hooks:{processOffset:[this.setMinTickSize]}}},getOverviewOptions:function(){var i=this;return{legend:{show:!1},grid:{show:!0,borderColor:"#eeeeee",backgroundColor:"#f6f6f6",color:"#bbb",hoverable:!1,labelMargin:5},xaxis:{show:!1},yaxes:[{ticks:4,tickLength:0,font:{color:"#fff",family:"sans-serif",size:14},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0},{ticks:4,position:"right",tickLength:0,font:{color:"#fff",family:"sans-serif",size:14},tickFormatter:t,panRange:!1,zoomRange:!1,labelWidth:u,min:0}],selection:{mode:"x",color:"#A0D8F1",shape:"miter",minSize:2}}},getChartData:function(){return[{label:"Errors",data:this.errorData,color:"rgba(180,4,4, 0.6)",shadowSize:0,hoverable:!0,bars:{show:!0,fill:!0,lineWidth:1,barColor:"rgba(180,4,4,0.7)",fillColor:{colors:["rgba(180,4,4,0.5)","rgba(180,4,4, 0.4)"]},align:"center",barWidth:288e4},yaxis:1},{label:"User Impact",data:this.userData,color:"#f0bc6c",lines:{show:!0,lineWidth:3},shadowSize:0,yaxis:2,highlightColor:"#f0bc6c"}]},getChartDataForRange:function(n,t){var i=this.getChartData();return _.each(i,function(i){i.data=_.filter(i.data,function(i){return i[0]>=n&&i[0]<=t})}),i},getOverviewChartData:function(){var n=this.getChartData();return n[1].lines.lineWidth=1.5,n},onPlotHover:function(t,u,f){var y,p,o;if(this.clear(),!this.disposing||window.location.pathname==="/"){if(f){this.highlightIndex(f.dataIndex),this.plot.showTooltip(f,u);return}var s=this.getXAxis(),c=this.getYAxis(i),l=this.getYAxis(r),e=u.x,a=u.y1,v=u.y2,g=e>s.datamin&&e<s.datamax;if(g&&(y=a>c.min&&a<c.max,p=v>l.min&&v<l.max,y||p)){var w=n/2,b=this.getErrorSeries().data,h=Math.floor((e-s.datamin)/n)-1;for(h=Math.max(h,0),o=h;o<b.length;o++){var k=b[o],nt=k[0]-w,d=k[0]+w;if(e>nt&&e<d){this.plot.showTooltip({dataIndex:o,series:this.plot.getData()[0]},u),this.highlightIndex(o);return}if(e<d)break}this.clear()}}},onPlotResize:function(){this.setInitialChartSelections()},dispose:function(){this.disposing=!0,this.plot.hideTooltip(),window.EventBus.off("dispose",this.dispose,this)}})}(),function(){function u(t){if(!t||t.length!==1)throw new Error("Could not init modal. $modalContents was wrong.");if($modal=t.closest("."+n),$modal.length===0){$modal=$("<div><\/div>",{"class":n}),$modal.insertBefore(t),t.appendTo($modal),t.addClass(r),t.css("display",""),$modal.mousedown(f),$("body").off("keyup.handRolledModal");$("body").on("keyup.handRolledModal",e);$(document).off("pjax:beforeReplace.modal");$(document).on("pjax:beforeReplace.modal",function(){window.trackUi.modal.hide()})}return $modal}function f(r){var u=$(r.target);u.hasClass(n)&&(u.removeClass(t),$(document.body).removeClass(i))}function e(n){n.which===27&&window.trackUi.modal.hide()}var n="hand-rolled-modal",i="hand-rolled-modal-open",r="modal-contents",t="show-modal";window.trackUi.modal={show:function(n){$modalContents=$(n),$modal=u($modalContents),$modal.addClass(t),$modalContents.focus(),$(document.body).addClass(i)},hide:function(){$("."+n+"."+t).removeClass(t),$(document.body).removeClass(i)}}}(),function(n,t,i,r,u,f){"use strict";n.trackUi.ProcessorMetricChartView=r.View.extend({data:null,chartArea:null,initialize:function(r){i.bindAll(this),this.data=r.data,t(n).off("resize.graph");t(n).on("resize.graph",i.debounce(this.render,100));n.EventBus.on("dispose",this.dispose,this)},render:function(){this.$el.html(""),this.chartArea=new u.Area({element:this.$el,data:this.data,xkey:"ReportTimestamp",ykeys:["Processed","Dropped","Ignored","Errored"],labels:["Processed","Dropped","Ignored","Errored"],xLabels:"60min",xLabelFormat:this.formatDate,lineColors:["#2ca3c0","#efb74b","#888888","#B40404"],dateFormat:this.formatDate})},formatDate:function(n){var t=new f(n);return t.utc().format("HH:mm")},dispose:function(){t(n).off("resize.graph"),n.EventBus.off("dispose",this.dispose,this)}})}(window,jQuery,_,Backbone,Morris,moment),function(){window.trackUi.OnboardingApplicationsView=Backbone.View.extend({events:{"click .application-edit-button":"showEditRow","click .cancel-edit":"hideEditRow","click .application-item i.fa":"showInstallInstructions","submit .application-save form":"saveApplicationEdits","submit .application-entry":"saveNewApplication","keydown .application-name-edit":"submitEditForm","click .copy-button":"onCodeCopy","click .code-nav a[data-code]":"onCodeSwitch","keyup .application-entry .application-key":"applicationKeyChanged","keyup .application-entry .application-name":"applicationNameChanged"},showEditRow:function(n){n.stopPropagation();var t=$(n.currentTarget).closest(".application-item");t.find(".application-name").hide(),t.find(".application-actions").hide(),t.find(".application-name-edit").show(),t.find(".application-save").show()},hideEditRow:function(n){n.stopPropagation();var t=$(n.target).closest(".application-item");t.find(".application-name").show(),t.find(".application-actions").show(),t.find(".application-name-edit").hide(),t.find(".application-save").hide()},showInstallInstructions:function(n){$(n.currentTarget).closest(".application-item").find(".application-config-container").slideToggle(100)},saveNewApplication:function(n){return n.preventDefault(),gtag("event","application_create",{event_category:"funnel"}),$.pjax.submit(n,"#pjax-container",{replace:!1,push:!1,scrollTo:!1}),!1},saveApplicationEdits:function(n){n.preventDefault();var t=$(n.currentTarget).closest(".application-item"),i=t.find(".application-name-edit").val();return t.find("input[name='applicationName']").val(i),$.pjax.submit(n,"#pjax-container",{replace:!1,push:!1,scrollTo:!1}),!1},submitEditForm:function(n){n.keyCode===13&&this.$(".application-save form").submit()},applicationNameChanged:function(){if(!this.$currentApplicationKey().data("dirty")){var t=(this.$currentApplicationName().val()||"").replace(/[^a-zA-Z0-9_\- ]+/g,"").replace(/[ ]+/g,"-").toLowerCase();t.length<=25&&this.$currentApplicationKey().val(t)}this.updateLiveInstallConfig()},applicationKeyChanged:function(){this.$currentApplicationKey().data("dirty",!0),this.updateLiveInstallConfig()},$currentApplicationKey:function(){return $(".application-entry .application-key")},$currentApplicationName:function(){return $(".application-entry .application-name")},updateLiveInstallConfig:function(){var n=this.$currentApplicationKey().val();n&&n.length!==0?($(".application-entry-config").slideDown(200),$(".live-config-container .copy-button").show()):($(".application-entry-config").slideUp(200),$(".live-config-container .copy-button").hide()),$(".live-application-key").text(n)},onCodeSwitch:window.trackUi.onCodeSwitch,onCodeCopy:window.trackUi.onCodeCopy})}(),function(n,t,i,r){n.trackUi.OnboardingInstallView=t.View.extend({events:{"submit .js-check-form":"onCheckFormSubmit","click .copy-button":"onCodeCopy","click .code-nav a[data-code]":"onCodeSwitch"},$checkForm:null,$checkButton:null,$checkAlertBox:null,$checkSuccessBox:null,$troubleshootMsg:null,checkCount:0,initialize:function(){i.bindAll(this),this.$checkForm=this.$(".js-check-form"),this.$checkButton=this.$(".js-check-button"),this.$checkAlertBox=this.$(".js-check-alert-box"),this.$checkSuccessBox=this.$(".js-check-success-box"),this.$troubleshootMsg=this.$(".js-check-troubleshoot"),this.$checkNotInstalledBox=this.$(".js-check-not-installed"),n.prettyPrint()},trackInstallAnalytics:function(){gtag("event","install",{event_category:"funnel"})},onCheckFormSubmit:function(){return this.showCheckFormLoading(),r.ajax({url:this.$checkForm.attr("action"),type:this.$checkForm.attr("method"),cache:!1,dataType:"json"}).done(this.onCheckFormSuccess).fail(this.onCheckFormFail),!1},onCheckFormSuccess:function(n){this.hideCheckFormLoading(),this.checkCount++,this.$checkNotInstalledBox.hide(),n&&n.HasInstalled?(this.trackInstallAnalytics(),this.$checkAlertBox.hide(),this.$checkSuccessBox.show()):this.checkCount>=3?this.$troubleshootMsg.show():this.$checkNotInstalledBox.show()},onCheckFormFail:function(){n.location.reload()},showCheckFormLoading:function(){this.$checkButton.attr("disabled","disabled").addClass("disabled")},hideCheckFormLoading:function(){this.$checkButton.removeAttr("disabled").removeClass("disabled")},onCodeSwitch:n.trackUi.onCodeSwitch,onCodeCopy:n.trackUi.onCodeCopy})}(window,window.Backbone,window._,window.jQuery,window.querystring),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}function t(n){var t=n,r,u,e;if(n>=1e3){var o=["","k","m","b","t"],f=(""+n).length,i=0;for(f>3&&(i=1),f>6&&(i=2),r="",u=2;u>=1;u--)if(r=parseFloat((i!=0?n/Math.pow(1e3,i):n).toPrecision(u)),e=(r+"").replace(/[^a-zA-Z 0-9]+/g,""),e.length<=2)break;t=r+o[i]}return _.isNumber(t)&&t.toString().indexOf(".")>=0&&(t=t.toFixed(1)),t}window.trackUi.VersionGroupingsView=Backbone.View.extend({events:{"change .error-select-checkbox":"selectedMetadataChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged","click .js-ignore-selected":"ignoreSelectedVersions"},initialize:function(n){_.bindAll(this),this.selectedMetadataChanged(),$(".charts").length>0&&(this.initMetadataValuesChart(n.errorData),this.initHistogram(n.histogramData))},selectedMetadataChanged:function(n){var r=this.$(".error-select-checkbox:checked"),t,i;n&&(t=$(n.currentTarget),i=t.closest(".grouped-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?this.$(".grouping-actions > button").addClass("disabled"):this.$(".grouping-actions > button").removeClass("disabled")},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedMetadataChanged(),this.$(".error-select-checkbox:checked").closest(".grouped-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".grouped-error").removeClass("selected")},ignoreSelectedVersions:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).attr("data-metadata-filter")}),r={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:i.map(function(n){return{field:"Metadata",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,r)}},initMetadataValuesChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.value?$("<a class='pie-legend-label' />").text(t.label).attr("href","/versions/filtered?value="+encodeURIComponent(t.value)).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})},initHistogram:function(i){var r=$.plot(".bar-chart",i,{series:{stack:!0,bars:{show:!0,lineWidth:0,fill:1,align:"center",barWidth:324e4}},xaxis:{show:!0,mode:"time",timezone:"browser",font:{family:"sans-serif",color:"#666"},timeformat:"%a %m/%d",minTickSize:[8,"hour"]},legend:{show:!0,labelBoxBorderColor:!1,container:$(".bar-legend"),labelFormatter:function(n,t){return $("<a class='bar-legend-label' />").text(t.label).attr("href","/versions/filtered?value="+encodeURIComponent(t.value)).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0,borderWidth:1,borderColor:"#eee"},tooltip:!0,tooltipOpts:{content:function(n,i,r){var f=new Date(i).getHours(),e=t(r);return['<div class="histogram-graph-tooltip">','<div class="header">%x '+f+":00<\/div>",'<div class="body">','<div class="error-count"><strong>'+n+":<\/strong> <span>"+e+"<\/span><\/div>","<\/div>","<\/div>"].join("")}}});r.getData().forEach(function(t){t.barLabel||(t.highlightColor=n(t.color))}),$(".bar-chart").bind("plotclick",function(n,t,i){i&&i.series&&i.series.value&&window.pjaxLoad("/versions/filtered?value="+encodeURIComponent(i.series.value))})}})}(),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}window.trackUi.MetadataAllKeysView=Backbone.View.extend({initialize:function(n){_.bindAll(this),$(".charts").length>0&&(this.initMetadataAllKeysChart(n.errorData),this.initUserImpactChart(n.userImpactData))},initMetadataAllKeysChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.key?$("<a class='pie-legend-label' />").text(t.label).attr("href","/metadata?key="+t.key).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})},initUserImpactChart:function(t){var i=$.plot(".bar-chart",t,{series:{bars:{show:!0,horizontal:!0,fill:1,barWidth:.95,lineWidth:0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".bar-legend"),labelFormatter:function(n,t){return $("<a class='bar-legend-label' />").text(t.label).attr("href","/metadata?key="+t.key).attr("data-index",t.index).prop("outerHTML")},sorted:function(n,t){var i=parseInt($(n).data("index")),r=parseInt($(t).data("index"));return i<r}},yaxis:{show:!1,min:0,max:5.95},xaxis:{tickColor:"#eee",max:100,tickFormatter:function(){return""}},grid:{hoverable:!0,clickable:!0,borderWidth:1,borderColor:"#eee"},tooltip:!1});i.getData().forEach(function(t){t.barLabel||(t.highlightColor=n(t.color))}),i.getData().forEach(function(n){var r=n.data[0],u=Math.round(r[0]),t=i.pointOffset({x:r[0],y:r[1]}),f=i.pointOffset({x:0,y:r[1]});u<20?$("<div class='bar-label-overlay'>").css({left:t.left+10,top:t.top-22,color:"#666"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):u!==100||n.label?$("<div class='bar-label-overlay'>").css({left:t.left-35,top:t.top-22,color:"#fff"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):$("<div class='bar-label-overlay'>").css({top:t.top-22,color:"#333",fontFamily:"Ubuntu, san-serif",fontWeight:"bold",width:"250px",textAlign:"center"}).text(n.barLabel).appendTo($(".bar-chart"))}),$(".bar-chart").bind("plothover",function(n,t,r){$(".bar-legend-label").removeClass("highlight"),r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").addClass("highlight")}),$(".bar-chart").bind("plotclick",function(n,t,r){r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").click()}),$(".bar-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData().find(function(n){return n.index===t});i.highlight(n,n.datapoints.points)},function(){i.unhighlight()})}})}(),function(){"use strict";function n(n){var t=.8,i=$.color.parse(n),r=i.r*t,u=i.g*t,f=i.b*t;return $.color.make(r,u,f,1).toString()}window.trackUi.MetadataValueGroupingsView=Backbone.View.extend({events:{"change .error-select-checkbox":"selectedMetadataChanged","change .all-errors-checkbox":"allErrorsCheckboxChanged","click .js-ignore-selected":"ignoreSelectedValues"},initialize:function(n){_.bindAll(this),this.selectedMetadataChanged(),$(".charts").length>0&&(this.initMetadataValuesChart(n.errorData),this.initUserImpactChart(n.userImpactData))},selectedMetadataChanged:function(n){var r=this.$(".error-select-checkbox:checked"),t,i;n&&(t=$(n.currentTarget),i=t.closest(".grouped-error"),t.is(":checked")?i.addClass("selected"):i.removeClass("selected")),r.length===0?this.$(".grouping-actions > button").addClass("disabled"):this.$(".grouping-actions > button").removeClass("disabled")},allErrorsCheckboxChanged:function(n){var t=$(n.currentTarget);t.is(":checked")?this.$(".error-select-checkbox").prop("checked",!0):this.$(".error-select-checkbox").prop("checked",!1),this.selectedMetadataChanged(),this.$(".error-select-checkbox:checked").closest(".grouped-error").addClass("selected"),this.$(".error-select-checkbox").not(":checked").closest(".grouped-error").removeClass("selected")},ignoreSelectedValues:function(n){if(!$(n.currentTarget).hasClass("disabled")){var t=this.$(".error-select-checkbox:checked"),i=_.map(t,function(n){return $(n).attr("data-metadata-filter")}),r={description:"",displayDescription:"",applicationKey:window.globalFilterData.currentApplicationKey,conditions:i.map(function(n){return{field:"Metadata",matchType:"Exact",conditionValue:n}})};window.renderIgnoreBuilder(window.globalFilterData,r)}},initMetadataValuesChart:function(t){var i=$.plot(".pie-chart",t,{series:{pie:{innerRadius:.5,show:!0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".pie-legend"),labelFormatter:function(n,t){return t.value?$("<a class='pie-legend-label' />").text(t.label).attr("href","/metadata?key="+encodeURIComponent(t.key)+"&value="+encodeURIComponent(t.value)).attr("data-index",t.index).prop("outerHTML"):$("<div class='pie-legend-label'>").text(t.label).attr("data-index",t.index).prop("outerHTML")}},grid:{hoverable:!0,clickable:!0},tooltip:!1});i.getData().forEach(function(t){t.highlightColor=n(t.color)}),$(".pie-chart").bind("plothover",function(n,t,r){var u,e,f;if($(".pie-legend-label").removeClass("highlight"),$(".pie-percent").text(""),u=$(".pie-percent").get(0).getBoundingClientRect(),e=t.pageX>=u.left&&t.pageX<=u.right&&t.pageY>=u.top&&t.pageY<=u.bottom,r===null||e){i.pieUnhighlight();return}r&&($(".pie-legend-label[data-index='"+r.seriesIndex+"']").addClass("highlight"),f=i.getData()[r.seriesIndex],$(".pie-percent").text(Math.round(f.percent)+"%").css("color",f.highlightColor))}),$(".pie-chart").bind("plotclick",function(n,t,r){r===null&&i.pieUnhighlight(),r&&$(".pie-legend-label[data-index='"+r.seriesIndex+"']").click()}),$(".pie-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData()[t];i.pieHighlight(n,"manual"),$(".pie-percent").text(Math.round(n.percent)+"%").css("color",n.highlightColor)},function(){var n=parseInt($(this).data("index"));i.pieUnhighlight(i.getData()[n],"manual"),$(".pie-percent").text("")})},initUserImpactChart:function(t){var i=$.plot(".bar-chart",t,{series:{bars:{show:!0,horizontal:!0,fill:1,barWidth:.95,lineWidth:0}},legend:{show:!0,labelBoxBorderColor:!1,container:$(".bar-legend"),labelFormatter:function(n,t){return $("<a class='bar-legend-label' />").text(t.label).attr("href","/metadata?key="+encodeURIComponent(t.key)+"&value="+encodeURIComponent(t.value)).attr("data-index",t.index).prop("outerHTML")},sorted:function(n,t){var i=parseInt($(n).data("index")),r=parseInt($(t).data("index"));return i<r}},yaxis:{show:!1,min:0,max:5.95},xaxis:{tickColor:"#eee",max:100,tickFormatter:function(){return""}},grid:{hoverable:!0,clickable:!0,borderWidth:1,borderColor:"#eee"},tooltip:!1});i.getData().forEach(function(t){t.barLabel||(t.highlightColor=n(t.color))}),i.getData().forEach(function(n){var r=n.data[0],u=Math.round(r[0]),t=i.pointOffset({x:r[0],y:r[1]}),f=i.pointOffset({x:0,y:r[1]});u<20?$("<div class='bar-label-overlay'>").css({left:t.left+10,top:t.top-22,color:"#666"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):u!==100||n.label?$("<div class='bar-label-overlay'>").css({left:t.left-35,top:t.top-22,color:"#fff"}).attr("title","Users Impacted: "+n.rawValue).text(u+"%").appendTo($(".bar-chart")):$("<div class='bar-label-overlay'>").css({top:t.top-22,color:"#333",fontFamily:"Ubuntu, san-serif",fontWeight:"bold",width:"250px",textAlign:"center"}).text(n.barLabel).appendTo($(".bar-chart"))}),$(".bar-chart").bind("plothover",function(n,t,r){$(".bar-legend-label").removeClass("highlight"),r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").addClass("highlight")}),$(".bar-chart").bind("plotclick",function(n,t,r){r===null&&i.unhighlight(),r&&$(".bar-legend-label[data-index='"+r.series.index+"']").click()}),$(".bar-legend-label").hover(function(){var t=parseInt($(this).data("index")),n=i.getData().find(function(n){return n.index===t});i.highlight(n,n.datapoints.points)},function(){i.unhighlight()})}})}()